]> git.proxmox.com Git - systemd.git/commitdiff
Imported Upstream version 217
authorMartin Pitt <martin.pitt@ubuntu.com>
Thu, 20 Nov 2014 14:28:12 +0000 (15:28 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Thu, 20 Nov 2014 14:28:12 +0000 (15:28 +0100)
1606 files changed:
Makefile-man.am
Makefile.am
Makefile.in
NEWS
README
TODO
build-aux/config.guess
build-aux/config.sub
catalog/systemd.pl.catalog [new file with mode: 0644]
config.h.in
configure
configure.ac
docs/gudev/Makefile.in
docs/gudev/html/index.html
docs/gudev/version.xml
docs/libudev/Makefile.in
docs/libudev/html/index.html
docs/libudev/version.xml
factory/etc/nsswitch.conf [new file with mode: 0644]
factory/etc/pam.d/other [new file with mode: 0644]
factory/etc/pam.d/system-auth [new file with mode: 0644]
hwdb/20-OUI.hwdb
hwdb/20-bluetooth-vendor-product.hwdb
hwdb/20-pci-vendor-model.hwdb
hwdb/20-usb-vendor-model.hwdb
hwdb/60-keyboard.hwdb
m4/attributes.m4
man/SD_ALERT.html
man/SD_CRIT.html
man/SD_DEBUG.html
man/SD_EMERG.html
man/SD_ERR.html
man/SD_ID128_CONST_STR.html
man/SD_ID128_FORMAT_STR.html
man/SD_ID128_FORMAT_VAL.html
man/SD_ID128_MAKE.html
man/SD_INFO.html
man/SD_JOURNAL_APPEND.html
man/SD_JOURNAL_CURRENT_USER.html
man/SD_JOURNAL_FOREACH.html
man/SD_JOURNAL_FOREACH_BACKWARDS.html
man/SD_JOURNAL_FOREACH_DATA.html
man/SD_JOURNAL_FOREACH_UNIQUE.html
man/SD_JOURNAL_INVALIDATE.html
man/SD_JOURNAL_LOCAL_ONLY.html
man/SD_JOURNAL_NOP.html
man/SD_JOURNAL_RUNTIME_ONLY.html
man/SD_JOURNAL_SUPPRESS_LOCATION.html
man/SD_JOURNAL_SYSTEM.html
man/SD_LISTEN_FDS_START.html
man/SD_NOTICE.html
man/SD_WARNING.html
man/binfmt.d.5
man/binfmt.d.html
man/binfmt.d.xml
man/bootchart.conf.5
man/bootchart.conf.html
man/bootctl.1
man/bootctl.html
man/bootctl.xml
man/bootup.7
man/bootup.html
man/bootup.xml
man/busctl.1
man/busctl.html
man/coredump.conf.5
man/coredump.conf.html
man/coredump.conf.xml
man/coredumpctl.1
man/coredumpctl.html
man/coredumpctl.xml
man/crypttab.5
man/crypttab.html
man/crypttab.xml
man/custom-html.xsl
man/daemon.7
man/daemon.html
man/daemon.xml
man/file-hierarchy.7
man/file-hierarchy.html
man/file-hierarchy.xml
man/glib-event-glue.c [new file with mode: 0644]
man/halt.8
man/halt.html
man/halt.xml
man/hostname.5
man/hostname.html
man/hostname.xml
man/hostnamectl.1
man/hostnamectl.html
man/hostnamectl.xml
man/index.html
man/init.html
man/journalctl.1
man/journalctl.html
man/journalctl.xml
man/journald.conf.5
man/journald.conf.html
man/journald.conf.xml
man/kernel-command-line.7
man/kernel-command-line.html
man/kernel-command-line.xml
man/kernel-install.8
man/kernel-install.html
man/libsystemd-pkgconfig.xml
man/locale.conf.5
man/locale.conf.html
man/locale.conf.xml
man/localectl.1
man/localectl.html
man/localectl.xml
man/localtime.5
man/localtime.html
man/localtime.xml
man/loginctl.1
man/loginctl.html
man/logind.conf.5
man/logind.conf.html
man/logind.conf.xml
man/machine-id.5
man/machine-id.html
man/machine-id.xml
man/machine-info.5
man/machine-info.html
man/machine-info.xml
man/machinectl.1
man/machinectl.html
man/modules-load.d.5
man/modules-load.d.html
man/nss-myhostname.8
man/nss-myhostname.html
man/nss-myhostname.xml
man/os-release.5
man/os-release.html
man/os-release.xml
man/pam_systemd.8
man/pam_systemd.html
man/pam_systemd.xml
man/poweroff.html
man/reboot.html
man/resolved.conf.5
man/resolved.conf.html
man/resolved.conf.xml
man/runlevel.8
man/runlevel.html
man/runlevel.xml
man/sd-daemon.3
man/sd-daemon.html
man/sd-daemon.xml
man/sd-id128.3
man/sd-id128.html
man/sd-id128.xml
man/sd-journal.3
man/sd-journal.html
man/sd-journal.xml
man/sd-login.3
man/sd-login.html
man/sd-login.xml
man/sd-readahead.3 [deleted file]
man/sd-readahead.html [deleted file]
man/sd-readahead.xml [deleted file]
man/sd_booted.3
man/sd_booted.html
man/sd_bus_creds_get_audit_login_uid.html
man/sd_bus_creds_get_audit_session_id.html
man/sd_bus_creds_get_cgroup.html
man/sd_bus_creds_get_cmdline.html
man/sd_bus_creds_get_comm.html
man/sd_bus_creds_get_connection_name.3 [new file with mode: 0644]
man/sd_bus_creds_get_connection_name.html [new file with mode: 0644]
man/sd_bus_creds_get_exe.html
man/sd_bus_creds_get_gid.html
man/sd_bus_creds_get_mask.html
man/sd_bus_creds_get_owner_uid.html
man/sd_bus_creds_get_pid.3
man/sd_bus_creds_get_pid.html
man/sd_bus_creds_get_pid.xml
man/sd_bus_creds_get_pid_starttime.html
man/sd_bus_creds_get_selinux_context.html
man/sd_bus_creds_get_session.html
man/sd_bus_creds_get_slice.html
man/sd_bus_creds_get_tid.html
man/sd_bus_creds_get_tid_comm.html
man/sd_bus_creds_get_uid.html
man/sd_bus_creds_get_unique_name.html
man/sd_bus_creds_get_unit.html
man/sd_bus_creds_get_user_unit.html
man/sd_bus_creds_get_well_known_names.html
man/sd_bus_creds_has_bounding_cap.html
man/sd_bus_creds_has_effective_cap.html
man/sd_bus_creds_has_inheritable_cap.html
man/sd_bus_creds_has_permitted_cap.html
man/sd_bus_creds_new_from_pid.3
man/sd_bus_creds_new_from_pid.html
man/sd_bus_creds_new_from_pid.xml
man/sd_bus_creds_ref.html
man/sd_bus_creds_unref.html
man/sd_bus_default_system.html
man/sd_bus_default_user.html
man/sd_bus_error.3
man/sd_bus_error.html
man/sd_bus_error.xml
man/sd_bus_error_copy.html
man/sd_bus_error_free.html
man/sd_bus_error_get_errno.html
man/sd_bus_error_has_name.html
man/sd_bus_error_is_set.html
man/sd_bus_error_set.html
man/sd_bus_error_set_const.html
man/sd_bus_error_set_errno.html
man/sd_bus_error_set_errnof.html
man/sd_bus_message_append.3
man/sd_bus_message_append.html
man/sd_bus_message_append.xml
man/sd_bus_message_append_array.3
man/sd_bus_message_append_array.html
man/sd_bus_message_append_array.xml
man/sd_bus_message_append_array_iovec.html
man/sd_bus_message_append_array_memfd.html
man/sd_bus_message_append_array_space.html
man/sd_bus_message_append_basic.3
man/sd_bus_message_append_basic.html
man/sd_bus_message_append_basic.xml
man/sd_bus_message_append_string_iovec.html
man/sd_bus_message_append_string_memfd.3
man/sd_bus_message_append_string_memfd.html
man/sd_bus_message_append_string_memfd.xml
man/sd_bus_message_append_string_space.html
man/sd_bus_message_append_strv.3
man/sd_bus_message_append_strv.html
man/sd_bus_message_append_strv.xml
man/sd_bus_message_get_cookie.3
man/sd_bus_message_get_cookie.html
man/sd_bus_message_get_cookie.xml
man/sd_bus_message_get_monotonic_usec.3
man/sd_bus_message_get_monotonic_usec.html
man/sd_bus_message_get_monotonic_usec.xml
man/sd_bus_message_get_realtime_usec.html
man/sd_bus_message_get_reply_cookie.html
man/sd_bus_message_get_seqnum.html
man/sd_bus_negotiate_creds.html
man/sd_bus_negotiate_fds.3
man/sd_bus_negotiate_fds.html
man/sd_bus_negotiate_fds.xml
man/sd_bus_negotiate_timestamps.html
man/sd_bus_new.3
man/sd_bus_new.html
man/sd_bus_new.xml
man/sd_bus_open_system.html
man/sd_bus_open_system_container.html
man/sd_bus_open_system_remote.html
man/sd_bus_open_user.3
man/sd_bus_open_user.html
man/sd_bus_open_user.xml
man/sd_bus_path_decode.html
man/sd_bus_path_encode.3
man/sd_bus_path_encode.html
man/sd_bus_path_encode.xml
man/sd_bus_ref.html
man/sd_bus_release_name.html
man/sd_bus_request_name.3
man/sd_bus_request_name.html
man/sd_bus_request_name.xml
man/sd_bus_unref.html
man/sd_event_add_child.3 [new file with mode: 0644]
man/sd_event_add_child.html [new file with mode: 0644]
man/sd_event_add_child.xml [new file with mode: 0644]
man/sd_event_add_defer.3 [new file with mode: 0644]
man/sd_event_add_defer.html [new file with mode: 0644]
man/sd_event_add_defer.xml [new file with mode: 0644]
man/sd_event_add_exit.3 [new file with mode: 0644]
man/sd_event_add_exit.html [new file with mode: 0644]
man/sd_event_add_post.3 [new file with mode: 0644]
man/sd_event_add_post.html [new file with mode: 0644]
man/sd_event_add_signal.3 [new file with mode: 0644]
man/sd_event_add_signal.html [new file with mode: 0644]
man/sd_event_add_signal.xml [new file with mode: 0644]
man/sd_event_add_time.3
man/sd_event_add_time.html
man/sd_event_add_time.xml
man/sd_event_default.html
man/sd_event_get_fd.3 [new file with mode: 0644]
man/sd_event_get_fd.html [new file with mode: 0644]
man/sd_event_get_fd.xml [new file with mode: 0644]
man/sd_event_get_name.3 [new file with mode: 0644]
man/sd_event_get_name.html [new file with mode: 0644]
man/sd_event_new.3
man/sd_event_new.html
man/sd_event_new.xml
man/sd_event_ref.html
man/sd_event_set_name.3 [new file with mode: 0644]
man/sd_event_set_name.html [new file with mode: 0644]
man/sd_event_set_name.xml [new file with mode: 0644]
man/sd_event_source_get_child_pid.3 [new file with mode: 0644]
man/sd_event_source_get_child_pid.html [new file with mode: 0644]
man/sd_event_source_get_signal.3 [new file with mode: 0644]
man/sd_event_source_get_signal.html [new file with mode: 0644]
man/sd_event_source_get_time.html
man/sd_event_source_get_time_accuracy.html
man/sd_event_source_get_time_clock.html
man/sd_event_source_set_time.html
man/sd_event_source_set_time_accuracy.html
man/sd_event_unref.html
man/sd_get_machine_names.html
man/sd_get_seats.3
man/sd_get_seats.html
man/sd_get_seats.xml
man/sd_get_sessions.html
man/sd_get_uids.html
man/sd_id128_equal.html
man/sd_id128_from_string.html
man/sd_id128_get_boot.html
man/sd_id128_get_machine.3
man/sd_id128_get_machine.html
man/sd_id128_get_machine.xml
man/sd_id128_randomize.3
man/sd_id128_randomize.html
man/sd_id128_randomize.xml
man/sd_id128_t.html
man/sd_id128_to_string.3
man/sd_id128_to_string.html
man/sd_id128_to_string.xml
man/sd_is_fifo.3
man/sd_is_fifo.html
man/sd_is_mq.html
man/sd_is_socket.html
man/sd_is_socket_inet.html
man/sd_is_socket_unix.html
man/sd_is_special.html
man/sd_journal.html
man/sd_journal_add_conjunction.html
man/sd_journal_add_disjunction.html
man/sd_journal_add_match.3
man/sd_journal_add_match.html
man/sd_journal_add_match.xml
man/sd_journal_close.html
man/sd_journal_enumerate_data.html
man/sd_journal_enumerate_unique.html
man/sd_journal_flush_matches.html
man/sd_journal_get_catalog.3
man/sd_journal_get_catalog.html
man/sd_journal_get_catalog.xml
man/sd_journal_get_catalog_for_message_id.html
man/sd_journal_get_cursor.3
man/sd_journal_get_cursor.html
man/sd_journal_get_cursor.xml
man/sd_journal_get_cutoff_monotonic_usec.html
man/sd_journal_get_cutoff_realtime_usec.3
man/sd_journal_get_cutoff_realtime_usec.html
man/sd_journal_get_cutoff_realtime_usec.xml
man/sd_journal_get_data.3
man/sd_journal_get_data.html
man/sd_journal_get_data.xml
man/sd_journal_get_data_threshold.html
man/sd_journal_get_events.html
man/sd_journal_get_fd.3
man/sd_journal_get_fd.html
man/sd_journal_get_fd.xml
man/sd_journal_get_monotonic_usec.html
man/sd_journal_get_realtime_usec.3
man/sd_journal_get_realtime_usec.html
man/sd_journal_get_realtime_usec.xml
man/sd_journal_get_timeout.html
man/sd_journal_get_usage.3
man/sd_journal_get_usage.html
man/sd_journal_get_usage.xml
man/sd_journal_next.3
man/sd_journal_next.html
man/sd_journal_next.xml
man/sd_journal_next_skip.html
man/sd_journal_open.3
man/sd_journal_open.html
man/sd_journal_open.xml
man/sd_journal_open_container.html
man/sd_journal_open_directory.html
man/sd_journal_open_files.html
man/sd_journal_perror.html
man/sd_journal_previous.html
man/sd_journal_previous_skip.html
man/sd_journal_print.3
man/sd_journal_print.html
man/sd_journal_print.xml
man/sd_journal_printv.html
man/sd_journal_process.html
man/sd_journal_query_unique.3
man/sd_journal_query_unique.html
man/sd_journal_query_unique.xml
man/sd_journal_reliable_fd.html
man/sd_journal_restart_data.html
man/sd_journal_restart_unique.html
man/sd_journal_seek_cursor.html
man/sd_journal_seek_head.3
man/sd_journal_seek_head.html
man/sd_journal_seek_head.xml
man/sd_journal_seek_monotonic_usec.html
man/sd_journal_seek_realtime_usec.html
man/sd_journal_seek_tail.html
man/sd_journal_send.html
man/sd_journal_sendv.html
man/sd_journal_set_data_threshold.html
man/sd_journal_stream_fd.3
man/sd_journal_stream_fd.html
man/sd_journal_stream_fd.xml
man/sd_journal_test_cursor.html
man/sd_journal_wait.html
man/sd_listen_fds.3
man/sd_listen_fds.html
man/sd_login_monitor.html
man/sd_login_monitor_flush.html
man/sd_login_monitor_get_events.html
man/sd_login_monitor_get_fd.html
man/sd_login_monitor_get_timeout.html
man/sd_login_monitor_new.3
man/sd_login_monitor_new.html
man/sd_login_monitor_new.xml
man/sd_login_monitor_unref.html
man/sd_machine_get_class.3 [new file with mode: 0644]
man/sd_machine_get_class.html [new file with mode: 0644]
man/sd_machine_get_class.xml [new file with mode: 0644]
man/sd_machine_get_ifindices.3 [new file with mode: 0644]
man/sd_machine_get_ifindices.html [new file with mode: 0644]
man/sd_notify.3
man/sd_notify.html
man/sd_notify.xml
man/sd_notifyf.html
man/sd_peer_get_machine_name.html
man/sd_peer_get_owner_uid.html
man/sd_peer_get_session.html
man/sd_peer_get_slice.html
man/sd_peer_get_unit.html
man/sd_peer_get_user_unit.html
man/sd_pid_get_machine_name.html
man/sd_pid_get_owner_uid.html
man/sd_pid_get_session.3
man/sd_pid_get_session.html
man/sd_pid_get_session.xml
man/sd_pid_get_slice.html
man/sd_pid_get_unit.html
man/sd_pid_get_user_unit.html
man/sd_readahead.3 [deleted file]
man/sd_readahead.html [deleted file]
man/sd_readahead.xml [deleted file]
man/sd_seat_can_graphical.html
man/sd_seat_can_multi_session.html
man/sd_seat_can_tty.html
man/sd_seat_get_active.3
man/sd_seat_get_active.html
man/sd_seat_get_active.xml
man/sd_seat_get_sessions.html
man/sd_session_get_class.html
man/sd_session_get_desktop.3 [new file with mode: 0644]
man/sd_session_get_desktop.html [new file with mode: 0644]
man/sd_session_get_display.html
man/sd_session_get_remote_host.html
man/sd_session_get_remote_user.html
man/sd_session_get_seat.html
man/sd_session_get_service.html
man/sd_session_get_state.html
man/sd_session_get_tty.html
man/sd_session_get_type.html
man/sd_session_get_uid.html
man/sd_session_get_vt.html
man/sd_session_is_active.3
man/sd_session_is_active.html
man/sd_session_is_active.xml
man/sd_session_is_remote.html
man/sd_uid_get_display.html
man/sd_uid_get_seats.html
man/sd_uid_get_sessions.html
man/sd_uid_get_state.3
man/sd_uid_get_state.html
man/sd_uid_get_state.xml
man/sd_uid_is_on_seat.html
man/sd_watchdog_enabled.3
man/sd_watchdog_enabled.html
man/sd_watchdog_enabled.xml
man/shutdown.8
man/shutdown.html
man/shutdown.xml
man/sysctl.d.5
man/sysctl.d.html
man/sysctl.d.xml
man/systemctl.1
man/systemctl.html
man/systemctl.xml
man/systemd-activate.8
man/systemd-activate.html
man/systemd-activate.xml
man/systemd-analyze.1
man/systemd-analyze.html
man/systemd-analyze.xml
man/systemd-ask-password-console.path.html
man/systemd-ask-password-console.service.8
man/systemd-ask-password-console.service.html
man/systemd-ask-password-console.service.xml
man/systemd-ask-password-wall.path.html
man/systemd-ask-password-wall.service.html
man/systemd-ask-password.1
man/systemd-ask-password.html
man/systemd-ask-password.xml
man/systemd-backlight.html
man/systemd-backlight@.service.8
man/systemd-backlight@.service.html
man/systemd-binfmt.html
man/systemd-binfmt.service.8
man/systemd-binfmt.service.html
man/systemd-binfmt.service.xml
man/systemd-bootchart.1
man/systemd-bootchart.html
man/systemd-bootchart.xml
man/systemd-bus-proxyd.8
man/systemd-bus-proxyd.html
man/systemd-bus-proxyd.socket.html
man/systemd-bus-proxyd.xml
man/systemd-bus-proxyd@.service.8
man/systemd-bus-proxyd@.service.html
man/systemd-bus-proxyd@.service.xml
man/systemd-cat.1
man/systemd-cat.html
man/systemd-cat.xml
man/systemd-cgls.1
man/systemd-cgls.html
man/systemd-cgls.xml
man/systemd-cgtop.1
man/systemd-cgtop.html
man/systemd-cgtop.xml
man/systemd-coredump.8 [new file with mode: 0644]
man/systemd-coredump.html [new file with mode: 0644]
man/systemd-coredump.xml [new file with mode: 0644]
man/systemd-cryptsetup-generator.8
man/systemd-cryptsetup-generator.html
man/systemd-cryptsetup.html
man/systemd-cryptsetup@.service.8
man/systemd-cryptsetup@.service.html
man/systemd-debug-generator.8
man/systemd-debug-generator.html
man/systemd-debug-generator.xml
man/systemd-delta.1
man/systemd-delta.html
man/systemd-detect-virt.1
man/systemd-detect-virt.html
man/systemd-detect-virt.xml
man/systemd-efi-boot-generator.8
man/systemd-efi-boot-generator.html
man/systemd-escape.1 [new file with mode: 0644]
man/systemd-escape.html [new file with mode: 0644]
man/systemd-escape.xml [new file with mode: 0644]
man/systemd-firstboot.1 [new file with mode: 0644]
man/systemd-firstboot.html [new file with mode: 0644]
man/systemd-firstboot.service.1 [new file with mode: 0644]
man/systemd-firstboot.service.html [new file with mode: 0644]
man/systemd-firstboot.xml [new file with mode: 0644]
man/systemd-fsck-root.service.html
man/systemd-fsck.html
man/systemd-fsck@.service.8
man/systemd-fsck@.service.html
man/systemd-fstab-generator.8
man/systemd-fstab-generator.html
man/systemd-fstab-generator.xml
man/systemd-getty-generator.8
man/systemd-getty-generator.html
man/systemd-getty-generator.xml
man/systemd-gpt-auto-generator.8
man/systemd-gpt-auto-generator.html
man/systemd-halt.service.8
man/systemd-halt.service.html
man/systemd-hibernate-resume-generator.8 [new file with mode: 0644]
man/systemd-hibernate-resume-generator.html [new file with mode: 0644]
man/systemd-hibernate-resume-generator.xml [new file with mode: 0644]
man/systemd-hibernate-resume.8 [new file with mode: 0644]
man/systemd-hibernate-resume.html [new file with mode: 0644]
man/systemd-hibernate-resume@.service.8 [new file with mode: 0644]
man/systemd-hibernate-resume@.service.html [new file with mode: 0644]
man/systemd-hibernate-resume@.service.xml [new file with mode: 0644]
man/systemd-hibernate.service.html
man/systemd-hostnamed.html
man/systemd-hostnamed.service.8
man/systemd-hostnamed.service.html
man/systemd-hybrid-sleep.service.html
man/systemd-inhibit.1
man/systemd-inhibit.html
man/systemd-inhibit.xml
man/systemd-initctl.html
man/systemd-initctl.service.8
man/systemd-initctl.service.html
man/systemd-initctl.socket.html
man/systemd-journal-gatewayd.html
man/systemd-journal-gatewayd.service.8
man/systemd-journal-gatewayd.service.html
man/systemd-journal-gatewayd.socket.html
man/systemd-journal-remote.8
man/systemd-journal-remote.html
man/systemd-journal-remote.xml
man/systemd-journal-upload.8 [new file with mode: 0644]
man/systemd-journal-upload.html [new file with mode: 0644]
man/systemd-journal-upload.xml [new file with mode: 0644]
man/systemd-journald-dev-log.socket.html
man/systemd-journald.html
man/systemd-journald.service.8
man/systemd-journald.service.html
man/systemd-journald.service.xml
man/systemd-journald.socket.html
man/systemd-kexec.service.html
man/systemd-localed.html
man/systemd-localed.service.8
man/systemd-localed.service.html
man/systemd-logind.html
man/systemd-logind.service.8
man/systemd-logind.service.html
man/systemd-machine-id-setup.1
man/systemd-machine-id-setup.html
man/systemd-machine-id-setup.xml
man/systemd-machined.html
man/systemd-machined.service.8
man/systemd-machined.service.html
man/systemd-modules-load.html
man/systemd-modules-load.service.8
man/systemd-modules-load.service.html
man/systemd-networkd-wait-online.html
man/systemd-networkd-wait-online.service.8
man/systemd-networkd-wait-online.service.html
man/systemd-networkd.html
man/systemd-networkd.service.8
man/systemd-networkd.service.html
man/systemd-notify.1
man/systemd-notify.html
man/systemd-notify.xml
man/systemd-nspawn.1
man/systemd-nspawn.html
man/systemd-nspawn.xml
man/systemd-path.1
man/systemd-path.html
man/systemd-poweroff.service.html
man/systemd-quotacheck.html
man/systemd-quotacheck.service.8
man/systemd-quotacheck.service.html
man/systemd-random-seed.html
man/systemd-random-seed.service.8
man/systemd-random-seed.service.html
man/systemd-readahead-collect.service.8 [deleted file]
man/systemd-readahead-collect.service.html [deleted file]
man/systemd-readahead-done.service.8 [deleted file]
man/systemd-readahead-done.service.html [deleted file]
man/systemd-readahead-done.timer.8 [deleted file]
man/systemd-readahead-done.timer.html [deleted file]
man/systemd-readahead-replay.service.8 [deleted file]
man/systemd-readahead-replay.service.html [deleted file]
man/systemd-readahead-replay.service.xml [deleted file]
man/systemd-readahead.8 [deleted file]
man/systemd-readahead.html [deleted file]
man/systemd-reboot.service.html
man/systemd-remount-fs.html
man/systemd-remount-fs.service.8
man/systemd-remount-fs.service.html
man/systemd-resolved.html
man/systemd-resolved.service.8
man/systemd-resolved.service.html
man/systemd-resolved.service.xml
man/systemd-rfkill.html
man/systemd-rfkill@.service.8
man/systemd-rfkill@.service.html
man/systemd-run.1
man/systemd-run.html
man/systemd-run.xml
man/systemd-shutdown.html
man/systemd-shutdownd.html
man/systemd-shutdownd.service.8
man/systemd-shutdownd.service.html
man/systemd-shutdownd.socket.html
man/systemd-sleep.conf.5
man/systemd-sleep.conf.html
man/systemd-sleep.html
man/systemd-socket-proxyd.8
man/systemd-socket-proxyd.html
man/systemd-suspend.service.8
man/systemd-suspend.service.html
man/systemd-suspend.service.xml
man/systemd-sysctl.html
man/systemd-sysctl.service.8
man/systemd-sysctl.service.html
man/systemd-system-update-generator.8
man/systemd-system-update-generator.html
man/systemd-system.conf.5
man/systemd-system.conf.html
man/systemd-system.conf.xml
man/systemd-sysusers.8
man/systemd-sysusers.html
man/systemd-sysusers.service.html
man/systemd-sysusers.xml
man/systemd-timedated.html
man/systemd-timedated.service.8
man/systemd-timedated.service.html
man/systemd-timedated.service.xml
man/systemd-timesyncd.html
man/systemd-timesyncd.service.8
man/systemd-timesyncd.service.html
man/systemd-timesyncd.service.xml
man/systemd-tmpfiles-clean.service.html
man/systemd-tmpfiles-clean.timer.html
man/systemd-tmpfiles-setup-dev.service.html
man/systemd-tmpfiles-setup.service.html
man/systemd-tmpfiles.8
man/systemd-tmpfiles.html
man/systemd-tty-ask-password-agent.1
man/systemd-tty-ask-password-agent.html
man/systemd-tty-ask-password-agent.xml
man/systemd-udevd-control.socket.html
man/systemd-udevd-kernel.socket.html
man/systemd-udevd.html
man/systemd-udevd.service.8
man/systemd-udevd.service.html
man/systemd-udevd.service.xml
man/systemd-update-done.html
man/systemd-update-done.service.8
man/systemd-update-done.service.html
man/systemd-update-done.service.xml
man/systemd-update-utmp-runlevel.service.html
man/systemd-update-utmp.html
man/systemd-update-utmp.service.8
man/systemd-update-utmp.service.html
man/systemd-update-utmp.service.xml
man/systemd-user-sessions.html
man/systemd-user-sessions.service.8
man/systemd-user-sessions.service.html
man/systemd-user-sessions.service.xml
man/systemd-user.conf.html
man/systemd-vconsole-setup.html
man/systemd-vconsole-setup.service.8
man/systemd-vconsole-setup.service.html
man/systemd.1
man/systemd.automount.5
man/systemd.automount.html
man/systemd.automount.xml
man/systemd.device.5
man/systemd.device.html
man/systemd.device.xml
man/systemd.directives.7
man/systemd.directives.html
man/systemd.directives.xml
man/systemd.exec.5
man/systemd.exec.html
man/systemd.exec.xml
man/systemd.html
man/systemd.index.7
man/systemd.index.html
man/systemd.index.xml
man/systemd.journal-fields.7
man/systemd.journal-fields.html
man/systemd.journal-fields.xml
man/systemd.kill.5
man/systemd.kill.html
man/systemd.kill.xml
man/systemd.link.5
man/systemd.link.html
man/systemd.link.xml
man/systemd.mount.5
man/systemd.mount.html
man/systemd.mount.xml
man/systemd.netdev.5
man/systemd.netdev.html
man/systemd.netdev.xml
man/systemd.network.5
man/systemd.network.html
man/systemd.network.xml
man/systemd.path.5
man/systemd.path.html
man/systemd.path.xml
man/systemd.preset.5
man/systemd.preset.html
man/systemd.resource-control.5
man/systemd.resource-control.html
man/systemd.resource-control.xml
man/systemd.scope.5
man/systemd.scope.html
man/systemd.service.5
man/systemd.service.html
man/systemd.service.xml
man/systemd.slice.5
man/systemd.slice.html
man/systemd.snapshot.5
man/systemd.snapshot.html
man/systemd.snapshot.xml
man/systemd.socket.5
man/systemd.socket.html
man/systemd.socket.xml
man/systemd.special.7
man/systemd.special.html
man/systemd.special.xml
man/systemd.swap.5
man/systemd.swap.html
man/systemd.swap.xml
man/systemd.target.5
man/systemd.target.html
man/systemd.target.xml
man/systemd.time.7
man/systemd.time.html
man/systemd.time.xml
man/systemd.timer.5
man/systemd.timer.html
man/systemd.timer.xml
man/systemd.unit.5
man/systemd.unit.html
man/systemd.unit.xml
man/systemd.xml
man/sysusers.d.5
man/sysusers.d.html
man/sysusers.d.xml
man/telinit.8
man/telinit.html
man/telinit.xml
man/timedatectl.1
man/timedatectl.html
man/timedatectl.xml
man/timesyncd.conf.5 [new file with mode: 0644]
man/timesyncd.conf.html [new file with mode: 0644]
man/timesyncd.conf.xml [new file with mode: 0644]
man/tmpfiles.d.5
man/tmpfiles.d.html
man/tmpfiles.d.xml
man/udev.7
man/udev.conf.5 [new file with mode: 0644]
man/udev.conf.html [new file with mode: 0644]
man/udev.conf.xml [new file with mode: 0644]
man/udev.html
man/udev.xml
man/udevadm.8
man/udevadm.html
man/udevadm.xml
man/vconsole.conf.5
man/vconsole.conf.html
network/99-default.link
po/LINGUAS
po/POTFILES.skip
po/fr.po
po/pl.po
po/ru.po
po/uk.po [new file with mode: 0644]
rules/50-firmware.rules [deleted file]
rules/80-net-setup-link.rules
rules/99-systemd.rules.in
shell-completion/bash/hostnamectl
shell-completion/bash/journalctl
shell-completion/bash/systemctl [deleted file]
shell-completion/bash/systemctl.in [new file with mode: 0644]
shell-completion/bash/systemd-analyze
shell-completion/zsh/_hostnamectl
shell-completion/zsh/_journalctl
shell-completion/zsh/_localectl
shell-completion/zsh/_sd_outputmodes [new file with mode: 0644]
shell-completion/zsh/_sd_unit_files [new file with mode: 0644]
shell-completion/zsh/_systemctl [deleted file]
shell-completion/zsh/_systemctl.in [new file with mode: 0644]
shell-completion/zsh/_systemd
shell-completion/zsh/_systemd-analyze
src/activate/activate.c
src/analyze/analyze-verify.c [new file with mode: 0644]
src/analyze/analyze-verify.h [new file with mode: 0644]
src/analyze/analyze.c
src/ask-password/ask-password.c
src/backlight/backlight.c
src/binfmt/binfmt.c
src/boot/bootctl.c
src/bootchart/bootchart.c
src/bootchart/store.c
src/bootchart/svg.c
src/bus-proxyd/bus-policy.c
src/bus-proxyd/bus-policy.h
src/bus-proxyd/bus-proxyd.c
src/bus-proxyd/test-bus-policy.c [new file with mode: 0644]
src/cgls/cgls.c
src/cgroups-agent/cgroups-agent.c
src/cgtop/cgtop.c
src/console/consoled-display.c [new file with mode: 0644]
src/console/consoled-manager.c [new file with mode: 0644]
src/console/consoled-session.c [new file with mode: 0644]
src/console/consoled-terminal.c [new file with mode: 0644]
src/console/consoled-workspace.c [new file with mode: 0644]
src/console/consoled.c [new file with mode: 0644]
src/console/consoled.h [new file with mode: 0644]
src/core/automount.c
src/core/build.h
src/core/bus-common.c [new file with mode: 0644]
src/core/bus-common.h [new file with mode: 0644]
src/core/bus-endpoint.c [new file with mode: 0644]
src/core/bus-endpoint.h [new file with mode: 0644]
src/core/busname.c
src/core/busname.h
src/core/cgroup.c
src/core/condition.c
src/core/dbus-cgroup.c
src/core/dbus-execute.c
src/core/dbus-job.c
src/core/dbus-job.h
src/core/dbus-manager.c
src/core/dbus-scope.c
src/core/dbus-service.c
src/core/dbus-snapshot.c
src/core/dbus-socket.c
src/core/dbus-swap.c
src/core/dbus-unit.c
src/core/dbus.c
src/core/dbus.h
src/core/device.c
src/core/execute.c
src/core/execute.h
src/core/failure-action.c [new file with mode: 0644]
src/core/failure-action.h [new file with mode: 0644]
src/core/hostname-setup.c
src/core/job.c
src/core/job.h
src/core/killall.c
src/core/load-dropin.c
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h
src/core/locale-setup.c
src/core/loopback-setup.c
src/core/machine-id-setup.c
src/core/macros.systemd.in
src/core/main.c
src/core/manager.c
src/core/manager.h
src/core/mount-setup.c
src/core/mount.c
src/core/namespace.c
src/core/namespace.h
src/core/org.freedesktop.systemd1.conf
src/core/org.freedesktop.systemd1.policy [deleted file]
src/core/org.freedesktop.systemd1.policy.in.in
src/core/path.c
src/core/scope.c
src/core/selinux-access.c
src/core/selinux-access.h
src/core/selinux-setup.c
src/core/selinux-setup.h
src/core/service.c
src/core/service.h
src/core/shutdown.c
src/core/smack-setup.c
src/core/smack-setup.h
src/core/socket.c
src/core/socket.h
src/core/swap.c
src/core/swap.h
src/core/switch-root.c [deleted file]
src/core/switch-root.h [deleted file]
src/core/timer.c
src/core/transaction.c
src/core/unit-printf.c
src/core/unit.c
src/core/unit.h
src/cryptsetup/cryptsetup-generator.c
src/cryptsetup/cryptsetup.c
src/dbus1-generator/dbus1-generator.c
src/delta/delta.c
src/detect-virt/detect-virt.c
src/escape/escape.c [new file with mode: 0644]
src/firstboot/firstboot.c [new file with mode: 0644]
src/fsck/fsck.c
src/fstab-generator/fstab-generator.c
src/getty-generator/getty-generator.c
src/gpt-auto-generator/gpt-auto-generator.c
src/hibernate-resume/hibernate-resume-generator.c [new file with mode: 0644]
src/hibernate-resume/hibernate-resume.c [new file with mode: 0644]
src/hostname/hostnamectl.c
src/hostname/hostnamed.c
src/hostname/org.freedesktop.hostname1.policy [deleted file]
src/initctl/initctl.c
src/journal-remote/browse.html [new file with mode: 0644]
src/journal-remote/journal-gatewayd.c [new file with mode: 0644]
src/journal-remote/journal-remote-parse.c [new file with mode: 0644]
src/journal-remote/journal-remote-parse.h [new file with mode: 0644]
src/journal-remote/journal-remote-write.c [new file with mode: 0644]
src/journal-remote/journal-remote-write.h [new file with mode: 0644]
src/journal-remote/journal-remote.c [new file with mode: 0644]
src/journal-remote/journal-remote.conf.in [new file with mode: 0644]
src/journal-remote/journal-remote.h [new file with mode: 0644]
src/journal-remote/journal-upload-journal.c [new file with mode: 0644]
src/journal-remote/journal-upload.c [new file with mode: 0644]
src/journal-remote/journal-upload.conf.in [new file with mode: 0644]
src/journal-remote/journal-upload.h [new file with mode: 0644]
src/journal-remote/microhttpd-util.c [new file with mode: 0644]
src/journal-remote/microhttpd-util.h [new file with mode: 0644]
src/journal/browse.html [deleted file]
src/journal/cat.c
src/journal/catalog.c
src/journal/catalog.h
src/journal/compress.c
src/journal/compress.h
src/journal/coredump-vacuum.c
src/journal/coredump.c
src/journal/coredumpctl.c
src/journal/journal-def.h
src/journal/journal-file.c
src/journal/journal-file.h
src/journal/journal-gatewayd.c [deleted file]
src/journal/journal-internal.h
src/journal/journal-qrcode.h
src/journal/journal-remote-parse.c [deleted file]
src/journal/journal-remote-parse.h [deleted file]
src/journal/journal-remote-write.c [deleted file]
src/journal/journal-remote-write.h [deleted file]
src/journal/journal-remote.c [deleted file]
src/journal/journal-vacuum.c
src/journal/journal-verify.c
src/journal/journalctl.c
src/journal/journald-kmsg.c
src/journal/journald-native.c
src/journal/journald-native.h
src/journal/journald-server.c
src/journal/journald-server.h
src/journal/journald-stream.c
src/journal/journald-syslog.c
src/journal/journald.c
src/journal/journald.conf
src/journal/microhttpd-util.c [deleted file]
src/journal/microhttpd-util.h [deleted file]
src/journal/mmap-cache.c
src/journal/mmap-cache.h
src/journal/sd-journal.c
src/journal/test-catalog.c
src/journal/test-compress-benchmark.c [new file with mode: 0644]
src/journal/test-compress.c
src/journal/test-journal-init.c
src/journal/test-journal-interleaving.c
src/journal/test-journal-match.c
src/journal/test-journal-send.c
src/journal/test-journal-stream.c
src/journal/test-journal.c
src/journal/test-mmap-cache.c
src/kernel-install/90-loaderentry.install
src/libsystemd-network/dhcp-internal.h
src/libsystemd-network/dhcp-network.c
src/libsystemd-network/dhcp-packet.c
src/libsystemd-network/dhcp-protocol.h
src/libsystemd-network/dhcp-server-internal.h
src/libsystemd-network/dhcp6-internal.h
src/libsystemd-network/dhcp6-option.c
src/libsystemd-network/dhcp6-protocol.h
src/libsystemd-network/ipv4ll-network.c
src/libsystemd-network/network-internal.c
src/libsystemd-network/network-internal.h
src/libsystemd-network/sd-dhcp-client.c
src/libsystemd-network/sd-dhcp-lease.c
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/sd-dhcp6-client.c
src/libsystemd-network/sd-dhcp6-lease.c
src/libsystemd-network/sd-icmp6-nd.c
src/libsystemd-network/sd-ipv4ll.c
src/libsystemd-network/test-dhcp-client.c
src/libsystemd-network/test-dhcp-option.c
src/libsystemd-network/test-dhcp-server.c
src/libsystemd-network/test-dhcp6-client.c
src/libsystemd-network/test-icmp6-rs.c
src/libsystemd-terminal/evcat.c [new file with mode: 0644]
src/libsystemd-terminal/grdev-drm.c [new file with mode: 0644]
src/libsystemd-terminal/grdev-internal.h [new file with mode: 0644]
src/libsystemd-terminal/grdev.c [new file with mode: 0644]
src/libsystemd-terminal/grdev.h [new file with mode: 0644]
src/libsystemd-terminal/idev-evdev.c [new file with mode: 0644]
src/libsystemd-terminal/idev-internal.h [new file with mode: 0644]
src/libsystemd-terminal/idev-keyboard.c [new file with mode: 0644]
src/libsystemd-terminal/idev.c [new file with mode: 0644]
src/libsystemd-terminal/idev.h [new file with mode: 0644]
src/libsystemd-terminal/modeset.c [new file with mode: 0644]
src/libsystemd-terminal/subterm.c [new file with mode: 0644]
src/libsystemd-terminal/sysview-internal.h [new file with mode: 0644]
src/libsystemd-terminal/sysview.c [new file with mode: 0644]
src/libsystemd-terminal/sysview.h [new file with mode: 0644]
src/libsystemd-terminal/term-charset.c [new file with mode: 0644]
src/libsystemd-terminal/term-internal.h [new file with mode: 0644]
src/libsystemd-terminal/term-page.c [new file with mode: 0644]
src/libsystemd-terminal/term-parser.c [new file with mode: 0644]
src/libsystemd-terminal/term-screen.c [new file with mode: 0644]
src/libsystemd-terminal/term-wcwidth.c [new file with mode: 0644]
src/libsystemd-terminal/term.h [new file with mode: 0644]
src/libsystemd-terminal/test-term-page.c [new file with mode: 0644]
src/libsystemd-terminal/test-term-parser.c [new file with mode: 0644]
src/libsystemd-terminal/test-unifont.c [new file with mode: 0644]
src/libsystemd-terminal/unifont-def.h [new file with mode: 0644]
src/libsystemd-terminal/unifont-glyph-array.bin [new file with mode: 0644]
src/libsystemd-terminal/unifont.c [new file with mode: 0644]
src/libsystemd-terminal/unifont.h [new file with mode: 0644]
src/libsystemd/libsystemd.sym.m4
src/libsystemd/sd-bus/PORTING-DBUS1
src/libsystemd/sd-bus/bus-bloom.c
src/libsystemd/sd-bus/bus-control.c
src/libsystemd/sd-bus/bus-convenience.c
src/libsystemd/sd-bus/bus-error-mapping.gperf
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-kernel.h
src/libsystemd/sd-bus/bus-match.c
src/libsystemd/sd-bus/bus-message.c
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-bus/bus-protocol.h
src/libsystemd/sd-bus/bus-slot.c
src/libsystemd/sd-bus/bus-track.c
src/libsystemd/sd-bus/bus-type.h
src/libsystemd/sd-bus/bus-util.c
src/libsystemd/sd-bus/bus-util.h
src/libsystemd/sd-bus/busctl.c
src/libsystemd/sd-bus/kdbus.h
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-bus/sd-memfd.c [deleted file]
src/libsystemd/sd-bus/test-bus-cleanup.c
src/libsystemd/sd-bus/test-bus-kernel-benchmark.c
src/libsystemd/sd-bus/test-bus-memfd.c [deleted file]
src/libsystemd/sd-bus/test-bus-zero-copy.c
src/libsystemd/sd-daemon/sd-daemon.c
src/libsystemd/sd-event/event-util.h
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-id128/sd-id128.c
src/libsystemd/sd-login/sd-login.c
src/libsystemd/sd-login/test-login.c
src/libsystemd/sd-network/network-util.c [new file with mode: 0644]
src/libsystemd/sd-network/network-util.h [new file with mode: 0644]
src/libsystemd/sd-network/sd-network.c [new file with mode: 0644]
src/libsystemd/sd-path/sd-path.c
src/libsystemd/sd-resolve/sd-resolve.c
src/libsystemd/sd-rtnl/local-addresses.c [new file with mode: 0644]
src/libsystemd/sd-rtnl/local-addresses.h [new file with mode: 0644]
src/libsystemd/sd-rtnl/rtnl-message.c
src/libsystemd/sd-rtnl/rtnl-types.c
src/libsystemd/sd-rtnl/rtnl-types.h
src/libsystemd/sd-rtnl/rtnl-util.c
src/libsystemd/sd-rtnl/rtnl-util.h
src/libsystemd/sd-rtnl/sd-rtnl.c
src/libsystemd/sd-rtnl/test-rtnl.c
src/libudev/libudev-device.c
src/libudev/libudev-hwdb.c
src/libudev/libudev-monitor.c
src/libudev/libudev-private.h
src/libudev/libudev-util.c
src/libudev/libudev.sym
src/locale/kbd-model-map
src/locale/localectl.c
src/locale/localed.c
src/locale/org.freedesktop.locale1.policy [deleted file]
src/login/70-power-switch.rules
src/login/70-uaccess.rules
src/login/inhibit.c
src/login/loginctl.c
src/login/logind-acl.c
src/login/logind-action.c
src/login/logind-button.c
src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-gperf.gperf
src/login/logind-inhibit.c
src/login/logind-seat.c
src/login/logind-session-dbus.c
src/login/logind-session.c
src/login/logind-session.h
src/login/logind-user.c
src/login/logind.c
src/login/logind.conf
src/login/logind.h
src/login/multi-seat-x.c [deleted file]
src/login/org.freedesktop.login1.policy [deleted file]
src/login/pam_systemd.c
src/login/systemd-user
src/machine-id-setup/machine-id-setup-main.c
src/machine/machine-dbus.c
src/machine/machine.c
src/machine/machine.h
src/machine/machinectl.c
src/machine/machined-dbus.c
src/machine/machined.c
src/machine/org.freedesktop.machine1.conf
src/modules-load/modules-load.c
src/network/network-util.h [deleted file]
src/network/networkctl.c [new file with mode: 0644]
src/network/networkd-address-pool.c
src/network/networkd-address.c
src/network/networkd-dhcp4.c [new file with mode: 0644]
src/network/networkd-dummy.c [deleted file]
src/network/networkd-ipv4ll.c [new file with mode: 0644]
src/network/networkd-link.c
src/network/networkd-link.h [new file with mode: 0644]
src/network/networkd-macvlan.c [deleted file]
src/network/networkd-manager.c
src/network/networkd-netdev-bond.c [new file with mode: 0644]
src/network/networkd-netdev-bond.h [new file with mode: 0644]
src/network/networkd-netdev-bridge.c [new file with mode: 0644]
src/network/networkd-netdev-bridge.h [new file with mode: 0644]
src/network/networkd-netdev-dummy.c [new file with mode: 0644]
src/network/networkd-netdev-dummy.h [new file with mode: 0644]
src/network/networkd-netdev-gperf.gperf
src/network/networkd-netdev-macvlan.c [new file with mode: 0644]
src/network/networkd-netdev-macvlan.h [new file with mode: 0644]
src/network/networkd-netdev-tunnel.c [new file with mode: 0644]
src/network/networkd-netdev-tunnel.h [new file with mode: 0644]
src/network/networkd-netdev-tuntap.c [new file with mode: 0644]
src/network/networkd-netdev-tuntap.h [new file with mode: 0644]
src/network/networkd-netdev-veth.c [new file with mode: 0644]
src/network/networkd-netdev-veth.h [new file with mode: 0644]
src/network/networkd-netdev-vlan.c [new file with mode: 0644]
src/network/networkd-netdev-vlan.h [new file with mode: 0644]
src/network/networkd-netdev-vxlan.c [new file with mode: 0644]
src/network/networkd-netdev-vxlan.h [new file with mode: 0644]
src/network/networkd-netdev.c
src/network/networkd-netdev.h [new file with mode: 0644]
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-route.c
src/network/networkd-tunnel.c [deleted file]
src/network/networkd-tuntap.c [deleted file]
src/network/networkd-veth.c [deleted file]
src/network/networkd-vlan.c [deleted file]
src/network/networkd-vxlan.c [deleted file]
src/network/networkd-wait-online-link.c [new file with mode: 0644]
src/network/networkd-wait-online-link.h [new file with mode: 0644]
src/network/networkd-wait-online-manager.c [new file with mode: 0644]
src/network/networkd-wait-online.c
src/network/networkd-wait-online.h
src/network/networkd.c
src/network/networkd.h
src/network/sd-network.c [deleted file]
src/network/test-network-tables.c [new file with mode: 0644]
src/network/test-network.c
src/notify/notify.c
src/nspawn/nspawn.c
src/nss-myhostname/ifconf.h [deleted file]
src/nss-myhostname/netlink.c [deleted file]
src/nss-myhostname/nss-myhostname.c
src/nss-myhostname/nss-myhostname.sym [new file with mode: 0644]
src/nss-mymachines/nss-mymachines.c [new file with mode: 0644]
src/nss-mymachines/nss-mymachines.sym [new file with mode: 0644]
src/nss-resolve/nss-resolve.c [new file with mode: 0644]
src/nss-resolve/nss-resolve.sym [new file with mode: 0644]
src/path/path.c
src/python-systemd/_daemon.c
src/python-systemd/_journal.c
src/python-systemd/_reader.c
src/python-systemd/id128.c
src/readahead/readahead-analyze.c [deleted file]
src/readahead/readahead-collect.c [deleted file]
src/readahead/readahead-common.c [deleted file]
src/readahead/readahead-common.h [deleted file]
src/readahead/readahead-replay.c [deleted file]
src/readahead/readahead.c [deleted file]
src/readahead/sd-readahead.c [deleted file]
src/readahead/test-ssd.c [deleted file]
src/remount-fs/remount-fs.c
src/reply-password/reply-password.c
src/resolve-host/resolve-host.c [new file with mode: 0644]
src/resolve/dns-type.c [new file with mode: 0644]
src/resolve/dns-type.h [new file with mode: 0644]
src/resolve/dns_type-from-name.gperf [new file with mode: 0644]
src/resolve/dns_type-from-name.h [new file with mode: 0644]
src/resolve/dns_type-to-name.h [new file with mode: 0644]
src/resolve/org.freedesktop.resolve1.conf [new file with mode: 0644]
src/resolve/org.freedesktop.resolve1.service [new file with mode: 0644]
src/resolve/resolved-bus.c [new file with mode: 0644]
src/resolve/resolved-bus.h [new file with mode: 0644]
src/resolve/resolved-conf.c [new file with mode: 0644]
src/resolve/resolved-conf.h [new file with mode: 0644]
src/resolve/resolved-def.h [new file with mode: 0644]
src/resolve/resolved-dns-answer.c [new file with mode: 0644]
src/resolve/resolved-dns-answer.h [new file with mode: 0644]
src/resolve/resolved-dns-cache.c [new file with mode: 0644]
src/resolve/resolved-dns-cache.h [new file with mode: 0644]
src/resolve/resolved-dns-domain.c [new file with mode: 0644]
src/resolve/resolved-dns-domain.h [new file with mode: 0644]
src/resolve/resolved-dns-packet.c [new file with mode: 0644]
src/resolve/resolved-dns-packet.h [new file with mode: 0644]
src/resolve/resolved-dns-query.c [new file with mode: 0644]
src/resolve/resolved-dns-query.h [new file with mode: 0644]
src/resolve/resolved-dns-question.c [new file with mode: 0644]
src/resolve/resolved-dns-question.h [new file with mode: 0644]
src/resolve/resolved-dns-rr.c [new file with mode: 0644]
src/resolve/resolved-dns-rr.h [new file with mode: 0644]
src/resolve/resolved-dns-scope.c [new file with mode: 0644]
src/resolve/resolved-dns-scope.h [new file with mode: 0644]
src/resolve/resolved-dns-server.c [new file with mode: 0644]
src/resolve/resolved-dns-server.h [new file with mode: 0644]
src/resolve/resolved-dns-stream.c [new file with mode: 0644]
src/resolve/resolved-dns-stream.h [new file with mode: 0644]
src/resolve/resolved-dns-transaction.c [new file with mode: 0644]
src/resolve/resolved-dns-transaction.h [new file with mode: 0644]
src/resolve/resolved-dns-zone.c [new file with mode: 0644]
src/resolve/resolved-dns-zone.h [new file with mode: 0644]
src/resolve/resolved-gperf.gperf
src/resolve/resolved-link.c [new file with mode: 0644]
src/resolve/resolved-link.h [new file with mode: 0644]
src/resolve/resolved-manager.c
src/resolve/resolved-manager.h [new file with mode: 0644]
src/resolve/resolved.c
src/resolve/resolved.conf.in
src/resolve/resolved.h [deleted file]
src/resolve/test-dns-domain.c [new file with mode: 0644]
src/run/run.c
src/shared/apparmor-util.c
src/shared/apparmor-util.h
src/shared/architecture.c
src/shared/architecture.h
src/shared/arphrd-list.c [new file with mode: 0644]
src/shared/arphrd-list.h [new file with mode: 0644]
src/shared/ask-password-api.c
src/shared/ask-password-api.h
src/shared/async.c
src/shared/barrier.c [new file with mode: 0644]
src/shared/barrier.h [new file with mode: 0644]
src/shared/base-filesystem.c
src/shared/bus-errors.h
src/shared/calendarspec.c
src/shared/cgroup-util.c
src/shared/clock-util.c
src/shared/clock-util.h
src/shared/condition-util.c
src/shared/condition-util.h
src/shared/conf-files.c
src/shared/conf-parser.c
src/shared/conf-parser.h
src/shared/def.h
src/shared/dev-setup.c
src/shared/device-nodes.c
src/shared/dropin.h
src/shared/efivars.c
src/shared/env-util.c
src/shared/env-util.h
src/shared/eventfd-util.c [deleted file]
src/shared/eventfd-util.h [deleted file]
src/shared/exit-status.c
src/shared/exit-status.h
src/shared/fdset.c
src/shared/fileio-label.c
src/shared/fileio-label.h
src/shared/fileio.c
src/shared/fileio.h
src/shared/generator.c
src/shared/gpt.h
src/shared/hashmap.c
src/shared/hashmap.h
src/shared/in-addr-util.c [new file with mode: 0644]
src/shared/in-addr-util.h [new file with mode: 0644]
src/shared/install.c
src/shared/install.h
src/shared/label.c
src/shared/label.h
src/shared/linux/fanotify.h [deleted file]
src/shared/locale-util.c [new file with mode: 0644]
src/shared/locale-util.h [new file with mode: 0644]
src/shared/log.c
src/shared/log.h
src/shared/logs-show.c
src/shared/logs-show.h
src/shared/macro.h
src/shared/memfd.c [new file with mode: 0644]
src/shared/memfd.h [new file with mode: 0644]
src/shared/mempool.c [new file with mode: 0644]
src/shared/mempool.h [new file with mode: 0644]
src/shared/missing.h
src/shared/mkdir-label.c
src/shared/mkdir.c
src/shared/mkdir.h
src/shared/nss-util.h [new file with mode: 0644]
src/shared/output-mode.h
src/shared/pager.c
src/shared/pager.h
src/shared/path-lookup.c
src/shared/path-lookup.h
src/shared/path-util.c
src/shared/path-util.h
src/shared/pty.c [new file with mode: 0644]
src/shared/pty.h [new file with mode: 0644]
src/shared/ring.c
src/shared/ring.h
src/shared/selinux-util.c
src/shared/selinux-util.h
src/shared/set.c
src/shared/set.h
src/shared/sleep-config.c
src/shared/smack-util.c
src/shared/smack-util.h
src/shared/socket-label.c
src/shared/socket-util.c
src/shared/socket-util.h
src/shared/sparse-endian.h
src/shared/spawn-polkit-agent.c
src/shared/special.h
src/shared/strv.c
src/shared/strv.h
src/shared/switch-root.c [new file with mode: 0644]
src/shared/switch-root.h [new file with mode: 0644]
src/shared/test-tables.h
src/shared/time-dst.c
src/shared/time-util.c
src/shared/time-util.h
src/shared/uid-range.c [new file with mode: 0644]
src/shared/uid-range.h [new file with mode: 0644]
src/shared/unit-name.c
src/shared/unit-name.h
src/shared/utf8.c
src/shared/util.c
src/shared/util.h
src/shared/utmp-wtmp.c
src/shared/utmp-wtmp.h
src/shared/virt.c
src/shared/watchdog.c
src/shutdownd/shutdownd.c
src/sleep/sleep.c
src/socket-proxy/socket-proxyd.c
src/sysctl/sysctl.c
src/systemctl/systemctl.c
src/systemd/sd-bus-protocol.h
src/systemd/sd-bus.h
src/systemd/sd-dhcp-client.h
src/systemd/sd-dhcp-lease.h
src/systemd/sd-dhcp-server.h
src/systemd/sd-dhcp6-client.h
src/systemd/sd-event.h
src/systemd/sd-login.h
src/systemd/sd-memfd.h [deleted file]
src/systemd/sd-network.h
src/systemd/sd-readahead.h [deleted file]
src/systemd/sd-rtnl.h
src/sysusers/sysusers.c
src/sysv-generator/sysv-generator.c
src/test/test-async.c
src/test/test-barrier.c [new file with mode: 0644]
src/test/test-calendarspec.c
src/test/test-cgroup-mask.c
src/test/test-cgroup-util.c
src/test/test-cgroup.c
src/test/test-condition-util.c [new file with mode: 0644]
src/test/test-daemon.c
src/test/test-date.c
src/test/test-engine.c
src/test/test-fdset.c
src/test/test-fileio.c
src/test/test-hashmap-plain.c [new file with mode: 0644]
src/test/test-hashmap.c
src/test/test-id128.c
src/test/test-install.c
src/test/test-job-type.c
src/test/test-libudev.c
src/test/test-ns.c
src/test/test-path-util.c
src/test/test-prioq.c
src/test/test-pty.c [new file with mode: 0644]
src/test/test-ring.c
src/test/test-sched-prio.c
src/test/test-set.c [new file with mode: 0644]
src/test/test-socket-util.c
src/test/test-strbuf.c
src/test/test-strv.c
src/test/test-strxcpyx.c
src/test/test-tables.c
src/test/test-time.c
src/test/test-tmpfiles.c
src/test/test-udev.c
src/test/test-uid-range.c [new file with mode: 0644]
src/test/test-unit-file.c
src/test/test-unit-name.c
src/test/test-util.c
src/timedate/org.freedesktop.timedate1.policy [deleted file]
src/timedate/timedatectl.c
src/timedate/timedated.c
src/timesync/90-systemd.list [deleted file]
src/timesync/timesyncd-conf.c [new file with mode: 0644]
src/timesync/timesyncd-conf.h [new file with mode: 0644]
src/timesync/timesyncd-gperf.gperf
src/timesync/timesyncd-manager.c [new file with mode: 0644]
src/timesync/timesyncd-manager.h [new file with mode: 0644]
src/timesync/timesyncd-server.c [new file with mode: 0644]
src/timesync/timesyncd-server.h [new file with mode: 0644]
src/timesync/timesyncd.c
src/timesync/timesyncd.conf.in
src/timesync/timesyncd.h [deleted file]
src/tmpfiles/tmpfiles.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/accelerometer/accelerometer.c
src/udev/ata_id/ata_id.c
src/udev/cdrom_id/cdrom_id.c
src/udev/net/ethtool-util.c
src/udev/net/ethtool-util.h
src/udev/net/link-config.c
src/udev/net/link-config.h
src/udev/scsi_id/scsi_id.c
src/udev/scsi_id/scsi_serial.c
src/udev/udev-builtin-blkid.c
src/udev/udev-builtin-btrfs.c
src/udev/udev-builtin-firmware.c [deleted file]
src/udev/udev-builtin-hwdb.c
src/udev/udev-builtin-input_id.c
src/udev/udev-builtin-keyboard.c
src/udev/udev-builtin-kmod.c
src/udev/udev-builtin-net_id.c
src/udev/udev-builtin-net_setup_link.c
src/udev/udev-builtin-path_id.c
src/udev/udev-builtin-uaccess.c
src/udev/udev-builtin-usb_id.c
src/udev/udev-builtin.c
src/udev/udev-ctrl.c
src/udev/udev-event.c
src/udev/udev-node.c
src/udev/udev-rules.c
src/udev/udev-watch.c
src/udev/udev.conf
src/udev/udev.h
src/udev/udevadm-control.c
src/udev/udevadm-hwdb.c
src/udev/udevadm-info.c
src/udev/udevadm-monitor.c
src/udev/udevadm-settle.c
src/udev/udevadm-test-builtin.c
src/udev/udevadm-test.c
src/udev/udevadm-trigger.c
src/udev/udevadm.c
src/udev/udevd.c
src/update-done/update-done.c
src/vconsole/vconsole-setup.c
sysctl.d/50-coredump.conf.in
sysctl.d/50-default.conf
system-preset/90-systemd.preset
sysusers.d/basic.conf.in
sysusers.d/systemd-remote.conf [new file with mode: 0644]
sysusers.d/systemd.conf
test-libsystemd-sym.c
test-libudev-sym.c
test/a.service [new file with mode: 0644]
test/b.service [new file with mode: 0644]
test/basic.target [new file with mode: 0644]
test/bus-policy/hello.conf [new file with mode: 0644]
test/bus-policy/methods.conf [new file with mode: 0644]
test/bus-policy/ownerships.conf [new file with mode: 0644]
test/bus-policy/signals.conf [new file with mode: 0644]
test/c.service [new file with mode: 0644]
test/d.service [new file with mode: 0644]
test/e.service [new file with mode: 0644]
test/end.service [new file with mode: 0644]
test/f.service [new file with mode: 0644]
test/g.service [new file with mode: 0644]
test/grandchild.service [new file with mode: 0644]
test/h.service [new file with mode: 0644]
test/hello-after-sleep.target [new file with mode: 0644]
test/hello.service [new file with mode: 0644]
test/parent-deep.slice [new file with mode: 0644]
test/paths.target [new file with mode: 0644]
test/shutdown.target [new file with mode: 0644]
test/sleep.service [new file with mode: 0644]
test/sockets.target [new file with mode: 0644]
test/sysinit.target [new file with mode: 0644]
test/testsuite.target [new file with mode: 0644]
test/timers.target [new file with mode: 0644]
test/udev-test.pl
test/unstoppable.service [new file with mode: 0644]
tmpfiles.d/etc.conf [deleted file]
tmpfiles.d/etc.conf.m4 [new file with mode: 0644]
tmpfiles.d/systemd-remote.conf [new file with mode: 0644]
tools/make-man-rules.py [deleted file]
units/basic.target
units/emergency.service [deleted file]
units/emergency.service.in
units/initrd-parse-etc.service.in
units/kmod-static-nodes.service.in
units/ldconfig.service
units/org.freedesktop.resolve1.busname [new file with mode: 0644]
units/poweroff.target
units/quotaon.service.in
units/reboot.target
units/rescue.service.in [new file with mode: 0644]
units/rescue.service.m4.in [deleted file]
units/serial-getty@.service.m4
units/sys-kernel-config.mount
units/sys-kernel-debug.mount
units/system-update.target
units/systemd-backlight@.service.in
units/systemd-binfmt.service.in
units/systemd-firstboot.service.in [new file with mode: 0644]
units/systemd-fsck-root.service.in
units/systemd-fsck@.service.in
units/systemd-hibernate-resume@.service.in [new file with mode: 0644]
units/systemd-journal-catalog-update.service.in
units/systemd-journal-flush.service.in
units/systemd-journal-remote.service.in [new file with mode: 0644]
units/systemd-journal-remote.socket [new file with mode: 0644]
units/systemd-journal-upload.service.in [new file with mode: 0644]
units/systemd-journald-dev-log.socket
units/systemd-journald.service.in
units/systemd-logind.service.in
units/systemd-modules-load.service.in
units/systemd-networkd.service.in
units/systemd-quotacheck.service.in
units/systemd-random-seed.service.in
units/systemd-readahead-collect.service.in [deleted file]
units/systemd-readahead-done.service.in [deleted file]
units/systemd-readahead-done.timer [deleted file]
units/systemd-readahead-drop.service [deleted file]
units/systemd-readahead-replay.service.in [deleted file]
units/systemd-remount-fs.service.in
units/systemd-rfkill@.service.in
units/systemd-sysctl.service.in
units/systemd-sysusers.service.in
units/systemd-tmpfiles-clean.service.in
units/systemd-tmpfiles-setup-dev.service.in
units/systemd-tmpfiles-setup.service.in
units/systemd-udev-hwdb-update.service.in
units/systemd-update-done.service.in
units/systemd-update-utmp.service.in
units/systemd-vconsole-setup.service.in
units/user/systemd-bus-proxyd@.service [deleted file]
units/user/systemd-bus-proxyd@.service.in [new file with mode: 0644]

index 5c289dda2a90a8062238f03944a8e6a4a812bc03..bdbc54f4a239e9900c08c1d74e1a08431759ccaf 100644 (file)
@@ -23,7 +23,6 @@ MANPAGES += \
        man/machine-id.5 \
        man/machine-info.5 \
        man/os-release.5 \
-       man/runlevel.8 \
        man/sd-daemon.3 \
        man/sd-id128.3 \
        man/sd-journal.3 \
@@ -47,6 +46,7 @@ MANPAGES += \
        man/sd_journal_seek_head.3 \
        man/sd_journal_stream_fd.3 \
        man/sd_listen_fds.3 \
+       man/sd_machine_get_class.3 \
        man/sd_notify.3 \
        man/sd_watchdog_enabled.3 \
        man/shutdown.8 \
@@ -63,11 +63,15 @@ MANPAGES += \
        man/systemd-delta.1 \
        man/systemd-detect-virt.1 \
        man/systemd-efi-boot-generator.8 \
+       man/systemd-escape.1 \
+       man/systemd-firstboot.1 \
        man/systemd-fsck@.service.8 \
        man/systemd-fstab-generator.8 \
        man/systemd-getty-generator.8 \
        man/systemd-gpt-auto-generator.8 \
        man/systemd-halt.service.8 \
+       man/systemd-hibernate-resume-generator.8 \
+       man/systemd-hibernate-resume@.service.8 \
        man/systemd-inhibit.1 \
        man/systemd-initctl.service.8 \
        man/systemd-journald.service.8 \
@@ -89,7 +93,6 @@ MANPAGES += \
        man/systemd-tty-ask-password-agent.1 \
        man/systemd-udevd.service.8 \
        man/systemd-update-done.service.8 \
-       man/systemd-update-utmp.service.8 \
        man/systemd.1 \
        man/systemd.automount.5 \
        man/systemd.device.5 \
@@ -116,6 +119,7 @@ MANPAGES += \
        man/telinit.8 \
        man/tmpfiles.d.5 \
        man/udev.7 \
+       man/udev.conf.5 \
        man/udevadm.8
 MANPAGES_ALIAS += \
        man/SD_ALERT.3 \
@@ -189,12 +193,15 @@ MANPAGES_ALIAS += \
        man/sd_journal_set_data_threshold.3 \
        man/sd_journal_test_cursor.3 \
        man/sd_journal_wait.3 \
+       man/sd_machine_get_ifindices.3 \
        man/sd_notifyf.3 \
        man/systemd-ask-password-console.path.8 \
        man/systemd-ask-password-wall.path.8 \
        man/systemd-ask-password-wall.service.8 \
+       man/systemd-firstboot.service.1 \
        man/systemd-fsck-root.service.8 \
        man/systemd-fsck.8 \
+       man/systemd-hibernate-resume.8 \
        man/systemd-hibernate.service.8 \
        man/systemd-hybrid-sleep.service.8 \
        man/systemd-initctl.8 \
@@ -220,8 +227,6 @@ MANPAGES_ALIAS += \
        man/systemd-udevd-kernel.socket.8 \
        man/systemd-udevd.8 \
        man/systemd-update-done.8 \
-       man/systemd-update-utmp-runlevel.service.8 \
-       man/systemd-update-utmp.8 \
        man/systemd-user.conf.5
 man/SD_ALERT.3: man/sd-daemon.3
 man/SD_CRIT.3: man/sd-daemon.3
@@ -294,12 +299,15 @@ man/sd_journal_sendv.3: man/sd_journal_print.3
 man/sd_journal_set_data_threshold.3: man/sd_journal_get_data.3
 man/sd_journal_test_cursor.3: man/sd_journal_get_cursor.3
 man/sd_journal_wait.3: man/sd_journal_get_fd.3
+man/sd_machine_get_ifindices.3: man/sd_machine_get_class.3
 man/sd_notifyf.3: man/sd_notify.3
 man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8
 man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8
 man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.service.8
+man/systemd-firstboot.service.1: man/systemd-firstboot.1
 man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
 man/systemd-fsck.8: man/systemd-fsck@.service.8
+man/systemd-hibernate-resume.8: man/systemd-hibernate-resume@.service.8
 man/systemd-hibernate.service.8: man/systemd-suspend.service.8
 man/systemd-hybrid-sleep.service.8: man/systemd-suspend.service.8
 man/systemd-initctl.8: man/systemd-initctl.service.8
@@ -325,8 +333,6 @@ man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
 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-update-utmp-runlevel.service.8: man/systemd-update-utmp.service.8
-man/systemd-update-utmp.8: man/systemd-update-utmp.service.8
 man/systemd-user.conf.5: man/systemd-system.conf.5
 man/SD_ALERT.html: man/sd-daemon.html
        $(html-alias)
@@ -541,6 +547,9 @@ man/sd_journal_test_cursor.html: man/sd_journal_get_cursor.html
 man/sd_journal_wait.html: man/sd_journal_get_fd.html
        $(html-alias)
 
+man/sd_machine_get_ifindices.html: man/sd_machine_get_class.html
+       $(html-alias)
+
 man/sd_notifyf.html: man/sd_notify.html
        $(html-alias)
 
@@ -553,12 +562,18 @@ man/systemd-ask-password-wall.path.html: man/systemd-ask-password-console.servic
 man/systemd-ask-password-wall.service.html: man/systemd-ask-password-console.service.html
        $(html-alias)
 
+man/systemd-firstboot.service.html: man/systemd-firstboot.html
+       $(html-alias)
+
 man/systemd-fsck-root.service.html: man/systemd-fsck@.service.html
        $(html-alias)
 
 man/systemd-fsck.html: man/systemd-fsck@.service.html
        $(html-alias)
 
+man/systemd-hibernate-resume.html: man/systemd-hibernate-resume@.service.html
+       $(html-alias)
+
 man/systemd-hibernate.service.html: man/systemd-suspend.service.html
        $(html-alias)
 
@@ -634,12 +649,6 @@ man/systemd-udevd.html: man/systemd-udevd.service.html
 man/systemd-update-done.html: man/systemd-update-done.service.html
        $(html-alias)
 
-man/systemd-update-utmp-runlevel.service.html: man/systemd-update-utmp.service.html
-       $(html-alias)
-
-man/systemd-update-utmp.html: man/systemd-update-utmp.service.html
-       $(html-alias)
-
 man/systemd-user.conf.html: man/systemd-system.conf.html
        $(html-alias)
 
@@ -680,7 +689,8 @@ endif
 if ENABLE_COREDUMP
 MANPAGES += \
        man/coredump.conf.5 \
-       man/coredumpctl.1
+       man/coredumpctl.1 \
+       man/systemd-coredump.8
 MANPAGES_ALIAS += \
        #
 
@@ -725,8 +735,13 @@ MANPAGES += \
        man/sd_bus_open_user.3 \
        man/sd_bus_path_encode.3 \
        man/sd_bus_request_name.3 \
+       man/sd_event_add_child.3 \
+       man/sd_event_add_defer.3 \
+       man/sd_event_add_signal.3 \
        man/sd_event_add_time.3 \
+       man/sd_event_get_fd.3 \
        man/sd_event_new.3 \
+       man/sd_event_set_name.3 \
        man/systemd-bus-proxyd.8 \
        man/systemd-bus-proxyd@.service.8
 MANPAGES_ALIAS += \
@@ -735,6 +750,7 @@ MANPAGES_ALIAS += \
        man/sd_bus_creds_get_cgroup.3 \
        man/sd_bus_creds_get_cmdline.3 \
        man/sd_bus_creds_get_comm.3 \
+       man/sd_bus_creds_get_connection_name.3 \
        man/sd_bus_creds_get_exe.3 \
        man/sd_bus_creds_get_gid.3 \
        man/sd_bus_creds_get_mask.3 \
@@ -784,8 +800,13 @@ MANPAGES_ALIAS += \
        man/sd_bus_ref.3 \
        man/sd_bus_release_name.3 \
        man/sd_bus_unref.3 \
+       man/sd_event_add_exit.3 \
+       man/sd_event_add_post.3 \
        man/sd_event_default.3 \
+       man/sd_event_get_name.3 \
        man/sd_event_ref.3 \
+       man/sd_event_source_get_child_pid.3 \
+       man/sd_event_source_get_signal.3 \
        man/sd_event_source_get_time.3 \
        man/sd_event_source_get_time_accuracy.3 \
        man/sd_event_source_get_time_clock.3 \
@@ -798,6 +819,7 @@ man/sd_bus_creds_get_audit_session_id.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_cgroup.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_cmdline.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_comm.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_connection_name.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_exe.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_gid.3: man/sd_bus_creds_get_pid.3
 man/sd_bus_creds_get_mask.3: man/sd_bus_creds_new_from_pid.3
@@ -847,8 +869,13 @@ man/sd_bus_path_decode.3: man/sd_bus_path_encode.3
 man/sd_bus_ref.3: man/sd_bus_new.3
 man/sd_bus_release_name.3: man/sd_bus_request_name.3
 man/sd_bus_unref.3: man/sd_bus_new.3
+man/sd_event_add_exit.3: man/sd_event_add_defer.3
+man/sd_event_add_post.3: man/sd_event_add_defer.3
 man/sd_event_default.3: man/sd_event_new.3
+man/sd_event_get_name.3: man/sd_event_set_name.3
 man/sd_event_ref.3: man/sd_event_new.3
+man/sd_event_source_get_child_pid.3: man/sd_event_add_child.3
+man/sd_event_source_get_signal.3: man/sd_event_add_signal.3
 man/sd_event_source_get_time.3: man/sd_event_add_time.3
 man/sd_event_source_get_time_accuracy.3: man/sd_event_add_time.3
 man/sd_event_source_get_time_clock.3: man/sd_event_add_time.3
@@ -871,6 +898,9 @@ man/sd_bus_creds_get_cmdline.html: man/sd_bus_creds_get_pid.html
 man/sd_bus_creds_get_comm.html: man/sd_bus_creds_get_pid.html
        $(html-alias)
 
+man/sd_bus_creds_get_connection_name.html: man/sd_bus_creds_get_pid.html
+       $(html-alias)
+
 man/sd_bus_creds_get_exe.html: man/sd_bus_creds_get_pid.html
        $(html-alias)
 
@@ -1018,12 +1048,27 @@ man/sd_bus_release_name.html: man/sd_bus_request_name.html
 man/sd_bus_unref.html: man/sd_bus_new.html
        $(html-alias)
 
+man/sd_event_add_exit.html: man/sd_event_add_defer.html
+       $(html-alias)
+
+man/sd_event_add_post.html: man/sd_event_add_defer.html
+       $(html-alias)
+
 man/sd_event_default.html: man/sd_event_new.html
        $(html-alias)
 
+man/sd_event_get_name.html: man/sd_event_set_name.html
+       $(html-alias)
+
 man/sd_event_ref.html: man/sd_event_new.html
        $(html-alias)
 
+man/sd_event_source_get_child_pid.html: man/sd_event_add_child.html
+       $(html-alias)
+
+man/sd_event_source_get_signal.html: man/sd_event_add_signal.html
+       $(html-alias)
+
 man/sd_event_source_get_time.html: man/sd_event_add_time.html
        $(html-alias)
 
@@ -1125,34 +1170,6 @@ man/systemd-random-seed.html: man/systemd-random-seed.service.html
 
 endif
 
-if ENABLE_READAHEAD
-MANPAGES += \
-       man/sd-readahead.3 \
-       man/sd_readahead.3 \
-       man/systemd-readahead-replay.service.8
-MANPAGES_ALIAS += \
-       man/systemd-readahead-collect.service.8 \
-       man/systemd-readahead-done.service.8 \
-       man/systemd-readahead-done.timer.8 \
-       man/systemd-readahead.8
-man/systemd-readahead-collect.service.8: man/systemd-readahead-replay.service.8
-man/systemd-readahead-done.service.8: man/systemd-readahead-replay.service.8
-man/systemd-readahead-done.timer.8: man/systemd-readahead-replay.service.8
-man/systemd-readahead.8: man/systemd-readahead-replay.service.8
-man/systemd-readahead-collect.service.html: man/systemd-readahead-replay.service.html
-       $(html-alias)
-
-man/systemd-readahead-done.service.html: man/systemd-readahead-replay.service.html
-       $(html-alias)
-
-man/systemd-readahead-done.timer.html: man/systemd-readahead-replay.service.html
-       $(html-alias)
-
-man/systemd-readahead.html: man/systemd-readahead-replay.service.html
-       $(html-alias)
-
-endif
-
 if ENABLE_RESOLVED
 MANPAGES += \
        man/resolved.conf.5 \
@@ -1190,7 +1207,8 @@ endif
 
 if ENABLE_TIMESYNCD
 MANPAGES += \
-       man/systemd-timesyncd.service.8
+       man/systemd-timesyncd.service.8 \
+       man/timesyncd.conf.5
 MANPAGES_ALIAS += \
        man/systemd-timesyncd.8
 man/systemd-timesyncd.8: man/systemd-timesyncd.service.8
@@ -1239,7 +1257,8 @@ endif
 if HAVE_MICROHTTPD
 MANPAGES += \
        man/systemd-journal-gatewayd.service.8 \
-       man/systemd-journal-remote.8
+       man/systemd-journal-remote.8 \
+       man/systemd-journal-upload.8
 MANPAGES_ALIAS += \
        man/systemd-journal-gatewayd.8 \
        man/systemd-journal-gatewayd.socket.8
@@ -1299,6 +1318,7 @@ MANPAGES_ALIAS += \
        man/sd_seat_can_tty.3 \
        man/sd_seat_get_sessions.3 \
        man/sd_session_get_class.3 \
+       man/sd_session_get_desktop.3 \
        man/sd_session_get_display.3 \
        man/sd_session_get_remote_host.3 \
        man/sd_session_get_remote_user.3 \
@@ -1340,6 +1360,7 @@ man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
 man/sd_seat_can_tty.3: man/sd_seat_get_active.3
 man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
 man/sd_session_get_class.3: man/sd_session_is_active.3
+man/sd_session_get_desktop.3: man/sd_session_is_active.3
 man/sd_session_get_display.3: man/sd_session_is_active.3
 man/sd_session_get_remote_host.3: man/sd_session_is_active.3
 man/sd_session_get_remote_user.3: man/sd_session_is_active.3
@@ -1431,6 +1452,9 @@ man/sd_seat_get_sessions.html: man/sd_seat_get_active.html
 man/sd_session_get_class.html: man/sd_session_is_active.html
        $(html-alias)
 
+man/sd_session_get_desktop.html: man/sd_session_is_active.html
+       $(html-alias)
+
 man/sd_session_get_display.html: man/sd_session_is_active.html
        $(html-alias)
 
@@ -1491,6 +1515,23 @@ MANPAGES_ALIAS += \
 
 endif
 
+if HAVE_UTMP
+MANPAGES += \
+       man/runlevel.8 \
+       man/systemd-update-utmp.service.8
+MANPAGES_ALIAS += \
+       man/systemd-update-utmp-runlevel.service.8 \
+       man/systemd-update-utmp.8
+man/systemd-update-utmp-runlevel.service.8: man/systemd-update-utmp.service.8
+man/systemd-update-utmp.8: man/systemd-update-utmp.service.8
+man/systemd-update-utmp-runlevel.service.html: man/systemd-update-utmp.service.html
+       $(html-alias)
+
+man/systemd-update-utmp.html: man/systemd-update-utmp.service.html
+       $(html-alias)
+
+endif
+
 # Really, do not edit this file.
 
 EXTRA_DIST += \
@@ -1531,7 +1572,6 @@ EXTRA_DIST += \
        man/sd-id128.xml \
        man/sd-journal.xml \
        man/sd-login.xml \
-       man/sd-readahead.xml \
        man/sd_booted.xml \
        man/sd_bus_creds_get_pid.xml \
        man/sd_bus_creds_new_from_pid.xml \
@@ -1548,8 +1588,13 @@ EXTRA_DIST += \
        man/sd_bus_open_user.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_set_name.xml \
        man/sd_get_seats.xml \
        man/sd_id128_get_machine.xml \
        man/sd_id128_randomize.xml \
@@ -1571,9 +1616,9 @@ EXTRA_DIST += \
        man/sd_journal_stream_fd.xml \
        man/sd_listen_fds.xml \
        man/sd_login_monitor_new.xml \
+       man/sd_machine_get_class.xml \
        man/sd_notify.xml \
        man/sd_pid_get_session.xml \
-       man/sd_readahead.xml \
        man/sd_seat_get_active.xml \
        man/sd_session_is_active.xml \
        man/sd_uid_get_state.xml \
@@ -1594,22 +1639,28 @@ EXTRA_DIST += \
        man/systemd-cat.xml \
        man/systemd-cgls.xml \
        man/systemd-cgtop.xml \
+       man/systemd-coredump.xml \
        man/systemd-cryptsetup-generator.xml \
        man/systemd-cryptsetup@.service.xml \
        man/systemd-debug-generator.xml \
        man/systemd-delta.xml \
        man/systemd-detect-virt.xml \
        man/systemd-efi-boot-generator.xml \
+       man/systemd-escape.xml \
+       man/systemd-firstboot.xml \
        man/systemd-fsck@.service.xml \
        man/systemd-fstab-generator.xml \
        man/systemd-getty-generator.xml \
        man/systemd-gpt-auto-generator.xml \
        man/systemd-halt.service.xml \
+       man/systemd-hibernate-resume-generator.xml \
+       man/systemd-hibernate-resume@.service.xml \
        man/systemd-hostnamed.service.xml \
        man/systemd-inhibit.xml \
        man/systemd-initctl.service.xml \
        man/systemd-journal-gatewayd.service.xml \
        man/systemd-journal-remote.xml \
+       man/systemd-journal-upload.xml \
        man/systemd-journald.service.xml \
        man/systemd-localed.service.xml \
        man/systemd-logind.service.xml \
@@ -1623,7 +1674,6 @@ EXTRA_DIST += \
        man/systemd-path.xml \
        man/systemd-quotacheck.service.xml \
        man/systemd-random-seed.service.xml \
-       man/systemd-readahead-replay.service.xml \
        man/systemd-remount-fs.service.xml \
        man/systemd-resolved.service.xml \
        man/systemd-rfkill@.service.xml \
@@ -1674,7 +1724,9 @@ EXTRA_DIST += \
        man/sysusers.d.xml \
        man/telinit.xml \
        man/timedatectl.xml \
+       man/timesyncd.conf.xml \
        man/tmpfiles.d.xml \
+       man/udev.conf.xml \
        man/udev.xml \
        man/udevadm.xml \
        man/user-system-options.xml \
index e238cdeebfcb1960e724d6b294f9a1b772a2db80..c80d25df29b0a62d73eff9ec57725baf3ecb14ff 100644 (file)
@@ -24,6 +24,9 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 AM_MAKEFLAGS = --no-print-directory
 AUTOMAKE_OPTIONS = color-tests parallel-tests
 
+GCC_COLORS ?= 'ooh, shiny!'
+export GCC_COLORS
+
 SUBDIRS = . po
 
 # remove targets if the command fails
@@ -35,17 +38,17 @@ SUBDIRS = . po
 # Keep the test-suite.log
 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
 
-LIBUDEV_CURRENT=6
-LIBUDEV_REVISION=0
-LIBUDEV_AGE=5
+LIBUDEV_CURRENT=7
+LIBUDEV_REVISION=1
+LIBUDEV_AGE=6
 
 LIBGUDEV_CURRENT=2
 LIBGUDEV_REVISION=0
 LIBGUDEV_AGE=2
 
-LIBSYSTEMD_CURRENT=3
-LIBSYSTEMD_REVISION=1
-LIBSYSTEMD_AGE=3
+LIBSYSTEMD_CURRENT=5
+LIBSYSTEMD_REVISION=0
+LIBSYSTEMD_AGE=5
 
 # The following four libraries only exist for compatibility reasons,
 # their version info should not be bumped anymore
@@ -106,7 +109,8 @@ udevrulesdir=$(udevlibexecdir)/rules.d
 udevhwdbdir=$(udevlibexecdir)/hwdb.d
 catalogdir=$(prefix)/lib/systemd/catalog
 kernelinstalldir = $(prefix)/lib/kernel/install.d
-ntpunitsdir=$(prefix)/lib/systemd/ntp-units.d
+factory_etcdir = $(prefix)/share/factory/etc
+factory_pamdir = $(prefix)/share/factory/etc/pam.d
 
 # And these are the special ones for /
 rootprefix=@rootprefix@
@@ -134,11 +138,12 @@ polkitpolicy_in_files =
 polkitpolicy_files =
 dist_udevrules_DATA =
 nodist_udevrules_DATA =
-nodist_pkgsysconf_DATA =
 dist_pkgsysconf_DATA =
+nodist_pkgsysconf_DATA =
 dist_pkgdata_DATA =
 dist_dbuspolicy_DATA =
 dist_dbussystemservice_DATA =
+dist_systemunit_DATA_busnames =
 check_PROGRAMS =
 check_DATA =
 tests=
@@ -165,6 +170,7 @@ AM_CPPFLAGS = \
        -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
        -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
        -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
+       -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
        -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
        -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
        -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
@@ -189,6 +195,7 @@ AM_CPPFLAGS = \
        -DKEXEC=\"$(KEXEC)\" \
        -DLIBDIR=\"$(libdir)\" \
        -DROOTLIBDIR=\"$(rootlibdir)\" \
+       -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
        -I $(top_srcdir)/src \
        -I $(top_builddir)/src/shared \
        -I $(top_srcdir)/src/shared \
@@ -198,6 +205,7 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/timedate \
        -I $(top_srcdir)/src/timesync \
        -I $(top_srcdir)/src/resolve \
+       -I $(top_builddir)/src/resolve \
        -I $(top_srcdir)/src/systemd \
        -I $(top_builddir)/src/core \
        -I $(top_srcdir)/src/core \
@@ -208,7 +216,9 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/libsystemd/sd-bus \
        -I $(top_srcdir)/src/libsystemd/sd-event \
        -I $(top_srcdir)/src/libsystemd/sd-rtnl \
+       -I $(top_srcdir)/src/libsystemd/sd-network \
        -I $(top_srcdir)/src/libsystemd-network \
+       -I $(top_srcdir)/src/libsystemd-terminal \
        $(OUR_CPPFLAGS)
 
 AM_CFLAGS = $(OUR_CFLAGS)
@@ -240,6 +250,7 @@ SOCKETS_TARGET_WANTS =
 BUSNAMES_TARGET_WANTS =
 TIMERS_TARGET_WANTS =
 USER_SOCKETS_TARGET_WANTS =
+USER_DEFAULT_TARGET_WANTS =
 USER_BUSNAMES_TARGET_WANTS =
 
 SYSTEM_UNIT_ALIASES =
@@ -257,10 +268,13 @@ install-target-wants-hook:
        what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
-       what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
        what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
        what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
+       what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
+
+install-busnames-target-wants-hook:
+       what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
        what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
 
 define add-wants
@@ -310,6 +324,11 @@ 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))
 AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
@@ -337,7 +356,8 @@ rootbin_PROGRAMS = \
        systemd-notify \
        systemd-ask-password \
        systemd-tty-ask-password-agent \
-       systemd-machine-id-setup
+       systemd-machine-id-setup \
+       systemd-escape
 
 bin_PROGRAMS = \
        systemd-cgls \
@@ -360,7 +380,6 @@ rootlibexec_PROGRAMS = \
        systemd \
        systemd-cgroups-agent \
        systemd-initctl \
-       systemd-update-utmp \
        systemd-shutdownd \
        systemd-shutdown \
        systemd-remount-fs \
@@ -373,6 +392,11 @@ rootlibexec_PROGRAMS = \
        systemd-socket-proxyd \
        systemd-update-done
 
+if HAVE_UTMP
+rootlibexec_PROGRAMS += \
+       systemd-update-utmp
+endif
+
 systemgenerator_PROGRAMS = \
        systemd-getty-generator \
        systemd-fstab-generator \
@@ -382,7 +406,6 @@ systemgenerator_PROGRAMS = \
 dist_bashcompletion_DATA = \
        shell-completion/bash/busctl \
        shell-completion/bash/journalctl \
-       shell-completion/bash/systemctl \
        shell-completion/bash/systemd-analyze \
        shell-completion/bash/systemd-cat \
        shell-completion/bash/systemd-cgls \
@@ -394,8 +417,10 @@ dist_bashcompletion_DATA = \
        shell-completion/bash/udevadm \
        shell-completion/bash/kernel-install
 
+nodist_bashcompletion_DATA = \
+       shell-completion/bash/systemctl
+
 dist_zshcompletion_DATA = \
-       shell-completion/zsh/_systemctl \
        shell-completion/zsh/_journalctl \
        shell-completion/zsh/_udevadm \
        shell-completion/zsh/_kernel-install \
@@ -403,16 +428,28 @@ dist_zshcompletion_DATA = \
        shell-completion/zsh/_systemd-analyze \
        shell-completion/zsh/_systemd-run \
        shell-completion/zsh/_sd_hosts_or_user_at_host \
+       shell-completion/zsh/_sd_outputmodes \
+       shell-completion/zsh/_sd_unit_files \
        shell-completion/zsh/_systemd-delta \
        shell-completion/zsh/_systemd
 
+nodist_zshcompletion_DATA = \
+       shell-completion/zsh/_systemctl
+
+EXTRA_DIST += \
+       shell-completion/bash/systemctl.in \
+       shell-completion/zsh/_systemctl.in
+
+CLEANFILES += \
+       $(nodist_bashcompletion_DATA) \
+       $(nodist_zshcompletion_DATA)
+
 dist_sysctl_DATA = \
        sysctl.d/50-default.conf
 
 dist_systemunit_DATA = \
        units/graphical.target \
        units/multi-user.target \
-       units/emergency.service \
        units/emergency.target \
        units/sysinit.target \
        units/basic.target \
@@ -431,8 +468,6 @@ dist_systemunit_DATA = \
        units/network-online.target \
        units/nss-lookup.target \
        units/nss-user-lookup.target \
-       units/hibernate.target \
-       units/hybrid-sleep.target \
        units/poweroff.target \
        units/reboot.target \
        units/rescue.target \
@@ -444,7 +479,6 @@ dist_systemunit_DATA = \
        units/sigpwr.target \
        units/sleep.target \
        units/sockets.target \
-       units/busnames.target \
        units/timers.target \
        units/paths.target \
        units/suspend.target \
@@ -470,8 +504,15 @@ dist_systemunit_DATA = \
        units/systemd-udevd-control.socket \
        units/systemd-udevd-kernel.socket \
        units/system-update.target \
-       units/initrd-switch-root.target \
-       units/ldconfig.service
+       units/initrd-switch-root.target
+
+if ENABLE_KDBUS
+dist_systemunit_DATA += \
+       $(dist_systemunit_DATA_busnames)
+endif
+
+dist_systemunit_DATA_busnames += \
+       units/busnames.target
 
 nodist_systemunit_DATA = \
        units/getty@.service \
@@ -482,16 +523,12 @@ nodist_systemunit_DATA = \
        units/systemd-initctl.service \
        units/systemd-shutdownd.service \
        units/systemd-remount-fs.service \
-       units/systemd-update-utmp.service \
-       units/systemd-update-utmp-runlevel.service \
        units/systemd-ask-password-wall.service \
        units/systemd-ask-password-console.service \
        units/systemd-sysctl.service \
        units/emergency.service \
        units/rescue.service \
        units/user@.service \
-       units/systemd-hibernate.service \
-       units/systemd-hybrid-sleep.service \
        units/systemd-suspend.service \
        units/systemd-halt.service \
        units/systemd-poweroff.service \
@@ -511,6 +548,12 @@ nodist_systemunit_DATA = \
        units/systemd-nspawn@.service \
        units/systemd-update-done.service
 
+if HAVE_UTMP
+nodist_systemunit_DATA += \
+       units/systemd-update-utmp.service \
+       units/systemd-update-utmp-runlevel.service
+endif
+
 dist_userunit_DATA = \
        units/user/basic.target \
        units/user/default.target \
@@ -528,7 +571,7 @@ EXTRA_DIST += \
        units/console-shell.service.m4.in \
        units/console-getty.service.m4.in \
        units/container-getty@.service.m4.in \
-       units/rescue.service.m4.in \
+       units/rescue.service.in \
        units/systemd-initctl.service.in \
        units/systemd-shutdownd.service.in \
        units/systemd-remount-fs.service.in \
@@ -547,8 +590,6 @@ EXTRA_DIST += \
        units/systemd-fsck-root.service.in \
        units/user@.service.in \
        units/debug-shell.service.in \
-       units/systemd-hibernate.service.in \
-       units/systemd-hybrid-sleep.service.in \
        units/systemd-suspend.service.in \
        units/quotaon.service.in \
        units/initrd-parse-etc.service.in \
@@ -562,7 +603,6 @@ CLEANFILES += \
        units/console-shell.service.m4 \
        units/console-getty.service.m4 \
        units/container-getty@.service.m4 \
-       units/rescue.service.m4 \
        units/user@.service.m4
 
 if HAVE_SYSV_COMPAT
@@ -674,7 +714,8 @@ man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE
 EXTRA_DIST += \
        man/systemd.index.xml \
        man/index.html \
-       man/systemd.directives.xml
+       man/systemd.directives.xml \
+       man/glib-event-glue.c
 
 CLEANFILES += \
        man/systemd.index.xml \
@@ -691,7 +732,6 @@ EXTRA_DIST += \
        $(man_MANS) \
        tools/make-man-index.py \
        tools/make-directive-index.py \
-       tools/make-man-rules.py \
        tools/xml_helper.py
 
 # ------------------------------------------------------------------------------
@@ -700,7 +740,6 @@ noinst_LTLIBRARIES += \
 
 libsystemd_shared_la_SOURCES = \
        src/shared/linux/auto_dev-ioctl.h \
-       src/shared/linux/fanotify.h \
        src/shared/ioprio.h \
        src/shared/missing.h \
        src/shared/initreq.h \
@@ -727,6 +766,10 @@ libsystemd_shared_la_SOURCES = \
        src/shared/path-util.h \
        src/shared/time-util.c \
        src/shared/time-util.h \
+       src/shared/locale-util.c \
+       src/shared/locale-util.h \
+       src/shared/mempool.c \
+       src/shared/mempool.h \
        src/shared/hashmap.c \
        src/shared/hashmap.h \
        src/shared/siphash24.c \
@@ -763,6 +806,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/pager.h \
        src/shared/socket-util.c \
        src/shared/socket-util.h \
+       src/shared/in-addr-util.c \
+       src/shared/in-addr-util.h \
        src/shared/conf-files.c \
        src/shared/conf-files.h \
        src/shared/cgroup-util.c \
@@ -771,7 +816,6 @@ libsystemd_shared_la_SOURCES = \
        src/shared/cgroup-show.h \
        src/shared/unit-name.c \
        src/shared/unit-name.h \
-       src/shared/utmp-wtmp.c \
        src/shared/utmp-wtmp.h \
        src/shared/watchdog.c \
        src/shared/watchdog.h \
@@ -810,6 +854,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/errno-list.h \
        src/shared/af-list.c \
        src/shared/af-list.h \
+       src/shared/arphrd-list.c \
+       src/shared/arphrd-list.h \
        src/shared/audit.c \
        src/shared/audit.h \
        src/shared/xml.c \
@@ -825,20 +871,34 @@ libsystemd_shared_la_SOURCES = \
        src/shared/login-shared.h \
        src/shared/ring.c \
        src/shared/ring.h \
+       src/shared/barrier.c \
+       src/shared/barrier.h \
+       src/shared/pty.c \
+       src/shared/pty.h \
        src/shared/async.c \
        src/shared/async.h \
-       src/shared/eventfd-util.c \
-       src/shared/eventfd-util.h \
        src/shared/copy.c \
        src/shared/copy.h \
        src/shared/base-filesystem.c \
-       src/shared/base-filesystem.h
+       src/shared/base-filesystem.h \
+       src/shared/memfd.c \
+       src/shared/memfd.h \
+       src/shared/uid-range.c \
+       src/shared/uid-range.h \
+       src/shared/nss-util.h
+
+if HAVE_UTMP
+libsystemd_shared_la_SOURCES += \
+       src/shared/utmp-wtmp.c
+endif
 
 nodist_libsystemd_shared_la_SOURCES = \
        src/shared/errno-from-name.h \
        src/shared/errno-to-name.h \
        src/shared/af-from-name.h \
-       src/shared/af-to-name.h
+       src/shared/af-to-name.h \
+       src/shared/arphrd-from-name.h \
+       src/shared/arphrd-to-name.h
 
 libsystemd_shared_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -872,6 +932,8 @@ libsystemd_label_la_SOURCES = \
        src/shared/mkdir-label.c \
        src/shared/ask-password-api.c \
        src/shared/ask-password-api.h \
+       src/shared/switch-root.h \
+       src/shared/switch-root.c \
        src/shared/fileio-label.c \
        src/shared/fileio-label.h \
        src/shared/dev-setup.c \
@@ -888,6 +950,16 @@ libsystemd_label_la_CFLAGS = \
 libsystemd_label_la_LIBADD = \
        $(SELINUX_LIBS)
 
+# -----------------------------------------------------------------------------
+
+if ENABLE_LDCONFIG
+dist_systemunit_DATA += \
+       units/ldconfig.service
+
+SYSINIT_TARGET_WANTS += \
+       ldconfig.service
+endif
+
 # ------------------------------------------------------------------------------
 
 if HAVE_SECCOMP
@@ -969,6 +1041,10 @@ libsystemd_core_la_SOURCES = \
        src/core/socket.h \
        src/core/busname.c \
        src/core/busname.h \
+       src/core/bus-common.c \
+       src/core/bus-common.h \
+       src/core/bus-endpoint.c \
+       src/core/bus-endpoint.h \
        src/core/target.c \
        src/core/target.h \
        src/core/snapshot.c \
@@ -1061,14 +1137,14 @@ libsystemd_core_la_SOURCES = \
        src/core/namespace.h \
        src/core/build.h \
        src/core/sysfs-show.h \
-       src/core/switch-root.h \
-       src/core/switch-root.c \
        src/core/killall.h \
        src/core/killall.c \
        src/core/audit-fd.c \
        src/core/audit-fd.h \
        src/core/show-status.c \
-       src/core/show-status.h
+       src/core/show-status.h \
+       src/core/failure-action.c \
+       src/core/failure-action.h
 
 if HAVE_KMOD
 libsystemd_core_la_SOURCES += \
@@ -1123,45 +1199,64 @@ CLEANFILES += \
        src/shared/errno-list.txt \
        src/shared/errno-from-name.gperf \
        src/shared/af-list.txt \
-       src/shared/af-from-name.gperf
+       src/shared/af-from-name.gperf \
+       src/shared/arphrd-list.txt \
+       src/shared/arphrd-from-name.gperf \
+       src/shared/dns_type-list.txt \
+       src/shared/dns_type-from-name.gperf
 
 BUILT_SOURCES += \
        src/shared/errno-from-name.h \
        src/shared/errno-to-name.h \
        src/shared/af-from-name.h \
-       src/shared/af-to-name.h
+       src/shared/af-to-name.h \
+       src/shared/arphrd-from-name.h \
+       src/shared/arphrd-to-name.h \
+       src/resolve/dns_type-from-name.h \
+       src/resolve/dns_type-to-name.h
 
-src/shared/errno-list.txt:
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }'  > $@
+%-from-name.gperf: %-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
+
+%-from-name.h: %-from-name.gperf
+       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
 
-src/shared/errno-from-name.gperf: src/shared/errno-list.txt
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
 
-src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
+src/shared/errno-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
 
 src/shared/errno-to-name.h: src/shared/errno-list.txt
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
+
 
 src/shared/af-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - < /dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }'  > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
 
-src/shared/af-from-name.gperf: src/shared/af-list.txt
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct af_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
+src/shared/af-to-name.h: src/shared/af-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
 
-src/shared/af-from-name.h: src/shared/af-from-name.gperf
+src/shared/arphrd-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_af -H hash_af_name -p -C < $< > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
 
-src/shared/af-to-name.h: src/shared/af-list.txt
+src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
+
+src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
+
+
+src/resolve/dns_type-list.txt: src/resolve/dns-type.h
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
+
+src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf "        case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@
+
+src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
 
 # ------------------------------------------------------------------------------
 systemd_SOURCES = \
@@ -1203,14 +1298,13 @@ CLEANFILES += \
        src/core/org.freedesktop.systemd1.policy.in
 
 # ------------------------------------------------------------------------------
+
 manual_tests += \
-       test-engine \
        test-ns \
        test-loopback \
        test-hostname \
        test-daemon \
        test-cgroup \
-       test-cgroup-mask \
        test-install \
        test-watchdog \
        test-log \
@@ -1222,6 +1316,8 @@ manual_tests += \
 endif
 
 tests += \
+       test-engine \
+       test-cgroup-mask \
        test-job-type \
        test-env-replace \
        test-strbuf \
@@ -1234,6 +1330,8 @@ tests += \
        test-ellipsize \
        test-util \
        test-ring \
+       test-barrier \
+       test-pty \
        test-tmpfiles \
        test-namespace \
        test-date \
@@ -1247,6 +1345,7 @@ tests += \
        test-fileio \
        test-time \
        test-hashmap \
+       test-set \
        test-list \
        test-tables \
        test-device-nodes \
@@ -1257,17 +1356,47 @@ tests += \
        test-conf-files \
        test-capability \
        test-async \
-       test-ratelimit
+       test-ratelimit \
+       test-condition-util \
+       test-uid-range \
+       test-bus-policy
 
 EXTRA_DIST += \
+       test/a.service \
+       test/basic.target \
+       test/b.service \
+       test/c.service \
+       test/daughter.service \
+       test/d.service \
+       test/end.service \
+       test/e.service \
+       test/f.service \
+       test/grandchild.service \
+       test/g.service \
+       test/hello-after-sleep.target \
+       test/hello.service \
+       test/h.service \
+       test/parent-deep.slice \
+       test/parent.slice \
+       test/paths.target \
        test/sched_idle_bad.service \
        test/sched_idle_ok.service \
        test/sched_rr_bad.service \
-       test/sched_rr_ok.service \
        test/sched_rr_change.service \
+       test/sched_rr_ok.service \
+       test/shutdown.target \
+       test/sleep.service \
+       test/sockets.target \
        test/son.service \
-       test/daughter.service \
-       test/parent.slice
+       test/sysinit.target \
+       test/testsuite.target \
+       test/timers.target \
+       test/unstoppable.service \
+       test/bus-policy/hello.conf \
+       test/bus-policy/methods.conf \
+       test/bus-policy/ownerships.conf \
+       test/bus-policy/signals.conf
+
 
 EXTRA_DIST += \
        src/test/test-helper.h
@@ -1374,6 +1503,14 @@ test_async_SOURCES = \
 test_async_LDADD = \
        libsystemd-shared.la
 
+test_condition_util_SOURCES = \
+       src/test/test-condition-util.c
+
+test_condition_util_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
+
 test_fdset_SOURCES = \
        src/test/test-fdset.c
 
@@ -1392,6 +1529,12 @@ test_util_SOURCES = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_uid_range_SOURCES = \
+       src/test/test-uid-range.c
+
+test_uid_range_LDADD = \
+       libsystemd-core.la
+
 test_socket_util_SOURCES = \
        src/test/test-socket-util.c
 
@@ -1404,6 +1547,18 @@ test_ring_SOURCES = \
 test_ring_LDADD = \
        libsystemd-core.la
 
+test_barrier_SOURCES = \
+       src/test/test-barrier.c
+
+test_barrier_LDADD = \
+       libsystemd-core.la
+
+test_pty_SOURCES = \
+       src/test/test-pty.c
+
+test_pty_LDADD = \
+       libsystemd-core.la
+
 test_tmpfiles_SOURCES = \
        src/test/test-tmpfiles.c
 
@@ -1416,12 +1571,37 @@ test_namespace_SOURCES = \
 test_namespace_LDADD = \
        libsystemd-core.la
 
+CLEANFILES += \
+       src/test/test-hashmap-ordered.c
+
+BUILT_SOURCES += \
+       src/test/test-hashmap-ordered.c
+
+src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
+                          { if (!match($$0, "^#include"))          \
+                                gsub(/hashmap/, "ordered_hashmap"); \
+                            gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
+                            gsub(/Hashmap/, "OrderedHashmap");      \
+                            print }' <$< >$@
+
+nodist_test_hashmap_SOURCES = \
+       src/test/test-hashmap-ordered.c
+
 test_hashmap_SOURCES = \
-       src/test/test-hashmap.c
+       src/test/test-hashmap.c \
+       src/test/test-hashmap-plain.c
 
 test_hashmap_LDADD = \
        libsystemd-core.la
 
+test_set_SOURCES = \
+       src/test/test-set.c
+
+test_set_LDADD = \
+       libsystemd-core.la
+
 test_xml_SOURCES = \
        src/test/test-xml.c
 
@@ -1436,7 +1616,15 @@ test_list_LDADD = \
 
 test_tables_SOURCES = \
        src/test/test-tables.c \
-       src/shared/test-tables.h
+       src/shared/test-tables.h \
+       src/bus-proxyd/bus-policy.c \
+       src/bus-proxyd/bus-policy.h \
+       src/journal/journald-server.c \
+       src/journal/journald-server.h
+
+test_tables_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       -I$(top_srcdir)/src/bus-proxyd
 
 test_tables_CFLAGS = \
        $(AM_CFLAGS) \
@@ -1445,7 +1633,9 @@ test_tables_CFLAGS = \
 test_tables_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
+       libsystemd-journal-core.la \
        libsystemd-core.la \
+       libudev-core.la \
        $(RT_LIBS)
 
 test_prioq_SOURCES = \
@@ -1639,6 +1829,16 @@ test_conf_files_SOURCES = \
 test_conf_files_LDADD = \
        libsystemd-shared.la
 
+test_bus_policy_SOURCES = \
+       src/bus-proxyd/test-bus-policy.c \
+       src/bus-proxyd/bus-policy.c \
+       src/bus-proxyd/bus-policy.h
+
+test_bus_policy_LDADD = \
+       libsystemd-capability.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
 # ------------------------------------------------------------------------------
 ## .PHONY so it always rebuilds it
 .PHONY: coverage lcov-run lcov-report coverage-sync
@@ -1679,11 +1879,19 @@ endif
 
 # ------------------------------------------------------------------------------
 systemd_analyze_SOURCES = \
-       src/analyze/analyze.c
+       src/analyze/analyze.c \
+       src/analyze/analyze-verify.c \
+       src/analyze/analyze-verify.h
+
+systemd_verify_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
 
 systemd_analyze_LDADD = \
+       libsystemd-core.la \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       $(RT_LIBS)
 
 # ------------------------------------------------------------------------------
 systemd_initctl_SOURCES = \
@@ -1712,6 +1920,7 @@ systemd_update_done_SOURCES = \
 
 systemd_update_done_LDADD = \
        libsystemd-internal.la \
+       libsystemd-label.la \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
@@ -1799,13 +2008,16 @@ nodist_systemunit_DATA += \
        units/systemd-tmpfiles-setup.service \
        units/systemd-tmpfiles-clean.service
 
+nodist_tmpfiles_DATA = \
+       tmpfiles.d/etc.conf
+
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
        tmpfiles.d/systemd-nologin.conf \
+       tmpfiles.d/systemd-remote.conf \
        tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf \
-       tmpfiles.d/var.conf \
-       tmpfiles.d/etc.conf
+       tmpfiles.d/var.conf
 
 if HAVE_SYSV_COMPAT
 dist_tmpfiles_DATA += \
@@ -1828,10 +2040,14 @@ INSTALL_DIRS += \
 endif
 
 EXTRA_DIST += \
+       tmpfiles.d/etc.conf.m4 \
        units/systemd-tmpfiles-setup-dev.service.in \
        units/systemd-tmpfiles-setup.service.in \
        units/systemd-tmpfiles-clean.service.in
 
+CLEANFILES += \
+       tmpfiles.d/etc.conf
+
 # ------------------------------------------------------------------------------
 if ENABLE_SYSUSERS
 systemd_sysusers_SOURCES = \
@@ -1854,7 +2070,8 @@ SYSINIT_TARGET_WANTS += \
        systemd-sysusers.service
 
 dist_sysusers_DATA = \
-       sysusers.d/systemd.conf
+       sysusers.d/systemd.conf \
+       sysusers.d/systemd-remote.conf
 
 nodist_sysusers_DATA = \
        sysusers.d/basic.conf
@@ -1870,6 +2087,42 @@ INSTALL_DIRS += \
        $(sysusersdir)
 endif
 
+# ------------------------------------------------------------------------------
+dist_factory_etc_DATA = \
+       factory/etc/nsswitch.conf
+
+if HAVE_PAM
+dist_factory_pam_DATA = \
+       factory/etc/pam.d/system-auth \
+       factory/etc/pam.d/other
+endif
+
+# ------------------------------------------------------------------------------
+if ENABLE_FIRSTBOOT
+systemd_firstboot_SOURCES = \
+       src/firstboot/firstboot.c
+
+systemd_firstboot_LDADD = \
+       libsystemd-units.la \
+       libsystemd-label.la \
+       libsystemd-capability.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       -lcrypt
+
+rootbin_PROGRAMS += \
+       systemd-firstboot
+
+nodist_systemunit_DATA += \
+       units/systemd-firstboot.service
+
+EXTRA_DIST += \
+       units/systemd-firstboot.service.in
+
+SYSINIT_TARGET_WANTS += \
+       systemd-firstboot.service
+endif
+
 # ------------------------------------------------------------------------------
 systemd_machine_id_setup_SOURCES = \
        src/machine-id-setup/machine-id-setup-main.c \
@@ -1962,8 +2215,45 @@ systemd_system_update_generator_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
 
-if ENABLE_EFI
 # ------------------------------------------------------------------------------
+if ENABLE_HIBERNATE
+systemgenerator_PROGRAMS += \
+       systemd-hibernate-resume-generator
+
+rootlibexec_PROGRAMS += \
+       systemd-hibernate-resume
+
+systemd_hibernate_resume_SOURCES = \
+       src/hibernate-resume/hibernate-resume.c
+
+systemd_hibernate_resume_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+systemd_hibernate_resume_generator_SOURCES = \
+       src/hibernate-resume/hibernate-resume-generator.c
+
+systemd_hibernate_resume_generator_LDADD = \
+       libsystemd-label.la \
+       libsystemd-shared.la
+
+EXTRA_DIST += \
+       units/systemd-hibernate.service.in \
+       units/systemd-hibernate-resume@.service.in \
+       units/systemd-hybrid-sleep.service.in
+
+dist_systemunit_DATA += \
+       units/hibernate.target \
+       units/hybrid-sleep.target
+
+nodist_systemunit_DATA += \
+       units/systemd-hibernate.service \
+       units/systemd-hibernate-resume@.service \
+       units/systemd-hybrid-sleep.service
+endif
+
+# ------------------------------------------------------------------------------
+if ENABLE_EFI
 systemgenerator_PROGRAMS +=  \
        systemd-efi-boot-generator
 
@@ -2079,6 +2369,13 @@ systemd_cgroups_agent_LDADD = \
        libsystemd-shared.la
 
 # ------------------------------------------------------------------------------
+systemd_escape_SOURCES = \
+       src/escape/escape.c
+
+systemd_escape_LDADD = \
+       libsystemd-shared.la
+
+# -----------------------------------------------------------------------------
 systemctl_SOURCES = \
        src/systemctl/systemctl.c
 
@@ -2092,8 +2389,7 @@ systemctl_LDADD = \
 
 # ------------------------------------------------------------------------------
 systemd_notify_SOURCES = \
-       src/notify/notify.c \
-       src/readahead/sd-readahead.c
+       src/notify/notify.c
 
 systemd_notify_LDADD = \
        libsystemd-internal.la \
@@ -2203,13 +2499,16 @@ nodist_systemunit_DATA += \
 dist_systemunit_DATA += \
        units/systemd-bus-proxyd.socket
 
-dist_userunit_DATA += \
-       units/user/systemd-bus-proxyd.socket \
+nodist_userunit_DATA += \
        units/user/systemd-bus-proxyd@.service
+
+dist_userunit_DATA += \
+       units/user/systemd-bus-proxyd.socket
 endif
 
 EXTRA_DIST += \
-       units/systemd-bus-proxyd@.service.in
+       units/systemd-bus-proxyd@.service.in \
+       units/user/systemd-bus-proxyd@.service.in
 
 # ------------------------------------------------------------------------------
 systemd_tty_ask_password_agent_SOURCES = \
@@ -2224,7 +2523,6 @@ libsystemd_internal_la_SOURCES = \
        src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h \
        src/systemd/sd-bus-vtable.h \
-       src/systemd/sd-memfd.h \
        src/systemd/sd-utf8.h \
        src/systemd/sd-event.h \
        src/systemd/sd-rtnl.h \
@@ -2233,6 +2531,7 @@ libsystemd_internal_la_SOURCES = \
        src/systemd/sd-id128.h \
        src/systemd/sd-daemon.h \
        src/systemd/sd-path.h \
+       src/systemd/sd-network.h \
        src/libsystemd/sd-bus/sd-bus.c \
        src/libsystemd/sd-bus/bus-control.c \
        src/libsystemd/sd-bus/bus-control.h \
@@ -2273,7 +2572,6 @@ libsystemd_internal_la_SOURCES = \
        src/libsystemd/sd-bus/bus-slot.h \
        src/libsystemd/sd-bus/bus-protocol.h \
        src/libsystemd/sd-bus/kdbus.h \
-       src/libsystemd/sd-bus/sd-memfd.c \
        src/libsystemd/sd-utf8/sd-utf8.c \
        src/libsystemd/sd-event/sd-event.c \
        src/libsystemd/sd-event/event-util.h \
@@ -2284,10 +2582,15 @@ libsystemd_internal_la_SOURCES = \
        src/libsystemd/sd-rtnl/rtnl-types.c \
        src/libsystemd/sd-rtnl/rtnl-util.h \
        src/libsystemd/sd-rtnl/rtnl-util.c \
+       src/libsystemd/sd-rtnl/local-addresses.h \
+       src/libsystemd/sd-rtnl/local-addresses.c \
        src/libsystemd/sd-id128/sd-id128.c \
        src/libsystemd/sd-daemon/sd-daemon.c \
        src/libsystemd/sd-login/sd-login.c \
-       src/libsystemd/sd-path/sd-path.c
+       src/libsystemd/sd-path/sd-path.c \
+       src/libsystemd/sd-network/sd-network.c \
+       src/libsystemd/sd-network/network-util.h \
+       src/libsystemd/sd-network/network-util.c
 
 nodist_libsystemd_internal_la_SOURCES = \
        src/libsystemd/libsystemd.sym \
@@ -2386,7 +2689,6 @@ pkginclude_HEADERS += \
        src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h \
        src/systemd/sd-bus-vtable.h \
-       src/systemd/sd-memfd.h \
        src/systemd/sd-utf8.h \
        src/systemd/sd-event.h \
        src/systemd/sd-rtnl.h \
@@ -2407,7 +2709,6 @@ tests += \
        test-bus-kernel \
        test-bus-kernel-bloom \
        test-bus-kernel-benchmark \
-       test-bus-memfd \
        test-bus-zero-copy \
        test-bus-introspect \
        test-bus-objects \
@@ -2561,13 +2862,6 @@ test_bus_kernel_benchmark_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
-test_bus_memfd_SOURCES = \
-       src/libsystemd/sd-bus/test-bus-memfd.c
-
-test_bus_memfd_LDADD = \
-       libsystemd-internal.la \
-       libsystemd-shared.la
-
 test_bus_zero_copy_SOURCES = \
        src/libsystemd/sd-bus/test-bus-zero-copy.c
 
@@ -2638,13 +2932,13 @@ libsystemd_network_la_CFLAGS = \
        $(KMOD_CFLAGS)
 
 libsystemd_network_la_SOURCES = \
-       src/systemd/sd-network.h \
        src/systemd/sd-dhcp-client.h \
        src/systemd/sd-dhcp-server.h \
        src/systemd/sd-dhcp-lease.h \
        src/systemd/sd-ipv4ll.h \
-       src/network/sd-network.c \
-       src/network/network-util.h \
+       src/systemd/sd-icmp6-nd.h \
+       src/systemd/sd-dhcp6-client.h \
+       src/systemd/sd-dhcp6-lease.h \
        src/libsystemd-network/sd-dhcp-client.c \
        src/libsystemd-network/sd-dhcp-server.c \
        src/libsystemd-network/dhcp-network.c \
@@ -2661,9 +2955,6 @@ libsystemd_network_la_SOURCES = \
        src/libsystemd-network/ipv4ll-internal.h \
        src/libsystemd-network/network-internal.c \
        src/libsystemd-network/network-internal.h \
-       src/systemd/sd-icmp6-nd.h \
-       src/systemd/sd-dhcp6-client.h \
-       src/systemd/sd-dhcp6-lease.h \
        src/libsystemd-network/sd-icmp6-nd.c \
        src/libsystemd-network/sd-dhcp6-client.c \
        src/libsystemd-network/dhcp6-internal.h \
@@ -2750,6 +3041,155 @@ tests += \
        test-icmp6-rs \
        test-dhcp6-client
 
+# ------------------------------------------------------------------------------
+if ENABLE_TERMINAL
+noinst_LTLIBRARIES += \
+       libsystemd-terminal.la
+
+rootlibexec_PROGRAMS += \
+       systemd-consoled
+
+noinst_PROGRAMS += \
+       systemd-evcat \
+       systemd-modeset \
+       systemd-subterm
+
+dist_pkgdata_DATA += \
+       src/libsystemd-terminal/unifont-glyph-array.bin
+
+nodist_userunit_DATA += \
+       units/user/systemd-consoled.service
+
+USER_DEFAULT_TARGET_WANTS += \
+       systemd-consoled.service
+
+EXTRA_DIST += \
+       units/user/systemd-consoled.service.in
+
+tests += \
+       test-term-page \
+       test-term-parser \
+       test-unifont
+endif
+
+libsystemd_terminal_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+libsystemd_terminal_la_SOURCES = \
+       src/libsystemd-terminal/grdev.h \
+       src/libsystemd-terminal/grdev-internal.h \
+       src/libsystemd-terminal/grdev.c \
+       src/libsystemd-terminal/grdev-drm.c \
+       src/libsystemd-terminal/idev.h \
+       src/libsystemd-terminal/idev-internal.h \
+       src/libsystemd-terminal/idev.c \
+       src/libsystemd-terminal/idev-evdev.c \
+       src/libsystemd-terminal/idev-keyboard.c \
+       src/libsystemd-terminal/sysview.h \
+       src/libsystemd-terminal/sysview-internal.h \
+       src/libsystemd-terminal/sysview.c \
+       src/libsystemd-terminal/term.h \
+       src/libsystemd-terminal/term-internal.h \
+       src/libsystemd-terminal/term-charset.c \
+       src/libsystemd-terminal/term-page.c \
+       src/libsystemd-terminal/term-parser.c \
+       src/libsystemd-terminal/term-screen.c \
+       src/libsystemd-terminal/term-wcwidth.c \
+       src/libsystemd-terminal/unifont.h \
+       src/libsystemd-terminal/unifont-def.h \
+       src/libsystemd-terminal/unifont.c
+
+libsystemd_terminal_la_LIBADD = \
+       libudev-internal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_consoled_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+systemd_consoled_SOURCES = \
+       src/console/consoled.h \
+       src/console/consoled.c \
+       src/console/consoled-display.c \
+       src/console/consoled-manager.c \
+       src/console/consoled-session.c \
+       src/console/consoled-terminal.c \
+       src/console/consoled-workspace.c
+
+systemd_consoled_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_evcat_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+systemd_evcat_SOURCES = \
+       src/libsystemd-terminal/evcat.c
+
+systemd_evcat_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_modeset_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+systemd_modeset_SOURCES = \
+       src/libsystemd-terminal/modeset.c
+
+systemd_modeset_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_subterm_SOURCES = \
+       src/libsystemd-terminal/subterm.c
+
+systemd_subterm_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_term_page_SOURCES = \
+       src/libsystemd-terminal/test-term-page.c
+
+test_term_page_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_term_parser_SOURCES = \
+       src/libsystemd-terminal/test-term-parser.c
+
+test_term_parser_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_unifont_SOURCES = \
+       src/libsystemd-terminal/test-unifont.c
+
+test_unifont_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+.PHONY: update-unifont
+update-unifont: tools/compile-unifont.py
+       $(AM_V_GEN)$(PYTHON) $< \
+               <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
+               >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
+       @echo "unifont-glyph-array.bin has been regenerated"
+
 # ------------------------------------------------------------------------------
 if ENABLE_GTK_DOC
 SUBDIRS += \
@@ -2986,18 +3426,6 @@ libudev_core_la_LIBADD = \
        $(BLKID_LIBS) \
        $(KMOD_LIBS)
 
-libudev_core_la_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
-       -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-
-if ENABLE_FIRMWARE
-libudev_core_la_SOURCES += \
-       src/udev/udev-builtin-firmware.c
-
-dist_udevrules_DATA += \
-       rules/50-firmware.rules
-endif
-
 if HAVE_KMOD
 libudev_core_la_SOURCES += \
        src/udev/udev-builtin-kmod.c
@@ -3319,16 +3747,6 @@ typelibs_DATA = \
 
 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
 endif # HAVE_INTROSPECTION
-
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-libgudev-install-hook:
-       libname=libgudev-1.0.so && $(move-to-rootlibdir)
-
-libgudev-uninstall-hook:
-       rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
-
-INSTALL_EXEC_HOOKS += libgudev-install-hook
-UNINSTALL_EXEC_HOOKS += libgudev-uninstall-hook
 endif
 
 EXTRA_DIST += \
@@ -3397,19 +3815,20 @@ rootlibexec_PROGRAMS += \
        systemd-journal-remote
 
 systemd_journal_remote_SOURCES = \
-       src/journal/journal-remote-parse.h \
-       src/journal/journal-remote-parse.c \
-       src/journal/journal-remote-write.h \
-       src/journal/journal-remote-write.c \
-       src/journal/journal-remote.c
+       src/journal-remote/journal-remote-parse.h \
+       src/journal-remote/journal-remote-parse.c \
+       src/journal-remote/journal-remote-write.h \
+       src/journal-remote/journal-remote-write.c \
+       src/journal-remote/journal-remote.h \
+       src/journal-remote/journal-remote.c
 
 systemd_journal_remote_LDADD = \
        libsystemd-internal.la \
        libsystemd-journal-core.la
 
 systemd_journal_remote_SOURCES += \
-       src/journal/microhttpd-util.h \
-       src/journal/microhttpd-util.c
+       src/journal-remote/microhttpd-util.h \
+       src/journal-remote/microhttpd-util.c
 
 systemd_journal_remote_CFLAGS = \
        $(AM_CFLAGS) \
@@ -3421,7 +3840,70 @@ systemd_journal_remote_LDADD += \
 if HAVE_GNUTLS
 systemd_journal_remote_LDADD += \
        $(GNUTLS_LIBS)
+
+# systemd-journal-remote make sense mostly with full crypto stack
+dist_systemunit_DATA += \
+       units/systemd-journal-remote.socket
+
+nodist_systemunit_DATA += \
+       units/systemd-journal-remote.service
+
+EXTRA_DIST += \
+       units/systemd-journal-remote.service.in
+
+journal-remote-install-hook: journal-install-hook
+       -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
+       -chown 0:0 $(DESTDIR)/var/log/journal/remote
+       -chmod 755 $(DESTDIR)/var/log/journal/remote
+
+INSTALL_EXEC_HOOKS += journal-remote-install-hook
+
 endif
+
+nodist_pkgsysconf_DATA += \
+       src/journal-remote/journal-remote.conf
+
+EXTRA_DIST += \
+       src/journal-remote/journal-remote.conf.in
+
+CLEANFILES += \
+       src/journal-remote/journal-remote.conf
+endif
+
+if HAVE_LIBCURL
+rootlibexec_PROGRAMS += \
+       systemd-journal-upload
+
+systemd_journal_upload_SOURCES = \
+       src/journal-remote/journal-upload.h \
+       src/journal-remote/journal-upload.c \
+       src/journal-remote/journal-upload-journal.c
+
+systemd_journal_upload_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(LIBCURL_CFLAGS)
+
+systemd_journal_upload_LDADD = \
+       libsystemd-core.la \
+       libsystemd-internal.la \
+       libsystemd-journal-internal.la \
+       libsystemd-shared.la \
+       $(LIBCURL_LIBS)
+
+nodist_systemunit_DATA += \
+       units/systemd-journal-upload.service
+
+EXTRA_DIST += \
+       units/systemd-journal-upload.service.in
+
+nodist_pkgsysconf_DATA += \
+       src/journal-remote/journal-upload.conf
+
+EXTRA_DIST += \
+       src/journal-remote/journal-upload.conf.in
+
+CLEANFILES += \
+       src/journal-remote/journal-upload.conf
 endif
 
 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
@@ -3530,14 +4012,19 @@ test_catalog_CPPFLAGS = \
 test_catalog_LDADD = \
        libsystemd-journal-core.la
 
-if HAVE_XZ
 test_compress_SOURCES = \
        src/journal/test-compress.c
 
 test_compress_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-shared.la
-endif
+
+test_compress_benchmark_SOURCES = \
+       src/journal/test-compress-benchmark.c
+
+test_compress_benchmark_LDADD = \
+       libsystemd-journal-internal.la \
+       libsystemd-shared.la
 
 libsystemd_journal_core_la_SOURCES = \
        src/journal/journald-kmsg.c \
@@ -3585,6 +4072,7 @@ journal-install-hook:
        -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
 
 journal-uninstall-hook:
+       -rmdir $(DESTDIR)/var/log/journal/remote
        -rmdir $(DESTDIR)/var/log/journal/
 
 INSTALL_EXEC_HOOKS += journal-install-hook
@@ -3621,8 +4109,10 @@ tests += \
        test-mmap-cache \
        test-catalog
 
-if HAVE_XZ
-tests += test-compress
+if HAVE_COMPRESSION
+tests += \
+       test-compress \
+       test-compress-benchmark
 endif
 
 pkginclude_HEADERS += \
@@ -3656,10 +4146,10 @@ libsystemd_journal_internal_la_CFLAGS = \
 
 libsystemd_journal_internal_la_LIBADD =
 
-if HAVE_XZ
 libsystemd_journal_internal_la_SOURCES += \
        src/journal/compress.c
 
+if HAVE_XZ
 libsystemd_journal_internal_la_CFLAGS += \
        $(XZ_CFLAGS)
 
@@ -3667,6 +4157,11 @@ libsystemd_journal_internal_la_LIBADD += \
        $(XZ_LIBS)
 endif
 
+if HAVE_LZ4
+libsystemd_journal_internal_la_LIBADD += \
+       -llz4
+endif
+
 if HAVE_GCRYPT
 libsystemd_journal_internal_la_SOURCES += \
        src/journal/journal-authenticate.c \
@@ -3709,8 +4204,9 @@ dist_pkgsysconf_DATA += \
 
 dist_catalog_DATA = \
        catalog/systemd.fr.catalog \
-       catalog/systemd.ru.catalog \
        catalog/systemd.it.catalog \
+       catalog/systemd.pl.catalog \
+       catalog/systemd.ru.catalog \
        catalog/systemd.catalog
 
 SOCKETS_TARGET_WANTS += \
@@ -3739,9 +4235,9 @@ rootlibexec_PROGRAMS += \
        systemd-journal-gatewayd
 
 systemd_journal_gatewayd_SOURCES = \
-       src/journal/journal-gatewayd.c \
-       src/journal/microhttpd-util.h \
-       src/journal/microhttpd-util.c
+       src/journal-remote/journal-gatewayd.c \
+       src/journal-remote/microhttpd-util.h \
+       src/journal-remote/microhttpd-util.c
 
 systemd_journal_gatewayd_LDADD = \
        libsystemd-logs.la \
@@ -3770,7 +4266,7 @@ nodist_systemunit_DATA += \
        units/systemd-journal-gatewayd.service
 
 dist_gatewayddocumentroot_DATA = \
-       src/journal/browse.html
+       src/journal-remote/browse.html
 
 endif
 
@@ -3851,9 +4347,6 @@ dist_bashcompletion_DATA += \
 dist_zshcompletion_DATA += \
        shell-completion/zsh/_coredumpctl
 
-GENERAL_ALIASES += \
-       $(bindir)/coredumpctl $(bindir)/systemd-coredumpctl
-
 sysctl_DATA = \
        sysctl.d/50-coredump.conf
 
@@ -3916,57 +4409,6 @@ endif
 EXTRA_DIST += \
        units/systemd-vconsole-setup.service.in
 
-# ------------------------------------------------------------------------------
-if ENABLE_READAHEAD
-systemd_readahead_SOURCES = \
-       src/readahead/readahead.c \
-       src/readahead/readahead-collect.c \
-       src/readahead/readahead-replay.c \
-       src/readahead/readahead-analyze.c \
-       src/readahead/readahead-common.c \
-       src/readahead/readahead-common.h
-
-systemd_readahead_LDADD = \
-       libsystemd-internal.la \
-       libudev-internal.la \
-       libsystemd-shared.la
-
-dist_doc_DATA += \
-       src/readahead/sd-readahead.c \
-       src/systemd/sd-readahead.h
-
-rootlibexec_PROGRAMS += \
-       systemd-readahead
-
-dist_systemunit_DATA += \
-       units/systemd-readahead-drop.service \
-       units/systemd-readahead-done.timer
-
-nodist_systemunit_DATA += \
-       units/systemd-readahead-collect.service \
-       units/systemd-readahead-replay.service \
-       units/systemd-readahead-done.service
-
-manual_tests += \
-       test-ssd
-
-test_ssd_SOURCES = \
-       src/readahead/test-ssd.c \
-       src/readahead/readahead-common.c \
-       src/readahead/readahead-common.h
-
-test_ssd_LDADD = \
-       libsystemd-internal.la \
-       libudev-internal.la \
-       libsystemd-shared.la
-
-endif
-
-EXTRA_DIST += \
-       units/systemd-readahead-collect.service.in \
-       units/systemd-readahead-replay.service.in \
-       units/systemd-readahead-done.service.in
-
 # ------------------------------------------------------------------------------
 if ENABLE_BOOTCHART
 systemd_bootchart_SOURCES = \
@@ -4125,7 +4567,7 @@ rootlibexec_PROGRAMS += \
 nodist_systemunit_DATA += \
        units/systemd-hostnamed.service
 
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.hostname1.busname
 
 dist_dbuspolicy_DATA += \
@@ -4168,13 +4610,11 @@ EXTRA_DIST += \
        units/systemd-hostnamed.service.in
 
 # ------------------------------------------------------------------------------
-if ENABLE_KDBUS
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.systemd1.busname
 
 BUSNAMES_TARGET_WANTS += \
        org.freedesktop.systemd1.busname
-endif
 
 # ------------------------------------------------------------------------------
 if ENABLE_LOCALED
@@ -4189,7 +4629,7 @@ systemd_localed_LDADD = \
 nodist_systemunit_DATA += \
        units/systemd-localed.service
 
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.locale1.busname
 
 rootlibexec_PROGRAMS += \
@@ -4216,9 +4656,6 @@ dist_pkgdata_DATA += \
 dist_noinst_SCRIPT = \
        src/locale/generate-kbd-model-map
 
-update-kbd-model-map: src/locale/generate-kbd-model-map
-       $PYTHON $< >src/locale/kbd-model-map
-
 localectl_SOURCES = \
        src/locale/localectl.c
 
@@ -4267,16 +4704,12 @@ dist_dbuspolicy_DATA += \
 nodist_systemunit_DATA += \
        units/systemd-timedated.service
 
-dist_systemunit_DATA += \
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.timedate1.busname
 
 polkitpolicy_files += \
        src/timedate/org.freedesktop.timedate1.policy
 
-INSTALL_DIRS += \
-       $(prefix)/lib/systemd/ntp-units.d \
-       $(sysconfdir)/systemd/ntp-units.d
-
 SYSTEM_UNIT_ALIASES += \
        systemd-timedated.service dbus-org.freedesktop.timedate1.service
 
@@ -4310,7 +4743,12 @@ EXTRA_DIST += \
 if ENABLE_TIMESYNCD
 systemd_timesyncd_SOURCES = \
        src/timesync/timesyncd.c \
-       src/timesync/timesyncd.h
+       src/timesync/timesyncd-manager.c \
+       src/timesync/timesyncd-manager.h \
+       src/timesync/timesyncd-conf.c \
+       src/timesync/timesyncd-conf.h \
+       src/timesync/timesyncd-server.c \
+       src/timesync/timesyncd-server.h
 
 nodist_systemd_timesyncd_SOURCES = \
        src/timesync/timesyncd-gperf.c
@@ -4337,7 +4775,7 @@ nodist_systemunit_DATA += \
        units/systemd-timesyncd.service
 
 GENERAL_ALIASES += \
-       $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-timesyncd.service
+       $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
 
 EXTRA_DIST += \
        units/systemd-timesyncd.service.in
@@ -4350,18 +4788,13 @@ EXTRA_DIST += \
 
 CLEANFILES += \
        src/timesync/timesyncd.conf
-
-dist_ntpunits_DATA = \
-       src/timesync/90-systemd.list
-
 endif
 
 # ------------------------------------------------------------------------------
 if HAVE_MYHOSTNAME
 libnss_myhostname_la_SOURCES = \
-       src/nss-myhostname/nss-myhostname.c \
-       src/nss-myhostname/ifconf.h \
-       src/nss-myhostname/netlink.c
+       src/nss-myhostname/nss-myhostname.sym \
+       src/nss-myhostname/nss-myhostname.c
 
 libnss_myhostname_la_LDFLAGS = \
        $(AM_LDFLAGS) \
@@ -4369,7 +4802,8 @@ libnss_myhostname_la_LDFLAGS = \
        -export-dynamic \
        -avoid-version \
        -shared \
-       -shrext .so.2
+       -shrext .so.2 \
+       -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
 
 libnss_myhostname_la_LIBADD = \
        libsystemd-shared.la \
@@ -4432,7 +4866,9 @@ nodist_systemunit_DATA += \
        units/systemd-machined.service
 
 dist_systemunit_DATA += \
-       units/machine.slice \
+       units/machine.slice
+
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.machine1.busname
 
 dist_dbussystemservice_DATA += \
@@ -4454,24 +4890,75 @@ BUSNAMES_TARGET_WANTS += \
 EXTRA_DIST += \
        units/systemd-machined.service.in
 
+libnss_mymachines_la_SOURCES = \
+       src/nss-mymachines/nss-mymachines.sym \
+       src/nss-mymachines/nss-mymachines.c
+
+libnss_mymachines_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -module \
+       -export-dynamic \
+       -avoid-version \
+       -shared \
+       -shrext .so.2 \
+       -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
+
+libnss_mymachines_la_LIBADD = \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
+lib_LTLIBRARIES += \
+       libnss_mymachines.la
 endif
 
 # ------------------------------------------------------------------------------
 if ENABLE_RESOLVED
 systemd_resolved_SOURCES = \
-       src/resolve/resolved.h \
        src/resolve/resolved.c \
-       src/resolve/resolved-manager.c
-
-systemd_resolved_CFLAGS = \
-       $(AM_CFLAGS) \
-       $(KMOD_CFLAGS)
+       src/resolve/resolved-manager.c \
+       src/resolve/resolved-manager.h \
+       src/resolve/resolved-conf.c \
+       src/resolve/resolved-conf.h \
+       src/resolve/resolved-bus.c \
+       src/resolve/resolved-bus.h \
+       src/resolve/resolved-link.h \
+       src/resolve/resolved-link.c \
+       src/resolve/resolved-def.h \
+       src/resolve/resolved-dns-domain.h \
+       src/resolve/resolved-dns-domain.c \
+       src/resolve/resolved-dns-rr.h \
+       src/resolve/resolved-dns-rr.c \
+       src/resolve/resolved-dns-question.h \
+       src/resolve/resolved-dns-question.c \
+       src/resolve/resolved-dns-answer.h \
+       src/resolve/resolved-dns-answer.c \
+       src/resolve/resolved-dns-packet.h \
+       src/resolve/resolved-dns-packet.c \
+       src/resolve/resolved-dns-query.h \
+       src/resolve/resolved-dns-query.c \
+       src/resolve/resolved-dns-transaction.h \
+       src/resolve/resolved-dns-transaction.c \
+       src/resolve/resolved-dns-scope.h \
+       src/resolve/resolved-dns-scope.c \
+       src/resolve/resolved-dns-server.h \
+       src/resolve/resolved-dns-server.c \
+       src/resolve/resolved-dns-cache.h \
+       src/resolve/resolved-dns-cache.c \
+       src/resolve/resolved-dns-zone.h \
+       src/resolve/resolved-dns-zone.c \
+       src/resolve/resolved-dns-stream.h \
+       src/resolve/resolved-dns-stream.c \
+       src/resolve/dns-type.c \
+       src/resolve/dns-type.h \
+       src/resolve/dns_type-from-name.h \
+       src/resolve/dns_type-to-name.h
 
 nodist_systemd_resolved_SOURCES = \
        src/resolve/resolved-gperf.c
 
 EXTRA_DIST += \
-       src/resolve/resolved-gperf.gperf
+       src/resolve/resolved-gperf.gperf \
+       src/resolve/dns_type-from-name.gperf
 
 CLEANFILES += \
        src/resolve/resolved-gperf.c
@@ -4481,7 +4968,9 @@ systemd_resolved_LDADD = \
        libsystemd-network.la \
        libsystemd-label.la \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       -lm \
+       $(LIBIDN_LIBS)
 
 rootlibexec_PROGRAMS += \
        systemd-resolved
@@ -4489,9 +4978,24 @@ rootlibexec_PROGRAMS += \
 nodist_systemunit_DATA += \
        units/systemd-resolved.service
 
+dist_systemunit_DATA_busnames += \
+       units/org.freedesktop.resolve1.busname
+
+dist_dbuspolicy_DATA += \
+       src/resolve/org.freedesktop.resolve1.conf
+
+dist_dbussystemservice_DATA += \
+       src/resolve/org.freedesktop.resolve1.service
+
 EXTRA_DIST += \
        units/systemd-resolved.service.in
 
+SYSTEM_UNIT_ALIASES += \
+       systemd-resolved.service dbus-org.freedesktop.resolve1.service
+
+BUSNAMES_TARGET_WANTS += \
+       org.freedesktop.resolve1.busname
+
 GENERAL_ALIASES += \
        $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
 
@@ -4504,6 +5008,68 @@ EXTRA_DIST += \
 CLEANFILES += \
        src/resolve/resolved.conf
 
+tests += \
+       test-dns-domain
+
+test_dns_domain_SOURCES = \
+       src/resolve/resolved-dns-domain.h \
+       src/resolve/resolved-dns-domain.c \
+       src/resolve/test-dns-domain.c
+
+test_dns_domain_LDADD = \
+       libsystemd-capability.la \
+       libsystemd-network.la \
+       libsystemd-label.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(LIBIDN_LIBS)
+
+libnss_resolve_la_SOURCES = \
+       src/nss-resolve/nss-resolve.sym \
+       src/nss-resolve/nss-resolve.c
+
+libnss_resolve_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -module \
+       -export-dynamic \
+       -avoid-version \
+       -shared \
+       -shrext .so.2 \
+       -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
+
+libnss_resolve_la_LIBADD = \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
+lib_LTLIBRARIES += \
+       libnss_resolve.la
+
+systemd_resolve_host_SOURCES = \
+       src/resolve-host/resolve-host.c \
+       src/resolve/resolved-dns-packet.c \
+       src/resolve/resolved-dns-packet.h \
+       src/resolve/resolved-dns-rr.c \
+       src/resolve/resolved-dns-rr.h \
+       src/resolve/resolved-dns-answer.c \
+       src/resolve/resolved-dns-answer.h \
+       src/resolve/resolved-dns-question.c \
+       src/resolve/resolved-dns-question.h \
+       src/resolve/resolved-dns-domain.c \
+       src/resolve/resolved-dns-domain.h \
+       src/resolve/dns-type.c \
+       src/resolve/dns-type.h \
+       src/resolve/dns_type-from-name.h \
+       src/resolve/dns_type-to-name.h
+
+systemd_resolve_host_LDADD = \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       -lm \
+       $(LIBIDN_LIBS)
+
+rootlibexec_PROGRAMS += \
+       systemd-resolve-host
+
 endif
 
 # ------------------------------------------------------------------------------
@@ -4527,15 +5093,30 @@ libsystemd_networkd_core_la_CFLAGS = \
 libsystemd_networkd_core_la_SOURCES = \
        src/libsystemd-network/network-internal.h \
        src/network/networkd.h \
-       src/network/networkd-link.c \
+       src/network/networkd-link.h \
+       src/network/networkd-netdev.h \
+       src/network/networkd-netdev-tunnel.h \
+       src/network/networkd-netdev-veth.h \
+       src/network/networkd-netdev-vxlan.h \
+       src/network/networkd-netdev-vlan.h \
+       src/network/networkd-netdev-macvlan.h \
+       src/network/networkd-netdev-dummy.h \
+       src/network/networkd-netdev-tuntap.h \
+       src/network/networkd-netdev-bond.h \
+       src/network/networkd-netdev-bridge.h \
        src/network/networkd-netdev.c \
-       src/network/networkd-tunnel.c \
-       src/network/networkd-veth.c \
-       src/network/networkd-vxlan.c \
-       src/network/networkd-vlan.c \
-       src/network/networkd-macvlan.c \
-       src/network/networkd-dummy.c \
-       src/network/networkd-tuntap.c \
+       src/network/networkd-netdev-tunnel.c \
+       src/network/networkd-netdev-veth.c \
+       src/network/networkd-netdev-vxlan.c \
+       src/network/networkd-netdev-vlan.c \
+       src/network/networkd-netdev-macvlan.c \
+       src/network/networkd-netdev-dummy.c \
+       src/network/networkd-netdev-tuntap.c \
+       src/network/networkd-netdev-bond.c \
+       src/network/networkd-netdev-bridge.c \
+       src/network/networkd-link.c \
+       src/network/networkd-ipv4ll.c \
+       src/network/networkd-dhcp4.c \
        src/network/networkd-network.c \
        src/network/networkd-address.c \
        src/network/networkd-route.c \
@@ -4561,8 +5142,11 @@ systemd_networkd_wait_online_CFLAGS = \
 
 systemd_networkd_wait_online_SOURCES = \
        src/libsystemd-network/network-internal.h \
+       src/network/networkd-wait-online.h \
+       src/network/networkd-wait-online-link.h \
        src/network/networkd-wait-online.c \
-       src/network/networkd-wait-online.h
+       src/network/networkd-wait-online-manager.c \
+       src/network/networkd-wait-online-link.c
 
 systemd_networkd_wait_online_LDADD = \
        libsystemd-network.la \
@@ -4570,6 +5154,18 @@ systemd_networkd_wait_online_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
+rootbin_PROGRAMS += \
+       networkctl
+
+networkctl_SOURCES = \
+       src/network/networkctl.c
+
+networkctl_LDADD = \
+       libsystemd-internal.la \
+       libudev-internal.la \
+       libsystemd-shared.la \
+       libsystemd-network.la
+
 test_network_SOURCES = \
        src/network/test-network.c
 
@@ -4579,8 +5175,17 @@ test_network_CFLAGS = \
 test_network_LDADD = \
        libsystemd-networkd-core.la
 
+test_network_tables_SOURCES = \
+       src/network/test-network-tables.c \
+       src/shared/test-tables.h
+
+test_network_tables_LDADD = \
+       libsystemd-networkd-core.la \
+       libudev-core.la
+
 tests += \
-       test-network
+       test-network \
+       test-network-tables
 
 nodist_systemunit_DATA += \
        units/systemd-networkd.service \
@@ -4765,7 +5370,9 @@ nodist_systemunit_DATA += \
        units/systemd-user-sessions.service
 
 dist_systemunit_DATA += \
-       units/user.slice \
+       units/user.slice
+
+dist_systemunit_DATA_busnames += \
        units/org.freedesktop.login1.busname
 
 dist_dbussystemservice_DATA += \
@@ -4793,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
 BUSNAMES_TARGET_WANTS += \
        org.freedesktop.login1.busname
 
-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
-       src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
-       libsystemd-label.la \
-       libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
-       systemd-multi-seat-x
-
-endif
-
 dist_udevrules_DATA += \
        src/login/70-uaccess.rules \
        src/login/70-power-switch.rules
@@ -5131,6 +5724,7 @@ substitutions = \
        '|sysctldir=$(sysctldir)|' \
        '|systemgeneratordir=$(systemgeneratordir)|' \
        '|usergeneratordir=$(usergeneratordir)|' \
+       '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
        '|PACKAGE_URL=$(PACKAGE_URL)|' \
@@ -5183,12 +5777,18 @@ sysctl.d/%: sysctl.d/%.in
 %.pc: %.pc.in
        $(SED_PROCESS)
 
+%.conf: %.conf.in
+       $(SED_PROCESS)
+
 src/core/macros.%: src/core/macros.%.in
        $(SED_PROCESS)
 
 src/%.policy.in: src/%.policy.in.in
        $(SED_PROCESS)
 
+shell-completion/%: shell-completion/%.in
+       $(SED_PROCESS)
+
 %.rules: %.rules.in
        $(SED_PROCESS)
 
@@ -5207,6 +5807,11 @@ src/%: src/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
 
+tmpfiles.d/%: tmpfiles.d/%.m4
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
+
 units/%: units/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
@@ -5216,7 +5821,7 @@ units/user/%: units/%.m4
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
 
 if ENABLE_POLKIT
-dist_polkitpolicy_DATA = \
+nodist_polkitpolicy_DATA = \
        $(polkitpolicy_files) \
        $(polkitpolicy_in_in_files:.policy.in.in=.policy)
 endif
@@ -5314,6 +5919,7 @@ SOCKETS_TARGET_WANTS += \
        systemd-initctl.socket \
        systemd-shutdownd.socket
 
+if HAVE_UTMP
 if HAVE_SYSV_COMPAT
 RUNLEVEL1_TARGET_WANTS += \
        systemd-update-utmp-runlevel.service
@@ -5328,9 +5934,11 @@ RUNLEVEL5_TARGET_WANTS += \
 endif
 
 SYSINIT_TARGET_WANTS += \
-       systemd-update-utmp.service \
-       systemd-update-done.service \
-       ldconfig.service
+       systemd-update-utmp.service
+endif
+
+SYSINIT_TARGET_WANTS += \
+       systemd-update-done.service
 
 LOCAL_FS_TARGET_WANTS += \
        systemd-remount-fs.service \
@@ -5368,7 +5976,6 @@ SYSTEM_UNIT_ALIASES += \
 USER_UNIT_ALIASES += \
        $(systemunitdir)/shutdown.target shutdown.target \
        $(systemunitdir)/sockets.target sockets.target \
-       $(systemunitdir)/busnames.target busnames.target \
        $(systemunitdir)/timers.target timers.target \
        $(systemunitdir)/paths.target paths.target \
        $(systemunitdir)/bluetooth.target bluetooth.target \
@@ -5376,6 +5983,11 @@ 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 \
        $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
@@ -5596,7 +6208,8 @@ test-libsystemd-sym.c: \
                src/systemd/sd-login.h \
                src/systemd/sd-bus.h \
                src/systemd/sd-utf8.h \
-               src/systemd/sd-resolve.h
+               src/systemd/sd-resolve.h \
+               src/systemd/sd-path.h
        $(generate-sym-test)
 
 test-libudev-sym.c: \
index abb2e18542431601159b0db7474133781f8b408f..3b6139abb2f3b3423430e6ba6f5b237edc5fca77 100644 (file)
@@ -104,19 +104,25 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 check_PROGRAMS =
-@ENABLE_TESTS_TRUE@noinst_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_16)
+@ENABLE_TESTS_FALSE@noinst_PROGRAMS = $(am__EXEEXT_6)
+@ENABLE_TESTS_TRUE@noinst_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_18) \
+@ENABLE_TESTS_TRUE@    $(am__EXEEXT_6)
 @ENABLE_TESTS_FALSE@TESTS = test/udev-test.pl test/rules-test.sh
-@ENABLE_TESTS_TRUE@TESTS = $(am__EXEEXT_16) test/udev-test.pl \
+@ENABLE_TESTS_TRUE@TESTS = $(am__EXEEXT_18) test/udev-test.pl \
 @ENABLE_TESTS_TRUE@    test/rules-test.sh
 udevlibexec_PROGRAMS = ata_id$(EXEEXT) cdrom_id$(EXEEXT) \
        collect$(EXEEXT) scsi_id$(EXEEXT) v4l_id$(EXEEXT) \
        accelerometer$(EXEEXT) mtd_probe$(EXEEXT)
+@ENABLE_KDBUS_TRUE@am__append_1 = \
+@ENABLE_KDBUS_TRUE@    install-busnames-target-wants-hook
+
 rootbin_PROGRAMS = systemctl$(EXEEXT) systemd-notify$(EXEEXT) \
        systemd-ask-password$(EXEEXT) \
        systemd-tty-ask-password-agent$(EXEEXT) \
-       systemd-machine-id-setup$(EXEEXT) $(am__EXEEXT_17) \
-       $(am__EXEEXT_18) udevadm$(EXEEXT) journalctl$(EXEEXT) \
-       $(am__EXEEXT_19) $(am__EXEEXT_20)
+       systemd-machine-id-setup$(EXEEXT) systemd-escape$(EXEEXT) \
+       $(am__EXEEXT_19) $(am__EXEEXT_20) $(am__EXEEXT_21) \
+       udevadm$(EXEEXT) journalctl$(EXEEXT) $(am__EXEEXT_22) \
+       $(am__EXEEXT_23) $(am__EXEEXT_24)
 bin_PROGRAMS = systemd-cgls$(EXEEXT) systemd-cgtop$(EXEEXT) \
        systemd-nspawn$(EXEEXT) systemd-detect-virt$(EXEEXT) \
        systemd-delta$(EXEEXT) systemd-analyze$(EXEEXT) \
@@ -124,33 +130,43 @@ bin_PROGRAMS = systemd-cgls$(EXEEXT) systemd-cgtop$(EXEEXT) \
        busctl$(EXEEXT) systemd-cat$(EXEEXT) $(am__EXEEXT_2) \
        $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_5)
 rootlibexec_PROGRAMS = systemd$(EXEEXT) systemd-cgroups-agent$(EXEEXT) \
-       systemd-initctl$(EXEEXT) systemd-update-utmp$(EXEEXT) \
-       systemd-shutdownd$(EXEEXT) systemd-shutdown$(EXEEXT) \
-       systemd-remount-fs$(EXEEXT) systemd-reply-password$(EXEEXT) \
-       systemd-fsck$(EXEEXT) systemd-ac-power$(EXEEXT) \
-       systemd-sysctl$(EXEEXT) systemd-sleep$(EXEEXT) \
-       systemd-bus-proxyd$(EXEEXT) systemd-socket-proxyd$(EXEEXT) \
-       systemd-update-done$(EXEEXT) $(am__EXEEXT_21) \
-       systemd-udevd$(EXEEXT) systemd-activate$(EXEEXT) \
-       $(am__EXEEXT_22) systemd-journald$(EXEEXT) $(am__EXEEXT_23) \
-       $(am__EXEEXT_24) $(am__EXEEXT_25) $(am__EXEEXT_26) \
-       $(am__EXEEXT_27) $(am__EXEEXT_28) $(am__EXEEXT_29) \
-       $(am__EXEEXT_30) $(am__EXEEXT_31) $(am__EXEEXT_32) \
+       systemd-initctl$(EXEEXT) systemd-shutdownd$(EXEEXT) \
+       systemd-shutdown$(EXEEXT) systemd-remount-fs$(EXEEXT) \
+       systemd-reply-password$(EXEEXT) systemd-fsck$(EXEEXT) \
+       systemd-ac-power$(EXEEXT) systemd-sysctl$(EXEEXT) \
+       systemd-sleep$(EXEEXT) systemd-bus-proxyd$(EXEEXT) \
+       systemd-socket-proxyd$(EXEEXT) systemd-update-done$(EXEEXT) \
+       $(am__EXEEXT_25) $(am__EXEEXT_26) $(am__EXEEXT_27) \
+       $(am__EXEEXT_28) systemd-udevd$(EXEEXT) \
+       systemd-activate$(EXEEXT) $(am__EXEEXT_29) $(am__EXEEXT_30) \
+       systemd-journald$(EXEEXT) $(am__EXEEXT_31) $(am__EXEEXT_32) \
        $(am__EXEEXT_33) $(am__EXEEXT_34) $(am__EXEEXT_35) \
        $(am__EXEEXT_36) $(am__EXEEXT_37) $(am__EXEEXT_38) \
        $(am__EXEEXT_39) $(am__EXEEXT_40) $(am__EXEEXT_41) \
-       $(am__EXEEXT_42)
+       $(am__EXEEXT_42) $(am__EXEEXT_43) $(am__EXEEXT_44) \
+       $(am__EXEEXT_45) $(am__EXEEXT_46) $(am__EXEEXT_47) \
+       $(am__EXEEXT_48)
+@HAVE_UTMP_TRUE@am__append_2 = \
+@HAVE_UTMP_TRUE@       systemd-update-utmp
+
 systemgenerator_PROGRAMS = systemd-getty-generator$(EXEEXT) \
        systemd-fstab-generator$(EXEEXT) \
        systemd-system-update-generator$(EXEEXT) \
-       systemd-debug-generator$(EXEEXT) $(am__EXEEXT_43) \
-       $(am__EXEEXT_44) $(am__EXEEXT_45) $(am__EXEEXT_46) \
-       $(am__EXEEXT_47)
-@HAVE_SYSV_COMPAT_TRUE@am__append_1 = \
+       systemd-debug-generator$(EXEEXT) $(am__EXEEXT_49) \
+       $(am__EXEEXT_50) $(am__EXEEXT_51) $(am__EXEEXT_52) \
+       $(am__EXEEXT_53) $(am__EXEEXT_54)
+@ENABLE_KDBUS_TRUE@am__append_3 = \
+@ENABLE_KDBUS_TRUE@    $(dist_systemunit_DATA_busnames)
+
+@HAVE_UTMP_TRUE@am__append_4 = \
+@HAVE_UTMP_TRUE@       units/systemd-update-utmp.service \
+@HAVE_UTMP_TRUE@       units/systemd-update-utmp-runlevel.service
+
+@HAVE_SYSV_COMPAT_TRUE@am__append_5 = \
 @HAVE_SYSV_COMPAT_TRUE@        units/rc-local.service \
 @HAVE_SYSV_COMPAT_TRUE@        units/halt-local.service
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_2 = \
+@HAVE_SYSV_COMPAT_TRUE@am__append_6 = \
 @HAVE_SYSV_COMPAT_TRUE@        systemd-sysv-generator \
 @HAVE_SYSV_COMPAT_TRUE@        systemd-rc-local-generator
 
@@ -163,14 +179,13 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
        $(top_srcdir)/build-aux/py-compile \
        $(am__dist_bashcompletion_DATA_DIST) $(dist_catalog_DATA) \
        $(am__dist_dbuspolicy_DATA_DIST) \
-       $(am__dist_dbussystemservice_DATA_DIST) \
-       $(am__dist_doc_DATA_DIST) \
+       $(am__dist_dbussystemservice_DATA_DIST) $(dist_doc_DATA) \
+       $(dist_factory_etc_DATA) $(am__dist_factory_pam_DATA_DIST) \
        $(am__dist_gatewayddocumentroot_DATA_DIST) \
-       $(dist_network_DATA) $(am__dist_ntpunits_DATA_DIST) \
-       $(am__dist_pamconf_DATA_DIST) $(am__dist_pkgdata_DATA_DIST) \
-       $(am__dist_pkgsysconf_DATA_DIST) \
-       $(am__dist_polkitpolicy_DATA_DIST) $(dist_sysctl_DATA) \
-       $(dist_systempreset_DATA) $(am__dist_systemunit_DATA_DIST) \
+       $(dist_network_DATA) $(am__dist_pamconf_DATA_DIST) \
+       $(am__dist_pkgdata_DATA_DIST) $(am__dist_pkgsysconf_DATA_DIST) \
+       $(dist_sysctl_DATA) $(dist_systempreset_DATA) \
+       $(am__dist_systemunit_DATA_DIST) \
        $(am__dist_sysusers_DATA_DIST) $(am__dist_tmpfiles_DATA_DIST) \
        $(dist_udevconf_DATA) $(dist_udevhwdb_DATA) \
        $(am__dist_udevrules_DATA_DIST) $(am__dist_userunit_DATA_DIST) \
@@ -186,47 +201,48 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
        $(top_srcdir)/build-aux/install-sh \
        $(top_srcdir)/build-aux/ltmain.sh \
        $(top_srcdir)/build-aux/missing
-@ENABLE_BACKLIGHT_TRUE@am__append_3 = \
+@ENABLE_BACKLIGHT_TRUE@am__append_7 = \
 @ENABLE_BACKLIGHT_TRUE@        man/systemd-backlight@.service.8
 
-@ENABLE_BACKLIGHT_TRUE@am__append_4 = \
+@ENABLE_BACKLIGHT_TRUE@am__append_8 = \
 @ENABLE_BACKLIGHT_TRUE@        man/systemd-backlight.8
 
-@ENABLE_BINFMT_TRUE@am__append_5 = \
+@ENABLE_BINFMT_TRUE@am__append_9 = \
 @ENABLE_BINFMT_TRUE@   man/binfmt.d.5 \
 @ENABLE_BINFMT_TRUE@   man/systemd-binfmt.service.8
 
-@ENABLE_BINFMT_TRUE@am__append_6 = \
+@ENABLE_BINFMT_TRUE@am__append_10 = \
 @ENABLE_BINFMT_TRUE@   man/systemd-binfmt.8
 
-@ENABLE_BOOTCHART_TRUE@am__append_7 = \
+@ENABLE_BOOTCHART_TRUE@am__append_11 = \
 @ENABLE_BOOTCHART_TRUE@        man/bootchart.conf.5 \
 @ENABLE_BOOTCHART_TRUE@        man/systemd-bootchart.1
 
-@ENABLE_BOOTCHART_TRUE@am__append_8 = \
+@ENABLE_BOOTCHART_TRUE@am__append_12 = \
 @ENABLE_BOOTCHART_TRUE@        #
 
-@ENABLE_COREDUMP_TRUE@am__append_9 = \
+@ENABLE_COREDUMP_TRUE@am__append_13 = \
 @ENABLE_COREDUMP_TRUE@ man/coredump.conf.5 \
-@ENABLE_COREDUMP_TRUE@ man/coredumpctl.1
+@ENABLE_COREDUMP_TRUE@ man/coredumpctl.1 \
+@ENABLE_COREDUMP_TRUE@ man/systemd-coredump.8
 
-@ENABLE_COREDUMP_TRUE@am__append_10 = \
+@ENABLE_COREDUMP_TRUE@am__append_14 = \
 @ENABLE_COREDUMP_TRUE@ #
 
-@ENABLE_EFI_TRUE@am__append_11 = \
+@ENABLE_EFI_TRUE@am__append_15 = \
 @ENABLE_EFI_TRUE@      man/bootctl.1
 
-@ENABLE_EFI_TRUE@am__append_12 = \
+@ENABLE_EFI_TRUE@am__append_16 = \
 @ENABLE_EFI_TRUE@      #
 
-@ENABLE_HOSTNAMED_TRUE@am__append_13 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_17 = \
 @ENABLE_HOSTNAMED_TRUE@        man/hostnamectl.1 \
 @ENABLE_HOSTNAMED_TRUE@        man/systemd-hostnamed.service.8
 
-@ENABLE_HOSTNAMED_TRUE@am__append_14 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_18 = \
 @ENABLE_HOSTNAMED_TRUE@        man/systemd-hostnamed.8
 
-@ENABLE_KDBUS_TRUE@am__append_15 = \
+@ENABLE_KDBUS_TRUE@am__append_19 = \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_pid.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_new_from_pid.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_error.3 \
@@ -242,17 +258,23 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_open_user.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_path_encode.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_request_name.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_add_child.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_add_defer.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_add_signal.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_event_add_time.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_get_fd.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_event_new.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_set_name.3 \
 @ENABLE_KDBUS_TRUE@    man/systemd-bus-proxyd.8 \
 @ENABLE_KDBUS_TRUE@    man/systemd-bus-proxyd@.service.8
 
-@ENABLE_KDBUS_TRUE@am__append_16 = \
+@ENABLE_KDBUS_TRUE@am__append_20 = \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_audit_login_uid.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_audit_session_id.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_cgroup.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_cmdline.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_comm.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_connection_name.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_exe.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_gid.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_creds_get_mask.3 \
@@ -302,8 +324,13 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_ref.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_release_name.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_bus_unref.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_add_exit.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_add_post.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_event_default.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_get_name.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_event_ref.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_source_get_child_pid.3 \
+@ENABLE_KDBUS_TRUE@    man/sd_event_source_get_signal.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_event_source_get_time.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_event_source_get_time_accuracy.3 \
 @ENABLE_KDBUS_TRUE@    man/sd_event_source_get_time_clock.3 \
@@ -312,124 +339,115 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 @ENABLE_KDBUS_TRUE@    man/sd_event_unref.3 \
 @ENABLE_KDBUS_TRUE@    man/systemd-bus-proxyd.socket.8
 
-@ENABLE_LOCALED_TRUE@am__append_17 = \
+@ENABLE_LOCALED_TRUE@am__append_21 = \
 @ENABLE_LOCALED_TRUE@  man/localectl.1 \
 @ENABLE_LOCALED_TRUE@  man/systemd-localed.service.8
 
-@ENABLE_LOCALED_TRUE@am__append_18 = \
+@ENABLE_LOCALED_TRUE@am__append_22 = \
 @ENABLE_LOCALED_TRUE@  man/systemd-localed.8
 
-@ENABLE_LOGIND_TRUE@am__append_19 = \
+@ENABLE_LOGIND_TRUE@am__append_23 = \
 @ENABLE_LOGIND_TRUE@   man/loginctl.1 \
 @ENABLE_LOGIND_TRUE@   man/logind.conf.5 \
 @ENABLE_LOGIND_TRUE@   man/systemd-logind.service.8
 
-@ENABLE_LOGIND_TRUE@am__append_20 = \
+@ENABLE_LOGIND_TRUE@am__append_24 = \
 @ENABLE_LOGIND_TRUE@   man/systemd-logind.8
 
-@ENABLE_MACHINED_TRUE@am__append_21 = \
+@ENABLE_MACHINED_TRUE@am__append_25 = \
 @ENABLE_MACHINED_TRUE@ man/machinectl.1 \
 @ENABLE_MACHINED_TRUE@ man/systemd-machined.service.8
 
-@ENABLE_MACHINED_TRUE@am__append_22 = \
+@ENABLE_MACHINED_TRUE@am__append_26 = \
 @ENABLE_MACHINED_TRUE@ man/systemd-machined.8
 
-@ENABLE_NETWORKD_TRUE@am__append_23 = \
+@ENABLE_NETWORKD_TRUE@am__append_27 = \
 @ENABLE_NETWORKD_TRUE@ man/systemd-networkd-wait-online.service.8 \
 @ENABLE_NETWORKD_TRUE@ man/systemd-networkd.service.8 \
 @ENABLE_NETWORKD_TRUE@ man/systemd.netdev.5 \
 @ENABLE_NETWORKD_TRUE@ man/systemd.network.5
 
-@ENABLE_NETWORKD_TRUE@am__append_24 = \
+@ENABLE_NETWORKD_TRUE@am__append_28 = \
 @ENABLE_NETWORKD_TRUE@ man/systemd-networkd-wait-online.8 \
 @ENABLE_NETWORKD_TRUE@ man/systemd-networkd.8
 
-@ENABLE_QUOTACHECK_TRUE@am__append_25 = \
+@ENABLE_QUOTACHECK_TRUE@am__append_29 = \
 @ENABLE_QUOTACHECK_TRUE@       man/systemd-quotacheck.service.8
 
-@ENABLE_QUOTACHECK_TRUE@am__append_26 = \
+@ENABLE_QUOTACHECK_TRUE@am__append_30 = \
 @ENABLE_QUOTACHECK_TRUE@       man/systemd-quotacheck.8
 
-@ENABLE_RANDOMSEED_TRUE@am__append_27 = \
+@ENABLE_RANDOMSEED_TRUE@am__append_31 = \
 @ENABLE_RANDOMSEED_TRUE@       man/systemd-random-seed.service.8
 
-@ENABLE_RANDOMSEED_TRUE@am__append_28 = \
+@ENABLE_RANDOMSEED_TRUE@am__append_32 = \
 @ENABLE_RANDOMSEED_TRUE@       man/systemd-random-seed.8
 
-@ENABLE_READAHEAD_TRUE@am__append_29 = \
-@ENABLE_READAHEAD_TRUE@        man/sd-readahead.3 \
-@ENABLE_READAHEAD_TRUE@        man/sd_readahead.3 \
-@ENABLE_READAHEAD_TRUE@        man/systemd-readahead-replay.service.8
-
-@ENABLE_READAHEAD_TRUE@am__append_30 = \
-@ENABLE_READAHEAD_TRUE@        man/systemd-readahead-collect.service.8 \
-@ENABLE_READAHEAD_TRUE@        man/systemd-readahead-done.service.8 \
-@ENABLE_READAHEAD_TRUE@        man/systemd-readahead-done.timer.8 \
-@ENABLE_READAHEAD_TRUE@        man/systemd-readahead.8
-
-@ENABLE_RESOLVED_TRUE@am__append_31 = \
+@ENABLE_RESOLVED_TRUE@am__append_33 = \
 @ENABLE_RESOLVED_TRUE@ man/resolved.conf.5 \
 @ENABLE_RESOLVED_TRUE@ man/systemd-resolved.service.8
 
-@ENABLE_RESOLVED_TRUE@am__append_32 = \
+@ENABLE_RESOLVED_TRUE@am__append_34 = \
 @ENABLE_RESOLVED_TRUE@ man/systemd-resolved.8
 
-@ENABLE_RFKILL_TRUE@am__append_33 = \
+@ENABLE_RFKILL_TRUE@am__append_35 = \
 @ENABLE_RFKILL_TRUE@   man/systemd-rfkill@.service.8
 
-@ENABLE_RFKILL_TRUE@am__append_34 = \
+@ENABLE_RFKILL_TRUE@am__append_36 = \
 @ENABLE_RFKILL_TRUE@   man/systemd-rfkill.8
 
-@ENABLE_TIMEDATED_TRUE@am__append_35 = \
+@ENABLE_TIMEDATED_TRUE@am__append_37 = \
 @ENABLE_TIMEDATED_TRUE@        man/systemd-timedated.service.8 \
 @ENABLE_TIMEDATED_TRUE@        man/timedatectl.1
 
-@ENABLE_TIMEDATED_TRUE@am__append_36 = \
+@ENABLE_TIMEDATED_TRUE@am__append_38 = \
 @ENABLE_TIMEDATED_TRUE@        man/systemd-timedated.8
 
-@ENABLE_TIMESYNCD_TRUE@am__append_37 = \
-@ENABLE_TIMESYNCD_TRUE@        man/systemd-timesyncd.service.8
+@ENABLE_TIMESYNCD_TRUE@am__append_39 = \
+@ENABLE_TIMESYNCD_TRUE@        man/systemd-timesyncd.service.8 \
+@ENABLE_TIMESYNCD_TRUE@        man/timesyncd.conf.5
 
-@ENABLE_TIMESYNCD_TRUE@am__append_38 = \
+@ENABLE_TIMESYNCD_TRUE@am__append_40 = \
 @ENABLE_TIMESYNCD_TRUE@        man/systemd-timesyncd.8
 
-@ENABLE_VCONSOLE_TRUE@am__append_39 = \
+@ENABLE_VCONSOLE_TRUE@am__append_41 = \
 @ENABLE_VCONSOLE_TRUE@ man/systemd-vconsole-setup.service.8 \
 @ENABLE_VCONSOLE_TRUE@ man/vconsole.conf.5
 
-@ENABLE_VCONSOLE_TRUE@am__append_40 = \
+@ENABLE_VCONSOLE_TRUE@am__append_42 = \
 @ENABLE_VCONSOLE_TRUE@ man/systemd-vconsole-setup.8
 
-@HAVE_KMOD_TRUE@am__append_41 = \
+@HAVE_KMOD_TRUE@am__append_43 = \
 @HAVE_KMOD_TRUE@       man/modules-load.d.5 \
 @HAVE_KMOD_TRUE@       man/systemd-modules-load.service.8
 
-@HAVE_KMOD_TRUE@am__append_42 = \
+@HAVE_KMOD_TRUE@am__append_44 = \
 @HAVE_KMOD_TRUE@       man/systemd-modules-load.8
 
-@HAVE_LIBCRYPTSETUP_TRUE@am__append_43 = \
+@HAVE_LIBCRYPTSETUP_TRUE@am__append_45 = \
 @HAVE_LIBCRYPTSETUP_TRUE@      man/crypttab.5 \
 @HAVE_LIBCRYPTSETUP_TRUE@      man/systemd-cryptsetup-generator.8 \
 @HAVE_LIBCRYPTSETUP_TRUE@      man/systemd-cryptsetup@.service.8
 
-@HAVE_LIBCRYPTSETUP_TRUE@am__append_44 = \
+@HAVE_LIBCRYPTSETUP_TRUE@am__append_46 = \
 @HAVE_LIBCRYPTSETUP_TRUE@      man/systemd-cryptsetup.8
 
-@HAVE_MICROHTTPD_TRUE@am__append_45 = \
+@HAVE_MICROHTTPD_TRUE@am__append_47 = \
 @HAVE_MICROHTTPD_TRUE@ man/systemd-journal-gatewayd.service.8 \
-@HAVE_MICROHTTPD_TRUE@ man/systemd-journal-remote.8
+@HAVE_MICROHTTPD_TRUE@ man/systemd-journal-remote.8 \
+@HAVE_MICROHTTPD_TRUE@ man/systemd-journal-upload.8
 
-@HAVE_MICROHTTPD_TRUE@am__append_46 = \
+@HAVE_MICROHTTPD_TRUE@am__append_48 = \
 @HAVE_MICROHTTPD_TRUE@ man/systemd-journal-gatewayd.8 \
 @HAVE_MICROHTTPD_TRUE@ man/systemd-journal-gatewayd.socket.8
 
-@HAVE_MYHOSTNAME_TRUE@am__append_47 = \
+@HAVE_MYHOSTNAME_TRUE@am__append_49 = \
 @HAVE_MYHOSTNAME_TRUE@ man/nss-myhostname.8
 
-@HAVE_MYHOSTNAME_TRUE@am__append_48 = \
+@HAVE_MYHOSTNAME_TRUE@am__append_50 = \
 @HAVE_MYHOSTNAME_TRUE@ #
 
-@HAVE_PAM_TRUE@am__append_49 = \
+@HAVE_PAM_TRUE@am__append_51 = \
 @HAVE_PAM_TRUE@        man/pam_systemd.8 \
 @HAVE_PAM_TRUE@        man/sd-login.3 \
 @HAVE_PAM_TRUE@        man/sd_get_seats.3 \
@@ -440,7 +458,7 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 @HAVE_PAM_TRUE@        man/sd_uid_get_state.3 \
 @HAVE_PAM_TRUE@        man/systemd-user-sessions.service.8
 
-@HAVE_PAM_TRUE@am__append_50 = \
+@HAVE_PAM_TRUE@am__append_52 = \
 @HAVE_PAM_TRUE@        man/sd_get_machine_names.3 \
 @HAVE_PAM_TRUE@        man/sd_get_sessions.3 \
 @HAVE_PAM_TRUE@        man/sd_get_uids.3 \
@@ -466,6 +484,7 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 @HAVE_PAM_TRUE@        man/sd_seat_can_tty.3 \
 @HAVE_PAM_TRUE@        man/sd_seat_get_sessions.3 \
 @HAVE_PAM_TRUE@        man/sd_session_get_class.3 \
+@HAVE_PAM_TRUE@        man/sd_session_get_desktop.3 \
 @HAVE_PAM_TRUE@        man/sd_session_get_display.3 \
 @HAVE_PAM_TRUE@        man/sd_session_get_remote_host.3 \
 @HAVE_PAM_TRUE@        man/sd_session_get_remote_user.3 \
@@ -483,159 +502,214 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 @HAVE_PAM_TRUE@        man/sd_uid_is_on_seat.3 \
 @HAVE_PAM_TRUE@        man/systemd-user-sessions.8
 
-@HAVE_PYTHON_TRUE@am__append_51 = \
+@HAVE_PYTHON_TRUE@am__append_53 = \
 @HAVE_PYTHON_TRUE@     man/systemd.directives.7 \
 @HAVE_PYTHON_TRUE@     man/systemd.index.7
 
-@HAVE_PYTHON_TRUE@am__append_52 = \
+@HAVE_PYTHON_TRUE@am__append_54 = \
 @HAVE_PYTHON_TRUE@     #
 
-@ENABLE_MANPAGES_TRUE@am__append_53 = $(HTML_FILES) $(HTML_ALIAS) \
+@HAVE_UTMP_TRUE@am__append_55 = \
+@HAVE_UTMP_TRUE@       man/runlevel.8 \
+@HAVE_UTMP_TRUE@       man/systemd-update-utmp.service.8
+
+@HAVE_UTMP_TRUE@am__append_56 = \
+@HAVE_UTMP_TRUE@       man/systemd-update-utmp-runlevel.service.8 \
+@HAVE_UTMP_TRUE@       man/systemd-update-utmp.8
+
+@ENABLE_MANPAGES_TRUE@am__append_57 = $(HTML_FILES) $(HTML_ALIAS) \
 @ENABLE_MANPAGES_TRUE@ docs/html/man
-@ENABLE_MANPAGES_TRUE@am__append_54 = $(man_MANS) $(HTML_FILES) \
+@ENABLE_MANPAGES_TRUE@am__append_58 = $(man_MANS) $(HTML_FILES) \
 @ENABLE_MANPAGES_TRUE@ $(HTML_ALIAS) docs/html/man
-@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@am__append_55 = \
+@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@am__append_59 = \
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/index.html
 
-@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@am__append_56 =  \
+@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@am__append_60 =  \
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/index.html \
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/systemd.index.xml \
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/systemd.directives.xml
-@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@am__append_57 = \
+@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@am__append_61 = \
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/systemd.index.xml \
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/index.html \
-@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/systemd.directives.xml
+@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/systemd.directives.xml \
+@ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@       man/glib-event-glue.c
+
+@HAVE_UTMP_TRUE@am__append_62 = \
+@HAVE_UTMP_TRUE@       src/shared/utmp-wtmp.c
+
+
+# -----------------------------------------------------------------------------
+@ENABLE_LDCONFIG_TRUE@am__append_63 = \
+@ENABLE_LDCONFIG_TRUE@ units/ldconfig.service
+
+@ENABLE_LDCONFIG_TRUE@am__append_64 = \
+@ENABLE_LDCONFIG_TRUE@ ldconfig.service
 
 
 # ------------------------------------------------------------------------------
-@HAVE_SECCOMP_TRUE@am__append_58 = \
+@HAVE_SECCOMP_TRUE@am__append_65 = \
 @HAVE_SECCOMP_TRUE@    libsystemd-seccomp.la
 
 
 # ------------------------------------------------------------------------------
-@HAVE_ACL_TRUE@am__append_59 = \
+@HAVE_ACL_TRUE@am__append_66 = \
 @HAVE_ACL_TRUE@        libsystemd-acl.la
 
-@HAVE_KMOD_TRUE@am__append_60 = \
+@HAVE_KMOD_TRUE@am__append_67 = \
 @HAVE_KMOD_TRUE@       src/core/kmod-setup.c \
 @HAVE_KMOD_TRUE@       src/core/kmod-setup.h
 
-@HAVE_SECCOMP_TRUE@am__append_61 = \
+@HAVE_SECCOMP_TRUE@am__append_68 = \
 @HAVE_SECCOMP_TRUE@    libsystemd-seccomp.la
 
-@HAVE_KMOD_TRUE@am__append_62 = \
+@HAVE_KMOD_TRUE@am__append_69 = \
 @HAVE_KMOD_TRUE@       test-rtnl-manual
 
-@ENABLE_EFI_TRUE@am__append_63 = \
+@ENABLE_EFI_TRUE@am__append_70 = \
 @ENABLE_EFI_TRUE@      test-boot-timestamp
 
-@HAVE_KMOD_TRUE@am__append_64 = \
+@HAVE_KMOD_TRUE@am__append_71 = \
 @HAVE_KMOD_TRUE@       systemd-modules-load
 
-@HAVE_KMOD_TRUE@am__append_65 = \
+@HAVE_KMOD_TRUE@am__append_72 = \
 @HAVE_KMOD_TRUE@       units/systemd-modules-load.service
 
-@HAVE_KMOD_TRUE@am__append_66 = \
+@HAVE_KMOD_TRUE@am__append_73 = \
 @HAVE_KMOD_TRUE@       systemd-modules-load.service
 
-@ENABLE_TMPFILES_TRUE@@HAVE_KMOD_TRUE@am__append_67 = \
+@ENABLE_TMPFILES_TRUE@@HAVE_KMOD_TRUE@am__append_74 = \
 @ENABLE_TMPFILES_TRUE@@HAVE_KMOD_TRUE@ units/kmod-static-nodes.service
 
-@ENABLE_TMPFILES_TRUE@@HAVE_KMOD_TRUE@am__append_68 = \
+@ENABLE_TMPFILES_TRUE@@HAVE_KMOD_TRUE@am__append_75 = \
 @ENABLE_TMPFILES_TRUE@@HAVE_KMOD_TRUE@ kmod-static-nodes.service
 
-@ENABLE_TMPFILES_TRUE@am__append_69 = \
+@ENABLE_TMPFILES_TRUE@am__append_76 = \
 @ENABLE_TMPFILES_TRUE@ systemd-tmpfiles
 
-@ENABLE_TMPFILES_TRUE@am__append_70 = \
+@ENABLE_TMPFILES_TRUE@am__append_77 = \
 @ENABLE_TMPFILES_TRUE@ units/systemd-tmpfiles-clean.timer
 
-@ENABLE_TMPFILES_TRUE@am__append_71 = \
+@ENABLE_TMPFILES_TRUE@am__append_78 = \
 @ENABLE_TMPFILES_TRUE@ units/systemd-tmpfiles-setup-dev.service \
 @ENABLE_TMPFILES_TRUE@ units/systemd-tmpfiles-setup.service \
 @ENABLE_TMPFILES_TRUE@ units/systemd-tmpfiles-clean.service
 
-@ENABLE_TMPFILES_TRUE@@HAVE_SYSV_COMPAT_TRUE@am__append_72 = \
+@ENABLE_TMPFILES_TRUE@@HAVE_SYSV_COMPAT_TRUE@am__append_79 = \
 @ENABLE_TMPFILES_TRUE@@HAVE_SYSV_COMPAT_TRUE@  tmpfiles.d/legacy.conf
 
-@ENABLE_TMPFILES_TRUE@am__append_73 = \
+@ENABLE_TMPFILES_TRUE@am__append_80 = \
 @ENABLE_TMPFILES_TRUE@ systemd-tmpfiles-setup-dev.service \
 @ENABLE_TMPFILES_TRUE@ systemd-tmpfiles-setup.service
 
-@ENABLE_TMPFILES_TRUE@am__append_74 = \
+@ENABLE_TMPFILES_TRUE@am__append_81 = \
 @ENABLE_TMPFILES_TRUE@ shell-completion/zsh/_systemd-tmpfiles
 
-@ENABLE_TMPFILES_TRUE@am__append_75 = \
+@ENABLE_TMPFILES_TRUE@am__append_82 = \
 @ENABLE_TMPFILES_TRUE@ systemd-tmpfiles-clean.timer
 
-@ENABLE_TMPFILES_TRUE@am__append_76 = \
+@ENABLE_TMPFILES_TRUE@am__append_83 = \
 @ENABLE_TMPFILES_TRUE@ $(tmpfilesdir) \
 @ENABLE_TMPFILES_TRUE@ $(sysconfdir)/tmpfiles.d
 
-@ENABLE_SYSUSERS_TRUE@am__append_77 = \
+@ENABLE_SYSUSERS_TRUE@am__append_84 = \
 @ENABLE_SYSUSERS_TRUE@ systemd-sysusers
 
-@ENABLE_SYSUSERS_TRUE@am__append_78 = \
+@ENABLE_SYSUSERS_TRUE@am__append_85 = \
 @ENABLE_SYSUSERS_TRUE@ units/systemd-sysusers.service
 
-@ENABLE_SYSUSERS_TRUE@am__append_79 = \
+@ENABLE_SYSUSERS_TRUE@am__append_86 = \
 @ENABLE_SYSUSERS_TRUE@ systemd-sysusers.service
 
-@ENABLE_SYSUSERS_TRUE@am__append_80 = \
+@ENABLE_SYSUSERS_TRUE@am__append_87 = \
 @ENABLE_SYSUSERS_TRUE@ units/systemd-sysusers.service.in \
 @ENABLE_SYSUSERS_TRUE@ sysusers.d/basic.conf.in
 
-@ENABLE_SYSUSERS_TRUE@am__append_81 = \
+@ENABLE_SYSUSERS_TRUE@am__append_88 = \
 @ENABLE_SYSUSERS_TRUE@ sysusers.d/basic.conf
 
-@ENABLE_SYSUSERS_TRUE@am__append_82 = \
+@ENABLE_SYSUSERS_TRUE@am__append_89 = \
 @ENABLE_SYSUSERS_TRUE@ $(sysusersdir)
 
+@ENABLE_FIRSTBOOT_TRUE@am__append_90 = \
+@ENABLE_FIRSTBOOT_TRUE@        systemd-firstboot
+
+@ENABLE_FIRSTBOOT_TRUE@am__append_91 = \
+@ENABLE_FIRSTBOOT_TRUE@        units/systemd-firstboot.service
+
+@ENABLE_FIRSTBOOT_TRUE@am__append_92 = \
+@ENABLE_FIRSTBOOT_TRUE@        units/systemd-firstboot.service.in
+
+@ENABLE_FIRSTBOOT_TRUE@am__append_93 = \
+@ENABLE_FIRSTBOOT_TRUE@        systemd-firstboot.service
+
+
+# ------------------------------------------------------------------------------
+@ENABLE_HIBERNATE_TRUE@am__append_94 = \
+@ENABLE_HIBERNATE_TRUE@        systemd-hibernate-resume-generator
+
+@ENABLE_HIBERNATE_TRUE@am__append_95 = \
+@ENABLE_HIBERNATE_TRUE@        systemd-hibernate-resume
+
+@ENABLE_HIBERNATE_TRUE@am__append_96 = \
+@ENABLE_HIBERNATE_TRUE@        units/systemd-hibernate.service.in \
+@ENABLE_HIBERNATE_TRUE@        units/systemd-hibernate-resume@.service.in \
+@ENABLE_HIBERNATE_TRUE@        units/systemd-hybrid-sleep.service.in
+
+@ENABLE_HIBERNATE_TRUE@am__append_97 = \
+@ENABLE_HIBERNATE_TRUE@        units/hibernate.target \
+@ENABLE_HIBERNATE_TRUE@        units/hybrid-sleep.target
+
+@ENABLE_HIBERNATE_TRUE@am__append_98 = \
+@ENABLE_HIBERNATE_TRUE@        units/systemd-hibernate.service \
+@ENABLE_HIBERNATE_TRUE@        units/systemd-hibernate-resume@.service \
+@ENABLE_HIBERNATE_TRUE@        units/systemd-hybrid-sleep.service
+
 
 # ------------------------------------------------------------------------------
-@ENABLE_EFI_TRUE@am__append_83 = \
+@ENABLE_EFI_TRUE@am__append_99 = \
 @ENABLE_EFI_TRUE@      systemd-efi-boot-generator
 
-@ENABLE_EFI_TRUE@am__append_84 = \
+@ENABLE_EFI_TRUE@am__append_100 = \
 @ENABLE_EFI_TRUE@      bootctl
 
-@ENABLE_EFI_TRUE@am__append_85 = \
+@ENABLE_EFI_TRUE@am__append_101 = \
 @ENABLE_EFI_TRUE@      shell-completion/bash/bootctl
 
-@ENABLE_EFI_TRUE@am__append_86 = \
+@ENABLE_EFI_TRUE@am__append_102 = \
 @ENABLE_EFI_TRUE@      shell-completion/zsh/_bootctl
 
 
 # ------------------------------------------------------------------------------
-@HAVE_BLKID_TRUE@am__append_87 = \
+@HAVE_BLKID_TRUE@am__append_103 = \
 @HAVE_BLKID_TRUE@      systemd-gpt-auto-generator
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_KDBUS_TRUE@am__append_88 = \
+@ENABLE_KDBUS_TRUE@am__append_104 = \
 @ENABLE_KDBUS_TRUE@    systemd-dbus1-generator
 
-@ENABLE_KDBUS_TRUE@am__append_89 = dbus1-generator-install-hook
-@ENABLE_KDBUS_TRUE@am__append_90 = dbus1-generator-uninstall-hook
-@HAVE_SECCOMP_TRUE@am__append_91 = \
+@ENABLE_KDBUS_TRUE@am__append_105 = dbus1-generator-install-hook
+@ENABLE_KDBUS_TRUE@am__append_106 = dbus1-generator-uninstall-hook
+@HAVE_SECCOMP_TRUE@am__append_107 = \
 @HAVE_SECCOMP_TRUE@    libsystemd-seccomp.la \
 @HAVE_SECCOMP_TRUE@    $(SECCOMP_LIBS)
 
-@ENABLE_KDBUS_TRUE@am__append_92 = \
+@ENABLE_KDBUS_TRUE@am__append_108 = \
 @ENABLE_KDBUS_TRUE@    units/systemd-bus-proxyd@.service
 
-@ENABLE_KDBUS_TRUE@am__append_93 = \
+@ENABLE_KDBUS_TRUE@am__append_109 = \
 @ENABLE_KDBUS_TRUE@    units/systemd-bus-proxyd.socket
 
-@ENABLE_KDBUS_TRUE@am__append_94 = \
-@ENABLE_KDBUS_TRUE@    units/user/systemd-bus-proxyd.socket \
+@ENABLE_KDBUS_TRUE@am__append_110 = \
 @ENABLE_KDBUS_TRUE@    units/user/systemd-bus-proxyd@.service
 
-@ENABLE_KDBUS_TRUE@am__append_95 = \
+@ENABLE_KDBUS_TRUE@am__append_111 = \
+@ENABLE_KDBUS_TRUE@    units/user/systemd-bus-proxyd.socket
+
+@ENABLE_KDBUS_TRUE@am__append_112 = \
 @ENABLE_KDBUS_TRUE@    src/systemd/sd-bus.h \
 @ENABLE_KDBUS_TRUE@    src/systemd/sd-bus-protocol.h \
 @ENABLE_KDBUS_TRUE@    src/systemd/sd-bus-vtable.h \
-@ENABLE_KDBUS_TRUE@    src/systemd/sd-memfd.h \
 @ENABLE_KDBUS_TRUE@    src/systemd/sd-utf8.h \
 @ENABLE_KDBUS_TRUE@    src/systemd/sd-event.h \
 @ENABLE_KDBUS_TRUE@    src/systemd/sd-rtnl.h \
@@ -644,605 +718,664 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_GTK_DOC_TRUE@am__append_96 = \
+@ENABLE_TERMINAL_TRUE@am__append_113 = \
+@ENABLE_TERMINAL_TRUE@ libsystemd-terminal.la
+
+@ENABLE_TERMINAL_TRUE@am__append_114 = \
+@ENABLE_TERMINAL_TRUE@ systemd-consoled
+
+@ENABLE_TERMINAL_TRUE@am__append_115 = \
+@ENABLE_TERMINAL_TRUE@ systemd-evcat \
+@ENABLE_TERMINAL_TRUE@ systemd-modeset \
+@ENABLE_TERMINAL_TRUE@ systemd-subterm
+
+@ENABLE_TERMINAL_TRUE@am__append_116 = \
+@ENABLE_TERMINAL_TRUE@ src/libsystemd-terminal/unifont-glyph-array.bin
+
+@ENABLE_TERMINAL_TRUE@am__append_117 = \
+@ENABLE_TERMINAL_TRUE@ units/user/systemd-consoled.service
+
+@ENABLE_TERMINAL_TRUE@am__append_118 = \
+@ENABLE_TERMINAL_TRUE@ systemd-consoled.service
+
+@ENABLE_TERMINAL_TRUE@am__append_119 = \
+@ENABLE_TERMINAL_TRUE@ units/user/systemd-consoled.service.in
+
+@ENABLE_TERMINAL_TRUE@am__append_120 = \
+@ENABLE_TERMINAL_TRUE@ test-term-page \
+@ENABLE_TERMINAL_TRUE@ test-term-parser \
+@ENABLE_TERMINAL_TRUE@ test-unifont
+
+
+# ------------------------------------------------------------------------------
+@ENABLE_GTK_DOC_TRUE@am__append_121 = \
 @ENABLE_GTK_DOC_TRUE@  docs/libudev
 
-@ENABLE_GTK_DOC_TRUE@am__append_97 = \
+@ENABLE_GTK_DOC_TRUE@am__append_122 = \
 @ENABLE_GTK_DOC_TRUE@  docs/html/libudev \
 @ENABLE_GTK_DOC_TRUE@  docs/html/gudev
 
-@ENABLE_FIRMWARE_TRUE@am__append_98 = \
-@ENABLE_FIRMWARE_TRUE@ src/udev/udev-builtin-firmware.c
-
-@ENABLE_FIRMWARE_TRUE@am__append_99 = \
-@ENABLE_FIRMWARE_TRUE@ rules/50-firmware.rules
-
-@HAVE_KMOD_TRUE@am__append_100 = \
+@HAVE_KMOD_TRUE@am__append_123 = \
 @HAVE_KMOD_TRUE@       src/udev/udev-builtin-kmod.c
 
-@HAVE_KMOD_TRUE@am__append_101 = \
+@HAVE_KMOD_TRUE@am__append_124 = \
 @HAVE_KMOD_TRUE@       rules/80-drivers.rules
 
-@HAVE_BLKID_TRUE@am__append_102 = \
+@HAVE_BLKID_TRUE@am__append_125 = \
 @HAVE_BLKID_TRUE@      src/udev/udev-builtin-blkid.c
 
-@HAVE_ACL_TRUE@am__append_103 = \
+@HAVE_ACL_TRUE@am__append_126 = \
 @HAVE_ACL_TRUE@        src/udev/udev-builtin-uaccess.c \
 @HAVE_ACL_TRUE@        src/login/logind-acl.c \
 @HAVE_ACL_TRUE@        src/libsystemd/sd-login/sd-login.c \
 @HAVE_ACL_TRUE@        src/systemd/sd-login.h
 
-@HAVE_ACL_TRUE@am__append_104 = \
+@HAVE_ACL_TRUE@am__append_127 = \
 @HAVE_ACL_TRUE@        libsystemd-acl.la
 
-@HAVE_ACL_TRUE@am__append_105 = \
+@HAVE_ACL_TRUE@am__append_128 = \
 @HAVE_ACL_TRUE@        libsystemd-acl.la
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_GTK_DOC_TRUE@@ENABLE_GUDEV_TRUE@am__append_106 = \
+@ENABLE_GTK_DOC_TRUE@@ENABLE_GUDEV_TRUE@am__append_129 = \
 @ENABLE_GTK_DOC_TRUE@@ENABLE_GUDEV_TRUE@       docs/gudev
 
-@ENABLE_GUDEV_TRUE@am__append_107 = libgudev-1.0.la
-@ENABLE_GUDEV_TRUE@am__append_108 = \
+@ENABLE_GUDEV_TRUE@am__append_130 = libgudev-1.0.la
+@ENABLE_GUDEV_TRUE@am__append_131 = \
 @ENABLE_GUDEV_TRUE@    src/gudev/gudev-1.0.pc
 
-@ENABLE_GUDEV_TRUE@am__append_109 = \
+@ENABLE_GUDEV_TRUE@am__append_132 = \
 @ENABLE_GUDEV_TRUE@    src/gudev/gudev-1.0.pc
 
-@ENABLE_GUDEV_TRUE@am__append_110 = \
+@ENABLE_GUDEV_TRUE@am__append_133 = \
 @ENABLE_GUDEV_TRUE@    $(nodist_libgudev_1_0_la_SOURCES)
 
-@ENABLE_GUDEV_TRUE@@HAVE_INTROSPECTION_TRUE@am__append_111 = $(gir_DATA) $(typelibs_DATA)
-@ENABLE_GUDEV_TRUE@am__append_112 = libgudev-install-hook
-@ENABLE_GUDEV_TRUE@am__append_113 = libgudev-uninstall-hook
-@HAVE_MICROHTTPD_TRUE@am__append_114 = \
+@ENABLE_GUDEV_TRUE@@HAVE_INTROSPECTION_TRUE@am__append_134 = $(gir_DATA) $(typelibs_DATA)
+@HAVE_MICROHTTPD_TRUE@am__append_135 = \
 @HAVE_MICROHTTPD_TRUE@ systemd-journal-remote
 
-@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_115 = \
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_136 = \
 @HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       $(GNUTLS_LIBS)
 
-@HAVE_ACL_TRUE@am__append_116 = \
+
+# systemd-journal-remote make sense mostly with full crypto stack
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_137 = \
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       units/systemd-journal-remote.socket
+
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_138 = \
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       units/systemd-journal-remote.service
+
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_139 = \
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       units/systemd-journal-remote.service.in
+
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_140 = journal-remote-install-hook
+@HAVE_MICROHTTPD_TRUE@am__append_141 = \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote.conf
+
+@HAVE_MICROHTTPD_TRUE@am__append_142 = \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote.conf.in
+
+@HAVE_MICROHTTPD_TRUE@am__append_143 = \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote.conf
+
+@HAVE_LIBCURL_TRUE@am__append_144 = \
+@HAVE_LIBCURL_TRUE@    systemd-journal-upload
+
+@HAVE_LIBCURL_TRUE@am__append_145 = \
+@HAVE_LIBCURL_TRUE@    units/systemd-journal-upload.service
+
+@HAVE_LIBCURL_TRUE@am__append_146 =  \
+@HAVE_LIBCURL_TRUE@    units/systemd-journal-upload.service.in \
+@HAVE_LIBCURL_TRUE@    src/journal-remote/journal-upload.conf.in
+@HAVE_LIBCURL_TRUE@am__append_147 = \
+@HAVE_LIBCURL_TRUE@    src/journal-remote/journal-upload.conf
+
+@HAVE_LIBCURL_TRUE@am__append_148 = \
+@HAVE_LIBCURL_TRUE@    src/journal-remote/journal-upload.conf
+
+@HAVE_ACL_TRUE@am__append_149 = \
 @HAVE_ACL_TRUE@        libsystemd-acl.la
 
-@HAVE_QRENCODE_TRUE@am__append_117 = \
+@HAVE_QRENCODE_TRUE@am__append_150 = \
 @HAVE_QRENCODE_TRUE@   src/journal/journal-qrcode.c \
 @HAVE_QRENCODE_TRUE@   src/journal/journal-qrcode.h
 
-@HAVE_QRENCODE_TRUE@am__append_118 = \
+@HAVE_QRENCODE_TRUE@am__append_151 = \
 @HAVE_QRENCODE_TRUE@   $(QRENCODE_CFLAGS)
 
-@HAVE_QRENCODE_TRUE@am__append_119 = \
+@HAVE_QRENCODE_TRUE@am__append_152 = \
 @HAVE_QRENCODE_TRUE@   $(QRENCODE_LIBS)
 
-@HAVE_ACL_TRUE@am__append_120 = \
+@HAVE_ACL_TRUE@am__append_153 = \
 @HAVE_ACL_TRUE@        libsystemd-acl.la
 
-@HAVE_XZ_TRUE@am__append_121 = test-compress
-@HAVE_XZ_TRUE@am__append_122 = \
-@HAVE_XZ_TRUE@ src/journal/compress.c
+@HAVE_COMPRESSION_TRUE@am__append_154 = \
+@HAVE_COMPRESSION_TRUE@        test-compress \
+@HAVE_COMPRESSION_TRUE@        test-compress-benchmark
 
-@HAVE_XZ_TRUE@am__append_123 = \
+@HAVE_XZ_TRUE@am__append_155 = \
 @HAVE_XZ_TRUE@ $(XZ_CFLAGS)
 
-@HAVE_XZ_TRUE@am__append_124 = \
+@HAVE_XZ_TRUE@am__append_156 = \
 @HAVE_XZ_TRUE@ $(XZ_LIBS)
 
-@HAVE_GCRYPT_TRUE@am__append_125 = \
+@HAVE_LZ4_TRUE@am__append_157 = \
+@HAVE_LZ4_TRUE@        -llz4
+
+@HAVE_GCRYPT_TRUE@am__append_158 = \
 @HAVE_GCRYPT_TRUE@     src/journal/journal-authenticate.c \
 @HAVE_GCRYPT_TRUE@     src/journal/journal-authenticate.h \
 @HAVE_GCRYPT_TRUE@     src/journal/fsprg.c \
 @HAVE_GCRYPT_TRUE@     src/journal/fsprg.h
 
-@HAVE_GCRYPT_TRUE@am__append_126 = \
+@HAVE_GCRYPT_TRUE@am__append_159 = \
 @HAVE_GCRYPT_TRUE@     $(GCRYPT_LIBS)
 
 
 # fsprg.c is a drop-in file using void pointer arithmetic
-@HAVE_GCRYPT_TRUE@am__append_127 = \
+@HAVE_GCRYPT_TRUE@am__append_160 = \
 @HAVE_GCRYPT_TRUE@     $(GCRYPT_CFLAGS) \
 @HAVE_GCRYPT_TRUE@     -Wno-pointer-arith
 
-@HAVE_MICROHTTPD_TRUE@am__append_128 = \
+@HAVE_MICROHTTPD_TRUE@am__append_161 = \
 @HAVE_MICROHTTPD_TRUE@ systemd-journal-gatewayd
 
-@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_129 = \
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__append_162 = \
 @HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       $(GNUTLS_LIBS)
 
-@HAVE_MICROHTTPD_TRUE@am__append_130 = \
+@HAVE_MICROHTTPD_TRUE@am__append_163 = \
 @HAVE_MICROHTTPD_TRUE@ units/systemd-journal-gatewayd.socket
 
-@HAVE_MICROHTTPD_TRUE@am__append_131 = \
+@HAVE_MICROHTTPD_TRUE@am__append_164 = \
 @HAVE_MICROHTTPD_TRUE@ units/systemd-journal-gatewayd.service
 
-@ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@am__append_132 = \
+@ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@am__append_165 = \
 @ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@     src/journal/stacktrace.c \
 @ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@     src/journal/stacktrace.h
 
-@ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@am__append_133 = \
+@ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@am__append_166 = \
 @ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@     $(ELFUTILS_LIBS)
 
-@ENABLE_COREDUMP_TRUE@am__append_134 = \
+@ENABLE_COREDUMP_TRUE@am__append_167 = \
 @ENABLE_COREDUMP_TRUE@ systemd-coredump
 
-@ENABLE_COREDUMP_TRUE@am__append_135 = \
+@ENABLE_COREDUMP_TRUE@am__append_168 = \
 @ENABLE_COREDUMP_TRUE@ src/journal/coredump.conf
 
-@ENABLE_COREDUMP_TRUE@@HAVE_ACL_TRUE@am__append_136 = \
+@ENABLE_COREDUMP_TRUE@@HAVE_ACL_TRUE@am__append_169 = \
 @ENABLE_COREDUMP_TRUE@@HAVE_ACL_TRUE@  libsystemd-acl.la
 
-@ENABLE_COREDUMP_TRUE@am__append_137 = \
+@ENABLE_COREDUMP_TRUE@am__append_170 = \
 @ENABLE_COREDUMP_TRUE@ coredumpctl
 
-@ENABLE_COREDUMP_TRUE@am__append_138 = \
+@ENABLE_COREDUMP_TRUE@am__append_171 = \
 @ENABLE_COREDUMP_TRUE@ test-coredump-vacuum
 
-@ENABLE_COREDUMP_TRUE@am__append_139 = \
+@ENABLE_COREDUMP_TRUE@am__append_172 = \
 @ENABLE_COREDUMP_TRUE@ shell-completion/bash/coredumpctl
 
-@ENABLE_COREDUMP_TRUE@am__append_140 = \
+@ENABLE_COREDUMP_TRUE@am__append_173 = \
 @ENABLE_COREDUMP_TRUE@ shell-completion/zsh/_coredumpctl
 
-@ENABLE_COREDUMP_TRUE@am__append_141 = \
-@ENABLE_COREDUMP_TRUE@ $(bindir)/coredumpctl $(bindir)/systemd-coredumpctl
-
-@ENABLE_COREDUMP_TRUE@am__append_142 = \
+@ENABLE_COREDUMP_TRUE@am__append_174 = \
 @ENABLE_COREDUMP_TRUE@ sysctl.d/50-coredump.conf
 
-@ENABLE_BINFMT_TRUE@am__append_143 = \
+@ENABLE_BINFMT_TRUE@am__append_175 = \
 @ENABLE_BINFMT_TRUE@   systemd-binfmt
 
-@ENABLE_BINFMT_TRUE@am__append_144 = \
+@ENABLE_BINFMT_TRUE@am__append_176 = \
 @ENABLE_BINFMT_TRUE@   units/proc-sys-fs-binfmt_misc.automount \
 @ENABLE_BINFMT_TRUE@   units/proc-sys-fs-binfmt_misc.mount
 
-@ENABLE_BINFMT_TRUE@am__append_145 = \
+@ENABLE_BINFMT_TRUE@am__append_177 = \
 @ENABLE_BINFMT_TRUE@   units/systemd-binfmt.service
 
-@ENABLE_BINFMT_TRUE@am__append_146 = \
+@ENABLE_BINFMT_TRUE@am__append_178 = \
 @ENABLE_BINFMT_TRUE@   $(prefix)/lib/binfmt.d \
 @ENABLE_BINFMT_TRUE@   $(sysconfdir)/binfmt.d
 
-@ENABLE_BINFMT_TRUE@am__append_147 = \
+@ENABLE_BINFMT_TRUE@am__append_179 = \
 @ENABLE_BINFMT_TRUE@   systemd-binfmt.service \
 @ENABLE_BINFMT_TRUE@   proc-sys-fs-binfmt_misc.automount
 
-@ENABLE_VCONSOLE_TRUE@am__append_148 = \
+@ENABLE_VCONSOLE_TRUE@am__append_180 = \
 @ENABLE_VCONSOLE_TRUE@ systemd-vconsole-setup
 
-@ENABLE_VCONSOLE_TRUE@am__append_149 = \
+@ENABLE_VCONSOLE_TRUE@am__append_181 = \
 @ENABLE_VCONSOLE_TRUE@ units/systemd-vconsole-setup.service
 
-@ENABLE_VCONSOLE_TRUE@am__append_150 = \
+@ENABLE_VCONSOLE_TRUE@am__append_182 = \
 @ENABLE_VCONSOLE_TRUE@ systemd-vconsole-setup.service
 
-@ENABLE_READAHEAD_TRUE@am__append_151 = \
-@ENABLE_READAHEAD_TRUE@        src/readahead/sd-readahead.c \
-@ENABLE_READAHEAD_TRUE@        src/systemd/sd-readahead.h
-
-@ENABLE_READAHEAD_TRUE@am__append_152 = \
-@ENABLE_READAHEAD_TRUE@        systemd-readahead
-
-@ENABLE_READAHEAD_TRUE@am__append_153 = \
-@ENABLE_READAHEAD_TRUE@        units/systemd-readahead-drop.service \
-@ENABLE_READAHEAD_TRUE@        units/systemd-readahead-done.timer
-
-@ENABLE_READAHEAD_TRUE@am__append_154 = \
-@ENABLE_READAHEAD_TRUE@        units/systemd-readahead-collect.service \
-@ENABLE_READAHEAD_TRUE@        units/systemd-readahead-replay.service \
-@ENABLE_READAHEAD_TRUE@        units/systemd-readahead-done.service
-
-@ENABLE_READAHEAD_TRUE@am__append_155 = \
-@ENABLE_READAHEAD_TRUE@        test-ssd
-
-@ENABLE_BOOTCHART_TRUE@am__append_156 = \
+@ENABLE_BOOTCHART_TRUE@am__append_183 = \
 @ENABLE_BOOTCHART_TRUE@        systemd-bootchart
 
-@ENABLE_BOOTCHART_TRUE@am__append_157 = \
+@ENABLE_BOOTCHART_TRUE@am__append_184 = \
 @ENABLE_BOOTCHART_TRUE@        src/bootchart/bootchart.conf
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_QUOTACHECK_TRUE@am__append_158 = \
+@ENABLE_QUOTACHECK_TRUE@am__append_185 = \
 @ENABLE_QUOTACHECK_TRUE@       systemd-quotacheck
 
-@ENABLE_QUOTACHECK_TRUE@am__append_159 = \
+@ENABLE_QUOTACHECK_TRUE@am__append_186 = \
 @ENABLE_QUOTACHECK_TRUE@       units/systemd-quotacheck.service
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_RANDOMSEED_TRUE@am__append_160 = \
+@ENABLE_RANDOMSEED_TRUE@am__append_187 = \
 @ENABLE_RANDOMSEED_TRUE@       systemd-random-seed
 
-@ENABLE_RANDOMSEED_TRUE@am__append_161 = \
+@ENABLE_RANDOMSEED_TRUE@am__append_188 = \
 @ENABLE_RANDOMSEED_TRUE@       units/systemd-random-seed.service
 
-@ENABLE_RANDOMSEED_TRUE@am__append_162 = \
+@ENABLE_RANDOMSEED_TRUE@am__append_189 = \
 @ENABLE_RANDOMSEED_TRUE@       systemd-random-seed.service
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_BACKLIGHT_TRUE@am__append_163 = \
+@ENABLE_BACKLIGHT_TRUE@am__append_190 = \
 @ENABLE_BACKLIGHT_TRUE@        systemd-backlight
 
-@ENABLE_BACKLIGHT_TRUE@am__append_164 = \
+@ENABLE_BACKLIGHT_TRUE@am__append_191 = \
 @ENABLE_BACKLIGHT_TRUE@        units/systemd-backlight@.service
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_RFKILL_TRUE@am__append_165 = \
+@ENABLE_RFKILL_TRUE@am__append_192 = \
 @ENABLE_RFKILL_TRUE@   systemd-rfkill
 
-@ENABLE_RFKILL_TRUE@am__append_166 = \
+@ENABLE_RFKILL_TRUE@am__append_193 = \
 @ENABLE_RFKILL_TRUE@   units/systemd-rfkill@.service
 
 
 # ------------------------------------------------------------------------------
-@HAVE_LIBCRYPTSETUP_TRUE@am__append_167 = \
+@HAVE_LIBCRYPTSETUP_TRUE@am__append_194 = \
 @HAVE_LIBCRYPTSETUP_TRUE@      systemd-cryptsetup
 
-@HAVE_LIBCRYPTSETUP_TRUE@am__append_168 = \
+@HAVE_LIBCRYPTSETUP_TRUE@am__append_195 = \
 @HAVE_LIBCRYPTSETUP_TRUE@      systemd-cryptsetup-generator
 
-@HAVE_LIBCRYPTSETUP_TRUE@am__append_169 = \
+@HAVE_LIBCRYPTSETUP_TRUE@am__append_196 = \
 @HAVE_LIBCRYPTSETUP_TRUE@      units/cryptsetup.target \
 @HAVE_LIBCRYPTSETUP_TRUE@      units/cryptsetup-pre.target
 
-@HAVE_LIBCRYPTSETUP_TRUE@am__append_170 = \
+@HAVE_LIBCRYPTSETUP_TRUE@am__append_197 = \
 @HAVE_LIBCRYPTSETUP_TRUE@      cryptsetup.target
 
-@ENABLE_HOSTNAMED_TRUE@am__append_171 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_198 = \
 @ENABLE_HOSTNAMED_TRUE@        systemd-hostnamed
 
-@ENABLE_HOSTNAMED_TRUE@am__append_172 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_199 = \
 @ENABLE_HOSTNAMED_TRUE@        units/systemd-hostnamed.service
 
-@ENABLE_HOSTNAMED_TRUE@am__append_173 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_200 = \
 @ENABLE_HOSTNAMED_TRUE@        units/org.freedesktop.hostname1.busname
 
-@ENABLE_HOSTNAMED_TRUE@am__append_174 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_201 = \
 @ENABLE_HOSTNAMED_TRUE@        src/hostname/org.freedesktop.hostname1.conf
 
-@ENABLE_HOSTNAMED_TRUE@am__append_175 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_202 = \
 @ENABLE_HOSTNAMED_TRUE@        src/hostname/org.freedesktop.hostname1.service
 
-@ENABLE_HOSTNAMED_TRUE@am__append_176 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_203 = \
 @ENABLE_HOSTNAMED_TRUE@        src/hostname/org.freedesktop.hostname1.policy
 
-@ENABLE_HOSTNAMED_TRUE@am__append_177 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_204 = \
 @ENABLE_HOSTNAMED_TRUE@        systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
 
-@ENABLE_HOSTNAMED_TRUE@am__append_178 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_205 = \
 @ENABLE_HOSTNAMED_TRUE@        org.freedesktop.hostname1.busname
 
-@ENABLE_HOSTNAMED_TRUE@am__append_179 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_206 = \
 @ENABLE_HOSTNAMED_TRUE@        hostnamectl
 
-@ENABLE_HOSTNAMED_TRUE@am__append_180 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_207 = \
 @ENABLE_HOSTNAMED_TRUE@        shell-completion/bash/hostnamectl
 
-@ENABLE_HOSTNAMED_TRUE@am__append_181 = \
+@ENABLE_HOSTNAMED_TRUE@am__append_208 = \
 @ENABLE_HOSTNAMED_TRUE@        shell-completion/zsh/_hostnamectl
 
-
-# ------------------------------------------------------------------------------
-@ENABLE_KDBUS_TRUE@am__append_182 = \
-@ENABLE_KDBUS_TRUE@    units/org.freedesktop.systemd1.busname
-
-@ENABLE_KDBUS_TRUE@am__append_183 = \
-@ENABLE_KDBUS_TRUE@    org.freedesktop.systemd1.busname
-
-@ENABLE_LOCALED_TRUE@am__append_184 = \
+@ENABLE_LOCALED_TRUE@am__append_209 = \
 @ENABLE_LOCALED_TRUE@  units/systemd-localed.service
 
-@ENABLE_LOCALED_TRUE@am__append_185 = \
+@ENABLE_LOCALED_TRUE@am__append_210 = \
 @ENABLE_LOCALED_TRUE@  units/org.freedesktop.locale1.busname
 
-@ENABLE_LOCALED_TRUE@am__append_186 = \
+@ENABLE_LOCALED_TRUE@am__append_211 = \
 @ENABLE_LOCALED_TRUE@  systemd-localed
 
-@ENABLE_LOCALED_TRUE@am__append_187 = \
+@ENABLE_LOCALED_TRUE@am__append_212 = \
 @ENABLE_LOCALED_TRUE@  src/locale/org.freedesktop.locale1.conf
 
-@ENABLE_LOCALED_TRUE@am__append_188 = \
+@ENABLE_LOCALED_TRUE@am__append_213 = \
 @ENABLE_LOCALED_TRUE@  src/locale/org.freedesktop.locale1.service
 
-@ENABLE_LOCALED_TRUE@am__append_189 = \
+@ENABLE_LOCALED_TRUE@am__append_214 = \
 @ENABLE_LOCALED_TRUE@  src/locale/org.freedesktop.locale1.policy
 
-@ENABLE_LOCALED_TRUE@am__append_190 = \
+@ENABLE_LOCALED_TRUE@am__append_215 = \
 @ENABLE_LOCALED_TRUE@  systemd-localed.service dbus-org.freedesktop.locale1.service
 
-@ENABLE_LOCALED_TRUE@am__append_191 = \
+@ENABLE_LOCALED_TRUE@am__append_216 = \
 @ENABLE_LOCALED_TRUE@  org.freedesktop.locale1.busname
 
-@ENABLE_LOCALED_TRUE@am__append_192 = \
+@ENABLE_LOCALED_TRUE@am__append_217 = \
 @ENABLE_LOCALED_TRUE@  src/locale/kbd-model-map
 
-@ENABLE_LOCALED_TRUE@am__append_193 = \
+@ENABLE_LOCALED_TRUE@am__append_218 = \
 @ENABLE_LOCALED_TRUE@  localectl
 
-@ENABLE_LOCALED_TRUE@am__append_194 = \
+@ENABLE_LOCALED_TRUE@am__append_219 = \
 @ENABLE_LOCALED_TRUE@  shell-completion/bash/localectl
 
-@ENABLE_LOCALED_TRUE@am__append_195 = \
+@ENABLE_LOCALED_TRUE@am__append_220 = \
 @ENABLE_LOCALED_TRUE@  shell-completion/zsh/_localectl
 
-@ENABLE_TIMEDATED_TRUE@am__append_196 = \
+@ENABLE_TIMEDATED_TRUE@am__append_221 = \
 @ENABLE_TIMEDATED_TRUE@        systemd-timedated
 
-@ENABLE_TIMEDATED_TRUE@am__append_197 = \
+@ENABLE_TIMEDATED_TRUE@am__append_222 = \
 @ENABLE_TIMEDATED_TRUE@        src/timedate/org.freedesktop.timedate1.service
 
-@ENABLE_TIMEDATED_TRUE@am__append_198 = \
+@ENABLE_TIMEDATED_TRUE@am__append_223 = \
 @ENABLE_TIMEDATED_TRUE@        src/timedate/org.freedesktop.timedate1.conf
 
-@ENABLE_TIMEDATED_TRUE@am__append_199 = \
+@ENABLE_TIMEDATED_TRUE@am__append_224 = \
 @ENABLE_TIMEDATED_TRUE@        units/systemd-timedated.service
 
-@ENABLE_TIMEDATED_TRUE@am__append_200 = \
+@ENABLE_TIMEDATED_TRUE@am__append_225 = \
 @ENABLE_TIMEDATED_TRUE@        units/org.freedesktop.timedate1.busname
 
-@ENABLE_TIMEDATED_TRUE@am__append_201 = \
+@ENABLE_TIMEDATED_TRUE@am__append_226 = \
 @ENABLE_TIMEDATED_TRUE@        src/timedate/org.freedesktop.timedate1.policy
 
-@ENABLE_TIMEDATED_TRUE@am__append_202 = \
-@ENABLE_TIMEDATED_TRUE@        $(prefix)/lib/systemd/ntp-units.d \
-@ENABLE_TIMEDATED_TRUE@        $(sysconfdir)/systemd/ntp-units.d
-
-@ENABLE_TIMEDATED_TRUE@am__append_203 = \
+@ENABLE_TIMEDATED_TRUE@am__append_227 = \
 @ENABLE_TIMEDATED_TRUE@        systemd-timedated.service dbus-org.freedesktop.timedate1.service
 
-@ENABLE_TIMEDATED_TRUE@am__append_204 = \
+@ENABLE_TIMEDATED_TRUE@am__append_228 = \
 @ENABLE_TIMEDATED_TRUE@        org.freedesktop.timedate1.busname
 
-@ENABLE_TIMEDATED_TRUE@am__append_205 = \
+@ENABLE_TIMEDATED_TRUE@am__append_229 = \
 @ENABLE_TIMEDATED_TRUE@        timedatectl
 
-@ENABLE_TIMEDATED_TRUE@am__append_206 = \
+@ENABLE_TIMEDATED_TRUE@am__append_230 = \
 @ENABLE_TIMEDATED_TRUE@        shell-completion/bash/timedatectl
 
-@ENABLE_TIMEDATED_TRUE@am__append_207 = \
+@ENABLE_TIMEDATED_TRUE@am__append_231 = \
 @ENABLE_TIMEDATED_TRUE@        shell-completion/zsh/_timedatectl
 
-@ENABLE_TIMESYNCD_TRUE@am__append_208 =  \
+@ENABLE_TIMESYNCD_TRUE@am__append_232 =  \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-gperf.gperf \
 @ENABLE_TIMESYNCD_TRUE@        units/systemd-timesyncd.service.in \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd.conf.in
-@ENABLE_TIMESYNCD_TRUE@am__append_209 =  \
+@ENABLE_TIMESYNCD_TRUE@am__append_233 =  \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-gperf.c \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd.conf
-@ENABLE_TIMESYNCD_TRUE@am__append_210 = \
+@ENABLE_TIMESYNCD_TRUE@am__append_234 = \
 @ENABLE_TIMESYNCD_TRUE@        systemd-timesyncd
 
-@ENABLE_TIMESYNCD_TRUE@am__append_211 = \
+@ENABLE_TIMESYNCD_TRUE@am__append_235 = \
 @ENABLE_TIMESYNCD_TRUE@        units/systemd-timesyncd.service
 
-@ENABLE_TIMESYNCD_TRUE@am__append_212 = \
-@ENABLE_TIMESYNCD_TRUE@        $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-timesyncd.service
+@ENABLE_TIMESYNCD_TRUE@am__append_236 = \
+@ENABLE_TIMESYNCD_TRUE@        $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
 
-@ENABLE_TIMESYNCD_TRUE@am__append_213 = \
+@ENABLE_TIMESYNCD_TRUE@am__append_237 = \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd.conf
 
-@HAVE_MYHOSTNAME_TRUE@am__append_214 = \
+@HAVE_MYHOSTNAME_TRUE@am__append_238 = \
 @HAVE_MYHOSTNAME_TRUE@ libnss_myhostname.la
 
-@ENABLE_MACHINED_TRUE@am__append_215 = \
+@ENABLE_MACHINED_TRUE@am__append_239 = \
 @ENABLE_MACHINED_TRUE@ systemd-machined
 
-@ENABLE_MACHINED_TRUE@am__append_216 = \
+@ENABLE_MACHINED_TRUE@am__append_240 = \
 @ENABLE_MACHINED_TRUE@ libsystemd-machine-core.la
 
-@ENABLE_MACHINED_TRUE@am__append_217 = \
+@ENABLE_MACHINED_TRUE@am__append_241 = \
 @ENABLE_MACHINED_TRUE@ machinectl
 
-@ENABLE_MACHINED_TRUE@am__append_218 = \
+@ENABLE_MACHINED_TRUE@am__append_242 = \
 @ENABLE_MACHINED_TRUE@ shell-completion/bash/machinectl
 
-@ENABLE_MACHINED_TRUE@am__append_219 = \
+@ENABLE_MACHINED_TRUE@am__append_243 = \
 @ENABLE_MACHINED_TRUE@ test-machine-tables
 
-@ENABLE_MACHINED_TRUE@am__append_220 = \
+@ENABLE_MACHINED_TRUE@am__append_244 = \
 @ENABLE_MACHINED_TRUE@ units/systemd-machined.service
 
-@ENABLE_MACHINED_TRUE@am__append_221 = \
-@ENABLE_MACHINED_TRUE@ units/machine.slice \
+@ENABLE_MACHINED_TRUE@am__append_245 = \
+@ENABLE_MACHINED_TRUE@ units/machine.slice
+
+@ENABLE_MACHINED_TRUE@am__append_246 = \
 @ENABLE_MACHINED_TRUE@ units/org.freedesktop.machine1.busname
 
-@ENABLE_MACHINED_TRUE@am__append_222 = \
+@ENABLE_MACHINED_TRUE@am__append_247 = \
 @ENABLE_MACHINED_TRUE@ src/machine/org.freedesktop.machine1.service
 
-@ENABLE_MACHINED_TRUE@am__append_223 = \
+@ENABLE_MACHINED_TRUE@am__append_248 = \
 @ENABLE_MACHINED_TRUE@ src/machine/org.freedesktop.machine1.conf
 
-@ENABLE_MACHINED_TRUE@am__append_224 = \
+@ENABLE_MACHINED_TRUE@am__append_249 = \
 @ENABLE_MACHINED_TRUE@ shell-completion/zsh/_machinectl \
 @ENABLE_MACHINED_TRUE@ shell-completion/zsh/_sd_machines
 
-@ENABLE_MACHINED_TRUE@am__append_225 = \
+@ENABLE_MACHINED_TRUE@am__append_250 = \
 @ENABLE_MACHINED_TRUE@ systemd-machined.service dbus-org.freedesktop.machine1.service
 
-@ENABLE_MACHINED_TRUE@am__append_226 = \
+@ENABLE_MACHINED_TRUE@am__append_251 = \
 @ENABLE_MACHINED_TRUE@ org.freedesktop.machine1.busname
 
-@ENABLE_MACHINED_TRUE@am__append_227 = \
+@ENABLE_MACHINED_TRUE@am__append_252 = \
 @ENABLE_MACHINED_TRUE@ units/systemd-machined.service.in
 
-@ENABLE_RESOLVED_TRUE@am__append_228 =  \
+@ENABLE_MACHINED_TRUE@am__append_253 = \
+@ENABLE_MACHINED_TRUE@ libnss_mymachines.la
+
+@ENABLE_RESOLVED_TRUE@am__append_254 =  \
 @ENABLE_RESOLVED_TRUE@ src/resolve/resolved-gperf.gperf \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns_type-from-name.gperf \
 @ENABLE_RESOLVED_TRUE@ units/systemd-resolved.service.in \
 @ENABLE_RESOLVED_TRUE@ src/resolve/resolved.conf.in
-@ENABLE_RESOLVED_TRUE@am__append_229 = src/resolve/resolved-gperf.c \
+@ENABLE_RESOLVED_TRUE@am__append_255 = src/resolve/resolved-gperf.c \
 @ENABLE_RESOLVED_TRUE@ src/resolve/resolved.conf
-@ENABLE_RESOLVED_TRUE@am__append_230 = \
-@ENABLE_RESOLVED_TRUE@ systemd-resolved
-
-@ENABLE_RESOLVED_TRUE@am__append_231 = \
+@ENABLE_RESOLVED_TRUE@am__append_256 = systemd-resolved \
+@ENABLE_RESOLVED_TRUE@ systemd-resolve-host
+@ENABLE_RESOLVED_TRUE@am__append_257 = \
 @ENABLE_RESOLVED_TRUE@ units/systemd-resolved.service
 
-@ENABLE_RESOLVED_TRUE@am__append_232 = \
+@ENABLE_RESOLVED_TRUE@am__append_258 = \
+@ENABLE_RESOLVED_TRUE@ units/org.freedesktop.resolve1.busname
+
+@ENABLE_RESOLVED_TRUE@am__append_259 = \
+@ENABLE_RESOLVED_TRUE@ src/resolve/org.freedesktop.resolve1.conf
+
+@ENABLE_RESOLVED_TRUE@am__append_260 = \
+@ENABLE_RESOLVED_TRUE@ src/resolve/org.freedesktop.resolve1.service
+
+@ENABLE_RESOLVED_TRUE@am__append_261 = \
+@ENABLE_RESOLVED_TRUE@ systemd-resolved.service dbus-org.freedesktop.resolve1.service
+
+@ENABLE_RESOLVED_TRUE@am__append_262 = \
+@ENABLE_RESOLVED_TRUE@ org.freedesktop.resolve1.busname
+
+@ENABLE_RESOLVED_TRUE@am__append_263 = \
 @ENABLE_RESOLVED_TRUE@ $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
 
-@ENABLE_RESOLVED_TRUE@am__append_233 = \
+@ENABLE_RESOLVED_TRUE@am__append_264 = \
 @ENABLE_RESOLVED_TRUE@ src/resolve/resolved.conf
 
+@ENABLE_RESOLVED_TRUE@am__append_265 = \
+@ENABLE_RESOLVED_TRUE@ test-dns-domain
+
+@ENABLE_RESOLVED_TRUE@am__append_266 = \
+@ENABLE_RESOLVED_TRUE@ libnss_resolve.la
+
 
 # ------------------------------------------------------------------------------
-@ENABLE_NETWORKD_TRUE@am__append_234 = systemd-networkd \
+@ENABLE_NETWORKD_TRUE@am__append_267 = systemd-networkd \
 @ENABLE_NETWORKD_TRUE@ systemd-networkd-wait-online
-@ENABLE_NETWORKD_TRUE@am__append_235 = \
+@ENABLE_NETWORKD_TRUE@am__append_268 = \
 @ENABLE_NETWORKD_TRUE@ libsystemd-networkd-core.la
 
-@ENABLE_NETWORKD_TRUE@am__append_236 = \
-@ENABLE_NETWORKD_TRUE@ test-network
+@ENABLE_NETWORKD_TRUE@am__append_269 = \
+@ENABLE_NETWORKD_TRUE@ networkctl
+
+@ENABLE_NETWORKD_TRUE@am__append_270 = \
+@ENABLE_NETWORKD_TRUE@ test-network \
+@ENABLE_NETWORKD_TRUE@ test-network-tables
 
-@ENABLE_NETWORKD_TRUE@am__append_237 = \
+@ENABLE_NETWORKD_TRUE@am__append_271 = \
 @ENABLE_NETWORKD_TRUE@ units/systemd-networkd.service \
 @ENABLE_NETWORKD_TRUE@ units/systemd-networkd-wait-online.service
 
-@ENABLE_NETWORKD_TRUE@am__append_238 = \
+@ENABLE_NETWORKD_TRUE@am__append_272 = \
 @ENABLE_NETWORKD_TRUE@ $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
 @ENABLE_NETWORKD_TRUE@ $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
 
-@ENABLE_NETWORKD_TRUE@am__append_239 = \
+@ENABLE_NETWORKD_TRUE@am__append_273 = \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-network-gperf.gperf \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-gperf.gperf \
 @ENABLE_NETWORKD_TRUE@ units/systemd-networkd.service.in \
 @ENABLE_NETWORKD_TRUE@ units/systemd-networkd-wait-online.service.in
 
-@ENABLE_NETWORKD_TRUE@am__append_240 = \
+@ENABLE_NETWORKD_TRUE@am__append_274 = \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-network-gperf.c \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-gperf.c
 
-@ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@am__append_241 = \
+@ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@am__append_275 = \
 @ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@    src/login/logind-acl.c
 
-@ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@am__append_242 = \
+@ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@am__append_276 = \
 @ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@    libsystemd-acl.la
 
-@ENABLE_LOGIND_TRUE@am__append_243 = \
+@ENABLE_LOGIND_TRUE@am__append_277 = \
 @ENABLE_LOGIND_TRUE@   libsystemd-logind-core.la
 
-@ENABLE_LOGIND_TRUE@am__append_244 = \
+@ENABLE_LOGIND_TRUE@am__append_278 = \
 @ENABLE_LOGIND_TRUE@   systemd-logind \
 @ENABLE_LOGIND_TRUE@   systemd-user-sessions
 
-@ENABLE_LOGIND_TRUE@am__append_245 = loginctl systemd-inhibit
-@ENABLE_LOGIND_TRUE@am__append_246 = \
+@ENABLE_LOGIND_TRUE@am__append_279 = loginctl systemd-inhibit
+@ENABLE_LOGIND_TRUE@am__append_280 = \
 @ENABLE_LOGIND_TRUE@   shell-completion/bash/loginctl
 
-@ENABLE_LOGIND_TRUE@am__append_247 = \
+@ENABLE_LOGIND_TRUE@am__append_281 = \
 @ENABLE_LOGIND_TRUE@   shell-completion/zsh/_loginctl \
 @ENABLE_LOGIND_TRUE@   shell-completion/zsh/_systemd-inhibit
 
-@ENABLE_LOGIND_TRUE@am__append_248 = \
+@ENABLE_LOGIND_TRUE@am__append_282 = \
 @ENABLE_LOGIND_TRUE@   test-login \
 @ENABLE_LOGIND_TRUE@   test-inhibit
 
-@ENABLE_LOGIND_TRUE@am__append_249 = \
+@ENABLE_LOGIND_TRUE@am__append_283 = \
 @ENABLE_LOGIND_TRUE@   test-login-tables \
 @ENABLE_LOGIND_TRUE@   test-login-shared
 
-@ENABLE_LOGIND_TRUE@am__append_250 = \
+@ENABLE_LOGIND_TRUE@am__append_284 = \
 @ENABLE_LOGIND_TRUE@   units/systemd-logind.service \
 @ENABLE_LOGIND_TRUE@   units/systemd-user-sessions.service
 
-@ENABLE_LOGIND_TRUE@am__append_251 = \
-@ENABLE_LOGIND_TRUE@   units/user.slice \
+@ENABLE_LOGIND_TRUE@am__append_285 = \
+@ENABLE_LOGIND_TRUE@   units/user.slice
+
+@ENABLE_LOGIND_TRUE@am__append_286 = \
 @ENABLE_LOGIND_TRUE@   units/org.freedesktop.login1.busname
 
-@ENABLE_LOGIND_TRUE@am__append_252 = \
+@ENABLE_LOGIND_TRUE@am__append_287 = \
 @ENABLE_LOGIND_TRUE@   src/login/org.freedesktop.login1.service
 
-@ENABLE_LOGIND_TRUE@am__append_253 = \
+@ENABLE_LOGIND_TRUE@am__append_288 = \
 @ENABLE_LOGIND_TRUE@   src/login/org.freedesktop.login1.conf
 
-@ENABLE_LOGIND_TRUE@am__append_254 = \
+@ENABLE_LOGIND_TRUE@am__append_289 = \
 @ENABLE_LOGIND_TRUE@   src/login/logind.conf
 
-@ENABLE_LOGIND_TRUE@am__append_255 = \
+@ENABLE_LOGIND_TRUE@am__append_290 = \
 @ENABLE_LOGIND_TRUE@   src/login/org.freedesktop.login1.policy
 
-@ENABLE_LOGIND_TRUE@am__append_256 = \
+@ENABLE_LOGIND_TRUE@am__append_291 = \
 @ENABLE_LOGIND_TRUE@   $(systemdstatedir)
 
-@ENABLE_LOGIND_TRUE@am__append_257 = \
+@ENABLE_LOGIND_TRUE@am__append_292 = \
 @ENABLE_LOGIND_TRUE@   systemd-logind.service \
 @ENABLE_LOGIND_TRUE@   systemd-user-sessions.service
 
-@ENABLE_LOGIND_TRUE@am__append_258 = \
+@ENABLE_LOGIND_TRUE@am__append_293 = \
 @ENABLE_LOGIND_TRUE@   systemd-logind.service dbus-org.freedesktop.login1.service
 
-@ENABLE_LOGIND_TRUE@am__append_259 = \
+@ENABLE_LOGIND_TRUE@am__append_294 = \
 @ENABLE_LOGIND_TRUE@   org.freedesktop.login1.busname
 
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@am__append_260 = \
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@ systemd-multi-seat-x
-
-@ENABLE_LOGIND_TRUE@am__append_261 = \
+@ENABLE_LOGIND_TRUE@am__append_295 = \
 @ENABLE_LOGIND_TRUE@   src/login/70-uaccess.rules \
 @ENABLE_LOGIND_TRUE@   src/login/70-power-switch.rules
 
-@ENABLE_LOGIND_TRUE@am__append_262 = \
+@ENABLE_LOGIND_TRUE@am__append_296 = \
 @ENABLE_LOGIND_TRUE@   src/login/71-seat.rules \
 @ENABLE_LOGIND_TRUE@   src/login/73-seat-late.rules
 
-@ENABLE_LOGIND_TRUE@am__append_263 = \
+@ENABLE_LOGIND_TRUE@am__append_297 = \
 @ENABLE_LOGIND_TRUE@   src/login/logind-gperf.c \
 @ENABLE_LOGIND_TRUE@   src/login/71-seat.rules \
 @ENABLE_LOGIND_TRUE@   src/login/73-seat-late.rules
 
-@HAVE_PYTHON_DEVEL_TRUE@am__append_264 = \
+@HAVE_PYTHON_DEVEL_TRUE@am__append_298 = \
 @HAVE_PYTHON_DEVEL_TRUE@       src/python-systemd/id128-constants.h
 
 
 # ------------------------------------------------------------------------------
-@ENABLE_COMPAT_LIBS_TRUE@am__append_265 = \
+@ENABLE_COMPAT_LIBS_TRUE@am__append_299 = \
 @ENABLE_COMPAT_LIBS_TRUE@      src/compat-libs/linkwarning.h
 
-@ENABLE_COMPAT_LIBS_TRUE@am__append_266 = \
+@ENABLE_COMPAT_LIBS_TRUE@am__append_300 = \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-journal.c \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-login.c \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-id128.c \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-daemon.c
 
-@ENABLE_COMPAT_LIBS_TRUE@am__append_267 = \
+@ENABLE_COMPAT_LIBS_TRUE@am__append_301 = \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-journal.la \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-login.la \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-id128.la \
 @ENABLE_COMPAT_LIBS_TRUE@      libsystemd-daemon.la
 
-@ENABLE_COMPAT_LIBS_TRUE@am__append_268 = \
+@ENABLE_COMPAT_LIBS_TRUE@am__append_302 = \
 @ENABLE_COMPAT_LIBS_TRUE@      src/compat-libs/libsystemd-journal.pc \
 @ENABLE_COMPAT_LIBS_TRUE@      src/compat-libs/libsystemd-login.pc \
 @ENABLE_COMPAT_LIBS_TRUE@      src/compat-libs/libsystemd-id128.pc \
 @ENABLE_COMPAT_LIBS_TRUE@      src/compat-libs/libsystemd-daemon.pc
 
-@ENABLE_COMPAT_LIBS_TRUE@am__append_269 = compat-lib-install-hook
-@ENABLE_COMPAT_LIBS_TRUE@am__append_270 = compat-lib-uninstall-hook
-@ENABLE_MANPAGES_TRUE@am__append_271 = \
+@ENABLE_COMPAT_LIBS_TRUE@am__append_303 = compat-lib-install-hook
+@ENABLE_COMPAT_LIBS_TRUE@am__append_304 = compat-lib-uninstall-hook
+@ENABLE_MANPAGES_TRUE@am__append_305 = \
 @ENABLE_MANPAGES_TRUE@ man/custom-entities.ent
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_272 = \
+@HAVE_SYSV_COMPAT_TRUE@am__append_306 = \
 @HAVE_SYSV_COMPAT_TRUE@        docs/sysvinit/README \
 @HAVE_SYSV_COMPAT_TRUE@        docs/var-log/README
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_273 = \
-@HAVE_SYSV_COMPAT_TRUE@        systemd-update-utmp-runlevel.service
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@am__append_307 = \
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@        systemd-update-utmp-runlevel.service
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_274 = \
-@HAVE_SYSV_COMPAT_TRUE@        systemd-update-utmp-runlevel.service
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@am__append_308 = \
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@        systemd-update-utmp-runlevel.service
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_275 = \
-@HAVE_SYSV_COMPAT_TRUE@        systemd-update-utmp-runlevel.service
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@am__append_309 = \
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@        systemd-update-utmp-runlevel.service
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_276 = \
-@HAVE_SYSV_COMPAT_TRUE@        systemd-update-utmp-runlevel.service
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@am__append_310 = \
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@        systemd-update-utmp-runlevel.service
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_277 = \
-@HAVE_SYSV_COMPAT_TRUE@        systemd-update-utmp-runlevel.service
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@am__append_311 = \
+@HAVE_SYSV_COMPAT_TRUE@@HAVE_UTMP_TRUE@        systemd-update-utmp-runlevel.service
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_278 = \
+@HAVE_UTMP_TRUE@am__append_312 = \
+@HAVE_UTMP_TRUE@       systemd-update-utmp.service
+
+@HAVE_SYSV_COMPAT_TRUE@am__append_313 = \
 @HAVE_SYSV_COMPAT_TRUE@        poweroff.target runlevel0.target \
 @HAVE_SYSV_COMPAT_TRUE@        rescue.target runlevel1.target \
 @HAVE_SYSV_COMPAT_TRUE@        multi-user.target runlevel2.target \
@@ -1251,25 +1384,28 @@ DIST_COMMON = $(srcdir)/Makefile-man.am $(srcdir)/Makefile.in \
 @HAVE_SYSV_COMPAT_TRUE@        graphical.target runlevel5.target \
 @HAVE_SYSV_COMPAT_TRUE@        reboot.target runlevel6.target
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_279 = \
+@ENABLE_KDBUS_TRUE@am__append_314 = \
+@ENABLE_KDBUS_TRUE@    $(systemunitdir)/busnames.target busnames.target
+
+@HAVE_SYSV_COMPAT_TRUE@am__append_315 = \
 @HAVE_SYSV_COMPAT_TRUE@        $(systemunitdir)/runlevel1.target.wants \
 @HAVE_SYSV_COMPAT_TRUE@        $(systemunitdir)/runlevel2.target.wants \
 @HAVE_SYSV_COMPAT_TRUE@        $(systemunitdir)/runlevel3.target.wants \
 @HAVE_SYSV_COMPAT_TRUE@        $(systemunitdir)/runlevel4.target.wants \
 @HAVE_SYSV_COMPAT_TRUE@        $(systemunitdir)/runlevel5.target.wants
 
-@HAVE_SYSV_COMPAT_TRUE@am__append_280 = \
+@HAVE_SYSV_COMPAT_TRUE@am__append_316 = \
 @HAVE_SYSV_COMPAT_TRUE@        --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
 @HAVE_SYSV_COMPAT_TRUE@        --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
 
-@HAVE_SYSV_COMPAT_FALSE@am__append_281 = \
+@HAVE_SYSV_COMPAT_FALSE@am__append_317 = \
 @HAVE_SYSV_COMPAT_FALSE@       --with-sysvinit-path= \
 @HAVE_SYSV_COMPAT_FALSE@       --with-sysvrcnd-path=
 
-@HAVE_PYTHON_TRUE@am__append_282 = \
+@HAVE_PYTHON_TRUE@am__append_318 = \
 @HAVE_PYTHON_TRUE@     --with-python
 
-@ENABLE_GTK_DOC_TRUE@am__append_283 = \
+@ENABLE_GTK_DOC_TRUE@am__append_319 = \
 @ENABLE_GTK_DOC_TRUE@  --enable-gtk-doc
 
 subdir = .
@@ -1325,20 +1461,22 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pamlibdir)" \
        "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(bashcompletiondir)" \
        "$(DESTDIR)$(catalogdir)" "$(DESTDIR)$(dbuspolicydir)" \
        "$(DESTDIR)$(dbussystemservicedir)" "$(DESTDIR)$(docdir)" \
+       "$(DESTDIR)$(factory_etcdir)" "$(DESTDIR)$(factory_pamdir)" \
        "$(DESTDIR)$(gatewayddocumentrootdir)" \
-       "$(DESTDIR)$(networkdir)" "$(DESTDIR)$(ntpunitsdir)" \
-       "$(DESTDIR)$(pamconfdir)" "$(DESTDIR)$(pkgdatadir)" \
-       "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(polkitpolicydir)" \
+       "$(DESTDIR)$(networkdir)" "$(DESTDIR)$(pamconfdir)" \
+       "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgsysconfdir)" \
        "$(DESTDIR)$(sysctldir)" "$(DESTDIR)$(systempresetdir)" \
        "$(DESTDIR)$(systemunitdir)" "$(DESTDIR)$(sysusersdir)" \
        "$(DESTDIR)$(tmpfilesdir)" "$(DESTDIR)$(udevconfdir)" \
        "$(DESTDIR)$(udevhwdbdir)" "$(DESTDIR)$(udevrulesdir)" \
        "$(DESTDIR)$(userunitdir)" "$(DESTDIR)$(zshcompletiondir)" \
-       "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgsysconfdir)" \
+       "$(DESTDIR)$(girdir)" "$(DESTDIR)$(bashcompletiondir)" \
+       "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(polkitpolicydir)" \
        "$(DESTDIR)$(rpmmacrosdir)" "$(DESTDIR)$(systemunitdir)" \
-       "$(DESTDIR)$(sysusersdir)" "$(DESTDIR)$(udevrulesdir)" \
-       "$(DESTDIR)$(userunitdir)" "$(DESTDIR)$(pkgconfigdatadir)" \
-       "$(DESTDIR)$(pkgconfiglibdir)" \
+       "$(DESTDIR)$(sysusersdir)" "$(DESTDIR)$(tmpfilesdir)" \
+       "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(userunitdir)" \
+       "$(DESTDIR)$(zshcompletiondir)" \
+       "$(DESTDIR)$(pkgconfigdatadir)" "$(DESTDIR)$(pkgconfiglibdir)" \
        "$(DESTDIR)$(sharepkgconfigdir)" "$(DESTDIR)$(sysctldir)" \
        "$(DESTDIR)$(sysvinitdir)" "$(DESTDIR)$(typelibsdir)" \
        "$(DESTDIR)$(varlogdir)" "$(DESTDIR)$(includedir)" \
@@ -1424,17 +1562,43 @@ libgudev_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 @HAVE_MYHOSTNAME_TRUE@ libsystemd-shared.la \
 @HAVE_MYHOSTNAME_TRUE@ libsystemd-internal.la
 am__libnss_myhostname_la_SOURCES_DIST =  \
-       src/nss-myhostname/nss-myhostname.c \
-       src/nss-myhostname/ifconf.h src/nss-myhostname/netlink.c
+       src/nss-myhostname/nss-myhostname.sym \
+       src/nss-myhostname/nss-myhostname.c
 @HAVE_MYHOSTNAME_TRUE@am_libnss_myhostname_la_OBJECTS =  \
-@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/nss-myhostname.lo \
-@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/netlink.lo
+@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/nss-myhostname.lo
 libnss_myhostname_la_OBJECTS = $(am_libnss_myhostname_la_OBJECTS)
 libnss_myhostname_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(AM_CFLAGS) $(CFLAGS) $(libnss_myhostname_la_LDFLAGS) \
        $(LDFLAGS) -o $@
 @HAVE_MYHOSTNAME_TRUE@am_libnss_myhostname_la_rpath = -rpath $(libdir)
+@ENABLE_MACHINED_TRUE@libnss_mymachines_la_DEPENDENCIES =  \
+@ENABLE_MACHINED_TRUE@ libsystemd-shared.la \
+@ENABLE_MACHINED_TRUE@ libsystemd-internal.la
+am__libnss_mymachines_la_SOURCES_DIST =  \
+       src/nss-mymachines/nss-mymachines.sym \
+       src/nss-mymachines/nss-mymachines.c
+@ENABLE_MACHINED_TRUE@am_libnss_mymachines_la_OBJECTS =  \
+@ENABLE_MACHINED_TRUE@ src/nss-mymachines/nss-mymachines.lo
+libnss_mymachines_la_OBJECTS = $(am_libnss_mymachines_la_OBJECTS)
+libnss_mymachines_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(AM_CFLAGS) $(CFLAGS) $(libnss_mymachines_la_LDFLAGS) \
+       $(LDFLAGS) -o $@
+@ENABLE_MACHINED_TRUE@am_libnss_mymachines_la_rpath = -rpath $(libdir)
+@ENABLE_RESOLVED_TRUE@libnss_resolve_la_DEPENDENCIES =  \
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-internal.la
+am__libnss_resolve_la_SOURCES_DIST = src/nss-resolve/nss-resolve.sym \
+       src/nss-resolve/nss-resolve.c
+@ENABLE_RESOLVED_TRUE@am_libnss_resolve_la_OBJECTS =  \
+@ENABLE_RESOLVED_TRUE@ src/nss-resolve/nss-resolve.lo
+libnss_resolve_la_OBJECTS = $(am_libnss_resolve_la_OBJECTS)
+libnss_resolve_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(AM_CFLAGS) $(CFLAGS) $(libnss_resolve_la_LDFLAGS) $(LDFLAGS) \
+       -o $@
+@ENABLE_RESOLVED_TRUE@am_libnss_resolve_la_rpath = -rpath $(libdir)
 @HAVE_ACL_TRUE@libsystemd_acl_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am__libsystemd_acl_la_SOURCES_DIST = src/shared/acl-util.c \
        src/shared/acl-util.h
@@ -1460,7 +1624,7 @@ libsystemd_core_la_DEPENDENCIES = libsystemd-capability.la \
        libsystemd-shared.la libsystemd-internal.la \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_61)
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_68)
 am__libsystemd_core_la_SOURCES_DIST = src/core/unit.c src/core/unit.h \
        src/core/unit-printf.c src/core/unit-printf.h src/core/job.c \
        src/core/job.h src/core/manager.c src/core/manager.h \
@@ -1468,6 +1632,8 @@ am__libsystemd_core_la_SOURCES_DIST = src/core/unit.c src/core/unit.h \
        src/core/load-fragment.c src/core/load-fragment.h \
        src/core/service.c src/core/service.h src/core/socket.c \
        src/core/socket.h src/core/busname.c src/core/busname.h \
+       src/core/bus-common.c src/core/bus-common.h \
+       src/core/bus-endpoint.c src/core/bus-endpoint.h \
        src/core/target.c src/core/target.h src/core/snapshot.c \
        src/core/snapshot.h src/core/device.c src/core/device.h \
        src/core/mount.c src/core/mount.h src/core/automount.c \
@@ -1507,11 +1673,11 @@ am__libsystemd_core_la_SOURCES_DIST = src/core/unit.c src/core/unit.h \
        src/core/mount-setup.h src/core/loopback-setup.h \
        src/core/loopback-setup.c src/core/condition.c \
        src/core/condition.h src/core/namespace.c src/core/namespace.h \
-       src/core/build.h src/core/sysfs-show.h src/core/switch-root.h \
-       src/core/switch-root.c src/core/killall.h src/core/killall.c \
-       src/core/audit-fd.c src/core/audit-fd.h src/core/show-status.c \
-       src/core/show-status.h src/core/kmod-setup.c \
-       src/core/kmod-setup.h
+       src/core/build.h src/core/sysfs-show.h src/core/killall.h \
+       src/core/killall.c src/core/audit-fd.c src/core/audit-fd.h \
+       src/core/show-status.c src/core/show-status.h \
+       src/core/failure-action.c src/core/failure-action.h \
+       src/core/kmod-setup.c src/core/kmod-setup.h
 @HAVE_KMOD_TRUE@am__objects_1 =  \
 @HAVE_KMOD_TRUE@       src/core/libsystemd_core_la-kmod-setup.lo
 am_libsystemd_core_la_OBJECTS = src/core/libsystemd_core_la-unit.lo \
@@ -1523,6 +1689,8 @@ am_libsystemd_core_la_OBJECTS = src/core/libsystemd_core_la-unit.lo \
        src/core/libsystemd_core_la-service.lo \
        src/core/libsystemd_core_la-socket.lo \
        src/core/libsystemd_core_la-busname.lo \
+       src/core/libsystemd_core_la-bus-common.lo \
+       src/core/libsystemd_core_la-bus-endpoint.lo \
        src/core/libsystemd_core_la-target.lo \
        src/core/libsystemd_core_la-snapshot.lo \
        src/core/libsystemd_core_la-device.lo \
@@ -1568,10 +1736,10 @@ am_libsystemd_core_la_OBJECTS = src/core/libsystemd_core_la-unit.lo \
        src/core/libsystemd_core_la-loopback-setup.lo \
        src/core/libsystemd_core_la-condition.lo \
        src/core/libsystemd_core_la-namespace.lo \
-       src/core/libsystemd_core_la-switch-root.lo \
        src/core/libsystemd_core_la-killall.lo \
        src/core/libsystemd_core_la-audit-fd.lo \
-       src/core/libsystemd_core_la-show-status.lo $(am__objects_1)
+       src/core/libsystemd_core_la-show-status.lo \
+       src/core/libsystemd_core_la-failure-action.lo $(am__objects_1)
 nodist_libsystemd_core_la_OBJECTS =  \
        src/core/libsystemd_core_la-load-fragment-gperf.lo \
        src/core/libsystemd_core_la-load-fragment-gperf-nulstr.lo
@@ -1637,17 +1805,19 @@ am_libsystemd_internal_la_OBJECTS =  \
        src/libsystemd/sd-bus/libsystemd_internal_la-bus-track.lo \
        src/libsystemd/sd-bus/libsystemd_internal_la-bus-util.lo \
        src/libsystemd/sd-bus/libsystemd_internal_la-bus-slot.lo \
-       src/libsystemd/sd-bus/libsystemd_internal_la-sd-memfd.lo \
        src/libsystemd/sd-utf8/libsystemd_internal_la-sd-utf8.lo \
        src/libsystemd/sd-event/libsystemd_internal_la-sd-event.lo \
        src/libsystemd/sd-rtnl/libsystemd_internal_la-sd-rtnl.lo \
        src/libsystemd/sd-rtnl/libsystemd_internal_la-rtnl-message.lo \
        src/libsystemd/sd-rtnl/libsystemd_internal_la-rtnl-types.lo \
        src/libsystemd/sd-rtnl/libsystemd_internal_la-rtnl-util.lo \
+       src/libsystemd/sd-rtnl/libsystemd_internal_la-local-addresses.lo \
        src/libsystemd/sd-id128/libsystemd_internal_la-sd-id128.lo \
        src/libsystemd/sd-daemon/libsystemd_internal_la-sd-daemon.lo \
        src/libsystemd/sd-login/libsystemd_internal_la-sd-login.lo \
-       src/libsystemd/sd-path/libsystemd_internal_la-sd-path.lo
+       src/libsystemd/sd-path/libsystemd_internal_la-sd-path.lo \
+       src/libsystemd/sd-network/libsystemd_internal_la-sd-network.lo \
+       src/libsystemd/sd-network/libsystemd_internal_la-network-util.lo
 nodist_libsystemd_internal_la_OBJECTS = src/libsystemd/sd-bus/libsystemd_internal_la-bus-error-mapping.lo
 libsystemd_internal_la_OBJECTS = $(am_libsystemd_internal_la_OBJECTS) \
        $(nodist_libsystemd_internal_la_OBJECTS)
@@ -1658,7 +1828,7 @@ libsystemd_internal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 libsystemd_journal_core_la_DEPENDENCIES =  \
        libsystemd-journal-internal.la libudev-internal.la \
        libsystemd-capability.la libsystemd-label.la \
-       libsystemd-internal.la libsystemd-shared.la $(am__append_120)
+       libsystemd-internal.la libsystemd-shared.la $(am__append_153)
 am_libsystemd_journal_core_la_OBJECTS = src/journal/journald-kmsg.lo \
        src/journal/journald-syslog.lo src/journal/journald-stream.lo \
        src/journal/journald-server.lo src/journal/journald-console.lo \
@@ -1672,7 +1842,7 @@ libsystemd_journal_core_la_OBJECTS =  \
 @HAVE_XZ_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
 @HAVE_GCRYPT_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
 libsystemd_journal_internal_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
-       $(am__DEPENDENCIES_3)
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
 am__libsystemd_journal_internal_la_SOURCES_DIST =  \
        src/journal/sd-journal.c src/systemd/sd-journal.h \
        src/systemd/_sd-common.h src/journal/journal-file.c \
@@ -1686,8 +1856,7 @@ am__libsystemd_journal_internal_la_SOURCES_DIST =  \
        src/journal/compress.c src/journal/journal-authenticate.c \
        src/journal/journal-authenticate.h src/journal/fsprg.c \
        src/journal/fsprg.h
-@HAVE_XZ_TRUE@am__objects_2 = src/journal/libsystemd_journal_internal_la-compress.lo
-@HAVE_GCRYPT_TRUE@am__objects_3 = src/journal/libsystemd_journal_internal_la-journal-authenticate.lo \
+@HAVE_GCRYPT_TRUE@am__objects_2 = src/journal/libsystemd_journal_internal_la-journal-authenticate.lo \
 @HAVE_GCRYPT_TRUE@     src/journal/libsystemd_journal_internal_la-fsprg.lo
 am_libsystemd_journal_internal_la_OBJECTS =  \
        src/journal/libsystemd_journal_internal_la-sd-journal.lo \
@@ -1698,7 +1867,8 @@ am_libsystemd_journal_internal_la_OBJECTS =  \
        src/journal/libsystemd_journal_internal_la-journal-send.lo \
        src/journal/libsystemd_journal_internal_la-catalog.lo \
        src/journal/libsystemd_journal_internal_la-mmap-cache.lo \
-       $(am__objects_2) $(am__objects_3)
+       src/journal/libsystemd_journal_internal_la-compress.lo \
+       $(am__objects_2)
 libsystemd_journal_internal_la_OBJECTS =  \
        $(am_libsystemd_journal_internal_la_OBJECTS)
 libsystemd_journal_internal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -1726,6 +1896,7 @@ am_libsystemd_label_la_OBJECTS =  \
        src/shared/libsystemd_label_la-selinux-util.lo \
        src/shared/libsystemd_label_la-mkdir-label.lo \
        src/shared/libsystemd_label_la-ask-password-api.lo \
+       src/shared/libsystemd_label_la-switch-root.lo \
        src/shared/libsystemd_label_la-fileio-label.lo \
        src/shared/libsystemd_label_la-dev-setup.lo \
        src/shared/libsystemd_label_la-dropin.lo \
@@ -1752,7 +1923,7 @@ libsystemd_login_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 @ENABLE_LOGIND_TRUE@   libsystemd-label.la \
 @ENABLE_LOGIND_TRUE@   libsystemd-capability.la \
 @ENABLE_LOGIND_TRUE@   libsystemd-internal.la libudev-internal.la \
-@ENABLE_LOGIND_TRUE@   libsystemd-shared.la $(am__append_242)
+@ENABLE_LOGIND_TRUE@   libsystemd-shared.la $(am__append_276)
 am__libsystemd_logind_core_la_SOURCES_DIST = src/login/logind-core.c \
        src/login/logind-device.c src/login/logind-device.h \
        src/login/logind-button.c src/login/logind-button.h \
@@ -1766,7 +1937,7 @@ am__libsystemd_logind_core_la_SOURCES_DIST = src/login/logind-core.c \
        src/login/logind-session-dbus.c src/login/logind-seat-dbus.c \
        src/login/logind-user-dbus.c src/login/logind-acl.h \
        src/login/logind-acl.c
-@ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@am__objects_4 =  \
+@ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@am__objects_3 =  \
 @ENABLE_LOGIND_TRUE@@HAVE_ACL_TRUE@    src/login/logind-acl.lo
 @ENABLE_LOGIND_TRUE@am_libsystemd_logind_core_la_OBJECTS =  \
 @ENABLE_LOGIND_TRUE@   src/login/logind-core.lo \
@@ -1782,7 +1953,7 @@ am__libsystemd_logind_core_la_SOURCES_DIST = src/login/logind-core.c \
 @ENABLE_LOGIND_TRUE@   src/login/logind-session-dbus.lo \
 @ENABLE_LOGIND_TRUE@   src/login/logind-seat-dbus.lo \
 @ENABLE_LOGIND_TRUE@   src/login/logind-user-dbus.lo \
-@ENABLE_LOGIND_TRUE@   $(am__objects_4)
+@ENABLE_LOGIND_TRUE@   $(am__objects_3)
 libsystemd_logind_core_la_OBJECTS =  \
        $(am_libsystemd_logind_core_la_OBJECTS)
 @ENABLE_LOGIND_TRUE@am_libsystemd_logind_core_la_rpath =
@@ -1806,9 +1977,7 @@ libsystemd_machine_core_la_OBJECTS =  \
 libsystemd_network_la_DEPENDENCIES = libudev-internal.la \
        libsystemd-label.la libsystemd-internal.la \
        libsystemd-shared.la $(am__DEPENDENCIES_1)
-am_libsystemd_network_la_OBJECTS =  \
-       src/network/libsystemd_network_la-sd-network.lo \
-       src/libsystemd-network/libsystemd_network_la-sd-dhcp-client.lo \
+am_libsystemd_network_la_OBJECTS = src/libsystemd-network/libsystemd_network_la-sd-dhcp-client.lo \
        src/libsystemd-network/libsystemd_network_la-sd-dhcp-server.lo \
        src/libsystemd-network/libsystemd_network_la-dhcp-network.lo \
        src/libsystemd-network/libsystemd_network_la-dhcp-option.lo \
@@ -1835,23 +2004,45 @@ libsystemd_network_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 @ENABLE_NETWORKD_TRUE@ libsystemd-label.la libsystemd-shared.la
 am__libsystemd_networkd_core_la_SOURCES_DIST =  \
        src/libsystemd-network/network-internal.h \
-       src/network/networkd.h src/network/networkd-link.c \
-       src/network/networkd-netdev.c src/network/networkd-tunnel.c \
-       src/network/networkd-veth.c src/network/networkd-vxlan.c \
-       src/network/networkd-vlan.c src/network/networkd-macvlan.c \
-       src/network/networkd-dummy.c src/network/networkd-tuntap.c \
-       src/network/networkd-network.c src/network/networkd-address.c \
-       src/network/networkd-route.c src/network/networkd-manager.c \
+       src/network/networkd.h src/network/networkd-link.h \
+       src/network/networkd-netdev.h \
+       src/network/networkd-netdev-tunnel.h \
+       src/network/networkd-netdev-veth.h \
+       src/network/networkd-netdev-vxlan.h \
+       src/network/networkd-netdev-vlan.h \
+       src/network/networkd-netdev-macvlan.h \
+       src/network/networkd-netdev-dummy.h \
+       src/network/networkd-netdev-tuntap.h \
+       src/network/networkd-netdev-bond.h \
+       src/network/networkd-netdev-bridge.h \
+       src/network/networkd-netdev.c \
+       src/network/networkd-netdev-tunnel.c \
+       src/network/networkd-netdev-veth.c \
+       src/network/networkd-netdev-vxlan.c \
+       src/network/networkd-netdev-vlan.c \
+       src/network/networkd-netdev-macvlan.c \
+       src/network/networkd-netdev-dummy.c \
+       src/network/networkd-netdev-tuntap.c \
+       src/network/networkd-netdev-bond.c \
+       src/network/networkd-netdev-bridge.c \
+       src/network/networkd-link.c src/network/networkd-ipv4ll.c \
+       src/network/networkd-dhcp4.c src/network/networkd-network.c \
+       src/network/networkd-address.c src/network/networkd-route.c \
+       src/network/networkd-manager.c \
        src/network/networkd-address-pool.c
-@ENABLE_NETWORKD_TRUE@am_libsystemd_networkd_core_la_OBJECTS = src/network/libsystemd_networkd_core_la-networkd-link.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-tunnel.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-veth.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-vxlan.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-vlan.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-macvlan.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-dummy.lo \
-@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-tuntap.lo \
+@ENABLE_NETWORKD_TRUE@am_libsystemd_networkd_core_la_OBJECTS = src/network/libsystemd_networkd_core_la-networkd-netdev.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-tunnel.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-veth.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-vxlan.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-vlan.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-macvlan.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-dummy.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-tuntap.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-bond.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-netdev-bridge.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-link.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-ipv4ll.lo \
+@ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-dhcp4.lo \
 @ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-network.lo \
 @ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-address.lo \
 @ENABLE_NETWORKD_TRUE@ src/network/libsystemd_networkd_core_la-networkd-route.lo \
@@ -1887,6 +2078,74 @@ libsystemd_seccomp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(LDFLAGS) -o $@
 @HAVE_SECCOMP_TRUE@am_libsystemd_seccomp_la_rpath =
 libsystemd_shared_la_LIBADD =
+am__libsystemd_shared_la_SOURCES_DIST =  \
+       src/shared/linux/auto_dev-ioctl.h src/shared/ioprio.h \
+       src/shared/missing.h src/shared/initreq.h \
+       src/shared/securebits.h src/shared/special.h src/shared/list.h \
+       src/shared/macro.h src/shared/def.h src/shared/sparse-endian.h \
+       src/shared/refcnt.h src/shared/udev-util.h \
+       src/shared/bus-errors.h src/shared/device-nodes.c \
+       src/shared/device-nodes.h src/shared/util.c src/shared/util.h \
+       src/shared/virt.c src/shared/virt.h src/shared/architecture.c \
+       src/shared/architecture.h src/shared/efivars.c \
+       src/shared/efivars.h src/shared/path-util.c \
+       src/shared/path-util.h src/shared/time-util.c \
+       src/shared/time-util.h src/shared/locale-util.c \
+       src/shared/locale-util.h src/shared/mempool.c \
+       src/shared/mempool.h src/shared/hashmap.c src/shared/hashmap.h \
+       src/shared/siphash24.c src/shared/siphash24.h src/shared/set.c \
+       src/shared/set.h src/shared/fdset.c src/shared/fdset.h \
+       src/shared/prioq.c src/shared/prioq.h \
+       src/shared/sleep-config.c src/shared/sleep-config.h \
+       src/shared/strv.c src/shared/strv.h src/shared/env-util.c \
+       src/shared/env-util.h src/shared/strbuf.c src/shared/strbuf.h \
+       src/shared/strxcpyx.c src/shared/strxcpyx.h \
+       src/shared/conf-parser.c src/shared/conf-parser.h \
+       src/shared/log.c src/shared/log.h src/shared/ratelimit.h \
+       src/shared/ratelimit.c src/shared/exit-status.c \
+       src/shared/exit-status.h src/shared/utf8.c src/shared/utf8.h \
+       src/shared/gunicode.c src/shared/gunicode.h src/shared/pager.c \
+       src/shared/pager.h src/shared/socket-util.c \
+       src/shared/socket-util.h src/shared/in-addr-util.c \
+       src/shared/in-addr-util.h src/shared/conf-files.c \
+       src/shared/conf-files.h src/shared/cgroup-util.c \
+       src/shared/cgroup-util.h src/shared/cgroup-show.c \
+       src/shared/cgroup-show.h src/shared/unit-name.c \
+       src/shared/unit-name.h src/shared/utmp-wtmp.h \
+       src/shared/watchdog.c src/shared/watchdog.h \
+       src/shared/spawn-ask-password-agent.c \
+       src/shared/spawn-ask-password-agent.h src/shared/replace-var.c \
+       src/shared/replace-var.h src/shared/spawn-polkit-agent.c \
+       src/shared/spawn-polkit-agent.h src/shared/clock-util.c \
+       src/shared/clock-util.h src/shared/time-dst.c \
+       src/shared/time-dst.h src/shared/calendarspec.c \
+       src/shared/calendarspec.h src/shared/fileio.c \
+       src/shared/fileio.h src/shared/output-mode.h \
+       src/shared/MurmurHash2.c src/shared/MurmurHash2.h \
+       src/shared/acpi-fpdt.h src/shared/acpi-fpdt.c \
+       src/shared/boot-timestamps.h src/shared/boot-timestamps.c \
+       src/shared/mkdir.c src/shared/mkdir.h src/shared/smack-util.c \
+       src/shared/smack-util.h src/shared/apparmor-util.c \
+       src/shared/apparmor-util.h src/shared/ima-util.c \
+       src/shared/ima-util.h src/shared/ptyfwd.c src/shared/ptyfwd.h \
+       src/shared/errno-list.c src/shared/errno-list.h \
+       src/shared/af-list.c src/shared/af-list.h \
+       src/shared/arphrd-list.c src/shared/arphrd-list.h \
+       src/shared/audit.c src/shared/audit.h src/shared/xml.c \
+       src/shared/xml.h src/shared/condition-util.c \
+       src/shared/condition-util.h src/shared/bus-label.c \
+       src/shared/bus-label.h src/shared/gpt.h src/shared/clean-ipc.h \
+       src/shared/clean-ipc.c src/shared/login-shared.c \
+       src/shared/login-shared.h src/shared/ring.c src/shared/ring.h \
+       src/shared/barrier.c src/shared/barrier.h src/shared/pty.c \
+       src/shared/pty.h src/shared/async.c src/shared/async.h \
+       src/shared/copy.c src/shared/copy.h \
+       src/shared/base-filesystem.c src/shared/base-filesystem.h \
+       src/shared/memfd.c src/shared/memfd.h src/shared/uid-range.c \
+       src/shared/uid-range.h src/shared/nss-util.h \
+       src/shared/utmp-wtmp.c
+@HAVE_UTMP_TRUE@am__objects_4 =  \
+@HAVE_UTMP_TRUE@       src/shared/libsystemd_shared_la-utmp-wtmp.lo
 am_libsystemd_shared_la_OBJECTS =  \
        src/shared/libsystemd_shared_la-device-nodes.lo \
        src/shared/libsystemd_shared_la-util.lo \
@@ -1895,6 +2154,8 @@ am_libsystemd_shared_la_OBJECTS =  \
        src/shared/libsystemd_shared_la-efivars.lo \
        src/shared/libsystemd_shared_la-path-util.lo \
        src/shared/libsystemd_shared_la-time-util.lo \
+       src/shared/libsystemd_shared_la-locale-util.lo \
+       src/shared/libsystemd_shared_la-mempool.lo \
        src/shared/libsystemd_shared_la-hashmap.lo \
        src/shared/libsystemd_shared_la-siphash24.lo \
        src/shared/libsystemd_shared_la-set.lo \
@@ -1913,11 +2174,11 @@ am_libsystemd_shared_la_OBJECTS =  \
        src/shared/libsystemd_shared_la-gunicode.lo \
        src/shared/libsystemd_shared_la-pager.lo \
        src/shared/libsystemd_shared_la-socket-util.lo \
+       src/shared/libsystemd_shared_la-in-addr-util.lo \
        src/shared/libsystemd_shared_la-conf-files.lo \
        src/shared/libsystemd_shared_la-cgroup-util.lo \
        src/shared/libsystemd_shared_la-cgroup-show.lo \
        src/shared/libsystemd_shared_la-unit-name.lo \
-       src/shared/libsystemd_shared_la-utmp-wtmp.lo \
        src/shared/libsystemd_shared_la-watchdog.lo \
        src/shared/libsystemd_shared_la-spawn-ask-password-agent.lo \
        src/shared/libsystemd_shared_la-replace-var.lo \
@@ -1936,6 +2197,7 @@ am_libsystemd_shared_la_OBJECTS =  \
        src/shared/libsystemd_shared_la-ptyfwd.lo \
        src/shared/libsystemd_shared_la-errno-list.lo \
        src/shared/libsystemd_shared_la-af-list.lo \
+       src/shared/libsystemd_shared_la-arphrd-list.lo \
        src/shared/libsystemd_shared_la-audit.lo \
        src/shared/libsystemd_shared_la-xml.lo \
        src/shared/libsystemd_shared_la-condition-util.lo \
@@ -1943,10 +2205,13 @@ am_libsystemd_shared_la_OBJECTS =  \
        src/shared/libsystemd_shared_la-clean-ipc.lo \
        src/shared/libsystemd_shared_la-login-shared.lo \
        src/shared/libsystemd_shared_la-ring.lo \
+       src/shared/libsystemd_shared_la-barrier.lo \
+       src/shared/libsystemd_shared_la-pty.lo \
        src/shared/libsystemd_shared_la-async.lo \
-       src/shared/libsystemd_shared_la-eventfd-util.lo \
        src/shared/libsystemd_shared_la-copy.lo \
-       src/shared/libsystemd_shared_la-base-filesystem.lo
+       src/shared/libsystemd_shared_la-base-filesystem.lo \
+       src/shared/libsystemd_shared_la-memfd.lo \
+       src/shared/libsystemd_shared_la-uid-range.lo $(am__objects_4)
 nodist_libsystemd_shared_la_OBJECTS =
 libsystemd_shared_la_OBJECTS = $(am_libsystemd_shared_la_OBJECTS) \
        $(nodist_libsystemd_shared_la_OBJECTS)
@@ -1954,23 +2219,46 @@ libsystemd_shared_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(libsystemd_shared_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
+libsystemd_terminal_la_DEPENDENCIES = libudev-internal.la \
+       libsystemd-internal.la libsystemd-shared.la \
+       $(am__DEPENDENCIES_1)
+am_libsystemd_terminal_la_OBJECTS =  \
+       src/libsystemd-terminal/libsystemd_terminal_la-grdev.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-grdev-drm.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-idev.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-idev-evdev.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-idev-keyboard.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-sysview.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-term-charset.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-term-page.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-term-parser.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-term-screen.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-term-wcwidth.lo \
+       src/libsystemd-terminal/libsystemd_terminal_la-unifont.lo
+libsystemd_terminal_la_OBJECTS = $(am_libsystemd_terminal_la_OBJECTS)
+libsystemd_terminal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+@ENABLE_TERMINAL_TRUE@am_libsystemd_terminal_la_rpath =
 libsystemd_units_la_LIBADD =
 am_libsystemd_units_la_OBJECTS = src/shared/install.lo \
        src/shared/install-printf.lo src/shared/path-lookup.lo \
        src/shared/specifier.lo
 libsystemd_units_la_OBJECTS = $(am_libsystemd_units_la_OBJECTS)
 am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
-am__DEPENDENCIES_5 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
+am__DEPENDENCIES_5 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_3)
 libsystemd_la_DEPENDENCIES = libsystemd-shared.la \
        $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \
        $(am__DEPENDENCIES_1)
 am__libsystemd_la_SOURCES_DIST = src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h src/systemd/sd-bus-vtable.h \
-       src/systemd/sd-memfd.h src/systemd/sd-utf8.h \
-       src/systemd/sd-event.h src/systemd/sd-rtnl.h \
-       src/systemd/sd-resolve.h src/systemd/sd-login.h \
-       src/systemd/sd-id128.h src/systemd/sd-daemon.h \
-       src/systemd/sd-path.h src/libsystemd/sd-bus/sd-bus.c \
+       src/systemd/sd-utf8.h src/systemd/sd-event.h \
+       src/systemd/sd-rtnl.h src/systemd/sd-resolve.h \
+       src/systemd/sd-login.h src/systemd/sd-id128.h \
+       src/systemd/sd-daemon.h src/systemd/sd-path.h \
+       src/systemd/sd-network.h src/libsystemd/sd-bus/sd-bus.c \
        src/libsystemd/sd-bus/bus-control.c \
        src/libsystemd/sd-bus/bus-control.h \
        src/libsystemd/sd-bus/bus-error.c \
@@ -2009,8 +2297,7 @@ am__libsystemd_la_SOURCES_DIST = src/systemd/sd-bus.h \
        src/libsystemd/sd-bus/bus-slot.c \
        src/libsystemd/sd-bus/bus-slot.h \
        src/libsystemd/sd-bus/bus-protocol.h \
-       src/libsystemd/sd-bus/kdbus.h src/libsystemd/sd-bus/sd-memfd.c \
-       src/libsystemd/sd-utf8/sd-utf8.c \
+       src/libsystemd/sd-bus/kdbus.h src/libsystemd/sd-utf8/sd-utf8.c \
        src/libsystemd/sd-event/sd-event.c \
        src/libsystemd/sd-event/event-util.h \
        src/libsystemd/sd-rtnl/sd-rtnl.c \
@@ -2020,10 +2307,15 @@ am__libsystemd_la_SOURCES_DIST = src/systemd/sd-bus.h \
        src/libsystemd/sd-rtnl/rtnl-types.c \
        src/libsystemd/sd-rtnl/rtnl-util.h \
        src/libsystemd/sd-rtnl/rtnl-util.c \
+       src/libsystemd/sd-rtnl/local-addresses.h \
+       src/libsystemd/sd-rtnl/local-addresses.c \
        src/libsystemd/sd-id128/sd-id128.c \
        src/libsystemd/sd-daemon/sd-daemon.c \
        src/libsystemd/sd-login/sd-login.c \
        src/libsystemd/sd-path/sd-path.c \
+       src/libsystemd/sd-network/sd-network.c \
+       src/libsystemd/sd-network/network-util.h \
+       src/libsystemd/sd-network/network-util.c \
        src/libsystemd/sd-resolve/sd-resolve.c \
        src/libsystemd/sd-resolve/resolve-util.h \
        src/journal/sd-journal.c src/systemd/sd-journal.h \
@@ -2058,35 +2350,36 @@ am__objects_5 = src/libsystemd/sd-bus/libsystemd_la-sd-bus.lo \
        src/libsystemd/sd-bus/libsystemd_la-bus-track.lo \
        src/libsystemd/sd-bus/libsystemd_la-bus-util.lo \
        src/libsystemd/sd-bus/libsystemd_la-bus-slot.lo \
-       src/libsystemd/sd-bus/libsystemd_la-sd-memfd.lo \
        src/libsystemd/sd-utf8/libsystemd_la-sd-utf8.lo \
        src/libsystemd/sd-event/libsystemd_la-sd-event.lo \
        src/libsystemd/sd-rtnl/libsystemd_la-sd-rtnl.lo \
        src/libsystemd/sd-rtnl/libsystemd_la-rtnl-message.lo \
        src/libsystemd/sd-rtnl/libsystemd_la-rtnl-types.lo \
        src/libsystemd/sd-rtnl/libsystemd_la-rtnl-util.lo \
+       src/libsystemd/sd-rtnl/libsystemd_la-local-addresses.lo \
        src/libsystemd/sd-id128/libsystemd_la-sd-id128.lo \
        src/libsystemd/sd-daemon/libsystemd_la-sd-daemon.lo \
        src/libsystemd/sd-login/libsystemd_la-sd-login.lo \
-       src/libsystemd/sd-path/libsystemd_la-sd-path.lo
+       src/libsystemd/sd-path/libsystemd_la-sd-path.lo \
+       src/libsystemd/sd-network/libsystemd_la-sd-network.lo \
+       src/libsystemd/sd-network/libsystemd_la-network-util.lo
 am__objects_6 = src/libsystemd/sd-resolve/libsystemd_la-sd-resolve.lo
-@HAVE_XZ_TRUE@am__objects_7 = src/journal/libsystemd_la-compress.lo
-@HAVE_GCRYPT_TRUE@am__objects_8 = src/journal/libsystemd_la-journal-authenticate.lo \
+@HAVE_GCRYPT_TRUE@am__objects_7 = src/journal/libsystemd_la-journal-authenticate.lo \
 @HAVE_GCRYPT_TRUE@     src/journal/libsystemd_la-fsprg.lo
-am__objects_9 = src/journal/libsystemd_la-sd-journal.lo \
+am__objects_8 = src/journal/libsystemd_la-sd-journal.lo \
        src/journal/libsystemd_la-journal-file.lo \
        src/journal/libsystemd_la-journal-vacuum.lo \
        src/journal/libsystemd_la-journal-verify.lo \
        src/journal/libsystemd_la-lookup3.lo \
        src/journal/libsystemd_la-journal-send.lo \
        src/journal/libsystemd_la-catalog.lo \
-       src/journal/libsystemd_la-mmap-cache.lo $(am__objects_7) \
-       $(am__objects_8)
+       src/journal/libsystemd_la-mmap-cache.lo \
+       src/journal/libsystemd_la-compress.lo $(am__objects_7)
 am_libsystemd_la_OBJECTS = $(am__objects_5) $(am__objects_6) \
-       $(am__objects_9)
-am__objects_10 =  \
+       $(am__objects_8)
+am__objects_9 =  \
        src/libsystemd/sd-bus/libsystemd_la-bus-error-mapping.lo
-nodist_libsystemd_la_OBJECTS = $(am__objects_10)
+nodist_libsystemd_la_OBJECTS = $(am__objects_9)
 libsystemd_la_OBJECTS = $(am_libsystemd_la_OBJECTS) \
        $(nodist_libsystemd_la_OBJECTS)
 libsystemd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -2095,7 +2388,7 @@ libsystemd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 libudev_core_la_DEPENDENCIES = libudev-internal.la libsystemd-label.la \
        libsystemd-internal.la libsystemd-network.la \
        libsystemd-shared.la $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1) $(am__append_104)
+       $(am__DEPENDENCIES_1) $(am__append_127)
 am__libudev_core_la_SOURCES_DIST = src/udev/udev.h \
        src/udev/udev-event.c src/udev/udev-watch.c \
        src/udev/udev-node.c src/udev/udev-rules.c \
@@ -2108,15 +2401,13 @@ am__libudev_core_la_SOURCES_DIST = src/udev/udev.h \
        src/udev/udev-builtin-path_id.c src/udev/udev-builtin-usb_id.c \
        src/udev/net/link-config.h src/udev/net/link-config.c \
        src/udev/net/ethtool-util.h src/udev/net/ethtool-util.c \
-       src/udev/udev-builtin-firmware.c src/udev/udev-builtin-kmod.c \
-       src/udev/udev-builtin-blkid.c src/udev/udev-builtin-uaccess.c \
-       src/login/logind-acl.c src/libsystemd/sd-login/sd-login.c \
-       src/systemd/sd-login.h
-@ENABLE_FIRMWARE_TRUE@am__objects_11 = src/udev/libudev_core_la-udev-builtin-firmware.lo
-@HAVE_KMOD_TRUE@am__objects_12 =  \
+       src/udev/udev-builtin-kmod.c src/udev/udev-builtin-blkid.c \
+       src/udev/udev-builtin-uaccess.c src/login/logind-acl.c \
+       src/libsystemd/sd-login/sd-login.c src/systemd/sd-login.h
+@HAVE_KMOD_TRUE@am__objects_10 =  \
 @HAVE_KMOD_TRUE@       src/udev/libudev_core_la-udev-builtin-kmod.lo
-@HAVE_BLKID_TRUE@am__objects_13 = src/udev/libudev_core_la-udev-builtin-blkid.lo
-@HAVE_ACL_TRUE@am__objects_14 = src/udev/libudev_core_la-udev-builtin-uaccess.lo \
+@HAVE_BLKID_TRUE@am__objects_11 = src/udev/libudev_core_la-udev-builtin-blkid.lo
+@HAVE_ACL_TRUE@am__objects_12 = src/udev/libudev_core_la-udev-builtin-uaccess.lo \
 @HAVE_ACL_TRUE@        src/login/libudev_core_la-logind-acl.lo \
 @HAVE_ACL_TRUE@        src/libsystemd/sd-login/libudev_core_la-sd-login.lo
 am_libudev_core_la_OBJECTS = src/udev/libudev_core_la-udev-event.lo \
@@ -2134,8 +2425,8 @@ am_libudev_core_la_OBJECTS = src/udev/libudev_core_la-udev-event.lo \
        src/udev/libudev_core_la-udev-builtin-path_id.lo \
        src/udev/libudev_core_la-udev-builtin-usb_id.lo \
        src/udev/net/libudev_core_la-link-config.lo \
-       src/udev/net/libudev_core_la-ethtool-util.lo $(am__objects_11) \
-       $(am__objects_12) $(am__objects_13) $(am__objects_14)
+       src/udev/net/libudev_core_la-ethtool-util.lo $(am__objects_10) \
+       $(am__objects_11) $(am__objects_12)
 nodist_libudev_core_la_OBJECTS =  \
        src/udev/net/libudev_core_la-link-config-gperf.lo
 libudev_core_la_OBJECTS = $(am_libudev_core_la_OBJECTS) \
@@ -2145,7 +2436,7 @@ libudev_core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(libudev_core_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
        -o $@
 libudev_internal_la_LIBADD =
-am__objects_15 = src/libudev/libudev_internal_la-libudev.lo \
+am__objects_13 = src/libudev/libudev_internal_la-libudev.lo \
        src/libudev/libudev_internal_la-libudev-list.lo \
        src/libudev/libudev_internal_la-libudev-util.lo \
        src/libudev/libudev_internal_la-libudev-device.lo \
@@ -2153,7 +2444,7 @@ am__objects_15 = src/libudev/libudev_internal_la-libudev.lo \
        src/libudev/libudev_internal_la-libudev-monitor.lo \
        src/libudev/libudev_internal_la-libudev-queue.lo \
        src/libudev/libudev_internal_la-libudev-hwdb.lo
-am_libudev_internal_la_OBJECTS = $(am__objects_15) \
+am_libudev_internal_la_OBJECTS = $(am__objects_13) \
        src/libudev/libudev_internal_la-libudev-device-private.lo
 libudev_internal_la_OBJECTS = $(am_libudev_internal_la_OBJECTS)
 libudev_internal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -2205,100 +2496,117 @@ pam_systemd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 @ENABLE_HOSTNAMED_TRUE@am__EXEEXT_3 = hostnamectl$(EXEEXT)
 @ENABLE_LOCALED_TRUE@am__EXEEXT_4 = localectl$(EXEEXT)
 @ENABLE_TIMEDATED_TRUE@am__EXEEXT_5 = timedatectl$(EXEEXT)
-@HAVE_KMOD_TRUE@am__EXEEXT_6 = test-rtnl-manual$(EXEEXT)
-@ENABLE_EFI_TRUE@am__EXEEXT_7 = test-boot-timestamp$(EXEEXT)
-@ENABLE_COREDUMP_TRUE@am__EXEEXT_8 = test-coredump-vacuum$(EXEEXT)
-@ENABLE_READAHEAD_TRUE@am__EXEEXT_9 = test-ssd$(EXEEXT)
+@ENABLE_TERMINAL_TRUE@am__EXEEXT_6 = systemd-evcat$(EXEEXT) \
+@ENABLE_TERMINAL_TRUE@ systemd-modeset$(EXEEXT) \
+@ENABLE_TERMINAL_TRUE@ systemd-subterm$(EXEEXT)
+@HAVE_KMOD_TRUE@am__EXEEXT_7 = test-rtnl-manual$(EXEEXT)
+@ENABLE_EFI_TRUE@am__EXEEXT_8 = test-boot-timestamp$(EXEEXT)
+@ENABLE_COREDUMP_TRUE@am__EXEEXT_9 = test-coredump-vacuum$(EXEEXT)
 @ENABLE_LOGIND_TRUE@am__EXEEXT_10 = test-login$(EXEEXT) \
 @ENABLE_LOGIND_TRUE@   test-inhibit$(EXEEXT)
-am__EXEEXT_11 = test-engine$(EXEEXT) test-ns$(EXEEXT) \
-       test-loopback$(EXEEXT) test-hostname$(EXEEXT) \
-       test-daemon$(EXEEXT) test-cgroup$(EXEEXT) \
-       test-cgroup-mask$(EXEEXT) test-install$(EXEEXT) \
+am__EXEEXT_11 = test-ns$(EXEEXT) test-loopback$(EXEEXT) \
+       test-hostname$(EXEEXT) test-daemon$(EXEEXT) \
+       test-cgroup$(EXEEXT) test-install$(EXEEXT) \
        test-watchdog$(EXEEXT) test-log$(EXEEXT) test-ipcrm$(EXEEXT) \
-       $(am__EXEEXT_6) $(am__EXEEXT_7) test-libudev$(EXEEXT) \
-       test-udev$(EXEEXT) test-journal-enum$(EXEEXT) $(am__EXEEXT_8) \
-       $(am__EXEEXT_9) $(am__EXEEXT_10)
-@HAVE_XZ_TRUE@am__EXEEXT_12 = test-compress$(EXEEXT)
-@ENABLE_MACHINED_TRUE@am__EXEEXT_13 = test-machine-tables$(EXEEXT)
-@ENABLE_NETWORKD_TRUE@am__EXEEXT_14 = test-network$(EXEEXT)
-@ENABLE_LOGIND_TRUE@am__EXEEXT_15 = test-login-tables$(EXEEXT) \
+       $(am__EXEEXT_7) $(am__EXEEXT_8) test-libudev$(EXEEXT) \
+       test-udev$(EXEEXT) test-journal-enum$(EXEEXT) $(am__EXEEXT_9) \
+       $(am__EXEEXT_10)
+@ENABLE_TERMINAL_TRUE@am__EXEEXT_12 = test-term-page$(EXEEXT) \
+@ENABLE_TERMINAL_TRUE@ test-term-parser$(EXEEXT) \
+@ENABLE_TERMINAL_TRUE@ test-unifont$(EXEEXT)
+@HAVE_COMPRESSION_TRUE@am__EXEEXT_13 = test-compress$(EXEEXT) \
+@HAVE_COMPRESSION_TRUE@        test-compress-benchmark$(EXEEXT)
+@ENABLE_MACHINED_TRUE@am__EXEEXT_14 = test-machine-tables$(EXEEXT)
+@ENABLE_RESOLVED_TRUE@am__EXEEXT_15 = test-dns-domain$(EXEEXT)
+@ENABLE_NETWORKD_TRUE@am__EXEEXT_16 = test-network$(EXEEXT) \
+@ENABLE_NETWORKD_TRUE@ test-network-tables$(EXEEXT)
+@ENABLE_LOGIND_TRUE@am__EXEEXT_17 = test-login-tables$(EXEEXT) \
 @ENABLE_LOGIND_TRUE@   test-login-shared$(EXEEXT)
-am__EXEEXT_16 = test-job-type$(EXEEXT) test-env-replace$(EXEEXT) \
+am__EXEEXT_18 = test-engine$(EXEEXT) test-cgroup-mask$(EXEEXT) \
+       test-job-type$(EXEEXT) test-env-replace$(EXEEXT) \
        test-strbuf$(EXEEXT) test-strv$(EXEEXT) \
        test-path-util$(EXEEXT) test-strxcpyx$(EXEEXT) \
        test-unit-name$(EXEEXT) test-unit-file$(EXEEXT) \
        test-utf8$(EXEEXT) test-ellipsize$(EXEEXT) test-util$(EXEEXT) \
-       test-ring$(EXEEXT) test-tmpfiles$(EXEEXT) \
-       test-namespace$(EXEEXT) test-date$(EXEEXT) test-sleep$(EXEEXT) \
+       test-ring$(EXEEXT) test-barrier$(EXEEXT) test-pty$(EXEEXT) \
+       test-tmpfiles$(EXEEXT) test-namespace$(EXEEXT) \
+       test-date$(EXEEXT) test-sleep$(EXEEXT) \
        test-replace-var$(EXEEXT) test-sched-prio$(EXEEXT) \
        test-calendarspec$(EXEEXT) test-strip-tab-ansi$(EXEEXT) \
        test-cgroup-util$(EXEEXT) test-prioq$(EXEEXT) \
        test-fileio$(EXEEXT) test-time$(EXEEXT) test-hashmap$(EXEEXT) \
-       test-list$(EXEEXT) test-tables$(EXEEXT) \
+       test-set$(EXEEXT) test-list$(EXEEXT) test-tables$(EXEEXT) \
        test-device-nodes$(EXEEXT) test-xml$(EXEEXT) \
        test-architecture$(EXEEXT) test-socket-util$(EXEEXT) \
        test-fdset$(EXEEXT) test-conf-files$(EXEEXT) \
        test-capability$(EXEEXT) test-async$(EXEEXT) \
-       test-ratelimit$(EXEEXT) test-bus-marshal$(EXEEXT) \
-       test-bus-signature$(EXEEXT) test-bus-chat$(EXEEXT) \
-       test-bus-cleanup$(EXEEXT) test-bus-server$(EXEEXT) \
-       test-bus-match$(EXEEXT) test-bus-kernel$(EXEEXT) \
-       test-bus-kernel-bloom$(EXEEXT) \
-       test-bus-kernel-benchmark$(EXEEXT) test-bus-memfd$(EXEEXT) \
-       test-bus-zero-copy$(EXEEXT) test-bus-introspect$(EXEEXT) \
-       test-bus-objects$(EXEEXT) test-bus-error$(EXEEXT) \
-       test-bus-creds$(EXEEXT) test-bus-gvariant$(EXEEXT) \
-       test-event$(EXEEXT) test-rtnl$(EXEEXT) test-resolve$(EXEEXT) \
+       test-ratelimit$(EXEEXT) test-condition-util$(EXEEXT) \
+       test-uid-range$(EXEEXT) test-bus-policy$(EXEEXT) \
+       test-bus-marshal$(EXEEXT) test-bus-signature$(EXEEXT) \
+       test-bus-chat$(EXEEXT) test-bus-cleanup$(EXEEXT) \
+       test-bus-server$(EXEEXT) test-bus-match$(EXEEXT) \
+       test-bus-kernel$(EXEEXT) test-bus-kernel-bloom$(EXEEXT) \
+       test-bus-kernel-benchmark$(EXEEXT) test-bus-zero-copy$(EXEEXT) \
+       test-bus-introspect$(EXEEXT) test-bus-objects$(EXEEXT) \
+       test-bus-error$(EXEEXT) test-bus-creds$(EXEEXT) \
+       test-bus-gvariant$(EXEEXT) test-event$(EXEEXT) \
+       test-rtnl$(EXEEXT) test-resolve$(EXEEXT) \
        test-dhcp-option$(EXEEXT) test-dhcp-client$(EXEEXT) \
        test-dhcp-server$(EXEEXT) test-ipv4ll$(EXEEXT) \
        test-icmp6-rs$(EXEEXT) test-dhcp6-client$(EXEEXT) \
-       test-id128$(EXEEXT) test-journal$(EXEEXT) \
+       $(am__EXEEXT_12) test-id128$(EXEEXT) test-journal$(EXEEXT) \
        test-journal-send$(EXEEXT) test-journal-syslog$(EXEEXT) \
        test-journal-match$(EXEEXT) test-journal-stream$(EXEEXT) \
        test-journal-init$(EXEEXT) test-journal-verify$(EXEEXT) \
        test-journal-interleaving$(EXEEXT) test-journal-flush$(EXEEXT) \
        test-mmap-cache$(EXEEXT) test-catalog$(EXEEXT) \
-       $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) \
-       $(am__EXEEXT_15) test-libsystemd-sym$(EXEEXT) \
+       $(am__EXEEXT_13) $(am__EXEEXT_14) $(am__EXEEXT_15) \
+       $(am__EXEEXT_16) $(am__EXEEXT_17) test-libsystemd-sym$(EXEEXT) \
        test-libudev-sym$(EXEEXT)
-@ENABLE_TMPFILES_TRUE@am__EXEEXT_17 = systemd-tmpfiles$(EXEEXT)
-@ENABLE_SYSUSERS_TRUE@am__EXEEXT_18 = systemd-sysusers$(EXEEXT)
-@ENABLE_MACHINED_TRUE@am__EXEEXT_19 = machinectl$(EXEEXT)
-@ENABLE_LOGIND_TRUE@am__EXEEXT_20 = loginctl$(EXEEXT) \
+@ENABLE_TMPFILES_TRUE@am__EXEEXT_19 = systemd-tmpfiles$(EXEEXT)
+@ENABLE_SYSUSERS_TRUE@am__EXEEXT_20 = systemd-sysusers$(EXEEXT)
+@ENABLE_FIRSTBOOT_TRUE@am__EXEEXT_21 = systemd-firstboot$(EXEEXT)
+@ENABLE_MACHINED_TRUE@am__EXEEXT_22 = machinectl$(EXEEXT)
+@ENABLE_NETWORKD_TRUE@am__EXEEXT_23 = networkctl$(EXEEXT)
+@ENABLE_LOGIND_TRUE@am__EXEEXT_24 = loginctl$(EXEEXT) \
 @ENABLE_LOGIND_TRUE@   systemd-inhibit$(EXEEXT)
-@HAVE_KMOD_TRUE@am__EXEEXT_21 = systemd-modules-load$(EXEEXT)
-@HAVE_MICROHTTPD_TRUE@am__EXEEXT_22 = systemd-journal-remote$(EXEEXT)
-@HAVE_MICROHTTPD_TRUE@am__EXEEXT_23 =  \
+@HAVE_UTMP_TRUE@am__EXEEXT_25 = systemd-update-utmp$(EXEEXT)
+@HAVE_KMOD_TRUE@am__EXEEXT_26 = systemd-modules-load$(EXEEXT)
+@ENABLE_HIBERNATE_TRUE@am__EXEEXT_27 =  \
+@ENABLE_HIBERNATE_TRUE@        systemd-hibernate-resume$(EXEEXT)
+@ENABLE_TERMINAL_TRUE@am__EXEEXT_28 = systemd-consoled$(EXEEXT)
+@HAVE_MICROHTTPD_TRUE@am__EXEEXT_29 = systemd-journal-remote$(EXEEXT)
+@HAVE_LIBCURL_TRUE@am__EXEEXT_30 = systemd-journal-upload$(EXEEXT)
+@HAVE_MICROHTTPD_TRUE@am__EXEEXT_31 =  \
 @HAVE_MICROHTTPD_TRUE@ systemd-journal-gatewayd$(EXEEXT)
-@ENABLE_COREDUMP_TRUE@am__EXEEXT_24 = systemd-coredump$(EXEEXT)
-@ENABLE_BINFMT_TRUE@am__EXEEXT_25 = systemd-binfmt$(EXEEXT)
-@ENABLE_VCONSOLE_TRUE@am__EXEEXT_26 = systemd-vconsole-setup$(EXEEXT)
-@ENABLE_READAHEAD_TRUE@am__EXEEXT_27 = systemd-readahead$(EXEEXT)
-@ENABLE_BOOTCHART_TRUE@am__EXEEXT_28 = systemd-bootchart$(EXEEXT)
-@ENABLE_QUOTACHECK_TRUE@am__EXEEXT_29 = systemd-quotacheck$(EXEEXT)
-@ENABLE_RANDOMSEED_TRUE@am__EXEEXT_30 = systemd-random-seed$(EXEEXT)
-@ENABLE_BACKLIGHT_TRUE@am__EXEEXT_31 = systemd-backlight$(EXEEXT)
-@ENABLE_RFKILL_TRUE@am__EXEEXT_32 = systemd-rfkill$(EXEEXT)
-@HAVE_LIBCRYPTSETUP_TRUE@am__EXEEXT_33 = systemd-cryptsetup$(EXEEXT)
-@ENABLE_HOSTNAMED_TRUE@am__EXEEXT_34 = systemd-hostnamed$(EXEEXT)
-@ENABLE_LOCALED_TRUE@am__EXEEXT_35 = systemd-localed$(EXEEXT)
-@ENABLE_TIMEDATED_TRUE@am__EXEEXT_36 = systemd-timedated$(EXEEXT)
-@ENABLE_TIMESYNCD_TRUE@am__EXEEXT_37 = systemd-timesyncd$(EXEEXT)
-@ENABLE_MACHINED_TRUE@am__EXEEXT_38 = systemd-machined$(EXEEXT)
-@ENABLE_RESOLVED_TRUE@am__EXEEXT_39 = systemd-resolved$(EXEEXT)
-@ENABLE_NETWORKD_TRUE@am__EXEEXT_40 = systemd-networkd$(EXEEXT) \
+@ENABLE_COREDUMP_TRUE@am__EXEEXT_32 = systemd-coredump$(EXEEXT)
+@ENABLE_BINFMT_TRUE@am__EXEEXT_33 = systemd-binfmt$(EXEEXT)
+@ENABLE_VCONSOLE_TRUE@am__EXEEXT_34 = systemd-vconsole-setup$(EXEEXT)
+@ENABLE_BOOTCHART_TRUE@am__EXEEXT_35 = systemd-bootchart$(EXEEXT)
+@ENABLE_QUOTACHECK_TRUE@am__EXEEXT_36 = systemd-quotacheck$(EXEEXT)
+@ENABLE_RANDOMSEED_TRUE@am__EXEEXT_37 = systemd-random-seed$(EXEEXT)
+@ENABLE_BACKLIGHT_TRUE@am__EXEEXT_38 = systemd-backlight$(EXEEXT)
+@ENABLE_RFKILL_TRUE@am__EXEEXT_39 = systemd-rfkill$(EXEEXT)
+@HAVE_LIBCRYPTSETUP_TRUE@am__EXEEXT_40 = systemd-cryptsetup$(EXEEXT)
+@ENABLE_HOSTNAMED_TRUE@am__EXEEXT_41 = systemd-hostnamed$(EXEEXT)
+@ENABLE_LOCALED_TRUE@am__EXEEXT_42 = systemd-localed$(EXEEXT)
+@ENABLE_TIMEDATED_TRUE@am__EXEEXT_43 = systemd-timedated$(EXEEXT)
+@ENABLE_TIMESYNCD_TRUE@am__EXEEXT_44 = systemd-timesyncd$(EXEEXT)
+@ENABLE_MACHINED_TRUE@am__EXEEXT_45 = systemd-machined$(EXEEXT)
+@ENABLE_RESOLVED_TRUE@am__EXEEXT_46 = systemd-resolved$(EXEEXT) \
+@ENABLE_RESOLVED_TRUE@ systemd-resolve-host$(EXEEXT)
+@ENABLE_NETWORKD_TRUE@am__EXEEXT_47 = systemd-networkd$(EXEEXT) \
 @ENABLE_NETWORKD_TRUE@ systemd-networkd-wait-online$(EXEEXT)
-@ENABLE_LOGIND_TRUE@am__EXEEXT_41 = systemd-logind$(EXEEXT) \
+@ENABLE_LOGIND_TRUE@am__EXEEXT_48 = systemd-logind$(EXEEXT) \
 @ENABLE_LOGIND_TRUE@   systemd-user-sessions$(EXEEXT)
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@am__EXEEXT_42 = systemd-multi-seat-x$(EXEEXT)
-@HAVE_SYSV_COMPAT_TRUE@am__EXEEXT_43 =  \
+@HAVE_SYSV_COMPAT_TRUE@am__EXEEXT_49 =  \
 @HAVE_SYSV_COMPAT_TRUE@        systemd-sysv-generator$(EXEEXT) \
 @HAVE_SYSV_COMPAT_TRUE@        systemd-rc-local-generator$(EXEEXT)
-@ENABLE_EFI_TRUE@am__EXEEXT_44 = systemd-efi-boot-generator$(EXEEXT)
-@HAVE_BLKID_TRUE@am__EXEEXT_45 = systemd-gpt-auto-generator$(EXEEXT)
-@ENABLE_KDBUS_TRUE@am__EXEEXT_46 = systemd-dbus1-generator$(EXEEXT)
-@HAVE_LIBCRYPTSETUP_TRUE@am__EXEEXT_47 = systemd-cryptsetup-generator$(EXEEXT)
+@ENABLE_HIBERNATE_TRUE@am__EXEEXT_50 = systemd-hibernate-resume-generator$(EXEEXT)
+@ENABLE_EFI_TRUE@am__EXEEXT_51 = systemd-efi-boot-generator$(EXEEXT)
+@HAVE_BLKID_TRUE@am__EXEEXT_52 = systemd-gpt-auto-generator$(EXEEXT)
+@ENABLE_KDBUS_TRUE@am__EXEEXT_53 = systemd-dbus1-generator$(EXEEXT)
+@HAVE_LIBCRYPTSETUP_TRUE@am__EXEEXT_54 = systemd-cryptsetup-generator$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(rootbin_PROGRAMS) \
        $(rootlibexec_PROGRAMS) $(systemgenerator_PROGRAMS) \
        $(udevlibexec_PROGRAMS)
@@ -2348,14 +2656,14 @@ hostnamectl_OBJECTS = $(am_hostnamectl_OBJECTS)
 @ENABLE_HOSTNAMED_TRUE@        libsystemd-shared.la
 am__journalctl_SOURCES_DIST = src/journal/journalctl.c \
        src/journal/journal-qrcode.c src/journal/journal-qrcode.h
-@HAVE_QRENCODE_TRUE@am__objects_16 = src/journal/journalctl-journal-qrcode.$(OBJEXT)
+@HAVE_QRENCODE_TRUE@am__objects_14 = src/journal/journalctl-journal-qrcode.$(OBJEXT)
 am_journalctl_OBJECTS = src/journal/journalctl-journalctl.$(OBJEXT) \
-       $(am__objects_16)
+       $(am__objects_14)
 journalctl_OBJECTS = $(am_journalctl_OBJECTS)
 @HAVE_QRENCODE_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1)
 journalctl_DEPENDENCIES = libsystemd-journal-internal.la \
        libsystemd-internal.la libsystemd-logs.la libsystemd-shared.la \
-       $(am__append_116) $(am__DEPENDENCIES_6)
+       $(am__append_149) $(am__DEPENDENCIES_6)
 journalctl_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(journalctl_CFLAGS) \
        $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
@@ -2384,6 +2692,14 @@ am_mtd_probe_OBJECTS = src/udev/mtd_probe/mtd_probe.$(OBJEXT) \
        src/udev/mtd_probe/probe_smartmedia.$(OBJEXT)
 mtd_probe_OBJECTS = $(am_mtd_probe_OBJECTS)
 mtd_probe_LDADD = $(LDADD)
+am__networkctl_SOURCES_DIST = src/network/networkctl.c
+@ENABLE_NETWORKD_TRUE@am_networkctl_OBJECTS =  \
+@ENABLE_NETWORKD_TRUE@ src/network/networkctl.$(OBJEXT)
+networkctl_OBJECTS = $(am_networkctl_OBJECTS)
+@ENABLE_NETWORKD_TRUE@networkctl_DEPENDENCIES =  \
+@ENABLE_NETWORKD_TRUE@ libsystemd-internal.la \
+@ENABLE_NETWORKD_TRUE@ libudev-internal.la libsystemd-shared.la \
+@ENABLE_NETWORKD_TRUE@ libsystemd-network.la
 am_scsi_id_OBJECTS = src/udev/scsi_id/scsi_id.$(OBJEXT) \
        src/udev/scsi_id/scsi_serial.$(OBJEXT)
 scsi_id_OBJECTS = $(am_scsi_id_OBJECTS)
@@ -2407,10 +2723,12 @@ am_systemd_activate_OBJECTS = src/activate/activate.$(OBJEXT)
 systemd_activate_OBJECTS = $(am_systemd_activate_OBJECTS)
 systemd_activate_DEPENDENCIES = libsystemd-label.la \
        libsystemd-internal.la libsystemd-shared.la
-am_systemd_analyze_OBJECTS = src/analyze/analyze.$(OBJEXT)
+am_systemd_analyze_OBJECTS = src/analyze/analyze.$(OBJEXT) \
+       src/analyze/analyze-verify.$(OBJEXT)
 systemd_analyze_OBJECTS = $(am_systemd_analyze_OBJECTS)
-systemd_analyze_DEPENDENCIES = libsystemd-internal.la \
-       libsystemd-shared.la
+systemd_analyze_DEPENDENCIES = libsystemd-core.la \
+       libsystemd-internal.la libsystemd-shared.la \
+       $(am__DEPENDENCIES_1)
 am_systemd_ask_password_OBJECTS =  \
        src/ask-password/ask-password.$(OBJEXT)
 systemd_ask_password_OBJECTS = $(am_systemd_ask_password_OBJECTS)
@@ -2460,14 +2778,29 @@ systemd_cgroups_agent_DEPENDENCIES = libsystemd-internal.la \
 am_systemd_cgtop_OBJECTS = src/cgtop/cgtop.$(OBJEXT)
 systemd_cgtop_OBJECTS = $(am_systemd_cgtop_OBJECTS)
 systemd_cgtop_DEPENDENCIES = libsystemd-shared.la
+am_systemd_consoled_OBJECTS =  \
+       src/console/systemd_consoled-consoled.$(OBJEXT) \
+       src/console/systemd_consoled-consoled-display.$(OBJEXT) \
+       src/console/systemd_consoled-consoled-manager.$(OBJEXT) \
+       src/console/systemd_consoled-consoled-session.$(OBJEXT) \
+       src/console/systemd_consoled-consoled-terminal.$(OBJEXT) \
+       src/console/systemd_consoled-consoled-workspace.$(OBJEXT)
+systemd_consoled_OBJECTS = $(am_systemd_consoled_OBJECTS)
+systemd_consoled_DEPENDENCIES = libsystemd-terminal.la \
+       libsystemd-internal.la libsystemd-shared.la \
+       $(am__DEPENDENCIES_1)
+systemd_consoled_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(systemd_consoled_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+       -o $@
 am__systemd_coredump_SOURCES_DIST = src/journal/coredump.c \
        src/journal/coredump-vacuum.c src/journal/coredump-vacuum.h \
        src/journal/stacktrace.c src/journal/stacktrace.h
-@ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@am__objects_17 = src/journal/stacktrace.$(OBJEXT)
+@ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@am__objects_15 = src/journal/stacktrace.$(OBJEXT)
 @ENABLE_COREDUMP_TRUE@am_systemd_coredump_OBJECTS =  \
 @ENABLE_COREDUMP_TRUE@ src/journal/coredump.$(OBJEXT) \
 @ENABLE_COREDUMP_TRUE@ src/journal/coredump-vacuum.$(OBJEXT) \
-@ENABLE_COREDUMP_TRUE@ $(am__objects_17)
+@ENABLE_COREDUMP_TRUE@ $(am__objects_15)
 systemd_coredump_OBJECTS = $(am_systemd_coredump_OBJECTS)
 @ENABLE_COREDUMP_TRUE@@HAVE_ELFUTILS_TRUE@am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1)
 @ENABLE_COREDUMP_TRUE@systemd_coredump_DEPENDENCIES =  \
@@ -2475,7 +2808,7 @@ systemd_coredump_OBJECTS = $(am_systemd_coredump_OBJECTS)
 @ENABLE_COREDUMP_TRUE@ libsystemd-label.la \
 @ENABLE_COREDUMP_TRUE@ libsystemd-internal.la \
 @ENABLE_COREDUMP_TRUE@ libsystemd-shared.la \
-@ENABLE_COREDUMP_TRUE@ $(am__DEPENDENCIES_7) $(am__append_136)
+@ENABLE_COREDUMP_TRUE@ $(am__DEPENDENCIES_7) $(am__append_169)
 am__systemd_cryptsetup_SOURCES_DIST = src/cryptsetup/cryptsetup.c
 @HAVE_LIBCRYPTSETUP_TRUE@am_systemd_cryptsetup_OBJECTS = src/cryptsetup/systemd_cryptsetup-cryptsetup.$(OBJEXT)
 systemd_cryptsetup_OBJECTS = $(am_systemd_cryptsetup_OBJECTS)
@@ -2524,6 +2857,27 @@ systemd_efi_boot_generator_OBJECTS =  \
        $(am_systemd_efi_boot_generator_OBJECTS)
 @ENABLE_EFI_TRUE@systemd_efi_boot_generator_DEPENDENCIES =  \
 @ENABLE_EFI_TRUE@      libsystemd-label.la libsystemd-shared.la
+am_systemd_escape_OBJECTS = src/escape/escape.$(OBJEXT)
+systemd_escape_OBJECTS = $(am_systemd_escape_OBJECTS)
+systemd_escape_DEPENDENCIES = libsystemd-shared.la
+am_systemd_evcat_OBJECTS =  \
+       src/libsystemd-terminal/systemd_evcat-evcat.$(OBJEXT)
+systemd_evcat_OBJECTS = $(am_systemd_evcat_OBJECTS)
+systemd_evcat_DEPENDENCIES = libsystemd-terminal.la \
+       libsystemd-internal.la libsystemd-shared.la \
+       $(am__DEPENDENCIES_1)
+systemd_evcat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(systemd_evcat_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__systemd_firstboot_SOURCES_DIST = src/firstboot/firstboot.c
+@ENABLE_FIRSTBOOT_TRUE@am_systemd_firstboot_OBJECTS =  \
+@ENABLE_FIRSTBOOT_TRUE@        src/firstboot/firstboot.$(OBJEXT)
+systemd_firstboot_OBJECTS = $(am_systemd_firstboot_OBJECTS)
+@ENABLE_FIRSTBOOT_TRUE@systemd_firstboot_DEPENDENCIES =  \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-units.la libsystemd-label.la \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-capability.la \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-internal.la \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-shared.la
 am_systemd_fsck_OBJECTS = src/fsck/fsck.$(OBJEXT)
 systemd_fsck_OBJECTS = $(am_systemd_fsck_OBJECTS)
 systemd_fsck_DEPENDENCIES = libsystemd-internal.la libudev-internal.la \
@@ -2555,6 +2909,22 @@ systemd_gpt_auto_generator_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(systemd_gpt_auto_generator_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
+am__systemd_hibernate_resume_SOURCES_DIST =  \
+       src/hibernate-resume/hibernate-resume.c
+@ENABLE_HIBERNATE_TRUE@am_systemd_hibernate_resume_OBJECTS = src/hibernate-resume/hibernate-resume.$(OBJEXT)
+systemd_hibernate_resume_OBJECTS =  \
+       $(am_systemd_hibernate_resume_OBJECTS)
+@ENABLE_HIBERNATE_TRUE@systemd_hibernate_resume_DEPENDENCIES =  \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-internal.la \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-shared.la
+am__systemd_hibernate_resume_generator_SOURCES_DIST =  \
+       src/hibernate-resume/hibernate-resume-generator.c
+@ENABLE_HIBERNATE_TRUE@am_systemd_hibernate_resume_generator_OBJECTS = src/hibernate-resume/hibernate-resume-generator.$(OBJEXT)
+systemd_hibernate_resume_generator_OBJECTS =  \
+       $(am_systemd_hibernate_resume_generator_OBJECTS)
+@ENABLE_HIBERNATE_TRUE@systemd_hibernate_resume_generator_DEPENDENCIES =  \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-label.la \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-shared.la
 am__systemd_hostnamed_SOURCES_DIST = src/hostname/hostnamed.c
 @ENABLE_HOSTNAMED_TRUE@am_systemd_hostnamed_OBJECTS =  \
 @ENABLE_HOSTNAMED_TRUE@        src/hostname/hostnamed.$(OBJEXT)
@@ -2575,10 +2945,11 @@ systemd_initctl_OBJECTS = $(am_systemd_initctl_OBJECTS)
 systemd_initctl_DEPENDENCIES = libsystemd-internal.la \
        libsystemd-shared.la
 am__systemd_journal_gatewayd_SOURCES_DIST =  \
-       src/journal/journal-gatewayd.c src/journal/microhttpd-util.h \
-       src/journal/microhttpd-util.c
-@HAVE_MICROHTTPD_TRUE@am_systemd_journal_gatewayd_OBJECTS = src/journal/systemd_journal_gatewayd-journal-gatewayd.$(OBJEXT) \
-@HAVE_MICROHTTPD_TRUE@ src/journal/systemd_journal_gatewayd-microhttpd-util.$(OBJEXT)
+       src/journal-remote/journal-gatewayd.c \
+       src/journal-remote/microhttpd-util.h \
+       src/journal-remote/microhttpd-util.c
+@HAVE_MICROHTTPD_TRUE@am_systemd_journal_gatewayd_OBJECTS = src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.$(OBJEXT) \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/systemd_journal_gatewayd-microhttpd-util.$(OBJEXT)
 systemd_journal_gatewayd_OBJECTS =  \
        $(am_systemd_journal_gatewayd_OBJECTS)
 @HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@am__DEPENDENCIES_8 =  \
@@ -2595,16 +2966,18 @@ systemd_journal_gatewayd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
 am__systemd_journal_remote_SOURCES_DIST =  \
-       src/journal/journal-remote-parse.h \
-       src/journal/journal-remote-parse.c \
-       src/journal/journal-remote-write.h \
-       src/journal/journal-remote-write.c \
-       src/journal/journal-remote.c src/journal/microhttpd-util.h \
-       src/journal/microhttpd-util.c
-@HAVE_MICROHTTPD_TRUE@am_systemd_journal_remote_OBJECTS = src/journal/systemd_journal_remote-journal-remote-parse.$(OBJEXT) \
-@HAVE_MICROHTTPD_TRUE@ src/journal/systemd_journal_remote-journal-remote-write.$(OBJEXT) \
-@HAVE_MICROHTTPD_TRUE@ src/journal/systemd_journal_remote-journal-remote.$(OBJEXT) \
-@HAVE_MICROHTTPD_TRUE@ src/journal/systemd_journal_remote-microhttpd-util.$(OBJEXT)
+       src/journal-remote/journal-remote-parse.h \
+       src/journal-remote/journal-remote-parse.c \
+       src/journal-remote/journal-remote-write.h \
+       src/journal-remote/journal-remote-write.c \
+       src/journal-remote/journal-remote.h \
+       src/journal-remote/journal-remote.c \
+       src/journal-remote/microhttpd-util.h \
+       src/journal-remote/microhttpd-util.c
+@HAVE_MICROHTTPD_TRUE@am_systemd_journal_remote_OBJECTS = src/journal-remote/systemd_journal_remote-journal-remote-parse.$(OBJEXT) \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/systemd_journal_remote-journal-remote-write.$(OBJEXT) \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/systemd_journal_remote-journal-remote.$(OBJEXT) \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/systemd_journal_remote-microhttpd-util.$(OBJEXT)
 systemd_journal_remote_OBJECTS = $(am_systemd_journal_remote_OBJECTS)
 @HAVE_MICROHTTPD_TRUE@systemd_journal_remote_DEPENDENCIES =  \
 @HAVE_MICROHTTPD_TRUE@ libsystemd-internal.la \
@@ -2615,6 +2988,21 @@ systemd_journal_remote_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(systemd_journal_remote_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
+am__systemd_journal_upload_SOURCES_DIST =  \
+       src/journal-remote/journal-upload.h \
+       src/journal-remote/journal-upload.c \
+       src/journal-remote/journal-upload-journal.c
+@HAVE_LIBCURL_TRUE@am_systemd_journal_upload_OBJECTS = src/journal-remote/systemd_journal_upload-journal-upload.$(OBJEXT) \
+@HAVE_LIBCURL_TRUE@    src/journal-remote/systemd_journal_upload-journal-upload-journal.$(OBJEXT)
+systemd_journal_upload_OBJECTS = $(am_systemd_journal_upload_OBJECTS)
+@HAVE_LIBCURL_TRUE@systemd_journal_upload_DEPENDENCIES =  \
+@HAVE_LIBCURL_TRUE@    libsystemd-core.la libsystemd-internal.la \
+@HAVE_LIBCURL_TRUE@    libsystemd-journal-internal.la \
+@HAVE_LIBCURL_TRUE@    libsystemd-shared.la $(am__DEPENDENCIES_1)
+systemd_journal_upload_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(systemd_journal_upload_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
 am_systemd_journald_OBJECTS = src/journal/journald.$(OBJEXT)
 systemd_journald_OBJECTS = $(am_systemd_journald_OBJECTS)
 systemd_journald_DEPENDENCIES = libsystemd-journal-core.la \
@@ -2651,6 +3039,16 @@ am__systemd_machined_SOURCES_DIST = src/machine/machined.c \
 systemd_machined_OBJECTS = $(am_systemd_machined_OBJECTS)
 @ENABLE_MACHINED_TRUE@systemd_machined_DEPENDENCIES =  \
 @ENABLE_MACHINED_TRUE@ libsystemd-machine-core.la
+am_systemd_modeset_OBJECTS =  \
+       src/libsystemd-terminal/systemd_modeset-modeset.$(OBJEXT)
+systemd_modeset_OBJECTS = $(am_systemd_modeset_OBJECTS)
+systemd_modeset_DEPENDENCIES = libsystemd-terminal.la \
+       libsystemd-internal.la libsystemd-shared.la \
+       $(am__DEPENDENCIES_1)
+systemd_modeset_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(systemd_modeset_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+       -o $@
 am__systemd_modules_load_SOURCES_DIST =  \
        src/modules-load/modules-load.c
 @HAVE_KMOD_TRUE@am_systemd_modules_load_OBJECTS = src/modules-load/systemd_modules_load-modules-load.$(OBJEXT)
@@ -2661,11 +3059,6 @@ systemd_modules_load_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(systemd_modules_load_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-am__systemd_multi_seat_x_SOURCES_DIST = src/login/multi-seat-x.c
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@am_systemd_multi_seat_x_OBJECTS = src/login/multi-seat-x.$(OBJEXT)
-systemd_multi_seat_x_OBJECTS = $(am_systemd_multi_seat_x_OBJECTS)
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@systemd_multi_seat_x_DEPENDENCIES = libsystemd-label.la \
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@ libsystemd-shared.la
 am__systemd_networkd_SOURCES_DIST = src/network/networkd.c
 @ENABLE_NETWORKD_TRUE@am_systemd_networkd_OBJECTS =  \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd.$(OBJEXT)
@@ -2675,9 +3068,14 @@ systemd_networkd_OBJECTS = $(am_systemd_networkd_OBJECTS)
 @ENABLE_NETWORKD_TRUE@ libsystemd-capability.la
 am__systemd_networkd_wait_online_SOURCES_DIST =  \
        src/libsystemd-network/network-internal.h \
+       src/network/networkd-wait-online.h \
+       src/network/networkd-wait-online-link.h \
        src/network/networkd-wait-online.c \
-       src/network/networkd-wait-online.h
-@ENABLE_NETWORKD_TRUE@am_systemd_networkd_wait_online_OBJECTS = src/network/systemd_networkd_wait_online-networkd-wait-online.$(OBJEXT)
+       src/network/networkd-wait-online-manager.c \
+       src/network/networkd-wait-online-link.c
+@ENABLE_NETWORKD_TRUE@am_systemd_networkd_wait_online_OBJECTS = src/network/systemd_networkd_wait_online-networkd-wait-online.$(OBJEXT) \
+@ENABLE_NETWORKD_TRUE@ src/network/systemd_networkd_wait_online-networkd-wait-online-manager.$(OBJEXT) \
+@ENABLE_NETWORKD_TRUE@ src/network/systemd_networkd_wait_online-networkd-wait-online-link.$(OBJEXT)
 systemd_networkd_wait_online_OBJECTS =  \
        $(am_systemd_networkd_wait_online_OBJECTS)
 @ENABLE_NETWORKD_TRUE@systemd_networkd_wait_online_DEPENDENCIES =  \
@@ -2689,8 +3087,7 @@ systemd_networkd_wait_online_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-am_systemd_notify_OBJECTS = src/notify/notify.$(OBJEXT) \
-       src/readahead/sd-readahead.$(OBJEXT)
+am_systemd_notify_OBJECTS = src/notify/notify.$(OBJEXT)
 systemd_notify_OBJECTS = $(am_systemd_notify_OBJECTS)
 systemd_notify_DEPENDENCIES = libsystemd-internal.la \
        libsystemd-shared.la
@@ -2732,23 +3129,6 @@ systemd_rc_local_generator_OBJECTS =  \
        $(am_systemd_rc_local_generator_OBJECTS)
 systemd_rc_local_generator_DEPENDENCIES = libsystemd-label.la \
        libsystemd-shared.la
-am__systemd_readahead_SOURCES_DIST = src/readahead/readahead.c \
-       src/readahead/readahead-collect.c \
-       src/readahead/readahead-replay.c \
-       src/readahead/readahead-analyze.c \
-       src/readahead/readahead-common.c \
-       src/readahead/readahead-common.h
-@ENABLE_READAHEAD_TRUE@am_systemd_readahead_OBJECTS =  \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead.$(OBJEXT) \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-collect.$(OBJEXT) \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-replay.$(OBJEXT) \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-analyze.$(OBJEXT) \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-common.$(OBJEXT)
-systemd_readahead_OBJECTS = $(am_systemd_readahead_OBJECTS)
-@ENABLE_READAHEAD_TRUE@systemd_readahead_DEPENDENCIES =  \
-@ENABLE_READAHEAD_TRUE@        libsystemd-internal.la \
-@ENABLE_READAHEAD_TRUE@        libudev-internal.la \
-@ENABLE_READAHEAD_TRUE@        libsystemd-shared.la
 am_systemd_remount_fs_OBJECTS = src/remount-fs/remount-fs.$(OBJEXT) \
        src/core/mount-setup.$(OBJEXT)
 systemd_remount_fs_OBJECTS = $(am_systemd_remount_fs_OBJECTS)
@@ -2758,11 +3138,83 @@ am_systemd_reply_password_OBJECTS =  \
        src/reply-password/reply-password.$(OBJEXT)
 systemd_reply_password_OBJECTS = $(am_systemd_reply_password_OBJECTS)
 systemd_reply_password_DEPENDENCIES = libsystemd-shared.la
-am__systemd_resolved_SOURCES_DIST = src/resolve/resolved.h \
-       src/resolve/resolved.c src/resolve/resolved-manager.c
-@ENABLE_RESOLVED_TRUE@am_systemd_resolved_OBJECTS = src/resolve/systemd_resolved-resolved.$(OBJEXT) \
-@ENABLE_RESOLVED_TRUE@ src/resolve/systemd_resolved-resolved-manager.$(OBJEXT)
-@ENABLE_RESOLVED_TRUE@nodist_systemd_resolved_OBJECTS = src/resolve/systemd_resolved-resolved-gperf.$(OBJEXT)
+am__systemd_resolve_host_SOURCES_DIST =  \
+       src/resolve-host/resolve-host.c \
+       src/resolve/resolved-dns-packet.c \
+       src/resolve/resolved-dns-packet.h \
+       src/resolve/resolved-dns-rr.c src/resolve/resolved-dns-rr.h \
+       src/resolve/resolved-dns-answer.c \
+       src/resolve/resolved-dns-answer.h \
+       src/resolve/resolved-dns-question.c \
+       src/resolve/resolved-dns-question.h \
+       src/resolve/resolved-dns-domain.c \
+       src/resolve/resolved-dns-domain.h src/resolve/dns-type.c \
+       src/resolve/dns-type.h src/resolve/dns_type-from-name.h \
+       src/resolve/dns_type-to-name.h
+@ENABLE_RESOLVED_TRUE@am_systemd_resolve_host_OBJECTS =  \
+@ENABLE_RESOLVED_TRUE@ src/resolve-host/resolve-host.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-packet.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-rr.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-answer.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-question.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns-type.$(OBJEXT)
+systemd_resolve_host_OBJECTS = $(am_systemd_resolve_host_OBJECTS)
+@ENABLE_RESOLVED_TRUE@systemd_resolve_host_DEPENDENCIES =  \
+@ENABLE_RESOLVED_TRUE@ libsystemd-internal.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ $(am__DEPENDENCIES_1)
+am__systemd_resolved_SOURCES_DIST = src/resolve/resolved.c \
+       src/resolve/resolved-manager.c src/resolve/resolved-manager.h \
+       src/resolve/resolved-conf.c src/resolve/resolved-conf.h \
+       src/resolve/resolved-bus.c src/resolve/resolved-bus.h \
+       src/resolve/resolved-link.h src/resolve/resolved-link.c \
+       src/resolve/resolved-def.h src/resolve/resolved-dns-domain.h \
+       src/resolve/resolved-dns-domain.c \
+       src/resolve/resolved-dns-rr.h src/resolve/resolved-dns-rr.c \
+       src/resolve/resolved-dns-question.h \
+       src/resolve/resolved-dns-question.c \
+       src/resolve/resolved-dns-answer.h \
+       src/resolve/resolved-dns-answer.c \
+       src/resolve/resolved-dns-packet.h \
+       src/resolve/resolved-dns-packet.c \
+       src/resolve/resolved-dns-query.h \
+       src/resolve/resolved-dns-query.c \
+       src/resolve/resolved-dns-transaction.h \
+       src/resolve/resolved-dns-transaction.c \
+       src/resolve/resolved-dns-scope.h \
+       src/resolve/resolved-dns-scope.c \
+       src/resolve/resolved-dns-server.h \
+       src/resolve/resolved-dns-server.c \
+       src/resolve/resolved-dns-cache.h \
+       src/resolve/resolved-dns-cache.c \
+       src/resolve/resolved-dns-zone.h \
+       src/resolve/resolved-dns-zone.c \
+       src/resolve/resolved-dns-stream.h \
+       src/resolve/resolved-dns-stream.c src/resolve/dns-type.c \
+       src/resolve/dns-type.h src/resolve/dns_type-from-name.h \
+       src/resolve/dns_type-to-name.h
+@ENABLE_RESOLVED_TRUE@am_systemd_resolved_OBJECTS =  \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-manager.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-conf.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-bus.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-link.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-rr.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-question.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-answer.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-packet.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-query.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-transaction.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-scope.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-server.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-cache.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-zone.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-stream.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns-type.$(OBJEXT)
+@ENABLE_RESOLVED_TRUE@nodist_systemd_resolved_OBJECTS =  \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-gperf.$(OBJEXT)
 systemd_resolved_OBJECTS = $(am_systemd_resolved_OBJECTS) \
        $(nodist_systemd_resolved_OBJECTS)
 @ENABLE_RESOLVED_TRUE@systemd_resolved_DEPENDENCIES =  \
@@ -2770,11 +3222,8 @@ systemd_resolved_OBJECTS = $(am_systemd_resolved_OBJECTS) \
 @ENABLE_RESOLVED_TRUE@ libsystemd-network.la \
 @ENABLE_RESOLVED_TRUE@ libsystemd-label.la \
 @ENABLE_RESOLVED_TRUE@ libsystemd-internal.la \
-@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la
-systemd_resolved_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-       $(systemd_resolved_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-       -o $@
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ $(am__DEPENDENCIES_1)
 am__systemd_rfkill_SOURCES_DIST = src/rfkill/rfkill.c
 @ENABLE_RFKILL_TRUE@am_systemd_rfkill_OBJECTS =  \
 @ENABLE_RFKILL_TRUE@   src/rfkill/rfkill.$(OBJEXT)
@@ -2805,6 +3254,11 @@ systemd_socket_proxyd_OBJECTS = $(am_systemd_socket_proxyd_OBJECTS)
 systemd_socket_proxyd_DEPENDENCIES = libsystemd-logs.la \
        libsystemd-internal.la libsystemd-journal-internal.la \
        libsystemd-shared.la libsystemd-resolve.la
+am_systemd_subterm_OBJECTS =  \
+       src/libsystemd-terminal/subterm.$(OBJEXT)
+systemd_subterm_OBJECTS = $(am_systemd_subterm_OBJECTS)
+systemd_subterm_DEPENDENCIES = libsystemd-terminal.la \
+       libsystemd-internal.la libsystemd-shared.la
 am_systemd_sysctl_OBJECTS = src/sysctl/sysctl.$(OBJEXT)
 systemd_sysctl_OBJECTS = $(am_systemd_sysctl_OBJECTS)
 systemd_sysctl_DEPENDENCIES = libsystemd-shared.la
@@ -2837,9 +3291,15 @@ systemd_timedated_OBJECTS = $(am_systemd_timedated_OBJECTS)
 @ENABLE_TIMEDATED_TRUE@        libsystemd-internal.la \
 @ENABLE_TIMEDATED_TRUE@        libsystemd-shared.la
 am__systemd_timesyncd_SOURCES_DIST = src/timesync/timesyncd.c \
-       src/timesync/timesyncd.h
+       src/timesync/timesyncd-manager.c \
+       src/timesync/timesyncd-manager.h src/timesync/timesyncd-conf.c \
+       src/timesync/timesyncd-conf.h src/timesync/timesyncd-server.c \
+       src/timesync/timesyncd-server.h
 @ENABLE_TIMESYNCD_TRUE@am_systemd_timesyncd_OBJECTS =  \
-@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd.$(OBJEXT)
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd.$(OBJEXT) \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-manager.$(OBJEXT) \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-conf.$(OBJEXT) \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-server.$(OBJEXT)
 @ENABLE_TIMESYNCD_TRUE@nodist_systemd_timesyncd_OBJECTS =  \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-gperf.$(OBJEXT)
 systemd_timesyncd_OBJECTS = $(am_systemd_timesyncd_OBJECTS) \
@@ -2873,7 +3333,7 @@ am_systemd_update_done_OBJECTS =  \
        src/update-done/update-done.$(OBJEXT)
 systemd_update_done_OBJECTS = $(am_systemd_update_done_OBJECTS)
 systemd_update_done_DEPENDENCIES = libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-label.la libsystemd-shared.la
 am_systemd_update_utmp_OBJECTS =  \
        src/update-utmp/systemd_update_utmp-update-utmp.$(OBJEXT)
 systemd_update_utmp_OBJECTS = $(am_systemd_update_utmp_OBJECTS)
@@ -2902,6 +3362,9 @@ test_architecture_DEPENDENCIES = libsystemd-shared.la
 am_test_async_OBJECTS = src/test/test-async.$(OBJEXT)
 test_async_OBJECTS = $(am_test_async_OBJECTS)
 test_async_DEPENDENCIES = libsystemd-shared.la
+am_test_barrier_OBJECTS = src/test/test-barrier.$(OBJEXT)
+test_barrier_OBJECTS = $(am_test_barrier_OBJECTS)
+test_barrier_DEPENDENCIES = libsystemd-core.la
 am__test_boot_timestamp_SOURCES_DIST =  \
        src/test/test-boot-timestamps.c
 @ENABLE_EFI_TRUE@am_test_boot_timestamp_OBJECTS =  \
@@ -2986,11 +3449,6 @@ am_test_bus_match_OBJECTS =  \
 test_bus_match_OBJECTS = $(am_test_bus_match_OBJECTS)
 test_bus_match_DEPENDENCIES = libsystemd-internal.la \
        libsystemd-shared.la
-am_test_bus_memfd_OBJECTS =  \
-       src/libsystemd/sd-bus/test-bus-memfd.$(OBJEXT)
-test_bus_memfd_OBJECTS = $(am_test_bus_memfd_OBJECTS)
-test_bus_memfd_DEPENDENCIES = libsystemd-internal.la \
-       libsystemd-shared.la
 am_test_bus_objects_OBJECTS = src/libsystemd/sd-bus/test_bus_objects-test-bus-objects.$(OBJEXT)
 test_bus_objects_OBJECTS = $(am_test_bus_objects_OBJECTS)
 test_bus_objects_DEPENDENCIES = libsystemd-internal.la \
@@ -3000,6 +3458,11 @@ test_bus_objects_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(test_bus_objects_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
        -o $@
+am_test_bus_policy_OBJECTS = src/bus-proxyd/test-bus-policy.$(OBJEXT) \
+       src/bus-proxyd/bus-policy.$(OBJEXT)
+test_bus_policy_OBJECTS = $(am_test_bus_policy_OBJECTS)
+test_bus_policy_DEPENDENCIES = libsystemd-capability.la \
+       libsystemd-internal.la libsystemd-shared.la
 am_test_bus_server_OBJECTS = src/libsystemd/sd-bus/test_bus_server-test-bus-server.$(OBJEXT)
 test_bus_server_OBJECTS = $(am_test_bus_server_OBJECTS)
 test_bus_server_DEPENDENCIES = libsystemd-internal.la \
@@ -3050,13 +3513,21 @@ am_test_cgroup_util_OBJECTS = src/test/test-cgroup-util.$(OBJEXT)
 test_cgroup_util_OBJECTS = $(am_test_cgroup_util_OBJECTS)
 test_cgroup_util_DEPENDENCIES = libsystemd-label.la \
        libsystemd-internal.la libsystemd-shared.la
-am__test_compress_SOURCES_DIST = src/journal/test-compress.c
-@HAVE_XZ_TRUE@am_test_compress_OBJECTS =  \
-@HAVE_XZ_TRUE@ src/journal/test-compress.$(OBJEXT)
+am_test_compress_OBJECTS = src/journal/test-compress.$(OBJEXT)
 test_compress_OBJECTS = $(am_test_compress_OBJECTS)
-@HAVE_XZ_TRUE@test_compress_DEPENDENCIES =  \
-@HAVE_XZ_TRUE@ libsystemd-journal-internal.la \
-@HAVE_XZ_TRUE@ libsystemd-shared.la
+test_compress_DEPENDENCIES = libsystemd-journal-internal.la \
+       libsystemd-shared.la
+am_test_compress_benchmark_OBJECTS =  \
+       src/journal/test-compress-benchmark.$(OBJEXT)
+test_compress_benchmark_OBJECTS =  \
+       $(am_test_compress_benchmark_OBJECTS)
+test_compress_benchmark_DEPENDENCIES = libsystemd-journal-internal.la \
+       libsystemd-shared.la
+am_test_condition_util_OBJECTS =  \
+       src/test/test-condition-util.$(OBJEXT)
+test_condition_util_OBJECTS = $(am_test_condition_util_OBJECTS)
+test_condition_util_DEPENDENCIES = libsystemd-shared.la \
+       libsystemd-internal.la
 am_test_conf_files_OBJECTS = src/test/test-conf-files.$(OBJEXT)
 test_conf_files_OBJECTS = $(am_test_conf_files_OBJECTS)
 test_conf_files_DEPENDENCIES = libsystemd-shared.la
@@ -3099,6 +3570,19 @@ am_test_dhcp6_client_OBJECTS =  \
 test_dhcp6_client_OBJECTS = $(am_test_dhcp6_client_OBJECTS)
 test_dhcp6_client_DEPENDENCIES = libsystemd-network.la \
        libsystemd-internal.la libsystemd-shared.la
+am__test_dns_domain_SOURCES_DIST = src/resolve/resolved-dns-domain.h \
+       src/resolve/resolved-dns-domain.c \
+       src/resolve/test-dns-domain.c
+@ENABLE_RESOLVED_TRUE@am_test_dns_domain_OBJECTS = src/resolve/resolved-dns-domain.$(OBJEXT) \
+@ENABLE_RESOLVED_TRUE@ src/resolve/test-dns-domain.$(OBJEXT)
+test_dns_domain_OBJECTS = $(am_test_dns_domain_OBJECTS)
+@ENABLE_RESOLVED_TRUE@test_dns_domain_DEPENDENCIES =  \
+@ENABLE_RESOLVED_TRUE@ libsystemd-capability.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-network.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-label.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-internal.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ $(am__DEPENDENCIES_1)
 am_test_ellipsize_OBJECTS = src/test/test-ellipsize.$(OBJEXT)
 test_ellipsize_OBJECTS = $(am_test_ellipsize_OBJECTS)
 test_ellipsize_DEPENDENCIES = libsystemd-core.la
@@ -3120,8 +3604,11 @@ test_fdset_DEPENDENCIES = libsystemd-core.la
 am_test_fileio_OBJECTS = src/test/test-fileio.$(OBJEXT)
 test_fileio_OBJECTS = $(am_test_fileio_OBJECTS)
 test_fileio_DEPENDENCIES = libsystemd-core.la
-am_test_hashmap_OBJECTS = src/test/test-hashmap.$(OBJEXT)
-test_hashmap_OBJECTS = $(am_test_hashmap_OBJECTS)
+am_test_hashmap_OBJECTS = src/test/test-hashmap.$(OBJEXT) \
+       src/test/test-hashmap-plain.$(OBJEXT)
+nodist_test_hashmap_OBJECTS = src/test/test-hashmap-ordered.$(OBJEXT)
+test_hashmap_OBJECTS = $(am_test_hashmap_OBJECTS) \
+       $(nodist_test_hashmap_OBJECTS)
 test_hashmap_DEPENDENCIES = libsystemd-core.la
 am_test_hostname_OBJECTS = src/test/test-hostname.$(OBJEXT)
 test_hostname_OBJECTS = $(am_test_hostname_OBJECTS)
@@ -3261,6 +3748,13 @@ test_network_OBJECTS = $(am_test_network_OBJECTS)
 test_network_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_network_CFLAGS) \
        $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__test_network_tables_SOURCES_DIST =  \
+       src/network/test-network-tables.c src/shared/test-tables.h
+@ENABLE_NETWORKD_TRUE@am_test_network_tables_OBJECTS = src/network/test-network-tables.$(OBJEXT)
+test_network_tables_OBJECTS = $(am_test_network_tables_OBJECTS)
+@ENABLE_NETWORKD_TRUE@test_network_tables_DEPENDENCIES =  \
+@ENABLE_NETWORKD_TRUE@ libsystemd-networkd-core.la \
+@ENABLE_NETWORKD_TRUE@ libudev-core.la
 am_test_ns_OBJECTS = src/test/test_ns-test-ns.$(OBJEXT)
 test_ns_OBJECTS = $(am_test_ns_OBJECTS)
 test_ns_DEPENDENCIES = libsystemd-core.la
@@ -3273,6 +3767,9 @@ test_path_util_DEPENDENCIES = libsystemd-shared.la
 am_test_prioq_OBJECTS = src/test/test-prioq.$(OBJEXT)
 test_prioq_OBJECTS = $(am_test_prioq_OBJECTS)
 test_prioq_DEPENDENCIES = libsystemd-core.la
+am_test_pty_OBJECTS = src/test/test-pty.$(OBJEXT)
+test_pty_OBJECTS = $(am_test_pty_OBJECTS)
+test_pty_DEPENDENCIES = libsystemd-core.la
 am_test_ratelimit_OBJECTS = src/test/test-ratelimit.$(OBJEXT)
 test_ratelimit_OBJECTS = $(am_test_ratelimit_OBJECTS)
 test_ratelimit_DEPENDENCIES = libsystemd-shared.la
@@ -3311,22 +3808,15 @@ test_sched_prio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(test_sched_prio_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
        -o $@
+am_test_set_OBJECTS = src/test/test-set.$(OBJEXT)
+test_set_OBJECTS = $(am_test_set_OBJECTS)
+test_set_DEPENDENCIES = libsystemd-core.la
 am_test_sleep_OBJECTS = src/test/test-sleep.$(OBJEXT)
 test_sleep_OBJECTS = $(am_test_sleep_OBJECTS)
 test_sleep_DEPENDENCIES = libsystemd-core.la
 am_test_socket_util_OBJECTS = src/test/test-socket-util.$(OBJEXT)
 test_socket_util_OBJECTS = $(am_test_socket_util_OBJECTS)
 test_socket_util_DEPENDENCIES = libsystemd-core.la
-am__test_ssd_SOURCES_DIST = src/readahead/test-ssd.c \
-       src/readahead/readahead-common.c \
-       src/readahead/readahead-common.h
-@ENABLE_READAHEAD_TRUE@am_test_ssd_OBJECTS =  \
-@ENABLE_READAHEAD_TRUE@        src/readahead/test-ssd.$(OBJEXT) \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-common.$(OBJEXT)
-test_ssd_OBJECTS = $(am_test_ssd_OBJECTS)
-@ENABLE_READAHEAD_TRUE@test_ssd_DEPENDENCIES = libsystemd-internal.la \
-@ENABLE_READAHEAD_TRUE@        libudev-internal.la \
-@ENABLE_READAHEAD_TRUE@        libsystemd-shared.la
 am_test_strbuf_OBJECTS = src/test/test-strbuf.$(OBJEXT)
 test_strbuf_OBJECTS = $(am_test_strbuf_OBJECTS)
 test_strbuf_DEPENDENCIES = libsystemd-shared.la
@@ -3341,14 +3831,26 @@ test_strv_DEPENDENCIES = libsystemd-units.la libsystemd-internal.la \
 am_test_strxcpyx_OBJECTS = src/test/test-strxcpyx.$(OBJEXT)
 test_strxcpyx_OBJECTS = $(am_test_strxcpyx_OBJECTS)
 test_strxcpyx_DEPENDENCIES = libsystemd-shared.la
-am_test_tables_OBJECTS = src/test/test_tables-test-tables.$(OBJEXT)
+am_test_tables_OBJECTS = src/test/test_tables-test-tables.$(OBJEXT) \
+       src/bus-proxyd/test_tables-bus-policy.$(OBJEXT) \
+       src/journal/test_tables-journald-server.$(OBJEXT)
 test_tables_OBJECTS = $(am_test_tables_OBJECTS)
 test_tables_DEPENDENCIES = libsystemd-logs.la \
-       libsystemd-journal-internal.la libsystemd-core.la \
-       $(am__DEPENDENCIES_1)
+       libsystemd-journal-internal.la libsystemd-journal-core.la \
+       libsystemd-core.la libudev-core.la $(am__DEPENDENCIES_1)
 test_tables_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_tables_CFLAGS) \
        $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_test_term_page_OBJECTS =  \
+       src/libsystemd-terminal/test-term-page.$(OBJEXT)
+test_term_page_OBJECTS = $(am_test_term_page_OBJECTS)
+test_term_page_DEPENDENCIES = libsystemd-terminal.la \
+       libsystemd-internal.la libsystemd-shared.la
+am_test_term_parser_OBJECTS =  \
+       src/libsystemd-terminal/test-term-parser.$(OBJEXT)
+test_term_parser_OBJECTS = $(am_test_term_parser_OBJECTS)
+test_term_parser_DEPENDENCIES = libsystemd-terminal.la \
+       libsystemd-internal.la libsystemd-shared.la
 am_test_time_OBJECTS = src/test/test-time.$(OBJEXT)
 test_time_OBJECTS = $(am_test_time_OBJECTS)
 test_time_DEPENDENCIES = libsystemd-core.la
@@ -3358,7 +3860,15 @@ test_tmpfiles_DEPENDENCIES = libsystemd-shared.la
 am_test_udev_OBJECTS = src/test/test-udev.$(OBJEXT)
 test_udev_OBJECTS = $(am_test_udev_OBJECTS)
 test_udev_DEPENDENCIES = libudev-core.la $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_105)
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_128)
+am_test_uid_range_OBJECTS = src/test/test-uid-range.$(OBJEXT)
+test_uid_range_OBJECTS = $(am_test_uid_range_OBJECTS)
+test_uid_range_DEPENDENCIES = libsystemd-core.la
+am_test_unifont_OBJECTS =  \
+       src/libsystemd-terminal/test-unifont.$(OBJEXT)
+test_unifont_OBJECTS = $(am_test_unifont_OBJECTS)
+test_unifont_DEPENDENCIES = libsystemd-terminal.la \
+       libsystemd-internal.la libsystemd-shared.la
 am_test_unit_file_OBJECTS =  \
        src/test/test_unit_file-test-unit-file.$(OBJEXT)
 test_unit_file_OBJECTS = $(am_test_unit_file_OBJECTS)
@@ -3447,7 +3957,9 @@ SOURCES = $(_daemon_la_SOURCES) $(_journal_la_SOURCES) \
        $(_reader_la_SOURCES) $(id128_la_SOURCES) \
        $(nodist_id128_la_SOURCES) $(libgudev_1_0_la_SOURCES) \
        $(nodist_libgudev_1_0_la_SOURCES) \
-       $(libnss_myhostname_la_SOURCES) $(libsystemd_acl_la_SOURCES) \
+       $(libnss_myhostname_la_SOURCES) \
+       $(libnss_mymachines_la_SOURCES) $(libnss_resolve_la_SOURCES) \
+       $(libsystemd_acl_la_SOURCES) \
        $(libsystemd_capability_la_SOURCES) \
        $(libsystemd_core_la_SOURCES) \
        $(nodist_libsystemd_core_la_SOURCES) \
@@ -3470,6 +3982,7 @@ SOURCES = $(_daemon_la_SOURCES) $(_journal_la_SOURCES) \
        $(libsystemd_seccomp_la_SOURCES) \
        $(libsystemd_shared_la_SOURCES) \
        $(nodist_libsystemd_shared_la_SOURCES) \
+       $(libsystemd_terminal_la_SOURCES) \
        $(libsystemd_units_la_SOURCES) $(libsystemd_la_SOURCES) \
        $(nodist_libsystemd_la_SOURCES) $(libudev_core_la_SOURCES) \
        $(nodist_libudev_core_la_SOURCES) \
@@ -3479,42 +3992,50 @@ SOURCES = $(_daemon_la_SOURCES) $(_journal_la_SOURCES) \
        $(busctl_SOURCES) $(cdrom_id_SOURCES) $(collect_SOURCES) \
        $(coredumpctl_SOURCES) $(hostnamectl_SOURCES) \
        $(journalctl_SOURCES) $(localectl_SOURCES) $(loginctl_SOURCES) \
-       $(machinectl_SOURCES) $(mtd_probe_SOURCES) $(scsi_id_SOURCES) \
-       $(systemctl_SOURCES) $(systemd_SOURCES) \
-       $(systemd_ac_power_SOURCES) $(systemd_activate_SOURCES) \
-       $(systemd_analyze_SOURCES) $(systemd_ask_password_SOURCES) \
-       $(systemd_backlight_SOURCES) $(systemd_binfmt_SOURCES) \
-       $(systemd_bootchart_SOURCES) $(systemd_bus_proxyd_SOURCES) \
-       $(systemd_cat_SOURCES) $(systemd_cgls_SOURCES) \
-       $(systemd_cgroups_agent_SOURCES) $(systemd_cgtop_SOURCES) \
+       $(machinectl_SOURCES) $(mtd_probe_SOURCES) \
+       $(networkctl_SOURCES) $(scsi_id_SOURCES) $(systemctl_SOURCES) \
+       $(systemd_SOURCES) $(systemd_ac_power_SOURCES) \
+       $(systemd_activate_SOURCES) $(systemd_analyze_SOURCES) \
+       $(systemd_ask_password_SOURCES) $(systemd_backlight_SOURCES) \
+       $(systemd_binfmt_SOURCES) $(systemd_bootchart_SOURCES) \
+       $(systemd_bus_proxyd_SOURCES) $(systemd_cat_SOURCES) \
+       $(systemd_cgls_SOURCES) $(systemd_cgroups_agent_SOURCES) \
+       $(systemd_cgtop_SOURCES) $(systemd_consoled_SOURCES) \
        $(systemd_coredump_SOURCES) $(systemd_cryptsetup_SOURCES) \
        $(systemd_cryptsetup_generator_SOURCES) \
        $(systemd_dbus1_generator_SOURCES) \
        $(systemd_debug_generator_SOURCES) $(systemd_delta_SOURCES) \
        $(systemd_detect_virt_SOURCES) \
-       $(systemd_efi_boot_generator_SOURCES) $(systemd_fsck_SOURCES) \
+       $(systemd_efi_boot_generator_SOURCES) \
+       $(systemd_escape_SOURCES) $(systemd_evcat_SOURCES) \
+       $(systemd_firstboot_SOURCES) $(systemd_fsck_SOURCES) \
        $(systemd_fstab_generator_SOURCES) \
        $(systemd_getty_generator_SOURCES) \
        $(systemd_gpt_auto_generator_SOURCES) \
+       $(systemd_hibernate_resume_SOURCES) \
+       $(systemd_hibernate_resume_generator_SOURCES) \
        $(systemd_hostnamed_SOURCES) $(systemd_inhibit_SOURCES) \
        $(systemd_initctl_SOURCES) $(systemd_journal_gatewayd_SOURCES) \
-       $(systemd_journal_remote_SOURCES) $(systemd_journald_SOURCES) \
+       $(systemd_journal_remote_SOURCES) \
+       $(systemd_journal_upload_SOURCES) $(systemd_journald_SOURCES) \
        $(systemd_localed_SOURCES) $(systemd_logind_SOURCES) \
        $(nodist_systemd_logind_SOURCES) \
        $(systemd_machine_id_setup_SOURCES) \
-       $(systemd_machined_SOURCES) $(systemd_modules_load_SOURCES) \
-       $(systemd_multi_seat_x_SOURCES) $(systemd_networkd_SOURCES) \
+       $(systemd_machined_SOURCES) $(systemd_modeset_SOURCES) \
+       $(systemd_modules_load_SOURCES) $(systemd_networkd_SOURCES) \
        $(systemd_networkd_wait_online_SOURCES) \
        $(systemd_notify_SOURCES) $(systemd_nspawn_SOURCES) \
        $(systemd_path_SOURCES) $(systemd_quotacheck_SOURCES) \
        $(systemd_random_seed_SOURCES) \
        $(systemd_rc_local_generator_SOURCES) \
-       $(systemd_readahead_SOURCES) $(systemd_remount_fs_SOURCES) \
-       $(systemd_reply_password_SOURCES) $(systemd_resolved_SOURCES) \
+       $(systemd_remount_fs_SOURCES) \
+       $(systemd_reply_password_SOURCES) \
+       $(systemd_resolve_host_SOURCES) $(systemd_resolved_SOURCES) \
        $(nodist_systemd_resolved_SOURCES) $(systemd_rfkill_SOURCES) \
        $(systemd_run_SOURCES) $(systemd_shutdown_SOURCES) \
        $(systemd_shutdownd_SOURCES) $(systemd_sleep_SOURCES) \
-       $(systemd_socket_proxyd_SOURCES) $(systemd_sysctl_SOURCES) \
+       $(systemd_socket_proxyd_SOURCES) $(systemd_subterm_SOURCES) \
+       $(systemd_sysctl_SOURCES) \
        $(systemd_system_update_generator_SOURCES) \
        $(systemd_sysusers_SOURCES) $(systemd_sysv_generator_SOURCES) \
        $(systemd_timedated_SOURCES) $(systemd_timesyncd_SOURCES) \
@@ -3525,28 +4046,30 @@ SOURCES = $(_daemon_la_SOURCES) $(_journal_la_SOURCES) \
        $(systemd_update_utmp_SOURCES) \
        $(systemd_user_sessions_SOURCES) \
        $(systemd_vconsole_setup_SOURCES) $(test_architecture_SOURCES) \
-       $(test_async_SOURCES) $(test_boot_timestamp_SOURCES) \
-       $(test_bus_chat_SOURCES) $(test_bus_cleanup_SOURCES) \
-       $(test_bus_creds_SOURCES) $(test_bus_error_SOURCES) \
-       $(test_bus_gvariant_SOURCES) $(test_bus_introspect_SOURCES) \
-       $(test_bus_kernel_SOURCES) \
+       $(test_async_SOURCES) $(test_barrier_SOURCES) \
+       $(test_boot_timestamp_SOURCES) $(test_bus_chat_SOURCES) \
+       $(test_bus_cleanup_SOURCES) $(test_bus_creds_SOURCES) \
+       $(test_bus_error_SOURCES) $(test_bus_gvariant_SOURCES) \
+       $(test_bus_introspect_SOURCES) $(test_bus_kernel_SOURCES) \
        $(test_bus_kernel_benchmark_SOURCES) \
        $(test_bus_kernel_bloom_SOURCES) $(test_bus_marshal_SOURCES) \
-       $(test_bus_match_SOURCES) $(test_bus_memfd_SOURCES) \
-       $(test_bus_objects_SOURCES) $(test_bus_server_SOURCES) \
+       $(test_bus_match_SOURCES) $(test_bus_objects_SOURCES) \
+       $(test_bus_policy_SOURCES) $(test_bus_server_SOURCES) \
        $(test_bus_signature_SOURCES) $(test_bus_zero_copy_SOURCES) \
        $(test_calendarspec_SOURCES) $(test_capability_SOURCES) \
        $(test_catalog_SOURCES) $(test_cgroup_SOURCES) \
        $(test_cgroup_mask_SOURCES) $(test_cgroup_util_SOURCES) \
-       $(test_compress_SOURCES) $(test_conf_files_SOURCES) \
+       $(test_compress_SOURCES) $(test_compress_benchmark_SOURCES) \
+       $(test_condition_util_SOURCES) $(test_conf_files_SOURCES) \
        $(test_coredump_vacuum_SOURCES) $(test_daemon_SOURCES) \
        $(test_date_SOURCES) $(test_device_nodes_SOURCES) \
        $(test_dhcp_client_SOURCES) $(test_dhcp_option_SOURCES) \
        $(test_dhcp_server_SOURCES) $(test_dhcp6_client_SOURCES) \
-       $(test_ellipsize_SOURCES) $(test_engine_SOURCES) \
-       $(test_env_replace_SOURCES) $(test_event_SOURCES) \
-       $(test_fdset_SOURCES) $(test_fileio_SOURCES) \
-       $(test_hashmap_SOURCES) $(test_hostname_SOURCES) \
+       $(test_dns_domain_SOURCES) $(test_ellipsize_SOURCES) \
+       $(test_engine_SOURCES) $(test_env_replace_SOURCES) \
+       $(test_event_SOURCES) $(test_fdset_SOURCES) \
+       $(test_fileio_SOURCES) $(test_hashmap_SOURCES) \
+       $(nodist_test_hashmap_SOURCES) $(test_hostname_SOURCES) \
        $(test_icmp6_rs_SOURCES) $(test_id128_SOURCES) \
        $(test_inhibit_SOURCES) $(test_install_SOURCES) \
        $(test_ipcrm_SOURCES) $(test_ipv4ll_SOURCES) \
@@ -3562,17 +4085,20 @@ SOURCES = $(_daemon_la_SOURCES) $(_journal_la_SOURCES) \
        $(test_login_shared_SOURCES) $(test_login_tables_SOURCES) \
        $(test_loopback_SOURCES) $(test_machine_tables_SOURCES) \
        $(test_mmap_cache_SOURCES) $(test_namespace_SOURCES) \
-       $(test_network_SOURCES) $(test_ns_SOURCES) \
-       $(test_path_util_SOURCES) $(test_prioq_SOURCES) \
+       $(test_network_SOURCES) $(test_network_tables_SOURCES) \
+       $(test_ns_SOURCES) $(test_path_util_SOURCES) \
+       $(test_prioq_SOURCES) $(test_pty_SOURCES) \
        $(test_ratelimit_SOURCES) $(test_replace_var_SOURCES) \
        $(test_resolve_SOURCES) $(test_ring_SOURCES) \
        $(test_rtnl_SOURCES) $(test_rtnl_manual_SOURCES) \
-       $(test_sched_prio_SOURCES) $(test_sleep_SOURCES) \
-       $(test_socket_util_SOURCES) $(test_ssd_SOURCES) \
+       $(test_sched_prio_SOURCES) $(test_set_SOURCES) \
+       $(test_sleep_SOURCES) $(test_socket_util_SOURCES) \
        $(test_strbuf_SOURCES) $(test_strip_tab_ansi_SOURCES) \
        $(test_strv_SOURCES) $(test_strxcpyx_SOURCES) \
-       $(test_tables_SOURCES) $(test_time_SOURCES) \
+       $(test_tables_SOURCES) $(test_term_page_SOURCES) \
+       $(test_term_parser_SOURCES) $(test_time_SOURCES) \
        $(test_tmpfiles_SOURCES) $(test_udev_SOURCES) \
+       $(test_uid_range_SOURCES) $(test_unifont_SOURCES) \
        $(test_unit_file_SOURCES) $(test_unit_name_SOURCES) \
        $(test_utf8_SOURCES) $(test_util_SOURCES) \
        $(test_watchdog_SOURCES) $(test_xml_SOURCES) \
@@ -3582,6 +4108,8 @@ DIST_SOURCES = $(am___daemon_la_SOURCES_DIST) \
        $(am__id128_la_SOURCES_DIST) \
        $(am__libgudev_1_0_la_SOURCES_DIST) \
        $(am__libnss_myhostname_la_SOURCES_DIST) \
+       $(am__libnss_mymachines_la_SOURCES_DIST) \
+       $(am__libnss_resolve_la_SOURCES_DIST) \
        $(am__libsystemd_acl_la_SOURCES_DIST) \
        $(libsystemd_capability_la_SOURCES) \
        $(am__libsystemd_core_la_SOURCES_DIST) \
@@ -3601,7 +4129,9 @@ DIST_SOURCES = $(am___daemon_la_SOURCES_DIST) \
        $(am__libsystemd_networkd_core_la_SOURCES_DIST) \
        $(libsystemd_resolve_la_SOURCES) \
        $(am__libsystemd_seccomp_la_SOURCES_DIST) \
-       $(libsystemd_shared_la_SOURCES) $(libsystemd_units_la_SOURCES) \
+       $(am__libsystemd_shared_la_SOURCES_DIST) \
+       $(libsystemd_terminal_la_SOURCES) \
+       $(libsystemd_units_la_SOURCES) \
        $(am__libsystemd_la_SOURCES_DIST) \
        $(am__libudev_core_la_SOURCES_DIST) \
        $(libudev_internal_la_SOURCES) $(libudev_la_SOURCES) \
@@ -3613,7 +4143,8 @@ DIST_SOURCES = $(am___daemon_la_SOURCES_DIST) \
        $(am__hostnamectl_SOURCES_DIST) $(am__journalctl_SOURCES_DIST) \
        $(am__localectl_SOURCES_DIST) $(am__loginctl_SOURCES_DIST) \
        $(am__machinectl_SOURCES_DIST) $(mtd_probe_SOURCES) \
-       $(scsi_id_SOURCES) $(systemctl_SOURCES) $(systemd_SOURCES) \
+       $(am__networkctl_SOURCES_DIST) $(scsi_id_SOURCES) \
+       $(systemctl_SOURCES) $(systemd_SOURCES) \
        $(systemd_ac_power_SOURCES) $(systemd_activate_SOURCES) \
        $(systemd_analyze_SOURCES) $(systemd_ask_password_SOURCES) \
        $(am__systemd_backlight_SOURCES_DIST) \
@@ -3621,41 +4152,47 @@ DIST_SOURCES = $(am___daemon_la_SOURCES_DIST) \
        $(am__systemd_bootchart_SOURCES_DIST) \
        $(systemd_bus_proxyd_SOURCES) $(systemd_cat_SOURCES) \
        $(systemd_cgls_SOURCES) $(systemd_cgroups_agent_SOURCES) \
-       $(systemd_cgtop_SOURCES) $(am__systemd_coredump_SOURCES_DIST) \
+       $(systemd_cgtop_SOURCES) $(systemd_consoled_SOURCES) \
+       $(am__systemd_coredump_SOURCES_DIST) \
        $(am__systemd_cryptsetup_SOURCES_DIST) \
        $(am__systemd_cryptsetup_generator_SOURCES_DIST) \
        $(am__systemd_dbus1_generator_SOURCES_DIST) \
        $(systemd_debug_generator_SOURCES) $(systemd_delta_SOURCES) \
        $(systemd_detect_virt_SOURCES) \
        $(am__systemd_efi_boot_generator_SOURCES_DIST) \
-       $(systemd_fsck_SOURCES) $(systemd_fstab_generator_SOURCES) \
+       $(systemd_escape_SOURCES) $(systemd_evcat_SOURCES) \
+       $(am__systemd_firstboot_SOURCES_DIST) $(systemd_fsck_SOURCES) \
+       $(systemd_fstab_generator_SOURCES) \
        $(systemd_getty_generator_SOURCES) \
        $(am__systemd_gpt_auto_generator_SOURCES_DIST) \
+       $(am__systemd_hibernate_resume_SOURCES_DIST) \
+       $(am__systemd_hibernate_resume_generator_SOURCES_DIST) \
        $(am__systemd_hostnamed_SOURCES_DIST) \
        $(am__systemd_inhibit_SOURCES_DIST) $(systemd_initctl_SOURCES) \
        $(am__systemd_journal_gatewayd_SOURCES_DIST) \
        $(am__systemd_journal_remote_SOURCES_DIST) \
+       $(am__systemd_journal_upload_SOURCES_DIST) \
        $(systemd_journald_SOURCES) \
        $(am__systemd_localed_SOURCES_DIST) \
        $(am__systemd_logind_SOURCES_DIST) \
        $(systemd_machine_id_setup_SOURCES) \
        $(am__systemd_machined_SOURCES_DIST) \
+       $(systemd_modeset_SOURCES) \
        $(am__systemd_modules_load_SOURCES_DIST) \
-       $(am__systemd_multi_seat_x_SOURCES_DIST) \
        $(am__systemd_networkd_SOURCES_DIST) \
        $(am__systemd_networkd_wait_online_SOURCES_DIST) \
        $(systemd_notify_SOURCES) $(systemd_nspawn_SOURCES) \
        $(systemd_path_SOURCES) $(am__systemd_quotacheck_SOURCES_DIST) \
        $(am__systemd_random_seed_SOURCES_DIST) \
        $(systemd_rc_local_generator_SOURCES) \
-       $(am__systemd_readahead_SOURCES_DIST) \
        $(systemd_remount_fs_SOURCES) \
        $(systemd_reply_password_SOURCES) \
+       $(am__systemd_resolve_host_SOURCES_DIST) \
        $(am__systemd_resolved_SOURCES_DIST) \
        $(am__systemd_rfkill_SOURCES_DIST) $(systemd_run_SOURCES) \
        $(systemd_shutdown_SOURCES) $(systemd_shutdownd_SOURCES) \
        $(systemd_sleep_SOURCES) $(systemd_socket_proxyd_SOURCES) \
-       $(systemd_sysctl_SOURCES) \
+       $(systemd_subterm_SOURCES) $(systemd_sysctl_SOURCES) \
        $(systemd_system_update_generator_SOURCES) \
        $(am__systemd_sysusers_SOURCES_DIST) \
        $(systemd_sysv_generator_SOURCES) \
@@ -3668,6 +4205,7 @@ DIST_SOURCES = $(am___daemon_la_SOURCES_DIST) \
        $(am__systemd_user_sessions_SOURCES_DIST) \
        $(am__systemd_vconsole_setup_SOURCES_DIST) \
        $(test_architecture_SOURCES) $(test_async_SOURCES) \
+       $(test_barrier_SOURCES) \
        $(am__test_boot_timestamp_SOURCES_DIST) \
        $(test_bus_chat_SOURCES) $(test_bus_cleanup_SOURCES) \
        $(test_bus_creds_SOURCES) $(test_bus_error_SOURCES) \
@@ -3675,18 +4213,20 @@ DIST_SOURCES = $(am___daemon_la_SOURCES_DIST) \
        $(test_bus_kernel_SOURCES) \
        $(test_bus_kernel_benchmark_SOURCES) \
        $(test_bus_kernel_bloom_SOURCES) $(test_bus_marshal_SOURCES) \
-       $(test_bus_match_SOURCES) $(test_bus_memfd_SOURCES) \
-       $(test_bus_objects_SOURCES) $(test_bus_server_SOURCES) \
+       $(test_bus_match_SOURCES) $(test_bus_objects_SOURCES) \
+       $(test_bus_policy_SOURCES) $(test_bus_server_SOURCES) \
        $(test_bus_signature_SOURCES) $(test_bus_zero_copy_SOURCES) \
        $(test_calendarspec_SOURCES) $(test_capability_SOURCES) \
        $(test_catalog_SOURCES) $(test_cgroup_SOURCES) \
        $(test_cgroup_mask_SOURCES) $(test_cgroup_util_SOURCES) \
-       $(am__test_compress_SOURCES_DIST) $(test_conf_files_SOURCES) \
+       $(test_compress_SOURCES) $(test_compress_benchmark_SOURCES) \
+       $(test_condition_util_SOURCES) $(test_conf_files_SOURCES) \
        $(am__test_coredump_vacuum_SOURCES_DIST) \
        $(test_daemon_SOURCES) $(test_date_SOURCES) \
        $(test_device_nodes_SOURCES) $(test_dhcp_client_SOURCES) \
        $(test_dhcp_option_SOURCES) $(test_dhcp_server_SOURCES) \
-       $(test_dhcp6_client_SOURCES) $(test_ellipsize_SOURCES) \
+       $(test_dhcp6_client_SOURCES) \
+       $(am__test_dns_domain_SOURCES_DIST) $(test_ellipsize_SOURCES) \
        $(test_engine_SOURCES) $(test_env_replace_SOURCES) \
        $(test_event_SOURCES) $(test_fdset_SOURCES) \
        $(test_fileio_SOURCES) $(test_hashmap_SOURCES) \
@@ -3707,22 +4247,25 @@ DIST_SOURCES = $(am___daemon_la_SOURCES_DIST) \
        $(am__test_login_tables_SOURCES_DIST) $(test_loopback_SOURCES) \
        $(am__test_machine_tables_SOURCES_DIST) \
        $(test_mmap_cache_SOURCES) $(test_namespace_SOURCES) \
-       $(am__test_network_SOURCES_DIST) $(test_ns_SOURCES) \
+       $(am__test_network_SOURCES_DIST) \
+       $(am__test_network_tables_SOURCES_DIST) $(test_ns_SOURCES) \
        $(test_path_util_SOURCES) $(test_prioq_SOURCES) \
-       $(test_ratelimit_SOURCES) $(test_replace_var_SOURCES) \
-       $(test_resolve_SOURCES) $(test_ring_SOURCES) \
-       $(test_rtnl_SOURCES) $(test_rtnl_manual_SOURCES) \
-       $(test_sched_prio_SOURCES) $(test_sleep_SOURCES) \
-       $(test_socket_util_SOURCES) $(am__test_ssd_SOURCES_DIST) \
-       $(test_strbuf_SOURCES) $(test_strip_tab_ansi_SOURCES) \
-       $(test_strv_SOURCES) $(test_strxcpyx_SOURCES) \
-       $(test_tables_SOURCES) $(test_time_SOURCES) \
-       $(test_tmpfiles_SOURCES) $(test_udev_SOURCES) \
-       $(test_unit_file_SOURCES) $(test_unit_name_SOURCES) \
-       $(test_utf8_SOURCES) $(test_util_SOURCES) \
-       $(test_watchdog_SOURCES) $(test_xml_SOURCES) \
-       $(am__timedatectl_SOURCES_DIST) $(udevadm_SOURCES) \
-       $(v4l_id_SOURCES)
+       $(test_pty_SOURCES) $(test_ratelimit_SOURCES) \
+       $(test_replace_var_SOURCES) $(test_resolve_SOURCES) \
+       $(test_ring_SOURCES) $(test_rtnl_SOURCES) \
+       $(test_rtnl_manual_SOURCES) $(test_sched_prio_SOURCES) \
+       $(test_set_SOURCES) $(test_sleep_SOURCES) \
+       $(test_socket_util_SOURCES) $(test_strbuf_SOURCES) \
+       $(test_strip_tab_ansi_SOURCES) $(test_strv_SOURCES) \
+       $(test_strxcpyx_SOURCES) $(test_tables_SOURCES) \
+       $(test_term_page_SOURCES) $(test_term_parser_SOURCES) \
+       $(test_time_SOURCES) $(test_tmpfiles_SOURCES) \
+       $(test_udev_SOURCES) $(test_uid_range_SOURCES) \
+       $(test_unifont_SOURCES) $(test_unit_file_SOURCES) \
+       $(test_unit_name_SOURCES) $(test_utf8_SOURCES) \
+       $(test_util_SOURCES) $(test_watchdog_SOURCES) \
+       $(test_xml_SOURCES) $(am__timedatectl_SOURCES_DIST) \
+       $(udevadm_SOURCES) $(v4l_id_SOURCES)
 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
        ctags-recursive dvi-recursive html-recursive info-recursive \
        install-data-recursive install-dvi-recursive \
@@ -3751,7 +4294,6 @@ NROFF = nroff
 MANS = $(man_MANS)
 am__dist_bashcompletion_DATA_DIST = shell-completion/bash/busctl \
        shell-completion/bash/journalctl \
-       shell-completion/bash/systemctl \
        shell-completion/bash/systemd-analyze \
        shell-completion/bash/systemd-cat \
        shell-completion/bash/systemd-cgls \
@@ -3775,6 +4317,7 @@ am__dist_dbuspolicy_DATA_DIST =  \
        src/locale/org.freedesktop.locale1.conf \
        src/timedate/org.freedesktop.timedate1.conf \
        src/machine/org.freedesktop.machine1.conf \
+       src/resolve/org.freedesktop.resolve1.conf \
        src/login/org.freedesktop.login1.conf
 am__dist_dbussystemservice_DATA_DIST =  \
        src/core/org.freedesktop.systemd1.service \
@@ -3782,74 +4325,69 @@ am__dist_dbussystemservice_DATA_DIST =  \
        src/locale/org.freedesktop.locale1.service \
        src/timedate/org.freedesktop.timedate1.service \
        src/machine/org.freedesktop.machine1.service \
+       src/resolve/org.freedesktop.resolve1.service \
        src/login/org.freedesktop.login1.service
-am__dist_doc_DATA_DIST = README NEWS LICENSE.LGPL2.1 LICENSE.GPL2 \
-       LICENSE.MIT DISTRO_PORTING src/libsystemd/sd-bus/PORTING-DBUS1 \
-       src/libsystemd/sd-bus/DIFFERENCES \
-       src/libsystemd/sd-bus/GVARIANT-SERIALIZATION \
-       src/systemd/sd-shutdown.h src/readahead/sd-readahead.c \
-       src/systemd/sd-readahead.h
-am__dist_gatewayddocumentroot_DATA_DIST = src/journal/browse.html
-am__dist_ntpunits_DATA_DIST = src/timesync/90-systemd.list
+am__dist_factory_pam_DATA_DIST = factory/etc/pam.d/system-auth \
+       factory/etc/pam.d/other
+am__dist_gatewayddocumentroot_DATA_DIST =  \
+       src/journal-remote/browse.html
 am__dist_pamconf_DATA_DIST = src/login/systemd-user
-am__dist_pkgdata_DATA_DIST = src/locale/kbd-model-map
+am__dist_pkgdata_DATA_DIST =  \
+       src/libsystemd-terminal/unifont-glyph-array.bin \
+       src/locale/kbd-model-map
 am__dist_pkgsysconf_DATA_DIST = src/core/system.conf \
        src/core/user.conf src/journal/journald.conf \
        src/journal/coredump.conf src/bootchart/bootchart.conf \
        src/login/logind.conf
-am__dist_polkitpolicy_DATA_DIST =  \
-       src/hostname/org.freedesktop.hostname1.policy \
-       src/locale/org.freedesktop.locale1.policy \
-       src/timedate/org.freedesktop.timedate1.policy \
-       src/login/org.freedesktop.login1.policy \
-       src/core/org.freedesktop.systemd1.policy
 am__dist_systemunit_DATA_DIST = units/graphical.target \
-       units/multi-user.target units/emergency.service \
-       units/emergency.target units/sysinit.target units/basic.target \
-       units/getty.target units/halt.target units/kexec.target \
-       units/local-fs.target units/local-fs-pre.target \
-       units/initrd.target units/initrd-fs.target \
-       units/initrd-root-fs.target units/remote-fs.target \
-       units/remote-fs-pre.target units/network.target \
-       units/network-pre.target units/network-online.target \
-       units/nss-lookup.target units/nss-user-lookup.target \
-       units/hibernate.target units/hybrid-sleep.target \
-       units/poweroff.target units/reboot.target units/rescue.target \
-       units/rpcbind.target units/time-sync.target \
-       units/shutdown.target units/final.target units/umount.target \
-       units/sigpwr.target units/sleep.target units/sockets.target \
-       units/busnames.target units/timers.target units/paths.target \
-       units/suspend.target units/swap.target units/slices.target \
-       units/system.slice units/x-.slice units/systemd-initctl.socket \
-       units/systemd-shutdownd.socket units/syslog.socket \
-       units/dev-hugepages.mount units/dev-mqueue.mount \
-       units/sys-kernel-config.mount units/sys-kernel-debug.mount \
+       units/multi-user.target units/emergency.target \
+       units/sysinit.target units/basic.target units/getty.target \
+       units/halt.target units/kexec.target units/local-fs.target \
+       units/local-fs-pre.target units/initrd.target \
+       units/initrd-fs.target units/initrd-root-fs.target \
+       units/remote-fs.target units/remote-fs-pre.target \
+       units/network.target units/network-pre.target \
+       units/network-online.target units/nss-lookup.target \
+       units/nss-user-lookup.target units/poweroff.target \
+       units/reboot.target units/rescue.target units/rpcbind.target \
+       units/time-sync.target units/shutdown.target \
+       units/final.target units/umount.target units/sigpwr.target \
+       units/sleep.target units/sockets.target units/timers.target \
+       units/paths.target units/suspend.target units/swap.target \
+       units/slices.target units/system.slice units/x-.slice \
+       units/systemd-initctl.socket units/systemd-shutdownd.socket \
+       units/syslog.socket units/dev-hugepages.mount \
+       units/dev-mqueue.mount units/sys-kernel-config.mount \
+       units/sys-kernel-debug.mount \
        units/sys-fs-fuse-connections.mount units/tmp.mount \
        units/printer.target units/sound.target units/bluetooth.target \
        units/smartcard.target units/systemd-ask-password-wall.path \
        units/systemd-ask-password-console.path \
        units/systemd-udevd-control.socket \
        units/systemd-udevd-kernel.socket units/system-update.target \
-       units/initrd-switch-root.target units/ldconfig.service \
-       units/systemd-tmpfiles-clean.timer \
-       units/systemd-bus-proxyd.socket units/systemd-journald.socket \
-       units/systemd-journald-dev-log.socket \
-       units/systemd-journal-gatewayd.socket \
-       units/proc-sys-fs-binfmt_misc.automount \
-       units/proc-sys-fs-binfmt_misc.mount \
-       units/systemd-readahead-drop.service \
-       units/systemd-readahead-done.timer units/cryptsetup.target \
-       units/cryptsetup-pre.target \
+       units/initrd-switch-root.target units/busnames.target \
        units/org.freedesktop.hostname1.busname \
        units/org.freedesktop.systemd1.busname \
        units/org.freedesktop.locale1.busname \
-       units/org.freedesktop.timedate1.busname units/machine.slice \
-       units/org.freedesktop.machine1.busname units/user.slice \
-       units/org.freedesktop.login1.busname
-am__dist_sysusers_DATA_DIST = sysusers.d/systemd.conf
+       units/org.freedesktop.timedate1.busname \
+       units/org.freedesktop.machine1.busname \
+       units/org.freedesktop.resolve1.busname \
+       units/org.freedesktop.login1.busname units/ldconfig.service \
+       units/systemd-tmpfiles-clean.timer units/hibernate.target \
+       units/hybrid-sleep.target units/systemd-bus-proxyd.socket \
+       units/systemd-journal-remote.socket \
+       units/systemd-journald.socket \
+       units/systemd-journald-dev-log.socket \
+       units/systemd-journal-gatewayd.socket \
+       units/proc-sys-fs-binfmt_misc.automount \
+       units/proc-sys-fs-binfmt_misc.mount units/cryptsetup.target \
+       units/cryptsetup-pre.target units/machine.slice \
+       units/user.slice
+am__dist_sysusers_DATA_DIST = sysusers.d/systemd.conf \
+       sysusers.d/systemd-remote.conf
 am__dist_tmpfiles_DATA_DIST = tmpfiles.d/systemd.conf \
-       tmpfiles.d/systemd-nologin.conf tmpfiles.d/tmp.conf \
-       tmpfiles.d/x11.conf tmpfiles.d/var.conf tmpfiles.d/etc.conf \
+       tmpfiles.d/systemd-nologin.conf tmpfiles.d/systemd-remote.conf \
+       tmpfiles.d/tmp.conf tmpfiles.d/x11.conf tmpfiles.d/var.conf \
        tmpfiles.d/legacy.conf
 am__dist_udevrules_DATA_DIST = rules/42-usb-hid-pm.rules \
        rules/50-udev-default.rules rules/60-drm.rules \
@@ -3859,22 +4397,22 @@ am__dist_udevrules_DATA_DIST = rules/42-usb-hid-pm.rules \
        rules/60-persistent-storage.rules rules/64-btrfs.rules \
        rules/75-net-description.rules rules/75-tty-description.rules \
        rules/78-sound-card.rules rules/80-net-setup-link.rules \
-       rules/95-udev-late.rules rules/50-firmware.rules \
-       rules/80-drivers.rules rules/60-cdrom_id.rules \
-       rules/60-persistent-v4l.rules rules/61-accelerometer.rules \
-       rules/75-probe_mtd.rules src/login/70-uaccess.rules \
-       src/login/70-power-switch.rules
+       rules/95-udev-late.rules rules/80-drivers.rules \
+       rules/60-cdrom_id.rules rules/60-persistent-v4l.rules \
+       rules/61-accelerometer.rules rules/75-probe_mtd.rules \
+       src/login/70-uaccess.rules src/login/70-power-switch.rules
 am__dist_userunit_DATA_DIST = units/user/basic.target \
        units/user/default.target units/user/exit.target \
-       units/user/systemd-bus-proxyd.socket \
-       units/user/systemd-bus-proxyd@.service
-am__dist_zshcompletion_DATA_DIST = shell-completion/zsh/_systemctl \
-       shell-completion/zsh/_journalctl shell-completion/zsh/_udevadm \
+       units/user/systemd-bus-proxyd.socket
+am__dist_zshcompletion_DATA_DIST = shell-completion/zsh/_journalctl \
+       shell-completion/zsh/_udevadm \
        shell-completion/zsh/_kernel-install \
        shell-completion/zsh/_systemd-nspawn \
        shell-completion/zsh/_systemd-analyze \
        shell-completion/zsh/_systemd-run \
        shell-completion/zsh/_sd_hosts_or_user_at_host \
+       shell-completion/zsh/_sd_outputmodes \
+       shell-completion/zsh/_sd_unit_files \
        shell-completion/zsh/_systemd-delta \
        shell-completion/zsh/_systemd \
        shell-completion/zsh/_systemd-tmpfiles \
@@ -3889,18 +4427,20 @@ am__dist_zshcompletion_DATA_DIST = shell-completion/zsh/_systemctl \
        shell-completion/zsh/_systemd-inhibit
 DATA = $(dist_bashcompletion_DATA) $(dist_catalog_DATA) \
        $(dist_dbuspolicy_DATA) $(dist_dbussystemservice_DATA) \
-       $(dist_doc_DATA) $(dist_gatewayddocumentroot_DATA) \
-       $(dist_network_DATA) $(dist_ntpunits_DATA) \
-       $(dist_pamconf_DATA) $(dist_pkgdata_DATA) \
-       $(dist_pkgsysconf_DATA) $(dist_polkitpolicy_DATA) \
-       $(dist_sysctl_DATA) $(dist_systempreset_DATA) \
-       $(dist_systemunit_DATA) $(dist_sysusers_DATA) \
-       $(dist_tmpfiles_DATA) $(dist_udevconf_DATA) \
-       $(dist_udevhwdb_DATA) $(dist_udevrules_DATA) \
-       $(dist_userunit_DATA) $(dist_zshcompletion_DATA) $(gir_DATA) \
-       $(nodist_pkgsysconf_DATA) $(nodist_rpmmacros_DATA) \
+       $(dist_doc_DATA) $(dist_factory_etc_DATA) \
+       $(dist_factory_pam_DATA) $(dist_gatewayddocumentroot_DATA) \
+       $(dist_network_DATA) $(dist_pamconf_DATA) $(dist_pkgdata_DATA) \
+       $(dist_pkgsysconf_DATA) $(dist_sysctl_DATA) \
+       $(dist_systempreset_DATA) $(dist_systemunit_DATA) \
+       $(dist_sysusers_DATA) $(dist_tmpfiles_DATA) \
+       $(dist_udevconf_DATA) $(dist_udevhwdb_DATA) \
+       $(dist_udevrules_DATA) $(dist_userunit_DATA) \
+       $(dist_zshcompletion_DATA) $(gir_DATA) \
+       $(nodist_bashcompletion_DATA) $(nodist_pkgsysconf_DATA) \
+       $(nodist_polkitpolicy_DATA) $(nodist_rpmmacros_DATA) \
        $(nodist_systemunit_DATA) $(nodist_sysusers_DATA) \
-       $(nodist_udevrules_DATA) $(nodist_userunit_DATA) \
+       $(nodist_tmpfiles_DATA) $(nodist_udevrules_DATA) \
+       $(nodist_userunit_DATA) $(nodist_zshcompletion_DATA) \
        $(noinst_DATA) $(pkgconfigdata_DATA) $(pkgconfiglib_DATA) \
        $(sharepkgconfig_DATA) $(sysctl_DATA) $(sysvinit_DATA) \
        $(typelibs_DATA) $(varlog_DATA)
@@ -3911,11 +4451,11 @@ am__libgudev_include_HEADERS_DIST = src/gudev/gudev.h \
 am__pkginclude_HEADERS_DIST = src/systemd/sd-login.h \
        src/systemd/sd-id128.h src/systemd/sd-daemon.h \
        src/systemd/sd-bus.h src/systemd/sd-bus-protocol.h \
-       src/systemd/sd-bus-vtable.h src/systemd/sd-memfd.h \
-       src/systemd/sd-utf8.h src/systemd/sd-event.h \
-       src/systemd/sd-rtnl.h src/systemd/sd-resolve.h \
-       src/systemd/sd-path.h src/systemd/sd-journal.h \
-       src/systemd/sd-messages.h src/systemd/_sd-common.h
+       src/systemd/sd-bus-vtable.h src/systemd/sd-utf8.h \
+       src/systemd/sd-event.h src/systemd/sd-rtnl.h \
+       src/systemd/sd-resolve.h src/systemd/sd-path.h \
+       src/systemd/sd-journal.h src/systemd/sd-messages.h \
+       src/systemd/_sd-common.h
 HEADERS = $(include_HEADERS) $(libgudev_include_HEADERS) \
        $(pkginclude_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
@@ -4185,6 +4725,7 @@ BLKID_LIBS = @BLKID_LIBS@
 CAP_LIBS = @CAP_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
+CERTIFICATEROOT = @CERTIFICATEROOT@
 CFLAGS = @CFLAGS@
 CHKCONFIG = @CHKCONFIG@
 CPP = @CPP@
@@ -4207,7 +4748,6 @@ EGREP = @EGREP@
 ELFUTILS_LIBS = @ELFUTILS_LIBS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-FIRMWARE_PATH = @FIRMWARE_PATH@
 GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
 GCRYPT_LIBS = @GCRYPT_LIBS@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
@@ -4256,9 +4796,13 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCRYPTSETUP_CFLAGS = @LIBCRYPTSETUP_CFLAGS@
 LIBCRYPTSETUP_LIBS = @LIBCRYPTSETUP_LIBS@
+LIBCURL_CFLAGS = @LIBCURL_CFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
 LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBIDN_CFLAGS = @LIBIDN_CFLAGS@
+LIBIDN_LIBS = @LIBIDN_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -4329,6 +4873,8 @@ SYSTEM_SYSVINIT_PATH = @SYSTEM_SYSVINIT_PATH@
 SYSTEM_SYSVRCND_PATH = @SYSTEM_SYSVRCND_PATH@
 SYSTEM_UID_MAX = @SYSTEM_UID_MAX@
 TELINIT = @TELINIT@
+TERMINAL_CFLAGS = @TERMINAL_CFLAGS@
+TERMINAL_LIBS = @TERMINAL_LIBS@
 TTY_GID = @TTY_GID@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
@@ -4413,16 +4959,16 @@ zshcompletiondir = @zshcompletiondir@
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 AM_MAKEFLAGS = --no-print-directory
 AUTOMAKE_OPTIONS = color-tests parallel-tests
-SUBDIRS = . po $(am__append_96) $(am__append_106)
-LIBUDEV_CURRENT = 6
-LIBUDEV_REVISION = 0
-LIBUDEV_AGE = 5
+SUBDIRS = . po $(am__append_121) $(am__append_129)
+LIBUDEV_CURRENT = 7
+LIBUDEV_REVISION = 1
+LIBUDEV_AGE = 6
 LIBGUDEV_CURRENT = 2
 LIBGUDEV_REVISION = 0
 LIBGUDEV_AGE = 2
-LIBSYSTEMD_CURRENT = 3
-LIBSYSTEMD_REVISION = 1
-LIBSYSTEMD_AGE = 3
+LIBSYSTEMD_CURRENT = 5
+LIBSYSTEMD_REVISION = 0
+LIBSYSTEMD_AGE = 5
 
 # The following four libraries only exist for compatibility reasons,
 # their version info should not be bumped anymore
@@ -4470,21 +5016,26 @@ udevrulesdir = $(udevlibexecdir)/rules.d
 udevhwdbdir = $(udevlibexecdir)/hwdb.d
 catalogdir = $(prefix)/lib/systemd/catalog
 kernelinstalldir = $(prefix)/lib/kernel/install.d
-ntpunitsdir = $(prefix)/lib/systemd/ntp-units.d
+factory_etcdir = $(prefix)/share/factory/etc
+factory_pamdir = $(prefix)/share/factory/etc/pam.d
 rootbindir = $(rootprefix)/bin
 rootlibexecdir = $(rootprefix)/lib/systemd
-CLEANFILES = $(BUILT_SOURCES) units/console-shell.service.m4 \
+CLEANFILES = $(BUILT_SOURCES) $(nodist_bashcompletion_DATA) \
+       $(nodist_zshcompletion_DATA) units/console-shell.service.m4 \
        units/console-getty.service.m4 \
-       units/container-getty@.service.m4 units/rescue.service.m4 \
-       units/user@.service.m4 $(am__append_54) $(am__append_56) \
+       units/container-getty@.service.m4 units/user@.service.m4 \
+       $(am__append_58) $(am__append_60) \
        src/core/load-fragment-gperf.gperf \
        src/core/load-fragment-gperf.c \
        src/core/load-fragment-gperf-nulstr.c \
        src/shared/errno-list.txt src/shared/errno-from-name.gperf \
        src/shared/af-list.txt src/shared/af-from-name.gperf \
-       src/core/macros.systemd \
-       src/core/org.freedesktop.systemd1.policy.in $(am__append_81) \
-       src/libsystemd/libsystemd.sym \
+       src/shared/arphrd-list.txt src/shared/arphrd-from-name.gperf \
+       src/shared/dns_type-list.txt \
+       src/shared/dns_type-from-name.gperf src/core/macros.systemd \
+       src/core/org.freedesktop.systemd1.policy.in \
+       src/test/test-hashmap-ordered.c tmpfiles.d/etc.conf \
+       $(am__append_88) src/libsystemd/libsystemd.sym \
        src/libsystemd/sd-bus/bus-error-mapping.c \
        src/libudev/libudev.pc docs/html/libudev docs/html/gudev \
        rules/99-systemd.rules src/udev/udev.pc \
@@ -4493,21 +5044,23 @@ CLEANFILES = $(BUILT_SOURCES) units/console-shell.service.m4 \
        units/systemd-udev-hwdb-update.service \
        src/udev/keyboard-keys-from-name.gperf \
        src/udev/keyboard-keys.txt src/udev/net/link-config-gperf.c \
-       $(am__append_109) $(am__append_111) \
-       src/journal/journald-gperf.c $(am__append_142) \
-       $(am__append_209) $(am__append_229) $(am__append_240) \
-       $(am__append_263) $(nodist_systemunit_DATA) \
+       $(am__append_132) $(am__append_134) $(am__append_143) \
+       $(am__append_148) src/journal/journald-gperf.c \
+       $(am__append_174) $(am__append_233) $(am__append_255) \
+       $(am__append_274) $(am__append_297) $(nodist_systemunit_DATA) \
        $(nodist_userunit_DATA) $(pkgconfigdata_DATA) \
        $(pkgconfiglib_DATA) $(nodist_polkitpolicy_DATA) \
-       $(am__append_272) defined undefined
-DISTCLEANFILES = $(am__append_271)
+       $(am__append_306) defined undefined
+DISTCLEANFILES = $(am__append_305)
 
 # Really, do not edit this file.
-EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
+EXTRA_DIST = shell-completion/bash/systemctl.in \
+       shell-completion/zsh/_systemctl.in units/getty@.service.m4 \
+       units/serial-getty@.service.m4 \
        units/console-shell.service.m4.in \
        units/console-getty.service.m4.in \
-       units/container-getty@.service.m4.in \
-       units/rescue.service.m4.in units/systemd-initctl.service.in \
+       units/container-getty@.service.m4.in units/rescue.service.in \
+       units/systemd-initctl.service.in \
        units/systemd-shutdownd.service.in \
        units/systemd-remount-fs.service.in \
        units/systemd-update-utmp.service.in \
@@ -4521,11 +5074,8 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        units/user/systemd-exit.service.in \
        units/systemd-fsck@.service.in \
        units/systemd-fsck-root.service.in units/user@.service.in \
-       units/debug-shell.service.in \
-       units/systemd-hibernate.service.in \
-       units/systemd-hybrid-sleep.service.in \
-       units/systemd-suspend.service.in units/quotaon.service.in \
-       units/initrd-parse-etc.service.in \
+       units/debug-shell.service.in units/systemd-suspend.service.in \
+       units/quotaon.service.in units/initrd-parse-etc.service.in \
        units/initrd-cleanup.service.in \
        units/initrd-udevadm-cleanup-db.service.in \
        units/initrd-switch-root.service.in \
@@ -4545,9 +5095,9 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        man/nss-myhostname.xml man/os-release.xml man/pam_systemd.xml \
        man/resolved.conf.xml man/runlevel.xml man/sd-daemon.xml \
        man/sd-id128.xml man/sd-journal.xml man/sd-login.xml \
-       man/sd-readahead.xml man/sd_booted.xml \
-       man/sd_bus_creds_get_pid.xml man/sd_bus_creds_new_from_pid.xml \
-       man/sd_bus_error.xml man/sd_bus_message_append.xml \
+       man/sd_booted.xml man/sd_bus_creds_get_pid.xml \
+       man/sd_bus_creds_new_from_pid.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 \
@@ -4556,12 +5106,14 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        man/sd_bus_message_get_monotonic_usec.xml \
        man/sd_bus_negotiate_fds.xml man/sd_bus_new.xml \
        man/sd_bus_open_user.xml man/sd_bus_path_encode.xml \
-       man/sd_bus_request_name.xml man/sd_event_add_time.xml \
-       man/sd_event_new.xml man/sd_get_seats.xml \
-       man/sd_id128_get_machine.xml man/sd_id128_randomize.xml \
-       man/sd_id128_to_string.xml man/sd_is_fifo.xml \
-       man/sd_journal_add_match.xml man/sd_journal_get_catalog.xml \
-       man/sd_journal_get_cursor.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_set_name.xml \
+       man/sd_get_seats.xml man/sd_id128_get_machine.xml \
+       man/sd_id128_randomize.xml man/sd_id128_to_string.xml \
+       man/sd_is_fifo.xml man/sd_journal_add_match.xml \
+       man/sd_journal_get_catalog.xml man/sd_journal_get_cursor.xml \
        man/sd_journal_get_cutoff_realtime_usec.xml \
        man/sd_journal_get_data.xml man/sd_journal_get_fd.xml \
        man/sd_journal_get_realtime_usec.xml \
@@ -4569,8 +5121,8 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        man/sd_journal_open.xml man/sd_journal_print.xml \
        man/sd_journal_query_unique.xml man/sd_journal_seek_head.xml \
        man/sd_journal_stream_fd.xml man/sd_listen_fds.xml \
-       man/sd_login_monitor_new.xml man/sd_notify.xml \
-       man/sd_pid_get_session.xml man/sd_readahead.xml \
+       man/sd_login_monitor_new.xml man/sd_machine_get_class.xml \
+       man/sd_notify.xml man/sd_pid_get_session.xml \
        man/sd_seat_get_active.xml man/sd_session_is_active.xml \
        man/sd_uid_get_state.xml man/sd_watchdog_enabled.xml \
        man/shutdown.xml man/standard-options.xml man/sysctl.d.xml \
@@ -4582,17 +5134,21 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        man/systemd-binfmt.service.xml man/systemd-bootchart.xml \
        man/systemd-bus-proxyd.xml man/systemd-bus-proxyd@.service.xml \
        man/systemd-cat.xml man/systemd-cgls.xml man/systemd-cgtop.xml \
-       man/systemd-cryptsetup-generator.xml \
+       man/systemd-coredump.xml man/systemd-cryptsetup-generator.xml \
        man/systemd-cryptsetup@.service.xml \
        man/systemd-debug-generator.xml man/systemd-delta.xml \
        man/systemd-detect-virt.xml man/systemd-efi-boot-generator.xml \
+       man/systemd-escape.xml man/systemd-firstboot.xml \
        man/systemd-fsck@.service.xml man/systemd-fstab-generator.xml \
        man/systemd-getty-generator.xml \
        man/systemd-gpt-auto-generator.xml \
-       man/systemd-halt.service.xml man/systemd-hostnamed.service.xml \
-       man/systemd-inhibit.xml man/systemd-initctl.service.xml \
+       man/systemd-halt.service.xml \
+       man/systemd-hibernate-resume-generator.xml \
+       man/systemd-hibernate-resume@.service.xml \
+       man/systemd-hostnamed.service.xml man/systemd-inhibit.xml \
+       man/systemd-initctl.service.xml \
        man/systemd-journal-gatewayd.service.xml \
-       man/systemd-journal-remote.xml \
+       man/systemd-journal-remote.xml man/systemd-journal-upload.xml \
        man/systemd-journald.service.xml \
        man/systemd-localed.service.xml man/systemd-logind.service.xml \
        man/systemd-machine-id-setup.xml \
@@ -4603,7 +5159,6 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        man/systemd-nspawn.xml man/systemd-path.xml \
        man/systemd-quotacheck.service.xml \
        man/systemd-random-seed.service.xml \
-       man/systemd-readahead-replay.service.xml \
        man/systemd-remount-fs.service.xml \
        man/systemd-resolved.service.xml \
        man/systemd-rfkill@.service.xml man/systemd-run.xml \
@@ -4633,28 +5188,41 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        man/systemd.swap.xml man/systemd.target.xml \
        man/systemd.time.xml man/systemd.timer.xml \
        man/systemd.unit.xml man/systemd.xml man/sysusers.d.xml \
-       man/telinit.xml man/timedatectl.xml man/tmpfiles.d.xml \
-       man/udev.xml man/udevadm.xml man/user-system-options.xml \
-       man/vconsole.conf.xml $(am__append_57) $(XML_FILES) \
+       man/telinit.xml man/timedatectl.xml man/timesyncd.conf.xml \
+       man/tmpfiles.d.xml man/udev.conf.xml man/udev.xml \
+       man/udevadm.xml man/user-system-options.xml \
+       man/vconsole.conf.xml $(am__append_61) $(XML_FILES) \
        $(HTML_FILES) $(HTML_ALIAS) $(man_MANS) \
        tools/make-man-index.py tools/make-directive-index.py \
-       tools/make-man-rules.py tools/xml_helper.py \
-       src/core/load-fragment-gperf.gperf.m4 src/core/systemd.pc.in \
-       src/core/macros.systemd.in test/sched_idle_bad.service \
-       test/sched_idle_ok.service test/sched_rr_bad.service \
-       test/sched_rr_ok.service test/sched_rr_change.service \
-       test/son.service test/daughter.service test/parent.slice \
-       src/test/test-helper.h units/systemd-modules-load.service.in \
-       units/kmod-static-nodes.service.in \
+       tools/xml_helper.py src/core/load-fragment-gperf.gperf.m4 \
+       src/core/systemd.pc.in src/core/macros.systemd.in \
+       test/a.service test/basic.target test/b.service test/c.service \
+       test/daughter.service test/d.service test/end.service \
+       test/e.service test/f.service test/grandchild.service \
+       test/g.service test/hello-after-sleep.target \
+       test/hello.service test/h.service test/parent-deep.slice \
+       test/parent.slice test/paths.target \
+       test/sched_idle_bad.service test/sched_idle_ok.service \
+       test/sched_rr_bad.service test/sched_rr_change.service \
+       test/sched_rr_ok.service test/shutdown.target \
+       test/sleep.service test/sockets.target test/son.service \
+       test/sysinit.target test/testsuite.target test/timers.target \
+       test/unstoppable.service test/bus-policy/hello.conf \
+       test/bus-policy/methods.conf test/bus-policy/ownerships.conf \
+       test/bus-policy/signals.conf src/test/test-helper.h \
+       units/systemd-modules-load.service.in \
+       units/kmod-static-nodes.service.in tmpfiles.d/etc.conf.m4 \
        units/systemd-tmpfiles-setup-dev.service.in \
        units/systemd-tmpfiles-setup.service.in \
-       units/systemd-tmpfiles-clean.service.in $(am__append_80) \
+       units/systemd-tmpfiles-clean.service.in $(am__append_87) \
+       $(am__append_92) $(am__append_96) \
        units/systemd-bus-proxyd@.service.in \
+       units/user/systemd-bus-proxyd@.service.in \
        src/libsystemd/libsystemd.sym.m4 \
        src/libsystemd/libsystemd.pc.in \
        src/libsystemd/sd-bus/bus-error-mapping.gperf \
        src/libsystemd/sd-bus/DIFFERENCES \
-       src/libsystemd/sd-bus/GVARIANT-SERIALIZATION \
+       src/libsystemd/sd-bus/GVARIANT-SERIALIZATION $(am__append_119) \
        src/libudev/libudev.pc.in rules/99-systemd.rules.in \
        src/udev/udev.pc.in units/systemd-udevd.service.in \
        units/systemd-udev-trigger.service.in \
@@ -4667,6 +5235,7 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        src/gudev/gudevenumtypes.h.template \
        src/gudev/gudevenumtypes.c.template src/gudev/gjs-example.js \
        src/gudev/seed-example-enum.js src/gudev/seed-example.js \
+       $(am__append_139) $(am__append_142) $(am__append_146) \
        units/systemd-journald.service.in \
        units/systemd-journal-flush.service.in \
        units/systemd-journal-catalog-update.service.in \
@@ -4674,21 +5243,18 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        units/systemd-journal-gatewayd.service.in \
        sysctl.d/50-coredump.conf.in units/systemd-binfmt.service.in \
        units/systemd-vconsole-setup.service.in \
-       units/systemd-readahead-collect.service.in \
-       units/systemd-readahead-replay.service.in \
-       units/systemd-readahead-done.service.in \
        units/systemd-quotacheck.service.in \
        units/systemd-random-seed.service.in \
        units/systemd-backlight@.service.in \
        units/systemd-rfkill@.service.in \
        units/systemd-hostnamed.service.in \
        units/systemd-localed.service.in \
-       units/systemd-timedated.service.in $(am__append_208) \
-       $(am__append_227) $(am__append_228) $(am__append_239) \
+       units/systemd-timedated.service.in $(am__append_232) \
+       $(am__append_252) $(am__append_254) $(am__append_273) \
        src/login/logind-gperf.gperf src/login/71-seat.rules.in \
        src/login/73-seat-late.rules.in \
        units/systemd-logind.service.in \
-       units/systemd-user-sessions.service.in $(am__append_265) \
+       units/systemd-user-sessions.service.in $(am__append_299) \
        src/compat-libs/libsystemd-journal.pc.in \
        src/compat-libs/libsystemd-login.pc.in \
        src/compat-libs/libsystemd-id128.pc.in \
@@ -4698,26 +5264,30 @@ EXTRA_DIST = units/getty@.service.m4 units/serial-getty@.service.m4 \
        docs/var-log/README.in $(top_srcdir)/tools/check-includes.pl
 BUILT_SOURCES = src/shared/errno-from-name.h \
        src/shared/errno-to-name.h src/shared/af-from-name.h \
-       src/shared/af-to-name.h src/libsystemd/libsystemd.sym \
-       $(nodist_libudev_core_la_SOURCES) $(am__append_110) \
-       $(am__append_264) $(am__append_266) \
+       src/shared/af-to-name.h src/shared/arphrd-from-name.h \
+       src/shared/arphrd-to-name.h src/resolve/dns_type-from-name.h \
+       src/resolve/dns_type-to-name.h src/test/test-hashmap-ordered.c \
+       src/libsystemd/libsystemd.sym \
+       $(nodist_libudev_core_la_SOURCES) $(am__append_133) \
+       $(am__append_298) $(am__append_300) \
        $(test_libsystemd_sym_SOURCES) $(test_libudev_sym_SOURCES)
 INSTALL_EXEC_HOOKS = install-target-wants-hook \
        install-directories-hook install-aliases-hook \
-       install-touch-usr-hook systemd-detect-virt-install-hook \
-       $(am__append_89) bus-proxyd-install-hook \
-       libsystemd-install-hook libudev-install-hook $(am__append_112) \
-       journal-install-hook $(am__append_269)
-UNINSTALL_EXEC_HOOKS = $(am__append_90) bus-proxyd-uninstall-hook \
+       install-touch-usr-hook $(am__append_1) \
+       systemd-detect-virt-install-hook $(am__append_105) \
+       bus-proxyd-install-hook libsystemd-install-hook \
+       libudev-install-hook $(am__append_140) journal-install-hook \
+       $(am__append_303)
+UNINSTALL_EXEC_HOOKS = $(am__append_106) bus-proxyd-uninstall-hook \
        libsystemd-uninstall-hook libudev-uninstall-hook \
-       $(am__append_113) journal-uninstall-hook $(am__append_270)
+       journal-uninstall-hook $(am__append_304)
 INSTALL_DATA_HOOKS = units-install-hook hwdb-update-hook \
        catalog-update-hook
 UNINSTALL_DATA_HOOKS = units-uninstall-hook catalog-remove-hook
 DISTCLEAN_LOCAL_HOOKS = test-sys-distclean
 CLEAN_LOCAL_HOOKS = clean-sphinx
 pkginclude_HEADERS = src/systemd/sd-login.h src/systemd/sd-id128.h \
-       src/systemd/sd-daemon.h $(am__append_95) \
+       src/systemd/sd-daemon.h $(am__append_112) \
        src/systemd/sd-journal.h src/systemd/sd-messages.h \
        src/systemd/_sd-common.h
 
@@ -4737,19 +5307,20 @@ pkginclude_HEADERS = src/systemd/sd-login.h src/systemd/sd-id128.h \
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES = libsystemd-shared.la libsystemd-units.la \
-       libsystemd-label.la $(am__append_58) libsystemd-logs.la \
-       libsystemd-capability.la $(am__append_59) libsystemd-core.la \
+       libsystemd-label.la $(am__append_65) libsystemd-logs.la \
+       libsystemd-capability.la $(am__append_66) libsystemd-core.la \
        libsystemd-internal.la libsystemd-resolve.la \
-       libsystemd-dump.la libsystemd-network.la libudev-internal.la \
-       libudev-core.la libsystemd-journal-core.la \
-       libsystemd-journal-internal.la $(am__append_216) \
-       $(am__append_235) $(am__append_243)
-lib_LTLIBRARIES = libsystemd.la libudev.la $(am__append_107) \
-       $(am__append_214) $(am__append_267)
+       libsystemd-dump.la libsystemd-network.la $(am__append_113) \
+       libudev-internal.la libudev-core.la libsystemd-journal-core.la \
+       libsystemd-journal-internal.la $(am__append_240) \
+       $(am__append_268) $(am__append_277)
+lib_LTLIBRARIES = libsystemd.la libudev.la $(am__append_130) \
+       $(am__append_238) $(am__append_253) $(am__append_266) \
+       $(am__append_301)
 include_HEADERS = src/libudev/libudev.h
-noinst_DATA = $(am__append_53) $(am__append_55) $(am__append_97)
+noinst_DATA = $(am__append_57) $(am__append_59) $(am__append_122)
 pkgconfiglib_DATA = src/libsystemd/libsystemd.pc \
-       src/libudev/libudev.pc $(am__append_108) $(am__append_268)
+       src/libudev/libudev.pc $(am__append_131) $(am__append_302)
 polkitpolicy_in_in_files =  \
        src/core/org.freedesktop.systemd1.policy.in.in
 polkitpolicy_in_files =  \
@@ -4757,8 +5328,8 @@ polkitpolicy_in_files =  \
        src/locale/org.freedesktop.locale1.policy.in \
        src/timedate/org.freedesktop.timedate1.policy.in \
        src/login/org.freedesktop.login1.policy.in
-polkitpolicy_files = $(am__append_176) $(am__append_189) \
-       $(am__append_201) $(am__append_255)
+polkitpolicy_files = $(am__append_203) $(am__append_214) \
+       $(am__append_226) $(am__append_290)
 dist_udevrules_DATA = rules/42-usb-hid-pm.rules \
        rules/50-udev-default.rules rules/60-drm.rules \
        rules/60-keyboard.rules rules/60-persistent-storage-tape.rules \
@@ -4767,53 +5338,62 @@ dist_udevrules_DATA = rules/42-usb-hid-pm.rules \
        rules/60-persistent-storage.rules rules/64-btrfs.rules \
        rules/75-net-description.rules rules/75-tty-description.rules \
        rules/78-sound-card.rules rules/80-net-setup-link.rules \
-       rules/95-udev-late.rules $(am__append_99) $(am__append_101) \
+       rules/95-udev-late.rules $(am__append_124) \
        rules/60-cdrom_id.rules rules/60-persistent-v4l.rules \
        rules/61-accelerometer.rules rules/75-probe_mtd.rules \
-       $(am__append_261)
-nodist_udevrules_DATA = rules/99-systemd.rules $(am__append_262)
-nodist_pkgsysconf_DATA = $(am__append_213) $(am__append_233)
+       $(am__append_295)
+nodist_udevrules_DATA = rules/99-systemd.rules $(am__append_296)
 dist_pkgsysconf_DATA = src/core/system.conf src/core/user.conf \
-       src/journal/journald.conf $(am__append_135) $(am__append_157) \
-       $(am__append_254)
-dist_pkgdata_DATA = $(am__append_192)
+       src/journal/journald.conf $(am__append_168) $(am__append_184) \
+       $(am__append_289)
+nodist_pkgsysconf_DATA = $(am__append_141) $(am__append_147) \
+       $(am__append_237) $(am__append_264)
+dist_pkgdata_DATA = $(am__append_116) $(am__append_217)
 dist_dbuspolicy_DATA = src/core/org.freedesktop.systemd1.conf \
-       $(am__append_174) $(am__append_187) $(am__append_198) \
-       $(am__append_223) $(am__append_253)
+       $(am__append_201) $(am__append_212) $(am__append_223) \
+       $(am__append_248) $(am__append_259) $(am__append_288)
 dist_dbussystemservice_DATA =  \
-       src/core/org.freedesktop.systemd1.service $(am__append_175) \
-       $(am__append_188) $(am__append_197) $(am__append_222) \
-       $(am__append_252)
+       src/core/org.freedesktop.systemd1.service $(am__append_202) \
+       $(am__append_213) $(am__append_222) $(am__append_247) \
+       $(am__append_260) $(am__append_287)
+
+# ------------------------------------------------------------------------------
+dist_systemunit_DATA_busnames = units/busnames.target \
+       $(am__append_200) units/org.freedesktop.systemd1.busname \
+       $(am__append_210) $(am__append_225) $(am__append_246) \
+       $(am__append_258) $(am__append_286)
 check_DATA = test/sys
-tests = test-job-type test-env-replace test-strbuf test-strv \
-       test-path-util test-strxcpyx test-unit-name test-unit-file \
-       test-utf8 test-ellipsize test-util test-ring test-tmpfiles \
+tests = test-engine test-cgroup-mask test-job-type test-env-replace \
+       test-strbuf test-strv test-path-util test-strxcpyx \
+       test-unit-name test-unit-file test-utf8 test-ellipsize \
+       test-util test-ring test-barrier test-pty test-tmpfiles \
        test-namespace test-date test-sleep test-replace-var \
        test-sched-prio test-calendarspec test-strip-tab-ansi \
        test-cgroup-util test-prioq test-fileio test-time test-hashmap \
-       test-list test-tables test-device-nodes test-xml \
+       test-set test-list test-tables test-device-nodes test-xml \
        test-architecture test-socket-util test-fdset test-conf-files \
-       test-capability test-async test-ratelimit test-bus-marshal \
+       test-capability test-async test-ratelimit test-condition-util \
+       test-uid-range test-bus-policy test-bus-marshal \
        test-bus-signature test-bus-chat test-bus-cleanup \
        test-bus-server test-bus-match test-bus-kernel \
-       test-bus-kernel-bloom test-bus-kernel-benchmark test-bus-memfd \
+       test-bus-kernel-bloom test-bus-kernel-benchmark \
        test-bus-zero-copy test-bus-introspect test-bus-objects \
        test-bus-error test-bus-creds test-bus-gvariant test-event \
        test-rtnl test-resolve test-dhcp-option test-dhcp-client \
        test-dhcp-server test-ipv4ll test-icmp6-rs test-dhcp6-client \
-       test-id128 test-journal test-journal-send test-journal-syslog \
-       test-journal-match test-journal-stream test-journal-init \
-       test-journal-verify test-journal-interleaving \
-       test-journal-flush test-mmap-cache test-catalog \
-       $(am__append_121) $(am__append_219) $(am__append_236) \
-       $(am__append_249) test-libsystemd-sym test-libudev-sym
+       $(am__append_120) test-id128 test-journal test-journal-send \
+       test-journal-syslog test-journal-match test-journal-stream \
+       test-journal-init test-journal-verify \
+       test-journal-interleaving test-journal-flush test-mmap-cache \
+       test-catalog $(am__append_154) $(am__append_243) \
+       $(am__append_265) $(am__append_270) $(am__append_283) \
+       test-libsystemd-sym test-libudev-sym
 
 # ------------------------------------------------------------------------------
-manual_tests = test-engine test-ns test-loopback test-hostname \
-       test-daemon test-cgroup test-cgroup-mask test-install \
-       test-watchdog test-log test-ipcrm $(am__append_62) \
-       $(am__append_63) test-libudev test-udev test-journal-enum \
-       $(am__append_138) $(am__append_155) $(am__append_248)
+manual_tests = test-ns test-loopback test-hostname test-daemon \
+       test-cgroup test-install test-watchdog test-log test-ipcrm \
+       $(am__append_69) $(am__append_70) test-libudev test-udev \
+       test-journal-enum $(am__append_171) $(am__append_282)
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
        -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
@@ -4823,6 +5403,7 @@ AM_CPPFLAGS = \
        -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
        -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
        -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
+       -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
        -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
        -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
        -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
@@ -4847,6 +5428,7 @@ AM_CPPFLAGS = \
        -DKEXEC=\"$(KEXEC)\" \
        -DLIBDIR=\"$(libdir)\" \
        -DROOTLIBDIR=\"$(rootlibdir)\" \
+       -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
        -I $(top_srcdir)/src \
        -I $(top_builddir)/src/shared \
        -I $(top_srcdir)/src/shared \
@@ -4856,6 +5438,7 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/timedate \
        -I $(top_srcdir)/src/timesync \
        -I $(top_srcdir)/src/resolve \
+       -I $(top_builddir)/src/resolve \
        -I $(top_srcdir)/src/systemd \
        -I $(top_builddir)/src/core \
        -I $(top_srcdir)/src/core \
@@ -4866,74 +5449,76 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/libsystemd/sd-bus \
        -I $(top_srcdir)/src/libsystemd/sd-event \
        -I $(top_srcdir)/src/libsystemd/sd-rtnl \
+       -I $(top_srcdir)/src/libsystemd/sd-network \
        -I $(top_srcdir)/src/libsystemd-network \
+       -I $(top_srcdir)/src/libsystemd-terminal \
        $(OUR_CPPFLAGS)
 
 AM_CFLAGS = $(OUR_CFLAGS)
 AM_LDFLAGS = $(OUR_LDFLAGS)
 
 # ------------------------------------------------------------------------------
-INSTALL_DIRS = $(am__append_76) $(am__append_82) \
+INSTALL_DIRS = $(am__append_83) $(am__append_89) \
        $(sysconfdir)/udev/rules.d $(sysconfdir)/udev/hwdb.d \
-       $(am__append_146) $(am__append_202) $(am__append_256) \
-       $(am__append_279) $(prefix)/lib/modules-load.d \
-       $(sysconfdir)/modules-load.d $(prefix)/lib/systemd/network \
-       $(sysconfdir)/systemd/network $(prefix)/lib/sysctl.d \
-       $(sysconfdir)/sysctl.d $(prefix)/lib/kernel/install.d \
-       $(sysconfdir)/kernel/install.d $(systemshutdowndir) \
-       $(systemsleepdir) $(systemgeneratordir) $(usergeneratordir) \
-       $(userunitdir) $(pkgsysconfdir)/system \
+       $(am__append_178) $(am__append_291) $(am__append_315) \
+       $(prefix)/lib/modules-load.d $(sysconfdir)/modules-load.d \
+       $(prefix)/lib/systemd/network $(sysconfdir)/systemd/network \
+       $(prefix)/lib/sysctl.d $(sysconfdir)/sysctl.d \
+       $(prefix)/lib/kernel/install.d $(sysconfdir)/kernel/install.d \
+       $(systemshutdowndir) $(systemsleepdir) $(systemgeneratordir) \
+       $(usergeneratordir) $(userunitdir) $(pkgsysconfdir)/system \
        $(pkgsysconfdir)/system/multi-user.target.wants \
        $(pkgsysconfdir)/system/getty.target.wants \
        $(pkgsysconfdir)/user $(dbussessionservicedir) \
        $(sysconfdir)/xdg/systemd
-RUNLEVEL1_TARGET_WANTS = $(am__append_273)
-RUNLEVEL2_TARGET_WANTS = $(am__append_274)
-RUNLEVEL3_TARGET_WANTS = $(am__append_275)
-RUNLEVEL4_TARGET_WANTS = $(am__append_276)
-RUNLEVEL5_TARGET_WANTS = $(am__append_277)
+RUNLEVEL1_TARGET_WANTS = $(am__append_307)
+RUNLEVEL2_TARGET_WANTS = $(am__append_308)
+RUNLEVEL3_TARGET_WANTS = $(am__append_309)
+RUNLEVEL4_TARGET_WANTS = $(am__append_310)
+RUNLEVEL5_TARGET_WANTS = $(am__append_311)
 SHUTDOWN_TARGET_WANTS = 
 LOCAL_FS_TARGET_WANTS = systemd-remount-fs.service tmp.mount
-MULTI_USER_TARGET_WANTS = $(am__append_257) getty.target \
+MULTI_USER_TARGET_WANTS = $(am__append_292) getty.target \
        systemd-ask-password-wall.path
-SYSINIT_TARGET_WANTS = $(am__append_66) $(am__append_68) \
-       $(am__append_73) $(am__append_79) systemd-udevd.service \
+SYSINIT_TARGET_WANTS = $(am__append_64) $(am__append_73) \
+       $(am__append_75) $(am__append_80) $(am__append_86) \
+       $(am__append_93) systemd-udevd.service \
        systemd-udev-trigger.service systemd-udev-hwdb-update.service \
        systemd-journald.service systemd-journal-flush.service \
-       systemd-journal-catalog-update.service $(am__append_147) \
-       $(am__append_150) $(am__append_162) $(am__append_170) \
-       systemd-update-utmp.service systemd-update-done.service \
-       ldconfig.service dev-hugepages.mount dev-mqueue.mount \
-       sys-kernel-config.mount sys-kernel-debug.mount \
-       sys-fs-fuse-connections.mount systemd-sysctl.service \
-       systemd-ask-password-console.path
+       systemd-journal-catalog-update.service $(am__append_179) \
+       $(am__append_182) $(am__append_189) $(am__append_197) \
+       $(am__append_312) systemd-update-done.service \
+       dev-hugepages.mount dev-mqueue.mount sys-kernel-config.mount \
+       sys-kernel-debug.mount sys-fs-fuse-connections.mount \
+       systemd-sysctl.service systemd-ask-password-console.path
 SOCKETS_TARGET_WANTS = systemd-udevd-control.socket \
        systemd-udevd-kernel.socket systemd-journald.socket \
        systemd-journald-dev-log.socket systemd-initctl.socket \
        systemd-shutdownd.socket
-BUSNAMES_TARGET_WANTS = $(am__append_178) $(am__append_183) \
-       $(am__append_191) $(am__append_204) $(am__append_226) \
-       $(am__append_259)
-TIMERS_TARGET_WANTS = $(am__append_75)
+BUSNAMES_TARGET_WANTS = $(am__append_205) \
+       org.freedesktop.systemd1.busname $(am__append_216) \
+       $(am__append_228) $(am__append_251) $(am__append_262) \
+       $(am__append_294)
+TIMERS_TARGET_WANTS = $(am__append_82)
 USER_SOCKETS_TARGET_WANTS = 
+USER_DEFAULT_TARGET_WANTS = $(am__append_118)
 USER_BUSNAMES_TARGET_WANTS = 
-SYSTEM_UNIT_ALIASES = $(am__append_177) $(am__append_190) \
-       $(am__append_203) $(am__append_225) $(am__append_258) \
-       $(am__append_278) graphical.target default.target \
-       reboot.target ctrl-alt-del.target getty@.service \
-       autovt@.service
+SYSTEM_UNIT_ALIASES = $(am__append_204) $(am__append_215) \
+       $(am__append_227) $(am__append_250) $(am__append_261) \
+       $(am__append_293) $(am__append_313) graphical.target \
+       default.target reboot.target ctrl-alt-del.target \
+       getty@.service autovt@.service
 USER_UNIT_ALIASES = $(systemunitdir)/shutdown.target shutdown.target \
        $(systemunitdir)/sockets.target sockets.target \
-       $(systemunitdir)/busnames.target busnames.target \
        $(systemunitdir)/timers.target timers.target \
        $(systemunitdir)/paths.target paths.target \
        $(systemunitdir)/bluetooth.target bluetooth.target \
        $(systemunitdir)/printer.target printer.target \
        $(systemunitdir)/sound.target sound.target \
-       $(systemunitdir)/smartcard.target smartcard.target
-GENERAL_ALIASES = $(am__append_141) $(am__append_212) \
-       $(am__append_232) $(am__append_238) \
-       $(systemunitdir)/remote-fs.target \
+       $(systemunitdir)/smartcard.target smartcard.target \
+       $(am__append_314)
+GENERAL_ALIASES = $(am__append_236) $(am__append_263) \
+       $(am__append_272) $(systemunitdir)/remote-fs.target \
        $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
        $(systemunitdir)/getty@.service \
        $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
@@ -4966,7 +5551,6 @@ dist_kernelinstall_SCRIPTS = \
 
 dist_bashcompletion_DATA = shell-completion/bash/busctl \
        shell-completion/bash/journalctl \
-       shell-completion/bash/systemctl \
        shell-completion/bash/systemd-analyze \
        shell-completion/bash/systemd-cat \
        shell-completion/bash/systemd-cgls \
@@ -4976,39 +5560,45 @@ dist_bashcompletion_DATA = shell-completion/bash/busctl \
        shell-completion/bash/systemd-nspawn \
        shell-completion/bash/systemd-run \
        shell-completion/bash/udevadm \
-       shell-completion/bash/kernel-install $(am__append_85) \
-       $(am__append_139) $(am__append_180) $(am__append_194) \
-       $(am__append_206) $(am__append_218) $(am__append_246)
-dist_zshcompletion_DATA = shell-completion/zsh/_systemctl \
-       shell-completion/zsh/_journalctl shell-completion/zsh/_udevadm \
+       shell-completion/bash/kernel-install $(am__append_101) \
+       $(am__append_172) $(am__append_207) $(am__append_219) \
+       $(am__append_230) $(am__append_242) $(am__append_280)
+nodist_bashcompletion_DATA = \
+       shell-completion/bash/systemctl
+
+dist_zshcompletion_DATA = shell-completion/zsh/_journalctl \
+       shell-completion/zsh/_udevadm \
        shell-completion/zsh/_kernel-install \
        shell-completion/zsh/_systemd-nspawn \
        shell-completion/zsh/_systemd-analyze \
        shell-completion/zsh/_systemd-run \
        shell-completion/zsh/_sd_hosts_or_user_at_host \
+       shell-completion/zsh/_sd_outputmodes \
+       shell-completion/zsh/_sd_unit_files \
        shell-completion/zsh/_systemd-delta \
-       shell-completion/zsh/_systemd $(am__append_74) \
-       $(am__append_86) $(am__append_140) $(am__append_181) \
-       $(am__append_195) $(am__append_207) $(am__append_224) \
-       $(am__append_247)
+       shell-completion/zsh/_systemd $(am__append_81) \
+       $(am__append_102) $(am__append_173) $(am__append_208) \
+       $(am__append_220) $(am__append_231) $(am__append_249) \
+       $(am__append_281)
+nodist_zshcompletion_DATA = \
+       shell-completion/zsh/_systemctl
+
 dist_sysctl_DATA = \
        sysctl.d/50-default.conf
 
 dist_systemunit_DATA = units/graphical.target units/multi-user.target \
-       units/emergency.service units/emergency.target \
-       units/sysinit.target units/basic.target units/getty.target \
-       units/halt.target units/kexec.target units/local-fs.target \
-       units/local-fs-pre.target units/initrd.target \
-       units/initrd-fs.target units/initrd-root-fs.target \
-       units/remote-fs.target units/remote-fs-pre.target \
-       units/network.target units/network-pre.target \
-       units/network-online.target units/nss-lookup.target \
-       units/nss-user-lookup.target units/hibernate.target \
-       units/hybrid-sleep.target units/poweroff.target \
-       units/reboot.target units/rescue.target units/rpcbind.target \
-       units/time-sync.target units/shutdown.target \
-       units/final.target units/umount.target units/sigpwr.target \
-       units/sleep.target units/sockets.target units/busnames.target \
+       units/emergency.target units/sysinit.target units/basic.target \
+       units/getty.target units/halt.target units/kexec.target \
+       units/local-fs.target units/local-fs-pre.target \
+       units/initrd.target units/initrd-fs.target \
+       units/initrd-root-fs.target units/remote-fs.target \
+       units/remote-fs-pre.target units/network.target \
+       units/network-pre.target units/network-online.target \
+       units/nss-lookup.target units/nss-user-lookup.target \
+       units/poweroff.target units/reboot.target units/rescue.target \
+       units/rpcbind.target units/time-sync.target \
+       units/shutdown.target units/final.target units/umount.target \
+       units/sigpwr.target units/sleep.target units/sockets.target \
        units/timers.target units/paths.target units/suspend.target \
        units/swap.target units/slices.target units/system.slice \
        units/x-.slice units/systemd-initctl.socket \
@@ -5021,26 +5611,22 @@ dist_systemunit_DATA = units/graphical.target units/multi-user.target \
        units/systemd-ask-password-console.path \
        units/systemd-udevd-control.socket \
        units/systemd-udevd-kernel.socket units/system-update.target \
-       units/initrd-switch-root.target units/ldconfig.service \
-       $(am__append_70) $(am__append_93) \
+       units/initrd-switch-root.target $(am__append_3) \
+       $(am__append_63) $(am__append_77) $(am__append_97) \
+       $(am__append_109) $(am__append_137) \
        units/systemd-journald.socket \
-       units/systemd-journald-dev-log.socket $(am__append_130) \
-       $(am__append_144) $(am__append_153) $(am__append_169) \
-       $(am__append_173) $(am__append_182) $(am__append_185) \
-       $(am__append_200) $(am__append_221) $(am__append_251)
+       units/systemd-journald-dev-log.socket $(am__append_163) \
+       $(am__append_176) $(am__append_196) $(am__append_245) \
+       $(am__append_285)
 nodist_systemunit_DATA = units/getty@.service \
        units/serial-getty@.service units/console-shell.service \
        units/console-getty.service units/container-getty@.service \
        units/systemd-initctl.service units/systemd-shutdownd.service \
        units/systemd-remount-fs.service \
-       units/systemd-update-utmp.service \
-       units/systemd-update-utmp-runlevel.service \
        units/systemd-ask-password-wall.service \
        units/systemd-ask-password-console.service \
        units/systemd-sysctl.service units/emergency.service \
        units/rescue.service units/user@.service \
-       units/systemd-hibernate.service \
-       units/systemd-hybrid-sleep.service \
        units/systemd-suspend.service units/systemd-halt.service \
        units/systemd-poweroff.service units/systemd-reboot.service \
        units/systemd-kexec.service units/systemd-fsck@.service \
@@ -5052,23 +5638,22 @@ nodist_systemunit_DATA = units/getty@.service \
        units/initrd-cleanup.service \
        units/initrd-udevadm-cleanup-db.service \
        units/initrd-switch-root.service units/systemd-nspawn@.service \
-       units/systemd-update-done.service $(am__append_1) \
-       $(am__append_65) $(am__append_67) $(am__append_71) \
-       $(am__append_78) $(am__append_92) \
-       units/systemd-journald.service \
+       units/systemd-update-done.service $(am__append_4) \
+       $(am__append_5) $(am__append_72) $(am__append_74) \
+       $(am__append_78) $(am__append_85) $(am__append_91) \
+       $(am__append_98) $(am__append_108) $(am__append_138) \
+       $(am__append_145) units/systemd-journald.service \
        units/systemd-journal-flush.service \
-       units/systemd-journal-catalog-update.service $(am__append_131) \
-       $(am__append_145) $(am__append_149) $(am__append_154) \
-       $(am__append_159) units/quotaon.service $(am__append_161) \
-       $(am__append_164) $(am__append_166) $(am__append_172) \
-       $(am__append_184) $(am__append_199) $(am__append_211) \
-       $(am__append_220) $(am__append_231) $(am__append_237) \
-       $(am__append_250)
+       units/systemd-journal-catalog-update.service $(am__append_164) \
+       $(am__append_177) $(am__append_181) $(am__append_186) \
+       units/quotaon.service $(am__append_188) $(am__append_191) \
+       $(am__append_193) $(am__append_199) $(am__append_209) \
+       $(am__append_224) $(am__append_235) $(am__append_244) \
+       $(am__append_257) $(am__append_271) $(am__append_284)
 dist_userunit_DATA = units/user/basic.target units/user/default.target \
-       units/user/exit.target $(am__append_94)
-nodist_userunit_DATA = \
-       units/user/systemd-exit.service
-
+       units/user/exit.target $(am__append_111)
+nodist_userunit_DATA = units/user/systemd-exit.service \
+       $(am__append_110) $(am__append_117)
 dist_systempreset_DATA = \
        system-preset/90-systemd.preset
 
@@ -5076,7 +5661,7 @@ dist_doc_DATA = README NEWS LICENSE.LGPL2.1 LICENSE.GPL2 LICENSE.MIT \
        DISTRO_PORTING src/libsystemd/sd-bus/PORTING-DBUS1 \
        src/libsystemd/sd-bus/DIFFERENCES \
        src/libsystemd/sd-bus/GVARIANT-SERIALIZATION \
-       src/systemd/sd-shutdown.h $(am__append_151)
+       src/systemd/sd-shutdown.h
 
 # ------------------------------------------------------------------------------
 
@@ -5093,29 +5678,32 @@ MANPAGES = man/bootup.7 man/busctl.1 man/daemon.7 man/file-hierarchy.7 \
        man/halt.8 man/hostname.5 man/journalctl.1 man/journald.conf.5 \
        man/kernel-command-line.7 man/kernel-install.8 \
        man/locale.conf.5 man/localtime.5 man/machine-id.5 \
-       man/machine-info.5 man/os-release.5 man/runlevel.8 \
-       man/sd-daemon.3 man/sd-id128.3 man/sd-journal.3 \
-       man/sd_booted.3 man/sd_id128_get_machine.3 \
-       man/sd_id128_randomize.3 man/sd_id128_to_string.3 \
-       man/sd_is_fifo.3 man/sd_journal_add_match.3 \
-       man/sd_journal_get_catalog.3 man/sd_journal_get_cursor.3 \
+       man/machine-info.5 man/os-release.5 man/sd-daemon.3 \
+       man/sd-id128.3 man/sd-journal.3 man/sd_booted.3 \
+       man/sd_id128_get_machine.3 man/sd_id128_randomize.3 \
+       man/sd_id128_to_string.3 man/sd_is_fifo.3 \
+       man/sd_journal_add_match.3 man/sd_journal_get_catalog.3 \
+       man/sd_journal_get_cursor.3 \
        man/sd_journal_get_cutoff_realtime_usec.3 \
        man/sd_journal_get_data.3 man/sd_journal_get_fd.3 \
        man/sd_journal_get_realtime_usec.3 man/sd_journal_get_usage.3 \
        man/sd_journal_next.3 man/sd_journal_open.3 \
        man/sd_journal_print.3 man/sd_journal_query_unique.3 \
        man/sd_journal_seek_head.3 man/sd_journal_stream_fd.3 \
-       man/sd_listen_fds.3 man/sd_notify.3 man/sd_watchdog_enabled.3 \
-       man/shutdown.8 man/sysctl.d.5 man/systemctl.1 \
-       man/systemd-activate.8 man/systemd-analyze.1 \
+       man/sd_listen_fds.3 man/sd_machine_get_class.3 man/sd_notify.3 \
+       man/sd_watchdog_enabled.3 man/shutdown.8 man/sysctl.d.5 \
+       man/systemctl.1 man/systemd-activate.8 man/systemd-analyze.1 \
        man/systemd-ask-password-console.service.8 \
        man/systemd-ask-password.1 man/systemd-cat.1 \
        man/systemd-cgls.1 man/systemd-cgtop.1 \
        man/systemd-debug-generator.8 man/systemd-delta.1 \
        man/systemd-detect-virt.1 man/systemd-efi-boot-generator.8 \
+       man/systemd-escape.1 man/systemd-firstboot.1 \
        man/systemd-fsck@.service.8 man/systemd-fstab-generator.8 \
        man/systemd-getty-generator.8 man/systemd-gpt-auto-generator.8 \
-       man/systemd-halt.service.8 man/systemd-inhibit.1 \
+       man/systemd-halt.service.8 \
+       man/systemd-hibernate-resume-generator.8 \
+       man/systemd-hibernate-resume@.service.8 man/systemd-inhibit.1 \
        man/systemd-initctl.service.8 man/systemd-journald.service.8 \
        man/systemd-machine-id-setup.1 man/systemd-notify.1 \
        man/systemd-nspawn.1 man/systemd-path.1 \
@@ -5127,8 +5715,7 @@ MANPAGES = man/bootup.7 man/busctl.1 man/daemon.7 man/file-hierarchy.7 \
        man/systemd-system.conf.5 man/systemd-sysusers.8 \
        man/systemd-tmpfiles.8 man/systemd-tty-ask-password-agent.1 \
        man/systemd-udevd.service.8 man/systemd-update-done.service.8 \
-       man/systemd-update-utmp.service.8 man/systemd.1 \
-       man/systemd.automount.5 man/systemd.device.5 \
+       man/systemd.1 man/systemd.automount.5 man/systemd.device.5 \
        man/systemd.exec.5 man/systemd.journal-fields.7 \
        man/systemd.kill.5 man/systemd.link.5 man/systemd.mount.5 \
        man/systemd.path.5 man/systemd.preset.5 \
@@ -5138,15 +5725,15 @@ MANPAGES = man/bootup.7 man/busctl.1 man/daemon.7 man/file-hierarchy.7 \
        man/systemd.special.7 man/systemd.swap.5 man/systemd.target.5 \
        man/systemd.time.7 man/systemd.timer.5 man/systemd.unit.5 \
        man/sysusers.d.5 man/telinit.8 man/tmpfiles.d.5 man/udev.7 \
-       man/udevadm.8 $(am__append_3) $(am__append_5) $(am__append_7) \
-       $(am__append_9) $(am__append_11) $(am__append_13) \
-       $(am__append_15) $(am__append_17) $(am__append_19) \
-       $(am__append_21) $(am__append_23) $(am__append_25) \
-       $(am__append_27) $(am__append_29) $(am__append_31) \
-       $(am__append_33) $(am__append_35) $(am__append_37) \
-       $(am__append_39) $(am__append_41) $(am__append_43) \
-       $(am__append_45) $(am__append_47) $(am__append_49) \
-       $(am__append_51)
+       man/udev.conf.5 man/udevadm.8 $(am__append_7) $(am__append_9) \
+       $(am__append_11) $(am__append_13) $(am__append_15) \
+       $(am__append_17) $(am__append_19) $(am__append_21) \
+       $(am__append_23) $(am__append_25) $(am__append_27) \
+       $(am__append_29) $(am__append_31) $(am__append_33) \
+       $(am__append_35) $(am__append_37) $(am__append_39) \
+       $(am__append_41) $(am__append_43) $(am__append_45) \
+       $(am__append_47) $(am__append_49) $(am__append_51) \
+       $(am__append_53) $(am__append_55)
 MANPAGES_ALIAS = man/SD_ALERT.3 man/SD_CRIT.3 man/SD_DEBUG.3 \
        man/SD_EMERG.3 man/SD_ERR.3 man/SD_ID128_CONST_STR.3 \
        man/SD_ID128_FORMAT_STR.3 man/SD_ID128_FORMAT_VAL.3 \
@@ -5186,11 +5773,13 @@ MANPAGES_ALIAS = man/SD_ALERT.3 man/SD_CRIT.3 man/SD_DEBUG.3 \
        man/sd_journal_send.3 man/sd_journal_sendv.3 \
        man/sd_journal_set_data_threshold.3 \
        man/sd_journal_test_cursor.3 man/sd_journal_wait.3 \
-       man/sd_notifyf.3 man/systemd-ask-password-console.path.8 \
+       man/sd_machine_get_ifindices.3 man/sd_notifyf.3 \
+       man/systemd-ask-password-console.path.8 \
        man/systemd-ask-password-wall.path.8 \
        man/systemd-ask-password-wall.service.8 \
+       man/systemd-firstboot.service.1 \
        man/systemd-fsck-root.service.8 man/systemd-fsck.8 \
-       man/systemd-hibernate.service.8 \
+       man/systemd-hibernate-resume.8 man/systemd-hibernate.service.8 \
        man/systemd-hybrid-sleep.service.8 man/systemd-initctl.8 \
        man/systemd-initctl.socket.8 \
        man/systemd-journald-dev-log.socket.8 man/systemd-journald.8 \
@@ -5206,18 +5795,16 @@ MANPAGES_ALIAS = man/SD_ALERT.3 man/SD_CRIT.3 man/SD_DEBUG.3 \
        man/systemd-tmpfiles-setup.service.8 \
        man/systemd-udevd-control.socket.8 \
        man/systemd-udevd-kernel.socket.8 man/systemd-udevd.8 \
-       man/systemd-update-done.8 \
-       man/systemd-update-utmp-runlevel.service.8 \
-       man/systemd-update-utmp.8 man/systemd-user.conf.5 \
-       $(am__append_4) $(am__append_6) $(am__append_8) \
-       $(am__append_10) $(am__append_12) $(am__append_14) \
-       $(am__append_16) $(am__append_18) $(am__append_20) \
-       $(am__append_22) $(am__append_24) $(am__append_26) \
-       $(am__append_28) $(am__append_30) $(am__append_32) \
-       $(am__append_34) $(am__append_36) $(am__append_38) \
-       $(am__append_40) $(am__append_42) $(am__append_44) \
-       $(am__append_46) $(am__append_48) $(am__append_50) \
-       $(am__append_52)
+       man/systemd-update-done.8 man/systemd-user.conf.5 \
+       $(am__append_8) $(am__append_10) $(am__append_12) \
+       $(am__append_14) $(am__append_16) $(am__append_18) \
+       $(am__append_20) $(am__append_22) $(am__append_24) \
+       $(am__append_26) $(am__append_28) $(am__append_30) \
+       $(am__append_32) $(am__append_34) $(am__append_36) \
+       $(am__append_38) $(am__append_40) $(am__append_42) \
+       $(am__append_44) $(am__append_46) $(am__append_48) \
+       $(am__append_50) $(am__append_52) $(am__append_54) \
+       $(am__append_56)
 XML_FILES = \
        ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
 
@@ -5234,147 +5821,77 @@ HTML_ALIAS = \
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
 @ENABLE_MANPAGES_TRUE@@HAVE_PYTHON_TRUE@SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
-libsystemd_shared_la_SOURCES = \
-       src/shared/linux/auto_dev-ioctl.h \
-       src/shared/linux/fanotify.h \
-       src/shared/ioprio.h \
-       src/shared/missing.h \
-       src/shared/initreq.h \
-       src/shared/securebits.h \
-       src/shared/special.h \
-       src/shared/list.h \
-       src/shared/macro.h \
-       src/shared/def.h \
-       src/shared/sparse-endian.h \
-       src/shared/refcnt.h \
-       src/shared/udev-util.h \
-       src/shared/bus-errors.h \
-       src/shared/device-nodes.c \
-       src/shared/device-nodes.h \
-       src/shared/util.c \
-       src/shared/util.h \
-       src/shared/virt.c \
-       src/shared/virt.h \
-       src/shared/architecture.c \
-       src/shared/architecture.h \
-       src/shared/efivars.c \
-       src/shared/efivars.h \
-       src/shared/path-util.c \
-       src/shared/path-util.h \
-       src/shared/time-util.c \
-       src/shared/time-util.h \
-       src/shared/hashmap.c \
-       src/shared/hashmap.h \
-       src/shared/siphash24.c \
-       src/shared/siphash24.h \
-       src/shared/set.c \
-       src/shared/set.h \
-       src/shared/fdset.c \
-       src/shared/fdset.h \
-       src/shared/prioq.c \
-       src/shared/prioq.h \
-       src/shared/sleep-config.c \
-       src/shared/sleep-config.h \
-       src/shared/strv.c \
-       src/shared/strv.h \
-       src/shared/env-util.c \
-       src/shared/env-util.h \
-       src/shared/strbuf.c \
-       src/shared/strbuf.h \
-       src/shared/strxcpyx.c \
-       src/shared/strxcpyx.h \
-       src/shared/conf-parser.c \
-       src/shared/conf-parser.h \
-       src/shared/log.c \
-       src/shared/log.h \
-       src/shared/ratelimit.h \
-       src/shared/ratelimit.c \
-       src/shared/exit-status.c \
-       src/shared/exit-status.h \
-       src/shared/utf8.c \
-       src/shared/utf8.h \
-       src/shared/gunicode.c \
-       src/shared/gunicode.h \
-       src/shared/pager.c \
-       src/shared/pager.h \
-       src/shared/socket-util.c \
-       src/shared/socket-util.h \
-       src/shared/conf-files.c \
-       src/shared/conf-files.h \
-       src/shared/cgroup-util.c \
-       src/shared/cgroup-util.h \
-       src/shared/cgroup-show.c \
-       src/shared/cgroup-show.h \
-       src/shared/unit-name.c \
-       src/shared/unit-name.h \
-       src/shared/utmp-wtmp.c \
-       src/shared/utmp-wtmp.h \
-       src/shared/watchdog.c \
-       src/shared/watchdog.h \
+libsystemd_shared_la_SOURCES = src/shared/linux/auto_dev-ioctl.h \
+       src/shared/ioprio.h src/shared/missing.h src/shared/initreq.h \
+       src/shared/securebits.h src/shared/special.h src/shared/list.h \
+       src/shared/macro.h src/shared/def.h src/shared/sparse-endian.h \
+       src/shared/refcnt.h src/shared/udev-util.h \
+       src/shared/bus-errors.h src/shared/device-nodes.c \
+       src/shared/device-nodes.h src/shared/util.c src/shared/util.h \
+       src/shared/virt.c src/shared/virt.h src/shared/architecture.c \
+       src/shared/architecture.h src/shared/efivars.c \
+       src/shared/efivars.h src/shared/path-util.c \
+       src/shared/path-util.h src/shared/time-util.c \
+       src/shared/time-util.h src/shared/locale-util.c \
+       src/shared/locale-util.h src/shared/mempool.c \
+       src/shared/mempool.h src/shared/hashmap.c src/shared/hashmap.h \
+       src/shared/siphash24.c src/shared/siphash24.h src/shared/set.c \
+       src/shared/set.h src/shared/fdset.c src/shared/fdset.h \
+       src/shared/prioq.c src/shared/prioq.h \
+       src/shared/sleep-config.c src/shared/sleep-config.h \
+       src/shared/strv.c src/shared/strv.h src/shared/env-util.c \
+       src/shared/env-util.h src/shared/strbuf.c src/shared/strbuf.h \
+       src/shared/strxcpyx.c src/shared/strxcpyx.h \
+       src/shared/conf-parser.c src/shared/conf-parser.h \
+       src/shared/log.c src/shared/log.h src/shared/ratelimit.h \
+       src/shared/ratelimit.c src/shared/exit-status.c \
+       src/shared/exit-status.h src/shared/utf8.c src/shared/utf8.h \
+       src/shared/gunicode.c src/shared/gunicode.h src/shared/pager.c \
+       src/shared/pager.h src/shared/socket-util.c \
+       src/shared/socket-util.h src/shared/in-addr-util.c \
+       src/shared/in-addr-util.h src/shared/conf-files.c \
+       src/shared/conf-files.h src/shared/cgroup-util.c \
+       src/shared/cgroup-util.h src/shared/cgroup-show.c \
+       src/shared/cgroup-show.h src/shared/unit-name.c \
+       src/shared/unit-name.h src/shared/utmp-wtmp.h \
+       src/shared/watchdog.c src/shared/watchdog.h \
        src/shared/spawn-ask-password-agent.c \
-       src/shared/spawn-ask-password-agent.h \
-       src/shared/replace-var.c \
-       src/shared/replace-var.h \
-       src/shared/spawn-polkit-agent.c \
-       src/shared/spawn-polkit-agent.h \
-       src/shared/clock-util.c \
-       src/shared/clock-util.h \
-       src/shared/time-dst.c \
-       src/shared/time-dst.h \
-       src/shared/calendarspec.c \
-       src/shared/calendarspec.h \
-       src/shared/fileio.c \
-       src/shared/fileio.h \
-       src/shared/output-mode.h \
-       src/shared/MurmurHash2.c \
-       src/shared/MurmurHash2.h \
-       src/shared/acpi-fpdt.h \
-       src/shared/acpi-fpdt.c \
-       src/shared/boot-timestamps.h \
-       src/shared/boot-timestamps.c \
-       src/shared/mkdir.c \
-       src/shared/mkdir.h \
-       src/shared/smack-util.c \
-       src/shared/smack-util.h \
-       src/shared/apparmor-util.c \
-       src/shared/apparmor-util.h \
-       src/shared/ima-util.c \
-       src/shared/ima-util.h \
-       src/shared/ptyfwd.c \
-       src/shared/ptyfwd.h \
-       src/shared/errno-list.c \
-       src/shared/errno-list.h \
-       src/shared/af-list.c \
-       src/shared/af-list.h \
-       src/shared/audit.c \
-       src/shared/audit.h \
-       src/shared/xml.c \
-       src/shared/xml.h \
-       src/shared/condition-util.c \
-       src/shared/condition-util.h \
-       src/shared/bus-label.c \
-       src/shared/bus-label.h \
-       src/shared/gpt.h \
-       src/shared/clean-ipc.h \
-       src/shared/clean-ipc.c \
-       src/shared/login-shared.c \
-       src/shared/login-shared.h \
-       src/shared/ring.c \
-       src/shared/ring.h \
-       src/shared/async.c \
-       src/shared/async.h \
-       src/shared/eventfd-util.c \
-       src/shared/eventfd-util.h \
-       src/shared/copy.c \
-       src/shared/copy.h \
-       src/shared/base-filesystem.c \
-       src/shared/base-filesystem.h
-
+       src/shared/spawn-ask-password-agent.h src/shared/replace-var.c \
+       src/shared/replace-var.h src/shared/spawn-polkit-agent.c \
+       src/shared/spawn-polkit-agent.h src/shared/clock-util.c \
+       src/shared/clock-util.h src/shared/time-dst.c \
+       src/shared/time-dst.h src/shared/calendarspec.c \
+       src/shared/calendarspec.h src/shared/fileio.c \
+       src/shared/fileio.h src/shared/output-mode.h \
+       src/shared/MurmurHash2.c src/shared/MurmurHash2.h \
+       src/shared/acpi-fpdt.h src/shared/acpi-fpdt.c \
+       src/shared/boot-timestamps.h src/shared/boot-timestamps.c \
+       src/shared/mkdir.c src/shared/mkdir.h src/shared/smack-util.c \
+       src/shared/smack-util.h src/shared/apparmor-util.c \
+       src/shared/apparmor-util.h src/shared/ima-util.c \
+       src/shared/ima-util.h src/shared/ptyfwd.c src/shared/ptyfwd.h \
+       src/shared/errno-list.c src/shared/errno-list.h \
+       src/shared/af-list.c src/shared/af-list.h \
+       src/shared/arphrd-list.c src/shared/arphrd-list.h \
+       src/shared/audit.c src/shared/audit.h src/shared/xml.c \
+       src/shared/xml.h src/shared/condition-util.c \
+       src/shared/condition-util.h src/shared/bus-label.c \
+       src/shared/bus-label.h src/shared/gpt.h src/shared/clean-ipc.h \
+       src/shared/clean-ipc.c src/shared/login-shared.c \
+       src/shared/login-shared.h src/shared/ring.c src/shared/ring.h \
+       src/shared/barrier.c src/shared/barrier.h src/shared/pty.c \
+       src/shared/pty.h src/shared/async.c src/shared/async.h \
+       src/shared/copy.c src/shared/copy.h \
+       src/shared/base-filesystem.c src/shared/base-filesystem.h \
+       src/shared/memfd.c src/shared/memfd.h src/shared/uid-range.c \
+       src/shared/uid-range.h src/shared/nss-util.h $(am__append_62)
 nodist_libsystemd_shared_la_SOURCES = \
        src/shared/errno-from-name.h \
        src/shared/errno-to-name.h \
        src/shared/af-from-name.h \
-       src/shared/af-to-name.h
+       src/shared/af-to-name.h \
+       src/shared/arphrd-from-name.h \
+       src/shared/arphrd-to-name.h
 
 libsystemd_shared_la_CFLAGS = \
        $(AM_CFLAGS) \
@@ -5400,6 +5917,8 @@ libsystemd_label_la_SOURCES = \
        src/shared/mkdir-label.c \
        src/shared/ask-password-api.c \
        src/shared/ask-password-api.h \
+       src/shared/switch-root.h \
+       src/shared/switch-root.c \
        src/shared/fileio-label.c \
        src/shared/fileio-label.h \
        src/shared/dev-setup.c \
@@ -5460,6 +5979,8 @@ libsystemd_core_la_SOURCES = src/core/unit.c src/core/unit.h \
        src/core/load-fragment.c src/core/load-fragment.h \
        src/core/service.c src/core/service.h src/core/socket.c \
        src/core/socket.h src/core/busname.c src/core/busname.h \
+       src/core/bus-common.c src/core/bus-common.h \
+       src/core/bus-endpoint.c src/core/bus-endpoint.h \
        src/core/target.c src/core/target.h src/core/snapshot.c \
        src/core/snapshot.h src/core/device.c src/core/device.h \
        src/core/mount.c src/core/mount.h src/core/automount.c \
@@ -5499,10 +6020,11 @@ libsystemd_core_la_SOURCES = src/core/unit.c src/core/unit.h \
        src/core/mount-setup.h src/core/loopback-setup.h \
        src/core/loopback-setup.c src/core/condition.c \
        src/core/condition.h src/core/namespace.c src/core/namespace.h \
-       src/core/build.h src/core/sysfs-show.h src/core/switch-root.h \
-       src/core/switch-root.c src/core/killall.h src/core/killall.c \
-       src/core/audit-fd.c src/core/audit-fd.h src/core/show-status.c \
-       src/core/show-status.h $(am__append_60)
+       src/core/build.h src/core/sysfs-show.h src/core/killall.h \
+       src/core/killall.c src/core/audit-fd.c src/core/audit-fd.h \
+       src/core/show-status.c src/core/show-status.h \
+       src/core/failure-action.c src/core/failure-action.h \
+       $(am__append_67)
 nodist_libsystemd_core_la_SOURCES = \
        src/core/load-fragment-gperf.c \
        src/core/load-fragment-gperf-nulstr.c
@@ -5521,7 +6043,7 @@ libsystemd_core_la_LIBADD = libsystemd-capability.la \
        libsystemd-units.la libsystemd-label.la libudev-internal.la \
        libsystemd-shared.la libsystemd-internal.la $(PAM_LIBS) \
        $(AUDIT_LIBS) $(CAP_LIBS) $(KMOD_LIBS) $(APPARMOR_LIBS) \
-       $(SECCOMP_LIBS) $(am__append_61)
+       $(SECCOMP_LIBS) $(am__append_68)
 
 # ------------------------------------------------------------------------------
 systemd_SOURCES = \
@@ -5638,6 +6160,13 @@ test_async_SOURCES = \
 test_async_LDADD = \
        libsystemd-shared.la
 
+test_condition_util_SOURCES = \
+       src/test/test-condition-util.c
+
+test_condition_util_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-internal.la
+
 test_fdset_SOURCES = \
        src/test/test-fdset.c
 
@@ -5656,6 +6185,12 @@ test_util_SOURCES = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_uid_range_SOURCES = \
+       src/test/test-uid-range.c
+
+test_uid_range_LDADD = \
+       libsystemd-core.la
+
 test_socket_util_SOURCES = \
        src/test/test-socket-util.c
 
@@ -5668,6 +6203,18 @@ test_ring_SOURCES = \
 test_ring_LDADD = \
        libsystemd-core.la
 
+test_barrier_SOURCES = \
+       src/test/test-barrier.c
+
+test_barrier_LDADD = \
+       libsystemd-core.la
+
+test_pty_SOURCES = \
+       src/test/test-pty.c
+
+test_pty_LDADD = \
+       libsystemd-core.la
+
 test_tmpfiles_SOURCES = \
        src/test/test-tmpfiles.c
 
@@ -5680,12 +6227,22 @@ test_namespace_SOURCES = \
 test_namespace_LDADD = \
        libsystemd-core.la
 
+nodist_test_hashmap_SOURCES = \
+       src/test/test-hashmap-ordered.c
+
 test_hashmap_SOURCES = \
-       src/test/test-hashmap.c
+       src/test/test-hashmap.c \
+       src/test/test-hashmap-plain.c
 
 test_hashmap_LDADD = \
        libsystemd-core.la
 
+test_set_SOURCES = \
+       src/test/test-set.c
+
+test_set_LDADD = \
+       libsystemd-core.la
+
 test_xml_SOURCES = \
        src/test/test-xml.c
 
@@ -5700,7 +6257,15 @@ test_list_LDADD = \
 
 test_tables_SOURCES = \
        src/test/test-tables.c \
-       src/shared/test-tables.h
+       src/shared/test-tables.h \
+       src/bus-proxyd/bus-policy.c \
+       src/bus-proxyd/bus-policy.h \
+       src/journal/journald-server.c \
+       src/journal/journald-server.h
+
+test_tables_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       -I$(top_srcdir)/src/bus-proxyd
 
 test_tables_CFLAGS = \
        $(AM_CFLAGS) \
@@ -5709,7 +6274,9 @@ test_tables_CFLAGS = \
 test_tables_LDADD = \
        libsystemd-logs.la \
        libsystemd-journal-internal.la \
+       libsystemd-journal-core.la \
        libsystemd-core.la \
+       libudev-core.la \
        $(RT_LIBS)
 
 test_prioq_SOURCES = \
@@ -5903,16 +6470,34 @@ test_conf_files_SOURCES = \
 test_conf_files_LDADD = \
        libsystemd-shared.la
 
-coverage_dir = coverage
+test_bus_policy_SOURCES = \
+       src/bus-proxyd/test-bus-policy.c \
+       src/bus-proxyd/bus-policy.c \
+       src/bus-proxyd/bus-policy.h
+
+test_bus_policy_LDADD = \
+       libsystemd-capability.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+coverage_dir = coverage
 coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
 
 # ------------------------------------------------------------------------------
 systemd_analyze_SOURCES = \
-       src/analyze/analyze.c
+       src/analyze/analyze.c \
+       src/analyze/analyze-verify.c \
+       src/analyze/analyze-verify.h
+
+systemd_verify_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(SECCOMP_CFLAGS)
 
 systemd_analyze_LDADD = \
+       libsystemd-core.la \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       $(RT_LIBS)
 
 
 # ------------------------------------------------------------------------------
@@ -5944,6 +6529,7 @@ systemd_update_done_SOURCES = \
 
 systemd_update_done_LDADD = \
        libsystemd-internal.la \
+       libsystemd-label.la \
        libsystemd-shared.la
 
 
@@ -5997,11 +6583,14 @@ systemd_shutdown_LDADD = \
 @ENABLE_TMPFILES_TRUE@ libsystemd-internal.la \
 @ENABLE_TMPFILES_TRUE@ libsystemd-shared.la
 
+@ENABLE_TMPFILES_TRUE@nodist_tmpfiles_DATA = \
+@ENABLE_TMPFILES_TRUE@ tmpfiles.d/etc.conf
+
 @ENABLE_TMPFILES_TRUE@dist_tmpfiles_DATA = tmpfiles.d/systemd.conf \
 @ENABLE_TMPFILES_TRUE@ tmpfiles.d/systemd-nologin.conf \
+@ENABLE_TMPFILES_TRUE@ tmpfiles.d/systemd-remote.conf \
 @ENABLE_TMPFILES_TRUE@ tmpfiles.d/tmp.conf tmpfiles.d/x11.conf \
-@ENABLE_TMPFILES_TRUE@ tmpfiles.d/var.conf tmpfiles.d/etc.conf \
-@ENABLE_TMPFILES_TRUE@ $(am__append_72)
+@ENABLE_TMPFILES_TRUE@ tmpfiles.d/var.conf $(am__append_79)
 
 # ------------------------------------------------------------------------------
 @ENABLE_SYSUSERS_TRUE@systemd_sysusers_SOURCES = \
@@ -6015,12 +6604,35 @@ systemd_shutdown_LDADD = \
 @ENABLE_SYSUSERS_TRUE@ libsystemd-shared.la
 
 @ENABLE_SYSUSERS_TRUE@dist_sysusers_DATA = \
-@ENABLE_SYSUSERS_TRUE@ sysusers.d/systemd.conf
+@ENABLE_SYSUSERS_TRUE@ sysusers.d/systemd.conf \
+@ENABLE_SYSUSERS_TRUE@ sysusers.d/systemd-remote.conf
 
 @ENABLE_SYSUSERS_TRUE@nodist_sysusers_DATA = \
 @ENABLE_SYSUSERS_TRUE@ sysusers.d/basic.conf
 
 
+# ------------------------------------------------------------------------------
+dist_factory_etc_DATA = \
+       factory/etc/nsswitch.conf
+
+@HAVE_PAM_TRUE@dist_factory_pam_DATA = \
+@HAVE_PAM_TRUE@        factory/etc/pam.d/system-auth \
+@HAVE_PAM_TRUE@        factory/etc/pam.d/other
+
+
+# ------------------------------------------------------------------------------
+@ENABLE_FIRSTBOOT_TRUE@systemd_firstboot_SOURCES = \
+@ENABLE_FIRSTBOOT_TRUE@        src/firstboot/firstboot.c
+
+@ENABLE_FIRSTBOOT_TRUE@systemd_firstboot_LDADD = \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-units.la \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-label.la \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-capability.la \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-internal.la \
+@ENABLE_FIRSTBOOT_TRUE@        libsystemd-shared.la \
+@ENABLE_FIRSTBOOT_TRUE@        -lcrypt
+
+
 # ------------------------------------------------------------------------------
 systemd_machine_id_setup_SOURCES = \
        src/machine-id-setup/machine-id-setup-main.c \
@@ -6120,6 +6732,20 @@ systemd_system_update_generator_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
 
+@ENABLE_HIBERNATE_TRUE@systemd_hibernate_resume_SOURCES = \
+@ENABLE_HIBERNATE_TRUE@        src/hibernate-resume/hibernate-resume.c
+
+@ENABLE_HIBERNATE_TRUE@systemd_hibernate_resume_LDADD = \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-internal.la \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-shared.la
+
+@ENABLE_HIBERNATE_TRUE@systemd_hibernate_resume_generator_SOURCES = \
+@ENABLE_HIBERNATE_TRUE@        src/hibernate-resume/hibernate-resume-generator.c
+
+@ENABLE_HIBERNATE_TRUE@systemd_hibernate_resume_generator_LDADD = \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-label.la \
+@ENABLE_HIBERNATE_TRUE@        libsystemd-shared.la
+
 @ENABLE_EFI_TRUE@systemd_efi_boot_generator_SOURCES = \
 @ENABLE_EFI_TRUE@      src/efi-boot-generator/efi-boot-generator.c
 
@@ -6204,6 +6830,14 @@ systemd_cgroups_agent_LDADD = \
 
 
 # ------------------------------------------------------------------------------
+systemd_escape_SOURCES = \
+       src/escape/escape.c
+
+systemd_escape_LDADD = \
+       libsystemd-shared.la
+
+
+# -----------------------------------------------------------------------------
 systemctl_SOURCES = \
        src/systemctl/systemctl.c
 
@@ -6218,8 +6852,7 @@ systemctl_LDADD = \
 
 # ------------------------------------------------------------------------------
 systemd_notify_SOURCES = \
-       src/notify/notify.c \
-       src/readahead/sd-readahead.c
+       src/notify/notify.c
 
 systemd_notify_LDADD = \
        libsystemd-internal.la \
@@ -6284,7 +6917,7 @@ systemd_nspawn_CFLAGS = \
 
 systemd_nspawn_LDADD = libsystemd-label.la libsystemd-capability.la \
        libsystemd-internal.la libudev-internal.la \
-       libsystemd-shared.la $(BLKID_LIBS) $(am__append_91)
+       libsystemd-shared.la $(BLKID_LIBS) $(am__append_107)
 
 # ------------------------------------------------------------------------------
 systemd_run_SOURCES = \
@@ -6323,7 +6956,6 @@ libsystemd_internal_la_SOURCES = \
        src/systemd/sd-bus.h \
        src/systemd/sd-bus-protocol.h \
        src/systemd/sd-bus-vtable.h \
-       src/systemd/sd-memfd.h \
        src/systemd/sd-utf8.h \
        src/systemd/sd-event.h \
        src/systemd/sd-rtnl.h \
@@ -6332,6 +6964,7 @@ libsystemd_internal_la_SOURCES = \
        src/systemd/sd-id128.h \
        src/systemd/sd-daemon.h \
        src/systemd/sd-path.h \
+       src/systemd/sd-network.h \
        src/libsystemd/sd-bus/sd-bus.c \
        src/libsystemd/sd-bus/bus-control.c \
        src/libsystemd/sd-bus/bus-control.h \
@@ -6372,7 +7005,6 @@ libsystemd_internal_la_SOURCES = \
        src/libsystemd/sd-bus/bus-slot.h \
        src/libsystemd/sd-bus/bus-protocol.h \
        src/libsystemd/sd-bus/kdbus.h \
-       src/libsystemd/sd-bus/sd-memfd.c \
        src/libsystemd/sd-utf8/sd-utf8.c \
        src/libsystemd/sd-event/sd-event.c \
        src/libsystemd/sd-event/event-util.h \
@@ -6383,10 +7015,15 @@ libsystemd_internal_la_SOURCES = \
        src/libsystemd/sd-rtnl/rtnl-types.c \
        src/libsystemd/sd-rtnl/rtnl-util.h \
        src/libsystemd/sd-rtnl/rtnl-util.c \
+       src/libsystemd/sd-rtnl/local-addresses.h \
+       src/libsystemd/sd-rtnl/local-addresses.c \
        src/libsystemd/sd-id128/sd-id128.c \
        src/libsystemd/sd-daemon/sd-daemon.c \
        src/libsystemd/sd-login/sd-login.c \
-       src/libsystemd/sd-path/sd-path.c
+       src/libsystemd/sd-path/sd-path.c \
+       src/libsystemd/sd-network/sd-network.c \
+       src/libsystemd/sd-network/network-util.h \
+       src/libsystemd/sd-network/network-util.c
 
 nodist_libsystemd_internal_la_SOURCES = \
        src/libsystemd/libsystemd.sym \
@@ -6581,13 +7218,6 @@ test_bus_kernel_benchmark_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
-test_bus_memfd_SOURCES = \
-       src/libsystemd/sd-bus/test-bus-memfd.c
-
-test_bus_memfd_LDADD = \
-       libsystemd-internal.la \
-       libsystemd-shared.la
-
 test_bus_zero_copy_SOURCES = \
        src/libsystemd/sd-bus/test-bus-zero-copy.c
 
@@ -6654,13 +7284,13 @@ libsystemd_network_la_CFLAGS = \
        $(KMOD_CFLAGS)
 
 libsystemd_network_la_SOURCES = \
-       src/systemd/sd-network.h \
        src/systemd/sd-dhcp-client.h \
        src/systemd/sd-dhcp-server.h \
        src/systemd/sd-dhcp-lease.h \
        src/systemd/sd-ipv4ll.h \
-       src/network/sd-network.c \
-       src/network/network-util.h \
+       src/systemd/sd-icmp6-nd.h \
+       src/systemd/sd-dhcp6-client.h \
+       src/systemd/sd-dhcp6-lease.h \
        src/libsystemd-network/sd-dhcp-client.c \
        src/libsystemd-network/sd-dhcp-server.c \
        src/libsystemd-network/dhcp-network.c \
@@ -6677,9 +7307,6 @@ libsystemd_network_la_SOURCES = \
        src/libsystemd-network/ipv4ll-internal.h \
        src/libsystemd-network/network-internal.c \
        src/libsystemd-network/network-internal.h \
-       src/systemd/sd-icmp6-nd.h \
-       src/systemd/sd-dhcp6-client.h \
-       src/systemd/sd-dhcp6-lease.h \
        src/libsystemd-network/sd-icmp6-nd.c \
        src/libsystemd-network/sd-dhcp6-client.c \
        src/libsystemd-network/dhcp6-internal.h \
@@ -6758,6 +7385,117 @@ test_dhcp6_client_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
+libsystemd_terminal_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+libsystemd_terminal_la_SOURCES = \
+       src/libsystemd-terminal/grdev.h \
+       src/libsystemd-terminal/grdev-internal.h \
+       src/libsystemd-terminal/grdev.c \
+       src/libsystemd-terminal/grdev-drm.c \
+       src/libsystemd-terminal/idev.h \
+       src/libsystemd-terminal/idev-internal.h \
+       src/libsystemd-terminal/idev.c \
+       src/libsystemd-terminal/idev-evdev.c \
+       src/libsystemd-terminal/idev-keyboard.c \
+       src/libsystemd-terminal/sysview.h \
+       src/libsystemd-terminal/sysview-internal.h \
+       src/libsystemd-terminal/sysview.c \
+       src/libsystemd-terminal/term.h \
+       src/libsystemd-terminal/term-internal.h \
+       src/libsystemd-terminal/term-charset.c \
+       src/libsystemd-terminal/term-page.c \
+       src/libsystemd-terminal/term-parser.c \
+       src/libsystemd-terminal/term-screen.c \
+       src/libsystemd-terminal/term-wcwidth.c \
+       src/libsystemd-terminal/unifont.h \
+       src/libsystemd-terminal/unifont-def.h \
+       src/libsystemd-terminal/unifont.c
+
+libsystemd_terminal_la_LIBADD = \
+       libudev-internal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_consoled_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+systemd_consoled_SOURCES = \
+       src/console/consoled.h \
+       src/console/consoled.c \
+       src/console/consoled-display.c \
+       src/console/consoled-manager.c \
+       src/console/consoled-session.c \
+       src/console/consoled-terminal.c \
+       src/console/consoled-workspace.c
+
+systemd_consoled_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_evcat_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+systemd_evcat_SOURCES = \
+       src/libsystemd-terminal/evcat.c
+
+systemd_evcat_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_modeset_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(TERMINAL_CFLAGS)
+
+systemd_modeset_SOURCES = \
+       src/libsystemd-terminal/modeset.c
+
+systemd_modeset_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(TERMINAL_LIBS)
+
+systemd_subterm_SOURCES = \
+       src/libsystemd-terminal/subterm.c
+
+systemd_subterm_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_term_page_SOURCES = \
+       src/libsystemd-terminal/test-term-page.c
+
+test_term_page_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_term_parser_SOURCES = \
+       src/libsystemd-terminal/test-term-parser.c
+
+test_term_parser_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
+test_unifont_SOURCES = \
+       src/libsystemd-terminal/test-unifont.c
+
+test_unifont_LDADD = \
+       libsystemd-terminal.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la
+
 libudev_la_SOURCES = \
        src/libudev/libudev.sym \
        src/libudev/libudev-private.h \
@@ -6829,8 +7567,7 @@ libudev_core_la_SOURCES = src/udev/udev.h src/udev/udev-event.c \
        src/udev/udev-builtin-path_id.c src/udev/udev-builtin-usb_id.c \
        src/udev/net/link-config.h src/udev/net/link-config.c \
        src/udev/net/ethtool-util.h src/udev/net/ethtool-util.c \
-       $(am__append_98) $(am__append_100) $(am__append_102) \
-       $(am__append_103)
+       $(am__append_123) $(am__append_125) $(am__append_126)
 nodist_libudev_core_la_SOURCES = \
        src/udev/keyboard-keys-from-name.h \
        src/udev/keyboard-keys-to-name.h \
@@ -6844,11 +7581,7 @@ libudev_core_la_CFLAGS = \
 libudev_core_la_LIBADD = libudev-internal.la libsystemd-label.la \
        libsystemd-internal.la libsystemd-network.la \
        libsystemd-shared.la $(BLKID_LIBS) $(KMOD_LIBS) \
-       $(am__append_104)
-libudev_core_la_CPPFLAGS = \
-       $(AM_CPPFLAGS) \
-       -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-
+       $(am__append_127)
 systemd_udevd_SOURCES = \
        src/udev/udevd.c
 
@@ -6881,7 +7614,7 @@ test_udev_SOURCES = \
        src/test/test-udev.c
 
 test_udev_LDADD = libudev-core.la $(BLKID_LIBS) $(KMOD_LIBS) \
-       $(SELINUX_LIBS) $(am__append_105)
+       $(SELINUX_LIBS) $(am__append_128)
 
 # ------------------------------------------------------------------------------
 ata_id_SOURCES = \
@@ -7075,29 +7808,45 @@ systemd_cat_SOURCES = \
 systemd_cat_LDADD = \
        libsystemd-journal-core.la
 
-@HAVE_MICROHTTPD_TRUE@systemd_journal_remote_SOURCES =  \
-@HAVE_MICROHTTPD_TRUE@ src/journal/journal-remote-parse.h \
-@HAVE_MICROHTTPD_TRUE@ src/journal/journal-remote-parse.c \
-@HAVE_MICROHTTPD_TRUE@ src/journal/journal-remote-write.h \
-@HAVE_MICROHTTPD_TRUE@ src/journal/journal-remote-write.c \
-@HAVE_MICROHTTPD_TRUE@ src/journal/journal-remote.c \
-@HAVE_MICROHTTPD_TRUE@ src/journal/microhttpd-util.h \
-@HAVE_MICROHTTPD_TRUE@ src/journal/microhttpd-util.c
+@HAVE_MICROHTTPD_TRUE@systemd_journal_remote_SOURCES = src/journal-remote/journal-remote-parse.h \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote-parse.c \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote-write.h \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote-write.c \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote.h \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-remote.c \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/microhttpd-util.h \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/microhttpd-util.c
 @HAVE_MICROHTTPD_TRUE@systemd_journal_remote_LDADD =  \
 @HAVE_MICROHTTPD_TRUE@ libsystemd-internal.la \
 @HAVE_MICROHTTPD_TRUE@ libsystemd-journal-core.la \
-@HAVE_MICROHTTPD_TRUE@ $(MICROHTTPD_LIBS) $(am__append_115)
+@HAVE_MICROHTTPD_TRUE@ $(MICROHTTPD_LIBS) $(am__append_136)
 @HAVE_MICROHTTPD_TRUE@systemd_journal_remote_CFLAGS = \
 @HAVE_MICROHTTPD_TRUE@ $(AM_CFLAGS) \
 @HAVE_MICROHTTPD_TRUE@ $(MICROHTTPD_CFLAGS)
 
+@HAVE_LIBCURL_TRUE@systemd_journal_upload_SOURCES = \
+@HAVE_LIBCURL_TRUE@    src/journal-remote/journal-upload.h \
+@HAVE_LIBCURL_TRUE@    src/journal-remote/journal-upload.c \
+@HAVE_LIBCURL_TRUE@    src/journal-remote/journal-upload-journal.c
+
+@HAVE_LIBCURL_TRUE@systemd_journal_upload_CFLAGS = \
+@HAVE_LIBCURL_TRUE@    $(AM_CFLAGS) \
+@HAVE_LIBCURL_TRUE@    $(LIBCURL_CFLAGS)
+
+@HAVE_LIBCURL_TRUE@systemd_journal_upload_LDADD = \
+@HAVE_LIBCURL_TRUE@    libsystemd-core.la \
+@HAVE_LIBCURL_TRUE@    libsystemd-internal.la \
+@HAVE_LIBCURL_TRUE@    libsystemd-journal-internal.la \
+@HAVE_LIBCURL_TRUE@    libsystemd-shared.la \
+@HAVE_LIBCURL_TRUE@    $(LIBCURL_LIBS)
+
 
 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
-journalctl_CFLAGS = $(AM_CFLAGS) $(am__append_118)
-journalctl_SOURCES = src/journal/journalctl.c $(am__append_117)
+journalctl_CFLAGS = $(AM_CFLAGS) $(am__append_151)
+journalctl_SOURCES = src/journal/journalctl.c $(am__append_150)
 journalctl_LDADD = libsystemd-journal-internal.la \
        libsystemd-internal.la libsystemd-logs.la libsystemd-shared.la \
-       $(am__append_116) $(am__append_119)
+       $(am__append_149) $(am__append_152)
 test_journal_SOURCES = \
        src/journal/test-journal.c
 
@@ -7174,12 +7923,19 @@ test_catalog_CPPFLAGS = \
 test_catalog_LDADD = \
        libsystemd-journal-core.la
 
-@HAVE_XZ_TRUE@test_compress_SOURCES = \
-@HAVE_XZ_TRUE@ src/journal/test-compress.c
+test_compress_SOURCES = \
+       src/journal/test-compress.c
+
+test_compress_LDADD = \
+       libsystemd-journal-internal.la \
+       libsystemd-shared.la
+
+test_compress_benchmark_SOURCES = \
+       src/journal/test-compress-benchmark.c
 
-@HAVE_XZ_TRUE@test_compress_LDADD = \
-@HAVE_XZ_TRUE@ libsystemd-journal-internal.la \
-@HAVE_XZ_TRUE@ libsystemd-shared.la
+test_compress_benchmark_LDADD = \
+       libsystemd-journal-internal.la \
+       libsystemd-shared.la
 
 libsystemd_journal_core_la_SOURCES = \
        src/journal/journald-kmsg.c \
@@ -7206,7 +7962,7 @@ nodist_libsystemd_journal_core_la_SOURCES = \
 libsystemd_journal_core_la_LIBADD = libsystemd-journal-internal.la \
        libudev-internal.la libsystemd-capability.la \
        libsystemd-label.la libsystemd-internal.la \
-       libsystemd-shared.la $(am__append_120)
+       libsystemd-shared.la $(am__append_153)
 libsystemd_journal_internal_la_SOURCES = src/journal/sd-journal.c \
        src/systemd/sd-journal.h src/systemd/_sd-common.h \
        src/journal/journal-file.c src/journal/journal-file.h \
@@ -7216,33 +7972,35 @@ libsystemd_journal_internal_la_SOURCES = src/journal/sd-journal.c \
        src/journal/journal-send.c src/journal/journal-def.h \
        src/journal/compress.h src/journal/catalog.c \
        src/journal/catalog.h src/journal/mmap-cache.c \
-       src/journal/mmap-cache.h $(am__append_122) $(am__append_125)
+       src/journal/mmap-cache.h src/journal/compress.c \
+       $(am__append_158)
 
 # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
-libsystemd_journal_internal_la_CFLAGS = $(AM_CFLAGS) $(am__append_123) \
-       $(am__append_127)
-libsystemd_journal_internal_la_LIBADD = $(am__append_124) \
-       $(am__append_126)
+libsystemd_journal_internal_la_CFLAGS = $(AM_CFLAGS) $(am__append_155) \
+       $(am__append_160)
+libsystemd_journal_internal_la_LIBADD = $(am__append_156) \
+       $(am__append_157) $(am__append_159)
 dist_catalog_DATA = \
        catalog/systemd.fr.catalog \
-       catalog/systemd.ru.catalog \
        catalog/systemd.it.catalog \
+       catalog/systemd.pl.catalog \
+       catalog/systemd.ru.catalog \
        catalog/systemd.catalog
 
 
 # ------------------------------------------------------------------------------
 @HAVE_MICROHTTPD_TRUE@gatewayddocumentrootdir = $(pkgdatadir)/gatewayd
 @HAVE_MICROHTTPD_TRUE@systemd_journal_gatewayd_SOURCES = \
-@HAVE_MICROHTTPD_TRUE@ src/journal/journal-gatewayd.c \
-@HAVE_MICROHTTPD_TRUE@ src/journal/microhttpd-util.h \
-@HAVE_MICROHTTPD_TRUE@ src/journal/microhttpd-util.c
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/journal-gatewayd.c \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/microhttpd-util.h \
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/microhttpd-util.c
 
 @HAVE_MICROHTTPD_TRUE@systemd_journal_gatewayd_LDADD =  \
 @HAVE_MICROHTTPD_TRUE@ libsystemd-logs.la \
 @HAVE_MICROHTTPD_TRUE@ libsystemd-journal-internal.la \
 @HAVE_MICROHTTPD_TRUE@ libsystemd-internal.la \
 @HAVE_MICROHTTPD_TRUE@ libsystemd-shared.la $(MICROHTTPD_LIBS) \
-@HAVE_MICROHTTPD_TRUE@ $(am__append_129)
+@HAVE_MICROHTTPD_TRUE@ $(am__append_162)
 @HAVE_MICROHTTPD_TRUE@systemd_journal_gatewayd_CFLAGS = \
 @HAVE_MICROHTTPD_TRUE@ $(AM_CFLAGS) \
 @HAVE_MICROHTTPD_TRUE@ $(MICROHTTPD_CFLAGS)
@@ -7252,7 +8010,7 @@ dist_catalog_DATA = \
 @HAVE_MICROHTTPD_TRUE@ -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
 
 @HAVE_MICROHTTPD_TRUE@dist_gatewayddocumentroot_DATA = \
-@HAVE_MICROHTTPD_TRUE@ src/journal/browse.html
+@HAVE_MICROHTTPD_TRUE@ src/journal-remote/browse.html
 
 
 # ------------------------------------------------------------------------------
@@ -7272,13 +8030,13 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_COREDUMP_TRUE@ src/journal/coredump.c \
 @ENABLE_COREDUMP_TRUE@ src/journal/coredump-vacuum.c \
 @ENABLE_COREDUMP_TRUE@ src/journal/coredump-vacuum.h \
-@ENABLE_COREDUMP_TRUE@ $(am__append_132)
+@ENABLE_COREDUMP_TRUE@ $(am__append_165)
 @ENABLE_COREDUMP_TRUE@systemd_coredump_LDADD =  \
 @ENABLE_COREDUMP_TRUE@ libsystemd-journal-internal.la \
 @ENABLE_COREDUMP_TRUE@ libsystemd-label.la \
 @ENABLE_COREDUMP_TRUE@ libsystemd-internal.la \
-@ENABLE_COREDUMP_TRUE@ libsystemd-shared.la $(am__append_133) \
-@ENABLE_COREDUMP_TRUE@ $(am__append_136)
+@ENABLE_COREDUMP_TRUE@ libsystemd-shared.la $(am__append_166) \
+@ENABLE_COREDUMP_TRUE@ $(am__append_169)
 @ENABLE_COREDUMP_TRUE@coredumpctl_SOURCES = \
 @ENABLE_COREDUMP_TRUE@ src/journal/coredumpctl.c
 
@@ -7316,31 +8074,6 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_VCONSOLE_TRUE@ libsystemd-shared.la
 
 
-# ------------------------------------------------------------------------------
-@ENABLE_READAHEAD_TRUE@systemd_readahead_SOURCES = \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead.c \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-collect.c \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-replay.c \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-analyze.c \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-common.c \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-common.h
-
-@ENABLE_READAHEAD_TRUE@systemd_readahead_LDADD = \
-@ENABLE_READAHEAD_TRUE@        libsystemd-internal.la \
-@ENABLE_READAHEAD_TRUE@        libudev-internal.la \
-@ENABLE_READAHEAD_TRUE@        libsystemd-shared.la
-
-@ENABLE_READAHEAD_TRUE@test_ssd_SOURCES = \
-@ENABLE_READAHEAD_TRUE@        src/readahead/test-ssd.c \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-common.c \
-@ENABLE_READAHEAD_TRUE@        src/readahead/readahead-common.h
-
-@ENABLE_READAHEAD_TRUE@test_ssd_LDADD = \
-@ENABLE_READAHEAD_TRUE@        libsystemd-internal.la \
-@ENABLE_READAHEAD_TRUE@        libudev-internal.la \
-@ENABLE_READAHEAD_TRUE@        libsystemd-shared.la
-
-
 # ------------------------------------------------------------------------------
 @ENABLE_BOOTCHART_TRUE@systemd_bootchart_SOURCES = \
 @ENABLE_BOOTCHART_TRUE@        src/bootchart/bootchart.c \
@@ -7461,7 +8194,12 @@ systemd_socket_proxyd_LDADD = \
 # ------------------------------------------------------------------------------
 @ENABLE_TIMESYNCD_TRUE@systemd_timesyncd_SOURCES = \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd.c \
-@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd.h
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-manager.c \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-manager.h \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-conf.c \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-conf.h \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-server.c \
+@ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-server.h
 
 @ENABLE_TIMESYNCD_TRUE@nodist_systemd_timesyncd_SOURCES = \
 @ENABLE_TIMESYNCD_TRUE@        src/timesync/timesyncd-gperf.c
@@ -7475,15 +8213,11 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_TIMESYNCD_TRUE@        libsystemd-shared.la \
 @ENABLE_TIMESYNCD_TRUE@        -lm
 
-@ENABLE_TIMESYNCD_TRUE@dist_ntpunits_DATA = \
-@ENABLE_TIMESYNCD_TRUE@        src/timesync/90-systemd.list
-
 
 # ------------------------------------------------------------------------------
 @HAVE_MYHOSTNAME_TRUE@libnss_myhostname_la_SOURCES = \
-@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/nss-myhostname.c \
-@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/ifconf.h \
-@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/netlink.c
+@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/nss-myhostname.sym \
+@HAVE_MYHOSTNAME_TRUE@ src/nss-myhostname/nss-myhostname.c
 
 @HAVE_MYHOSTNAME_TRUE@libnss_myhostname_la_LDFLAGS = \
 @HAVE_MYHOSTNAME_TRUE@ $(AM_LDFLAGS) \
@@ -7491,7 +8225,8 @@ systemd_socket_proxyd_LDADD = \
 @HAVE_MYHOSTNAME_TRUE@ -export-dynamic \
 @HAVE_MYHOSTNAME_TRUE@ -avoid-version \
 @HAVE_MYHOSTNAME_TRUE@ -shared \
-@HAVE_MYHOSTNAME_TRUE@ -shrext .so.2
+@HAVE_MYHOSTNAME_TRUE@ -shrext .so.2 \
+@HAVE_MYHOSTNAME_TRUE@ -Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
 
 @HAVE_MYHOSTNAME_TRUE@libnss_myhostname_la_LIBADD = \
 @HAVE_MYHOSTNAME_TRUE@ libsystemd-shared.la \
@@ -7531,16 +8266,64 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_MACHINED_TRUE@test_machine_tables_LDADD = \
 @ENABLE_MACHINED_TRUE@ libsystemd-machine-core.la
 
+@ENABLE_MACHINED_TRUE@libnss_mymachines_la_SOURCES = \
+@ENABLE_MACHINED_TRUE@ src/nss-mymachines/nss-mymachines.sym \
+@ENABLE_MACHINED_TRUE@ src/nss-mymachines/nss-mymachines.c
+
+@ENABLE_MACHINED_TRUE@libnss_mymachines_la_LDFLAGS = \
+@ENABLE_MACHINED_TRUE@ $(AM_LDFLAGS) \
+@ENABLE_MACHINED_TRUE@ -module \
+@ENABLE_MACHINED_TRUE@ -export-dynamic \
+@ENABLE_MACHINED_TRUE@ -avoid-version \
+@ENABLE_MACHINED_TRUE@ -shared \
+@ENABLE_MACHINED_TRUE@ -shrext .so.2 \
+@ENABLE_MACHINED_TRUE@ -Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
+
+@ENABLE_MACHINED_TRUE@libnss_mymachines_la_LIBADD = \
+@ENABLE_MACHINED_TRUE@ libsystemd-shared.la \
+@ENABLE_MACHINED_TRUE@ libsystemd-internal.la
+
 
 # ------------------------------------------------------------------------------
 @ENABLE_RESOLVED_TRUE@systemd_resolved_SOURCES = \
-@ENABLE_RESOLVED_TRUE@ src/resolve/resolved.h \
 @ENABLE_RESOLVED_TRUE@ src/resolve/resolved.c \
-@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-manager.c
-
-@ENABLE_RESOLVED_TRUE@systemd_resolved_CFLAGS = \
-@ENABLE_RESOLVED_TRUE@ $(AM_CFLAGS) \
-@ENABLE_RESOLVED_TRUE@ $(KMOD_CFLAGS)
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-manager.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-manager.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-conf.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-conf.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-bus.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-bus.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-link.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-link.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-def.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-rr.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-rr.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-question.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-question.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-answer.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-answer.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-packet.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-packet.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-query.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-query.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-transaction.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-transaction.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-scope.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-scope.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-server.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-server.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-cache.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-cache.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-zone.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-zone.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-stream.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-stream.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns-type.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns-type.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns_type-from-name.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns_type-to-name.h
 
 @ENABLE_RESOLVED_TRUE@nodist_systemd_resolved_SOURCES = \
 @ENABLE_RESOLVED_TRUE@ src/resolve/resolved-gperf.c
@@ -7550,7 +8333,62 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_RESOLVED_TRUE@ libsystemd-network.la \
 @ENABLE_RESOLVED_TRUE@ libsystemd-label.la \
 @ENABLE_RESOLVED_TRUE@ libsystemd-internal.la \
-@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ -lm \
+@ENABLE_RESOLVED_TRUE@ $(LIBIDN_LIBS)
+
+@ENABLE_RESOLVED_TRUE@test_dns_domain_SOURCES = \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/test-dns-domain.c
+
+@ENABLE_RESOLVED_TRUE@test_dns_domain_LDADD = \
+@ENABLE_RESOLVED_TRUE@ libsystemd-capability.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-network.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-label.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-internal.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ $(LIBIDN_LIBS)
+
+@ENABLE_RESOLVED_TRUE@libnss_resolve_la_SOURCES = \
+@ENABLE_RESOLVED_TRUE@ src/nss-resolve/nss-resolve.sym \
+@ENABLE_RESOLVED_TRUE@ src/nss-resolve/nss-resolve.c
+
+@ENABLE_RESOLVED_TRUE@libnss_resolve_la_LDFLAGS = \
+@ENABLE_RESOLVED_TRUE@ $(AM_LDFLAGS) \
+@ENABLE_RESOLVED_TRUE@ -module \
+@ENABLE_RESOLVED_TRUE@ -export-dynamic \
+@ENABLE_RESOLVED_TRUE@ -avoid-version \
+@ENABLE_RESOLVED_TRUE@ -shared \
+@ENABLE_RESOLVED_TRUE@ -shrext .so.2 \
+@ENABLE_RESOLVED_TRUE@ -Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
+
+@ENABLE_RESOLVED_TRUE@libnss_resolve_la_LIBADD = \
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-internal.la
+
+@ENABLE_RESOLVED_TRUE@systemd_resolve_host_SOURCES = \
+@ENABLE_RESOLVED_TRUE@ src/resolve-host/resolve-host.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-packet.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-packet.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-rr.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-rr.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-answer.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-answer.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-question.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-question.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/resolved-dns-domain.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns-type.c \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns-type.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns_type-from-name.h \
+@ENABLE_RESOLVED_TRUE@ src/resolve/dns_type-to-name.h
+
+@ENABLE_RESOLVED_TRUE@systemd_resolve_host_LDADD = \
+@ENABLE_RESOLVED_TRUE@ libsystemd-internal.la \
+@ENABLE_RESOLVED_TRUE@ libsystemd-shared.la \
+@ENABLE_RESOLVED_TRUE@ -lm \
+@ENABLE_RESOLVED_TRUE@ $(LIBIDN_LIBS)
 
 @ENABLE_NETWORKD_TRUE@systemd_networkd_SOURCES = \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd.c
@@ -7565,15 +8403,30 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_NETWORKD_TRUE@libsystemd_networkd_core_la_SOURCES = \
 @ENABLE_NETWORKD_TRUE@ src/libsystemd-network/network-internal.h \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd.h \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-link.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-link.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-tunnel.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-veth.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-vxlan.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-vlan.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-macvlan.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-dummy.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-tuntap.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-bond.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-bridge.h \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-tunnel.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-veth.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-vxlan.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-vlan.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-macvlan.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-dummy.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-tuntap.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-tunnel.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-veth.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-vxlan.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-vlan.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-macvlan.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-dummy.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-tuntap.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-bond.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-netdev-bridge.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-link.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-ipv4ll.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-dhcp4.c \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-network.c \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-address.c \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-route.c \
@@ -7596,8 +8449,11 @@ systemd_socket_proxyd_LDADD = \
 
 @ENABLE_NETWORKD_TRUE@systemd_networkd_wait_online_SOURCES = \
 @ENABLE_NETWORKD_TRUE@ src/libsystemd-network/network-internal.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-wait-online.h \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-wait-online-link.h \
 @ENABLE_NETWORKD_TRUE@ src/network/networkd-wait-online.c \
-@ENABLE_NETWORKD_TRUE@ src/network/networkd-wait-online.h
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-wait-online-manager.c \
+@ENABLE_NETWORKD_TRUE@ src/network/networkd-wait-online-link.c
 
 @ENABLE_NETWORKD_TRUE@systemd_networkd_wait_online_LDADD = \
 @ENABLE_NETWORKD_TRUE@ libsystemd-network.la \
@@ -7605,6 +8461,15 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_NETWORKD_TRUE@ libsystemd-internal.la \
 @ENABLE_NETWORKD_TRUE@ libsystemd-shared.la
 
+@ENABLE_NETWORKD_TRUE@networkctl_SOURCES = \
+@ENABLE_NETWORKD_TRUE@ src/network/networkctl.c
+
+@ENABLE_NETWORKD_TRUE@networkctl_LDADD = \
+@ENABLE_NETWORKD_TRUE@ libsystemd-internal.la \
+@ENABLE_NETWORKD_TRUE@ libudev-internal.la \
+@ENABLE_NETWORKD_TRUE@ libsystemd-shared.la \
+@ENABLE_NETWORKD_TRUE@ libsystemd-network.la
+
 @ENABLE_NETWORKD_TRUE@test_network_SOURCES = \
 @ENABLE_NETWORKD_TRUE@ src/network/test-network.c
 
@@ -7614,6 +8479,14 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_NETWORKD_TRUE@test_network_LDADD = \
 @ENABLE_NETWORKD_TRUE@ libsystemd-networkd-core.la
 
+@ENABLE_NETWORKD_TRUE@test_network_tables_SOURCES = \
+@ENABLE_NETWORKD_TRUE@ src/network/test-network-tables.c \
+@ENABLE_NETWORKD_TRUE@ src/shared/test-tables.h
+
+@ENABLE_NETWORKD_TRUE@test_network_tables_LDADD = \
+@ENABLE_NETWORKD_TRUE@ libsystemd-networkd-core.la \
+@ENABLE_NETWORKD_TRUE@ libudev-core.la
+
 
 # ------------------------------------------------------------------------------
 @ENABLE_LOGIND_TRUE@systemd_logind_SOURCES = \
@@ -7648,12 +8521,12 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_LOGIND_TRUE@   src/login/logind-session-dbus.c \
 @ENABLE_LOGIND_TRUE@   src/login/logind-seat-dbus.c \
 @ENABLE_LOGIND_TRUE@   src/login/logind-user-dbus.c \
-@ENABLE_LOGIND_TRUE@   src/login/logind-acl.h $(am__append_241)
+@ENABLE_LOGIND_TRUE@   src/login/logind-acl.h $(am__append_275)
 @ENABLE_LOGIND_TRUE@libsystemd_logind_core_la_LIBADD =  \
 @ENABLE_LOGIND_TRUE@   libsystemd-label.la \
 @ENABLE_LOGIND_TRUE@   libsystemd-capability.la \
 @ENABLE_LOGIND_TRUE@   libsystemd-internal.la libudev-internal.la \
-@ENABLE_LOGIND_TRUE@   libsystemd-shared.la $(am__append_242)
+@ENABLE_LOGIND_TRUE@   libsystemd-shared.la $(am__append_276)
 @ENABLE_LOGIND_TRUE@systemd_user_sessions_SOURCES = \
 @ENABLE_LOGIND_TRUE@   src/login/user-sessions.c
 
@@ -7732,13 +8605,6 @@ systemd_socket_proxyd_LDADD = \
 @ENABLE_LOGIND_TRUE@@HAVE_PAM_TRUE@dist_pamconf_DATA = \
 @ENABLE_LOGIND_TRUE@@HAVE_PAM_TRUE@    src/login/systemd-user
 
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@systemd_multi_seat_x_SOURCES = \
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@ src/login/multi-seat-x.c
-
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@systemd_multi_seat_x_LDADD = \
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@ libsystemd-label.la \
-@ENABLE_LOGIND_TRUE@@ENABLE_MULTI_SEAT_X_TRUE@ libsystemd-shared.la
-
 
 # ------------------------------------------------------------------------------
 @HAVE_PYTHON_DEVEL_TRUE@pkgpyexec_LTLIBRARIES = \
@@ -7954,6 +8820,7 @@ substitutions = \
        '|sysctldir=$(sysctldir)|' \
        '|systemgeneratordir=$(systemgeneratordir)|' \
        '|usergeneratordir=$(usergeneratordir)|' \
+       '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
        '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
        '|PACKAGE_URL=$(PACKAGE_URL)|' \
@@ -7994,7 +8861,7 @@ SED_PROCESS = \
        $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
                < $< > $@
 
-@ENABLE_POLKIT_TRUE@dist_polkitpolicy_DATA = \
+@ENABLE_POLKIT_TRUE@nodist_polkitpolicy_DATA = \
 @ENABLE_POLKIT_TRUE@   $(polkitpolicy_files) \
 @ENABLE_POLKIT_TRUE@   $(polkitpolicy_in_in_files:.policy.in.in=.policy)
 
@@ -8031,8 +8898,8 @@ DISTCHECK_CONFIGURE_FLAGS =  \
        --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
        --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
        --with-rootprefix=$$dc_install_base --disable-split-usr \
-       --enable-kdbus --enable-compat-libs $(am__append_280) \
-       $(am__append_281) $(am__append_282) $(am__append_283)
+       --enable-kdbus --enable-compat-libs $(am__append_316) \
+       $(am__append_317) $(am__append_318) $(am__append_319)
 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
 OBJECT_VARIABLES := $(filter %_OBJECTS,$(.VARIABLES))
 ALL_OBJECTS := $(foreach v,$(OBJECT_VARIABLES),$($(v)))
@@ -8289,11 +9156,32 @@ src/nss-myhostname/$(DEPDIR)/$(am__dirstamp):
 src/nss-myhostname/nss-myhostname.lo:  \
        src/nss-myhostname/$(am__dirstamp) \
        src/nss-myhostname/$(DEPDIR)/$(am__dirstamp)
-src/nss-myhostname/netlink.lo: src/nss-myhostname/$(am__dirstamp) \
-       src/nss-myhostname/$(DEPDIR)/$(am__dirstamp)
 
 libnss_myhostname.la: $(libnss_myhostname_la_OBJECTS) $(libnss_myhostname_la_DEPENDENCIES) $(EXTRA_libnss_myhostname_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(libnss_myhostname_la_LINK) $(am_libnss_myhostname_la_rpath) $(libnss_myhostname_la_OBJECTS) $(libnss_myhostname_la_LIBADD) $(LIBS)
+src/nss-mymachines/$(am__dirstamp):
+       @$(MKDIR_P) src/nss-mymachines
+       @: > src/nss-mymachines/$(am__dirstamp)
+src/nss-mymachines/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/nss-mymachines/$(DEPDIR)
+       @: > src/nss-mymachines/$(DEPDIR)/$(am__dirstamp)
+src/nss-mymachines/nss-mymachines.lo:  \
+       src/nss-mymachines/$(am__dirstamp) \
+       src/nss-mymachines/$(DEPDIR)/$(am__dirstamp)
+
+libnss_mymachines.la: $(libnss_mymachines_la_OBJECTS) $(libnss_mymachines_la_DEPENDENCIES) $(EXTRA_libnss_mymachines_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libnss_mymachines_la_LINK) $(am_libnss_mymachines_la_rpath) $(libnss_mymachines_la_OBJECTS) $(libnss_mymachines_la_LIBADD) $(LIBS)
+src/nss-resolve/$(am__dirstamp):
+       @$(MKDIR_P) src/nss-resolve
+       @: > src/nss-resolve/$(am__dirstamp)
+src/nss-resolve/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/nss-resolve/$(DEPDIR)
+       @: > src/nss-resolve/$(DEPDIR)/$(am__dirstamp)
+src/nss-resolve/nss-resolve.lo: src/nss-resolve/$(am__dirstamp) \
+       src/nss-resolve/$(DEPDIR)/$(am__dirstamp)
+
+libnss_resolve.la: $(libnss_resolve_la_OBJECTS) $(libnss_resolve_la_DEPENDENCIES) $(EXTRA_libnss_resolve_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libnss_resolve_la_LINK) $(am_libnss_resolve_la_rpath) $(libnss_resolve_la_OBJECTS) $(libnss_resolve_la_LIBADD) $(LIBS)
 src/shared/$(am__dirstamp):
        @$(MKDIR_P) src/shared
        @: > src/shared/$(am__dirstamp)
@@ -8335,6 +9223,10 @@ src/core/libsystemd_core_la-socket.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-busname.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
+src/core/libsystemd_core_la-bus-common.lo: src/core/$(am__dirstamp) \
+       src/core/$(DEPDIR)/$(am__dirstamp)
+src/core/libsystemd_core_la-bus-endpoint.lo: src/core/$(am__dirstamp) \
+       src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-target.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-snapshot.lo: src/core/$(am__dirstamp) \
@@ -8425,14 +9317,14 @@ src/core/libsystemd_core_la-condition.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-namespace.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
-src/core/libsystemd_core_la-switch-root.lo: src/core/$(am__dirstamp) \
-       src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-killall.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-audit-fd.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-show-status.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
+src/core/libsystemd_core_la-failure-action.lo:  \
+       src/core/$(am__dirstamp) src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-kmod-setup.lo: src/core/$(am__dirstamp) \
        src/core/$(DEPDIR)/$(am__dirstamp)
 src/core/libsystemd_core_la-load-fragment-gperf.lo:  \
@@ -8520,9 +9412,6 @@ src/libsystemd/sd-bus/libsystemd_internal_la-bus-util.lo:  \
 src/libsystemd/sd-bus/libsystemd_internal_la-bus-slot.lo:  \
        src/libsystemd/sd-bus/$(am__dirstamp) \
        src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
-src/libsystemd/sd-bus/libsystemd_internal_la-sd-memfd.lo:  \
-       src/libsystemd/sd-bus/$(am__dirstamp) \
-       src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
 src/libsystemd/sd-utf8/$(am__dirstamp):
        @$(MKDIR_P) src/libsystemd/sd-utf8
        @: > src/libsystemd/sd-utf8/$(am__dirstamp)
@@ -8559,6 +9448,9 @@ src/libsystemd/sd-rtnl/libsystemd_internal_la-rtnl-types.lo:  \
 src/libsystemd/sd-rtnl/libsystemd_internal_la-rtnl-util.lo:  \
        src/libsystemd/sd-rtnl/$(am__dirstamp) \
        src/libsystemd/sd-rtnl/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd/sd-rtnl/libsystemd_internal_la-local-addresses.lo:  \
+       src/libsystemd/sd-rtnl/$(am__dirstamp) \
+       src/libsystemd/sd-rtnl/$(DEPDIR)/$(am__dirstamp)
 src/libsystemd/sd-id128/$(am__dirstamp):
        @$(MKDIR_P) src/libsystemd/sd-id128
        @: > src/libsystemd/sd-id128/$(am__dirstamp)
@@ -8595,6 +9487,18 @@ src/libsystemd/sd-path/$(DEPDIR)/$(am__dirstamp):
 src/libsystemd/sd-path/libsystemd_internal_la-sd-path.lo:  \
        src/libsystemd/sd-path/$(am__dirstamp) \
        src/libsystemd/sd-path/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd/sd-network/$(am__dirstamp):
+       @$(MKDIR_P) src/libsystemd/sd-network
+       @: > src/libsystemd/sd-network/$(am__dirstamp)
+src/libsystemd/sd-network/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/libsystemd/sd-network/$(DEPDIR)
+       @: > src/libsystemd/sd-network/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd/sd-network/libsystemd_internal_la-sd-network.lo:  \
+       src/libsystemd/sd-network/$(am__dirstamp) \
+       src/libsystemd/sd-network/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd/sd-network/libsystemd_internal_la-network-util.lo:  \
+       src/libsystemd/sd-network/$(am__dirstamp) \
+       src/libsystemd/sd-network/$(DEPDIR)/$(am__dirstamp)
 src/libsystemd/sd-bus/libsystemd_internal_la-bus-error-mapping.lo:  \
        src/libsystemd/sd-bus/$(am__dirstamp) \
        src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
@@ -8681,6 +9585,9 @@ src/shared/libsystemd_label_la-mkdir-label.lo:  \
 src/shared/libsystemd_label_la-ask-password-api.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_label_la-switch-root.lo:  \
+       src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_label_la-fileio-label.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
@@ -8755,15 +9662,6 @@ src/machine/machine-dbus.lo: src/machine/$(am__dirstamp) \
 
 libsystemd-machine-core.la: $(libsystemd_machine_core_la_OBJECTS) $(libsystemd_machine_core_la_DEPENDENCIES) $(EXTRA_libsystemd_machine_core_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK) $(am_libsystemd_machine_core_la_rpath) $(libsystemd_machine_core_la_OBJECTS) $(libsystemd_machine_core_la_LIBADD) $(LIBS)
-src/network/$(am__dirstamp):
-       @$(MKDIR_P) src/network
-       @: > src/network/$(am__dirstamp)
-src/network/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) src/network/$(DEPDIR)
-       @: > src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_network_la-sd-network.lo:  \
-       src/network/$(am__dirstamp) \
-       src/network/$(DEPDIR)/$(am__dirstamp)
 src/libsystemd-network/$(am__dirstamp):
        @$(MKDIR_P) src/libsystemd-network
        @: > src/libsystemd-network/$(am__dirstamp)
@@ -8818,31 +9716,49 @@ src/libsystemd-network/libsystemd_network_la-sd-dhcp6-lease.lo:  \
 
 libsystemd-network.la: $(libsystemd_network_la_OBJECTS) $(libsystemd_network_la_DEPENDENCIES) $(EXTRA_libsystemd_network_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(libsystemd_network_la_LINK)  $(libsystemd_network_la_OBJECTS) $(libsystemd_network_la_LIBADD) $(LIBS)
-src/network/libsystemd_networkd_core_la-networkd-link.lo:  \
+src/network/$(am__dirstamp):
+       @$(MKDIR_P) src/network
+       @: > src/network/$(am__dirstamp)
+src/network/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/network/$(DEPDIR)
+       @: > src/network/$(DEPDIR)/$(am__dirstamp)
+src/network/libsystemd_networkd_core_la-networkd-netdev.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-netdev.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-netdev-tunnel.lo:  \
+       src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
+src/network/libsystemd_networkd_core_la-networkd-netdev-veth.lo:  \
+       src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
+src/network/libsystemd_networkd_core_la-networkd-netdev-vxlan.lo:  \
+       src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
+src/network/libsystemd_networkd_core_la-networkd-netdev-vlan.lo:  \
+       src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
+src/network/libsystemd_networkd_core_la-networkd-netdev-macvlan.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-tunnel.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-netdev-dummy.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-veth.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-netdev-tuntap.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-vxlan.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-netdev-bond.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-vlan.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-netdev-bridge.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-macvlan.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-link.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-dummy.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-ipv4ll.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
-src/network/libsystemd_networkd_core_la-networkd-tuntap.lo:  \
+src/network/libsystemd_networkd_core_la-networkd-dhcp4.lo:  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
 src/network/libsystemd_networkd_core_la-networkd-network.lo:  \
@@ -8906,6 +9822,12 @@ src/shared/libsystemd_shared_la-path-util.lo:  \
 src/shared/libsystemd_shared_la-time-util.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-locale-util.lo:  \
+       src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-mempool.lo:  \
+       src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-hashmap.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
@@ -8952,6 +9874,9 @@ src/shared/libsystemd_shared_la-pager.lo: src/shared/$(am__dirstamp) \
 src/shared/libsystemd_shared_la-socket-util.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-in-addr-util.lo:  \
+       src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-conf-files.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
@@ -8964,9 +9889,6 @@ src/shared/libsystemd_shared_la-cgroup-show.lo:  \
 src/shared/libsystemd_shared_la-unit-name.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
-src/shared/libsystemd_shared_la-utmp-wtmp.lo:  \
-       src/shared/$(am__dirstamp) \
-       src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-watchdog.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
@@ -9018,6 +9940,9 @@ src/shared/libsystemd_shared_la-errno-list.lo:  \
 src/shared/libsystemd_shared_la-af-list.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-arphrd-list.lo:  \
+       src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-audit.lo: src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-xml.lo: src/shared/$(am__dirstamp) \
@@ -9036,19 +9961,74 @@ src/shared/libsystemd_shared_la-login-shared.lo:  \
        src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-ring.lo: src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
-src/shared/libsystemd_shared_la-async.lo: src/shared/$(am__dirstamp) \
-       src/shared/$(DEPDIR)/$(am__dirstamp)
-src/shared/libsystemd_shared_la-eventfd-util.lo:  \
+src/shared/libsystemd_shared_la-barrier.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-pty.lo: src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-async.lo: src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-copy.lo: src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/libsystemd_shared_la-base-filesystem.lo:  \
        src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-memfd.lo: src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-uid-range.lo:  \
+       src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/libsystemd_shared_la-utmp-wtmp.lo:  \
+       src/shared/$(am__dirstamp) \
+       src/shared/$(DEPDIR)/$(am__dirstamp)
 
 libsystemd-shared.la: $(libsystemd_shared_la_OBJECTS) $(libsystemd_shared_la_DEPENDENCIES) $(EXTRA_libsystemd_shared_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(libsystemd_shared_la_LINK)  $(libsystemd_shared_la_OBJECTS) $(libsystemd_shared_la_LIBADD) $(LIBS)
+src/libsystemd-terminal/$(am__dirstamp):
+       @$(MKDIR_P) src/libsystemd-terminal
+       @: > src/libsystemd-terminal/$(am__dirstamp)
+src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/libsystemd-terminal/$(DEPDIR)
+       @: > src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-grdev.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-grdev-drm.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-idev.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-idev-evdev.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-idev-keyboard.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-sysview.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-term-charset.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-term-page.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-term-parser.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-term-screen.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-term-wcwidth.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd-terminal/libsystemd_terminal_la-unifont.lo:  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+
+libsystemd-terminal.la: $(libsystemd_terminal_la_OBJECTS) $(libsystemd_terminal_la_DEPENDENCIES) $(EXTRA_libsystemd_terminal_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libsystemd_terminal_la_LINK) $(am_libsystemd_terminal_la_rpath) $(libsystemd_terminal_la_OBJECTS) $(libsystemd_terminal_la_LIBADD) $(LIBS)
 src/shared/install.lo: src/shared/$(am__dirstamp) \
        src/shared/$(DEPDIR)/$(am__dirstamp)
 src/shared/install-printf.lo: src/shared/$(am__dirstamp) \
@@ -9120,9 +10100,6 @@ src/libsystemd/sd-bus/libsystemd_la-bus-util.lo:  \
 src/libsystemd/sd-bus/libsystemd_la-bus-slot.lo:  \
        src/libsystemd/sd-bus/$(am__dirstamp) \
        src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
-src/libsystemd/sd-bus/libsystemd_la-sd-memfd.lo:  \
-       src/libsystemd/sd-bus/$(am__dirstamp) \
-       src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
 src/libsystemd/sd-utf8/libsystemd_la-sd-utf8.lo:  \
        src/libsystemd/sd-utf8/$(am__dirstamp) \
        src/libsystemd/sd-utf8/$(DEPDIR)/$(am__dirstamp)
@@ -9141,6 +10118,9 @@ src/libsystemd/sd-rtnl/libsystemd_la-rtnl-types.lo:  \
 src/libsystemd/sd-rtnl/libsystemd_la-rtnl-util.lo:  \
        src/libsystemd/sd-rtnl/$(am__dirstamp) \
        src/libsystemd/sd-rtnl/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd/sd-rtnl/libsystemd_la-local-addresses.lo:  \
+       src/libsystemd/sd-rtnl/$(am__dirstamp) \
+       src/libsystemd/sd-rtnl/$(DEPDIR)/$(am__dirstamp)
 src/libsystemd/sd-id128/libsystemd_la-sd-id128.lo:  \
        src/libsystemd/sd-id128/$(am__dirstamp) \
        src/libsystemd/sd-id128/$(DEPDIR)/$(am__dirstamp)
@@ -9153,6 +10133,12 @@ src/libsystemd/sd-login/libsystemd_la-sd-login.lo:  \
 src/libsystemd/sd-path/libsystemd_la-sd-path.lo:  \
        src/libsystemd/sd-path/$(am__dirstamp) \
        src/libsystemd/sd-path/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd/sd-network/libsystemd_la-sd-network.lo:  \
+       src/libsystemd/sd-network/$(am__dirstamp) \
+       src/libsystemd/sd-network/$(DEPDIR)/$(am__dirstamp)
+src/libsystemd/sd-network/libsystemd_la-network-util.lo:  \
+       src/libsystemd/sd-network/$(am__dirstamp) \
+       src/libsystemd/sd-network/$(DEPDIR)/$(am__dirstamp)
 src/libsystemd/sd-resolve/libsystemd_la-sd-resolve.lo:  \
        src/libsystemd/sd-resolve/$(am__dirstamp) \
        src/libsystemd/sd-resolve/$(DEPDIR)/$(am__dirstamp)
@@ -9235,8 +10221,6 @@ src/udev/net/libudev_core_la-link-config.lo:  \
 src/udev/net/libudev_core_la-ethtool-util.lo:  \
        src/udev/net/$(am__dirstamp) \
        src/udev/net/$(DEPDIR)/$(am__dirstamp)
-src/udev/libudev_core_la-udev-builtin-firmware.lo:  \
-       src/udev/$(am__dirstamp) src/udev/$(DEPDIR)/$(am__dirstamp)
 src/udev/libudev_core_la-udev-builtin-kmod.lo:  \
        src/udev/$(am__dirstamp) src/udev/$(DEPDIR)/$(am__dirstamp)
 src/udev/libudev_core_la-udev-builtin-blkid.lo:  \
@@ -9731,6 +10715,12 @@ src/udev/mtd_probe/probe_smartmedia.$(OBJEXT):  \
 mtd_probe$(EXEEXT): $(mtd_probe_OBJECTS) $(mtd_probe_DEPENDENCIES) $(EXTRA_mtd_probe_DEPENDENCIES) 
        @rm -f mtd_probe$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(mtd_probe_OBJECTS) $(mtd_probe_LDADD) $(LIBS)
+src/network/networkctl.$(OBJEXT): src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
+
+networkctl$(EXEEXT): $(networkctl_OBJECTS) $(networkctl_DEPENDENCIES) $(EXTRA_networkctl_DEPENDENCIES) 
+       @rm -f networkctl$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(networkctl_OBJECTS) $(networkctl_LDADD) $(LIBS)
 src/udev/scsi_id/$(am__dirstamp):
        @$(MKDIR_P) src/udev/scsi_id
        @: > src/udev/scsi_id/$(am__dirstamp)
@@ -9796,6 +10786,8 @@ src/analyze/$(DEPDIR)/$(am__dirstamp):
        @: > src/analyze/$(DEPDIR)/$(am__dirstamp)
 src/analyze/analyze.$(OBJEXT): src/analyze/$(am__dirstamp) \
        src/analyze/$(DEPDIR)/$(am__dirstamp)
+src/analyze/analyze-verify.$(OBJEXT): src/analyze/$(am__dirstamp) \
+       src/analyze/$(DEPDIR)/$(am__dirstamp)
 
 systemd-analyze$(EXEEXT): $(systemd_analyze_OBJECTS) $(systemd_analyze_DEPENDENCIES) $(EXTRA_systemd_analyze_DEPENDENCIES) 
        @rm -f systemd-analyze$(EXEEXT)
@@ -9910,6 +10902,34 @@ src/cgtop/cgtop.$(OBJEXT): src/cgtop/$(am__dirstamp) \
 systemd-cgtop$(EXEEXT): $(systemd_cgtop_OBJECTS) $(systemd_cgtop_DEPENDENCIES) $(EXTRA_systemd_cgtop_DEPENDENCIES) 
        @rm -f systemd-cgtop$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(systemd_cgtop_OBJECTS) $(systemd_cgtop_LDADD) $(LIBS)
+src/console/$(am__dirstamp):
+       @$(MKDIR_P) src/console
+       @: > src/console/$(am__dirstamp)
+src/console/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/console/$(DEPDIR)
+       @: > src/console/$(DEPDIR)/$(am__dirstamp)
+src/console/systemd_consoled-consoled.$(OBJEXT):  \
+       src/console/$(am__dirstamp) \
+       src/console/$(DEPDIR)/$(am__dirstamp)
+src/console/systemd_consoled-consoled-display.$(OBJEXT):  \
+       src/console/$(am__dirstamp) \
+       src/console/$(DEPDIR)/$(am__dirstamp)
+src/console/systemd_consoled-consoled-manager.$(OBJEXT):  \
+       src/console/$(am__dirstamp) \
+       src/console/$(DEPDIR)/$(am__dirstamp)
+src/console/systemd_consoled-consoled-session.$(OBJEXT):  \
+       src/console/$(am__dirstamp) \
+       src/console/$(DEPDIR)/$(am__dirstamp)
+src/console/systemd_consoled-consoled-terminal.$(OBJEXT):  \
+       src/console/$(am__dirstamp) \
+       src/console/$(DEPDIR)/$(am__dirstamp)
+src/console/systemd_consoled-consoled-workspace.$(OBJEXT):  \
+       src/console/$(am__dirstamp) \
+       src/console/$(DEPDIR)/$(am__dirstamp)
+
+systemd-consoled$(EXEEXT): $(systemd_consoled_OBJECTS) $(systemd_consoled_DEPENDENCIES) $(EXTRA_systemd_consoled_DEPENDENCIES) 
+       @rm -f systemd-consoled$(EXEEXT)
+       $(AM_V_CCLD)$(systemd_consoled_LINK) $(systemd_consoled_OBJECTS) $(systemd_consoled_LDADD) $(LIBS)
 src/journal/coredump.$(OBJEXT): src/journal/$(am__dirstamp) \
        src/journal/$(DEPDIR)/$(am__dirstamp)
 src/journal/coredump-vacuum.$(OBJEXT): src/journal/$(am__dirstamp) \
@@ -10004,6 +11024,37 @@ src/efi-boot-generator/efi-boot-generator.$(OBJEXT):  \
 systemd-efi-boot-generator$(EXEEXT): $(systemd_efi_boot_generator_OBJECTS) $(systemd_efi_boot_generator_DEPENDENCIES) $(EXTRA_systemd_efi_boot_generator_DEPENDENCIES) 
        @rm -f systemd-efi-boot-generator$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(systemd_efi_boot_generator_OBJECTS) $(systemd_efi_boot_generator_LDADD) $(LIBS)
+src/escape/$(am__dirstamp):
+       @$(MKDIR_P) src/escape
+       @: > src/escape/$(am__dirstamp)
+src/escape/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/escape/$(DEPDIR)
+       @: > src/escape/$(DEPDIR)/$(am__dirstamp)
+src/escape/escape.$(OBJEXT): src/escape/$(am__dirstamp) \
+       src/escape/$(DEPDIR)/$(am__dirstamp)
+
+systemd-escape$(EXEEXT): $(systemd_escape_OBJECTS) $(systemd_escape_DEPENDENCIES) $(EXTRA_systemd_escape_DEPENDENCIES) 
+       @rm -f systemd-escape$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(systemd_escape_OBJECTS) $(systemd_escape_LDADD) $(LIBS)
+src/libsystemd-terminal/systemd_evcat-evcat.$(OBJEXT):  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+
+systemd-evcat$(EXEEXT): $(systemd_evcat_OBJECTS) $(systemd_evcat_DEPENDENCIES) $(EXTRA_systemd_evcat_DEPENDENCIES) 
+       @rm -f systemd-evcat$(EXEEXT)
+       $(AM_V_CCLD)$(systemd_evcat_LINK) $(systemd_evcat_OBJECTS) $(systemd_evcat_LDADD) $(LIBS)
+src/firstboot/$(am__dirstamp):
+       @$(MKDIR_P) src/firstboot
+       @: > src/firstboot/$(am__dirstamp)
+src/firstboot/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/firstboot/$(DEPDIR)
+       @: > src/firstboot/$(DEPDIR)/$(am__dirstamp)
+src/firstboot/firstboot.$(OBJEXT): src/firstboot/$(am__dirstamp) \
+       src/firstboot/$(DEPDIR)/$(am__dirstamp)
+
+systemd-firstboot$(EXEEXT): $(systemd_firstboot_OBJECTS) $(systemd_firstboot_DEPENDENCIES) $(EXTRA_systemd_firstboot_DEPENDENCIES) 
+       @rm -f systemd-firstboot$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(systemd_firstboot_OBJECTS) $(systemd_firstboot_LDADD) $(LIBS)
 src/fsck/$(am__dirstamp):
        @$(MKDIR_P) src/fsck
        @: > src/fsck/$(am__dirstamp)
@@ -10057,6 +11108,26 @@ src/gpt-auto-generator/systemd_gpt_auto_generator-gpt-auto-generator.$(OBJEXT):
 systemd-gpt-auto-generator$(EXEEXT): $(systemd_gpt_auto_generator_OBJECTS) $(systemd_gpt_auto_generator_DEPENDENCIES) $(EXTRA_systemd_gpt_auto_generator_DEPENDENCIES) 
        @rm -f systemd-gpt-auto-generator$(EXEEXT)
        $(AM_V_CCLD)$(systemd_gpt_auto_generator_LINK) $(systemd_gpt_auto_generator_OBJECTS) $(systemd_gpt_auto_generator_LDADD) $(LIBS)
+src/hibernate-resume/$(am__dirstamp):
+       @$(MKDIR_P) src/hibernate-resume
+       @: > src/hibernate-resume/$(am__dirstamp)
+src/hibernate-resume/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/hibernate-resume/$(DEPDIR)
+       @: > src/hibernate-resume/$(DEPDIR)/$(am__dirstamp)
+src/hibernate-resume/hibernate-resume.$(OBJEXT):  \
+       src/hibernate-resume/$(am__dirstamp) \
+       src/hibernate-resume/$(DEPDIR)/$(am__dirstamp)
+
+systemd-hibernate-resume$(EXEEXT): $(systemd_hibernate_resume_OBJECTS) $(systemd_hibernate_resume_DEPENDENCIES) $(EXTRA_systemd_hibernate_resume_DEPENDENCIES) 
+       @rm -f systemd-hibernate-resume$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(systemd_hibernate_resume_OBJECTS) $(systemd_hibernate_resume_LDADD) $(LIBS)
+src/hibernate-resume/hibernate-resume-generator.$(OBJEXT):  \
+       src/hibernate-resume/$(am__dirstamp) \
+       src/hibernate-resume/$(DEPDIR)/$(am__dirstamp)
+
+systemd-hibernate-resume-generator$(EXEEXT): $(systemd_hibernate_resume_generator_OBJECTS) $(systemd_hibernate_resume_generator_DEPENDENCIES) $(EXTRA_systemd_hibernate_resume_generator_DEPENDENCIES) 
+       @rm -f systemd-hibernate-resume-generator$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(systemd_hibernate_resume_generator_OBJECTS) $(systemd_hibernate_resume_generator_LDADD) $(LIBS)
 src/hostname/hostnamed.$(OBJEXT): src/hostname/$(am__dirstamp) \
        src/hostname/$(DEPDIR)/$(am__dirstamp)
 
@@ -10081,32 +11152,48 @@ src/initctl/initctl.$(OBJEXT): src/initctl/$(am__dirstamp) \
 systemd-initctl$(EXEEXT): $(systemd_initctl_OBJECTS) $(systemd_initctl_DEPENDENCIES) $(EXTRA_systemd_initctl_DEPENDENCIES) 
        @rm -f systemd-initctl$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(systemd_initctl_OBJECTS) $(systemd_initctl_LDADD) $(LIBS)
-src/journal/systemd_journal_gatewayd-journal-gatewayd.$(OBJEXT):  \
-       src/journal/$(am__dirstamp) \
-       src/journal/$(DEPDIR)/$(am__dirstamp)
-src/journal/systemd_journal_gatewayd-microhttpd-util.$(OBJEXT):  \
-       src/journal/$(am__dirstamp) \
-       src/journal/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/$(am__dirstamp):
+       @$(MKDIR_P) src/journal-remote
+       @: > src/journal-remote/$(am__dirstamp)
+src/journal-remote/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/journal-remote/$(DEPDIR)
+       @: > src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/systemd_journal_gatewayd-microhttpd-util.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
 
 systemd-journal-gatewayd$(EXEEXT): $(systemd_journal_gatewayd_OBJECTS) $(systemd_journal_gatewayd_DEPENDENCIES) $(EXTRA_systemd_journal_gatewayd_DEPENDENCIES) 
        @rm -f systemd-journal-gatewayd$(EXEEXT)
        $(AM_V_CCLD)$(systemd_journal_gatewayd_LINK) $(systemd_journal_gatewayd_OBJECTS) $(systemd_journal_gatewayd_LDADD) $(LIBS)
-src/journal/systemd_journal_remote-journal-remote-parse.$(OBJEXT):  \
-       src/journal/$(am__dirstamp) \
-       src/journal/$(DEPDIR)/$(am__dirstamp)
-src/journal/systemd_journal_remote-journal-remote-write.$(OBJEXT):  \
-       src/journal/$(am__dirstamp) \
-       src/journal/$(DEPDIR)/$(am__dirstamp)
-src/journal/systemd_journal_remote-journal-remote.$(OBJEXT):  \
-       src/journal/$(am__dirstamp) \
-       src/journal/$(DEPDIR)/$(am__dirstamp)
-src/journal/systemd_journal_remote-microhttpd-util.$(OBJEXT):  \
-       src/journal/$(am__dirstamp) \
-       src/journal/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/systemd_journal_remote-journal-remote-parse.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/systemd_journal_remote-journal-remote-write.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/systemd_journal_remote-journal-remote.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/systemd_journal_remote-microhttpd-util.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
 
 systemd-journal-remote$(EXEEXT): $(systemd_journal_remote_OBJECTS) $(systemd_journal_remote_DEPENDENCIES) $(EXTRA_systemd_journal_remote_DEPENDENCIES) 
        @rm -f systemd-journal-remote$(EXEEXT)
        $(AM_V_CCLD)$(systemd_journal_remote_LINK) $(systemd_journal_remote_OBJECTS) $(systemd_journal_remote_LDADD) $(LIBS)
+src/journal-remote/systemd_journal_upload-journal-upload.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+src/journal-remote/systemd_journal_upload-journal-upload-journal.$(OBJEXT):  \
+       src/journal-remote/$(am__dirstamp) \
+       src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+
+systemd-journal-upload$(EXEEXT): $(systemd_journal_upload_OBJECTS) $(systemd_journal_upload_DEPENDENCIES) $(EXTRA_systemd_journal_upload_DEPENDENCIES) 
+       @rm -f systemd-journal-upload$(EXEEXT)
+       $(AM_V_CCLD)$(systemd_journal_upload_LINK) $(systemd_journal_upload_OBJECTS) $(systemd_journal_upload_LDADD) $(LIBS)
 src/journal/journald.$(OBJEXT): src/journal/$(am__dirstamp) \
        src/journal/$(DEPDIR)/$(am__dirstamp)
 
@@ -10148,6 +11235,13 @@ src/machine/machined.$(OBJEXT): src/machine/$(am__dirstamp) \
 systemd-machined$(EXEEXT): $(systemd_machined_OBJECTS) $(systemd_machined_DEPENDENCIES) $(EXTRA_systemd_machined_DEPENDENCIES) 
        @rm -f systemd-machined$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(systemd_machined_OBJECTS) $(systemd_machined_LDADD) $(LIBS)
+src/libsystemd-terminal/systemd_modeset-modeset.$(OBJEXT):  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+
+systemd-modeset$(EXEEXT): $(systemd_modeset_OBJECTS) $(systemd_modeset_DEPENDENCIES) $(EXTRA_systemd_modeset_DEPENDENCIES) 
+       @rm -f systemd-modeset$(EXEEXT)
+       $(AM_V_CCLD)$(systemd_modeset_LINK) $(systemd_modeset_OBJECTS) $(systemd_modeset_LDADD) $(LIBS)
 src/modules-load/$(am__dirstamp):
        @$(MKDIR_P) src/modules-load
        @: > src/modules-load/$(am__dirstamp)
@@ -10161,12 +11255,6 @@ src/modules-load/systemd_modules_load-modules-load.$(OBJEXT):  \
 systemd-modules-load$(EXEEXT): $(systemd_modules_load_OBJECTS) $(systemd_modules_load_DEPENDENCIES) $(EXTRA_systemd_modules_load_DEPENDENCIES) 
        @rm -f systemd-modules-load$(EXEEXT)
        $(AM_V_CCLD)$(systemd_modules_load_LINK) $(systemd_modules_load_OBJECTS) $(systemd_modules_load_LDADD) $(LIBS)
-src/login/multi-seat-x.$(OBJEXT): src/login/$(am__dirstamp) \
-       src/login/$(DEPDIR)/$(am__dirstamp)
-
-systemd-multi-seat-x$(EXEEXT): $(systemd_multi_seat_x_OBJECTS) $(systemd_multi_seat_x_DEPENDENCIES) $(EXTRA_systemd_multi_seat_x_DEPENDENCIES) 
-       @rm -f systemd-multi-seat-x$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(systemd_multi_seat_x_OBJECTS) $(systemd_multi_seat_x_LDADD) $(LIBS)
 src/network/networkd.$(OBJEXT): src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
 
@@ -10176,6 +11264,12 @@ systemd-networkd$(EXEEXT): $(systemd_networkd_OBJECTS) $(systemd_networkd_DEPEND
 src/network/systemd_networkd_wait_online-networkd-wait-online.$(OBJEXT):  \
        src/network/$(am__dirstamp) \
        src/network/$(DEPDIR)/$(am__dirstamp)
+src/network/systemd_networkd_wait_online-networkd-wait-online-manager.$(OBJEXT):  \
+       src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
+src/network/systemd_networkd_wait_online-networkd-wait-online-link.$(OBJEXT):  \
+       src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
 
 systemd-networkd-wait-online$(EXEEXT): $(systemd_networkd_wait_online_OBJECTS) $(systemd_networkd_wait_online_DEPENDENCIES) $(EXTRA_systemd_networkd_wait_online_DEPENDENCIES) 
        @rm -f systemd-networkd-wait-online$(EXEEXT)
@@ -10188,14 +11282,6 @@ src/notify/$(DEPDIR)/$(am__dirstamp):
        @: > src/notify/$(DEPDIR)/$(am__dirstamp)
 src/notify/notify.$(OBJEXT): src/notify/$(am__dirstamp) \
        src/notify/$(DEPDIR)/$(am__dirstamp)
-src/readahead/$(am__dirstamp):
-       @$(MKDIR_P) src/readahead
-       @: > src/readahead/$(am__dirstamp)
-src/readahead/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) src/readahead/$(DEPDIR)
-       @: > src/readahead/$(DEPDIR)/$(am__dirstamp)
-src/readahead/sd-readahead.$(OBJEXT): src/readahead/$(am__dirstamp) \
-       src/readahead/$(DEPDIR)/$(am__dirstamp)
 
 systemd-notify$(EXEEXT): $(systemd_notify_OBJECTS) $(systemd_notify_DEPENDENCIES) $(EXTRA_systemd_notify_DEPENDENCIES) 
        @rm -f systemd-notify$(EXEEXT)
@@ -10267,24 +11353,6 @@ src/rc-local-generator/rc-local-generator.$(OBJEXT):  \
 systemd-rc-local-generator$(EXEEXT): $(systemd_rc_local_generator_OBJECTS) $(systemd_rc_local_generator_DEPENDENCIES) $(EXTRA_systemd_rc_local_generator_DEPENDENCIES) 
        @rm -f systemd-rc-local-generator$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(systemd_rc_local_generator_OBJECTS) $(systemd_rc_local_generator_LDADD) $(LIBS)
-src/readahead/readahead.$(OBJEXT): src/readahead/$(am__dirstamp) \
-       src/readahead/$(DEPDIR)/$(am__dirstamp)
-src/readahead/readahead-collect.$(OBJEXT):  \
-       src/readahead/$(am__dirstamp) \
-       src/readahead/$(DEPDIR)/$(am__dirstamp)
-src/readahead/readahead-replay.$(OBJEXT):  \
-       src/readahead/$(am__dirstamp) \
-       src/readahead/$(DEPDIR)/$(am__dirstamp)
-src/readahead/readahead-analyze.$(OBJEXT):  \
-       src/readahead/$(am__dirstamp) \
-       src/readahead/$(DEPDIR)/$(am__dirstamp)
-src/readahead/readahead-common.$(OBJEXT):  \
-       src/readahead/$(am__dirstamp) \
-       src/readahead/$(DEPDIR)/$(am__dirstamp)
-
-systemd-readahead$(EXEEXT): $(systemd_readahead_OBJECTS) $(systemd_readahead_DEPENDENCIES) $(EXTRA_systemd_readahead_DEPENDENCIES) 
-       @rm -f systemd-readahead$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(systemd_readahead_OBJECTS) $(systemd_readahead_LDADD) $(LIBS)
 src/remount-fs/$(am__dirstamp):
        @$(MKDIR_P) src/remount-fs
        @: > src/remount-fs/$(am__dirstamp)
@@ -10310,25 +11378,74 @@ src/reply-password/reply-password.$(OBJEXT):  \
 systemd-reply-password$(EXEEXT): $(systemd_reply_password_OBJECTS) $(systemd_reply_password_DEPENDENCIES) $(EXTRA_systemd_reply_password_DEPENDENCIES) 
        @rm -f systemd-reply-password$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(systemd_reply_password_OBJECTS) $(systemd_reply_password_LDADD) $(LIBS)
+src/resolve-host/$(am__dirstamp):
+       @$(MKDIR_P) src/resolve-host
+       @: > src/resolve-host/$(am__dirstamp)
+src/resolve-host/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/resolve-host/$(DEPDIR)
+       @: > src/resolve-host/$(DEPDIR)/$(am__dirstamp)
+src/resolve-host/resolve-host.$(OBJEXT):  \
+       src/resolve-host/$(am__dirstamp) \
+       src/resolve-host/$(DEPDIR)/$(am__dirstamp)
 src/resolve/$(am__dirstamp):
        @$(MKDIR_P) src/resolve
        @: > src/resolve/$(am__dirstamp)
 src/resolve/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) src/resolve/$(DEPDIR)
        @: > src/resolve/$(DEPDIR)/$(am__dirstamp)
-src/resolve/systemd_resolved-resolved.$(OBJEXT):  \
+src/resolve/resolved-dns-packet.$(OBJEXT):  \
+       src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-rr.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-answer.$(OBJEXT):  \
+       src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-question.$(OBJEXT):  \
+       src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-domain.$(OBJEXT):  \
+       src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/dns-type.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+
+systemd-resolve-host$(EXEEXT): $(systemd_resolve_host_OBJECTS) $(systemd_resolve_host_DEPENDENCIES) $(EXTRA_systemd_resolve_host_DEPENDENCIES) 
+       @rm -f systemd-resolve-host$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(systemd_resolve_host_OBJECTS) $(systemd_resolve_host_LDADD) $(LIBS)
+src/resolve/resolved.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-manager.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-conf.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-bus.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-link.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-query.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-transaction.$(OBJEXT):  \
        src/resolve/$(am__dirstamp) \
        src/resolve/$(DEPDIR)/$(am__dirstamp)
-src/resolve/systemd_resolved-resolved-manager.$(OBJEXT):  \
+src/resolve/resolved-dns-scope.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-server.$(OBJEXT):  \
        src/resolve/$(am__dirstamp) \
        src/resolve/$(DEPDIR)/$(am__dirstamp)
-src/resolve/systemd_resolved-resolved-gperf.$(OBJEXT):  \
+src/resolve/resolved-dns-cache.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-zone.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-dns-stream.$(OBJEXT):  \
        src/resolve/$(am__dirstamp) \
        src/resolve/$(DEPDIR)/$(am__dirstamp)
+src/resolve/resolved-gperf.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
 
 systemd-resolved$(EXEEXT): $(systemd_resolved_OBJECTS) $(systemd_resolved_DEPENDENCIES) $(EXTRA_systemd_resolved_DEPENDENCIES) 
        @rm -f systemd-resolved$(EXEEXT)
-       $(AM_V_CCLD)$(systemd_resolved_LINK) $(systemd_resolved_OBJECTS) $(systemd_resolved_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(systemd_resolved_OBJECTS) $(systemd_resolved_LDADD) $(LIBS)
 src/rfkill/$(am__dirstamp):
        @$(MKDIR_P) src/rfkill
        @: > src/rfkill/$(am__dirstamp)
@@ -10400,6 +11517,13 @@ src/socket-proxy/socket-proxyd.$(OBJEXT):  \
 systemd-socket-proxyd$(EXEEXT): $(systemd_socket_proxyd_OBJECTS) $(systemd_socket_proxyd_DEPENDENCIES) $(EXTRA_systemd_socket_proxyd_DEPENDENCIES) 
        @rm -f systemd-socket-proxyd$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(systemd_socket_proxyd_OBJECTS) $(systemd_socket_proxyd_LDADD) $(LIBS)
+src/libsystemd-terminal/subterm.$(OBJEXT):  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+
+systemd-subterm$(EXEEXT): $(systemd_subterm_OBJECTS) $(systemd_subterm_DEPENDENCIES) $(EXTRA_systemd_subterm_DEPENDENCIES) 
+       @rm -f systemd-subterm$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(systemd_subterm_OBJECTS) $(systemd_subterm_LDADD) $(LIBS)
 src/sysctl/$(am__dirstamp):
        @$(MKDIR_P) src/sysctl
        @: > src/sysctl/$(am__dirstamp)
@@ -10470,6 +11594,13 @@ src/timesync/$(DEPDIR)/$(am__dirstamp):
        @: > src/timesync/$(DEPDIR)/$(am__dirstamp)
 src/timesync/timesyncd.$(OBJEXT): src/timesync/$(am__dirstamp) \
        src/timesync/$(DEPDIR)/$(am__dirstamp)
+src/timesync/timesyncd-manager.$(OBJEXT):  \
+       src/timesync/$(am__dirstamp) \
+       src/timesync/$(DEPDIR)/$(am__dirstamp)
+src/timesync/timesyncd-conf.$(OBJEXT): src/timesync/$(am__dirstamp) \
+       src/timesync/$(DEPDIR)/$(am__dirstamp)
+src/timesync/timesyncd-server.$(OBJEXT): src/timesync/$(am__dirstamp) \
+       src/timesync/$(DEPDIR)/$(am__dirstamp)
 src/timesync/timesyncd-gperf.$(OBJEXT): src/timesync/$(am__dirstamp) \
        src/timesync/$(DEPDIR)/$(am__dirstamp)
 
@@ -10569,6 +11700,12 @@ src/test/test-async.$(OBJEXT): src/test/$(am__dirstamp) \
 test-async$(EXEEXT): $(test_async_OBJECTS) $(test_async_DEPENDENCIES) $(EXTRA_test_async_DEPENDENCIES) 
        @rm -f test-async$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_async_OBJECTS) $(test_async_LDADD) $(LIBS)
+src/test/test-barrier.$(OBJEXT): src/test/$(am__dirstamp) \
+       src/test/$(DEPDIR)/$(am__dirstamp)
+
+test-barrier$(EXEEXT): $(test_barrier_OBJECTS) $(test_barrier_DEPENDENCIES) $(EXTRA_test_barrier_DEPENDENCIES) 
+       @rm -f test-barrier$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_barrier_OBJECTS) $(test_barrier_LDADD) $(LIBS)
 src/test/test-boot-timestamps.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -10652,13 +11789,6 @@ src/libsystemd/sd-bus/test-bus-match.$(OBJEXT):  \
 test-bus-match$(EXEEXT): $(test_bus_match_OBJECTS) $(test_bus_match_DEPENDENCIES) $(EXTRA_test_bus_match_DEPENDENCIES) 
        @rm -f test-bus-match$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_bus_match_OBJECTS) $(test_bus_match_LDADD) $(LIBS)
-src/libsystemd/sd-bus/test-bus-memfd.$(OBJEXT):  \
-       src/libsystemd/sd-bus/$(am__dirstamp) \
-       src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
-
-test-bus-memfd$(EXEEXT): $(test_bus_memfd_OBJECTS) $(test_bus_memfd_DEPENDENCIES) $(EXTRA_test_bus_memfd_DEPENDENCIES) 
-       @rm -f test-bus-memfd$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_bus_memfd_OBJECTS) $(test_bus_memfd_LDADD) $(LIBS)
 src/libsystemd/sd-bus/test_bus_objects-test-bus-objects.$(OBJEXT):  \
        src/libsystemd/sd-bus/$(am__dirstamp) \
        src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
@@ -10666,6 +11796,13 @@ src/libsystemd/sd-bus/test_bus_objects-test-bus-objects.$(OBJEXT):  \
 test-bus-objects$(EXEEXT): $(test_bus_objects_OBJECTS) $(test_bus_objects_DEPENDENCIES) $(EXTRA_test_bus_objects_DEPENDENCIES) 
        @rm -f test-bus-objects$(EXEEXT)
        $(AM_V_CCLD)$(test_bus_objects_LINK) $(test_bus_objects_OBJECTS) $(test_bus_objects_LDADD) $(LIBS)
+src/bus-proxyd/test-bus-policy.$(OBJEXT):  \
+       src/bus-proxyd/$(am__dirstamp) \
+       src/bus-proxyd/$(DEPDIR)/$(am__dirstamp)
+
+test-bus-policy$(EXEEXT): $(test_bus_policy_OBJECTS) $(test_bus_policy_DEPENDENCIES) $(EXTRA_test_bus_policy_DEPENDENCIES) 
+       @rm -f test-bus-policy$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_bus_policy_OBJECTS) $(test_bus_policy_LDADD) $(LIBS)
 src/libsystemd/sd-bus/test_bus_server-test-bus-server.$(OBJEXT):  \
        src/libsystemd/sd-bus/$(am__dirstamp) \
        src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
@@ -10730,6 +11867,19 @@ src/journal/test-compress.$(OBJEXT): src/journal/$(am__dirstamp) \
 test-compress$(EXEEXT): $(test_compress_OBJECTS) $(test_compress_DEPENDENCIES) $(EXTRA_test_compress_DEPENDENCIES) 
        @rm -f test-compress$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_compress_OBJECTS) $(test_compress_LDADD) $(LIBS)
+src/journal/test-compress-benchmark.$(OBJEXT):  \
+       src/journal/$(am__dirstamp) \
+       src/journal/$(DEPDIR)/$(am__dirstamp)
+
+test-compress-benchmark$(EXEEXT): $(test_compress_benchmark_OBJECTS) $(test_compress_benchmark_DEPENDENCIES) $(EXTRA_test_compress_benchmark_DEPENDENCIES) 
+       @rm -f test-compress-benchmark$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_compress_benchmark_OBJECTS) $(test_compress_benchmark_LDADD) $(LIBS)
+src/test/test-condition-util.$(OBJEXT): src/test/$(am__dirstamp) \
+       src/test/$(DEPDIR)/$(am__dirstamp)
+
+test-condition-util$(EXEEXT): $(test_condition_util_OBJECTS) $(test_condition_util_DEPENDENCIES) $(EXTRA_test_condition_util_DEPENDENCIES) 
+       @rm -f test-condition-util$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_condition_util_OBJECTS) $(test_condition_util_LDADD) $(LIBS)
 src/test/test-conf-files.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -10789,6 +11939,12 @@ src/libsystemd-network/test-dhcp6-client.$(OBJEXT):  \
 test-dhcp6-client$(EXEEXT): $(test_dhcp6_client_OBJECTS) $(test_dhcp6_client_DEPENDENCIES) $(EXTRA_test_dhcp6_client_DEPENDENCIES) 
        @rm -f test-dhcp6-client$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_dhcp6_client_OBJECTS) $(test_dhcp6_client_LDADD) $(LIBS)
+src/resolve/test-dns-domain.$(OBJEXT): src/resolve/$(am__dirstamp) \
+       src/resolve/$(DEPDIR)/$(am__dirstamp)
+
+test-dns-domain$(EXEEXT): $(test_dns_domain_OBJECTS) $(test_dns_domain_DEPENDENCIES) $(EXTRA_test_dns_domain_DEPENDENCIES) 
+       @rm -f test-dns-domain$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_dns_domain_OBJECTS) $(test_dns_domain_LDADD) $(LIBS)
 src/test/test-ellipsize.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -10828,6 +11984,10 @@ test-fileio$(EXEEXT): $(test_fileio_OBJECTS) $(test_fileio_DEPENDENCIES) $(EXTRA
        $(AM_V_CCLD)$(LINK) $(test_fileio_OBJECTS) $(test_fileio_LDADD) $(LIBS)
 src/test/test-hashmap.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
+src/test/test-hashmap-plain.$(OBJEXT): src/test/$(am__dirstamp) \
+       src/test/$(DEPDIR)/$(am__dirstamp)
+src/test/test-hashmap-ordered.$(OBJEXT): src/test/$(am__dirstamp) \
+       src/test/$(DEPDIR)/$(am__dirstamp)
 
 test-hashmap$(EXEEXT): $(test_hashmap_OBJECTS) $(test_hashmap_DEPENDENCIES) $(EXTRA_test_hashmap_DEPENDENCIES) 
        @rm -f test-hashmap$(EXEEXT)
@@ -11023,6 +12183,13 @@ src/network/test_network-test-network.$(OBJEXT):  \
 test-network$(EXEEXT): $(test_network_OBJECTS) $(test_network_DEPENDENCIES) $(EXTRA_test_network_DEPENDENCIES) 
        @rm -f test-network$(EXEEXT)
        $(AM_V_CCLD)$(test_network_LINK) $(test_network_OBJECTS) $(test_network_LDADD) $(LIBS)
+src/network/test-network-tables.$(OBJEXT):  \
+       src/network/$(am__dirstamp) \
+       src/network/$(DEPDIR)/$(am__dirstamp)
+
+test-network-tables$(EXEEXT): $(test_network_tables_OBJECTS) $(test_network_tables_DEPENDENCIES) $(EXTRA_test_network_tables_DEPENDENCIES) 
+       @rm -f test-network-tables$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_network_tables_OBJECTS) $(test_network_tables_LDADD) $(LIBS)
 src/test/test_ns-test-ns.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -11041,6 +12208,12 @@ src/test/test-prioq.$(OBJEXT): src/test/$(am__dirstamp) \
 test-prioq$(EXEEXT): $(test_prioq_OBJECTS) $(test_prioq_DEPENDENCIES) $(EXTRA_test_prioq_DEPENDENCIES) 
        @rm -f test-prioq$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_prioq_OBJECTS) $(test_prioq_LDADD) $(LIBS)
+src/test/test-pty.$(OBJEXT): src/test/$(am__dirstamp) \
+       src/test/$(DEPDIR)/$(am__dirstamp)
+
+test-pty$(EXEEXT): $(test_pty_OBJECTS) $(test_pty_DEPENDENCIES) $(EXTRA_test_pty_DEPENDENCIES) 
+       @rm -f test-pty$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_pty_OBJECTS) $(test_pty_LDADD) $(LIBS)
 src/test/test-ratelimit.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -11085,6 +12258,12 @@ src/test/test_sched_prio-test-sched-prio.$(OBJEXT):  \
 test-sched-prio$(EXEEXT): $(test_sched_prio_OBJECTS) $(test_sched_prio_DEPENDENCIES) $(EXTRA_test_sched_prio_DEPENDENCIES) 
        @rm -f test-sched-prio$(EXEEXT)
        $(AM_V_CCLD)$(test_sched_prio_LINK) $(test_sched_prio_OBJECTS) $(test_sched_prio_LDADD) $(LIBS)
+src/test/test-set.$(OBJEXT): src/test/$(am__dirstamp) \
+       src/test/$(DEPDIR)/$(am__dirstamp)
+
+test-set$(EXEEXT): $(test_set_OBJECTS) $(test_set_DEPENDENCIES) $(EXTRA_test_set_DEPENDENCIES) 
+       @rm -f test-set$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_set_OBJECTS) $(test_set_LDADD) $(LIBS)
 src/test/test-sleep.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -11097,12 +12276,6 @@ src/test/test-socket-util.$(OBJEXT): src/test/$(am__dirstamp) \
 test-socket-util$(EXEEXT): $(test_socket_util_OBJECTS) $(test_socket_util_DEPENDENCIES) $(EXTRA_test_socket_util_DEPENDENCIES) 
        @rm -f test-socket-util$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_socket_util_OBJECTS) $(test_socket_util_LDADD) $(LIBS)
-src/readahead/test-ssd.$(OBJEXT): src/readahead/$(am__dirstamp) \
-       src/readahead/$(DEPDIR)/$(am__dirstamp)
-
-test-ssd$(EXEEXT): $(test_ssd_OBJECTS) $(test_ssd_DEPENDENCIES) $(EXTRA_test_ssd_DEPENDENCIES) 
-       @rm -f test-ssd$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_ssd_OBJECTS) $(test_ssd_LDADD) $(LIBS)
 src/test/test-strbuf.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -11129,10 +12302,30 @@ test-strxcpyx$(EXEEXT): $(test_strxcpyx_OBJECTS) $(test_strxcpyx_DEPENDENCIES) $
        $(AM_V_CCLD)$(LINK) $(test_strxcpyx_OBJECTS) $(test_strxcpyx_LDADD) $(LIBS)
 src/test/test_tables-test-tables.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
+src/bus-proxyd/test_tables-bus-policy.$(OBJEXT):  \
+       src/bus-proxyd/$(am__dirstamp) \
+       src/bus-proxyd/$(DEPDIR)/$(am__dirstamp)
+src/journal/test_tables-journald-server.$(OBJEXT):  \
+       src/journal/$(am__dirstamp) \
+       src/journal/$(DEPDIR)/$(am__dirstamp)
 
 test-tables$(EXEEXT): $(test_tables_OBJECTS) $(test_tables_DEPENDENCIES) $(EXTRA_test_tables_DEPENDENCIES) 
        @rm -f test-tables$(EXEEXT)
        $(AM_V_CCLD)$(test_tables_LINK) $(test_tables_OBJECTS) $(test_tables_LDADD) $(LIBS)
+src/libsystemd-terminal/test-term-page.$(OBJEXT):  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+
+test-term-page$(EXEEXT): $(test_term_page_OBJECTS) $(test_term_page_DEPENDENCIES) $(EXTRA_test_term_page_DEPENDENCIES) 
+       @rm -f test-term-page$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_term_page_OBJECTS) $(test_term_page_LDADD) $(LIBS)
+src/libsystemd-terminal/test-term-parser.$(OBJEXT):  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+
+test-term-parser$(EXEEXT): $(test_term_parser_OBJECTS) $(test_term_parser_DEPENDENCIES) $(EXTRA_test_term_parser_DEPENDENCIES) 
+       @rm -f test-term-parser$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_term_parser_OBJECTS) $(test_term_parser_LDADD) $(LIBS)
 src/test/test-time.$(OBJEXT): src/test/$(am__dirstamp) \
        src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -11151,6 +12344,19 @@ src/test/test-udev.$(OBJEXT): src/test/$(am__dirstamp) \
 test-udev$(EXEEXT): $(test_udev_OBJECTS) $(test_udev_DEPENDENCIES) $(EXTRA_test_udev_DEPENDENCIES) 
        @rm -f test-udev$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_udev_OBJECTS) $(test_udev_LDADD) $(LIBS)
+src/test/test-uid-range.$(OBJEXT): src/test/$(am__dirstamp) \
+       src/test/$(DEPDIR)/$(am__dirstamp)
+
+test-uid-range$(EXEEXT): $(test_uid_range_OBJECTS) $(test_uid_range_DEPENDENCIES) $(EXTRA_test_uid_range_DEPENDENCIES) 
+       @rm -f test-uid-range$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_uid_range_OBJECTS) $(test_uid_range_LDADD) $(LIBS)
+src/libsystemd-terminal/test-unifont.$(OBJEXT):  \
+       src/libsystemd-terminal/$(am__dirstamp) \
+       src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+
+test-unifont$(EXEEXT): $(test_unifont_OBJECTS) $(test_unifont_DEPENDENCIES) $(EXTRA_test_unifont_DEPENDENCIES) 
+       @rm -f test-unifont$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_unifont_OBJECTS) $(test_unifont_LDADD) $(LIBS)
 src/test/test_unit_file-test-unit-file.$(OBJEXT):  \
        src/test/$(am__dirstamp) src/test/$(DEPDIR)/$(am__dirstamp)
 
@@ -11312,6 +12518,7 @@ mostlyclean-compile:
        -rm -f src/cgls/*.$(OBJEXT)
        -rm -f src/cgroups-agent/*.$(OBJEXT)
        -rm -f src/cgtop/*.$(OBJEXT)
+       -rm -f src/console/*.$(OBJEXT)
        -rm -f src/core/*.$(OBJEXT)
        -rm -f src/core/*.lo
        -rm -f src/cryptsetup/*.$(OBJEXT)
@@ -11320,18 +12527,24 @@ mostlyclean-compile:
        -rm -f src/delta/*.$(OBJEXT)
        -rm -f src/detect-virt/*.$(OBJEXT)
        -rm -f src/efi-boot-generator/*.$(OBJEXT)
+       -rm -f src/escape/*.$(OBJEXT)
+       -rm -f src/firstboot/*.$(OBJEXT)
        -rm -f src/fsck/*.$(OBJEXT)
        -rm -f src/fstab-generator/*.$(OBJEXT)
        -rm -f src/getty-generator/*.$(OBJEXT)
        -rm -f src/gpt-auto-generator/*.$(OBJEXT)
        -rm -f src/gudev/*.$(OBJEXT)
        -rm -f src/gudev/*.lo
+       -rm -f src/hibernate-resume/*.$(OBJEXT)
        -rm -f src/hostname/*.$(OBJEXT)
        -rm -f src/initctl/*.$(OBJEXT)
+       -rm -f src/journal-remote/*.$(OBJEXT)
        -rm -f src/journal/*.$(OBJEXT)
        -rm -f src/journal/*.lo
        -rm -f src/libsystemd-network/*.$(OBJEXT)
        -rm -f src/libsystemd-network/*.lo
+       -rm -f src/libsystemd-terminal/*.$(OBJEXT)
+       -rm -f src/libsystemd-terminal/*.lo
        -rm -f src/libsystemd/sd-bus/*.$(OBJEXT)
        -rm -f src/libsystemd/sd-bus/*.lo
        -rm -f src/libsystemd/sd-daemon/*.$(OBJEXT)
@@ -11342,6 +12555,8 @@ mostlyclean-compile:
        -rm -f src/libsystemd/sd-id128/*.lo
        -rm -f src/libsystemd/sd-login/*.$(OBJEXT)
        -rm -f src/libsystemd/sd-login/*.lo
+       -rm -f src/libsystemd/sd-network/*.$(OBJEXT)
+       -rm -f src/libsystemd/sd-network/*.lo
        -rm -f src/libsystemd/sd-path/*.$(OBJEXT)
        -rm -f src/libsystemd/sd-path/*.lo
        -rm -f src/libsystemd/sd-resolve/*.$(OBJEXT)
@@ -11365,15 +12580,19 @@ mostlyclean-compile:
        -rm -f src/nspawn/*.$(OBJEXT)
        -rm -f src/nss-myhostname/*.$(OBJEXT)
        -rm -f src/nss-myhostname/*.lo
+       -rm -f src/nss-mymachines/*.$(OBJEXT)
+       -rm -f src/nss-mymachines/*.lo
+       -rm -f src/nss-resolve/*.$(OBJEXT)
+       -rm -f src/nss-resolve/*.lo
        -rm -f src/path/*.$(OBJEXT)
        -rm -f src/python-systemd/*.$(OBJEXT)
        -rm -f src/python-systemd/*.lo
        -rm -f src/quotacheck/*.$(OBJEXT)
        -rm -f src/random-seed/*.$(OBJEXT)
        -rm -f src/rc-local-generator/*.$(OBJEXT)
-       -rm -f src/readahead/*.$(OBJEXT)
        -rm -f src/remount-fs/*.$(OBJEXT)
        -rm -f src/reply-password/*.$(OBJEXT)
+       -rm -f src/resolve-host/*.$(OBJEXT)
        -rm -f src/resolve/*.$(OBJEXT)
        -rm -f src/rfkill/*.$(OBJEXT)
        -rm -f src/run/*.$(OBJEXT)
@@ -11418,6 +12637,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_libudev_sym-test-libudev-sym.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/ac-power/$(DEPDIR)/ac-power.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/activate/$(DEPDIR)/activate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/analyze/$(DEPDIR)/analyze-verify.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/analyze/$(DEPDIR)/analyze.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/ask-password/$(DEPDIR)/ask-password.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/backlight/$(DEPDIR)/backlight.Po@am__quote@
@@ -11430,12 +12650,22 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/bootchart/$(DEPDIR)/svg.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/bus-proxyd/$(DEPDIR)/bus-policy.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/bus-proxyd/$(DEPDIR)/bus-proxyd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/bus-proxyd/$(DEPDIR)/test-bus-policy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/bus-proxyd/$(DEPDIR)/test_tables-bus-policy.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cgls/$(DEPDIR)/cgls.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cgroups-agent/$(DEPDIR)/cgroups-agent.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cgtop/$(DEPDIR)/cgtop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/console/$(DEPDIR)/systemd_consoled-consoled-display.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/console/$(DEPDIR)/systemd_consoled-consoled-manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/console/$(DEPDIR)/systemd_consoled-consoled-session.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/console/$(DEPDIR)/systemd_consoled-consoled-terminal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/console/$(DEPDIR)/systemd_consoled-consoled-workspace.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/console/$(DEPDIR)/systemd_consoled-consoled.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/killall.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-audit-fd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-automount.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-bus-common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-bus-endpoint.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-busname.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-cgroup.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-condition.Plo@am__quote@
@@ -11461,6 +12691,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-dbus.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-device.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-execute.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-failure-action.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-hostname-setup.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-ima-setup.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-job.Plo@am__quote@
@@ -11489,7 +12720,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-snapshot.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-socket.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-swap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-switch-root.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-target.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-timer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/libsystemd_core_la-transaction.Plo@am__quote@
@@ -11509,6 +12739,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/delta/$(DEPDIR)/delta.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/detect-virt/$(DEPDIR)/detect-virt.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/efi-boot-generator/$(DEPDIR)/efi-boot-generator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/escape/$(DEPDIR)/escape.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/firstboot/$(DEPDIR)/firstboot.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/fsck/$(DEPDIR)/fsck.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/fstab-generator/$(DEPDIR)/fstab-generator.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/getty-generator/$(DEPDIR)/getty-generator.Po@am__quote@
@@ -11518,9 +12750,19 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/gudev/$(DEPDIR)/libgudev_1_0_la-gudevenumerator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/gudev/$(DEPDIR)/libgudev_1_0_la-gudevenumtypes.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/gudev/$(DEPDIR)/libgudev_1_0_la-gudevmarshal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/hibernate-resume/$(DEPDIR)/hibernate-resume-generator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/hibernate-resume/$(DEPDIR)/hibernate-resume.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/hostname/$(DEPDIR)/hostnamectl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/hostname/$(DEPDIR)/hostnamed.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/initctl/$(DEPDIR)/initctl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload-journal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/cat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/coredump-vacuum.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/coredump.Po@am__quote@
@@ -11560,12 +12802,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/libsystemd_la-mmap-cache.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/libsystemd_la-sd-journal.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/stacktrace.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test-compress-benchmark.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test-compress.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test-coredump-vacuum.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test-journal-enum.Po@am__quote@
@@ -11580,6 +12817,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test-journal.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test-mmap-cache.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test_catalog-test-catalog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/journal/$(DEPDIR)/test_tables-journald-server.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-network/$(DEPDIR)/libsystemd_network_la-dhcp-network.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-network/$(DEPDIR)/libsystemd_network_la-dhcp-option.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-network/$(DEPDIR)/libsystemd_network_la-dhcp-packet.Plo@am__quote@
@@ -11601,6 +12839,24 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-network/$(DEPDIR)/test-dhcp6-client.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-network/$(DEPDIR)/test-icmp6-rs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-network/$(DEPDIR)/test-ipv4ll.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev-drm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-evdev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-keyboard.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-sysview.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-charset.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-page.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-parser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-screen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-wcwidth.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-unifont.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/subterm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/systemd_evcat-evcat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/systemd_modeset-modeset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/test-term-page.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/test-term-parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd-terminal/$(DEPDIR)/test-unifont.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/busctl-busctl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_dump_la-bus-dump.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-bus-bloom.Plo@am__quote@
@@ -11624,7 +12880,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-bus-type.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-bus-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-sd-bus.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-sd-memfd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-bus-bloom.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-bus-container.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-bus-control.Plo@am__quote@
@@ -11646,14 +12901,12 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-bus-type.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-bus-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-bus.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-memfd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-creds.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-error.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-introspect.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-kernel-benchmark.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-kernel-bloom.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-match.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-memfd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test-bus-signature.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test_bus_chat-test-bus-chat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-bus/$(DEPDIR)/test_bus_cleanup-test-bus-cleanup.Po@am__quote@
@@ -11674,15 +12927,21 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-login/$(DEPDIR)/libsystemd_la-sd-login.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-login/$(DEPDIR)/libudev_core_la-sd-login.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-login/$(DEPDIR)/test-login.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-network-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-sd-network.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-network-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-sd-network.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-path/$(DEPDIR)/libsystemd_internal_la-sd-path.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-path/$(DEPDIR)/libsystemd_la-sd-path.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-resolve/$(DEPDIR)/libsystemd_la-sd-resolve.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-resolve/$(DEPDIR)/libsystemd_resolve_la-sd-resolve.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-resolve/$(DEPDIR)/test_resolve-test-resolve.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-local-addresses.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-rtnl-message.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-rtnl-types.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-rtnl-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-sd-rtnl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_la-local-addresses.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_la-rtnl-message.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_la-rtnl-types.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_la-rtnl-util.Plo@am__quote@
@@ -11728,7 +12987,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/login/$(DEPDIR)/logind-user-dbus.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/login/$(DEPDIR)/logind-user.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/login/$(DEPDIR)/logind.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/login/$(DEPDIR)/multi-seat-x.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/login/$(DEPDIR)/pam_systemd_la-pam_systemd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/login/$(DEPDIR)/sysfs-show.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/login/$(DEPDIR)/test-inhibit.Po@am__quote@
@@ -11743,30 +13001,38 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/machine/$(DEPDIR)/machined.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/machine/$(DEPDIR)/test-machine-tables.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/modules-load/$(DEPDIR)/systemd_modules_load-modules-load.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_network_la-sd-network.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-address-pool.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-address.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dummy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dhcp4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-ipv4ll.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-link.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-macvlan.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-manager.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bond.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bridge.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-dummy.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-gperf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-macvlan.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tunnel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tuntap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-veth.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vlan.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vxlan.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-network-gperf.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-network.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-route.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tunnel.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tuntap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-veth.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vlan.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vxlan.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/networkctl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/networkd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-link.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-manager.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/test-network-tables.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/network/$(DEPDIR)/test_network-test-network.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/notify/$(DEPDIR)/notify.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/nspawn/$(DEPDIR)/systemd_nspawn-nspawn.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/nss-myhostname/$(DEPDIR)/netlink.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/nss-myhostname/$(DEPDIR)/nss-myhostname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/nss-mymachines/$(DEPDIR)/nss-mymachines.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/nss-resolve/$(DEPDIR)/nss-resolve.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/path/$(DEPDIR)/path.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/python-systemd/$(DEPDIR)/_daemon_la-_daemon.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/python-systemd/$(DEPDIR)/_daemon_la-pyutil.Plo@am__quote@
@@ -11780,18 +13046,29 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/quotacheck/$(DEPDIR)/quotacheck.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/random-seed/$(DEPDIR)/random-seed.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/rc-local-generator/$(DEPDIR)/rc-local-generator.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/readahead/$(DEPDIR)/readahead-analyze.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/readahead/$(DEPDIR)/readahead-collect.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/readahead/$(DEPDIR)/readahead-common.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/readahead/$(DEPDIR)/readahead-replay.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/readahead/$(DEPDIR)/readahead.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/readahead/$(DEPDIR)/sd-readahead.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/readahead/$(DEPDIR)/test-ssd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/remount-fs/$(DEPDIR)/remount-fs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/reply-password/$(DEPDIR)/reply-password.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/systemd_resolved-resolved-gperf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/systemd_resolved-resolved-manager.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/systemd_resolved-resolved.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve-host/$(DEPDIR)/resolve-host.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/dns-type.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-bus.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-conf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-answer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-cache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-domain.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-packet.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-query.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-question.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-rr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-scope.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-server.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-transaction.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-dns-zone.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-gperf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-link.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved-manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/resolved.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/resolve/$(DEPDIR)/test-dns-domain.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/rfkill/$(DEPDIR)/rfkill.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/run/$(DEPDIR)/run.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/install-printf.Plo@am__quote@
@@ -11807,14 +13084,17 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_label_la-mkdir-label.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_label_la-selinux-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_label_la-socket-label.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_label_la-switch-root.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_seccomp_la-seccomp-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-MurmurHash2.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-acpi-fpdt.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-af-list.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-apparmor-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-architecture.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-arphrd-list.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-async.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-audit.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-barrier.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-base-filesystem.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-boot-timestamps.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-bus-label.Plo@am__quote@
@@ -11831,19 +13111,23 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-efivars.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-env-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-errno-list.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-eventfd-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-exit-status.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-fdset.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-fileio.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-gunicode.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-hashmap.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-ima-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-in-addr-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-locale-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-log.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-login-shared.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-memfd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-mempool.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-mkdir.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-pager.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-path-util.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-prioq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-pty.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-ptyfwd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-ratelimit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-replace-var.Plo@am__quote@
@@ -11860,6 +13144,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-strxcpyx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-time-dst.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-time-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-uid-range.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-unit-name.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-utf8.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/libsystemd_shared_la-util.Plo@am__quote@
@@ -11880,11 +13165,13 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/sysv-generator/$(DEPDIR)/sysv-generator.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-architecture.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-async.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-barrier.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-boot-timestamps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-calendarspec.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-capability.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-cgroup-util.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-cgroup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-condition-util.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-conf-files.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-daemon.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-date.Po@am__quote@
@@ -11893,6 +13180,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-env-replace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-fdset.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-fileio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-hashmap-ordered.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-hashmap-plain.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-hashmap.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-hostname.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-id128.Po@am__quote@
@@ -11905,9 +13194,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-namespace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-path-util.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-prioq.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-pty.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-ratelimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-replace-var.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-ring.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-set.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-sleep.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-socket-util.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-strbuf.Po@am__quote@
@@ -11917,6 +13208,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-time.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-tmpfiles.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-udev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-uid-range.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-utf8.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-util.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test-watchdog.Po@am__quote@
@@ -11932,13 +13224,15 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/test/$(DEPDIR)/test_unit_name-test-unit-name.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/timedate/$(DEPDIR)/timedatectl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/timedate/$(DEPDIR)/timedated.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/timesync/$(DEPDIR)/timesyncd-conf.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/timesync/$(DEPDIR)/timesyncd-gperf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/timesync/$(DEPDIR)/timesyncd-manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/timesync/$(DEPDIR)/timesyncd-server.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/timesync/$(DEPDIR)/timesyncd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/tmpfiles/$(DEPDIR)/tmpfiles.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/tty-ask-password-agent/$(DEPDIR)/tty-ask-password-agent.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-blkid.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-btrfs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-firmware.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-hwdb.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-input_id.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-keyboard.Plo@am__quote@
@@ -12165,6 +13459,20 @@ src/core/libsystemd_core_la-busname.lo: src/core/busname.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -c -o src/core/libsystemd_core_la-busname.lo `test -f 'src/core/busname.c' || echo '$(srcdir)/'`src/core/busname.c
 
+src/core/libsystemd_core_la-bus-common.lo: src/core/bus-common.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -MT src/core/libsystemd_core_la-bus-common.lo -MD -MP -MF src/core/$(DEPDIR)/libsystemd_core_la-bus-common.Tpo -c -o src/core/libsystemd_core_la-bus-common.lo `test -f 'src/core/bus-common.c' || echo '$(srcdir)/'`src/core/bus-common.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libsystemd_core_la-bus-common.Tpo src/core/$(DEPDIR)/libsystemd_core_la-bus-common.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/core/bus-common.c' object='src/core/libsystemd_core_la-bus-common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -c -o src/core/libsystemd_core_la-bus-common.lo `test -f 'src/core/bus-common.c' || echo '$(srcdir)/'`src/core/bus-common.c
+
+src/core/libsystemd_core_la-bus-endpoint.lo: src/core/bus-endpoint.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -MT src/core/libsystemd_core_la-bus-endpoint.lo -MD -MP -MF src/core/$(DEPDIR)/libsystemd_core_la-bus-endpoint.Tpo -c -o src/core/libsystemd_core_la-bus-endpoint.lo `test -f 'src/core/bus-endpoint.c' || echo '$(srcdir)/'`src/core/bus-endpoint.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libsystemd_core_la-bus-endpoint.Tpo src/core/$(DEPDIR)/libsystemd_core_la-bus-endpoint.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/core/bus-endpoint.c' object='src/core/libsystemd_core_la-bus-endpoint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -c -o src/core/libsystemd_core_la-bus-endpoint.lo `test -f 'src/core/bus-endpoint.c' || echo '$(srcdir)/'`src/core/bus-endpoint.c
+
 src/core/libsystemd_core_la-target.lo: src/core/target.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -MT src/core/libsystemd_core_la-target.lo -MD -MP -MF src/core/$(DEPDIR)/libsystemd_core_la-target.Tpo -c -o src/core/libsystemd_core_la-target.lo `test -f 'src/core/target.c' || echo '$(srcdir)/'`src/core/target.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libsystemd_core_la-target.Tpo src/core/$(DEPDIR)/libsystemd_core_la-target.Plo
@@ -12480,13 +13788,6 @@ src/core/libsystemd_core_la-namespace.lo: src/core/namespace.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -c -o src/core/libsystemd_core_la-namespace.lo `test -f 'src/core/namespace.c' || echo '$(srcdir)/'`src/core/namespace.c
 
-src/core/libsystemd_core_la-switch-root.lo: src/core/switch-root.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -MT src/core/libsystemd_core_la-switch-root.lo -MD -MP -MF src/core/$(DEPDIR)/libsystemd_core_la-switch-root.Tpo -c -o src/core/libsystemd_core_la-switch-root.lo `test -f 'src/core/switch-root.c' || echo '$(srcdir)/'`src/core/switch-root.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libsystemd_core_la-switch-root.Tpo src/core/$(DEPDIR)/libsystemd_core_la-switch-root.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/core/switch-root.c' object='src/core/libsystemd_core_la-switch-root.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -c -o src/core/libsystemd_core_la-switch-root.lo `test -f 'src/core/switch-root.c' || echo '$(srcdir)/'`src/core/switch-root.c
-
 src/core/libsystemd_core_la-killall.lo: src/core/killall.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -MT src/core/libsystemd_core_la-killall.lo -MD -MP -MF src/core/$(DEPDIR)/libsystemd_core_la-killall.Tpo -c -o src/core/libsystemd_core_la-killall.lo `test -f 'src/core/killall.c' || echo '$(srcdir)/'`src/core/killall.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libsystemd_core_la-killall.Tpo src/core/$(DEPDIR)/libsystemd_core_la-killall.Plo
@@ -12508,6 +13809,13 @@ src/core/libsystemd_core_la-show-status.lo: src/core/show-status.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -c -o src/core/libsystemd_core_la-show-status.lo `test -f 'src/core/show-status.c' || echo '$(srcdir)/'`src/core/show-status.c
 
+src/core/libsystemd_core_la-failure-action.lo: src/core/failure-action.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -MT src/core/libsystemd_core_la-failure-action.lo -MD -MP -MF src/core/$(DEPDIR)/libsystemd_core_la-failure-action.Tpo -c -o src/core/libsystemd_core_la-failure-action.lo `test -f 'src/core/failure-action.c' || echo '$(srcdir)/'`src/core/failure-action.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libsystemd_core_la-failure-action.Tpo src/core/$(DEPDIR)/libsystemd_core_la-failure-action.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/core/failure-action.c' object='src/core/libsystemd_core_la-failure-action.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -c -o src/core/libsystemd_core_la-failure-action.lo `test -f 'src/core/failure-action.c' || echo '$(srcdir)/'`src/core/failure-action.c
+
 src/core/libsystemd_core_la-kmod-setup.lo: src/core/kmod-setup.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_core_la_CFLAGS) $(CFLAGS) -MT src/core/libsystemd_core_la-kmod-setup.lo -MD -MP -MF src/core/$(DEPDIR)/libsystemd_core_la-kmod-setup.Tpo -c -o src/core/libsystemd_core_la-kmod-setup.lo `test -f 'src/core/kmod-setup.c' || echo '$(srcdir)/'`src/core/kmod-setup.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/core/$(DEPDIR)/libsystemd_core_la-kmod-setup.Tpo src/core/$(DEPDIR)/libsystemd_core_la-kmod-setup.Plo
@@ -12690,13 +13998,6 @@ src/libsystemd/sd-bus/libsystemd_internal_la-bus-slot.lo: src/libsystemd/sd-bus/
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-bus/libsystemd_internal_la-bus-slot.lo `test -f 'src/libsystemd/sd-bus/bus-slot.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/bus-slot.c
 
-src/libsystemd/sd-bus/libsystemd_internal_la-sd-memfd.lo: src/libsystemd/sd-bus/sd-memfd.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-bus/libsystemd_internal_la-sd-memfd.lo -MD -MP -MF src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-sd-memfd.Tpo -c -o src/libsystemd/sd-bus/libsystemd_internal_la-sd-memfd.lo `test -f 'src/libsystemd/sd-bus/sd-memfd.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/sd-memfd.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-sd-memfd.Tpo src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-sd-memfd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-bus/sd-memfd.c' object='src/libsystemd/sd-bus/libsystemd_internal_la-sd-memfd.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-bus/libsystemd_internal_la-sd-memfd.lo `test -f 'src/libsystemd/sd-bus/sd-memfd.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/sd-memfd.c
-
 src/libsystemd/sd-utf8/libsystemd_internal_la-sd-utf8.lo: src/libsystemd/sd-utf8/sd-utf8.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-utf8/libsystemd_internal_la-sd-utf8.lo -MD -MP -MF src/libsystemd/sd-utf8/$(DEPDIR)/libsystemd_internal_la-sd-utf8.Tpo -c -o src/libsystemd/sd-utf8/libsystemd_internal_la-sd-utf8.lo `test -f 'src/libsystemd/sd-utf8/sd-utf8.c' || echo '$(srcdir)/'`src/libsystemd/sd-utf8/sd-utf8.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-utf8/$(DEPDIR)/libsystemd_internal_la-sd-utf8.Tpo src/libsystemd/sd-utf8/$(DEPDIR)/libsystemd_internal_la-sd-utf8.Plo
@@ -12739,6 +14040,13 @@ src/libsystemd/sd-rtnl/libsystemd_internal_la-rtnl-util.lo: src/libsystemd/sd-rt
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-rtnl/libsystemd_internal_la-rtnl-util.lo `test -f 'src/libsystemd/sd-rtnl/rtnl-util.c' || echo '$(srcdir)/'`src/libsystemd/sd-rtnl/rtnl-util.c
 
+src/libsystemd/sd-rtnl/libsystemd_internal_la-local-addresses.lo: src/libsystemd/sd-rtnl/local-addresses.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-rtnl/libsystemd_internal_la-local-addresses.lo -MD -MP -MF src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-local-addresses.Tpo -c -o src/libsystemd/sd-rtnl/libsystemd_internal_la-local-addresses.lo `test -f 'src/libsystemd/sd-rtnl/local-addresses.c' || echo '$(srcdir)/'`src/libsystemd/sd-rtnl/local-addresses.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-local-addresses.Tpo src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_internal_la-local-addresses.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-rtnl/local-addresses.c' object='src/libsystemd/sd-rtnl/libsystemd_internal_la-local-addresses.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-rtnl/libsystemd_internal_la-local-addresses.lo `test -f 'src/libsystemd/sd-rtnl/local-addresses.c' || echo '$(srcdir)/'`src/libsystemd/sd-rtnl/local-addresses.c
+
 src/libsystemd/sd-id128/libsystemd_internal_la-sd-id128.lo: src/libsystemd/sd-id128/sd-id128.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-id128/libsystemd_internal_la-sd-id128.lo -MD -MP -MF src/libsystemd/sd-id128/$(DEPDIR)/libsystemd_internal_la-sd-id128.Tpo -c -o src/libsystemd/sd-id128/libsystemd_internal_la-sd-id128.lo `test -f 'src/libsystemd/sd-id128/sd-id128.c' || echo '$(srcdir)/'`src/libsystemd/sd-id128/sd-id128.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-id128/$(DEPDIR)/libsystemd_internal_la-sd-id128.Tpo src/libsystemd/sd-id128/$(DEPDIR)/libsystemd_internal_la-sd-id128.Plo
@@ -12767,6 +14075,20 @@ src/libsystemd/sd-path/libsystemd_internal_la-sd-path.lo: src/libsystemd/sd-path
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-path/libsystemd_internal_la-sd-path.lo `test -f 'src/libsystemd/sd-path/sd-path.c' || echo '$(srcdir)/'`src/libsystemd/sd-path/sd-path.c
 
+src/libsystemd/sd-network/libsystemd_internal_la-sd-network.lo: src/libsystemd/sd-network/sd-network.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-network/libsystemd_internal_la-sd-network.lo -MD -MP -MF src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-sd-network.Tpo -c -o src/libsystemd/sd-network/libsystemd_internal_la-sd-network.lo `test -f 'src/libsystemd/sd-network/sd-network.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/sd-network.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-sd-network.Tpo src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-sd-network.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-network/sd-network.c' object='src/libsystemd/sd-network/libsystemd_internal_la-sd-network.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-network/libsystemd_internal_la-sd-network.lo `test -f 'src/libsystemd/sd-network/sd-network.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/sd-network.c
+
+src/libsystemd/sd-network/libsystemd_internal_la-network-util.lo: src/libsystemd/sd-network/network-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-network/libsystemd_internal_la-network-util.lo -MD -MP -MF src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-network-util.Tpo -c -o src/libsystemd/sd-network/libsystemd_internal_la-network-util.lo `test -f 'src/libsystemd/sd-network/network-util.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/network-util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-network-util.Tpo src/libsystemd/sd-network/$(DEPDIR)/libsystemd_internal_la-network-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-network/network-util.c' object='src/libsystemd/sd-network/libsystemd_internal_la-network-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-network/libsystemd_internal_la-network-util.lo `test -f 'src/libsystemd/sd-network/network-util.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/network-util.c
+
 src/libsystemd/sd-bus/libsystemd_internal_la-bus-error-mapping.lo: src/libsystemd/sd-bus/bus-error-mapping.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_internal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-bus/libsystemd_internal_la-bus-error-mapping.lo -MD -MP -MF src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-bus-error-mapping.Tpo -c -o src/libsystemd/sd-bus/libsystemd_internal_la-bus-error-mapping.lo `test -f 'src/libsystemd/sd-bus/bus-error-mapping.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/bus-error-mapping.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-bus-error-mapping.Tpo src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_internal_la-bus-error-mapping.Plo
@@ -12893,6 +14215,13 @@ src/shared/libsystemd_label_la-ask-password-api.lo: src/shared/ask-password-api.
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_label_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_label_la-ask-password-api.lo `test -f 'src/shared/ask-password-api.c' || echo '$(srcdir)/'`src/shared/ask-password-api.c
 
+src/shared/libsystemd_label_la-switch-root.lo: src/shared/switch-root.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_label_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_label_la-switch-root.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_label_la-switch-root.Tpo -c -o src/shared/libsystemd_label_la-switch-root.lo `test -f 'src/shared/switch-root.c' || echo '$(srcdir)/'`src/shared/switch-root.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_label_la-switch-root.Tpo src/shared/$(DEPDIR)/libsystemd_label_la-switch-root.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/switch-root.c' object='src/shared/libsystemd_label_la-switch-root.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_label_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_label_la-switch-root.lo `test -f 'src/shared/switch-root.c' || echo '$(srcdir)/'`src/shared/switch-root.c
+
 src/shared/libsystemd_label_la-fileio-label.lo: src/shared/fileio-label.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_label_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_label_la-fileio-label.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_label_la-fileio-label.Tpo -c -o src/shared/libsystemd_label_la-fileio-label.lo `test -f 'src/shared/fileio-label.c' || echo '$(srcdir)/'`src/shared/fileio-label.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_label_la-fileio-label.Tpo src/shared/$(DEPDIR)/libsystemd_label_la-fileio-label.Plo
@@ -12928,13 +14257,6 @@ libsystemd_login_la-libsystemd-login.lo: libsystemd-login.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsystemd_login_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsystemd_login_la-libsystemd-login.lo `test -f 'libsystemd-login.c' || echo '$(srcdir)/'`libsystemd-login.c
 
-src/network/libsystemd_network_la-sd-network.lo: src/network/sd-network.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_network_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_network_la-sd-network.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_network_la-sd-network.Tpo -c -o src/network/libsystemd_network_la-sd-network.lo `test -f 'src/network/sd-network.c' || echo '$(srcdir)/'`src/network/sd-network.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_network_la-sd-network.Tpo src/network/$(DEPDIR)/libsystemd_network_la-sd-network.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/sd-network.c' object='src/network/libsystemd_network_la-sd-network.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_network_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_network_la-sd-network.lo `test -f 'src/network/sd-network.c' || echo '$(srcdir)/'`src/network/sd-network.c
-
 src/libsystemd-network/libsystemd_network_la-sd-dhcp-client.lo: src/libsystemd-network/sd-dhcp-client.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_network_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-network/libsystemd_network_la-sd-dhcp-client.lo -MD -MP -MF src/libsystemd-network/$(DEPDIR)/libsystemd_network_la-sd-dhcp-client.Tpo -c -o src/libsystemd-network/libsystemd_network_la-sd-dhcp-client.lo `test -f 'src/libsystemd-network/sd-dhcp-client.c' || echo '$(srcdir)/'`src/libsystemd-network/sd-dhcp-client.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-network/$(DEPDIR)/libsystemd_network_la-sd-dhcp-client.Tpo src/libsystemd-network/$(DEPDIR)/libsystemd_network_la-sd-dhcp-client.Plo
@@ -13040,13 +14362,6 @@ src/libsystemd-network/libsystemd_network_la-sd-dhcp6-lease.lo: src/libsystemd-n
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_network_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-network/libsystemd_network_la-sd-dhcp6-lease.lo `test -f 'src/libsystemd-network/sd-dhcp6-lease.c' || echo '$(srcdir)/'`src/libsystemd-network/sd-dhcp6-lease.c
 
-src/network/libsystemd_networkd_core_la-networkd-link.lo: src/network/networkd-link.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-link.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-link.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-link.lo `test -f 'src/network/networkd-link.c' || echo '$(srcdir)/'`src/network/networkd-link.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-link.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-link.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-link.c' object='src/network/libsystemd_networkd_core_la-networkd-link.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-link.lo `test -f 'src/network/networkd-link.c' || echo '$(srcdir)/'`src/network/networkd-link.c
-
 src/network/libsystemd_networkd_core_la-networkd-netdev.lo: src/network/networkd-netdev.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev.lo `test -f 'src/network/networkd-netdev.c' || echo '$(srcdir)/'`src/network/networkd-netdev.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev.Plo
@@ -13054,54 +14369,89 @@ src/network/libsystemd_networkd_core_la-networkd-netdev.lo: src/network/networkd
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev.lo `test -f 'src/network/networkd-netdev.c' || echo '$(srcdir)/'`src/network/networkd-netdev.c
 
-src/network/libsystemd_networkd_core_la-networkd-tunnel.lo: src/network/networkd-tunnel.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-tunnel.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tunnel.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-tunnel.lo `test -f 'src/network/networkd-tunnel.c' || echo '$(srcdir)/'`src/network/networkd-tunnel.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tunnel.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tunnel.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-tunnel.c' object='src/network/libsystemd_networkd_core_la-networkd-tunnel.lo' libtool=yes @AMDEPBACKSLASH@
+src/network/libsystemd_networkd_core_la-networkd-netdev-tunnel.lo: src/network/networkd-netdev-tunnel.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-tunnel.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tunnel.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-tunnel.lo `test -f 'src/network/networkd-netdev-tunnel.c' || echo '$(srcdir)/'`src/network/networkd-netdev-tunnel.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tunnel.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tunnel.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-tunnel.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-tunnel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-tunnel.lo `test -f 'src/network/networkd-netdev-tunnel.c' || echo '$(srcdir)/'`src/network/networkd-netdev-tunnel.c
+
+src/network/libsystemd_networkd_core_la-networkd-netdev-veth.lo: src/network/networkd-netdev-veth.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-veth.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-veth.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-veth.lo `test -f 'src/network/networkd-netdev-veth.c' || echo '$(srcdir)/'`src/network/networkd-netdev-veth.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-veth.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-veth.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-veth.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-veth.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-veth.lo `test -f 'src/network/networkd-netdev-veth.c' || echo '$(srcdir)/'`src/network/networkd-netdev-veth.c
+
+src/network/libsystemd_networkd_core_la-networkd-netdev-vxlan.lo: src/network/networkd-netdev-vxlan.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-vxlan.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vxlan.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-vxlan.lo `test -f 'src/network/networkd-netdev-vxlan.c' || echo '$(srcdir)/'`src/network/networkd-netdev-vxlan.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vxlan.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vxlan.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-vxlan.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-vxlan.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-tunnel.lo `test -f 'src/network/networkd-tunnel.c' || echo '$(srcdir)/'`src/network/networkd-tunnel.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-vxlan.lo `test -f 'src/network/networkd-netdev-vxlan.c' || echo '$(srcdir)/'`src/network/networkd-netdev-vxlan.c
 
-src/network/libsystemd_networkd_core_la-networkd-veth.lo: src/network/networkd-veth.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-veth.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-veth.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-veth.lo `test -f 'src/network/networkd-veth.c' || echo '$(srcdir)/'`src/network/networkd-veth.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-veth.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-veth.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-veth.c' object='src/network/libsystemd_networkd_core_la-networkd-veth.lo' libtool=yes @AMDEPBACKSLASH@
+src/network/libsystemd_networkd_core_la-networkd-netdev-vlan.lo: src/network/networkd-netdev-vlan.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-vlan.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vlan.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-vlan.lo `test -f 'src/network/networkd-netdev-vlan.c' || echo '$(srcdir)/'`src/network/networkd-netdev-vlan.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vlan.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-vlan.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-vlan.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-vlan.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-veth.lo `test -f 'src/network/networkd-veth.c' || echo '$(srcdir)/'`src/network/networkd-veth.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-vlan.lo `test -f 'src/network/networkd-netdev-vlan.c' || echo '$(srcdir)/'`src/network/networkd-netdev-vlan.c
 
-src/network/libsystemd_networkd_core_la-networkd-vxlan.lo: src/network/networkd-vxlan.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-vxlan.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vxlan.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-vxlan.lo `test -f 'src/network/networkd-vxlan.c' || echo '$(srcdir)/'`src/network/networkd-vxlan.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vxlan.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vxlan.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-vxlan.c' object='src/network/libsystemd_networkd_core_la-networkd-vxlan.lo' libtool=yes @AMDEPBACKSLASH@
+src/network/libsystemd_networkd_core_la-networkd-netdev-macvlan.lo: src/network/networkd-netdev-macvlan.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-macvlan.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-macvlan.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-macvlan.lo `test -f 'src/network/networkd-netdev-macvlan.c' || echo '$(srcdir)/'`src/network/networkd-netdev-macvlan.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-macvlan.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-macvlan.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-macvlan.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-macvlan.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-vxlan.lo `test -f 'src/network/networkd-vxlan.c' || echo '$(srcdir)/'`src/network/networkd-vxlan.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-macvlan.lo `test -f 'src/network/networkd-netdev-macvlan.c' || echo '$(srcdir)/'`src/network/networkd-netdev-macvlan.c
 
-src/network/libsystemd_networkd_core_la-networkd-vlan.lo: src/network/networkd-vlan.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-vlan.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vlan.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-vlan.lo `test -f 'src/network/networkd-vlan.c' || echo '$(srcdir)/'`src/network/networkd-vlan.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vlan.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-vlan.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-vlan.c' object='src/network/libsystemd_networkd_core_la-networkd-vlan.lo' libtool=yes @AMDEPBACKSLASH@
+src/network/libsystemd_networkd_core_la-networkd-netdev-dummy.lo: src/network/networkd-netdev-dummy.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-dummy.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-dummy.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-dummy.lo `test -f 'src/network/networkd-netdev-dummy.c' || echo '$(srcdir)/'`src/network/networkd-netdev-dummy.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-dummy.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-dummy.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-dummy.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-dummy.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-vlan.lo `test -f 'src/network/networkd-vlan.c' || echo '$(srcdir)/'`src/network/networkd-vlan.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-dummy.lo `test -f 'src/network/networkd-netdev-dummy.c' || echo '$(srcdir)/'`src/network/networkd-netdev-dummy.c
 
-src/network/libsystemd_networkd_core_la-networkd-macvlan.lo: src/network/networkd-macvlan.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-macvlan.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-macvlan.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-macvlan.lo `test -f 'src/network/networkd-macvlan.c' || echo '$(srcdir)/'`src/network/networkd-macvlan.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-macvlan.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-macvlan.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-macvlan.c' object='src/network/libsystemd_networkd_core_la-networkd-macvlan.lo' libtool=yes @AMDEPBACKSLASH@
+src/network/libsystemd_networkd_core_la-networkd-netdev-tuntap.lo: src/network/networkd-netdev-tuntap.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-tuntap.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tuntap.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-tuntap.lo `test -f 'src/network/networkd-netdev-tuntap.c' || echo '$(srcdir)/'`src/network/networkd-netdev-tuntap.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tuntap.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-tuntap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-tuntap.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-tuntap.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-macvlan.lo `test -f 'src/network/networkd-macvlan.c' || echo '$(srcdir)/'`src/network/networkd-macvlan.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-tuntap.lo `test -f 'src/network/networkd-netdev-tuntap.c' || echo '$(srcdir)/'`src/network/networkd-netdev-tuntap.c
 
-src/network/libsystemd_networkd_core_la-networkd-dummy.lo: src/network/networkd-dummy.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-dummy.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dummy.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-dummy.lo `test -f 'src/network/networkd-dummy.c' || echo '$(srcdir)/'`src/network/networkd-dummy.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dummy.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dummy.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-dummy.c' object='src/network/libsystemd_networkd_core_la-networkd-dummy.lo' libtool=yes @AMDEPBACKSLASH@
+src/network/libsystemd_networkd_core_la-networkd-netdev-bond.lo: src/network/networkd-netdev-bond.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-bond.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bond.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-bond.lo `test -f 'src/network/networkd-netdev-bond.c' || echo '$(srcdir)/'`src/network/networkd-netdev-bond.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bond.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bond.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-bond.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-bond.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-dummy.lo `test -f 'src/network/networkd-dummy.c' || echo '$(srcdir)/'`src/network/networkd-dummy.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-bond.lo `test -f 'src/network/networkd-netdev-bond.c' || echo '$(srcdir)/'`src/network/networkd-netdev-bond.c
 
-src/network/libsystemd_networkd_core_la-networkd-tuntap.lo: src/network/networkd-tuntap.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-tuntap.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tuntap.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-tuntap.lo `test -f 'src/network/networkd-tuntap.c' || echo '$(srcdir)/'`src/network/networkd-tuntap.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tuntap.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-tuntap.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-tuntap.c' object='src/network/libsystemd_networkd_core_la-networkd-tuntap.lo' libtool=yes @AMDEPBACKSLASH@
+src/network/libsystemd_networkd_core_la-networkd-netdev-bridge.lo: src/network/networkd-netdev-bridge.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-netdev-bridge.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bridge.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-bridge.lo `test -f 'src/network/networkd-netdev-bridge.c' || echo '$(srcdir)/'`src/network/networkd-netdev-bridge.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bridge.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-netdev-bridge.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-netdev-bridge.c' object='src/network/libsystemd_networkd_core_la-networkd-netdev-bridge.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-tuntap.lo `test -f 'src/network/networkd-tuntap.c' || echo '$(srcdir)/'`src/network/networkd-tuntap.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-netdev-bridge.lo `test -f 'src/network/networkd-netdev-bridge.c' || echo '$(srcdir)/'`src/network/networkd-netdev-bridge.c
+
+src/network/libsystemd_networkd_core_la-networkd-link.lo: src/network/networkd-link.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-link.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-link.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-link.lo `test -f 'src/network/networkd-link.c' || echo '$(srcdir)/'`src/network/networkd-link.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-link.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-link.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-link.c' object='src/network/libsystemd_networkd_core_la-networkd-link.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-link.lo `test -f 'src/network/networkd-link.c' || echo '$(srcdir)/'`src/network/networkd-link.c
+
+src/network/libsystemd_networkd_core_la-networkd-ipv4ll.lo: src/network/networkd-ipv4ll.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-ipv4ll.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-ipv4ll.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-ipv4ll.lo `test -f 'src/network/networkd-ipv4ll.c' || echo '$(srcdir)/'`src/network/networkd-ipv4ll.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-ipv4ll.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-ipv4ll.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-ipv4ll.c' object='src/network/libsystemd_networkd_core_la-networkd-ipv4ll.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-ipv4ll.lo `test -f 'src/network/networkd-ipv4ll.c' || echo '$(srcdir)/'`src/network/networkd-ipv4ll.c
+
+src/network/libsystemd_networkd_core_la-networkd-dhcp4.lo: src/network/networkd-dhcp4.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-dhcp4.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dhcp4.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-dhcp4.lo `test -f 'src/network/networkd-dhcp4.c' || echo '$(srcdir)/'`src/network/networkd-dhcp4.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dhcp4.Tpo src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-dhcp4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-dhcp4.c' object='src/network/libsystemd_networkd_core_la-networkd-dhcp4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -c -o src/network/libsystemd_networkd_core_la-networkd-dhcp4.lo `test -f 'src/network/networkd-dhcp4.c' || echo '$(srcdir)/'`src/network/networkd-dhcp4.c
 
 src/network/libsystemd_networkd_core_la-networkd-network.lo: src/network/networkd-network.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_networkd_core_la_CFLAGS) $(CFLAGS) -MT src/network/libsystemd_networkd_core_la-networkd-network.lo -MD -MP -MF src/network/$(DEPDIR)/libsystemd_networkd_core_la-networkd-network.Tpo -c -o src/network/libsystemd_networkd_core_la-networkd-network.lo `test -f 'src/network/networkd-network.c' || echo '$(srcdir)/'`src/network/networkd-network.c
@@ -13215,6 +14565,20 @@ src/shared/libsystemd_shared_la-time-util.lo: src/shared/time-util.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-time-util.lo `test -f 'src/shared/time-util.c' || echo '$(srcdir)/'`src/shared/time-util.c
 
+src/shared/libsystemd_shared_la-locale-util.lo: src/shared/locale-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-locale-util.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-locale-util.Tpo -c -o src/shared/libsystemd_shared_la-locale-util.lo `test -f 'src/shared/locale-util.c' || echo '$(srcdir)/'`src/shared/locale-util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-locale-util.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-locale-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/locale-util.c' object='src/shared/libsystemd_shared_la-locale-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-locale-util.lo `test -f 'src/shared/locale-util.c' || echo '$(srcdir)/'`src/shared/locale-util.c
+
+src/shared/libsystemd_shared_la-mempool.lo: src/shared/mempool.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-mempool.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-mempool.Tpo -c -o src/shared/libsystemd_shared_la-mempool.lo `test -f 'src/shared/mempool.c' || echo '$(srcdir)/'`src/shared/mempool.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-mempool.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-mempool.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/mempool.c' object='src/shared/libsystemd_shared_la-mempool.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-mempool.lo `test -f 'src/shared/mempool.c' || echo '$(srcdir)/'`src/shared/mempool.c
+
 src/shared/libsystemd_shared_la-hashmap.lo: src/shared/hashmap.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-hashmap.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-hashmap.Tpo -c -o src/shared/libsystemd_shared_la-hashmap.lo `test -f 'src/shared/hashmap.c' || echo '$(srcdir)/'`src/shared/hashmap.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-hashmap.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-hashmap.Plo
@@ -13341,6 +14705,13 @@ src/shared/libsystemd_shared_la-socket-util.lo: src/shared/socket-util.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-socket-util.lo `test -f 'src/shared/socket-util.c' || echo '$(srcdir)/'`src/shared/socket-util.c
 
+src/shared/libsystemd_shared_la-in-addr-util.lo: src/shared/in-addr-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-in-addr-util.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-in-addr-util.Tpo -c -o src/shared/libsystemd_shared_la-in-addr-util.lo `test -f 'src/shared/in-addr-util.c' || echo '$(srcdir)/'`src/shared/in-addr-util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-in-addr-util.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-in-addr-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/in-addr-util.c' object='src/shared/libsystemd_shared_la-in-addr-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-in-addr-util.lo `test -f 'src/shared/in-addr-util.c' || echo '$(srcdir)/'`src/shared/in-addr-util.c
+
 src/shared/libsystemd_shared_la-conf-files.lo: src/shared/conf-files.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-conf-files.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-conf-files.Tpo -c -o src/shared/libsystemd_shared_la-conf-files.lo `test -f 'src/shared/conf-files.c' || echo '$(srcdir)/'`src/shared/conf-files.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-conf-files.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-conf-files.Plo
@@ -13369,13 +14740,6 @@ src/shared/libsystemd_shared_la-unit-name.lo: src/shared/unit-name.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-unit-name.lo `test -f 'src/shared/unit-name.c' || echo '$(srcdir)/'`src/shared/unit-name.c
 
-src/shared/libsystemd_shared_la-utmp-wtmp.lo: src/shared/utmp-wtmp.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-utmp-wtmp.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-utmp-wtmp.Tpo -c -o src/shared/libsystemd_shared_la-utmp-wtmp.lo `test -f 'src/shared/utmp-wtmp.c' || echo '$(srcdir)/'`src/shared/utmp-wtmp.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-utmp-wtmp.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-utmp-wtmp.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/utmp-wtmp.c' object='src/shared/libsystemd_shared_la-utmp-wtmp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-utmp-wtmp.lo `test -f 'src/shared/utmp-wtmp.c' || echo '$(srcdir)/'`src/shared/utmp-wtmp.c
-
 src/shared/libsystemd_shared_la-watchdog.lo: src/shared/watchdog.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-watchdog.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-watchdog.Tpo -c -o src/shared/libsystemd_shared_la-watchdog.lo `test -f 'src/shared/watchdog.c' || echo '$(srcdir)/'`src/shared/watchdog.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-watchdog.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-watchdog.Plo
@@ -13502,6 +14866,13 @@ src/shared/libsystemd_shared_la-af-list.lo: src/shared/af-list.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-af-list.lo `test -f 'src/shared/af-list.c' || echo '$(srcdir)/'`src/shared/af-list.c
 
+src/shared/libsystemd_shared_la-arphrd-list.lo: src/shared/arphrd-list.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-arphrd-list.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-arphrd-list.Tpo -c -o src/shared/libsystemd_shared_la-arphrd-list.lo `test -f 'src/shared/arphrd-list.c' || echo '$(srcdir)/'`src/shared/arphrd-list.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-arphrd-list.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-arphrd-list.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/arphrd-list.c' object='src/shared/libsystemd_shared_la-arphrd-list.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-arphrd-list.lo `test -f 'src/shared/arphrd-list.c' || echo '$(srcdir)/'`src/shared/arphrd-list.c
+
 src/shared/libsystemd_shared_la-audit.lo: src/shared/audit.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-audit.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-audit.Tpo -c -o src/shared/libsystemd_shared_la-audit.lo `test -f 'src/shared/audit.c' || echo '$(srcdir)/'`src/shared/audit.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-audit.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-audit.Plo
@@ -13551,6 +14922,20 @@ src/shared/libsystemd_shared_la-ring.lo: src/shared/ring.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-ring.lo `test -f 'src/shared/ring.c' || echo '$(srcdir)/'`src/shared/ring.c
 
+src/shared/libsystemd_shared_la-barrier.lo: src/shared/barrier.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-barrier.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-barrier.Tpo -c -o src/shared/libsystemd_shared_la-barrier.lo `test -f 'src/shared/barrier.c' || echo '$(srcdir)/'`src/shared/barrier.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-barrier.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-barrier.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/barrier.c' object='src/shared/libsystemd_shared_la-barrier.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-barrier.lo `test -f 'src/shared/barrier.c' || echo '$(srcdir)/'`src/shared/barrier.c
+
+src/shared/libsystemd_shared_la-pty.lo: src/shared/pty.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-pty.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-pty.Tpo -c -o src/shared/libsystemd_shared_la-pty.lo `test -f 'src/shared/pty.c' || echo '$(srcdir)/'`src/shared/pty.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-pty.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-pty.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/pty.c' object='src/shared/libsystemd_shared_la-pty.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-pty.lo `test -f 'src/shared/pty.c' || echo '$(srcdir)/'`src/shared/pty.c
+
 src/shared/libsystemd_shared_la-async.lo: src/shared/async.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-async.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-async.Tpo -c -o src/shared/libsystemd_shared_la-async.lo `test -f 'src/shared/async.c' || echo '$(srcdir)/'`src/shared/async.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-async.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-async.Plo
@@ -13558,13 +14943,6 @@ src/shared/libsystemd_shared_la-async.lo: src/shared/async.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-async.lo `test -f 'src/shared/async.c' || echo '$(srcdir)/'`src/shared/async.c
 
-src/shared/libsystemd_shared_la-eventfd-util.lo: src/shared/eventfd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-eventfd-util.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-eventfd-util.Tpo -c -o src/shared/libsystemd_shared_la-eventfd-util.lo `test -f 'src/shared/eventfd-util.c' || echo '$(srcdir)/'`src/shared/eventfd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-eventfd-util.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-eventfd-util.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/eventfd-util.c' object='src/shared/libsystemd_shared_la-eventfd-util.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-eventfd-util.lo `test -f 'src/shared/eventfd-util.c' || echo '$(srcdir)/'`src/shared/eventfd-util.c
-
 src/shared/libsystemd_shared_la-copy.lo: src/shared/copy.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-copy.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-copy.Tpo -c -o src/shared/libsystemd_shared_la-copy.lo `test -f 'src/shared/copy.c' || echo '$(srcdir)/'`src/shared/copy.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-copy.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-copy.Plo
@@ -13579,6 +14957,111 @@ src/shared/libsystemd_shared_la-base-filesystem.lo: src/shared/base-filesystem.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-base-filesystem.lo `test -f 'src/shared/base-filesystem.c' || echo '$(srcdir)/'`src/shared/base-filesystem.c
 
+src/shared/libsystemd_shared_la-memfd.lo: src/shared/memfd.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-memfd.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-memfd.Tpo -c -o src/shared/libsystemd_shared_la-memfd.lo `test -f 'src/shared/memfd.c' || echo '$(srcdir)/'`src/shared/memfd.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-memfd.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-memfd.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/memfd.c' object='src/shared/libsystemd_shared_la-memfd.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-memfd.lo `test -f 'src/shared/memfd.c' || echo '$(srcdir)/'`src/shared/memfd.c
+
+src/shared/libsystemd_shared_la-uid-range.lo: src/shared/uid-range.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-uid-range.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-uid-range.Tpo -c -o src/shared/libsystemd_shared_la-uid-range.lo `test -f 'src/shared/uid-range.c' || echo '$(srcdir)/'`src/shared/uid-range.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-uid-range.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-uid-range.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/uid-range.c' object='src/shared/libsystemd_shared_la-uid-range.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-uid-range.lo `test -f 'src/shared/uid-range.c' || echo '$(srcdir)/'`src/shared/uid-range.c
+
+src/shared/libsystemd_shared_la-utmp-wtmp.lo: src/shared/utmp-wtmp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -MT src/shared/libsystemd_shared_la-utmp-wtmp.lo -MD -MP -MF src/shared/$(DEPDIR)/libsystemd_shared_la-utmp-wtmp.Tpo -c -o src/shared/libsystemd_shared_la-utmp-wtmp.lo `test -f 'src/shared/utmp-wtmp.c' || echo '$(srcdir)/'`src/shared/utmp-wtmp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/shared/$(DEPDIR)/libsystemd_shared_la-utmp-wtmp.Tpo src/shared/$(DEPDIR)/libsystemd_shared_la-utmp-wtmp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/shared/utmp-wtmp.c' object='src/shared/libsystemd_shared_la-utmp-wtmp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_shared_la_CFLAGS) $(CFLAGS) -c -o src/shared/libsystemd_shared_la-utmp-wtmp.lo `test -f 'src/shared/utmp-wtmp.c' || echo '$(srcdir)/'`src/shared/utmp-wtmp.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-grdev.lo: src/libsystemd-terminal/grdev.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-grdev.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-grdev.lo `test -f 'src/libsystemd-terminal/grdev.c' || echo '$(srcdir)/'`src/libsystemd-terminal/grdev.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/grdev.c' object='src/libsystemd-terminal/libsystemd_terminal_la-grdev.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-grdev.lo `test -f 'src/libsystemd-terminal/grdev.c' || echo '$(srcdir)/'`src/libsystemd-terminal/grdev.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-grdev-drm.lo: src/libsystemd-terminal/grdev-drm.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-grdev-drm.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev-drm.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-grdev-drm.lo `test -f 'src/libsystemd-terminal/grdev-drm.c' || echo '$(srcdir)/'`src/libsystemd-terminal/grdev-drm.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev-drm.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-grdev-drm.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/grdev-drm.c' object='src/libsystemd-terminal/libsystemd_terminal_la-grdev-drm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-grdev-drm.lo `test -f 'src/libsystemd-terminal/grdev-drm.c' || echo '$(srcdir)/'`src/libsystemd-terminal/grdev-drm.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-idev.lo: src/libsystemd-terminal/idev.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-idev.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-idev.lo `test -f 'src/libsystemd-terminal/idev.c' || echo '$(srcdir)/'`src/libsystemd-terminal/idev.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/idev.c' object='src/libsystemd-terminal/libsystemd_terminal_la-idev.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-idev.lo `test -f 'src/libsystemd-terminal/idev.c' || echo '$(srcdir)/'`src/libsystemd-terminal/idev.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-idev-evdev.lo: src/libsystemd-terminal/idev-evdev.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-idev-evdev.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-evdev.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-idev-evdev.lo `test -f 'src/libsystemd-terminal/idev-evdev.c' || echo '$(srcdir)/'`src/libsystemd-terminal/idev-evdev.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-evdev.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-evdev.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/idev-evdev.c' object='src/libsystemd-terminal/libsystemd_terminal_la-idev-evdev.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-idev-evdev.lo `test -f 'src/libsystemd-terminal/idev-evdev.c' || echo '$(srcdir)/'`src/libsystemd-terminal/idev-evdev.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-idev-keyboard.lo: src/libsystemd-terminal/idev-keyboard.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-idev-keyboard.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-keyboard.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-idev-keyboard.lo `test -f 'src/libsystemd-terminal/idev-keyboard.c' || echo '$(srcdir)/'`src/libsystemd-terminal/idev-keyboard.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-keyboard.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-idev-keyboard.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/idev-keyboard.c' object='src/libsystemd-terminal/libsystemd_terminal_la-idev-keyboard.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-idev-keyboard.lo `test -f 'src/libsystemd-terminal/idev-keyboard.c' || echo '$(srcdir)/'`src/libsystemd-terminal/idev-keyboard.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-sysview.lo: src/libsystemd-terminal/sysview.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-sysview.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-sysview.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-sysview.lo `test -f 'src/libsystemd-terminal/sysview.c' || echo '$(srcdir)/'`src/libsystemd-terminal/sysview.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-sysview.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-sysview.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/sysview.c' object='src/libsystemd-terminal/libsystemd_terminal_la-sysview.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-sysview.lo `test -f 'src/libsystemd-terminal/sysview.c' || echo '$(srcdir)/'`src/libsystemd-terminal/sysview.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-term-charset.lo: src/libsystemd-terminal/term-charset.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-term-charset.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-charset.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-charset.lo `test -f 'src/libsystemd-terminal/term-charset.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-charset.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-charset.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-charset.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/term-charset.c' object='src/libsystemd-terminal/libsystemd_terminal_la-term-charset.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-charset.lo `test -f 'src/libsystemd-terminal/term-charset.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-charset.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-term-page.lo: src/libsystemd-terminal/term-page.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-term-page.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-page.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-page.lo `test -f 'src/libsystemd-terminal/term-page.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-page.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-page.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-page.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/term-page.c' object='src/libsystemd-terminal/libsystemd_terminal_la-term-page.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-page.lo `test -f 'src/libsystemd-terminal/term-page.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-page.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-term-parser.lo: src/libsystemd-terminal/term-parser.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-term-parser.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-parser.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-parser.lo `test -f 'src/libsystemd-terminal/term-parser.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-parser.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-parser.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-parser.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/term-parser.c' object='src/libsystemd-terminal/libsystemd_terminal_la-term-parser.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-parser.lo `test -f 'src/libsystemd-terminal/term-parser.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-parser.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-term-screen.lo: src/libsystemd-terminal/term-screen.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-term-screen.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-screen.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-screen.lo `test -f 'src/libsystemd-terminal/term-screen.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-screen.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-screen.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-screen.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/term-screen.c' object='src/libsystemd-terminal/libsystemd_terminal_la-term-screen.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-screen.lo `test -f 'src/libsystemd-terminal/term-screen.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-screen.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-term-wcwidth.lo: src/libsystemd-terminal/term-wcwidth.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-term-wcwidth.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-wcwidth.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-wcwidth.lo `test -f 'src/libsystemd-terminal/term-wcwidth.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-wcwidth.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-wcwidth.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-term-wcwidth.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/term-wcwidth.c' object='src/libsystemd-terminal/libsystemd_terminal_la-term-wcwidth.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-term-wcwidth.lo `test -f 'src/libsystemd-terminal/term-wcwidth.c' || echo '$(srcdir)/'`src/libsystemd-terminal/term-wcwidth.c
+
+src/libsystemd-terminal/libsystemd_terminal_la-unifont.lo: src/libsystemd-terminal/unifont.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/libsystemd_terminal_la-unifont.lo -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-unifont.Tpo -c -o src/libsystemd-terminal/libsystemd_terminal_la-unifont.lo `test -f 'src/libsystemd-terminal/unifont.c' || echo '$(srcdir)/'`src/libsystemd-terminal/unifont.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-unifont.Tpo src/libsystemd-terminal/$(DEPDIR)/libsystemd_terminal_la-unifont.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/unifont.c' object='src/libsystemd-terminal/libsystemd_terminal_la-unifont.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_terminal_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/libsystemd_terminal_la-unifont.lo `test -f 'src/libsystemd-terminal/unifont.c' || echo '$(srcdir)/'`src/libsystemd-terminal/unifont.c
+
 src/libsystemd/sd-bus/libsystemd_la-sd-bus.lo: src/libsystemd/sd-bus/sd-bus.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-bus/libsystemd_la-sd-bus.lo -MD -MP -MF src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-bus.Tpo -c -o src/libsystemd/sd-bus/libsystemd_la-sd-bus.lo `test -f 'src/libsystemd/sd-bus/sd-bus.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/sd-bus.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-bus.Tpo src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-bus.Plo
@@ -13719,13 +15202,6 @@ src/libsystemd/sd-bus/libsystemd_la-bus-slot.lo: src/libsystemd/sd-bus/bus-slot.
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-bus/libsystemd_la-bus-slot.lo `test -f 'src/libsystemd/sd-bus/bus-slot.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/bus-slot.c
 
-src/libsystemd/sd-bus/libsystemd_la-sd-memfd.lo: src/libsystemd/sd-bus/sd-memfd.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-bus/libsystemd_la-sd-memfd.lo -MD -MP -MF src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-memfd.Tpo -c -o src/libsystemd/sd-bus/libsystemd_la-sd-memfd.lo `test -f 'src/libsystemd/sd-bus/sd-memfd.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/sd-memfd.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-memfd.Tpo src/libsystemd/sd-bus/$(DEPDIR)/libsystemd_la-sd-memfd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-bus/sd-memfd.c' object='src/libsystemd/sd-bus/libsystemd_la-sd-memfd.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-bus/libsystemd_la-sd-memfd.lo `test -f 'src/libsystemd/sd-bus/sd-memfd.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/sd-memfd.c
-
 src/libsystemd/sd-utf8/libsystemd_la-sd-utf8.lo: src/libsystemd/sd-utf8/sd-utf8.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-utf8/libsystemd_la-sd-utf8.lo -MD -MP -MF src/libsystemd/sd-utf8/$(DEPDIR)/libsystemd_la-sd-utf8.Tpo -c -o src/libsystemd/sd-utf8/libsystemd_la-sd-utf8.lo `test -f 'src/libsystemd/sd-utf8/sd-utf8.c' || echo '$(srcdir)/'`src/libsystemd/sd-utf8/sd-utf8.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-utf8/$(DEPDIR)/libsystemd_la-sd-utf8.Tpo src/libsystemd/sd-utf8/$(DEPDIR)/libsystemd_la-sd-utf8.Plo
@@ -13768,6 +15244,13 @@ src/libsystemd/sd-rtnl/libsystemd_la-rtnl-util.lo: src/libsystemd/sd-rtnl/rtnl-u
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-rtnl/libsystemd_la-rtnl-util.lo `test -f 'src/libsystemd/sd-rtnl/rtnl-util.c' || echo '$(srcdir)/'`src/libsystemd/sd-rtnl/rtnl-util.c
 
+src/libsystemd/sd-rtnl/libsystemd_la-local-addresses.lo: src/libsystemd/sd-rtnl/local-addresses.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-rtnl/libsystemd_la-local-addresses.lo -MD -MP -MF src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_la-local-addresses.Tpo -c -o src/libsystemd/sd-rtnl/libsystemd_la-local-addresses.lo `test -f 'src/libsystemd/sd-rtnl/local-addresses.c' || echo '$(srcdir)/'`src/libsystemd/sd-rtnl/local-addresses.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_la-local-addresses.Tpo src/libsystemd/sd-rtnl/$(DEPDIR)/libsystemd_la-local-addresses.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-rtnl/local-addresses.c' object='src/libsystemd/sd-rtnl/libsystemd_la-local-addresses.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-rtnl/libsystemd_la-local-addresses.lo `test -f 'src/libsystemd/sd-rtnl/local-addresses.c' || echo '$(srcdir)/'`src/libsystemd/sd-rtnl/local-addresses.c
+
 src/libsystemd/sd-id128/libsystemd_la-sd-id128.lo: src/libsystemd/sd-id128/sd-id128.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-id128/libsystemd_la-sd-id128.lo -MD -MP -MF src/libsystemd/sd-id128/$(DEPDIR)/libsystemd_la-sd-id128.Tpo -c -o src/libsystemd/sd-id128/libsystemd_la-sd-id128.lo `test -f 'src/libsystemd/sd-id128/sd-id128.c' || echo '$(srcdir)/'`src/libsystemd/sd-id128/sd-id128.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-id128/$(DEPDIR)/libsystemd_la-sd-id128.Tpo src/libsystemd/sd-id128/$(DEPDIR)/libsystemd_la-sd-id128.Plo
@@ -13796,6 +15279,20 @@ src/libsystemd/sd-path/libsystemd_la-sd-path.lo: src/libsystemd/sd-path/sd-path.
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-path/libsystemd_la-sd-path.lo `test -f 'src/libsystemd/sd-path/sd-path.c' || echo '$(srcdir)/'`src/libsystemd/sd-path/sd-path.c
 
+src/libsystemd/sd-network/libsystemd_la-sd-network.lo: src/libsystemd/sd-network/sd-network.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-network/libsystemd_la-sd-network.lo -MD -MP -MF src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-sd-network.Tpo -c -o src/libsystemd/sd-network/libsystemd_la-sd-network.lo `test -f 'src/libsystemd/sd-network/sd-network.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/sd-network.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-sd-network.Tpo src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-sd-network.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-network/sd-network.c' object='src/libsystemd/sd-network/libsystemd_la-sd-network.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-network/libsystemd_la-sd-network.lo `test -f 'src/libsystemd/sd-network/sd-network.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/sd-network.c
+
+src/libsystemd/sd-network/libsystemd_la-network-util.lo: src/libsystemd/sd-network/network-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-network/libsystemd_la-network-util.lo -MD -MP -MF src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-network-util.Tpo -c -o src/libsystemd/sd-network/libsystemd_la-network-util.lo `test -f 'src/libsystemd/sd-network/network-util.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/network-util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-network-util.Tpo src/libsystemd/sd-network/$(DEPDIR)/libsystemd_la-network-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-network/network-util.c' object='src/libsystemd/sd-network/libsystemd_la-network-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-network/libsystemd_la-network-util.lo `test -f 'src/libsystemd/sd-network/network-util.c' || echo '$(srcdir)/'`src/libsystemd/sd-network/network-util.c
+
 src/libsystemd/sd-resolve/libsystemd_la-sd-resolve.lo: src/libsystemd/sd-resolve/sd-resolve.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-resolve/libsystemd_la-sd-resolve.lo -MD -MP -MF src/libsystemd/sd-resolve/$(DEPDIR)/libsystemd_la-sd-resolve.Tpo -c -o src/libsystemd/sd-resolve/libsystemd_la-sd-resolve.lo `test -f 'src/libsystemd/sd-resolve/sd-resolve.c' || echo '$(srcdir)/'`src/libsystemd/sd-resolve/sd-resolve.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-resolve/$(DEPDIR)/libsystemd_la-sd-resolve.Tpo src/libsystemd/sd-resolve/$(DEPDIR)/libsystemd_la-sd-resolve.Plo
@@ -13888,165 +15385,158 @@ src/libsystemd/sd-bus/libsystemd_la-bus-error-mapping.lo: src/libsystemd/sd-bus/
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsystemd_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-bus/libsystemd_la-bus-error-mapping.lo `test -f 'src/libsystemd/sd-bus/bus-error-mapping.c' || echo '$(srcdir)/'`src/libsystemd/sd-bus/bus-error-mapping.c
 
 src/udev/libudev_core_la-udev-event.lo: src/udev/udev-event.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-event.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-event.Tpo -c -o src/udev/libudev_core_la-udev-event.lo `test -f 'src/udev/udev-event.c' || echo '$(srcdir)/'`src/udev/udev-event.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-event.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-event.Tpo -c -o src/udev/libudev_core_la-udev-event.lo `test -f 'src/udev/udev-event.c' || echo '$(srcdir)/'`src/udev/udev-event.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-event.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-event.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-event.c' object='src/udev/libudev_core_la-udev-event.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-event.lo `test -f 'src/udev/udev-event.c' || echo '$(srcdir)/'`src/udev/udev-event.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-event.lo `test -f 'src/udev/udev-event.c' || echo '$(srcdir)/'`src/udev/udev-event.c
 
 src/udev/libudev_core_la-udev-watch.lo: src/udev/udev-watch.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-watch.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-watch.Tpo -c -o src/udev/libudev_core_la-udev-watch.lo `test -f 'src/udev/udev-watch.c' || echo '$(srcdir)/'`src/udev/udev-watch.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-watch.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-watch.Tpo -c -o src/udev/libudev_core_la-udev-watch.lo `test -f 'src/udev/udev-watch.c' || echo '$(srcdir)/'`src/udev/udev-watch.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-watch.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-watch.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-watch.c' object='src/udev/libudev_core_la-udev-watch.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-watch.lo `test -f 'src/udev/udev-watch.c' || echo '$(srcdir)/'`src/udev/udev-watch.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-watch.lo `test -f 'src/udev/udev-watch.c' || echo '$(srcdir)/'`src/udev/udev-watch.c
 
 src/udev/libudev_core_la-udev-node.lo: src/udev/udev-node.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-node.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-node.Tpo -c -o src/udev/libudev_core_la-udev-node.lo `test -f 'src/udev/udev-node.c' || echo '$(srcdir)/'`src/udev/udev-node.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-node.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-node.Tpo -c -o src/udev/libudev_core_la-udev-node.lo `test -f 'src/udev/udev-node.c' || echo '$(srcdir)/'`src/udev/udev-node.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-node.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-node.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-node.c' object='src/udev/libudev_core_la-udev-node.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-node.lo `test -f 'src/udev/udev-node.c' || echo '$(srcdir)/'`src/udev/udev-node.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-node.lo `test -f 'src/udev/udev-node.c' || echo '$(srcdir)/'`src/udev/udev-node.c
 
 src/udev/libudev_core_la-udev-rules.lo: src/udev/udev-rules.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-rules.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-rules.Tpo -c -o src/udev/libudev_core_la-udev-rules.lo `test -f 'src/udev/udev-rules.c' || echo '$(srcdir)/'`src/udev/udev-rules.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-rules.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-rules.Tpo -c -o src/udev/libudev_core_la-udev-rules.lo `test -f 'src/udev/udev-rules.c' || echo '$(srcdir)/'`src/udev/udev-rules.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-rules.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-rules.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-rules.c' object='src/udev/libudev_core_la-udev-rules.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-rules.lo `test -f 'src/udev/udev-rules.c' || echo '$(srcdir)/'`src/udev/udev-rules.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-rules.lo `test -f 'src/udev/udev-rules.c' || echo '$(srcdir)/'`src/udev/udev-rules.c
 
 src/udev/libudev_core_la-udev-ctrl.lo: src/udev/udev-ctrl.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-ctrl.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-ctrl.Tpo -c -o src/udev/libudev_core_la-udev-ctrl.lo `test -f 'src/udev/udev-ctrl.c' || echo '$(srcdir)/'`src/udev/udev-ctrl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-ctrl.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-ctrl.Tpo -c -o src/udev/libudev_core_la-udev-ctrl.lo `test -f 'src/udev/udev-ctrl.c' || echo '$(srcdir)/'`src/udev/udev-ctrl.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-ctrl.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-ctrl.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-ctrl.c' object='src/udev/libudev_core_la-udev-ctrl.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-ctrl.lo `test -f 'src/udev/udev-ctrl.c' || echo '$(srcdir)/'`src/udev/udev-ctrl.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-ctrl.lo `test -f 'src/udev/udev-ctrl.c' || echo '$(srcdir)/'`src/udev/udev-ctrl.c
 
 src/udev/libudev_core_la-udev-builtin.lo: src/udev/udev-builtin.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin.Tpo -c -o src/udev/libudev_core_la-udev-builtin.lo `test -f 'src/udev/udev-builtin.c' || echo '$(srcdir)/'`src/udev/udev-builtin.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin.Tpo -c -o src/udev/libudev_core_la-udev-builtin.lo `test -f 'src/udev/udev-builtin.c' || echo '$(srcdir)/'`src/udev/udev-builtin.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin.c' object='src/udev/libudev_core_la-udev-builtin.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin.lo `test -f 'src/udev/udev-builtin.c' || echo '$(srcdir)/'`src/udev/udev-builtin.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin.lo `test -f 'src/udev/udev-builtin.c' || echo '$(srcdir)/'`src/udev/udev-builtin.c
 
 src/udev/libudev_core_la-udev-builtin-btrfs.lo: src/udev/udev-builtin-btrfs.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-btrfs.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-btrfs.Tpo -c -o src/udev/libudev_core_la-udev-builtin-btrfs.lo `test -f 'src/udev/udev-builtin-btrfs.c' || echo '$(srcdir)/'`src/udev/udev-builtin-btrfs.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-btrfs.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-btrfs.Tpo -c -o src/udev/libudev_core_la-udev-builtin-btrfs.lo `test -f 'src/udev/udev-builtin-btrfs.c' || echo '$(srcdir)/'`src/udev/udev-builtin-btrfs.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-btrfs.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-btrfs.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-btrfs.c' object='src/udev/libudev_core_la-udev-builtin-btrfs.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-btrfs.lo `test -f 'src/udev/udev-builtin-btrfs.c' || echo '$(srcdir)/'`src/udev/udev-builtin-btrfs.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-btrfs.lo `test -f 'src/udev/udev-builtin-btrfs.c' || echo '$(srcdir)/'`src/udev/udev-builtin-btrfs.c
 
 src/udev/libudev_core_la-udev-builtin-hwdb.lo: src/udev/udev-builtin-hwdb.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-hwdb.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-hwdb.Tpo -c -o src/udev/libudev_core_la-udev-builtin-hwdb.lo `test -f 'src/udev/udev-builtin-hwdb.c' || echo '$(srcdir)/'`src/udev/udev-builtin-hwdb.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-hwdb.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-hwdb.Tpo -c -o src/udev/libudev_core_la-udev-builtin-hwdb.lo `test -f 'src/udev/udev-builtin-hwdb.c' || echo '$(srcdir)/'`src/udev/udev-builtin-hwdb.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-hwdb.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-hwdb.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-hwdb.c' object='src/udev/libudev_core_la-udev-builtin-hwdb.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-hwdb.lo `test -f 'src/udev/udev-builtin-hwdb.c' || echo '$(srcdir)/'`src/udev/udev-builtin-hwdb.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-hwdb.lo `test -f 'src/udev/udev-builtin-hwdb.c' || echo '$(srcdir)/'`src/udev/udev-builtin-hwdb.c
 
 src/udev/libudev_core_la-udev-builtin-input_id.lo: src/udev/udev-builtin-input_id.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-input_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-input_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-input_id.lo `test -f 'src/udev/udev-builtin-input_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-input_id.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-input_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-input_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-input_id.lo `test -f 'src/udev/udev-builtin-input_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-input_id.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-input_id.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-input_id.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-input_id.c' object='src/udev/libudev_core_la-udev-builtin-input_id.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-input_id.lo `test -f 'src/udev/udev-builtin-input_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-input_id.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-input_id.lo `test -f 'src/udev/udev-builtin-input_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-input_id.c
 
 src/udev/libudev_core_la-udev-builtin-keyboard.lo: src/udev/udev-builtin-keyboard.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-keyboard.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-keyboard.Tpo -c -o src/udev/libudev_core_la-udev-builtin-keyboard.lo `test -f 'src/udev/udev-builtin-keyboard.c' || echo '$(srcdir)/'`src/udev/udev-builtin-keyboard.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-keyboard.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-keyboard.Tpo -c -o src/udev/libudev_core_la-udev-builtin-keyboard.lo `test -f 'src/udev/udev-builtin-keyboard.c' || echo '$(srcdir)/'`src/udev/udev-builtin-keyboard.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-keyboard.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-keyboard.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-keyboard.c' object='src/udev/libudev_core_la-udev-builtin-keyboard.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-keyboard.lo `test -f 'src/udev/udev-builtin-keyboard.c' || echo '$(srcdir)/'`src/udev/udev-builtin-keyboard.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-keyboard.lo `test -f 'src/udev/udev-builtin-keyboard.c' || echo '$(srcdir)/'`src/udev/udev-builtin-keyboard.c
 
 src/udev/libudev_core_la-udev-builtin-net_id.lo: src/udev/udev-builtin-net_id.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-net_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-net_id.lo `test -f 'src/udev/udev-builtin-net_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_id.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-net_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-net_id.lo `test -f 'src/udev/udev-builtin-net_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_id.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_id.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_id.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-net_id.c' object='src/udev/libudev_core_la-udev-builtin-net_id.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-net_id.lo `test -f 'src/udev/udev-builtin-net_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_id.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-net_id.lo `test -f 'src/udev/udev-builtin-net_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_id.c
 
 src/udev/libudev_core_la-udev-builtin-net_setup_link.lo: src/udev/udev-builtin-net_setup_link.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-net_setup_link.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_setup_link.Tpo -c -o src/udev/libudev_core_la-udev-builtin-net_setup_link.lo `test -f 'src/udev/udev-builtin-net_setup_link.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_setup_link.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-net_setup_link.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_setup_link.Tpo -c -o src/udev/libudev_core_la-udev-builtin-net_setup_link.lo `test -f 'src/udev/udev-builtin-net_setup_link.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_setup_link.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_setup_link.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-net_setup_link.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-net_setup_link.c' object='src/udev/libudev_core_la-udev-builtin-net_setup_link.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-net_setup_link.lo `test -f 'src/udev/udev-builtin-net_setup_link.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_setup_link.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-net_setup_link.lo `test -f 'src/udev/udev-builtin-net_setup_link.c' || echo '$(srcdir)/'`src/udev/udev-builtin-net_setup_link.c
 
 src/udev/libudev_core_la-udev-builtin-path_id.lo: src/udev/udev-builtin-path_id.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-path_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-path_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-path_id.lo `test -f 'src/udev/udev-builtin-path_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-path_id.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-path_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-path_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-path_id.lo `test -f 'src/udev/udev-builtin-path_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-path_id.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-path_id.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-path_id.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-path_id.c' object='src/udev/libudev_core_la-udev-builtin-path_id.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-path_id.lo `test -f 'src/udev/udev-builtin-path_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-path_id.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-path_id.lo `test -f 'src/udev/udev-builtin-path_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-path_id.c
 
 src/udev/libudev_core_la-udev-builtin-usb_id.lo: src/udev/udev-builtin-usb_id.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-usb_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-usb_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-usb_id.lo `test -f 'src/udev/udev-builtin-usb_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-usb_id.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-usb_id.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-usb_id.Tpo -c -o src/udev/libudev_core_la-udev-builtin-usb_id.lo `test -f 'src/udev/udev-builtin-usb_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-usb_id.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-usb_id.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-usb_id.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-usb_id.c' object='src/udev/libudev_core_la-udev-builtin-usb_id.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-usb_id.lo `test -f 'src/udev/udev-builtin-usb_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-usb_id.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-usb_id.lo `test -f 'src/udev/udev-builtin-usb_id.c' || echo '$(srcdir)/'`src/udev/udev-builtin-usb_id.c
 
 src/udev/net/libudev_core_la-link-config.lo: src/udev/net/link-config.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/net/libudev_core_la-link-config.lo -MD -MP -MF src/udev/net/$(DEPDIR)/libudev_core_la-link-config.Tpo -c -o src/udev/net/libudev_core_la-link-config.lo `test -f 'src/udev/net/link-config.c' || echo '$(srcdir)/'`src/udev/net/link-config.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/net/libudev_core_la-link-config.lo -MD -MP -MF src/udev/net/$(DEPDIR)/libudev_core_la-link-config.Tpo -c -o src/udev/net/libudev_core_la-link-config.lo `test -f 'src/udev/net/link-config.c' || echo '$(srcdir)/'`src/udev/net/link-config.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/net/$(DEPDIR)/libudev_core_la-link-config.Tpo src/udev/net/$(DEPDIR)/libudev_core_la-link-config.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/net/link-config.c' object='src/udev/net/libudev_core_la-link-config.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/net/libudev_core_la-link-config.lo `test -f 'src/udev/net/link-config.c' || echo '$(srcdir)/'`src/udev/net/link-config.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/net/libudev_core_la-link-config.lo `test -f 'src/udev/net/link-config.c' || echo '$(srcdir)/'`src/udev/net/link-config.c
 
 src/udev/net/libudev_core_la-ethtool-util.lo: src/udev/net/ethtool-util.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/net/libudev_core_la-ethtool-util.lo -MD -MP -MF src/udev/net/$(DEPDIR)/libudev_core_la-ethtool-util.Tpo -c -o src/udev/net/libudev_core_la-ethtool-util.lo `test -f 'src/udev/net/ethtool-util.c' || echo '$(srcdir)/'`src/udev/net/ethtool-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/net/libudev_core_la-ethtool-util.lo -MD -MP -MF src/udev/net/$(DEPDIR)/libudev_core_la-ethtool-util.Tpo -c -o src/udev/net/libudev_core_la-ethtool-util.lo `test -f 'src/udev/net/ethtool-util.c' || echo '$(srcdir)/'`src/udev/net/ethtool-util.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/net/$(DEPDIR)/libudev_core_la-ethtool-util.Tpo src/udev/net/$(DEPDIR)/libudev_core_la-ethtool-util.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/net/ethtool-util.c' object='src/udev/net/libudev_core_la-ethtool-util.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/net/libudev_core_la-ethtool-util.lo `test -f 'src/udev/net/ethtool-util.c' || echo '$(srcdir)/'`src/udev/net/ethtool-util.c
-
-src/udev/libudev_core_la-udev-builtin-firmware.lo: src/udev/udev-builtin-firmware.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-firmware.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-firmware.Tpo -c -o src/udev/libudev_core_la-udev-builtin-firmware.lo `test -f 'src/udev/udev-builtin-firmware.c' || echo '$(srcdir)/'`src/udev/udev-builtin-firmware.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-firmware.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-firmware.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-firmware.c' object='src/udev/libudev_core_la-udev-builtin-firmware.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-firmware.lo `test -f 'src/udev/udev-builtin-firmware.c' || echo '$(srcdir)/'`src/udev/udev-builtin-firmware.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/net/libudev_core_la-ethtool-util.lo `test -f 'src/udev/net/ethtool-util.c' || echo '$(srcdir)/'`src/udev/net/ethtool-util.c
 
 src/udev/libudev_core_la-udev-builtin-kmod.lo: src/udev/udev-builtin-kmod.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-kmod.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-kmod.Tpo -c -o src/udev/libudev_core_la-udev-builtin-kmod.lo `test -f 'src/udev/udev-builtin-kmod.c' || echo '$(srcdir)/'`src/udev/udev-builtin-kmod.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-kmod.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-kmod.Tpo -c -o src/udev/libudev_core_la-udev-builtin-kmod.lo `test -f 'src/udev/udev-builtin-kmod.c' || echo '$(srcdir)/'`src/udev/udev-builtin-kmod.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-kmod.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-kmod.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-kmod.c' object='src/udev/libudev_core_la-udev-builtin-kmod.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-kmod.lo `test -f 'src/udev/udev-builtin-kmod.c' || echo '$(srcdir)/'`src/udev/udev-builtin-kmod.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-kmod.lo `test -f 'src/udev/udev-builtin-kmod.c' || echo '$(srcdir)/'`src/udev/udev-builtin-kmod.c
 
 src/udev/libudev_core_la-udev-builtin-blkid.lo: src/udev/udev-builtin-blkid.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-blkid.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-blkid.Tpo -c -o src/udev/libudev_core_la-udev-builtin-blkid.lo `test -f 'src/udev/udev-builtin-blkid.c' || echo '$(srcdir)/'`src/udev/udev-builtin-blkid.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-blkid.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-blkid.Tpo -c -o src/udev/libudev_core_la-udev-builtin-blkid.lo `test -f 'src/udev/udev-builtin-blkid.c' || echo '$(srcdir)/'`src/udev/udev-builtin-blkid.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-blkid.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-blkid.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-blkid.c' object='src/udev/libudev_core_la-udev-builtin-blkid.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-blkid.lo `test -f 'src/udev/udev-builtin-blkid.c' || echo '$(srcdir)/'`src/udev/udev-builtin-blkid.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-blkid.lo `test -f 'src/udev/udev-builtin-blkid.c' || echo '$(srcdir)/'`src/udev/udev-builtin-blkid.c
 
 src/udev/libudev_core_la-udev-builtin-uaccess.lo: src/udev/udev-builtin-uaccess.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-uaccess.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-uaccess.Tpo -c -o src/udev/libudev_core_la-udev-builtin-uaccess.lo `test -f 'src/udev/udev-builtin-uaccess.c' || echo '$(srcdir)/'`src/udev/udev-builtin-uaccess.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/libudev_core_la-udev-builtin-uaccess.lo -MD -MP -MF src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-uaccess.Tpo -c -o src/udev/libudev_core_la-udev-builtin-uaccess.lo `test -f 'src/udev/udev-builtin-uaccess.c' || echo '$(srcdir)/'`src/udev/udev-builtin-uaccess.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-uaccess.Tpo src/udev/$(DEPDIR)/libudev_core_la-udev-builtin-uaccess.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/udev-builtin-uaccess.c' object='src/udev/libudev_core_la-udev-builtin-uaccess.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-uaccess.lo `test -f 'src/udev/udev-builtin-uaccess.c' || echo '$(srcdir)/'`src/udev/udev-builtin-uaccess.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/libudev_core_la-udev-builtin-uaccess.lo `test -f 'src/udev/udev-builtin-uaccess.c' || echo '$(srcdir)/'`src/udev/udev-builtin-uaccess.c
 
 src/login/libudev_core_la-logind-acl.lo: src/login/logind-acl.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/login/libudev_core_la-logind-acl.lo -MD -MP -MF src/login/$(DEPDIR)/libudev_core_la-logind-acl.Tpo -c -o src/login/libudev_core_la-logind-acl.lo `test -f 'src/login/logind-acl.c' || echo '$(srcdir)/'`src/login/logind-acl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/login/libudev_core_la-logind-acl.lo -MD -MP -MF src/login/$(DEPDIR)/libudev_core_la-logind-acl.Tpo -c -o src/login/libudev_core_la-logind-acl.lo `test -f 'src/login/logind-acl.c' || echo '$(srcdir)/'`src/login/logind-acl.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/login/$(DEPDIR)/libudev_core_la-logind-acl.Tpo src/login/$(DEPDIR)/libudev_core_la-logind-acl.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/login/logind-acl.c' object='src/login/libudev_core_la-logind-acl.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/login/libudev_core_la-logind-acl.lo `test -f 'src/login/logind-acl.c' || echo '$(srcdir)/'`src/login/logind-acl.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/login/libudev_core_la-logind-acl.lo `test -f 'src/login/logind-acl.c' || echo '$(srcdir)/'`src/login/logind-acl.c
 
 src/libsystemd/sd-login/libudev_core_la-sd-login.lo: src/libsystemd/sd-login/sd-login.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-login/libudev_core_la-sd-login.lo -MD -MP -MF src/libsystemd/sd-login/$(DEPDIR)/libudev_core_la-sd-login.Tpo -c -o src/libsystemd/sd-login/libudev_core_la-sd-login.lo `test -f 'src/libsystemd/sd-login/sd-login.c' || echo '$(srcdir)/'`src/libsystemd/sd-login/sd-login.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/libsystemd/sd-login/libudev_core_la-sd-login.lo -MD -MP -MF src/libsystemd/sd-login/$(DEPDIR)/libudev_core_la-sd-login.Tpo -c -o src/libsystemd/sd-login/libudev_core_la-sd-login.lo `test -f 'src/libsystemd/sd-login/sd-login.c' || echo '$(srcdir)/'`src/libsystemd/sd-login/sd-login.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd/sd-login/$(DEPDIR)/libudev_core_la-sd-login.Tpo src/libsystemd/sd-login/$(DEPDIR)/libudev_core_la-sd-login.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd/sd-login/sd-login.c' object='src/libsystemd/sd-login/libudev_core_la-sd-login.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-login/libudev_core_la-sd-login.lo `test -f 'src/libsystemd/sd-login/sd-login.c' || echo '$(srcdir)/'`src/libsystemd/sd-login/sd-login.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/libsystemd/sd-login/libudev_core_la-sd-login.lo `test -f 'src/libsystemd/sd-login/sd-login.c' || echo '$(srcdir)/'`src/libsystemd/sd-login/sd-login.c
 
 src/udev/net/libudev_core_la-link-config-gperf.lo: src/udev/net/link-config-gperf.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/net/libudev_core_la-link-config-gperf.lo -MD -MP -MF src/udev/net/$(DEPDIR)/libudev_core_la-link-config-gperf.Tpo -c -o src/udev/net/libudev_core_la-link-config-gperf.lo `test -f 'src/udev/net/link-config-gperf.c' || echo '$(srcdir)/'`src/udev/net/link-config-gperf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -MT src/udev/net/libudev_core_la-link-config-gperf.lo -MD -MP -MF src/udev/net/$(DEPDIR)/libudev_core_la-link-config-gperf.Tpo -c -o src/udev/net/libudev_core_la-link-config-gperf.lo `test -f 'src/udev/net/link-config-gperf.c' || echo '$(srcdir)/'`src/udev/net/link-config-gperf.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/udev/net/$(DEPDIR)/libudev_core_la-link-config-gperf.Tpo src/udev/net/$(DEPDIR)/libudev_core_la-link-config-gperf.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/udev/net/link-config-gperf.c' object='src/udev/net/libudev_core_la-link-config-gperf.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libudev_core_la_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/net/libudev_core_la-link-config-gperf.lo `test -f 'src/udev/net/link-config-gperf.c' || echo '$(srcdir)/'`src/udev/net/link-config-gperf.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_core_la_CFLAGS) $(CFLAGS) -c -o src/udev/net/libudev_core_la-link-config-gperf.lo `test -f 'src/udev/net/link-config-gperf.c' || echo '$(srcdir)/'`src/udev/net/link-config-gperf.c
 
 src/libudev/libudev_internal_la-libudev.lo: src/libudev/libudev.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libudev_internal_la_CFLAGS) $(CFLAGS) -MT src/libudev/libudev_internal_la-libudev.lo -MD -MP -MF src/libudev/$(DEPDIR)/libudev_internal_la-libudev.Tpo -c -o src/libudev/libudev_internal_la-libudev.lo `test -f 'src/libudev/libudev.c' || echo '$(srcdir)/'`src/libudev/libudev.c
@@ -14244,6 +15734,90 @@ src/core/systemd-main.obj: src/core/main.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_CFLAGS) $(CFLAGS) -c -o src/core/systemd-main.obj `if test -f 'src/core/main.c'; then $(CYGPATH_W) 'src/core/main.c'; else $(CYGPATH_W) '$(srcdir)/src/core/main.c'; fi`
 
+src/console/systemd_consoled-consoled.o: src/console/consoled.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled.o -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled.Tpo -c -o src/console/systemd_consoled-consoled.o `test -f 'src/console/consoled.c' || echo '$(srcdir)/'`src/console/consoled.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled.c' object='src/console/systemd_consoled-consoled.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled.o `test -f 'src/console/consoled.c' || echo '$(srcdir)/'`src/console/consoled.c
+
+src/console/systemd_consoled-consoled.obj: src/console/consoled.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled.obj -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled.Tpo -c -o src/console/systemd_consoled-consoled.obj `if test -f 'src/console/consoled.c'; then $(CYGPATH_W) 'src/console/consoled.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled.c' object='src/console/systemd_consoled-consoled.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled.obj `if test -f 'src/console/consoled.c'; then $(CYGPATH_W) 'src/console/consoled.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled.c'; fi`
+
+src/console/systemd_consoled-consoled-display.o: src/console/consoled-display.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-display.o -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-display.Tpo -c -o src/console/systemd_consoled-consoled-display.o `test -f 'src/console/consoled-display.c' || echo '$(srcdir)/'`src/console/consoled-display.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-display.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-display.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-display.c' object='src/console/systemd_consoled-consoled-display.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-display.o `test -f 'src/console/consoled-display.c' || echo '$(srcdir)/'`src/console/consoled-display.c
+
+src/console/systemd_consoled-consoled-display.obj: src/console/consoled-display.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-display.obj -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-display.Tpo -c -o src/console/systemd_consoled-consoled-display.obj `if test -f 'src/console/consoled-display.c'; then $(CYGPATH_W) 'src/console/consoled-display.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-display.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-display.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-display.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-display.c' object='src/console/systemd_consoled-consoled-display.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-display.obj `if test -f 'src/console/consoled-display.c'; then $(CYGPATH_W) 'src/console/consoled-display.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-display.c'; fi`
+
+src/console/systemd_consoled-consoled-manager.o: src/console/consoled-manager.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-manager.o -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-manager.Tpo -c -o src/console/systemd_consoled-consoled-manager.o `test -f 'src/console/consoled-manager.c' || echo '$(srcdir)/'`src/console/consoled-manager.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-manager.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-manager.c' object='src/console/systemd_consoled-consoled-manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-manager.o `test -f 'src/console/consoled-manager.c' || echo '$(srcdir)/'`src/console/consoled-manager.c
+
+src/console/systemd_consoled-consoled-manager.obj: src/console/consoled-manager.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-manager.obj -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-manager.Tpo -c -o src/console/systemd_consoled-consoled-manager.obj `if test -f 'src/console/consoled-manager.c'; then $(CYGPATH_W) 'src/console/consoled-manager.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-manager.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-manager.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-manager.c' object='src/console/systemd_consoled-consoled-manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-manager.obj `if test -f 'src/console/consoled-manager.c'; then $(CYGPATH_W) 'src/console/consoled-manager.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-manager.c'; fi`
+
+src/console/systemd_consoled-consoled-session.o: src/console/consoled-session.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-session.o -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-session.Tpo -c -o src/console/systemd_consoled-consoled-session.o `test -f 'src/console/consoled-session.c' || echo '$(srcdir)/'`src/console/consoled-session.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-session.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-session.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-session.c' object='src/console/systemd_consoled-consoled-session.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-session.o `test -f 'src/console/consoled-session.c' || echo '$(srcdir)/'`src/console/consoled-session.c
+
+src/console/systemd_consoled-consoled-session.obj: src/console/consoled-session.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-session.obj -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-session.Tpo -c -o src/console/systemd_consoled-consoled-session.obj `if test -f 'src/console/consoled-session.c'; then $(CYGPATH_W) 'src/console/consoled-session.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-session.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-session.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-session.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-session.c' object='src/console/systemd_consoled-consoled-session.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-session.obj `if test -f 'src/console/consoled-session.c'; then $(CYGPATH_W) 'src/console/consoled-session.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-session.c'; fi`
+
+src/console/systemd_consoled-consoled-terminal.o: src/console/consoled-terminal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-terminal.o -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-terminal.Tpo -c -o src/console/systemd_consoled-consoled-terminal.o `test -f 'src/console/consoled-terminal.c' || echo '$(srcdir)/'`src/console/consoled-terminal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-terminal.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-terminal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-terminal.c' object='src/console/systemd_consoled-consoled-terminal.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-terminal.o `test -f 'src/console/consoled-terminal.c' || echo '$(srcdir)/'`src/console/consoled-terminal.c
+
+src/console/systemd_consoled-consoled-terminal.obj: src/console/consoled-terminal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-terminal.obj -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-terminal.Tpo -c -o src/console/systemd_consoled-consoled-terminal.obj `if test -f 'src/console/consoled-terminal.c'; then $(CYGPATH_W) 'src/console/consoled-terminal.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-terminal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-terminal.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-terminal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-terminal.c' object='src/console/systemd_consoled-consoled-terminal.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-terminal.obj `if test -f 'src/console/consoled-terminal.c'; then $(CYGPATH_W) 'src/console/consoled-terminal.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-terminal.c'; fi`
+
+src/console/systemd_consoled-consoled-workspace.o: src/console/consoled-workspace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-workspace.o -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-workspace.Tpo -c -o src/console/systemd_consoled-consoled-workspace.o `test -f 'src/console/consoled-workspace.c' || echo '$(srcdir)/'`src/console/consoled-workspace.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-workspace.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-workspace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-workspace.c' object='src/console/systemd_consoled-consoled-workspace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-workspace.o `test -f 'src/console/consoled-workspace.c' || echo '$(srcdir)/'`src/console/consoled-workspace.c
+
+src/console/systemd_consoled-consoled-workspace.obj: src/console/consoled-workspace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -MT src/console/systemd_consoled-consoled-workspace.obj -MD -MP -MF src/console/$(DEPDIR)/systemd_consoled-consoled-workspace.Tpo -c -o src/console/systemd_consoled-consoled-workspace.obj `if test -f 'src/console/consoled-workspace.c'; then $(CYGPATH_W) 'src/console/consoled-workspace.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-workspace.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/console/$(DEPDIR)/systemd_consoled-consoled-workspace.Tpo src/console/$(DEPDIR)/systemd_consoled-consoled-workspace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/console/consoled-workspace.c' object='src/console/systemd_consoled-consoled-workspace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_consoled_CFLAGS) $(CFLAGS) -c -o src/console/systemd_consoled-consoled-workspace.obj `if test -f 'src/console/consoled-workspace.c'; then $(CYGPATH_W) 'src/console/consoled-workspace.c'; else $(CYGPATH_W) '$(srcdir)/src/console/consoled-workspace.c'; fi`
+
 src/cryptsetup/systemd_cryptsetup-cryptsetup.o: src/cryptsetup/cryptsetup.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_cryptsetup_CFLAGS) $(CFLAGS) -MT src/cryptsetup/systemd_cryptsetup-cryptsetup.o -MD -MP -MF src/cryptsetup/$(DEPDIR)/systemd_cryptsetup-cryptsetup.Tpo -c -o src/cryptsetup/systemd_cryptsetup-cryptsetup.o `test -f 'src/cryptsetup/cryptsetup.c' || echo '$(srcdir)/'`src/cryptsetup/cryptsetup.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/cryptsetup/$(DEPDIR)/systemd_cryptsetup-cryptsetup.Tpo src/cryptsetup/$(DEPDIR)/systemd_cryptsetup-cryptsetup.Po
@@ -14258,6 +15832,20 @@ src/cryptsetup/systemd_cryptsetup-cryptsetup.obj: src/cryptsetup/cryptsetup.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_cryptsetup_CFLAGS) $(CFLAGS) -c -o src/cryptsetup/systemd_cryptsetup-cryptsetup.obj `if test -f 'src/cryptsetup/cryptsetup.c'; then $(CYGPATH_W) 'src/cryptsetup/cryptsetup.c'; else $(CYGPATH_W) '$(srcdir)/src/cryptsetup/cryptsetup.c'; fi`
 
+src/libsystemd-terminal/systemd_evcat-evcat.o: src/libsystemd-terminal/evcat.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_evcat_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/systemd_evcat-evcat.o -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/systemd_evcat-evcat.Tpo -c -o src/libsystemd-terminal/systemd_evcat-evcat.o `test -f 'src/libsystemd-terminal/evcat.c' || echo '$(srcdir)/'`src/libsystemd-terminal/evcat.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/systemd_evcat-evcat.Tpo src/libsystemd-terminal/$(DEPDIR)/systemd_evcat-evcat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/evcat.c' object='src/libsystemd-terminal/systemd_evcat-evcat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_evcat_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/systemd_evcat-evcat.o `test -f 'src/libsystemd-terminal/evcat.c' || echo '$(srcdir)/'`src/libsystemd-terminal/evcat.c
+
+src/libsystemd-terminal/systemd_evcat-evcat.obj: src/libsystemd-terminal/evcat.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_evcat_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/systemd_evcat-evcat.obj -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/systemd_evcat-evcat.Tpo -c -o src/libsystemd-terminal/systemd_evcat-evcat.obj `if test -f 'src/libsystemd-terminal/evcat.c'; then $(CYGPATH_W) 'src/libsystemd-terminal/evcat.c'; else $(CYGPATH_W) '$(srcdir)/src/libsystemd-terminal/evcat.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/systemd_evcat-evcat.Tpo src/libsystemd-terminal/$(DEPDIR)/systemd_evcat-evcat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/evcat.c' object='src/libsystemd-terminal/systemd_evcat-evcat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_evcat_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/systemd_evcat-evcat.obj `if test -f 'src/libsystemd-terminal/evcat.c'; then $(CYGPATH_W) 'src/libsystemd-terminal/evcat.c'; else $(CYGPATH_W) '$(srcdir)/src/libsystemd-terminal/evcat.c'; fi`
+
 src/gpt-auto-generator/systemd_gpt_auto_generator-gpt-auto-generator.o: src/gpt-auto-generator/gpt-auto-generator.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_gpt_auto_generator_CFLAGS) $(CFLAGS) -MT src/gpt-auto-generator/systemd_gpt_auto_generator-gpt-auto-generator.o -MD -MP -MF src/gpt-auto-generator/$(DEPDIR)/systemd_gpt_auto_generator-gpt-auto-generator.Tpo -c -o src/gpt-auto-generator/systemd_gpt_auto_generator-gpt-auto-generator.o `test -f 'src/gpt-auto-generator/gpt-auto-generator.c' || echo '$(srcdir)/'`src/gpt-auto-generator/gpt-auto-generator.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/gpt-auto-generator/$(DEPDIR)/systemd_gpt_auto_generator-gpt-auto-generator.Tpo src/gpt-auto-generator/$(DEPDIR)/systemd_gpt_auto_generator-gpt-auto-generator.Po
@@ -14272,89 +15860,131 @@ src/gpt-auto-generator/systemd_gpt_auto_generator-gpt-auto-generator.obj: src/gp
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_gpt_auto_generator_CFLAGS) $(CFLAGS) -c -o src/gpt-auto-generator/systemd_gpt_auto_generator-gpt-auto-generator.obj `if test -f 'src/gpt-auto-generator/gpt-auto-generator.c'; then $(CYGPATH_W) 'src/gpt-auto-generator/gpt-auto-generator.c'; else $(CYGPATH_W) '$(srcdir)/src/gpt-auto-generator/gpt-auto-generator.c'; fi`
 
-src/journal/systemd_journal_gatewayd-journal-gatewayd.o: src/journal/journal-gatewayd.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_gatewayd-journal-gatewayd.o -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo -c -o src/journal/systemd_journal_gatewayd-journal-gatewayd.o `test -f 'src/journal/journal-gatewayd.c' || echo '$(srcdir)/'`src/journal/journal-gatewayd.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo src/journal/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-gatewayd.c' object='src/journal/systemd_journal_gatewayd-journal-gatewayd.o' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.o: src/journal-remote/journal-gatewayd.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo -c -o src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.o `test -f 'src/journal-remote/journal-gatewayd.c' || echo '$(srcdir)/'`src/journal-remote/journal-gatewayd.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-gatewayd.c' object='src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.o `test -f 'src/journal-remote/journal-gatewayd.c' || echo '$(srcdir)/'`src/journal-remote/journal-gatewayd.c
+
+src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.obj: src/journal-remote/journal-gatewayd.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo -c -o src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.obj `if test -f 'src/journal-remote/journal-gatewayd.c'; then $(CYGPATH_W) 'src/journal-remote/journal-gatewayd.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-gatewayd.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-gatewayd.c' object='src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_gatewayd-journal-gatewayd.obj `if test -f 'src/journal-remote/journal-gatewayd.c'; then $(CYGPATH_W) 'src/journal-remote/journal-gatewayd.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-gatewayd.c'; fi`
+
+src/journal-remote/systemd_journal_gatewayd-microhttpd-util.o: src/journal-remote/microhttpd-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_gatewayd-microhttpd-util.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo -c -o src/journal-remote/systemd_journal_gatewayd-microhttpd-util.o `test -f 'src/journal-remote/microhttpd-util.c' || echo '$(srcdir)/'`src/journal-remote/microhttpd-util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/microhttpd-util.c' object='src/journal-remote/systemd_journal_gatewayd-microhttpd-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_gatewayd-microhttpd-util.o `test -f 'src/journal-remote/microhttpd-util.c' || echo '$(srcdir)/'`src/journal-remote/microhttpd-util.c
+
+src/journal-remote/systemd_journal_gatewayd-microhttpd-util.obj: src/journal-remote/microhttpd-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_gatewayd-microhttpd-util.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo -c -o src/journal-remote/systemd_journal_gatewayd-microhttpd-util.obj `if test -f 'src/journal-remote/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal-remote/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/microhttpd-util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/microhttpd-util.c' object='src/journal-remote/systemd_journal_gatewayd-microhttpd-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_gatewayd-microhttpd-util.obj `if test -f 'src/journal-remote/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal-remote/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/microhttpd-util.c'; fi`
+
+src/journal-remote/systemd_journal_remote-journal-remote-parse.o: src/journal-remote/journal-remote-parse.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-journal-remote-parse.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo -c -o src/journal-remote/systemd_journal_remote-journal-remote-parse.o `test -f 'src/journal-remote/journal-remote-parse.c' || echo '$(srcdir)/'`src/journal-remote/journal-remote-parse.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-remote-parse.c' object='src/journal-remote/systemd_journal_remote-journal-remote-parse.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_gatewayd-journal-gatewayd.o `test -f 'src/journal/journal-gatewayd.c' || echo '$(srcdir)/'`src/journal/journal-gatewayd.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-journal-remote-parse.o `test -f 'src/journal-remote/journal-remote-parse.c' || echo '$(srcdir)/'`src/journal-remote/journal-remote-parse.c
 
-src/journal/systemd_journal_gatewayd-journal-gatewayd.obj: src/journal/journal-gatewayd.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_gatewayd-journal-gatewayd.obj -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo -c -o src/journal/systemd_journal_gatewayd-journal-gatewayd.obj `if test -f 'src/journal/journal-gatewayd.c'; then $(CYGPATH_W) 'src/journal/journal-gatewayd.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-gatewayd.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Tpo src/journal/$(DEPDIR)/systemd_journal_gatewayd-journal-gatewayd.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-gatewayd.c' object='src/journal/systemd_journal_gatewayd-journal-gatewayd.obj' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_remote-journal-remote-parse.obj: src/journal-remote/journal-remote-parse.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-journal-remote-parse.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo -c -o src/journal-remote/systemd_journal_remote-journal-remote-parse.obj `if test -f 'src/journal-remote/journal-remote-parse.c'; then $(CYGPATH_W) 'src/journal-remote/journal-remote-parse.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-remote-parse.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-remote-parse.c' object='src/journal-remote/systemd_journal_remote-journal-remote-parse.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_gatewayd-journal-gatewayd.obj `if test -f 'src/journal/journal-gatewayd.c'; then $(CYGPATH_W) 'src/journal/journal-gatewayd.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-gatewayd.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-journal-remote-parse.obj `if test -f 'src/journal-remote/journal-remote-parse.c'; then $(CYGPATH_W) 'src/journal-remote/journal-remote-parse.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-remote-parse.c'; fi`
 
-src/journal/systemd_journal_gatewayd-microhttpd-util.o: src/journal/microhttpd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_gatewayd-microhttpd-util.o -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo -c -o src/journal/systemd_journal_gatewayd-microhttpd-util.o `test -f 'src/journal/microhttpd-util.c' || echo '$(srcdir)/'`src/journal/microhttpd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo src/journal/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/microhttpd-util.c' object='src/journal/systemd_journal_gatewayd-microhttpd-util.o' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_remote-journal-remote-write.o: src/journal-remote/journal-remote-write.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-journal-remote-write.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo -c -o src/journal-remote/systemd_journal_remote-journal-remote-write.o `test -f 'src/journal-remote/journal-remote-write.c' || echo '$(srcdir)/'`src/journal-remote/journal-remote-write.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-remote-write.c' object='src/journal-remote/systemd_journal_remote-journal-remote-write.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_gatewayd-microhttpd-util.o `test -f 'src/journal/microhttpd-util.c' || echo '$(srcdir)/'`src/journal/microhttpd-util.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-journal-remote-write.o `test -f 'src/journal-remote/journal-remote-write.c' || echo '$(srcdir)/'`src/journal-remote/journal-remote-write.c
 
-src/journal/systemd_journal_gatewayd-microhttpd-util.obj: src/journal/microhttpd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_gatewayd-microhttpd-util.obj -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo -c -o src/journal/systemd_journal_gatewayd-microhttpd-util.obj `if test -f 'src/journal/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/microhttpd-util.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Tpo src/journal/$(DEPDIR)/systemd_journal_gatewayd-microhttpd-util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/microhttpd-util.c' object='src/journal/systemd_journal_gatewayd-microhttpd-util.obj' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_remote-journal-remote-write.obj: src/journal-remote/journal-remote-write.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-journal-remote-write.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo -c -o src/journal-remote/systemd_journal_remote-journal-remote-write.obj `if test -f 'src/journal-remote/journal-remote-write.c'; then $(CYGPATH_W) 'src/journal-remote/journal-remote-write.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-remote-write.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-remote-write.c' object='src/journal-remote/systemd_journal_remote-journal-remote-write.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(systemd_journal_gatewayd_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_gatewayd_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_gatewayd-microhttpd-util.obj `if test -f 'src/journal/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/microhttpd-util.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-journal-remote-write.obj `if test -f 'src/journal-remote/journal-remote-write.c'; then $(CYGPATH_W) 'src/journal-remote/journal-remote-write.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-remote-write.c'; fi`
 
-src/journal/systemd_journal_remote-journal-remote-parse.o: src/journal/journal-remote-parse.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-journal-remote-parse.o -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo -c -o src/journal/systemd_journal_remote-journal-remote-parse.o `test -f 'src/journal/journal-remote-parse.c' || echo '$(srcdir)/'`src/journal/journal-remote-parse.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-remote-parse.c' object='src/journal/systemd_journal_remote-journal-remote-parse.o' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_remote-journal-remote.o: src/journal-remote/journal-remote.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-journal-remote.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo -c -o src/journal-remote/systemd_journal_remote-journal-remote.o `test -f 'src/journal-remote/journal-remote.c' || echo '$(srcdir)/'`src/journal-remote/journal-remote.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-remote.c' object='src/journal-remote/systemd_journal_remote-journal-remote.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-journal-remote-parse.o `test -f 'src/journal/journal-remote-parse.c' || echo '$(srcdir)/'`src/journal/journal-remote-parse.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-journal-remote.o `test -f 'src/journal-remote/journal-remote.c' || echo '$(srcdir)/'`src/journal-remote/journal-remote.c
 
-src/journal/systemd_journal_remote-journal-remote-parse.obj: src/journal/journal-remote-parse.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-journal-remote-parse.obj -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo -c -o src/journal/systemd_journal_remote-journal-remote-parse.obj `if test -f 'src/journal/journal-remote-parse.c'; then $(CYGPATH_W) 'src/journal/journal-remote-parse.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-remote-parse.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-parse.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-remote-parse.c' object='src/journal/systemd_journal_remote-journal-remote-parse.obj' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_remote-journal-remote.obj: src/journal-remote/journal-remote.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-journal-remote.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo -c -o src/journal-remote/systemd_journal_remote-journal-remote.obj `if test -f 'src/journal-remote/journal-remote.c'; then $(CYGPATH_W) 'src/journal-remote/journal-remote.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-remote.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-journal-remote.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-remote.c' object='src/journal-remote/systemd_journal_remote-journal-remote.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-journal-remote-parse.obj `if test -f 'src/journal/journal-remote-parse.c'; then $(CYGPATH_W) 'src/journal/journal-remote-parse.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-remote-parse.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-journal-remote.obj `if test -f 'src/journal-remote/journal-remote.c'; then $(CYGPATH_W) 'src/journal-remote/journal-remote.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-remote.c'; fi`
 
-src/journal/systemd_journal_remote-journal-remote-write.o: src/journal/journal-remote-write.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-journal-remote-write.o -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo -c -o src/journal/systemd_journal_remote-journal-remote-write.o `test -f 'src/journal/journal-remote-write.c' || echo '$(srcdir)/'`src/journal/journal-remote-write.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-remote-write.c' object='src/journal/systemd_journal_remote-journal-remote-write.o' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_remote-microhttpd-util.o: src/journal-remote/microhttpd-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-microhttpd-util.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo -c -o src/journal-remote/systemd_journal_remote-microhttpd-util.o `test -f 'src/journal-remote/microhttpd-util.c' || echo '$(srcdir)/'`src/journal-remote/microhttpd-util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/microhttpd-util.c' object='src/journal-remote/systemd_journal_remote-microhttpd-util.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-journal-remote-write.o `test -f 'src/journal/journal-remote-write.c' || echo '$(srcdir)/'`src/journal/journal-remote-write.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-microhttpd-util.o `test -f 'src/journal-remote/microhttpd-util.c' || echo '$(srcdir)/'`src/journal-remote/microhttpd-util.c
 
-src/journal/systemd_journal_remote-journal-remote-write.obj: src/journal/journal-remote-write.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-journal-remote-write.obj -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo -c -o src/journal/systemd_journal_remote-journal-remote-write.obj `if test -f 'src/journal/journal-remote-write.c'; then $(CYGPATH_W) 'src/journal/journal-remote-write.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-remote-write.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote-write.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-remote-write.c' object='src/journal/systemd_journal_remote-journal-remote-write.obj' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_remote-microhttpd-util.obj: src/journal-remote/microhttpd-util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_remote-microhttpd-util.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo -c -o src/journal-remote/systemd_journal_remote-microhttpd-util.obj `if test -f 'src/journal-remote/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal-remote/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/microhttpd-util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/microhttpd-util.c' object='src/journal-remote/systemd_journal_remote-microhttpd-util.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-journal-remote-write.obj `if test -f 'src/journal/journal-remote-write.c'; then $(CYGPATH_W) 'src/journal/journal-remote-write.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-remote-write.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_remote-microhttpd-util.obj `if test -f 'src/journal-remote/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal-remote/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/microhttpd-util.c'; fi`
 
-src/journal/systemd_journal_remote-journal-remote.o: src/journal/journal-remote.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-journal-remote.o -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo -c -o src/journal/systemd_journal_remote-journal-remote.o `test -f 'src/journal/journal-remote.c' || echo '$(srcdir)/'`src/journal/journal-remote.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-remote.c' object='src/journal/systemd_journal_remote-journal-remote.o' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_upload-journal-upload.o: src/journal-remote/journal-upload.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_upload-journal-upload.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload.Tpo -c -o src/journal-remote/systemd_journal_upload-journal-upload.o `test -f 'src/journal-remote/journal-upload.c' || echo '$(srcdir)/'`src/journal-remote/journal-upload.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-upload.c' object='src/journal-remote/systemd_journal_upload-journal-upload.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-journal-remote.o `test -f 'src/journal/journal-remote.c' || echo '$(srcdir)/'`src/journal/journal-remote.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_upload-journal-upload.o `test -f 'src/journal-remote/journal-upload.c' || echo '$(srcdir)/'`src/journal-remote/journal-upload.c
 
-src/journal/systemd_journal_remote-journal-remote.obj: src/journal/journal-remote.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-journal-remote.obj -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo -c -o src/journal/systemd_journal_remote-journal-remote.obj `if test -f 'src/journal/journal-remote.c'; then $(CYGPATH_W) 'src/journal/journal-remote.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-remote.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-journal-remote.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journal-remote.c' object='src/journal/systemd_journal_remote-journal-remote.obj' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_upload-journal-upload.obj: src/journal-remote/journal-upload.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_upload-journal-upload.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload.Tpo -c -o src/journal-remote/systemd_journal_upload-journal-upload.obj `if test -f 'src/journal-remote/journal-upload.c'; then $(CYGPATH_W) 'src/journal-remote/journal-upload.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-upload.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-upload.c' object='src/journal-remote/systemd_journal_upload-journal-upload.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-journal-remote.obj `if test -f 'src/journal/journal-remote.c'; then $(CYGPATH_W) 'src/journal/journal-remote.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journal-remote.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_upload-journal-upload.obj `if test -f 'src/journal-remote/journal-upload.c'; then $(CYGPATH_W) 'src/journal-remote/journal-upload.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-upload.c'; fi`
 
-src/journal/systemd_journal_remote-microhttpd-util.o: src/journal/microhttpd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-microhttpd-util.o -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo -c -o src/journal/systemd_journal_remote-microhttpd-util.o `test -f 'src/journal/microhttpd-util.c' || echo '$(srcdir)/'`src/journal/microhttpd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/microhttpd-util.c' object='src/journal/systemd_journal_remote-microhttpd-util.o' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_upload-journal-upload-journal.o: src/journal-remote/journal-upload-journal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_upload-journal-upload-journal.o -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload-journal.Tpo -c -o src/journal-remote/systemd_journal_upload-journal-upload-journal.o `test -f 'src/journal-remote/journal-upload-journal.c' || echo '$(srcdir)/'`src/journal-remote/journal-upload-journal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload-journal.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload-journal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-upload-journal.c' object='src/journal-remote/systemd_journal_upload-journal-upload-journal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-microhttpd-util.o `test -f 'src/journal/microhttpd-util.c' || echo '$(srcdir)/'`src/journal/microhttpd-util.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_upload-journal-upload-journal.o `test -f 'src/journal-remote/journal-upload-journal.c' || echo '$(srcdir)/'`src/journal-remote/journal-upload-journal.c
 
-src/journal/systemd_journal_remote-microhttpd-util.obj: src/journal/microhttpd-util.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -MT src/journal/systemd_journal_remote-microhttpd-util.obj -MD -MP -MF src/journal/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo -c -o src/journal/systemd_journal_remote-microhttpd-util.obj `if test -f 'src/journal/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/microhttpd-util.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Tpo src/journal/$(DEPDIR)/systemd_journal_remote-microhttpd-util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/microhttpd-util.c' object='src/journal/systemd_journal_remote-microhttpd-util.obj' libtool=no @AMDEPBACKSLASH@
+src/journal-remote/systemd_journal_upload-journal-upload-journal.obj: src/journal-remote/journal-upload-journal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -MT src/journal-remote/systemd_journal_upload-journal-upload-journal.obj -MD -MP -MF src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload-journal.Tpo -c -o src/journal-remote/systemd_journal_upload-journal-upload-journal.obj `if test -f 'src/journal-remote/journal-upload-journal.c'; then $(CYGPATH_W) 'src/journal-remote/journal-upload-journal.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-upload-journal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload-journal.Tpo src/journal-remote/$(DEPDIR)/systemd_journal_upload-journal-upload-journal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal-remote/journal-upload-journal.c' object='src/journal-remote/systemd_journal_upload-journal-upload-journal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_remote_CFLAGS) $(CFLAGS) -c -o src/journal/systemd_journal_remote-microhttpd-util.obj `if test -f 'src/journal/microhttpd-util.c'; then $(CYGPATH_W) 'src/journal/microhttpd-util.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/microhttpd-util.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_journal_upload_CFLAGS) $(CFLAGS) -c -o src/journal-remote/systemd_journal_upload-journal-upload-journal.obj `if test -f 'src/journal-remote/journal-upload-journal.c'; then $(CYGPATH_W) 'src/journal-remote/journal-upload-journal.c'; else $(CYGPATH_W) '$(srcdir)/src/journal-remote/journal-upload-journal.c'; fi`
+
+src/libsystemd-terminal/systemd_modeset-modeset.o: src/libsystemd-terminal/modeset.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_modeset_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/systemd_modeset-modeset.o -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/systemd_modeset-modeset.Tpo -c -o src/libsystemd-terminal/systemd_modeset-modeset.o `test -f 'src/libsystemd-terminal/modeset.c' || echo '$(srcdir)/'`src/libsystemd-terminal/modeset.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/systemd_modeset-modeset.Tpo src/libsystemd-terminal/$(DEPDIR)/systemd_modeset-modeset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/modeset.c' object='src/libsystemd-terminal/systemd_modeset-modeset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_modeset_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/systemd_modeset-modeset.o `test -f 'src/libsystemd-terminal/modeset.c' || echo '$(srcdir)/'`src/libsystemd-terminal/modeset.c
+
+src/libsystemd-terminal/systemd_modeset-modeset.obj: src/libsystemd-terminal/modeset.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_modeset_CFLAGS) $(CFLAGS) -MT src/libsystemd-terminal/systemd_modeset-modeset.obj -MD -MP -MF src/libsystemd-terminal/$(DEPDIR)/systemd_modeset-modeset.Tpo -c -o src/libsystemd-terminal/systemd_modeset-modeset.obj `if test -f 'src/libsystemd-terminal/modeset.c'; then $(CYGPATH_W) 'src/libsystemd-terminal/modeset.c'; else $(CYGPATH_W) '$(srcdir)/src/libsystemd-terminal/modeset.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/libsystemd-terminal/$(DEPDIR)/systemd_modeset-modeset.Tpo src/libsystemd-terminal/$(DEPDIR)/systemd_modeset-modeset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/libsystemd-terminal/modeset.c' object='src/libsystemd-terminal/systemd_modeset-modeset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_modeset_CFLAGS) $(CFLAGS) -c -o src/libsystemd-terminal/systemd_modeset-modeset.obj `if test -f 'src/libsystemd-terminal/modeset.c'; then $(CYGPATH_W) 'src/libsystemd-terminal/modeset.c'; else $(CYGPATH_W) '$(srcdir)/src/libsystemd-terminal/modeset.c'; fi`
 
 src/modules-load/systemd_modules_load-modules-load.o: src/modules-load/modules-load.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_modules_load_CFLAGS) $(CFLAGS) -MT src/modules-load/systemd_modules_load-modules-load.o -MD -MP -MF src/modules-load/$(DEPDIR)/systemd_modules_load-modules-load.Tpo -c -o src/modules-load/systemd_modules_load-modules-load.o `test -f 'src/modules-load/modules-load.c' || echo '$(srcdir)/'`src/modules-load/modules-load.c
@@ -14384,6 +16014,34 @@ src/network/systemd_networkd_wait_online-networkd-wait-online.obj: src/network/n
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -c -o src/network/systemd_networkd_wait_online-networkd-wait-online.obj `if test -f 'src/network/networkd-wait-online.c'; then $(CYGPATH_W) 'src/network/networkd-wait-online.c'; else $(CYGPATH_W) '$(srcdir)/src/network/networkd-wait-online.c'; fi`
 
+src/network/systemd_networkd_wait_online-networkd-wait-online-manager.o: src/network/networkd-wait-online-manager.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -MT src/network/systemd_networkd_wait_online-networkd-wait-online-manager.o -MD -MP -MF src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-manager.Tpo -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-manager.o `test -f 'src/network/networkd-wait-online-manager.c' || echo '$(srcdir)/'`src/network/networkd-wait-online-manager.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-manager.Tpo src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-wait-online-manager.c' object='src/network/systemd_networkd_wait_online-networkd-wait-online-manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-manager.o `test -f 'src/network/networkd-wait-online-manager.c' || echo '$(srcdir)/'`src/network/networkd-wait-online-manager.c
+
+src/network/systemd_networkd_wait_online-networkd-wait-online-manager.obj: src/network/networkd-wait-online-manager.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -MT src/network/systemd_networkd_wait_online-networkd-wait-online-manager.obj -MD -MP -MF src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-manager.Tpo -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-manager.obj `if test -f 'src/network/networkd-wait-online-manager.c'; then $(CYGPATH_W) 'src/network/networkd-wait-online-manager.c'; else $(CYGPATH_W) '$(srcdir)/src/network/networkd-wait-online-manager.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-manager.Tpo src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-wait-online-manager.c' object='src/network/systemd_networkd_wait_online-networkd-wait-online-manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-manager.obj `if test -f 'src/network/networkd-wait-online-manager.c'; then $(CYGPATH_W) 'src/network/networkd-wait-online-manager.c'; else $(CYGPATH_W) '$(srcdir)/src/network/networkd-wait-online-manager.c'; fi`
+
+src/network/systemd_networkd_wait_online-networkd-wait-online-link.o: src/network/networkd-wait-online-link.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -MT src/network/systemd_networkd_wait_online-networkd-wait-online-link.o -MD -MP -MF src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-link.Tpo -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-link.o `test -f 'src/network/networkd-wait-online-link.c' || echo '$(srcdir)/'`src/network/networkd-wait-online-link.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-link.Tpo src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-link.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-wait-online-link.c' object='src/network/systemd_networkd_wait_online-networkd-wait-online-link.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-link.o `test -f 'src/network/networkd-wait-online-link.c' || echo '$(srcdir)/'`src/network/networkd-wait-online-link.c
+
+src/network/systemd_networkd_wait_online-networkd-wait-online-link.obj: src/network/networkd-wait-online-link.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -MT src/network/systemd_networkd_wait_online-networkd-wait-online-link.obj -MD -MP -MF src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-link.Tpo -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-link.obj `if test -f 'src/network/networkd-wait-online-link.c'; then $(CYGPATH_W) 'src/network/networkd-wait-online-link.c'; else $(CYGPATH_W) '$(srcdir)/src/network/networkd-wait-online-link.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-link.Tpo src/network/$(DEPDIR)/systemd_networkd_wait_online-networkd-wait-online-link.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/network/networkd-wait-online-link.c' object='src/network/systemd_networkd_wait_online-networkd-wait-online-link.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_networkd_wait_online_CFLAGS) $(CFLAGS) -c -o src/network/systemd_networkd_wait_online-networkd-wait-online-link.obj `if test -f 'src/network/networkd-wait-online-link.c'; then $(CYGPATH_W) 'src/network/networkd-wait-online-link.c'; else $(CYGPATH_W) '$(srcdir)/src/network/networkd-wait-online-link.c'; fi`
+
 src/nspawn/systemd_nspawn-nspawn.o: src/nspawn/nspawn.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_nspawn_CFLAGS) $(CFLAGS) -MT src/nspawn/systemd_nspawn-nspawn.o -MD -MP -MF src/nspawn/$(DEPDIR)/systemd_nspawn-nspawn.Tpo -c -o src/nspawn/systemd_nspawn-nspawn.o `test -f 'src/nspawn/nspawn.c' || echo '$(srcdir)/'`src/nspawn/nspawn.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/nspawn/$(DEPDIR)/systemd_nspawn-nspawn.Tpo src/nspawn/$(DEPDIR)/systemd_nspawn-nspawn.Po
@@ -14426,48 +16084,6 @@ src/core/systemd_nspawn-loopback-setup.obj: src/core/loopback-setup.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_nspawn_CFLAGS) $(CFLAGS) -c -o src/core/systemd_nspawn-loopback-setup.obj `if test -f 'src/core/loopback-setup.c'; then $(CYGPATH_W) 'src/core/loopback-setup.c'; else $(CYGPATH_W) '$(srcdir)/src/core/loopback-setup.c'; fi`
 
-src/resolve/systemd_resolved-resolved.o: src/resolve/resolved.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -MT src/resolve/systemd_resolved-resolved.o -MD -MP -MF src/resolve/$(DEPDIR)/systemd_resolved-resolved.Tpo -c -o src/resolve/systemd_resolved-resolved.o `test -f 'src/resolve/resolved.c' || echo '$(srcdir)/'`src/resolve/resolved.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/resolve/$(DEPDIR)/systemd_resolved-resolved.Tpo src/resolve/$(DEPDIR)/systemd_resolved-resolved.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/resolve/resolved.c' object='src/resolve/systemd_resolved-resolved.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -c -o src/resolve/systemd_resolved-resolved.o `test -f 'src/resolve/resolved.c' || echo '$(srcdir)/'`src/resolve/resolved.c
-
-src/resolve/systemd_resolved-resolved.obj: src/resolve/resolved.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -MT src/resolve/systemd_resolved-resolved.obj -MD -MP -MF src/resolve/$(DEPDIR)/systemd_resolved-resolved.Tpo -c -o src/resolve/systemd_resolved-resolved.obj `if test -f 'src/resolve/resolved.c'; then $(CYGPATH_W) 'src/resolve/resolved.c'; else $(CYGPATH_W) '$(srcdir)/src/resolve/resolved.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/resolve/$(DEPDIR)/systemd_resolved-resolved.Tpo src/resolve/$(DEPDIR)/systemd_resolved-resolved.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/resolve/resolved.c' object='src/resolve/systemd_resolved-resolved.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -c -o src/resolve/systemd_resolved-resolved.obj `if test -f 'src/resolve/resolved.c'; then $(CYGPATH_W) 'src/resolve/resolved.c'; else $(CYGPATH_W) '$(srcdir)/src/resolve/resolved.c'; fi`
-
-src/resolve/systemd_resolved-resolved-manager.o: src/resolve/resolved-manager.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -MT src/resolve/systemd_resolved-resolved-manager.o -MD -MP -MF src/resolve/$(DEPDIR)/systemd_resolved-resolved-manager.Tpo -c -o src/resolve/systemd_resolved-resolved-manager.o `test -f 'src/resolve/resolved-manager.c' || echo '$(srcdir)/'`src/resolve/resolved-manager.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/resolve/$(DEPDIR)/systemd_resolved-resolved-manager.Tpo src/resolve/$(DEPDIR)/systemd_resolved-resolved-manager.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/resolve/resolved-manager.c' object='src/resolve/systemd_resolved-resolved-manager.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -c -o src/resolve/systemd_resolved-resolved-manager.o `test -f 'src/resolve/resolved-manager.c' || echo '$(srcdir)/'`src/resolve/resolved-manager.c
-
-src/resolve/systemd_resolved-resolved-manager.obj: src/resolve/resolved-manager.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -MT src/resolve/systemd_resolved-resolved-manager.obj -MD -MP -MF src/resolve/$(DEPDIR)/systemd_resolved-resolved-manager.Tpo -c -o src/resolve/systemd_resolved-resolved-manager.obj `if test -f 'src/resolve/resolved-manager.c'; then $(CYGPATH_W) 'src/resolve/resolved-manager.c'; else $(CYGPATH_W) '$(srcdir)/src/resolve/resolved-manager.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/resolve/$(DEPDIR)/systemd_resolved-resolved-manager.Tpo src/resolve/$(DEPDIR)/systemd_resolved-resolved-manager.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/resolve/resolved-manager.c' object='src/resolve/systemd_resolved-resolved-manager.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -c -o src/resolve/systemd_resolved-resolved-manager.obj `if test -f 'src/resolve/resolved-manager.c'; then $(CYGPATH_W) 'src/resolve/resolved-manager.c'; else $(CYGPATH_W) '$(srcdir)/src/resolve/resolved-manager.c'; fi`
-
-src/resolve/systemd_resolved-resolved-gperf.o: src/resolve/resolved-gperf.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -MT src/resolve/systemd_resolved-resolved-gperf.o -MD -MP -MF src/resolve/$(DEPDIR)/systemd_resolved-resolved-gperf.Tpo -c -o src/resolve/systemd_resolved-resolved-gperf.o `test -f 'src/resolve/resolved-gperf.c' || echo '$(srcdir)/'`src/resolve/resolved-gperf.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/resolve/$(DEPDIR)/systemd_resolved-resolved-gperf.Tpo src/resolve/$(DEPDIR)/systemd_resolved-resolved-gperf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/resolve/resolved-gperf.c' object='src/resolve/systemd_resolved-resolved-gperf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -c -o src/resolve/systemd_resolved-resolved-gperf.o `test -f 'src/resolve/resolved-gperf.c' || echo '$(srcdir)/'`src/resolve/resolved-gperf.c
-
-src/resolve/systemd_resolved-resolved-gperf.obj: src/resolve/resolved-gperf.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -MT src/resolve/systemd_resolved-resolved-gperf.obj -MD -MP -MF src/resolve/$(DEPDIR)/systemd_resolved-resolved-gperf.Tpo -c -o src/resolve/systemd_resolved-resolved-gperf.obj `if test -f 'src/resolve/resolved-gperf.c'; then $(CYGPATH_W) 'src/resolve/resolved-gperf.c'; else $(CYGPATH_W) '$(srcdir)/src/resolve/resolved-gperf.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/resolve/$(DEPDIR)/systemd_resolved-resolved-gperf.Tpo src/resolve/$(DEPDIR)/systemd_resolved-resolved-gperf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/resolve/resolved-gperf.c' object='src/resolve/systemd_resolved-resolved-gperf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_resolved_CFLAGS) $(CFLAGS) -c -o src/resolve/systemd_resolved-resolved-gperf.obj `if test -f 'src/resolve/resolved-gperf.c'; then $(CYGPATH_W) 'src/resolve/resolved-gperf.c'; else $(CYGPATH_W) '$(srcdir)/src/resolve/resolved-gperf.c'; fi`
-
 src/update-utmp/systemd_update_utmp-update-utmp.o: src/update-utmp/update-utmp.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(systemd_update_utmp_CFLAGS) $(CFLAGS) -MT src/update-utmp/systemd_update_utmp-update-utmp.o -MD -MP -MF src/update-utmp/$(DEPDIR)/systemd_update_utmp-update-utmp.Tpo -c -o src/update-utmp/systemd_update_utmp-update-utmp.o `test -f 'src/update-utmp/update-utmp.c' || echo '$(srcdir)/'`src/update-utmp/update-utmp.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/update-utmp/$(DEPDIR)/systemd_update_utmp-update-utmp.Tpo src/update-utmp/$(DEPDIR)/systemd_update_utmp-update-utmp.Po
@@ -14735,18 +16351,46 @@ src/test/test_sched_prio-test-sched-prio.obj: src/test/test-sched-prio.c
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_sched_prio_CPPFLAGS) $(CPPFLAGS) $(test_sched_prio_CFLAGS) $(CFLAGS) -c -o src/test/test_sched_prio-test-sched-prio.obj `if test -f 'src/test/test-sched-prio.c'; then $(CYGPATH_W) 'src/test/test-sched-prio.c'; else $(CYGPATH_W) '$(srcdir)/src/test/test-sched-prio.c'; fi`
 
 src/test/test_tables-test-tables.o: src/test/test-tables.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/test/test_tables-test-tables.o -MD -MP -MF src/test/$(DEPDIR)/test_tables-test-tables.Tpo -c -o src/test/test_tables-test-tables.o `test -f 'src/test/test-tables.c' || echo '$(srcdir)/'`src/test/test-tables.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/test/test_tables-test-tables.o -MD -MP -MF src/test/$(DEPDIR)/test_tables-test-tables.Tpo -c -o src/test/test_tables-test-tables.o `test -f 'src/test/test-tables.c' || echo '$(srcdir)/'`src/test/test-tables.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/test/$(DEPDIR)/test_tables-test-tables.Tpo src/test/$(DEPDIR)/test_tables-test-tables.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/test/test-tables.c' object='src/test/test_tables-test-tables.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/test/test_tables-test-tables.o `test -f 'src/test/test-tables.c' || echo '$(srcdir)/'`src/test/test-tables.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/test/test_tables-test-tables.o `test -f 'src/test/test-tables.c' || echo '$(srcdir)/'`src/test/test-tables.c
 
 src/test/test_tables-test-tables.obj: src/test/test-tables.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/test/test_tables-test-tables.obj -MD -MP -MF src/test/$(DEPDIR)/test_tables-test-tables.Tpo -c -o src/test/test_tables-test-tables.obj `if test -f 'src/test/test-tables.c'; then $(CYGPATH_W) 'src/test/test-tables.c'; else $(CYGPATH_W) '$(srcdir)/src/test/test-tables.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/test/test_tables-test-tables.obj -MD -MP -MF src/test/$(DEPDIR)/test_tables-test-tables.Tpo -c -o src/test/test_tables-test-tables.obj `if test -f 'src/test/test-tables.c'; then $(CYGPATH_W) 'src/test/test-tables.c'; else $(CYGPATH_W) '$(srcdir)/src/test/test-tables.c'; fi`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/test/$(DEPDIR)/test_tables-test-tables.Tpo src/test/$(DEPDIR)/test_tables-test-tables.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/test/test-tables.c' object='src/test/test_tables-test-tables.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/test/test_tables-test-tables.obj `if test -f 'src/test/test-tables.c'; then $(CYGPATH_W) 'src/test/test-tables.c'; else $(CYGPATH_W) '$(srcdir)/src/test/test-tables.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/test/test_tables-test-tables.obj `if test -f 'src/test/test-tables.c'; then $(CYGPATH_W) 'src/test/test-tables.c'; else $(CYGPATH_W) '$(srcdir)/src/test/test-tables.c'; fi`
+
+src/bus-proxyd/test_tables-bus-policy.o: src/bus-proxyd/bus-policy.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/bus-proxyd/test_tables-bus-policy.o -MD -MP -MF src/bus-proxyd/$(DEPDIR)/test_tables-bus-policy.Tpo -c -o src/bus-proxyd/test_tables-bus-policy.o `test -f 'src/bus-proxyd/bus-policy.c' || echo '$(srcdir)/'`src/bus-proxyd/bus-policy.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/bus-proxyd/$(DEPDIR)/test_tables-bus-policy.Tpo src/bus-proxyd/$(DEPDIR)/test_tables-bus-policy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/bus-proxyd/bus-policy.c' object='src/bus-proxyd/test_tables-bus-policy.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/bus-proxyd/test_tables-bus-policy.o `test -f 'src/bus-proxyd/bus-policy.c' || echo '$(srcdir)/'`src/bus-proxyd/bus-policy.c
+
+src/bus-proxyd/test_tables-bus-policy.obj: src/bus-proxyd/bus-policy.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/bus-proxyd/test_tables-bus-policy.obj -MD -MP -MF src/bus-proxyd/$(DEPDIR)/test_tables-bus-policy.Tpo -c -o src/bus-proxyd/test_tables-bus-policy.obj `if test -f 'src/bus-proxyd/bus-policy.c'; then $(CYGPATH_W) 'src/bus-proxyd/bus-policy.c'; else $(CYGPATH_W) '$(srcdir)/src/bus-proxyd/bus-policy.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/bus-proxyd/$(DEPDIR)/test_tables-bus-policy.Tpo src/bus-proxyd/$(DEPDIR)/test_tables-bus-policy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/bus-proxyd/bus-policy.c' object='src/bus-proxyd/test_tables-bus-policy.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/bus-proxyd/test_tables-bus-policy.obj `if test -f 'src/bus-proxyd/bus-policy.c'; then $(CYGPATH_W) 'src/bus-proxyd/bus-policy.c'; else $(CYGPATH_W) '$(srcdir)/src/bus-proxyd/bus-policy.c'; fi`
+
+src/journal/test_tables-journald-server.o: src/journal/journald-server.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/journal/test_tables-journald-server.o -MD -MP -MF src/journal/$(DEPDIR)/test_tables-journald-server.Tpo -c -o src/journal/test_tables-journald-server.o `test -f 'src/journal/journald-server.c' || echo '$(srcdir)/'`src/journal/journald-server.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/test_tables-journald-server.Tpo src/journal/$(DEPDIR)/test_tables-journald-server.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journald-server.c' object='src/journal/test_tables-journald-server.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/journal/test_tables-journald-server.o `test -f 'src/journal/journald-server.c' || echo '$(srcdir)/'`src/journal/journald-server.c
+
+src/journal/test_tables-journald-server.obj: src/journal/journald-server.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -MT src/journal/test_tables-journald-server.obj -MD -MP -MF src/journal/$(DEPDIR)/test_tables-journald-server.Tpo -c -o src/journal/test_tables-journald-server.obj `if test -f 'src/journal/journald-server.c'; then $(CYGPATH_W) 'src/journal/journald-server.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journald-server.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/journal/$(DEPDIR)/test_tables-journald-server.Tpo src/journal/$(DEPDIR)/test_tables-journald-server.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/journal/journald-server.c' object='src/journal/test_tables-journald-server.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_tables_CPPFLAGS) $(CPPFLAGS) $(test_tables_CFLAGS) $(CFLAGS) -c -o src/journal/test_tables-journald-server.obj `if test -f 'src/journal/journald-server.c'; then $(CYGPATH_W) 'src/journal/journald-server.c'; else $(CYGPATH_W) '$(srcdir)/src/journal/journald-server.c'; fi`
 
 src/test/test_unit_file-test-unit-file.o: src/test/test-unit-file.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_unit_file_CFLAGS) $(CFLAGS) -MT src/test/test_unit_file-test-unit-file.o -MD -MP -MF src/test/$(DEPDIR)/test_unit_file-test-unit-file.Tpo -c -o src/test/test_unit_file-test-unit-file.o `test -f 'src/test/test-unit-file.c' || echo '$(srcdir)/'`src/test/test-unit-file.c
@@ -14785,11 +16429,13 @@ clean-libtool:
        -rm -rf src/gudev/.libs src/gudev/_libs
        -rm -rf src/journal/.libs src/journal/_libs
        -rm -rf src/libsystemd-network/.libs src/libsystemd-network/_libs
+       -rm -rf src/libsystemd-terminal/.libs src/libsystemd-terminal/_libs
        -rm -rf src/libsystemd/sd-bus/.libs src/libsystemd/sd-bus/_libs
        -rm -rf src/libsystemd/sd-daemon/.libs src/libsystemd/sd-daemon/_libs
        -rm -rf src/libsystemd/sd-event/.libs src/libsystemd/sd-event/_libs
        -rm -rf src/libsystemd/sd-id128/.libs src/libsystemd/sd-id128/_libs
        -rm -rf src/libsystemd/sd-login/.libs src/libsystemd/sd-login/_libs
+       -rm -rf src/libsystemd/sd-network/.libs src/libsystemd/sd-network/_libs
        -rm -rf src/libsystemd/sd-path/.libs src/libsystemd/sd-path/_libs
        -rm -rf src/libsystemd/sd-resolve/.libs src/libsystemd/sd-resolve/_libs
        -rm -rf src/libsystemd/sd-rtnl/.libs src/libsystemd/sd-rtnl/_libs
@@ -14799,6 +16445,8 @@ clean-libtool:
        -rm -rf src/machine/.libs src/machine/_libs
        -rm -rf src/network/.libs src/network/_libs
        -rm -rf src/nss-myhostname/.libs src/nss-myhostname/_libs
+       -rm -rf src/nss-mymachines/.libs src/nss-mymachines/_libs
+       -rm -rf src/nss-resolve/.libs src/nss-resolve/_libs
        -rm -rf src/python-systemd/.libs src/python-systemd/_libs
        -rm -rf src/shared/.libs src/shared/_libs
        -rm -rf src/udev/.libs src/udev/_libs
@@ -15174,6 +16822,48 @@ uninstall-dist_docDATA:
        @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+install-dist_factory_etcDATA: $(dist_factory_etc_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(dist_factory_etc_DATA)'; test -n "$(factory_etcdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(factory_etcdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(factory_etcdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(factory_etcdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(factory_etcdir)" || exit $$?; \
+       done
+
+uninstall-dist_factory_etcDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_factory_etc_DATA)'; test -n "$(factory_etcdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(factory_etcdir)'; $(am__uninstall_files_from_dir)
+install-dist_factory_pamDATA: $(dist_factory_pam_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(dist_factory_pam_DATA)'; test -n "$(factory_pamdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(factory_pamdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(factory_pamdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(factory_pamdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(factory_pamdir)" || exit $$?; \
+       done
+
+uninstall-dist_factory_pamDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_factory_pam_DATA)'; test -n "$(factory_pamdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(factory_pamdir)'; $(am__uninstall_files_from_dir)
 install-dist_gatewayddocumentrootDATA: $(dist_gatewayddocumentroot_DATA)
        @$(NORMAL_INSTALL)
        @list='$(dist_gatewayddocumentroot_DATA)'; test -n "$(gatewayddocumentrootdir)" || list=; \
@@ -15216,27 +16906,6 @@ uninstall-dist_networkDATA:
        @list='$(dist_network_DATA)'; test -n "$(networkdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(networkdir)'; $(am__uninstall_files_from_dir)
-install-dist_ntpunitsDATA: $(dist_ntpunits_DATA)
-       @$(NORMAL_INSTALL)
-       @list='$(dist_ntpunits_DATA)'; test -n "$(ntpunitsdir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(ntpunitsdir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(ntpunitsdir)" || exit 1; \
-       fi; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ntpunitsdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(ntpunitsdir)" || exit $$?; \
-       done
-
-uninstall-dist_ntpunitsDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_ntpunits_DATA)'; test -n "$(ntpunitsdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       dir='$(DESTDIR)$(ntpunitsdir)'; $(am__uninstall_files_from_dir)
 install-dist_pamconfDATA: $(dist_pamconf_DATA)
        @$(NORMAL_INSTALL)
        @list='$(dist_pamconf_DATA)'; test -n "$(pamconfdir)" || list=; \
@@ -15300,27 +16969,6 @@ uninstall-dist_pkgsysconfDATA:
        @list='$(dist_pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(pkgsysconfdir)'; $(am__uninstall_files_from_dir)
-install-dist_polkitpolicyDATA: $(dist_polkitpolicy_DATA)
-       @$(NORMAL_INSTALL)
-       @list='$(dist_polkitpolicy_DATA)'; test -n "$(polkitpolicydir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(polkitpolicydir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(polkitpolicydir)" || exit 1; \
-       fi; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(polkitpolicydir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(polkitpolicydir)" || exit $$?; \
-       done
-
-uninstall-dist_polkitpolicyDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_polkitpolicy_DATA)'; test -n "$(polkitpolicydir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       dir='$(DESTDIR)$(polkitpolicydir)'; $(am__uninstall_files_from_dir)
 install-dist_sysctlDATA: $(dist_sysctl_DATA)
        @$(NORMAL_INSTALL)
        @list='$(dist_sysctl_DATA)'; test -n "$(sysctldir)" || list=; \
@@ -15552,6 +17200,27 @@ uninstall-girDATA:
        @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir)
+install-nodist_bashcompletionDATA: $(nodist_bashcompletion_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(nodist_bashcompletion_DATA)'; test -n "$(bashcompletiondir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bashcompletiondir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bashcompletiondir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bashcompletiondir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(bashcompletiondir)" || exit $$?; \
+       done
+
+uninstall-nodist_bashcompletionDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(nodist_bashcompletion_DATA)'; test -n "$(bashcompletiondir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(bashcompletiondir)'; $(am__uninstall_files_from_dir)
 install-nodist_pkgsysconfDATA: $(nodist_pkgsysconf_DATA)
        @$(NORMAL_INSTALL)
        @list='$(nodist_pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
@@ -15573,6 +17242,27 @@ uninstall-nodist_pkgsysconfDATA:
        @list='$(nodist_pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(pkgsysconfdir)'; $(am__uninstall_files_from_dir)
+install-nodist_polkitpolicyDATA: $(nodist_polkitpolicy_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(nodist_polkitpolicy_DATA)'; test -n "$(polkitpolicydir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(polkitpolicydir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(polkitpolicydir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(polkitpolicydir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(polkitpolicydir)" || exit $$?; \
+       done
+
+uninstall-nodist_polkitpolicyDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(nodist_polkitpolicy_DATA)'; test -n "$(polkitpolicydir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(polkitpolicydir)'; $(am__uninstall_files_from_dir)
 install-nodist_rpmmacrosDATA: $(nodist_rpmmacros_DATA)
        @$(NORMAL_INSTALL)
        @list='$(nodist_rpmmacros_DATA)'; test -n "$(rpmmacrosdir)" || list=; \
@@ -15636,6 +17326,27 @@ uninstall-nodist_sysusersDATA:
        @list='$(nodist_sysusers_DATA)'; test -n "$(sysusersdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(sysusersdir)'; $(am__uninstall_files_from_dir)
+install-nodist_tmpfilesDATA: $(nodist_tmpfiles_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(nodist_tmpfiles_DATA)'; test -n "$(tmpfilesdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tmpfilesdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tmpfilesdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tmpfilesdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tmpfilesdir)" || exit $$?; \
+       done
+
+uninstall-nodist_tmpfilesDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(nodist_tmpfiles_DATA)'; test -n "$(tmpfilesdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tmpfilesdir)'; $(am__uninstall_files_from_dir)
 install-nodist_udevrulesDATA: $(nodist_udevrules_DATA)
        @$(NORMAL_INSTALL)
        @list='$(nodist_udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \
@@ -15678,6 +17389,27 @@ uninstall-nodist_userunitDATA:
        @list='$(nodist_userunit_DATA)'; test -n "$(userunitdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(userunitdir)'; $(am__uninstall_files_from_dir)
+install-nodist_zshcompletionDATA: $(nodist_zshcompletion_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(nodist_zshcompletion_DATA)'; test -n "$(zshcompletiondir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(zshcompletiondir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(zshcompletiondir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(zshcompletiondir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(zshcompletiondir)" || exit $$?; \
+       done
+
+uninstall-nodist_zshcompletionDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(nodist_zshcompletion_DATA)'; test -n "$(zshcompletiondir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(zshcompletiondir)'; $(am__uninstall_files_from_dir)
 install-pkgconfigdataDATA: $(pkgconfigdata_DATA)
        @$(NORMAL_INSTALL)
        @list='$(pkgconfigdata_DATA)'; test -n "$(pkgconfigdatadir)" || list=; \
@@ -16150,6 +17882,20 @@ test/rules-test.sh.log: test/rules-test.sh
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-engine.log: test-engine$(EXEEXT)
+       @p='test-engine$(EXEEXT)'; \
+       b='test-engine'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-cgroup-mask.log: test-cgroup-mask$(EXEEXT)
+       @p='test-cgroup-mask$(EXEEXT)'; \
+       b='test-cgroup-mask'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-job-type.log: test-job-type$(EXEEXT)
        @p='test-job-type$(EXEEXT)'; \
        b='test-job-type'; \
@@ -16234,6 +17980,20 @@ test-ring.log: test-ring$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-barrier.log: test-barrier$(EXEEXT)
+       @p='test-barrier$(EXEEXT)'; \
+       b='test-barrier'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-pty.log: test-pty$(EXEEXT)
+       @p='test-pty$(EXEEXT)'; \
+       b='test-pty'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-tmpfiles.log: test-tmpfiles$(EXEEXT)
        @p='test-tmpfiles$(EXEEXT)'; \
        b='test-tmpfiles'; \
@@ -16325,6 +18085,13 @@ test-hashmap.log: test-hashmap$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-set.log: test-set$(EXEEXT)
+       @p='test-set$(EXEEXT)'; \
+       b='test-set'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-list.log: test-list$(EXEEXT)
        @p='test-list$(EXEEXT)'; \
        b='test-list'; \
@@ -16402,6 +18169,27 @@ test-ratelimit.log: test-ratelimit$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-condition-util.log: test-condition-util$(EXEEXT)
+       @p='test-condition-util$(EXEEXT)'; \
+       b='test-condition-util'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-uid-range.log: test-uid-range$(EXEEXT)
+       @p='test-uid-range$(EXEEXT)'; \
+       b='test-uid-range'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-bus-policy.log: test-bus-policy$(EXEEXT)
+       @p='test-bus-policy$(EXEEXT)'; \
+       b='test-bus-policy'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-bus-marshal.log: test-bus-marshal$(EXEEXT)
        @p='test-bus-marshal$(EXEEXT)'; \
        b='test-bus-marshal'; \
@@ -16465,13 +18253,6 @@ test-bus-kernel-benchmark.log: test-bus-kernel-benchmark$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-bus-memfd.log: test-bus-memfd$(EXEEXT)
-       @p='test-bus-memfd$(EXEEXT)'; \
-       b='test-bus-memfd'; \
-       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
-       --log-file $$b.log --trs-file $$b.trs \
-       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
-       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-bus-zero-copy.log: test-bus-zero-copy$(EXEEXT)
        @p='test-bus-zero-copy$(EXEEXT)'; \
        b='test-bus-zero-copy'; \
@@ -16577,6 +18358,27 @@ test-dhcp6-client.log: test-dhcp6-client$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-term-page.log: test-term-page$(EXEEXT)
+       @p='test-term-page$(EXEEXT)'; \
+       b='test-term-page'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-term-parser.log: test-term-parser$(EXEEXT)
+       @p='test-term-parser$(EXEEXT)'; \
+       b='test-term-parser'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-unifont.log: test-unifont$(EXEEXT)
+       @p='test-unifont$(EXEEXT)'; \
+       b='test-unifont'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-id128.log: test-id128$(EXEEXT)
        @p='test-id128$(EXEEXT)'; \
        b='test-id128'; \
@@ -16668,6 +18470,13 @@ test-compress.log: test-compress$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-compress-benchmark.log: test-compress-benchmark$(EXEEXT)
+       @p='test-compress-benchmark$(EXEEXT)'; \
+       b='test-compress-benchmark'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-machine-tables.log: test-machine-tables$(EXEEXT)
        @p='test-machine-tables$(EXEEXT)'; \
        b='test-machine-tables'; \
@@ -16675,6 +18484,13 @@ test-machine-tables.log: test-machine-tables$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-dns-domain.log: test-dns-domain$(EXEEXT)
+       @p='test-dns-domain$(EXEEXT)'; \
+       b='test-dns-domain'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-network.log: test-network$(EXEEXT)
        @p='test-network$(EXEEXT)'; \
        b='test-network'; \
@@ -16682,6 +18498,13 @@ test-network.log: test-network$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-network-tables.log: test-network-tables$(EXEEXT)
+       @p='test-network-tables$(EXEEXT)'; \
+       b='test-network-tables'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-login-tables.log: test-login-tables$(EXEEXT)
        @p='test-login-tables$(EXEEXT)'; \
        b='test-login-tables'; \
@@ -16916,7 +18739,7 @@ install-binPROGRAMS: install-libLTLIBRARIES
 
 installdirs: installdirs-recursive
 installdirs-am:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pamlibdir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(rootbindir)" "$(DESTDIR)$(rootlibexecdir)" "$(DESTDIR)$(systemgeneratordir)" "$(DESTDIR)$(udevlibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(kernelinstalldir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(catalogdir)" "$(DESTDIR)$(dbuspolicydir)" "$(DESTDIR)$(dbussystemservicedir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(gatewayddocumentrootdir)" "$(DESTDIR)$(networkdir)" "$(DESTDIR)$(ntpunitsdir)" "$(DESTDIR)$(pamconfdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(polkitpolicydir)" "$(DESTDIR)$(sysctldir)" "$(DESTDIR)$(systempresetdir)" "$(DESTDIR)$(systemunitdir)" "$(DESTDIR)$(sysusersdir)" "$(DESTDIR)$(tmpfilesdir)" "$(DESTDIR)$(udevconfdir)" "$(DESTDIR)$(udevhwdbdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(userunitdir)" "$(DESTDIR)$(zshcompletiondir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(rpmmacrosdir)" "$(DESTDIR)$(systemunitdir)" "$(DESTDIR)$(sysusersdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(userunitdir)" "$(DESTDIR)$(pkgconfigdatadir)" "$(DESTDIR)$(pkgconfiglibdir)" "$(DESTDIR)$(sharepkgconfigdir)" "$(DESTDIR)$(sysctldir)" "$(DESTDIR)$(sysvinitdir)" "$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(varlogdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(libgudev_includedir)" "$(DESTDIR)$(pkgincludedir)"; do \
+       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pamlibdir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(rootbindir)" "$(DESTDIR)$(rootlibexecdir)" "$(DESTDIR)$(systemgeneratordir)" "$(DESTDIR)$(udevlibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(kernelinstalldir)" "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(catalogdir)" "$(DESTDIR)$(dbuspolicydir)" "$(DESTDIR)$(dbussystemservicedir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(factory_etcdir)" "$(DESTDIR)$(factory_pamdir)" "$(DESTDIR)$(gatewayddocumentrootdir)" "$(DESTDIR)$(networkdir)" "$(DESTDIR)$(pamconfdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(sysctldir)" "$(DESTDIR)$(systempresetdir)" "$(DESTDIR)$(systemunitdir)" "$(DESTDIR)$(sysusersdir)" "$(DESTDIR)$(tmpfilesdir)" "$(DESTDIR)$(udevconfdir)" "$(DESTDIR)$(udevhwdbdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(userunitdir)" "$(DESTDIR)$(zshcompletiondir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(polkitpolicydir)" "$(DESTDIR)$(rpmmacrosdir)" "$(DESTDIR)$(systemunitdir)" "$(DESTDIR)$(sysusersdir)" "$(DESTDIR)$(tmpfilesdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(userunitdir)" "$(DESTDIR)$(zshcompletiondir)" "$(DESTDIR)$(pkgconfigdatadir)" "$(DESTDIR)$(pkgconfiglibdir)" "$(DESTDIR)$(sharepkgconfigdir)" "$(DESTDIR)$(sysctldir)" "$(DESTDIR)$(sysvinitdir)" "$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(varlogdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(libgudev_includedir)" "$(DESTDIR)$(pkgincludedir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: $(BUILT_SOURCES)
@@ -16974,6 +18797,8 @@ distclean-generic:
        -rm -f src/cgroups-agent/$(am__dirstamp)
        -rm -f src/cgtop/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/cgtop/$(am__dirstamp)
+       -rm -f src/console/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/console/$(am__dirstamp)
        -rm -f src/core/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/core/$(am__dirstamp)
        -rm -f src/cryptsetup/$(DEPDIR)/$(am__dirstamp)
@@ -16988,6 +18813,10 @@ distclean-generic:
        -rm -f src/detect-virt/$(am__dirstamp)
        -rm -f src/efi-boot-generator/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/efi-boot-generator/$(am__dirstamp)
+       -rm -f src/escape/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/escape/$(am__dirstamp)
+       -rm -f src/firstboot/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/firstboot/$(am__dirstamp)
        -rm -f src/fsck/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/fsck/$(am__dirstamp)
        -rm -f src/fstab-generator/$(DEPDIR)/$(am__dirstamp)
@@ -16998,14 +18827,20 @@ distclean-generic:
        -rm -f src/gpt-auto-generator/$(am__dirstamp)
        -rm -f src/gudev/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/gudev/$(am__dirstamp)
+       -rm -f src/hibernate-resume/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/hibernate-resume/$(am__dirstamp)
        -rm -f src/hostname/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/hostname/$(am__dirstamp)
        -rm -f src/initctl/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/initctl/$(am__dirstamp)
+       -rm -f src/journal-remote/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/journal-remote/$(am__dirstamp)
        -rm -f src/journal/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/journal/$(am__dirstamp)
        -rm -f src/libsystemd-network/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/libsystemd-network/$(am__dirstamp)
+       -rm -f src/libsystemd-terminal/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/libsystemd-terminal/$(am__dirstamp)
        -rm -f src/libsystemd/sd-bus/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/libsystemd/sd-bus/$(am__dirstamp)
        -rm -f src/libsystemd/sd-daemon/$(DEPDIR)/$(am__dirstamp)
@@ -17016,6 +18851,8 @@ distclean-generic:
        -rm -f src/libsystemd/sd-id128/$(am__dirstamp)
        -rm -f src/libsystemd/sd-login/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/libsystemd/sd-login/$(am__dirstamp)
+       -rm -f src/libsystemd/sd-network/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/libsystemd/sd-network/$(am__dirstamp)
        -rm -f src/libsystemd/sd-path/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/libsystemd/sd-path/$(am__dirstamp)
        -rm -f src/libsystemd/sd-resolve/$(DEPDIR)/$(am__dirstamp)
@@ -17044,6 +18881,10 @@ distclean-generic:
        -rm -f src/nspawn/$(am__dirstamp)
        -rm -f src/nss-myhostname/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/nss-myhostname/$(am__dirstamp)
+       -rm -f src/nss-mymachines/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/nss-mymachines/$(am__dirstamp)
+       -rm -f src/nss-resolve/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/nss-resolve/$(am__dirstamp)
        -rm -f src/path/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/path/$(am__dirstamp)
        -rm -f src/python-systemd/$(DEPDIR)/$(am__dirstamp)
@@ -17054,12 +18895,12 @@ distclean-generic:
        -rm -f src/random-seed/$(am__dirstamp)
        -rm -f src/rc-local-generator/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/rc-local-generator/$(am__dirstamp)
-       -rm -f src/readahead/$(DEPDIR)/$(am__dirstamp)
-       -rm -f src/readahead/$(am__dirstamp)
        -rm -f src/remount-fs/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/remount-fs/$(am__dirstamp)
        -rm -f src/reply-password/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/reply-password/$(am__dirstamp)
+       -rm -f src/resolve-host/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/resolve-host/$(am__dirstamp)
        -rm -f src/resolve/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/resolve/$(am__dirstamp)
        -rm -f src/rfkill/$(DEPDIR)/$(am__dirstamp)
@@ -17136,7 +18977,7 @@ clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
 
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf ./$(DEPDIR) src/ac-power/$(DEPDIR) src/activate/$(DEPDIR) src/analyze/$(DEPDIR) src/ask-password/$(DEPDIR) src/backlight/$(DEPDIR) src/binfmt/$(DEPDIR) src/boot/$(DEPDIR) src/bootchart/$(DEPDIR) src/bus-proxyd/$(DEPDIR) src/cgls/$(DEPDIR) src/cgroups-agent/$(DEPDIR) src/cgtop/$(DEPDIR) src/core/$(DEPDIR) src/cryptsetup/$(DEPDIR) src/dbus1-generator/$(DEPDIR) src/debug-generator/$(DEPDIR) src/delta/$(DEPDIR) src/detect-virt/$(DEPDIR) src/efi-boot-generator/$(DEPDIR) src/fsck/$(DEPDIR) src/fstab-generator/$(DEPDIR) src/getty-generator/$(DEPDIR) src/gpt-auto-generator/$(DEPDIR) src/gudev/$(DEPDIR) src/hostname/$(DEPDIR) src/initctl/$(DEPDIR) src/journal/$(DEPDIR) src/libsystemd-network/$(DEPDIR) src/libsystemd/sd-bus/$(DEPDIR) src/libsystemd/sd-daemon/$(DEPDIR) src/libsystemd/sd-event/$(DEPDIR) src/libsystemd/sd-id128/$(DEPDIR) src/libsystemd/sd-login/$(DEPDIR) src/libsystemd/sd-path/$(DEPDIR) src/libsystemd/sd-resolve/$(DEPDIR) src/libsystemd/sd-rtnl/$(DEPDIR) src/libsystemd/sd-utf8/$(DEPDIR) src/libudev/$(DEPDIR) src/locale/$(DEPDIR) src/login/$(DEPDIR) src/machine-id-setup/$(DEPDIR) src/machine/$(DEPDIR) src/modules-load/$(DEPDIR) src/network/$(DEPDIR) src/notify/$(DEPDIR) src/nspawn/$(DEPDIR) src/nss-myhostname/$(DEPDIR) src/path/$(DEPDIR) src/python-systemd/$(DEPDIR) src/quotacheck/$(DEPDIR) src/random-seed/$(DEPDIR) src/rc-local-generator/$(DEPDIR) src/readahead/$(DEPDIR) src/remount-fs/$(DEPDIR) src/reply-password/$(DEPDIR) src/resolve/$(DEPDIR) src/rfkill/$(DEPDIR) src/run/$(DEPDIR) src/shared/$(DEPDIR) src/shutdownd/$(DEPDIR) src/sleep/$(DEPDIR) src/socket-proxy/$(DEPDIR) src/sysctl/$(DEPDIR) src/system-update-generator/$(DEPDIR) src/systemctl/$(DEPDIR) src/sysusers/$(DEPDIR) src/sysv-generator/$(DEPDIR) src/test/$(DEPDIR) src/timedate/$(DEPDIR) src/timesync/$(DEPDIR) src/tmpfiles/$(DEPDIR) src/tty-ask-password-agent/$(DEPDIR) src/udev/$(DEPDIR) src/udev/accelerometer/$(DEPDIR) src/udev/ata_id/$(DEPDIR) src/udev/cdrom_id/$(DEPDIR) src/udev/collect/$(DEPDIR) src/udev/mtd_probe/$(DEPDIR) src/udev/net/$(DEPDIR) src/udev/scsi_id/$(DEPDIR) src/udev/v4l_id/$(DEPDIR) src/update-done/$(DEPDIR) src/update-utmp/$(DEPDIR) src/vconsole/$(DEPDIR)
+       -rm -rf ./$(DEPDIR) src/ac-power/$(DEPDIR) src/activate/$(DEPDIR) src/analyze/$(DEPDIR) src/ask-password/$(DEPDIR) src/backlight/$(DEPDIR) src/binfmt/$(DEPDIR) src/boot/$(DEPDIR) src/bootchart/$(DEPDIR) src/bus-proxyd/$(DEPDIR) src/cgls/$(DEPDIR) src/cgroups-agent/$(DEPDIR) src/cgtop/$(DEPDIR) src/console/$(DEPDIR) src/core/$(DEPDIR) src/cryptsetup/$(DEPDIR) src/dbus1-generator/$(DEPDIR) src/debug-generator/$(DEPDIR) src/delta/$(DEPDIR) src/detect-virt/$(DEPDIR) src/efi-boot-generator/$(DEPDIR) src/escape/$(DEPDIR) src/firstboot/$(DEPDIR) src/fsck/$(DEPDIR) src/fstab-generator/$(DEPDIR) src/getty-generator/$(DEPDIR) src/gpt-auto-generator/$(DEPDIR) src/gudev/$(DEPDIR) src/hibernate-resume/$(DEPDIR) src/hostname/$(DEPDIR) src/initctl/$(DEPDIR) src/journal-remote/$(DEPDIR) src/journal/$(DEPDIR) src/libsystemd-network/$(DEPDIR) src/libsystemd-terminal/$(DEPDIR) src/libsystemd/sd-bus/$(DEPDIR) src/libsystemd/sd-daemon/$(DEPDIR) src/libsystemd/sd-event/$(DEPDIR) src/libsystemd/sd-id128/$(DEPDIR) src/libsystemd/sd-login/$(DEPDIR) src/libsystemd/sd-network/$(DEPDIR) src/libsystemd/sd-path/$(DEPDIR) src/libsystemd/sd-resolve/$(DEPDIR) src/libsystemd/sd-rtnl/$(DEPDIR) src/libsystemd/sd-utf8/$(DEPDIR) src/libudev/$(DEPDIR) src/locale/$(DEPDIR) src/login/$(DEPDIR) src/machine-id-setup/$(DEPDIR) src/machine/$(DEPDIR) src/modules-load/$(DEPDIR) src/network/$(DEPDIR) src/notify/$(DEPDIR) src/nspawn/$(DEPDIR) src/nss-myhostname/$(DEPDIR) src/nss-mymachines/$(DEPDIR) src/nss-resolve/$(DEPDIR) src/path/$(DEPDIR) src/python-systemd/$(DEPDIR) src/quotacheck/$(DEPDIR) src/random-seed/$(DEPDIR) src/rc-local-generator/$(DEPDIR) src/remount-fs/$(DEPDIR) src/reply-password/$(DEPDIR) src/resolve-host/$(DEPDIR) src/resolve/$(DEPDIR) src/rfkill/$(DEPDIR) src/run/$(DEPDIR) src/shared/$(DEPDIR) src/shutdownd/$(DEPDIR) src/sleep/$(DEPDIR) src/socket-proxy/$(DEPDIR) src/sysctl/$(DEPDIR) src/system-update-generator/$(DEPDIR) src/systemctl/$(DEPDIR) src/sysusers/$(DEPDIR) src/sysv-generator/$(DEPDIR) src/test/$(DEPDIR) src/timedate/$(DEPDIR) src/timesync/$(DEPDIR) src/tmpfiles/$(DEPDIR) src/tty-ask-password-agent/$(DEPDIR) src/udev/$(DEPDIR) src/udev/accelerometer/$(DEPDIR) src/udev/ata_id/$(DEPDIR) src/udev/cdrom_id/$(DEPDIR) src/udev/collect/$(DEPDIR) src/udev/mtd_probe/$(DEPDIR) src/udev/net/$(DEPDIR) src/udev/scsi_id/$(DEPDIR) src/udev/v4l_id/$(DEPDIR) src/update-done/$(DEPDIR) src/update-utmp/$(DEPDIR) src/vconsole/$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
        distclean-hdr distclean-libtool distclean-local distclean-tags
@@ -17156,21 +18997,23 @@ info-am:
 install-data-am: install-dist_bashcompletionDATA \
        install-dist_catalogDATA install-dist_dbuspolicyDATA \
        install-dist_dbussystemserviceDATA install-dist_docDATA \
+       install-dist_factory_etcDATA install-dist_factory_pamDATA \
        install-dist_gatewayddocumentrootDATA \
        install-dist_kernelinstallSCRIPTS install-dist_networkDATA \
-       install-dist_ntpunitsDATA install-dist_pamconfDATA \
-       install-dist_pkgdataDATA install-dist_pkgsysconfDATA \
-       install-dist_polkitpolicyDATA install-dist_sysctlDATA \
+       install-dist_pamconfDATA install-dist_pkgdataDATA \
+       install-dist_pkgsysconfDATA install-dist_sysctlDATA \
        install-dist_systempresetDATA install-dist_systemunitDATA \
        install-dist_sysusersDATA install-dist_tmpfilesDATA \
        install-dist_udevconfDATA install-dist_udevhwdbDATA \
        install-dist_udevrulesDATA install-dist_userunitDATA \
        install-dist_zshcompletionDATA install-girDATA \
        install-includeHEADERS install-libgudev_includeHEADERS \
-       install-man install-nodist_pkgsysconfDATA \
+       install-man install-nodist_bashcompletionDATA \
+       install-nodist_pkgsysconfDATA install-nodist_polkitpolicyDATA \
        install-nodist_rpmmacrosDATA install-nodist_systemunitDATA \
-       install-nodist_sysusersDATA install-nodist_udevrulesDATA \
-       install-nodist_userunitDATA install-pamlibLTLIBRARIES \
+       install-nodist_sysusersDATA install-nodist_tmpfilesDATA \
+       install-nodist_udevrulesDATA install-nodist_userunitDATA \
+       install-nodist_zshcompletionDATA install-pamlibLTLIBRARIES \
        install-pkgconfigdataDATA install-pkgconfiglibDATA \
        install-pkgincludeHEADERS install-rootbinPROGRAMS \
        install-sharepkgconfigDATA install-sysctlDATA \
@@ -17212,7 +19055,7 @@ installcheck-am:
 maintainer-clean: maintainer-clean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
        -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf ./$(DEPDIR) src/ac-power/$(DEPDIR) src/activate/$(DEPDIR) src/analyze/$(DEPDIR) src/ask-password/$(DEPDIR) src/backlight/$(DEPDIR) src/binfmt/$(DEPDIR) src/boot/$(DEPDIR) src/bootchart/$(DEPDIR) src/bus-proxyd/$(DEPDIR) src/cgls/$(DEPDIR) src/cgroups-agent/$(DEPDIR) src/cgtop/$(DEPDIR) src/core/$(DEPDIR) src/cryptsetup/$(DEPDIR) src/dbus1-generator/$(DEPDIR) src/debug-generator/$(DEPDIR) src/delta/$(DEPDIR) src/detect-virt/$(DEPDIR) src/efi-boot-generator/$(DEPDIR) src/fsck/$(DEPDIR) src/fstab-generator/$(DEPDIR) src/getty-generator/$(DEPDIR) src/gpt-auto-generator/$(DEPDIR) src/gudev/$(DEPDIR) src/hostname/$(DEPDIR) src/initctl/$(DEPDIR) src/journal/$(DEPDIR) src/libsystemd-network/$(DEPDIR) src/libsystemd/sd-bus/$(DEPDIR) src/libsystemd/sd-daemon/$(DEPDIR) src/libsystemd/sd-event/$(DEPDIR) src/libsystemd/sd-id128/$(DEPDIR) src/libsystemd/sd-login/$(DEPDIR) src/libsystemd/sd-path/$(DEPDIR) src/libsystemd/sd-resolve/$(DEPDIR) src/libsystemd/sd-rtnl/$(DEPDIR) src/libsystemd/sd-utf8/$(DEPDIR) src/libudev/$(DEPDIR) src/locale/$(DEPDIR) src/login/$(DEPDIR) src/machine-id-setup/$(DEPDIR) src/machine/$(DEPDIR) src/modules-load/$(DEPDIR) src/network/$(DEPDIR) src/notify/$(DEPDIR) src/nspawn/$(DEPDIR) src/nss-myhostname/$(DEPDIR) src/path/$(DEPDIR) src/python-systemd/$(DEPDIR) src/quotacheck/$(DEPDIR) src/random-seed/$(DEPDIR) src/rc-local-generator/$(DEPDIR) src/readahead/$(DEPDIR) src/remount-fs/$(DEPDIR) src/reply-password/$(DEPDIR) src/resolve/$(DEPDIR) src/rfkill/$(DEPDIR) src/run/$(DEPDIR) src/shared/$(DEPDIR) src/shutdownd/$(DEPDIR) src/sleep/$(DEPDIR) src/socket-proxy/$(DEPDIR) src/sysctl/$(DEPDIR) src/system-update-generator/$(DEPDIR) src/systemctl/$(DEPDIR) src/sysusers/$(DEPDIR) src/sysv-generator/$(DEPDIR) src/test/$(DEPDIR) src/timedate/$(DEPDIR) src/timesync/$(DEPDIR) src/tmpfiles/$(DEPDIR) src/tty-ask-password-agent/$(DEPDIR) src/udev/$(DEPDIR) src/udev/accelerometer/$(DEPDIR) src/udev/ata_id/$(DEPDIR) src/udev/cdrom_id/$(DEPDIR) src/udev/collect/$(DEPDIR) src/udev/mtd_probe/$(DEPDIR) src/udev/net/$(DEPDIR) src/udev/scsi_id/$(DEPDIR) src/udev/v4l_id/$(DEPDIR) src/update-done/$(DEPDIR) src/update-utmp/$(DEPDIR) src/vconsole/$(DEPDIR)
+       -rm -rf ./$(DEPDIR) src/ac-power/$(DEPDIR) src/activate/$(DEPDIR) src/analyze/$(DEPDIR) src/ask-password/$(DEPDIR) src/backlight/$(DEPDIR) src/binfmt/$(DEPDIR) src/boot/$(DEPDIR) src/bootchart/$(DEPDIR) src/bus-proxyd/$(DEPDIR) src/cgls/$(DEPDIR) src/cgroups-agent/$(DEPDIR) src/cgtop/$(DEPDIR) src/console/$(DEPDIR) src/core/$(DEPDIR) src/cryptsetup/$(DEPDIR) src/dbus1-generator/$(DEPDIR) src/debug-generator/$(DEPDIR) src/delta/$(DEPDIR) src/detect-virt/$(DEPDIR) src/efi-boot-generator/$(DEPDIR) src/escape/$(DEPDIR) src/firstboot/$(DEPDIR) src/fsck/$(DEPDIR) src/fstab-generator/$(DEPDIR) src/getty-generator/$(DEPDIR) src/gpt-auto-generator/$(DEPDIR) src/gudev/$(DEPDIR) src/hibernate-resume/$(DEPDIR) src/hostname/$(DEPDIR) src/initctl/$(DEPDIR) src/journal-remote/$(DEPDIR) src/journal/$(DEPDIR) src/libsystemd-network/$(DEPDIR) src/libsystemd-terminal/$(DEPDIR) src/libsystemd/sd-bus/$(DEPDIR) src/libsystemd/sd-daemon/$(DEPDIR) src/libsystemd/sd-event/$(DEPDIR) src/libsystemd/sd-id128/$(DEPDIR) src/libsystemd/sd-login/$(DEPDIR) src/libsystemd/sd-network/$(DEPDIR) src/libsystemd/sd-path/$(DEPDIR) src/libsystemd/sd-resolve/$(DEPDIR) src/libsystemd/sd-rtnl/$(DEPDIR) src/libsystemd/sd-utf8/$(DEPDIR) src/libudev/$(DEPDIR) src/locale/$(DEPDIR) src/login/$(DEPDIR) src/machine-id-setup/$(DEPDIR) src/machine/$(DEPDIR) src/modules-load/$(DEPDIR) src/network/$(DEPDIR) src/notify/$(DEPDIR) src/nspawn/$(DEPDIR) src/nss-myhostname/$(DEPDIR) src/nss-mymachines/$(DEPDIR) src/nss-resolve/$(DEPDIR) src/path/$(DEPDIR) src/python-systemd/$(DEPDIR) src/quotacheck/$(DEPDIR) src/random-seed/$(DEPDIR) src/rc-local-generator/$(DEPDIR) src/remount-fs/$(DEPDIR) src/reply-password/$(DEPDIR) src/resolve-host/$(DEPDIR) src/resolve/$(DEPDIR) src/rfkill/$(DEPDIR) src/run/$(DEPDIR) src/shared/$(DEPDIR) src/shutdownd/$(DEPDIR) src/sleep/$(DEPDIR) src/socket-proxy/$(DEPDIR) src/sysctl/$(DEPDIR) src/system-update-generator/$(DEPDIR) src/systemctl/$(DEPDIR) src/sysusers/$(DEPDIR) src/sysv-generator/$(DEPDIR) src/test/$(DEPDIR) src/timedate/$(DEPDIR) src/timesync/$(DEPDIR) src/tmpfiles/$(DEPDIR) src/tty-ask-password-agent/$(DEPDIR) src/udev/$(DEPDIR) src/udev/accelerometer/$(DEPDIR) src/udev/ata_id/$(DEPDIR) src/udev/cdrom_id/$(DEPDIR) src/udev/collect/$(DEPDIR) src/udev/mtd_probe/$(DEPDIR) src/udev/net/$(DEPDIR) src/udev/scsi_id/$(DEPDIR) src/udev/v4l_id/$(DEPDIR) src/update-done/$(DEPDIR) src/update-utmp/$(DEPDIR) src/vconsole/$(DEPDIR)
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -17233,11 +19076,11 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_bashcompletionDATA \
        uninstall-dist_binSCRIPTS uninstall-dist_catalogDATA \
        uninstall-dist_dbuspolicyDATA \
        uninstall-dist_dbussystemserviceDATA uninstall-dist_docDATA \
+       uninstall-dist_factory_etcDATA uninstall-dist_factory_pamDATA \
        uninstall-dist_gatewayddocumentrootDATA \
        uninstall-dist_kernelinstallSCRIPTS uninstall-dist_networkDATA \
-       uninstall-dist_ntpunitsDATA uninstall-dist_pamconfDATA \
-       uninstall-dist_pkgdataDATA uninstall-dist_pkgpyexecPYTHON \
-       uninstall-dist_pkgsysconfDATA uninstall-dist_polkitpolicyDATA \
+       uninstall-dist_pamconfDATA uninstall-dist_pkgdataDATA \
+       uninstall-dist_pkgpyexecPYTHON uninstall-dist_pkgsysconfDATA \
        uninstall-dist_sysctlDATA uninstall-dist_systempresetDATA \
        uninstall-dist_systemunitDATA uninstall-dist_sysusersDATA \
        uninstall-dist_tmpfilesDATA uninstall-dist_udevconfDATA \
@@ -17245,10 +19088,13 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_bashcompletionDATA \
        uninstall-dist_userunitDATA uninstall-dist_zshcompletionDATA \
        uninstall-girDATA uninstall-includeHEADERS \
        uninstall-libLTLIBRARIES uninstall-libgudev_includeHEADERS \
-       uninstall-man uninstall-nodist_pkgsysconfDATA \
+       uninstall-man uninstall-nodist_bashcompletionDATA \
+       uninstall-nodist_pkgsysconfDATA \
+       uninstall-nodist_polkitpolicyDATA \
        uninstall-nodist_rpmmacrosDATA uninstall-nodist_systemunitDATA \
-       uninstall-nodist_sysusersDATA uninstall-nodist_udevrulesDATA \
-       uninstall-nodist_userunitDATA uninstall-pamlibLTLIBRARIES \
+       uninstall-nodist_sysusersDATA uninstall-nodist_tmpfilesDATA \
+       uninstall-nodist_udevrulesDATA uninstall-nodist_userunitDATA \
+       uninstall-nodist_zshcompletionDATA uninstall-pamlibLTLIBRARIES \
        uninstall-pkgconfigdataDATA uninstall-pkgconfiglibDATA \
        uninstall-pkgincludeHEADERS uninstall-pkgpyexecLTLIBRARIES \
        uninstall-rootbinPROGRAMS uninstall-rootlibexecPROGRAMS \
@@ -17282,11 +19128,11 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
        install-dist_bashcompletionDATA install-dist_binSCRIPTS \
        install-dist_catalogDATA install-dist_dbuspolicyDATA \
        install-dist_dbussystemserviceDATA install-dist_docDATA \
+       install-dist_factory_etcDATA install-dist_factory_pamDATA \
        install-dist_gatewayddocumentrootDATA \
        install-dist_kernelinstallSCRIPTS install-dist_networkDATA \
-       install-dist_ntpunitsDATA install-dist_pamconfDATA \
-       install-dist_pkgdataDATA install-dist_pkgpyexecPYTHON \
-       install-dist_pkgsysconfDATA install-dist_polkitpolicyDATA \
+       install-dist_pamconfDATA install-dist_pkgdataDATA \
+       install-dist_pkgpyexecPYTHON install-dist_pkgsysconfDATA \
        install-dist_sysctlDATA install-dist_systempresetDATA \
        install-dist_systemunitDATA install-dist_sysusersDATA \
        install-dist_tmpfilesDATA install-dist_udevconfDATA \
@@ -17297,10 +19143,12 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
        install-includeHEADERS install-info install-info-am \
        install-libLTLIBRARIES install-libgudev_includeHEADERS \
        install-man install-man1 install-man3 install-man5 \
-       install-man7 install-man8 install-nodist_pkgsysconfDATA \
+       install-man7 install-man8 install-nodist_bashcompletionDATA \
+       install-nodist_pkgsysconfDATA install-nodist_polkitpolicyDATA \
        install-nodist_rpmmacrosDATA install-nodist_systemunitDATA \
-       install-nodist_sysusersDATA install-nodist_udevrulesDATA \
-       install-nodist_userunitDATA install-pamlibLTLIBRARIES \
+       install-nodist_sysusersDATA install-nodist_tmpfilesDATA \
+       install-nodist_udevrulesDATA install-nodist_userunitDATA \
+       install-nodist_zshcompletionDATA install-pamlibLTLIBRARIES \
        install-pdf install-pdf-am install-pkgconfigdataDATA \
        install-pkgconfiglibDATA install-pkgincludeHEADERS \
        install-pkgpyexecLTLIBRARIES install-ps install-ps-am \
@@ -17316,11 +19164,11 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
        uninstall-dist_bashcompletionDATA uninstall-dist_binSCRIPTS \
        uninstall-dist_catalogDATA uninstall-dist_dbuspolicyDATA \
        uninstall-dist_dbussystemserviceDATA uninstall-dist_docDATA \
+       uninstall-dist_factory_etcDATA uninstall-dist_factory_pamDATA \
        uninstall-dist_gatewayddocumentrootDATA \
        uninstall-dist_kernelinstallSCRIPTS uninstall-dist_networkDATA \
-       uninstall-dist_ntpunitsDATA uninstall-dist_pamconfDATA \
-       uninstall-dist_pkgdataDATA uninstall-dist_pkgpyexecPYTHON \
-       uninstall-dist_pkgsysconfDATA uninstall-dist_polkitpolicyDATA \
+       uninstall-dist_pamconfDATA uninstall-dist_pkgdataDATA \
+       uninstall-dist_pkgpyexecPYTHON uninstall-dist_pkgsysconfDATA \
        uninstall-dist_sysctlDATA uninstall-dist_systempresetDATA \
        uninstall-dist_systemunitDATA uninstall-dist_sysusersDATA \
        uninstall-dist_tmpfilesDATA uninstall-dist_udevconfDATA \
@@ -17329,10 +19177,14 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
        uninstall-girDATA uninstall-hook uninstall-includeHEADERS \
        uninstall-libLTLIBRARIES uninstall-libgudev_includeHEADERS \
        uninstall-man uninstall-man1 uninstall-man3 uninstall-man5 \
-       uninstall-man7 uninstall-man8 uninstall-nodist_pkgsysconfDATA \
+       uninstall-man7 uninstall-man8 \
+       uninstall-nodist_bashcompletionDATA \
+       uninstall-nodist_pkgsysconfDATA \
+       uninstall-nodist_polkitpolicyDATA \
        uninstall-nodist_rpmmacrosDATA uninstall-nodist_systemunitDATA \
-       uninstall-nodist_sysusersDATA uninstall-nodist_udevrulesDATA \
-       uninstall-nodist_userunitDATA uninstall-pamlibLTLIBRARIES \
+       uninstall-nodist_sysusersDATA uninstall-nodist_tmpfilesDATA \
+       uninstall-nodist_udevrulesDATA uninstall-nodist_userunitDATA \
+       uninstall-nodist_zshcompletionDATA uninstall-pamlibLTLIBRARIES \
        uninstall-pkgconfigdataDATA uninstall-pkgconfiglibDATA \
        uninstall-pkgincludeHEADERS uninstall-pkgpyexecLTLIBRARIES \
        uninstall-rootbinPROGRAMS uninstall-rootlibexecPROGRAMS \
@@ -17342,6 +19194,9 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
        uninstall-varlogDATA
 
 
+GCC_COLORS ?= 'ooh, shiny!'
+export GCC_COLORS
+
 # remove targets if the command fails
 .DELETE_ON_ERROR:
 
@@ -17377,10 +19232,13 @@ install-target-wants-hook:
        what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
-       what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
        what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
        what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
        what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
+       what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
+
+install-busnames-target-wants-hook:
+       what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
        what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
 
 define add-wants
@@ -17504,12 +19362,15 @@ man/sd_journal_sendv.3: man/sd_journal_print.3
 man/sd_journal_set_data_threshold.3: man/sd_journal_get_data.3
 man/sd_journal_test_cursor.3: man/sd_journal_get_cursor.3
 man/sd_journal_wait.3: man/sd_journal_get_fd.3
+man/sd_machine_get_ifindices.3: man/sd_machine_get_class.3
 man/sd_notifyf.3: man/sd_notify.3
 man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8
 man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8
 man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.service.8
+man/systemd-firstboot.service.1: man/systemd-firstboot.1
 man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
 man/systemd-fsck.8: man/systemd-fsck@.service.8
+man/systemd-hibernate-resume.8: man/systemd-hibernate-resume@.service.8
 man/systemd-hibernate.service.8: man/systemd-suspend.service.8
 man/systemd-hybrid-sleep.service.8: man/systemd-suspend.service.8
 man/systemd-initctl.8: man/systemd-initctl.service.8
@@ -17535,8 +19396,6 @@ man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
 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-update-utmp-runlevel.service.8: man/systemd-update-utmp.service.8
-man/systemd-update-utmp.8: man/systemd-update-utmp.service.8
 man/systemd-user.conf.5: man/systemd-system.conf.5
 man/SD_ALERT.html: man/sd-daemon.html
        $(html-alias)
@@ -17751,6 +19610,9 @@ man/sd_journal_test_cursor.html: man/sd_journal_get_cursor.html
 man/sd_journal_wait.html: man/sd_journal_get_fd.html
        $(html-alias)
 
+man/sd_machine_get_ifindices.html: man/sd_machine_get_class.html
+       $(html-alias)
+
 man/sd_notifyf.html: man/sd_notify.html
        $(html-alias)
 
@@ -17763,12 +19625,18 @@ man/systemd-ask-password-wall.path.html: man/systemd-ask-password-console.servic
 man/systemd-ask-password-wall.service.html: man/systemd-ask-password-console.service.html
        $(html-alias)
 
+man/systemd-firstboot.service.html: man/systemd-firstboot.html
+       $(html-alias)
+
 man/systemd-fsck-root.service.html: man/systemd-fsck@.service.html
        $(html-alias)
 
 man/systemd-fsck.html: man/systemd-fsck@.service.html
        $(html-alias)
 
+man/systemd-hibernate-resume.html: man/systemd-hibernate-resume@.service.html
+       $(html-alias)
+
 man/systemd-hibernate.service.html: man/systemd-suspend.service.html
        $(html-alias)
 
@@ -17844,12 +19712,6 @@ man/systemd-udevd.html: man/systemd-udevd.service.html
 man/systemd-update-done.html: man/systemd-update-done.service.html
        $(html-alias)
 
-man/systemd-update-utmp-runlevel.service.html: man/systemd-update-utmp.service.html
-       $(html-alias)
-
-man/systemd-update-utmp.html: man/systemd-update-utmp.service.html
-       $(html-alias)
-
 man/systemd-user.conf.html: man/systemd-system.conf.html
        $(html-alias)
 @ENABLE_BACKLIGHT_TRUE@man/systemd-backlight.8: man/systemd-backlight@.service.8
@@ -17866,6 +19728,7 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_cgroup.3: man/sd_bus_creds_get_pid.3
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_cmdline.3: man/sd_bus_creds_get_pid.3
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_comm.3: man/sd_bus_creds_get_pid.3
+@ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_connection_name.3: man/sd_bus_creds_get_pid.3
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_exe.3: man/sd_bus_creds_get_pid.3
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_gid.3: man/sd_bus_creds_get_pid.3
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_mask.3: man/sd_bus_creds_new_from_pid.3
@@ -17915,8 +19778,13 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 @ENABLE_KDBUS_TRUE@man/sd_bus_ref.3: man/sd_bus_new.3
 @ENABLE_KDBUS_TRUE@man/sd_bus_release_name.3: man/sd_bus_request_name.3
 @ENABLE_KDBUS_TRUE@man/sd_bus_unref.3: man/sd_bus_new.3
+@ENABLE_KDBUS_TRUE@man/sd_event_add_exit.3: man/sd_event_add_defer.3
+@ENABLE_KDBUS_TRUE@man/sd_event_add_post.3: man/sd_event_add_defer.3
 @ENABLE_KDBUS_TRUE@man/sd_event_default.3: man/sd_event_new.3
+@ENABLE_KDBUS_TRUE@man/sd_event_get_name.3: man/sd_event_set_name.3
 @ENABLE_KDBUS_TRUE@man/sd_event_ref.3: man/sd_event_new.3
+@ENABLE_KDBUS_TRUE@man/sd_event_source_get_child_pid.3: man/sd_event_add_child.3
+@ENABLE_KDBUS_TRUE@man/sd_event_source_get_signal.3: man/sd_event_add_signal.3
 @ENABLE_KDBUS_TRUE@man/sd_event_source_get_time.3: man/sd_event_add_time.3
 @ENABLE_KDBUS_TRUE@man/sd_event_source_get_time_accuracy.3: man/sd_event_add_time.3
 @ENABLE_KDBUS_TRUE@man/sd_event_source_get_time_clock.3: man/sd_event_add_time.3
@@ -17939,6 +19807,9 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_comm.html: man/sd_bus_creds_get_pid.html
 @ENABLE_KDBUS_TRUE@    $(html-alias)
 
+@ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_connection_name.html: man/sd_bus_creds_get_pid.html
+@ENABLE_KDBUS_TRUE@    $(html-alias)
+
 @ENABLE_KDBUS_TRUE@man/sd_bus_creds_get_exe.html: man/sd_bus_creds_get_pid.html
 @ENABLE_KDBUS_TRUE@    $(html-alias)
 
@@ -18086,12 +19957,27 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 @ENABLE_KDBUS_TRUE@man/sd_bus_unref.html: man/sd_bus_new.html
 @ENABLE_KDBUS_TRUE@    $(html-alias)
 
+@ENABLE_KDBUS_TRUE@man/sd_event_add_exit.html: man/sd_event_add_defer.html
+@ENABLE_KDBUS_TRUE@    $(html-alias)
+
+@ENABLE_KDBUS_TRUE@man/sd_event_add_post.html: man/sd_event_add_defer.html
+@ENABLE_KDBUS_TRUE@    $(html-alias)
+
 @ENABLE_KDBUS_TRUE@man/sd_event_default.html: man/sd_event_new.html
 @ENABLE_KDBUS_TRUE@    $(html-alias)
 
+@ENABLE_KDBUS_TRUE@man/sd_event_get_name.html: man/sd_event_set_name.html
+@ENABLE_KDBUS_TRUE@    $(html-alias)
+
 @ENABLE_KDBUS_TRUE@man/sd_event_ref.html: man/sd_event_new.html
 @ENABLE_KDBUS_TRUE@    $(html-alias)
 
+@ENABLE_KDBUS_TRUE@man/sd_event_source_get_child_pid.html: man/sd_event_add_child.html
+@ENABLE_KDBUS_TRUE@    $(html-alias)
+
+@ENABLE_KDBUS_TRUE@man/sd_event_source_get_signal.html: man/sd_event_add_signal.html
+@ENABLE_KDBUS_TRUE@    $(html-alias)
+
 @ENABLE_KDBUS_TRUE@man/sd_event_source_get_time.html: man/sd_event_add_time.html
 @ENABLE_KDBUS_TRUE@    $(html-alias)
 
@@ -18134,21 +20020,6 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 @ENABLE_RANDOMSEED_TRUE@man/systemd-random-seed.8: man/systemd-random-seed.service.8
 @ENABLE_RANDOMSEED_TRUE@man/systemd-random-seed.html: man/systemd-random-seed.service.html
 @ENABLE_RANDOMSEED_TRUE@       $(html-alias)
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead-collect.service.8: man/systemd-readahead-replay.service.8
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead-done.service.8: man/systemd-readahead-replay.service.8
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead-done.timer.8: man/systemd-readahead-replay.service.8
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead.8: man/systemd-readahead-replay.service.8
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead-collect.service.html: man/systemd-readahead-replay.service.html
-@ENABLE_READAHEAD_TRUE@        $(html-alias)
-
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead-done.service.html: man/systemd-readahead-replay.service.html
-@ENABLE_READAHEAD_TRUE@        $(html-alias)
-
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead-done.timer.html: man/systemd-readahead-replay.service.html
-@ENABLE_READAHEAD_TRUE@        $(html-alias)
-
-@ENABLE_READAHEAD_TRUE@man/systemd-readahead.html: man/systemd-readahead-replay.service.html
-@ENABLE_READAHEAD_TRUE@        $(html-alias)
 @ENABLE_RESOLVED_TRUE@man/systemd-resolved.8: man/systemd-resolved.service.8
 @ENABLE_RESOLVED_TRUE@man/systemd-resolved.html: man/systemd-resolved.service.html
 @ENABLE_RESOLVED_TRUE@ $(html-alias)
@@ -18202,6 +20073,7 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 @HAVE_PAM_TRUE@man/sd_seat_can_tty.3: man/sd_seat_get_active.3
 @HAVE_PAM_TRUE@man/sd_seat_get_sessions.3: man/sd_seat_get_active.3
 @HAVE_PAM_TRUE@man/sd_session_get_class.3: man/sd_session_is_active.3
+@HAVE_PAM_TRUE@man/sd_session_get_desktop.3: man/sd_session_is_active.3
 @HAVE_PAM_TRUE@man/sd_session_get_display.3: man/sd_session_is_active.3
 @HAVE_PAM_TRUE@man/sd_session_get_remote_host.3: man/sd_session_is_active.3
 @HAVE_PAM_TRUE@man/sd_session_get_remote_user.3: man/sd_session_is_active.3
@@ -18293,6 +20165,9 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 @HAVE_PAM_TRUE@man/sd_session_get_class.html: man/sd_session_is_active.html
 @HAVE_PAM_TRUE@        $(html-alias)
 
+@HAVE_PAM_TRUE@man/sd_session_get_desktop.html: man/sd_session_is_active.html
+@HAVE_PAM_TRUE@        $(html-alias)
+
 @HAVE_PAM_TRUE@man/sd_session_get_display.html: man/sd_session_is_active.html
 @HAVE_PAM_TRUE@        $(html-alias)
 
@@ -18340,6 +20215,13 @@ man/systemd-user.conf.html: man/systemd-system.conf.html
 
 @HAVE_PAM_TRUE@man/systemd-user-sessions.html: man/systemd-user-sessions.service.html
 @HAVE_PAM_TRUE@        $(html-alias)
+@HAVE_UTMP_TRUE@man/systemd-update-utmp-runlevel.service.8: man/systemd-update-utmp.service.8
+@HAVE_UTMP_TRUE@man/systemd-update-utmp.8: man/systemd-update-utmp.service.8
+@HAVE_UTMP_TRUE@man/systemd-update-utmp-runlevel.service.html: man/systemd-update-utmp.service.html
+@HAVE_UTMP_TRUE@       $(html-alias)
+
+@HAVE_UTMP_TRUE@man/systemd-update-utmp.html: man/systemd-update-utmp.service.html
+@HAVE_UTMP_TRUE@       $(html-alias)
 
 .PHONY: man update-man-list
 man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
@@ -18368,37 +20250,54 @@ src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
 
-src/shared/errno-list.txt:
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }'  > $@
+%-from-name.gperf: %-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
 
-src/shared/errno-from-name.gperf: src/shared/errno-list.txt
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
+%-from-name.h: %-from-name.gperf
+       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
 
-src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
+src/shared/errno-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
 
 src/shared/errno-to-name.h: src/shared/errno-list.txt
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
 
 src/shared/af-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - < /dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }'  > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
 
-src/shared/af-from-name.gperf: src/shared/af-list.txt
+src/shared/af-to-name.h: src/shared/af-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
+
+src/shared/arphrd-list.txt:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct af_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
+
+src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
 
-src/shared/af-from-name.h: src/shared/af-from-name.gperf
+src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
+
+src/resolve/dns_type-list.txt: src/resolve/dns-type.h
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_af -H hash_af_name -p -C < $< > $@
+       $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
 
-src/shared/af-to-name.h: src/shared/af-list.txt
+src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf "        case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@
+
+src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
+
+src/test/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
+       $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
+                          { if (!match($$0, "^#include"))          \
+                                gsub(/hashmap/, "ordered_hashmap"); \
+                            gsub(/HASHMAP/, "ORDERED_HASHMAP");     \
+                            gsub(/Hashmap/, "OrderedHashmap");      \
+                            print }' <$< >$@
 
 # ------------------------------------------------------------------------------
 .PHONY: coverage lcov-run lcov-report coverage-sync
@@ -18454,6 +20353,13 @@ libsystemd-uninstall-hook:
        rm -f $(DESTDIR)$(rootlibdir)/libsystemd.so*
        $(CAP_CFLAGS)
 
+.PHONY: update-unifont
+update-unifont: tools/compile-unifont.py
+       $(AM_V_GEN)$(PYTHON) $< \
+               <$(top_srcdir)/src/libsystemd-terminal/unifont.hex \
+               >$(top_srcdir)/src/libsystemd-terminal/unifont-glyph-array.bin
+       @echo "unifont-glyph-array.bin has been regenerated"
+
 docs/html/libudev:
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_LN)$(LN_S) -f ../libudev/html $@
@@ -18515,12 +20421,10 @@ test-sys-distclean:
 
 @ENABLE_GUDEV_TRUE@@HAVE_INTROSPECTION_TRUE@src/gudev/GUdev-1.0.gir: libgudev-1.0.la
 
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
-@ENABLE_GUDEV_TRUE@libgudev-install-hook:
-@ENABLE_GUDEV_TRUE@    libname=libgudev-1.0.so && $(move-to-rootlibdir)
-
-@ENABLE_GUDEV_TRUE@libgudev-uninstall-hook:
-@ENABLE_GUDEV_TRUE@    rm -f $(DESTDIR)$(rootlibdir)/libgudev-1.0.so*
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@journal-remote-install-hook: journal-install-hook
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       -chown 0:0 $(DESTDIR)/var/log/journal/remote
+@HAVE_GNUTLS_TRUE@@HAVE_MICROHTTPD_TRUE@       -chmod 755 $(DESTDIR)/var/log/journal/remote
 
 journal-install-hook:
        -$(MKDIR_P) $(DESTDIR)/var/log/journal
@@ -18530,6 +20434,7 @@ journal-install-hook:
        -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
 
 journal-uninstall-hook:
+       -rmdir $(DESTDIR)/var/log/journal/remote
        -rmdir $(DESTDIR)/var/log/journal/
 
 # ------------------------------------------------------------------------------
@@ -18541,9 +20446,6 @@ catalog-update-hook:
 catalog-remove-hook:
        -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
 
-@ENABLE_LOCALED_TRUE@update-kbd-model-map: src/locale/generate-kbd-model-map
-@ENABLE_LOCALED_TRUE@  $PYTHON $< >src/locale/kbd-model-map
-
 .PHONY: update-kbd-model-map
 
 @HAVE_PYTHON_DEVEL_TRUE@src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
@@ -18603,12 +20505,18 @@ sysctl.d/%: sysctl.d/%.in
 %.pc: %.pc.in
        $(SED_PROCESS)
 
+%.conf: %.conf.in
+       $(SED_PROCESS)
+
 src/core/macros.%: src/core/macros.%.in
        $(SED_PROCESS)
 
 src/%.policy.in: src/%.policy.in.in
        $(SED_PROCESS)
 
+shell-completion/%: shell-completion/%.in
+       $(SED_PROCESS)
+
 %.rules: %.rules.in
        $(SED_PROCESS)
 
@@ -18627,6 +20535,10 @@ src/%: src/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
 
+tmpfiles.d/%: tmpfiles.d/%.m4
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
 units/%: units/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
@@ -18804,7 +20716,8 @@ test-libsystemd-sym.c: \
                src/systemd/sd-login.h \
                src/systemd/sd-bus.h \
                src/systemd/sd-utf8.h \
-               src/systemd/sd-resolve.h
+               src/systemd/sd-resolve.h \
+               src/systemd/sd-path.h
        $(generate-sym-test)
 
 test-libudev-sym.c: \
diff --git a/NEWS b/NEWS
index 6fc752ba99b98293a01798dcfb39aa79c0c30325..84a43fd5dfc021147c7b1897d47bcc0e7ef7386e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,414 @@
 systemd System and Service Manager
 
+CHANGES WITH 217:
+
+        * journalctl gained the new options -t/--identifier= to match
+          on the syslog identifier (aka "tag"), as well as --utc to
+          show log timestamps in the UTC timezone. journalctl now also
+          accepts -n/--lines=all to disable line capping in a pager.
+
+        * Services can notify the manager before they start a reload
+          (by sending RELOADING=1) or shutdown (by sending
+          STOPPING=1). This allows the manager to track and show the
+          internal state of daemons and closes a race condition when
+          the process is still running but has closed its D-Bus
+          connection.
+
+        * Services with Type=oneshot do not have to have any ExecStart
+          commands anymore.
+
+        * User units are now loaded also from
+          $XDG_RUNTIME_DIR/systemd/user/. This is similar to the
+          /run/systemd/user directory that was already previously
+          supported, but is under the control of the user.
+
+        * Job timeouts (i.e. time-outs on the time a job that is
+          queued stays in the run queue) can now optionally result in
+          immediate reboot or power-off actions (JobTimeoutAction= and
+          JobTimeoutRebootArgument=). This is useful on ".target"
+          units, to limit the maximum time a target remains
+          undispatched in the run queue, and to trigger an emergency
+          operation in such a case. This is now used by default to
+          turn off the system if boot-up (as defined by everything in
+          basic.target) hangs and does not complete for at least
+          15min. Also, if power-off or reboot hang for at least 30min
+          an immediate power-off/reboot operation is triggered. This
+          functionality is particularly useful to increase reliability
+          on embedded devices, but also on laptops which might
+          accidentally get powered on when carried in a backpack and
+          whose boot stays stuck in a hard disk encryption passphrase
+          question.
+
+        * systemd-logind can be configured to also handle lid switch
+          events even when the machine is docked or multiple displays
+          are attached (HandleLidSwitchDocked= option).
+
+        * A helper binary and a service have been added which can be
+          used to resume from hibernation in the initramfs. A
+          generator will parse the resume= option on the kernel
+          command-line to trigger resume.
+
+        * A user console daemon systemd-consoled has been
+          added. Currently, it is a preview, and will so far open a
+          single terminal on each session of the user marked as
+          Desktop=systemd-console.
+
+        * Route metrics can be specified for DHCP routes added by
+          systemd-networkd.
+
+        * The SELinux context of socket-activated services can be set
+          from the information provided by the networking stack
+          (SELinuxContextFromNet= option).
+
+        * Userspace firmware loading support has been removed and
+          the minimum supported kernel version is thus bumped to 3.7.
+
+        * Timeout for udev workers has been increased from 1 to 3
+          minutes, but a warning will be printed after 1 minute to
+          help diagnose kernel modules that take a long time to load.
+
+        * Udev rules can now remove tags on devices with TAG-="foobar".
+
+        * systemd's readahead implementation has been removed. In many
+          circumstances it didn't give expected benefits even for
+          rotational disk drives and was becoming less relevant in the
+          age of SSDs. As none of the developers has been using
+          rotating media anymore, and nobody stepped up to actively
+          maintain this component of systemd it has now been removed.
+
+        * Swap units can use Discard= to specify discard options.
+          Discard options specified for swaps in /etc/fstab are now
+          respected.
+
+        * Docker containers are now detected as a separate type of
+          virtualization.
+
+        * The Password Agent protocol gained support for queries where
+          the user input is shown, useful e.g. for user names.
+          systemd-ask-password gained a new --echo option to turn that
+          on.
+
+        * The default sysctl.d/ snippets will now set:
+
+                net.core.default_qdisc = fq_codel
+
+          This selects Fair Queuing Controlled Delay as the default
+          queuing discipline for network interfaces. fq_codel helps
+          fight the network bufferbloat problem. It is believed to be
+          a good default with no tuning required for most workloads.
+          Downstream distributions may override this choice. On 10Gbit
+          servers that do not do forwarding, "fq" may perform better.
+          Systems without a good clocksource should use "pfifo_fast".
+
+        * If kdbus is enabled during build a new option BusPolicy= is
+          available for service units, that allows locking all service
+          processes into a stricter bus policy, in order to limit
+          access to various bus services, or even hide most of them
+          from the service's view entirely.
+
+        * networkctl will now show the .network and .link file
+          networkd has applied to a specific interface.
+
+        * sd-login gained a new API call sd_session_get_desktop() to
+          query which desktop environment has been selected for a
+          session.
+
+        * UNIX utmp support is now compile-time optional to support
+          legacy-free systems.
+
+        * systemctl gained two new commands "add-wants" and
+          "add-requires" for pulling in units from specific targets
+          easily.
+
+        * If the word "rescue" is specified on the kernel command line
+          the system will now boot into rescue mode (aka
+          rescue.target), which was previously available only by
+          specifying "1" or "systemd.unit=rescue.target" on the kernel
+          command line. This new kernel command line option nicely
+          mirrors the already existing "emergency" kernel command line
+          option.
+
+        * New kernel command line options mount.usr=, mount.usrflags=,
+          mount.usrfstype= have been added that match root=, rootflags=,
+          rootfstype= but allow mounting a specific file system to
+          /usr.
+
+        * The $NOTIFY_SOCKET is now also passed to control processes of
+          services, not only the main process.
+
+        * This version reenables support for fsck's -l switch. This
+          means at least version v2.25 of util-linux is required for
+          operation, otherwise dead-locks on device nodes may
+          occur. Again: you need to update util-linux to at least
+          v2.25 when updating systemd to v217.
+
+        * The "multi-seat-x" tool has been removed from systemd, as
+          its functionality has been integrated into X servers 1.16,
+          and the tool is hence redundant. It is recommended to update
+          display managers invoking this tool to simply invoke X
+          directly from now on, again.
+
+        * Support for the new ALLOW_INTERACTIVE_AUTHORIZATION D-Bus
+          message flag has been added for all of systemd's PolicyKit
+          authenticated method calls has been added. In particular
+          this now allows optional interactive authorization via
+          PolicyKit for many of PID1's privileged operations such as
+          unit file enabling and disabling.
+
+        * "udevadm hwdb --update" learnt a new switch "--usr" for
+          placing the rebuilt hardware database in /usr instead of
+          /etc. When used only hardware database entries stored in
+          /usr will be used, and any user database entries in /etc are
+          ignored. This functionality is useful for vendors to ship a
+          pre-built database on systems where local configuration is
+          unnecessary or unlikely.
+
+        * Calendar time specifications in .timer units now also
+          understand the strings "semi-annually", "quarterly" and
+          "minutely" as shortcuts (in addition to the preexisting
+          "anually", "hourly", ...).
+
+        * systemd-tmpfiles will now correctly create files in /dev
+          at boot which are marked for creation only at boot. It is
+          recommended to always create static device nodes with 'c!'
+          and 'b!', so that they are created only at boot and not
+          overwritten at runtime.
+
+        * When the watchdog logic is used for a service (WatchdogSec=)
+          and the watchdog timeout is hit the service will now be
+          terminated with SIGABRT (instead of just SIGTERM), in order
+          to make sure a proper coredump and backtrace is
+          generated. This ensures that hanging services will result in
+          similar coredump/backtrace behaviour as services that hit a
+          segmentation fault.
+
+        Contributions from: Andreas Henriksson, Andrei Borzenkov,
+        Angus Gibson, Ansgar Burchardt, Ben Wolsieffer, Brandon L.
+        Black, Christian Hesse, Cristian Rodríguez, Daniel Buch,
+        Daniele Medri, Daniel Mack, Dan Williams, Dave Reisner, David
+        Herrmann, David Sommerseth, David Strauss, Emil Renner
+        Berthing, Eric Cook, Evangelos Foutras, Filipe Brandenburger,
+        Gustavo Sverzut Barbieri, Hans de Goede, Harald Hoyer, Hristo
+        Venev, Hugo Grostabussiat, Ivan Shapovalov, Jan Janssen, Jan
+        Synacek, Jonathan Liu, Juho Son, Karel Zak, Kay Sievers, Klaus
+        Purer, Koen Kooi, Lennart Poettering, Lukas Nykryn, Lukasz
+        Skalski, Łukasz Stelmach, Mantas Mikulėnas, Marcel Holtmann,
+        Marius Tessmann, Marko Myllynen, Martin Pitt, Michael Biebl,
+        Michael Marineau, Michael Olbrich, Michael Scherer, Michal
+        Schmidt, Michal Sekletar, Miroslav Lichvar, Patrik Flykt,
+        Philippe De Swert, Piotr Drąg, Rahul Sundaram, Richard
+        Weinberger, Robert Milasan, Ronny Chevalier, Ruben Kerkhof,
+        Santiago Vila, Sergey Ptashnick, Simon McVittie, Sjoerd
+        Simons, Stefan Brüns, Steven Allen, Steven Noonan, Susant
+        Sahani, Sylvain Plantefève, Thomas Hindoe Paaboel Andersen,
+        Timofey Titovets, Tobias Hunger, Tom Gundersen, Torstein
+        Husebø, Umut Tezduyar Lindskog, WaLyong Cho, Zbigniew
+        Jędrzejewski-Szmek.
+
+        -- Berlin, 2014-10-28
+
+CHANGES WITH 216:
+
+        * timedated no longer reads NTP implementation unit names from
+          /usr/lib/systemd/ntp-units.d/*.list. Alternative NTP
+          implementations should add a
+
+            Conflicts=systemd-timesyncd.service
+
+          to their unit files to take over and replace systemd's NTP
+          default functionality.
+
+        * systemd-sysusers gained a new line type "r" for configuring
+          which UID/GID ranges to allocate system users/groups
+          from. Lines of type "u" may now add an additional column
+          that specifies the home directory for the system user to be
+          created. Also, systemd-sysusers may now optionally read user
+          information from STDIN instead of a file. This is useful for
+          invoking it from RPM preinst scriptlets that need to create
+          users before the first RPM file is installed since these
+          files might need to be owned by them. A new
+          %sysusers_create_inline RPM macro has been introduced to do
+          just that. systemd-sysusers now updates the shadow files as
+          well as the user/group databases, which should enhance
+          compatibility with certain tools like grpck.
+
+        * A number of bus APIs of PID 1 now optionally consult
+          PolicyKit to permit access for otherwise unprivileged
+          clients under certain conditions. Note that this currently
+          doesn't support interactive authentication yet, but this is
+          expected to be added eventually, too.
+
+        * /etc/machine-info now has new fields for configuring the
+          deployment environment of the machine, as well as the
+          location of the machine. hostnamectl has been updated with
+          new command to update these fields.
+
+        * systemd-timesyncd has been updated to automatically acquire
+          NTP server information from systemd-networkd, which might
+          have been discovered via DHCP.
+
+        * systemd-resolved now includes a caching DNS stub resolver
+          and a complete LLMNR name resolution implementation. A new
+          NSS module "nss-resolve" has been added which can be used
+          instead of glibc's own "nss-dns" to resolve hostnames via
+          systemd-resolved. Hostnames, addresses and arbitrary RRs may
+          be resolved via systemd-resolved D-Bus APIs. In contrast to
+          the glibc internal resolver systemd-resolved is aware of
+          multi-homed system, and keeps DNS server and caches separate
+          and per-interface. Queries are sent simultaneously on all
+          interfaces that have DNS servers configured, in order to
+          properly handle VPNs and local LANs which might resolve
+          separate sets of domain names. systemd-resolved may acquire
+          DNS server information from systemd-networkd automatically,
+          which in turn might have discovered them via DHCP. A tool
+          "systemd-resolve-host" has been added that may be used to
+          query the DNS logic in resolved. systemd-resolved implements
+          IDNA and automatically uses IDNA or UTF-8 encoding depending
+          on whether classic DNS or LLMNR is used as transport. In the
+          next releases we intend to add a DNSSEC and mDNS/DNS-SD
+          implementation to systemd-resolved.
+
+        * A new NSS module nss-mymachines has been added, that
+          automatically resolves the names of all local registered
+          containers to their respective IP addresses.
+
+        * A new client tool "networkctl" for systemd-networkd has been
+          added. It currently is entirely passive and will query
+          networking configuration from udev, rtnetlink and networkd,
+          and present it to the user in a very friendly
+          way. Eventually, we hope to extend it to become a full
+          control utility for networkd.
+
+        * .socket units gained a new DeferAcceptSec= setting that
+          controls the kernels' TCP_DEFER_ACCEPT sockopt for
+          TCP. Similar, support for controlling TCP keep-alive
+          settings has been added (KeepAliveTimeSec=,
+          KeepAliveIntervalSec=, KeepAliveProbes=). Also, support for
+          turning off Nagle's algorithm on TCP has been added
+          (NoDelay=).
+
+        * logind learned a new session type "web", for use in projects
+          like Cockpit which register web clients as PAM sessions.
+
+        * timer units with at least one OnCalendar= setting will now
+          be started only after timer-sync.target has been
+          reached. This way they will not elapse before the system
+          clock has been corrected by a local NTP client or
+          similar. This is particular useful on RTC-less embedded
+          machines, that come up with an invalid system clock.
+
+        * systemd-nspawn's --network-veth= switch should now result in
+          stable MAC addresses for both the outer and the inner side
+          of the link.
+
+        * systemd-nspawn gained a new --volatile= switch for running
+          container instances with /etc or /var unpopulated.
+
+        * The kdbus client code has been updated to use the new Linux
+          3.17 memfd subsystem instead of the old kdbus-specific one.
+
+        * systemd-networkd's DHCP client and server now support
+          FORCERENEW. There are also new configuration options to
+          configure the vendor client identifier and broadcast mode
+          for DHCP.
+
+        * systemd will no longer inform the kernel about the current
+          timezone, as this is necessarily incorrect and racy as the
+          kernel has no understanding of DST and similar
+          concepts. This hence means FAT timestamps will be always
+          considered UTC, similar to what Android is already
+          doing. Also, when the RTC is configured to the local time
+          (rather than UTC) systemd will never synchronize back to it,
+          as this might confuse Windows at a later boot.
+
+        * systemd-analyze gained a new command "verify" for offline
+          validation of unit files.
+
+        * systemd-networkd gained support for a couple of additional
+          settings for bonding networking setups. Also, the metric for
+          statically configured routes may now be configured. For
+          network interfaces where this is appropriate the peer IP
+          address may now be configured.
+
+        * systemd-networkd's DHCP client will no longer request
+          broadcasting by default, as this tripped up some networks.
+          For hardware where broadcast is required the feature should
+          be switched back on using RequestBroadcast=yes.
+
+        * systemd-networkd will now set up IPv4LL addresses (when
+          enabled) even if DHCP is configured successfully.
+
+        * udev will now default to respect network device names given
+          by the kernel when the kernel indicates that these are
+          predictable. This behavior can be tweaked by changing
+          NamePolicy= in the relevant .link file.
+
+        * A new library systemd-terminal has been added that
+          implements full TTY stream parsing and rendering. This
+          library is supposed to be used later on for implementing a
+          full userspace VT subsystem, replacing the current kernel
+          implementation.
+
+        * A new tool systemd-journal-upload has been added to push
+          journal data to a remote system running
+          systemd-journal-remote.
+
+        * journald will no longer forward all local data to another
+          running syslog daemon. This change has been made because
+          rsyslog (which appears to be the most commonly used syslog
+          implementation these days) no longer makes use of this, and
+          instead pulls the data out of the journal on its own. Since
+          forwarding the messages to a non-existent syslog server is
+          more expensive than we assumed we have now turned this
+          off. If you run a syslog server that is not a recent rsyslog
+          version, you have to turn this option on again
+          (ForwardToSyslog= in journald.conf).
+
+        * journald now optionally supports the LZ4 compressor for
+          larger journal fields. This compressor should perform much
+          better than XZ which was the previous default.
+
+        * machinectl now shows the IP addresses of local containers,
+          if it knows them, plus the interface name of the container.
+
+        * A new tool "systemd-escape" has been added that makes it
+          easy to escape strings to build unit names and similar.
+
+        * sd_notify() messages may now include a new ERRNO= field
+          which is parsed and collected by systemd and shown among the
+          "systemctl status" output for a service.
+
+        * A new component "systemd-firstboot" has been added that
+          queries the most basic systemd information (timezone,
+          hostname, root password) interactively on first
+          boot. Alternatively it may also be used to provision these
+          things offline on OS images installed into directories.
+
+        * The default sysctl.d/ snippets will now set
+
+                net.ipv4.conf.default.promote_secondaries=1
+
+          This has the benefit of no flushing secondary IP addresses
+          when primary addresses are removed.
+
+        Contributions from: Ansgar Burchardt, Bastien Nocera, Colin
+        Walters, Dan Dedrick, Daniel Buch, Daniel Korostil, Daniel
+        Mack, Dan Williams, Dave Reisner, David Herrmann, Denis
+        Kenzior, Eelco Dolstra, Eric Cook, Hannes Reinecke, Harald
+        Hoyer, Hong Shick Pak, Hui Wang, Jean-André Santoni, Jóhann
+        B. Guðmundsson, Jon Severinsson, Karel Zak, Kay Sievers, Kevin
+        Wells, Lennart Poettering, Lukas Nykryn, Mantas Mikulėnas,
+        Marc-Antoine Perennou, Martin Pitt, Michael Biebl, Michael
+        Marineau, Michael Olbrich, Michal Schmidt, Michal Sekletar,
+        Miguel Angel Ajo, Mike Gilbert, Olivier Brunel, Robert
+        Schiele, Ronny Chevalier, Simon McVittie, Sjoerd Simons, Stef
+        Walter, Steven Noonan, Susant Sahani, Tanu Kaskinen, Thomas
+        Blume, Thomas Hindoe Paaboel Andersen, Timofey Titovets,
+        Tobias Geerinckx-Rice, Tomasz Torcz, Tom Gundersen, Umut
+        Tezduyar Lindskog, Zbigniew Jędrzejewski-Szmek
+
+        -- Berlin, 2014-08-19
+
 CHANGES WITH 215:
 
         * A new tool systemd-sysusers has been added. This tool
@@ -292,7 +701,7 @@ CHANGES WITH 214:
           moved to /run/systemd/resolve/. If you have a symlink from
           /etc/resolv.conf, it might be necessary to correct it.
 
-        * Two new service settings, ProtectedHome= and ProtectedSystem=,
+        * Two new service settings, ProtectHome= and ProtectSystem=,
           have been added. When enabled, they will make the user data
           (such as /home) inaccessible or read-only and the system
           (such as /usr) read-only, for specific services. This allows
@@ -404,7 +813,7 @@ CHANGES WITH 214:
 
         * Access modes specified in tmpfiles snippets may now be
           prefixed with "~", which indicates that they shall be masked
-          by whether the existing file or directly is currently
+          by whether the existing file or directory is currently
           writable, readable or executable at all. Also, if specified,
           the sgid/suid/sticky bits will be masked for all
           non-directories.
@@ -1411,7 +1820,7 @@ CHANGES WITH 208:
           kernel, and on seats that are not seat0.
 
         * A new kernel command line option luks.options= is understood
-          now which allows specifiying LUKS options for usage for LUKS
+          now which allows specifying LUKS options for usage for LUKS
           encrypted partitions specified with luks.uuid=.
 
         * tmpfiles.d(5) snippets may now use specifier expansion in
diff --git a/README b/README
index b5545621c153ad7c5fad01984964da3ae4895be1..99b66a8396ff21e2aedf6172290970d0f9c8adeb 100644 (file)
--- a/README
+++ b/README
@@ -37,8 +37,7 @@ LICENSE:
         - except src/udev/* which is (currently still) GPLv2, GPLv2+
 
 REQUIREMENTS:
-        Linux kernel >= 3.0
-        Linux kernel >= 3.3 for loop device partition support features with nspawn
+        Linux kernel >= 3.7
         Linux kernel >= 3.8 for Smack support
 
         Kernel Config Options:
@@ -53,14 +52,14 @@ REQUIREMENTS:
           CONFIG_PROC_FS
           CONFIG_FHANDLE (libudev, mount and bind mount handling)
 
-        Udev will fail to work with the legacy layout:
+        udev will fail to work with the legacy sysfs layout:
           CONFIG_SYSFS_DEPRECATED=n
 
         Legacy hotplug slows down the system and confuses udev:
           CONFIG_UEVENT_HELPER_PATH=""
 
-        Userspace firmware loading is deprecated, will go away, and
-        sometimes causes problems:
+        Userspace firmware loading is not supported and should
+        be disabled in the kernel:
           CONFIG_FW_LOADER_USER_HELPER=n
 
         Some udev rules and virtualization detection relies on it:
@@ -117,10 +116,12 @@ REQUIREMENTS:
         libacl (optional)
         libselinux (optional)
         liblzma (optional)
+        liblz4 >= 119 (optional)
         libgcrypt (optional)
         libqrencode (optional)
         libmicrohttpd (optional)
         libpython (optional)
+        libidn (optional)
         gobject-introspection > 1.40.0 (optional)
         elfutils >= 158 (optional)
         make, gcc, and similar tools
@@ -128,11 +129,8 @@ REQUIREMENTS:
         During runtime, you need the following additional
         dependencies:
 
-        util-linux >= v2.19 (requires fsck -l, agetty -s),
-                      v2.21 required for tests in test/
+        util-linux >= v2.25 required
         dbus >= 1.4.0 (strictly speaking optional, but recommended)
-        sulogin (from util-linux >= 2.22 or sysvinit-tools, optional but recommended,
-                 required for tests in test/)
         dracut (optional)
         PolicyKit (optional)
 
@@ -200,6 +198,27 @@ USERS AND GROUPS:
         Similarly, the kdbus dbus1 proxy daemon requires the
         "systemd-bus-proxy" system user and group to exist.
 
+NSS:
+        systemd ships with three NSS modules:
+
+        nss-myhostname resolves the local hostname to locally
+        configured IP addresses, as well as "localhost" to
+        127.0.0.1/::1.
+
+        nss-resolve enables DNS resolution via the systemd-resolved
+        DNS/LLMNR caching stub resolver "systemd-resolved".
+
+        nss-mymachines enables resolution of all local containers
+        registered with machined to their respective IP addresses.
+
+        To make use of these NSS modules, please add them to the
+        "hosts: " line in /etc/nsswitch.conf. The "resolve" module
+        should replace the glibc "dns" module in this file.
+
+        The three modules should be used in the following order:
+
+                hosts: files mymachines resolve myhostname
+
 WARNINGS:
         systemd will warn you during boot if /etc/mtab is not a
         symlink to /proc/mounts. Please ensure that /etc/mtab is a
diff --git a/TODO b/TODO
index f09e85303a2e8374d69b08f1329e488420fd2e75..b07d6647154c4af374b7b05c495babfcf58c3b2d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,8 @@
+Fixes needed before 217:
+
+* verify that both resolved and timesyncd work OK without networkd around
+
 Bugfixes:
-* Re-enable "fsck -l" when it is ready:
-   https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
 
 * Should systemctl status \* work on all unit types, not just .service?
 
@@ -10,63 +12,177 @@ Bugfixes:
 
 * properly handle .mount unit state tracking when two mount points are stacked one on top of another on the exact same mount point.
 
-External:
-* Fedora: when installing fedora with yum --installroot /var/run is a directory, not a symlink
-   https://bugzilla.redhat.com/show_bug.cgi?id=975864
+* ExecStart with unicode characters fails in strv_split_quoted:
+
+          [Service]
+          Environment=ONE='one' "TWO='two two' too" THREE=
+          ExecStart=/bin/python3 -c 'import sys;print(sys.argv)' $ONE $TWO $THREE
 
+* MEMORY return code is overloaded for syntax errors in the commandline.
+  str_split_quoted() should return a real return code, so spawn_child can
+  report the failure properly.
+
+External:
 * Fedora: add an rpmlint check that verifies that all unit files in the RPM are listed in %systemd_post macros.
 
 * Fedora: post FPC ticket to move add %tmpfiles_create to the packaging guidelines
 
 * Fedora: move kernel image to /usr/lib/modules/, kernel-install will take care of populating /boot
 
+* Fedora: remove /etc/resolv.conf tmpfiles hack
+
+* wiki: update journal format documentation for lz4 additions
+
+* When lz4 gets an API for lz4 command output, make use of it to
+  compress coredumps in a way compatible with /usr/bin/lz4.
+
 Features:
 
-* new component "systemd-first-boot" which asks for locale, timezone,
-  root password on first boot if the configuration for that has not
-  been provisioned yet. Similar in style to what the distros have, but
-  minimalist, text-only /dev/console stuff.
+* journald: allow per-priority and per-service retention times when rotating/vacuuming
 
-* Add a new verb "systemctl top"
+* introduce systemd-timesync-wait.service or so to sync on an NTP fix?
+
+* systemd --user should issue sd_notify() upon reaching basic.target, not on becoming idle
+
+* configure.ac pretends dbus was optional but actually hardcodes use of dbus' pkg-config file to determine various dbus dirs such as policy and activation dirs
+
+* consider showing the unit names during boot up in the status output, not just the unit descriptions
+
+* dhcp: do we allow configuring dhcp routes on interfaces that are not the one we got the dhcp info from?
+
+* maybe allow timer units with an empty Units= setting, so that they
+  can be used for resuming the system but nothing else.
+
+* what to do about udev db binary stability for apps?
+
+* maybe provide an API to allow migration of foreign PIDs into existing scopes.
+
+* kdbus: maybe rename "connection name" concept to something that doesn't reuse the word "name"?
+
+* PID 1 doesn't apply nspawns devices cgroup policy
+
+* rework journal-send.c to use memfds for large blobs if they are available instead of unlinked files in /tmp. Also, if we detect that the kernel knows memfds, refuse anything but sealed memfds.
+
+* maybe support a new very "soft" reboot mode, that simply kills all processes, disassembles everything, flushes /run and sysvipc, and then reexecs systemd again
+
+* man: document that corrupted journal files is nothing to act on
+
+* bus-proxy: when passing messages from kdbus, make sure we properly
+  handle the case where a large number of fds is appended that we
+  cannot pass into sendmsg() of the AF_UNIX sokcet (which only accepts
+  253 messages)
+
+* busctl: add a pcap writer, using LINKTYPE_DBUS/231
+
+* man: maybe use the word "inspect" rather than "introspect"?
+
+* introduce machines.target to order after all nspawn instances
+
+* systemd-nspawn@.service should fail if some nspawn arg is invalid, with Type=notify
+
+* "machinectl list" should probably show columns for OS version and IP addresses
 
-* order OnCalendar timer units after timer-sync.target if DefaultDependencies=no so that we don't trigger them prematurely
+* systemctl: if it fails, show log output?
 
-* refuse mounting on symlinks
+* maybe add "systemctl edit" that copies unit files from /usr/lib/systemd/system to /etc/systemd/system and invokes vim on them
+
+* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a unit to fail (instead of skipping it) if some condition is not true...
+
+* refcounting in sd-resolve is borked
+
+* exponential backoff in timesyncd and resolved when we cannot reach a server
+
+* journald: make use of uid-range.h to managed uid ranges to split
+  journals in.
+
+* tmpfiles: port to unquote_many_words(), similar to sysusers
+
+* unquote_many_words() should probably be used by a lot of code that
+  currently uses FOREACH_WORD and friends. For example, most conf
+  parsing callbacks should use it.
+
+* logind: make the Suspend()/Hibernate() bus calls wait for the for
+  the job to be completed. before returning, so that clients can wait
+  for "systemctl suspend" to finish to know when the suspending is
+  complete.
+
+* merge ~/.local/share and ~/.local/lib into one similar /usr/lib and /usr/share....
+
+* journald: allows specification of UID range for splitting up journal files
+
+* systemd.show_status= should probably have a mode where only failed
+  units are shown.
+
+* networkd:
+  - add LLDP client side support
+  - the DHCP lease data (such as NTP/DNS) is still made available when
+    a carrier is lost on a link. It should be removed instantly.
+  - .network setting that allows overriding of the hostname to send to the dhcp server
+    http://lists.freedesktop.org/archives/systemd-devel/2014-July/021550.html
+  - expose in the API the following bits:
+        - option 15, domain name and/or option 119, search list
+        - option 12, host name and/or option 81, fqdn
+        - option 100, 101, timezone
+        - option 123, 144, geolocation
+        - option 252, configure http proxy (PAC/wpad)
+  - networkd's dhcp server should transparently pass on the DNS and
+    NTP server list it got from user configuration and its dhcp client
+    to clients. It should also pass on its own timezone information.
+  - provide a way to define a per-network interface default metric value
+    for all routes to it. possibly a second default for DHCP routes.
+  - allow Name= to be specified repeatedly in the [Match] section. Maybe also
+    support Name=foo*|bar*|baz ?
+
+* resolved:
+  - put networkd events and rtnl events at a higher priority, so that
+    we always process them before we process client requests
+  - DNSSEC
+        - use base64 for key presentation?
+        - add display of private key types (http://tools.ietf.org/html/rfc4034#appendix-A.1.1)?
+        - add nice formatting of DNS timestamps
+  - DNS
+        - search paths
+  - mDNS/DNS-SD
+        - avahi compat
+  - DNS-SD service registration from socket units
+  - edns0
+  - dname
+  - cname on PTR (?)
+
+* Ignore .busname units on classic D-Bus boots, systemd-resolved cannot be started on kdbus
+  without the active policy and should get a Wants=org.freedesktop.resolve1.busname to
+  pull-in the policy.
+
+* Allow multiple ExecStart= for all Type= settings, so that we can cover rescue.service nicely
+
+* Add a new verb "systemctl top"
 
 * logind: allow users to kill or lock their own sessions
 
+* add new gpt type for btrfs volumes
+
 * support empty /etc boots nicely:
   - nspawn/gpt-generator: introduce new gpt partition type for /usr
-  - nspawn: add --mode=auto,stateful,stateless,volatile
-  - fstab-generator: support auot/stateful/stateless/volatile on the kernel cmdline, too
+  - fstab-generator: support systemd.volatile=yes|no|state on the kernel cmdline, too, similar to nspawn's --volatile=
   - fstab-generator: add support for usr= in addition to root= on the kernel cmdline
 
 * generator that automatically discovers btrfs subvolumes, identifies their purpose based on some xattr on them.
 
 * support setting empty environment variables with Environment= and EnvironmentFile=
 
-* machined/machinectl: sort IP addresses we return by scope and protocol
-* machined: write NSS module for looking up IP addresses for machines
-
 * timer units: actually add extra delays to timer units with high AccuracySec values, don't start them already when we are awake...
 
-* timesyncd - hookup with networkd: NTP servers from dhcp
-
 * a way for container managers to turn off getty starting via $container_headless= or so...
 
 * figure out a nice way how we can let the admin know what child/sibling unit causes cgroup membership for a specific unit
 
 * journalctl: add the ability to look for the most recent process of a binary. journalctl /usr/bin/X11 --pid=-1 or so...
 
-* set NOTIFY_SOCKET also for control processes
-
 * mount_cgroup_controllers(): symlinks need to get the label applied
 
 * For timer units: add some mechanisms so that timer units that trigger immediately on boot do not have the services
   they run added to the initial transaction and thus confuse Type=idle.
 
-* Add timeout to early-boot, and shut down the system if it is hit. Solves the laptop-in-bag problem and is useful for embedded cases
-
 * Run most system services with cgroupfs read-only and procfs with a more secure mode (doesn't work, since the hidepid= option is per-pid-namespace, not per-mount)
 
 * sd-event: generate a failure of a default event loop is executed out-of-thread
@@ -146,8 +262,6 @@ Features:
 
 * unify dispatch table in systemctl_main() and friends
 
-* Automatically configure swap partition to use for hibernation by looking for largest swap partition on the root disk?
-
 * rfkill,backlight: we probably should run the load tools inside of the udev rules so that the state is properly initialized by the time other software sees it
 
 * After coming back from hibernation reset hibernation swap partition using the /dev/snapshot ioctl APIs
@@ -189,13 +303,13 @@ Features:
        - kdbus mapping
        - NameLost/NameAcquired obsolete
        - GVariant
-       - "const" properties (posted)
        - path escaping
   - update systemd.special(7) to mention that dbus.socket is only about the compatibility socket now
   - test bloom filter generation indexes
 
 * sd-event
   - allow multiple signal handlers per signal?
+  - document chaining of signal handler for SIGCHLD and child handlers
 
 * in the final killing spree, detect processes from the root directory, and
   complain loudly if they have argv[0][0] == '@' set.
@@ -212,8 +326,6 @@ Features:
 
 * maybe add a generator that looks for "systemd.run=" on the kernel cmdline for container usercases...
 
-* timedatctl, localectl: possibly make some commands work without the daemon, for chroot situations...
-
 * timedatectl: print a nicer message when enabling ntp fails because ntpd/chrony are not installed
 
 * cgtop: make cgtop useful in a container
@@ -376,7 +488,6 @@ Features:
   - "systemctl mask" should find all names by which a unit is accessible
     (i.e. by scanning for symlinks to it) and link them all to /dev/null
   - systemctl list-unit-files should list generated files (and probably with a new state "generated" for them, or so)
-  - systemctl: maybe add "systemctl add-wants" or so...
 
 * timer units:
   - timer units should get the ability to trigger when:
@@ -452,10 +563,6 @@ Features:
 
 * properly handle loop back mounts via fstab, especially regards to fsck/passno
 
-* allow services with no ExecStart= but with an ExecStop=
-
-* dracut-shutdown needs to be ordered before unmounting /boot
-
 * initialize the hostname from the fs label of /, if /etc/hostname does not exist?
 
 * rename "userspace" to "core-os"
@@ -483,7 +590,6 @@ Features:
 * ExecOnFailure=/usr/bin/foo
 
 * udev:
-  - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
   - move to LGPL
   - kill scsi_id
   - add trigger --subsystem-match=usb/usb_device device
@@ -529,9 +635,7 @@ Features:
 
 * make sure systemd-ask-password-wall does not shutdown systemd-ask-password-console too early
 
-* support sd_notify() style notification when reload begins (RELOADING=1), reload is finished (READY=1), and add ReloadSignal= then to use in combination
-
-* support sd_notify() style notification when shutting down, to make auto-exit bus services work (STOPPING=1)
+* add ReloadSignal= for configuring a reload signal to use
 
 * verify that the AF_UNIX sockets of a service in the fs still exist
   when we start a service in order to avoid confusion when a user
@@ -612,16 +716,13 @@ Features:
 * networkd:
    - add more keys to [Route] and [Address] sections
    - add support for more DHCPv4 options (and, longer term, other kinds of dynamic config)
-   - send hostname to DHCP server
    - add proper initrd support (in particular generate .network/.link files based on /proc/cmdline)
    - add reduced [Link] support to .network files
    - add Scope= parsing option for [Network]
    - properly handle routerless dhcp leases
-   - add veth netdev support (c.f. http://shorewall.net/bridge-Shorewall-perl.html#veth)
-   - add tun/tap netdev support
    - add more attribute support for SIT tunnel
-   - make metric of routes configurable
    - work with non-ethernet devices
+   - add support for more bond options
 
 * networkd-wait-online:
    - make operstates to wait for configurable?
@@ -629,7 +730,7 @@ Features:
 * dhcp:
    - figure out how much we can increase Maximum Message Size
    - export timezone information
-   - FORCERENEW
+   - support RFC4702 (pass FQDN)
 
 * dhcp6:
    - add functions to set previously stored IPv6 addresses on startup and get
@@ -639,7 +740,6 @@ Features:
    - implement reconfigure support, see 5.3., 15.11. and 22.20.
    - implement information request, see 1.2. and 18.1.5.
    - implement support for temporary adressess (IA_TA)
-   - implement elapsed time option
    - implement dhcpv6 authentication
    - investigate the usefulness of Confirm messages; i.e. are there any
      situations where the link changes without any loss in carrier detection
@@ -681,6 +781,11 @@ External:
 
 * register catalog database signature as file magic
 
+* zsh shell completion:
+  - <command> <verb> -<TAB> should complete options, but currently does not
+  - systemctl add-wants,add-requires
+
+
 Regularly:
 
 * look for close() vs. close_nointr() vs. close_nointr_nofail()
index 1804e9fcdcbceee38a20bf6e677c949af75d7bf4..1f5c50c0d1529d50b94dc3533ca72a47f0fa5849 100755 (executable)
@@ -1,10 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012, 2013 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2012-12-29'
+timestamp='2014-03-23'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -26,7 +24,7 @@ timestamp='2012-12-29'
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner. 
+# Originally written by Per Bothner.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
@@ -52,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -136,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       eval $set_cc_for_build
+       cat <<-EOF > $dummy.c
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+       ;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -809,7 +826,7 @@ EOF
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
-    i*:MSYS*:*)
+    *:MSYS*:*)
        echo ${UNAME_MACHINE}-pc-msys
        exit ;;
     i*:windows32*:*)
@@ -857,21 +874,21 @@ EOF
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
     aarch64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     aarch64_be:Linux:*:*)
        UNAME_MACHINE=aarch64_be
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -884,59 +901,54 @@ EOF
          EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
+           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        else
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
                | grep -q __ARM_PCS_VFP
            then
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
            else
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
            fi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     cris:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     crisv32:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     frv:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     hexagon:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:Linux:*:*)
-       LIBC=gnu
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -955,54 +967,63 @@ EOF
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
-    or32:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+    openrisc*:Linux:*:*)
+       echo or1k-unknown-linux-${LIBC}
+       exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-gnu
+       echo sparc-unknown-linux-${LIBC}
        exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+       echo hppa64-unknown-linux-${LIBC}
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
+         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+         *)    echo hppa-unknown-linux-${LIBC} ;;
        esac
        exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+       echo powerpc64-unknown-linux-${LIBC}
        exit ;;
     ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+       echo powerpc-unknown-linux-${LIBC}
+       exit ;;
+    ppc64le:Linux:*:*)
+       echo powerpc64le-unknown-linux-${LIBC}
+       exit ;;
+    ppcle:Linux:*:*)
+       echo powerpcle-unknown-linux-${LIBC}
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
+       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
+       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1235,19 +1256,31 @@ EOF
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           i386)
-               eval $set_cc_for_build
-               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-                     grep IS_64BIT_ARCH >/dev/null
-                 then
-                     UNAME_PROCESSOR="x86_64"
-                 fi
-               fi ;;
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
+       eval $set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
+           fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
+       fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1338,154 +1371,6 @@ EOF
        exit ;;
 esac
 
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-       "4"
-#else
-       ""
-#endif
-       ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
 cat >&2 <<EOF
 $0: unable to guess system type
 
index 52f04bcd719c3bdfa8cdb445433623fe1cd44ba3..66c5074366061bb12d524ec56b75fd1caf9da336 100755 (executable)
@@ -1,10 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012, 2013 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2012-12-29'
+timestamp='2014-07-28'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -70,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -256,12 +252,12 @@ case $basic_machine in
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
-       | arc \
+       | arc | arceb \
        | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
        | avr | avr32 \
        | be32 | be64 \
        | bfin \
-       | c4x | clipper \
+       | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
        | epiphany \
        | fido | fr30 | frv \
@@ -269,6 +265,7 @@ case $basic_machine in
        | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | k1om \
        | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -286,20 +283,22 @@ case $basic_machine in
        | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa32r6 | mipsisa32r6el \
        | mipsisa64 | mipsisa64el \
        | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64r6 | mipsisa64r6el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipsr5900 | mipsr5900el \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
        | moxie \
        | mt \
        | msp430 \
        | nds32 | nds32le | nds32be \
-       | nios | nios2 \
+       | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | open8 \
-       | or32 \
+       | open8 | or1k | or1knd | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
@@ -327,7 +326,7 @@ case $basic_machine in
        c6x)
                basic_machine=tic6x-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -369,13 +368,13 @@ case $basic_machine in
        | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | be32-* | be64-* \
        | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* \
-       | clipper-* | craynv-* | cydra-* \
+       | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -384,6 +383,7 @@ case $basic_machine in
        | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | k1om-* \
        | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
@@ -403,18 +403,22 @@ case $basic_machine in
        | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa32r6-* | mipsisa32r6el-* \
        | mipsisa64-* | mipsisa64el-* \
        | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64r6-* | mipsisa64r6el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipsr5900-* | mipsr5900el-* \
        | mipstx39-* | mipstx39el-* \
        | mmix-* \
        | mt-* \
        | msp430-* \
        | nds32-* | nds32le-* | nds32be-* \
-       | nios-* | nios2-* \
+       | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | open8-* \
+       | or1k*-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@@ -796,7 +800,7 @@ case $basic_machine in
                os=-mingw64
                ;;
        mingw32)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-mingw32
                ;;
        mingw32ce)
@@ -824,6 +828,10 @@ case $basic_machine in
                basic_machine=powerpc-unknown
                os=-morphos
                ;;
+       moxiebox)
+               basic_machine=moxie-unknown
+               os=-moxiebox
+               ;;
        msdos)
                basic_machine=i386-pc
                os=-msdos
@@ -832,7 +840,7 @@ case $basic_machine in
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
        msys)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-msys
                ;;
        mvs)
@@ -1354,7 +1362,7 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-             | -sym* | -kopensolaris* \
+             | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1369,14 +1377,14 @@ case $os in
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1500,9 +1508,6 @@ case $os in
        -aros*)
                os=-aros
                ;;
-       -kaos*)
-               os=-kaos
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
@@ -1551,6 +1556,9 @@ case $basic_machine in
        c4x-* | tic4x-*)
                os=-coff
                ;;
+       c8051-*)
+               os=-elf
+               ;;
        hexagon-*)
                os=-elf
                ;;
diff --git a/catalog/systemd.pl.catalog b/catalog/systemd.pl.catalog
new file mode 100644 (file)
index 0000000..0a172a2
--- /dev/null
@@ -0,0 +1,261 @@
+#  This file is part of systemd.
+#
+#  Copyright 2012 Lennart Poettering
+#  Copyright 2014 Piotr Drąg
+#
+#  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/>.
+
+# Message catalog for systemd's own messages
+# Polish translation
+
+# The catalog format is documented on
+# http://www.freedesktop.org/wiki/Software/systemd/catalog
+
+# For an explanation why we do all this, see https://xkcd.com/1024/
+
+-- f77379a8490b408bbe5f6940505a777b
+Subject: Uruchomiono Journal
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Systemowy proces dziennika został uruchomiony, otworzył pliki dziennika do
+zapisu i jest gotowy do przetwarzania żądań.
+
+-- d93fb3c9c24d451a97cea615ce59c00b
+Subject: Zatrzymano Journal
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Systemowy proces dziennika został wyłączony i zamknął wszystkie obecnie
+aktywne pliki dziennika.
+
+-- a596d6fe7bfa4994828e72309e95d61e
+Subject: Ograniczono komunikaty z usługi
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+Documentation: man:journald.conf(5)
+
+Usługa zapisała za dużo komunikatów w określonym czasie. Komunikaty z usługi
+zostały pominięte.
+
+Proszę zauważyć, że tylko komunikaty z danej usługi zostały pominięte. Nie ma
+to wpływu na komunikaty innych usług.
+
+Ograniczenia komunikatów mogą być konfigurowane za pomocą opcji
+RateLimitInterval= i RateLimitBurst= w pliku
+/etc/systemd/journald.conf. Strona journald.conf(5) zawiera więcej informacji.
+
+-- e9bf28e6e834481bb6f48f548ad13606
+Subject: Utracono komunikaty Journal
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Komunikaty jądra zostały utracone, ponieważ system dziennika nie mógł
+przetworzyć ich odpowiednio szybko.
+
+-- fc2e22bc6ee647b6b90729ab34a250b1
+Subject: Proces @COREDUMP_PID@ (@COREDUMP_COMM@) zrzucił plik core
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+Documentation: man:core(5)
+
+Proces @COREDUMP_PID@ (@COREDUMP_COMM@) uległ awarii i zrzucił plik core.
+
+Zwykle wskazuje to na błąd programistyczny w danym programie i powinno zostać zgłoszone jego producentowi jako błąd.
+
+-- 8d45620c1a4348dbb17410da57c60c66
+Subject: Utworzono nową sesję @SESSION_ID@ dla użytkownika @USER_ID@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
+
+Nowa sesja o identyfikatorze @SESSION_ID@ została utworzona dla użytkownika
+@USER_ID@.
+
+Proces prowadzący sesji: @LEADER@.
+
+-- 3354939424b4456d9802ca8333ed424a
+Subject: Zakończono sesję @SESSION_ID@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
+
+Sesja o identyfikatorze @SESSION_ID@ została zakończona.
+
+-- fcbefc5da23d428093f97c82a9290f7b
+Subject: Dostępne jest nowe stanowisko @SEAT_ID@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
+
+Nowe stanowisko @SEAT_ID@ zostało skonfigurowane i jest teraz dostępne.
+
+-- e7852bfe46784ed0accde04bc864c2d5
+Subject: Usunięto stanowisko @SEAT_ID@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
+
+Stanowisko @SEAT_ID@ zostało usunięte i nie jest już dostępne.
+
+-- c7a787079b354eaaa9e77b371893cd27
+Subject: Zmiana czasu
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Zegar systemowy został zmieniony na @REALTIME@ μs po 1 stycznia 1970.
+
+-- 45f82f4aef7a4bbf942ce861d1f20990
+Subject: Zmiana strefy czasowej na @TIMEZONE@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Systemowa strefa czasowa została zmieniona na @TIMEZONE@.
+
+-- b07a249cd024414a82dd00cd181378ff
+Subject: Ukończono uruchamianie systemu
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Wszystkie usługi systemowe obowiązkowo zakolejkowane do włączenia podczas
+uruchamiania systemu zostały pomyślnie uruchomione. Proszę zauważyć, że nie
+oznacza to, że komputer jest bezczynny, jako że usługi mogą wciąż kończyć
+proces uruchamiania.
+
+Uruchamianie jądra zajęło @KERNEL_USEC@ μs.
+
+Uruchamianie początkowego dysku RAM zajęło @INITRD_USEC@ μs.
+
+Uruchamianie przestrzeni użytkownika zajęło @USERSPACE_USEC@ μs.
+
+-- 6bbd95ee977941e497c48be27c254128
+Subject: Przejście do stanu uśpienia @SLEEP@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+System przeszedł do stanu uśpienia @SLEEP@.
+
+-- 8811e6df2a8e40f58a94cea26f8ebf14
+Subject: Wyjście ze stanu uśpienia @SLEEP@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+System wyszedł ze stanu uśpienia @SLEEP@.
+
+-- 98268866d1d54a499c4e98921d93bc40
+Subject: Zainicjowano wyłączenie systemu
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Zainicjowano wyłączenie systemd. Wyłączenie zostało rozpoczęte i wszystkie
+usługi systemowe zostały zakończone, a wszystkie systemy plików odmontowane.
+
+-- 7d4958e842da4a758f6c1cdc7b36dcc5
+Subject: Rozpoczęto uruchamianie jednostki @UNIT@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jednostka @UNIT@ rozpoczęła uruchamianie.
+
+-- 39f53479d3a045ac8e11786248231fbf
+Subject: Ukończono uruchamianie jednostki @UNIT@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jednostka @UNIT@ ukończyła uruchamianie.
+
+Wynik uruchamiania: @RESULT@.
+
+-- de5b426a63be47a7b6ac3eaac82e2f6f
+Subject: Rozpoczęto wyłączanie jednostki @UNIT@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jednostka @UNIT@ rozpoczęła wyłączanie.
+
+-- 9d1aaa27d60140bd96365438aad20286
+Subject: Ukończono wyłączanie jednostki @UNIT@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jednostka @UNIT@ ukończyła wyłączanie.
+
+-- be02cf6855d2428ba40df7e9d022f03d
+Subject: Jednostka @UNIT@ się nie powiodła
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jednostka @UNIT@ się nie powiodła.
+
+Wynik: @RESULT@.
+
+-- d34d037fff1847e6ae669a370e694725
+Subject: Rozpoczęto ponowne wczytywanie konfiguracji jednostki @UNIT@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jednostka @UNIT@ rozpoczęła ponowne wczytywanie swojej konfiguracji.
+
+-- 7b05ebc668384222baa8881179cfda54
+Subject: Ukończono ponowne wczytywanie konfiguracji jednostki @UNIT@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jednostka @UNIT@ ukończyła ponowne wczytywanie swojej konfiguracji.
+
+Wynik: @RESULT@.
+
+-- 641257651c1b4ec9a8624d7a40a9e1e7
+Subject: Nie można wykonać procesu @EXECUTABLE@
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Proces @EXECUTABLE@ nie mógł zostać wykonany i się nie powiódł.
+
+Numer błędu zwrócony podczas wykonywania tego procesu: @ERRNO@.
+
+-- 0027229ca0644181a76c4e92458afa2e
+Subject: Nie można przekazać jednego lub więcej komunikatów do syslog
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Jeden lub więcej komunikatów nie może zostać przekazanych do usługi syslog
+uruchomionej obok journald. Zwykle oznacza to, że implementacja syslog nie
+jest w stanie nadążyć za prędkością kolejki komunikatów.
+
+-- 1dee0369c7fc4736b7099b38ecb46ee7
+Subject: Punkt montowania nie jest pusty
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Katalog @WHERE@ został podany jako punkt montowania (drugie pole w pliku
+/etc/fstab lub pole Where= w pliku jednostki systemd) i nie jest pusty. Nie
+wpływa to na montowanie, ale wcześniej istniejące pliki w tym katalogu stają
+się niedostępne. Aby zobaczyć te pliki, proszę ręcznie zamontować system
+plików w innym położeniu.
+
+-- 24d8d4452573402496068381a6312df2
+Subject: Uruchomiono maszynę wirtualną lub kontener
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Maszyna wirtualna @NAME@ (PID prowadzący @LEADER@) została uruchomiona i jest
+gotowa do użycia.
+
+-- 58432bd3bace477cb514b56381b8a758
+Subject: Zakończono maszynę wirtualną lub kontener
+Defined-By: systemd
+Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
+
+Maszyna wirtualna @NAME@ (PID prowadzący @LEADER@) została wyłączona.
index 1ad8aed1aa1c3cc9bfb37bd5e2098e1a1457d8f7..624a721eec653d1f370f1255207172b489b4bbe3 100644 (file)
@@ -21,6 +21,9 @@
 /* Define if PolicyKit support is to be enabled */
 #undef ENABLE_POLKIT
 
+/* Define if terminal support is to be enabled */
+#undef ENABLE_TERMINAL
+
 /* ACL available */
 #undef HAVE_ACL
 
    `IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */
 #undef HAVE_DECL_IFLA_IPTUN_6RD_RELAY_PREFIXLEN
 
+/* Define to 1 if you have the declaration of `IFLA_MACVLAN_FLAGS', and to 0
+   if you don't. */
+#undef HAVE_DECL_IFLA_MACVLAN_FLAGS
+
 /* Define to 1 if you have the declaration of `IFLA_PHYS_PORT_ID', and to 0 if
    you don't. */
 #undef HAVE_DECL_IFLA_PHYS_PORT_ID
    if you don't. */
 #undef HAVE_DECL_IFLA_VLAN_PROTOCOL
 
+/* Define to 1 if you have the declaration of `IFLA_VTI_REMOTE', and to 0 if
+   you don't. */
+#undef HAVE_DECL_IFLA_VTI_REMOTE
+
 /* Define to 1 if you have the declaration of `IFLA_VXLAN_LOCAL6', and to 0 if
    you don't. */
 #undef HAVE_DECL_IFLA_VXLAN_LOCAL6
 /* Define to 1 if you have the <elfutils/libdwfl.h> header file. */
 #undef HAVE_ELFUTILS_LIBDWFL_H
 
-/* Define to 1 if you have the `fanotify_init' function. */
-#undef HAVE_FANOTIFY_INIT
-
-/* Define to 1 if you have the `fanotify_mark' function. */
-#undef HAVE_FANOTIFY_MARK
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
-/* Define if FIRMWARE is available */
-#undef HAVE_FIRMWARE
-
 /* GCRYPT available */
 #undef HAVE_GCRYPT
 
 /* Define if libcryptsetup is available */
 #undef HAVE_LIBCRYPTSETUP
 
+/* Define if libcurl is available */
+#undef HAVE_LIBCURL
+
 /* Define to 1 if you have the `dw' library (-ldw). */
 #undef HAVE_LIBDW
 
+/* Define if libidn is available */
+#undef HAVE_LIBIDN
+
 /* Define to 1 if you have the <linux/btrfs.h> header file. */
 #undef HAVE_LINUX_BTRFS_H
 
+/* Define to 1 if you have the <linux/memfd.h> header file. */
+#undef HAVE_LINUX_MEMFD_H
+
 /* Logind support available */
 #undef HAVE_LOGIND
 
+/* Define in LZ4 is available */
+#undef HAVE_LZ4
+
+/* Define to 1 if you have the <lz4.h> header file. */
+#undef HAVE_LZ4_H
+
 /* Machined support available */
 #undef HAVE_MACHINED
 
    to 0 otherwise. */
 #undef HAVE_MALLOC
 
+/* Define to 1 if you have the `memfd_create' function. */
+#undef HAVE_MEMFD_CREATE
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define if utmp/wtmp support is enabled */
+#undef HAVE_UTMP
+
 /* Define to 1 if you have the <valgrind/memcheck.h> header file. */
 #undef HAVE_VALGRIND_MEMCHECK_H
 
 /* Define to the type of arg 5 for `select'. */
 #undef SELECT_TYPE_ARG5
 
+/* The size of `dev_t', as computed by sizeof. */
+#undef SIZEOF_DEV_T
+
 /* The size of `gid_t', as computed by sizeof. */
 #undef SIZEOF_GID_T
 
index c94712e5d3ccb5f60ae3e6122ad5d0267c93d9f2..7bf998bbcd69f09ecef673f74ae481150ff9ded3 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for systemd 215.
+# Generated by GNU Autoconf 2.69 for systemd 217.
 #
 # Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=systemd>.
 #
@@ -591,8 +591,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='systemd'
 PACKAGE_TARNAME='systemd'
-PACKAGE_VERSION='215'
-PACKAGE_STRING='systemd 215'
+PACKAGE_VERSION='217'
+PACKAGE_STRING='systemd 217'
 PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=systemd'
 PACKAGE_URL='http://www.freedesktop.org/wiki/Software/systemd'
 
@@ -658,15 +658,16 @@ HAVE_SYSV_COMPAT_TRUE
 M4_DEFINES
 SYSTEM_SYSVRCND_PATH
 SYSTEM_SYSVINIT_PATH
+ENABLE_LDCONFIG_FALSE
+ENABLE_LDCONFIG_TRUE
+ENABLE_HIBERNATE_FALSE
+ENABLE_HIBERNATE_TRUE
 ENABLE_MANPAGES_FALSE
 ENABLE_MANPAGES_TRUE
 ENABLE_GUDEV_FALSE
 ENABLE_GUDEV_TRUE
 GLIB_LIBS
 GLIB_CFLAGS
-ENABLE_FIRMWARE_FALSE
-ENABLE_FIRMWARE_TRUE
-FIRMWARE_PATH
 HAVE_MYHOSTNAME_FALSE
 HAVE_MYHOSTNAME_TRUE
 LIBOBJS
@@ -677,8 +678,10 @@ RC_LOCAL_SCRIPT_PATH_STOP
 RC_LOCAL_SCRIPT_PATH_START
 ENABLE_KDBUS_FALSE
 ENABLE_KDBUS_TRUE
-ENABLE_MULTI_SEAT_X_FALSE
-ENABLE_MULTI_SEAT_X_TRUE
+ENABLE_TERMINAL_FALSE
+ENABLE_TERMINAL_TRUE
+TERMINAL_LIBS
+TERMINAL_CFLAGS
 ENABLE_EFI_FALSE
 ENABLE_EFI_TRUE
 ENABLE_NETWORKD_FALSE
@@ -711,6 +714,8 @@ ENABLE_BACKLIGHT_FALSE
 ENABLE_BACKLIGHT_TRUE
 ENABLE_RANDOMSEED_FALSE
 ENABLE_RANDOMSEED_TRUE
+ENABLE_FIRSTBOOT_FALSE
+ENABLE_FIRSTBOOT_TRUE
 ENABLE_SYSUSERS_FALSE
 ENABLE_SYSUSERS_TRUE
 ENABLE_TMPFILES_FALSE
@@ -719,12 +724,18 @@ ENABLE_QUOTACHECK_FALSE
 ENABLE_QUOTACHECK_TRUE
 ENABLE_BOOTCHART_FALSE
 ENABLE_BOOTCHART_TRUE
-ENABLE_READAHEAD_FALSE
-ENABLE_READAHEAD_TRUE
 ENABLE_VCONSOLE_FALSE
 ENABLE_VCONSOLE_TRUE
 ENABLE_BINFMT_FALSE
 ENABLE_BINFMT_TRUE
+HAVE_LIBIDN_FALSE
+HAVE_LIBIDN_TRUE
+LIBIDN_LIBS
+LIBIDN_CFLAGS
+HAVE_LIBCURL_FALSE
+HAVE_LIBCURL_TRUE
+LIBCURL_LIBS
+LIBCURL_CFLAGS
 HAVE_GNUTLS_FALSE
 HAVE_GNUTLS_TRUE
 GNUTLS_LIBS
@@ -758,10 +769,15 @@ ACL_LIBS
 HAVE_PAM_FALSE
 HAVE_PAM_TRUE
 PAM_LIBS
+HAVE_COMPRESSION_FALSE
+HAVE_COMPRESSION_TRUE
+HAVE_LZ4_FALSE
+HAVE_LZ4_TRUE
 HAVE_XZ_FALSE
 HAVE_XZ_TRUE
 XZ_LIBS
 XZ_CFLAGS
+CERTIFICATEROOT
 DEBUGTTY
 SUSHELL
 HAVE_APPARMOR_FALSE
@@ -790,6 +806,8 @@ ENABLE_COVERAGE_TRUE
 lcov_found
 ENABLE_COMPAT_LIBS_FALSE
 ENABLE_COMPAT_LIBS_TRUE
+HAVE_UTMP_FALSE
+HAVE_UTMP_TRUE
 HAVE_DBUS_FALSE
 HAVE_DBUS_TRUE
 DBUS_LIBS
@@ -1032,6 +1050,7 @@ enable_undefined_sanitizer
 with_python
 enable_python_devel
 enable_dbus
+enable_utmp
 enable_compat_libs
 enable_coverage
 enable_kmod
@@ -1043,7 +1062,9 @@ enable_selinux
 enable_apparmor
 with_debug_shell
 with_debug_tty
+with_certificate_root
 enable_xz
+enable_lz4
 enable_pam
 enable_acl
 enable_smack
@@ -1056,13 +1077,15 @@ enable_libcryptsetup
 enable_qrencode
 enable_microhttpd
 enable_gnutls
+enable_libcurl
+enable_libidn
 enable_binfmt
 enable_vconsole
-enable_readahead
 enable_bootchart
 enable_quotacheck
 enable_tmpfiles
 enable_sysusers
+enable_firstboot
 enable_randomseed
 enable_backlight
 enable_rfkill
@@ -1082,7 +1105,7 @@ enable_resolved
 with_dns_servers
 enable_networkd
 enable_efi
-enable_multi_seat_x
+enable_terminal
 enable_kdbus
 with_rc_local_script_path_start
 with_rc_local_script_path_stop
@@ -1090,9 +1113,10 @@ with_kbd_loadkeys
 with_kbd_setfont
 with_telinit
 enable_myhostname
-with_firmware_path
 enable_gudev
 enable_manpages
+enable_hibernate
+enable_ldconfig
 with_sysvinit_path
 with_sysvrcnd_path
 with_tty_gid
@@ -1149,6 +1173,12 @@ MICROHTTPD_CFLAGS
 MICROHTTPD_LIBS
 GNUTLS_CFLAGS
 GNUTLS_LIBS
+LIBCURL_CFLAGS
+LIBCURL_LIBS
+LIBIDN_CFLAGS
+LIBIDN_LIBS
+TERMINAL_CFLAGS
+TERMINAL_LIBS
 GLIB_CFLAGS
 GLIB_LIBS'
 
@@ -1691,7 +1721,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures systemd 215 to adapt to many kinds of systems.
+\`configure' configures systemd 217 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1761,7 +1791,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of systemd 215:";;
+     short | recursive ) echo "Configuration of systemd 217:";;
    esac
   cat <<\_ACEOF
 
@@ -1796,6 +1826,7 @@ Optional Features:
                           enable -fsanitize=undefined
   --disable-python-devel  Do not build python modules
   --disable-dbus          disable usage of dbus-1 in tests
+  --disable-utmp          disable utmp/wtmp log handling
   --enable-compat-libs    Enable creation of compatibility libraries
   --enable-coverage       enable test coverage
   --disable-kmod          disable loadable modules support
@@ -1806,6 +1837,7 @@ Optional Features:
   --disable-selinux       Disable optional SELINUX support
   --disable-apparmor      Disable optional AppArmor support
   --disable-xz            Disable optional XZ support
+  --enable-lz4            Enable optional LZ4 support
   --disable-pam           Disable optional PAM support
   --disable-acl           Disable optional ACL support
   --disable-smack         Disable optional SMACK support
@@ -1816,13 +1848,15 @@ Optional Features:
   --disable-qrencode      disable qrencode support
   --disable-microhttpd    disable microhttpd support
   --disable-gnutls        disable gnutls support
+  --disable-libcurl       disable libcurl support
+  --disable-libidn        Disable optional LIBIDN support
   --disable-binfmt        disable binfmt tool
   --disable-vconsole      disable vconsole tool
-  --disable-readahead     disable readahead tools
   --disable-bootchart     disable bootchart tool
   --disable-quotacheck    disable quotacheck tools
   --disable-tmpfiles      disable tmpfiles support
   --disable-sysusers      disable sysusers support
+  --disable-firstboot     disable firstboot support
   --disable-randomseed    disable randomseed tools
   --disable-backlight     disable backlight tools
   --disable-rfkill        disable rfkill tools
@@ -1837,11 +1871,13 @@ Optional Features:
   --disable-resolved      disable resolve daemon
   --disable-networkd      disable networkd
   --disable-efi           disable EFI support
-  --disable-multi-seat-x  do not build multi-seat-x
+  --enable-terminal       enable terminal support
   --enable-kdbus          do connect to kdbus by default
   --disable-myhostname    disable nss-myhostname support
   --disable-gudev         disable Gobject libudev support [default=enabled]
   --disable-manpages      disable manpages
+  --disable-hibernate     disable hibernation support
+  --disable-ldconfig      disable ldconfig
   --enable-split-usr      Assume that /bin, /sbin aren\'t symlinks into /usr
   --disable-tests         disable tests
 
@@ -1858,6 +1894,8 @@ Optional Packages:
                           systemd-python (default: test)
   --with-debug-shell=PATH Path to debug shell binary
   --with-debug-tty=PATH   Specify the tty device for debug shell
+  --with-certificate-root=PATH
+                          Specify the prefix for TLS certificates [/etc/ssl]
   --with-smack-run-label=STRING
                           run systemd --system with a specific SMACK label
   --with-libgcrypt-prefix=PFX
@@ -1882,8 +1920,6 @@ Optional Packages:
                           Path to loadkeys
   --with-kbd-setfont=PATH Path to setfont
   --with-telinit=PATH     Path to telinit
-  --with-firmware-path=DIR[:DIR[...]]
-                          Firmware search path (default="")
   --with-sysvinit-path=PATH
                           Specify the path to where the SysV init scripts are
                           located
@@ -1970,6 +2006,17 @@ Some influential environment variables:
   GNUTLS_CFLAGS
               C compiler flags for GNUTLS, overriding pkg-config
   GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
+  LIBCURL_CFLAGS
+              C compiler flags for LIBCURL, overriding pkg-config
+  LIBCURL_LIBS
+              linker flags for LIBCURL, overriding pkg-config
+  LIBIDN_CFLAGS
+              C compiler flags for LIBIDN, overriding pkg-config
+  LIBIDN_LIBS linker flags for LIBIDN, overriding pkg-config
+  TERMINAL_CFLAGS
+              C compiler flags for TERMINAL, overriding pkg-config
+  TERMINAL_LIBS
+              linker flags for TERMINAL, overriding pkg-config
   GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
   GLIB_LIBS   linker flags for GLIB, overriding pkg-config
 
@@ -2040,7 +2087,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-systemd configure 215
+systemd configure 217
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2692,7 +2739,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by systemd $as_me 215, which was
+It was created by systemd $as_me 217, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5098,7 +5145,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='systemd'
- VERSION='215'
+ VERSION='217'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12684,7 +12731,7 @@ fi
 $as_echo "$USE_NLS" >&6; }
 
 
-if test x"$enable_nls" != xno; then :
+if test x"$enable_nls" != xno -o "x$enable_polkit" != xno; then :
 
     # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
 
@@ -14672,7 +14719,7 @@ else
            eval "CFLAGS='-Werror -fsanitize=address'"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int a = 0; int main(void) { return a; }
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   eval "cc_cv_CFLAGS__fsanitize_address='yes'"
@@ -14719,7 +14766,7 @@ else
            eval "CFLAGS='-Werror -fsanitize=undefined'"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int a = 0; int main(void) { return a; }
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   eval "cc_cv_CFLAGS__fsanitize_undefined='yes'"
@@ -14787,7 +14834,6 @@ sanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags"
         -ffast-math \
         -fno-common \
         -fdiagnostics-show-option \
-        -fdiagnostics-color \
         -fno-strict-aliasing \
         -fvisibility=hidden \
         -ffunction-sections \
@@ -14806,7 +14852,7 @@ else
            eval "CFLAGS='-Werror $flag'"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int a = 0; int main(void) { return a; }
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   eval "`$as_echo "cc_cv_CFLAGS_$flag" | $as_tr_sh`='yes'"
 
   done
 
+
+case $CC in #(
+  *clang*) :
+
+  for flag in \
+               -Wno-typedef-redefinition \
+               -Wno-gnu-variable-sized-type-not-at-end \
+        ; do
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports flag $flag in envvar CPPFLAGS" >&5
+$as_echo_n "checking if $CC supports flag $flag in envvar CPPFLAGS... " >&6; }
+if { as_var=`$as_echo "cc_cv_CPPFLAGS_$flag" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "cc_save_CPPFLAGS='${CPPFLAGS}'"
+           eval "CPPFLAGS='-Werror $flag'"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "`$as_echo "cc_cv_CPPFLAGS_$flag" | $as_tr_sh`='yes'"
+else
+  eval "`$as_echo "cc_cv_CPPFLAGS_$flag" | $as_tr_sh`='no'"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+           eval "CPPFLAGS='$cc_save_CPPFLAGS'"
+fi
+eval ac_res=\$`$as_echo "cc_cv_CPPFLAGS_$flag" | $as_tr_sh`
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+  if eval test x$`$as_echo "cc_cv_CPPFLAGS_$flag" | $as_tr_sh` = xyes; then :
+  eval "with_cppflags='${with_cppflags} $flag'"
+fi
+
+  done
+ ;; #(
+  *) :
+     ;;
+esac
+
 case $CFLAGS in #(
   *-O[12345\ ]*) :
 
@@ -14842,7 +14931,7 @@ else
            eval "CFLAGS='-Werror $flag'"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int a = 0; int main(void) { return a; }
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   eval "`$as_echo "cc_cv_CFLAGS_$flag" | $as_tr_sh`='yes'"
@@ -14885,7 +14974,7 @@ else
            eval "CPPFLAGS='-Werror $flag'"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int a = 0; int main(void) { return a; }
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   eval "`$as_echo "cc_cv_CPPFLAGS_$flag" | $as_tr_sh`='yes'"
@@ -14932,7 +15021,7 @@ else
            eval "LDFLAGS='-Werror $flag'"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int a = 0; int main(void) { return a; }
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   eval "`$as_echo "cc_cv_LDFLAGS_$flag" | $as_tr_sh`='yes'"
@@ -15088,6 +15177,39 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of dev_t" >&5
+$as_echo_n "checking size of dev_t... " >&6; }
+if ${ac_cv_sizeof_dev_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (dev_t))" "ac_cv_sizeof_dev_t"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_dev_t" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (dev_t)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_dev_t=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_dev_t" >&5
+$as_echo "$ac_cv_sizeof_dev_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DEV_T $ac_cv_sizeof_dev_t
+_ACEOF
+
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
 done
 
+for ac_header in linux/memfd.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "linux/memfd.h" "ac_cv_header_linux_memfd_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_memfd_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LINUX_MEMFD_H 1
+_ACEOF
+
+fi
+
+done
+
 
 # unconditionally pull-in librt with old glibc versions
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
@@ -15947,13 +16081,12 @@ RT_LIBS="$LIBS"
 
 LIBS="$save_LIBS"
 
-for ac_func in fanotify_init fanotify_mark
+for ac_func in memfd_create
 do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create"
+if test "x$ac_cv_func_memfd_create" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_MEMFD_CREATE 1
 _ACEOF
 
 fi
@@ -16063,6 +16196,48 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+ac_fn_c_check_decl "$LINENO" "IFLA_MACVLAN_FLAGS" "ac_cv_have_decl_IFLA_MACVLAN_FLAGS" "
+#include <inttypes.h>
+#include <netinet/in.h>
+#include <netinet/ether.h>
+#include <linux/rtnetlink.h>
+#include <net/if.h>
+#include <linux/ip.h>
+#include <linux/if_tunnel.h>
+#include <linux/if_link.h>
+#include <linux/if_bridge.h>
+
+"
+if test "x$ac_cv_have_decl_IFLA_MACVLAN_FLAGS" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_IFLA_MACVLAN_FLAGS $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "IFLA_VTI_REMOTE" "ac_cv_have_decl_IFLA_VTI_REMOTE" "
+#include <inttypes.h>
+#include <netinet/in.h>
+#include <netinet/ether.h>
+#include <linux/rtnetlink.h>
+#include <net/if.h>
+#include <linux/ip.h>
+#include <linux/if_tunnel.h>
+#include <linux/if_link.h>
+#include <linux/if_bridge.h>
+
+"
+if test "x$ac_cv_have_decl_IFLA_VTI_REMOTE" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_IFLA_VTI_REMOTE $ac_have_decl
+_ACEOF
 ac_fn_c_check_decl "$LINENO" "IFLA_PHYS_PORT_ID" "ac_cv_have_decl_IFLA_PHYS_PORT_ID" "
 #include <inttypes.h>
 #include <netinet/in.h>
@@ -16289,6 +16464,34 @@ else
 fi
 
 
+# ------------------------------------------------------------------------------
+have_utmp=yes
+# Check whether --enable-utmp was given.
+if test "${enable_utmp+set}" = set; then :
+  enableval=$enable_utmp; case "x${enableval}" in #(
+  xyes) :
+    have_utmp=yes ;; #(
+  xno) :
+    have_utmp=no ;; #(
+  *) :
+    as_fn_error $? "bad value ${enableval} for --enable-utmp" "$LINENO" 5 ;;
+esac
+fi
+
+if test "x$have_utmp" = "xyes"; then :
+
+$as_echo "#define HAVE_UTMP 1" >>confdefs.h
+
+fi
+ if test "x$have_utmp" = "xyes"; then
+  HAVE_UTMP_TRUE=
+  HAVE_UTMP_FALSE='#'
+else
+  HAVE_UTMP_TRUE='#'
+  HAVE_UTMP_FALSE=
+fi
+
+
 # ------------------------------------------------------------------------------
 have_compat_libs=no
 # Check whether --enable-compat_libs was given.
@@ -16380,7 +16583,7 @@ else
            eval "CFLAGS='-Werror $flag'"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int a = 0; int main(void) { return a; }
+int main(void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   eval "`$as_echo "cc_cv_CFLAGS_$flag" | $as_tr_sh`='yes'"
 
 
 
+
+# Check whether --with-certificate-root was given.
+if test "${with_certificate_root+set}" = set; then :
+  withval=$with_certificate_root; CERTIFICATEROOT="$withval"
+else
+  CERTIFICATEROOT="/etc/ssl"
+fi
+
+
+
+
 # ------------------------------------------------------------------------------
 have_xz=no
 # Check whether --enable-xz was given.
        # Put the nasty error message in config.log where it belongs
        echo "$XZ_PKG_ERRORS" >&5
 
-       have_xz=no
+       as_fn_error $? "Package requirements ( liblzma ) were not met:
+
+$XZ_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables XZ_CFLAGS
+and XZ_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-       have_xz=no
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables XZ_CFLAGS
+and XZ_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
        XZ_CFLAGS=$pkg_cv_XZ_CFLAGS
        XZ_LIBS=$pkg_cv_XZ_LIBS
@@ -17096,7 +17330,7 @@ $as_echo "#define HAVE_XZ 1" >>confdefs.h
  have_xz=yes
 fi
         if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
-                as_fn_error $? "*** Xz support requested but libraries not found" "$LINENO" 5
+                as_fn_error $? "*** XZ support requested but libraries not found" "$LINENO" 5
         fi
 fi
  if test "$have_xz" = "yes"; then
@@ -17108,6 +17342,51 @@ else
 fi
 
 
+# ------------------------------------------------------------------------------
+have_lz4=no
+# Check whether --enable-lz4 was given.
+if test "${enable_lz4+set}" = set; then :
+  enableval=$enable_lz4;
+fi
+
+if test "x$enable_lz4" == "xyes"; then :
+
+        for ac_header in lz4.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
+if test "x$ac_cv_header_lz4_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LZ4_H 1
+_ACEOF
+
+$as_echo "#define HAVE_LZ4 1" >>confdefs.h
+ have_lz4=yes
+else
+  as_fn_error $? "*** LZ4 support requested but headers not found" "$LINENO" 5
+fi
+
+done
+
+
+fi
+ if test "$have_lz4" = "yes"; then
+  HAVE_LZ4_TRUE=
+  HAVE_LZ4_FALSE='#'
+else
+  HAVE_LZ4_TRUE='#'
+  HAVE_LZ4_FALSE=
+fi
+
+
+ if test "$have_xz" = "yes" -o "$have_lz4" = "yes"; then
+  HAVE_COMPRESSION_TRUE=
+  HAVE_COMPRESSION_FALSE='#'
+else
+  HAVE_COMPRESSION_TRUE='#'
+  HAVE_COMPRESSION_FALSE=
+fi
+
+
 # ------------------------------------------------------------------------------
 # Check whether --enable-pam was given.
 if test "${enable_pam+set}" = set; then :
@@ -18208,6 +18487,196 @@ else
 fi
 
 
+# ------------------------------------------------------------------------------
+have_libcurl=no
+# Check whether --enable-libcurl was given.
+if test "${enable_libcurl+set}" = set; then :
+  enableval=$enable_libcurl;
+fi
+
+if test "x$enable_libcurl" != "xno"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCURL" >&5
+$as_echo_n "checking for LIBCURL... " >&6; }
+
+if test -n "$LIBCURL_CFLAGS"; then
+    pkg_cv_LIBCURL_CFLAGS="$LIBCURL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBCURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBCURL_LIBS"; then
+    pkg_cv_LIBCURL_LIBS="$LIBCURL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBCURL_LIBS=`$PKG_CONFIG --libs "libcurl" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               LIBCURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl" 2>&1`
+        else
+               LIBCURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$LIBCURL_PKG_ERRORS" >&5
+
+       have_libcurl=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_libcurl=no
+else
+       LIBCURL_CFLAGS=$pkg_cv_LIBCURL_CFLAGS
+       LIBCURL_LIBS=$pkg_cv_LIBCURL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_LIBCURL 1" >>confdefs.h
+ have_libcurl=yes
+fi
+        if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
+                as_fn_error $? "*** libcurl support requested but libraries not found" "$LINENO" 5
+        fi
+fi
+ if test "$have_libcurl" = "yes"; then
+  HAVE_LIBCURL_TRUE=
+  HAVE_LIBCURL_FALSE='#'
+else
+  HAVE_LIBCURL_TRUE='#'
+  HAVE_LIBCURL_FALSE=
+fi
+
+
+# ------------------------------------------------------------------------------
+have_libidn=no
+# Check whether --enable-libidn was given.
+if test "${enable_libidn+set}" = set; then :
+  enableval=$enable_libidn;
+fi
+
+if test "x$enable_libidn" != "xno"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBIDN" >&5
+$as_echo_n "checking for LIBIDN... " >&6; }
+
+if test -n "$LIBIDN_CFLAGS"; then
+    pkg_cv_LIBIDN_CFLAGS="$LIBIDN_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libidn") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBIDN_CFLAGS=`$PKG_CONFIG --cflags "libidn" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBIDN_LIBS"; then
+    pkg_cv_LIBIDN_LIBS="$LIBIDN_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libidn") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBIDN_LIBS=`$PKG_CONFIG --libs "libidn" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               LIBIDN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libidn" 2>&1`
+        else
+               LIBIDN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libidn" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$LIBIDN_PKG_ERRORS" >&5
+
+       have_libidn=no
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       have_libidn=no
+else
+       LIBIDN_CFLAGS=$pkg_cv_LIBIDN_CFLAGS
+       LIBIDN_LIBS=$pkg_cv_LIBIDN_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
+
+                have_libidn=yes
+                M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"
+fi
+        if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
+                as_fn_error $? "*** libidn support requested but libraries not found" "$LINENO" 5
+        fi
+fi
+ if test "$have_libidn" = "yes"; then
+  HAVE_LIBIDN_TRUE=
+  HAVE_LIBIDN_FALSE='#'
+else
+  HAVE_LIBIDN_TRUE='#'
+  HAVE_LIBIDN_FALSE=
+fi
+
+
 # ------------------------------------------------------------------------------
 have_binfmt=no
 # Check whether --enable-binfmt was given.
@@ -18246,25 +18715,6 @@ else
 fi
 
 
-# ------------------------------------------------------------------------------
-have_readahead=no
-# Check whether --enable-readahead was given.
-if test "${enable_readahead+set}" = set; then :
-  enableval=$enable_readahead;
-fi
-
-if test "x$enable_readahead" != "xno"; then
-        have_readahead=yes
-fi
- if test "$have_readahead" = "yes"; then
-  ENABLE_READAHEAD_TRUE=
-  ENABLE_READAHEAD_FALSE='#'
-else
-  ENABLE_READAHEAD_TRUE='#'
-  ENABLE_READAHEAD_FALSE=
-fi
-
-
 # ------------------------------------------------------------------------------
 have_bootchart=no
 # Check whether --enable-bootchart was given.
@@ -18341,6 +18791,25 @@ else
 fi
 
 
+# ------------------------------------------------------------------------------
+have_firstboot=no
+# Check whether --enable-firstboot was given.
+if test "${enable_firstboot+set}" = set; then :
+  enableval=$enable_firstboot;
+fi
+
+if test "x$enable_firstboot" != "xno"; then
+        have_firstboot=yes
+fi
+ if test "$have_firstboot" = "yes"; then
+  ENABLE_FIRSTBOOT_TRUE=
+  ENABLE_FIRSTBOOT_FALSE='#'
+else
+  ENABLE_FIRSTBOOT_TRUE='#'
+  ENABLE_FIRSTBOOT_FALSE=
+fi
+
+
 # ------------------------------------------------------------------------------
 have_randomseed=no
 # Check whether --enable-randomseed was given.
@@ -18637,6 +19106,7 @@ fi
 
 if test "x$enable_resolved" != "xno"; then
         have_resolved=yes
+        M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
 fi
  if test "$have_resolved" = "yes"; then
   ENABLE_RESOLVED_TRUE=
 
 
 # ------------------------------------------------------------------------------
-have_multi_seat_x=no
-# Check whether --enable-multi_seat_x was given.
-if test "${enable_multi_seat_x+set}" = set; then :
-  enableval=$enable_multi_seat_x;
+have_terminal=no
+# Check whether --enable-terminal was given.
+if test "${enable_terminal+set}" = set; then :
+  enableval=$enable_terminal;
+fi
+
+if test "x$enable_terminal" = "xyes"; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TERMINAL" >&5
+$as_echo_n "checking for TERMINAL... " >&6; }
+
+if test -n "$TERMINAL_CFLAGS"; then
+    pkg_cv_TERMINAL_CFLAGS="$TERMINAL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_TERMINAL_CFLAGS=`$PKG_CONFIG --cflags " libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$TERMINAL_LIBS"; then
+    pkg_cv_TERMINAL_LIBS="$TERMINAL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4\""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_TERMINAL_LIBS=`$PKG_CONFIG --libs " libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               TERMINAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4" 2>&1`
+        else
+               TERMINAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$TERMINAL_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements ( libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4) were not met:
+
+$TERMINAL_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables TERMINAL_CFLAGS
+and TERMINAL_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables TERMINAL_CFLAGS
+and TERMINAL_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+       TERMINAL_CFLAGS=$pkg_cv_TERMINAL_CFLAGS
+       TERMINAL_LIBS=$pkg_cv_TERMINAL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_terminal=yes
 fi
+        if test "x$have_terminal" != xyes -a "x$enable_terminal" = xyes; then :
+  as_fn_error $? "*** terminal support requested but required dependencies not available" "$LINENO" 5
+elif test "x$have_terminal" = xyes; then :
+
+$as_echo "#define ENABLE_TERMINAL 1" >>confdefs.h
 
-if test "x$enable_multi_seat_x" != "xno"; then
-        have_multi_seat_x=yes
 fi
- if test "$have_multi_seat_x" = "yes"; then
-  ENABLE_MULTI_SEAT_X_TRUE=
-  ENABLE_MULTI_SEAT_X_FALSE='#'
+fi
+ if test "x$have_terminal" = "xyes"; then
+  ENABLE_TERMINAL_TRUE=
+  ENABLE_TERMINAL_FALSE='#'
 else
-  ENABLE_MULTI_SEAT_X_TRUE='#'
-  ENABLE_MULTI_SEAT_X_FALSE=
+  ENABLE_TERMINAL_TRUE='#'
+  ENABLE_TERMINAL_FALSE=
 fi
 
 
@@ -19285,40 +19852,6 @@ else
 fi
 
 
-# ------------------------------------------------------------------------------
-
-# Check whether --with-firmware-path was given.
-if test "${with_firmware_path+set}" = set; then :
-  withval=$with_firmware_path;
-else
-  with_firmware_path=""
-fi
-
-OLD_IFS=$IFS
-IFS=:
-for i in $with_firmware_path; do
-       if test "x${FIRMWARE_PATH}" = "x"; then
-              FIRMWARE_PATH="\\\"${i}/\\\""
-       else
-              FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
-       fi
-done
-IFS=$OLD_IFS
-
-if test "x${FIRMWARE_PATH}" != "x"; then :
-
-$as_echo "#define HAVE_FIRMWARE 1" >>confdefs.h
-
-fi
- if test "x${FIRMWARE_PATH}" != "x"; then
-  ENABLE_FIRMWARE_TRUE=
-  ENABLE_FIRMWARE_FALSE='#'
-else
-  ENABLE_FIRMWARE_TRUE='#'
-  ENABLE_FIRMWARE_FALSE=
-fi
-
-
 # ------------------------------------------------------------------------------
 # Check whether --enable-gudev was given.
 if test "${enable_gudev+set}" = set; then :
 
 
 # ------------------------------------------------------------------------------
+# Check whether --enable-hibernate was given.
+if test "${enable_hibernate+set}" = set; then :
+  enableval=$enable_hibernate; enable_hibernate=$enableval
+else
+  enable_hibernate=yes
+fi
 
+ if test x$enable_hibernate = xyes; then
+  ENABLE_HIBERNATE_TRUE=
+  ENABLE_HIBERNATE_FALSE='#'
+else
+  ENABLE_HIBERNATE_TRUE='#'
+  ENABLE_HIBERNATE_FALSE=
+fi
+
+
+# ------------------------------------------------------------------------------
+# Check whether --enable-ldconfig was given.
+if test "${enable_ldconfig+set}" = set; then :
+  enableval=$enable_ldconfig; enable_ldconfig=$enableval
+else
+  enable_ldconfig=yes
+fi
+
+ if test x$enable_ldconfig = xyes; then
+  ENABLE_LDCONFIG_TRUE=
+  ENABLE_LDCONFIG_FALSE='#'
+else
+  ENABLE_LDCONFIG_TRUE='#'
+  ENABLE_LDCONFIG_FALSE=
+fi
+
+
+# ------------------------------------------------------------------------------
 # Location of the init scripts as mandated by LSB
 SYSTEM_SYSVINIT_PATH=/etc/init.d
 SYSTEM_SYSVRCND_PATH=/etc/rc.d
@@ -19869,6 +20435,10 @@ if test -z "${HAVE_DBUS_TRUE}" && test -z "${HAVE_DBUS_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_DBUS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_UTMP_TRUE}" && test -z "${HAVE_UTMP_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_UTMP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_COMPAT_LIBS_TRUE}" && test -z "${ENABLE_COMPAT_LIBS_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_COMPAT_LIBS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -19901,6 +20471,14 @@ if test -z "${HAVE_XZ_TRUE}" && test -z "${HAVE_XZ_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_XZ\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_LZ4_TRUE}" && test -z "${HAVE_LZ4_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_LZ4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_COMPRESSION_TRUE}" && test -z "${HAVE_COMPRESSION_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_COMPRESSION\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_PAM_TRUE}" && test -z "${HAVE_PAM_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_PAM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -19933,6 +20511,14 @@ if test -z "${HAVE_GNUTLS_TRUE}" && test -z "${HAVE_GNUTLS_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_GNUTLS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_LIBCURL_TRUE}" && test -z "${HAVE_LIBCURL_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_LIBCURL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBIDN_TRUE}" && test -z "${HAVE_LIBIDN_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_LIBIDN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_BINFMT_TRUE}" && test -z "${ENABLE_BINFMT_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_BINFMT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -19941,10 +20527,6 @@ if test -z "${ENABLE_VCONSOLE_TRUE}" && test -z "${ENABLE_VCONSOLE_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_VCONSOLE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${ENABLE_READAHEAD_TRUE}" && test -z "${ENABLE_READAHEAD_FALSE}"; then
-  as_fn_error $? "conditional \"ENABLE_READAHEAD\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${ENABLE_BOOTCHART_TRUE}" && test -z "${ENABLE_BOOTCHART_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_BOOTCHART\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -19961,6 +20543,10 @@ if test -z "${ENABLE_SYSUSERS_TRUE}" && test -z "${ENABLE_SYSUSERS_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_SYSUSERS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_FIRSTBOOT_TRUE}" && test -z "${ENABLE_FIRSTBOOT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_FIRSTBOOT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_RANDOMSEED_TRUE}" && test -z "${ENABLE_RANDOMSEED_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_RANDOMSEED\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -20017,8 +20603,8 @@ if test -z "${ENABLE_EFI_TRUE}" && test -z "${ENABLE_EFI_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_EFI\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${ENABLE_MULTI_SEAT_X_TRUE}" && test -z "${ENABLE_MULTI_SEAT_X_FALSE}"; then
-  as_fn_error $? "conditional \"ENABLE_MULTI_SEAT_X\" was never defined.
+if test -z "${ENABLE_TERMINAL_TRUE}" && test -z "${ENABLE_TERMINAL_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_TERMINAL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${ENABLE_KDBUS_TRUE}" && test -z "${ENABLE_KDBUS_FALSE}"; then
@@ -20029,10 +20615,6 @@ if test -z "${HAVE_MYHOSTNAME_TRUE}" && test -z "${HAVE_MYHOSTNAME_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_MYHOSTNAME\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${ENABLE_FIRMWARE_TRUE}" && test -z "${ENABLE_FIRMWARE_FALSE}"; then
-  as_fn_error $? "conditional \"ENABLE_FIRMWARE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${ENABLE_GUDEV_TRUE}" && test -z "${ENABLE_GUDEV_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_GUDEV\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -20041,6 +20623,14 @@ if test -z "${ENABLE_MANPAGES_TRUE}" && test -z "${ENABLE_MANPAGES_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_MANPAGES\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_HIBERNATE_TRUE}" && test -z "${ENABLE_HIBERNATE_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_HIBERNATE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_LDCONFIG_TRUE}" && test -z "${ENABLE_LDCONFIG_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_LDCONFIG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_SYSV_COMPAT_TRUE}" && test -z "${HAVE_SYSV_COMPAT_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_SYSV_COMPAT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -20450,7 +21040,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by systemd $as_me 215, which was
+This file was extended by systemd $as_me 217, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20517,7 +21107,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-systemd config.status 215
+systemd config.status 217
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
         SECCOMP:                 ${have_seccomp}
         SMACK:                   ${have_smack}
         XZ:                      ${have_xz}
+        LZ4:                     ${have_lz4}
         ACL:                     ${have_acl}
         GCRYPT:                  ${have_gcrypt}
         QRENCODE:                ${have_qrencode}
         MICROHTTPD:              ${have_microhttpd}
         CHKCONFIG:               ${have_chkconfig}
         GNUTLS:                  ${have_gnutls}
+        libcurl:                 ${have_libcurl}
+        libidn:                  ${have_libidn}
         ELFUTILS:                ${have_elfutils}
         binfmt:                  ${have_binfmt}
         vconsole:                ${have_vconsole}
-        readahead:               ${have_readahead}
         bootchart:               ${have_bootchart}
         quotacheck:              ${have_quotacheck}
         tmpfiles:                ${have_tmpfiles}
         sysusers:                ${have_sysusers}
+        firstboot:               ${have_firstboot}
         randomseed:              ${have_randomseed}
         backlight:               ${have_backlight}
         rfkill:                  ${have_rfkill}
@@ -22358,7 +22951,7 @@ fi
         nss-myhostname:          ${have_myhostname}
         gudev:                   ${enable_gudev}
         gintrospection:          ${enable_introspection}
-        multi-seat-x:            ${have_multi_seat_x}
+        terminal:                ${have_terminal}
         kdbus:                   ${have_kdbus}
         Python:                  ${have_python}
         Python Headers:          ${have_python_devel}
@@ -22368,6 +22961,7 @@ fi
         Split /usr:              ${enable_split_usr}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
         compatibility libraries: ${have_compat_libs}
+        utmp/wtmp support:       ${have_utmp}
 
         prefix:                  ${prefix}
         rootprefix:              ${with_rootprefix}
@@ -22382,7 +22976,6 @@ fi
         Build Python:            ${PYTHON}
         Installation Python:     ${PYTHON_BINARY}
         sphinx binary:           ${SPHINX_BUILD}
-        firmware path:           ${FIRMWARE_PATH}
         PAM modules dir:         ${with_pamlibdir}
         PAM configuration dir:   ${with_pamconfdir}
         D-Bus policy dir:        ${with_dbuspolicydir}
@@ -22397,6 +22990,7 @@ fi
         TTY GID:                 ${TTY_GID}
         Maximum System UID:      ${SYSTEM_UID_MAX}
         Maximum System GID:      ${SYSTEM_GID_MAX}
+        Certificate root:        ${CERTIFICATEROOT}
 
         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
         CPPFLAGS:                ${OUR_CPPFLAGS} ${CPPFLAGS}
@@ -22416,20 +23010,23 @@ $as_echo "
         SECCOMP:                 ${have_seccomp}
         SMACK:                   ${have_smack}
         XZ:                      ${have_xz}
+        LZ4:                     ${have_lz4}
         ACL:                     ${have_acl}
         GCRYPT:                  ${have_gcrypt}
         QRENCODE:                ${have_qrencode}
         MICROHTTPD:              ${have_microhttpd}
         CHKCONFIG:               ${have_chkconfig}
         GNUTLS:                  ${have_gnutls}
+        libcurl:                 ${have_libcurl}
+        libidn:                  ${have_libidn}
         ELFUTILS:                ${have_elfutils}
         binfmt:                  ${have_binfmt}
         vconsole:                ${have_vconsole}
-        readahead:               ${have_readahead}
         bootchart:               ${have_bootchart}
         quotacheck:              ${have_quotacheck}
         tmpfiles:                ${have_tmpfiles}
         sysusers:                ${have_sysusers}
+        firstboot:               ${have_firstboot}
         randomseed:              ${have_randomseed}
         backlight:               ${have_backlight}
         rfkill:                  ${have_rfkill}
@@ -22453,7 +23050,7 @@ $as_echo "
         nss-myhostname:          ${have_myhostname}
         gudev:                   ${enable_gudev}
         gintrospection:          ${enable_introspection}
-        multi-seat-x:            ${have_multi_seat_x}
+        terminal:                ${have_terminal}
         kdbus:                   ${have_kdbus}
         Python:                  ${have_python}
         Python Headers:          ${have_python_devel}
@@ -22463,6 +23060,7 @@ $as_echo "
         Split /usr:              ${enable_split_usr}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
         compatibility libraries: ${have_compat_libs}
+        utmp/wtmp support:       ${have_utmp}
 
         prefix:                  ${prefix}
         rootprefix:              ${with_rootprefix}
@@ -22477,7 +23075,6 @@ $as_echo "
         Build Python:            ${PYTHON}
         Installation Python:     ${PYTHON_BINARY}
         sphinx binary:           ${SPHINX_BUILD}
-        firmware path:           ${FIRMWARE_PATH}
         PAM modules dir:         ${with_pamlibdir}
         PAM configuration dir:   ${with_pamconfdir}
         D-Bus policy dir:        ${with_dbuspolicydir}
@@ -22492,6 +23089,7 @@ $as_echo "
         TTY GID:                 ${TTY_GID}
         Maximum System UID:      ${SYSTEM_UID_MAX}
         Maximum System GID:      ${SYSTEM_GID_MAX}
+        Certificate root:        ${CERTIFICATEROOT}
 
         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
         CPPFLAGS:                ${OUR_CPPFLAGS} ${CPPFLAGS}
index ae88382e21c75f4ecb19ac85ebcaa38cbc1aebfe..f8a95cb9c812d4b0db7b55417b731ed31ee00cd0 100644 (file)
@@ -20,7 +20,7 @@
 AC_PREREQ([2.64])
 
 AC_INIT([systemd],
-        [215],
+        [217],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
         [systemd],
         [http://www.freedesktop.org/wiki/Software/systemd])
@@ -62,7 +62,7 @@ AS_IF([test x"$intltool_found" != xyes],
       ])
 
 AM_NLS
-AS_IF([test x"$enable_nls" != xno], [
+AS_IF([test x"$enable_nls" != xno -o "x$enable_polkit" != xno], [
     # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
 IT_PROG_INTLTOOL([0.40.0])
 ])
@@ -189,7 +189,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -ffast-math \
         -fno-common \
         -fdiagnostics-show-option \
-        -fdiagnostics-color \
         -fno-strict-aliasing \
         -fvisibility=hidden \
         -ffunction-sections \
@@ -198,6 +197,13 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -fstack-protector-strong \
         -fPIE \
         --param=ssp-buffer-size=4])
+
+AS_CASE([$CC], [*clang*],
+        [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
+               -Wno-typedef-redefinition \
+               -Wno-gnu-variable-sized-type-not-at-end \
+        ])])
+
 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
         [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
                -flto -ffat-lto-objects])],
@@ -224,6 +230,7 @@ AC_CHECK_SIZEOF(pid_t)
 AC_CHECK_SIZEOF(uid_t)
 AC_CHECK_SIZEOF(gid_t)
 AC_CHECK_SIZEOF(time_t)
+AC_CHECK_SIZEOF(dev_t)
 AC_CHECK_SIZEOF(rlim_t,,[
        #include <sys/time.h>
        #include <sys/resource.h>
@@ -282,6 +289,7 @@ AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
 AC_CHECK_HEADERS([linux/btrfs.h], [], [])
+AC_CHECK_HEADERS([linux/memfd.h], [], [])
 
 # unconditionally pull-in librt with old glibc versions
 AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
@@ -298,7 +306,7 @@ RT_LIBS="$LIBS"
 AC_SUBST(RT_LIBS)
 LIBS="$save_LIBS"
 
-AC_CHECK_FUNCS([fanotify_init fanotify_mark])
+AC_CHECK_FUNCS([memfd_create])
 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
 AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN],
                [], [], [[
@@ -310,7 +318,9 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN]
 #include <linux/loop.h>
 ]])
 
-AC_CHECK_DECLS([IFLA_PHYS_PORT_ID,
+AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS,
+                IFLA_VTI_REMOTE,
+                IFLA_PHYS_PORT_ID,
                 IFLA_BOND_AD_INFO,
                 IFLA_VLAN_PROTOCOL,
                 IFLA_VXLAN_LOCAL6,
@@ -342,6 +352,16 @@ AS_IF([test "x$enable_dbus" != "xno"], [
                 [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
 AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_utmp=yes
+AC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
+        AS_CASE("x${enableval}",
+                [xyes], [have_utmp=yes],
+                [xno],  [have_utmp=no],
+                AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
+AS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
+AM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
+
 # ------------------------------------------------------------------------------
 have_compat_libs=no
 AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
@@ -498,18 +518,38 @@ AC_ARG_WITH([debug-tty],
 
 AC_SUBST(DEBUGTTY)
 
+AC_ARG_WITH([certificate-root],
+        AS_HELP_STRING([--with-certificate-root=PATH],
+                [Specify the prefix for TLS certificates [/etc/ssl]]),
+        [CERTIFICATEROOT="$withval"],
+        [CERTIFICATEROOT="/etc/ssl"])
+
+AC_SUBST(CERTIFICATEROOT)
+
 # ------------------------------------------------------------------------------
 have_xz=no
 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
 if test "x$enable_xz" != "xno"; then
         PKG_CHECK_MODULES(XZ, [ liblzma ],
-                [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
+                [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes])
         if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
-                AC_MSG_ERROR([*** Xz support requested but libraries not found])
+                AC_MSG_ERROR([*** XZ support requested but libraries not found])
         fi
 fi
 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_lz4=no
+AC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
+AS_IF([test "x$enable_lz4" == "xyes"], [
+        AC_CHECK_HEADERS(lz4.h,
+               [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
+               [AC_MSG_ERROR([*** LZ4 support requested but headers not found])])
+])
+AM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
+
+AM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
+
 # ------------------------------------------------------------------------------
 AC_ARG_ENABLE([pam],
         AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
@@ -775,6 +815,33 @@ if test "x$enable_gnutls" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_libcurl=no
+AC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
+if test "x$enable_libcurl" != "xno"; then
+        PKG_CHECK_MODULES(LIBCURL, [libcurl],
+                [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
+        if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
+                AC_MSG_ERROR([*** libcurl support requested but libraries not found])
+        fi
+fi
+AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
+
+# ------------------------------------------------------------------------------
+have_libidn=no
+AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support]))
+if test "x$enable_libidn" != "xno"; then
+        PKG_CHECK_MODULES(LIBIDN, [libidn],
+               [AC_DEFINE(HAVE_LIBIDN, 1, [Define if libidn is available])
+                have_libidn=yes
+                M4_DEFINES="$M4_DEFINES -DHAVE_LIBIDN"],
+               [have_libidn=no])
+        if test "x$have_libidn" = "xno" -a "x$enable_libidn" = "xyes"; then
+                AC_MSG_ERROR([*** libidn support requested but libraries not found])
+        fi
+fi
+AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_binfmt=no
 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
@@ -791,14 +858,6 @@ if test "x$enable_vconsole" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
 
-# ------------------------------------------------------------------------------
-have_readahead=no
-AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
-if test "x$enable_readahead" != "xno"; then
-        have_readahead=yes
-fi
-AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
-
 # ------------------------------------------------------------------------------
 have_bootchart=no
 AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
@@ -831,6 +890,14 @@ if test "x$enable_sysusers" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
 
+# ------------------------------------------------------------------------------
+have_firstboot=no
+AC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
+if test "x$enable_firstboot" != "xno"; then
+        have_firstboot=yes
+fi
+AM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_randomseed=no
 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
@@ -964,6 +1031,7 @@ have_resolved=no
 AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
 if test "x$enable_resolved" != "xno"; then
         have_resolved=yes
+        M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
 fi
 AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
 
@@ -995,12 +1063,16 @@ fi
 AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
 
 # ------------------------------------------------------------------------------
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
-if test "x$enable_multi_seat_x" != "xno"; then
-        have_multi_seat_x=yes
+have_terminal=no
+AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
+if test "x$enable_terminal" = "xyes"; then
+        PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.4 libdrm >= 2.4], [have_terminal=yes])
+        AS_IF([test "x$have_terminal" != xyes -a "x$enable_terminal" = xyes],
+              [AC_MSG_ERROR([*** terminal support requested but required dependencies not available])],
+              [test "x$have_terminal" = xyes],
+              [AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])])
 fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
+AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes"])
 
 # ------------------------------------------------------------------------------
 have_kdbus=no
@@ -1081,25 +1153,6 @@ if test "x$enable_myhostname" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
 
-# ------------------------------------------------------------------------------
-AC_ARG_WITH(firmware-path,
-       AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
-          [Firmware search path (default="")]),
-       [], [with_firmware_path=""])
-OLD_IFS=$IFS
-IFS=:
-for i in $with_firmware_path; do
-       if test "x${FIRMWARE_PATH}" = "x"; then
-              FIRMWARE_PATH="\\\"${i}/\\\""
-       else
-              FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
-       fi
-done
-IFS=$OLD_IFS
-AC_SUBST(FIRMWARE_PATH)
-AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
-AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
-
 # ------------------------------------------------------------------------------
 AC_ARG_ENABLE([gudev],
        AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
@@ -1115,7 +1168,18 @@ AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
 
 # ------------------------------------------------------------------------------
+AC_ARG_ENABLE(hibernate,
+       [AC_HELP_STRING([--disable-hibernate], [disable hibernation support])],
+       enable_hibernate=$enableval, enable_hibernate=yes)
+AM_CONDITIONAL(ENABLE_HIBERNATE, [test x$enable_hibernate = xyes])
 
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE(ldconfig,
+       [AC_HELP_STRING([--disable-ldconfig], [disable ldconfig])],
+       enable_ldconfig=$enableval, enable_ldconfig=yes)
+AM_CONDITIONAL(ENABLE_LDCONFIG, [test x$enable_ldconfig = xyes])
+
+# ------------------------------------------------------------------------------
 # Location of the init scripts as mandated by LSB
 SYSTEM_SYSVINIT_PATH=/etc/init.d
 SYSTEM_SYSVRCND_PATH=/etc/rc.d
@@ -1266,20 +1330,23 @@ AC_MSG_RESULT([
         SECCOMP:                 ${have_seccomp}
         SMACK:                   ${have_smack}
         XZ:                      ${have_xz}
+        LZ4:                     ${have_lz4}
         ACL:                     ${have_acl}
         GCRYPT:                  ${have_gcrypt}
         QRENCODE:                ${have_qrencode}
         MICROHTTPD:              ${have_microhttpd}
         CHKCONFIG:               ${have_chkconfig}
         GNUTLS:                  ${have_gnutls}
+        libcurl:                 ${have_libcurl}
+        libidn:                  ${have_libidn}
         ELFUTILS:                ${have_elfutils}
         binfmt:                  ${have_binfmt}
         vconsole:                ${have_vconsole}
-        readahead:               ${have_readahead}
         bootchart:               ${have_bootchart}
         quotacheck:              ${have_quotacheck}
         tmpfiles:                ${have_tmpfiles}
         sysusers:                ${have_sysusers}
+        firstboot:               ${have_firstboot}
         randomseed:              ${have_randomseed}
         backlight:               ${have_backlight}
         rfkill:                  ${have_rfkill}
@@ -1303,7 +1370,7 @@ AC_MSG_RESULT([
         nss-myhostname:          ${have_myhostname}
         gudev:                   ${enable_gudev}
         gintrospection:          ${enable_introspection}
-        multi-seat-x:            ${have_multi_seat_x}
+        terminal:                ${have_terminal}
         kdbus:                   ${have_kdbus}
         Python:                  ${have_python}
         Python Headers:          ${have_python_devel}
@@ -1313,6 +1380,7 @@ AC_MSG_RESULT([
         Split /usr:              ${enable_split_usr}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
         compatibility libraries: ${have_compat_libs}
+        utmp/wtmp support:       ${have_utmp}
 
         prefix:                  ${prefix}
         rootprefix:              ${with_rootprefix}
@@ -1327,7 +1395,6 @@ AC_MSG_RESULT([
         Build Python:            ${PYTHON}
         Installation Python:     ${PYTHON_BINARY}
         sphinx binary:           ${SPHINX_BUILD}
-        firmware path:           ${FIRMWARE_PATH}
         PAM modules dir:         ${with_pamlibdir}
         PAM configuration dir:   ${with_pamconfdir}
         D-Bus policy dir:        ${with_dbuspolicydir}
@@ -1342,6 +1409,7 @@ AC_MSG_RESULT([
         TTY GID:                 ${TTY_GID}
         Maximum System UID:      ${SYSTEM_UID_MAX}
         Maximum System GID:      ${SYSTEM_GID_MAX}
+        Certificate root:        ${CERTIFICATEROOT}
 
         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
         CPPFLAGS:                ${OUR_CPPFLAGS} ${CPPFLAGS}
index 92fbf7c1cac9a70c0c05dc0019cbf0b2e9b8b0df..7e14a02d4217de1b1f235a742713194e1ceb4660 100644 (file)
@@ -137,6 +137,7 @@ BLKID_LIBS = @BLKID_LIBS@
 CAP_LIBS = @CAP_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
+CERTIFICATEROOT = @CERTIFICATEROOT@
 CFLAGS = @CFLAGS@
 CHKCONFIG = @CHKCONFIG@
 CPP = @CPP@
@@ -159,7 +160,6 @@ EGREP = @EGREP@
 ELFUTILS_LIBS = @ELFUTILS_LIBS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-FIRMWARE_PATH = @FIRMWARE_PATH@
 GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
 GCRYPT_LIBS = @GCRYPT_LIBS@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
@@ -208,9 +208,13 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCRYPTSETUP_CFLAGS = @LIBCRYPTSETUP_CFLAGS@
 LIBCRYPTSETUP_LIBS = @LIBCRYPTSETUP_LIBS@
+LIBCURL_CFLAGS = @LIBCURL_CFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
 LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBIDN_CFLAGS = @LIBIDN_CFLAGS@
+LIBIDN_LIBS = @LIBIDN_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -281,6 +285,8 @@ SYSTEM_SYSVINIT_PATH = @SYSTEM_SYSVINIT_PATH@
 SYSTEM_SYSVRCND_PATH = @SYSTEM_SYSVRCND_PATH@
 SYSTEM_UID_MAX = @SYSTEM_UID_MAX@
 TELINIT = @TELINIT@
+TERMINAL_CFLAGS = @TERMINAL_CFLAGS@
+TERMINAL_LIBS = @TERMINAL_LIBS@
 TTY_GID = @TTY_GID@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
index 31d5f43436c31dcdc475332533848f797a7af6ee..8fad69200995ee4e8d86228e45eea3d1608508c3 100644 (file)
@@ -15,7 +15,7 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GUdev Reference Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-       For version 215
+       For version 217
  — the latest version of this
        documentation can be found at
        <a class="ulink" href="http://www.freedesktop.org/software/systemd/gudev/" target="_top">
index c34a8046fa35e9cec76905037d0e5727b11386b6..0ddd619ce324e5504d2b8485e18bded06360cc35 100644 (file)
@@ -1 +1 @@
-215
+217
index c3b374fab7ec4c534eba45cf9665607857f9c191..468f846d062e1f912182ec6ea94ccbff4a5e51c6 100644 (file)
@@ -137,6 +137,7 @@ BLKID_LIBS = @BLKID_LIBS@
 CAP_LIBS = @CAP_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
+CERTIFICATEROOT = @CERTIFICATEROOT@
 CFLAGS = @CFLAGS@
 CHKCONFIG = @CHKCONFIG@
 CPP = @CPP@
@@ -159,7 +160,6 @@ EGREP = @EGREP@
 ELFUTILS_LIBS = @ELFUTILS_LIBS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-FIRMWARE_PATH = @FIRMWARE_PATH@
 GCRYPT_CFLAGS = @GCRYPT_CFLAGS@
 GCRYPT_LIBS = @GCRYPT_LIBS@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
@@ -208,9 +208,13 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCRYPTSETUP_CFLAGS = @LIBCRYPTSETUP_CFLAGS@
 LIBCRYPTSETUP_LIBS = @LIBCRYPTSETUP_LIBS@
+LIBCURL_CFLAGS = @LIBCURL_CFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
 LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
 LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
 LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBIDN_CFLAGS = @LIBIDN_CFLAGS@
+LIBIDN_LIBS = @LIBIDN_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -281,6 +285,8 @@ SYSTEM_SYSVINIT_PATH = @SYSTEM_SYSVINIT_PATH@
 SYSTEM_SYSVRCND_PATH = @SYSTEM_SYSVRCND_PATH@
 SYSTEM_UID_MAX = @SYSTEM_UID_MAX@
 TELINIT = @TELINIT@
+TERMINAL_CFLAGS = @TERMINAL_CFLAGS@
+TERMINAL_LIBS = @TERMINAL_LIBS@
 TTY_GID = @TTY_GID@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
index 0df8f88f3fc8488bd106c398a827eae8a3a2268a..1b5052ae80862a3206937311e41753c1e580603d 100644 (file)
@@ -15,7 +15,7 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libudev Reference Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-       For version 215
+       For version 217
  — the latest version of this
        documentation can be found at
        <a class="ulink" href="http://www.freedesktop.org/software/systemd/libudev/" target="_top">
index c34a8046fa35e9cec76905037d0e5727b11386b6..0ddd619ce324e5504d2b8485e18bded06360cc35 100644 (file)
@@ -1 +1 @@
-215
+217
diff --git a/factory/etc/nsswitch.conf b/factory/etc/nsswitch.conf
new file mode 100644 (file)
index 0000000..5f2984e
--- /dev/null
@@ -0,0 +1,6 @@
+# This file is part of systemd.
+
+passwd: files
+shadow: files
+group:  files
+hosts:  files mymachines resolve myhostname
diff --git a/factory/etc/pam.d/other b/factory/etc/pam.d/other
new file mode 100644 (file)
index 0000000..c1f7296
--- /dev/null
@@ -0,0 +1,6 @@
+# This file is part of systemd.
+
+auth     include system-auth
+account  include system-auth
+password include system-auth
+session  include system-auth
diff --git a/factory/etc/pam.d/system-auth b/factory/etc/pam.d/system-auth
new file mode 100644 (file)
index 0000000..dec7a8f
--- /dev/null
@@ -0,0 +1,12 @@
+# This file is part of systemd.
+
+auth     sufficient pam_unix.so nullok try_first_pass
+
+account  required   pam_nologin.so
+account  sufficient pam_unix.so
+
+password sufficient pam_unix.so nullok sha512 shadow try_first_pass try_authtok
+
+-session optional   pam_loginuid.so
+-session optional   pam_systemd.so
+session  sufficient pam_unix.so
index 97f1e6b2c0e02f39eac1d2b4ff4835758b412cdb..73df96cf6be62dee49ec5bd5ac74e54b0cb5d45e 100644 (file)
@@ -4103,7 +4103,7 @@ OUI:0050C2561*
  ID_OUI_FROM_DATABASE=Seitec Elektronik GmbH
 
 OUI:0050C2562*
- ID_OUI_FROM_DATABASE=C21 Technology Limited
+ ID_OUI_FROM_DATABASE=C21 Systems Limited
 
 OUI:0050C2563*
  ID_OUI_FROM_DATABASE=ORTRAT, S.L.
@@ -21371,7 +21371,7 @@ OUI:000A2F*
  ID_OUI_FROM_DATABASE=Artnix Inc.
 
 OUI:000A30*
- ID_OUI_FROM_DATABASE=Johnson Controls-ASG
+ ID_OUI_FROM_DATABASE=Visteon Corporation
 
 OUI:000A31*
  ID_OUI_FROM_DATABASE=HCV Consulting
@@ -23288,7 +23288,7 @@ OUI:000CB1*
  ID_OUI_FROM_DATABASE=Salland Engineering (Europe) BV
 
 OUI:000CB2*
- ID_OUI_FROM_DATABASE=Comstar Co., Ltd.
+ ID_OUI_FROM_DATABASE=UNION co., ltd.
 
 OUI:000CB3*
  ID_OUI_FROM_DATABASE=ROUND Co.,Ltd.
@@ -23528,7 +23528,7 @@ OUI:000D01*
  ID_OUI_FROM_DATABASE=P&E Microcomputer Systems, Inc.
 
 OUI:000D02*
- ID_OUI_FROM_DATABASE=NEC AccessTechnica, Ltd.
+ ID_OUI_FROM_DATABASE=NEC Platforms, Ltd.
 
 OUI:000D03*
  ID_OUI_FROM_DATABASE=Matrics, Inc.
@@ -26081,7 +26081,7 @@ OUI:00105D*
  ID_OUI_FROM_DATABASE=Draeger Medical
 
 OUI:00105E*
- ID_OUI_FROM_DATABASE=HEKIMIAN LABORATORIES, INC.
+ ID_OUI_FROM_DATABASE=Spirent plc, Service Assurance Broadband
 
 OUI:00105F*
  ID_OUI_FROM_DATABASE=ZODIAC DATA SYSTEMS
@@ -30311,7 +30311,7 @@ OUI:0015DF*
  ID_OUI_FROM_DATABASE=Clivet S.p.A.
 
 OUI:0015E0*
- ID_OUI_FROM_DATABASE=ST-Ericsson
+ ID_OUI_FROM_DATABASE=Ericsson
 
 OUI:0015E1*
  ID_OUI_FROM_DATABASE=Picochip Ltd
@@ -32375,7 +32375,7 @@ OUI:001893*
  ID_OUI_FROM_DATABASE=SHENZHEN PHOTON BROADBAND TECHNOLOGY CO.,LTD
 
 OUI:001894*
- ID_OUI_FROM_DATABASE=zimocom
+ ID_OUI_FROM_DATABASE=NPCore, Inc.
 
 OUI:001895*
  ID_OUI_FROM_DATABASE=Hansun Technologies Inc.
@@ -33887,7 +33887,7 @@ OUI:001A8B*
  ID_OUI_FROM_DATABASE=CHUNIL ELECTRIC IND., CO.
 
 OUI:001A8C*
- ID_OUI_FROM_DATABASE=Astaro AG
+ ID_OUI_FROM_DATABASE=Sophos Ltd
 
 OUI:001A8D*
  ID_OUI_FROM_DATABASE=AVECS Bergen GmbH
@@ -34652,7 +34652,7 @@ OUI:001B8A*
  ID_OUI_FROM_DATABASE=2M Electronic A/S
 
 OUI:001B8B*
- ID_OUI_FROM_DATABASE=NEC AccessTechnica, Ltd.
+ ID_OUI_FROM_DATABASE=NEC Platforms, Ltd.
 
 OUI:001B8C*
  ID_OUI_FROM_DATABASE=JMicron Technology Corp.
@@ -35066,7 +35066,7 @@ OUI:001C14*
  ID_OUI_FROM_DATABASE=VMware, Inc
 
 OUI:001C15*
- ID_OUI_FROM_DATABASE=TXP Corporation
+ ID_OUI_FROM_DATABASE=iPhotonix LLC
 
 OUI:001C16*
  ID_OUI_FROM_DATABASE=ThyssenKrupp Elevator
@@ -35786,7 +35786,7 @@ OUI:001D04*
  ID_OUI_FROM_DATABASE=Zipit Wireless, Inc.
 
 OUI:001D05*
- ID_OUI_FROM_DATABASE=iLight
+ ID_OUI_FROM_DATABASE=Eaton Corporation
 
 OUI:001D06*
  ID_OUI_FROM_DATABASE=HM Electronics, Inc.
@@ -35975,7 +35975,7 @@ OUI:001D43*
  ID_OUI_FROM_DATABASE=Shenzhen G-link Digital Technology Co., Ltd.
 
 OUI:001D44*
- ID_OUI_FROM_DATABASE=KROHNE
+ ID_OUI_FROM_DATABASE=KROHNE Messtechnik GmbH
 
 OUI:001D45*
  ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
@@ -36863,7 +36863,7 @@ OUI:001E6B*
  ID_OUI_FROM_DATABASE=Cisco SPVTG
 
 OUI:001E6C*
- ID_OUI_FROM_DATABASE=Carbon Mountain LLC
+ ID_OUI_FROM_DATABASE=Opaque Systems
 
 OUI:001E6D*
  ID_OUI_FROM_DATABASE=IT R&D Center
@@ -38471,7 +38471,7 @@ OUI:002084*
  ID_OUI_FROM_DATABASE=OCE PRINTING SYSTEMS, GMBH
 
 OUI:002085*
- ID_OUI_FROM_DATABASE=EXIDE ELECTRONICS
+ ID_OUI_FROM_DATABASE=Eaton Corporation
 
 OUI:002086*
  ID_OUI_FROM_DATABASE=MICROTECH ELECTRONICS LIMITED
@@ -44287,6 +44287,9 @@ OUI:0034F1*
 OUI:003532*
  ID_OUI_FROM_DATABASE=Electro-Metrics Corporation
 
+OUI:003560*
+ ID_OUI_FROM_DATABASE=Rosen Aviation
+
 OUI:0036F8*
  ID_OUI_FROM_DATABASE=Conti Temic microelectronic GmbH
 
@@ -44312,7 +44315,7 @@ OUI:003A9C*
  ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
 
 OUI:003A9D*
- ID_OUI_FROM_DATABASE=NEC AccessTechnica, Ltd.
+ ID_OUI_FROM_DATABASE=NEC Platforms, Ltd.
 
 OUI:003AAF*
  ID_OUI_FROM_DATABASE=BlueBit Ltd.
@@ -46394,7 +46397,7 @@ OUI:0060B8*
  ID_OUI_FROM_DATABASE=CORELIS Inc.
 
 OUI:0060B9*
- ID_OUI_FROM_DATABASE=NEC Infrontia Corporation
+ ID_OUI_FROM_DATABASE=NEC Platforms, Ltd
 
 OUI:0060BA*
  ID_OUI_FROM_DATABASE=SAHARA NETWORKS, INC.
@@ -49015,6 +49018,9 @@ OUI:00A1DE*
 OUI:00A2DA*
  ID_OUI_FROM_DATABASE=INAT GmbH
 
+OUI:00A2F5*
+ ID_OUI_FROM_DATABASE=Guangzhou Yuanyun Network Technology Co.,Ltd
+
 OUI:00A2FF*
  ID_OUI_FROM_DATABASE=abatec group AG
 
@@ -49036,6 +49042,9 @@ OUI:00AA70*
 OUI:00ACE0*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
+OUI:00AEFA*
+ ID_OUI_FROM_DATABASE=Murata Manufacturing Co., Ltd.
+
 OUI:00B009*
  ID_OUI_FROM_DATABASE=Grass Valley Group
 
@@ -50066,7 +50075,7 @@ OUI:00D01E*
  ID_OUI_FROM_DATABASE=PINGTEL CORP.
 
 OUI:00D01F*
- ID_OUI_FROM_DATABASE=CTAM PTY. LTD.
+ ID_OUI_FROM_DATABASE=Senetas Security
 
 OUI:00D020*
  ID_OUI_FROM_DATABASE=AIM SYSTEM, INC.
@@ -51595,6 +51604,9 @@ OUI:00E666*
 OUI:00E6D3*
  ID_OUI_FROM_DATABASE=NIXDORF COMPUTER CORP.
 
+OUI:00E6E8*
+ ID_OUI_FROM_DATABASE=Netzin Technology Corporation,.Ltd.
+
 OUI:00E8AB*
  ID_OUI_FROM_DATABASE=Meggitt Training Systems, Inc.
 
@@ -51607,12 +51619,21 @@ OUI:00EEBD*
 OUI:00F051*
  ID_OUI_FROM_DATABASE=KWB Gmbh
 
+OUI:00F3DB*
+ ID_OUI_FROM_DATABASE=WOO Sports
+
 OUI:00F403*
  ID_OUI_FROM_DATABASE=Orbis Systems Oy
 
+OUI:00F46F*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:00F4B9*
  ID_OUI_FROM_DATABASE=Apple
 
+OUI:00F76F*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:00F860*
  ID_OUI_FROM_DATABASE=PT. Panggung Electric Citrabuana
 
@@ -51844,6 +51865,12 @@ OUI:0494A1*
 OUI:0498F3*
  ID_OUI_FROM_DATABASE=ALPS Electric Co,. Ltd.
 
+OUI:0499E6*
+ ID_OUI_FROM_DATABASE=Shenzhen Yoostar Technology Co., Ltd
+
+OUI:049B9C*
+ ID_OUI_FROM_DATABASE=Eadingcore  Intelligent Technology Co., Ltd.
+
 OUI:049C62*
  ID_OUI_FROM_DATABASE=BMT Medical Technology s.r.o.
 
@@ -51868,6 +51895,9 @@ OUI:04B3B6*
 OUI:04B466*
  ID_OUI_FROM_DATABASE=BSP Co., Ltd.
 
+OUI:04BD70*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:04BFA8*
  ID_OUI_FROM_DATABASE=ISB Corporation
 
@@ -51877,6 +51907,9 @@ OUI:04C05B*
 OUI:04C06F*
  ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd
 
+OUI:04C09C*
+ ID_OUI_FROM_DATABASE=Tellabs Inc.
+
 OUI:04C1B9*
  ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Tech.Co.,Ltd.
 
@@ -52423,6 +52456,9 @@ OUI:0808C2*
 OUI:0808EA*
  ID_OUI_FROM_DATABASE=AMSC
 
+OUI:0809B6*
+ ID_OUI_FROM_DATABASE=Masimo Corp
+
 OUI:080C0B*
  ID_OUI_FROM_DATABASE=SysMik GmbH Dresden
 
@@ -52438,6 +52474,9 @@ OUI:080EA8*
 OUI:080FFA*
  ID_OUI_FROM_DATABASE=KSP INC.
 
+OUI:08115E*
+ ID_OUI_FROM_DATABASE=Bitel Co., Ltd.
+
 OUI:081196*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -52597,6 +52636,9 @@ OUI:087D21*
 OUI:088039*
  ID_OUI_FROM_DATABASE=Cisco SPVTG
 
+OUI:0881BC*
+ ID_OUI_FROM_DATABASE=HongKong Ipro Technology Co., Limited
+
 OUI:0881F4*
  ID_OUI_FROM_DATABASE=Juniper Networks
 
@@ -52627,6 +52669,9 @@ OUI:089F97*
 OUI:08A12B*
  ID_OUI_FROM_DATABASE=ShenZhen EZL Technology Co., Ltd
 
+OUI:08A5C8*
+ ID_OUI_FROM_DATABASE=Sunnovo International Limited
+
 OUI:08A95A*
  ID_OUI_FROM_DATABASE=Azurewave
 
@@ -52693,9 +52738,15 @@ OUI:08E5DA*
 OUI:08E672*
  ID_OUI_FROM_DATABASE=JEBSEE ELECTRONICS CO.,LTD.
 
+OUI:08E84F*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:08EA44*
  ID_OUI_FROM_DATABASE=Aerohive Networks, Inc.
 
+OUI:08EB29*
+ ID_OUI_FROM_DATABASE=Jiangsu Huitong Group Co.,Ltd.
+
 OUI:08EB74*
  ID_OUI_FROM_DATABASE=Humax
 
@@ -52705,9 +52756,15 @@ OUI:08EBED*
 OUI:08EDB9*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
 
+OUI:08EE8B*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:08EF3B*
  ID_OUI_FROM_DATABASE=MCS Logic Inc.
 
+OUI:08EFAB*
+ ID_OUI_FROM_DATABASE=SAYME WIRELESS SENSOR NETWORK
+
 OUI:08F1B7*
  ID_OUI_FROM_DATABASE=Towerstream Corpration
 
@@ -52759,6 +52816,9 @@ OUI:0C17F1*
 OUI:0C191F*
  ID_OUI_FROM_DATABASE=Inform Electronik
 
+OUI:0C1DAF*
+ ID_OUI_FROM_DATABASE=Beijing Xiaomi communications co.,ltd
+
 OUI:0C1DC2*
  ID_OUI_FROM_DATABASE=SeAH Networks
 
@@ -52942,6 +53002,9 @@ OUI:0CAC05*
 OUI:0CAF5A*
  ID_OUI_FROM_DATABASE=GENUS POWER INFRASTRUCTURES LIMITED
 
+OUI:0CB319*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:0CB4EF*
  ID_OUI_FROM_DATABASE=Digience Co.,Ltd.
 
@@ -53009,7 +53072,7 @@ OUI:0CD996*
  ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
 
 OUI:0CD9C1*
- ID_OUI_FROM_DATABASE=Johnson Controls-ASG
+ ID_OUI_FROM_DATABASE=Visteon Corporation
 
 OUI:0CDA41*
  ID_OUI_FROM_DATABASE=Hangzhou H3C Technologies Co., Limited
@@ -53080,6 +53143,12 @@ OUI:1001CA*
 OUI:1005CA*
  ID_OUI_FROM_DATABASE=Cisco
 
+OUI:100723*
+ ID_OUI_FROM_DATABASE=IEEE REGISTRATION AUTHORITY  - Please see MAM public listing for more information.
+
+OUI:1008B1*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
 OUI:10090C*
  ID_OUI_FROM_DATABASE=Janome Sewing Machine Co., Ltd.
 
@@ -53200,6 +53269,9 @@ OUI:104B46*
 OUI:104D77*
  ID_OUI_FROM_DATABASE=Innovative Computer Engineering
 
+OUI:104E07*
+ ID_OUI_FROM_DATABASE=Shanghai Genvision Industries Co.,Ltd
+
 OUI:105172*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -53234,7 +53306,7 @@ OUI:1065CF*
  ID_OUI_FROM_DATABASE=IQSIM
 
 OUI:106682*
- ID_OUI_FROM_DATABASE=NEC AccessTechnica, Ltd.
+ ID_OUI_FROM_DATABASE=NEC Platforms, Ltd.
 
 OUI:10683F*
  ID_OUI_FROM_DATABASE=LG Electronics
@@ -53338,6 +53410,9 @@ OUI:10C586*
 OUI:10C61F*
  ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
 
+OUI:10C67E*
+ ID_OUI_FROM_DATABASE=SHENZHEN JUCHIN TECHNOLOGY CO., LTD
+
 OUI:10C6FC*
  ID_OUI_FROM_DATABASE=Garmin International
 
@@ -53395,12 +53470,18 @@ OUI:10F3DB*
 OUI:10F49A*
  ID_OUI_FROM_DATABASE=T3 Innovation
 
+OUI:10F681*
+ ID_OUI_FROM_DATABASE=vivo Mobile Communication Co., Ltd.
+
 OUI:10F96F*
  ID_OUI_FROM_DATABASE=LG Electronics
 
 OUI:10F9EE*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:10FACE*
+ ID_OUI_FROM_DATABASE=Reacheng Communication Technology Co.,Ltd
+
 OUI:10FBF0*
  ID_OUI_FROM_DATABASE=KangSheng LTD.
 
@@ -53473,6 +53554,9 @@ OUI:1435B3*
 OUI:143605*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:1436C6*
+ ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd.
+
 OUI:14373B*
  ID_OUI_FROM_DATABASE=PROCOM Systems
 
@@ -53668,6 +53752,9 @@ OUI:14F42A*
 OUI:14F65A*
  ID_OUI_FROM_DATABASE=Xiaomi inc.
 
+OUI:14F893*
+ ID_OUI_FROM_DATABASE=Wuhan FiberHome Digital Technology Co.,Ltd.
+
 OUI:14FEAF*
  ID_OUI_FROM_DATABASE=SAGITTAR LIMITED
 
@@ -53725,6 +53812,9 @@ OUI:18193F*
 OUI:181BEB*
  ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc
 
+OUI:181E78*
+ ID_OUI_FROM_DATABASE=SAGEMCOM
+
 OUI:181EB0*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -53824,6 +53914,9 @@ OUI:18622C*
 OUI:186472*
  ID_OUI_FROM_DATABASE=Aruba Networks
 
+OUI:186571*
+ ID_OUI_FROM_DATABASE=Top Victory Electronics (Taiwan) Co., Ltd.
+
 OUI:1866E3*
  ID_OUI_FROM_DATABASE=Veros Systems, Inc.
 
@@ -53966,7 +54059,7 @@ OUI:18CF5E*
  ID_OUI_FROM_DATABASE=Liteon Technology Corporation
 
 OUI:18D071*
- ID_OUI_FROM_DATABASE=DASAN SMC, Inc.
+ ID_OUI_FROM_DATABASE=DASAN CO., LTD.
 
 OUI:18D5B6*
  ID_OUI_FROM_DATABASE=SMG Holdings LLC
@@ -54190,6 +54283,9 @@ OUI:1C7C45*
 OUI:1C7CC7*
  ID_OUI_FROM_DATABASE=Coriant GmbH
 
+OUI:1C7E51*
+ ID_OUI_FROM_DATABASE=3bumen.com
+
 OUI:1C7EE5*
  ID_OUI_FROM_DATABASE=D-Link International
 
@@ -54220,6 +54316,9 @@ OUI:1C955D*
 OUI:1C959F*
  ID_OUI_FROM_DATABASE=Veethree Electronics And Marine LLC
 
+OUI:1C965A*
+ ID_OUI_FROM_DATABASE=Weifang goertek Electronics CO.,LTD
+
 OUI:1C973D*
  ID_OUI_FROM_DATABASE=PRICOM Design
 
@@ -54229,6 +54328,9 @@ OUI:1C994C*
 OUI:1C9C26*
  ID_OUI_FROM_DATABASE=Zoovel Technologies
 
+OUI:1C9ECB*
+ ID_OUI_FROM_DATABASE=Beijing Nari Smartchip Microelectronics Company Limited
+
 OUI:1CA2B1*
  ID_OUI_FROM_DATABASE=ruwido austria gmbh
 
@@ -54254,7 +54356,7 @@ OUI:1CB094*
  ID_OUI_FROM_DATABASE=HTC Corporation
 
 OUI:1CB17F*
- ID_OUI_FROM_DATABASE=NEC AccessTechnica, Ltd.
+ ID_OUI_FROM_DATABASE=NEC Platforms, Ltd.
 
 OUI:1CB243*
  ID_OUI_FROM_DATABASE=TDC A/S
@@ -54478,6 +54580,9 @@ OUI:2074CF*
 OUI:207600*
  ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc
 
+OUI:207693*
+ ID_OUI_FROM_DATABASE=Lenovo (Beijing) Limited.
+
 OUI:207C8F*
  ID_OUI_FROM_DATABASE=Quanta Microsystems,Inc.
 
@@ -54766,6 +54871,9 @@ OUI:249442*
 OUI:249504*
  ID_OUI_FROM_DATABASE=SFR
 
+OUI:2497ED*
+ ID_OUI_FROM_DATABASE=Techvision Intelligent Technology Limited
+
 OUI:24A2E1*
  ID_OUI_FROM_DATABASE=Apple, Inc
 
@@ -55198,6 +55306,9 @@ OUI:28D576*
 OUI:28D93E*
  ID_OUI_FROM_DATABASE=Telecor Inc.
 
+OUI:28D98A*
+ ID_OUI_FROM_DATABASE=Hangzhou Konke Technology Co.,Ltd.
+
 OUI:28D997*
  ID_OUI_FROM_DATABASE=Yuduan Mobile Co., Ltd.
 
@@ -55306,12 +55417,18 @@ OUI:2C27D7*
 OUI:2C282D*
  ID_OUI_FROM_DATABASE=BBK COMMUNICATIAO TECHNOLOGY CO.,LTD.
 
+OUI:2C2997*
+ ID_OUI_FROM_DATABASE=Microsoft Corporation
+
 OUI:2C2D48*
  ID_OUI_FROM_DATABASE=bct electronic GesmbH
 
 OUI:2C3068*
  ID_OUI_FROM_DATABASE=Pantech Co.,Ltd
 
+OUI:2C337A*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
 OUI:2C3427*
  ID_OUI_FROM_DATABASE=ERCO & GENER
 
@@ -55327,6 +55444,9 @@ OUI:2C36F8*
 OUI:2C3731*
  ID_OUI_FROM_DATABASE=ShenZhen Yifang Digital Technology Co.,LTD
 
+OUI:2C3796*
+ ID_OUI_FROM_DATABASE=CYBO CO.,LTD.
+
 OUI:2C3996*
  ID_OUI_FROM_DATABASE=SAGEMCOM
 
@@ -55360,6 +55480,9 @@ OUI:2C441B*
 OUI:2C44FD*
  ID_OUI_FROM_DATABASE=Hewlett Packard
 
+OUI:2C5089*
+ ID_OUI_FROM_DATABASE=Shenzhen Kaixuan Visual Technology Co.,Limited
+
 OUI:2C534A*
  ID_OUI_FROM_DATABASE=Shenzhen Winyao Electronic Limited
 
@@ -55390,6 +55513,9 @@ OUI:2C5D93*
 OUI:2C5FF3*
  ID_OUI_FROM_DATABASE=Pertronic Industries
 
+OUI:2C600C*
+ ID_OUI_FROM_DATABASE=QUANTA COMPUTER INC.
+
 OUI:2C625A*
  ID_OUI_FROM_DATABASE=Finest Security Systems Co., Ltd
 
@@ -55549,12 +55675,18 @@ OUI:2CEDEB*
 OUI:2CEE26*
  ID_OUI_FROM_DATABASE=Petroleum Geo-Services
 
+OUI:2CF0EE*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:2CF203*
  ID_OUI_FROM_DATABASE=EMKO ELEKTRONIK SAN VE TIC AS
 
 OUI:2CF4C5*
  ID_OUI_FROM_DATABASE=Avaya, Inc
 
+OUI:2CF7F1*
+ ID_OUI_FROM_DATABASE=Seeed Technology Inc.
+
 OUI:2CFAA2*
  ID_OUI_FROM_DATABASE=Alcatel-Lucent
 
@@ -55570,6 +55702,9 @@ OUI:300D2A*
 OUI:300ED5*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind.Co.Ltd
 
+OUI:3010B3*
+ ID_OUI_FROM_DATABASE=Liteon Technology Corporation
+
 OUI:3010E4*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -55705,12 +55840,18 @@ OUI:306E5C*
 OUI:3071B2*
  ID_OUI_FROM_DATABASE=Hangzhou Prevail Optoelectronic Equipment Co.,LTD.
 
+OUI:307350*
+ ID_OUI_FROM_DATABASE=Inpeco SA
+
 OUI:307512*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications AB
 
 OUI:30766F*
  ID_OUI_FROM_DATABASE=LG Electronics
 
+OUI:3077CB*
+ ID_OUI_FROM_DATABASE=Maike Industry(Shenzhen)CO.,LTD
+
 OUI:30786B*
  ID_OUI_FROM_DATABASE=TIANJIN Golden Pentagon Electronics Co., Ltd.
 
@@ -55792,6 +55933,9 @@ OUI:30D357*
 OUI:30D46A*
  ID_OUI_FROM_DATABASE=Autosales Incorporated
 
+OUI:30D587*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:30D6C9*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -55831,6 +55975,9 @@ OUI:30F7D7*
 OUI:30F9ED*
  ID_OUI_FROM_DATABASE=Sony Corporation
 
+OUI:30FAB7*
+ ID_OUI_FROM_DATABASE=Tunai Creative
+
 OUI:30FD11*
  ID_OUI_FROM_DATABASE=MACROTECH (USA) INC.
 
@@ -55897,6 +56044,9 @@ OUI:343111*
 OUI:3431C4*
  ID_OUI_FROM_DATABASE=AVM GmbH
 
+OUI:3438AF*
+ ID_OUI_FROM_DATABASE=Inlab Software GmbH
+
 OUI:3440B5*
  ID_OUI_FROM_DATABASE=IBM
 
@@ -55909,6 +56059,9 @@ OUI:344B3D*
 OUI:344B50*
  ID_OUI_FROM_DATABASE=ZTE Corporation
 
+OUI:344DEA*
+ ID_OUI_FROM_DATABASE=zte corporation
+
 OUI:344DF7*
  ID_OUI_FROM_DATABASE=LG Electronics
 
@@ -55942,6 +56095,9 @@ OUI:346178*
 OUI:346288*
  ID_OUI_FROM_DATABASE=Cisco
 
+OUI:3464A9*
+ ID_OUI_FROM_DATABASE=Hewlett Packard
+
 OUI:34684A*
  ID_OUI_FROM_DATABASE=Teraworks Co., Ltd.
 
@@ -55951,6 +56107,9 @@ OUI:346BD3*
 OUI:346E8A*
  ID_OUI_FROM_DATABASE=Ecosense
 
+OUI:346F90*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:346F92*
  ID_OUI_FROM_DATABASE=White Rodgers Division
 
@@ -56152,6 +56311,12 @@ OUI:34E2FD*
 OUI:34E42A*
  ID_OUI_FROM_DATABASE=Automatic Bar Controls Inc.
 
+OUI:34E6AD*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
+OUI:34E6D7*
+ ID_OUI_FROM_DATABASE=Dell Inc.
+
 OUI:34EF44*
  ID_OUI_FROM_DATABASE=2Wire
 
@@ -56200,6 +56365,9 @@ OUI:380B40*
 OUI:380DD4*
  ID_OUI_FROM_DATABASE=Primax Electronics LTD.
 
+OUI:380E7B*
+ ID_OUI_FROM_DATABASE=V.P.S. Thai Co., Ltd
+
 OUI:380F4A*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -56236,12 +56404,18 @@ OUI:3826CD*
 OUI:3828EA*
  ID_OUI_FROM_DATABASE=Fujian Netcom Technology Co., LTD
 
+OUI:382C4A*
+ ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC.
+
 OUI:382DD1*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
 OUI:3831AC*
  ID_OUI_FROM_DATABASE=WEG
 
+OUI:383BC8*
+ ID_OUI_FROM_DATABASE=2wire
+
 OUI:383F10*
  ID_OUI_FROM_DATABASE=DBL Technology Ltd.
 
@@ -56290,6 +56464,9 @@ OUI:385FC3*
 OUI:386077*
  ID_OUI_FROM_DATABASE=PEGATRON CORPORATION
 
+OUI:3863BB*
+ ID_OUI_FROM_DATABASE=Hewlett Packard
+
 OUI:3863F6*
  ID_OUI_FROM_DATABASE=3NOD MULTIMEDIA(SHENZHEN)CO.,LTD
 
@@ -56329,6 +56506,9 @@ OUI:388EE7*
 OUI:3891FB*
  ID_OUI_FROM_DATABASE=Xenox Holding BV
 
+OUI:389496*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:389592*
  ID_OUI_FROM_DATABASE=Beijing Tendyron Corporation
 
@@ -56518,6 +56698,9 @@ OUI:3C1A79*
 OUI:3C1CBE*
  ID_OUI_FROM_DATABASE=JADAK LLC
 
+OUI:3C1E13*
+ ID_OUI_FROM_DATABASE=HANGZHOU SUNRISE TECHNOLOGY CO., LTD
+
 OUI:3C25D7*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
@@ -56548,6 +56731,9 @@ OUI:3C3888*
 OUI:3C39C3*
  ID_OUI_FROM_DATABASE=JW Electronics Co., Ltd.
 
+OUI:3C39E7*
+ ID_OUI_FROM_DATABASE=IEEE REGISTRATION AUTHORITY  - Please see MAM public listing for more information.
+
 OUI:3C3A73*
  ID_OUI_FROM_DATABASE=Avaya, Inc
 
@@ -56560,6 +56746,9 @@ OUI:3C438E*
 OUI:3C46D8*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
+OUI:3C4937*
+ ID_OUI_FROM_DATABASE=ASSMANN Electronic GmbH
+
 OUI:3C4A92*
  ID_OUI_FROM_DATABASE=Hewlett-Packard Company
 
@@ -56686,6 +56875,9 @@ OUI:3CAA3F*
 OUI:3CAB8E*
  ID_OUI_FROM_DATABASE=Apple
 
+OUI:3CAE69*
+ ID_OUI_FROM_DATABASE=ESA Elektroschaltanlagen Grimma GmbH
+
 OUI:3CB15B*
  ID_OUI_FROM_DATABASE=Avaya, Inc
 
@@ -56989,6 +57181,9 @@ OUI:40984E*
 OUI:40987B*
  ID_OUI_FROM_DATABASE=Aisino Corporation
 
+OUI:409B0D*
+ ID_OUI_FROM_DATABASE=Shenzhen Yourf Kwan Industrial Co., Ltd
+
 OUI:409FC7*
  ID_OUI_FROM_DATABASE=BAEKCHUN I&C Co., Ltd.
 
@@ -57079,6 +57274,9 @@ OUI:40E730*
 OUI:40E793*
  ID_OUI_FROM_DATABASE=Shenzhen Siviton Technology Co.,Ltd
 
+OUI:40EACE*
+ ID_OUI_FROM_DATABASE=FOUNDER BROADBAND NETWORK SERVICE CO.,LTD
+
 OUI:40ECF8*
  ID_OUI_FROM_DATABASE=Siemens AG
 
@@ -57253,6 +57451,9 @@ OUI:446C24*
 OUI:446D57*
  ID_OUI_FROM_DATABASE=Liteon Technology Corporation
 
+OUI:446D6C*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:44700B*
  ID_OUI_FROM_DATABASE=IFFU
 
@@ -57367,6 +57568,9 @@ OUI:44C56F*
 OUI:44C9A2*
  ID_OUI_FROM_DATABASE=Greenwald Industries
 
+OUI:44CE7D*
+ ID_OUI_FROM_DATABASE=SFR
+
 OUI:44D15E*
  ID_OUI_FROM_DATABASE=Shanghai Kingto Information Technology Ltd
 
@@ -57397,6 +57601,9 @@ OUI:44DCCB*
 OUI:44E08E*
  ID_OUI_FROM_DATABASE=Cisco SPVTG
 
+OUI:44E137*
+ ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
+
 OUI:44E49A*
  ID_OUI_FROM_DATABASE=OMNITRONICS PTY LTD
 
@@ -57685,6 +57892,9 @@ OUI:4C09B4*
 OUI:4C0B3A*
  ID_OUI_FROM_DATABASE=TCT Mobile Limited
 
+OUI:4C0BBE*
+ ID_OUI_FROM_DATABASE=Microsoft
+
 OUI:4C0DEE*
  ID_OUI_FROM_DATABASE=JABIL CIRCUIT (SHANGHAI) LTD.
 
@@ -57703,6 +57913,9 @@ OUI:4C1480*
 OUI:4C14A3*
  ID_OUI_FROM_DATABASE=TCL Technoly Electronics (Huizhou) Co., Ltd.
 
+OUI:4C16F1*
+ ID_OUI_FROM_DATABASE=zte corporation
+
 OUI:4C17EB*
  ID_OUI_FROM_DATABASE=SAGEMCOM
 
@@ -57730,6 +57943,9 @@ OUI:4C26E7*
 OUI:4C2C80*
  ID_OUI_FROM_DATABASE=Beijing Skyway Technologies Co.,Ltd
 
+OUI:4C2C83*
+ ID_OUI_FROM_DATABASE=Zhejiang KaNong Network Technology Co.,Ltd.
+
 OUI:4C2F9D*
  ID_OUI_FROM_DATABASE=ICM Controls
 
@@ -57754,6 +57970,9 @@ OUI:4C3B74*
 OUI:4C3C16*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:4C48DA*
+ ID_OUI_FROM_DATABASE=Beijing Autelan Technology Co.,Ltd
+
 OUI:4C4B68*
  ID_OUI_FROM_DATABASE=Mobile Device, Inc.
 
@@ -57943,6 +58162,9 @@ OUI:4CDF3D*
 OUI:4CE1BB*
  ID_OUI_FROM_DATABASE=Zhuhai HiFocus Technology Co., Ltd.
 
+OUI:4CE2F1*
+ ID_OUI_FROM_DATABASE=sclak srl
+
 OUI:4CE676*
  ID_OUI_FROM_DATABASE=Buffalo Inc.
 
@@ -58195,6 +58417,9 @@ OUI:50A733*
 OUI:50ABBF*
  ID_OUI_FROM_DATABASE=Hoseo Telecom
 
+OUI:50ADD5*
+ ID_OUI_FROM_DATABASE=Dynalec Corporation
+
 OUI:50AF73*
  ID_OUI_FROM_DATABASE=Shenzhen Bitland Information Technology Co., Ltd.
 
@@ -58267,6 +58492,9 @@ OUI:50ED94*
 OUI:50F003*
  ID_OUI_FROM_DATABASE=Open Stack, Inc.
 
+OUI:50F43C*
+ ID_OUI_FROM_DATABASE=Leeo Inc
+
 OUI:50F520*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -58300,6 +58528,9 @@ OUI:540536*
 OUI:54055F*
  ID_OUI_FROM_DATABASE=Alcatel Lucent
 
+OUI:54098D*
+ ID_OUI_FROM_DATABASE=deister electronic GmbH
+
 OUI:54112F*
  ID_OUI_FROM_DATABASE=Sulzer Pump Solutions Finland Oy
 
@@ -58378,6 +58609,9 @@ OUI:544A05*
 OUI:544A16*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:545146*
+ ID_OUI_FROM_DATABASE=AMG Systems Ltd.
+
 OUI:5453ED*
  ID_OUI_FROM_DATABASE=Sony Corporation
 
@@ -58459,6 +58693,9 @@ OUI:549F35*
 OUI:54A04F*
  ID_OUI_FROM_DATABASE=t-mac Technologies Ltd
 
+OUI:54A050*
+ ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC.
+
 OUI:54A31B*
  ID_OUI_FROM_DATABASE=Shenzhen Linkworld Technology Co,.LTD
 
@@ -58525,6 +58762,9 @@ OUI:54E3B0*
 OUI:54E43A*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:54E4BD*
+ ID_OUI_FROM_DATABASE=FN-LINK TECHNOLOGY LIMITED
+
 OUI:54E63F*
  ID_OUI_FROM_DATABASE=ShenZhen LingKeWeiEr Technology Co., Ltd.
 
@@ -58603,6 +58843,9 @@ OUI:581FAA*
 OUI:581FEF*
  ID_OUI_FROM_DATABASE=Tuttnaer LTD
 
+OUI:582136*
+ ID_OUI_FROM_DATABASE=KMB systems, s.r.o.
+
 OUI:58238C*
  ID_OUI_FROM_DATABASE=Technicolor CH USA
 
@@ -58684,6 +58927,9 @@ OUI:58696C*
 OUI:5869F9*
  ID_OUI_FROM_DATABASE=Fusion Transactive Ltd.
 
+OUI:586AB1*
+ ID_OUI_FROM_DATABASE=Hangzhou H3C Technologies Co., Limited
+
 OUI:586D8F*
  ID_OUI_FROM_DATABASE=Cisco-Linksys, LLC
 
@@ -58705,6 +58951,9 @@ OUI:587BE9*
 OUI:587E61*
  ID_OUI_FROM_DATABASE=Hisense Electric Co., Ltd
 
+OUI:587FB7*
+ ID_OUI_FROM_DATABASE=SONAR INDUSTRIAL CO., LTD.
+
 OUI:587FC8*
  ID_OUI_FROM_DATABASE=S2M
 
@@ -58903,9 +59152,15 @@ OUI:5C260A*
 OUI:5C2AEF*
  ID_OUI_FROM_DATABASE=Open Access Pty Ltd
 
+OUI:5C2BF5*
+ ID_OUI_FROM_DATABASE=Vivint
+
 OUI:5C2E59*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:5C2ED2*
+ ID_OUI_FROM_DATABASE=ABC(XiSheng) Electronics Co.,Ltd
+
 OUI:5C313E*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
@@ -59017,9 +59272,15 @@ OUI:5C93A2*
 OUI:5C95AE*
  ID_OUI_FROM_DATABASE=Apple
 
+OUI:5C966A*
+ ID_OUI_FROM_DATABASE=RTNET
+
 OUI:5C969D*
  ID_OUI_FROM_DATABASE=Apple
 
+OUI:5C97F3*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:5C9AD8*
  ID_OUI_FROM_DATABASE=Fujitsu Limited
 
@@ -59032,6 +59293,9 @@ OUI:5CA3EB*
 OUI:5CA48A*
  ID_OUI_FROM_DATABASE=Cisco
 
+OUI:5CAAFD*
+ ID_OUI_FROM_DATABASE=Sonos, Inc.
+
 OUI:5CAC4C*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
 
@@ -59089,6 +59353,9 @@ OUI:5CDAD4*
 OUI:5CDD70*
  ID_OUI_FROM_DATABASE=Hangzhou H3C Technologies Co., Limited
 
+OUI:5CE0C5*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:5CE0CA*
  ID_OUI_FROM_DATABASE=FeiTian United (Beijing) System Technology Co., Ltd.
 
@@ -59167,6 +59434,9 @@ OUI:600308*
 OUI:600347*
  ID_OUI_FROM_DATABASE=Billion Electric Co. Ltd.
 
+OUI:600417*
+ ID_OUI_FROM_DATABASE=POSBANK CO.,LTD
+
 OUI:600F77*
  ID_OUI_FROM_DATABASE=SilverPlus, Inc
 
@@ -59407,6 +59677,9 @@ OUI:60C547*
 OUI:60C5A8*
  ID_OUI_FROM_DATABASE=Beijing LT Honway Technology Co.,Ltd
 
+OUI:60C798*
+ ID_OUI_FROM_DATABASE=Verifone, Inc.
+
 OUI:60C980*
  ID_OUI_FROM_DATABASE=Trymus
 
@@ -59578,6 +59851,9 @@ OUI:64317E*
 OUI:643409*
  ID_OUI_FROM_DATABASE=BITwave Pte Ltd
 
+OUI:643E8C*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:643F5F*
  ID_OUI_FROM_DATABASE=Exablaze
 
@@ -59719,6 +59995,9 @@ OUI:6487D7*
 OUI:6488FF*
  ID_OUI_FROM_DATABASE=Sichuan Changhong Electric Ltd.
 
+OUI:64899A*
+ ID_OUI_FROM_DATABASE=LG Electronics
+
 OUI:648D9E*
  ID_OUI_FROM_DATABASE=IVT Electronic Co.,Ltd
 
@@ -59773,6 +60052,9 @@ OUI:64AE0C*
 OUI:64AE88*
  ID_OUI_FROM_DATABASE=Polytec GmbH
 
+OUI:64B21D*
+ ID_OUI_FROM_DATABASE=Chengdu Phycom Tech Co., Ltd.
+
 OUI:64B310*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -59785,6 +60067,9 @@ OUI:64B473*
 OUI:64B64A*
  ID_OUI_FROM_DATABASE=ViVOtech, Inc.
 
+OUI:64B853*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:64B9E8*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -59947,6 +60232,9 @@ OUI:6828BA*
 OUI:682DDC*
  ID_OUI_FROM_DATABASE=Wuhan Changjiang Electro-Communication Equipment CO.,LTD
 
+OUI:6836B5*
+ ID_OUI_FROM_DATABASE=DriveScale, Inc.
+
 OUI:683B1E*
  ID_OUI_FROM_DATABASE=Countwise LTD
 
@@ -60007,6 +60295,9 @@ OUI:686E48*
 OUI:687251*
  ID_OUI_FROM_DATABASE=Ubiquiti Networks
 
+OUI:6872DC*
+ ID_OUI_FROM_DATABASE=CETORY.TV Company Limited
+
 OUI:68764F*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications AB
 
@@ -60070,6 +60361,9 @@ OUI:68974B*
 OUI:6897E8*
  ID_OUI_FROM_DATABASE=Society of Motion Picture &amp; Television Engineers
 
+OUI:6899CD*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:689C5E*
  ID_OUI_FROM_DATABASE=AcSiP Technology Corp.
 
@@ -60097,6 +60391,9 @@ OUI:68AAD2*
 OUI:68AB8A*
  ID_OUI_FROM_DATABASE=RF IDeas
 
+OUI:68AE20*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:68AF13*
  ID_OUI_FROM_DATABASE=Futura Mobility
 
@@ -60121,6 +60418,9 @@ OUI:68BC0C*
 OUI:68BDAB*
  ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
 
+OUI:68C90B*
+ ID_OUI_FROM_DATABASE=Texas Instruments
+
 OUI:68CA00*
  ID_OUI_FROM_DATABASE=Octopus Systems Limited
 
@@ -60184,6 +60484,9 @@ OUI:68F06D*
 OUI:68F125*
  ID_OUI_FROM_DATABASE=Data Controls Inc.
 
+OUI:68F728*
+ ID_OUI_FROM_DATABASE=LCFC(HeFei) Electronics Technology co., ltd
+
 OUI:68F895*
  ID_OUI_FROM_DATABASE=Redflow Limited
 
@@ -60202,6 +60505,9 @@ OUI:6C0460*
 OUI:6C09D6*
  ID_OUI_FROM_DATABASE=Digiquest Electronics LTD
 
+OUI:6C0B84*
+ ID_OUI_FROM_DATABASE=Universal Global Scientific Industrial Co.,Ltd.
+
 OUI:6C0E0D*
  ID_OUI_FROM_DATABASE=Sony Ericsson Mobile Communications AB
 
@@ -60229,6 +60535,9 @@ OUI:6C22AB*
 OUI:6C23B9*
  ID_OUI_FROM_DATABASE=Sony Ericsson Mobile Communications AB
 
+OUI:6C25B9*
+ ID_OUI_FROM_DATABASE=BBK Electronics Corp., Ltd.,
+
 OUI:6C2995*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -60268,6 +60577,9 @@ OUI:6C3E6D*
 OUI:6C3E9C*
  ID_OUI_FROM_DATABASE=KE Knestel Elektronik GmbH
 
+OUI:6C4008*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:6C40C6*
  ID_OUI_FROM_DATABASE=Nimbus Data Systems, Inc.
 
@@ -60358,6 +60670,9 @@ OUI:6C90B1*
 OUI:6C92BF*
  ID_OUI_FROM_DATABASE=Inspur Electronic Information Industry Co.,Ltd.
 
+OUI:6C94F8*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:6C98EB*
  ID_OUI_FROM_DATABASE=Ocedo GmbH
 
@@ -60508,6 +60823,9 @@ OUI:700514*
 OUI:700BC0*
  ID_OUI_FROM_DATABASE=Dewav Technology Company
 
+OUI:700FC7*
+ ID_OUI_FROM_DATABASE=SHENZHEN IKINLOOP TECHNOLOGY CO.,LTD.
+
 OUI:700FEC*
  ID_OUI_FROM_DATABASE=Poindus Systems Corp.
 
@@ -60586,6 +60904,9 @@ OUI:703AD8*
 OUI:703C39*
  ID_OUI_FROM_DATABASE=SEAWING Kft
 
+OUI:703EAC*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:7041B7*
  ID_OUI_FROM_DATABASE=Edwards Lifesciences LLC
 
@@ -60685,6 +61006,9 @@ OUI:7076DD*
 OUI:7076F0*
  ID_OUI_FROM_DATABASE=LevelOne Communications (India) Private Limited
 
+OUI:7076FF*
+ ID_OUI_FROM_DATABASE=KERLINK
+
 OUI:707BE8*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -60850,6 +61174,12 @@ OUI:70F927*
 OUI:70F96D*
  ID_OUI_FROM_DATABASE=Hangzhou H3C Technologies Co., Limited
 
+OUI:70FC8C*
+ ID_OUI_FROM_DATABASE=OneAccess SA
+
+OUI:70FF5C*
+ ID_OUI_FROM_DATABASE=Cheerzing Communication(Xiamen)Technology Co.,Ltd
+
 OUI:70FF76*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
@@ -60883,6 +61213,9 @@ OUI:74273C*
 OUI:7427EA*
  ID_OUI_FROM_DATABASE=Elitegroup Computer Systems Co., Ltd.
 
+OUI:7429AF*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
 OUI:742B0F*
  ID_OUI_FROM_DATABASE=Infinidat Ltd.
 
@@ -60928,12 +61261,18 @@ OUI:744D79*
 OUI:745327*
  ID_OUI_FROM_DATABASE=COMMSEN CO., LIMITED
 
+OUI:74547D*
+ ID_OUI_FROM_DATABASE=Cisco SPVTG
+
 OUI:745612*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
 OUI:745798*
  ID_OUI_FROM_DATABASE=TRUMPF Laser GmbH + Co. KG
 
+OUI:745C9F*
+ ID_OUI_FROM_DATABASE=TCT mobile ltd.
+
 OUI:745E1C*
  ID_OUI_FROM_DATABASE=PIONEER CORPORATION
 
@@ -60967,6 +61306,9 @@ OUI:746F3D*
 OUI:7472F2*
  ID_OUI_FROM_DATABASE=Chipsip Technology Co., Ltd.
 
+OUI:747548*
+ ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
+
 OUI:747818*
  ID_OUI_FROM_DATABASE=ServiceAssure
 
@@ -61117,6 +61459,9 @@ OUI:74E537*
 OUI:74E543*
  ID_OUI_FROM_DATABASE=Liteon Technology Corporation
 
+OUI:74E6E2*
+ ID_OUI_FROM_DATABASE=Dell Inc.
+
 OUI:74E7C6*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
@@ -61213,6 +61558,9 @@ OUI:78303B*
 OUI:7830E1*
  ID_OUI_FROM_DATABASE=UltraClenz, LLC
 
+OUI:78312B*
+ ID_OUI_FROM_DATABASE=zte corporation
+
 OUI:7831C1*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -61405,6 +61753,9 @@ OUI:78ACC0*
 OUI:78AE0C*
  ID_OUI_FROM_DATABASE=Far South Networks
 
+OUI:78B3B9*
+ ID_OUI_FROM_DATABASE=ShangHai sunup lighting CO.,LTD
+
 OUI:78B3CE*
  ID_OUI_FROM_DATABASE=Elo touch solutions
 
@@ -61507,6 +61858,9 @@ OUI:78E7D1*
 OUI:78E8B6*
  ID_OUI_FROM_DATABASE=zte corporation
 
+OUI:78EB14*
+ ID_OUI_FROM_DATABASE=SHENZHEN FAST TECHNOLOGIES CO.,LTD
+
 OUI:78EC22*
  ID_OUI_FROM_DATABASE=Shanghai Qihui Telecom Technology Co., LTD
 
@@ -61921,6 +62275,9 @@ OUI:8005DF*
 OUI:8007A2*
  ID_OUI_FROM_DATABASE=Esson Technology Inc.
 
+OUI:800902*
+ ID_OUI_FROM_DATABASE=Keysight Technologies, Inc.
+
 OUI:800A06*
  ID_OUI_FROM_DATABASE=COMTEC co.,ltd
 
@@ -61945,6 +62302,9 @@ OUI:8018A7*
 OUI:801934*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
+OUI:801967*
+ ID_OUI_FROM_DATABASE=Shanghai Reallytek Information Technology  Co.,Ltd
+
 OUI:801DAA*
  ID_OUI_FROM_DATABASE=Avaya Inc
 
@@ -61972,6 +62332,9 @@ OUI:802FDE*
 OUI:803457*
  ID_OUI_FROM_DATABASE=OT Systems Limited
 
+OUI:803773*
+ ID_OUI_FROM_DATABASE=Netgear Inc
+
 OUI:8038FD*
  ID_OUI_FROM_DATABASE=LeapFrog Enterprises, Inc.
 
@@ -62146,6 +62509,9 @@ OUI:80BAE6*
 OUI:80BBEB*
  ID_OUI_FROM_DATABASE=Satmap Systems Ltd
 
+OUI:80BE05*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:80C16E*
  ID_OUI_FROM_DATABASE=Hewlett Packard
 
@@ -62236,6 +62602,9 @@ OUI:841715*
 OUI:841766*
  ID_OUI_FROM_DATABASE=Weifang GoerTek Electronics Co., Ltd
 
+OUI:841826*
+ ID_OUI_FROM_DATABASE=Osram GmbH
+
 OUI:84183A*
  ID_OUI_FROM_DATABASE=Ruckus Wireless
 
@@ -62272,6 +62641,9 @@ OUI:842615*
 OUI:84262B*
  ID_OUI_FROM_DATABASE=Alcatel-Lucent
 
+OUI:842690*
+ ID_OUI_FROM_DATABASE=BEIJING THOUGHT SCIENCE CO.,LTD.
+
 OUI:8427CE*
  ID_OUI_FROM_DATABASE=Corporation of the Presiding Bishop of The Church of Jesus Christ of Latter-day Saints
 
@@ -62317,6 +62689,9 @@ OUI:843A4B*
 OUI:843F4E*
  ID_OUI_FROM_DATABASE=Tri-Tech Manufacturing, Inc.
 
+OUI:844464*
+ ID_OUI_FROM_DATABASE=ServerU Inc
+
 OUI:844823*
  ID_OUI_FROM_DATABASE=WOXTER TECHNOLOGY Co. Ltd
 
@@ -62332,6 +62707,9 @@ OUI:844F03*
 OUI:845181*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:8455A5*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:84569C*
  ID_OUI_FROM_DATABASE=Coho Data, Inc.,
 
@@ -62350,6 +62728,9 @@ OUI:846223*
 OUI:8462A6*
  ID_OUI_FROM_DATABASE=EuroCB (Phils), Inc.
 
+OUI:8463D6*
+ ID_OUI_FROM_DATABASE=Microsoft Corporation
+
 OUI:846AED*
  ID_OUI_FROM_DATABASE=Wireless Tsukamoto.,co.LTD
 
@@ -62365,6 +62746,9 @@ OUI:84742A*
 OUI:847616*
  ID_OUI_FROM_DATABASE=Addat S.r.o.
 
+OUI:84788B*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:8478AC*
  ID_OUI_FROM_DATABASE=Cisco
 
@@ -62407,6 +62791,9 @@ OUI:848E0C*
 OUI:848E96*
  ID_OUI_FROM_DATABASE=Embertec Pty Ltd
 
+OUI:848EDF*
+ ID_OUI_FROM_DATABASE=Sony Mobile Communications AB
+
 OUI:848F69*
  ID_OUI_FROM_DATABASE=Dell Inc.
 
@@ -62434,6 +62821,9 @@ OUI:849CA6*
 OUI:849DC5*
  ID_OUI_FROM_DATABASE=Centera Photonics Inc.
 
+OUI:84A466*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:84A6C8*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -62485,6 +62875,9 @@ OUI:84DB2F*
 OUI:84DD20*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:84DDB7*
+ ID_OUI_FROM_DATABASE=Cilag GmbH International
+
 OUI:84DE3D*
  ID_OUI_FROM_DATABASE=Crystal Vision Ltd
 
@@ -62506,6 +62899,9 @@ OUI:84E714*
 OUI:84EA99*
  ID_OUI_FROM_DATABASE=Vieworks
 
+OUI:84EB18*
+ ID_OUI_FROM_DATABASE=Texas Instruments
+
 OUI:84ED33*
  ID_OUI_FROM_DATABASE=BBMC Co.,Ltd
 
@@ -62548,6 +62944,9 @@ OUI:881544*
 OUI:8818AE*
  ID_OUI_FROM_DATABASE=Tamron Co., Ltd
 
+OUI:881DFC*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:881FA1*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -62641,6 +63040,12 @@ OUI:88685C*
 OUI:886B76*
  ID_OUI_FROM_DATABASE=CHINA HOPEFUL GROUP HOPEFUL ELECTRIC CO.,LTD
 
+OUI:88708C*
+ ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd.
+
+OUI:8870EF*
+ ID_OUI_FROM_DATABASE=SC Professional Trading Co., Ltd.
+
 OUI:887398*
  ID_OUI_FROM_DATABASE=K2E Tekpoint
 
@@ -62746,6 +63151,9 @@ OUI:88C626*
 OUI:88C663*
  ID_OUI_FROM_DATABASE=Apple
 
+OUI:88C9D0*
+ ID_OUI_FROM_DATABASE=LG Electronics
+
 OUI:88CB87*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -62812,6 +63220,9 @@ OUI:8C006D*
 OUI:8C04FF*
  ID_OUI_FROM_DATABASE=Technicolor USA Inc.
 
+OUI:8C0551*
+ ID_OUI_FROM_DATABASE=Koubachi AG
+
 OUI:8C078C*
  ID_OUI_FROM_DATABASE=FLOW DATA INC
 
@@ -62995,6 +63406,9 @@ OUI:8C8E76*
 OUI:8C90D3*
  ID_OUI_FROM_DATABASE=Alcatel Lucent
 
+OUI:8C9109*
+ ID_OUI_FROM_DATABASE=Toyoshima Electric Technoeogy(Suzhou) Co.,Ltd.
+
 OUI:8C9236*
  ID_OUI_FROM_DATABASE=Aus.Linx Technology Co., Ltd.
 
@@ -63082,9 +63496,15 @@ OUI:8CDE52*
 OUI:8CDE99*
  ID_OUI_FROM_DATABASE=Comlab Inc.
 
+OUI:8CDF9D*
+ ID_OUI_FROM_DATABASE=NEC Corporation
+
 OUI:8CE081*
  ID_OUI_FROM_DATABASE=zte corporation
 
+OUI:8CE78C*
+ ID_OUI_FROM_DATABASE=DK Networks
+
 OUI:8CE7B3*
  ID_OUI_FROM_DATABASE=Sonardyne International Ltd
 
@@ -63127,12 +63547,21 @@ OUI:900917*
 OUI:900A3A*
  ID_OUI_FROM_DATABASE=PSG Plastic Service GmbH
 
+OUI:900CB4*
+ ID_OUI_FROM_DATABASE=Alinket Electronic Technology Co., Ltd
+
 OUI:900D66*
  ID_OUI_FROM_DATABASE=Digimore Electronics Co., Ltd
 
 OUI:900DCB*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
+OUI:90179B*
+ ID_OUI_FROM_DATABASE=Nanomegas
+
+OUI:9017AC*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:90185E*
  ID_OUI_FROM_DATABASE=Apex Tool Group GmbH & Co OHG
 
@@ -63166,12 +63595,18 @@ OUI:902083*
 OUI:902155*
  ID_OUI_FROM_DATABASE=HTC Corporation
 
+OUI:902181*
+ ID_OUI_FROM_DATABASE=Shanghai Huaqin Telecom Technology Co.,Ltd
+
 OUI:9027E4*
  ID_OUI_FROM_DATABASE=Apple
 
 OUI:902B34*
  ID_OUI_FROM_DATABASE=GIGA-BYTE TECHNOLOGY CO.,LTD.
 
+OUI:902CC7*
+ ID_OUI_FROM_DATABASE=C-MAX Asia Limited
+
 OUI:902E87*
  ID_OUI_FROM_DATABASE=LabJack
 
@@ -63262,6 +63697,9 @@ OUI:9067B5*
 OUI:9067F3*
  ID_OUI_FROM_DATABASE=Alcatel Lucent
 
+OUI:9068C3*
+ ID_OUI_FROM_DATABASE=Motorola Mobility LLC
+
 OUI:906DC8*
  ID_OUI_FROM_DATABASE=DLG Automação Industrial Ltda
 
@@ -63304,6 +63742,9 @@ OUI:90840D*
 OUI:9088A2*
  ID_OUI_FROM_DATABASE=IONICS TECHNOLOGY ME LTDA
 
+OUI:908C09*
+ ID_OUI_FROM_DATABASE=Total Phase
+
 OUI:908C44*
  ID_OUI_FROM_DATABASE=H.K ZONGMU TECHNOLOGY CO., LTD.
 
@@ -63337,6 +63778,9 @@ OUI:909916*
 OUI:909DE0*
  ID_OUI_FROM_DATABASE=Newland Design + Assoc. Inc.
 
+OUI:909F33*
+ ID_OUI_FROM_DATABASE=EFM Networks
+
 OUI:909F43*
  ID_OUI_FROM_DATABASE=Accutron Instruments Inc.
 
@@ -63416,7 +63860,7 @@ OUI:90DA4E*
  ID_OUI_FROM_DATABASE=AVANU
 
 OUI:90DA6A*
- ID_OUI_FROM_DATABASE=MCC System Co., Ltd.
+ ID_OUI_FROM_DATABASE=FOCUS H&S Co., Ltd.
 
 OUI:90DB46*
  ID_OUI_FROM_DATABASE=E-LEAD ELECTRONIC CO., LTD
@@ -63481,6 +63925,9 @@ OUI:940149*
 OUI:9401C2*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:9405B6*
+ ID_OUI_FROM_DATABASE=Liling FullRiver Electronics & Technology Ltd
+
 OUI:940B2D*
  ID_OUI_FROM_DATABASE=NetView Technologies(Shenzhen) Co., Ltd
 
@@ -63580,6 +64027,9 @@ OUI:946269*
 OUI:9463D1*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:9470D2*
+ ID_OUI_FROM_DATABASE=WINFIRM TECHNOLOGY
+
 OUI:9471AC*
  ID_OUI_FROM_DATABASE=TCT Mobile Limited
 
@@ -63610,6 +64060,9 @@ OUI:948B03*
 OUI:948D50*
  ID_OUI_FROM_DATABASE=Beamex Oy Ab
 
+OUI:948E89*
+ ID_OUI_FROM_DATABASE=INDUSTRIAS UNIDAS SA DE CV
+
 OUI:948FEE*
  ID_OUI_FROM_DATABASE=Hughes Telematics, Inc.
 
@@ -63646,6 +64099,9 @@ OUI:94AE61*
 OUI:94AEE3*
  ID_OUI_FROM_DATABASE=Belden Hirschmann Industries (Suzhou) Ltd.
 
+OUI:94B40F*
+ ID_OUI_FROM_DATABASE=Aruba Networks
+
 OUI:94B8C5*
  ID_OUI_FROM_DATABASE=RuggedCom Inc.
 
@@ -63661,9 +64117,15 @@ OUI:94BA56*
 OUI:94BF1E*
  ID_OUI_FROM_DATABASE=eflow Inc. / Smart Device Planning and Development Division
 
+OUI:94BF95*
+ ID_OUI_FROM_DATABASE=Shenzhen Coship Electronics Co., Ltd
+
 OUI:94C014*
  ID_OUI_FROM_DATABASE=Sorter Sp. j. Konrad Grzeszczyk MichaA, Ziomek
 
+OUI:94C038*
+ ID_OUI_FROM_DATABASE=Tallac Networks
+
 OUI:94C150*
  ID_OUI_FROM_DATABASE=2Wire Inc
 
@@ -63793,6 +64255,9 @@ OUI:980D2E*
 OUI:981094*
  ID_OUI_FROM_DATABASE=Shenzhen Vsun communication technology Co.,ltd
 
+OUI:9816EC*
+ ID_OUI_FROM_DATABASE=IC Intracom
+
 OUI:98208E*
  ID_OUI_FROM_DATABASE=Definium Technologies
 
@@ -64027,6 +64492,9 @@ OUI:98F8C1*
 OUI:98F8DB*
  ID_OUI_FROM_DATABASE=Marini Impianti Industriali s.r.l.
 
+OUI:98FAE3*
+ ID_OUI_FROM_DATABASE=Xiaomi inc.
+
 OUI:98FB12*
  ID_OUI_FROM_DATABASE=Grand Electronics (HK) Ltd
 
@@ -64321,6 +64789,9 @@ OUI:9CD36D*
 OUI:9CD643*
  ID_OUI_FROM_DATABASE=D-Link International
 
+OUI:9CD917*
+ ID_OUI_FROM_DATABASE=Motorola Mobility LLC
+
 OUI:9CDF03*
  ID_OUI_FROM_DATABASE=Harman/Becker Automotive Systems GmbH
 
@@ -64582,6 +65053,9 @@ OUI:A0A130*
 OUI:A0A23C*
  ID_OUI_FROM_DATABASE=GPMS
 
+OUI:A0A3E2*
+ ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc
+
 OUI:A0A763*
  ID_OUI_FROM_DATABASE=Polytron Vertrieb GmbH
 
@@ -64597,6 +65071,9 @@ OUI:A0B100*
 OUI:A0B3CC*
  ID_OUI_FROM_DATABASE=Hewlett Packard
 
+OUI:A0B4A5*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:A0B5DA*
  ID_OUI_FROM_DATABASE=HongKong THTF Co., Ltd
 
@@ -64724,7 +65201,7 @@ OUI:A40CC3*
  ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
 
 OUI:A41242*
- ID_OUI_FROM_DATABASE=NEC AccessTechnica, Ltd.
+ ID_OUI_FROM_DATABASE=NEC Platforms, Ltd.
 
 OUI:A4134E*
  ID_OUI_FROM_DATABASE=Luxul
@@ -64753,6 +65230,9 @@ OUI:A42305*
 OUI:A424B3*
  ID_OUI_FROM_DATABASE=FlatFrog Laboratories AB
 
+OUI:A4251B*
+ ID_OUI_FROM_DATABASE=Avaya, Inc
+
 OUI:A42940*
  ID_OUI_FROM_DATABASE=Shenzhen YOUHUA Technology Co., Ltd
 
@@ -64783,6 +65263,9 @@ OUI:A4466B*
 OUI:A446FA*
  ID_OUI_FROM_DATABASE=AmTRAN Video Corporation
 
+OUI:A44AD3*
+ ID_OUI_FROM_DATABASE=ST Electronics(Shanghai) Co.,Ltd
+
 OUI:A44B15*
  ID_OUI_FROM_DATABASE=Sun Cupid Technology (HK) LTD
 
@@ -64888,6 +65371,9 @@ OUI:A49A58*
 OUI:A49B13*
  ID_OUI_FROM_DATABASE=Burroughs Payment Systems, Inc.
 
+OUI:A49D49*
+ ID_OUI_FROM_DATABASE=Ketra, Inc.
+
 OUI:A49EDB*
  ID_OUI_FROM_DATABASE=AutoCrib, Inc.
 
@@ -64897,6 +65383,9 @@ OUI:A49F85*
 OUI:A49F89*
  ID_OUI_FROM_DATABASE=Shanghai Rui Rui Communication Technology Co.Ltd.
 
+OUI:A4A1C2*
+ ID_OUI_FROM_DATABASE=Ericsson AB (EAB)
+
 OUI:A4A24A*
  ID_OUI_FROM_DATABASE=Cisco SPVTG
 
@@ -65071,6 +65560,9 @@ OUI:A81B18*
 OUI:A81B5D*
  ID_OUI_FROM_DATABASE=Foxtel Management Pty Ltd
 
+OUI:A81D16*
+ ID_OUI_FROM_DATABASE=AzureWave Technologies, Inc
+
 OUI:A81FAF*
  ID_OUI_FROM_DATABASE=KRYPTON POLSKA
 
@@ -65137,6 +65629,9 @@ OUI:A863DF*
 OUI:A863F2*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:A86405*
+ ID_OUI_FROM_DATABASE=nimbus 9, Inc
+
 OUI:A865B2*
  ID_OUI_FROM_DATABASE=DONGGUAN YISHANG ELECTRONIC TECHNOLOGY CO., LIMITED
 
@@ -65158,6 +65653,9 @@ OUI:A8776F*
 OUI:A87B39*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:A87C01*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:A87E33*
  ID_OUI_FROM_DATABASE=Nokia Danmark A/S
 
@@ -65209,6 +65707,9 @@ OUI:A8995C*
 OUI:A89B10*
  ID_OUI_FROM_DATABASE=inMotion Ltd.
 
+OUI:A89DD2*
+ ID_OUI_FROM_DATABASE=Shanghai DareGlobal Technologies Co., Ltd
+
 OUI:A8A668*
  ID_OUI_FROM_DATABASE=zte corporation
 
@@ -65245,6 +65746,9 @@ OUI:A8CCC5*
 OUI:A8CE90*
  ID_OUI_FROM_DATABASE=CVC
 
+OUI:A8D0E3*
+ ID_OUI_FROM_DATABASE=Systech Electronics Ltd.
+
 OUI:A8D0E5*
  ID_OUI_FROM_DATABASE=Juniper Networks
 
@@ -65254,6 +65758,9 @@ OUI:A8D236*
 OUI:A8D3C8*
  ID_OUI_FROM_DATABASE=Wachendorff Elektronik  GmbH & Co. KG
 
+OUI:A8D88A*
+ ID_OUI_FROM_DATABASE=Wyconn
+
 OUI:A8E018*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
@@ -65368,6 +65875,9 @@ OUI:AC3613*
 OUI:AC3870*
  ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd.
 
+OUI:AC3A7A*
+ ID_OUI_FROM_DATABASE=Roku
+
 OUI:AC3C0B*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -65488,6 +65998,9 @@ OUI:AC8674*
 OUI:AC867E*
  ID_OUI_FROM_DATABASE=Create New Technology (HK) Limited Company
 
+OUI:AC87A3*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:AC8ACD*
  ID_OUI_FROM_DATABASE=ROGER D.Wensker, G.Wensker sp.j.
 
@@ -65650,6 +66163,9 @@ OUI:ACF7F3*
 OUI:ACF97E*
  ID_OUI_FROM_DATABASE=ELESYS INC.
 
+OUI:ACFDCE*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:ACFDEC*
  ID_OUI_FROM_DATABASE=Apple, Inc
 
@@ -65707,6 +66223,9 @@ OUI:B0435D*
 OUI:B04515*
  ID_OUI_FROM_DATABASE=mira fitness,LLC.
 
+OUI:B04519*
+ ID_OUI_FROM_DATABASE=TCT mobile ltd
+
 OUI:B04545*
  ID_OUI_FROM_DATABASE=YACOUB Automation GmbH
 
@@ -65809,6 +66328,9 @@ OUI:B09074*
 OUI:B09134*
  ID_OUI_FROM_DATABASE=Taleo
 
+OUI:B09137*
+ ID_OUI_FROM_DATABASE=ISis ImageStream Internet Solutions, Inc
+
 OUI:B0973A*
  ID_OUI_FROM_DATABASE=E-Fuel Corporation
 
@@ -66031,6 +66553,9 @@ OUI:B435F7*
 OUI:B43741*
  ID_OUI_FROM_DATABASE=Consert, Inc.
 
+OUI:B43934*
+ ID_OUI_FROM_DATABASE=Pen Generations, Inc.
+
 OUI:B439D6*
  ID_OUI_FROM_DATABASE=ProCurve Networking by HP
 
@@ -66157,6 +66682,9 @@ OUI:B4A4E3*
 OUI:B4A5A9*
  ID_OUI_FROM_DATABASE=MODI GmbH
 
+OUI:B4A828*
+ ID_OUI_FROM_DATABASE=Shenzhen Concox Information Technology Co., Ltd
+
 OUI:B4A82B*
  ID_OUI_FROM_DATABASE=Histar Digital Electronics Co., Ltd.
 
@@ -66496,6 +67024,9 @@ OUI:B8AD3E*
 OUI:B8AE6E*
  ID_OUI_FROM_DATABASE=Nintendo Co., Ltd.
 
+OUI:B8AEED*
+ ID_OUI_FROM_DATABASE=Elitegroup Computer Systems Co., Ltd.
+
 OUI:B8AF67*
  ID_OUI_FROM_DATABASE=Hewlett-Packard Company
 
@@ -66562,6 +67093,9 @@ OUI:B8D06F*
 OUI:B8D49D*
  ID_OUI_FROM_DATABASE=M Seven System Ltd.
 
+OUI:B8D812*
+ ID_OUI_FROM_DATABASE=IEEE REGISTRATION AUTHORITY  - Please see MAM public listing for more information.
+
 OUI:B8D9CE*
  ID_OUI_FROM_DATABASE=Samsung Electronics
 
@@ -66658,6 +67192,9 @@ OUI:BC15A6*
 OUI:BC1665*
  ID_OUI_FROM_DATABASE=Cisco
 
+OUI:BC16F5*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:BC1A67*
  ID_OUI_FROM_DATABASE=YF Technology Co., Ltd
 
@@ -66730,6 +67267,9 @@ OUI:BC4760*
 OUI:BC4B79*
  ID_OUI_FROM_DATABASE=SensingTek
 
+OUI:BC4DFB*
+ ID_OUI_FROM_DATABASE=Hitron Technologies. Inc
+
 OUI:BC4E3C*
  ID_OUI_FROM_DATABASE=CORE STAFF CO., LTD.
 
@@ -66739,6 +67279,9 @@ OUI:BC4E5D*
 OUI:BC51FE*
  ID_OUI_FROM_DATABASE=Swann Communications Pty Ltd
 
+OUI:BC52B4*
+ ID_OUI_FROM_DATABASE=Alcatel-Lucent
+
 OUI:BC52B7*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -66766,6 +67309,9 @@ OUI:BC6A16*
 OUI:BC6A29*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:BC6B4D*
+ ID_OUI_FROM_DATABASE=Alcatel-Lucent
+
 OUI:BC6E76*
  ID_OUI_FROM_DATABASE=Green Energy Options Ltd
 
@@ -66775,6 +67321,9 @@ OUI:BC71C1*
 OUI:BC72B1*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:BC74D7*
+ ID_OUI_FROM_DATABASE=HangZhou JuRu Technology CO.,LTD
+
 OUI:BC764E*
  ID_OUI_FROM_DATABASE=Rackspace US, Inc.
 
@@ -66862,12 +67411,18 @@ OUI:BCBAE1*
 OUI:BCBBC9*
  ID_OUI_FROM_DATABASE=Kellendonk Elektronik GmbH
 
+OUI:BCBC46*
+ ID_OUI_FROM_DATABASE=SKS Welding Systems GmbH
+
 OUI:BCC168*
  ID_OUI_FROM_DATABASE=DinBox Sverige AB
 
 OUI:BCC23A*
  ID_OUI_FROM_DATABASE=Thomson Video Networks
 
+OUI:BCC342*
+ ID_OUI_FROM_DATABASE=Panasonic System Networks Co., Ltd.
+
 OUI:BCC61A*
  ID_OUI_FROM_DATABASE=SPECTRA EMBEDDED SYSTEMS
 
@@ -66907,6 +67462,9 @@ OUI:BCE59F*
 OUI:BCEA2B*
  ID_OUI_FROM_DATABASE=CityCom GmbH
 
+OUI:BCEAFA*
+ ID_OUI_FROM_DATABASE=Hewlett Packard
+
 OUI:BCEE7B*
  ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC.
 
@@ -66976,6 +67534,12 @@ OUI:C03580*
 OUI:C035BD*
  ID_OUI_FROM_DATABASE=Velocytech Aps
 
+OUI:C035C5*
+ ID_OUI_FROM_DATABASE=Prosoft Systems LTD
+
+OUI:C03896*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
 OUI:C038F9*
  ID_OUI_FROM_DATABASE=Nokia Danmark A/S
 
@@ -67087,6 +67651,9 @@ OUI:C09132*
 OUI:C09134*
  ID_OUI_FROM_DATABASE=ProCurve Networking by HP
 
+OUI:C09879*
+ ID_OUI_FROM_DATABASE=Acer Inc.
+
 OUI:C098E5*
  ID_OUI_FROM_DATABASE=University of Michigan
 
@@ -67228,6 +67795,9 @@ OUI:C40528*
 OUI:C4084A*
  ID_OUI_FROM_DATABASE=Alcatel-Lucent
 
+OUI:C40880*
+ ID_OUI_FROM_DATABASE=Shenzhen UTEPO Tech Co., Ltd.
+
 OUI:C40938*
  ID_OUI_FROM_DATABASE=Fujian Star-net Communication Co., Ltd
 
@@ -67471,6 +68041,9 @@ OUI:C4BA99*
 OUI:C4BD6A*
  ID_OUI_FROM_DATABASE=SKF GmbH
 
+OUI:C4BE84*
+ ID_OUI_FROM_DATABASE=Texas Instruments.
+
 OUI:C4C0AE*
  ID_OUI_FROM_DATABASE=MIDORI ELECTRONIC CO., LTD.
 
@@ -67573,6 +68146,9 @@ OUI:C819F7*
 OUI:C81AFE*
  ID_OUI_FROM_DATABASE=DLOGIC GmbH
 
+OUI:C81B6B*
+ ID_OUI_FROM_DATABASE=Innova Security
+
 OUI:C81E8E*
  ID_OUI_FROM_DATABASE=ADV Security (S) Pte Ltd
 
@@ -67675,6 +68251,9 @@ OUI:C88439*
 OUI:C88447*
  ID_OUI_FROM_DATABASE=Beautiful Enterprise Co., Ltd
 
+OUI:C88550*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:C8873B*
  ID_OUI_FROM_DATABASE=Net Optics
 
@@ -67774,6 +68353,9 @@ OUI:C8CBB8*
 OUI:C8CD72*
  ID_OUI_FROM_DATABASE=SAGEMCOM
 
+OUI:C8D019*
+ ID_OUI_FROM_DATABASE=Shanghai Tigercel Communication Technology Co.,Ltd
+
 OUI:C8D10B*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
@@ -67960,6 +68542,9 @@ OUI:CC3D82*
 OUI:CC3E5F*
  ID_OUI_FROM_DATABASE=Hewlett Packard
 
+OUI:CC3F1D*
+ ID_OUI_FROM_DATABASE=Intesis Software SL
+
 OUI:CC43E3*
  ID_OUI_FROM_DATABASE=Trump s.a.
 
@@ -68119,6 +68704,9 @@ OUI:CCB8F1*
 OUI:CCBD35*
  ID_OUI_FROM_DATABASE=Steinel GmbH
 
+OUI:CCBDD3*
+ ID_OUI_FROM_DATABASE=Ultimaker B.V.
+
 OUI:CCBE71*
  ID_OUI_FROM_DATABASE=OptiLogix BV
 
@@ -68254,6 +68842,9 @@ OUI:D01AA7*
 OUI:D01CBB*
  ID_OUI_FROM_DATABASE=Beijing Ctimes Digital Technology Co., Ltd.
 
+OUI:D02212*
+ ID_OUI_FROM_DATABASE=IEEE REGISTRATION AUTHORITY  - Please see MAM public listing for more information.
+
 OUI:D022BE*
  ID_OUI_FROM_DATABASE=Samsung Electro Mechanics co.,LTD.
 
@@ -68287,6 +68878,9 @@ OUI:D046DC*
 OUI:D04CC1*
  ID_OUI_FROM_DATABASE=SINTRONES Technology Corp.
 
+OUI:D04F7E*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:D05099*
  ID_OUI_FROM_DATABASE=ASRock Incorporation
 
@@ -68323,6 +68917,9 @@ OUI:D05A0F*
 OUI:D05AF1*
  ID_OUI_FROM_DATABASE=Shenzhen Pulier Tech CO.,Ltd
 
+OUI:D05BA8*
+ ID_OUI_FROM_DATABASE=zte corporation
+
 OUI:D05FB8*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
@@ -68614,6 +69211,9 @@ OUI:D42F23*
 OUI:D4319D*
  ID_OUI_FROM_DATABASE=Sinwatec
 
+OUI:D43266*
+ ID_OUI_FROM_DATABASE=Fike Corporation
+
 OUI:D437D7*
  ID_OUI_FROM_DATABASE=zte corporation
 
@@ -68668,6 +69268,9 @@ OUI:D45C70*
 OUI:D45D42*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:D46132*
+ ID_OUI_FROM_DATABASE=Pro Concept Manufacturer Co.,Ltd.
+
 OUI:D464F7*
  ID_OUI_FROM_DATABASE=CHENGDU USEE DIGITAL TECHNOLOGY CO., LTD
 
@@ -68728,6 +69331,9 @@ OUI:D48890*
 OUI:D48CB5*
  ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
 
+OUI:D48DD9*
+ ID_OUI_FROM_DATABASE=Meld Technology, Inc
+
 OUI:D48F33*
  ID_OUI_FROM_DATABASE=Microsoft Corporation
 
@@ -68887,6 +69493,12 @@ OUI:D4F0B4*
 OUI:D4F143*
  ID_OUI_FROM_DATABASE=IPROAD.,Inc
 
+OUI:D4F46F*
+ ID_OUI_FROM_DATABASE=Apple
+
+OUI:D4F513*
+ ID_OUI_FROM_DATABASE=Texas Instruments
+
 OUI:D4F63F*
  ID_OUI_FROM_DATABASE=IEA S.R.L.
 
@@ -68974,6 +69586,9 @@ OUI:D831CF*
 OUI:D8337F*
  ID_OUI_FROM_DATABASE=Office FA.com Co.,Ltd.
 
+OUI:D83C69*
+ ID_OUI_FROM_DATABASE=Tinno Mobile Technology Corp
+
 OUI:D842AC*
  ID_OUI_FROM_DATABASE=Shanghai Feixun Communication Co.,Ltd.
 
@@ -69058,9 +69673,15 @@ OUI:D87CDD*
 OUI:D87EB1*
  ID_OUI_FROM_DATABASE=x.o.ware, inc.
 
+OUI:D88039*
+ ID_OUI_FROM_DATABASE=Microchip Technology Inc.
+
 OUI:D881CE*
  ID_OUI_FROM_DATABASE=AHN INC.
 
+OUI:D88466*
+ ID_OUI_FROM_DATABASE=Extreme Networks
+
 OUI:D88A3B*
  ID_OUI_FROM_DATABASE=UNIT-EM
 
@@ -69088,6 +69709,9 @@ OUI:D89760*
 OUI:D8977C*
  ID_OUI_FROM_DATABASE=Grey Innovation
 
+OUI:D897BA*
+ ID_OUI_FROM_DATABASE=PEGATRON CORPORATION
+
 OUI:D89D67*
  ID_OUI_FROM_DATABASE=Hewlett Packard
 
@@ -69121,6 +69745,9 @@ OUI:D8B12A*
 OUI:D8B377*
  ID_OUI_FROM_DATABASE=HTC Corporation
 
+OUI:D8B6B7*
+ ID_OUI_FROM_DATABASE=Comtrend Corporation
+
 OUI:D8B6C1*
  ID_OUI_FROM_DATABASE=NetworkAccountant, Inc.
 
@@ -69133,6 +69760,9 @@ OUI:D8B8F6*
 OUI:D8B90E*
  ID_OUI_FROM_DATABASE=Triple Domain Vision Co.,Ltd.
 
+OUI:D8BB2C*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:D8BF4C*
  ID_OUI_FROM_DATABASE=Victory Concept Electronics Limited
 
@@ -69151,6 +69781,9 @@ OUI:D8C7C8*
 OUI:D8C99D*
  ID_OUI_FROM_DATABASE=EA DISPLAY LIMITED
 
+OUI:D8CB8A*
+ ID_OUI_FROM_DATABASE=Micro-Star INTL CO., LTD.
+
 OUI:D8CF9C*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -69197,7 +69830,7 @@ OUI:D8E56D*
  ID_OUI_FROM_DATABASE=TCT Mobile Limited
 
 OUI:D8E72B*
- ID_OUI_FROM_DATABASE=OnPATH Technologies
+ ID_OUI_FROM_DATABASE=NetScout Systems, Inc.
 
 OUI:D8E743*
  ID_OUI_FROM_DATABASE=Wush, Inc
@@ -69214,6 +69847,12 @@ OUI:D8EE78*
 OUI:D8F0F2*
  ID_OUI_FROM_DATABASE=Zeebo Inc
 
+OUI:D8F710*
+ ID_OUI_FROM_DATABASE=Libre Wireless Technologies Inc.
+
+OUI:D8FB11*
+ ID_OUI_FROM_DATABASE=AXACORE
+
 OUI:D8FC93*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -69286,6 +69925,9 @@ OUI:DC2C26*
 OUI:DC2E6A*
  ID_OUI_FROM_DATABASE=HCT. Co., Ltd.
 
+OUI:DC2F03*
+ ID_OUI_FROM_DATABASE=Step forward Group Co., Ltd.
+
 OUI:DC309C*
  ID_OUI_FROM_DATABASE=Heyrex Limited
 
@@ -69418,6 +70060,9 @@ OUI:DCC101*
 OUI:DCC422*
  ID_OUI_FROM_DATABASE=Systembase Limited
 
+OUI:DCC622*
+ ID_OUI_FROM_DATABASE=BUHEUNG SYSTEM
+
 OUI:DCC793*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
@@ -69448,6 +70093,9 @@ OUI:DCD52A*
 OUI:DCD87F*
  ID_OUI_FROM_DATABASE=Shenzhen JoinCyber Telecom Equipment Ltd
 
+OUI:DCDA4F*
+ ID_OUI_FROM_DATABASE=GETCK TECHNOLOGY,  INC
+
 OUI:DCDECA*
  ID_OUI_FROM_DATABASE=Akyllor
 
@@ -69460,6 +70108,9 @@ OUI:DCE578*
 OUI:DCE71C*
  ID_OUI_FROM_DATABASE=AUG Elektronik GmbH
 
+OUI:DCEC06*
+ ID_OUI_FROM_DATABASE=Heimi Network Technology Co., Ltd.
+
 OUI:DCF05D*
  ID_OUI_FROM_DATABASE=Letta Teknoloji
 
@@ -69490,6 +70141,9 @@ OUI:E00B28*
 OUI:E00C7F*
  ID_OUI_FROM_DATABASE=Nintendo Co., Ltd.
 
+OUI:E0107F*
+ ID_OUI_FROM_DATABASE=Ruckus Wireless
+
 OUI:E0143E*
  ID_OUI_FROM_DATABASE=Modoosis Inc.
 
@@ -69550,6 +70204,9 @@ OUI:E039D7*
 OUI:E03C5B*
  ID_OUI_FROM_DATABASE=SHENZHEN JIAXINJIE ELECTRON CO.,LTD
 
+OUI:E03E44*
+ ID_OUI_FROM_DATABASE=Broadcom Corporation
+
 OUI:E03E4A*
  ID_OUI_FROM_DATABASE=Cavanagh Group International
 
@@ -69622,6 +70279,9 @@ OUI:E08177*
 OUI:E087B1*
  ID_OUI_FROM_DATABASE=Nata-Info Ltd.
 
+OUI:E0885D*
+ ID_OUI_FROM_DATABASE=Technicolor CH USA Inc
+
 OUI:E08A7E*
  ID_OUI_FROM_DATABASE=Exponent
 
@@ -69688,6 +70348,9 @@ OUI:E0AF4B*
 OUI:E0B2F1*
  ID_OUI_FROM_DATABASE=FN-LINK TECHNOLOGY LIMITED
 
+OUI:E0B52D*
+ ID_OUI_FROM_DATABASE=Apple
+
 OUI:E0B7B1*
  ID_OUI_FROM_DATABASE=Pace plc
 
@@ -69829,9 +70492,15 @@ OUI:E41289*
 OUI:E41C4B*
  ID_OUI_FROM_DATABASE=V2 TECHNOLOGY, INC.
 
+OUI:E41D2D*
+ ID_OUI_FROM_DATABASE=Mellanox Technologies, Inc.
+
 OUI:E41F13*
  ID_OUI_FROM_DATABASE=IBM Corp
 
+OUI:E42354*
+ ID_OUI_FROM_DATABASE=SHENZHEN FUZHI SOFTWARE TECHNOLOGY CO.,LTD
+
 OUI:E425E7*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -69961,6 +70630,9 @@ OUI:E48AD5*
 OUI:E48B7F*
  ID_OUI_FROM_DATABASE=Apple
 
+OUI:E48C0F*
+ ID_OUI_FROM_DATABASE=Discovery Insure
+
 OUI:E49069*
  ID_OUI_FROM_DATABASE=Rockwell Automation
 
@@ -70000,6 +70672,9 @@ OUI:E4AFA1*
 OUI:E4B021*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:E4BAD9*
+ ID_OUI_FROM_DATABASE=360 Fly Inc.
+
 OUI:E4C146*
  ID_OUI_FROM_DATABASE=Objetivos y Servicios de Valor A
 
@@ -70060,6 +70735,9 @@ OUI:E4F4C6*
 OUI:E4F7A1*
  ID_OUI_FROM_DATABASE=Datafox GmbH
 
+OUI:E4F8EF*
+ ID_OUI_FROM_DATABASE=Samsung Elec Co.,Ltd
+
 OUI:E4FA1D*
  ID_OUI_FROM_DATABASE=PAD Peripheral Advanced Design Inc.
 
@@ -70111,6 +70789,9 @@ OUI:E8150E*
 OUI:E817FC*
  ID_OUI_FROM_DATABASE=NIFTY Corporation
 
+OUI:E81863*
+ ID_OUI_FROM_DATABASE=IEEE REGISTRATION AUTHORITY  - Please see MAM public listing for more information.
+
 OUI:E82877*
  ID_OUI_FROM_DATABASE=TMY Co., Ltd.
 
@@ -70123,6 +70804,9 @@ OUI:E82AEA*
 OUI:E82E24*
  ID_OUI_FROM_DATABASE=Out of the Fog Research LLC
 
+OUI:E83381*
+ ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
+
 OUI:E83935*
  ID_OUI_FROM_DATABASE=Hewlett Packard
 
@@ -70228,6 +70912,9 @@ OUI:E8802E*
 OUI:E880D8*
  ID_OUI_FROM_DATABASE=GNTEK Electronics Co.,Ltd.
 
+OUI:E887A3*
+ ID_OUI_FROM_DATABASE=Loxley Public Company Limited
+
 OUI:E8892C*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
@@ -70237,6 +70924,9 @@ OUI:E88D28*
 OUI:E88DF5*
  ID_OUI_FROM_DATABASE=ZNYX Networks, Inc.
 
+OUI:E88E60*
+ ID_OUI_FROM_DATABASE=NSD Corporation
+
 OUI:E89218*
  ID_OUI_FROM_DATABASE=Arcontia International AB
 
@@ -70249,6 +70939,9 @@ OUI:E8944C*
 OUI:E894F6*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
+OUI:E89606*
+ ID_OUI_FROM_DATABASE=testo Instruments (Shenzhen) Co., Ltd.
+
 OUI:E8995A*
  ID_OUI_FROM_DATABASE=PiiGAB, Processinformation i Goteborg AB
 
@@ -70303,6 +70996,9 @@ OUI:E8C320*
 OUI:E8CBA1*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:E8CC18*
+ ID_OUI_FROM_DATABASE=D-Link International
+
 OUI:E8CC32*
  ID_OUI_FROM_DATABASE=Micronet  LTD
 
@@ -70396,6 +71092,9 @@ OUI:EC0ED6*
 OUI:EC1120*
  ID_OUI_FROM_DATABASE=FloDesign Wind Turbine Corporation
 
+OUI:EC13B2*
+ ID_OUI_FROM_DATABASE=Netonix
+
 OUI:EC14F6*
  ID_OUI_FROM_DATABASE=BioControl AS
 
@@ -70426,6 +71125,9 @@ OUI:EC233D*
 OUI:EC2368*
  ID_OUI_FROM_DATABASE=IntelliVoice Co.,Ltd.
 
+OUI:EC24B8*
+ ID_OUI_FROM_DATABASE=Texas Instruments
+
 OUI:EC2AF0*
  ID_OUI_FROM_DATABASE=Ypsomed AG
 
@@ -70486,6 +71188,9 @@ OUI:EC542E*
 OUI:EC55F9*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
 
+OUI:EC59E7*
+ ID_OUI_FROM_DATABASE=Microsoft Corporation
+
 OUI:EC5C69*
  ID_OUI_FROM_DATABASE=MITSUBISHI HEAVY INDUSTRIES MECHATRONICS SYSTEMS,LTD.
 
@@ -70510,6 +71215,9 @@ OUI:EC7C74*
 OUI:EC7D9D*
  ID_OUI_FROM_DATABASE=MEI
 
+OUI:EC8009*
+ ID_OUI_FROM_DATABASE=NovaSparks
+
 OUI:EC836C*
  ID_OUI_FROM_DATABASE=RM Tech Co., Ltd.
 
@@ -70681,6 +71389,9 @@ OUI:F015A0*
 OUI:F01C13*
  ID_OUI_FROM_DATABASE=LG Electronics
 
+OUI:F01C2D*
+ ID_OUI_FROM_DATABASE=Juniper Networks
+
 OUI:F01FAF*
  ID_OUI_FROM_DATABASE=Dell Inc
 
@@ -70729,6 +71440,9 @@ OUI:F03A4B*
 OUI:F03A55*
  ID_OUI_FROM_DATABASE=Omega Elektronik AS
 
+OUI:F03D29*
+ ID_OUI_FROM_DATABASE=Actility
+
 OUI:F03FF8*
  ID_OUI_FROM_DATABASE=R L Drake
 
@@ -70801,6 +71515,9 @@ OUI:F07BCB*
 OUI:F07D68*
  ID_OUI_FROM_DATABASE=D-Link Corporation
 
+OUI:F07F06*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:F07F0C*
  ID_OUI_FROM_DATABASE=Leopold Kostal GmbH &Co. KG
 
@@ -70843,6 +71560,9 @@ OUI:F09CBB*
 OUI:F09CE9*
  ID_OUI_FROM_DATABASE=Aerohive Networks Inc
 
+OUI:F09E63*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:F0A764*
  ID_OUI_FROM_DATABASE=GST Co., Ltd.
 
@@ -70945,6 +71665,9 @@ OUI:F0F002*
 OUI:F0F260*
  ID_OUI_FROM_DATABASE=Mobitec AB
 
+OUI:F0F336*
+ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD
+
 OUI:F0F5AE*
  ID_OUI_FROM_DATABASE=Adaptrum Inc.
 
@@ -70972,6 +71695,9 @@ OUI:F0F9F7*
 OUI:F0FDA0*
  ID_OUI_FROM_DATABASE=Acurix Networks LP
 
+OUI:F0FE6B*
+ ID_OUI_FROM_DATABASE=Shanghai High-Flying Electronics Technology Co., Ltd
+
 OUI:F40321*
  ID_OUI_FROM_DATABASE=BeNeXt B.V.
 
@@ -71062,6 +71788,9 @@ OUI:F4472A*
 OUI:F44848*
  ID_OUI_FROM_DATABASE=Amscreen Group Ltd
 
+OUI:F44E05*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:F44EFD*
  ID_OUI_FROM_DATABASE=Actions Semiconductor Co.,Ltd.(Cayman Islands)
 
@@ -71188,6 +71917,9 @@ OUI:F4B72A*
 OUI:F4B7E2*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
 
+OUI:F4B85E*
+ ID_OUI_FROM_DATABASE=Texas INstruments
+
 OUI:F4BD7C*
  ID_OUI_FROM_DATABASE=Chengdu jinshi communication Co., LTD
 
@@ -71248,6 +71980,9 @@ OUI:F4EA67*
 OUI:F4EC38*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO., LTD.
 
+OUI:F4EE14*
+ ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD.
+
 OUI:F4F15A*
  ID_OUI_FROM_DATABASE=Apple
 
@@ -71371,6 +72106,9 @@ OUI:F83DFF*
 OUI:F842FB*
  ID_OUI_FROM_DATABASE=Yasuda Joho Co.,ltd.
 
+OUI:F84360*
+ ID_OUI_FROM_DATABASE=INGENICO
+
 OUI:F845AD*
  ID_OUI_FROM_DATABASE=Konka Group Co., Ltd.
 
@@ -71461,6 +72199,9 @@ OUI:F87B8C*
 OUI:F8811A*
  ID_OUI_FROM_DATABASE=OVERKIZ
 
+OUI:F88479*
+ ID_OUI_FROM_DATABASE=Yaojin Technology(Shenzhen)Co.,Ltd
+
 OUI:F884F2*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -71524,12 +72265,18 @@ OUI:F8AC6D*
 OUI:F8B156*
  ID_OUI_FROM_DATABASE=Dell Inc
 
+OUI:F8B2F3*
+ ID_OUI_FROM_DATABASE=GUANGZHOU BOSMA TECHNOLOGY CO.,LTD
+
 OUI:F8B599*
  ID_OUI_FROM_DATABASE=Guangzhou CHNAVS Digital Technology Co.,Ltd
 
 OUI:F8BC12*
  ID_OUI_FROM_DATABASE=Dell Inc
 
+OUI:F8BC41*
+ ID_OUI_FROM_DATABASE=Rosslare Enterprises Limited
+
 OUI:F8C001*
  ID_OUI_FROM_DATABASE=Juniper Networks
 
@@ -71599,6 +72346,9 @@ OUI:F8E7B5*
 OUI:F8E811*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:F8E903*
+ ID_OUI_FROM_DATABASE=D-Link International
+
 OUI:F8E968*
  ID_OUI_FROM_DATABASE=Egker Kft.
 
@@ -71782,6 +72532,9 @@ OUI:FC5B24*
 OUI:FC5B26*
  ID_OUI_FROM_DATABASE=MikroBits
 
+OUI:FC5B39*
+ ID_OUI_FROM_DATABASE=Cisco
+
 OUI:FC6018*
  ID_OUI_FROM_DATABASE=Zhejiang Kangtai Electric Co., Ltd.
 
@@ -71791,6 +72544,9 @@ OUI:FC6198*
 OUI:FC626E*
  ID_OUI_FROM_DATABASE=Beijing MDC Telecom
 
+OUI:FC62B9*
+ ID_OUI_FROM_DATABASE=ALPS ERECTRIC CO.,LTD
+
 OUI:FC683E*
  ID_OUI_FROM_DATABASE=Directed Perception, Inc
 
index 9f3136a6a72771c098e66a24393722fded984418..ee2efdff2eb5e8d8b5690ce55478d14c685343e3 100644 (file)
@@ -184,7 +184,7 @@ bluetooth:v003B*
  ID_VENDOR_FROM_DATABASE=Gennum Corporation
 
 bluetooth:v003C*
- ID_VENDOR_FROM_DATABASE=Research In Motion
+ ID_VENDOR_FROM_DATABASE=BlackBerry Limited (formerly Research In Motion)
 
 bluetooth:v003D*
  ID_VENDOR_FROM_DATABASE=IPextreme, Inc.
@@ -1073,3 +1073,96 @@ bluetooth:v0162*
 
 bluetooth:v0163*
  ID_VENDOR_FROM_DATABASE=PCH International
+
+bluetooth:v0164*
+ ID_VENDOR_FROM_DATABASE=Qingdao Yeelink Information Technology Co., Ltd.
+
+bluetooth:v0165*
+ ID_VENDOR_FROM_DATABASE=Milwaukee Tool (formerly Milwaukee Electric Tools)
+
+bluetooth:v0166*
+ ID_VENDOR_FROM_DATABASE=MISHIK Pte Ltd
+
+bluetooth:v0167*
+ ID_VENDOR_FROM_DATABASE=Bayer HealthCare
+
+bluetooth:v0168*
+ ID_VENDOR_FROM_DATABASE=Spicebox LLC
+
+bluetooth:v0169*
+ ID_VENDOR_FROM_DATABASE=emberlight
+
+bluetooth:v016A*
+ ID_VENDOR_FROM_DATABASE=Cooper-Atkins Corporation
+
+bluetooth:v016B*
+ ID_VENDOR_FROM_DATABASE=Qblinks
+
+bluetooth:v016C*
+ ID_VENDOR_FROM_DATABASE=MYSPHERA
+
+bluetooth:v016D*
+ ID_VENDOR_FROM_DATABASE=LifeScan Inc
+
+bluetooth:v016E*
+ ID_VENDOR_FROM_DATABASE=Volantic AB
+
+bluetooth:v016F*
+ ID_VENDOR_FROM_DATABASE=Podo Labs, Inc
+
+bluetooth:v0170*
+ ID_VENDOR_FROM_DATABASE=Roche Diabetes Care AG
+
+bluetooth:v0171*
+ ID_VENDOR_FROM_DATABASE=Amazon Fulfillment Service
+
+bluetooth:v0172*
+ ID_VENDOR_FROM_DATABASE=Connovate Technology Private Limited
+
+bluetooth:v0173*
+ ID_VENDOR_FROM_DATABASE=Kocomojo, LLC
+
+bluetooth:v0174*
+ ID_VENDOR_FROM_DATABASE=Everykey LLC
+
+bluetooth:v0175*
+ ID_VENDOR_FROM_DATABASE=Dynamic Controls
+
+bluetooth:v0176*
+ ID_VENDOR_FROM_DATABASE=SentriLock
+
+bluetooth:v0177*
+ ID_VENDOR_FROM_DATABASE=I-SYST inc.
+
+bluetooth:v0178*
+ ID_VENDOR_FROM_DATABASE=CASIO COMPUTER CO., LTD.
+
+bluetooth:v0179*
+ ID_VENDOR_FROM_DATABASE=LAPIS Semiconductor Co., Ltd.
+
+bluetooth:v017A*
+ ID_VENDOR_FROM_DATABASE=Telemonitor, Inc.
+
+bluetooth:v017B*
+ ID_VENDOR_FROM_DATABASE=taskit GmbH
+
+bluetooth:v017C*
+ ID_VENDOR_FROM_DATABASE=Daimler AG
+
+bluetooth:v017D*
+ ID_VENDOR_FROM_DATABASE=BatAndCat
+
+bluetooth:v017E*
+ ID_VENDOR_FROM_DATABASE=BluDotz Ltd
+
+bluetooth:v017F*
+ ID_VENDOR_FROM_DATABASE=XTel ApS
+
+bluetooth:v0180*
+ ID_VENDOR_FROM_DATABASE=Gigaset Communications GmbH
+
+bluetooth:v0181*
+ ID_VENDOR_FROM_DATABASE=Gecko Health Innovations, Inc.
+
+bluetooth:v0182*
+ ID_VENDOR_FROM_DATABASE=HOP Ubiquitous
index 77c727dcc008d3873481a9a61ee7389cb209c833..1b98b1d2e7b3db7415fd7d9a6d77462328910dd6 100644 (file)
@@ -7892,6 +7892,9 @@ pci:v00001002d0000692B*
 pci:v00001002d0000692F*
  ID_MODEL_FROM_DATABASE=Tonga XT GL [FirePro W8100]
 
+pci:v00001002d00006939*
+ ID_MODEL_FROM_DATABASE=Tonga PRO [Radeon R9 285]
+
 pci:v00001002d0000700F*
  ID_MODEL_FROM_DATABASE=RS100 AGP Bridge
 
@@ -10478,6 +10481,9 @@ pci:v00001014d0000034Asv00001014sd000004C8*
 pci:v00001014d0000034Asv00001014sd00000C49*
  ID_MODEL_FROM_DATABASE=PCI-E IPR SAS Adapter (ASIC) (PCIe3 x 8 Cache SAS RAID Internal Adapter 6GB(2CCD))
 
+pci:v00001014d0000044B*
+ ID_MODEL_FROM_DATABASE=GenWQE Accelerator Adapter
+
 pci:v00001014d000004AA*
  ID_MODEL_FROM_DATABASE=Flash Adapter 90 (PCIe2 0.9TB)
 
@@ -17463,7 +17469,7 @@ pci:v00001093d00000162*
  ID_MODEL_FROM_DATABASE=PCI-MIO-16XE-50
 
 pci:v00001093d00001150*
- ID_MODEL_FROM_DATABASE=PCI-DIO-32HS High Speed Digital I/O Board
+ ID_MODEL_FROM_DATABASE=PCI-6533 (PCI-DIO-32HS)
 
 pci:v00001093d00001170*
  ID_MODEL_FROM_DATABASE=PCI-MIO-16XE-10
@@ -17478,22 +17484,31 @@ pci:v00001093d000011B0*
  ID_MODEL_FROM_DATABASE=PXI-6070E
 
 pci:v00001093d000011C0*
- ID_MODEL_FROM_DATABASE=PXI-6040e
+ ID_MODEL_FROM_DATABASE=PXI-6040E
 
 pci:v00001093d000011D0*
- ID_MODEL_FROM_DATABASE=PXI-6030e
+ ID_MODEL_FROM_DATABASE=PXI-6030E
 
 pci:v00001093d00001270*
- ID_MODEL_FROM_DATABASE=PCI-6032e
+ ID_MODEL_FROM_DATABASE=PCI-6032E
+
+pci:v00001093d00001290*
+ ID_MODEL_FROM_DATABASE=PCI-6704
+
+pci:v00001093d000012B0*
+ ID_MODEL_FROM_DATABASE=PCI-6534
 
 pci:v00001093d00001310*
  ID_MODEL_FROM_DATABASE=PCI-6602
 
+pci:v00001093d00001320*
+ ID_MODEL_FROM_DATABASE=PXI-6533
+
 pci:v00001093d00001330*
  ID_MODEL_FROM_DATABASE=PCI-6031E
 
 pci:v00001093d00001340*
- ID_MODEL_FROM_DATABASE=PCI-6033e
+ ID_MODEL_FROM_DATABASE=PCI-6033E
 
 pci:v00001093d00001350*
  ID_MODEL_FROM_DATABASE=PCI-6071E
@@ -17501,6 +17516,12 @@ pci:v00001093d00001350*
 pci:v00001093d00001360*
  ID_MODEL_FROM_DATABASE=PXI-6602
 
+pci:v00001093d000013C0*
+ ID_MODEL_FROM_DATABASE=PXI-6508
+
+pci:v00001093d00001490*
+ ID_MODEL_FROM_DATABASE=PXI-6534
+
 pci:v00001093d000014E0*
  ID_MODEL_FROM_DATABASE=PCI-6110
 
@@ -17516,6 +17537,9 @@ pci:v00001093d000015B0*
 pci:v00001093d00001710*
  ID_MODEL_FROM_DATABASE=PXI-6509
 
+pci:v00001093d000017C0*
+ ID_MODEL_FROM_DATABASE=PXI-5690
+
 pci:v00001093d000017D0*
  ID_MODEL_FROM_DATABASE=PCI-6503
 
@@ -17531,6 +17555,33 @@ pci:v00001093d000018B0*
 pci:v00001093d000018C0*
  ID_MODEL_FROM_DATABASE=PXI-6052E
 
+pci:v00001093d00001920*
+ ID_MODEL_FROM_DATABASE=PXI-6704
+
+pci:v00001093d00001930*
+ ID_MODEL_FROM_DATABASE=PCI-6040E
+
+pci:v00001093d000019C0*
+ ID_MODEL_FROM_DATABASE=PCI-4472
+
+pci:v00001093d00001AA0*
+ ID_MODEL_FROM_DATABASE=PXI-4110
+
+pci:v00001093d00001AD0*
+ ID_MODEL_FROM_DATABASE=PCI-6133
+
+pci:v00001093d00001AE0*
+ ID_MODEL_FROM_DATABASE=PXI-6133
+
+pci:v00001093d00001E30*
+ ID_MODEL_FROM_DATABASE=PCI-6624
+
+pci:v00001093d00001E40*
+ ID_MODEL_FROM_DATABASE=PXI-6624
+
+pci:v00001093d00001E50*
+ ID_MODEL_FROM_DATABASE=PXI-5404
+
 pci:v00001093d00002410*
  ID_MODEL_FROM_DATABASE=PCI-6733
 
@@ -17540,12 +17591,42 @@ pci:v00001093d00002420*
 pci:v00001093d00002430*
  ID_MODEL_FROM_DATABASE=PCI-6731
 
+pci:v00001093d00002470*
+ ID_MODEL_FROM_DATABASE=PCI-4474
+
+pci:v00001093d000024A0*
+ ID_MODEL_FROM_DATABASE=PCI-4065
+
+pci:v00001093d000024B0*
+ ID_MODEL_FROM_DATABASE=PXI-4200
+
+pci:v00001093d000024F0*
+ ID_MODEL_FROM_DATABASE=PXI-4472
+
+pci:v00001093d00002510*
+ ID_MODEL_FROM_DATABASE=PCI-4472
+
+pci:v00001093d00002520*
+ ID_MODEL_FROM_DATABASE=PCI-4474
+
+pci:v00001093d000027A0*
+ ID_MODEL_FROM_DATABASE=PCI-6123
+
+pci:v00001093d000027B0*
+ ID_MODEL_FROM_DATABASE=PXI-6123
+
 pci:v00001093d00002880*
  ID_MODEL_FROM_DATABASE=DAQCard-6601
 
 pci:v00001093d00002890*
  ID_MODEL_FROM_DATABASE=PCI-6036E
 
+pci:v00001093d000028A0*
+ ID_MODEL_FROM_DATABASE=PXI-4461
+
+pci:v00001093d000028B0*
+ ID_MODEL_FROM_DATABASE=PCI-6013
+
 pci:v00001093d000028C0*
  ID_MODEL_FROM_DATABASE=PCI-6014
 
@@ -17555,6 +17636,12 @@ pci:v00001093d000028D0*
 pci:v00001093d000028E0*
  ID_MODEL_FROM_DATABASE=PXI-5122
 
+pci:v00001093d000029F0*
+ ID_MODEL_FROM_DATABASE=PXI-7334
+
+pci:v00001093d00002A00*
+ ID_MODEL_FROM_DATABASE=PXI-7344
+
 pci:v00001093d00002A60*
  ID_MODEL_FROM_DATABASE=PCI-6023E
 
@@ -17565,7 +17652,13 @@ pci:v00001093d00002A80*
  ID_MODEL_FROM_DATABASE=PCI-6025E
 
 pci:v00001093d00002AB0*
- ID_MODEL_FROM_DATABASE=PXI-6025e
+ ID_MODEL_FROM_DATABASE=PXI-6025E
+
+pci:v00001093d00002B10*
+ ID_MODEL_FROM_DATABASE=PXI-6527
+
+pci:v00001093d00002B20*
+ ID_MODEL_FROM_DATABASE=PCI-6527
 
 pci:v00001093d00002B80*
  ID_MODEL_FROM_DATABASE=PXI-6713
@@ -17582,15 +17675,75 @@ pci:v00001093d00002C70*
 pci:v00001093d00002C80*
  ID_MODEL_FROM_DATABASE=PCI-6035E
 
+pci:v00001093d00002C90*
+ ID_MODEL_FROM_DATABASE=PCI-6703
+
 pci:v00001093d00002CA0*
  ID_MODEL_FROM_DATABASE=PCI-6034E
 
+pci:v00001093d00002CB0*
+ ID_MODEL_FROM_DATABASE=PCI-7344
+
 pci:v00001093d00002CC0*
  ID_MODEL_FROM_DATABASE=PXI-6608
 
+pci:v00001093d00002D20*
+ ID_MODEL_FROM_DATABASE=PXI-5600
+
 pci:v00001093d00002DB0*
  ID_MODEL_FROM_DATABASE=PCI-6608
 
+pci:v00001093d00002DC0*
+ ID_MODEL_FROM_DATABASE=PCI-4070
+
+pci:v00001093d00002DD0*
+ ID_MODEL_FROM_DATABASE=PXI-4070
+
+pci:v00001093d00002EB0*
+ ID_MODEL_FROM_DATABASE=PXI-4472
+
+pci:v00001093d00002EC0*
+ ID_MODEL_FROM_DATABASE=PXI-6115
+
+pci:v00001093d00002ED0*
+ ID_MODEL_FROM_DATABASE=PCI-6115
+
+pci:v00001093d00002EE0*
+ ID_MODEL_FROM_DATABASE=PXI-6120
+
+pci:v00001093d00002EF0*
+ ID_MODEL_FROM_DATABASE=PCI-6120
+
+pci:v00001093d00002FD1*
+ ID_MODEL_FROM_DATABASE=PCI-7334
+
+pci:v00001093d00002FD2*
+ ID_MODEL_FROM_DATABASE=PCI-7350
+
+pci:v00001093d00002FD3*
+ ID_MODEL_FROM_DATABASE=PCI-7342
+
+pci:v00001093d00002FD5*
+ ID_MODEL_FROM_DATABASE=PXI-7350
+
+pci:v00001093d00002FD6*
+ ID_MODEL_FROM_DATABASE=PXI-7342
+
+pci:v00001093d00007003*
+ ID_MODEL_FROM_DATABASE=PCI-6551
+
+pci:v00001093d00007004*
+ ID_MODEL_FROM_DATABASE=PXI-6551
+
+pci:v00001093d0000700B*
+ ID_MODEL_FROM_DATABASE=PXI-5421
+
+pci:v00001093d0000700C*
+ ID_MODEL_FROM_DATABASE=PCI-5421
+
+pci:v00001093d00007023*
+ ID_MODEL_FROM_DATABASE=PXI-2593
+
 pci:v00001093d0000702C*
  ID_MODEL_FROM_DATABASE=PXI-7831R
 
@@ -17603,23 +17756,152 @@ pci:v00001093d0000702E*
 pci:v00001093d0000702F*
  ID_MODEL_FROM_DATABASE=PCI-7811R
 
+pci:v00001093d00007030*
+ ID_MODEL_FROM_DATABASE=PCI-CAN (Series 2)
+
+pci:v00001093d00007031*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/2 (Series 2)
+
+pci:v00001093d00007032*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/LS (Series 2)
+
+pci:v00001093d00007033*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/LS2 (Series 2)
+
+pci:v00001093d00007034*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/DS (Series 2)
+
+pci:v00001093d00007035*
+ ID_MODEL_FROM_DATABASE=PXI-8460 (Series 2, 1 port)
+
+pci:v00001093d00007036*
+ ID_MODEL_FROM_DATABASE=PXI-8460 (Series 2, 2 ports)
+
+pci:v00001093d00007037*
+ ID_MODEL_FROM_DATABASE=PXI-8461 (Series 2, 1 port)
+
+pci:v00001093d00007038*
+ ID_MODEL_FROM_DATABASE=PXI-8461 (Series 2, 2 ports)
+
+pci:v00001093d00007039*
+ ID_MODEL_FROM_DATABASE=PXI-8462 (Series 2)
+
+pci:v00001093d0000703F*
+ ID_MODEL_FROM_DATABASE=PXI-2566
+
+pci:v00001093d00007040*
+ ID_MODEL_FROM_DATABASE=PXI-2567
+
+pci:v00001093d00007044*
+ ID_MODEL_FROM_DATABASE=MXI-4 Connection Monitor
+
+pci:v00001093d00007047*
+ ID_MODEL_FROM_DATABASE=PXI-6653
+
+pci:v00001093d0000704C*
+ ID_MODEL_FROM_DATABASE=PXI-2530
+
+pci:v00001093d0000704F*
+ ID_MODEL_FROM_DATABASE=PXI-4220
+
+pci:v00001093d00007050*
+ ID_MODEL_FROM_DATABASE=PXI-4204
+
 pci:v00001093d00007055*
  ID_MODEL_FROM_DATABASE=PXI-7830R
 
 pci:v00001093d00007056*
  ID_MODEL_FROM_DATABASE=PCI-7830R
 
+pci:v00001093d0000705A*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/XS (Series 2)
+
+pci:v00001093d0000705B*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/XS2 (Series 2)
+
+pci:v00001093d0000705C*
+ ID_MODEL_FROM_DATABASE=PXI-8464 (Series 2, 1 port)
+
+pci:v00001093d0000705D*
+ ID_MODEL_FROM_DATABASE=PXI-8464 (Series 2, 2 ports)
+
+pci:v00001093d0000705E*
+ ID_MODEL_FROM_DATABASE=cRIO-9102
+
+pci:v00001093d00007060*
+ ID_MODEL_FROM_DATABASE=PXI-5610
+
+pci:v00001093d00007064*
+ ID_MODEL_FROM_DATABASE=PXI-1045 Trigger Routing Module
+
+pci:v00001093d00007065*
+ ID_MODEL_FROM_DATABASE=PXI-6652
+
+pci:v00001093d00007066*
+ ID_MODEL_FROM_DATABASE=PXI-6651
+
+pci:v00001093d00007067*
+ ID_MODEL_FROM_DATABASE=PXI-2529
+
+pci:v00001093d00007068*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/SW (Series 2)
+
+pci:v00001093d00007069*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/SW2 (Series 2)
+
+pci:v00001093d0000706A*
+ ID_MODEL_FROM_DATABASE=PXI-8463 (Series 2, 1 port)
+
+pci:v00001093d0000706B*
+ ID_MODEL_FROM_DATABASE=PXI-8463 (Series 2, 2 ports)
+
+pci:v00001093d00007073*
+ ID_MODEL_FROM_DATABASE=PCI-6723
+
 pci:v00001093d00007074*
  ID_MODEL_FROM_DATABASE=PXI-7833R
 
+pci:v00001093d00007075*
+ ID_MODEL_FROM_DATABASE=PXI-6552
+
+pci:v00001093d00007076*
+ ID_MODEL_FROM_DATABASE=PCI-6552
+
+pci:v00001093d0000707C*
+ ID_MODEL_FROM_DATABASE=PXI-1428
+
+pci:v00001093d0000707E*
+ ID_MODEL_FROM_DATABASE=PXI-4462
+
+pci:v00001093d00007080*
+ ID_MODEL_FROM_DATABASE=PXI-8430/2 (RS-232) Interface
+
+pci:v00001093d00007081*
+ ID_MODEL_FROM_DATABASE=PXI-8431/2 (RS-485) Interface
+
 pci:v00001093d00007083*
  ID_MODEL_FROM_DATABASE=PCI-7833R
 
 pci:v00001093d00007085*
  ID_MODEL_FROM_DATABASE=PCI-6509
 
+pci:v00001093d00007086*
+ ID_MODEL_FROM_DATABASE=PXI-6528
+
+pci:v00001093d00007087*
+ ID_MODEL_FROM_DATABASE=PCI-6515
+
+pci:v00001093d00007088*
+ ID_MODEL_FROM_DATABASE=PCI-6514
+
+pci:v00001093d0000708C*
+ ID_MODEL_FROM_DATABASE=PXI-2568
+
+pci:v00001093d0000708D*
+ ID_MODEL_FROM_DATABASE=PXI-2569
+
 pci:v00001093d000070A9*
- ID_MODEL_FROM_DATABASE=PCI-6528 (Digital I/O at 60V)
+ ID_MODEL_FROM_DATABASE=PCI-6528
 
 pci:v00001093d000070AA*
  ID_MODEL_FROM_DATABASE=PCI-6229
@@ -17630,6 +17912,9 @@ pci:v00001093d000070AB*
 pci:v00001093d000070AC*
  ID_MODEL_FROM_DATABASE=PCI-6289
 
+pci:v00001093d000070AD*
+ ID_MODEL_FROM_DATABASE=PXI-6251
+
 pci:v00001093d000070AE*
  ID_MODEL_FROM_DATABASE=PXI-6220
 
@@ -17639,9 +17924,21 @@ pci:v00001093d000070AF*
 pci:v00001093d000070B0*
  ID_MODEL_FROM_DATABASE=PCI-6220
 
+pci:v00001093d000070B1*
+ ID_MODEL_FROM_DATABASE=PXI-6229
+
+pci:v00001093d000070B2*
+ ID_MODEL_FROM_DATABASE=PXI-6259
+
+pci:v00001093d000070B3*
+ ID_MODEL_FROM_DATABASE=PXI-6289
+
 pci:v00001093d000070B4*
  ID_MODEL_FROM_DATABASE=PCI-6250
 
+pci:v00001093d000070B5*
+ ID_MODEL_FROM_DATABASE=PXI-6221
+
 pci:v00001093d000070B6*
  ID_MODEL_FROM_DATABASE=PCI-6280
 
@@ -17649,7 +17946,16 @@ pci:v00001093d000070B7*
  ID_MODEL_FROM_DATABASE=PCI-6254
 
 pci:v00001093d000070B8*
- ID_MODEL_FROM_DATABASE=PCI-6251 [M Series - High Speed Multifunction DAQ]
+ ID_MODEL_FROM_DATABASE=PCI-6251
+
+pci:v00001093d000070B9*
+ ID_MODEL_FROM_DATABASE=PXI-6250
+
+pci:v00001093d000070BA*
+ ID_MODEL_FROM_DATABASE=PXI-6254
+
+pci:v00001093d000070BB*
+ ID_MODEL_FROM_DATABASE=PXI-6280
 
 pci:v00001093d000070BC*
  ID_MODEL_FROM_DATABASE=PCI-6284
@@ -17657,12 +17963,144 @@ pci:v00001093d000070BC*
 pci:v00001093d000070BD*
  ID_MODEL_FROM_DATABASE=PCI-6281
 
+pci:v00001093d000070BE*
+ ID_MODEL_FROM_DATABASE=PXI-6284
+
 pci:v00001093d000070BF*
  ID_MODEL_FROM_DATABASE=PXI-6281
 
 pci:v00001093d000070C0*
  ID_MODEL_FROM_DATABASE=PCI-6143
 
+pci:v00001093d000070C3*
+ ID_MODEL_FROM_DATABASE=PCI-6511
+
+pci:v00001093d000070C4*
+ ID_MODEL_FROM_DATABASE=PXI-7330
+
+pci:v00001093d000070C5*
+ ID_MODEL_FROM_DATABASE=PXI-7340
+
+pci:v00001093d000070C6*
+ ID_MODEL_FROM_DATABASE=PCI-7330
+
+pci:v00001093d000070C7*
+ ID_MODEL_FROM_DATABASE=PCI-7340
+
+pci:v00001093d000070C8*
+ ID_MODEL_FROM_DATABASE=PCI-6513
+
+pci:v00001093d000070C9*
+ ID_MODEL_FROM_DATABASE=PXI-6515
+
+pci:v00001093d000070CA*
+ ID_MODEL_FROM_DATABASE=PCI-1405
+
+pci:v00001093d000070CC*
+ ID_MODEL_FROM_DATABASE=PCI-6512
+
+pci:v00001093d000070CD*
+ ID_MODEL_FROM_DATABASE=PXI-6514
+
+pci:v00001093d000070CE*
+ ID_MODEL_FROM_DATABASE=PXI-1405
+
+pci:v00001093d000070CF*
+ ID_MODEL_FROM_DATABASE=PCIe-GPIB
+
+pci:v00001093d000070D0*
+ ID_MODEL_FROM_DATABASE=PXI-2570
+
+pci:v00001093d000070D1*
+ ID_MODEL_FROM_DATABASE=PXI-6513
+
+pci:v00001093d000070D2*
+ ID_MODEL_FROM_DATABASE=PXI-6512
+
+pci:v00001093d000070D3*
+ ID_MODEL_FROM_DATABASE=PXI-6511
+
+pci:v00001093d000070D4*
+ ID_MODEL_FROM_DATABASE=PCI-6722
+
+pci:v00001093d000070D6*
+ ID_MODEL_FROM_DATABASE=PXI-4072
+
+pci:v00001093d000070D7*
+ ID_MODEL_FROM_DATABASE=PXI-6541
+
+pci:v00001093d000070D8*
+ ID_MODEL_FROM_DATABASE=PXI-6542
+
+pci:v00001093d000070D9*
+ ID_MODEL_FROM_DATABASE=PCI-6541
+
+pci:v00001093d000070DA*
+ ID_MODEL_FROM_DATABASE=PCI-6542
+
+pci:v00001093d000070DB*
+ ID_MODEL_FROM_DATABASE=PCI-8430/2 (RS-232) Interface
+
+pci:v00001093d000070DC*
+ ID_MODEL_FROM_DATABASE=PCI-8431/2 (RS-485) Interface
+
+pci:v00001093d000070DD*
+ ID_MODEL_FROM_DATABASE=PXI-8430/4 (RS-232) Interface
+
+pci:v00001093d000070DE*
+ ID_MODEL_FROM_DATABASE=PXI-8431/4 (RS-485) Interface
+
+pci:v00001093d000070DF*
+ ID_MODEL_FROM_DATABASE=PCI-8430/4 (RS-232) Interface
+
+pci:v00001093d000070E0*
+ ID_MODEL_FROM_DATABASE=PCI-8431/4 (RS-485) Interface
+
+pci:v00001093d000070E1*
+ ID_MODEL_FROM_DATABASE=PXI-2532
+
+pci:v00001093d000070E2*
+ ID_MODEL_FROM_DATABASE=PXI-8430/8 (RS-232) Interface
+
+pci:v00001093d000070E3*
+ ID_MODEL_FROM_DATABASE=PXI-8431/8 (RS-485) Interface
+
+pci:v00001093d000070E4*
+ ID_MODEL_FROM_DATABASE=PCI-8430/8 (RS-232) Interface
+
+pci:v00001093d000070E5*
+ ID_MODEL_FROM_DATABASE=PCI-8431/8 (RS-485) Interface
+
+pci:v00001093d000070E6*
+ ID_MODEL_FROM_DATABASE=PXI-8430/16 (RS-232) Interface
+
+pci:v00001093d000070E7*
+ ID_MODEL_FROM_DATABASE=PCI-8430/16 (RS-232) Interface
+
+pci:v00001093d000070E8*
+ ID_MODEL_FROM_DATABASE=PXI-8432/2 (Isolated RS-232) Interface
+
+pci:v00001093d000070E9*
+ ID_MODEL_FROM_DATABASE=PXI-8433/2 (Isolated RS-485) Interface
+
+pci:v00001093d000070EA*
+ ID_MODEL_FROM_DATABASE=PCI-8432/2 (Isolated RS-232) Interface
+
+pci:v00001093d000070EB*
+ ID_MODEL_FROM_DATABASE=PCI-8433/2 (Isolated RS-485) Interface
+
+pci:v00001093d000070EC*
+ ID_MODEL_FROM_DATABASE=PXI-8432/4 (Isolated RS-232) Interface
+
+pci:v00001093d000070ED*
+ ID_MODEL_FROM_DATABASE=PXI-8433/4 (Isolated RS-485) Interface
+
+pci:v00001093d000070EE*
+ ID_MODEL_FROM_DATABASE=PCI-8432/4 (Isolated RS-232) Interface
+
+pci:v00001093d000070EF*
+ ID_MODEL_FROM_DATABASE=PCI-8433/4 (Isolated RS-485) Interface
+
 pci:v00001093d000070F0*
  ID_MODEL_FROM_DATABASE=PXI-5922
 
@@ -17672,57 +18110,363 @@ pci:v00001093d000070F1*
 pci:v00001093d000070F2*
  ID_MODEL_FROM_DATABASE=PCI-6224
 
+pci:v00001093d000070F3*
+ ID_MODEL_FROM_DATABASE=PXI-6224
+
+pci:v00001093d000070F6*
+ ID_MODEL_FROM_DATABASE=cRIO-9101
+
+pci:v00001093d000070F7*
+ ID_MODEL_FROM_DATABASE=cRIO-9103
+
+pci:v00001093d000070F8*
+ ID_MODEL_FROM_DATABASE=cRIO-9104
+
+pci:v00001093d000070FF*
+ ID_MODEL_FROM_DATABASE=PXI-6723
+
+pci:v00001093d00007100*
+ ID_MODEL_FROM_DATABASE=PXI-6722
+
+pci:v00001093d00007104*
+ ID_MODEL_FROM_DATABASE=PCIx-1429
+
+pci:v00001093d00007105*
+ ID_MODEL_FROM_DATABASE=PCIe-1429
+
+pci:v00001093d0000710A*
+ ID_MODEL_FROM_DATABASE=PXI-4071
+
+pci:v00001093d0000710D*
+ ID_MODEL_FROM_DATABASE=PXI-6143
+
+pci:v00001093d0000710E*
+ ID_MODEL_FROM_DATABASE=PCIe-GPIB
+
+pci:v00001093d0000710F*
+ ID_MODEL_FROM_DATABASE=PXI-5422
+
+pci:v00001093d00007110*
+ ID_MODEL_FROM_DATABASE=PCI-5422
+
+pci:v00001093d00007111*
+ ID_MODEL_FROM_DATABASE=PXI-5441
+
+pci:v00001093d00007119*
+ ID_MODEL_FROM_DATABASE=PXI-6561
+
+pci:v00001093d0000711A*
+ ID_MODEL_FROM_DATABASE=PXI-6562
+
+pci:v00001093d0000711B*
+ ID_MODEL_FROM_DATABASE=PCI-6561
+
+pci:v00001093d0000711C*
+ ID_MODEL_FROM_DATABASE=PCI-6562
+
+pci:v00001093d00007120*
+ ID_MODEL_FROM_DATABASE=PCI-7390
+
 pci:v00001093d00007121*
  ID_MODEL_FROM_DATABASE=PXI-5122EX
 
 pci:v00001093d00007122*
  ID_MODEL_FROM_DATABASE=PCI-5122EX
 
+pci:v00001093d00007123*
+ ID_MODEL_FROM_DATABASE=PXIe-5653
+
+pci:v00001093d00007124*
+ ID_MODEL_FROM_DATABASE=PCI-6510
+
+pci:v00001093d00007125*
+ ID_MODEL_FROM_DATABASE=PCI-6516
+
+pci:v00001093d00007126*
+ ID_MODEL_FROM_DATABASE=PCI-6517
+
+pci:v00001093d00007127*
+ ID_MODEL_FROM_DATABASE=PCI-6518
+
+pci:v00001093d00007128*
+ ID_MODEL_FROM_DATABASE=PCI-6519
+
+pci:v00001093d00007137*
+ ID_MODEL_FROM_DATABASE=PXI-2575
+
+pci:v00001093d0000713C*
+ ID_MODEL_FROM_DATABASE=PXI-2585
+
+pci:v00001093d0000713D*
+ ID_MODEL_FROM_DATABASE=PXI-2586
+
+pci:v00001093d00007142*
+ ID_MODEL_FROM_DATABASE=PXI-4224
+
 pci:v00001093d00007144*
- ID_MODEL_FROM_DATABASE=PXI-5124 (12-bit 200 MS/s Digitizer)
+ ID_MODEL_FROM_DATABASE=PXI-5124
 
 pci:v00001093d00007145*
  ID_MODEL_FROM_DATABASE=PCI-5124
 
+pci:v00001093d00007146*
+ ID_MODEL_FROM_DATABASE=PCI-6132
+
+pci:v00001093d00007147*
+ ID_MODEL_FROM_DATABASE=PXI-6132
+
+pci:v00001093d00007148*
+ ID_MODEL_FROM_DATABASE=PCI-6122
+
+pci:v00001093d00007149*
+ ID_MODEL_FROM_DATABASE=PXI-6122
+
 pci:v00001093d0000714C*
  ID_MODEL_FROM_DATABASE=PXI-5114
 
 pci:v00001093d0000714D*
  ID_MODEL_FROM_DATABASE=PCI-5114
 
+pci:v00001093d00007150*
+ ID_MODEL_FROM_DATABASE=PXI-2564
+
 pci:v00001093d00007152*
  ID_MODEL_FROM_DATABASE=PCI-5640R
 
+pci:v00001093d00007156*
+ ID_MODEL_FROM_DATABASE=PXI-1044 Trigger Routing Module
+
+pci:v00001093d0000715D*
+ ID_MODEL_FROM_DATABASE=PCI-1426
+
+pci:v00001093d00007167*
+ ID_MODEL_FROM_DATABASE=PXI-5412
+
+pci:v00001093d00007168*
+ ID_MODEL_FROM_DATABASE=PCI-5412
+
+pci:v00001093d0000716B*
+ ID_MODEL_FROM_DATABASE=PCI-6230
+
 pci:v00001093d0000716C*
  ID_MODEL_FROM_DATABASE=PCI-6225
 
+pci:v00001093d0000716D*
+ ID_MODEL_FROM_DATABASE=PXI-6225
+
+pci:v00001093d0000716F*
+ ID_MODEL_FROM_DATABASE=PCI-4461
+
+pci:v00001093d00007170*
+ ID_MODEL_FROM_DATABASE=PCI-4462
+
+pci:v00001093d00007171*
+ ID_MODEL_FROM_DATABASE=PCI-6010
+
+pci:v00001093d00007174*
+ ID_MODEL_FROM_DATABASE=PXI-8360
+
+pci:v00001093d00007177*
+ ID_MODEL_FROM_DATABASE=PXI-6230
+
 pci:v00001093d0000717D*
- ID_MODEL_FROM_DATABASE=PCIE-6251
+ ID_MODEL_FROM_DATABASE=PCIe-6251
 
 pci:v00001093d0000717F*
  ID_MODEL_FROM_DATABASE=PCIe-6259
 
+pci:v00001093d00007187*
+ ID_MODEL_FROM_DATABASE=PCI-1410
+
+pci:v00001093d0000718B*
+ ID_MODEL_FROM_DATABASE=PCI-6521
+
+pci:v00001093d0000718C*
+ ID_MODEL_FROM_DATABASE=PXI-6521
+
+pci:v00001093d00007191*
+ ID_MODEL_FROM_DATABASE=PCI-6154
+
 pci:v00001093d00007193*
  ID_MODEL_FROM_DATABASE=PXI-7813R
 
 pci:v00001093d00007194*
  ID_MODEL_FROM_DATABASE=PCI-7813R
 
+pci:v00001093d00007195*
+ ID_MODEL_FROM_DATABASE=PCI-8254R
+
+pci:v00001093d00007197*
+ ID_MODEL_FROM_DATABASE=PXI-5402
+
+pci:v00001093d00007198*
+ ID_MODEL_FROM_DATABASE=PCI-5402
+
+pci:v00001093d0000719F*
+ ID_MODEL_FROM_DATABASE=PCIe-6535
+
+pci:v00001093d000071A0*
+ ID_MODEL_FROM_DATABASE=PCIe-6536
+
+pci:v00001093d000071A3*
+ ID_MODEL_FROM_DATABASE=PXI-5650
+
+pci:v00001093d000071A4*
+ ID_MODEL_FROM_DATABASE=PXI-5652
+
+pci:v00001093d000071A5*
+ ID_MODEL_FROM_DATABASE=PXI-2594
+
+pci:v00001093d000071A7*
+ ID_MODEL_FROM_DATABASE=PXI-2595
+
+pci:v00001093d000071A9*
+ ID_MODEL_FROM_DATABASE=PXI-2596
+
+pci:v00001093d000071AA*
+ ID_MODEL_FROM_DATABASE=PXI-2597
+
+pci:v00001093d000071AB*
+ ID_MODEL_FROM_DATABASE=PXI-2598
+
+pci:v00001093d000071AC*
+ ID_MODEL_FROM_DATABASE=PXI-2599
+
+pci:v00001093d000071AD*
+ ID_MODEL_FROM_DATABASE=PCI-GPIB+
+
+pci:v00001093d000071AE*
+ ID_MODEL_FROM_DATABASE=PCIe-1430
+
+pci:v00001093d000071B7*
+ ID_MODEL_FROM_DATABASE=PXI-1056 Trigger Routing Module
+
+pci:v00001093d000071B8*
+ ID_MODEL_FROM_DATABASE=PXI-1045 Trigger Routing Module
+
+pci:v00001093d000071B9*
+ ID_MODEL_FROM_DATABASE=PXI-1044 Trigger Routing Module
+
+pci:v00001093d000071BB*
+ ID_MODEL_FROM_DATABASE=PXI-2584
+
 pci:v00001093d000071BC*
- ID_MODEL_FROM_DATABASE=PCI-6221 (37pin)
+ ID_MODEL_FROM_DATABASE=PCI-6221 (37-pin)
 
-pci:v00001093d000071D0*
- ID_MODEL_FROM_DATABASE=PXI-6143
+pci:v00001093d000071BF*
+ ID_MODEL_FROM_DATABASE=PCIe-1427
+
+pci:v00001093d000071C5*
+ ID_MODEL_FROM_DATABASE=PCI-6520
+
+pci:v00001093d000071C6*
+ ID_MODEL_FROM_DATABASE=PXI-2576
+
+pci:v00001093d000071C7*
+ ID_MODEL_FROM_DATABASE=cRIO-9072
 
 pci:v00001093d000071DC*
  ID_MODEL_FROM_DATABASE=PCI-1588
 
+pci:v00001093d000071E0*
+ ID_MODEL_FROM_DATABASE=PCI-6255
+
+pci:v00001093d000071E1*
+ ID_MODEL_FROM_DATABASE=PXI-6255
+
+pci:v00001093d000071E2*
+ ID_MODEL_FROM_DATABASE=PXI-5406
+
+pci:v00001093d000071E3*
+ ID_MODEL_FROM_DATABASE=PCI-5406
+
+pci:v00001093d000071FC*
+ ID_MODEL_FROM_DATABASE=PXI-4022
+
+pci:v00001093d00007209*
+ ID_MODEL_FROM_DATABASE=PCI-6233
+
+pci:v00001093d0000720A*
+ ID_MODEL_FROM_DATABASE=PXI-6233
+
+pci:v00001093d0000720B*
+ ID_MODEL_FROM_DATABASE=PCI-6238
+
+pci:v00001093d0000720C*
+ ID_MODEL_FROM_DATABASE=PXI-6238
+
 pci:v00001093d00007260*
  ID_MODEL_FROM_DATABASE=PXI-5142
 
 pci:v00001093d00007261*
  ID_MODEL_FROM_DATABASE=PCI-5142
 
+pci:v00001093d0000726D*
+ ID_MODEL_FROM_DATABASE=PXI-5651
+
+pci:v00001093d00007273*
+ ID_MODEL_FROM_DATABASE=PXI-4461
+
+pci:v00001093d00007274*
+ ID_MODEL_FROM_DATABASE=PXI-4462
+
+pci:v00001093d00007279*
+ ID_MODEL_FROM_DATABASE=PCI-6232
+
+pci:v00001093d0000727A*
+ ID_MODEL_FROM_DATABASE=PXI-6232
+
+pci:v00001093d0000727B*
+ ID_MODEL_FROM_DATABASE=PCI-6239
+
+pci:v00001093d0000727C*
+ ID_MODEL_FROM_DATABASE=PXI-6239
+
+pci:v00001093d0000727E*
+ ID_MODEL_FROM_DATABASE=SMBus Controller
+
+pci:v00001093d0000727Esv00001093sd000075AC*
+ ID_MODEL_FROM_DATABASE=SMBus Controller (PXIe-8388)
+
+pci:v00001093d0000727Esv00001093sd000075AD*
+ ID_MODEL_FROM_DATABASE=SMBus Controller (PXIe-8389)
+
+pci:v00001093d0000727Esv00001093sd00007650*
+ ID_MODEL_FROM_DATABASE=SMBus Controller (PXIe-8381)
+
+pci:v00001093d0000727Esv00001093sd00008360*
+ ID_MODEL_FROM_DATABASE=SMBus Controller (PXIe-8360)
+
+pci:v00001093d0000727Esv00001093sd00008370*
+ ID_MODEL_FROM_DATABASE=SMBus Controller (PXIe-8370)
+
+pci:v00001093d0000727Esv00001093sd00008375*
+ ID_MODEL_FROM_DATABASE=SMBus Controller (PXIe-8375)
+
+pci:v00001093d00007281*
+ ID_MODEL_FROM_DATABASE=PCI-6236
+
+pci:v00001093d00007282*
+ ID_MODEL_FROM_DATABASE=PXI-6236
+
+pci:v00001093d00007283*
+ ID_MODEL_FROM_DATABASE=PXI-2554
+
+pci:v00001093d00007288*
+ ID_MODEL_FROM_DATABASE=PXIe-5611
+
+pci:v00001093d00007293*
+ ID_MODEL_FROM_DATABASE=PCIe-8255R
+
+pci:v00001093d0000729D*
+ ID_MODEL_FROM_DATABASE=cRIO-9074
+
+pci:v00001093d000072A4*
+ ID_MODEL_FROM_DATABASE=PCIe-4065
+
+pci:v00001093d000072A7*
+ ID_MODEL_FROM_DATABASE=PCIe-6537
+
 pci:v00001093d000072A8*
  ID_MODEL_FROM_DATABASE=PXI-5152
 
@@ -17738,21 +18482,117 @@ pci:v00001093d000072AB*
 pci:v00001093d000072B8*
  ID_MODEL_FROM_DATABASE=PXI-6682
 
+pci:v00001093d000072D0*
+ ID_MODEL_FROM_DATABASE=PXI-2545
+
+pci:v00001093d000072D1*
+ ID_MODEL_FROM_DATABASE=PXI-2546
+
+pci:v00001093d000072D2*
+ ID_MODEL_FROM_DATABASE=PXI-2547
+
+pci:v00001093d000072D3*
+ ID_MODEL_FROM_DATABASE=PXI-2548
+
+pci:v00001093d000072D4*
+ ID_MODEL_FROM_DATABASE=PXI-2549
+
+pci:v00001093d000072D5*
+ ID_MODEL_FROM_DATABASE=PXI-2555
+
+pci:v00001093d000072D6*
+ ID_MODEL_FROM_DATABASE=PXI-2556
+
+pci:v00001093d000072D7*
+ ID_MODEL_FROM_DATABASE=PXI-2557
+
+pci:v00001093d000072D8*
+ ID_MODEL_FROM_DATABASE=PXI-2558
+
+pci:v00001093d000072D9*
+ ID_MODEL_FROM_DATABASE=PXI-2559
+
+pci:v00001093d000072E8*
+ ID_MODEL_FROM_DATABASE=PXIe-6251
+
+pci:v00001093d000072E9*
+ ID_MODEL_FROM_DATABASE=PXIe-6259
+
+pci:v00001093d000072EF*
+ ID_MODEL_FROM_DATABASE=PXI-4498
+
+pci:v00001093d000072F0*
+ ID_MODEL_FROM_DATABASE=PXI-4496
+
+pci:v00001093d000072FB*
+ ID_MODEL_FROM_DATABASE=PXIe-6672
+
+pci:v00001093d0000730E*
+ ID_MODEL_FROM_DATABASE=PXI-4130
+
 pci:v00001093d0000730F*
  ID_MODEL_FROM_DATABASE=PXI-5922EX
 
 pci:v00001093d00007310*
  ID_MODEL_FROM_DATABASE=PCI-5922EX
 
+pci:v00001093d0000731C*
+ ID_MODEL_FROM_DATABASE=PXI-2535
+
+pci:v00001093d0000731D*
+ ID_MODEL_FROM_DATABASE=PXI-2536
+
+pci:v00001093d00007322*
+ ID_MODEL_FROM_DATABASE=PXIe-6124
+
+pci:v00001093d00007327*
+ ID_MODEL_FROM_DATABASE=PXI-6529
+
+pci:v00001093d00007331*
+ ID_MODEL_FROM_DATABASE=PXIe-5602
+
+pci:v00001093d00007332*
+ ID_MODEL_FROM_DATABASE=PXIe-5601
+
 pci:v00001093d00007333*
  ID_MODEL_FROM_DATABASE=PXI-5900
 
+pci:v00001093d00007335*
+ ID_MODEL_FROM_DATABASE=PXI-2533
+
+pci:v00001093d00007336*
+ ID_MODEL_FROM_DATABASE=PXI-2534
+
+pci:v00001093d00007342*
+ ID_MODEL_FROM_DATABASE=PXI-4461
+
 pci:v00001093d00007349*
  ID_MODEL_FROM_DATABASE=PXI-5154
 
 pci:v00001093d0000734A*
  ID_MODEL_FROM_DATABASE=PCI-5154
 
+pci:v00001093d00007357*
+ ID_MODEL_FROM_DATABASE=PXI-4065
+
+pci:v00001093d00007359*
+ ID_MODEL_FROM_DATABASE=PXI-4495
+
+pci:v00001093d00007370*
+ ID_MODEL_FROM_DATABASE=PXI-4461
+
+pci:v00001093d00007373*
+ ID_MODEL_FROM_DATABASE=sbRIO-9601
+
+pci:v00001093d00007374*
+ ID_MODEL_FROM_DATABASE=IOtech-9601
+
+pci:v00001093d00007375*
+ ID_MODEL_FROM_DATABASE=sbRIO-9602
+
+pci:v00001093d00007378*
+ ID_MODEL_FROM_DATABASE=sbRIO-9641
+
 pci:v00001093d0000737D*
  ID_MODEL_FROM_DATABASE=PXI-5124EX
 
@@ -17783,9 +18623,126 @@ pci:v00001093d00007393*
 pci:v00001093d00007394*
  ID_MODEL_FROM_DATABASE=PCIe-7842R
 
+pci:v00001093d00007397*
+ ID_MODEL_FROM_DATABASE=sbRIO-9611
+
+pci:v00001093d00007398*
+ ID_MODEL_FROM_DATABASE=sbRIO-9612
+
+pci:v00001093d00007399*
+ ID_MODEL_FROM_DATABASE=sbRIO-9631
+
+pci:v00001093d0000739A*
+ ID_MODEL_FROM_DATABASE=sbRIO-9632
+
+pci:v00001093d0000739B*
+ ID_MODEL_FROM_DATABASE=sbRIO-9642
+
+pci:v00001093d000073A1*
+ ID_MODEL_FROM_DATABASE=PXIe-4498
+
+pci:v00001093d000073A2*
+ ID_MODEL_FROM_DATABASE=PXIe-4496
+
 pci:v00001093d000073A5*
  ID_MODEL_FROM_DATABASE=PXIe-5641R
 
+pci:v00001093d000073A7*
+ ID_MODEL_FROM_DATABASE=PXI-8250 Chassis Monitor Module
+
+pci:v00001093d000073A8*
+ ID_MODEL_FROM_DATABASE=PXI-8511 CAN/LS
+
+pci:v00001093d000073A9*
+ ID_MODEL_FROM_DATABASE=PXI-8511 CAN/LS
+
+pci:v00001093d000073AA*
+ ID_MODEL_FROM_DATABASE=PXI-8512 CAN/HS
+
+pci:v00001093d000073AB*
+ ID_MODEL_FROM_DATABASE=PXI-8512 CAN/HS
+
+pci:v00001093d000073AC*
+ ID_MODEL_FROM_DATABASE=PXI-8513 CAN/XS
+
+pci:v00001093d000073AD*
+ ID_MODEL_FROM_DATABASE=PXI-8513 CAN/XS
+
+pci:v00001093d000073AF*
+ ID_MODEL_FROM_DATABASE=PXI-8516 LIN
+
+pci:v00001093d000073B1*
+ ID_MODEL_FROM_DATABASE=PXI-8517 FlexRay
+
+pci:v00001093d000073B2*
+ ID_MODEL_FROM_DATABASE=PXI-8531 CANopen
+
+pci:v00001093d000073B3*
+ ID_MODEL_FROM_DATABASE=PXI-8531 CANopen
+
+pci:v00001093d000073B4*
+ ID_MODEL_FROM_DATABASE=PXI-8532 DeviceNet
+
+pci:v00001093d000073B5*
+ ID_MODEL_FROM_DATABASE=PXI-8532 DeviceNet
+
+pci:v00001093d000073B6*
+ ID_MODEL_FROM_DATABASE=PCI-8511 CAN/LS
+
+pci:v00001093d000073B7*
+ ID_MODEL_FROM_DATABASE=PCI-8511 CAN/LS
+
+pci:v00001093d000073B8*
+ ID_MODEL_FROM_DATABASE=PCI-8512 CAN/HS
+
+pci:v00001093d000073B9*
+ ID_MODEL_FROM_DATABASE=PCI-8512 CAN/HS
+
+pci:v00001093d000073BA*
+ ID_MODEL_FROM_DATABASE=PCI-8513 CAN/XS
+
+pci:v00001093d000073BB*
+ ID_MODEL_FROM_DATABASE=PCI-8513 CAN/XS
+
+pci:v00001093d000073BD*
+ ID_MODEL_FROM_DATABASE=PCI-8516 LIN
+
+pci:v00001093d000073BF*
+ ID_MODEL_FROM_DATABASE=PCI-8517 FlexRay
+
+pci:v00001093d000073C0*
+ ID_MODEL_FROM_DATABASE=PCI-8531 CANopen
+
+pci:v00001093d000073C1*
+ ID_MODEL_FROM_DATABASE=PCI-8531 CANopen
+
+pci:v00001093d000073C2*
+ ID_MODEL_FROM_DATABASE=PCI-8532 DeviceNet
+
+pci:v00001093d000073C3*
+ ID_MODEL_FROM_DATABASE=PCI-8532 DeviceNet
+
+pci:v00001093d000073C5*
+ ID_MODEL_FROM_DATABASE=PXIe-2527
+
+pci:v00001093d000073C6*
+ ID_MODEL_FROM_DATABASE=PXIe-2529
+
+pci:v00001093d000073C8*
+ ID_MODEL_FROM_DATABASE=PXIe-2530
+
+pci:v00001093d000073C9*
+ ID_MODEL_FROM_DATABASE=PXIe-2532
+
+pci:v00001093d000073CA*
+ ID_MODEL_FROM_DATABASE=PXIe-2569
+
+pci:v00001093d000073CB*
+ ID_MODEL_FROM_DATABASE=PXIe-2575
+
+pci:v00001093d000073CC*
+ ID_MODEL_FROM_DATABASE=PXIe-2593
+
 pci:v00001093d000073D5*
  ID_MODEL_FROM_DATABASE=PXI-7951R
 
@@ -17801,15 +18758,87 @@ pci:v00001093d000073E1*
 pci:v00001093d000073EC*
  ID_MODEL_FROM_DATABASE=PXI-7954R
 
+pci:v00001093d000073ED*
+ ID_MODEL_FROM_DATABASE=cRIO-9073
+
 pci:v00001093d000073F0*
  ID_MODEL_FROM_DATABASE=PXI-5153
 
 pci:v00001093d000073F1*
  ID_MODEL_FROM_DATABASE=PCI-5153
 
+pci:v00001093d000073F4*
+ ID_MODEL_FROM_DATABASE=PXI-2515
+
+pci:v00001093d000073F6*
+ ID_MODEL_FROM_DATABASE=cRIO-9111
+
+pci:v00001093d000073F7*
+ ID_MODEL_FROM_DATABASE=cRIO-9112
+
+pci:v00001093d000073F8*
+ ID_MODEL_FROM_DATABASE=cRIO-9113
+
+pci:v00001093d000073F9*
+ ID_MODEL_FROM_DATABASE=cRIO-9114
+
+pci:v00001093d000073FA*
+ ID_MODEL_FROM_DATABASE=cRIO-9116
+
+pci:v00001093d000073FB*
+ ID_MODEL_FROM_DATABASE=cRIO-9118
+
+pci:v00001093d00007404*
+ ID_MODEL_FROM_DATABASE=PXI-4132
+
 pci:v00001093d00007405*
  ID_MODEL_FROM_DATABASE=PXIe-6674T
 
+pci:v00001093d00007406*
+ ID_MODEL_FROM_DATABASE=PXIe-6674
+
+pci:v00001093d0000740E*
+ ID_MODEL_FROM_DATABASE=PCIe-8430/16 (RS-232) Interface
+
+pci:v00001093d0000740F*
+ ID_MODEL_FROM_DATABASE=PCIe-8430/8 (RS-232) Interface
+
+pci:v00001093d00007410*
+ ID_MODEL_FROM_DATABASE=PCIe-8431/16 (RS-485) Interface
+
+pci:v00001093d00007411*
+ ID_MODEL_FROM_DATABASE=PCIe-8431/8 (RS-485) Interface
+
+pci:v00001093d00007414*
+ ID_MODEL_FROM_DATABASE=PCIe-GPIB+
+
+pci:v00001093d0000741C*
+ ID_MODEL_FROM_DATABASE=PXI-5691
+
+pci:v00001093d0000741D*
+ ID_MODEL_FROM_DATABASE=PXI-5695
+
+pci:v00001093d0000743C*
+ ID_MODEL_FROM_DATABASE=CSC-3059
+
+pci:v00001093d00007448*
+ ID_MODEL_FROM_DATABASE=PXI-2510
+
+pci:v00001093d00007454*
+ ID_MODEL_FROM_DATABASE=PXI-2512
+
+pci:v00001093d00007455*
+ ID_MODEL_FROM_DATABASE=PXI-2514
+
+pci:v00001093d00007456*
+ ID_MODEL_FROM_DATABASE=PXIe-2512
+
+pci:v00001093d00007457*
+ ID_MODEL_FROM_DATABASE=PXIe-2514
+
+pci:v00001093d0000745A*
+ ID_MODEL_FROM_DATABASE=PXI-6682H
+
 pci:v00001093d0000745E*
  ID_MODEL_FROM_DATABASE=PXI-5153EX
 
@@ -17822,86 +18851,740 @@ pci:v00001093d00007460*
 pci:v00001093d00007461*
  ID_MODEL_FROM_DATABASE=PCI-5154EX
 
+pci:v00001093d0000746D*
+ ID_MODEL_FROM_DATABASE=PXIe-5650
+
+pci:v00001093d0000746E*
+ ID_MODEL_FROM_DATABASE=PXIe-5651
+
+pci:v00001093d0000746F*
+ ID_MODEL_FROM_DATABASE=PXIe-5652
+
+pci:v00001093d00007472*
+ ID_MODEL_FROM_DATABASE=PXI-2800
+
+pci:v00001093d00007495*
+ ID_MODEL_FROM_DATABASE=PXIe-5603
+
+pci:v00001093d00007497*
+ ID_MODEL_FROM_DATABASE=PXIe-5605
+
+pci:v00001093d000074AE*
+ ID_MODEL_FROM_DATABASE=PXIe-2515
+
+pci:v00001093d000074B4*
+ ID_MODEL_FROM_DATABASE=PXI-2531
+
+pci:v00001093d000074B5*
+ ID_MODEL_FROM_DATABASE=PXIe-2531
+
+pci:v00001093d000074C1*
+ ID_MODEL_FROM_DATABASE=PXIe-8430/16 (RS-232) Interface
+
+pci:v00001093d000074C2*
+ ID_MODEL_FROM_DATABASE=PXIe-8430/8 (RS-232) Interface
+
+pci:v00001093d000074C3*
+ ID_MODEL_FROM_DATABASE=PXIe-8431/16 (RS-485) Interface
+
+pci:v00001093d000074C4*
+ ID_MODEL_FROM_DATABASE=PXIe-8431/8 (RS-485) Interface
+
+pci:v00001093d000074D5*
+ ID_MODEL_FROM_DATABASE=PXIe-5630
+
+pci:v00001093d000074D9*
+ ID_MODEL_FROM_DATABASE=PCIe-8432/2 (Isolated RS-232) Interface
+
+pci:v00001093d000074DA*
+ ID_MODEL_FROM_DATABASE=PCIe-8433/2 (Isolated RS-485) Interface
+
+pci:v00001093d000074DB*
+ ID_MODEL_FROM_DATABASE=PCIe-8432/4 (Isolated RS-232) Interface
+
+pci:v00001093d000074DC*
+ ID_MODEL_FROM_DATABASE=PCIe-8433/4 (Isolated RS-485) Interface
+
+pci:v00001093d000074E8*
+ ID_MODEL_FROM_DATABASE=NI 9148
+
+pci:v00001093d00007515*
+ ID_MODEL_FROM_DATABASE=PCIe-8430/2 (RS-232) Interface
+
+pci:v00001093d00007516*
+ ID_MODEL_FROM_DATABASE=PCIe-8430/4 (RS-232) Interface
+
+pci:v00001093d00007517*
+ ID_MODEL_FROM_DATABASE=PCIe-8431/2 (RS-485) Interface
+
+pci:v00001093d00007518*
+ ID_MODEL_FROM_DATABASE=PCIe-8431/4 (RS-485) Interface
+
+pci:v00001093d0000751B*
+ ID_MODEL_FROM_DATABASE=cRIO-9081
+
+pci:v00001093d0000751C*
+ ID_MODEL_FROM_DATABASE=cRIO-9082
+
+pci:v00001093d00007528*
+ ID_MODEL_FROM_DATABASE=PXIe-4497
+
+pci:v00001093d00007529*
+ ID_MODEL_FROM_DATABASE=PXIe-4499
+
+pci:v00001093d0000752A*
+ ID_MODEL_FROM_DATABASE=PXIe-4492
+
 pci:v00001093d00007539*
  ID_MODEL_FROM_DATABASE=NI 9157
 
 pci:v00001093d0000753A*
  ID_MODEL_FROM_DATABASE=NI 9159
 
+pci:v00001093d00007598*
+ ID_MODEL_FROM_DATABASE=PXI-2571
+
+pci:v00001093d000075A4*
+ ID_MODEL_FROM_DATABASE=PXI-4131A
+
+pci:v00001093d000075B1*
+ ID_MODEL_FROM_DATABASE=PCIe-7854R
+
+pci:v00001093d000075BA*
+ ID_MODEL_FROM_DATABASE=PXI-2543
+
+pci:v00001093d000075BB*
+ ID_MODEL_FROM_DATABASE=PXIe-2543
+
 pci:v00001093d000075E5*
  ID_MODEL_FROM_DATABASE=PXI-6683
 
 pci:v00001093d000075E6*
  ID_MODEL_FROM_DATABASE=PXI-6683H
 
+pci:v00001093d000075EF*
+ ID_MODEL_FROM_DATABASE=PXIe-5632
+
+pci:v00001093d0000761F*
+ ID_MODEL_FROM_DATABASE=PXI-2540
+
+pci:v00001093d00007620*
+ ID_MODEL_FROM_DATABASE=PXIe-2540
+
+pci:v00001093d00007621*
+ ID_MODEL_FROM_DATABASE=PXI-2541
+
+pci:v00001093d00007622*
+ ID_MODEL_FROM_DATABASE=PXIe-2541
+
 pci:v00001093d00007626*
  ID_MODEL_FROM_DATABASE=NI 9154
 
 pci:v00001093d00007627*
  ID_MODEL_FROM_DATABASE=NI 9155
 
+pci:v00001093d00007638*
+ ID_MODEL_FROM_DATABASE=PXI-2720
+
+pci:v00001093d00007639*
+ ID_MODEL_FROM_DATABASE=PXI-2722
+
+pci:v00001093d0000763A*
+ ID_MODEL_FROM_DATABASE=PXIe-2725
+
+pci:v00001093d0000763B*
+ ID_MODEL_FROM_DATABASE=PXIe-2727
+
+pci:v00001093d0000763C*
+ ID_MODEL_FROM_DATABASE=PXI-4465
+
+pci:v00001093d0000764B*
+ ID_MODEL_FROM_DATABASE=PXIe-2790
+
+pci:v00001093d0000764C*
+ ID_MODEL_FROM_DATABASE=PXI-2520
+
+pci:v00001093d0000764D*
+ ID_MODEL_FROM_DATABASE=PXI-2521
+
+pci:v00001093d0000764E*
+ ID_MODEL_FROM_DATABASE=PXI-2522
+
+pci:v00001093d0000764F*
+ ID_MODEL_FROM_DATABASE=PXI-2523
+
+pci:v00001093d00007654*
+ ID_MODEL_FROM_DATABASE=PXI-2796
+
+pci:v00001093d00007655*
+ ID_MODEL_FROM_DATABASE=PXI-2797
+
+pci:v00001093d00007656*
+ ID_MODEL_FROM_DATABASE=PXI-2798
+
+pci:v00001093d00007657*
+ ID_MODEL_FROM_DATABASE=PXI-2799
+
+pci:v00001093d0000765D*
+ ID_MODEL_FROM_DATABASE=PXI-2542
+
+pci:v00001093d0000765E*
+ ID_MODEL_FROM_DATABASE=PXIe-2542
+
+pci:v00001093d0000765F*
+ ID_MODEL_FROM_DATABASE=PXI-2544
+
+pci:v00001093d00007660*
+ ID_MODEL_FROM_DATABASE=PXIe-2544
+
+pci:v00001093d0000766D*
+ ID_MODEL_FROM_DATABASE=PCIe-6535B
+
+pci:v00001093d0000766E*
+ ID_MODEL_FROM_DATABASE=PCIe-6536B
+
+pci:v00001093d0000766F*
+ ID_MODEL_FROM_DATABASE=PCIe-6537B
+
+pci:v00001093d000076A3*
+ ID_MODEL_FROM_DATABASE=PXIe-6535B
+
+pci:v00001093d000076A4*
+ ID_MODEL_FROM_DATABASE=PXIe-6536B
+
+pci:v00001093d000076A5*
+ ID_MODEL_FROM_DATABASE=PXIe-6537B
+
+pci:v00001093d00009020*
+ ID_MODEL_FROM_DATABASE=PXI-2501
+
+pci:v00001093d00009030*
+ ID_MODEL_FROM_DATABASE=PXI-2503
+
+pci:v00001093d00009040*
+ ID_MODEL_FROM_DATABASE=PXI-2527
+
+pci:v00001093d00009050*
+ ID_MODEL_FROM_DATABASE=PXI-2565
+
+pci:v00001093d00009060*
+ ID_MODEL_FROM_DATABASE=PXI-2590
+
+pci:v00001093d00009070*
+ ID_MODEL_FROM_DATABASE=PXI-2591
+
+pci:v00001093d00009080*
+ ID_MODEL_FROM_DATABASE=PXI-2580
+
+pci:v00001093d00009090*
+ ID_MODEL_FROM_DATABASE=PCI-4021
+
+pci:v00001093d000090A0*
+ ID_MODEL_FROM_DATABASE=PXI-4021
+
 pci:v00001093d0000B001*
- ID_MODEL_FROM_DATABASE=IMAQ-PCI-1408
+ ID_MODEL_FROM_DATABASE=PCI-1408
 
 pci:v00001093d0000B011*
- ID_MODEL_FROM_DATABASE=IMAQ-PXI-1408
+ ID_MODEL_FROM_DATABASE=PXI-1408
 
 pci:v00001093d0000B021*
- ID_MODEL_FROM_DATABASE=IMAQ-PCI-1424
+ ID_MODEL_FROM_DATABASE=PCI-1424
+
+pci:v00001093d0000B022*
+ ID_MODEL_FROM_DATABASE=PXI-1424
 
 pci:v00001093d0000B031*
- ID_MODEL_FROM_DATABASE=IMAQ-PCI-1413
+ ID_MODEL_FROM_DATABASE=PCI-1413
 
 pci:v00001093d0000B041*
- ID_MODEL_FROM_DATABASE=IMAQ-PCI-1407
+ ID_MODEL_FROM_DATABASE=PCI-1407
 
 pci:v00001093d0000B051*
- ID_MODEL_FROM_DATABASE=IMAQ-PXI-1407
+ ID_MODEL_FROM_DATABASE=PXI-1407
 
 pci:v00001093d0000B061*
- ID_MODEL_FROM_DATABASE=IMAQ-PCI-1411
+ ID_MODEL_FROM_DATABASE=PCI-1411
 
 pci:v00001093d0000B071*
- ID_MODEL_FROM_DATABASE=IMAQ-PCI-1422
+ ID_MODEL_FROM_DATABASE=PCI-1422
 
 pci:v00001093d0000B081*
- ID_MODEL_FROM_DATABASE=IMAQ-PXI-1422
+ ID_MODEL_FROM_DATABASE=PXI-1422
 
 pci:v00001093d0000B091*
- ID_MODEL_FROM_DATABASE=IMAQ-PXI-1411
+ ID_MODEL_FROM_DATABASE=PXI-1411
+
+pci:v00001093d0000B0B1*
+ ID_MODEL_FROM_DATABASE=PCI-1409
+
+pci:v00001093d0000B0C1*
+ ID_MODEL_FROM_DATABASE=PXI-1409
+
+pci:v00001093d0000B0E1*
+ ID_MODEL_FROM_DATABASE=PCI-1428
 
 pci:v00001093d0000C4C4*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device
 
+pci:v00001093d0000C4C4sv00001093sd0000728A*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5421)
+
+pci:v00001093d0000C4C4sv00001093sd0000728B*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5442)
+
+pci:v00001093d0000C4C4sv00001093sd0000728D*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5451)
+
+pci:v00001093d0000C4C4sv00001093sd000072A2*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5122)
+
+pci:v00001093d0000C4C4sv00001093sd000072DA*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5422)
+
+pci:v00001093d0000C4C4sv00001093sd000072F7*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6535)
+
+pci:v00001093d0000C4C4sv00001093sd000072F8*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6536)
+
+pci:v00001093d0000C4C4sv00001093sd000072F9*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6537)
+
+pci:v00001093d0000C4C4sv00001093sd00007326*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6509)
+
+pci:v00001093d0000C4C4sv00001093sd0000736C*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4140)
+
+pci:v00001093d0000C4C4sv00001093sd0000738B*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5622)
+
+pci:v00001093d0000C4C4sv00001093sd000073C4*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5450)
+
+pci:v00001093d0000C4C4sv00001093sd000073C7*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6545)
+
+pci:v00001093d0000C4C4sv00001093sd000073D4*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6544)
+
+pci:v00001093d0000C4C4sv00001093sd00007425*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6320)
+
+pci:v00001093d0000C4C4sv00001093sd00007427*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6321)
+
+pci:v00001093d0000C4C4sv00001093sd00007428*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6323)
+
+pci:v00001093d0000C4C4sv00001093sd00007429*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6323)
+
+pci:v00001093d0000C4C4sv00001093sd0000742A*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6341)
+
+pci:v00001093d0000C4C4sv00001093sd0000742B*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6341)
+
+pci:v00001093d0000C4C4sv00001093sd0000742C*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6343)
+
+pci:v00001093d0000C4C4sv00001093sd0000742D*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6343)
+
+pci:v00001093d0000C4C4sv00001093sd0000742F*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6351)
+
+pci:v00001093d0000C4C4sv00001093sd00007431*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6353)
+
+pci:v00001093d0000C4C4sv00001093sd00007432*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6361)
+
+pci:v00001093d0000C4C4sv00001093sd00007433*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6361)
+
+pci:v00001093d0000C4C4sv00001093sd00007434*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6363)
+
+pci:v00001093d0000C4C4sv00001093sd00007435*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6363)
+
+pci:v00001093d0000C4C4sv00001093sd00007436*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6356)
+
+pci:v00001093d0000C4C4sv00001093sd00007437*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6358)
+
+pci:v00001093d0000C4C4sv00001093sd00007438*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6366)
+
+pci:v00001093d0000C4C4sv00001093sd00007439*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6368)
+
+pci:v00001093d0000C4C4sv00001093sd00007468*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5185)
+
+pci:v00001093d0000C4C4sv00001093sd00007469*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5186)
+
+pci:v00001093d0000C4C4sv00001093sd00007492*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4300)
+
+pci:v00001093d0000C4C4sv00001093sd00007498*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6548)
+
+pci:v00001093d0000C4C4sv00001093sd00007499*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6547)
+
+pci:v00001093d0000C4C4sv00001093sd000074A8*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4330)
+
+pci:v00001093d0000C4C4sv00001093sd000074A9*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4331)
+
+pci:v00001093d0000C4C4sv00001093sd000074B1*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4154)
+
 pci:v00001093d0000C4C4sv00001093sd000074B2*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4353)
 
+pci:v00001093d0000C4C4sv00001093sd000074B6*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-1433)
+
+pci:v00001093d0000C4C4sv00001093sd000074CD*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5643R)
+
 pci:v00001093d0000C4C4sv00001093sd000074D0*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7961R)
 
+pci:v00001093d0000C4C4sv00001093sd000074DD*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6376)
+
+pci:v00001093d0000C4C4sv00001093sd000074DE*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6378)
+
 pci:v00001093d0000C4C4sv00001093sd000074E2*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7962R)
 
 pci:v00001093d0000C4C4sv00001093sd000074E3*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7965R)
 
+pci:v00001093d0000C4C4sv00001093sd000074E5*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4844)
+
+pci:v00001093d0000C4C4sv00001093sd000074F3*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-5140)
+
+pci:v00001093d0000C4C4sv00001093sd0000753C*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-1435)
+
+pci:v00001093d0000C4C4sv00001093sd00007548*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5622 (25MHz DDC))
+
+pci:v00001093d0000C4C4sv00001093sd0000754D*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-5155)
+
+pci:v00001093d0000C4C4sv00001093sd00007551*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6556)
+
 pci:v00001093d0000C4C4sv00001093sd00007553*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-1473R)
 
+pci:v00001093d0000C4C4sv00001093sd00007570*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-1474R)
+
+pci:v00001093d0000C4C4sv00001093sd00007571*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-1475R)
+
+pci:v00001093d0000C4C4sv00001093sd00007572*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-1476R)
+
+pci:v00001093d0000C4C4sv00001093sd000075A2*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5693)
+
+pci:v00001093d0000C4C4sv00001093sd000075A3*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5694)
+
+pci:v00001093d0000C4C4sv00001093sd000075A5*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4141)
+
 pci:v00001093d0000C4C4sv00001093sd000075CE*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7966R)
 
+pci:v00001093d0000C4C4sv00001093sd000075CF*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4357)
+
+pci:v00001093d0000C4C4sv00001093sd000075D2*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-RevB-5643R)
+
+pci:v00001093d0000C4C4sv00001093sd000075D3*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5644R)
+
+pci:v00001093d0000C4C4sv00001093sd000075EE*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5645R)
+
+pci:v00001093d0000C4C4sv00001093sd00007613*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6555)
+
+pci:v00001093d0000C4C4sv00001093sd00007619*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5185)
+
+pci:v00001093d0000C4C4sv00001093sd0000761A*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5186)
+
+pci:v00001093d0000C4C4sv00001093sd00007629*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4142)
+
+pci:v00001093d0000C4C4sv00001093sd0000762A*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4143)
+
+pci:v00001093d0000C4C4sv00001093sd0000762B*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4138)
+
+pci:v00001093d0000C4C4sv00001093sd0000762C*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4144)
+
+pci:v00001093d0000C4C4sv00001093sd0000762D*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4145)
+
+pci:v00001093d0000C4C4sv00001093sd00007644*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4841)
+
+pci:v00001093d0000C4C4sv00001093sd00007658*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5162 (4CH))
+
+pci:v00001093d0000C4C4sv00001093sd000076AB*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4322)
+
+pci:v00001093d0000C4C4sv00001093sd000076AD*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4112)
+
+pci:v00001093d0000C4C4sv00001093sd000076AE*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4113)
+
+pci:v00001093d0000C4C4sv00001093sd000076B5*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7971R)
+
+pci:v00001093d0000C4C4sv00001093sd000076B6*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7972R)
+
 pci:v00001093d0000C4C4sv00001093sd000076B7*
  ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7975R)
 
+pci:v00001093d0000C4C4sv00001093sd000076C8*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6614)
+
+pci:v00001093d0000C4C4sv00001093sd000076C9*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6612)
+
+pci:v00001093d0000C4C4sv00001093sd000076CB*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5646R)
+
+pci:v00001093d0000C4C4sv00001093sd000076CC*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5162 (2CH))
+
 pci:v00001093d0000C4C4sv00001093sd000076D0*
- ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5160)
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5160 (2CH))
+
+pci:v00001093d0000C4C4sv00001093sd000076D1*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5160 (4CH))
+
+pci:v00001093d0000C4C4sv00001093sd000076DC*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4610)
+
+pci:v00001093d0000C4C4sv00001093sd000076FB*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-1473R-LX110)
+
+pci:v00001093d0000C4C4sv00001093sd000076FE*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5644R)
+
+pci:v00001093d0000C4C4sv00001093sd000076FF*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5644R)
+
+pci:v00001093d0000C4C4sv00001093sd00007700*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5644R)
+
+pci:v00001093d0000C4C4sv00001093sd00007701*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5645R)
+
+pci:v00001093d0000C4C4sv00001093sd00007702*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5645R)
+
+pci:v00001093d0000C4C4sv00001093sd00007703*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5645R)
+
+pci:v00001093d0000C4C4sv00001093sd0000770C*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4139)
+
+pci:v00001093d0000C4C4sv00001093sd00007711*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4464)
+
+pci:v00001093d0000C4C4sv00001093sd00007716*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PCIe-6612)
+
+pci:v00001093d0000C4C4sv00001093sd0000771E*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-4339)
+
+pci:v00001093d0000C4C4sv00001093sd00007735*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (cRIO-9033)
+
+pci:v00001093d0000C4C4sv00001093sd0000774B*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (cRIO-9031)
+
+pci:v00001093d0000C4C4sv00001093sd0000774D*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (cRIO-9034)
+
+pci:v00001093d0000C4C4sv00001093sd00007755*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (cRIO-9030)
+
+pci:v00001093d0000C4C4sv00001093sd00007777*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7976R)
+
+pci:v00001093d0000C4C4sv00001093sd00007782*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5646R)
+
+pci:v00001093d0000C4C4sv00001093sd00007783*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5646R)
+
+pci:v00001093d0000C4C4sv00001093sd00007784*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-5646R)
+
+pci:v00001093d0000C4C4sv00001093sd000077A5*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6345)
+
+pci:v00001093d0000C4C4sv00001093sd000077A6*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6355)
+
+pci:v00001093d0000C4C4sv00001093sd000077A7*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6365)
+
+pci:v00001093d0000C4C4sv00001093sd000077A8*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-6375)
+
+pci:v00001093d0000C4C4sv00001093sd000077B4*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7820R)
+
+pci:v00001093d0000C4C4sv00001093sd000077B5*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7821R)
+
+pci:v00001093d0000C4C4sv00001093sd000077B6*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (PXIe-7822R)
+
+pci:v00001093d0000C4C4sv00001093sd000077B9*
+ ID_MODEL_FROM_DATABASE=PXIe/PCIe Device (cRIO-9038)
 
 pci:v00001093d0000C801*
  ID_MODEL_FROM_DATABASE=PCI-GPIB
 
+pci:v00001093d0000C811*
+ ID_MODEL_FROM_DATABASE=PCI-GPIB+
+
+pci:v00001093d0000C821*
+ ID_MODEL_FROM_DATABASE=PXI-GPIB
+
 pci:v00001093d0000C831*
- ID_MODEL_FROM_DATABASE=PCI-GPIB bridge
+ ID_MODEL_FROM_DATABASE=PMC-GPIB
+
+pci:v00001093d0000C840*
+ ID_MODEL_FROM_DATABASE=PCI-GPIB
+
+pci:v00001093d0000D130*
+ ID_MODEL_FROM_DATABASE=PCI-232/2 Interface
+
+pci:v00001093d0000D140*
+ ID_MODEL_FROM_DATABASE=PCI-232/4 Interface
+
+pci:v00001093d0000D150*
+ ID_MODEL_FROM_DATABASE=PCI-232/8 Interface
+
+pci:v00001093d0000D160*
+ ID_MODEL_FROM_DATABASE=PCI-485/2 Interface
+
+pci:v00001093d0000D170*
+ ID_MODEL_FROM_DATABASE=PCI-485/4 Interface
+
+pci:v00001093d0000D190*
+ ID_MODEL_FROM_DATABASE=PXI-8422/2 (Isolated RS-232) Interface
+
+pci:v00001093d0000D1A0*
+ ID_MODEL_FROM_DATABASE=PXI-8422/4 (Isolated RS-232) Interface
+
+pci:v00001093d0000D1B0*
+ ID_MODEL_FROM_DATABASE=PXI-8423/2 (Isolated RS-485) Interface
+
+pci:v00001093d0000D1C0*
+ ID_MODEL_FROM_DATABASE=PXI-8423/4 (Isolated RS-485) Interface
+
+pci:v00001093d0000D1D0*
+ ID_MODEL_FROM_DATABASE=PXI-8420/2 (RS-232) Interface
+
+pci:v00001093d0000D1E0*
+ ID_MODEL_FROM_DATABASE=PXI-8420/4 (RS-232) Interface
+
+pci:v00001093d0000D1F0*
+ ID_MODEL_FROM_DATABASE=PXI-8420/8 (RS-232) Interface
+
+pci:v00001093d0000D1F1*
+ ID_MODEL_FROM_DATABASE=PXI-8420/16 (RS-232) Interface
+
+pci:v00001093d0000D230*
+ ID_MODEL_FROM_DATABASE=PXI-8421/2 (RS-485) Interface
+
+pci:v00001093d0000D240*
+ ID_MODEL_FROM_DATABASE=PXI-8421/4 (RS-485) Interface
+
+pci:v00001093d0000D250*
+ ID_MODEL_FROM_DATABASE=PCI-232/2 (Isolated) Interface
+
+pci:v00001093d0000D260*
+ ID_MODEL_FROM_DATABASE=PCI-485/2 (Isolated) Interface
+
+pci:v00001093d0000D270*
+ ID_MODEL_FROM_DATABASE=PCI-232/4 (Isolated) Interface
+
+pci:v00001093d0000D280*
+ ID_MODEL_FROM_DATABASE=PCI-485/4 (Isolated) Interface
+
+pci:v00001093d0000D290*
+ ID_MODEL_FROM_DATABASE=PCI-485/8 Interface
+
+pci:v00001093d0000D2A0*
+ ID_MODEL_FROM_DATABASE=PXI-8421/8 (RS-485) Interface
+
+pci:v00001093d0000D2B0*
+ ID_MODEL_FROM_DATABASE=PCI-232/16 Interface
+
+pci:v00001093d0000E111*
+ ID_MODEL_FROM_DATABASE=PCI-CAN
+
+pci:v00001093d0000E131*
+ ID_MODEL_FROM_DATABASE=PXI-8461 (1 port)
+
+pci:v00001093d0000E141*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/LS
+
+pci:v00001093d0000E151*
+ ID_MODEL_FROM_DATABASE=PXI-8460 (1 port)
+
+pci:v00001093d0000E211*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/2
+
+pci:v00001093d0000E231*
+ ID_MODEL_FROM_DATABASE=PXI-8461 (2 ports)
+
+pci:v00001093d0000E241*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/LS2
+
+pci:v00001093d0000E251*
+ ID_MODEL_FROM_DATABASE=PXI-8460 (2 ports)
+
+pci:v00001093d0000E261*
+ ID_MODEL_FROM_DATABASE=PCI-CAN/DS
+
+pci:v00001093d0000E271*
+ ID_MODEL_FROM_DATABASE=PXI-8462
 
 pci:v00001094*
  ID_VENDOR_FROM_DATABASE=First International Computers [FIC]
@@ -23328,16 +25011,16 @@ pci:v000010DEd00000367*
  ID_MODEL_FROM_DATABASE=MCP55 LPC Bridge
 
 pci:v000010DEd00000368*
- ID_MODEL_FROM_DATABASE=MCP55 SMBus
+ ID_MODEL_FROM_DATABASE=MCP55 SMBus Controller
 
 pci:v000010DEd00000368sv00001028sd0000020C*
- ID_MODEL_FROM_DATABASE=MCP55 SMBus (PowerEdge M605 MCP55 SMBus)
+ ID_MODEL_FROM_DATABASE=MCP55 SMBus Controller (PowerEdge M605 MCP55 SMBus)
 
 pci:v000010DEd00000368sv00001028sd00000221*
- ID_MODEL_FROM_DATABASE=MCP55 SMBus (PowerEdge R805 MCP55 SMBus)
+ ID_MODEL_FROM_DATABASE=MCP55 SMBus Controller (PowerEdge R805 MCP55 SMBus)
 
 pci:v000010DEd00000368sv0000147Bsd00001C24*
- ID_MODEL_FROM_DATABASE=MCP55 SMBus (KN9 series mainboard)
+ ID_MODEL_FROM_DATABASE=MCP55 SMBus Controller (KN9 series mainboard)
 
 pci:v000010DEd00000369*
  ID_MODEL_FROM_DATABASE=MCP55 Memory Controller
@@ -24527,6 +26210,9 @@ pci:v000010DEd00000641*
 pci:v000010DEd00000641sv00001682sd00004009*
  ID_MODEL_FROM_DATABASE=G96 [GeForce 9400 GT] (PV-T94G-ZAFG)
 
+pci:v000010DEd00000642*
+ ID_MODEL_FROM_DATABASE=G96 [D9M-10]
+
 pci:v000010DEd00000643*
  ID_MODEL_FROM_DATABASE=G96 [GeForce 9500 GT]
 
@@ -26387,6 +28073,9 @@ pci:v000010DEd00000FE2*
 pci:v000010DEd00000FE3*
  ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 745M]
 
+pci:v000010DEd00000FE3sv0000103Csd00002B16*
+ ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 745M] (GeForce GT 745A)
+
 pci:v000010DEd00000FE3sv000017AAsd00003675*
  ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 745M] (GeForce GT 745A)
 
@@ -26420,6 +28109,9 @@ pci:v000010DEd00000FF1*
 pci:v000010DEd00000FF2*
  ID_MODEL_FROM_DATABASE=GK107GL [GRID K1]
 
+pci:v000010DEd00000FF3*
+ ID_MODEL_FROM_DATABASE=GK107GL [Quadro K420]
+
 pci:v000010DEd00000FF5*
  ID_MODEL_FROM_DATABASE=GK107GL [GRID K1 Tesla USM]
 
@@ -26513,6 +28205,9 @@ pci:v000010DEd0000100A*
 pci:v000010DEd0000100C*
  ID_MODEL_FROM_DATABASE=GK110B [GeForce GTX Titan Black]
 
+pci:v000010DEd0000101E*
+ ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20X]
+
 pci:v000010DEd0000101F*
  ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20]
 
@@ -26543,9 +28238,21 @@ pci:v000010DEd00001028*
 pci:v000010DEd00001029*
  ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40s]
 
+pci:v000010DEd0000102A*
+ ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40t]
+
+pci:v000010DEd0000102D*
+ ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K80]
+
+pci:v000010DEd0000102E*
+ ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40d]
+
 pci:v000010DEd0000103A*
  ID_MODEL_FROM_DATABASE=GK110GL [Quadro K6000]
 
+pci:v000010DEd0000103C*
+ ID_MODEL_FROM_DATABASE=GK110GL [Quadro K5200]
+
 pci:v000010DEd00001040*
  ID_MODEL_FROM_DATABASE=GF119 [GeForce GT 520]
 
@@ -26570,6 +28277,9 @@ pci:v000010DEd0000104B*
 pci:v000010DEd0000104C*
  ID_MODEL_FROM_DATABASE=GF119 [GeForce GT 705]
 
+pci:v000010DEd0000104D*
+ ID_MODEL_FROM_DATABASE=GF119 [GeForce GT 710]
+
 pci:v000010DEd00001050*
  ID_MODEL_FROM_DATABASE=GF119M [GeForce GT 520M]
 
@@ -26981,6 +28691,12 @@ pci:v000010DEd00001140sv00001028sd000005F4*
 pci:v000010DEd00001140sv00001028sd0000064E*
  ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
 
+pci:v000010DEd00001140sv00001028sd00000652*
+ ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
+
+pci:v000010DEd00001140sv00001028sd00000662*
+ ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
+
 pci:v000010DEd00001140sv00001028sd0000068D*
  ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
 
@@ -27239,9 +28955,15 @@ pci:v000010DEd00001140sv0000152Dsd00000982*
 pci:v000010DEd00001140sv0000152Dsd00000983*
  ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 630M)
 
+pci:v000010DEd00001140sv0000152Dsd00001005*
+ ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 820M)
+
 pci:v000010DEd00001140sv0000152Dsd00001012*
  ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 710M)
 
+pci:v000010DEd00001140sv0000152Dsd00001019*
+ ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
+
 pci:v000010DEd00001140sv0000152Dsd00001030*
  ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 630M)
 
@@ -27254,6 +28976,9 @@ pci:v000010DEd00001140sv0000152Dsd00001067*
 pci:v000010DEd00001140sv0000152Dsd00001072*
  ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
 
+pci:v000010DEd00001140sv0000152Dsd00001086*
+ ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
+
 pci:v000010DEd00001140sv000017AAsd00002200*
  ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (NVS 5200M)
 
@@ -27524,9 +29249,15 @@ pci:v000010DEd0000118E*
 pci:v000010DEd0000118F*
  ID_MODEL_FROM_DATABASE=GK104GL [Tesla K10]
 
+pci:v000010DEd00001191*
+ ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 760 Rev. 2]
+
 pci:v000010DEd00001193*
  ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 760 Ti OEM]
 
+pci:v000010DEd00001194*
+ ID_MODEL_FROM_DATABASE=GK104GL [Tesla K8]
+
 pci:v000010DEd00001195*
  ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 660 Rev. 2]
 
@@ -27578,6 +29309,9 @@ pci:v000010DEd000011B0sv000010DEsd0000101B*
 pci:v000010DEd000011B1*
  ID_MODEL_FROM_DATABASE=GK104GL [GRID K2 Tesla USM]
 
+pci:v000010DEd000011B4*
+ ID_MODEL_FROM_DATABASE=GK104GL [Quadro K4200]
+
 pci:v000010DEd000011B6*
  ID_MODEL_FROM_DATABASE=GK104GLM [Quadro K3100M]
 
@@ -27863,6 +29597,9 @@ pci:v000010DEd00001295sv0000103Csd00002B0F*
 pci:v000010DEd00001295sv0000103Csd00002B11*
  ID_MODEL_FROM_DATABASE=GK208M [GeForce 710M] (GeForce GT 710A)
 
+pci:v000010DEd00001295sv0000103Csd00002B20*
+ ID_MODEL_FROM_DATABASE=GK208M [GeForce 710M] (GeForce 810A)
+
 pci:v000010DEd00001295sv0000103Csd00002B21*
  ID_MODEL_FROM_DATABASE=GK208M [GeForce 710M] (GeForce GT 810A)
 
@@ -27887,6 +29624,9 @@ pci:v000010DEd000012BA*
 pci:v000010DEd00001340*
  ID_MODEL_FROM_DATABASE=GM108M [GeForce 830M]
 
+pci:v000010DEd00001340sv0000103Csd00002B2B*
+ ID_MODEL_FROM_DATABASE=GM108M [GeForce 830M] (GeForce 830A)
+
 pci:v000010DEd00001341*
  ID_MODEL_FROM_DATABASE=GM108M [GeForce 840M]
 
@@ -27908,6 +29648,9 @@ pci:v000010DEd00001381*
 pci:v000010DEd00001382*
  ID_MODEL_FROM_DATABASE=GM107 [GeForce GTX 745]
 
+pci:v000010DEd00001389*
+ ID_MODEL_FROM_DATABASE=GM107GL [GRID M3]
+
 pci:v000010DEd00001390*
  ID_MODEL_FROM_DATABASE=GM107M [GeForce 845M]
 
@@ -27926,6 +29669,18 @@ pci:v000010DEd00001392*
 pci:v000010DEd00001393*
  ID_MODEL_FROM_DATABASE=GM107M [GeForce 840M]
 
+pci:v000010DEd000013B3*
+ ID_MODEL_FROM_DATABASE=GM107GLM [Quadro K2200M]
+
+pci:v000010DEd000013BA*
+ ID_MODEL_FROM_DATABASE=GM107GL [Quadro K2200]
+
+pci:v000010DEd000013BB*
+ ID_MODEL_FROM_DATABASE=GM107GL [Quadro K620]
+
+pci:v000010DEd000013BD*
+ ID_MODEL_FROM_DATABASE=GM107GL [Tesla M40]
+
 pci:v000010DF*
  ID_VENDOR_FROM_DATABASE=Emulex Corporation
 
@@ -29291,6 +31046,9 @@ pci:v00001103d00000622*
 pci:v00001103d00000640*
  ID_MODEL_FROM_DATABASE=RocketRAID 640 4 Port SATA-III Controller
 
+pci:v00001103d00000644*
+ ID_MODEL_FROM_DATABASE=RocketRAID 644 4 Port SATA-III Controller (eSATA)
+
 pci:v00001103d00001720*
  ID_MODEL_FROM_DATABASE=RocketRAID 1720 (2x SATA II RAID Controller)
 
@@ -31724,6 +33482,30 @@ pci:v0000111Dd0000806E*
 pci:v0000111Dd0000806F*
  ID_MODEL_FROM_DATABASE=HIO524G2 PCI Express Gen2 Switch
 
+pci:v0000111Dd00008088*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch
+
+pci:v0000111Dd00008088sv00001093sd0000752F*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch (PXIe-8383mc Device)
+
+pci:v0000111Dd00008088sv00001093sd00007543*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch (PXIe-8383mc System Host)
+
+pci:v0000111Dd00008088sv00001093sd0000755C*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch (PXIe-8364)
+
+pci:v0000111Dd00008088sv00001093sd0000755D*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch (PXIe-8374)
+
+pci:v0000111Dd00008088sv00001093sd000075FF*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch (PXIe-8383mc DMA)
+
+pci:v0000111Dd00008088sv00001093sd00007600*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch (PXIe-8383mc DMA)
+
+pci:v0000111Dd00008088sv00001093sd00007602*
+ ID_MODEL_FROM_DATABASE=PES32NT8BG2 PCI Express Switch (PXIe-8384)
+
 pci:v0000111E*
  ID_VENDOR_FROM_DATABASE=Eldec
 
@@ -32403,11 +34185,14 @@ pci:v00001131d00007146sv0000153Bsd00001155*
  ID_MODEL_FROM_DATABASE=SAA7146 (Cinergy 1200 DVB-S)
 
 pci:v00001131d00007146sv0000153Bsd00001156*
- ID_MODEL_FROM_DATABASE=SAA7146 (Terratec Cynergy 1200C)
+ ID_MODEL_FROM_DATABASE=SAA7146 (Cinergy 1200 DVB-C)
 
 pci:v00001131d00007146sv0000153Bsd00001157*
  ID_MODEL_FROM_DATABASE=SAA7146 (Cinergy 1200 DVB-T)
 
+pci:v00001131d00007146sv0000153Bsd00001176*
+ ID_MODEL_FROM_DATABASE=SAA7146 (Cinergy 1200 DVB-C (MK3))
+
 pci:v00001131d00007146sv00001894sd00000020*
  ID_MODEL_FROM_DATABASE=SAA7146 (KNC One DVB-C V1.0)
 
@@ -40322,6 +42107,12 @@ pci:v00001360d00000205*
 pci:v00001360d00000206*
  ID_MODEL_FROM_DATABASE=GPS180PEX GPS Receiver (PCI Express)
 
+pci:v00001360d00000207*
+ ID_MODEL_FROM_DATABASE=GLN180PEX GPS/GLONASS receiver (PCI Express)
+
+pci:v00001360d00000208*
+ ID_MODEL_FROM_DATABASE=GPS180AMC GPS Receiver (PCI Express / MicroTCA / AdvancedMC)
+
 pci:v00001360d00000301*
  ID_MODEL_FROM_DATABASE=TCR510PCI IRIG Timecode Reader
 
@@ -41522,6 +43313,9 @@ pci:v000013F6d00008788sv00001043sd00008428*
 pci:v000013F6d00008788sv00001043sd00008467*
  ID_MODEL_FROM_DATABASE=CMI8788 [Oxygen HD Audio] (CMI8786 (Xonar DG))
 
+pci:v000013F6d00008788sv00001043sd000085F4*
+ ID_MODEL_FROM_DATABASE=CMI8788 [Oxygen HD Audio] (Virtuoso 100 (Xonar Essence STX II))
+
 pci:v000013F6d00008788sv000013F6sd00008782*
  ID_MODEL_FROM_DATABASE=CMI8788 [Oxygen HD Audio] (PCI 2.0 HD Audio)
 
@@ -42846,7 +44640,7 @@ pci:v00001425d00005012*
  ID_MODEL_FROM_DATABASE=T560-CR Unified Wire Ethernet Controller
 
 pci:v00001425d00005013*
- ID_MODEL_FROM_DATABASE=T580-CR Unified Wire Ethernet Controller
+ ID_MODEL_FROM_DATABASE=T580-CHR Unified Wire Ethernet Controller
 
 pci:v00001425d00005014*
  ID_MODEL_FROM_DATABASE=T580-LP-SO-CR Unified Wire Ethernet Controller
@@ -42869,6 +44663,9 @@ pci:v00001425d00005084*
 pci:v00001425d00005085*
  ID_MODEL_FROM_DATABASE=T580-5085 Unified Wire Ethernet Controller
 
+pci:v00001425d00005086*
+ ID_MODEL_FROM_DATABASE=T580-5086 Unified Wire Ethernet Controller
+
 pci:v00001425d00005401*
  ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller
 
@@ -42924,7 +44721,7 @@ pci:v00001425d00005412*
  ID_MODEL_FROM_DATABASE=T560-CR Unified Wire Ethernet Controller
 
 pci:v00001425d00005413*
- ID_MODEL_FROM_DATABASE=T580-CR Unified Wire Ethernet Controller
+ ID_MODEL_FROM_DATABASE=T580-CHR Unified Wire Ethernet Controller
 
 pci:v00001425d00005414*
  ID_MODEL_FROM_DATABASE=T580-LP-SO-CR Unified Wire Ethernet Controller
@@ -42947,6 +44744,9 @@ pci:v00001425d00005484*
 pci:v00001425d00005485*
  ID_MODEL_FROM_DATABASE=T580-5085 Unified Wire Ethernet Controller
 
+pci:v00001425d00005486*
+ ID_MODEL_FROM_DATABASE=T580-5086 Unified Wire Ethernet Controller
+
 pci:v00001425d00005501*
  ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller
 
@@ -43002,7 +44802,7 @@ pci:v00001425d00005512*
  ID_MODEL_FROM_DATABASE=T560-CR Unified Wire Storage Controller
 
 pci:v00001425d00005513*
- ID_MODEL_FROM_DATABASE=T580-CR Unified Wire Storage Controller
+ ID_MODEL_FROM_DATABASE=T580-CHR Unified Wire Storage Controller
 
 pci:v00001425d00005514*
  ID_MODEL_FROM_DATABASE=T580-LP-SO-CR Unified Wire Storage Controller
@@ -43025,6 +44825,9 @@ pci:v00001425d00005584*
 pci:v00001425d00005585*
  ID_MODEL_FROM_DATABASE=T580-5085 Unified Wire Storage Controller
 
+pci:v00001425d00005586*
+ ID_MODEL_FROM_DATABASE=T580-5086 Unified Wire Storage Controller
+
 pci:v00001425d00005601*
  ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller
 
@@ -43080,7 +44883,7 @@ pci:v00001425d00005612*
  ID_MODEL_FROM_DATABASE=T560-CR Unified Wire Storage Controller
 
 pci:v00001425d00005613*
- ID_MODEL_FROM_DATABASE=T580-CR Unified Wire Storage Controller
+ ID_MODEL_FROM_DATABASE=T580-CHR Unified Wire Storage Controller
 
 pci:v00001425d00005614*
  ID_MODEL_FROM_DATABASE=T580-LP-SO-CR Unified Wire Storage Controller
@@ -43103,6 +44906,9 @@ pci:v00001425d00005684*
 pci:v00001425d00005685*
  ID_MODEL_FROM_DATABASE=T580-5085 Unified Wire Storage Controller
 
+pci:v00001425d00005686*
+ ID_MODEL_FROM_DATABASE=T580-5086 Unified Wire Storage Controller
+
 pci:v00001425d00005701*
  ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller
 
@@ -43236,7 +45042,7 @@ pci:v00001425d00005812*
  ID_MODEL_FROM_DATABASE=T560-CR Unified Wire Ethernet Controller [VF]
 
 pci:v00001425d00005813*
- ID_MODEL_FROM_DATABASE=T580-CR Unified Wire Ethernet Controller [VF]
+ ID_MODEL_FROM_DATABASE=T580-CHR Unified Wire Ethernet Controller [VF]
 
 pci:v00001425d00005814*
  ID_MODEL_FROM_DATABASE=T580-LP-SO-CR Unified Wire Ethernet Controller [VF]
@@ -43259,6 +45065,9 @@ pci:v00001425d00005884*
 pci:v00001425d00005885*
  ID_MODEL_FROM_DATABASE=T580-5085 Unified Wire Ethernet Controller [VF]
 
+pci:v00001425d00005886*
+ ID_MODEL_FROM_DATABASE=T580-5086 Unified Wire Ethernet Controller [VF]
+
 pci:v00001425d0000A000*
  ID_MODEL_FROM_DATABASE=PE10K Unified Wire Ethernet Controller
 
@@ -45887,6 +47696,9 @@ pci:v000014E4d00004359sv00001028sd00000011*
 pci:v000014E4d00004359sv0000103Csd0000182C*
  ID_MODEL_FROM_DATABASE=BCM43228 802.11a/b/g/n (BCM943228HM4L 802.11a/b/g/n 2x2 Wi-Fi Adapter)
 
+pci:v000014E4d00004360*
+ ID_MODEL_FROM_DATABASE=BCM4360 802.11ac Wireless Network Adapter
+
 pci:v000014E4d00004365*
  ID_MODEL_FROM_DATABASE=BCM43142 802.11b/g/n
 
@@ -45896,6 +47708,12 @@ pci:v000014E4d00004365sv00001028sd00000016*
 pci:v000014E4d000043A0*
  ID_MODEL_FROM_DATABASE=BCM4360 802.11ac Wireless Network Adapter
 
+pci:v000014E4d000043A9*
+ ID_MODEL_FROM_DATABASE=BCM43217 802.11b/g/n
+
+pci:v000014E4d000043AA*
+ ID_MODEL_FROM_DATABASE=BCM43131 802.11b/g/n
+
 pci:v000014E4d000043B1*
  ID_MODEL_FROM_DATABASE=BCM4352 802.11ac Wireless Network Adapter
 
@@ -46875,7 +48693,7 @@ pci:v000014F1d00008852*
  ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder
 
 pci:v000014F1d00008852sv00000070sd00008010*
- ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (Hauppauge WinTV HVR-1400 ExpressCard)
+ ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinTV HVR-1400 ExpressCard)
 
 pci:v000014F1d00008852sv0000107Dsd00006F22*
  ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinFast PxTV1200)
@@ -46889,6 +48707,9 @@ pci:v000014F1d00008852sv0000153Bsd0000117E*
 pci:v000014F1d00008852sv000018ACsd0000DB78*
  ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (FusionHDTV DVB-T Dual Express)
 
+pci:v000014F1d00008852sv00004254sd00009580*
+ ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (T9580)
+
 pci:v000014F1d00008880*
  ID_MODEL_FROM_DATABASE=CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
 
@@ -47429,6 +49250,18 @@ pci:v00001542*
 pci:v00001542d00009260*
  ID_MODEL_FROM_DATABASE=RCIM-II Real-Time Clock & Interrupt Module
 
+pci:v00001542d00009272*
+ ID_MODEL_FROM_DATABASE=Pulse Width Modulator Card
+
+pci:v00001542d00009277*
+ ID_MODEL_FROM_DATABASE=5 Volt Delta Sigma Converter Card
+
+pci:v00001542d00009278*
+ ID_MODEL_FROM_DATABASE=10 Volt Delta Sigma Converter Card
+
+pci:v00001542d00009287*
+ ID_MODEL_FROM_DATABASE=Analog Output Card
+
 pci:v00001543*
  ID_VENDOR_FROM_DATABASE=SILICON Laboratories
 
@@ -47886,7 +49719,10 @@ pci:v000015ADd00000774*
  ID_MODEL_FROM_DATABASE=USB1.1 UHCI Controller
 
 pci:v000015ADd00000778*
- ID_MODEL_FROM_DATABASE=USB3 xHCI Controller
+ ID_MODEL_FROM_DATABASE=USB3 xHCI 0.96 Controller
+
+pci:v000015ADd00000779*
+ ID_MODEL_FROM_DATABASE=USB3 xHCI 1.0 Controller
 
 pci:v000015ADd00000790*
  ID_MODEL_FROM_DATABASE=PCI bridge
@@ -49493,6 +51329,9 @@ pci:v000016B8*
 pci:v000016BE*
  ID_VENDOR_FROM_DATABASE=Creatix Polymedia GmbH
 
+pci:v000016C3*
+ ID_VENDOR_FROM_DATABASE=Synopsys, Inc.
+
 pci:v000016C6*
  ID_VENDOR_FROM_DATABASE=Micrel-Kendin
 
@@ -49772,6 +51611,15 @@ pci:v000016ED*
 pci:v000016EDd00001001*
  ID_MODEL_FROM_DATABASE=UMIO communication card
 
+pci:v000016F2*
+ ID_VENDOR_FROM_DATABASE=ETAS GmbH
+
+pci:v000016F2d00000200*
+ ID_MODEL_FROM_DATABASE=I/O board
+
+pci:v000016F2d00000200sv000016F2sd00000010*
+ ID_MODEL_FROM_DATABASE=I/O board (ES53xx I/O board)
+
 pci:v000016F3*
  ID_VENDOR_FROM_DATABASE=Jetway Information Co., Ltd.
 
@@ -49914,7 +51762,7 @@ pci:v00001775*
  ID_VENDOR_FROM_DATABASE=GE Intelligent Platforms
 
 pci:v0000177D*
- ID_VENDOR_FROM_DATABASE=Cavium Networks
+ ID_VENDOR_FROM_DATABASE=Cavium, Inc.
 
 pci:v0000177Dd00000001*
  ID_MODEL_FROM_DATABASE=Nitrox XL N1
@@ -49973,6 +51821,147 @@ pci:v0000177Dd00000095*
 pci:v0000177Dd00000096*
  ID_MODEL_FROM_DATABASE=Octeon III CN70XX Network Processor
 
+pci:v0000177Dd0000A001*
+ ID_MODEL_FROM_DATABASE=THUNDERX MRML Bridge
+
+pci:v0000177Dd0000A002*
+ ID_MODEL_FROM_DATABASE=THUNDERX PCC Bridge
+
+pci:v0000177Dd0000A002sv0000177Dsd0000A102*
+ ID_MODEL_FROM_DATABASE=THUNDERX PCC Bridge (CN88XX PCC Bridge)
+
+pci:v0000177Dd0000A008*
+ ID_MODEL_FROM_DATABASE=THUNDERX SMMU
+
+pci:v0000177Dd0000A008sv0000177Dsd0000A108*
+ ID_MODEL_FROM_DATABASE=THUNDERX SMMU (CN88XX SMMU)
+
+pci:v0000177Dd0000A009*
+ ID_MODEL_FROM_DATABASE=THUNDERX Generic Interrupt Controller
+
+pci:v0000177Dd0000A00A*
+ ID_MODEL_FROM_DATABASE=THUNDERX GPIO Controller
+
+pci:v0000177Dd0000A00B*
+ ID_MODEL_FROM_DATABASE=THUNDERX MPI / SPI Controller
+
+pci:v0000177Dd0000A00C*
+ ID_MODEL_FROM_DATABASE=THUNDERX MIO-PTP Controller
+
+pci:v0000177Dd0000A00D*
+ ID_MODEL_FROM_DATABASE=THUNDERX MIX Network Controller
+
+pci:v0000177Dd0000A00E*
+ ID_MODEL_FROM_DATABASE=THUNDERX Reset Controller
+
+pci:v0000177Dd0000A00F*
+ ID_MODEL_FROM_DATABASE=THUNDERX UART Controller
+
+pci:v0000177Dd0000A010*
+ ID_MODEL_FROM_DATABASE=THUNDERX eMMC/SD Controller
+
+pci:v0000177Dd0000A011*
+ ID_MODEL_FROM_DATABASE=THUNDERX MIO-BOOT Controller
+
+pci:v0000177Dd0000A012*
+ ID_MODEL_FROM_DATABASE=THUNDERX TWSI / I2C Controller
+
+pci:v0000177Dd0000A013*
+ ID_MODEL_FROM_DATABASE=THUNDERX CCPI (Multi-node connect)
+
+pci:v0000177Dd0000A014*
+ ID_MODEL_FROM_DATABASE=THUNDERX Voltage Regulator Module
+
+pci:v0000177Dd0000A015*
+ ID_MODEL_FROM_DATABASE=THUNDERX PCIe Switch Logic Interface
+
+pci:v0000177Dd0000A016*
+ ID_MODEL_FROM_DATABASE=THUNDERX Key Memory
+
+pci:v0000177Dd0000A017*
+ ID_MODEL_FROM_DATABASE=THUNDERX GTI (Global System Timers)
+
+pci:v0000177Dd0000A018*
+ ID_MODEL_FROM_DATABASE=THUNDERX Random Number Generator
+
+pci:v0000177Dd0000A019*
+ ID_MODEL_FROM_DATABASE=THUNDERX DFA
+
+pci:v0000177Dd0000A01A*
+ ID_MODEL_FROM_DATABASE=THUNDERX Zip Coprocessor
+
+pci:v0000177Dd0000A01B*
+ ID_MODEL_FROM_DATABASE=THUNDERX xHCI USB Controller
+
+pci:v0000177Dd0000A01C*
+ ID_MODEL_FROM_DATABASE=THUNDERX AHCI SATA Controller
+
+pci:v0000177Dd0000A01Csv0000177Dsd0000A11C*
+ ID_MODEL_FROM_DATABASE=THUNDERX AHCI SATA Controller (CN88XX AHCI SATA Controller)
+
+pci:v0000177Dd0000A01D*
+ ID_MODEL_FROM_DATABASE=THUNDERX RAID Coprocessor
+
+pci:v0000177Dd0000A01E*
+ ID_MODEL_FROM_DATABASE=THUNDERX Network Interface Controller
+
+pci:v0000177Dd0000A01F*
+ ID_MODEL_FROM_DATABASE=THUNDERX Traffic Network Switch
+
+pci:v0000177Dd0000A020*
+ ID_MODEL_FROM_DATABASE=THUNDERX PEM (PCI Express Interface)
+
+pci:v0000177Dd0000A021*
+ ID_MODEL_FROM_DATABASE=THUNDERX L2C (Level-2 Cache Controller)
+
+pci:v0000177Dd0000A022*
+ ID_MODEL_FROM_DATABASE=THUNDERX LMC (DRAM Controller)
+
+pci:v0000177Dd0000A023*
+ ID_MODEL_FROM_DATABASE=THUNDERX OCLA (On-Chip Logic Analyzer)
+
+pci:v0000177Dd0000A024*
+ ID_MODEL_FROM_DATABASE=THUNDERX OSM
+
+pci:v0000177Dd0000A025*
+ ID_MODEL_FROM_DATABASE=THUNDERX GSER (General Serializer/Deserializer)
+
+pci:v0000177Dd0000A026*
+ ID_MODEL_FROM_DATABASE=THUNDERX BGX (Common Ethernet Interface)
+
+pci:v0000177Dd0000A027*
+ ID_MODEL_FROM_DATABASE=THUNDERX IOBN
+
+pci:v0000177Dd0000A029*
+ ID_MODEL_FROM_DATABASE=THUNDERX NCSI (Network Controller Sideband Interface)
+
+pci:v0000177Dd0000A02A*
+ ID_MODEL_FROM_DATABASE=THUNDERX SGP
+
+pci:v0000177Dd0000A02B*
+ ID_MODEL_FROM_DATABASE=THUNDERX SMI / MDIO Controller
+
+pci:v0000177Dd0000A02C*
+ ID_MODEL_FROM_DATABASE=THUNDERX DAP (Debug Access Port)
+
+pci:v0000177Dd0000A02D*
+ ID_MODEL_FROM_DATABASE=THUNDERX PCIERC (PCIe Root Complex)
+
+pci:v0000177Dd0000A02E*
+ ID_MODEL_FROM_DATABASE=THUNDERX L2C-TAD
+
+pci:v0000177Dd0000A02F*
+ ID_MODEL_FROM_DATABASE=THUNDERX L2C-CBC
+
+pci:v0000177Dd0000A030*
+ ID_MODEL_FROM_DATABASE=THUNDERX L2C-MCI
+
+pci:v0000177Dd0000A031*
+ ID_MODEL_FROM_DATABASE=THUNDERX MIO-FUS (Fuse Access Controller)
+
+pci:v0000177Dd0000A032*
+ ID_MODEL_FROM_DATABASE=THUNDERX FUSF (Fuse Controller)
+
 pci:v00001787*
  ID_VENDOR_FROM_DATABASE=Hightech Information System Ltd.
 
@@ -52490,6 +54479,9 @@ pci:v00001A29*
 pci:v00001A29d00004338*
  ID_MODEL_FROM_DATABASE=CP8 Content Processor ASIC
 
+pci:v00001A29d00004E36*
+ ID_MODEL_FROM_DATABASE=NP6 Network Processor
+
 pci:v00001A2B*
  ID_VENDOR_FROM_DATABASE=Ascom AG
 
@@ -53219,6 +55211,12 @@ pci:v00001BBFd00000003*
 pci:v00001BBFd00000004*
  ID_MODEL_FROM_DATABASE=MAX4
 
+pci:v00001BEE*
+ ID_VENDOR_FROM_DATABASE=IXXAT Automation GmbH
+
+pci:v00001BEEd00000003*
+ ID_MODEL_FROM_DATABASE=CAN-IB200/PCIe
+
 pci:v00001BF4*
  ID_VENDOR_FROM_DATABASE=VTI Instruments Corporation
 
@@ -53921,6 +55919,9 @@ pci:v0000416Cd00000100*
 pci:v0000416Cd00000200*
  ID_MODEL_FROM_DATABASE=CPC
 
+pci:v00004254*
+ ID_VENDOR_FROM_DATABASE=DVBSky
+
 pci:v00004321*
  ID_VENDOR_FROM_DATABASE=Tata Power Strategic Electronics Division
 
@@ -58175,6 +60176,9 @@ pci:v00008086d000010D3sv0000103Csd00003250*
 pci:v00008086d000010D3sv00001043sd00008369*
  ID_MODEL_FROM_DATABASE=82574L Gigabit Network Connection (Motherboard)
 
+pci:v00008086d000010D3sv00001093sd000076E9*
+ ID_MODEL_FROM_DATABASE=82574L Gigabit Network Connection (PCIe-8233 Ethernet Adapter)
+
 pci:v00008086d000010D3sv000010A9sd00008029*
  ID_MODEL_FROM_DATABASE=82574L Gigabit Network Connection (Prism XL Single Port Gigabit Ethernet)
 
@@ -59243,6 +61247,18 @@ pci:v00008086d00001521sv0000108Esd00007B16*
 pci:v00008086d00001521sv0000108Esd00007B18*
  ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (Quad Port GbE PCIe 2.0 Low Profile Adapter, UTP)
 
+pci:v00008086d00001521sv00001093sd00007648*
+ ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (PCIe-8237R Ethernet Adapter)
+
+pci:v00008086d00001521sv00001093sd00007649*
+ ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (PCIe-8236 Ethernet Adapter)
+
+pci:v00008086d00001521sv00001093sd000076B1*
+ ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (PCIe-8237R-S Ethernet Adapter)
+
+pci:v00008086d00001521sv00001093sd0000775B*
+ ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (PCIe-8237 Ethernet Adapter)
+
 pci:v00008086d00001521sv000010A9sd0000802A*
  ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (UV2-BaseIO dual-port GbE)
 
@@ -59402,6 +61418,9 @@ pci:v00008086d00001533*
 pci:v00008086d00001533sv0000103Csd00000003*
  ID_MODEL_FROM_DATABASE=I210 Gigabit Network Connection (Ethernet I210-T1 GbE NIC)
 
+pci:v00008086d00001533sv00001093sd00007706*
+ ID_MODEL_FROM_DATABASE=I210 Gigabit Network Connection (Compact Vision System Ethernet Adapter)
+
 pci:v00008086d00001533sv000010A9sd0000802C*
  ID_MODEL_FROM_DATABASE=I210 Gigabit Network Connection (UV300 BaseIO single-port GbE)
 
@@ -59606,6 +61625,12 @@ pci:v00008086d000015A2*
 pci:v00008086d000015A3*
  ID_MODEL_FROM_DATABASE=Ethernet Connection (3) I218-V
 
+pci:v00008086d000015B7*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection (2) I219-LM
+
+pci:v00008086d000015B8*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection (2) I219-V
+
 pci:v00008086d00001600*
  ID_MODEL_FROM_DATABASE=Broadwell-U Host Bridge -OPI
 
@@ -69599,6 +71624,9 @@ pci:v00008086d00003B23*
 pci:v00008086d00003B25*
  ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset SATA RAID Controller
 
+pci:v00008086d00003B25sv0000103Csd00003118*
+ ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset SATA RAID Controller (HP Smart Array B110i SATA RAID Controller)
+
 pci:v00008086d00003B26*
  ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset 2 port SATA IDE Controller
 
@@ -70703,6 +72731,489 @@ pci:v00008086d000065FA*
 pci:v00008086d000065FF*
  ID_MODEL_FROM_DATABASE=5100 Chipset DMA Engine
 
+pci:v00008086d00006F00*
+ ID_MODEL_FROM_DATABASE=Broadwell DMI2
+
+pci:v00008086d00006F01*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 0
+
+pci:v00008086d00006F02*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 1
+
+pci:v00008086d00006F03*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 1
+
+pci:v00008086d00006F04*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 2
+
+pci:v00008086d00006F05*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 2
+
+pci:v00008086d00006F06*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 2
+
+pci:v00008086d00006F07*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 2
+
+pci:v00008086d00006F08*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 3
+
+pci:v00008086d00006F09*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 3
+
+pci:v00008086d00006F0A*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 3
+
+pci:v00008086d00006F0B*
+ ID_MODEL_FROM_DATABASE=Broadwell PCI Express Root Port 3
+
+pci:v00008086d00006F10*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F11*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F12*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F13*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F14*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F15*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F16*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F17*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F18*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F19*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F1A*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F1B*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F1C*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Debug
+
+pci:v00008086d00006F1D*
+ ID_MODEL_FROM_DATABASE=Broadwell R2PCIe Agent
+
+pci:v00008086d00006F1E*
+ ID_MODEL_FROM_DATABASE=Broadwell Ubox
+
+pci:v00008086d00006F1F*
+ ID_MODEL_FROM_DATABASE=Broadwell Ubox
+
+pci:v00008086d00006F20*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 0
+
+pci:v00008086d00006F21*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 1
+
+pci:v00008086d00006F22*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 2
+
+pci:v00008086d00006F23*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 3
+
+pci:v00008086d00006F24*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 4
+
+pci:v00008086d00006F25*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 5
+
+pci:v00008086d00006F26*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 6
+
+pci:v00008086d00006F27*
+ ID_MODEL_FROM_DATABASE=Broadwell-DE Crystal Beach DMA Channel 7
+
+pci:v00008086d00006F28*
+ ID_MODEL_FROM_DATABASE=Broadwell Adress Map/VTd_Misc/System Management
+
+pci:v00008086d00006F29*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO Hot Plug
+
+pci:v00008086d00006F2A*
+ ID_MODEL_FROM_DATABASE=Broadwell IIO RAS/Control Status/Global Errors
+
+pci:v00008086d00006F2C*
+ ID_MODEL_FROM_DATABASE=Broadwell I/O APIC
+
+pci:v00008086d00006F30*
+ ID_MODEL_FROM_DATABASE=Broadwell Home Agent 0
+
+pci:v00008086d00006F32*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 0
+
+pci:v00008086d00006F33*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 1
+
+pci:v00008086d00006F34*
+ ID_MODEL_FROM_DATABASE=Broadwell R2PCIe Agent
+
+pci:v00008086d00006F36*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link 0/1
+
+pci:v00008086d00006F37*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link 0/1
+
+pci:v00008086d00006F38*
+ ID_MODEL_FROM_DATABASE=Broadwell Home Agent 1
+
+pci:v00008086d00006F39*
+ ID_MODEL_FROM_DATABASE=Broadwell IO Performance Monitoring
+
+pci:v00008086d00006F3A*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 2
+
+pci:v00008086d00006F3E*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link 2
+
+pci:v00008086d00006F3F*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link 2
+
+pci:v00008086d00006F40*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 2
+
+pci:v00008086d00006F41*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link 2
+
+pci:v00008086d00006F43*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 2
+
+pci:v00008086d00006F45*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 2 Debug
+
+pci:v00008086d00006F46*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 2 Debug
+
+pci:v00008086d00006F47*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 2 Debug
+
+pci:v00008086d00006F60*
+ ID_MODEL_FROM_DATABASE=Broadwell Home Agent 1
+
+pci:v00008086d00006F68*
+ ID_MODEL_FROM_DATABASE=Broadwell Target Address/Thermal/RAS
+
+pci:v00008086d00006F6A*
+ ID_MODEL_FROM_DATABASE=Broadwell Channel Target Address Decoder
+
+pci:v00008086d00006F6B*
+ ID_MODEL_FROM_DATABASE=Broadwell Channel Target Address Decoder
+
+pci:v00008086d00006F6C*
+ ID_MODEL_FROM_DATABASE=Broadwell Channel Target Address Decoder
+
+pci:v00008086d00006F6D*
+ ID_MODEL_FROM_DATABASE=Broadwell Channel Target Address Decoder
+
+pci:v00008086d00006F6E*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 2/3 Broadcast
+
+pci:v00008086d00006F6F*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Global Broadcast
+
+pci:v00008086d00006F70*
+ ID_MODEL_FROM_DATABASE=Broadwell Home Agent 0 Debug
+
+pci:v00008086d00006F71*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Target Address/Thermal/RAS
+
+pci:v00008086d00006F76*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link Debug
+
+pci:v00008086d00006F78*
+ ID_MODEL_FROM_DATABASE=Broadwell Home Agent 1 Debug
+
+pci:v00008086d00006F79*
+ ID_MODEL_FROM_DATABASE=Broadwell Target Address/Thermal/RAS
+
+pci:v00008086d00006F7D*
+ ID_MODEL_FROM_DATABASE=Broadwell Ubox
+
+pci:v00008086d00006F7E*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link Debug
+
+pci:v00008086d00006F80*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 0
+
+pci:v00008086d00006F81*
+ ID_MODEL_FROM_DATABASE=Broadwell R3 QPI Link 0/1
+
+pci:v00008086d00006F83*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 0
+
+pci:v00008086d00006F85*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 0 Debug
+
+pci:v00008086d00006F86*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 0 Debug
+
+pci:v00008086d00006F87*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 0 Debug
+
+pci:v00008086d00006F88*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006F8A*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006F90*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 1
+
+pci:v00008086d00006F93*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 1
+
+pci:v00008086d00006F95*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 1 Debug
+
+pci:v00008086d00006F96*
+ ID_MODEL_FROM_DATABASE=Broadwell QPI Link 1 Debug
+
+pci:v00008086d00006F98*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006F99*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006F9A*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006F9C*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FA0*
+ ID_MODEL_FROM_DATABASE=Broadwell Home Agent 0
+
+pci:v00008086d00006FA8*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Target Address/Thermal/RAS
+
+pci:v00008086d00006FAA*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel Target Address Decoder
+
+pci:v00008086d00006FAB*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel Target Address Decoder
+
+pci:v00008086d00006FAC*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel Target Address Decoder
+
+pci:v00008086d00006FAD*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel Target Address Decoder
+
+pci:v00008086d00006FAE*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 0/1 Broadcast
+
+pci:v00008086d00006FAF*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Global Broadcast
+
+pci:v00008086d00006FB0*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 0 Thermal Control
+
+pci:v00008086d00006FB1*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 1 Thermal Control
+
+pci:v00008086d00006FB2*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 0 Error
+
+pci:v00008086d00006FB3*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 1 Error
+
+pci:v00008086d00006FB4*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 2 Thermal Control
+
+pci:v00008086d00006FB5*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 3 Thermal Control
+
+pci:v00008086d00006FB6*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 2 Error
+
+pci:v00008086d00006FB7*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 0 - Channel 3 Error
+
+pci:v00008086d00006FB8*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 2/3 Interface
+
+pci:v00008086d00006FB9*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 2/3 Interface
+
+pci:v00008086d00006FBA*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 2/3 Interface
+
+pci:v00008086d00006FBB*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 2/3 Interface
+
+pci:v00008086d00006FBC*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 0/1 Interface
+
+pci:v00008086d00006FBD*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 0/1 Interface
+
+pci:v00008086d00006FBE*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 0/1 Interface
+
+pci:v00008086d00006FBF*
+ ID_MODEL_FROM_DATABASE=Broadwell DDRIO Channel 0/1 Interface
+
+pci:v00008086d00006FC0*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC1*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC2*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC3*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC4*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC5*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC6*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC7*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC8*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FC9*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FCA*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FCB*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FCC*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FCD*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FCE*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FCF*
+ ID_MODEL_FROM_DATABASE=Broadwell Power Control Unit
+
+pci:v00008086d00006FD0*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 0 Thermal Control
+
+pci:v00008086d00006FD1*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 1 Thermal Control
+
+pci:v00008086d00006FD2*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 0 Error
+
+pci:v00008086d00006FD3*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 1 Error
+
+pci:v00008086d00006FD4*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 2 Thermal Control
+
+pci:v00008086d00006FD5*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 3 Thermal Control
+
+pci:v00008086d00006FD6*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 2 Error
+
+pci:v00008086d00006FD7*
+ ID_MODEL_FROM_DATABASE=Broadwell Memory Controller 1 - Channel 3 Error
+
+pci:v00008086d00006FE0*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE1*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE2*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE3*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE4*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE5*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE6*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE7*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE8*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FE9*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FEA*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FEB*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FEC*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FED*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FEE*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FEF*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FF0*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FF1*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FF8*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FF9*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FFA*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FFB*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FFC*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FFD*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
+pci:v00008086d00006FFE*
+ ID_MODEL_FROM_DATABASE=Broadwell Caching Agent
+
 pci:v00008086d00007000*
  ID_MODEL_FROM_DATABASE=82371SB PIIX3 ISA [Natoma/Triton II]
 
@@ -73781,6 +76292,9 @@ pci:v0000D161d00001405*
 pci:v0000D161d00001420*
  ID_MODEL_FROM_DATABASE=Wildcard TE420 quad-span T1/E1/J1 card 3.3V (PCI-Express) (5th gen)
 
+pci:v0000D161d00001820*
+ ID_MODEL_FROM_DATABASE=Wildcard TE820 octal-span T1/E1/J1 card 3.3V (PCI-Express)
+
 pci:v0000D161d00002400*
  ID_MODEL_FROM_DATABASE=Wildcard TDM2400P 24-port analog card
 
@@ -73820,6 +76334,24 @@ pci:v0000D161d0000800A*
 pci:v0000D161d0000800B*
  ID_MODEL_FROM_DATABASE=Wildcard TE134 single-span T1/E1/J1 card
 
+pci:v0000D161d0000800C*
+ ID_MODEL_FROM_DATABASE=Wildcard A8A 8-port analog card
+
+pci:v0000D161d0000800D*
+ ID_MODEL_FROM_DATABASE=Wildcard A8B 8-port analog card (PCI-Express)
+
+pci:v0000D161d0000800E*
+ ID_MODEL_FROM_DATABASE=Wildcard TE235/TE435 quad-span T1/E1/J1 card (PCI-Express)
+
+pci:v0000D161d0000800F*
+ ID_MODEL_FROM_DATABASE=Wildcard A4A 4-port analog card
+
+pci:v0000D161d00008010*
+ ID_MODEL_FROM_DATABASE=Wildcard A4B 4-port analog card (PCI-Express)
+
+pci:v0000D161d00008013*
+ ID_MODEL_FROM_DATABASE=Wildcard TE236/TE436 quad-span T1/E1/J1 card
+
 pci:v0000D161d0000B410*
  ID_MODEL_FROM_DATABASE=Wildcard B410 quad-BRI card
 
index 89cd5b1cfbfc07a465a5a69189226876913aab32..ea1c3e3e612049b04c52c9e17edd468dd15f6e20 100644 (file)
@@ -524,6 +524,9 @@ usb:v03F0p0317*
 usb:v03F0p0324*
  ID_MODEL_FROM_DATABASE=SK-2885 keyboard
 
+usb:v03F0p034A*
+ ID_MODEL_FROM_DATABASE=Elite Keyboard
+
 usb:v03F0p0401*
  ID_MODEL_FROM_DATABASE=ScanJet 5200c
 
@@ -767,6 +770,9 @@ usb:v03F0p1317*
 usb:v03F0p1327*
  ID_MODEL_FROM_DATABASE=iLO Virtual Hub
 
+usb:v03F0p134A*
+ ID_MODEL_FROM_DATABASE=Optical Mouse
+
 usb:v03F0p1405*
  ID_MODEL_FROM_DATABASE=ScanJet 3670
 
@@ -2336,6 +2342,12 @@ usb:v0403pEF10*
 usb:v0403pF070*
  ID_MODEL_FROM_DATABASE=Serial Converter 422/485 [Vardaan VEUSB422R3]
 
+usb:v0403pF0C8*
+ ID_MODEL_FROM_DATABASE=SPROG Decoder Programmer
+
+usb:v0403pF0C9*
+ ID_MODEL_FROM_DATABASE=SPROG-DCC CAN-USB
+
 usb:v0403pF0E9*
  ID_MODEL_FROM_DATABASE=Tagsys L-P101
 
@@ -2642,6 +2654,9 @@ usb:v0409p02B4*
 usb:v0409p02B6*
  ID_MODEL_FROM_DATABASE=Aterm WL300NU-GS 802.11n Wireless Adapter
 
+usb:v0409p02BC*
+ ID_MODEL_FROM_DATABASE=Computer Monitor
+
 usb:v0409p0300*
  ID_MODEL_FROM_DATABASE=LifeTouch Note
 
@@ -5348,6 +5363,9 @@ usb:v0452p0050*
 usb:v0452p0051*
  ID_MODEL_FROM_DATABASE=Integrated Hub
 
+usb:v0452p0100*
+ ID_MODEL_FROM_DATABASE=Control Panel for Leica TCS SP5
+
 usb:v0453*
  ID_VENDOR_FROM_DATABASE=CMD Technology
 
@@ -8759,6 +8777,9 @@ usb:v0480pA009*
 usb:v0480pA00D*
  ID_MODEL_FROM_DATABASE=STOR.E BASICS 500GB
 
+usb:v0480pB001*
+ ID_MODEL_FROM_DATABASE=Stor.E Partner
+
 usb:v0480pD010*
  ID_MODEL_FROM_DATABASE=External Disk 3TB
 
@@ -11222,6 +11243,9 @@ usb:v04A9p3261*
 usb:v04A9p3262*
  ID_MODEL_FROM_DATABASE=PowerShot A2600
 
+usb:v04A9p3263*
+ ID_MODEL_FROM_DATABASE=PowerShot SX275 HS
+
 usb:v04A9p3264*
  ID_MODEL_FROM_DATABASE=PowerShot A1400
 
@@ -11240,6 +11264,9 @@ usb:v04A9p3276*
 usb:v04A9p3277*
  ID_MODEL_FROM_DATABASE=PowerShot SX510 HS
 
+usb:v04A9p3278*
+ ID_MODEL_FROM_DATABASE=PowerShot S200
+
 usb:v04A9p327D*
  ID_MODEL_FROM_DATABASE=Powershot ELPH 115 IS / IXUS 132
 
@@ -11645,6 +11672,9 @@ usb:v04B4p2050*
 usb:v04B4p2830*
  ID_MODEL_FROM_DATABASE=Opera1 DVB-S (cold state)
 
+usb:v04B4p3813*
+ ID_MODEL_FROM_DATABASE=NANO BIOS Programmer
+
 usb:v04B4p4235*
  ID_MODEL_FROM_DATABASE=Monitor 02 Driver
 
@@ -13100,9 +13130,15 @@ usb:v04D8p900A*
 usb:v04D8pC001*
  ID_MODEL_FROM_DATABASE=PicoLCD 20x4
 
+usb:v04D8pF4B5*
+ ID_MODEL_FROM_DATABASE=SmartScope
+
 usb:v04D8pF8DA*
  ID_MODEL_FROM_DATABASE=Hughski Ltd. ColorHug
 
+usb:v04D8pF91C*
+ ID_MODEL_FROM_DATABASE=SPROG IIv3
+
 usb:v04D8pFAFF*
  ID_MODEL_FROM_DATABASE=Dangerous Prototypes BusPirate v4 Bootloader mode
 
@@ -13118,6 +13154,9 @@ usb:v04D8pFBBA*
 usb:v04D8pFBBB*
  ID_MODEL_FROM_DATABASE=DiscFerret Magnetic Disc Analyser (active mode)
 
+usb:v04D8pFC1E*
+ ID_MODEL_FROM_DATABASE=Bachrus Speedometer Interface
+
 usb:v04D8pFC92*
  ID_MODEL_FROM_DATABASE=Open Bench Logic Sniffer
 
@@ -14432,6 +14471,9 @@ usb:v04F2p0403*
 usb:v04F2p0418*
  ID_MODEL_FROM_DATABASE=KU-0418 Tactical Pad
 
+usb:v04F2p0618*
+ ID_MODEL_FROM_DATABASE=RG-0618U Wireless HID Receiver & KG-0609 Wireless Keyboard with Touchpad
+
 usb:v04F2p0760*
  ID_MODEL_FROM_DATABASE=Acer KU-0760 Keyboard
 
@@ -15336,7 +15378,7 @@ usb:v04FCp0171*
  ID_MODEL_FROM_DATABASE=SPCA1527A/SPCA1528 SD card camera (Mass Storage mode)
 
 usb:v04FCp0201*
- ID_MODEL_FROM_DATABASE=RS232C Adapter
+ ID_MODEL_FROM_DATABASE=SPCP825 RS232C Adapter
 
 usb:v04FCp0232*
  ID_MODEL_FROM_DATABASE=Fingerprint
@@ -29036,6 +29078,9 @@ usb:v08E3p0301*
 usb:v08E4*
  ID_VENDOR_FROM_DATABASE=Pioneer Corp.
 
+usb:v08E4p0185*
+ ID_MODEL_FROM_DATABASE=DDJ-WeGO2
+
 usb:v08E5*
  ID_VENDOR_FROM_DATABASE=Litronic
 
@@ -30177,7 +30222,7 @@ usb:v0930p6544*
  ID_MODEL_FROM_DATABASE=Kingston DataTraveler 2.0 Stick (2GB)
 
 usb:v0930p6545*
- ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
+ ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102/2.0 / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
 
 usb:v0931*
  ID_VENDOR_FROM_DATABASE=Harmonic Data Systems, Ltd
@@ -33080,6 +33125,12 @@ usb:v0B48p300D*
 usb:v0B48p300E*
  ID_MODEL_FROM_DATABASE=TT-connect C-2400
 
+usb:v0B48p3012*
+ ID_MODEL_FROM_DATABASE=TT-connect CT2-4650 CI
+
+usb:v0B48p3014*
+ ID_MODEL_FROM_DATABASE=TT-TVStick CT2-4400
+
 usb:v0B49*
  ID_VENDOR_FROM_DATABASE=ASCII Corp.
 
@@ -34086,7 +34137,7 @@ usb:v0BC2p3101*
  ID_MODEL_FROM_DATABASE=FreeAgent XTreme 640GB
 
 usb:v0BC2p3312*
- ID_MODEL_FROM_DATABASE=SRD00F2 [Expansion Desktop Drive 2TB]
+ ID_MODEL_FROM_DATABASE=SRD00F2 Expansion Desktop Drive (STBV)
 
 usb:v0BC2p3320*
  ID_MODEL_FROM_DATABASE=SRD00F2 [Expansion Desktop Drive]
@@ -34109,6 +34160,9 @@ usb:v0BC2p5031*
 usb:v0BC2p5070*
  ID_MODEL_FROM_DATABASE=FreeAgent GoFlex Desk
 
+usb:v0BC2p5071*
+ ID_MODEL_FROM_DATABASE=FreeAgent GoFlex Desk
+
 usb:v0BC2p50A1*
  ID_MODEL_FROM_DATABASE=FreeAgent GoFlex Desk
 
@@ -34133,6 +34187,9 @@ usb:v0BC2pA0A4*
 usb:v0BC2pAB00*
  ID_MODEL_FROM_DATABASE=Slim Portable Drive
 
+usb:v0BC2pAB20*
+ ID_MODEL_FROM_DATABASE=Backup Plus Portable Drive
+
 usb:v0BC3*
  ID_VENDOR_FROM_DATABASE=IPWireless, Inc.
 
@@ -34301,6 +34358,9 @@ usb:v0BDAp0176*
 usb:v0BDAp0178*
  ID_MODEL_FROM_DATABASE=Mass Storage Device
 
+usb:v0BDAp0179*
+ ID_MODEL_FROM_DATABASE=RTL8188ETV Wireless LAN 802.11n Network Adapter
+
 usb:v0BDAp0184*
  ID_MODEL_FROM_DATABASE=RTS5182 Card Reader
 
@@ -34322,6 +34382,9 @@ usb:v0BDAp2832*
 usb:v0BDAp2838*
  ID_MODEL_FROM_DATABASE=RTL2838 DVB-T
 
+usb:v0BDAp5730*
+ ID_MODEL_FROM_DATABASE=HP 2.0MP High Definition Webcam
+
 usb:v0BDAp8150*
  ID_MODEL_FROM_DATABASE=RTL8150 Fast Ethernet Adapter
 
@@ -36012,11 +36075,53 @@ usb:v0CE5p0003*
  ID_MODEL_FROM_DATABASE=Matrix
 
 usb:v0CE9*
- ID_VENDOR_FROM_DATABASE=pico Technology
+ ID_VENDOR_FROM_DATABASE=Pico Technology
 
 usb:v0CE9p1001*
  ID_MODEL_FROM_DATABASE=PicoScope3000 series PC Oscilloscope
 
+usb:v0CE9p1007*
+ ID_MODEL_FROM_DATABASE=PicoScope 2000 series PC Oscilloscope
+
+usb:v0CE9p1008*
+ ID_MODEL_FROM_DATABASE=PicoScope 5000 series PC Oscilloscope
+
+usb:v0CE9p1009*
+ ID_MODEL_FROM_DATABASE=PicoScope 4000 series PC Oscilloscope
+
+usb:v0CE9p100E*
+ ID_MODEL_FROM_DATABASE=PicoScope 6000 series PC Oscilloscope
+
+usb:v0CE9p1012*
+ ID_MODEL_FROM_DATABASE=PicoScope 3000A series PC Oscilloscope
+
+usb:v0CE9p1016*
+ ID_MODEL_FROM_DATABASE=PicoScope 2000A series PC Oscilloscope
+
+usb:v0CE9p1018*
+ ID_MODEL_FROM_DATABASE=PicoScope 4000A series PC Oscilloscope
+
+usb:v0CE9p1200*
+ ID_MODEL_FROM_DATABASE=PicoScope 2000 series PC Oscilloscope
+
+usb:v0CE9p1201*
+ ID_MODEL_FROM_DATABASE=PicoScope 3000 series PC Oscilloscope
+
+usb:v0CE9p1202*
+ ID_MODEL_FROM_DATABASE=PicoScope 4000 series PC Oscilloscope
+
+usb:v0CE9p1203*
+ ID_MODEL_FROM_DATABASE=PicoScope 5000 series PC Oscilloscope
+
+usb:v0CE9p1204*
+ ID_MODEL_FROM_DATABASE=PicoScope 6000 series PC Oscilloscope
+
+usb:v0CE9p1211*
+ ID_MODEL_FROM_DATABASE=PicoScope 3000 series PC Oscilloscope
+
+usb:v0CE9p1212*
+ ID_MODEL_FROM_DATABASE=PicoScope 4000 series PC Oscilloscope
+
 usb:v0CF1*
  ID_VENDOR_FROM_DATABASE=e-Conn Electronic Co., Ltd
 
@@ -36998,6 +37103,9 @@ usb:v0DB0p1020*
 usb:v0DB0p1967*
  ID_MODEL_FROM_DATABASE=Bluetooth Dongle
 
+usb:v0DB0p3713*
+ ID_MODEL_FROM_DATABASE=Primo 73
+
 usb:v0DB0p3801*
  ID_MODEL_FROM_DATABASE=Motorola Bluetooth 2.1+EDR Device
 
@@ -37112,6 +37220,9 @@ usb:v0DB7p0002*
 usb:v0DBA*
  ID_VENDOR_FROM_DATABASE=Digidesign
 
+usb:v0DBAp1000*
+ ID_MODEL_FROM_DATABASE=Mbox 1 [Mbox]
+
 usb:v0DBAp3000*
  ID_MODEL_FROM_DATABASE=Mbox 2
 
@@ -37913,6 +38024,12 @@ usb:v0E6A*
 usb:v0E6Ap0101*
  ID_MODEL_FROM_DATABASE=MA100 [USB-UART Bridge IC]
 
+usb:v0E6Ap030B*
+ ID_MODEL_FROM_DATABASE=Truly Ergonomic Computer Keyboard (Device Firmware Update mode)
+
+usb:v0E6Ap030C*
+ ID_MODEL_FROM_DATABASE=Truly Ergonomic Computer Keyboard
+
 usb:v0E6Ap6001*
  ID_MODEL_FROM_DATABASE=GEMBIRD Flexible keyboard KB-109F-B-DE
 
@@ -39548,6 +39665,12 @@ usb:v1039p0824*
 usb:v1039p2140*
  ID_MODEL_FROM_DATABASE=dsl+ 1100 duo
 
+usb:v103A*
+ ID_VENDOR_FROM_DATABASE=PSA
+
+usb:v103ApF000*
+ ID_MODEL_FROM_DATABASE=Actia Evo XS
+
 usb:v103D*
  ID_VENDOR_FROM_DATABASE=Stanton
 
@@ -39692,6 +39815,9 @@ usb:v1050p0110*
 usb:v1050p0111*
  ID_MODEL_FROM_DATABASE=Yubikey NEO OTP+CCID
 
+usb:v1050p0200*
+ ID_MODEL_FROM_DATABASE=U2F Gnubby
+
 usb:v1050p0211*
  ID_MODEL_FROM_DATABASE=Gnubby
 
@@ -39735,16 +39861,25 @@ usb:v1058p0704*
  ID_MODEL_FROM_DATABASE=Passport External HDD
 
 usb:v1058p070A*
- ID_MODEL_FROM_DATABASE=My Passport Essential SE, My Passport for Mac (WDBAAB)
+ ID_MODEL_FROM_DATABASE=My Passport Essential (WDBAAA), My Passport for Mac (WDBAAB), My Passport Essential SE (WDBABM), My Passport SE for Mac (WDBABW)
+
+usb:v1058p070B*
+ ID_MODEL_FROM_DATABASE=My Passport Elite (WDBAAC)
+
+usb:v1058p070C*
+ ID_MODEL_FROM_DATABASE=My Passport Studio (WDBAAE)
 
 usb:v1058p071A*
- ID_MODEL_FROM_DATABASE=My Passport
+ ID_MODEL_FROM_DATABASE=My Passport Essential (WDBAAA)
+
+usb:v1058p071D*
+ ID_MODEL_FROM_DATABASE=My Passport Studio (WDBALG)
 
 usb:v1058p0730*
  ID_MODEL_FROM_DATABASE=My Passport Essential (WDBACY)
 
 usb:v1058p0740*
- ID_MODEL_FROM_DATABASE=My Passport
+ ID_MODEL_FROM_DATABASE=My Passport Essential (WDBACY)
 
 usb:v1058p0741*
  ID_MODEL_FROM_DATABASE=My Passport Ultra
@@ -39756,22 +39891,22 @@ usb:v1058p0748*
  ID_MODEL_FROM_DATABASE=My Passport (WDBKXH)
 
 usb:v1058p0810*
- ID_MODEL_FROM_DATABASE=My Passport Ultra
+ ID_MODEL_FROM_DATABASE=My Passport Ultra (WDBZFP)
 
 usb:v1058p0900*
  ID_MODEL_FROM_DATABASE=MyBook Essential External HDD
 
 usb:v1058p0901*
- ID_MODEL_FROM_DATABASE=My Book Essential Edition (Green Ring)
+ ID_MODEL_FROM_DATABASE=My Book Essential Edition (Green Ring) (WDG1U)
 
 usb:v1058p0902*
- ID_MODEL_FROM_DATABASE=My Book Pro Edition
+ ID_MODEL_FROM_DATABASE=My Book Pro Edition (WDG1T)
 
 usb:v1058p0903*
  ID_MODEL_FROM_DATABASE=My Book Premium Edition
 
 usb:v1058p0910*
- ID_MODEL_FROM_DATABASE=MyBook Essential External HDD
+ ID_MODEL_FROM_DATABASE=My Book Essential Edition (Green Ring) (WDG1U)
 
 usb:v1058p1001*
  ID_MODEL_FROM_DATABASE=Elements Desktop (WDE1U)
@@ -39786,7 +39921,7 @@ usb:v1058p1021*
  ID_MODEL_FROM_DATABASE=Elements Desktop (WDBAAU)
 
 usb:v1058p1023*
- ID_MODEL_FROM_DATABASE=Elements SE
+ ID_MODEL_FROM_DATABASE=Elements SE Portable (WDBABV)
 
 usb:v1058p1048*
  ID_MODEL_FROM_DATABASE=Elements Portable (WDBU6Y)
@@ -39809,11 +39944,23 @@ usb:v1058p1104*
 usb:v1058p1105*
  ID_MODEL_FROM_DATABASE=My Book Studio II
 
+usb:v1058p1110*
+ ID_MODEL_FROM_DATABASE=My Book Essential (WDBAAF), My Book for Mac (WDBAAG)
+
+usb:v1058p1111*
+ ID_MODEL_FROM_DATABASE=My Book Elite (WDBAAH)
+
+usb:v1058p1112*
+ ID_MODEL_FROM_DATABASE=My Book Studio (WDBAAJ), My Book Studio LX (WDBACH)
+
 usb:v1058p1123*
- ID_MODEL_FROM_DATABASE=My Book 3.0
+ ID_MODEL_FROM_DATABASE=My Book 3.0 (WDBABP)
+
+usb:v1058p1130*
+ ID_MODEL_FROM_DATABASE=My Book Essential (WDBACW)
 
 usb:v1058p1140*
- ID_MODEL_FROM_DATABASE=My Book Essential USB3.0
+ ID_MODEL_FROM_DATABASE=My Book Essential (WDBACW)
 
 usb:v1059*
  ID_VENDOR_FROM_DATABASE=Giesecke & Devrient GmbH
@@ -42098,6 +42245,12 @@ usb:v132Bp2045*
 usb:v132Bp2049*
  ID_MODEL_FROM_DATABASE=Magicolor 2490MF
 
+usb:v133E*
+ ID_VENDOR_FROM_DATABASE=Kemper Digital GmbH
+
+usb:v133Ep0815*
+ ID_MODEL_FROM_DATABASE=Virus TI Desktop
+
 usb:v1342*
  ID_VENDOR_FROM_DATABASE=Mobility
 
@@ -42203,6 +42356,9 @@ usb:v134E*
 usb:v1357*
  ID_VENDOR_FROM_DATABASE=P&E Microcomputer Systems
 
+usb:v1357p0089*
+ ID_MODEL_FROM_DATABASE=OpenSDA - CDC Serial Port
+
 usb:v1357p0503*
  ID_MODEL_FROM_DATABASE=USB-ML-12 HCS08/HCS12 Multilink
 
@@ -42213,7 +42369,7 @@ usb:v1366*
  ID_VENDOR_FROM_DATABASE=SEGGER
 
 usb:v1366p0101*
- ID_MODEL_FROM_DATABASE=J-Link ARM
+ ID_MODEL_FROM_DATABASE=J-Link PLUS
 
 usb:v136B*
  ID_VENDOR_FROM_DATABASE=STEC
@@ -42311,6 +42467,9 @@ usb:v138Ap003C*
 usb:v138Ap003D*
  ID_MODEL_FROM_DATABASE=VFS491
 
+usb:v138Ap003F*
+ ID_MODEL_FROM_DATABASE=VFS495 Fingerprint Reader
+
 usb:v138Ap0050*
  ID_MODEL_FROM_DATABASE=Swipe Fingerprint Sensor
 
@@ -42647,6 +42806,9 @@ usb:v13D3p5122*
 usb:v13D3p5126*
  ID_MODEL_FROM_DATABASE=PC Cam
 
+usb:v13D3p5130*
+ ID_MODEL_FROM_DATABASE=Integrated Webcam
+
 usb:v13D3p5702*
  ID_MODEL_FROM_DATABASE=UVC VGA Webcam
 
@@ -43232,6 +43394,9 @@ usb:v1493p0019*
 usb:v1493p001A*
  ID_MODEL_FROM_DATABASE=Colibri [Ambit2 S]
 
+usb:v1493p001D*
+ ID_MODEL_FROM_DATABASE=Greentit [Ambit2 R]
+
 usb:v1497*
  ID_VENDOR_FROM_DATABASE=Panstrong Company Ltd.
 
@@ -49640,12 +49805,39 @@ usb:v2478*
 usb:v2478p2008*
  ID_MODEL_FROM_DATABASE=U209-000-R Serial Port
 
+usb:v249C*
+ ID_VENDOR_FROM_DATABASE=M2Tech s.r.l.
+
 usb:v2632*
  ID_VENDOR_FROM_DATABASE=TwinMOS
 
 usb:v2632p3209*
  ID_MODEL_FROM_DATABASE=7-in-1 Card Reader
 
+usb:v2639*
+ ID_VENDOR_FROM_DATABASE=Xsens
+
+usb:v2639p0001*
+ ID_MODEL_FROM_DATABASE=MTi-10 IMU
+
+usb:v2639p0002*
+ ID_MODEL_FROM_DATABASE=MTi-20 VRU
+
+usb:v2639p0003*
+ ID_MODEL_FROM_DATABASE=MTi-30 AHRS
+
+usb:v2639p0011*
+ ID_MODEL_FROM_DATABASE=MTi-100 IMU
+
+usb:v2639p0012*
+ ID_MODEL_FROM_DATABASE=MTi-200 VRU
+
+usb:v2639p0013*
+ ID_MODEL_FROM_DATABASE=MTi-300 AHRS
+
+usb:v2639p0017*
+ ID_MODEL_FROM_DATABASE=MTi-G-700 GPS INS
+
 usb:v2650*
  ID_VENDOR_FROM_DATABASE=Electronics For Imaging, Inc. [hex]
 
index c7ff4e4d23cd68d8892ae0ea0b17880f0b454df5..06caba9791ebb57b455090b6c62171c24e63d027 100644 (file)
 #    driver, <vendor> is the firmware-provided string exported
 #    by the kernel DMI modalias.
 #
-#  Scan codes are specified as:
-#    KEYBOARD_KEY_<hex scan code>=<key code identifier>
-#  The scan code should be expressed in hex lowercase and in
-#  full bytes, a multiple of 2 digits. The key codes are retrieved
-#  and normalized from the kernel input API header.
+# Scan codes are specified as:
+#   KEYBOARD_KEY_<hex scan code>=<key code identifier>
+# The scan code should be expressed in hex lowercase. The key codes
+# are retrieved and normalized from the kernel input API header.
 #
-#  A '!' as the first charcter of the key identifier string
-#  will add the scan code to the AT keyboard's list of scan codes
-#  where the driver will synthesize a release event and not expect
-#  it to be generated by the hardware.
+# An '!' as the first character of the key identifier string
+# will add the scan code to the AT keyboard's list of scan codes
+# where the driver will synthesize a release event and not expect
+# it to be generated by the hardware.
 #
 # To debug key presses and access scan code mapping data of
 # an input device use the commonly available tool: evtest(1).
+#
+# To update this file, create a new file
+#   /etc/udev/hwdb.d/70-keyboad.hwdb
+# and add your rules there. To load the new rules execute (as root):
+#   udevadm hwdb --update
+#   udevadm trigger /dev/input/eventXX
+# where /dev/input/eventXX is the keyboard in question. If in
+# doubt, simply use /dev/input/event* to reload all input rules.
+#
+# If your changes are generally applicable, open a bug report on
+#   http://bugs.freedesktop.org/enter_bug.cgi?product=systemd
+# and include your new rules, a description of the device, and the
+# output of
+#   udevadm info /dev/input/eventXX
+# (or /dev/input/event*).
 
 ##########################################
 # Acer
@@ -139,6 +153,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnASUS:pn*
 
 keyboard:name:Asus WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr*
 keyboard:name:Eee PC WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr*
+keyboard:name:Asus Laptop extra buttons:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr*
  KEYBOARD_KEY_6b=f21                                    # Touchpad Toggle
 
 ###########################################################
@@ -166,6 +181,13 @@ keyboard:dmi:bvn*:bvr*:bd*:svnCompaq*:pn*Evo*N*:pvr*
  KEYBOARD_KEY_9e=email
  KEYBOARD_KEY_9f=homepage
 
+keyboard:usb:v049Fp0051d*dc*dsc*dp*ic*isc*ip*in01*
+ KEYBOARD_KEY_0c0011=presentation
+ KEYBOARD_KEY_0c0012=addressbook
+ KEYBOARD_KEY_0c0013=info
+ KEYBOARD_KEY_0c0014=prog1
+ KEYBOARD_KEY_0c0015=messenger
+
 ###########################################################
 # Dell
 ###########################################################
@@ -229,6 +251,15 @@ keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:pvr*
 keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS*:pvr*
  KEYBOARD_KEY_8c=!unknown
 
+# Dell XPS12 9Q33
+keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS12-9Q33*:pvr*
+ KEYBOARD_KEY_88=wlan
+ KEYBOARD_KEY_65=switchvideomode                        # Screen Rotate
+
+# Dell Latitude microphone mute
+keyboard:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*
+ KEYBOARD_KEY_150=f20                                   # Mic mute toggle, should be micmute
+
 ###########################################################
 # Everex
 ###########################################################
@@ -364,7 +395,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*Pavilion*dv7*Notebook*PC:pvr
  KEYBOARD_KEY_b7=print
  KEYBOARD_KEY_c2=media                                  # FIXME: quick play
  KEYBOARD_KEY_c6=break
- KEYBOARD_KEY_94=0
+ KEYBOARD_KEY_94=reserved
 
 # Elitebook
 keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Compaq*:pvr*
@@ -501,7 +532,7 @@ keyboard:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*
  KEYBOARD_KEY_15=volumedown
  KEYBOARD_KEY_16=mute
  KEYBOARD_KEY_17=prog1
- KEYBOARD_KEY_1a=f20
+ KEYBOARD_KEY_1a=f20                                    # Microphone mute button; should be micmute
 
 # ThinkPad Keyboard with TrackPoint
 keyboard:usb:v17EFp6009*
@@ -569,7 +600,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*Y550*:pvr*
 
 keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*U300s*:pvr*
  KEYBOARD_KEY_f1=f21
- KEYBOARD_KEY_ce=f20
+ KEYBOARD_KEY_ce=f20                                    # micmute
 
 keyboard:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:pvr*
  KEYBOARD_KEY_a0=!mute
@@ -805,7 +836,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOLPC:pnXO:*
  KEYBOARD_KEY_f3=f17
  KEYBOARD_KEY_f2=f18
  KEYBOARD_KEY_f1=f19
- KEYBOARD_KEY_f0=f20
+ KEYBOARD_KEY_f0=f20                                    # micmute
  KEYBOARD_KEY_ef=f21
  KEYBOARD_KEY_ee=chat
  KEYBOARD_KEY_e4=chat
@@ -921,7 +952,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr*
 # Series 7 / 9
 keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr*
 keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr*
-keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDEFG]*:pvr*
+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34]*:pvr*
 keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr*
  KEYBOARD_KEY_ce=!prog1                                 # Fn+F1 launch settings
  KEYBOARD_KEY_a0=!mute                                  # Fn+F6 mute
@@ -1071,7 +1102,7 @@ keyboard:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75
  KEYBOARD_KEY_13c=brightnessdown
  KEYBOARD_KEY_13d=brightnessup
  KEYBOARD_KEY_13e=switchvideomode
- KEYBOARD_KEY_13f=touchpad_toggle
+ KEYBOARD_KEY_13f=f21                                   # Touchpad toggle
  KEYBOARD_KEY_9e=wlan
 
 ###########################################################
index aa53ef238027826b3f8d2d24fea27cc18c6aee71..7bd5ad8ef64e6f9d07961a6548fb8e48a9e39ff7 100644 (file)
@@ -42,7 +42,7 @@ AC_DEFUN([CC_CHECK_FLAG_APPEND], [
                  AS_TR_SH([cc_cv_$2_$3]),
           [eval "AS_TR_SH([cc_save_$2])='${$2}'"
            eval "AS_TR_SH([$2])='-Werror $3'"
-           AC_LINK_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
+           AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; } ])],
                           [eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
                           [eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
            eval "AS_TR_SH([$2])='$cc_save_$2'"])
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index 913e12f3247b208f1463c5ef1193713668dee8cd..d4a2a71839e86649ea43fee1697560438408ed1c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191197712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214182199552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
                 process and generate 128-bit ID values. The 128-bit ID
                 values processed and generated by these APIs are a
                 generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
@@ -55,7 +55,7 @@
 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> may be used
                 to format a 128-bit ID in a
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 format string, as shown in the following
                 example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
         sd_id128_t id;
 }</pre><p>Note that new, randomized IDs may be generated
                 with
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
-                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214187744304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214179846512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214191643840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214186132384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
                 </p></div></div></body></html>
index 913e12f3247b208f1463c5ef1193713668dee8cd..d4a2a71839e86649ea43fee1697560438408ed1c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191197712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214182199552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
                 process and generate 128-bit ID values. The 128-bit ID
                 values processed and generated by these APIs are a
                 generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
@@ -55,7 +55,7 @@
 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> may be used
                 to format a 128-bit ID in a
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 format string, as shown in the following
                 example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
         sd_id128_t id;
 }</pre><p>Note that new, randomized IDs may be generated
                 with
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
-                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214187744304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214179846512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214191643840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214186132384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
                 </p></div></div></body></html>
index 913e12f3247b208f1463c5ef1193713668dee8cd..d4a2a71839e86649ea43fee1697560438408ed1c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191197712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214182199552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
                 process and generate 128-bit ID values. The 128-bit ID
                 values processed and generated by these APIs are a
                 generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
@@ -55,7 +55,7 @@
 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> may be used
                 to format a 128-bit ID in a
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 format string, as shown in the following
                 example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
         sd_id128_t id;
 }</pre><p>Note that new, randomized IDs may be generated
                 with
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
-                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214187744304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214179846512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214191643840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214186132384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
                 </p></div></div></body></html>
index 913e12f3247b208f1463c5ef1193713668dee8cd..d4a2a71839e86649ea43fee1697560438408ed1c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191197712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214182199552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
                 process and generate 128-bit ID values. The 128-bit ID
                 values processed and generated by these APIs are a
                 generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
@@ -55,7 +55,7 @@
 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> may be used
                 to format a 128-bit ID in a
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 format string, as shown in the following
                 example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
         sd_id128_t id;
 }</pre><p>Note that new, randomized IDs may be generated
                 with
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
-                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214187744304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214179846512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214191643840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214186132384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
                 </p></div></div></body></html>
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index 8d2ec8cd7db7aaacad26b4debb890fe52c70c8d1..cd0c40ecc2ee36c6e642432a79fcc8e6197bb39d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197612176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186673504"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
                 the read pointer into the journal by one entry. The
                 only argument taken is a journal context object as
                 allocated via
@@ -48,7 +48,7 @@
                 for an example. Similarly,
                 <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
                 may be used for iterating the journal in reverse
-                order.</p></div><div class="refsect1"><a name="idm214197598784"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
+                order.</p></div><div class="refsect1"><a name="idm214186660112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
                 advanced/set back on success or a negative errno-style
                 error code. When the end or beginning of the journal
                 is reached, a number smaller than requested is
                 <code class="function">sd_journal_previous()</code> reach the
                 end/beginning of the journal they will return 0,
                 instead of 1 when they are successful. This should be
-                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214197588368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
+                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214186649728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
                 <code class="function">sd_journal_next_skip()</code> and
                 <code class="function">sd_journal_previous_skip()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197582832"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186643872"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
         }
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197579328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214186640368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 8d2ec8cd7db7aaacad26b4debb890fe52c70c8d1..cd0c40ecc2ee36c6e642432a79fcc8e6197bb39d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197612176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186673504"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
                 the read pointer into the journal by one entry. The
                 only argument taken is a journal context object as
                 allocated via
@@ -48,7 +48,7 @@
                 for an example. Similarly,
                 <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
                 may be used for iterating the journal in reverse
-                order.</p></div><div class="refsect1"><a name="idm214197598784"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
+                order.</p></div><div class="refsect1"><a name="idm214186660112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
                 advanced/set back on success or a negative errno-style
                 error code. When the end or beginning of the journal
                 is reached, a number smaller than requested is
                 <code class="function">sd_journal_previous()</code> reach the
                 end/beginning of the journal they will return 0,
                 instead of 1 when they are successful. This should be
-                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214197588368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
+                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214186649728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
                 <code class="function">sd_journal_next_skip()</code> and
                 <code class="function">sd_journal_previous_skip()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197582832"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186643872"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
         }
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197579328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214186640368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 5eb35328b8224011850385b38c6d4580476e211f..cd5044bbbe7807fa027b16367eb14631cfb493b4 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182872080"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173981200"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
                 the data object associated with a specific field from
                 the current journal entry. It takes four arguments:
                 the journal context object, a string with the field
@@ -77,7 +77,7 @@
                 having to decompress large compressed data objects in
                 full.</p><p><code class="function">sd_journal_get_data_threshold()</code>
                 returns the currently configured data field size
-                threshold.</p></div><div class="refsect1"><a name="idm214182845904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
+                threshold.</p></div><div class="refsect1"><a name="idm214173955088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the current entry does not include the
                 specified field, -ENOENT is returned. If
@@ -92,7 +92,7 @@
                 nothing. <code class="function">sd_journal_set_data_threshold()</code>
                 and <code class="function">sd_journal_get_threshold()</code>
                 return 0 on success or a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214182839856"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
+                code.</p></div><div class="refsect1"><a name="idm214173949040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
                 <code class="function">sd_journal_enumerate_data()</code>,
                 <code class="function">sd_journal_restart_data()</code>,
                 <code class="function">sd_journal_set_data_threshold()</code>
                 <code class="function">sd_journal_get_data_threshold()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214177917392"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214169030976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 for a complete example how to use
                 <code class="function">sd_journal_get_data()</code>.</p><p>Use the
@@ -114,7 +114,7 @@ int print_fields(sd_journal *j) {
         SD_JOURNAL_FOREACH_DATA(j, data, length)
                 printf("%.*s\n", (int) length, data);
 }
-...</pre></div><div class="refsect1"><a name="idm214177912896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+...</pre></div><div class="refsect1"><a name="idm214169026480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 8419624e21ee409961fc0d86d32be581518ef48f..7431591f4fdf231eacea2a5a61c48a13b39957e2 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197431712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178362992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 queries the journal for all unique values the
                 specified field can take. It takes two arguments: the
                 journal to query and the field name to look
                 influenced by matches set with
                 <code class="function">sd_journal_add_match()</code> but this
                 might change in a later version of this
-                software.</p></div><div class="refsect1"><a name="idm214197493904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+                software.</p></div><div class="refsect1"><a name="idm214178349152"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 returns 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_enumerate_unique()</code>
                 returns a positive integer if the next field data has
                 been read, 0 when no more fields are known, or a
                 negative errno-style error
                 code. <code class="function">sd_journal_restart_unique()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214197490352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178338080"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
                 <code class="function">sd_journal_enumerate_unique()</code> and
                 <code class="function">sd_journal_restart_unique()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197485472"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178332928"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
                 <code class="function">SD_JOURNAL_FOREACH_UNIQUE</code> macro
                 to iterate through all values a field of the journal
                 can take. The following example lists all unit names
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
                 printf("%.*s\n", (int) l, (const char*) d);
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197482672"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178328448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index a80243707201a36ec5dc8e69e489291ecea0b275..3580f993048caba4045dd0574d47b8d1adbd66c6 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193392656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179273248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
                 used to submit simple, plain text log entries to the
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 or
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
                 priority value is one of
                 <code class="constant">LOG_EMERG</code>,
                 <code class="constant">LOG_ALERT</code>,
@@ -37,7 +37,7 @@
                 <code class="constant">LOG_INFO</code>,
                 <code class="constant">LOG_DEBUG</code>, as defined in
                 <code class="filename">syslog.h</code>, see
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
@@ -83,7 +83,7 @@
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
                 the message string is passed as <code class="constant">NULL</code> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -103,7 +103,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 invoked. This is implemented with macros. If this is
                 not desired, it can be turned off by defining
                 SD_JOURNAL_SUPPRESS_LOCATION before including
-                <code class="filename">sd-journal.h</code>.</p><p><a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 and <code class="function">sd_journal_print()</code> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -118,32 +118,32 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 log entries that are generated via
                 <code class="function">sd_journal_send()</code>. Using
                 <code class="function">syslog()</code> has the benefit of being
-                more portable.</p></div><div class="refsect1"><a name="idm214193498576"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
+                more portable.</p></div><div class="refsect1"><a name="idm214179230560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
                 variable itself is not altered.</p><p>If
                 <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
                 is not running (the socket is not present), those
-                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214193495056"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
+                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214174312880"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
                 safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
                 </p><p><code class="function">sd_journal_print</code>,
                 <code class="function">sd_journal_printv</code>,
                 <code class="function">sd_journal_send</code>, and
                 <code class="function">sd_journal_perror</code> are
-                not async signal safe.</p></div><div class="refsect1"><a name="idm214193489376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
+                not async signal safe.</p></div><div class="refsect1"><a name="idm214174307824"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
                 <code class="function">sd_journal_printv()</code>,
                 <code class="function">sd_journal_send()</code> and
                 <code class="function">sd_journal_sendv()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188855456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214174302624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
-                        <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
                         <a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
-                        <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
                         <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index 25181fca86b97ca5735e2ca286c2cc13d137eed3..4347527078fbffedf9e6ad6ace2160c50ccaa00e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_listen_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_listen_fds, SD_LISTEN_FDS_START — Check for file descriptors passed by the system manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><pre class="funcsynopsisinfo">#define SD_LISTEN_FDS_START 3</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_listen_fds</b>(</code></td><td>int <var class="pdparam">unset_environment</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197560512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_listen_fds()</code> shall be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_listen_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_listen_fds, SD_LISTEN_FDS_START — Check for file descriptors passed by the system manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><pre class="funcsynopsisinfo">#define SD_LISTEN_FDS_START 3</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_listen_fds</b>(</code></td><td>int <var class="pdparam">unset_environment</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193016000"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_listen_fds()</code> shall be
                 called by a daemon to check for file descriptors
                 passed by the init system as part of the socket-based
                 activation logic.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
@@ -50,7 +50,7 @@
                 datagram or stream socket matters a lot for the most
                 common program logics and should be checked.</p><p>This function call will set the FD_CLOEXEC flag
                 for all passed file descriptors to avoid further
-                inheritance to children of the calling process.</p></div><div class="refsect1"><a name="idm214197624416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
+                inheritance to children of the calling process.</p></div><div class="refsect1"><a name="idm214193005168"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
                 errno-style error code. If
                 <code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code>
                 was not set or was not correctly set for this daemon and
@@ -58,9 +58,9 @@
                 returned. Otherwise, the number of file descriptors
                 passed is returned. The application may find them
                 starting with file descriptor SD_LISTEN_FDS_START,
-                i.e. file descriptor 3.</p></div><div class="refsect1"><a name="idm214197551888"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                i.e. file descriptor 3.</p></div><div class="refsect1"><a name="idm214196903888"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, this function checks whether the
                 <code class="varname">$LISTEN_PID</code> environment variable
                 equals the daemon PID. If not, it returns
                 variable, then sets the FD_CLOEXEC flag for the parsed
                 number of file descriptors starting from
                 SD_LISTEN_FDS_START. Finally, it returns the parsed
-                number.</p></div><div class="refsect1"><a name="idm214197548512"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code>, </span><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID">¶</a></dt><dd><p>Set by the init system
+                number.</p></div><div class="refsect1"><a name="idm214196900512"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code>, </span><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID">¶</a></dt><dd><p>Set by the init system
                                 for supervised processes that use
                                 socket-based activation. This
                                 environment variable specifies the
                                 data
                                 <code class="function">sd_listen_fds()</code>
                                 parses. See above for
-                                details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197690240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196895968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index 1d547c0b9a49aad1a3205757febe14ca652a3d6c..f7f821359f5f1ffbfc1a97c2ec9e8f59346280f1 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "BINFMT\&.D" "5" "" "systemd 215" "binfmt.d"
+.TH "BINFMT\&.D" "5" "" "systemd 217" "binfmt.d"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index cf9e7c34550cb3249e16bfefebf343df8be9f9b9..25d8656d70208c65f734fbea18ebf1e4769e1301 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="binfmt.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>binfmt.d — Configure additional binary formats for
-                executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/binfmt.d/*.conf</code></p><p><code class="filename">/run/binfmt.d/*.conf</code></p><p><code class="filename">/usr/lib/binfmt.d/*.conf</code></p></div><div class="refsect1"><a name="idm214170142016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>At boot,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="binfmt.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>binfmt.d — Configure additional binary formats for
+                executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/binfmt.d/*.conf</code></p><p><code class="filename">/run/binfmt.d/*.conf</code></p><p><code class="filename">/usr/lib/binfmt.d/*.conf</code></p></div><div class="refsect1"><a name="idm214183102976"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>At boot,
                 <a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a>
                 reads configuration files from the above directories
                 to register in the kernel additional binary
-                formats for executables.</p></div><div class="refsect1"><a name="idm214172795840"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>Each file contains a list of binfmt_misc kernel
+                formats for executables.</p></div><div class="refsect1"><a name="idm214183100752"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>Each file contains a list of binfmt_misc kernel
                 binary format rules. Consult <a class="ulink" href="https://www.kernel.org/doc/Documentation/binfmt_misc.txt" target="_top">binfmt_misc.txt</a>
                 for more information on registration of additional
                 binary formats and how to write rules.</p><p>Empty lines and lines beginning with ; and # are
                 recommended way is to place a symlink to
                 <code class="filename">/dev/null</code> in
                 <code class="filename">/etc/binfmt.d/</code> bearing the
-                same filename.</p></div><div class="refsect1"><a name="idm214169046960"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214169046288"></a><p class="title"><b>Example 1. /etc/binfmt.d/wine.conf example:</b></p><div class="example-contents"><pre class="programlisting"># Start WINE on Windows executables
-:DOSWin:M::MZ::/usr/bin/wine:</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214169044640"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                same filename.</p></div><div class="refsect1"><a name="idm214186988656"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214186987984"></a><p class="title"><b>Example 1. /etc/binfmt.d/wine.conf example:</b></p><div class="example-contents"><pre class="programlisting"># Start WINE on Windows executables
+:DOSWin:M::MZ::/usr/bin/wine:</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214186986384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a>,
                         <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>,
-                        <a href="wine.html"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
+                        <a href="http://linux.die.net/man/8/wine"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
                 </p></div></div></body></html>
index 6f8668b478196abe109525da0cba81785608df56..227016616a81ebfbf1a67256c76f8e47696915e4 100644 (file)
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index bb0ea6b0416070f658c8f2213283b3c53d354870..29709942349a423cf403fc38f7ded71810090864 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "BOOTCHART\&.CONF" "5" "" "systemd 215" "bootchart.conf"
+.TH "BOOTCHART\&.CONF" "5" "" "systemd 217" "bootchart.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 1c4fdc71260f5695e82d568746877db985871285..b83cef96d18c630a3eb50b58209472e6cb940bdc 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="bootchart.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootchart.conf — Boot performance analysis graphing tool configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/bootchart.conf</code></p></div><div class="refsect1"><a name="idm214168376384"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When starting, systemd-bootchart will read the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="bootchart.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootchart.conf — Boot performance analysis graphing tool configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/bootchart.conf</code></p></div><div class="refsect1"><a name="idm214181838560"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When starting, systemd-bootchart will read the
                 configuration file <code class="filename">bootchart.conf</code>.
                 This configuration file determines logging parameters and
-                graph output.</p></div><div class="refsect1"><a name="idm214170469440"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="Samples=500"><span class="term"><code class="varname">Samples=500</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=500">¶</a></dt><dd><p>Configure the amount of samples to
+                graph output.</p></div><div class="refsect1"><a name="idm214181836560"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="Samples=500"><span class="term"><code class="varname">Samples=500</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=500">¶</a></dt><dd><p>Configure the amount of samples to
                                 record in total before bootchart exits. Each sample will
                                 record at intervals defined by Frequency=.</p></dd><dt id="Frequency=25"><span class="term"><code class="varname">Frequency=25</code></span><a class="headerlink" title="Permalink to this term" href="#Frequency=25">¶</a></dt><dd><p>Configure the sample log frequency.
                                 This can be a fractional number, but must be larger than
@@ -48,7 +48,7 @@
                                 of processes' PSS memory consumption.</p></dd><dt id="PlotEntropyGraph=no"><span class="term"><code class="varname">PlotEntropyGraph=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotEntropyGraph=no">¶</a></dt><dd><p>If set to yes, enables logging and graphing
                                 of the kernel random entropy pool size.</p></dd><dt id="ScaleX=100"><span class="term"><code class="varname">ScaleX=100</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleX=100">¶</a></dt><dd><p>Horizontal scaling factor for all variable
                                 graph components.</p></dd><dt id="ScaleY=20"><span class="term"><code class="varname">ScaleY=20</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleY=20">¶</a></dt><dd><p>Vertical scaling factor for all variable
-                                graph components.</p></dd><dt id="ControlGroup=no"><span class="term"><code class="varname">ControlGroup=no</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=no">¶</a></dt><dd><p>Display process control group.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170612832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                graph components.</p></dd><dt id="ControlGroup=no"><span class="term"><code class="varname">ControlGroup=no</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=no">¶</a></dt><dd><p>Display process control group.</p></dd></dl></div></div><div class="refsect1"><a name="idm214185714512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
                   </p></div></div></body></html>
index 745f8076f9229eaf161624132767e94741904fba..fd5c66fa93894b038b4b31933218491ef07bba58 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "BOOTCTL" "1" "" "systemd 215" "bootctl"
+.TH "BOOTCTL" "1" "" "systemd 217" "bootctl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 81a4cf5cdb92395393d148c678efa6099721b8a5..fd52b990fea17aec65c62044a226000052433ccf 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="bootctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootctl — Control the firmware and boot manager settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">bootctl</code>  [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm214180461680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>bootctl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="bootctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootctl — Control the firmware and boot manager settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">bootctl</code>  [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm214181115680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>bootctl</strong></span> may be used to
                 query or (in the future) change the firmware and boot
                 manager settings.</p><p>Firmware information is available only on EFI
-                systems.</p><p>Currently, only the <a href="gummiboot.html"><span class="citerefentry"><span class="refentrytitle">gummiboot</span>(8)</span></a> boot
+                systems.</p><p>Currently, only the <span class="citerefentry"><span class="refentrytitle">gummiboot</span>(8)</span> boot
                 manager implements the required boot loader interface
-                to provide complete boot manager information.</p></div><div class="refsect1"><a name="idm214180504032"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+                to provide complete boot manager information.</p></div><div class="refsect1"><a name="idm214181111728"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="status"><span class="term"><span class="command"><strong>status</strong></span></span><a class="headerlink" title="Permalink to this term" href="#status">¶</a></dt><dd><p>Show firmware and boot
                                 manager information about the system,
                                 including secure boot mode status and
                                 selected firmware entry (where
-                                available).</p></dd></dl></div></div><div class="refsect1"><a name="idm214176713504"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214176712320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                available).</p></dd></dl></div></div><div class="refsect1"><a name="idm214181105648"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214181104464"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface" target="_top">Boot loader interface</a>,
                         <a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec" target="_top">Boot loader specification</a>,
                         <a class="ulink" href="http://www.freedesktop.org/wiki/Software/gummiboot/" target="_top">gummiboot</a>
index 5f198471bee666c2ca2f793fe8d7292cb0c62cf1..52540221e98837678a52e9e82b0f0e951ac53e1a 100644 (file)
@@ -64,7 +64,7 @@
                 <para>Firmware information is available only on EFI
                 systems.</para>
 
-                <para>Currently, only the <citerefentry><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry> boot
+                <para>Currently, only the <citerefentry project='gummiboot'><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry> boot
                 manager implements the required boot loader interface
                 to provide complete boot manager information.</para>
         </refsect1>
index 49ea2345d01929104bf736c9ef6b402740b3e7e2..86a08105c9fcd313439de54f6e6790c96dddae6a 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "BOOTUP" "7" "" "systemd 215" "bootup"
+.TH "BOOTUP" "7" "" "systemd 217" "bootup"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 01a51293dbe4532d1084f0002edf44d3c8f945b7..f2d69fc57f55e3b7293eb1bd83725f0ad70c632a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="bootup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootup — System bootup process</p></div><div class="refsect1"><a name="idm214175133552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A number of different components are involved in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="bootup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootup — System bootup process</p></div><div class="refsect1"><a name="idm214198228736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A number of different components are involved in
                 the system boot. Immediately after power-up, the
                 system BIOS will do minimal hardware initialization,
                 and hand control over to a boot loader stored on a
@@ -28,7 +28,7 @@
                 Linux case, this kernel (optionally) extracts and
                 executes an initial RAM disk image (initrd), such as
                 generated by
-                <a href="dracut.html"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>,
+                <a href="http://linux.die.net/man/8/dracut"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>,
                 which looks for the root file system (possibly using
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 for this). After the root file system is found and
@@ -45,7 +45,7 @@
                 unmounts/detaches the root file system and the storage
                 it resides on. As a last step, the system is powered down.</p><p>Additional information about the system boot
                 process may be found in
-                <a href="boot.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214172705392"></a><h2 id="System Manager Bootup">System Manager Bootup<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Bootup">¶</a></h2><p>At boot, the system manager on the OS image is
+                <a href="http://man7.org/linux/man-pages/man7/boot.7.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214194438320"></a><h2 id="System Manager Bootup">System Manager Bootup<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Bootup">¶</a></h2><p>At boot, the system manager on the OS image is
                 responsible for initializing the required file
                 systems, services and drivers that are necessary for
                 operation of the system. On
                 option (see
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>)
                 or by symlinking <code class="filename">default.target</code>
-                to them.</p></div><div class="refsect1"><a name="idm214174200976"></a><h2 id="Bootup in the Initial RAM Disk (initrd)">Bootup in the Initial RAM Disk (initrd)<a class="headerlink" title="Permalink to this headline" href="#Bootup%20in%20the%20Initial%20RAM%20Disk%20(initrd)">¶</a></h2><p>The initial RAM disk implementation (initrd) can
+                to them.</p></div><div class="refsect1"><a name="idm214198321168"></a><h2 id="Bootup in the Initial RAM Disk (initrd)">Bootup in the Initial RAM Disk (initrd)<a class="headerlink" title="Permalink to this headline" href="#Bootup%20in%20the%20Initial%20RAM%20Disk%20(initrd)">¶</a></h2><p>The initial RAM disk implementation (initrd) can
                 be set up using systemd as well. In this case, boot up
                 inside the initrd follows the following
                 structure.</p><p>The default target in the initrd is
                                    initrd-switch-root.service
                                                |
                                                v
-                                     Transition to Host OS</pre></div><div class="refsect1"><a name="idm214171319504"></a><h2 id="System Manager Shutdown">System Manager Shutdown<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Shutdown">¶</a></h2><p>System shutdown with systemd also consists of
+                                     Transition to Host OS</pre></div><div class="refsect1"><a name="idm214198296176"></a><h2 id="System Manager Shutdown">System Manager Shutdown<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Shutdown">¶</a></h2><p>System shutdown with systemd also consists of
                 various target units with some minimal ordering
                 structure applied:</p><pre class="programlisting">                                  (conflicts with  (conflicts with
                                     all system     all file system
 systemd-reboot.service   systemd-poweroff.service   systemd-halt.service   systemd-kexec.service
            |                         |                        |                      |
            v                         v                        v                      v
-    <span class="emphasis"><em>reboot.target</em></span>             <span class="emphasis"><em>poweroff.target</em></span>            <span class="emphasis"><em>halt.target</em></span>           <span class="emphasis"><em>kexec.target</em></span></pre><p>Commonly used system shutdown targets are <span class="emphasis"><em>emphasized</em></span>.</p></div><div class="refsect1"><a name="idm214172155856"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <span class="emphasis"><em>reboot.target</em></span>             <span class="emphasis"><em>poweroff.target</em></span>            <span class="emphasis"><em>halt.target</em></span>           <span class="emphasis"><em>kexec.target</em></span></pre><p>Commonly used system shutdown targets are <span class="emphasis"><em>emphasized</em></span>.</p></div><div class="refsect1"><a name="idm214198288240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="boot.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man7/boot.7.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
                         <a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>,
-                        <a href="dracut.html"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>
+                        <a href="http://linux.die.net/man/8/dracut"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>
                 </p></div></div></body></html>
index 65c2cee70e4a44a06b3edee32da7c36b125c2513..ac6e9f70f7b3a008876bbc8daeaf35b3ec97729b 100644 (file)
@@ -59,7 +59,7 @@
                 Linux case, this kernel (optionally) extracts and
                 executes an initial RAM disk image (initrd), such as
                 generated by
-                <citerefentry><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                <citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                 which looks for the root file system (possibly using
                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 for this). After the root file system is found and
@@ -80,7 +80,7 @@
 
                 <para>Additional information about the system boot
                 process may be found in
-                <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
+                <citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
         </refsect1>
 
         <refsect1>
@@ -308,10 +308,10 @@ systemd-reboot.service   systemd-poweroff.service   systemd-halt.service   syste
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index c52d8ea096806b9ecc691798661352ed6be1b74a..d67a07825cdda19a76a23baa7a8dee27f54ddf6e 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "BUSCTL" "1" "" "systemd 215" "busctl"
+.TH "BUSCTL" "1" "" "systemd 217" "busctl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 3aa48d5bca8db02c5379efaf4ec315764cfd1ba8..688fca32744f3a6678349e934603f73c41fd0640 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="busctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>busctl — Introspect the bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">busctl</code>  [OPTIONS...] [COMMAND] [<em class="replaceable"><code>NAME</code></em>...]</p></div></div><div class="refsect1"><a name="idm214187534608"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>busctl</strong></span> may be used to
-    introspect and monitor the D-Bus bus.</p></div><div class="refsect1"><a name="idm214188850608"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--address=ADDRESS"><span class="term"><code class="option">--address=<em class="replaceable"><code>ADDRESS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--address=ADDRESS">¶</a></dt><dd><p>Connect to the bus specified by
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="busctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>busctl — Introspect the bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">busctl</code>  [OPTIONS...] [COMMAND] [<em class="replaceable"><code>NAME</code></em>...]</p></div></div><div class="refsect1"><a name="idm214179011280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>busctl</strong></span> may be used to
+    introspect and monitor the D-Bus bus.</p></div><div class="refsect1"><a name="idm214179009536"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--address=ADDRESS"><span class="term"><code class="option">--address=<em class="replaceable"><code>ADDRESS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--address=ADDRESS">¶</a></dt><dd><p>Connect to the bus specified by
           <em class="replaceable"><code>ADDRESS</code></em> instead of using suitable
           defaults for either the system or user bus (see
           <code class="option">--system</code> and <code class="option">--user</code>
       <span class="command"><strong>machinectl -H
       <em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p><a name="machine-text"></a>Execute operation on a local container. Specify a
       container name to connect to.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214187800176"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="list"><span class="term"><span class="command"><strong>list</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list">¶</a></dt><dd><p>Show endpoints attached to the bus. This is
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214182885360"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="list"><span class="term"><span class="command"><strong>list</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list">¶</a></dt><dd><p>Show endpoints attached to the bus. This is
         the default if no command is specified.</p></dd><dt id="monitor  NAME"><span class="term"><span class="command"><strong>monitor</strong></span>   [<em class="replaceable"><code>NAME</code></em>...]</span><a class="headerlink" title="Permalink to this term" href="#monitor%20%20NAME">¶</a></dt><dd><p>Dump messages being exchanged. If
         <em class="replaceable"><code>NAME</code></em> is specified, show messages
         to or from this endpoint. Otherwise, show all messages on the
         bus.</p></dd><dt id="status  NAME"><span class="term"><span class="command"><strong>status</strong></span>    <em class="replaceable"><code>NAME</code></em> </span><a class="headerlink" title="Permalink to this term" href="#status%20%20NAME">¶</a></dt><dd><p>Show process information and credentials of a
-        bus endpoint.</p></dd><dt id="help"><span class="term"><span class="command"><strong>help</strong></span></span><a class="headerlink" title="Permalink to this term" href="#help">¶</a></dt><dd><p>Show command syntax help.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188024640"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+        bus endpoint.</p></dd><dt id="help"><span class="term"><span class="command"><strong>help</strong></span></span><a class="headerlink" title="Permalink to this term" href="#help">¶</a></dt><dd><p>Show command syntax help.</p></dd></dl></div></div><div class="refsect1"><a name="idm214182866752"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="dbus-daemon.html"><span class="citerefentry"><span class="refentrytitle">dbus-daemon</span>(1)</span></a>,
       <a class="ulink" href="http://freedesktop.org/wiki/Software/dbus" target="_top">D-Bus</a>,
       <a class="ulink" href="https://code.google.com/p/d-bus/" target="_top">kdbus</a>,
index aa25b7d70f665bf5e8ab13a1e4d78caaea588d9c..d79d830a8811fe8527b1cbf318ddd887233bb0ed 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "COREDUMP\&.CONF" "5" "" "systemd 215" "coredump.conf"
+.TH "COREDUMP\&.CONF" "5" "" "systemd 217" "coredump.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -74,7 +74,7 @@ Enforce limits on the disk space taken up by externally stored coredumps\&.
 \fBMaxUse=\fR
 makes sure that old coredumps are removed as soon as the total disk space taken up by coredumps grows beyond this limit (defaults to 10% of the total disk size)\&.
 \fBKeepFree=\fR
-controls how much disk space to keep free at least (defaults to 15% of the total disk size)\&. Note that the disk space used by coredumps might temporarily exceed these limits while coredumps are processed\&. Note that old coredumps are also removed based on on time via
+controls how much disk space to keep free at least (defaults to 15% of the total disk size)\&. Note that the disk space used by coredumps might temporarily exceed these limits while coredumps are processed\&. Note that old coredumps are also removed based on time via
 \fBsystemd-tmpfiles\fR(8)\&.
 .RE
 .SH "SEE ALSO"
index b9e06c6924dd044270c8e3516d3398157c3a0fd3..0f609ef2fd0fca2b29a37e304c85adec38618cdd 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="coredump.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredump.conf — Coredump storage configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/coredump.conf</code></p></div><div class="refsect1"><a name="idm214179163936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>This file configures the behaviour of <span class="command"><strong>systemd-coredump</strong></span>,
-    a handler for core dumps invoked by the kernel.</p></div><div class="refsect1"><a name="idm214183007376"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="coredump.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredump.conf — Coredump storage configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/coredump.conf</code></p></div><div class="refsect1"><a name="idm214198160864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>This file configures the behaviour of <span class="command"><strong>systemd-coredump</strong></span>,
+    a handler for core dumps invoked by the kernel.</p></div><div class="refsect1"><a name="idm214198159056"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
     "<code class="literal">[Coredump]</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="Storage="><span class="term"><code class="varname">Storage=</code></span><a class="headerlink" title="Permalink to this term" href="#Storage=">¶</a></dt><dd><p>Controls where to store cores. One of
         "<code class="literal">none</code>", "<code class="literal">external</code>",
         "<code class="literal">journal</code>", and "<code class="literal">both</code>". When
@@ -49,8 +49,8 @@
         to 15% of the total disk size). Note that the disk space used
         by coredumps might temporarily exceed these limits while
         coredumps are processed. Note that old coredumps are also
-        removed based on on time via
-        <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183150560"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+        removed based on time via
+        <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214202036848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
       <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>,
       <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>
index fa55eb9d253430437150a4060160201007893bc2..0c9160e2cc3f754e9eb6da4282cb6de65ed7f4b8 100644 (file)
         to 15% of the total disk size). Note that the disk space used
         by coredumps might temporarily exceed these limits while
         coredumps are processed. Note that old coredumps are also
-        removed based on on time via
+        removed based on time via
         <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para></listitem>
       </varlistentry>
     </variablelist>
index 3af6c6bff5c00095b0762b77b4a30192381a007c..529192a9ca96db8427ebe3ed1556ae1ab0be8535 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "COREDUMPCTL" "1" "" "systemd 215" "coredumpctl"
+.TH "COREDUMPCTL" "1" "" "systemd 217" "coredumpctl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -120,7 +120,58 @@ General journalctl predicates (see
 .SH "EXIT STATUS"
 .PP
 On success, 0 is returned; otherwise, a non\-zero failure code is returned\&. Not finding any matching coredumps is treated as failure\&.
+.SH "EXAMPLES"
+.PP
+\fBExample\ \&1.\ \&List all the coredumps of a program named foo\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+# coredumpctl list foo
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBExample\ \&2.\ \&Invoke gdb on the last coredump\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+# coredumpctl gdb
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBExample\ \&3.\ \&Show information about a process that dumped core, matching by its PID 6654\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+# coredumpctl info 6654
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBExample\ \&4.\ \&Extract the last coredump of /usr/bin/bar to a file named bar.coredump\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+# coredumpctl \-o bar\&.coredump dump /usr/bin/bar
+.fi
+.if n \{\
+.RE
+.\}
 .SH "SEE ALSO"
 .PP
+\fBsystemd-coredump\fR(8),
+\fBcoredump.conf\fR(5),
 \fBsystemd-journald.service\fR(8),
 \fBgdb\fR(1)
index d302eb63347866d76c461f9cfda40fc96e5dedfc..f4d9c307f483a15ec151717600d74eecc11217ff 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="coredumpctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredumpctl — Retrieve coredumps from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">coredumpctl</code>  [OPTIONS...] {COMMAND} [PID|COMM|EXE|MATCH...]</p></div></div><div class="refsect1"><a name="idm214194795776"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>coredumpctl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="coredumpctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredumpctl — Retrieve coredumps from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">coredumpctl</code>  [OPTIONS...] {COMMAND} [PID|COMM|EXE|MATCH...]</p></div></div><div class="refsect1"><a name="idm214185460480"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>coredumpctl</strong></span> may be used to
                 retrieve coredumps from
-                <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214194840048"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend">¶</a></dt><dd><p>Do not print the column headers.
+                <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214185457936"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend">¶</a></dt><dd><p>Do not print the column headers.
                                 </p></dd><dt id="-1"><span class="term"><code class="option">-1</code></span><a class="headerlink" title="Permalink to this term" href="#-1">¶</a></dt><dd><p>Show information of a
                                 single coredump only, instead of
                                 listing all known coredumps.
@@ -44,7 +44,7 @@
                                 </p></dd><dt id="gdb"><span class="term"><span class="command"><strong>gdb</strong></span></span><a class="headerlink" title="Permalink to this term" href="#gdb">¶</a></dt><dd><p>Invoke the GNU
                                 debugger on the last coredump matching
                                 specified characteristics.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214194937296"></a><h2 id="Matching">Matching<a class="headerlink" title="Permalink to this headline" href="#Matching">¶</a></h2><p>A match can be:</p><div class="variablelist"><dl class="variablelist"><dt id="PID"><span class="term"><em class="replaceable"><code>PID</code></em></span><a class="headerlink" title="Permalink to this term" href="#PID">¶</a></dt><dd><p>Process ID of the
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214189336496"></a><h2 id="Matching">Matching<a class="headerlink" title="Permalink to this headline" href="#Matching">¶</a></h2><p>A match can be:</p><div class="variablelist"><dl class="variablelist"><dt id="PID"><span class="term"><em class="replaceable"><code>PID</code></em></span><a class="headerlink" title="Permalink to this term" href="#PID">¶</a></dt><dd><p>Process ID of the
                                 process that dumped
                                 core. An integer.</p></dd><dt id="COMM"><span class="term"><em class="replaceable"><code>COMM</code></em></span><a class="headerlink" title="Permalink to this term" href="#COMM">¶</a></dt><dd><p>Name of the executable
                                 (matches <code class="option">COREDUMP_COMM=</code>).
                                 </p></dd><dt id="MATCH"><span class="term"><em class="replaceable"><code>MATCH</code></em></span><a class="headerlink" title="Permalink to this term" href="#MATCH">¶</a></dt><dd><p>General journalctl predicates
                                 (see <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>).
                                 Must contain an equal sign.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214194927856"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned; otherwise, a non-zero failure
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214189319792"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned; otherwise, a non-zero failure
                 code is returned. Not finding any matching coredumps is treated
                 as failure.
-                </p></div><div class="refsect1"><a name="idm214194926480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                </p></div><div class="refsect1"><a name="idm214189318416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214189317744"></a><p class="title"><b>Example 1. List all the coredumps of a program named foo</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl list foo</pre></div></div><br class="example-break"><div class="example"><a name="idm214189316288"></a><p class="title"><b>Example 2. Invoke gdb on the last coredump</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl gdb</pre></div></div><br class="example-break"><div class="example"><a name="idm214189314784"></a><p class="title"><b>Example 3. Show information about a process that dumped core, matching by its PID 6654</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl info 6654</pre></div></div><br class="example-break"><div class="example"><a name="idm214189313328"></a><p class="title"><b>Example 4. Extract the last coredump of /usr/bin/bar to a file named bar.coredump</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl -o bar.coredump dump /usr/bin/bar</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214189311776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
+                        <a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>,
                         <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
-                        <a href="gdb.html"><span class="citerefentry"><span class="refentrytitle">gdb</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/gdb.1.html"><span class="citerefentry"><span class="refentrytitle">gdb</span>(1)</span></a>
                 </p></div></div></body></html>
index 73d1b8435fd32fd8f7ab01a35dec2ced377d2cb4..ed84621d3798dcaeb1faee0529373aee49bdff91 100644 (file)
                 </para>
         </refsect1>
 
+        <refsect1>
+                <title>Examples</title>
+
+                <example>
+                        <title>List all the coredumps of a program named foo</title>
+
+                        <programlisting># coredumpctl list foo</programlisting>
+                </example>
+
+                <example>
+                        <title>Invoke gdb on the last coredump</title>
+
+                        <programlisting># coredumpctl gdb</programlisting>
+                </example>
+
+                <example>
+                        <title>Show information about a process that dumped core, matching by its PID 6654</title>
+
+                        <programlisting># coredumpctl info 6654</programlisting>
+                </example>
+
+                <example>
+                        <title>Extract the last coredump of /usr/bin/bar to a file named bar.coredump</title>
+
+                        <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
+                </example>
+        </refsect1>
+
         <refsect1>
                 <title>See Also</title>
                 <para>
+                        <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 9ccf1e48a48eb1a947b47ff5c78dc27691f08cb8..394337a95c33e33f18e7a398d68302b918355a5e 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "CRYPTTAB" "5" "" "systemd 215" "crypttab"
+.TH "CRYPTTAB" "5" "" "systemd 217" "crypttab"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -196,6 +196,15 @@ Use TrueCrypt in system encryption mode\&. This option implies
 Specifies the timeout for querying for a password\&. If no unit is specified, seconds is used\&. Supported units are s, ms, us, min, h, d\&. A timeout of 0 waits indefinitely (which is the default)\&.
 .RE
 .PP
+\fBx\-systemd\&.device\-timeout=\fR
+.RS 4
+Specifies how long systemd should wait for a device to show up before giving up on the entry\&. The argument is a time in seconds or explicitly specifified units of
+"s",
+"min",
+"h",
+"ms"\&.
+.RE
+.PP
 \fBtmp\fR
 .RS 4
 The encrypted block device will be prepared for using it as
index 0e873011fce0742f3ae7d7d22be97f6970d979c1..72d9e02612bbc02933363e72b8d90a65904b7e92 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="crypttab"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>crypttab — Configuration for encrypted block devices</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/crypttab</code></p></div><div class="refsect1"><a name="idm214179029408"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/crypttab</code> file
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="crypttab"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>crypttab — Configuration for encrypted block devices</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/crypttab</code></p></div><div class="refsect1"><a name="idm214195524688"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/crypttab</code> file
                 describes encrypted block devices that are set up
                 during system boot.</p><p>Empty lines and lines starting with the "<code class="literal">#</code>"
                 character are ignored.  Each of the remaining lines
@@ -97,7 +97,7 @@
                                 be used as a swap device, and will be formatted
                                 accordingly after setting up the encrypted
                                 block device, with
-                                <a href="mkswap.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>.
+                                <a href="http://man7.org/linux/man-pages/man8/mkswap.8.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>.
                                 This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">swap</code>
                                 option will destroy the contents of the named
                                 partition during every boot, so make sure the
                                 querying for a password. If no unit is
                                 specified, seconds is used. Supported units are
                                 s, ms, us, min, h, d. A timeout of 0 waits
-                                indefinitely (which is the default).</p></dd><dt id="tmp"><span class="term"><code class="option">tmp</code></span><a class="headerlink" title="Permalink to this term" href="#tmp">¶</a></dt><dd><p>The encrypted block device will
+                                indefinitely (which is the default).</p></dd><dt id="x-systemd.device-timeout="><span class="term"><code class="option">x-systemd.device-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.device-timeout=">¶</a></dt><dd><p>Specifies how long
+                                systemd should wait for a device to
+                                show up before giving up on the
+                                entry. The argument is a time in
+                                seconds or explicitly specifified
+                                units of "<code class="literal">s</code>",
+                                "<code class="literal">min</code>",
+                                "<code class="literal">h</code>",
+                                "<code class="literal">ms</code>".
+                                </p></dd><dt id="tmp"><span class="term"><code class="option">tmp</code></span><a class="headerlink" title="Permalink to this term" href="#tmp">¶</a></dt><dd><p>The encrypted block device will
                                 be prepared for using it as <code class="filename">/tmp</code>;
                                 it will be formatted using
-                                <a href="mke2fs.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>.
+                                <a href="http://man7.org/linux/man-pages/man8/mke2fs.8.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>.
                                 This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">tmp</code>
                                 option will destroy the contents of the named
                                 partition during every boot, so make sure the
                                 prevent typos.</p></dd></dl></div><p>At early boot and when the system manager
                 configuration is reloaded, this file is translated into
                 native systemd units
-                by <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214174457600"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214174456960"></a><p class="title"><b>Example 1. /etc/crypttab example</b></p><div class="example-contents"><p>Set up four encrypted block devices. One using
+                by <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214194423648"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214194423008"></a><p class="title"><b>Example 1. /etc/crypttab example</b></p><div class="example-contents"><p>Set up four encrypted block devices. One using
                         LUKS for normal storage, another one for usage as a swap
                         device and two TrueCrypt volumes.</p><pre class="programlisting">luks       UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
 swap       /dev/sda7       /dev/urandom             swap
 truecrypt  /dev/sda2       /etc/container_password  tcrypt
-hidden     /mnt/tc_hidden  /dev/null                tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214174454576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+hidden     /mnt/tc_hidden  /dev/null                tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214194420624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a>,
                         <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>,
                         <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>,
-                        <a href="mkswap.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>,
-                        <a href="mke2fs.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/mkswap.8.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man8/mke2fs.8.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>
                 </p></div></div></body></html>
index 9dbf1546b1b9c85b25ad6a8c0542c6b1da7f7543..42caf34308b210ae6c98d24fc813a51bdd7ddc48 100644 (file)
                                 be used as a swap device, and will be formatted
                                 accordingly after setting up the encrypted
                                 block device, with
-                                <citerefentry><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+                                <citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
                                 This option implies <option>plain</option>.</para>
 
                                 <para>WARNING: Using the <option>swap</option>
                                 indefinitely (which is the default).</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>x-systemd.device-timeout=</option></term>
+
+                                <listitem><para>Specifies how long
+                                systemd should wait for a device to
+                                show up before giving up on the
+                                entry. The argument is a time in
+                                seconds or explicitly specifified
+                                units of <literal>s</literal>,
+                                <literal>min</literal>,
+                                <literal>h</literal>,
+                                <literal>ms</literal>.
+                                </para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><option>tmp</option></term>
 
                                 <listitem><para>The encrypted block device will
                                 be prepared for using it as <filename>/tmp</filename>;
                                 it will be formatted using
-                                <citerefentry><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+                                <citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
                                 This option implies <option>plain</option>.</para>
 
                                 <para>WARNING: Using the <option>tmp</option>
@@ -380,8 +395,8 @@ hidden     /mnt/tc_hidden  /dev/null                tcrypt-hidden,tcrypt-keyfile
                         <citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 060af2e56a756a7ed1add210d0911a06f2fac530..8bcc5f92d9faa7473eba81eb5bbe28341cd7660a 100644 (file)
@@ -24,7 +24,7 @@
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
 
 <!-- translate man page references to links to html pages -->
-<xsl:template match="citerefentry">
+<xsl:template match="citerefentry[not(@project)]">
   <a>
     <xsl:attribute name="href">
       <xsl:value-of select="refentrytitle"/><xsl:text>.html</xsl:text>
   </a>
 </xsl:template>
 
+<xsl:template match="citerefentry[@project='man-pages'] | citerefentry[manvolnum='2'] | citerefentry[manvolnum='4']">
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>http://man7.org/linux/man-pages/man</xsl:text>
+      <xsl:value-of select="manvolnum"/>
+      <xsl:text>/</xsl:text>
+      <xsl:value-of select="refentrytitle"/>
+      <xsl:text>.</xsl:text>
+      <xsl:value-of select="manvolnum"/>
+      <xsl:text>.html</xsl:text>
+    </xsl:attribute>
+    <xsl:call-template name="inline.charseq"/>
+  </a>
+</xsl:template>
+
+<xsl:template match="citerefentry[@project='die-net']">
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>http://linux.die.net/man/</xsl:text>
+      <xsl:value-of select="manvolnum"/>
+      <xsl:text>/</xsl:text>
+      <xsl:value-of select="refentrytitle"/>
+    </xsl:attribute>
+    <xsl:call-template name="inline.charseq"/>
+  </a>
+</xsl:template>
+
+<xsl:template match="citerefentry[@project='archlinux']">
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>https://www.archlinux.org/</xsl:text>
+      <xsl:value-of select="refentrytitle"/>
+      <xsl:text>/</xsl:text>
+      <xsl:value-of select="refentrytitle"/>
+      <xsl:text>.</xsl:text>
+      <xsl:value-of select="manvolnum"/>
+      <xsl:text>.html</xsl:text>
+    </xsl:attribute>
+    <xsl:call-template name="inline.charseq"/>
+  </a>
+</xsl:template>
+
+<xsl:template match="citerefentry[@project='gummiboot']">
+  <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
 <xsl:template match="refsect1/title|refsect1/info/title">
   <!-- the ID is output in the block.object call for refsect1 -->
   <h2>
index 91ec24700e92cf589848f2b904bcef041ce8a1dc..26bcc91dd3108ab757944a540ba62f44e15d40a5 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "DAEMON" "7" "" "systemd 215" "daemon"
+.TH "DAEMON" "7" "" "systemd 217" "daemon"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -40,7 +40,8 @@ When a traditional SysV daemon starts, it should execute the following steps as
 Close all open file descriptors except standard input, output, and error (i\&.e\&. the first three file descriptors 0, 1, 2)\&. This ensures that no accidentally passed file descriptor stays around in the daemon process\&. On Linux, this is best implemented by iterating through
 /proc/self/fd, with a fallback of iterating from file descriptor 3 to the value returned by
 \fBgetrlimit()\fR
-for RLIMIT_NOFILE\&.
+for
+\fBRLIMIT_NOFILE\fR\&.
 .RE
 .sp
 .RS 4
@@ -51,7 +52,9 @@ for RLIMIT_NOFILE\&.
 .sp -1
 .IP "  2." 4.2
 .\}
-Reset all signal handlers to their default\&. This is best done by iterating through the available signals up to the limit of _NSIG and resetting them to
+Reset all signal handlers to their default\&. This is best done by iterating through the available signals up to the limit of
+\fB_NSIG\fR
+and resetting them to
 \fBSIG_DFL\fR\&.
 .RE
 .sp
@@ -360,7 +363,9 @@ interface\&.
 Instead of using the
 \fBsyslog()\fR
 call to log directly to the system syslog service, a new\-style daemon may choose to simply log to standard error via
-\fBfprintf()\fR, which is then forwarded to syslog by the init system\&. If log priorities are necessary, these can be encoded by prefixing individual log lines with strings like "<4>" (for log priority 4 "WARNING" in the syslog priority scheme), following a similar style as the Linux kernel\*(Aqs
+\fBfprintf()\fR, which is then forwarded to syslog by the init system\&. If log priorities are necessary, these can be encoded by prefixing individual log lines with strings like
+"<4>"
+(for log priority 4 "WARNING" in the syslog priority scheme), following a similar style as the Linux kernel\*(Aqs
 \fBprintk()\fR
 priority system\&. For details, see
 \fBsd-daemon\fR(3)
@@ -462,7 +467,9 @@ units, as described in
 .PP
 Other forms of activation have been suggested and implemented in some systems\&. However, there are often simpler or better alternatives, or they can be put together of combinations of the schemes above\&. Example: Sometimes, it appears useful to start daemons or
 \&.socket
-units when a specific IP address is configured on a network interface, because network sockets shall be bound to the address\&. However, an alternative to implement this is by utilizing the Linux IP_FREEBIND socket option, as accessible via
+units when a specific IP address is configured on a network interface, because network sockets shall be bound to the address\&. However, an alternative to implement this is by utilizing the Linux
+\fBIP_FREEBIND\fR
+socket option, as accessible via
 \fIFreeBind=yes\fR
 in systemd socket files (see
 \fBsystemd.socket\fR(5)
index 07e1ec50dc65c5f1d7afa0fe9aff3fb81b3bcba3..361faebe64c632fb53c36a07e93f501777466f2a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>daemon — Writing and packaging system daemons</p></div><div class="refsect1"><a name="idm214179512176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A daemon is a service process that runs in the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>daemon — Writing and packaging system daemons</p></div><div class="refsect1"><a name="idm214179837680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A daemon is a service process that runs in the
                 background and supervises the system or provides
                 functionality to other processes. Traditionally,
                 daemons are implemented following a scheme originating
@@ -29,7 +29,7 @@
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>. This
                 manual page covers both schemes, and in
                 particular includes recommendations for daemons that
-                shall be included in the systemd init system.</p><div class="refsect2"><a name="idm214177063248"></a><h3 id="SysV Daemons">SysV Daemons<a class="headerlink" title="Permalink to this headline" href="#SysV%20Daemons">¶</a></h3><p>When a traditional SysV daemon
+                shall be included in the systemd init system.</p><div class="refsect2"><a name="idm214176051712"></a><h3 id="SysV Daemons">SysV Daemons<a class="headerlink" title="Permalink to this headline" href="#SysV%20Daemons">¶</a></h3><p>When a traditional SysV daemon
                         starts, it should execute the following steps
                         as part of the initialization. Note that these
                         steps are unnecessary for new-style daemons (see below),
                                 with a fallback of iterating from file
                                 descriptor 3 to the value returned by
                                 <code class="function">getrlimit()</code> for
-                                RLIMIT_NOFILE.</p></li><li class="listitem"><p>Reset all signal
+                                <code class="constant">RLIMIT_NOFILE</code>.
+                                </p></li><li class="listitem"><p>Reset all signal
                                 handlers to their default. This is
                                 best done by iterating through the
                                 available signals up to the limit of
-                                _NSIG and resetting them to
+                                <code class="constant">_NSIG</code> and resetting them to
                                 <code class="constant">SIG_DFL</code>.</p></li><li class="listitem"><p>Reset the signal mask
                                 using
                                 <code class="function">sigprocmask()</code>.</p></li><li class="listitem"><p>Sanitize the
                         behavior optional and configurable via a
                         command line argument to ease debugging as
                         well as to simplify integration into systems
-                        using systemd.</p></div><div class="refsect2"><a name="idm214175728384"></a><h3 id="New-Style Daemons">New-Style Daemons<a class="headerlink" title="Permalink to this headline" href="#New-Style%20Daemons">¶</a></h3><p>Modern services for Linux should be
+                        using systemd.</p></div><div class="refsect2"><a name="idm214179921888"></a><h3 id="New-Style Daemons">New-Style Daemons<a class="headerlink" title="Permalink to this headline" href="#New-Style%20Daemons">¶</a></h3><p>Modern services for Linux should be
                         implemented as new-style daemons. This makes it
                         easier to supervise and control them at
                         runtime and simplifies their
                                 init system. If log priorities are
                                 necessary, these can be encoded by
                                 prefixing individual log lines with
-                                strings like "&lt;4&gt;" (for log
+                                strings like "<code class="literal">&lt;4&gt;</code>" (for log
                                 priority 4 "WARNING" in the syslog
                                 priority scheme), following a similar
                                 style as the Linux kernel's
                                 and
                                 <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.</p></li></ol></div><p>These recommendations are similar but
                         not identical to the <a class="ulink" href="https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" target="_top">Apple
-                        MacOS X Daemon Requirements</a>.</p></div></div><div class="refsect1"><a name="idm214178358368"></a><h2 id="Activation">Activation<a class="headerlink" title="Permalink to this headline" href="#Activation">¶</a></h2><p>New-style init systems provide multiple
+                        MacOS X Daemon Requirements</a>.</p></div></div><div class="refsect1"><a name="idm214174974720"></a><h2 id="Activation">Activation<a class="headerlink" title="Permalink to this headline" href="#Activation">¶</a></h2><p>New-style init systems provide multiple
                 additional mechanisms to activate services, as
                 detailed below. It is common that services are
                 configured to be activated via more than one mechanism
                 request is lost because client requests will be queued
                 by the bus system (in case of D-Bus) or the kernel (in
                 case of sockets) until the activation is
-                completed.</p><div class="refsect2"><a name="idm214177474608"></a><h3 id="Activation on Boot">Activation on Boot<a class="headerlink" title="Permalink to this headline" href="#Activation%20on%20Boot">¶</a></h3><p>Old-style daemons are usually activated
+                completed.</p><div class="refsect2"><a name="idm214174971488"></a><h3 id="Activation on Boot">Activation on Boot<a class="headerlink" title="Permalink to this headline" href="#Activation%20on%20Boot">¶</a></h3><p>Old-style daemons are usually activated
                         exclusively on boot (and manually by the
                         administrator) via SysV init scripts, as
                         detailed in the <a class="ulink" href="http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html" target="_top">LSB
                         for details about the
                         <code class="filename">.wants/</code> directories, and
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>
-                        for details about the two boot targets.</p></div><div class="refsect2"><a name="idm214175963792"></a><h3 id="Socket-Based Activation">Socket-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Socket-Based%20Activation">¶</a></h3><p>In order to maximize the possible
+                        for details about the two boot targets.</p></div><div class="refsect2"><a name="idm214174963776"></a><h3 id="Socket-Based Activation">Socket-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Socket-Based%20Activation">¶</a></h3><p>In order to maximize the possible
                         parallelization and robustness and simplify
                         configuration and development, it is
                         recommended for all new-style daemons that
                         example from
                         <code class="filename">multi-user.target</code> or
                         suchlike) when one is installed in
-                        <code class="filename">sockets.target</code>.</p></div><div class="refsect2"><a name="idm214176756752"></a><h3 id="Bus-Based Activation">Bus-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Bus-Based%20Activation">¶</a></h3><p>When the D-Bus IPC system is used for
+                        <code class="filename">sockets.target</code>.</p></div><div class="refsect2"><a name="idm214174948384"></a><h3 id="Bus-Based Activation">Bus-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Bus-Based%20Activation">¶</a></h3><p>When the D-Bus IPC system is used for
                         communication with clients, new-style daemons
                         should employ bus activation so that they are
                         automatically activated when a client
                         <code class="filename">rtkit-daemon.service</code>. This
                         is needed to make sure that the daemon is
                         started in a race-free fashion when activated
-                        via multiple mechanisms simultaneously.</p></div><div class="refsect2"><a name="idm214178044384"></a><h3 id="Device-Based Activation">Device-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Device-Based%20Activation">¶</a></h3><p>Often, daemons that manage a particular
+                        via multiple mechanisms simultaneously.</p></div><div class="refsect2"><a name="idm214174943904"></a><h3 id="Device-Based Activation">Device-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Device-Based%20Activation">¶</a></h3><p>Often, daemons that manage a particular
                         type of hardware should be activated only when
                         the hardware of the respective kind is plugged
                         in or otherwise becomes available. In a
                         <span class="command"><strong>enable</strong></span> of
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
                         instead of manipulating the udev
-                        ruleset.</p></div><div class="refsect2"><a name="idm214178026080"></a><h3 id="Path-Based Activation">Path-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Path-Based%20Activation">¶</a></h3><p>Often, runtime of daemons processing
+                        ruleset.</p></div><div class="refsect2"><a name="idm214174935040"></a><h3 id="Path-Based Activation">Path-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Path-Based%20Activation">¶</a></h3><p>Often, runtime of daemons processing
                         spool files or directories (such as a printing
                         system) can be delayed until these file system
                         objects change state, or become
                         path-based activation configured in
                         <code class="filename">.path</code> units, as outlined
                         in
-                        <a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>.</p></div><div class="refsect2"><a name="idm214176776224"></a><h3 id="Timer-Based Activation">Timer-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Timer-Based%20Activation">¶</a></h3><p>Some daemons that implement clean-up
+                        <a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>.</p></div><div class="refsect2"><a name="idm214174931872"></a><h3 id="Timer-Based Activation">Timer-Based Activation<a class="headerlink" title="Permalink to this headline" href="#Timer-Based%20Activation">¶</a></h3><p>Some daemons that implement clean-up
                         jobs that are intended to be executed in
                         regular intervals benefit from timer-based
                         activation. In systemd, this is implemented
                         via <code class="filename">.timer</code> units, as
                         described in
-                        <a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a>.</p></div><div class="refsect2"><a name="idm214176252752"></a><h3 id="Other Forms of Activation">Other Forms of Activation<a class="headerlink" title="Permalink to this headline" href="#Other%20Forms%20of%20Activation">¶</a></h3><p>Other forms of activation have been
+                        <a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a>.</p></div><div class="refsect2"><a name="idm214174928944"></a><h3 id="Other Forms of Activation">Other Forms of Activation<a class="headerlink" title="Permalink to this headline" href="#Other%20Forms%20of%20Activation">¶</a></h3><p>Other forms of activation have been
                         suggested and implemented in some
                         systems. However, there are often simpler or
                         better alternatives, or they can be put
                         on a network interface, because network
                         sockets shall be bound to the
                         address. However, an alternative to implement
-                        this is by utilizing the Linux IP_FREEBIND
+                        this is by utilizing the Linux <code class="constant">IP_FREEBIND</code>
                         socket option, as accessible via
                         <code class="varname">FreeBind=yes</code> in systemd
                         socket files (see
                         activation to schedule background jobs during
                         runtime and with minimal impact on the system,
                         and remove it from the boot phase
-                        itself.</p></div></div><div class="refsect1"><a name="idm214176372608"></a><h2 id="Integration with Systemd">Integration with Systemd<a class="headerlink" title="Permalink to this headline" href="#Integration%20with%20Systemd">¶</a></h2><div class="refsect2"><a name="idm214178809840"></a><h3 id="Writing Systemd Unit Files">Writing Systemd Unit Files<a class="headerlink" title="Permalink to this headline" href="#Writing%20Systemd%20Unit%20Files">¶</a></h3><p>When writing systemd unit files, it is
+                        itself.</p></div></div><div class="refsect1"><a name="idm214174920464"></a><h2 id="Integration with Systemd">Integration with Systemd<a class="headerlink" title="Permalink to this headline" href="#Integration%20with%20Systemd">¶</a></h2><div class="refsect2"><a name="idm214174919824"></a><h3 id="Writing Systemd Unit Files">Writing Systemd Unit Files<a class="headerlink" title="Permalink to this headline" href="#Writing%20Systemd%20Unit%20Files">¶</a></h3><p>When writing systemd unit files, it is
                         recommended to consider the following
                         suggestions:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>If possible, do not use
                                 the <code class="varname">Type=forking</code>
                                 your service file
                                 <code class="filename">foo.service</code>, for
                                 a hypothetical program
-                                <code class="filename">foo</code>.</p></li></ol></div></div><div class="refsect2"><a name="idm214177358624"></a><h3 id="Installing Systemd Service Files">Installing Systemd Service Files<a class="headerlink" title="Permalink to this headline" href="#Installing%20Systemd%20Service%20Files">¶</a></h3><p>At the build installation time
+                                <code class="filename">foo</code>.</p></li></ol></div></div><div class="refsect2"><a name="idm214174904272"></a><h3 id="Installing Systemd Service Files">Installing Systemd Service Files<a class="headerlink" title="Permalink to this headline" href="#Installing%20Systemd%20Service%20Files">¶</a></h3><p>At the build installation time
                         (e.g. <span class="command"><strong>make install</strong></span> during
                         package build), packages are recommended to
                         install their systemd unit files in the
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
                         tool to activate them automatically on
                         boot.</p><p>Packages using
-                        <a href="autoconf.html"><span class="citerefentry"><span class="refentrytitle">autoconf</span>(1)</span></a>
+                        <a href="http://linux.die.net/man/1/autoconf"><span class="citerefentry"><span class="refentrytitle">autoconf</span>(1)</span></a>
                         are recommended to use a configure script
                         excerpt like the following to determine the
                         unit installation path during source
@@ -577,14 +578,14 @@ AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])</p
                         work, it is recommended to add the following
                         to the top-level <code class="filename">Makefile.am</code>
                         file in
-                        <a href="automake.html"><span class="citerefentry"><span class="refentrytitle">automake</span>(1)</span></a>-based
+                        <a href="http://linux.die.net/man/1/automake"><span class="citerefentry"><span class="refentrytitle">automake</span>(1)</span></a>-based
                         projects:</p><pre class="programlisting">DISTCHECK_CONFIGURE_FLAGS = \
         --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)</pre><p>Finally, unit files should be installed in the system with an automake excerpt like the following:</p><pre class="programlisting">if HAVE_SYSTEMD
 systemdsystemunit_DATA = \
         foobar.socket \
         foobar.service
 endif</pre><p>In the
-                        <a href="rpm.html"><span class="citerefentry"><span class="refentrytitle">rpm</span>(8)</span></a>
+                        <a href="http://linux.die.net/man/8/rpm"><span class="citerefentry"><span class="refentrytitle">rpm</span>(8)</span></a>
                         <code class="filename">.spec</code> file, use snippets
                         like the following to enable/disable the
                         service during
@@ -631,7 +632,7 @@ fi</pre><p>Where 0.47.11-1 is the first package
                         specific to Fedora which can be used to check
                         whether a SysV init script is enabled. Other
                         operating systems will have to use different
-                        commands here.</p></div></div><div class="refsect1"><a name="idm214178311488"></a><h2 id="Porting Existing Daemons">Porting Existing Daemons<a class="headerlink" title="Permalink to this headline" href="#Porting%20Existing%20Daemons">¶</a></h2><p>Since new-style init systems such as systemd are
+                        commands here.</p></div></div><div class="refsect1"><a name="idm214174874928"></a><h2 id="Porting Existing Daemons">Porting Existing Daemons<a class="headerlink" title="Permalink to this headline" href="#Porting%20Existing%20Daemons">¶</a></h2><p>Since new-style init systems such as systemd are
                 compatible with traditional SysV init systems, it is
                 not strictly necessary to port existing daemons to the
                 new style. However, doing so offers additional
@@ -676,9 +677,9 @@ fi</pre><p>Where 0.47.11-1 is the first package
                         details.</p></li><li class="listitem"><p>If the daemon exposes
                         interfaces via D-Bus, write and install a
                         D-Bus activation file for the service, see
-                        above for details.</p></li></ol></div></div><div class="refsect1"><a name="idm214180581568"></a><h2 id="Placing Daemon Data">Placing Daemon Data<a class="headerlink" title="Permalink to this headline" href="#Placing%20Daemon%20Data">¶</a></h2><p>It is recommended to follow the general
+                        above for details.</p></li></ol></div></div><div class="refsect1"><a name="idm214174864432"></a><h2 id="Placing Daemon Data">Placing Daemon Data<a class="headerlink" title="Permalink to this headline" href="#Placing%20Daemon%20Data">¶</a></h2><p>It is recommended to follow the general
                 guidelines for placing package files, as discussed in
-                <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214180579440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214174862368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
index ddd5cf29247f4712af99a5df430f69309a09acff..99c75a7a18eb9b5d48452b012ef33100c9aae411 100644 (file)
                                 with a fallback of iterating from file
                                 descriptor 3 to the value returned by
                                 <function>getrlimit()</function> for
-                                RLIMIT_NOFILE.</para></listitem>
+                                <constant>RLIMIT_NOFILE</constant>.
+                                </para></listitem>
 
                                 <listitem><para>Reset all signal
                                 handlers to their default. This is
                                 best done by iterating through the
                                 available signals up to the limit of
-                                _NSIG and resetting them to
+                                <constant>_NSIG</constant> and resetting them to
                                 <constant>SIG_DFL</constant>.</para></listitem>
 
                                 <listitem><para>Reset the signal mask
                                 init system. If log priorities are
                                 necessary, these can be encoded by
                                 prefixing individual log lines with
-                                strings like "&lt;4&gt;" (for log
+                                strings like <literal>&lt;4&gt;</literal> (for log
                                 priority 4 "WARNING" in the syslog
                                 priority scheme), following a similar
                                 style as the Linux kernel's
                         on a network interface, because network
                         sockets shall be bound to the
                         address. However, an alternative to implement
-                        this is by utilizing the Linux IP_FREEBIND
+                        this is by utilizing the Linux <constant>IP_FREEBIND</constant>
                         socket option, as accessible via
                         <varname>FreeBind=yes</varname> in systemd
                         socket files (see
                         boot.</para>
 
                         <para>Packages using
-                        <citerefentry><refentrytitle>autoconf</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>autoconf</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                         are recommended to use a configure script
                         excerpt like the following to determine the
                         unit installation path during source
@@ -783,7 +784,7 @@ AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])</p
                         work, it is recommended to add the following
                         to the top-level <filename>Makefile.am</filename>
                         file in
-                        <citerefentry><refentrytitle>automake</refentrytitle><manvolnum>1</manvolnum></citerefentry>-based
+                        <citerefentry project='die-net'><refentrytitle>automake</refentrytitle><manvolnum>1</manvolnum></citerefentry>-based
                         projects:</para>
 
                         <programlisting>DISTCHECK_CONFIGURE_FLAGS = \
@@ -798,7 +799,7 @@ systemdsystemunit_DATA = \
 endif</programlisting>
 
                         <para>In the
-                        <citerefentry><refentrytitle>rpm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>rpm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                         <filename>.spec</filename> file, use snippets
                         like the following to enable/disable the
                         service during
index f97c8e59ed9b74975c94761ea7664db1e561c630..57da031bec5993babd2e01717201b6cefde2b193 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "FILE\-HIERARCHY" "7" "" "systemd 215" "file-hierarchy"
+.TH "FILE\-HIERARCHY" "7" "" "systemd 217" "file-hierarchy"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -87,6 +87,8 @@ set they should prefer using the directory specified in it over directly referen
 /tmp
 (see
 \fBenviron\fR(7)
+and
+\m[blue]\fBIEEE Std 1003\&.1\fR\m[]\&\s-2\u[2]\d\s+2
 for details)\&.
 .RE
 .SH "RUNTIME DATA"
@@ -112,7 +114,7 @@ Contains per\-user runtime directories, each usually individually mounted
 instances\&. Always writable, flushed at each reboot and when the user logs out\&. User code should not reference this directory directly, but via the
 \fI$XDG_RUNTIME_DIR\fR
 environment variable, as documented in the
-\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
+\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[3]\d\s+2\&.
 .RE
 .SH "VENDOR-SUPPLIED OPERATING SYSTEM RESOURCES"
 .PP
@@ -146,7 +148,7 @@ Static, private vendor data that is compatible with all architectures (though no
 .RS 4
 Location for placing dynamic libraries, also called
 \fI$libdir\fR\&. The architecture identifier to use is defined on
-\m[blue]\fBMultiarch Architecture Specifiers (Tuples)\fR\m[]\&\s-2\u[3]\d\s+2
+\m[blue]\fBMultiarch Architecture Specifiers (Tuples)\fR\m[]\&\s-2\u[4]\d\s+2
 list\&. Legacy locations of
 \fI$libdir\fR
 are
@@ -321,8 +323,8 @@ This compatibility symlink points to
 .SH "HOME DIRECTORY"
 .PP
 User applications may want to place files and directories in the user\*(Aqs home directory\&. They should follow the following basic structure\&. Note that some of these directories are also standardized (though more weakly) by the
-\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[2]\d\s+2\&. Additional locations for high\-level user resources are defined by
-\m[blue]\fBxdg\-user\-dirs\fR\m[]\&\s-2\u[4]\d\s+2\&.
+\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[3]\d\s+2\&. Additional locations for high\-level user resources are defined by
+\m[blue]\fBxdg\-user\-dirs\fR\m[]\&\s-2\u[5]\d\s+2\&.
 .PP
 ~/\&.cache
 .RS 4
@@ -355,7 +357,7 @@ Static, private vendor data that is compatible with all architectures\&.
 ~/\&.local/lib/\fIarch\-id\fR
 .RS 4
 Location for placing public dynamic libraries\&. The architecture identifier to use, is defined on
-\m[blue]\fBMultiarch Architecture Specifiers (Tuples)\fR\m[]\&\s-2\u[3]\d\s+2
+\m[blue]\fBMultiarch Architecture Specifiers (Tuples)\fR\m[]\&\s-2\u[4]\d\s+2
 list\&.
 .RE
 .PP
@@ -554,7 +556,7 @@ T}
 T{
 ~/\&.local/lib/\fIpackage\fR
 T}:T{
-Private, static vendor resources of the package, compatible wih any architecture, or any other kind of read\-only vendor data\&.
+Private, static vendor resources of the package, compatible with any architecture, or any other kind of read\-only vendor data\&.
 T}
 T{
 ~/\&.local/lib/\fIarch\-id\fR/\fIpackage\fR
@@ -621,16 +623,21 @@ File System Hierarchy
 \%http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html
 .RE
 .IP " 2." 4
+IEEE Std 1003.1
+.RS 4
+\%http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
+.RE
+.IP " 3." 4
 XDG Base Directory Specification
 .RS 4
 \%http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
 .RE
-.IP " 3." 4
+.IP " 4." 4
 Multiarch Architecture Specifiers (Tuples)
 .RS 4
 \%https://wiki.debian.org/Multiarch/Tuples
 .RE
-.IP " 4." 4
+.IP " 5." 4
 xdg-user-dirs
 .RS 4
 \%http://www.freedesktop.org/wiki/Software/xdg-user-dirs/
index d8853e3390f2c73cf07e24f13fbd62538e6e8e97..c0387a35a3159e11dcbf4e96c2c7cfaeb62fec12 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="file-hierarchy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>file-hierarchy — File system hierarchy overview</p></div><div class="refsect1"><a name="idm214174576496"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Operating systems using the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="file-hierarchy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>file-hierarchy — File system hierarchy overview</p></div><div class="refsect1"><a name="idm214179616496"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Operating systems using the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 system and service manager are organized based on a
                 file system hierarchy inspired by UNIX, more
                 specifically the hierarchy described in the <a class="ulink" href="http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html" target="_top">File
                 System Hierarchy</a> specification and
-                <a href="hier.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>. This
+                <a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>. This
                 manual page describes a more minimal, modernized
                 subset of these specifications that defines more
                 strictly the suggestions and restrictions systemd
                 makes on the file system hierarchy.</p><p>Many of the paths described here are queriable
                 with the
                 <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>
-                tool.</p></div><div class="refsect1"><a name="idm214173152608"></a><h2 id="General Structure">General Structure<a class="headerlink" title="Permalink to this headline" href="#General%20Structure">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/"><span class="term"><code class="filename">/</code></span><a class="headerlink" title="Permalink to this term" href="#/">¶</a></dt><dd><p>The file system
+                tool.</p></div><div class="refsect1"><a name="idm214175827696"></a><h2 id="General Structure">General Structure<a class="headerlink" title="Permalink to this headline" href="#General%20Structure">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/"><span class="term"><code class="filename">/</code></span><a class="headerlink" title="Permalink to this term" href="#/">¶</a></dt><dd><p>The file system
                                 root. Usually writable, but this is
                                 not required. Possibly a temporary
                                 file system ("<code class="literal">tmpfs</code>"). Not shared with
                                 accessible to other users of the
                                 system it is essential that this
                                 directory is only written to with the
-                                <a href="mkstemp.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
-                                <a href="mkdtemp.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
+                                <a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
                                 and related calls. This directory is
                                 usually flushed at boot-up. Also,
                                 files that are not accessed within a
                                 should prefer using the directory
                                 specified in it over directly
                                 referencing
-                                <code class="filename">/tmp</code> (see <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a> for details).</p></dd></dl></div></div><div class="refsect1"><a name="idm214170719280"></a><h2 id="Runtime Data">Runtime Data<a class="headerlink" title="Permalink to this headline" href="#Runtime%20Data">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run"><span class="term"><code class="filename">/run</code></span><a class="headerlink" title="Permalink to this term" href="#/run">¶</a></dt><dd><p>A
+                                <code class="filename">/tmp</code> (see <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
+                                and
+                                <a class="ulink" href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03" target="_top">IEEE Std 1003.1</a> for details).</p></dd></dl></div></div><div class="refsect1"><a name="idm214179691648"></a><h2 id="Runtime Data">Runtime Data<a class="headerlink" title="Permalink to this headline" href="#Runtime%20Data">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run"><span class="term"><code class="filename">/run</code></span><a class="headerlink" title="Permalink to this term" href="#/run">¶</a></dt><dd><p>A
                                 "<code class="literal">tmpfs</code>" file system
                                 for system packages to place runtime
                                 data in. This directory is flushed on
                                 environment variable, as documented in
                                 the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
                                 Base Directory
-                                Specification</a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174010496"></a><h2 id="Vendor-supplied Operating System Resources">Vendor-supplied Operating System Resources<a class="headerlink" title="Permalink to this headline" href="#Vendor-supplied%20Operating%20System%20Resources">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/usr"><span class="term"><code class="filename">/usr</code></span><a class="headerlink" title="Permalink to this term" href="#/usr">¶</a></dt><dd><p>Vendor-supplied
+                                Specification</a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179680832"></a><h2 id="Vendor-supplied Operating System Resources">Vendor-supplied Operating System Resources<a class="headerlink" title="Permalink to this headline" href="#Vendor-supplied%20Operating%20System%20Resources">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/usr"><span class="term"><code class="filename">/usr</code></span><a class="headerlink" title="Permalink to this term" href="#/usr">¶</a></dt><dd><p>Vendor-supplied
                                 operating system resources. Usually
                                 read-only, but this is not
                                 required. Possibly shared between
                                 but for vendor versions of files in
                                 the variable, persistent data
                                 directory
-                                <code class="filename">/var</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171094480"></a><h2 id="Persistent Variable System Data">Persistent Variable System Data<a class="headerlink" title="Permalink to this headline" href="#Persistent%20Variable%20System%20Data">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/var"><span class="term"><code class="filename">/var</code></span><a class="headerlink" title="Permalink to this term" href="#/var">¶</a></dt><dd><p>Persistent, variable
+                                <code class="filename">/var</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174739888"></a><h2 id="Persistent Variable System Data">Persistent Variable System Data<a class="headerlink" title="Permalink to this headline" href="#Persistent%20Variable%20System%20Data">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/var"><span class="term"><code class="filename">/var</code></span><a class="headerlink" title="Permalink to this term" href="#/var">¶</a></dt><dd><p>Persistent, variable
                                 system data. Must be writable. This
                                 directory might be pre-populated with
                                 vendor-supplied data, but applications
                                 private logs in this directory, though
                                 it is recommended to do most logging
                                 via the
-                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                                 and
                                 <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>
                                 calls.</p></dd><dt id="/var/spool"><span class="term"><code class="filename">/var/spool</code></span><a class="headerlink" title="Permalink to this term" href="#/var/spool">¶</a></dt><dd><p>Persistent system
                                 restrictions as with
                                 <code class="filename">/tmp</code> apply, and
                                 hence only
-                                <a href="mkstemp.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
-                                <a href="mkdtemp.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
+                                <a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
                                 or similar calls should be used to
                                 make use of this directory. If
                                 applications find the environment
                                 set they should prefer using the
                                 directory specified in it over
                                 directly referencing
-                                <code class="filename">/var/tmp</code> (see <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a> for details).
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214172285296"></a><h2 id="Virtual Kernel and API File Systems">Virtual Kernel and API File Systems<a class="headerlink" title="Permalink to this headline" href="#Virtual%20Kernel%20and%20API%20File%20Systems">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/dev"><span class="term"><code class="filename">/dev</code></span><a class="headerlink" title="Permalink to this term" href="#/dev">¶</a></dt><dd><p>The root directory for
+                                <code class="filename">/var/tmp</code> (see <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
+                                for details).
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214174717600"></a><h2 id="Virtual Kernel and API File Systems">Virtual Kernel and API File Systems<a class="headerlink" title="Permalink to this headline" href="#Virtual%20Kernel%20and%20API%20File%20Systems">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/dev"><span class="term"><code class="filename">/dev</code></span><a class="headerlink" title="Permalink to this term" href="#/dev">¶</a></dt><dd><p>The root directory for
                                 device nodes. Usually this directory
                                 is mounted as a
                                 "<code class="literal">devtmpfs</code>" instance,
                                 is mostly an API to interface with the
                                 kernel and not a place where normal
                                 files may be stored. For details, see
-                                <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>. A
+                                <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>. A
                                 number of special purpose virtual file
                                 systems might be mounted below this
                                 directory.</p></dd><dt id="/proc/sys"><span class="term"><code class="filename">/proc/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys">¶</a></dt><dd><p>A hierarchy below
                                 read-only. A number of special purpose
                                 virtual file systems might be mounted
                                 below this
-                                directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170710752"></a><h2 id="Compatibility Symlinks">Compatibility Symlinks<a class="headerlink" title="Permalink to this headline" href="#Compatibility%20Symlinks">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/bin"><span class="term"><code class="filename">/bin</code>, </span><span class="term"><code class="filename">/sbin</code>, </span><span class="term"><code class="filename">/usr/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/bin">¶</a></dt><dd><p>These compatibility
+                                directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174697984"></a><h2 id="Compatibility Symlinks">Compatibility Symlinks<a class="headerlink" title="Permalink to this headline" href="#Compatibility%20Symlinks">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/bin"><span class="term"><code class="filename">/bin</code>, </span><span class="term"><code class="filename">/sbin</code>, </span><span class="term"><code class="filename">/usr/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/bin">¶</a></dt><dd><p>These compatibility
                                 symlinks point to
                                 <code class="filename">/usr/bin</code>,
                                 ensuring that scripts and binaries
                                 <code class="filename">/run</code>, ensuring
                                 that programs referencing this legacy
                                 path correctly find their runtime
-                                data.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172491616"></a><h2 id="Home Directory">Home Directory<a class="headerlink" title="Permalink to this headline" href="#Home%20Directory">¶</a></h2><p>User applications may want to place files and
+                                data.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174685008"></a><h2 id="Home Directory">Home Directory<a class="headerlink" title="Permalink to this headline" href="#Home%20Directory">¶</a></h2><p>User applications may want to place files and
                 directories in the user's home directory. They should
                 follow the following basic structure. Note that some
                 of these directories are also standardized (though
                                 <code class="varname">$XDG_DATA_HOME</code> set
                                 is should use the directory specified
                                 in it instead of this
-                                directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm214175546688"></a><h2 id="Unprivileged Write Access">Unprivileged Write Access<a class="headerlink" title="Permalink to this headline" href="#Unprivileged%20Write%20Access">¶</a></h2><p>Unprivileged processes generally lack
+                                directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174656944"></a><h2 id="Unprivileged Write Access">Unprivileged Write Access<a class="headerlink" title="Permalink to this headline" href="#Unprivileged%20Write%20Access">¶</a></h2><p>Unprivileged processes generally lack
                 write access to most of the hierarchy.</p><p>The exceptions for normal users are
                 <code class="filename">/tmp</code>,
                 <code class="filename">/var/tmp</code>,
                 <code class="varname">RuntimeDirectory=</code> directive of
                 service units (see
                 <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
-                for details).</p></div><div class="refsect1"><a name="idm214173794992"></a><h2 id="Node Types">Node Types<a class="headerlink" title="Permalink to this headline" href="#Node%20Types">¶</a></h2><p>Unix file systems support different types of file
+                for details).</p></div><div class="refsect1"><a name="idm214174645504"></a><h2 id="Node Types">Node Types<a class="headerlink" title="Permalink to this headline" href="#Node%20Types">¶</a></h2><p>Unix file systems support different types of file
                 nodes, including regular files, directories, symlinks,
                 character and block device nodes, sockets and FIFOs.</p><p>It is strongly recommended that
                 <code class="filename">/dev</code> is the only location below
                 <code class="filename">/run</code> shall be the only location
                 to place sockets and FIFOs. Regular files,
                 directories and symlinks may be used in all
-                directories.</p></div><div class="refsect1"><a name="idm214173791552"></a><h2 id="System Packages">System Packages<a class="headerlink" title="Permalink to this headline" href="#System%20Packages">¶</a></h2><p>Developers of system packages should follow
+                directories.</p></div><div class="refsect1"><a name="idm214174642192"></a><h2 id="System Packages">System Packages<a class="headerlink" title="Permalink to this headline" href="#System%20Packages">¶</a></h2><p>Developers of system packages should follow
                 strict rules when placing their own files in the file
                 system. The following table lists recommended
                 locations for specific types of files supplied by the
-                vendor.</p><div class="table"><a name="idm214173790208"></a><p class="title"><b>Table 1. System Package Vendor Files Locations</b></p><div class="table-contents"><table summary="System Package Vendor Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/usr/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path, compiled for any of the supported architectures compatible with the operating system. It is not recommended to place internal binaries or binaries that are not commonly invoked from the shell in this directory, such as daemon binaries. As this directory is shared with most other packages of the system special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures. Note that this generally does not include private executables since binaries of a specific architecture may be freely invoked from any other supported system architecture.</td></tr><tr><td align="left"><code class="filename">/usr/include/<em class="replaceable"><code>package</code></em></code></td><td align="left">Public C/C++ APIs of public shared libraries of the package.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed
+                vendor.</p><div class="table"><a name="idm214174640880"></a><p class="title"><b>Table 1. System Package Vendor Files Locations</b></p><div class="table-contents"><table summary="System Package Vendor Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/usr/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path, compiled for any of the supported architectures compatible with the operating system. It is not recommended to place internal binaries or binaries that are not commonly invoked from the shell in this directory, such as daemon binaries. As this directory is shared with most other packages of the system special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures. Note that this generally does not include private executables since binaries of a specific architecture may be freely invoked from any other supported system architecture.</td></tr><tr><td align="left"><code class="filename">/usr/include/<em class="replaceable"><code>package</code></em></code></td><td align="left">Public C/C++ APIs of public shared libraries of the package.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed
                 in the <code class="filename">/usr/share</code> hierarchy, to
                 the locations defined by the various relevant
                 specifications.</p><p>During runtime and for local configuration and
-                state additional directories are defined:</p><div class="table"><a name="idm214173772160"></a><p class="title"><b>Table 2. System Package Variable Files Locations</b></p><div class="table-contents"><table summary="System Package Variable Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/etc/<em class="replaceable"><code>package</code></em></code></td><td align="left">System-specific configuration for the package. It is recommended to default to safe fallbacks if this configuration is missing, if this is possible. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to copy or symlink the necessary files and directories from <code class="filename">/usr/share/factory</code> during boot, via the "<code class="literal">L</code>" or "<code class="literal">C</code>" directives.</td></tr><tr><td align="left"><code class="filename">/run/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime data for the package. Packages must be able to create the necessary subdirectories in this tree on their own, since the directory is flushed automatically on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot. Alternatively, the <code class="varname">RuntimeDirectory=</code> directive of service units may be used (see <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> for details.)</td></tr><tr><td align="left"><code class="filename">/run/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime log data for the package. As above, the package needs to make sure to create this directory if necessary, as it will be flushed on every boot.</td></tr><tr><td align="left"><code class="filename">/var/cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr><tr><td align="left"><code class="filename">/var/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent private data of the package. This is the primary place to put persistent data that does not fall into the other categories listed. Packages should be able to create the necessary subdirectories in this tree on their own, since the directory might be missing on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot.</td></tr><tr><td align="left"><code class="filename">/var/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent log data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr><tr><td align="left"><code class="filename">/var/spool/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent spool/queue data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214173746304"></a><h2 id="User Packages">User Packages<a class="headerlink" title="Permalink to this headline" href="#User%20Packages">¶</a></h2><p>Programs running in user context should follow
+                state additional directories are defined:</p><div class="table"><a name="idm214174623088"></a><p class="title"><b>Table 2. System Package Variable Files Locations</b></p><div class="table-contents"><table summary="System Package Variable Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/etc/<em class="replaceable"><code>package</code></em></code></td><td align="left">System-specific configuration for the package. It is recommended to default to safe fallbacks if this configuration is missing, if this is possible. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to copy or symlink the necessary files and directories from <code class="filename">/usr/share/factory</code> during boot, via the "<code class="literal">L</code>" or "<code class="literal">C</code>" directives.</td></tr><tr><td align="left"><code class="filename">/run/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime data for the package. Packages must be able to create the necessary subdirectories in this tree on their own, since the directory is flushed automatically on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot. Alternatively, the <code class="varname">RuntimeDirectory=</code> directive of service units may be used (see <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> for details.)</td></tr><tr><td align="left"><code class="filename">/run/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime log data for the package. As above, the package needs to make sure to create this directory if necessary, as it will be flushed on every boot.</td></tr><tr><td align="left"><code class="filename">/var/cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr><tr><td align="left"><code class="filename">/var/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent private data of the package. This is the primary place to put persistent data that does not fall into the other categories listed. Packages should be able to create the necessary subdirectories in this tree on their own, since the directory might be missing on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot.</td></tr><tr><td align="left"><code class="filename">/var/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent log data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr><tr><td align="left"><code class="filename">/var/spool/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent spool/queue data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214174598400"></a><h2 id="User Packages">User Packages<a class="headerlink" title="Permalink to this headline" href="#User%20Packages">¶</a></h2><p>Programs running in user context should follow
                 strict rules when placing their own files in the
                 user's home directory. The following table lists
                 recommended locations in the home directory for
                 application is installed in the home directory. (Note
                 however, that user applications installed system-wide
                 should follow the rules outlined above regarding
-                placing vendor files.)</p><div class="table"><a name="idm214173744672"></a><p class="title"><b>Table 3. User Package Vendor File Locations</b></p><div class="table-contents"><table summary="User Package Vendor File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.local/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path. It is not recommended to place internal executables or executables that are not commonly invoked from the shell in this directory, such as daemon executables. As this directory is shared with most other packages of the user special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, compatible wih any architecture, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed
+                placing vendor files.)</p><div class="table"><a name="idm214174596800"></a><p class="title"><b>Table 3. User Package Vendor File Locations</b></p><div class="table-contents"><table summary="User Package Vendor File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.local/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path. It is not recommended to place internal executables or executables that are not commonly invoked from the shell in this directory, such as daemon executables. As this directory is shared with most other packages of the user special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, compatible with any architecture, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed
                 in the <code class="filename">~/.local/share</code> hierarchy,
                 to the locations defined by the various relevant
                 specifications.</p><p>During runtime and for local configuration and
-                state additional directories are defined:</p><div class="table"><a name="idm214173728816"></a><p class="title"><b>Table 4. User Package Variable File Locations</b></p><div class="table-contents"><table summary="User Package Variable File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.config/<em class="replaceable"><code>package</code></em></code></td><td align="left">User-specific configuration and state for the package. It is required to default to safe fallbacks if this configuration is missing.</td></tr><tr><td align="left"><code class="filename"><code class="varname">$XDG_RUNTIME_DIR</code>/<em class="replaceable"><code>package</code></em></code></td><td align="left">User runtime data for the package.</td></tr><tr><td align="left"><code class="filename">~/.cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214173717072"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                state additional directories are defined:</p><div class="table"><a name="idm214174581184"></a><p class="title"><b>Table 4. User Package Variable File Locations</b></p><div class="table-contents"><table summary="User Package Variable File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.config/<em class="replaceable"><code>package</code></em></code></td><td align="left">User-specific configuration and state for the package. It is required to default to safe fallbacks if this configuration is missing.</td></tr><tr><td align="left"><code class="filename"><code class="varname">$XDG_RUNTIME_DIR</code>/<em class="replaceable"><code>package</code></em></code></td><td align="left">User runtime data for the package.</td></tr><tr><td align="left"><code class="filename">~/.cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214174569984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="hier.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>,
                         <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>,
                         <a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>,
                         <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>,
                         <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
                 </p></div></div></body></html>
index ed6e0e9a05f34eb6fb89685d89ff2c01443105c0..9d96cff007d3b143476ea75da8b33824c34d103a 100644 (file)
@@ -57,7 +57,7 @@
                 specifically the hierarchy described in the <ulink
                 url="http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html">File
                 System Hierarchy</ulink> specification and
-                <citerefentry><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>. This
+                <citerefentry project='man-pages'><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>. This
                 manual page describes a more minimal, modernized
                 subset of these specifications that defines more
                 strictly the suggestions and restrictions systemd
                                 accessible to other users of the
                                 system it is essential that this
                                 directory is only written to with the
-                                <citerefentry><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                                <citerefentry><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                                <citerefentry project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                 and related calls. This directory is
                                 usually flushed at boot-up. Also,
                                 files that are not accessed within a
                                 should prefer using the directory
                                 specified in it over directly
                                 referencing
-                                <filename>/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details).</para></listitem>
+                                <filename>/tmp</filename> (see <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                and
+                                <ulink url="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">IEEE Std 1003.1</ulink> for details).</para></listitem>
                         </varlistentry>
 
                 </variablelist>
                                 private logs in this directory, though
                                 it is recommended to do most logging
                                 via the
-                                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                 and
                                 <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                 calls.</para></listitem>
                                 restrictions as with
                                 <filename>/tmp</filename> apply, and
                                 hence only
-                                <citerefentry><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                                <citerefentry><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                                <citerefentry project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                 or similar calls should be used to
                                 make use of this directory. If
                                 applications find the environment
                                 set they should prefer using the
                                 directory specified in it over
                                 directly referencing
-                                <filename>/var/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details).
+                                <filename>/var/tmp</filename> (see <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                for details).
                                 </para></listitem>
                         </varlistentry>
 
                                 is mostly an API to interface with the
                                 kernel and not a place where normal
                                 files may be stored. For details, see
-                                <citerefentry><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. A
+                                <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. A
                                 number of special purpose virtual file
                                 systems might be mounted below this
                                 directory.</para></listitem>
                       </row>
                       <row>
                         <entry><filename>~/.local/lib/<replaceable>package</replaceable></filename></entry>
-                        <entry>Private, static vendor resources of the package, compatible wih any architecture, or any other kind of read-only vendor data.</entry>
+                        <entry>Private, static vendor resources of the package, compatible with any architecture, or any other kind of read-only vendor data.</entry>
                       </row>
                       <row>
                         <entry><filename>~/.local/lib/<replaceable>arch-id</replaceable>/<replaceable>package</replaceable></filename></entry>
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
         </refsect1>
diff --git a/man/glib-event-glue.c b/man/glib-event-glue.c
new file mode 100644 (file)
index 0000000..c3719e3
--- /dev/null
@@ -0,0 +1,70 @@
+/***
+  Copyright 2014 Tom Gundersen
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+***/
+
+#include <assert.h>
+#include <errno.h>
+#include <stdlib.h>
+
+typedef struct SDEventSource {
+        GSource source;
+        GPollFD pollfd;
+        sd_event *event;
+} SDEventSource;
+
+static gboolean event_prepare(GSource *source, gint *timeout_) {
+        return sd_event_prepare(((SDEventSource *)source)->event) > 0;
+}
+
+static gboolean event_check(GSource *source) {
+        return sd_event_wait(((SDEventSource *)source)->event, 0) > 0;
+}
+
+static gboolean event_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) {
+        return sd_event_dispatch(((SDEventSource *)source)->event) > 0;
+}
+
+static void event_finalize(GSource *source) {
+        sd_event_unref(((SDEventSource *)source)->event);
+}
+
+static GSourceFuncs event_funcs = {
+        .prepare = event_prepare,
+        .check = event_check,
+        .dispatch = event_dispatch,
+        .finalize = event_finalize,
+};
+
+GSource *g_sd_event_create_source(sd_event *event) {
+        SDEventSource *source;
+
+        source = (SDEventSource *)g_source_new(&event_funcs, sizeof(SDEventSource));
+
+        source->event = sd_event_ref(event);
+        source->pollfd.fd = sd_event_get_fd(event);
+        source->pollfd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+
+        g_source_add_poll((GSource *)source, &source->pollfd);
+
+        return (GSource *)source;
+}
index 676ed9574d0bc31aa0995e56b1d9ed8e54ae825e..b994c10e13bcca06a1c3c0ea188ff99373e2446e 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "HALT" "8" "" "systemd 215" "halt"
+.TH "HALT" "8" "" "systemd 217" "halt"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 642c4567ec43dcf3a81c891f55a20411cb69dc12..4b010136fe4ac3e674e6873ce3f716fbaf96a9cc 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">poweroff [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">reboot [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214185642768"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>halt</strong></span>,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">poweroff [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">reboot [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214184881712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>halt</strong></span>,
                 <span class="command"><strong>poweroff</strong></span>, <span class="command"><strong>reboot</strong></span>
                 may be used to halt, power-off or reboot the
-                machine.</p></div><div class="refsect1"><a name="idm214186089440"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+                machine.</p></div><div class="refsect1"><a name="idm214184878512"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--halt"><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#--halt">¶</a></dt><dd><p>Halt the machine,
                                 regardless of which one of the three
                                 commands is invoked.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Power-off the machine,
                                 power-off, reboot.</p></dd><dt id="-d"><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--no-wtmp</code></span><a class="headerlink" title="Permalink to this term" href="#-d">¶</a></dt><dd><p>Do not write wtmp
                                 shutdown entry.</p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall">¶</a></dt><dd><p>Do not send wall
                                 message before
-                                halt, power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183375264"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214184284480"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>These are legacy commands available for
-                compatibility only.</p></div><div class="refsect1"><a name="idm214184877296"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                halt, power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188761648"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214188760464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>These are legacy commands available for
+                compatibility only.</p></div><div class="refsect1"><a name="idm214188759280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index d3b686e996463bde4b0021aa85a22ecc84a30f49..e9ed6554a91193f06e29035f7bf08c672a711b1a 100644 (file)
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index c8cf1e6ffcd2a4b36f628e44a65740ec0543b0e7..c34e72d626fc56295ffc7708d7d94e0207e70fc9 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "HOSTNAME" "5" "" "systemd 215" "hostname"
+.TH "HOSTNAME" "5" "" "systemd 217" "hostname"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -36,7 +36,9 @@ Depending on the operating system, other configuration files might be checked fo
 .PP
 You may use
 \fBhostnamectl\fR(1)
-to change the value of this file from the command line\&.
+to change the value of this file during runtime from the command line\&. Use
+\fBsystemd-firstboot\fR(1)
+to initialize it on mounted (but not booted) system images\&.
 .SH "HISTORY"
 .PP
 The simple configuration file format of
@@ -51,4 +53,5 @@ originates from Debian GNU/Linux\&.
 \fBmachine-id\fR(5),
 \fBmachine-info\fR(5),
 \fBhostnamectl\fR(1),
-\fBsystemd-hostnamed.service\fR(8)
+\fBsystemd-hostnamed.service\fR(8),
+\fBsystemd-firstboot\fR(1)
index faacc62cec7366ebeb853dc0b29279c8b5d61aaa..0b71c506a7550c47ad571d872edc0ee1148c32e0 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="hostname"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostname — Local hostname configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/hostname</code></p></div><div class="refsect1"><a name="idm214180092048"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/hostname</code> file
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="hostname"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostname — Local hostname configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/hostname</code></p></div><div class="refsect1"><a name="idm214192231936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/hostname</code> file
                 configures the name of the local system that is set
                 during boot using the
-                <a href="sethostname.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
                 system call. It should contain a single
                 newline-terminated hostname string. The
                 hostname may be a free-form string up to 64 characters
                 configuration files might be checked for configuration
                 of the hostname as well, however only as fallback.</p><p>You may use
                 <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
-                to change the value of this file from the command
-                line.</p></div><div class="refsect1"><a name="idm214181007760"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>The simple configuration file format of
+                to change the value of this file during runtime from
+                the command line. Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize it on mounted (but not booted) system
+                images.</p></div><div class="refsect1"><a name="idm214192225728"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>The simple configuration file format of
                 <code class="filename">/etc/hostname</code> originates from
-                Debian GNU/Linux.</p></div><div class="refsect1"><a name="idm214180591920"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                Debian GNU/Linux.</p></div><div class="refsect1"><a name="idm214192223856"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="sethostname.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>,
                           <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
                           <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(7)</span></a>,
                           <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
                           <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
                           <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>,
-                          <a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>
+                          <a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
+                          <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                   </p></div></div></body></html>
index a8648c5291745fc5a9ed6dd21b6a912f9cb0059c..2f949dedd3b5d71a5ccaf8494f648507a52f0bf2 100644 (file)
 
                 <para>You may use
                 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                to change the value of this file from the command
-                line.</para>
+                to change the value of this file during runtime from
+                the command line. Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize it on mounted (but not booted) system
+                images.</para>
         </refsect1>
 
         <refsect1>
@@ -95,7 +98,8 @@
                           <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                          <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index 16454eb88287cb7814214e6e144bb185df674d43..c8ff3699faeff2a09b92a72503ccb9749aa462df 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "HOSTNAMECTL" "1" "" "systemd 215" "hostnamectl"
+.TH "HOSTNAMECTL" "1" "" "systemd 217" "hostnamectl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -38,7 +38,11 @@ The static hostname is stored in
 \fBhostname\fR(5)
 for more information\&. The pretty hostname, chassis type, and icon name are stored in
 /etc/machine\-info, see
-\fBmachine-id\fR(5)\&.
+\fBmachine-info\fR(5)\&.
+.PP
+Use
+\fBsystemd-firstboot\fR(1)
+to initialize the system host name for mounted (but not booted) system images\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
@@ -48,11 +52,6 @@ The following options are understood:
 Do not query the user for authentication for privileged operations\&.
 .RE
 .PP
-\fB\-P\fR, \fB\-\-privileged\fR
-.RS 4
-Acquire privileges via PolicyKit before executing the operation\&.
-.RE
-.PP
 \fB\-\-static\fR, \fB\-\-transient\fR, \fB\-\-pretty\fR
 .RS 4
 If
@@ -90,38 +89,73 @@ The following commands are understood:
 Show current system hostname and related information\&.
 .RE
 .PP
-\fBset\-hostname [NAME]\fR
+\fBset\-hostname \fR\fB\fINAME\fR\fR
 .RS 4
-Set the system hostname\&. By default, this will alter the pretty, the static, and the transient hostname alike; however, if one or more of
+Set the system hostname to
+\fINAME\fR\&. By default, this will alter the pretty, the static, and the transient hostname alike; however, if one or more of
 \fB\-\-static\fR,
 \fB\-\-transient\fR,
 \fB\-\-pretty\fR
 are used, only the selected hostnames are changed\&. If the pretty hostname is being set, and static or transient are being set as well, the specified hostname will be simplified in regards to the character set used before the latter are updated\&. This is done by replacing spaces with
 "\-"
-and removing special characters\&. This ensures that the pretty and the static hostname are always closely related while still following the validity rules of the specific name\&. This simplification of the hostname string is not done if only the transient and/or static host names are set, and the pretty host name is left untouched\&. Pass the empty string
+and removing special characters\&. This ensures that the pretty and the static hostname are always closely related while still following the validity rules of the specific name\&. This simplification of the hostname string is not done if only the transient and/or static host names are set, and the pretty host name is left untouched\&.
+.sp
+Pass the empty string
 ""
 as the hostname to reset the selected hostnames to their default (usually
 "localhost")\&.
 .RE
 .PP
-\fBset\-icon\-name [NAME]\fR
+\fBset\-icon\-name \fR\fB\fINAME\fR\fR
 .RS 4
-Set the system icon name\&. The icon name is used by some graphical applications to visualize this host\&. The icon name should follow the
-\m[blue]\fBIcon Naming Specification\fR\m[]\&\s-2\u[1]\d\s+2\&. Pass an empty string to this operation to reset the icon name to the default value, which is determined from chassis type (see below) and possibly other parameters\&.
+Set the system icon name to
+\fINAME\fR\&. The icon name is used by some graphical applications to visualize this host\&. The icon name should follow the
+\m[blue]\fBIcon Naming Specification\fR\m[]\&\s-2\u[1]\d\s+2\&.
+.sp
+Pass an empty string to reset the icon name to the default value, which is determined from chassis type (see below) and possibly other parameters\&.
 .RE
 .PP
-\fBset\-chassis [TYPE]\fR
+\fBset\-chassis \fR\fB\fITYPE\fR\fR
 .RS 4
-Set the chassis type\&. The chassis type is used by some graphical applications to visualize the host or alter user interaction\&. Currently, the following chassis types are defined:
+Set the chassis type to
+\fITYPE\fR\&. The chassis type is used by some graphical applications to visualize the host or alter user interaction\&. Currently, the following chassis types are defined:
 "desktop",
 "laptop",
 "server",
 "tablet",
-"handset", as well as the special chassis types
+"handset",
+"watch", as well as the special chassis types
 "vm"
 and
 "container"
-for virtualized systems that lack an immediate physical chassis\&. Pass an empty string to this operation to reset the chassis type to the default value which is determined from the firmware and possibly other parameters\&.
+for virtualized systems that lack an immediate physical chassis\&.
+.sp
+Pass an empty string to reset the chassis type to the default value which is determined from the firmware and possibly other parameters\&.
+.RE
+.PP
+\fBset\-deployment \fR\fB\fIENVIRONMENT\fR\fR
+.RS 4
+Set the deployment environment description\&.
+\fIENVIRONMENT\fR
+must be a single word without any control characters\&. One of the following is suggested:
+"development",
+"integration",
+"staging",
+"production"\&.
+.sp
+Pass an empty string to reset to the default empty value\&.
+.RE
+.PP
+\fBset\-location \fR\fB\fILOCATION\fR\fR
+.RS 4
+Set the location string for the system, if it is known\&.
+\fILOCATION\fR
+should be a human\-friendly, free\-form string describing the physical location of the system, if it is known and applicable\&. This may be as generic as
+"Berlin, Germany"
+or as specific as
+"Left Rack, 2nd Shelf"\&.
+.sp
+Pass an empty string to reset to the default empty value\&.
 .RE
 .SH "EXIT STATUS"
 .PP
@@ -133,7 +167,8 @@ On success, 0 is returned, a non\-zero failure code otherwise\&.
 \fBhostname\fR(5),
 \fBmachine-info\fR(5),
 \fBsystemctl\fR(1),
-\fBsystemd-hostnamed.service\fR(8)
+\fBsystemd-hostnamed.service\fR(8),
+\fBsystemd-firstboot\fR(1)
 .SH "NOTES"
 .IP " 1." 4
 Icon Naming Specification
index 65440d530a4ef675515200af8116d989ae8ce087..fb3e73a54bb110aa0de30c5df06fb195aa7ac00c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="hostnamectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostnamectl — Control the system hostname</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">hostnamectl</code>  [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm214197136464"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>hostnamectl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="hostnamectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostnamectl — Control the system hostname</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">hostnamectl</code>  [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm214198261376"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>hostnamectl</strong></span> may be used to
                 query and change the system hostname and related
                 settings.</p><p>This tool distinguishes three different
                 hostnames: the high-level "pretty" hostname which
                 for more information. The pretty hostname, chassis
                 type, and icon name are stored in
                 <code class="filename">/etc/machine-info</code>, see
-                <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>.</p></div><div class="refsect1"><a name="idm214193390992"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
+                <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>.</p><p>Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize the system host name for mounted (but
+                not booted) system images.</p></div><div class="refsect1"><a name="idm214198252960"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
                                 for authentication for privileged
-                                operations.</p></dd><dt id="-P"><span class="term"><code class="option">-P</code>, </span><span class="term"><code class="option">--privileged</code></span><a class="headerlink" title="Permalink to this term" href="#-P">¶</a></dt><dd><p>Acquire privileges via PolicyKit
-                                before executing the operation.</p></dd><dt id="--static"><span class="term"><code class="option">--static</code>, </span><span class="term"><code class="option">--transient</code>, </span><span class="term"><code class="option">--pretty</code></span><a class="headerlink" title="Permalink to this term" href="#--static">¶</a></dt><dd><p>If
+                                operations.</p></dd><dt id="--static"><span class="term"><code class="option">--static</code>, </span><span class="term"><code class="option">--transient</code>, </span><span class="term"><code class="option">--pretty</code></span><a class="headerlink" title="Permalink to this term" href="#--static">¶</a></dt><dd><p>If
                                 <span class="command"><strong>status</strong></span> is used (or
                                 no explicit command is given) and one
                                 of those fields is given,
       <em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="status"><span class="term"><span class="command"><strong>status</strong></span></span><a class="headerlink" title="Permalink to this term" href="#status">¶</a></dt><dd><p>Show current system
                                 hostname and related
-                                information.</p></dd><dt id="set-hostname [NAME]"><span class="term"><span class="command"><strong>set-hostname [NAME]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-hostname%20%5BNAME%5D">¶</a></dt><dd><p>Set the system
-                                hostname. By default, this will alter
-                                the pretty, the static, and the
-                                transient hostname alike; however, if
-                                one or more of
+                                information.</p></dd><dt id="set-hostname NAME"><span class="term"><span class="command"><strong>set-hostname <em class="replaceable"><code>NAME</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-hostname%20NAME">¶</a></dt><dd><p>Set the system
+                                hostname to
+                                <em class="replaceable"><code>NAME</code></em>. By
+                                default, this will alter the pretty,
+                                the static, and the transient hostname
+                                alike; however, if one or more of
                                 <code class="option">--static</code>,
                                 <code class="option">--transient</code>,
                                 <code class="option">--pretty</code> are used,
                                 the hostname string is not done if
                                 only the transient and/or static host
                                 names are set, and the pretty host
-                                name is left untouched. Pass the empty
-                                string "<code class="literal"></code>" as the
-                                hostname to reset the selected
-                                hostnames to their default (usually
-                                "<code class="literal">localhost</code>").</p></dd><dt id="set-icon-name [NAME]"><span class="term"><span class="command"><strong>set-icon-name [NAME]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-icon-name%20%5BNAME%5D">¶</a></dt><dd><p>Set the system icon
-                                name. The icon name is used by some
+                                name is left untouched.</p><p>Pass the empty string
+                                "<code class="literal"></code>" as the hostname to
+                                reset the selected hostnames to their
+                                default (usually
+                                "<code class="literal">localhost</code>").</p></dd><dt id="set-icon-name NAME"><span class="term"><span class="command"><strong>set-icon-name <em class="replaceable"><code>NAME</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-icon-name%20NAME">¶</a></dt><dd><p>Set the system icon
+                                name to
+                                <em class="replaceable"><code>NAME</code></em>. The
+                                icon name is used by some graphical
+                                applications to visualize this host.
+                                The icon name should follow the <a class="ulink" href="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" target="_top">Icon
+                                Naming Specification</a>.</p><p>Pass an empty string to reset
+                                the icon name to the default value,
+                                which is determined from chassis type
+                                (see below) and possibly other
+                                parameters.</p></dd><dt id="set-chassis TYPE"><span class="term"><span class="command"><strong>set-chassis <em class="replaceable"><code>TYPE</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-chassis%20TYPE">¶</a></dt><dd><p>Set the chassis type
+                                to <em class="replaceable"><code>TYPE</code></em>.
+                                The chassis type is used by some
                                 graphical applications to visualize
-                                this host. The icon name should follow
-                                the <a class="ulink" href="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" target="_top">Icon
-                                Naming Specification</a>. Pass an
-                                empty string to this operation to
-                                reset the icon name to the default
-                                value, which is determined from chassis
-                                type (see below) and possibly other
-                                parameters.</p></dd><dt id="set-chassis [TYPE]"><span class="term"><span class="command"><strong>set-chassis [TYPE]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-chassis%20%5BTYPE%5D">¶</a></dt><dd><p>Set the chassis
-                                type. The chassis type is used by some
-                                graphical applications to visualize
-                                the host or alter user
-                                interaction. Currently, the following
-                                chassis types are defined:
+                                the host or alter user interaction.
+                                Currently, the following chassis types
+                                are defined:
                                 "<code class="literal">desktop</code>",
                                 "<code class="literal">laptop</code>",
                                 "<code class="literal">server</code>",
                                 "<code class="literal">tablet</code>",
-                                "<code class="literal">handset</code>", as well as
+                                "<code class="literal">handset</code>",
+                                "<code class="literal">watch</code>", as well as
                                 the special chassis types
                                 "<code class="literal">vm</code>" and
                                 "<code class="literal">container</code>" for
                                 virtualized systems that lack an
-                                immediate physical chassis. Pass an
-                                empty string to this operation to
-                                reset the chassis type to the default
-                                value which is determined from the
-                                firmware and possibly other
-                                parameters.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197252416"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214197251232"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                immediate physical chassis.</p><p>Pass an empty string to reset
+                                the chassis type to the default value
+                                which is determined from the firmware
+                                and possibly other parameters.</p></dd><dt id="set-deployment ENVIRONMENT"><span class="term"><span class="command"><strong>set-deployment <em class="replaceable"><code>ENVIRONMENT</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-deployment%20ENVIRONMENT">¶</a></dt><dd><p>Set the deployment
+                                environment
+                                description. <em class="replaceable"><code>ENVIRONMENT</code></em>
+                                must be a single word without any
+                                control characters. One of the
+                                following is suggested:
+                                "<code class="literal">development</code>",
+                                "<code class="literal">integration</code>",
+                                "<code class="literal">staging</code>",
+                                "<code class="literal">production</code>".
+                                </p><p>Pass an empty string to reset to
+                                the default empty value.</p></dd><dt id="set-location LOCATION"><span class="term"><span class="command"><strong>set-location <em class="replaceable"><code>LOCATION</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-location%20LOCATION">¶</a></dt><dd><p>Set the location
+                                string for the system, if it is
+                                known. <em class="replaceable"><code>LOCATION</code></em>
+                                should be a human-friendly, free-form
+                                string describing the physical
+                                location of the system, if it is known
+                                and applicable. This may be as generic
+                                as "<code class="literal">Berlin, Germany</code>"
+                                or as specific as "<code class="literal">Left Rack,
+                                2nd Shelf</code>".</p><p>Pass an empty string to reset to
+                                the default empty value.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197185104"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214197183952"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
                         <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
                         <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
-                        <a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>
+                        <a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
+                        <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                 </p></div></div></body></html>
index 71973fde912748ecc819e458e522ffe2cea82f47..128d92f57623f8055576e85de3b9737cab68c5f3 100644 (file)
                 for more information. The pretty hostname, chassis
                 type, and icon name are stored in
                 <filename>/etc/machine-info</filename>, see
-                <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+                <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+
+                <para>Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize the system host name for mounted (but
+                not booted) system images.</para>
         </refsect1>
 
         <refsect1>
                                 operations.</para></listitem>
                         </varlistentry>
 
-                        <varlistentry>
-                                <term><option>-P</option></term>
-                                <term><option>--privileged</option></term>
-
-                                <listitem><para>Acquire privileges via PolicyKit
-                                before executing the operation.</para></listitem>
-                        </varlistentry>
-
                         <varlistentry>
                                 <term><option>--static</option></term>
                                 <term><option>--transient</option></term>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><command>set-hostname [NAME]</command></term>
+                                <term><command>set-hostname <replaceable>NAME</replaceable></command></term>
 
                                 <listitem><para>Set the system
-                                hostname. By default, this will alter
-                                the pretty, the static, and the
-                                transient hostname alike; however, if
-                                one or more of
+                                hostname to
+                                <replaceable>NAME</replaceable>. By
+                                default, this will alter the pretty,
+                                the static, and the transient hostname
+                                alike; however, if one or more of
                                 <option>--static</option>,
                                 <option>--transient</option>,
                                 <option>--pretty</option> are used,
                                 the hostname string is not done if
                                 only the transient and/or static host
                                 names are set, and the pretty host
-                                name is left untouched. Pass the empty
-                                string <literal></literal> as the
-                                hostname to reset the selected
-                                hostnames to their default (usually
+                                name is left untouched.</para>
+
+                                <para>Pass the empty string
+                                <literal></literal> as the hostname to
+                                reset the selected hostnames to their
+                                default (usually
                                 <literal>localhost</literal>).</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><command>set-icon-name [NAME]</command></term>
+                                <term><command>set-icon-name <replaceable>NAME</replaceable></command></term>
 
                                 <listitem><para>Set the system icon
-                                name. The icon name is used by some
-                                graphical applications to visualize
-                                this host. The icon name should follow
-                                the <ulink
+                                name to
+                                <replaceable>NAME</replaceable>. The
+                                icon name is used by some graphical
+                                applications to visualize this host.
+                                The icon name should follow the <ulink
                                 url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">Icon
-                                Naming Specification</ulink>. Pass an
-                                empty string to this operation to
-                                reset the icon name to the default
-                                value, which is determined from chassis
-                                type (see below) and possibly other
+                                Naming Specification</ulink>.</para>
+
+                                <para>Pass an empty string to reset
+                                the icon name to the default value,
+                                which is determined from chassis type
+                                (see below) and possibly other
                                 parameters.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><command>set-chassis [TYPE]</command></term>
+                                <term><command>set-chassis <replaceable>TYPE</replaceable></command></term>
 
-                                <listitem><para>Set the chassis
-                                type. The chassis type is used by some
+                                <listitem><para>Set the chassis type
+                                to <replaceable>TYPE</replaceable>.
+                                The chassis type is used by some
                                 graphical applications to visualize
-                                the host or alter user
-                                interaction. Currently, the following
-                                chassis types are defined:
+                                the host or alter user interaction.
+                                Currently, the following chassis types
+                                are defined:
                                 <literal>desktop</literal>,
                                 <literal>laptop</literal>,
                                 <literal>server</literal>,
                                 <literal>tablet</literal>,
-                                <literal>handset</literal>, as well as
+                                <literal>handset</literal>,
+                                <literal>watch</literal>, as well as
                                 the special chassis types
                                 <literal>vm</literal> and
                                 <literal>container</literal> for
                                 virtualized systems that lack an
-                                immediate physical chassis. Pass an
-                                empty string to this operation to
-                                reset the chassis type to the default
-                                value which is determined from the
-                                firmware and possibly other
-                                parameters.</para></listitem>
+                                immediate physical chassis.</para>
+
+                                <para>Pass an empty string to reset
+                                the chassis type to the default value
+                                which is determined from the firmware
+                                and possibly other parameters.</para>
+                                </listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><command>set-deployment <replaceable>ENVIRONMENT</replaceable></command></term>
+
+                                <listitem><para>Set the deployment
+                                environment
+                                description. <replaceable>ENVIRONMENT</replaceable>
+                                must be a single word without any
+                                control characters. One of the
+                                following is suggested:
+                                <literal>development</literal>,
+                                <literal>integration</literal>,
+                                <literal>staging</literal>,
+                                <literal>production</literal>.
+                                </para>
+
+                                <para>Pass an empty string to reset to
+                                the default empty value.</para>
+                                </listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><command>set-location <replaceable>LOCATION</replaceable></command></term>
+
+                                <listitem><para>Set the location
+                                string for the system, if it is
+                                known. <replaceable>LOCATION</replaceable>
+                                should be a human-friendly, free-form
+                                string describing the physical
+                                location of the system, if it is known
+                                and applicable. This may be as generic
+                                as <literal>Berlin, Germany</literal>
+                                or as specific as <literal>Left Rack,
+                                2nd Shelf</literal>.</para>
+
+                                <para>Pass an empty string to reset to
+                                the default empty value.</para>
+                                </listitem>
+                        </varlistentry>
                 </variablelist>
         </refsect1>
 
                         <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 6a68e816d6fbcef0bf1297fa2bf5ef944b566bdd..347308b620970b1f90eafe467668825326d41bc5 100644 (file)
@@ -19,6 +19,6 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.index — List all manpages from the systemd project</p></div><div class="refsect1"><a name="idm214175805536"></a><h2 id="B">B<a class="headerlink" title="Permalink to this headline" href="#B">¶</a></h2><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a> -- Configure additional binary formats for executables at boot<br><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a> -- Boot performance analysis graphing tool configuration file<br><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a> -- Control the firmware and boot manager settings<br><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a> -- System bootup process<br><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a> -- Introspect the bus<br></p></div><div class="refsect1"><a name="idm214175800544"></a><h2 id="C">C<a class="headerlink" title="Permalink to this headline" href="#C">¶</a></h2><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a> -- Coredump storage configuration file<br><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a> -- Retrieve coredumps from the journal<br><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a> -- Configuration for encrypted block devices<br></p></div><div class="refsect1"><a name="idm214175797344"></a><h2 id="D">D<a class="headerlink" title="Permalink to this headline" href="#D">¶</a></h2><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a> -- Writing and packaging system daemons<br></p></div><div class="refsect1"><a name="idm214175795936"></a><h2 id="F">F<a class="headerlink" title="Permalink to this headline" href="#F">¶</a></h2><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a> -- File system hierarchy overview<br></p></div><div class="refsect1"><a name="idm214175794528"></a><h2 id="H">H<a class="headerlink" title="Permalink to this headline" href="#H">¶</a></h2><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a> -- Local hostname configuration file<br><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a> -- Control the system hostname<br></p></div><div class="refsect1"><a name="idm214175791328"></a><h2 id="I">I<a class="headerlink" title="Permalink to this headline" href="#I">¶</a></h2><p><a href="init.html"><span class="citerefentry"><span class="refentrytitle">init</span>(1)</span></a> -- systemd system and service manager<br></p></div><div class="refsect1"><a name="idm214175789920"></a><h2 id="J">J<a class="headerlink" title="Permalink to this headline" href="#J">¶</a></h2><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a> -- Query the systemd journal<br><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a> -- Journal service configuration file<br></p></div><div class="refsect1"><a name="idm214175855872"></a><h2 id="K">K<a class="headerlink" title="Permalink to this headline" href="#K">¶</a></h2><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a> -- Kernel command line parameters<br><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a> -- Add and remove kernel and initramfs images to and from /boot<br></p></div><div class="refsect1"><a name="idm214175764816"></a><h2 id="L">L<a class="headerlink" title="Permalink to this headline" href="#L">¶</a></h2><p><a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a> -- Configuration file for locale settings<br><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a> -- Control the system locale and keyboard layout settings<br><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a> -- Local timezone configuration file<br><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a> -- Control the systemd login manager<br><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a> -- Login manager configuration file<br></p></div><div class="refsect1"><a name="idm214175759824"></a><h2 id="M">M<a class="headerlink" title="Permalink to this headline" href="#M">¶</a></h2><p><a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> -- Local machine ID configuration file<br><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a> -- Local machine information file<br><a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a> -- Control the systemd machine manager<br><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a> -- Configure kernel modules to load at boot<br></p></div><div class="refsect1"><a name="idm214175755728"></a><h2 id="N">N<a class="headerlink" title="Permalink to this headline" href="#N">¶</a></h2><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a> -- Provide hostname resolution for the locally configured system hostname.<br></p></div><div class="refsect1"><a name="idm214175754320"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a> -- Operating system identification<br></p></div><div class="refsect1"><a name="idm214175752912"></a><h2 id="P">P<a class="headerlink" title="Permalink to this headline" href="#P">¶</a></h2><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a> -- Register user sessions in the systemd login manager<br><a href="poweroff.html"><span class="citerefentry"><span class="refentrytitle">poweroff</span>(8)</span></a> -- Halt, power-off or reboot the machine<br></p></div><div class="refsect1"><a name="idm214175750608"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a> -- Network Name Resolution configuration file<br><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a> -- Print previous and current SysV runlevel<br></p></div><div class="refsect1"><a name="idm214175747408"></a><h2 id="S">S<a class="headerlink" title="Permalink to this headline" href="#S">¶</a></h2><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a> -- APIs for submitting and querying log entries to and from the journal<br><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a> -- APIs for tracking logins<br><a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a> -- Reference implementation of APIs for controlling boot-time read-ahead<br><a href="SD_ALERT.html"><span class="citerefentry"><span class="refentrytitle">SD_ALERT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a> -- Test whether the system is running the systemd init system<br><a href="sd_bus_creds_get_audit_login_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_login_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_audit_session_id.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_session_id</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cgroup.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cgroup</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cmdline.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cmdline</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_exe.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_exe</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_gid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_gid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_mask.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_mask</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_owner_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid_starttime.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid_starttime</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_selinux_context.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_selinux_context</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_session</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_slice</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unique_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unique_name</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_user_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_well_known_names.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_well_known_names</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_bounding_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_bounding_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_effective_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_effective_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_inheritable_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_inheritable_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_permitted_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_permitted_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_default_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_default_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_copy.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_copy</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_free.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_free</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_get_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_get_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_has_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_has_name</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_is_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_is_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_const.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_const</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errnof.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errnof</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a> -- Attach parts of message based on a format string<br><a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_iovec</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_memfd</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_space</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a> -- Attach a single part to a message<br><a href="sd_bus_message_append_string_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_iovec</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_space</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a> -- Attach an array of strings to a message<br><a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_realtime_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_reply_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_reply_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_seqnum.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_seqnum</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_negotiate_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_creds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_timestamps.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamps</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_open_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_container.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_container</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_remote</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_path_decode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_decode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_ref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_release_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_release_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="SD_CRIT.html"><span class="citerefentry"><span class="refentrytitle">SD_CRIT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_DEBUG.html"><span class="citerefentry"><span class="refentrytitle">SD_DEBUG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_EMERG.html"><span class="citerefentry"><span class="refentrytitle">SD_EMERG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_ERR.html"><span class="citerefentry"><span class="refentrytitle">SD_ERR</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_default.html"><span class="citerefentry"><span class="refentrytitle">sd_event_default</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_ref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_source_get_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_clock.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_clock</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_unref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_get_machine_names.html"><span class="citerefentry"><span class="refentrytitle">sd_get_machine_names</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_get_sessions</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_uids.html"><span class="citerefentry"><span class="refentrytitle">sd_get_uids</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="SD_ID128_CONST_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_CONST_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_equal.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_equal</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_VAL.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_VAL</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_from_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_from_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="SD_ID128_MAKE.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_MAKE</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> -- Generate 128-bit IDs<br><a href="sd_id128_t.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_t</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="SD_INFO.html"><span class="citerefentry"><span class="refentrytitle">SD_INFO</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_mq.html"><span class="citerefentry"><span class="refentrytitle">sd_is_mq</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_special.html"><span class="citerefentry"><span class="refentrytitle">sd_is_special</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_journal.html"><span class="citerefentry"><span class="refentrytitle">sd_journal</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_add_conjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_conjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_disjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_disjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_APPEND.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_APPEND</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_close.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_close</span>(3)</span></a> -- Open the system journal for reading<br><a href="SD_JOURNAL_CURRENT_USER.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_CURRENT_USER</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_enumerate_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_enumerate_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_flush_matches.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_flush_matches</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_FOREACH.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_BACKWARDS.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_BACKWARDS</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_DATA.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_DATA</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="SD_JOURNAL_FOREACH_UNIQUE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_UNIQUE</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_get_catalog.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_catalog_for_message_id.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog_for_message_id</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_get_cutoff_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_monotonic_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_events</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_monotonic_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_timeout</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a> -- Journal disk usage<br><a href="SD_JOURNAL_INVALIDATE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_INVALIDATE</span>(3)</span></a> -- Journal change notification interface<br><a href="SD_JOURNAL_LOCAL_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_LOCAL_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_next_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_NOP.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_NOP</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_container.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_container</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_directory.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_directory</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_files.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_files</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_perror.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_perror</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_previous_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_printv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_printv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_process.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_process</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_reliable_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_reliable_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_restart_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_restart_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="SD_JOURNAL_RUNTIME_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_RUNTIME_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_monotonic_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_realtime_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_tail.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_tail</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_send.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_send</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_sendv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_sendv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_set_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_set_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a> -- Create log stream file descriptor to the journal<br><a href="SD_JOURNAL_SUPPRESS_LOCATION.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SUPPRESS_LOCATION</span>(3)</span></a> -- Submit log entries to the journal<br><a href="SD_JOURNAL_SYSTEM.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SYSTEM</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_test_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_test_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_wait.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_wait</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="SD_LISTEN_FDS_START.html"><span class="citerefentry"><span class="refentrytitle">SD_LISTEN_FDS_START</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="sd_login_monitor.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_flush.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_flush</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_events</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_fd</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_timeout</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_unref</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="SD_NOTICE.html"><span class="citerefentry"><span class="refentrytitle">SD_NOTICE</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="sd_notifyf.html"><span class="citerefentry"><span class="refentrytitle">sd_notifyf</span>(3)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="sd_peer_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_readahead.html"><span class="citerefentry"><span class="refentrytitle">sd_readahead</span>(3)</span></a> -- Control ongoing disk boot-time read-ahead operations<br><a href="sd_seat_can_graphical.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_graphical</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_multi_session.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_multi_session</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_tty</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_sessions</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_session_get_class.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_class</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_display</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_host.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_host</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_user.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_user</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_service.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_service</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_state</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_tty</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_type.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_type</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_uid</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_vt.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_vt</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_remote</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_uid_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_display</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_seats</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_sessions</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_is_on_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_is_on_seat</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="SD_WARNING.html"><span class="citerefentry"><span class="refentrytitle">SD_WARNING</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a> -- Check whether the service manager expects watchdog keep-alive notifications from a service<br><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a> -- Configure kernel parameters at boot<br><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a> -- Control the systemd system and service manager<br><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> -- systemd system and service manager<br><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a> -- Test socket activation of daemons<br><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a> -- Analyze system boot-up performance<br><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a> -- Query the user for a system password<br><a href="systemd-ask-password-console.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-backlight.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-binfmt.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a> -- Boot performance graphing tool<br><a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a> -- Connect STDIO or a socket to a given bus address<br><a href="systemd-bus-proxyd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd.socket</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a> -- Connect a pipeline or program's output with the journal<br><a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a> -- Recursively show control group contents<br><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a> -- Show top control groups by their resource usage<br><a href="systemd-cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a> -- Unit generator for<br><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-debug-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-debug-generator</span>(8)</span></a> -- Generator for enabling a runtime debug shell and masking specific units at boot<br><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a> -- Find overridden configuration files<br><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a> -- Detect execution in a virtualized environment<br><a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a> -- Generator for automatically mounting the EFI System Partition used by the current boot to<br><a href="systemd-fsck.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck-root.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck-root.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a> -- Unit generator for /etc/fstab<br><a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a> -- Generator for enabling getty instances on the console<br><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a> -- Generator for automatically discovering and mounting root,<br><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-hostnamed.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a> -- Execute a program with an inhibition lock taken<br><a href="systemd-initctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.socket</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.socket</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a> -- Stream journal messages over the network<br><a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a> -- Journal service<br><a href="systemd-journald-dev-log.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald-dev-log.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-kexec.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-kexec.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-localed.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-logind.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind</span>(8)</span></a> -- Login manager<br><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a> -- Login manager<br><a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a> -- Initialize the machine ID in /etc/machine-id<br><a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-modules-load.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a> -- Network manager<br><a href="systemd-networkd-wait-online.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a> -- Network manager<br><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a> -- Spawn a namespace container for debugging, testing and building<br><a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a> -- List and query system and user paths<br><a href="systemd-poweroff.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-poweroff.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-quotacheck.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-random-seed.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-readahead.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-collect.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-collect.service</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-done.service</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-done.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-done.timer</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-reboot.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-reboot.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-remount-fs.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-resolved.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-rfkill.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a> -- Run programs in transient scope or service units<br><a href="systemd-shutdown.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdown</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-shutdownd.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.socket</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a> -- Suspend and hibernation configuration file<br><a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a> -- Bidirectionally proxy local sockets to another (possibly remote) socket.<br><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sysctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a> -- Generator for redirecting boot to offline update mode<br><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-sysusers.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers.service</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-timedated.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timesyncd.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.timer</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup-dev.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup-dev.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a> -- List or process pending systemd password requests<br><a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-control.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-control.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-kernel.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-kernel.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-update-done.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done</span>(8)</span></a> -- Mark<br><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a> -- Mark<br><a href="systemd-update-utmp.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp-runlevel.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp-runlevel.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-user-sessions.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-user.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-vconsole-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a> -- Automount unit configuration<br><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a> -- Device unit configuration<br><a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a> -- Index of configuration directives<br><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a> -- Execution environment configuration<br><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a> -- Special journal fields<br><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a> -- Process killing procedure configuration<br><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a> -- Network device configuration<br><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a> -- Mount unit configuration<br><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a> -- Virtual Network Device configuration<br><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a> -- Network configuration<br><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a> -- Path unit configuration<br><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a> -- Service enablement presets<br><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a> -- Resource control unit settings<br><a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a> -- Scope unit configuration<br><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a> -- Service unit configuration<br><a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a> -- Slice unit configuration<br><a href="systemd.snapshot.html"><span class="citerefentry"><span class="refentrytitle">systemd.snapshot</span>(5)</span></a> -- Snapshot unit configuration<br><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a> -- Socket unit configuration<br><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a> -- Special systemd units<br><a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a> -- Swap unit configuration<br><a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a> -- Target unit configuration<br><a href="systemd.time.html"><span class="citerefentry"><span class="refentrytitle">systemd.time</span>(7)</span></a> -- Time and date specifications<br><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a> -- Timer unit configuration<br><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> -- Unit configuration<br><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a> -- Declarative allocation of system users and groups<br></p></div><div class="refsect1"><a name="idm214175387472"></a><h2 id="T">T<a class="headerlink" title="Permalink to this headline" href="#T">¶</a></h2><p><a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a> -- Change SysV runlevel<br><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a> -- Control the system time and date<br><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> -- Configuration for creation, deletion and cleaning of volatile and temporary files<br></p></div><div class="refsect1"><a name="idm214175383984"></a><h2 id="U">U<a class="headerlink" title="Permalink to this headline" href="#U">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a> -- Dynamic device management<br><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a> -- udev management tool<br></p></div><div class="refsect1"><a name="idm214175381520"></a><h2 id="V">V<a class="headerlink" title="Permalink to this headline" href="#V">¶</a></h2><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a> -- Configuration file for the virtual console<br></p></div><div class="refsect1"><a name="idm214175380016"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.index — List all manpages from the systemd project</p></div><div class="refsect1"><a name="idm214182042016"></a><h2 id="B">B<a class="headerlink" title="Permalink to this headline" href="#B">¶</a></h2><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a> -- Configure additional binary formats for executables at boot<br><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a> -- Boot performance analysis graphing tool configuration file<br><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a> -- Control the firmware and boot manager settings<br><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a> -- System bootup process<br><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a> -- Introspect the bus<br></p></div><div class="refsect1"><a name="idm214182037024"></a><h2 id="C">C<a class="headerlink" title="Permalink to this headline" href="#C">¶</a></h2><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a> -- Coredump storage configuration file<br><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a> -- Retrieve coredumps from the journal<br><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a> -- Configuration for encrypted block devices<br></p></div><div class="refsect1"><a name="idm214182033824"></a><h2 id="D">D<a class="headerlink" title="Permalink to this headline" href="#D">¶</a></h2><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a> -- Writing and packaging system daemons<br></p></div><div class="refsect1"><a name="idm214182032416"></a><h2 id="F">F<a class="headerlink" title="Permalink to this headline" href="#F">¶</a></h2><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a> -- File system hierarchy overview<br></p></div><div class="refsect1"><a name="idm214182031008"></a><h2 id="H">H<a class="headerlink" title="Permalink to this headline" href="#H">¶</a></h2><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a> -- Local hostname configuration file<br><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a> -- Control the system hostname<br></p></div><div class="refsect1"><a name="idm214182027808"></a><h2 id="I">I<a class="headerlink" title="Permalink to this headline" href="#I">¶</a></h2><p><a href="init.html"><span class="citerefentry"><span class="refentrytitle">init</span>(1)</span></a> -- systemd system and service manager<br></p></div><div class="refsect1"><a name="idm214182026400"></a><h2 id="J">J<a class="headerlink" title="Permalink to this headline" href="#J">¶</a></h2><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a> -- Query the systemd journal<br><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a> -- Journal service configuration file<br></p></div><div class="refsect1"><a name="idm214182088896"></a><h2 id="K">K<a class="headerlink" title="Permalink to this headline" href="#K">¶</a></h2><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a> -- Kernel command line parameters<br><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a> -- Add and remove kernel and initramfs images to and from /boot<br></p></div><div class="refsect1"><a name="idm214182001296"></a><h2 id="L">L<a class="headerlink" title="Permalink to this headline" href="#L">¶</a></h2><p><a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a> -- Configuration file for locale settings<br><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a> -- Control the system locale and keyboard layout settings<br><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a> -- Local timezone configuration file<br><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a> -- Control the systemd login manager<br><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a> -- Login manager configuration file<br></p></div><div class="refsect1"><a name="idm214181996304"></a><h2 id="M">M<a class="headerlink" title="Permalink to this headline" href="#M">¶</a></h2><p><a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> -- Local machine ID configuration file<br><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a> -- Local machine information file<br><a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a> -- Control the systemd machine manager<br><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a> -- Configure kernel modules to load at boot<br></p></div><div class="refsect1"><a name="idm214181992208"></a><h2 id="N">N<a class="headerlink" title="Permalink to this headline" href="#N">¶</a></h2><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a> -- Provide hostname resolution for the locally configured system hostname.<br></p></div><div class="refsect1"><a name="idm214181990800"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a> -- Operating system identification<br></p></div><div class="refsect1"><a name="idm214181989392"></a><h2 id="P">P<a class="headerlink" title="Permalink to this headline" href="#P">¶</a></h2><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a> -- Register user sessions in the systemd login manager<br><a href="poweroff.html"><span class="citerefentry"><span class="refentrytitle">poweroff</span>(8)</span></a> -- Halt, power-off or reboot the machine<br></p></div><div class="refsect1"><a name="idm214181987088"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a> -- Network Name Resolution configuration file<br><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a> -- Print previous and current SysV runlevel<br></p></div><div class="refsect1"><a name="idm214181983888"></a><h2 id="S">S<a class="headerlink" title="Permalink to this headline" href="#S">¶</a></h2><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a> -- APIs for submitting and querying log entries to and from the journal<br><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a> -- APIs for tracking logins<br><a href="SD_ALERT.html"><span class="citerefentry"><span class="refentrytitle">SD_ALERT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a> -- Test whether the system is running the systemd init system<br><a href="sd_bus_creds_get_audit_login_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_login_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_audit_session_id.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_session_id</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cgroup.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cgroup</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cmdline.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cmdline</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_connection_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_connection_name</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_exe.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_exe</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_gid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_gid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_mask.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_mask</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_owner_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid_starttime.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid_starttime</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_selinux_context.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_selinux_context</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_session</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_slice</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unique_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unique_name</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_user_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_well_known_names.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_well_known_names</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_bounding_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_bounding_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_effective_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_effective_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_inheritable_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_inheritable_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_permitted_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_permitted_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_default_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_default_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_copy.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_copy</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_free.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_free</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_get_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_get_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_has_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_has_name</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_is_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_is_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_const.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_const</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errnof.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errnof</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a> -- Attach parts of message based on a format string<br><a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_iovec</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_memfd</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_space</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a> -- Attach a single part to a message<br><a href="sd_bus_message_append_string_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_iovec</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_space</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a> -- Attach an array of strings to a message<br><a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_realtime_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_reply_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_reply_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_seqnum.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_seqnum</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_negotiate_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_creds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_timestamps.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamps</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_open_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_container.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_container</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_remote</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_path_decode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_decode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_ref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_release_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_release_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="SD_CRIT.html"><span class="citerefentry"><span class="refentrytitle">SD_CRIT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_DEBUG.html"><span class="citerefentry"><span class="refentrytitle">SD_DEBUG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_EMERG.html"><span class="citerefentry"><span class="refentrytitle">SD_EMERG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_ERR.html"><span class="citerefentry"><span class="refentrytitle">SD_ERR</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a> -- Add a child state change event source to an event loop<br><a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a> -- Add static event sources to an event loop<br><a href="sd_event_add_exit.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_exit</span>(3)</span></a> -- Add static event sources to an event loop<br><a href="sd_event_add_post.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_post</span>(3)</span></a> -- Add static event sources to an event loop<br><a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a> -- Add a signal event source to an event loop<br><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_default.html"><span class="citerefentry"><span class="refentrytitle">sd_event_default</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_event_get_fd</span>(3)</span></a> -- Obtain a file descriptor to poll for event loop events<br><a href="sd_event_get_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_get_name</span>(3)</span></a> -- Set human-readable names for event sources<br><a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_ref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_set_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_set_name</span>(3)</span></a> -- Set human-readable names for event sources<br><a href="sd_event_source_get_child_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_child_pid</span>(3)</span></a> -- Add a child state change event source to an event loop<br><a href="sd_event_source_get_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_signal</span>(3)</span></a> -- Add a signal event source to an event loop<br><a href="sd_event_source_get_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_clock.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_clock</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_unref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_get_machine_names.html"><span class="citerefentry"><span class="refentrytitle">sd_get_machine_names</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_get_sessions</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_uids.html"><span class="citerefentry"><span class="refentrytitle">sd_get_uids</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="SD_ID128_CONST_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_CONST_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_equal.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_equal</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_VAL.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_VAL</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_from_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_from_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="SD_ID128_MAKE.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_MAKE</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> -- Generate 128-bit IDs<br><a href="sd_id128_t.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_t</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="SD_INFO.html"><span class="citerefentry"><span class="refentrytitle">SD_INFO</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_mq.html"><span class="citerefentry"><span class="refentrytitle">sd_is_mq</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_special.html"><span class="citerefentry"><span class="refentrytitle">sd_is_special</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_journal.html"><span class="citerefentry"><span class="refentrytitle">sd_journal</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_add_conjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_conjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_disjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_disjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_APPEND.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_APPEND</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_close.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_close</span>(3)</span></a> -- Open the system journal for reading<br><a href="SD_JOURNAL_CURRENT_USER.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_CURRENT_USER</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_enumerate_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_enumerate_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_flush_matches.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_flush_matches</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_FOREACH.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_BACKWARDS.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_BACKWARDS</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_DATA.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_DATA</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="SD_JOURNAL_FOREACH_UNIQUE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_UNIQUE</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_get_catalog.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_catalog_for_message_id.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog_for_message_id</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_get_cutoff_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_monotonic_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_events</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_monotonic_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_timeout</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a> -- Journal disk usage<br><a href="SD_JOURNAL_INVALIDATE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_INVALIDATE</span>(3)</span></a> -- Journal change notification interface<br><a href="SD_JOURNAL_LOCAL_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_LOCAL_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_next_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_NOP.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_NOP</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_container.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_container</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_directory.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_directory</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_files.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_files</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_perror.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_perror</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_previous_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_printv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_printv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_process.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_process</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_reliable_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_reliable_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_restart_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_restart_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="SD_JOURNAL_RUNTIME_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_RUNTIME_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_monotonic_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_realtime_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_tail.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_tail</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_send.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_send</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_sendv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_sendv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_set_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_set_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a> -- Create log stream file descriptor to the journal<br><a href="SD_JOURNAL_SUPPRESS_LOCATION.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SUPPRESS_LOCATION</span>(3)</span></a> -- Submit log entries to the journal<br><a href="SD_JOURNAL_SYSTEM.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SYSTEM</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_test_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_test_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_wait.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_wait</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="SD_LISTEN_FDS_START.html"><span class="citerefentry"><span class="refentrytitle">SD_LISTEN_FDS_START</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="sd_login_monitor.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_flush.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_flush</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_events</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_fd</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_timeout</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_unref</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_machine_get_class.html"><span class="citerefentry"><span class="refentrytitle">sd_machine_get_class</span>(3)</span></a> -- Determine the class and network interface indices of a locally running virtual machine or container.<br><a href="sd_machine_get_ifindices.html"><span class="citerefentry"><span class="refentrytitle">sd_machine_get_ifindices</span>(3)</span></a> -- Determine the class and network interface indices of a locally running virtual machine or container.<br><a href="SD_NOTICE.html"><span class="citerefentry"><span class="refentrytitle">SD_NOTICE</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a> -- Notify service manager about start-up completion and other service status changes<br><a href="sd_notifyf.html"><span class="citerefentry"><span class="refentrytitle">sd_notifyf</span>(3)</span></a> -- Notify service manager about start-up completion and other service status changes<br><a href="sd_peer_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_seat_can_graphical.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_graphical</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_multi_session.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_multi_session</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_tty</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_sessions</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_session_get_class.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_class</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_desktop.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_desktop</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_display</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_host.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_host</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_user.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_user</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_service.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_service</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_state</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_tty</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_type.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_type</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_uid</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_vt.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_vt</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_remote</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_uid_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_display</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_seats</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_sessions</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_is_on_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_is_on_seat</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="SD_WARNING.html"><span class="citerefentry"><span class="refentrytitle">SD_WARNING</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a> -- Check whether the service manager expects watchdog keep-alive notifications from a service<br><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a> -- Configure kernel parameters at boot<br><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a> -- Control the systemd system and service manager<br><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> -- systemd system and service manager<br><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a> -- Test socket activation of daemons<br><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a> -- Analyze system boot-up performance<br><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a> -- Query the user for a system password<br><a href="systemd-ask-password-console.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-backlight.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-binfmt.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a> -- Boot performance graphing tool<br><a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a> -- Connect STDIO or a socket to a given bus address<br><a href="systemd-bus-proxyd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd.socket</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a> -- Connect a pipeline or program's output with the journal<br><a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a> -- Recursively show control group contents<br><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a> -- Show top control groups by their resource usage<br><a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a> -- Log and store core dumps<br><a href="systemd-cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a> -- Unit generator for<br><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-debug-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-debug-generator</span>(8)</span></a> -- Generator for enabling a runtime debug shell and masking specific units at boot<br><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a> -- Find overridden configuration files<br><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a> -- Detect execution in a virtualized environment<br><a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a> -- Generator for automatically mounting the EFI System Partition used by the current boot to<br><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a> -- Escape strings for usage in system unit names<br><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a> -- Initialize basic system settings on or before the first boot-up of a system<br><a href="systemd-firstboot.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot.service</span>(1)</span></a> -- Initialize basic system settings on or before the first boot-up of a system<br><a href="systemd-fsck.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck-root.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck-root.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a> -- Unit generator for /etc/fstab<br><a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a> -- Generator for enabling getty instances on the console<br><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a> -- Generator for automatically discovering and mounting root,<br><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-hibernate-resume.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume</span>(8)</span></a> -- Resume from hibernation<br><a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a> -- Unit generator for resume= kernel parameter<br><a href="systemd-hibernate-resume@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume@.service</span>(8)</span></a> -- Resume from hibernation<br><a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-hostnamed.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a> -- Execute a program with an inhibition lock taken<br><a href="systemd-initctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.socket</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.socket</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a> -- Receive journal messages over the network<br><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a> -- Send journal messages over the network<br><a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a> -- Journal service<br><a href="systemd-journald-dev-log.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald-dev-log.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-kexec.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-kexec.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-localed.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-logind.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind</span>(8)</span></a> -- Login manager<br><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a> -- Login manager<br><a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a> -- Initialize the machine ID in /etc/machine-id<br><a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-modules-load.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a> -- Network manager<br><a href="systemd-networkd-wait-online.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a> -- Network manager<br><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a> -- Spawn a namespace container for debugging, testing and building<br><a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a> -- List and query system and user paths<br><a href="systemd-poweroff.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-poweroff.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-quotacheck.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-random-seed.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-reboot.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-reboot.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-remount-fs.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-resolved.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-rfkill.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a> -- Run programs in transient scope or service units<br><a href="systemd-shutdown.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdown</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-shutdownd.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.socket</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a> -- Suspend and hibernation configuration file<br><a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a> -- Bidirectionally proxy local sockets to another (possibly remote) socket.<br><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sysctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a> -- Generator for redirecting boot to offline update mode<br><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-sysusers.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers.service</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-timedated.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timesyncd.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.timer</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup-dev.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup-dev.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a> -- List or process pending systemd password requests<br><a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-control.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-control.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-kernel.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-kernel.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-update-done.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done</span>(8)</span></a> -- Mark<br><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a> -- Mark<br><a href="systemd-update-utmp.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp-runlevel.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp-runlevel.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-user-sessions.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-user.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-vconsole-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a> -- Automount unit configuration<br><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a> -- Device unit configuration<br><a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a> -- Index of configuration directives<br><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a> -- Execution environment configuration<br><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a> -- Special journal fields<br><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a> -- Process killing procedure configuration<br><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a> -- Network device configuration<br><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a> -- Mount unit configuration<br><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a> -- Virtual Network Device configuration<br><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a> -- Network configuration<br><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a> -- Path unit configuration<br><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a> -- Service enablement presets<br><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a> -- Resource control unit settings<br><a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a> -- Scope unit configuration<br><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a> -- Service unit configuration<br><a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a> -- Slice unit configuration<br><a href="systemd.snapshot.html"><span class="citerefentry"><span class="refentrytitle">systemd.snapshot</span>(5)</span></a> -- Snapshot unit configuration<br><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a> -- Socket unit configuration<br><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a> -- Special systemd units<br><a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a> -- Swap unit configuration<br><a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a> -- Target unit configuration<br><a href="systemd.time.html"><span class="citerefentry"><span class="refentrytitle">systemd.time</span>(7)</span></a> -- Time and date specifications<br><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a> -- Timer unit configuration<br><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> -- Unit configuration<br><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a> -- Declarative allocation of system users and groups<br></p></div><div class="refsect1"><a name="idm214181607104"></a><h2 id="T">T<a class="headerlink" title="Permalink to this headline" href="#T">¶</a></h2><p><a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a> -- Change SysV runlevel<br><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a> -- Control the system time and date<br><a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a> -- Network Time Synchronization configuration file<br><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> -- Configuration for creation, deletion and cleaning of volatile and temporary files<br></p></div><div class="refsect1"><a name="idm214181602624"></a><h2 id="U">U<a class="headerlink" title="Permalink to this headline" href="#U">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a> -- Dynamic device management<br><a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a> -- Configuration for device event managing daemon<br><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a> -- udev management tool<br></p></div><div class="refsect1"><a name="idm214181599168"></a><h2 id="V">V<a class="headerlink" title="Permalink to this headline" href="#V">¶</a></h2><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a> -- Configuration file for the virtual console<br></p></div><div class="refsect1"><a name="idm214181597664"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
-    </p><p><a name="counts"></a>This index contains 412 entries, referring to 180 individual manual pages.</p></div></div></body></html>
+    </p><p><a name="counts"></a>This index contains 429 entries, referring to 191 individual manual pages.</p></div></div></body></html>
index df28bba8ae6ef44a4d4517cf28ef676816573fc3..30dd6c7dc26b7f6a09089da0f87800790c4a39b2 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd, init — systemd system and service manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">init [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214189898832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>systemd is a system and service manager for
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd, init — systemd system and service manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">init [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214191869872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>systemd is a system and service manager for
                 Linux operating systems. When run as first process on
                 boot (as PID 1), it acts as init system that brings
                 up and maintains userspace services.</p><p>For compatibility with SysV, if systemd is called
@@ -34,7 +34,7 @@
                 <code class="filename">system.conf</code>, otherwise
                 <code class="filename">user.conf</code>. See
                 <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>
-                for more information.</p></div><div class="refsect1"><a name="idm214188084384"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--test"><span class="term"><code class="option">--test</code></span><a class="headerlink" title="Permalink to this term" href="#--test">¶</a></dt><dd><p>Determine startup
+                for more information.</p></div><div class="refsect1"><a name="idm214191861296"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--test"><span class="term"><code class="option">--test</code></span><a class="headerlink" title="Permalink to this term" href="#--test">¶</a></dt><dd><p>Determine startup
                                 sequence, dump it and exit. This is an
                                 option useful for debugging
                                 only.</p></dd><dt id="--dump-configuration-items"><span class="term"><code class="option">--dump-configuration-items</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-configuration-items">¶</a></dt><dd><p>Dump understood unit
                                 target. Argument must be one of
                                 <code class="option">console</code>,
                                 <code class="option">journal</code>,
-                                <code class="option">syslog</code>,
                                 <code class="option">kmsg</code>,
                                 <code class="option">journal-or-kmsg</code>,
-                                <code class="option">syslog-or-kmsg</code>,
                                 <code class="option">null</code>.</p></dd><dt id="--log-level="><span class="term"><code class="option">--log-level=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-level=">¶</a></dt><dd><p>Set log level. As
                                 argument this accepts a numerical log
-                                level or the well-known <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                                level or the well-known <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                                 symbolic names (lowercase):
                                 <code class="option">emerg</code>,
                                 <code class="option">alert</code>,
                                 <code class="option">--default-standard-error=</code>
                                 to
                                 <code class="option">inherit</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214189143952"></a><h2 id="Concepts">Concepts<a class="headerlink" title="Permalink to this headline" href="#Concepts">¶</a></h2><p>systemd provides a dependency system between
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190798640"></a><h2 id="Concepts">Concepts<a class="headerlink" title="Permalink to this headline" href="#Concepts">¶</a></h2><p>systemd provides a dependency system between
                 various entities called "units" of 12 different
                 types. Units encapsulate various objects that are
                 relevant for system boot-up and maintenance. The
                 file system hierarchy (beneath
                 <code class="filename">/sys/fs/cgroup/systemd/</code>), or in tools
                 such as
-                <a href="ps.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>
+                <a href="http://man7.org/linux/man-pages/man1/ps.1.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>
                 (<span class="command"><strong>ps xawf -eo pid,user,cgroup,args</strong></span>
                 is particularly useful to list all processes and the
                 systemd units they belong to.).</p><p>systemd is compatible with the SysV init system
                 or initrd environment should implement the
                 <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface" target="_top">Container
                 Interface</a> or <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface" target="_top">initrd
-                Interface</a> specifications, respectively.</p></div><div class="refsect1"><a name="idm214189453632"></a><h2 id="Directories">Directories<a class="headerlink" title="Permalink to this headline" href="#Directories">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="System unit directories"><span class="term">System unit directories</span><a class="headerlink" title="Permalink to this term" href="#System%20unit%20directories">¶</a></dt><dd><p>The systemd system
+                Interface</a> specifications, respectively.</p></div><div class="refsect1"><a name="idm214190748208"></a><h2 id="Directories">Directories<a class="headerlink" title="Permalink to this headline" href="#Directories">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="System unit directories"><span class="term">System unit directories</span><a class="headerlink" title="Permalink to this term" href="#System%20unit%20directories">¶</a></dt><dd><p>The systemd system
                                 manager reads unit configuration from
                                 various directories. Packages that
                                 want to install unit files shall place
                                 unit with a native unit configuration
                                 file cannot be started by activating it
                                 in the SysV runlevel link
-                                farm.</p></dd></dl></div></div><div class="refsect1"><a name="idm214189693872"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGTERM"><span class="term"><code class="constant">SIGTERM</code></span><a class="headerlink" title="Permalink to this term" href="#SIGTERM">¶</a></dt><dd><p>Upon receiving this
+                                farm.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190725744"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGTERM"><span class="term"><code class="constant">SIGTERM</code></span><a class="headerlink" title="Permalink to this term" href="#SIGTERM">¶</a></dt><dd><p>Upon receiving this
                                 signal the systemd system manager
                                 serializes its state, reexecutes
                                 itself and deserializes the saved
                                 the kernel command
                                 line.</p></dd><dt id="SIGRTMIN+24"><span class="term"><code class="constant">SIGRTMIN+24</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+24">¶</a></dt><dd><p>Immediately exits the
                                 manager (only available for --user
-                                instances).</p></dd><dt id="SIGRTMIN+26"><span class="term"><code class="constant">SIGRTMIN+26</code>, </span><span class="term"><code class="constant">SIGRTMIN+27</code>, </span><span class="term"><code class="constant">SIGRTMIN+28</code>, </span><span class="term"><code class="constant">SIGRTMIN+29</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+26">¶</a></dt><dd><p>Sets the log level to
-                                "<code class="literal">journal-or-kmsg</code>"
-                                (or "<code class="literal">console</code>" on
+                                instances).</p></dd><dt id="SIGRTMIN+26"><span class="term"><code class="constant">SIGRTMIN+26</code>, </span><span class="term"><code class="constant">SIGRTMIN+27</code>, </span><span class="term"><code class="constant">SIGRTMIN+28</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+26">¶</a></dt><dd><p>Sets the log level to
+                                "<code class="literal">journal-or-kmsg</code>" (or
+                                "<code class="literal">console</code>" on
                                 <code class="constant">SIGRTMIN+27</code>,
                                 "<code class="literal">kmsg</code>" on
-                                <code class="constant">SIGRTMIN+28</code>,
-                                or "<code class="literal">syslog-or-kmsg</code>"
-                                on <code class="constant">SIGRTMIN+29</code>), as
+                                <code class="constant">SIGRTMIN+28</code>), as
                                 controlled via
                                 <code class="varname">systemd.log_target=journal-or-kmsg</code>
-                                (or <code class="varname">systemd.log_target=console</code>
-                                on <code class="constant">SIGRTMIN+27</code>,
+                                (or
+                                <code class="varname">systemd.log_target=console</code>
+                                on <code class="constant">SIGRTMIN+27</code> or
                                 <code class="varname">systemd.log_target=kmsg</code>
-                                on <code class="constant">SIGRTMIN+28</code>,
-                                or
-                                <code class="varname">systemd.log_target=syslog-or-kmsg</code>
-                                on <code class="constant">SIGRTMIN+29</code>) on
-                                the kernel command
-                                line.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191284560"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_LOG_LEVEL"><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LEVEL">¶</a></dt><dd><p>systemd reads the
+                                on <code class="constant">SIGRTMIN+28</code>)
+                                on the kernel command
+                                line.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190659360"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_LOG_LEVEL"><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LEVEL">¶</a></dt><dd><p>systemd reads the
                                 log level from this environment
                                 variable. This can be overridden with
                                 <code class="option">--log-level=</code>.</p></dd><dt id="$SYSTEMD_LOG_TARGET"><span class="term"><code class="varname">$SYSTEMD_LOG_TARGET</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_TARGET">¶</a></dt><dd><p>systemd reads the
                                 start-up completion notification. See
                                 <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>
                                 for more information.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214191260432"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>When run as system instance systemd parses a
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214190635936"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>When run as system instance systemd parses a
                 number of kernel command line
-                arguments<a href="#ftn.idm214191259376" class="footnote" name="idm214191259376"><sup class="footnote">[1]</sup></a>:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code>, </span><span class="term"><code class="varname">rd.systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p>Overrides the unit to
+                arguments<a href="#ftn.idm214190634912" class="footnote" name="idm214190634912"><sup class="footnote">[1]</sup></a>:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code>, </span><span class="term"><code class="varname">rd.systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p>Overrides the unit to
                                 activate on boot. Defaults to
                                 <code class="filename">default.target</code>. This
                                 may be used to temporarily boot into a
                                 debug output.  Passing this option
                                 hence turns on the debug output from
                                 both the system manager and the
-                                kernel.</p></dd><dt id="-b"><span class="term"><code class="varname">-b</code>, </span><span class="term"><code class="varname">emergency</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p>Boot into emergency
+                                kernel.</p></dd><dt id="emergency"><span class="term"><code class="varname">emergency</code>, </span><span class="term"><code class="varname">-b</code></span><a class="headerlink" title="Permalink to this term" href="#emergency">¶</a></dt><dd><p>Boot into emergency
                                 mode. This is equivalent to
                                 <code class="varname">systemd.unit=emergency.target</code>
-                                and provided for compatibility
-                                reasons and to be easier to type.</p></dd><dt id="single"><span class="term"><code class="varname">single</code>, </span><span class="term"><code class="varname">s</code>, </span><span class="term"><code class="varname">S</code>, </span><span class="term"><code class="varname">1</code></span><a class="headerlink" title="Permalink to this term" href="#single">¶</a></dt><dd><p>Boot into rescue
+                                and provided for compatibility reasons
+                                and to be easier to
+                                type.</p></dd><dt id="rescue"><span class="term"><code class="varname">rescue</code>, </span><span class="term"><code class="varname">single</code>, </span><span class="term"><code class="varname">s</code>, </span><span class="term"><code class="varname">S</code>, </span><span class="term"><code class="varname">1</code></span><a class="headerlink" title="Permalink to this term" href="#rescue">¶</a></dt><dd><p>Boot into rescue
                                 mode. This is equivalent to
                                 <code class="varname">systemd.unit=rescue.target</code>
                                 and provided for compatibility reasons
                                 </p></dd></dl></div><p>For other kernel command line parameters
                 understood by components of the core OS, please refer
                 to
-                <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214187977552"></a><h2 id="Sockets and FIFOs">Sockets and FIFOs<a class="headerlink" title="Permalink to this headline" href="#Sockets%20and%20FIFOs">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run/systemd/notify"><span class="term"><code class="filename">/run/systemd/notify</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/notify">¶</a></dt><dd><p>Daemon status
+                <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214190574624"></a><h2 id="Sockets and FIFOs">Sockets and FIFOs<a class="headerlink" title="Permalink to this headline" href="#Sockets%20and%20FIFOs">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run/systemd/notify"><span class="term"><code class="filename">/run/systemd/notify</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/notify">¶</a></dt><dd><p>Daemon status
                                 notification socket. This is an
                                 <code class="constant">AF_UNIX</code> datagram socket and is used to
                                 implement the daemon notification
                                 unit. This is a named pipe in the file
                                 system. This interface is obsolete and
                                 should not be used in new
-                                applications.</p></dd></dl></div></div><div class="refsect1"><a name="idm214187964368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                applications.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190561440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         The <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/" target="_top">systemd Homepage</a>,
                         <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>,
                         <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(5)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>,
-                        <a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man7/bootup.7.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>,
                         <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
-                </p></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idm214191259376" class="footnote"><p><a href="#idm214191259376" class="para"><sup class="para">[1] </sup></a>If run inside a Linux
+                </p></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idm214190634912" class="footnote"><p><a href="#idm214190634912" class="para"><sup class="para">[1] </sup></a>If run inside a Linux
                 container these arguments may be passed as command
                 line arguments to systemd itself, next to any of the
                 command line options listed in the Options section
index 3aa50af611faea761fd013a5729578c57f234b12..8538d4a7ef316c856967e7b90fda7ca8dcc451f7 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "JOURNALCTL" "1" "" "systemd 215" "journalctl"
+.TH "JOURNALCTL" "1" "" "systemd 217" "journalctl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -38,9 +38,9 @@ If one or more match arguments are passed, the output is filtered accordingly\&.
 "FIELD=VALUE", e\&.g\&.
 "_SYSTEMD_UNIT=httpd\&.service", referring to the components of a structured journal entry\&. See
 \fBsystemd.journal-fields\fR(7)
-for a list of well\-known fields\&. If multiple matches are specified matching different fields, the log entries are filtered by both, i\&.e\&. the resulting output will show only entries matching all the specified matches of this kind\&. If two matches apply to the same field, then they are automatically matched as alternatives, i\&.e\&. the resulting output will show entries matching any of the specified matches for the same field\&. Finally, if the character
+for a list of well\-known fields\&. If multiple matches are specified matching different fields, the log entries are filtered by both, i\&.e\&. the resulting output will show only entries matching all the specified matches of this kind\&. If two matches apply to the same field, then they are automatically matched as alternatives, i\&.e\&. the resulting output will show entries matching any of the specified matches for the same field\&. Finally, the character
 "+"
-appears as a separate word on the command line, all matches before and after are combined in a disjunction (i\&.e\&. logical OR)\&.
+may appears as a separate word between other terms on the command line\&. This causes all matches before and after to be combined in a disjunction (i\&.e\&. logical OR)\&.
 .PP
 As shortcuts for a few types of field/value matches, file paths may be specified\&. If a file path refers to an executable file, this is equivalent to an
 "_EXE="
@@ -48,8 +48,19 @@ match for the canonicalized binary path\&. Similarly, if a path refers to a devi
 "_KERNEL_DEVICE="
 match for the device\&.
 .PP
+Additional constraints may be added using options
+\fB\-\-boot\fR,
+\fB\-\-unit=\fR, etc, to further limit what entries will be shown (logical AND)\&.
+.PP
 Output is interleaved from all accessible journal files, whether they are rotated or currently being written, and regardless of whether they belong to the system itself or are accessible user journals\&.
 .PP
+The set of journal files which will be used can be modified using the
+\fB\-\-user\fR,
+\fB\-\-system\fR,
+\fB\-\-directory\fR, and
+\fB\-\-file\fR
+options, see below\&.
+.PP
 All users are granted access to their private per\-user journals\&. However, by default, only root and users who are members of the
 "systemd\-journal"
 group get access to the system journal and the journals of other users\&.
@@ -60,7 +71,7 @@ by default, and long lines are "truncated" to screen width\&. The hidden part ca
 \fB\-\-no\-pager\fR
 option and the "Environment" section below\&.
 .PP
-When outputing to a tty, lines are colored according to priority: lines of level ERROR and higher are colored red; lines of level NOTICE and higher are highlighted; other lines are displayed normally\&.
+When outputting to a tty, lines are colored according to priority: lines of level ERROR and higher are colored red; lines of level NOTICE and higher are highlighted; other lines are displayed normally\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
@@ -91,7 +102,9 @@ Immediately jump to the end of the journal inside the implied pager tool\&. This
 \fB\-n1000\fR
 to guarantee that the pager will not buffer logs of unbounded size\&. This may be overridden with an explicit
 \fB\-n\fR
-with some other numeric value on the command line\&. Note that this option is only supported for the
+with some other numeric value while
+\fB\-nall\fR
+will disable this cap\&. Note that this option is only supported for the
 \fBless\fR(1)
 pager\&.
 .RE
@@ -100,7 +113,9 @@ pager\&.
 .RS 4
 Show the most recent journal events and limit the number of events shown\&. If
 \fB\-\-follow\fR
-is used, this option is implied\&. The argument, a positive integer, is optional, and defaults to 10\&.
+is used, this option is implied\&. The argument is a positive integer or
+"all"
+to disable line limiting\&. The default value is 10 if no argument is given\&.
 .RE
 .PP
 \fB\-\-no\-tail\fR
@@ -174,6 +189,11 @@ generates a very terse output, only showing the actual message of each journal e
 .RE
 .RE
 .PP
+\fB\-\-utc\fR
+.RS 4
+Express time in Coordinated Universal Time (UTC)\&.
+.RE
+.PP
 \fB\-x\fR, \fB\-\-catalog\fR
 .RS 4
 Augment log lines with explanation texts from the message catalog\&. This will add explanatory help texts to log messages in the output where this is available\&. These short help texts will explain the context of an error or log event, possible solutions, as well as pointers to support forums, developer documentation, and any other relevant manuals\&. Note that help texts are not available for all messages, but only for selected ones\&. For more information on the message catalog, please refer to the
@@ -248,10 +268,22 @@ and adds the match
 "_TRANSPORT=kernel"\&.
 .RE
 .PP
+\fB\-t\fR, \fB\-\-identifier=\fR\fB\fISYSLOG_IDENTIFIER\fR\fR\fB|\fR\fB\fIPATTERN\fR\fR
+.RS 4
+Show messages for the specified syslog identifier
+\fISYSLOG_IDENTIFIER\fR, or for any of the messages with a
+"SYSLOG_IDENTIFIER"
+matched by
+\fIPATTERN\fR\&.
+.sp
+This parameter can be specified multiple times\&.
+.RE
+.PP
 \fB\-u\fR, \fB\-\-unit=\fR\fB\fIUNIT\fR\fR\fB|\fR\fB\fIPATTERN\fR\fR
 .RS 4
 Show messages for the specified systemd unit
-\fIUNIT\fR, or for any of the units matched by
+\fIUNIT\fR
+(such as a service unit), or for any of the units matched by
 \fIPATTERN\fR\&. If a pattern is specified, a list of unit names found in the journal is compared with the specified pattern and all that match are used\&. For each unit name, a match is added for messages from the unit ("_SYSTEMD_UNIT=\fIUNIT\fR"), along with additional matches for messages from systemd and messages about coredumps for the specified unit\&.
 .sp
 This parameter can be specified multiple times\&.
@@ -453,6 +485,14 @@ Specifies the FSS verification key to use for the
 operation\&.
 .RE
 .PP
+\fB\-\-flush\fR
+.RS 4
+Asks the Journal daemon to flush any log data stored in
+/run/systemd/log
+into
+/var/systemd/log, if persistent storage is enabled\&. This call does not return until the operation is complete\&.
+.RE
+.PP
 \fB\-h\fR, \fB\-\-help\fR
 .RS 4
 Print a short help text and exit\&.
@@ -589,11 +629,25 @@ journalctl \-k \-b \-1
 .if n \{\
 .RE
 .\}
+.PP
+Show a live log display from a system service
+apache\&.service:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+journalctl \-f \-u apache
+.fi
+.if n \{\
+.RE
+.\}
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
 \fBsystemd-journald.service\fR(8),
 \fBsystemctl\fR(1),
+\fBcoredumpctl\fR(1),
 \fBsystemd.journal-fields\fR(7),
 \fBjournald.conf\fR(5)
 .SH "NOTES"
index 47cc0a8a11b46e899bc07c0c7be670dbd2e13524..60f7cdffc458a40ab4ff3731ffa2cc07ffc42fa7 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="journalctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>journalctl — Query the systemd journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">journalctl</code>  [OPTIONS...] [MATCHES...]</p></div></div><div class="refsect1"><a name="idm214192081472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>journalctl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="journalctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>journalctl — Query the systemd journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">journalctl</code>  [OPTIONS...] [MATCHES...]</p></div></div><div class="refsect1"><a name="idm214180318720"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>journalctl</strong></span> may be used to
                 query the contents of the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 journal as written by
                 field, then they are automatically matched as
                 alternatives, i.e. the resulting output will show
                 entries matching any of the specified matches for the
-                same field. Finally, if the character
-                "<code class="literal">+</code>" appears as a separate word on the
-                command line, all matches before and after are combined
-                in a disjunction (i.e. logical OR).</p><p>As shortcuts for a few types of field/value
+                same field. Finally, the character
+                "<code class="literal">+</code>" may appears as a separate word
+                between other terms on the command line. This causes
+                all matches before and after to be combined in a
+                disjunction (i.e. logical OR).</p><p>As shortcuts for a few types of field/value
                 matches, file paths may be specified. If a file path
                 refers to an executable file, this is equivalent to an
                 "<code class="literal">_EXE=</code>" match for the canonicalized
                 binary path. Similarly, if a path refers to a device
                 node, this is equivalent to a
                 "<code class="literal">_KERNEL_DEVICE=</code>" match for the
-                device.</p><p>Output is interleaved from all accessible
+                device.</p><p>Additional constraints may be added using options
+                <code class="option">--boot</code>, <code class="option">--unit=</code>,
+                etc, to further limit what entries will be shown
+                (logical AND).</p><p>Output is interleaved from all accessible
                 journal files, whether they are rotated or currently
                 being written, and regardless of whether they belong to the
-                system itself or are accessible user journals.</p><p>All users are granted access to their private
+                system itself or are accessible user journals.</p><p>The set of journal files which will be used
+                can be modified using the <code class="option">--user</code>,
+                <code class="option">--system</code>, <code class="option">--directory</code>,
+                and <code class="option">--file</code> options, see below.</p><p>All users are granted access to their private
                 per-user journals. However, by default, only root and
                 users who are members of the "<code class="literal">systemd-journal</code>"
                 group get access to the system journal and the
                 viewed by using the left-arrow and right-arrow
                 keys. Paging can be disabled; see the
                 <code class="option">--no-pager</code> option and the "Environment"
-                section below.</p><p>When outputing to a tty, lines are colored
+                section below.</p><p>When outputting to a tty, lines are colored
                 according to priority: lines of level ERROR and higher
                 are colored red; lines of level NOTICE and higher are
                 highlighted; other lines are displayed normally.
-                </p></div><div class="refsect1"><a name="idm214193028176"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-full"><span class="term"><code class="option">--no-full</code>, </span><span class="term"><code class="option">--full</code>, </span><span class="term"><code class="option">-l</code></span><a class="headerlink" title="Permalink to this term" href="#--no-full">¶</a></dt><dd><p>Ellipsize fields when
+                </p></div><div class="refsect1"><a name="idm214184199968"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-full"><span class="term"><code class="option">--no-full</code>, </span><span class="term"><code class="option">--full</code>, </span><span class="term"><code class="option">-l</code></span><a class="headerlink" title="Permalink to this term" href="#--no-full">¶</a></dt><dd><p>Ellipsize fields when
                                 they do not fit in available columns.
                                 The default is to show full fields,
                                 allowing them to wrap or be truncated
                                 that the pager will not buffer logs of
                                 unbounded size. This may be overridden
                                 with an explicit <code class="option">-n</code>
-                                with some other numeric value on the
-                                command line. Note that this option is
-                                only supported for the
-                                <a href="less.html"><span class="citerefentry"><span class="refentrytitle">less</span>(1)</span></a>
+                                with some other numeric value while
+                                <code class="option">-nall</code> will disable this cap.
+                                Note that this option is only supported for the
+                                <a href="http://man7.org/linux/man-pages/man1/less.1.html"><span class="citerefentry"><span class="refentrytitle">less</span>(1)</span></a>
                                 pager.</p></dd><dt id="-n"><span class="term"><code class="option">-n</code>, </span><span class="term"><code class="option">--lines=</code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p>Show the most recent
                                 journal events and limit the number of
                                 events shown. If
                                 <code class="option">--follow</code> is used,
-                                this option is implied. The argument,
-                                a positive integer, is optional, and
-                                defaults to 10. </p></dd><dt id="--no-tail"><span class="term"><code class="option">--no-tail</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tail">¶</a></dt><dd><p>Show all stored output
+                                this option is implied. The argument is
+                                a positive integer or "<code class="literal">all</code>"
+                                to disable line limiting. The default value is
+                                10 if no argument is given.</p></dd><dt id="--no-tail"><span class="term"><code class="option">--no-tail</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tail">¶</a></dt><dd><p>Show all stored output
                                 lines, even in follow mode. Undoes the
                                 effect of
                                 <code class="option">--lines=</code>.</p></dd><dt id="-r"><span class="term"><code class="option">-r</code>, </span><span class="term"><code class="option">--reverse</code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p>Reverse output so that the newest
                                                         message of each journal
                                                         entry with no metadata,
                                                         not even a timestamp.
-                                                        </p></dd></dl></div></dd><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--catalog</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Augment log lines with
+                                                        </p></dd></dl></div></dd><dt id="--utc"><span class="term"><code class="option">--utc</code></span><a class="headerlink" title="Permalink to this term" href="#--utc">¶</a></dt><dd><p>Express time in Coordinated Universal
+                                Time (UTC).</p></dd><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--catalog</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Augment log lines with
                                 explanation texts from the message
                                 catalog. This will add explanatory
                                 help texts to log messages in the
                                 </p></dd><dt id="-k"><span class="term"><code class="option">-k</code>, </span><span class="term"><code class="option">--dmesg</code></span><a class="headerlink" title="Permalink to this term" href="#-k">¶</a></dt><dd><p>Show only kernel messages. This
                                 implies <code class="option">-b</code> and adds the match
                                 "<code class="literal">_TRANSPORT=kernel</code>".
-                                </p></dd><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--unit=<em class="replaceable"><code>UNIT</code></em>|<em class="replaceable"><code>PATTERN</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Show messages for the
+                                </p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--identifier=<em class="replaceable"><code>SYSLOG_IDENTIFIER</code></em>|<em class="replaceable"><code>PATTERN</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Show messages for the
+                                specified syslog identifier
+                                <em class="replaceable"><code>SYSLOG_IDENTIFIER</code></em>, or
+                                for any of the messages with a "<code class="literal">SYSLOG_IDENTIFIER</code>"
+                                matched by <em class="replaceable"><code>PATTERN</code></em>.</p><p>This parameter can be specified
+                                multiple times.</p></dd><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--unit=<em class="replaceable"><code>UNIT</code></em>|<em class="replaceable"><code>PATTERN</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Show messages for the
                                 specified systemd unit
-                                <em class="replaceable"><code>UNIT</code></em>, or
-                                for any of the units matched by
+                                <em class="replaceable"><code>UNIT</code></em> (such
+                                as a service unit), or for any of the
+                                units matched by
                                 <em class="replaceable"><code>PATTERN</code></em>.
                                 If a pattern is specified, a list of
                                 unit names found in the journal is
                                 the form FROM..TO. The log levels are
                                 the usual syslog log levels as
                                 documented in
-                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
                                 i.e. "<code class="literal">emerg</code>" (0),
                                 "<code class="literal">alert</code>" (1),
                                 "<code class="literal">crit</code>" (2),
                                 verified.</p></dd><dt id="--verify-key="><span class="term"><code class="option">--verify-key=</code></span><a class="headerlink" title="Permalink to this term" href="#--verify-key=">¶</a></dt><dd><p>Specifies the FSS
                                 verification key to use for the
                                 <code class="option">--verify</code>
-                                operation.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214193157888"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned; otherwise, a non-zero
-                failure code is returned.</p></div><div class="refsect1"><a name="idm214181682304"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
+                                operation.</p></dd><dt id="--flush"><span class="term"><code class="option">--flush</code></span><a class="headerlink" title="Permalink to this term" href="#--flush">¶</a></dt><dd><p>Asks the Journal
+                                daemon to flush any log data stored in
+                                <code class="filename">/run/systemd/log</code>
+                                into
+                                <code class="filename">/var/systemd/log</code>,
+                                if persistent storage is enabled. This
+                                call does not return until the
+                                operation is
+                                complete.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179111664"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned; otherwise, a non-zero
+                failure code is returned.</p></div><div class="refsect1"><a name="idm214170766464"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                         <code class="option">--no-pager</code> is not given;
                         overrides <code class="varname">$PAGER</code>.  Setting
                         this to an empty string or the value
                         <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                         options passed to
                         <span class="command"><strong>less</strong></span>
-                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214193156064"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Without arguments, all collected logs are shown
+                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214179109904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Without arguments, all collected logs are shown
                 unfiltered:</p><pre class="programlisting">journalctl</pre><p>With one match specified, all entries with a field matching the expression are shown:</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service</pre><p>If two different fields are matched, only entries matching both expressions at the same time are shown:</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097</pre><p>If two matches refer to the same field, all entries matching either expression are shown:</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service</pre><p>If the separator "<code class="literal">+</code>" is used,
                 two expressions may be combined in a logical OR. The
                 following will show all messages from the Avahi
                 service process with the PID 28097 plus all messages
                 from the D-Bus service (from any of its
-                processes):</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service</pre><p>Show all logs generated by the D-Bus executable:</p><pre class="programlisting">journalctl /usr/bin/dbus-daemon</pre><p>Show all logs of the kernel device node <code class="filename">/dev/sda</code>:</p><pre class="programlisting">journalctl /dev/sda</pre><p>Show all kernel logs from previous boot:</p><pre class="programlisting">journalctl -k -b -1</pre></div><div class="refsect1"><a name="idm214193144192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                processes):</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service</pre><p>Show all logs generated by the D-Bus executable:</p><pre class="programlisting">journalctl /usr/bin/dbus-daemon</pre><p>Show all logs of the kernel device node <code class="filename">/dev/sda</code>:</p><pre class="programlisting">journalctl /dev/sda</pre><p>Show all kernel logs from previous boot:</p><pre class="programlisting">journalctl -k -b -1</pre><p>Show a live log display from a system service <code class="filename">apache.service</code>:</p><pre class="programlisting">journalctl -f -u apache</pre></div><div class="refsect1"><a name="idm214179096960"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
+                        <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                 </p></div></div></body></html>
index 78fc6f616066be8aaf4e35a70c776e3f842314cf..db2a1e142b9d8df85b359110a4b091b72fbf6dce 100644 (file)
                 field, then they are automatically matched as
                 alternatives, i.e. the resulting output will show
                 entries matching any of the specified matches for the
-                same field. Finally, if the character
-                <literal>+</literal> appears as a separate word on the
-                command line, all matches before and after are combined
-                in a disjunction (i.e. logical OR).</para>
+                same field. Finally, the character
+                <literal>+</literal> may appears as a separate word
+                between other terms on the command line. This causes
+                all matches before and after to be combined in a
+                disjunction (i.e. logical OR).</para>
 
                 <para>As shortcuts for a few types of field/value
                 matches, file paths may be specified. If a file path
                 <literal>_KERNEL_DEVICE=</literal> match for the
                 device.</para>
 
+                <para>Additional constraints may be added using options
+                <option>--boot</option>, <option>--unit=</option>,
+                etc, to further limit what entries will be shown
+                (logical AND).</para>
+
                 <para>Output is interleaved from all accessible
                 journal files, whether they are rotated or currently
                 being written, and regardless of whether they belong to the
                 system itself or are accessible user journals.</para>
 
+                <para>The set of journal files which will be used
+                can be modified using the <option>--user</option>,
+                <option>--system</option>, <option>--directory</option>,
+                and <option>--file</option> options, see below.</para>
+
                 <para>All users are granted access to their private
                 per-user journals. However, by default, only root and
                 users who are members of the <literal>systemd-journal</literal>
                 <option>--no-pager</option> option and the "Environment"
                 section below.</para>
 
-                <para>When outputing to a tty, lines are colored
+                <para>When outputting to a tty, lines are colored
                 according to priority: lines of level ERROR and higher
                 are colored red; lines of level NOTICE and higher are
                 highlighted; other lines are displayed normally.
                                 that the pager will not buffer logs of
                                 unbounded size. This may be overridden
                                 with an explicit <option>-n</option>
-                                with some other numeric value on the
-                                command line. Note that this option is
-                                only supported for the
-                                <citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                                with some other numeric value while
+                                <option>-nall</option> will disable this cap.
+                                Note that this option is only supported for the
+                                <citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                                 pager.</para></listitem>
                         </varlistentry>
 
                                 journal events and limit the number of
                                 events shown. If
                                 <option>--follow</option> is used,
-                                this option is implied. The argument,
-                                a positive integer, is optional, and
-                                defaults to 10. </para></listitem>
+                                this option is implied. The argument is
+                                a positive integer or <literal>all</literal>
+                                to disable line limiting. The default value is
+                                10 if no argument is given.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 </listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>--utc</option></term>
+
+                                <listitem><para>Express time in Coordinated Universal
+                                Time (UTC).</para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><option>-x</option></term>
                                 <term><option>--catalog</option></term>
                                 </para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>-t</option></term>
+                                <term><option>--identifier=<replaceable>SYSLOG_IDENTIFIER</replaceable>|<replaceable>PATTERN</replaceable></option></term>
+
+                                <listitem><para>Show messages for the
+                                specified syslog identifier
+                                <replaceable>SYSLOG_IDENTIFIER</replaceable>, or
+                                for any of the messages with a <literal>SYSLOG_IDENTIFIER</literal>
+                                matched by <replaceable>PATTERN</replaceable>.</para>
+
+                                <para>This parameter can be specified
+                                multiple times.</para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><option>-u</option></term>
                                 <term><option>--unit=<replaceable>UNIT</replaceable>|<replaceable>PATTERN</replaceable></option></term>
 
                                 <listitem><para>Show messages for the
                                 specified systemd unit
-                                <replaceable>UNIT</replaceable>, or
-                                for any of the units matched by
+                                <replaceable>UNIT</replaceable> (such
+                                as a service unit), or for any of the
+                                units matched by
                                 <replaceable>PATTERN</replaceable>.
                                 If a pattern is specified, a list of
                                 unit names found in the journal is
                                 the form FROM..TO. The log levels are
                                 the usual syslog log levels as
                                 documented in
-                                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                                 i.e. <literal>emerg</literal> (0),
                                 <literal>alert</literal> (1),
                                 <literal>crit</literal> (2),
                                 operation.</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>--flush</option></term>
+
+                                <listitem><para>Asks the Journal
+                                daemon to flush any log data stored in
+                                <filename>/run/systemd/log</filename>
+                                into
+                                <filename>/var/systemd/log</filename>,
+                                if persistent storage is enabled. This
+                                call does not return until the
+                                operation is
+                                complete.</para></listitem>
+                        </varlistentry>
+
                         <xi:include href="standard-options.xml" xpointer="help" />
                         <xi:include href="standard-options.xml" xpointer="version" />
                         <xi:include href="standard-options.xml" xpointer="no-pager" />
 
                 <programlisting>journalctl -k -b -1</programlisting>
 
+                <para>Show a live log display from a system service <filename>apache.service</filename>:</para>
+
+                <programlisting>journalctl -f -u apache</programlisting>
+
         </refsect1>
 
         <refsect1>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
index c5fc1e11d5a2efeed4f5bb1167c9910af0033311..62ff68caf9864bbe81da88c4d88d7dad06493033 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "JOURNALD\&.CONF" "5" "" "systemd 215" "journald.conf"
+.TH "JOURNALD\&.CONF" "5" "" "systemd 217" "journald.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -188,7 +188,7 @@ The timeout before synchronizing journal files to disk\&. After syncing, journal
 .PP
 \fIForwardToSyslog=\fR, \fIForwardToKMsg=\fR, \fIForwardToConsole=\fR, \fIForwardToWall=\fR
 .RS 4
-Control whether log messages received by the journal daemon shall be forwarded to a traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, or sent as wall messages to all logged\-in users\&. These options take boolean arguments\&. If forwarding to syslog is enabled but no syslog daemon is running, the respective option has no effect\&. By default, only forwarding to syslog and wall is enabled\&. These settings may be overridden at boot time with the kernel command line options
+Control whether log messages received by the journal daemon shall be forwarded to a traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, or sent as wall messages to all logged\-in users\&. These options take boolean arguments\&. If forwarding to syslog is enabled but no syslog daemon is running, the respective option has no effect\&. By default, only forwarding wall is enabled\&. These settings may be overridden at boot time with the kernel command line options
 "systemd\&.journald\&.forward_to_syslog=",
 "systemd\&.journald\&.forward_to_kmsg=",
 "systemd\&.journald\&.forward_to_console="
index 66cfa1c1543d074a5af6da4abcd881f4bd1efb66..097d91ae590e92522bb0f850aad1dadf95f0ae35 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="journald.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>journald.conf — Journal service configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/journald.conf</code></p></div><div class="refsect1"><a name="idm214198630544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>This file configures various parameters of the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="journald.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>journald.conf — Journal service configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/journald.conf</code></p></div><div class="refsect1"><a name="idm214196102640"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>This file configures various parameters of the
                 systemd journal service,
-                <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214200500944"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
+                <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214196100464"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
                 "<code class="literal">[Journal]</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="Storage="><span class="term"><code class="varname">Storage=</code></span><a class="headerlink" title="Permalink to this term" href="#Storage=">¶</a></dt><dd><p>Controls where to
                                 store journal data. One of
                                 "<code class="literal">volatile</code>",
                                 forwarding to syslog is enabled but no
                                 syslog daemon is running, the
                                 respective option has no effect. By
-                                default, only forwarding to syslog and
-                                wall is enabled. These settings may be
+                                default, only forwarding wall is
+                                enabled. These settings may be
                                 overridden at boot time with the
                                 kernel command line options
                                 "<code class="literal">systemd.journald.forward_to_syslog=</code>",
                                 and
                                 "<code class="literal">systemd.journald.forward_to_wall=</code>".
                                 When forwarding to the console, the
-                                TTY to log to can be changed
-                                with <code class="varname">TTYPath=</code>,
-                                described below.</p></dd><dt id="MaxLevelStore="><span class="term"><code class="varname">MaxLevelStore=</code>, </span><span class="term"><code class="varname">MaxLevelSyslog=</code>, </span><span class="term"><code class="varname">MaxLevelKMsg=</code>, </span><span class="term"><code class="varname">MaxLevelConsole=</code>, </span><span class="term"><code class="varname">MaxLevelWall=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelStore=">¶</a></dt><dd><p>Controls the maximum
+                                TTY to log to can be changed with
+                                <code class="varname">TTYPath=</code>, described
+                                below.</p></dd><dt id="MaxLevelStore="><span class="term"><code class="varname">MaxLevelStore=</code>, </span><span class="term"><code class="varname">MaxLevelSyslog=</code>, </span><span class="term"><code class="varname">MaxLevelKMsg=</code>, </span><span class="term"><code class="varname">MaxLevelConsole=</code>, </span><span class="term"><code class="varname">MaxLevelWall=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelStore=">¶</a></dt><dd><p>Controls the maximum
                                 log level of messages that are stored
                                 on disk, forwarded to syslog, kmsg,
                                 the console or wall (if that is
                                 to use if
                                 <code class="varname">ForwardToConsole=yes</code>
                                 is used. Defaults to
-                                <code class="filename">/dev/console</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200261392"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                <code class="filename">/dev/console</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194981616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
                           <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
index 046609e401d6e09a9370b006104429db1acf83ef..5538b968e7414a573fa50bab38ab182dfa2f8478 100644 (file)
                                 forwarding to syslog is enabled but no
                                 syslog daemon is running, the
                                 respective option has no effect. By
-                                default, only forwarding to syslog and
-                                wall is enabled. These settings may be
+                                default, only forwarding wall is
+                                enabled. These settings may be
                                 overridden at boot time with the
                                 kernel command line options
                                 <literal>systemd.journald.forward_to_syslog=</literal>,
                                 and
                                 <literal>systemd.journald.forward_to_wall=</literal>.
                                 When forwarding to the console, the
-                                TTY to log to can be changed
-                                with <varname>TTYPath=</varname>,
-                                described below.</para></listitem>
+                                TTY to log to can be changed with
+                                <varname>TTYPath=</varname>, described
+                                below.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
index 27bd8ef4786f199dfa906b7b1d7e2fe3ce70b03f..89bcefaa5110f12d306db35c3493b2c1c846a391 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "KERNEL\-COMMAND\-LINE" "7" "" "systemd 215" "kernel-command-line"
+.TH "KERNEL\-COMMAND\-LINE" "7" "" "systemd 217" "kernel-command-line"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -69,7 +69,7 @@ Parameter understood by both the kernel and the system and service manager to co
 \fBsystemd\fR(1)\&.
 .RE
 .PP
-\fI\-b\fR, \fIemergency\fR, \fIsingle\fR, \fIs\fR, \fIS\fR, \fI1\fR, \fI2\fR, \fI3\fR, \fI4\fR, \fI5\fR
+\fI\-b\fR, \fIemergency\fR, \fIrescue\fR, \fIsingle\fR, \fIs\fR, \fIS\fR, \fI1\fR, \fI2\fR, \fI3\fR, \fI4\fR, \fI5\fR
 .RS 4
 Parameters understood by the system and service manager, as compatibility options\&. For details, see
 \fBsystemd\fR(1)\&.
@@ -105,7 +105,7 @@ Parameters understood by the virtual console setup logic\&. For details, see
 \fBsystemd-vconsole-setup.service\fR(8)\&.
 .RE
 .PP
-\fIudev\&.log\-priority=\fR, \fIrd\&.udev\&.log\-priority=\fR, \fIudev\&.children\-max=\fR, \fIrd\&.udev\&.children\-max=\fR, \fIudev\&.exec\-delay=\fR, \fIrd\&.udev\&.exec\-delay=\fR, \fInet\&.ifnames=\fR
+\fIudev\&.log\-priority=\fR, \fIrd\&.udev\&.log\-priority=\fR, \fIudev\&.children\-max=\fR, \fIrd\&.udev\&.children\-max=\fR, \fIudev\&.exec\-delay=\fR, \fIrd\&.udev\&.exec\-delay=\fR, \fIudev\&.event\-timeout=\fR, \fIrd\&.udev\&.event\-timeout=\fR, \fInet\&.ifnames=\fR
 .RS 4
 Parameters understood by the device event managing daemon\&. For details, see
 \fBsystemd-udevd.service\fR(8)\&.
@@ -148,6 +148,13 @@ Configures whether GPT based partition auto\-discovery shall be attempted\&. For
 Load a specific kernel module early at boot\&. For details, see
 \fBsystemd-modules-load.service\fR(8)\&.
 .RE
+.PP
+\fIresume=\fR
+.RS 4
+Enables resume from hibernation using the specified device\&. All
+\fBfstab\fR(5)\-like paths are supported\&. For details, see
+\fBsystemd-hibernate-resume-generator\fR(8)\&.
+.RE
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
@@ -165,7 +172,8 @@ Load a specific kernel module early at boot\&. For details, see
 \fBsystemd-gpt-auto-generator\fR(8),
 \fBsystemd-modules-load.service\fR(8),
 \fBsystemd-backlight@.service\fR(8),
-\fBsystemd-rfkill@.service\fR(8)
+\fBsystemd-rfkill@.service\fR(8),
+\fBsystemd-hibernate-resume-generator\fR(8)
 .SH "NOTES"
 .IP " 1." 4
 kernel-parameters.txt
index 5cf5955defc01e2a678d36672e228dd90b8ffeb9..60c3c8800ce36f32b9f6f6a6ebb9293fd3e2d36d 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="kernel-command-line"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kernel-command-line — Kernel command line parameters</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/proc/cmdline</code></p></div><div class="refsect1"><a name="idm214185265888"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The kernel, the initial RAM disk (initrd) and
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="kernel-command-line"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kernel-command-line — Kernel command line parameters</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/proc/cmdline</code></p></div><div class="refsect1"><a name="idm214191093040"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The kernel, the initial RAM disk (initrd) and
                 basic userspace functionality may be configured at boot via
                 kernel command line arguments.</p><p>For command line parameters understood by the
                 kernel, please see <a class="ulink" href="https://www.kernel.org/doc/Documentation/kernel-parameters.txt" target="_top"><code class="filename">kernel-parameters.txt</code></a>
                 and
-                <a href="bootparam.html"><span class="citerefentry"><span class="refentrytitle">bootparam</span>(7)</span></a>.</p><p>For command line parameters understood by the
+                <a href="http://man7.org/linux/man-pages/man7/bootparam.7.html"><span class="citerefentry"><span class="refentrytitle">bootparam</span>(7)</span></a>.</p><p>For command line parameters understood by the
                 initial RAM disk, please see
-                <a href="dracut.cmdline.html"><span class="citerefentry"><span class="refentrytitle">dracut.cmdline</span>(7)</span></a>,
+                <a href="http://linux.die.net/man/7/dracut.cmdline"><span class="citerefentry"><span class="refentrytitle">dracut.cmdline</span>(7)</span></a>,
                 or the documentation of the specific initrd
-                implementation of your installation.</p></div><div class="refsect1"><a name="idm214183797568"></a><h2 id="Core OS Command Line Arguments">Core OS Command Line Arguments<a class="headerlink" title="Permalink to this headline" href="#Core%20OS%20Command%20Line%20Arguments">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code>, </span><span class="term"><code class="varname">rd.systemd.unit=</code>, </span><span class="term"><code class="varname">systemd.dump_core=</code>, </span><span class="term"><code class="varname">systemd.crash_shell=</code>, </span><span class="term"><code class="varname">systemd.crash_chvt=</code>, </span><span class="term"><code class="varname">systemd.confirm_spawn=</code>, </span><span class="term"><code class="varname">systemd.show_status=</code>, </span><span class="term"><code class="varname">systemd.log_target=</code>, </span><span class="term"><code class="varname">systemd.log_level=</code>, </span><span class="term"><code class="varname">systemd.log_color=</code>, </span><span class="term"><code class="varname">systemd.log_location=</code>, </span><span class="term"><code class="varname">systemd.default_standard_output=</code>, </span><span class="term"><code class="varname">systemd.default_standard_error=</code>, </span><span class="term"><code class="varname">systemd.setenv=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p>Parameters understood by
+                implementation of your installation.</p></div><div class="refsect1"><a name="idm214191087504"></a><h2 id="Core OS Command Line Arguments">Core OS Command Line Arguments<a class="headerlink" title="Permalink to this headline" href="#Core%20OS%20Command%20Line%20Arguments">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code>, </span><span class="term"><code class="varname">rd.systemd.unit=</code>, </span><span class="term"><code class="varname">systemd.dump_core=</code>, </span><span class="term"><code class="varname">systemd.crash_shell=</code>, </span><span class="term"><code class="varname">systemd.crash_chvt=</code>, </span><span class="term"><code class="varname">systemd.confirm_spawn=</code>, </span><span class="term"><code class="varname">systemd.show_status=</code>, </span><span class="term"><code class="varname">systemd.log_target=</code>, </span><span class="term"><code class="varname">systemd.log_level=</code>, </span><span class="term"><code class="varname">systemd.log_color=</code>, </span><span class="term"><code class="varname">systemd.log_location=</code>, </span><span class="term"><code class="varname">systemd.default_standard_output=</code>, </span><span class="term"><code class="varname">systemd.default_standard_error=</code>, </span><span class="term"><code class="varname">systemd.setenv=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p>Parameters understood by
                                         the system and service manager
                                         to control system behavior. For details, see
                                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>.</p></dd><dt id="systemd.mask="><span class="term"><code class="varname">systemd.mask=</code>, </span><span class="term"><code class="varname">systemd.wants=</code>, </span><span class="term"><code class="varname">systemd.debug-shell</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.mask=">¶</a></dt><dd><p>Additional parameters
@@ -54,7 +54,7 @@
                                         and service manager to control
                                         console log verbosity. For
                                         details, see
-                                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>.</p></dd><dt id="-b"><span class="term"><code class="varname">-b</code>, </span><span class="term"><code class="varname">emergency</code>, </span><span class="term"><code class="varname">single</code>, </span><span class="term"><code class="varname">s</code>, </span><span class="term"><code class="varname">S</code>, </span><span class="term"><code class="varname">1</code>, </span><span class="term"><code class="varname">2</code>, </span><span class="term"><code class="varname">3</code>, </span><span class="term"><code class="varname">4</code>, </span><span class="term"><code class="varname">5</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p>Parameters understood by
+                                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>.</p></dd><dt id="-b"><span class="term"><code class="varname">-b</code>, </span><span class="term"><code class="varname">emergency</code>, </span><span class="term"><code class="varname">rescue</code>, </span><span class="term"><code class="varname">single</code>, </span><span class="term"><code class="varname">s</code>, </span><span class="term"><code class="varname">S</code>, </span><span class="term"><code class="varname">1</code>, </span><span class="term"><code class="varname">2</code>, </span><span class="term"><code class="varname">3</code>, </span><span class="term"><code class="varname">4</code>, </span><span class="term"><code class="varname">5</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p>Parameters understood by
                                         the system and service
                                         manager, as compatibility
                                         options. For details, see
                                         <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>.</p></dd><dt id="vconsole.keymap="><span class="term"><code class="varname">vconsole.keymap=</code>, </span><span class="term"><code class="varname">vconsole.keymap.toggle=</code>, </span><span class="term"><code class="varname">vconsole.font=</code>, </span><span class="term"><code class="varname">vconsole.font.map=</code>, </span><span class="term"><code class="varname">vconsole.font.unimap=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.keymap=">¶</a></dt><dd><p>Parameters understood by
                                         the virtual console setup logic. For
                                         details, see
-                                        <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a>.</p></dd><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code>, </span><span class="term"><code class="varname">rd.udev.log-priority=</code>, </span><span class="term"><code class="varname">udev.children-max=</code>, </span><span class="term"><code class="varname">rd.udev.children-max=</code>, </span><span class="term"><code class="varname">udev.exec-delay=</code>, </span><span class="term"><code class="varname">rd.udev.exec-delay=</code>, </span><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p>Parameters understood by
+                                        <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a>.</p></dd><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code>, </span><span class="term"><code class="varname">rd.udev.log-priority=</code>, </span><span class="term"><code class="varname">udev.children-max=</code>, </span><span class="term"><code class="varname">rd.udev.children-max=</code>, </span><span class="term"><code class="varname">udev.exec-delay=</code>, </span><span class="term"><code class="varname">rd.udev.exec-delay=</code>, </span><span class="term"><code class="varname">udev.event-timeout=</code>, </span><span class="term"><code class="varname">rd.udev.event-timeout=</code>, </span><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p>Parameters understood by
                                         the device event managing daemon. For
                                         details, see
                                         <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>.</p></dd><dt id="plymouth.enable="><span class="term"><code class="varname">plymouth.enable=</code></span><a class="headerlink" title="Permalink to this term" href="#plymouth.enable=">¶</a></dt><dd><p>May be used to disable
                                         the Plymouth boot splash. For
                                         details, see
-                                        <a href="plymouth.html"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>.</p></dd><dt id="luks="><span class="term"><code class="varname">luks=</code>, </span><span class="term"><code class="varname">rd.luks=</code>, </span><span class="term"><code class="varname">luks.crypttab=</code>, </span><span class="term"><code class="varname">rd.luks.crypttab=</code>, </span><span class="term"><code class="varname">luks.uuid=</code>, </span><span class="term"><code class="varname">rd.luks.uuid=</code>, </span><span class="term"><code class="varname">luks.options=</code>, </span><span class="term"><code class="varname">rd.luks.options=</code>, </span><span class="term"><code class="varname">luks.key=</code>, </span><span class="term"><code class="varname">rd.luks.key=</code></span><a class="headerlink" title="Permalink to this term" href="#luks=">¶</a></dt><dd><p>Configures the LUKS
+                                        <a href="http://linux.die.net/man/8/plymouth"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>.</p></dd><dt id="luks="><span class="term"><code class="varname">luks=</code>, </span><span class="term"><code class="varname">rd.luks=</code>, </span><span class="term"><code class="varname">luks.crypttab=</code>, </span><span class="term"><code class="varname">rd.luks.crypttab=</code>, </span><span class="term"><code class="varname">luks.uuid=</code>, </span><span class="term"><code class="varname">rd.luks.uuid=</code>, </span><span class="term"><code class="varname">luks.options=</code>, </span><span class="term"><code class="varname">rd.luks.options=</code>, </span><span class="term"><code class="varname">luks.key=</code>, </span><span class="term"><code class="varname">rd.luks.key=</code></span><a class="headerlink" title="Permalink to this term" href="#luks=">¶</a></dt><dd><p>Configures the LUKS
                                         full-disk encryption logic at
                                         boot. For details, see
                                         <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></dd><dt id="fstab="><span class="term"><code class="varname">fstab=</code>, </span><span class="term"><code class="varname">rd.fstab=</code></span><a class="headerlink" title="Permalink to this term" href="#fstab=">¶</a></dt><dd><p>Configures the
                                         <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>.</p></dd><dt id="modules-load="><span class="term"><code class="varname">modules-load=</code>, </span><span class="term"><code class="varname">rd.modules-load=</code></span><a class="headerlink" title="Permalink to this term" href="#modules-load=">¶</a></dt><dd><p>Load a specific kernel
                                         module early at boot. For
                                         details, see
-                                        <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184989504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                        <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>.</p></dd><dt id="resume="><span class="term"><code class="varname">resume=</code></span><a class="headerlink" title="Permalink to this term" href="#resume=">¶</a></dt><dd><p>Enables resume from hibernation
+                                        using the specified device.
+                                        All <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>-like
+                                        paths are supported. For details, see
+                                        <a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214189974944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="bootparam.html"><span class="citerefentry"><span class="refentrytitle">bootparam</span>(7)</span></a>,
-                          <a href="dracut.cmdline.html"><span class="citerefentry"><span class="refentrytitle">dracut.cmdline</span>(7)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man7/bootparam.7.html"><span class="citerefentry"><span class="refentrytitle">bootparam</span>(7)</span></a>,
+                          <a href="http://linux.die.net/man/7/dracut.cmdline"><span class="citerefentry"><span class="refentrytitle">dracut.cmdline</span>(7)</span></a>,
                           <a href="systemd-debug-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-debug-generator</span>(8)</span></a>,
                           <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a>,
                           <a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a>,
                           <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
                           <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a>,
                           <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>,
-                          <a href="plymouth.html"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>,
+                          <a href="http://linux.die.net/man/8/plymouth"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>,
                           <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>,
                           <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>,
                           <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>,
                           <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>,
                           <a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a>,
-                          <a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a>
+                          <a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a>,
+                          <a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a>
                   </p></div></div></body></html>
index f244bfcb5794e33af20776883c680d52f1914625..68460ac93d08b7099d75af3668a1b0e2fb868e68 100644 (file)
                 kernel, please see <ulink
                 url="https://www.kernel.org/doc/Documentation/kernel-parameters.txt"><filename>kernel-parameters.txt</filename></ulink>
                 and
-                <citerefentry><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
+                <citerefentry project='man-pages'><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
 
                 <para>For command line parameters understood by the
                 initial RAM disk, please see
-                <citerefentry><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                <citerefentry project='die-net'><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                 or the documentation of the specific initrd
                 implementation of your installation.</para>
         </refsect1>
                         <varlistentry>
                                 <term><varname>-b</varname></term>
                                 <term><varname>emergency</varname></term>
+                                <term><varname>rescue</varname></term>
                                 <term><varname>single</varname></term>
                                 <term><varname>s</varname></term>
                                 <term><varname>S</varname></term>
                                 <term><varname>rd.udev.children-max=</varname></term>
                                 <term><varname>udev.exec-delay=</varname></term>
                                 <term><varname>rd.udev.exec-delay=</varname></term>
+                                <term><varname>udev.event-timeout=</varname></term>
+                                <term><varname>rd.udev.event-timeout=</varname></term>
                                 <term><varname>net.ifnames=</varname></term>
 
                                 <listitem>
                                         <para>May be used to disable
                                         the Plymouth boot splash. For
                                         details, see
-                                        <citerefentry><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+                                        <citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
                                 </listitem>
                         </varlistentry>
 
                                 </listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>resume=</varname></term>
+
+                                <listitem>
+                                        <para>Enables resume from hibernation
+                                        using the specified device.
+                                        All <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>-like
+                                        paths are supported. For details, see
+                                        <citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+                                </listitem>
+                        </varlistentry>
                 </variablelist>
 
         </refsect1>
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                          <citerefentry project='man-pages'><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                          <citerefentry project='die-net'><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                          <citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index b6d2c74e0cbae2eebbc3f917e2b21d1c3c759885..3d0f1e7af77990d17d1e7779a9b4a853e9f3b24b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "KERNEL\-INSTALL" "8" "" "systemd 215" "kernel-install"
+.TH "KERNEL\-INSTALL" "8" "" "systemd 217" "kernel-install"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 14fe088ae3a7d3d90b01cd2fca7c3b2f501edaf6..c914a494870c6e73b0dbc2f6451a9b337a8207f5 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="kernel-install"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kernel-install — Add and remove kernel and initramfs images to and from /boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">kernel-install</code>   COMMAND   <em class="replaceable"><code>KERNEL-VERSION</code></em>  [<em class="replaceable"><code>KERNEL-IMAGE</code></em>]</p></div></div><div class="refsect1"><a name="idm214177157904"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="kernel-install"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kernel-install — Add and remove kernel and initramfs images to and from /boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">kernel-install</code>   COMMAND   <em class="replaceable"><code>KERNEL-VERSION</code></em>  [<em class="replaceable"><code>KERNEL-IMAGE</code></em>]</p></div></div><div class="refsect1"><a name="idm214177413856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
       <span class="command"><strong>kernel-install</strong></span> is used to install and remove kernel and
       initramfs images to and from <code class="filename">/boot</code>.
     </p><p><span class="command"><strong>kernel-install</strong></span> will execute the files
@@ -32,7 +32,7 @@
     executables with a local file if needed; a symbolic link in <code class="filename">/etc/kernel/install.d/</code>
     with the same name as an executable in <code class="filename">/usr/lib/kernel/install.d/</code>,
     pointing to /dev/null, disables the executable entirely. Executables must have the
-    extension "<code class="literal">.install</code>"; other extensions are ignored.</p></div><div class="refsect1"><a name="idm214178545168"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="add KERNEL-VERSION KERNEL-IMAGE"><span class="term"><span class="command"><strong>add <em class="replaceable"><code>KERNEL-VERSION</code></em> <em class="replaceable"><code>KERNEL-IMAGE</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#add%20KERNEL-VERSION%20KERNEL-IMAGE">¶</a></dt><dd><p><span class="command"><strong>kernel-install</strong></span> creates the directory
+    extension "<code class="literal">.install</code>"; other extensions are ignored.</p></div><div class="refsect1"><a name="idm214177404960"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="add KERNEL-VERSION KERNEL-IMAGE"><span class="term"><span class="command"><strong>add <em class="replaceable"><code>KERNEL-VERSION</code></em> <em class="replaceable"><code>KERNEL-IMAGE</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#add%20KERNEL-VERSION%20KERNEL-IMAGE">¶</a></dt><dd><p><span class="command"><strong>kernel-install</strong></span> creates the directory
           <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/</code>
           and calls every executable
           <code class="filename">/usr/lib/kernel/install.d/*.install</code> and
@@ -59,7 +59,7 @@
           </p><pre class="programlisting">remove <em class="replaceable"><code>KERNEL-VERSION</code></em> <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/</code></pre><p>
           </p><p><span class="command"><strong>kernel-install</strong></span> removes the entire directory
           <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/</code> afterwards.</p><p>The kernel-install plugin <code class="filename">90-loaderentry.install</code> removes the file
-          <code class="filename">/boot/loader/entries/<em class="replaceable"><code>MACHINE-ID</code></em>-<em class="replaceable"><code>KERNEL-VERSION</code></em>.conf</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176177616"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>If every executable returns with 0, 0 is returned, a non-zero failure code otherwise.</p></div><div class="refsect1"><a name="idm214178783696"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="
+          <code class="filename">/boot/loader/entries/<em class="replaceable"><code>MACHINE-ID</code></em>-<em class="replaceable"><code>KERNEL-VERSION</code></em>.conf</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181265312"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>If every executable returns with 0, 0 is returned, a non-zero failure code otherwise.</p></div><div class="refsect1"><a name="idm214181264128"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="
           /usr/lib/kernel/install.d/*.install
           /etc/kernel/install.d/*.install
         "><span class="term">
@@ -82,7 +82,7 @@
         "><span class="term">
           <code class="filename">/etc/os-release</code>
           <code class="filename">/usr/lib/os-release</code>
-        </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20/etc/os-release%0A%20%20%20%20%20%20%20%20%20%20/usr/lib/os-release%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>The content of the file specifies the operating system title <em class="replaceable"><code>PRETTY_NAME</code></em>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176828720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+        </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20/etc/os-release%0A%20%20%20%20%20%20%20%20%20%20/usr/lib/os-release%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>The content of the file specifies the operating system title <em class="replaceable"><code>PRETTY_NAME</code></em>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176337696"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
       <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>,
       <a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec" target="_top">Boot loader specification</a>
index 56a72e109b80c62bcd42cfb3243347adbbcbfd12..272da64cd72a6a4ee5b246e7fe5a7c4cd657d238 100644 (file)
@@ -7,6 +7,6 @@
 
   <para id='pkgconfig-text'>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+  <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
   file.</para>
 </refsect1>
index 16aedcafe2a206757d92bd8d7acfe81acd76ef2a..1ad69ede6ee2b8eaf9d831ca77e8a3b0fd20e588 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "LOCALE\&.CONF" "5" "" "systemd 215" "locale.conf"
+.TH "LOCALE\&.CONF" "5" "" "systemd 217" "locale.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -57,6 +57,11 @@ The locale settings configured in
 are system\-wide and are inherited by every service or user, unless overridden or unset by individual programs or individual users\&.
 .PP
 Depending on the operating system, other configuration files might be checked for locale configuration as well, however only as fallback\&.
+.PP
+\fBlocalectl\fR(1)
+may be used to alter the settings in this file during runtime from the command line\&. Use
+\fBsystemd-firstboot\fR(1)
+to initialize them on mounted (but not booted) system images\&.
 .SH "OPTIONS"
 .PP
 The following locale settings may be set using
@@ -98,4 +103,6 @@ LC_MESSAGES=en_US\&.UTF\-8
 .PP
 \fBsystemd\fR(1),
 \fBlocale\fR(7),
-\fBsystemd-localed.service\fR(8)
+\fBlocalectl\fR(1),
+\fBsystemd-localed.service\fR(8),
+\fBsystemd-firstboot\fR(1)
index 9bf5d7e8bc17a6b8dd26750ec31dbf521fb236c3..cf0ac70279200e8949a0079b90342c56031fbaad 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="locale.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>locale.conf — Configuration file for locale settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/locale.conf</code></p></div><div class="refsect1"><a name="idm214178491184"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/locale.conf</code> file
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="locale.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>locale.conf — Configuration file for locale settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/locale.conf</code></p></div><div class="refsect1"><a name="idm214193549328"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/locale.conf</code> file
                 configures system-wide locale settings. It is read at
                 early-boot by
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>.</p><p>The basic file format of
                 individual users.</p><p>Depending on the operating system, other
                 configuration files might be checked for locale
                 configuration as well, however only as
-                fallback.</p></div><div class="refsect1"><a name="idm214179144976"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following locale settings may be set using
+                fallback.</p><p><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>
+                may be used to alter the settings in this file during
+                runtime from the command line. Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize them on mounted (but not booted) system
+                images.</p></div><div class="refsect1"><a name="idm214193534608"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following locale settings may be set using
                 <code class="filename">/etc/locale.conf</code>:
                 <code class="varname">LANG=</code>,
                 <code class="varname">LANGUAGE=</code>,
                 <code class="varname">LC_ALL</code> may not be configured in
                 this file. For details about the meaning and semantics
                 of these settings, refer to
-                <a href="locale.html"><span class="citerefentry"><span class="refentrytitle">locale</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214181208976"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214179536720"></a><p class="title"><b>Example 1. German locale with English messages</b></p><div class="example-contents"><p><code class="filename">/etc/locale.conf</code>:</p><pre class="programlisting">LANG=de_DE.UTF-8
-LC_MESSAGES=en_US.UTF-8</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214180959888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="locale.html"><span class="citerefentry"><span class="refentrytitle">locale</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214197478608"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214197477936"></a><p class="title"><b>Example 1. German locale with English messages</b></p><div class="example-contents"><p><code class="filename">/etc/locale.conf</code>:</p><pre class="programlisting">LANG=de_DE.UTF-8
+LC_MESSAGES=en_US.UTF-8</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214197475344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="locale.html"><span class="citerefentry"><span class="refentrytitle">locale</span>(7)</span></a>,
-                          <a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a>
+                          <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
+                          <a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a>,
+                          <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                   </p></div></div></body></html>
index e97092102c2561bdd7eb6411a948fd64e8f84a05..67bcc18e2af7b43aad8a94c62fe6d079d16517e4 100644 (file)
                 configuration files might be checked for locale
                 configuration as well, however only as
                 fallback.</para>
+
+                <para><citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                may be used to alter the settings in this file during
+                runtime from the command line. Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize them on mounted (but not booted) system
+                images.</para>
         </refsect1>
 
         <refsect1>
@@ -142,7 +149,9 @@ LC_MESSAGES=en_US.UTF-8</programlisting>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                          <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index 39ab23cffed313f81150695e2eafe76c7be09a10..032d185a115b33a7ea530513bc3602d8cc0ea9ca 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "LOCALECTL" "1" "" "systemd 215" "localectl"
+.TH "LOCALECTL" "1" "" "systemd 217" "localectl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -32,6 +32,10 @@ may be used to query and change the system locale and keyboard layout settings\&
 The system locale controls the language settings of system services and of the UI before the user logs in, such as the display manager, as well as the default for users after login\&.
 .PP
 The keyboard settings control the keyboard layout used on the text console and of the graphical UI before the user logs in, such as the display manager, as well as the default for users after login\&.
+.PP
+Use
+\fBsystemd-firstboot\fR(1)
+to initialize the system locale for mounted (but not booted) system images\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
@@ -41,11 +45,6 @@ The following options are understood:
 Do not query the user for authentication for privileged operations\&.
 .RE
 .PP
-\fB\-P\fR, \fB\-\-privileged\fR
-.RS 4
-Acquire privileges via PolicyKit before executing the operation\&.
-.RE
-.PP
 \fB\-\-no\-convert\fR
 .RS 4
 If
@@ -115,7 +114,7 @@ List available keyboard mappings for the console, useful for configuration with
 \fBset\-keymap\fR\&.
 .RE
 .PP
-\fBset\-x11\-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]\fR
+\fBset\-x11\-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]\fR
 .RS 4
 Set the system default keyboard mapping for X11\&. This takes a keyboard mapping name (such as "de" or "us"), and possibly a model, variant and options, see
 \fBkbd\fR(4)
@@ -163,7 +162,8 @@ Override the default options passed to
 \fBkbd\fR(4),
 \m[blue]\fBThe XKB Configuration Guide\fR\m[]\&\s-2\u[1]\d\s+2,
 \fBsystemctl\fR(1),
-\fBsystemd-localed.service\fR(8)
+\fBsystemd-localed.service\fR(8),
+\fBsystemd-firstboot\fR(1)
 .SH "NOTES"
 .IP " 1." 4
 The XKB Configuration Guide
index 6d12bb0980628b8c71575ca1cfba0ed60746cc20..3a95c6ff60dc4608f0cd66499bf4b87431dc878b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="localectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>localectl — Control the system locale and keyboard layout settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">localectl</code>  [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm214196021920"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>localectl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="localectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>localectl — Control the system locale and keyboard layout settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">localectl</code>  [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm214187161312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>localectl</strong></span> may be used to
                 query and change the system locale and keyboard layout
                 settings.</p><p>The system locale controls the language settings
                 of system services and of the UI before the user logs
                 layout used on the text console and of the graphical
                 UI before the user logs in, such as the display
                 manager, as well as the default for users after
-                login.</p></div><div class="refsect1"><a name="idm214196018768"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
+                login.</p><p>Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize the system locale for mounted (but not
+                booted) system images.</p></div><div class="refsect1"><a name="idm214183365920"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
                                 for authentication for privileged
-                                operations.</p></dd><dt id="-P"><span class="term"><code class="option">-P</code>, </span><span class="term"><code class="option">--privileged</code></span><a class="headerlink" title="Permalink to this term" href="#-P">¶</a></dt><dd><p>Acquire privileges via PolicyKit
-                                before executing the operation.</p></dd><dt id="--no-convert"><span class="term"><code class="option">--no-convert</code></span><a class="headerlink" title="Permalink to this term" href="#--no-convert">¶</a></dt><dd><p>If
+                                operations.</p></dd><dt id="--no-convert"><span class="term"><code class="option">--no-convert</code></span><a class="headerlink" title="Permalink to this term" href="#--no-convert">¶</a></dt><dd><p>If
                                 <span class="command"><strong>set-keymap</strong></span> or
                                 <span class="command"><strong>set-x11-keymap</strong></span> is
                                 invoked and this option is passed, then
                                 (see below).</p></dd><dt id="list-keymaps"><span class="term"><span class="command"><strong>list-keymaps</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-keymaps">¶</a></dt><dd><p>List available
                                 keyboard mappings for the console,
                                 useful for configuration with
-                                <span class="command"><strong>set-keymap</strong></span>.</p></dd><dt id="set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]"><span class="term"><span class="command"><strong>set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-x11-keymap%20LAYOUT%20%5BMODEL%5D%20%5BVARIANT%5D%20%5BOPTIONS%5D">¶</a></dt><dd><p>Set the system default
+                                <span class="command"><strong>set-keymap</strong></span>.</p></dd><dt id="set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]"><span class="term"><span class="command"><strong>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-x11-keymap%20LAYOUT%20%5BMODEL%20%5BVARIANT%20%5BOPTIONS%5D%5D%5D">¶</a></dt><dd><p>Set the system default
                                 keyboard mapping for X11. This takes a
                                 keyboard mapping name (such as "de" or
                                 "us"), and possibly a model, variant
                                 and options, see
-                                <a href="kbd.html"><span class="citerefentry"><span class="refentrytitle">kbd</span>(4)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man4/kbd.4.html"><span class="citerefentry"><span class="refentrytitle">kbd</span>(4)</span></a>
                                 for details. Unless
                                 <code class="option">--no-convert</code> is
                                 passed, the selected setting is also
                                 optionally takes a layout parameter to
                                 limit the output to the variants
                                 suitable for the specific
-                                layout.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199874560"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214186560208"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
+                                layout.</p></dd></dl></div></div><div class="refsect1"><a name="idm214187277376"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214172407552"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                         <code class="option">--no-pager</code> is not given;
                         overrides <code class="varname">$PAGER</code>.  Setting
                         this to an empty string or the value
                         <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                         options passed to
                         <span class="command"><strong>less</strong></span>
-                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214199872848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214187275664"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="locale.html"><span class="citerefentry"><span class="refentrytitle">locale</span>(7)</span></a>,
                         <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
                         <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>,
                         <a href="loadkeys.html"><span class="citerefentry"><span class="refentrytitle">loadkeys</span>(1)</span></a>,
-                        <a href="kbd.html"><span class="citerefentry"><span class="refentrytitle">kbd</span>(4)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man4/kbd.4.html"><span class="citerefentry"><span class="refentrytitle">kbd</span>(4)</span></a>,
                         <a class="ulink" href="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html" target="_top">
                           The XKB Configuration Guide
                         </a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
-                        <a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a>
+                        <a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a>,
+                        <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                 </p></div></div></body></html>
index c2e79a2d71589fbeb9d25d5ea0cd51a3652bd306..c332027d8aed56dbfd6e0aa8857fab51a3a56ebd 100644 (file)
                 UI before the user logs in, such as the display
                 manager, as well as the default for users after
                 login.</para>
+
+                <para>Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize the system locale for mounted (but not
+                booted) system images.</para>
         </refsect1>
 
         <refsect1>
                                 operations.</para></listitem>
                         </varlistentry>
 
-                        <varlistentry>
-                                <term><option>-P</option></term>
-                                <term><option>--privileged</option></term>
-
-                                <listitem><para>Acquire privileges via PolicyKit
-                                before executing the operation.</para></listitem>
-                        </varlistentry>
-
                         <varlistentry>
                                 <term><option>--no-convert</option></term>
 
                         </varlistentry>
 
                         <varlistentry>
-                                <term><command>set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]</command></term>
+                                <term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
 
                                 <listitem><para>Set the system default
                                 keyboard mapping for X11. This takes a
                           The XKB Configuration Guide
                         </ulink>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index e7cae5632c2f8a7b492baf1eed418eda8773bfa9..0f94e178e0cf725bb339cdbfd71384a6993ac67f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "LOCALTIME" "5" "" "systemd 215" "localtime"
+.TH "LOCALTIME" "5" "" "systemd 217" "localtime"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -46,11 +46,14 @@ The timezone may be overridden for individual programs by using the TZ environme
 .PP
 You may use
 \fBtimedatectl\fR(1)
-to change the settings of this file from the command line\&.
+to change the settings of this file from the command line during runtime\&. Use
+\fBsystemd-firstboot\fR(1)
+to initialize the time zone on mounted (but not booted) system images\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
 \fBtzset\fR(3),
 \fBlocaltime\fR(3),
 \fBtimedatectl\fR(1),
-\fBsystemd-timedated.service\fR(8)
+\fBsystemd-timedated.service\fR(8),
+\fBsystemd-firstboot\fR(1)
index d01dbf249a806efa98a0aa23023731dfb64fde03..1dddf1f482ecdc3c8d87b7c2e82b748c8b6bcedd 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="localtime"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>localtime — Local timezone configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/localtime</code> -&gt; <code class="filename">../usr/share/zoneinfo/…</code></p></div><div class="refsect1"><a name="idm214172654304"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/localtime</code> file
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="localtime"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>localtime — Local timezone configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/localtime</code> -&gt; <code class="filename">../usr/share/zoneinfo/…</code></p></div><div class="refsect1"><a name="idm214196917616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/localtime</code> file
                 configures the system-wide timezone of the local
                 system that is used by applications for presentation
                 to the user. It should be an absolute or relative
                 "<code class="literal">Europe/Berlin</code>" or
                 "<code class="literal">Etc/UTC</code>".  The resulting link should
                 lead to the corresponding binary
-                <a href="tzfile.html"><span class="citerefentry"><span class="refentrytitle">tzfile</span>(5)</span></a>
+                <a href="http://man7.org/linux/man-pages/man5/tzfile.5.html"><span class="citerefentry"><span class="refentrytitle">tzfile</span>(5)</span></a>
                 timezone data for the configured timezone.</p><p>Because the timezone identifier is extracted from
                 the symlink target name of
                 <code class="filename">/etc/localtime</code>, this file may not
                 be a normal file or hardlink.</p><p>The timezone may be overridden for individual
                 programs by using the TZ environment variable. See
-                <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>.</p><p>You may use
+                <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>.</p><p>You may use
                 <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>
                 to change the settings of this file from the command
-                line.</p></div><div class="refsect1"><a name="idm214173999696"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                line during runtime. Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize the time zone on mounted (but not
+                booted) system images.</p></div><div class="refsect1"><a name="idm214196907008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="tzset.html"><span class="citerefentry"><span class="refentrytitle">tzset</span>(3)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man3/tzset.3.html"><span class="citerefentry"><span class="refentrytitle">tzset</span>(3)</span></a>,
                           <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(3)</span></a>,
                           <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
-                          <a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a>
+                          <a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a>,
+                          <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                   </p></div></div></body></html>
index dbf2379e7d1c6384df3ad2cf96398a96c2f33ab2..1cbdf6827464bc25ca3e30ee614e1e3096a007cd 100644 (file)
@@ -71,7 +71,7 @@
                 <literal>Europe/Berlin</literal> or
                 <literal>Etc/UTC</literal>.  The resulting link should
                 lead to the corresponding binary
-                <citerefentry><refentrytitle>tzfile</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>tzfile</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 timezone data for the configured timezone.</para>
 
                 <para>Because the timezone identifier is extracted from
 
                 <para>The timezone may be overridden for individual
                 programs by using the TZ environment variable. See
-                <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
+                <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
 
                 <para>You may use
                 <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 to change the settings of this file from the command
-                line.</para>
+                line during runtime. Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize the time zone on mounted (but not
+                booted) system images.</para>
         </refsect1>
 
         <refsect1>
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>tzset</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                          <citerefentry project='man-pages'><refentrytitle>tzset</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                          <citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index 8cd248e320010f49f71ed3ee92f5d2cf0af38685..41aadd26468371ce78c0de4f77bfb3f929c9ae1c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "LOGINCTL" "1" "" "systemd 215" "loginctl"
+.TH "LOGINCTL" "1" "" "systemd 217" "loginctl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 27c6b587ad8fa1bc0fc378cb46b9f4541711fbc2..393e9faf3547137dcaeb6c924b2d83bd9fbf42c9 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="loginctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>loginctl — Control the systemd login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">loginctl</code>  [OPTIONS...] {COMMAND} [NAME...]</p></div></div><div class="refsect1"><a name="idm214184892112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>loginctl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="loginctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>loginctl — Control the systemd login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">loginctl</code>  [OPTIONS...] {COMMAND} [NAME...]</p></div></div><div class="refsect1"><a name="idm214194113152"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>loginctl</strong></span> may be used to
                 introspect and control the state of the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                login manager <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214184888608"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend">¶</a></dt><dd><p>Do not print the legend,
+                login manager <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214194109600"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend">¶</a></dt><dd><p>Do not print the legend,
                                         i.e. the column headers and
                                         the footer.</p></dd><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
                                 for authentication for privileged
                                 sessions on a seat. This kills all
                                 processes of all sessions on the seat
                                 and deallocates all runtime resources
-                                attached to them.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183768240"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214172220528"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
+                                attached to them.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192990016"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214178572016"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                         <code class="option">--no-pager</code> is not given;
                         overrides <code class="varname">$PAGER</code>.  Setting
                         this to an empty string or the value
                         <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                         options passed to
                         <span class="command"><strong>less</strong></span>
-                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214183766592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214192988368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
index 13f1254950398f86c4aaa1ba6fb2353bcfbe346b..a192e668aa5f2cb4662218e6a9ef6b73a71683cc 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "LOGIND\&.CONF" "5" "" "systemd 215" "logind.conf"
+.TH "LOGIND\&.CONF" "5" "" "systemd 217" "logind.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -125,7 +125,7 @@ Specifies the maximum time a system shutdown or sleep request is delayed due to
 being active before the inhibitor is ignored and the operation executes anyway\&. Defaults to 5\&.
 .RE
 .PP
-\fIHandlePowerKey=\fR, \fIHandleSuspendKey=\fR, \fIHandleHibernateKey=\fR, \fIHandleLidSwitch=\fR
+\fIHandlePowerKey=\fR, \fIHandleSuspendKey=\fR, \fIHandleHibernateKey=\fR, \fIHandleLidSwitch=\fR, \fIHandleLidSwitchDocked=\fR
 .RS 4
 Controls whether logind shall handle the system power and sleep keys and the lid switch to trigger actions such as system power\-off or suspend\&. Can be one of
 "ignore",
@@ -149,9 +149,16 @@ and
 \fIHandleLidSwitch=\fR
 default to
 "suspend"\&.
+\fIHandleLidSwitchDocked=\fR
+defaults to
+"ignore"\&.
 \fIHandleHibernateKey=\fR
 defaults to
-"hibernate"\&. Note that the lid switch is ignored if the system is inserted in a docking station, or if more than one display is connected\&.
+"hibernate"\&. If the system is inserted in a docking station, or if more than one display is connected, the action specified by
+\fIHandleLidSwitchDocked=\fR
+occurs; otherwise the
+\fIHandleLidSwitch=\fR
+action occurs\&.
 .RE
 .PP
 \fIPowerKeyIgnoreInhibited=\fR, \fISuspendKeyIgnoreInhibited=\fR, \fIHibernateKeyIgnoreInhibited=\fR, \fILidSwitchIgnoreInhibited=\fR
@@ -181,7 +188,7 @@ may be specified, which sets the size limit relative to the amount of physical R
 .PP
 \fIRemoveIPC=\fR
 .RS 4
-Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the user fully logs out\&. Takes a boolean argument\&. If enabled, the user may not consume IPC resources after the last of his sessions terminated\&. This covers System V semaphores, shared memory and message queues, as well as POSIX shared memory and message queues\&. Note that IPC objects of the root user are excluded from the effect of this setting\&. Defaults to
+Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the user fully logs out\&. Takes a boolean argument\&. If enabled, the user may not consume IPC resources after the last of the user\*(Aqs sessions terminated\&. This covers System V semaphores, shared memory and message queues, as well as POSIX shared memory and message queues\&. Note that IPC objects of the root user are excluded from the effect of this setting\&. Defaults to
 "yes"\&.
 .RE
 .SH "SEE ALSO"
index 92d84a204cf090f080e171f5d182994756abe239..751327b13d9615c42bb6c17ea818417d84440375 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="logind.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>logind.conf — Login manager configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/logind.conf</code></p></div><div class="refsect1"><a name="idm214189817760"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>This file configures various parameters of the systemd login manager, <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214189815776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="logind.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>logind.conf — Login manager configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/logind.conf</code></p></div><div class="refsect1"><a name="idm214179006432"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>This file configures various parameters of the systemd login manager, <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214179004400"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
                 "<code class="literal">[Login]</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="NAutoVTs="><span class="term"><code class="varname">NAutoVTs=</code></span><a class="headerlink" title="Permalink to this term" href="#NAutoVTs=">¶</a></dt><dd><p>Takes a positive
                                 integer. Configures how many virtual
                                 terminals (VTs) to allocate by default
                                 being active before the inhibitor is
                                 ignored and the operation executes
                                 anyway. Defaults to
-                                5.</p></dd><dt id="HandlePowerKey="><span class="term"><code class="varname">HandlePowerKey=</code>, </span><span class="term"><code class="varname">HandleSuspendKey=</code>, </span><span class="term"><code class="varname">HandleHibernateKey=</code>, </span><span class="term"><code class="varname">HandleLidSwitch=</code></span><a class="headerlink" title="Permalink to this term" href="#HandlePowerKey=">¶</a></dt><dd><p>Controls whether
+                                5.</p></dd><dt id="HandlePowerKey="><span class="term"><code class="varname">HandlePowerKey=</code>, </span><span class="term"><code class="varname">HandleSuspendKey=</code>, </span><span class="term"><code class="varname">HandleHibernateKey=</code>, </span><span class="term"><code class="varname">HandleLidSwitch=</code>, </span><span class="term"><code class="varname">HandleLidSwitchDocked=</code></span><a class="headerlink" title="Permalink to this term" href="#HandlePowerKey=">¶</a></dt><dd><p>Controls whether
                                 logind shall handle the system power
                                 and sleep keys and the lid switch to
                                 trigger actions such as system
                                 and
                                 <code class="varname">HandleLidSwitch=</code>
                                 default to "<code class="literal">suspend</code>".
+                                <code class="varname">HandleLidSwitchDocked=</code>
+                                defaults to "<code class="literal">ignore</code>".
                                 <code class="varname">HandleHibernateKey=</code>
                                 defaults to
-                                "<code class="literal">hibernate</code>". Note
-                                that the lid switch is ignored if the
-                                system is inserted in a docking
-                                station, or if more than one display
-                                is connected.</p></dd><dt id="PowerKeyIgnoreInhibited="><span class="term"><code class="varname">PowerKeyIgnoreInhibited=</code>, </span><span class="term"><code class="varname">SuspendKeyIgnoreInhibited=</code>, </span><span class="term"><code class="varname">HibernateKeyIgnoreInhibited=</code>, </span><span class="term"><code class="varname">LidSwitchIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#PowerKeyIgnoreInhibited=">¶</a></dt><dd><p>Controls whether
+                                "<code class="literal">hibernate</code>". If the
+                                system is inserted in a docking station,
+                                or if more than one display is connected,
+                                the action specified by
+                                <code class="varname">HandleLidSwitchDocked=</code>
+                                occurs; otherwise the
+                                <code class="varname">HandleLidSwitch=</code>
+                                action occurs.</p></dd><dt id="PowerKeyIgnoreInhibited="><span class="term"><code class="varname">PowerKeyIgnoreInhibited=</code>, </span><span class="term"><code class="varname">SuspendKeyIgnoreInhibited=</code>, </span><span class="term"><code class="varname">HibernateKeyIgnoreInhibited=</code>, </span><span class="term"><code class="varname">LidSwitchIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#PowerKeyIgnoreInhibited=">¶</a></dt><dd><p>Controls whether
                                 actions triggered by the power and
                                 sleep keys and the lid switch are
                                 subject to inhibitor locks. These
                                 when the user fully logs out. Takes a
                                 boolean argument. If enabled, the user
                                 may not consume IPC resources after
-                                the last of his sessions
+                                the last of the user's sessions
                                 terminated. This covers System V
                                 semaphores, shared memory and message
                                 queues, as well as POSIX shared memory
                                 objects of the root user are excluded
                                 from the effect of this
                                 setting. Defaults to
-                                "<code class="literal">yes</code>".</p></dd></dl></div></div><div class="refsect1"><a name="idm214188723664"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                "<code class="literal">yes</code>".</p></dd></dl></div></div><div class="refsect1"><a name="idm214177911248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
                           <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>,
index f037da259b1ab30ab54c1a1665d4efdff7bcfe0e..d245bf45707cd88589d4cb575829641ce4006af8 100644 (file)
                                 <term><varname>HandleSuspendKey=</varname></term>
                                 <term><varname>HandleHibernateKey=</varname></term>
                                 <term><varname>HandleLidSwitch=</varname></term>
+                                <term><varname>HandleLidSwitchDocked=</varname></term>
 
                                 <listitem><para>Controls whether
                                 logind shall handle the system power
                                 and
                                 <varname>HandleLidSwitch=</varname>
                                 default to <literal>suspend</literal>.
+                                <varname>HandleLidSwitchDocked=</varname>
+                                defaults to <literal>ignore</literal>.
                                 <varname>HandleHibernateKey=</varname>
                                 defaults to
-                                <literal>hibernate</literal>. Note
-                                that the lid switch is ignored if the
-                                system is inserted in a docking
-                                station, or if more than one display
-                                is connected.</para></listitem>
+                                <literal>hibernate</literal>. If the
+                                system is inserted in a docking station,
+                                or if more than one display is connected,
+                                the action specified by
+                                <varname>HandleLidSwitchDocked=</varname>
+                                occurs; otherwise the
+                                <varname>HandleLidSwitch=</varname>
+                                action occurs.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 when the user fully logs out. Takes a
                                 boolean argument. If enabled, the user
                                 may not consume IPC resources after
-                                the last of his sessions
+                                the last of the user's sessions
                                 terminated. This covers System V
                                 semaphores, shared memory and message
                                 queues, as well as POSIX shared memory
index 43ae6265d547fe2e3303e0db51b6533e49621dad..d78f36c2ac2935959c199a6a962ce43b0922dff3 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "MACHINE\-ID" "5" "" "systemd 215" "machine-id"
+.TH "MACHINE\-ID" "5" "" "systemd 217" "machine-id"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -42,7 +42,9 @@ call that POSIX specifies\&.
 .PP
 The
 \fBsystemd-machine-id-setup\fR(1)
-tool may be used by installer tools to initialize the machine ID at install time\&.
+tool may be used by installer tools to initialize the machine ID at install time\&. Use
+\fBsystemd-firstboot\fR(1)
+to initialize it on mounted (but not booted) system images\&.
 .SH "RELATION TO OSF UUIDS"
 .PP
 Note that the machine ID historically is not an OSF UUID as defined by
@@ -87,7 +89,8 @@ file introduced by D\-Bus\&. In fact, this latter file might be a symlink to
 \fBmachine-info\fR(5),
 \fBos-release\fR(5),
 \fBsd-id128\fR(3),
-\fBsd_id128_get_machine\fR(3)
+\fBsd_id128_get_machine\fR(3),
+\fBsystemd-firstboot\fR(1)
 .SH "NOTES"
 .IP " 1." 4
 RFC 4122
index 8a549da3d554bcbfa40b4651ed005c31d007dc3a..4adfeab99860be5afa9df03ab02cfeb2c2e43e87 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="machine-id"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>machine-id — Local machine ID configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/machine-id</code></p></div><div class="refsect1"><a name="idm214174731056"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/machine-id</code> file
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="machine-id"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>machine-id — Local machine ID configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/machine-id</code></p></div><div class="refsect1"><a name="idm214167003152"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/machine-id</code> file
                 contains the unique machine ID of the local system
                 that is set during installation. The machine ID is a
                 single newline-terminated, hexadecimal, 32-character,
                 call that POSIX specifies.</p><p>The
                 <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>
                 tool may be used by installer tools to initialize the
-                machine ID at install time.</p></div><div class="refsect1"><a name="idm214175404608"></a><h2 id="Relation to OSF UUIDs">Relation to OSF UUIDs<a class="headerlink" title="Permalink to this headline" href="#Relation%20to%20OSF%20UUIDs">¶</a></h2><p>Note that the machine ID historically is not an
+                machine ID at install time. Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize it on mounted (but not booted) system
+                images.</p></div><div class="refsect1"><a name="idm214166995584"></a><h2 id="Relation to OSF UUIDs">Relation to OSF UUIDs<a class="headerlink" title="Permalink to this headline" href="#Relation%20to%20OSF%20UUIDs">¶</a></h2><p>Note that the machine ID historically is not an
                 OSF UUID as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
                 4122</a>, nor a Microsoft GUID; however, starting with
                 systemd v30, newly generated machine IDs do
@@ -55,12 +58,12 @@ id[6] = (id[6] &amp; 0x0F) | 0x40;
 id[8] = (id[8] &amp; 0x3F) | 0x80;</pre><p>(This code is inspired by
                 "<code class="literal">generate_random_uuid()</code>" of
                 <code class="filename">drivers/char/random.c</code> from the
-                Linux kernel sources.)</p></div><div class="refsect1"><a name="idm214178157136"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>The simple configuration file format of
+                Linux kernel sources.)</p></div><div class="refsect1"><a name="idm214166989408"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>The simple configuration file format of
                 <code class="filename">/etc/machine-id</code> originates in the
                 <code class="filename">/var/lib/dbus/machine-id</code> file
                 introduced by D-Bus. In fact, this latter file might be a
                 symlink to
-                <code class="varname">/etc/machine-id</code>.</p></div><div class="refsect1"><a name="idm214177106384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="varname">/etc/machine-id</code>.</p></div><div class="refsect1"><a name="idm214170939776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>,
                           <a href="gethostid.html"><span class="citerefentry"><span class="refentrytitle">gethostid</span>(3)</span></a>,
@@ -68,5 +71,6 @@ id[8] = (id[8] &amp; 0x3F) | 0x80;</pre><p>(This code is inspired by
                           <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
                           <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>,
                           <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>,
-                          <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
+                          <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
+                          <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                   </p></div></div></body></html>
index 4b4759e48d5e9c804a3388f6319772c41b349a0c..725370d32dc4e523af18aad4c770754181bec20c 100644 (file)
                 <para>The
                 <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 tool may be used by installer tools to initialize the
-                machine ID at install time.</para>
+                machine ID at install time. Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize it on mounted (but not booted) system
+                images.</para>
         </refsect1>
 
         <refsect1>
@@ -138,7 +141,8 @@ id[8] = (id[8] &amp; 0x3F) | 0x80;</programlisting>
                           <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                          <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index 83dbd85df55056f719dae12410e70fcc36f8f9f1..c6fca4e5b355391983455d08ba1cf577cc72a56c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "MACHINE\-INFO" "5" "" "systemd 215" "machine-info"
+.TH "MACHINE\-INFO" "5" "" "systemd 217" "machine-info"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -75,12 +75,30 @@ The chassis type\&. Currently, the following chassis types are defined:
 "laptop",
 "server",
 "tablet",
-"handset", as well as the special chassis types
+"handset",
+"watch", as well as the special chassis types
 "vm"
 and
 "container"
 for virtualized systems that lack an immediate physical chassis\&. Note that many systems allow detection of the chassis type automatically (based on firmware information or suchlike)\&. This setting (if set) shall take precedence over automatically detected information and is useful to override misdetected configuration or to manually configure the chassis type where automatic detection is not available\&.
 .RE
+.PP
+\fIDEPLOYMENT=\fR
+.RS 4
+Describes the system deployment environment\&. One of the following is suggested:
+"development",
+"integration",
+"staging",
+"production"\&.
+.RE
+.PP
+\fILOCATION=\fR
+.RS 4
+Describes the system location if applicable and known\&. Takes a human\-friendly, free\-form string\&. This may be as generic as
+"Berlin, Germany"
+or as specific as
+"Left Rack, 2nd Shelf"\&.
+.RE
 .SH "EXAMPLE"
 .sp
 .if n \{\
@@ -90,6 +108,7 @@ for virtualized systems that lack an immediate physical chassis\&. Note that man
 PRETTY_HOSTNAME="Lennart\*(Aqs Tablet"
 ICON_NAME=computer\-tablet
 CHASSIS=tablet
+DEPLOYMENT=production
 .fi
 .if n \{\
 .RE
index 892ce23726663e5405b9bf26975d25e27fe75452..4704510d13bbe9aa47f17dca9b39df274abdfbae 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="machine-info"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>machine-info — Local machine information file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/machine-info</code></p></div><div class="refsect1"><a name="idm214171081520"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/machine-info</code> file
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="machine-info"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>machine-info — Local machine information file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/machine-info</code></p></div><div class="refsect1"><a name="idm214169870352"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/machine-info</code> file
                 contains machine metadata.</p><p>The basic file format of
                 <code class="filename">machine-info</code> is a
                 newline-separated list of environment-like
@@ -35,7 +35,7 @@
                 information as well, however only as fallback.</p><p>You may use
                 <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
                 to change the settings of this file from the command
-                line.</p></div><div class="refsect1"><a name="idm214172421232"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following machine metadata parameters may
+                line.</p></div><div class="refsect1"><a name="idm214169864224"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following machine metadata parameters may
                 be set using
                 <code class="filename">/etc/machine-info</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="PRETTY_HOSTNAME="><span class="term"><code class="varname">PRETTY_HOSTNAME=</code></span><a class="headerlink" title="Permalink to this term" href="#PRETTY_HOSTNAME=">¶</a></dt><dd><p>A pretty
                                 human-readable UTF-8 machine identifier
@@ -69,7 +69,8 @@
                                 "<code class="literal">laptop</code>",
                                 "<code class="literal">server</code>",
                                 "<code class="literal">tablet</code>",
-                                "<code class="literal">handset</code>", as well as
+                               "<code class="literal">handset</code>",
+                               "<code class="literal">watch</code>", as well as
                                 the special chassis types
                                 "<code class="literal">vm</code>" and
                                 "<code class="literal">container</code>" for
                                 override misdetected configuration or
                                 to manually configure the chassis type
                                 where automatic detection is not
-                                available.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172682608"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting">PRETTY_HOSTNAME="Lennart's Tablet"
+                                available.</p></dd><dt id="DEPLOYMENT="><span class="term"><code class="varname">DEPLOYMENT=</code></span><a class="headerlink" title="Permalink to this term" href="#DEPLOYMENT=">¶</a></dt><dd><p>Describes the system
+                                deployment environment. One of the
+                                following is suggested:
+                                "<code class="literal">development</code>",
+                                "<code class="literal">integration</code>",
+                                "<code class="literal">staging</code>",
+                                "<code class="literal">production</code>".
+                                </p></dd><dt id="LOCATION="><span class="term"><code class="varname">LOCATION=</code></span><a class="headerlink" title="Permalink to this term" href="#LOCATION=">¶</a></dt><dd><p>Describes the system
+                                location if applicable and
+                                known. Takes a human-friendly,
+                                free-form string. This may be as
+                                generic as "<code class="literal">Berlin,
+                                Germany</code>" or as specific as
+                                "<code class="literal">Left Rack, 2nd
+                                Shelf</code>".</p></dd></dl></div></div><div class="refsect1"><a name="idm214173784032"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting">PRETTY_HOSTNAME="Lennart's Tablet"
 ICON_NAME=computer-tablet
-CHASSIS=tablet</pre></div><div class="refsect1"><a name="idm214171513408"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+CHASSIS=tablet
+DEPLOYMENT=production</pre></div><div class="refsect1"><a name="idm214173782464"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>,
                           <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
index 7448e68fd4421fd715bbf00f32141a3e2f38c315..c654daa856dd71be8bae4c0cb966075f03f8b210 100644 (file)
                                 <literal>laptop</literal>,
                                 <literal>server</literal>,
                                 <literal>tablet</literal>,
-                                <literal>handset</literal>, as well as
+                               <literal>handset</literal>,
+                               <literal>watch</literal>, as well as
                                 the special chassis types
                                 <literal>vm</literal> and
                                 <literal>container</literal> for
                                 available.</para></listitem>
                         </varlistentry>
 
-                </variablelist>
+                        <varlistentry>
+                                <term><varname>DEPLOYMENT=</varname></term>
+
+                                <listitem><para>Describes the system
+                                deployment environment. One of the
+                                following is suggested:
+                                <literal>development</literal>,
+                                <literal>integration</literal>,
+                                <literal>staging</literal>,
+                                <literal>production</literal>.
+                                </para></listitem>
+                        </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>LOCATION=</varname></term>
+
+                                <listitem><para>Describes the system
+                                location if applicable and
+                                known. Takes a human-friendly,
+                                free-form string. This may be as
+                                generic as <literal>Berlin,
+                                Germany</literal> or as specific as
+                                <literal>Left Rack, 2nd
+                                Shelf</literal>.</para></listitem>
+                        </varlistentry>
+                </variablelist>
         </refsect1>
 
         <refsect1>
 
                 <programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
 ICON_NAME=computer-tablet
-CHASSIS=tablet</programlisting>
+CHASSIS=tablet
+DEPLOYMENT=production</programlisting>
         </refsect1>
 
         <refsect1>
index d532a6e016b25ff718140e275293b32db9fe4d80..e6d13d7bfb6d3525b5dd5ab7fdfb48318d0bf01d 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "MACHINECTL" "1" "" "systemd 215" "machinectl"
+.TH "MACHINECTL" "1" "" "systemd 217" "machinectl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 876486cc426977a496a65459a1e44bce36850f62..ae90cf4c3c27941b69edd9787ee3f0de9e4ff336 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="machinectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>machinectl — Control the systemd machine manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">machinectl</code>  [OPTIONS...] {COMMAND} [NAME...]</p></div></div><div class="refsect1"><a name="idm214179067312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>machinectl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="machinectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>machinectl — Control the systemd machine manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">machinectl</code>  [OPTIONS...] {COMMAND} [NAME...]</p></div></div><div class="refsect1"><a name="idm214198582128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>machinectl</strong></span> may be used to
                 introspect and control the state of the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                virtual machine and container registration manager <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214179063888"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--property=</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>When showing
+                virtual machine and container registration manager <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214198578608"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--property=</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>When showing
                                 machine properties, limit the
                                 output to certain properties as
                                 specified by the argument. If not
                                 processes of the virtual machine or
                                 container and deallocates all
                                 resources attached to that
-                                instance.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177992512"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214164915280"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
+                                instance.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197508512"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214183685632"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                         <code class="option">--no-pager</code> is not given;
                         overrides <code class="varname">$PAGER</code>.  Setting
                         this to an empty string or the value
                         <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                         options passed to
                         <span class="command"><strong>less</strong></span>
-                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214177990864"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214197506864"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>,
                         <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>
index 08be1f350dc01ce98a7809e3f0c1a56b8173c097..f1599396b5312a01b730c02b4d2852e6fb8d8416 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "MODULES\-LOAD\&.D" "5" "" "systemd 215" "modules-load.d"
+.TH "MODULES\-LOAD\&.D" "5" "" "systemd 217" "modules-load.d"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 307cd6ff614f768082653c2499a21f0af1b382d1..d50412b2b27392f03eb746f511e6e708c5cae706 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="modules-load.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>modules-load.d — Configure kernel modules to load at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/modules-load.d/*.conf</code></p><p><code class="filename">/run/modules-load.d/*.conf</code></p><p><code class="filename">/usr/lib/modules-load.d/*.conf</code></p></div><div class="refsect1"><a name="idm214196413376"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="modules-load.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>modules-load.d — Configure kernel modules to load at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/modules-load.d/*.conf</code></p><p><code class="filename">/run/modules-load.d/*.conf</code></p><p><code class="filename">/usr/lib/modules-load.d/*.conf</code></p></div><div class="refsect1"><a name="idm214166402512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>
                 reads files from the above directories which contain
                 kernel modules to load during boot in a static list.
                 Each configuration file is named in the style of
@@ -29,7 +29,7 @@
                 or similar triggers encoded in the kernel modules
                 themselves instead of static configuration like
                 this. In fact, most modern kernel modules are prepared
-                for automatic loading already.</p></div><div class="refsect1"><a name="idm214196437360"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>The configuration files should simply contain a
+                for automatic loading already.</p></div><div class="refsect1"><a name="idm214166398864"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>The configuration files should simply contain a
                 list of kernel module names to load, separated by
                 newlines. Empty lines and lines whose first
                 non-whitespace character is # or ; are ignored.</p><p>Each configuration file shall be named in the
@@ -49,8 +49,8 @@
                 recommended way is to place a symlink to
                 <code class="filename">/dev/null</code> in
                 <code class="filename">/etc/modules-load.d/</code> bearing the
-                same filename.</p></div><div class="refsect1"><a name="idm214192640896"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214192640224"></a><p class="title"><b>Example 1. /etc/modules-load.d/virtio-net.conf example:</b></p><div class="example-contents"><pre class="programlisting"># Load virtio-net.ko at boot
-virtio-net</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192638576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                same filename.</p></div><div class="refsect1"><a name="idm214166388896"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214170341888"></a><p class="title"><b>Example 1. /etc/modules-load.d/virtio-net.conf example:</b></p><div class="example-contents"><pre class="programlisting"># Load virtio-net.ko at boot
+virtio-net</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214170340240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a>,
                         <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>,
index c7624bdef2c67b4c9d73fd3f5ba52028bfd980f8..6b90daf3b1c11b039bdad3a92de784cf6d2b220f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "NSS\-MYHOSTNAME" "8" "" "systemd 215" "nss-myhostname"
+.TH "NSS\-MYHOSTNAME" "8" "" "systemd 217" "nss-myhostname"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 1279ff698d04bdeaea886b8d599e3fc4069f6893..0172c7069af731f9de3a1d2bc9aaed68d24bcde8 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="nss-myhostname"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>nss-myhostname — Provide hostname resolution for the locally
-                configured system hostname.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">nss-myhostname.la</code></p></div><div class="refsect1"><a name="idm214168515296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>nss-myhostname</strong></span> is a plugin for the GNU Name Service Switch
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="nss-myhostname"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>nss-myhostname — Provide hostname resolution for the locally
+                configured system hostname.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">nss-myhostname.la</code></p></div><div class="refsect1"><a name="idm214168006688"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>nss-myhostname</strong></span> is a plugin for the GNU Name Service Switch
                 (NSS) functionality of the GNU C Library (<span class="command"><strong>glibc</strong></span>)
                 providing hostname resolution for the locally configured system
                 hostname as returned by
-                <a href="gethostname.html"><span class="citerefentry"><span class="refentrytitle">gethostname</span>(2)</span></a>.
+                <a href="http://man7.org/linux/man-pages/man2/gethostname.2.html"><span class="citerefentry"><span class="refentrytitle">gethostname</span>(2)</span></a>.
                 Various software relies on an always-resolvable local hostname. When
                 using dynamic hostnames, this is usually achieved by patching
                 <code class="filename">/etc/hosts</code> at the same time as changing the host
@@ -40,7 +40,7 @@
                 <code class="filename">/etc/nsswitch.conf</code></p><p>It is recommended to put <code class="option">myhostname</code>
                 last in the <code class="filename">nsswitch.conf</code> line to make
                 sure that this mapping is only used as fallback, and any DNS
-                or <code class="filename">/etc/hosts</code> based mapping takes precedence.</p></div><div class="refsect1"><a name="idm214168875728"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting"># /etc/nsswitch.conf
+                or <code class="filename">/etc/hosts</code> based mapping takes precedence.</p></div><div class="refsect1"><a name="idm214167995328"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting"># /etc/nsswitch.conf
 
 passwd:         compat
 group:          compat
@@ -60,13 +60,13 @@ netgroup:       nis</pre><p>To test, use <span class="command"><strong>glibc</st
 ::1             RAW
 127.0.0.2       STREAM
 127.0.0.2       DGRAM
-127.0.0.2       RAW</pre><p>In this case the local hostname is <code class="varname">omega</code>.</p></div><div class="refsect1"><a name="idm214168869968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+127.0.0.2       RAW</pre><p>In this case the local hostname is <code class="varname">omega</code>.</p></div><div class="refsect1"><a name="idm214171945888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
                         <a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a>,
                         <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>,
-                        <a href="pam.conf.html"><span class="citerefentry"><span class="refentrytitle">pam.conf</span>(5)</span></a>,
-                        <a href="pam.d.html"><span class="citerefentry"><span class="refentrytitle">pam.d</span>(5)</span></a>,
-                        <a href="pam.html"><span class="citerefentry"><span class="refentrytitle">pam</span>(8)</span></a>,
-                        <a href="pam_loginuid.html"><span class="citerefentry"><span class="refentrytitle">pam_loginuid</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man5/pam.conf.5.html"><span class="citerefentry"><span class="refentrytitle">pam.conf</span>(5)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man5/pam.d.5.html"><span class="citerefentry"><span class="refentrytitle">pam.d</span>(5)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man8/pam.8.html"><span class="citerefentry"><span class="refentrytitle">pam</span>(8)</span></a>,
+                        <a href="http://linux.die.net/man/8/pam_loginuid"><span class="citerefentry"><span class="refentrytitle">pam_loginuid</span>(8)</span></a>
                 </p></div></div></body></html>
index cca3a99aaa53dd6247c136ea6c1dec78dcadc132..ba9297ec79b56b2f68fa6b7fc098ab052bde61e2 100644 (file)
@@ -123,10 +123,10 @@ netgroup:       nis</programlisting>
                         <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 4e291acc12e8d2c3029b88f86c5fffa16de86011..a5f5e3ea380276020be1293a99b06f29e5fdf2ff 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "OS\-RELEASE" "5" "" "systemd 215" "os-release"
+.TH "OS\-RELEASE" "5" "" "systemd 217" "os-release"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -45,11 +45,11 @@ takes precedence over
 /usr/lib/os\-release
 if it is missing\&. Applications should not read data from both files at the same time\&.
 /usr/lib/os\-release
-is the recommended place to store OS release information as part of vendor trees\&. Frequently,
+is the recommended place to store OS release information as part of vendor trees\&.
 /etc/os\-release
-is simply a symlink to
+should be a relative symlink to
 /usr/lib/os\-release, to provide compatibility with applications only looking at
-/etc\&.
+/etc\&. A relative symlink instead of an absolute symlink is necessary to avoid breaking the link in a chroot or initrd environment such as dracut\&.
 .PP
 os\-release
 contains data that is defined by the operating system vendor and should generally not be changed by the administrator\&.
index 66e434706ce9b06874192bec53459e2513ed240d..7f84c5ba3778f2c9bca9d011c4ad4df42957d111 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="os-release"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>os-release — Operating system identification</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/os-release</code></p><p><code class="filename">/usr/lib/os-release</code></p></div><div class="refsect1"><a name="idm214179437424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/os-release</code> and
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="os-release"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>os-release — Operating system identification</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/os-release</code></p><p><code class="filename">/usr/lib/os-release</code></p></div><div class="refsect1"><a name="idm214178413904"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/os-release</code> and
                 <code class="filename">/usr/lib/os-release</code> files contain
                 operating system identification data.</p><p>The basic file format of
                 <code class="filename">os-release</code> is a newline-separated
                 files at the same
                 time. <code class="filename">/usr/lib/os-release</code> is the
                 recommended place to store OS release information as
-                part of vendor trees. Frequently,
-                <code class="filename">/etc/os-release</code> is simply a
-                symlink to <code class="filename">/usr/lib/os-release</code>,
+                part of vendor trees.
+                <code class="filename">/etc/os-release</code> should be a
+                relative symlink to
+                <code class="filename">/usr/lib/os-release</code>,
                 to provide compatibility with applications only
-                looking at <code class="filename">/etc</code>.</p><p><code class="filename">os-release</code> contains data
+                looking at <code class="filename">/etc</code>. A relative
+                symlink instead of an absolute symlink is
+                necessary to avoid breaking the link in a chroot or
+                initrd environment such as dracut.</p><p><code class="filename">os-release</code> contains data
                 that is defined by the operating system vendor and
                 should generally not be changed by the
                 administrator.</p><p>As this file only encodes names and identifiers
@@ -64,7 +68,7 @@
                 the file is available from earliest boot on, and hence
                 must be located on the root file system.</p><p>For a longer rationale for
                 <code class="filename">os-release</code> please refer to
-                the <a class="ulink" href="http://0pointer.de/blog/projects/os-release" target="_top">Announcement of <code class="filename">/etc/os-release</code></a>.</p></div><div class="refsect1"><a name="idm214177858128"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following OS identifications parameters may be set using
+                the <a class="ulink" href="http://0pointer.de/blog/projects/os-release" target="_top">Announcement of <code class="filename">/etc/os-release</code></a>.</p></div><div class="refsect1"><a name="idm214182350768"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following OS identifications parameters may be set using
                 <code class="filename">os-release</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="NAME="><span class="term"><code class="varname">NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#NAME=">¶</a></dt><dd><p>A string identifying
                                 the operating system, without a
                                 version component, and suitable for
                 recommended to prefix new fields with an OS specific
                 name in order to avoid name clashes. Applications
                 reading this file must ignore unknown fields. Example:
-                "<code class="literal">DEBIAN_BTS="debbugs://bugs.debian.org/"</code>"</p></div><div class="refsect1"><a name="idm214178429520"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting">NAME=Fedora
+                "<code class="literal">DEBIAN_BTS="debbugs://bugs.debian.org/"</code>"</p></div><div class="refsect1"><a name="idm214177331920"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting">NAME=Fedora
 VERSION="17 (Beefy Miracle)"
 ID=fedora
 VERSION_ID=17
@@ -240,7 +244,7 @@ PRETTY_NAME="Fedora 17 (Beefy Miracle)"
 ANSI_COLOR="0;34"
 CPE_NAME="cpe:/o:fedoraproject:fedora:17"
 HOME_URL="https://fedoraproject.org/"
-BUG_REPORT_URL="https://bugzilla.redhat.com/"</pre></div><div class="refsect1"><a name="idm214180118832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+BUG_REPORT_URL="https://bugzilla.redhat.com/"</pre></div><div class="refsect1"><a name="idm214177330256"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="lsb_release.html"><span class="citerefentry"><span class="refentrytitle">lsb_release</span>(1)</span></a>,
                           <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
index 4e02f800b63d19cc9c754eb5c35df7a258796596..b2983049432bbb29f2fcac14f0b433ceb192b9f3 100644 (file)
                 files at the same
                 time. <filename>/usr/lib/os-release</filename> is the
                 recommended place to store OS release information as
-                part of vendor trees. Frequently,
-                <filename>/etc/os-release</filename> is simply a
-                symlink to <filename>/usr/lib/os-release</filename>,
+                part of vendor trees.
+                <filename>/etc/os-release</filename> should be a
+                relative symlink to
+                <filename>/usr/lib/os-release</filename>,
                 to provide compatibility with applications only
-                looking at <filename>/etc</filename>.</para>
+                looking at <filename>/etc</filename>. A relative
+                symlink instead of an absolute symlink is
+                necessary to avoid breaking the link in a chroot or
+                initrd environment such as dracut.</para>
 
                 <para><filename>os-release</filename> contains data
                 that is defined by the operating system vendor and
index dfc8a115a13610e3337b23dc2362c03f1ac24867..0c0b702cae3b706538df6b383fbf2fbd5b529ec6 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "PAM_SYSTEMD" "8" "" "systemd 215" "pam_systemd"
+.TH "PAM_SYSTEMD" "8" "" "systemd 217" "pam_systemd"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -57,7 +57,7 @@ The
 \fI$XDG_SESSION_ID\fR
 environment variable is initialized\&. If auditing is available and
 \fBpam_loginuid\&.so\fR
-run before this module (which is highly recommended), the variable is initialized from the auditing session id (/proc/self/sessionid)\&. Otherwise an independent session counter is used\&.
+was run before this module (which is highly recommended), the variable is initialized from the auditing session id (/proc/self/sessionid)\&. Otherwise, an independent session counter is used\&.
 .RE
 .sp
 .RS 4
@@ -70,9 +70,8 @@ run before this module (which is highly recommended), the variable is initialize
 .\}
 A new systemd scope unit is created for the session\&. If this is the first concurrent session of the user, an implicit slice below
 user\&.slice
-is automatically created and the scope placed in it\&. In instance of the system service
-user@\&.service
-which runs the systemd user manager instance\&.
+is automatically created and the scope placed into it\&. An instance of the system service
+user@\&.service, which runs the systemd user manager instance, is started\&.
 .RE
 .PP
 On logout, this module ensures the following:
@@ -85,7 +84,8 @@ On logout, this module ensures the following:
 .sp -1
 .IP "  1." 4.2
 .\}
-If this is enabled, all processes of the session are terminated\&. If the last concurrent session of a user ends, his user systemd instance will be terminated too, and so will the user\*(Aqs slice unit\&.
+If enabled in
+\fBlogind.conf\fR(5), all processes of the session are terminated\&. If the last concurrent session of a user ends, the user\*(Aqs systemd instance will be terminated too, and so will the user\*(Aqs slice unit\&.
 .RE
 .sp
 .RS 4
@@ -152,13 +152,14 @@ A session identifier, suitable to be used in filenames\&. The string itself shou
 .PP
 \fI$XDG_RUNTIME_DIR\fR
 .RS 4
-Path to a user\-private user\-writable directory that is bound to the user login time on the machine\&. It is automatically created the first time a user logs in and removed on his final logout\&. If a user logs in twice at the same time, both sessions will see the same
+Path to a user\-private user\-writable directory that is bound to the user login time on the machine\&. It is automatically created the first time a user logs in and removed on the user\*(Aqs final logout\&. If a user logs in twice at the same time, both sessions will see the same
 \fI$XDG_RUNTIME_DIR\fR
 and the same contents\&. If a user logs in once, then logs out again, and logs in again, the directory contents will have been lost in between, but applications should not rely on this behavior and must be able to deal with stale files\&. To store session\-private data in this directory, the user should include the value of
 \fI$XDG_SESSION_ID\fR
 in the filename\&. This directory shall be used for runtime file system objects such as
 \fBAF_UNIX\fR
-sockets, FIFOs, PID files and similar\&. It is guaranteed that this directory is local and offers the greatest possible file system feature set the operating system provides\&.
+sockets, FIFOs, PID files and similar\&. It is guaranteed that this directory is local and offers the greatest possible file system feature set the operating system provides\&. For further details see the
+\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[1]\d\s+2\&.
 .RE
 .PP
 The following environment variables are read by the module and may be used by the PAM service to pass metadata to the module:
@@ -183,7 +184,12 @@ A single, short identifier string for the desktop environment\&. This may be use
 "GNOME", or
 "KDE"\&. It is recommended to use the same identifiers and capitalization as for
 \fI$XDG_CURRENT_DESKTOP\fR, as defined by the
-\m[blue]\fBDesktop Entry Specification\fR\m[]\&\s-2\u[1]\d\s+2\&.
+\m[blue]\fBDesktop Entry Specification\fR\m[]\&\s-2\u[2]\d\s+2\&. (However, note that
+\fI$XDG_SESSION_DESKTOP\fR
+only takes a single item, and not a colon\-separated list like
+\fI$XDG_CURRENT_DESKTOP\fR\&.) See
+\fBsd_session_get_desktop\fR(3)
+for more details\&.
 .RE
 .PP
 \fI$XDG_SEAT\fR
@@ -229,6 +235,11 @@ session    required     pam_systemd\&.so
 \fBsystemd.service\fR(5)
 .SH "NOTES"
 .IP " 1." 4
+XDG Base Directory Specification
+.RS 4
+\%http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+.RE
+.IP " 2." 4
 Desktop Entry Specification
 .RS 4
 \%http://standards.freedesktop.org/desktop-entry-spec/latest/
index 1639a14c82aa6f1e992f4fdcac0b07733e498157..b442ff954994692e37d9398289cb9f3ed0d91bc5 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="pam_systemd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>pam_systemd — Register user sessions in the systemd login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">pam_systemd.so</code></p></div><div class="refsect1"><a name="idm214186414816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>pam_systemd</strong></span> registers user
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="pam_systemd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>pam_systemd — Register user sessions in the systemd login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">pam_systemd.so</code></p></div><div class="refsect1"><a name="idm214195834960"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>pam_systemd</strong></span> registers user
                 sessions with the systemd login manager
                 <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
                 and hence the systemd control group hierarchy.</p><p>On login, this module ensures the following:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>If it does not exist yet, the
                         <code class="varname">$XDG_SESSION_ID</code> environment
                         variable is initialized. If auditing is
                         available and
-                        <span class="command"><strong>pam_loginuid.so</strong></span> run before
+                        <span class="command"><strong>pam_loginuid.so</strong></span> was run before
                         this module (which is highly recommended), the
                         variable is initialized from the auditing
                         session id
-                        (<code class="filename">/proc/self/sessionid</code>). Otherwise
+                        (<code class="filename">/proc/self/sessionid</code>). Otherwise,
                         an independent session counter is
                         used.</p></li><li class="listitem"><p>A new systemd scope unit is
                         created for the session. If this is the first
                         concurrent session of the user, an implicit
                         slice below <code class="filename">user.slice</code> is
-                        automatically created and the scope placed in
-                        it. In instance of the system service
-                        <code class="filename">user@.service</code> which runs
-                        the systemd user manager
-                        instance.</p></li></ol></div><p>On logout, this module ensures the following:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>If this is enabled, all
+                        automatically created and the scope placed into
+                        it. An instance of the system service
+                        <code class="filename">user@.service</code>, which runs
+                        the systemd user manager instance, is started.
+                        </p></li></ol></div><p>On logout, this module ensures the following:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>If enabled in
+                        <a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a>, all
                         processes of the session are terminated. If
-                        the last concurrent session of a user ends, his
-                        user systemd instance will be terminated too,
-                        and so will the user's slice
+                        the last concurrent session of a user ends,
+                        the user's systemd instance will be
+                        terminated too, and so will the user's slice
                         unit.</p></li><li class="listitem"><p>If the last concurrent session
                         of a user ends, the
                         <code class="varname">$XDG_RUNTIME_DIR</code> directory
                         and all its contents are removed,
                         too.</p></li></ol></div><p>If the system was not booted up with systemd as
                 init system, this module does nothing and immediately
-                returns PAM_SUCCESS.</p></div><div class="refsect1"><a name="idm214186772272"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="class="><span class="term"><code class="option">class=</code></span><a class="headerlink" title="Permalink to this term" href="#class=">¶</a></dt><dd><p>Takes a string
+                returns PAM_SUCCESS.</p></div><div class="refsect1"><a name="idm214199775568"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="class="><span class="term"><code class="option">class=</code></span><a class="headerlink" title="Permalink to this term" href="#class=">¶</a></dt><dd><p>Takes a string
                                 argument which sets the session class.
                                 The XDG_SESSION_CLASS environmental variable
                                 takes precedence. One of
@@ -78,7 +79,7 @@
                                 boolean argument. If yes or without
                                 the argument, the module will log
                                 debugging information as it
-                                operates.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190661408"></a><h2 id="Module Types Provided">Module Types Provided<a class="headerlink" title="Permalink to this headline" href="#Module%20Types%20Provided">¶</a></h2><p>Only <code class="option">session</code> is provided.</p></div><div class="refsect1"><a name="idm214190659744"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><p>The following environment variables are set for the processes of the user's session:</p><div class="variablelist"><dl class="variablelist"><dt id="$XDG_SESSION_ID"><span class="term"><code class="varname">$XDG_SESSION_ID</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_ID">¶</a></dt><dd><p>A session identifier,
+                                operates.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199759968"></a><h2 id="Module Types Provided">Module Types Provided<a class="headerlink" title="Permalink to this headline" href="#Module%20Types%20Provided">¶</a></h2><p>Only <code class="option">session</code> is provided.</p></div><div class="refsect1"><a name="idm214199751040"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><p>The following environment variables are set for the processes of the user's session:</p><div class="variablelist"><dl class="variablelist"><dt id="$XDG_SESSION_ID"><span class="term"><code class="varname">$XDG_SESSION_ID</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_ID">¶</a></dt><dd><p>A session identifier,
                                 suitable to be used in filenames. The
                                 string itself should be considered
                                 opaque, although often it is just the
@@ -93,9 +94,9 @@
                                 to the user login time on the
                                 machine. It is automatically created
                                 the first time a user logs in and
-                                removed on his final logout. If a user
-                                logs in twice at the same time, both
-                                sessions will see the same
+                                removed on the user's final logout. If
+                                a user logs in twice at the same time,
+                                both sessions will see the same
                                 <code class="varname">$XDG_RUNTIME_DIR</code>
                                 and the same contents. If a user logs
                                 in once, then logs out again, and logs
                                 applications should not rely on this
                                 behavior and must be able to deal with
                                 stale files. To store session-private
-                                data in this directory, the user should
-                                include the value of <code class="varname">$XDG_SESSION_ID</code>
-                                in the filename. This directory shall
-                                be used for runtime file system
-                                objects such as <code class="constant">AF_UNIX</code> sockets,
-                                FIFOs, PID files and similar. It is
-                                guaranteed that this directory is
-                                local and offers the greatest possible
-                                file system feature set the
-                                operating system
-                                provides.</p></dd></dl></div><p>The following environment variables are read by
+                                data in this directory, the user
+                                should include the value of
+                                <code class="varname">$XDG_SESSION_ID</code> in
+                                the filename. This directory shall be
+                                used for runtime file system objects
+                                such as <code class="constant">AF_UNIX</code>
+                                sockets, FIFOs, PID files and
+                                similar. It is guaranteed that this
+                                directory is local and offers the
+                                greatest possible file system feature
+                                set the operating system provides. For
+                                further details see the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
+                                Base Directory
+                                Specification</a>.</p></dd></dl></div><p>The following environment variables are read by
                 the module and may be used by the PAM service to pass
                 metadata to the module:</p><div class="variablelist"><dl class="variablelist"><dt id="$XDG_SESSION_TYPE"><span class="term"><code class="varname">$XDG_SESSION_TYPE</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_TYPE">¶</a></dt><dd><p>The session type. This
                                 may be used instead of
                                 identifiers and capitalization as for
                                 <code class="varname">$XDG_CURRENT_DESKTOP</code>,
                                 as defined by the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
-                                Entry
-                                Specification</a>.</p></dd><dt id="$XDG_SEAT"><span class="term"><code class="varname">$XDG_SEAT</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SEAT">¶</a></dt><dd><p>The seat name the session
+                                Entry Specification</a>. (However,
+                                note that
+                                <code class="varname">$XDG_SESSION_DESKTOP</code>
+                                only takes a single item, and not a
+                                colon-separated list like
+                                <code class="varname">$XDG_CURRENT_DESKTOP</code>.)
+                                See
+                                <a href="sd_session_get_desktop.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_desktop</span>(3)</span></a>
+                                for more details.</p></dd><dt id="$XDG_SEAT"><span class="term"><code class="varname">$XDG_SEAT</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SEAT">¶</a></dt><dd><p>The seat name the session
                                 shall be registered for, if
                                 any.</p></dd><dt id="$XDG_VTNR"><span class="term"><code class="varname">$XDG_VTNR</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_VTNR">¶</a></dt><dd><p>The VT number the
                                 session shall be registered for, if
                                 any. (Only applies to seats with a VT
                                 available, such as
-                                "<code class="literal">seat0</code>")</p></dd></dl></div></div><div class="refsect1"><a name="idm214190629472"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting">#%PAM-1.0
+                                "<code class="literal">seat0</code>")</p></dd></dl></div></div><div class="refsect1"><a name="idm214194759600"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting">#%PAM-1.0
 auth       required     pam_unix.so
 auth       required     pam_nologin.so
 account    required     pam_unix.so
 password   required     pam_unix.so
 session    required     pam_unix.so
 session    required     pam_loginuid.so
-session    required     pam_systemd.so</pre></div><div class="refsect1"><a name="idm214190627728"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+session    required     pam_systemd.so</pre></div><div class="refsect1"><a name="idm214194757920"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
                         <a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a>,
                         <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>,
-                        <a href="pam.conf.html"><span class="citerefentry"><span class="refentrytitle">pam.conf</span>(5)</span></a>,
-                        <a href="pam.d.html"><span class="citerefentry"><span class="refentrytitle">pam.d</span>(5)</span></a>,
-                        <a href="pam.html"><span class="citerefentry"><span class="refentrytitle">pam</span>(8)</span></a>,
-                        <a href="pam_loginuid.html"><span class="citerefentry"><span class="refentrytitle">pam_loginuid</span>(8)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man5/pam.conf.5.html"><span class="citerefentry"><span class="refentrytitle">pam.conf</span>(5)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man5/pam.d.5.html"><span class="citerefentry"><span class="refentrytitle">pam.d</span>(5)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man8/pam.8.html"><span class="citerefentry"><span class="refentrytitle">pam</span>(8)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man8/pam_loginuid.8.html"><span class="citerefentry"><span class="refentrytitle">pam_loginuid</span>(8)</span></a>,
                         <a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a>,
                         <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>
index 97cb8bf2dca6d315cbbc5db0b62acec727a14ad7..3e106ea69b8dff7a577fcf96408de516cc875e02 100644 (file)
                         <varname>$XDG_SESSION_ID</varname> environment
                         variable is initialized. If auditing is
                         available and
-                        <command>pam_loginuid.so</command> run before
+                        <command>pam_loginuid.so</command> was run before
                         this module (which is highly recommended), the
                         variable is initialized from the auditing
                         session id
-                        (<filename>/proc/self/sessionid</filename>). Otherwise
+                        (<filename>/proc/self/sessionid</filename>). Otherwise,
                         an independent session counter is
                         used.</para></listitem>
 
                         created for the session. If this is the first
                         concurrent session of the user, an implicit
                         slice below <filename>user.slice</filename> is
-                        automatically created and the scope placed in
-                        it. In instance of the system service
-                        <filename>user@.service</filename> which runs
-                        the systemd user manager
-                        instance.</para></listitem>
+                        automatically created and the scope placed into
+                        it. An instance of the system service
+                        <filename>user@.service</filename>, which runs
+                        the systemd user manager instance, is started.
+                        </para></listitem>
                 </orderedlist>
 
                 <para>On logout, this module ensures the following:</para>
 
                 <orderedlist>
-                        <listitem><para>If this is enabled, all
+                        <listitem><para>If enabled in
+                        <citerefentry><refentrytitle>logind.conf</refentrytitle>
+                        <manvolnum>5</manvolnum></citerefentry>, all
                         processes of the session are terminated. If
-                        the last concurrent session of a user ends, his
-                        user systemd instance will be terminated too,
-                        and so will the user's slice
+                        the last concurrent session of a user ends,
+                        the user's systemd instance will be
+                        terminated too, and so will the user's slice
                         unit.</para></listitem>
 
                         <listitem><para>If the last concurrent session
                                 to the user login time on the
                                 machine. It is automatically created
                                 the first time a user logs in and
-                                removed on his final logout. If a user
-                                logs in twice at the same time, both
-                                sessions will see the same
+                                removed on the user's final logout. If
+                                a user logs in twice at the same time,
+                                both sessions will see the same
                                 <varname>$XDG_RUNTIME_DIR</varname>
                                 and the same contents. If a user logs
                                 in once, then logs out again, and logs
                                 applications should not rely on this
                                 behavior and must be able to deal with
                                 stale files. To store session-private
-                                data in this directory, the user should
-                                include the value of <varname>$XDG_SESSION_ID</varname>
-                                in the filename. This directory shall
-                                be used for runtime file system
-                                objects such as <constant>AF_UNIX</constant> sockets,
-                                FIFOs, PID files and similar. It is
-                                guaranteed that this directory is
-                                local and offers the greatest possible
-                                file system feature set the
-                                operating system
-                                provides.</para></listitem>
+                                data in this directory, the user
+                                should include the value of
+                                <varname>$XDG_SESSION_ID</varname> in
+                                the filename. This directory shall be
+                                used for runtime file system objects
+                                such as <constant>AF_UNIX</constant>
+                                sockets, FIFOs, PID files and
+                                similar. It is guaranteed that this
+                                directory is local and offers the
+                                greatest possible file system feature
+                                set the operating system provides. For
+                                further details see the <ulink
+                                url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
+                                Base Directory
+                                Specification</ulink>.</para></listitem>
                         </varlistentry>
 
                 </variablelist>
                                 <varname>$XDG_CURRENT_DESKTOP</varname>,
                                 as defined by the <ulink
                                 url="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop
-                                Entry
-                                Specification</ulink>.</para></listitem>
+                                Entry Specification</ulink>. (However,
+                                note that
+                                <varname>$XDG_SESSION_DESKTOP</varname>
+                                only takes a single item, and not a
+                                colon-separated list like
+                                <varname>$XDG_CURRENT_DESKTOP</varname>.)
+                                See
+                                <citerefentry><refentrytitle>sd_session_get_desktop</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                for more details.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
@@ -312,10 +325,10 @@ session    required     pam_systemd.so</programlisting>
                         <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
index 642c4567ec43dcf3a81c891f55a20411cb69dc12..4b010136fe4ac3e674e6873ce3f716fbaf96a9cc 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">poweroff [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">reboot [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214185642768"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>halt</strong></span>,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">poweroff [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">reboot [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214184881712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>halt</strong></span>,
                 <span class="command"><strong>poweroff</strong></span>, <span class="command"><strong>reboot</strong></span>
                 may be used to halt, power-off or reboot the
-                machine.</p></div><div class="refsect1"><a name="idm214186089440"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+                machine.</p></div><div class="refsect1"><a name="idm214184878512"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--halt"><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#--halt">¶</a></dt><dd><p>Halt the machine,
                                 regardless of which one of the three
                                 commands is invoked.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Power-off the machine,
                                 power-off, reboot.</p></dd><dt id="-d"><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--no-wtmp</code></span><a class="headerlink" title="Permalink to this term" href="#-d">¶</a></dt><dd><p>Do not write wtmp
                                 shutdown entry.</p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall">¶</a></dt><dd><p>Do not send wall
                                 message before
-                                halt, power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183375264"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214184284480"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>These are legacy commands available for
-                compatibility only.</p></div><div class="refsect1"><a name="idm214184877296"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                halt, power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188761648"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214188760464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>These are legacy commands available for
+                compatibility only.</p></div><div class="refsect1"><a name="idm214188759280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index 642c4567ec43dcf3a81c891f55a20411cb69dc12..4b010136fe4ac3e674e6873ce3f716fbaf96a9cc 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">poweroff [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">reboot [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214185642768"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>halt</strong></span>,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">poweroff [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">reboot [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214184881712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>halt</strong></span>,
                 <span class="command"><strong>poweroff</strong></span>, <span class="command"><strong>reboot</strong></span>
                 may be used to halt, power-off or reboot the
-                machine.</p></div><div class="refsect1"><a name="idm214186089440"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+                machine.</p></div><div class="refsect1"><a name="idm214184878512"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--halt"><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#--halt">¶</a></dt><dd><p>Halt the machine,
                                 regardless of which one of the three
                                 commands is invoked.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Power-off the machine,
                                 power-off, reboot.</p></dd><dt id="-d"><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--no-wtmp</code></span><a class="headerlink" title="Permalink to this term" href="#-d">¶</a></dt><dd><p>Do not write wtmp
                                 shutdown entry.</p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall">¶</a></dt><dd><p>Do not send wall
                                 message before
-                                halt, power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183375264"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214184284480"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>These are legacy commands available for
-                compatibility only.</p></div><div class="refsect1"><a name="idm214184877296"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                halt, power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188761648"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214188760464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>These are legacy commands available for
+                compatibility only.</p></div><div class="refsect1"><a name="idm214188759280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index 9b8813b709cd2d6207bd80a8473276a73a18458b..e600d94dd1dd257daf53aa0a86435f23452f751c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "RESOLVED\&.CONF" "5" "" "systemd 215" "resolved.conf"
+.TH "RESOLVED\&.CONF" "5" "" "systemd 217" "resolved.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -27,17 +27,45 @@ resolved.conf \- Network Name Resolution configuration file
 .SH "DESCRIPTION"
 .PP
 When starting, systemd\-resolved will read the configuration file
-resolved\&.conf\&. This configuration file determines the fallback DNS servers\&.
+resolved\&.conf\&. This configuration file controls local DNS and LLMNR name resolving\&.
 .SH "OPTIONS"
 .PP
 \fIDNS=\fR
 .RS 4
-A space separated list of IPv4 and IPv6 addresses to be used as the fallback DNS servers\&. Note that the servers obtained from
+A space separated list of IPv4 and IPv6 addresses to be used as system DNS servers\&. DNS requests are sent to one of the listed DNS servers in parallel to any per\-interface DNS servers acquired from
+\fBsystemd-networkd.service\fR(8)\&. For compatibility reasons, if set to the empty list the DNS servers listed in
+/etc/resolv\&.conf
+are used, if any are configured there\&. This setting defaults to the empty list\&.
+.RE
+.PP
+\fIFallbackDNS=\fR
+.RS 4
+A space separated list of IPv4 and IPv6 addresses to be used as the fallback DNS servers\&. Any per\-interface DNS servers obtained from
 \fBsystemd-networkd.service\fR(8)
-take precedence\&. If this option is not given, a compiled\-in list of DNS servers is used instead\&.
+take precedence over this setting, as do any servers set via
+\fIDNS=\fR
+above or
+/etc/resolv\&.conf\&. This setting is hence only used if no other DNS server information is known\&. If this option is not given, a compiled\-in list of DNS servers is used instead\&.
+.RE
+.PP
+\fILLMNR=\fR
+.RS 4
+Takes a boolean argument or
+"resolve"\&. Controls Link\-Local Multicast Name Resolution support (\m[blue]\fBRFC 4794\fR\m[]\&\s-2\u[1]\d\s+2) on the local host\&. If true enables full LLMNR responder and resolver support\&. If false disable both\&. If set to
+"resolve"
+only resolving support is enabled, but responding is disabled\&. Note that
+\fBsystemd-networkd.service\fR(8)
+also maintains per\-interface LLMNR settings\&. LLMNR will be enabled on an interface only if the per\-interface and the global setting is on\&.
 .RE
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
 \fBsystemd-resolved.service\fR(8),
-\fBsystemd-networkd.service\fR(8)
+\fBsystemd-networkd.service\fR(8),
+\fBresolv.conf\fR(4)
+.SH "NOTES"
+.IP " 1." 4
+RFC 4794
+.RS 4
+\%https://tools.ietf.org/html/rfc4795
+.RE
index 4145a8942b86b663b5b681fbb90c1cec5ac07339..ca61a410f34ed37d3a36774333358ffcfb200f1d 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="resolved.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>resolved.conf — Network Name Resolution configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/resolved.conf</code></p></div><div class="refsect1"><a name="idm214193517248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When starting, systemd-resolved will read the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="resolved.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>resolved.conf — Network Name Resolution configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/resolved.conf</code></p></div><div class="refsect1"><a name="idm214188394976"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When starting, systemd-resolved will read the
                 configuration file <code class="filename">resolved.conf</code>.
-                This configuration file determines the fallback DNS
-                servers.</p></div><div class="refsect1"><a name="idm214193515264"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="DNS="><span class="term"><code class="varname">DNS=</code></span><a class="headerlink" title="Permalink to this term" href="#DNS=">¶</a></dt><dd><p>A space separated list of IPv4 and IPv6
-                                addresses to be used as the fallback DNS servers. Note that
-                                the servers obtained from
+                This configuration file controls local DNS and LLMNR
+                name resolving.</p></div><div class="refsect1"><a name="idm214186369984"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="DNS="><span class="term"><code class="varname">DNS=</code></span><a class="headerlink" title="Permalink to this term" href="#DNS=">¶</a></dt><dd><p>A space separated list
+                                of IPv4 and IPv6 addresses to be used
+                                as system DNS servers. DNS requests
+                                are sent to one of the listed DNS
+                                servers in parallel to any
+                                per-interface DNS servers acquired
+                                from
+                                <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>. For
+                                compatibility reasons, if set to the
+                                empty list the DNS servers listed in
+                                <code class="filename">/etc/resolv.conf</code>
+                                are used, if any are
+                                configured there. This setting
+                                defaults to the empty
+                                list.</p></dd><dt id="FallbackDNS="><span class="term"><code class="varname">FallbackDNS=</code></span><a class="headerlink" title="Permalink to this term" href="#FallbackDNS=">¶</a></dt><dd><p>A space separated list
+                                of IPv4 and IPv6 addresses to be used
+                                as the fallback DNS servers. Any
+                                per-interface DNS servers obtained
+                                from
                                 <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
-                                take precedence. If this option is not given, a compiled-in
-                                list of DNS servers is used instead.</p></dd></dl></div></div><div class="refsect1"><a name="idm214193511040"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                take precedence over this setting, as
+                                do any servers set via
+                                <code class="varname">DNS=</code> above or
+                                <code class="filename">/etc/resolv.conf</code>. This
+                                setting is hence only used if no other
+                                DNS server information is known. If
+                                this option is not given, a
+                                compiled-in list of DNS servers is
+                                used instead.</p></dd><dt id="LLMNR="><span class="term"><code class="varname">LLMNR=</code></span><a class="headerlink" title="Permalink to this term" href="#LLMNR=">¶</a></dt><dd><p>Takes a boolean
+                                argument or
+                                "<code class="literal">resolve</code>". Controls
+                                Link-Local Multicast Name Resolution support (<a class="ulink" href="https://tools.ietf.org/html/rfc4795" target="_top">RFC
+                                4794</a>) on the local host. If
+                                true enables full LLMNR responder and
+                                resolver support. If false disable
+                                both. If set to
+                                "<code class="literal">resolve</code>" only
+                                resolving support is enabled, but
+                                responding is disabled. Note that
+                                <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
+                                also maintains per-interface LLMNR
+                                settings. LLMNR will be enabled on an
+                                interface only if the per-interface
+                                and the global setting is
+                                on.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190120320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a>,
-                        <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
+                        <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man4/resolv.conf.4.html"><span class="citerefentry"><span class="refentrytitle">resolv.conf</span>(4)</span></a>
                   </p></div></div></body></html>
index 04e510fbe38e840f11a7c1c6107679f71c378cdf..c58236856851ac1e3ec21044738c7f2360b40aa2 100644 (file)
@@ -56,8 +56,8 @@
 
                 <para>When starting, systemd-resolved will read the
                 configuration file <filename>resolved.conf</filename>.
-                This configuration file determines the fallback DNS
-                servers.</para>
+                This configuration file controls local DNS and LLMNR
+                name resolving.</para>
 
         </refsect1>
 
 
                         <varlistentry>
                                 <term><varname>DNS=</varname></term>
-                                <listitem><para>A space separated list of IPv4 and IPv6
-                                addresses to be used as the fallback DNS servers. Note that
-                                the servers obtained from
+                                <listitem><para>A space separated list
+                                of IPv4 and IPv6 addresses to be used
+                                as system DNS servers. DNS requests
+                                are sent to one of the listed DNS
+                                servers in parallel to any
+                                per-interface DNS servers acquired
+                                from
+                                <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For
+                                compatibility reasons, if set to the
+                                empty list the DNS servers listed in
+                                <filename>/etc/resolv.conf</filename>
+                                are used, if any are
+                                configured there. This setting
+                                defaults to the empty
+                                list.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><varname>FallbackDNS=</varname></term>
+                                <listitem><para>A space separated list
+                                of IPv4 and IPv6 addresses to be used
+                                as the fallback DNS servers. Any
+                                per-interface DNS servers obtained
+                                from
+                                <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                                take precedence over this setting, as
+                                do any servers set via
+                                <varname>DNS=</varname> above or
+                                <filename>/etc/resolv.conf</filename>. This
+                                setting is hence only used if no other
+                                DNS server information is known. If
+                                this option is not given, a
+                                compiled-in list of DNS servers is
+                                used instead.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><varname>LLMNR=</varname></term>
+                                <listitem><para>Takes a boolean
+                                argument or
+                                <literal>resolve</literal>. Controls
+                                Link-Local Multicast Name Resolution support (<ulink
+                                url="https://tools.ietf.org/html/rfc4795">RFC
+                                4794</ulink>) on the local host. If
+                                true enables full LLMNR responder and
+                                resolver support. If false disable
+                                both. If set to
+                                <literal>resolve</literal> only
+                                resolving support is enabled, but
+                                responding is disabled. Note that
                                 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-                                take precedence. If this option is not given, a compiled-in
-                                list of DNS servers is used instead.</para></listitem>
+                                also maintains per-interface LLMNR
+                                settings. LLMNR will be enabled on an
+                                interface only if the per-interface
+                                and the global setting is
+                                on.</para></listitem>
                         </varlistentry>
 
                 </variablelist>
                   <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index e67fc9e9e056a57ed0a5174b012070161b29c3f0..8a632162362e3d2af6577e1f33db5bcd6fa80826 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "RUNLEVEL" "8" "" "systemd 215" "runlevel"
+.TH "RUNLEVEL" "8" "" "systemd 217" "runlevel"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 77ba0d47f30105fab5fa810abc24db02da4bede9..197a337dfb09dd82ecdf5eea08cc3acef5f2bd91 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="runlevel"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>runlevel — Print previous and current SysV runlevel</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">runlevel [options...]</code> </p></div></div><div class="refsect1"><a name="idm214176626512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>runlevel</strong></span> prints the previous
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="runlevel"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>runlevel — Print previous and current SysV runlevel</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">runlevel [options...]</code> </p></div></div><div class="refsect1"><a name="idm214169516464"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>runlevel</strong></span> prints the previous
                 and current SysV runlevel if they are known.</p><p>The two runlevel characters are separated by a
                 single space character. If a runlevel cannot be
                 determined, N is printed instead. If neither can be
                 determined, the word "unknown" is printed.</p><p>Unless overridden in the environment, this will
                 check the utmp database for recent runlevel
-                changes.</p></div><div class="refsect1"><a name="idm214176674096"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following option is understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd></dl></div></div><div class="refsect1"><a name="idm214177014880"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>If one or both runlevels could be determined, 0
-                is returned, a non-zero failure code otherwise.</p></div><div class="refsect1"><a name="idm214175648864"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$RUNLEVEL"><span class="term"><code class="varname">$RUNLEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24RUNLEVEL">¶</a></dt><dd><p>If
+                changes.</p></div><div class="refsect1"><a name="idm214169513552"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following option is understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd></dl></div></div><div class="refsect1"><a name="idm214169510160"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>If one or both runlevels could be determined, 0
+                is returned, a non-zero failure code otherwise.</p></div><div class="refsect1"><a name="idm214169508848"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$RUNLEVEL"><span class="term"><code class="varname">$RUNLEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24RUNLEVEL">¶</a></dt><dd><p>If
                                 <code class="varname">$RUNLEVEL</code> is set,
                                 <span class="command"><strong>runlevel</strong></span> will print
                                 this value as current runlevel and
                                 <code class="varname">$PREVLEVEL</code> is set,
                                 <span class="command"><strong>runlevel</strong></span> will print
                                 this value as previous runlevel and
-                                ignore utmp.</p></dd></dl></div></div><div class="refsect1"><a name="idm214175394208"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/var/run/utmp"><span class="term"><code class="filename">/var/run/utmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run/utmp">¶</a></dt><dd><p>The utmp database
+                                ignore utmp.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173401872"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/var/run/utmp"><span class="term"><code class="filename">/var/run/utmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run/utmp">¶</a></dt><dd><p>The utmp database
                                 <span class="command"><strong>runlevel</strong></span> reads the
                                 previous and current runlevel
-                                from.</p></dd></dl></div></div><div class="refsect1"><a name="idm214175832096"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>This is a legacy command available for compatibility
+                                from.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173398160"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>This is a legacy command available for compatibility
                 only. It should not be used anymore, as the concept of
-                runlevels is obsolete.</p></div><div class="refsect1"><a name="idm214176267456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                runlevels is obsolete.</p></div><div class="refsect1"><a name="idm214173396800"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
                 </p></div></div></body></html>
index 976753a737ff8ae0da9053266ea5c6b90897ade5..db9a436724851a10ca3aedbf939a8b155286bf78 100644 (file)
@@ -22,7 +22,8 @@
 -->
 
 <refentry id="runlevel"
-          xmlns:xi="http://www.w3.org/2001/XInclude">
+          xmlns:xi="http://www.w3.org/2001/XInclude"
+          conditional="HAVE_UTMP">
 
         <refentryinfo>
                 <title>runlevel</title>
index 8c8a0a466ca7d363a326d26e7e55769836140f15..39603a2039762364a86d03a05b8b5ee929c5c4b4 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD\-DAEMON" "3" "" "systemd 215" "sd-daemon"
+.TH "SD\-DAEMON" "3" "" "systemd 217" "sd-daemon"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -63,6 +63,7 @@ for more information about the functions implemented\&. In addition to these fun
 .\}
 .PP
 These prefixes are intended to be used in conjunction with stderr\-based logging as implemented by systemd\&. If a systemd service definition file is configured with
+\fIStandardError=journal\fR,
 \fIStandardError=syslog\fR
 or
 \fIStandardError=kmsg\fR, these prefixes can be used to encode a log level in lines printed\&. This is similar to the kernel
@@ -103,5 +104,4 @@ file\&.
 \fBsystemd.service\fR(5),
 \fBsystemd.socket\fR(5),
 \fBfprintf\fR(3),
-\fBsd-readahead\fR(3),
 \fBpkg-config\fR(1)
index afc020f8340b843665afa6649182dcb875af6d39..5a723e0e50b5b290eab3678a4e434faf618d52ce 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
-                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214195900512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
+                new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214169546224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
                 for new-style daemons, as implemented by the
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 init system.</p><p>See
 #define SD_DEBUG   "&lt;7&gt;"  /* debug-level messages */</pre><p>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <code class="varname">StandardError=syslog</code>
-                or <code class="varname">StandardError=kmsg</code>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <code class="varname">StandardError=journal</code>,
+                <code class="varname">StandardError=syslog</code> or
+                <code class="varname">StandardError=kmsg</code>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <code class="function">printk()</code>-style logging. See
-                <a href="klogctl.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
                 for more information.</p><p>The log levels are identical to
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
-                SD_INFO.</p><div class="example"><a name="idm214195045552"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
-                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192388800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                SD_INFO.</p><div class="example"><a name="idm214173485680"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
+                        NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214167195408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214193723968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214173482912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
                         <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
@@ -66,7 +68,6 @@
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index 2b4f3a5598fb5220299ce6951b71738e8e19960d..5f331e740a11c31020371c2cd18e2259597ee6b3 100644 (file)
                 <para>These prefixes are intended to be used in
                 conjunction with stderr-based logging as implemented
                 by systemd. If a systemd service definition file is
-                configured with <varname>StandardError=syslog</varname>
-                or <varname>StandardError=kmsg</varname>, these
-                prefixes can be used to encode a log level in lines
+                configured with
+                <varname>StandardError=journal</varname>,
+                <varname>StandardError=syslog</varname> or
+                <varname>StandardError=kmsg</varname>, these prefixes
+                can be used to encode a log level in lines
                 printed. This is similar to the kernel
                 <function>printk()</function>-style logging. See
                 <citerefentry><refentrytitle>klogctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
                 for more information.</para>
 
                 <para>The log levels are identical to
-                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>'s
+                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>'s
                 log level system. To use these prefixes simply prefix
                 every line with one of these strings. A line that is
                 not prefixed will be logged at the default log level
                         <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 6528c6454258987d7229a60643b66958ac9928d8..b746f005b1b3b23a30e2da8c77ab846d4fcf6bc0 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD\-ID128" "3" "" "systemd 215" "sd-id128"
+.TH "SD\-ID128" "3" "" "systemd 217" "sd-id128"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 913e12f3247b208f1463c5ef1193713668dee8cd..d4a2a71839e86649ea43fee1697560438408ed1c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191197712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214182199552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
                 process and generate 128-bit ID values. The 128-bit ID
                 values processed and generated by these APIs are a
                 generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
@@ -55,7 +55,7 @@
 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> may be used
                 to format a 128-bit ID in a
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 format string, as shown in the following
                 example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
         sd_id128_t id;
 }</pre><p>Note that new, randomized IDs may be generated
                 with
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
-                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214187744304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214179846512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214191643840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214186132384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
                 </p></div></div></body></html>
index 5a4146a0f9c044fdc3566b8081c611e82da156fc..d9ebb9c68015da5d905f3884e9f415c42a0df896 100644 (file)
                 <para><function>SD_ID128_FORMAT_STR</function> and
                 <function>SD_ID128_FORMAT_VAL()</function> may be used
                 to format a 128-bit ID in a
-                <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 format string, as shown in the following
                 example:</para>
 
                         <citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
         </refsect1>
index c22e1c8e24371dc78db59e935323bec5cef74b15..e62d609db260a12c061a23eb64e72c1f0dbfb9a4 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD\-JOURNAL" "3" "" "systemd 215" "sd-journal"
+.TH "SD\-JOURNAL" "3" "" "systemd 217" "sd-journal"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 9996b3c094104133165685b8452bb81ee88c60e5..0e4d8071bfaaf92020add1051d609ec3329988b3 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-journal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-journal — APIs for submitting and querying log entries to and from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191623984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-journal.h</code> provides APIs
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-journal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-journal — APIs for submitting and querying log entries to and from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214168576624"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-journal.h</code> provides APIs
                 to submit and query log entries. The APIs exposed act
                 both as client for the
                 <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>
                 tool. Command line access for querying entries from
                 the journal is available with the
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>
-                tool.</p></div><div class="refsect1"><a name="idm214186032880"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                tool.</p></div><div class="refsect1"><a name="idm214163377952"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214189468928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214172517008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>,
                         <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
@@ -69,5 +69,5 @@
                         <a href="sd_journal_get_catalog.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index d3dc57f47cc47431cd96df4910b9dc36e9869b35..edf7c32d6dc294df25fbaa7377e0d33279ad3b1a 100644 (file)
                         <citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index aa8f657d3f2650b7bffab44fb5eea9ead0c19c70..ad257a6fe75a695a3075e4463fcca9c36bbb076a 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD\-LOGIN" "3" "" "systemd 215" "sd-login"
+.TH "SD\-LOGIN" "3" "" "systemd 217" "sd-login"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -86,7 +86,6 @@ file\&.
 \fBsd_get_seats\fR(3),
 \fBsd_login_monitor_new\fR(3),
 \fBsd-daemon\fR(3),
-\fBsd-readahead\fR(3),
 \fBpkg-config\fR(1)
 .SH "NOTES"
 .IP " 1." 4
index 7d2aa1c1a582f9747ce738d4cd014bb22beab8f6..fdfc603650f6e7a697d51bd8390375e60b30a92e 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-login"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-login — APIs for
-                tracking logins</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214203511616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-login.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-login"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-login — APIs for
+                tracking logins</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214174173472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-login.h</code> provides APIs to
                 introspect and monitor seat, login session and user
                 status information on the local system. </p><p>See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/multiseat" target="_top">Multi-Seat
                 on Linux</a> for an introduction into multi-seat
@@ -45,7 +45,7 @@
                 each other.</p><p>If the functions return string arrays, these are
                 generally <code class="constant">NULL</code> terminated and need to be freed by the
                 caller with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use, including the strings referenced
                 therein. Similarly, individual strings returned need to
                 be freed, as well.</p><p>As a special exception, instead of an empty
                 <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
                 <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>
                 for more information about the functions
-                implemented.</p></div><div class="refsect1"><a name="idm214195679696"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                implemented.</p></div><div class="refsect1"><a name="idm214169692704"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214199735312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214178111760"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>,
                         <a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a>,
@@ -70,6 +70,5 @@
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
                         <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 </p></div></div></body></html>
index e68f4fd819d798239017bcbd33cfe174f1cac0cb..f21170db160afd71cab8e819506c7e8b814af736 100644 (file)
@@ -98,7 +98,7 @@
                 <para>If the functions return string arrays, these are
                 generally <constant>NULL</constant> terminated and need to be freed by the
                 caller with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use, including the strings referenced
                 therein. Similarly, individual strings returned need to
                 be freed, as well.</para>
                         <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
diff --git a/man/sd-readahead.3 b/man/sd-readahead.3
deleted file mode 100644 (file)
index d26ddb3..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-'\" t
-.TH "SD\-READAHEAD" "3" "" "systemd 215" "sd-readahead"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-sd-readahead \- Reference implementation of APIs for controlling boot\-time read\-ahead
-.SH "SYNOPSIS"
-.sp
-.ft B
-.nf
-#include "sd\-readahead\&.h"
-.fi
-.ft
-.SH "DESCRIPTION"
-.PP
-sd\-readahead\&.c
-and
-sd\-readahead\&.h
-provide a reference implementation for APIs for controlling boot\-time read\-ahead, as implemented by the read\-ahead subsystem of the
-\fBsystemd\fR(1)
-init system\&.
-.PP
-See
-\fBsd_readahead\fR(3)
-for more information about the function implemented\&.
-.SH "NOTES"
-.PP
-This interface is provided by the reference implementation of APIs for controlling boot\-time read\-ahead and distributed with the systemd package\&. The algorithms it implements are simple, and can easily be reimplemented in daemons if it is important to support this interface without using the reference implementation\&. See the respective function man pages for details\&.
-.PP
-In addition, for details about the algorithms, check the liberally licensed reference implementation sources:
-\m[blue]\fB\%http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c\fR\m[]
-and
-\m[blue]\fB\%http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h\fR\m[]
-.PP
-These APIs are implemented in the reference implementation\*(Aqs drop\-in
-sd\-readahead\&.c
-and
-sd\-readahead\&.h
-files\&. It is recommended that applications consuming these APIs copy the implementation into their source tree, either verbatim or in excerpts\&. These interfaces are currently not available in a dynamic library\&.
-.PP
-The functions provided by this interface become NOPs when \-DDISABLE_SYSTEMD is set during compilation\&. In addition, if
-sd\-readhead\&.c
-is compiled on non\-Linux systems it becomes NOPs\&.
-.SH "SEE ALSO"
-.PP
-\fBsystemd\fR(1),
-\fBsd_readahead\fR(3),
-\fBsd-daemon\fR(3)
diff --git a/man/sd-readahead.html b/man/sd-readahead.html
deleted file mode 100644 (file)
index b44f8d0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd-readahead</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
-    a.headerlink {
-      color: #c60f0f;
-      font-size: 0.8em;
-      padding: 0 4px 0 4px;
-      text-decoration: none;
-      visibility: hidden;
-    }
-
-    a.headerlink:hover {
-      background-color: #c60f0f;
-      color: white;
-    }
-
-    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
-      visibility: visible;
-    }
-  </style><a href="index.html">Index </a>·
-  <a href="systemd.directives.html">Directives </a>·
-  <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-readahead"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-readahead — Reference implementation of APIs for
-                controlling boot-time read-ahead</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include "sd-readahead.h"</pre></div></div><div class="refsect1"><a name="idm214198772224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-readahead.c</code> and
-                <code class="filename">sd-readahead.h</code> provide a
-                reference implementation for APIs for controlling boot-time
-                read-ahead, as implemented by the read-ahead subsystem
-                of the
-                <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                init system.</p><p>See
-                <a href="sd_readahead.html"><span class="citerefentry"><span class="refentrytitle">sd_readahead</span>(3)</span></a>
-                for more information about the function
-                implemented.</p></div><div class="refsect1"><a name="idm214198767552"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>This interface is provided by the reference
-                implementation of APIs for controlling boot-time
-                read-ahead and distributed with the systemd
-                package. The algorithms it implements are simple, and
-                can easily be reimplemented in daemons if it is
-                important to support this interface without using the
-                reference implementation. See the respective function
-                man pages for details.</p><p>In addition, for details about the algorithms,
-                check the liberally licensed reference implementation
-                sources:
-                <a class="ulink" href="http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c" target="_top">http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c</a>
-                and <a class="ulink" href="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h" target="_top">http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h</a></p><p>These APIs are implemented in the reference
-                implementation's drop-in
-                <code class="filename">sd-readahead.c</code> and
-                <code class="filename">sd-readahead.h</code> files. It is
-                recommended that applications consuming these APIs copy
-                the implementation into their source tree, either
-                verbatim or in excerpts. These interfaces are
-                currently not available in a dynamic library.</p><p>The functions provided by this interface become
-                NOPs when -DDISABLE_SYSTEMD is set during
-                compilation. In addition, if
-                <code class="filename">sd-readhead.c</code> is compiled on
-                non-Linux systems it becomes NOPs.</p></div><div class="refsect1"><a name="idm214198760976"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="sd_readahead.html"><span class="citerefentry"><span class="refentrytitle">sd_readahead</span>(3)</span></a>,
-                        <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>
-                </p></div></div></body></html>
diff --git a/man/sd-readahead.xml b/man/sd-readahead.xml
deleted file mode 100644 (file)
index bcc46b2..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?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">
-
-<!--
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  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="sd-readahead" conditional='ENABLE_READAHEAD'>
-
-        <refentryinfo>
-                <title>sd-readahead</title>
-                <productname>systemd</productname>
-
-                <authorgroup>
-                        <author>
-                                <contrib>Developer</contrib>
-                                <firstname>Lennart</firstname>
-                                <surname>Poettering</surname>
-                                <email>lennart@poettering.net</email>
-                        </author>
-                </authorgroup>
-        </refentryinfo>
-
-        <refmeta>
-                <refentrytitle>sd-readahead</refentrytitle>
-                <manvolnum>3</manvolnum>
-        </refmeta>
-
-        <refnamediv>
-                <refname>sd-readahead</refname>
-                <refpurpose>Reference implementation of APIs for
-                controlling boot-time read-ahead</refpurpose>
-        </refnamediv>
-
-        <refsynopsisdiv>
-                <funcsynopsis>
-                        <funcsynopsisinfo>#include "sd-readahead.h"</funcsynopsisinfo>
-                </funcsynopsis>
-        </refsynopsisdiv>
-
-        <refsect1>
-                <title>Description</title>
-
-                <para><filename>sd-readahead.c</filename> and
-                <filename>sd-readahead.h</filename> provide a
-                reference implementation for APIs for controlling boot-time
-                read-ahead, as implemented by the read-ahead subsystem
-                of the
-                <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                init system.</para>
-
-                <para>See
-                <citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                for more information about the function
-                implemented.</para>
-        </refsect1>
-
-        <refsect1>
-                <title>Notes</title>
-
-                <para>This interface is provided by the reference
-                implementation of APIs for controlling boot-time
-                read-ahead and distributed with the systemd
-                package. The algorithms it implements are simple, and
-                can easily be reimplemented in daemons if it is
-                important to support this interface without using the
-                reference implementation. See the respective function
-                man pages for details.</para>
-
-                <para>In addition, for details about the algorithms,
-                check the liberally licensed reference implementation
-                sources:
-                <ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c"/>
-                and <ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h"/></para>
-
-                <para>These APIs are implemented in the reference
-                implementation's drop-in
-                <filename>sd-readahead.c</filename> and
-                <filename>sd-readahead.h</filename> files. It is
-                recommended that applications consuming these APIs copy
-                the implementation into their source tree, either
-                verbatim or in excerpts. These interfaces are
-                currently not available in a dynamic library.</para>
-
-                <para>The functions provided by this interface become
-                NOPs when -DDISABLE_SYSTEMD is set during
-                compilation. In addition, if
-                <filename>sd-readhead.c</filename> is compiled on
-                non-Linux systems it becomes NOPs.</para>
-        </refsect1>
-
-        <refsect1>
-                <title>See Also</title>
-                <para>
-                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                </para>
-        </refsect1>
-
-</refentry>
index e4dea9b7e53aeec4fe79cbc26a237953cbec21ae..09fe970d57443613773955bb420a36d9e41c4d19 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BOOTED" "3" "" "systemd 215" "sd_booted"
+.TH "SD_BOOTED" "3" "" "systemd 217" "sd_booted"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index b55961a442faeb9af0d1749143ac03b367bcba33..7f6d277736a3f441ace4c877ed65de419ec29c14 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_booted"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_booted — Test whether the system is running the systemd init system</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_booted</b>(</code></td><td>void<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214187764176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_booted()</code> checks whether
-                the system was booted up using the systemd init system.</p></div><div class="refsect1"><a name="idm214187730160"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_booted"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_booted — Test whether the system is running the systemd init system</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_booted</b>(</code></td><td>void<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214174048416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_booted()</code> checks whether
+                the system was booted up using the systemd init system.</p></div><div class="refsect1"><a name="idm214174046672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
                 errno-style error code. If the system was booted up
                 with systemd as init system, this call returns a
-                positive return value, zero otherwise.</p></div><div class="refsect1"><a name="idm214186466608"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                positive return value, zero otherwise.</p></div><div class="refsect1"><a name="idm214174045248"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, this function checks whether the
                 directory <code class="filename">/run/systemd/system/</code>
                 exists. A simple check like this can also be
                 implemented trivially in shell or any other
-                language.</p></div><div class="refsect1"><a name="idm214186988832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                language.</p></div><div class="refsect1"><a name="idm214174042256"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>
                 </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
diff --git a/man/sd_bus_creds_get_connection_name.3 b/man/sd_bus_creds_get_connection_name.3
new file mode 100644 (file)
index 0000000..3f3aaa3
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_bus_creds_get_pid.3
diff --git a/man/sd_bus_creds_get_connection_name.html b/man/sd_bus_creds_get_connection_name.html
new file mode 100644 (file)
index 0000000..1dbfa7a
--- /dev/null
@@ -0,0 +1,135 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_bus_creds_get_pid</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+    <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
+    <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
+    in which case it will describe the specified process, or it may be
+    created by
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
+    in which case it will describe the process at the other endpoint
+    of a connection.
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
+    retrieve the time since the start of the epoch in microseconds
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
+    comm field (truncated name of the executable, as stored in
+    <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
+    the comm field of the thread (as stored in
+    <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
+    path to the program (as stored in the
+    <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
+    link, but with "<code class="literal"> (deleted)</code>" suffix removed).
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
+    an array of command-line arguments (as stored in
+    <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
+    the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
+    systemd unit name (in the system instance of systemd) that the
+    process is part of. See
+    <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
+    retrieve the systemd unit name (in the user instance of systemd)
+    that the process is part of. See
+    <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
+    the systemd slice (a unit in the system instance of systemd) that
+    the process is part of. See
+    <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
+    the logind session that the process is part of. See
+    <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
+    the numeric UID (user identifier) of the user who owns the slice
+    that the process is part of. See
+    <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+    .
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
+    check whether the capability specified by
+    <em class="parameter"><code>capability</code></em> was set in the effective
+    capabilities mask. A positive return value means that is was
+    set, zero means that it was not set, and a negative return
+    value signifies an error. See
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    and <code class="varname">Capabilities=</code> and
+    <code class="varname">CapabilityBoundingSet=</code> settings in
+    <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
+    retrieve the audit user login identifier (the identifier of the
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
+    retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
+    retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
+    char**</code></em> parameter will store the answer there as an
+    address of a NUL-terminated string. It will be valid as long as
+    <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
+    modified by the caller.</p><p>All functions that take a <em class="parameter"><code>char***</code></em>
+    parameter will store the answer there as an address of a an array
+    of strings. Each invidividual string is NUL-terminated, and the
+    array is NULL-terminated as a whole. It will be valid as long as
+    <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    failure, these calls return a negative errno-style error code.
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
+        part of a systemd system unit, systemd user unit, systemd
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
+        <code class="filename">libsystemd</code> might be out of sync with
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+    described here are available as a shared library, which can be
+    compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
+    </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index b5a8a645f199d4dbc676ae2a155882a67b0a03b6..dcf8c0c6a2e2a8dc51994aedcce2b06667a2063a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
       <code class="constant">SD_BUS_CREDS_PID</code>,
       <code class="constant">SD_BUS_CREDS_PID_STARTTIME</code>,
       <code class="constant">SD_BUS_CREDS_TID</code>,
@@ -45,7 +45,7 @@
       <code class="constant">SD_BUS_CREDS_UNIQUE_NAME</code>,
       <code class="constant">SD_BUS_CREDS_WELL_KNOWN_NAMES</code>,
       <code class="constant">_SD_BUS_CREDS_ALL</code>
-    </p></div><div class="refsect1"><a name="idm214194089696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
+    </p></div><div class="refsect1"><a name="idm214184886352"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
     credentials object and fills it with information about the process
     <em class="parameter"><code>pid</code></em>. This pointer to this object will
     be stored in <em class="parameter"><code>ret</code></em> pointer.</p><p>The information that will be stored is determined by
@@ -78,7 +78,7 @@
     all known fields.</p><p>Fields can be retrieved from the credentials object using
     <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>
     and other functions which correspond directly to the constants
-    listed above.</p><p>A mask of fields which were actually sucessfully set
+    listed above.</p><p>A mask of fields which were actually successfully set
     (acquired from <code class="filename">/proc</code>, etc.) can be retrieved
     with <code class="function">sd_bus_creds_get_mask()</code>. If the
     credentials object was created with
     object will not be destroyed until
     <code class="function">sd_bus_creds_unref</code> has been called as many
     times plus once more. Once the reference count has dropped to zero,
-    <em class="parameter"><code>c</code></em> cannot be used anymore, so futher
+    <em class="parameter"><code>c</code></em> cannot be used anymore, so further
     calls to <code class="function">sd_bus_creds_ref(c)</code> or
     <code class="function">sd_bus_creds_unref(c)</code> are illegal.</p><p><code class="function">sd_bus_creds_unref</code> destroys a reference
-    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214195301216"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
+    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214184853184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
     returns 0 or a positive integer. On failure, it returns a negative
     errno-style error code.</p><p><code class="function">sd_bus_creds_get_mask()</code> returns the
     mask of successfully acquired fields.</p><p><code class="function">sd_bus_creds_ref</code> always returns the
     argument.</p><p><code class="function">sd_bus_creds_unref</code> always returns
-    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214195571728"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214179878608"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
     creates a new object and the caller owns the sole reference. When
     not needed anymore, this reference should be destroyed with
     <a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a>.
-    </p></div><div class="refsect1"><a name="idm214194091024"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="varname">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
-        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    </p></div><div class="refsect1"><a name="idm214179875904"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="constant">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
+        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194042464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179869136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
     available as a shared library, which can be compiled and linked to
     with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214195915504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214179865984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a>,
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index 669f0024e2d7fb18ab5da6175380971cb1f4c524..ecd60773ef70a6170ad10ee4c4df70ea1f367726 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_CREDS_GET_PID" "3" "" "systemd 215" "sd_bus_creds_get_pid"
+.TH "SD_BUS_CREDS_GET_PID" "3" "" "systemd 217" "sd_bus_creds_get_pid"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -20,7 +20,7 @@
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
 .SH "NAME"
-sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names \- Retrieve fields from a credentials object
+sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name \- Retrieve fields from a credentials object
 .SH "SYNOPSIS"
 .sp
 .ft B
@@ -76,73 +76,75 @@ sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_b
 .BI "int sd_bus_creds_get_unique_name(sd_bus_creds\ *" "c" ", const\ char\ **" "name" ");"
 .HP \w'int\ sd_bus_creds_get_well_known_names('u
 .BI "int sd_bus_creds_get_well_known_names(sd_bus_creds\ *" "c" ", char\ ***" "name" ");"
+.HP \w'int\ sd_bus_creds_get_connection_name('u
+.BI "int sd_bus_creds_get_connection_name(sd_bus_creds\ *" "c" ", const\ char\ **" "name" ");"
 .SH "DESCRIPTION"
 .PP
 These functions return information from an
 \fIsd_bus_creds\fR
 object\&. It may be created with
 \fBsd_bus_creds_new_from_pid\fR(3), in which case it will describe the specified process, or it may be created by
-\fBsd_bus_get_peer_creds\fR(3), in which case it will describe the process at the other endpoint of a connection\&.
+\fBsd_bus_get_owner_creds\fR(3), in which case it will describe the process at the other endpoint of a connection\&.
 .PP
-\fBsd_bus_creds_get_pid\fR
+\fBsd_bus_creds_get_pid()\fR
 will retrieve the PID (process identifier)\&.
 .PP
-\fBsd_bus_creds_get_pid_starttime\fR
+\fBsd_bus_creds_get_pid_starttime()\fR
 will retrieve the time since the start of the epoch in microseconds since the process was started\&.
 .PP
-\fBsd_bus_creds_get_tid\fR
+\fBsd_bus_creds_get_tid()\fR
 will retrieve the TID (thread identifier)\&.
 .PP
-\fBsd_bus_creds_get_uid\fR
+\fBsd_bus_creds_get_uid()\fR
 will retrieve the numeric UID (user identifier)\&.
 .PP
-\fBsd_bus_creds_get_gid\fR
+\fBsd_bus_creds_get_gid()\fR
 will retrieve the numeric GID (group identifier)\&.
 .PP
-\fBsd_bus_creds_get_comm\fR
+\fBsd_bus_creds_get_comm()\fR
 will retrieve the comm field (truncated name of the executable, as stored in
 /proc/\fIpid\fR/comm)\&.
 .PP
-\fBsd_bus_creds_get_tid_comm\fR
+\fBsd_bus_creds_get_tid_comm()\fR
 will retrieve the comm field of the thread (as stored in
 /proc/\fIpid\fR/task/\fItid\fR/comm)\&.
 .PP
-\fBsd_bus_creds_get_exe\fR
+\fBsd_bus_creds_get_exe()\fR
 will retrieve the path to the program (as stored in the
 /proc/\fIpid\fR/exe
 link, but with
 " (deleted)"
 suffix removed)\&.
 .PP
-\fBsd_bus_creds_get_cmdline\fR
+\fBsd_bus_creds_get_cmdline()\fR
 will retrieve an array of command\-line arguments (as stored in
 /proc/\fIpid\fR/cmdline)\&.
 .PP
-\fBsd_bus_creds_get_cgroup\fR
+\fBsd_bus_creds_get_cgroup()\fR
 will retrieve the cgroup path\&. See
 \m[blue]\fBcgroups\&.txt\fR\m[]\&\s-2\u[1]\d\s+2\&.
 .PP
-\fBsd_bus_creds_get_unit\fR
+\fBsd_bus_creds_get_unit()\fR
 will retrieve the systemd unit name (in the system instance of systemd) that the process is part of\&. See
 \fBsystemd.unit\fR(5)\&.
 .PP
-\fBsd_bus_creds_get_user_unit\fR
+\fBsd_bus_creds_get_user_unit()\fR
 will retrieve the systemd unit name (in the user instance of systemd) that the process is part of\&. See
 \fBsystemd.unit\fR(5)\&.
 .PP
-\fBsd_bus_creds_get_slice\fR
+\fBsd_bus_creds_get_slice()\fR
 will retrieve the systemd slice (a unit in the system instance of systemd) that the process is part of\&. See
 \fBsystemd.slice\fR(5)\&.
 .PP
-\fBsd_bus_creds_get_session\fR
+\fBsd_bus_creds_get_session()\fR
 will retrieve the logind session that the process is part of\&. See
 \fBsystemd-logind.service\fR(8)\&.
 .PP
-\fBsd_bus_creds_get_owner_uid\fR
+\fBsd_bus_creds_get_owner_uid()\fR
 will retrieve the numeric UID (user identifier) of the user who owns the slice that the process is part of\&. See
 \fBsystemd.slice\fR(5)\&.
 .PP
-\fBsd_bus_creds_has_effective_cap\fR
+\fBsd_bus_creds_has_effective_cap()\fR
 will check whether the capability specified by
 \fIcapability\fR
 was set in the effective capabilities mask\&. A positive return value means that is was set, zero means that it was not set, and a negative return value signifies an error\&. See
@@ -154,35 +156,40 @@ and
 settings in
 \fBsystemd.exec\fR(5)\&.
 .PP
-\fBsd_bus_creds_has_permitted_cap\fR
+\fBsd_bus_creds_has_permitted_cap()\fR
 is similar to
-\fBsd_bus_creds_has_effective_cap\fR, but will check the permitted capabilities mask\&.
+\fBsd_bus_creds_has_effective_cap()\fR, but will check the permitted capabilities mask\&.
 .PP
-\fBsd_bus_creds_has_inheritable_cap\fR
+\fBsd_bus_creds_has_inheritable_cap()\fR
 is similar to
-\fBsd_bus_creds_has_effective_cap\fR, but will check the inheritable capabilities mask\&.
+\fBsd_bus_creds_has_effective_cap()\fR, but will check the inheritable capabilities mask\&.
 .PP
-\fBsd_bus_creds_has_bounding_cap\fR
+\fBsd_bus_creds_has_bounding_cap()\fR
 is similar to
-\fBsd_bus_creds_has_effective_cap\fR, but will check the bounding capabilities mask\&.
+\fBsd_bus_creds_has_effective_cap()\fR, but will check the bounding capabilities mask\&.
 .PP
-\fBsd_bus_creds_get_selinux_context\fR
+\fBsd_bus_creds_get_selinux_context()\fR
 will retrieve the SELinux security context (label) of the process\&.
 .PP
-\fBsd_bus_creds_get_audit_session_id\fR
+\fBsd_bus_creds_get_audit_session_id()\fR
 will retrieve the audit session identifier of the process\&.
 .PP
-\fBsd_bus_creds_get_audit_login_uid\fR
+\fBsd_bus_creds_get_audit_login_uid()\fR
 will retrieve the audit user login identifier (the identifier of the user who is "responsible" for the session)\&.
 .PP
-\fBsd_bus_creds_get_unique_name\fR
+\fBsd_bus_creds_get_unique_name()\fR
 will retrieve the D\-Bus unique name\&. See
 \m[blue]\fBThe D\-Bus specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
 .PP
-\fBsd_bus_creds_get_well_known_names\fR
+\fBsd_bus_creds_get_well_known_names()\fR
 will retrieve the set of D\-Bus well\-known names\&. See
 \m[blue]\fBThe D\-Bus specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
 .PP
+\fBsd_bus_creds_get_connection_name()\fR
+will retrieve a descriptive name of the bus connection of the peer\&. This name is useful to discern multiple bus connections by the same peer, and may be altered by the peer with the
+\fBsd_bus_set_name()\fR(3)
+call\&.
+.PP
 All functions that take a
 \fIconst char**\fR
 parameter will store the answer there as an address of a NUL\-terminated string\&. It will be valid as long as
@@ -201,37 +208,37 @@ On success, these calls return 0 or a positive integer\&. On failure, these call
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-ENODATA\fR
+\fB\-ENODATA\fR
 .RS 4
 Given field is not available in
 \fIc\fR\&.
 .RE
 .PP
-\fI\-ENOENT\fR
+\fB\-ENOENT\fR
 .RS 4
 Given field is not specified for the sender\&. This will be returned by
-\fBsd_bus_get_unit\fR,
-\fBsd_bus_get_user_unit\fR,
-\fBsd_bus_get_slice\fR,
-\fBsd_bus_get_session\fR, and
-\fBsd_bus_get_owner_uid\fR
+\fBsd_bus_get_unit()\fR,
+\fBsd_bus_get_user_unit()\fR,
+\fBsd_bus_get_slice()\fR,
+\fBsd_bus_get_session()\fR, and
+\fBsd_bus_get_name_creds_uid()\fR
 if the sender is not part of a systemd system unit, systemd user unit, systemd slice, logind session, or a systemd user session\&.
 .RE
 .PP
-\fI\-ENXIO\fR
+\fB\-ENXIO\fR
 .RS 4
-An error occured in parsing cgroup paths\&.
+An error occurred in parsing cgroup paths\&.
 libsystemd
 might be out of sync with the running systemd version\&.
 .RE
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified pointer parameter is
 \fBNULL\fR\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
@@ -245,9 +252,9 @@ file\&.
 .PP
 \fBsystemd\fR(1),
 \fBsd-bus\fR(3),
-\fBcredentials\fR(7),
 \fBfork\fR(2),
 \fBexecve\fR(2),
+\fBcredentials\fR(7),
 \fBfree\fR(3),
 \fBproc\fR(5),
 \fBsystemd.journald-fields\fR(7)
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f84fbae35c4bd175da681d7ac0443a2617742353..23763bd6ae273a46dd2219959b11a2477e57e536 100644 (file)
@@ -67,6 +67,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <refname>sd_bus_creds_get_audit_login_uid</refname>
     <refname>sd_bus_creds_get_unique_name</refname>
     <refname>sd_bus_creds_get_well_known_names</refname>
+    <refname>sd_bus_creds_get_connection_name</refname>
 
     <refpurpose>Retrieve fields from a credentials object</refpurpose>
   </refnamediv>
@@ -219,6 +220,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
         <paramdef>char ***<parameter>name</parameter></paramdef>
       </funcprototype>
 
+      <funcprototype>
+        <funcdef>int <function>sd_bus_creds_get_connection_name</function></funcdef>
+        <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
+        <paramdef>const char **<parameter>name</parameter></paramdef>
+      </funcprototype>
+
     </funcsynopsis>
   </refsynopsisdiv>
 
@@ -230,77 +237,77 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     in which case it will describe the specified process, or it may be
     created by
-    <citerefentry><refentrytitle>sd_bus_get_peer_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+    <citerefentry><refentrytitle>sd_bus_get_owner_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     in which case it will describe the process at the other endpoint
     of a connection.
     </para>
 
-    <para><function>sd_bus_creds_get_pid</function> will retrieve the
+    <para><function>sd_bus_creds_get_pid()</function> will retrieve the
     PID (process identifier).</para>
 
-    <para><function>sd_bus_creds_get_pid_starttime</function> will
+    <para><function>sd_bus_creds_get_pid_starttime()</function> will
     retrieve the time since the start of the epoch in microseconds
     since the process was started.</para>
 
-    <para><function>sd_bus_creds_get_tid</function> will retrieve the
+    <para><function>sd_bus_creds_get_tid()</function> will retrieve the
     TID (thread identifier).</para>
 
-    <para><function>sd_bus_creds_get_uid</function> will retrieve the
+    <para><function>sd_bus_creds_get_uid()</function> will retrieve the
     numeric UID (user identifier).</para>
 
-    <para><function>sd_bus_creds_get_gid</function> will retrieve the
+    <para><function>sd_bus_creds_get_gid()</function> will retrieve the
     numeric GID (group identifier).</para>
 
-    <para><function>sd_bus_creds_get_comm</function> will retrieve the
+    <para><function>sd_bus_creds_get_comm()</function> will retrieve the
     comm field (truncated name of the executable, as stored in
     <filename>/proc/<replaceable>pid</replaceable>/comm</filename>).
     </para>
 
-    <para><function>sd_bus_creds_get_tid_comm</function> will retrieve
+    <para><function>sd_bus_creds_get_tid_comm()</function> will retrieve
     the comm field of the thread (as stored in
     <filename>/proc/<replaceable>pid</replaceable>/task/<replaceable>tid</replaceable>/comm</filename>).
     </para>
 
-    <para><function>sd_bus_creds_get_exe</function> will retrieve the
+    <para><function>sd_bus_creds_get_exe()</function> will retrieve the
     path to the program (as stored in the
     <filename>/proc/<replaceable>pid</replaceable>/exe</filename>
     link, but with <literal> (deleted)</literal> suffix removed).
     </para>
 
-    <para><function>sd_bus_creds_get_cmdline</function> will retrieve
+    <para><function>sd_bus_creds_get_cmdline()</function> will retrieve
     an array of command-line arguments (as stored in
     <filename>/proc/<replaceable>pid</replaceable>/cmdline</filename>).
     </para>
 
-    <para><function>sd_bus_creds_get_cgroup</function> will retrieve
+    <para><function>sd_bus_creds_get_cgroup()</function> will retrieve
     the cgroup path. See <ulink
     url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>.
     </para>
 
-    <para><function>sd_bus_creds_get_unit</function> will retrieve the
+    <para><function>sd_bus_creds_get_unit()</function> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
     </para>
 
-    <para><function>sd_bus_creds_get_user_unit</function> will
+    <para><function>sd_bus_creds_get_user_unit()</function> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
     </para>
 
-    <para><function>sd_bus_creds_get_slice</function> will retrieve
+    <para><function>sd_bus_creds_get_slice()</function> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
     </para>
 
-    <para><function>sd_bus_creds_get_session</function> will retrieve
+    <para><function>sd_bus_creds_get_session()</function> will retrieve
     the logind session that the process is part of. See
     <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
     </para>
 
-    <para><function>sd_bus_creds_get_owner_uid</function> will retrieve
+    <para><function>sd_bus_creds_get_owner_uid()</function> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>
@@ -308,50 +315,57 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <citerefentry><refentrytitle>systemd-user-sessions.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -->.
     </para>
 
-    <para><function>sd_bus_creds_has_effective_cap</function> will
+    <para><function>sd_bus_creds_has_effective_cap()</function> will
     check whether the capability specified by
     <parameter>capability</parameter> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+    <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
     and <varname>Capabilities=</varname> and
     <varname>CapabilityBoundingSet=</varname> settings in
     <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
     </para>
 
-    <para><function>sd_bus_creds_has_permitted_cap</function> is
-    similar to <function>sd_bus_creds_has_effective_cap</function>,
+    <para><function>sd_bus_creds_has_permitted_cap()</function> is
+    similar to <function>sd_bus_creds_has_effective_cap()</function>,
     but will check the permitted capabilities mask.</para>
 
-    <para><function>sd_bus_creds_has_inheritable_cap</function> is
-    similar to <function>sd_bus_creds_has_effective_cap</function>,
+    <para><function>sd_bus_creds_has_inheritable_cap()</function> is
+    similar to <function>sd_bus_creds_has_effective_cap()</function>,
     but will check the inheritable capabilities mask.</para>
 
-    <para><function>sd_bus_creds_has_bounding_cap</function> is
-    similar to <function>sd_bus_creds_has_effective_cap</function>,
+    <para><function>sd_bus_creds_has_bounding_cap()</function> is
+    similar to <function>sd_bus_creds_has_effective_cap()</function>,
     but will check the bounding capabilities mask.</para>
 
-    <para><function>sd_bus_creds_get_selinux_context</function> will
+    <para><function>sd_bus_creds_get_selinux_context()</function> will
     retrieve the SELinux security context (label) of the process.</para>
 
-    <para><function>sd_bus_creds_get_audit_session_id</function> will
+    <para><function>sd_bus_creds_get_audit_session_id()</function> will
     retrieve the audit session identifier of the process.</para>
 
-    <para><function>sd_bus_creds_get_audit_login_uid</function> will
+    <para><function>sd_bus_creds_get_audit_login_uid()</function> will
     retrieve the audit user login identifier (the identifier of the
     user who is "responsible" for the session).</para>
 
-    <para><function>sd_bus_creds_get_unique_name</function> will
+    <para><function>sd_bus_creds_get_unique_name()</function> will
     retrieve the D-Bus unique name. See <ulink
     url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus">The
     D-Bus specification</ulink>.</para>
 
-    <para><function>sd_bus_creds_get_well_known_names</function> will
+    <para><function>sd_bus_creds_get_well_known_names()</function> will
     retrieve the set of D-Bus well-known names. See <ulink
     url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus">The
     D-Bus specification</ulink>.</para>
 
+    <para><function>sd_bus_creds_get_connection_name()</function> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <citerefentry><refentrytitle>sd_bus_set_name()</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    call.</para>
+
     <para>All functions that take a <parameter>const
     char**</parameter> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
@@ -381,7 +395,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <variablelist>
       <varlistentry>
-        <term><varname>-ENODATA</varname></term>
+        <term><constant>-ENODATA</constant></term>
 
         <listitem><para>Given field is not available in
         <parameter>c</parameter>.</para>
@@ -389,36 +403,36 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENOENT</varname></term>
+        <term><constant>-ENOENT</constant></term>
 
         <listitem><para>Given field is not specified for the sender.
-        This will be returned by <function>sd_bus_get_unit</function>,
-        <function>sd_bus_get_user_unit</function>,
-        <function>sd_bus_get_slice</function>,
-        <function>sd_bus_get_session</function>, and
-        <function>sd_bus_get_owner_uid</function> if the sender is not
+        This will be returned by <function>sd_bus_get_unit()</function>,
+        <function>sd_bus_get_user_unit()</function>,
+        <function>sd_bus_get_slice()</function>,
+        <function>sd_bus_get_session()</function>, and
+        <function>sd_bus_get_name_creds_uid()</function> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
         slice, logind session, or a systemd user session.</para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENXIO</varname></term>
+        <term><constant>-ENXIO</constant></term>
 
-        <listitem><para>An error occured in parsing cgroup paths.
+        <listitem><para>An error occurred in parsing cgroup paths.
         <filename>libsystemd</filename> might be out of sync with
         the running systemd version.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-EINVAL</varname></term>
+        <term><constant>-EINVAL</constant></term>
 
         <listitem><para>Specified pointer parameter is <constant>NULL</constant>.
         </para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
         <listitem><para>Memory allocation failed.</para></listitem>
       </varlistentry>
@@ -431,7 +445,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_open_user()</function> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
@@ -441,11 +455,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd.journald-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
     </para>
   </refsect1>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index f9e3ba706bb0e6c41ca884ddb153b37772245621..1dbfa7aec7592b83244181af72e0709f027556fd 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195952656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_get_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_get_pid, sd_bus_creds_get_pid_starttime, sd_bus_creds_get_tid, sd_bus_creds_get_uid, sd_bus_creds_get_gid, sd_bus_creds_get_comm, sd_bus_creds_get_tid_comm, sd_bus_creds_get_exe, sd_bus_creds_get_cmdline, sd_bus_creds_get_cgroup, sd_bus_creds_get_unit, sd_bus_creds_get_user_unit, sd_bus_creds_get_slice, sd_bus_creds_get_session, sd_bus_creds_get_owner_uid, sd_bus_creds_has_effective_cap, sd_bus_creds_has_permitted_cap, sd_bus_creds_has_inheritable_cap, sd_bus_creds_has_bounding_cap, sd_bus_creds_get_selinux_context, sd_bus_creds_get_audit_session_id, sd_bus_creds_get_audit_login_uid, sd_bus_creds_get_unique_name, sd_bus_creds_get_well_known_names, sd_bus_creds_get_connection_name — Retrieve fields from a credentials object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid_starttime</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">tid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_pid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_gid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>gid_t *<var class="pdparam">gid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_tid_comm</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">comm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_exe</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">exe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cmdline</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">cmdline</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_cgroup</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">cgroup</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_user_unit</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_slice</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_session</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_owner_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_effective_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_permitted_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_inheritable_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_has_bounding_cap</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">capability</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_selinux_context</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">context</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_session_id</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uint32_t *<var class="pdparam">sessionid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_audit_login_uid</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">loginuid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_unique_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_well_known_names</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_get_connection_name</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177346544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>These functions return information from an
     <em class="parameter"><code>sd_bus_creds</code></em> object. It may be created with
     <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>,
     in which case it will describe the specified process, or it may be
     created by
-    <a href="sd_bus_get_peer_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_peer_creds</span>(3)</span></a>,
+    <a href="sd_bus_get_owner_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_get_owner_creds</span>(3)</span></a>,
     in which case it will describe the process at the other endpoint
     of a connection.
-    </p><p><code class="function">sd_bus_creds_get_pid</code> will retrieve the
-    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime</code> will
+    </p><p><code class="function">sd_bus_creds_get_pid()</code> will retrieve the
+    PID (process identifier).</p><p><code class="function">sd_bus_creds_get_pid_starttime()</code> will
     retrieve the time since the start of the epoch in microseconds
-    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid</code> will retrieve the
-    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid</code> will retrieve the
-    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid</code> will retrieve the
-    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm</code> will retrieve the
+    since the process was started.</p><p><code class="function">sd_bus_creds_get_tid()</code> will retrieve the
+    TID (thread identifier).</p><p><code class="function">sd_bus_creds_get_uid()</code> will retrieve the
+    numeric UID (user identifier).</p><p><code class="function">sd_bus_creds_get_gid()</code> will retrieve the
+    numeric GID (group identifier).</p><p><code class="function">sd_bus_creds_get_comm()</code> will retrieve the
     comm field (truncated name of the executable, as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_tid_comm</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_tid_comm()</code> will retrieve
     the comm field of the thread (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/task/<em class="replaceable"><code>tid</code></em>/comm</code>).
-    </p><p><code class="function">sd_bus_creds_get_exe</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_exe()</code> will retrieve the
     path to the program (as stored in the
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/exe</code>
     link, but with "<code class="literal"> (deleted)</code>" suffix removed).
-    </p><p><code class="function">sd_bus_creds_get_cmdline</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cmdline()</code> will retrieve
     an array of command-line arguments (as stored in
     <code class="filename">/proc/<em class="replaceable"><code>pid</code></em>/cmdline</code>).
-    </p><p><code class="function">sd_bus_creds_get_cgroup</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_cgroup()</code> will retrieve
     the cgroup path. See <a class="ulink" href="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt" target="_top">cgroups.txt</a>.
-    </p><p><code class="function">sd_bus_creds_get_unit</code> will retrieve the
+    </p><p><code class="function">sd_bus_creds_get_unit()</code> will retrieve the
     systemd unit name (in the system instance of systemd) that the
     process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_user_unit</code> will
+    </p><p><code class="function">sd_bus_creds_get_user_unit()</code> will
     retrieve the systemd unit name (in the user instance of systemd)
     that the process is part of. See
     <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_slice</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_slice()</code> will retrieve
     the systemd slice (a unit in the system instance of systemd) that
     the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_session</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_session()</code> will retrieve
     the logind session that the process is part of. See
     <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.
-    </p><p><code class="function">sd_bus_creds_get_owner_uid</code> will retrieve
+    </p><p><code class="function">sd_bus_creds_get_owner_uid()</code> will retrieve
     the numeric UID (user identifier) of the user who owns the slice
     that the process is part of. See
     <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
     .
-    </p><p><code class="function">sd_bus_creds_has_effective_cap</code> will
+    </p><p><code class="function">sd_bus_creds_has_effective_cap()</code> will
     check whether the capability specified by
     <em class="parameter"><code>capability</code></em> was set in the effective
     capabilities mask. A positive return value means that is was
     set, zero means that it was not set, and a negative return
     value signifies an error. See
-    <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+    <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
     and <code class="varname">Capabilities=</code> and
     <code class="varname">CapabilityBoundingSet=</code> settings in
     <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>.
-    </p><p><code class="function">sd_bus_creds_has_permitted_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap</code> is
-    similar to <code class="function">sd_bus_creds_has_effective_cap</code>,
-    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context</code> will
-    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id</code> will
-    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid</code> will
+    </p><p><code class="function">sd_bus_creds_has_permitted_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the permitted capabilities mask.</p><p><code class="function">sd_bus_creds_has_inheritable_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the inheritable capabilities mask.</p><p><code class="function">sd_bus_creds_has_bounding_cap()</code> is
+    similar to <code class="function">sd_bus_creds_has_effective_cap()</code>,
+    but will check the bounding capabilities mask.</p><p><code class="function">sd_bus_creds_get_selinux_context()</code> will
+    retrieve the SELinux security context (label) of the process.</p><p><code class="function">sd_bus_creds_get_audit_session_id()</code> will
+    retrieve the audit session identifier of the process.</p><p><code class="function">sd_bus_creds_get_audit_login_uid()</code> will
     retrieve the audit user login identifier (the identifier of the
-    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name</code> will
+    user who is "responsible" for the session).</p><p><code class="function">sd_bus_creds_get_unique_name()</code> will
     retrieve the D-Bus unique name. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names</code> will
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_well_known_names()</code> will
     retrieve the set of D-Bus well-known names. See <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus" target="_top">The
-    D-Bus specification</a>.</p><p>All functions that take a <em class="parameter"><code>const
+    D-Bus specification</a>.</p><p><code class="function">sd_bus_creds_get_connection_name()</code> will
+    retrieve a descriptive name of the bus connection of the
+    peer. This name is useful to discern multiple bus connections by
+    the same peer, and may be altered by the peer with the
+    <a href="sd_bus_set_name().html"><span class="citerefentry"><span class="refentrytitle">sd_bus_set_name()</span>(3)</span></a>
+    call.</p><p>All functions that take a <em class="parameter"><code>const
     char**</code></em> parameter will store the answer there as an
     address of a NUL-terminated string. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
     of strings. Each invidividual string is NUL-terminated, and the
     array is NULL-terminated as a whole. It will be valid as long as
     <em class="parameter"><code>c</code></em> remains valid, and should not be freed or
-    modified by the caller.</p></div><div class="refsect1"><a name="idm214195728128"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    modified by the caller.</p></div><div class="refsect1"><a name="idm214177299008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
     failure, these calls return a negative errno-style error code.
-    </p></div><div class="refsect1"><a name="idm214195726800"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
-        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
-        This will be returned by <code class="function">sd_bus_get_unit</code>,
-        <code class="function">sd_bus_get_user_unit</code>,
-        <code class="function">sd_bus_get_slice</code>,
-        <code class="function">sd_bus_get_session</code>, and
-        <code class="function">sd_bus_get_owner_uid</code> if the sender is not
+    </p></div><div class="refsect1"><a name="idm214177297712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>Given field is not available in
+        <em class="parameter"><code>c</code></em>.</p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p>Given field is not specified for the sender.
+        This will be returned by <code class="function">sd_bus_get_unit()</code>,
+        <code class="function">sd_bus_get_user_unit()</code>,
+        <code class="function">sd_bus_get_slice()</code>,
+        <code class="function">sd_bus_get_session()</code>, and
+        <code class="function">sd_bus_get_name_creds_uid()</code> if the sender is not
         part of a systemd system unit, systemd user unit, systemd
-        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occured in parsing cgroup paths.
+        slice, logind session, or a systemd user session.</p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>An error occurred in parsing cgroup paths.
         <code class="filename">libsystemd</code> might be out of sync with
-        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199611568"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        the running systemd version.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified pointer parameter is <code class="constant">NULL</code>.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177283792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214199608400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214177280608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="credentials.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
-      <a href="fork.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
-      <a href="execve.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
-      <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/fork.2.html"><span class="citerefentry"><span class="refentrytitle">fork</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/execve.2.html"><span class="citerefentry"><span class="refentrytitle">execve</span>(2)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man7/credentials.7.html"><span class="citerefentry"><span class="refentrytitle">credentials</span>(7)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
       <a href="systemd.journald-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journald-fields</span>(7)</span></a>
     </p></div></div></body></html>
index 5460d1099edc40e4ebbfdf13596dffaeb9c7c1f7..170c436183403638a0c57cc73bc5b3ccb2fbdf6b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_CREDS_NEW_FROM_PID" "3" "" "systemd 215" "sd_bus_creds_new_from_pid"
+.TH "SD_BUS_CREDS_NEW_FROM_PID" "3" "" "systemd 217" "sd_bus_creds_new_from_pid"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -103,7 +103,7 @@ Fields can be retrieved from the credentials object using
 \fBsd_bus_creds_get_pid\fR(3)
 and other functions which correspond directly to the constants listed above\&.
 .PP
-A mask of fields which were actually sucessfully set (acquired from
+A mask of fields which were actually successfully set (acquired from
 /proc, etc\&.) can be retrieved with
 \fBsd_bus_creds_get_mask()\fR\&. If the credentials object was created with
 \fBsd_bus_creds_new_from_pid()\fR, this will be a subset of fields requested in
@@ -115,7 +115,7 @@ creates a new reference to the credentials object
 \fBsd_bus_creds_unref\fR
 has been called as many times plus once more\&. Once the reference count has dropped to zero,
 \fIc\fR
-cannot be used anymore, so futher calls to
+cannot be used anymore, so further calls to
 \fBsd_bus_creds_ref(c)\fR
 or
 \fBsd_bus_creds_unref(c)\fR
@@ -149,20 +149,20 @@ creates a new object and the caller owns the sole reference\&. When not needed a
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-ESRCH\fR
+\fB\-ESRCH\fR
 .RS 4
 Specified
 \fIpid\fR
 could not be found\&.
 .RE
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified parameter is invalid (\fBNULL\fR
 in case of output parameters)\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index b5a8a645f199d4dbc676ae2a155882a67b0a03b6..dcf8c0c6a2e2a8dc51994aedcce2b06667a2063a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
       <code class="constant">SD_BUS_CREDS_PID</code>,
       <code class="constant">SD_BUS_CREDS_PID_STARTTIME</code>,
       <code class="constant">SD_BUS_CREDS_TID</code>,
@@ -45,7 +45,7 @@
       <code class="constant">SD_BUS_CREDS_UNIQUE_NAME</code>,
       <code class="constant">SD_BUS_CREDS_WELL_KNOWN_NAMES</code>,
       <code class="constant">_SD_BUS_CREDS_ALL</code>
-    </p></div><div class="refsect1"><a name="idm214194089696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
+    </p></div><div class="refsect1"><a name="idm214184886352"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
     credentials object and fills it with information about the process
     <em class="parameter"><code>pid</code></em>. This pointer to this object will
     be stored in <em class="parameter"><code>ret</code></em> pointer.</p><p>The information that will be stored is determined by
@@ -78,7 +78,7 @@
     all known fields.</p><p>Fields can be retrieved from the credentials object using
     <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>
     and other functions which correspond directly to the constants
-    listed above.</p><p>A mask of fields which were actually sucessfully set
+    listed above.</p><p>A mask of fields which were actually successfully set
     (acquired from <code class="filename">/proc</code>, etc.) can be retrieved
     with <code class="function">sd_bus_creds_get_mask()</code>. If the
     credentials object was created with
     object will not be destroyed until
     <code class="function">sd_bus_creds_unref</code> has been called as many
     times plus once more. Once the reference count has dropped to zero,
-    <em class="parameter"><code>c</code></em> cannot be used anymore, so futher
+    <em class="parameter"><code>c</code></em> cannot be used anymore, so further
     calls to <code class="function">sd_bus_creds_ref(c)</code> or
     <code class="function">sd_bus_creds_unref(c)</code> are illegal.</p><p><code class="function">sd_bus_creds_unref</code> destroys a reference
-    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214195301216"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
+    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214184853184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
     returns 0 or a positive integer. On failure, it returns a negative
     errno-style error code.</p><p><code class="function">sd_bus_creds_get_mask()</code> returns the
     mask of successfully acquired fields.</p><p><code class="function">sd_bus_creds_ref</code> always returns the
     argument.</p><p><code class="function">sd_bus_creds_unref</code> always returns
-    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214195571728"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214179878608"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
     creates a new object and the caller owns the sole reference. When
     not needed anymore, this reference should be destroyed with
     <a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a>.
-    </p></div><div class="refsect1"><a name="idm214194091024"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="varname">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
-        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    </p></div><div class="refsect1"><a name="idm214179875904"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="constant">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
+        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194042464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179869136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
     available as a shared library, which can be compiled and linked to
     with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214195915504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214179865984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a>,
index 64b92e233094557f5ef97abf14e5d8c8749fdad2..f3ea1defe12a65849d430457175b0b98fdab3b2a 100644 (file)
@@ -149,7 +149,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     and other functions which correspond directly to the constants
     listed above.</para>
 
-    <para>A mask of fields which were actually sucessfully set
+    <para>A mask of fields which were actually successfully set
     (acquired from <filename>/proc</filename>, etc.) can be retrieved
     with <function>sd_bus_creds_get_mask()</function>. If the
     credentials object was created with
@@ -162,7 +162,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     object will not be destroyed until
     <function>sd_bus_creds_unref</function> has been called as many
     times plus once more. Once the reference count has dropped to zero,
-    <parameter>c</parameter> cannot be used anymore, so futher
+    <parameter>c</parameter> cannot be used anymore, so further
     calls to <function>sd_bus_creds_ref(c)</function> or
     <function>sd_bus_creds_unref(c)</function> are illegal.</para>
 
@@ -205,14 +205,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <variablelist>
 
       <varlistentry>
-        <term><varname>-ESRCH</varname></term>
+        <term><constant>-ESRCH</constant></term>
 
         <listitem><para>Specified <parameter>pid</parameter> could not
         be found.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-EINVAL</varname></term>
+        <term><constant>-EINVAL</constant></term>
 
         <listitem><para>Specified parameter is invalid
         (<constant>NULL</constant> in case of output
@@ -220,7 +220,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
         <listitem><para>Memory allocation failed.</para></listitem>
       </varlistentry>
@@ -233,7 +233,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_creds_new_from_pid()</function> is
     available as a shared library, which can be compiled and linked to
     with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index b5a8a645f199d4dbc676ae2a155882a67b0a03b6..dcf8c0c6a2e2a8dc51994aedcce2b06667a2063a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
       <code class="constant">SD_BUS_CREDS_PID</code>,
       <code class="constant">SD_BUS_CREDS_PID_STARTTIME</code>,
       <code class="constant">SD_BUS_CREDS_TID</code>,
@@ -45,7 +45,7 @@
       <code class="constant">SD_BUS_CREDS_UNIQUE_NAME</code>,
       <code class="constant">SD_BUS_CREDS_WELL_KNOWN_NAMES</code>,
       <code class="constant">_SD_BUS_CREDS_ALL</code>
-    </p></div><div class="refsect1"><a name="idm214194089696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
+    </p></div><div class="refsect1"><a name="idm214184886352"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
     credentials object and fills it with information about the process
     <em class="parameter"><code>pid</code></em>. This pointer to this object will
     be stored in <em class="parameter"><code>ret</code></em> pointer.</p><p>The information that will be stored is determined by
@@ -78,7 +78,7 @@
     all known fields.</p><p>Fields can be retrieved from the credentials object using
     <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>
     and other functions which correspond directly to the constants
-    listed above.</p><p>A mask of fields which were actually sucessfully set
+    listed above.</p><p>A mask of fields which were actually successfully set
     (acquired from <code class="filename">/proc</code>, etc.) can be retrieved
     with <code class="function">sd_bus_creds_get_mask()</code>. If the
     credentials object was created with
     object will not be destroyed until
     <code class="function">sd_bus_creds_unref</code> has been called as many
     times plus once more. Once the reference count has dropped to zero,
-    <em class="parameter"><code>c</code></em> cannot be used anymore, so futher
+    <em class="parameter"><code>c</code></em> cannot be used anymore, so further
     calls to <code class="function">sd_bus_creds_ref(c)</code> or
     <code class="function">sd_bus_creds_unref(c)</code> are illegal.</p><p><code class="function">sd_bus_creds_unref</code> destroys a reference
-    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214195301216"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
+    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214184853184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
     returns 0 or a positive integer. On failure, it returns a negative
     errno-style error code.</p><p><code class="function">sd_bus_creds_get_mask()</code> returns the
     mask of successfully acquired fields.</p><p><code class="function">sd_bus_creds_ref</code> always returns the
     argument.</p><p><code class="function">sd_bus_creds_unref</code> always returns
-    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214195571728"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214179878608"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
     creates a new object and the caller owns the sole reference. When
     not needed anymore, this reference should be destroyed with
     <a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a>.
-    </p></div><div class="refsect1"><a name="idm214194091024"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="varname">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
-        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    </p></div><div class="refsect1"><a name="idm214179875904"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="constant">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
+        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194042464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179869136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
     available as a shared library, which can be compiled and linked to
     with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214195915504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214179865984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a>,
index b5a8a645f199d4dbc676ae2a155882a67b0a03b6..dcf8c0c6a2e2a8dc51994aedcce2b06667a2063a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_creds_new_from_pid"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_creds_new_from_pid, sd_bus_creds_get_mask, sd_bus_creds_ref, sd_bus_creds_unref — Retrieve credentials object for the specified PID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_creds_new_from_pid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">creds_mask</var>, </td></tr><tr><td> </td><td>sd_bus_creds **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">uint64_t <b class="fsfunc">sd_bus_creds_get_mask</b>(</code></td><td>const sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_ref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus_creds *<b class="fsfunc">sd_bus_creds_unref</b>(</code></td><td>sd_bus_creds *<var class="pdparam">c</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>
       <code class="constant">SD_BUS_CREDS_PID</code>,
       <code class="constant">SD_BUS_CREDS_PID_STARTTIME</code>,
       <code class="constant">SD_BUS_CREDS_TID</code>,
@@ -45,7 +45,7 @@
       <code class="constant">SD_BUS_CREDS_UNIQUE_NAME</code>,
       <code class="constant">SD_BUS_CREDS_WELL_KNOWN_NAMES</code>,
       <code class="constant">_SD_BUS_CREDS_ALL</code>
-    </p></div><div class="refsect1"><a name="idm214194089696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
+    </p></div><div class="refsect1"><a name="idm214184886352"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> creates a new
     credentials object and fills it with information about the process
     <em class="parameter"><code>pid</code></em>. This pointer to this object will
     be stored in <em class="parameter"><code>ret</code></em> pointer.</p><p>The information that will be stored is determined by
@@ -78,7 +78,7 @@
     all known fields.</p><p>Fields can be retrieved from the credentials object using
     <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>
     and other functions which correspond directly to the constants
-    listed above.</p><p>A mask of fields which were actually sucessfully set
+    listed above.</p><p>A mask of fields which were actually successfully set
     (acquired from <code class="filename">/proc</code>, etc.) can be retrieved
     with <code class="function">sd_bus_creds_get_mask()</code>. If the
     credentials object was created with
     object will not be destroyed until
     <code class="function">sd_bus_creds_unref</code> has been called as many
     times plus once more. Once the reference count has dropped to zero,
-    <em class="parameter"><code>c</code></em> cannot be used anymore, so futher
+    <em class="parameter"><code>c</code></em> cannot be used anymore, so further
     calls to <code class="function">sd_bus_creds_ref(c)</code> or
     <code class="function">sd_bus_creds_unref(c)</code> are illegal.</p><p><code class="function">sd_bus_creds_unref</code> destroys a reference
-    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214195301216"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
+    to <em class="parameter"><code>c</code></em>.</p></div><div class="refsect1"><a name="idm214184853184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_creds_new_from_pid()</code>
     returns 0 or a positive integer. On failure, it returns a negative
     errno-style error code.</p><p><code class="function">sd_bus_creds_get_mask()</code> returns the
     mask of successfully acquired fields.</p><p><code class="function">sd_bus_creds_ref</code> always returns the
     argument.</p><p><code class="function">sd_bus_creds_unref</code> always returns
-    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214195571728"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214179878608"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Function <code class="function">sd_bus_creds_new_from_pid()</code>
     creates a new object and the caller owns the sole reference. When
     not needed anymore, this reference should be destroyed with
     <a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a>.
-    </p></div><div class="refsect1"><a name="idm214194091024"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="varname">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
-        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    </p></div><div class="refsect1"><a name="idm214179875904"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ESRCH"><span class="term"><code class="constant">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>Specified <em class="parameter"><code>pid</code></em> could not
+        be found.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194042464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179869136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_creds_new_from_pid()</code> is
     available as a shared library, which can be compiled and linked to
     with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214195915504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214179865984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a>,
index 751aa00ecd6d15316a70d836ed753cddc162564e..eb22562e08d7c56ca8de5a51077145060ad52e54 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214201032336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194775536"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
     object and opens a connection to the user bus.
     <code class="function">sd_bus_open_system()</code> does the same, but
     connects to the system bus.</p><p>If the <code class="varname">$DBUS_SESSION_BUS_ADDRESS</code> environment
     variable is set
-    (cf. <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
+    (cf. <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
     it will be used as the address of the user bus. This variable can
     contain multiple addresses separated by "<code class="literal">;</code>". If
     this variable is not set, a suitable default for the default user
@@ -48,9 +48,9 @@
     <code class="function">sd_bus_default_user()</code>, and subsequent
     invocations returns a reference to the same object.</p><p><code class="function">sd_bus_default_system()</code> is similar to
     <code class="function">sd_bus_default_user()</code>, but connects to the
-    system bus.</p></div><div class="refsect1"><a name="idm214201008656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+    system bus.</p></div><div class="refsect1"><a name="idm214194751488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
     integer. On failure, these calls return a negative
-    errno-style error code.</p></div><div class="refsect1"><a name="idm214201007328"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214194750160"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
     <code class="function">sd_bus_open_system()</code>,
     <code class="function">sd_bus_open_system_remote()</code>, and
     <code class="function">sd_bus_open_system_machine()</code> return a new
     <a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a>.
     </p><p>The functions <code class="function">sd_bus_default_user()</code> and
     <code class="function">sd_bus_default_system()</code> do not create a new
-    reference.</p></div><div class="refsect1"><a name="idm214201000368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
-      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    reference.</p></div><div class="refsect1"><a name="idm214194743200"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
+      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200994176"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194737008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214200991008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214194733568"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
index 751aa00ecd6d15316a70d836ed753cddc162564e..eb22562e08d7c56ca8de5a51077145060ad52e54 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214201032336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194775536"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
     object and opens a connection to the user bus.
     <code class="function">sd_bus_open_system()</code> does the same, but
     connects to the system bus.</p><p>If the <code class="varname">$DBUS_SESSION_BUS_ADDRESS</code> environment
     variable is set
-    (cf. <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
+    (cf. <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
     it will be used as the address of the user bus. This variable can
     contain multiple addresses separated by "<code class="literal">;</code>". If
     this variable is not set, a suitable default for the default user
@@ -48,9 +48,9 @@
     <code class="function">sd_bus_default_user()</code>, and subsequent
     invocations returns a reference to the same object.</p><p><code class="function">sd_bus_default_system()</code> is similar to
     <code class="function">sd_bus_default_user()</code>, but connects to the
-    system bus.</p></div><div class="refsect1"><a name="idm214201008656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+    system bus.</p></div><div class="refsect1"><a name="idm214194751488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
     integer. On failure, these calls return a negative
-    errno-style error code.</p></div><div class="refsect1"><a name="idm214201007328"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214194750160"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
     <code class="function">sd_bus_open_system()</code>,
     <code class="function">sd_bus_open_system_remote()</code>, and
     <code class="function">sd_bus_open_system_machine()</code> return a new
     <a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a>.
     </p><p>The functions <code class="function">sd_bus_default_user()</code> and
     <code class="function">sd_bus_default_system()</code> do not create a new
-    reference.</p></div><div class="refsect1"><a name="idm214201000368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
-      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    reference.</p></div><div class="refsect1"><a name="idm214194743200"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
+      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200994176"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194737008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214200991008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214194733568"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
index b3a66f7343c7891f1e209ab84eed66f6927ae57f..88f71ce91821cee9b7ec1f36eba9e8f9387b8f70 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_ERROR" "3" "" "systemd 215" "sd_bus_error"
+.TH "SD_BUS_ERROR" "3" "" "systemd 217" "sd_bus_error"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -143,7 +143,7 @@ will return an errno\-like negative value returned based on parameter
 \fBSD_BUS_ERROR_FAILED\fR, etc\&., listed above\&. If
 \fIname\fR
 is
-\fBNULL\fR, it is assumed that no error occured, and 0 is returned\&. This means that this function may be conveniently used in a
+\fBNULL\fR, it is assumed that no error occurred, and 0 is returned\&. This means that this function may be conveniently used in a
 \fBreturn\fR
 statement\&.
 .PP
@@ -204,7 +204,7 @@ will be generated from
 and the arguments\&.
 .PP
 \fBsd_bus_error_get_errno\fR
-is will convert
+will convert
 e\->name
 to an errno\-like value using the same rules as
 \fBsd_bus_error_set\fR\&. If
@@ -304,14 +304,14 @@ is not reference counted\&. Users should destroy resources held by it by calling
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Error was already set in
 sd_bus_error
 structure when one the error\-setting functions was called\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 9be474764b9d1566903a81b55e4261c1bbd4712c..aba80832d29b58e000f64456e0f3954fe016ed7e 100644 (file)
@@ -246,13 +246,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_error_set</function> will return an
     errno-like negative value returned based on parameter
     <parameter>name</parameter> (see
-    <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>).
+    <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <constant>-ENXIO</constant>. Well-known
     D-Bus error names are available as constants
     <constant>SD_BUS_ERROR_FAILED</constant>, etc., listed above. If
     <parameter>name</parameter> is <constant>NULL</constant>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <function>return</function> statement.</para>
 
@@ -270,7 +270,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <para><function>sd_bus_error_setf</function> is similar to
     <function>sd_bus_error_set</function>, but takes a
-    <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     format string and corresponding arguments to generate
     <structname>message</structname>.</para>
 
@@ -291,12 +291,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_error_set_errnof</function> is similar to
     <function>sd_bus_error_set_errno</function>, but in addition to
     <parameter>name</parameter>, takes a
-    <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     format and corresponding arguments.
     <structfield>name</structfield> will be generated from
     <parameter>format</parameter> and the arguments.</para>
 
-    <para><function>sd_bus_error_get_errno</function> is will convert
+    <para><function>sd_bus_error_get_errno</function> will convert
     <structname>e-&gt;name</structname> to an errno-like value using the
     same rules as <function>sd_bus_error_set</function>.  If
     <parameter>e</parameter> is <constant>NULL</constant>, 0 will be
@@ -322,7 +322,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_error_free</function> will destroy resources
     held by <parameter>e</parameter>. The parameter itself will not
     be deallocated, and must be
-    <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>d
+    <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>d
     by the caller if necessary.</para>
   </refsect1>
 
@@ -376,7 +376,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <variablelist>
 
       <varlistentry>
-        <term><varname>-EINVAL</varname></term>
+        <term><constant>-EINVAL</constant></term>
 
         <listitem><para>Error was already set in
         <structname>sd_bus_error</structname> structure when one the
@@ -384,7 +384,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
         <listitem><para>Memory allocation failed.</para></listitem>
       </varlistentry>
@@ -397,7 +397,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_set_error()</function> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
@@ -407,7 +407,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>strerror</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>
   </refsect1>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 26749f1ef2fdaf44c781b93548c6d02fab62820c..e02b7f30cb1e5d7bbd334cb663b74238e7620d70 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_error"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_error, sd_bus_error_free, sd_bus_error_set, sd_bus_error_set_const, sd_bus_error_set_errno, sd_bus_error_set_errnof, sd_bus_error_get_errno, sd_bus_error_copy, sd_bus_error_is_set, sd_bus_error_has_name — sd-bus error handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><pre class="funcsynopsisinfo">typedef struct {
         const char *name;
         const char *message;
         ...
@@ -85,7 +85,7 @@
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code>
     </p><p>
       <code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code>
-    </p></div><div class="refsect1"><a name="idm214180451616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
+    </p></div><div class="refsect1"><a name="idm214168488864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <span class="structname">sd_bus_error</span> structure carries
     information for a <code class="filename">sd-bus</code> error. The
     functions described below can be used to set and query fields in
     this structure. The <em class="structfield"><code>name</code></em> field contains a
     <code class="function">sd_bus_error_free</code>.</p><p><code class="function">sd_bus_error_set</code> will return an
     errno-like negative value returned based on parameter
     <em class="parameter"><code>name</code></em> (see
-    <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
+    <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>).
     Various well-known D-Bus errors are converted to specific values,
     and the remaining ones to <code class="constant">-ENXIO</code>. Well-known
     D-Bus error names are available as constants
     <code class="constant">SD_BUS_ERROR_FAILED</code>, etc., listed above. If
     <em class="parameter"><code>name</code></em> is <code class="constant">NULL</code>, it is
-    assumed that no error occured, and 0 is returned. This means that
+    assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <code class="function">return</code> statement.</p><p>If <em class="parameter"><code>e</code></em> is not
     <code class="constant">NULL</code>, <em class="structfield"><code>name</code></em> and
     <code class="function">sd_bus_error_set</code> will make internal copies of
     specified strings.</p><p><code class="function">sd_bus_error_setf</code> is similar to
     <code class="function">sd_bus_error_set</code>, but takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format string and corresponding arguments to generate
     <span class="structname">message</span>.</p><p><code class="function">sd_bus_error_set_const</code> is similar to
     <code class="function">sd_bus_error_set</code>, but string parameters are
     </p><p><code class="function">sd_bus_error_set_errnof</code> is similar to
     <code class="function">sd_bus_error_set_errno</code>, but in addition to
     <em class="parameter"><code>name</code></em>, takes a
-    <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+    <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
     format and corresponding arguments.
     <em class="structfield"><code>name</code></em> will be generated from
-    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> is will convert
+    <em class="parameter"><code>format</code></em> and the arguments.</p><p><code class="function">sd_bus_error_get_errno</code> will convert
     <span class="structname">e-&gt;name</span> to an errno-like value using the
     same rules as <code class="function">sd_bus_error_set</code>.  If
     <em class="parameter"><code>e</code></em> is <code class="constant">NULL</code>, 0 will be
     <code class="constant">false</code> otherwise.</p><p><code class="function">sd_bus_error_free</code> will destroy resources
     held by <em class="parameter"><code>e</code></em>. The parameter itself will not
     be deallocated, and must be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
-    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214179308512"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>d
+    by the caller if necessary.</p></div><div class="refsect1"><a name="idm214168446224"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>Functions <code class="function">sd_bus_error_set</code>,
     <code class="function">sd_bus_error_setf</code>,
     <code class="function">sd_bus_error_set_const</code>, when successful,
     return the negative errno value corresponding to the
     <code class="constant">true</code> when <em class="parameter"><code>e</code></em> is
     non-<code class="constant">NULL</code> and <em class="parameter"><code>e-&gt;name</code></em>
     is equal to <em class="parameter"><code>name</code></em>,
-    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214180287856"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
+    <code class="constant">false</code> otherwise.</p></div><div class="refsect1"><a name="idm214168429504"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p><span class="structname">sd_bus_error</span> is not reference
     counted. Users should destroy resources held by it by calling
-    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214180285584"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
+    <code class="function">sd_bus_error_free</code>.</p></div><div class="refsect1"><a name="idm214168427360"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Error was already set in
         <span class="structname">sd_bus_error</span> structure when one the
-        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180280672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
+        error-setting functions was called.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168422624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_set_error()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180277504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214168419440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
       <a href="strerror.html"><span class="citerefentry"><span class="refentrytitle">strerror</span>(3)</span></a>
     </p></div></div></body></html>
index 6c03acaffdf762e91d5bf1896109757e00a7fd91..dceb2b5251bfab7c3ba9ed2435867ebbe6cf5d2f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_MESSAGE_APPEND" "3" "" "systemd 215" "sd_bus_message_append"
+.TH "SD_BUS_MESSAGE_APPEND" "3" "" "systemd 217" "sd_bus_message_append"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -105,7 +105,7 @@ T{
 T}:T{
 \fBSD_BUS_TYPE_BYTE\fR
 T}:T{
-unsigned interger
+unsigned integer
 T}:T{
 1 byte
 T}
@@ -380,27 +380,27 @@ On success, this call returns 0 or a positive integer\&. On failure, this call r
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified parameter is invalid\&.
 .RE
 .PP
-\fI\-EPERM\fR
+\fB\-EPERM\fR
 .RS 4
 Message has been sealed\&.
 .RE
 .PP
-\fI\-ESTALE\fR
+\fB\-ESTALE\fR
 .RS 4
 Message is in invalid state\&.
 .RE
 .PP
-\fI\-ENXIO\fR
+\fB\-ENXIO\fR
 .RS 4
 Message cannot be appended to\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index 9fa03ff9e825e9b3aad72986137d1b84a54bfb74..53a03c776ea874b236fe2267bd32929582f1a33c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append — Attach parts of message based on a format string</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">types</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214183901008"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append</code> function appends
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append — Attach parts of message based on a format string</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">types</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214180087808"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append</code> function appends
     a sequence of items to message <em class="parameter"><code>m</code></em>. The
     format string <em class="parameter"><code>types</code></em> describes the types of
     arguments that follow.</p><p>The format string is composed of the elements shown in the
@@ -45,7 +45,7 @@
     types must be a basic type. Corresponding arguments must include
     the size of the dictionary, and then repeated this number of
     times, arguments corresponding to each of the two nested
-    types.</p><div class="table"><a name="idm214184578560"></a><p class="title"><b>Table 1. Item format specifiers</b></p><div class="table-contents"><table summary="Item format specifiers" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Specifier</th><th>Constant</th><th>Description</th><th>Size</th></tr></thead><tbody><tr><td>"<code class="literal">y</code>"</td><td><code class="constant">SD_BUS_TYPE_BYTE</code></td><td>unsigned interger</td><td>1 byte</td></tr><tr><td>"<code class="literal">b</code>"</td><td><code class="constant">SD_BUS_TYPE_BOOLEAN</code></td><td>boolean</td><td>4 bytes</td></tr><tr><td>"<code class="literal">n</code>"</td><td><code class="constant">SD_BUS_TYPE_INT16</code></td><td>signed integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">q</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT16</code></td><td>unsigned integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">i</code>"</td><td><code class="constant">SD_BUS_TYPE_INT32</code></td><td>signed integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">u</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT32</code></td><td>unsigned integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">x</code>"</td><td><code class="constant">SD_BUS_TYPE_INT64</code></td><td>signed integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">t</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT64</code></td><td>unsigned integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">d</code>"</td><td><code class="constant">SD_BUS_TYPE_DOUBLE</code></td><td>floating-point</td><td>8 bytes</td></tr><tr><td>"<code class="literal">s</code>"</td><td><code class="constant">SD_BUS_TYPE_STRING</code></td><td>Unicode string</td><td>variable</td></tr><tr><td>"<code class="literal">o</code>"</td><td><code class="constant">SD_BUS_TYPE_OBJECT_PATH</code></td><td>object path</td><td>variable</td></tr><tr><td>"<code class="literal">g</code>"</td><td><code class="constant">SD_BUS_TYPE_SIGNATURE</code></td><td>signature</td><td>variable</td></tr><tr><td>"<code class="literal">h</code>"</td><td><code class="constant">SD_BUS_TYPE_UNIX_FD</code></td><td>UNIX file descriptor</td><td>4 bytes</td></tr><tr><td>"<code class="literal">a</code>"</td><td><code class="constant">SD_BUS_TYPE_ARRAY</code></td><td>array</td><td>determined by array type and size</td></tr><tr><td>"<code class="literal">v</code>"</td><td><code class="constant">SD_BUS_TYPE_VARIANT</code></td><td>variant</td><td>determined by the type argument</td></tr><tr><td>"<code class="literal">(</code>"</td><td><code class="constant">SD_BUS_TYPE_STRUCT_BEGIN</code></td><td>array start</td><td rowspan="2">determined by the nested types</td></tr><tr><td>"<code class="literal">)</code>"</td><td><code class="constant">SD_BUS_TYPE_STRUCT_END</code></td><td>array end</td></tr><tr><td>"<code class="literal">{</code>"</td><td><code class="constant">SD_BUS_TYPE_DICT_ENTRY_BEGIN</code></td><td>dictionary entry start</td><td rowspan="2">determined by the nested types</td></tr><tr><td>"<code class="literal">}</code>"</td><td><code class="constant">SD_BUS_TYPE_DICT_ENTRY_END</code></td><td>dictionary entry end</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214183669216"></a><h2 id="Types string grammar">Types string grammar<a class="headerlink" title="Permalink to this headline" href="#Types%20string%20grammar">¶</a></h2><pre class="programlisting">types ::= complete_type*
+    types.</p><div class="table"><a name="idm214184030848"></a><p class="title"><b>Table 1. Item format specifiers</b></p><div class="table-contents"><table summary="Item format specifiers" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Specifier</th><th>Constant</th><th>Description</th><th>Size</th></tr></thead><tbody><tr><td>"<code class="literal">y</code>"</td><td><code class="constant">SD_BUS_TYPE_BYTE</code></td><td>unsigned integer</td><td>1 byte</td></tr><tr><td>"<code class="literal">b</code>"</td><td><code class="constant">SD_BUS_TYPE_BOOLEAN</code></td><td>boolean</td><td>4 bytes</td></tr><tr><td>"<code class="literal">n</code>"</td><td><code class="constant">SD_BUS_TYPE_INT16</code></td><td>signed integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">q</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT16</code></td><td>unsigned integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">i</code>"</td><td><code class="constant">SD_BUS_TYPE_INT32</code></td><td>signed integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">u</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT32</code></td><td>unsigned integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">x</code>"</td><td><code class="constant">SD_BUS_TYPE_INT64</code></td><td>signed integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">t</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT64</code></td><td>unsigned integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">d</code>"</td><td><code class="constant">SD_BUS_TYPE_DOUBLE</code></td><td>floating-point</td><td>8 bytes</td></tr><tr><td>"<code class="literal">s</code>"</td><td><code class="constant">SD_BUS_TYPE_STRING</code></td><td>Unicode string</td><td>variable</td></tr><tr><td>"<code class="literal">o</code>"</td><td><code class="constant">SD_BUS_TYPE_OBJECT_PATH</code></td><td>object path</td><td>variable</td></tr><tr><td>"<code class="literal">g</code>"</td><td><code class="constant">SD_BUS_TYPE_SIGNATURE</code></td><td>signature</td><td>variable</td></tr><tr><td>"<code class="literal">h</code>"</td><td><code class="constant">SD_BUS_TYPE_UNIX_FD</code></td><td>UNIX file descriptor</td><td>4 bytes</td></tr><tr><td>"<code class="literal">a</code>"</td><td><code class="constant">SD_BUS_TYPE_ARRAY</code></td><td>array</td><td>determined by array type and size</td></tr><tr><td>"<code class="literal">v</code>"</td><td><code class="constant">SD_BUS_TYPE_VARIANT</code></td><td>variant</td><td>determined by the type argument</td></tr><tr><td>"<code class="literal">(</code>"</td><td><code class="constant">SD_BUS_TYPE_STRUCT_BEGIN</code></td><td>array start</td><td rowspan="2">determined by the nested types</td></tr><tr><td>"<code class="literal">)</code>"</td><td><code class="constant">SD_BUS_TYPE_STRUCT_END</code></td><td>array end</td></tr><tr><td>"<code class="literal">{</code>"</td><td><code class="constant">SD_BUS_TYPE_DICT_ENTRY_BEGIN</code></td><td>dictionary entry start</td><td rowspan="2">determined by the nested types</td></tr><tr><td>"<code class="literal">}</code>"</td><td><code class="constant">SD_BUS_TYPE_DICT_ENTRY_END</code></td><td>dictionary entry end</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214184004368"></a><h2 id="Types string grammar">Types string grammar<a class="headerlink" title="Permalink to this headline" href="#Types%20string%20grammar">¶</a></h2><pre class="programlisting">types ::= complete_type*
 complete_type ::= basic_type | variant | structure | array | dictionary
 basic_type ::= "y" | "n" | "q" | "u" | "i" | "x" | "t" | "d" |
                "b" | "h" |
@@ -54,7 +54,7 @@ variant ::= "v"
 structure ::= "(" complete_type+ ")"
 array ::= "a" complete_type
 dictionary ::= "a" "{" basic_type complete_type "}"
-</pre></div><div class="refsect1"><a name="idm214182869216"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Append a single basic type (the string "<code class="literal">a string</code>"):
+</pre></div><div class="refsect1"><a name="idm214184002544"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Append a single basic type (the string "<code class="literal">a string</code>"):
     </p><pre class="programlisting">sd_bus_message *m;
 ...
 sd_bus_message_append(m, "s", "a string");</pre><p>Append all types of integers:</p><pre class="programlisting">uint8_t y = 1;
@@ -70,17 +70,17 @@ sd_bus_message_append(m, "ynqiuxtd", y, n, q, i, u, x, t, d);</pre><p>Append a s
 </pre><p>Append a variant, with the real type "g" (signature),
      and value "sdbusisgood":</p><pre class="programlisting">sd_bus_message_append(m, "v", "g", "sdbusisgood");</pre><p>Append a dictionary containing the mapping {1=&gt;"a", 2=&gt;"b", 3=&gt;""}:
      </p><pre class="programlisting">sd_bus_message_append(m, "a{is}", 3, 1, "a", 2, "b", 3, NULL);
-     </pre></div><div class="refsect1"><a name="idm214184952432"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this call returns 0 or a positive
+     </pre></div><div class="refsect1"><a name="idm214183994432"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this call returns 0 or a positive
     integer. On failure, this call returns a negative
-    errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183757376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+    errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183992288"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd-bus</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214183687248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd-bus</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214183988800"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
index b14a6c985cdcb57b5a1f5a2d49e738ae921581f1..961ab53c5f87c5aa38f1ef362d72057b7be7e898 100644 (file)
@@ -232,7 +232,7 @@ sd_bus_message_append(m, "ynqiuxtd", y, n, q, i, u, x, t, d);</programlisting>
     <para><function>sd_bus_open_user()</function> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd-bus</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd-bus</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index 78c37146660dc2d21bbd3beb928bb0e457783f37..27ded44d1b7f693d6be259861bdac458b1d1e691 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_MESSAGE_APPEND_ARRAY" "3" "" "systemd 215" "sd_bus_message_append_array"
+.TH "SD_BUS_MESSAGE_APPEND_ARRAY" "3" "" "systemd 217" "sd_bus_message_append_array"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -31,7 +31,7 @@ sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_a
 .HP \w'int\ sd_bus_message_append_array('u
 .BI "int sd_bus_message_append_array(sd_bus_message\ *" "m" ", char\ " "type" ", char\ void\ *" "ptr" ", size_t\ " "size" ");"
 .HP \w'int\ sd_bus_message_append_array_memfd('u
-.BI "int sd_bus_message_append_array_memfd(sd_bus_message\ *" "m" ", char\ " "type" ", sd_memfd\ *" "memfd" ");"
+.BI "int sd_bus_message_append_array_memfd(sd_bus_message\ *" "m" ", char\ " "type" ", int\ " "memfd" ");"
 .HP \w'int\ sd_bus_message_append_array_iovec('u
 .BI "int sd_bus_message_append_array_iovec(sd_bus_message\ *" "m" ", char\ " "type" ", const\ struct\ iovec\ *" "iov" ", unsigned\ " "n" ");"
 .HP \w'int\ sd_bus_message_append_array_space('u
@@ -63,7 +63,7 @@ must be one of the "trivial" types
 section of the D\-Bus specification, and listed in
 \fBsd_bus_message_append_basic\fR(3)\&. Pointer
 \fIp\fR
-must point to an array of of size
+must point to an array of size
 \fIsize\fR
 bytes containing items of the respective type\&. Size
 \fIsize\fR
@@ -130,27 +130,27 @@ On success, these calls return 0 or a positive integer\&. On failure, they retur
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified parameter is invalid\&.
 .RE
 .PP
-\fI\-EPERM\fR
+\fB\-EPERM\fR
 .RS 4
 Message has been sealed\&.
 .RE
 .PP
-\fI\-ESTALE\fR
+\fB\-ESTALE\fR
 .RS 4
 Message is in invalid state\&.
 .RE
 .PP
-\fI\-ENXIO\fR
+\fB\-ENXIO\fR
 .RS 4
 Message cannot be appended to\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index 0878e1e614e5e1ea1732471bd188d8caad7da366..b92f5116d8bf28b10585df644889fb7b23523ac0 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>sd_memfd *<var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214170011040"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175168416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
     appends items to message <em class="parameter"><code>m</code></em> as the single
     array. A container will be opened, items appended, and the
     container closed. Parameter <em class="parameter"><code>type</code></em> determines
@@ -32,7 +32,7 @@
     <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#basic-types" target="_top">Basic Types</a>
     section of the D-Bus specification, and listed in
     <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>.
-    Pointer <em class="parameter"><code>p</code></em> must point to an array of of size
+    Pointer <em class="parameter"><code>p</code></em> must point to an array of size
     <em class="parameter"><code>size</code></em> bytes containing items of the
     respective type. Size <em class="parameter"><code>size</code></em> must be a
     multiple of the size of the type <em class="parameter"><code>type</code></em>. As a
     <code class="function">sd_bus_message_append_array</code>, but instead
     of copying items to the message, it returns a pointer to the
     destination area to the caller in pointer <em class="parameter"><code>p</code></em>.
-    </p></div><div class="refsect1"><a name="idm214169563840"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
-    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171075696"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
+    </p></div><div class="refsect1"><a name="idm214175125472"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170154096"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214169857648"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214170150912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>,
index 455e1bb3af3338143808c3e1f86e750235aaaba7..ab1fcd26cbab502d41a3442bd13a26f67f94e656 100644 (file)
@@ -68,7 +68,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
         <funcdef>int sd_bus_message_append_array_memfd</funcdef>
         <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
         <paramdef>char <parameter>type</parameter></paramdef>
-        <paramdef>sd_memfd *<parameter>memfd</parameter></paramdef>
+        <paramdef>int <parameter>memfd</parameter></paramdef>
       </funcprototype>
 
       <funcprototype>
@@ -104,7 +104,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#basic-types">Basic Types</ulink>
     section of the D-Bus specification, and listed in
     <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
-    Pointer <parameter>p</parameter> must point to an array of of size
+    Pointer <parameter>p</parameter> must point to an array of size
     <parameter>size</parameter> bytes containing items of the
     respective type. Size <parameter>size</parameter> must be a
     multiple of the size of the type <parameter>type</parameter>. As a
@@ -171,7 +171,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_append_array()</function> and other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index 0878e1e614e5e1ea1732471bd188d8caad7da366..b92f5116d8bf28b10585df644889fb7b23523ac0 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>sd_memfd *<var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214170011040"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175168416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
     appends items to message <em class="parameter"><code>m</code></em> as the single
     array. A container will be opened, items appended, and the
     container closed. Parameter <em class="parameter"><code>type</code></em> determines
@@ -32,7 +32,7 @@
     <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#basic-types" target="_top">Basic Types</a>
     section of the D-Bus specification, and listed in
     <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>.
-    Pointer <em class="parameter"><code>p</code></em> must point to an array of of size
+    Pointer <em class="parameter"><code>p</code></em> must point to an array of size
     <em class="parameter"><code>size</code></em> bytes containing items of the
     respective type. Size <em class="parameter"><code>size</code></em> must be a
     multiple of the size of the type <em class="parameter"><code>type</code></em>. As a
     <code class="function">sd_bus_message_append_array</code>, but instead
     of copying items to the message, it returns a pointer to the
     destination area to the caller in pointer <em class="parameter"><code>p</code></em>.
-    </p></div><div class="refsect1"><a name="idm214169563840"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
-    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171075696"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
+    </p></div><div class="refsect1"><a name="idm214175125472"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170154096"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214169857648"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214170150912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>,
index 0878e1e614e5e1ea1732471bd188d8caad7da366..b92f5116d8bf28b10585df644889fb7b23523ac0 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>sd_memfd *<var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214170011040"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175168416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
     appends items to message <em class="parameter"><code>m</code></em> as the single
     array. A container will be opened, items appended, and the
     container closed. Parameter <em class="parameter"><code>type</code></em> determines
@@ -32,7 +32,7 @@
     <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#basic-types" target="_top">Basic Types</a>
     section of the D-Bus specification, and listed in
     <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>.
-    Pointer <em class="parameter"><code>p</code></em> must point to an array of of size
+    Pointer <em class="parameter"><code>p</code></em> must point to an array of size
     <em class="parameter"><code>size</code></em> bytes containing items of the
     respective type. Size <em class="parameter"><code>size</code></em> must be a
     multiple of the size of the type <em class="parameter"><code>type</code></em>. As a
     <code class="function">sd_bus_message_append_array</code>, but instead
     of copying items to the message, it returns a pointer to the
     destination area to the caller in pointer <em class="parameter"><code>p</code></em>.
-    </p></div><div class="refsect1"><a name="idm214169563840"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
-    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171075696"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
+    </p></div><div class="refsect1"><a name="idm214175125472"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170154096"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214169857648"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214170150912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>,
index 0878e1e614e5e1ea1732471bd188d8caad7da366..b92f5116d8bf28b10585df644889fb7b23523ac0 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>sd_memfd *<var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214170011040"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_array"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_array, sd_bus_message_append_array_memfd, sd_bus_message_append_array_iovec, sd_bus_message_append_array_space — Attach an array of items to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">ptr</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_array_space(</code></td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char void **<var class="pdparam">ptr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175168416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append_array</code> functionc
     appends items to message <em class="parameter"><code>m</code></em> as the single
     array. A container will be opened, items appended, and the
     container closed. Parameter <em class="parameter"><code>type</code></em> determines
@@ -32,7 +32,7 @@
     <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#basic-types" target="_top">Basic Types</a>
     section of the D-Bus specification, and listed in
     <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>.
-    Pointer <em class="parameter"><code>p</code></em> must point to an array of of size
+    Pointer <em class="parameter"><code>p</code></em> must point to an array of size
     <em class="parameter"><code>size</code></em> bytes containing items of the
     respective type. Size <em class="parameter"><code>size</code></em> must be a
     multiple of the size of the type <em class="parameter"><code>type</code></em>. As a
     <code class="function">sd_bus_message_append_array</code>, but instead
     of copying items to the message, it returns a pointer to the
     destination area to the caller in pointer <em class="parameter"><code>p</code></em>.
-    </p></div><div class="refsect1"><a name="idm214169563840"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
-    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171075696"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
+    </p></div><div class="refsect1"><a name="idm214175125472"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170154096"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_append_array()</code> and other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214169857648"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214170150912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>,
index 729beb722125c842a67e8417904c8bc80be4ae9d..9c2aa2a8284ee0f980d07e7f546781fe5a722468 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_MESSAGE_APPEND_BASIC" "3" "" "systemd 215" "sd_bus_message_append_basic"
+.TH "SD_BUS_MESSAGE_APPEND_BASIC" "3" "" "systemd 217" "sd_bus_message_append_basic"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -80,7 +80,7 @@ T{
 T}:T{
 \fBSD_BUS_TYPE_BYTE\fR
 T}:T{
-unsigned interger
+unsigned integer
 T}:T{
 1 byte
 T}
@@ -209,7 +209,7 @@ For types
 is interpreted as a pointer to a
 \fBNUL\fR\-terminated character sequence\&. As a special case, a
 \fBNULL\fR
-pointer is interpreted as an empty string\&. The string should be valid Unicode string encoded as UTF\-8\&. In case of the two latter types, the additional requirements for a D\-Bus object path or type signature should be satisfied\&. Those requirements should be verified by the recepient of the message\&.
+pointer is interpreted as an empty string\&. The string should be valid Unicode string encoded as UTF\-8\&. In case of the two latter types, the additional requirements for a D\-Bus object path or type signature should be satisfied\&. Those requirements should be verified by the recipient of the message\&.
 .SH "RETURN VALUE"
 .PP
 On success, this call returns 0 or a positive integer\&. On failure, it returns a negative errno\-style error code\&.
@@ -217,27 +217,27 @@ On success, this call returns 0 or a positive integer\&. On failure, it returns
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified parameter is invalid\&.
 .RE
 .PP
-\fI\-EPERM\fR
+\fB\-EPERM\fR
 .RS 4
 Message has been sealed\&.
 .RE
 .PP
-\fI\-ESTALE\fR
+\fB\-ESTALE\fR
 .RS 4
 Message is in invalid state\&.
 .RE
 .PP
-\fI\-ENXIO\fR
+\fB\-ENXIO\fR
 .RS 4
 Message cannot be appended to\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index 08ea99146699dde5c9b90f5fbbc5e8178c474514..ecb2bb9d35c82ae115f8015e4c58884ac087158c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_basic"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_basic — Attach a single part to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_basic(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">p</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171102672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_append_basic</code> appends a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_basic"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_basic — Attach a single part to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_basic(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>char void *<var class="pdparam">p</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172566960"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_append_basic</code> appends a
     single item to the message <em class="parameter"><code>m</code></em>. Parameter
     <em class="parameter"><code>type</code></em> determines how pointer
     <em class="parameter"><code>p</code></em> is interpreted.
@@ -28,7 +28,7 @@
 
     <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#basic-types" target="_top">Basic Types</a>
     section of the D-Bus specification, and listed in the table below.
-    </p><div class="table"><a name="format-specifiers"></a><p class="title"><b>Table 1. Item format specifiers</b></p><div class="table-contents"><table summary="Item format specifiers" border="1"><colgroup><col class="specifier"><col class="constant"><col class="description"><col class="size"></colgroup><thead><tr><th>Specifier</th><th>Constant</th><th>Description</th><th>Size</th></tr></thead><tbody><tr><td>"<code class="literal">y</code>"</td><td><code class="constant">SD_BUS_TYPE_BYTE</code></td><td>unsigned interger</td><td>1 byte</td></tr><tr><td>"<code class="literal">b</code>"</td><td><code class="constant">SD_BUS_TYPE_BOOLEAN</code></td><td>boolean</td><td>4 bytes</td></tr><tr><td>"<code class="literal">n</code>"</td><td><code class="constant">SD_BUS_TYPE_INT16</code></td><td>signed integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">q</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT16</code></td><td>unsigned integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">i</code>"</td><td><code class="constant">SD_BUS_TYPE_INT32</code></td><td>signed integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">u</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT32</code></td><td>unsigned integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">x</code>"</td><td><code class="constant">SD_BUS_TYPE_INT64</code></td><td>signed integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">t</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT64</code></td><td>unsigned integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">d</code>"</td><td><code class="constant">SD_BUS_TYPE_DOUBLE</code></td><td>floating-point</td><td>8 bytes</td></tr><tr><td>"<code class="literal">s</code>"</td><td><code class="constant">SD_BUS_TYPE_STRING</code></td><td>Unicode string</td><td>variable</td></tr><tr><td>"<code class="literal">o</code>"</td><td><code class="constant">SD_BUS_TYPE_OBJECT_PATH</code></td><td>object path</td><td>variable</td></tr><tr><td>"<code class="literal">g</code>"</td><td><code class="constant">SD_BUS_TYPE_SIGNATURE</code></td><td>signature</td><td>variable</td></tr><tr><td>"<code class="literal">h</code>"</td><td><code class="constant">SD_BUS_TYPE_UNIX_FD</code></td><td>UNIX file descriptor</td><td>4 bytes</td></tr></tbody></table></div></div><br class="table-break"><p>The value of the parameter is copied into the memory area
+    </p><div class="table"><a name="format-specifiers"></a><p class="title"><b>Table 1. Item format specifiers</b></p><div class="table-contents"><table summary="Item format specifiers" border="1"><colgroup><col class="specifier"><col class="constant"><col class="description"><col class="size"></colgroup><thead><tr><th>Specifier</th><th>Constant</th><th>Description</th><th>Size</th></tr></thead><tbody><tr><td>"<code class="literal">y</code>"</td><td><code class="constant">SD_BUS_TYPE_BYTE</code></td><td>unsigned integer</td><td>1 byte</td></tr><tr><td>"<code class="literal">b</code>"</td><td><code class="constant">SD_BUS_TYPE_BOOLEAN</code></td><td>boolean</td><td>4 bytes</td></tr><tr><td>"<code class="literal">n</code>"</td><td><code class="constant">SD_BUS_TYPE_INT16</code></td><td>signed integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">q</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT16</code></td><td>unsigned integer</td><td>2 bytes</td></tr><tr><td>"<code class="literal">i</code>"</td><td><code class="constant">SD_BUS_TYPE_INT32</code></td><td>signed integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">u</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT32</code></td><td>unsigned integer</td><td>4 bytes</td></tr><tr><td>"<code class="literal">x</code>"</td><td><code class="constant">SD_BUS_TYPE_INT64</code></td><td>signed integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">t</code>"</td><td><code class="constant">SD_BUS_TYPE_UINT64</code></td><td>unsigned integer</td><td>8 bytes</td></tr><tr><td>"<code class="literal">d</code>"</td><td><code class="constant">SD_BUS_TYPE_DOUBLE</code></td><td>floating-point</td><td>8 bytes</td></tr><tr><td>"<code class="literal">s</code>"</td><td><code class="constant">SD_BUS_TYPE_STRING</code></td><td>Unicode string</td><td>variable</td></tr><tr><td>"<code class="literal">o</code>"</td><td><code class="constant">SD_BUS_TYPE_OBJECT_PATH</code></td><td>object path</td><td>variable</td></tr><tr><td>"<code class="literal">g</code>"</td><td><code class="constant">SD_BUS_TYPE_SIGNATURE</code></td><td>signature</td><td>variable</td></tr><tr><td>"<code class="literal">h</code>"</td><td><code class="constant">SD_BUS_TYPE_UNIX_FD</code></td><td>UNIX file descriptor</td><td>4 bytes</td></tr></tbody></table></div></div><br class="table-break"><p>The value of the parameter is copied into the memory area
     containing the message and may be changed after this call. If
     <em class="parameter"><code>type</code></em> is "<code class="literal">h</code>" (UNIX file
     descriptor), it is always "consumed" by this call, and either
     valid Unicode string encoded as UTF-8. In case of the two latter
     types, the additional requirements for a D-Bus object path or
     type signature should be satisfied. Those requirements should be
-    verified by the recepient of the message.
-    </p></div><div class="refsect1"><a name="idm214171395632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this call returns 0 or a positive integer. On
-    failure, it returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214169902752"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_append_basic()</code> function
+    verified by the recipient of the message.
+    </p></div><div class="refsect1"><a name="idm214171493888"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this call returns 0 or a positive integer. On
+    failure, it returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171483792"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_append_basic()</code> function
     described here is available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214171653984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214171480496"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>,
index 68e1191602bb4594607a9e1b37d4953e3ddb30e3..2594134d8778d7e5c59ffc62e22739ab21098fdb 100644 (file)
@@ -95,7 +95,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
           <row>
             <entry><literal>y</literal></entry>
             <entry><constant>SD_BUS_TYPE_BYTE</constant></entry>
-            <entry>unsigned interger</entry>
+            <entry>unsigned integer</entry>
             <entry>1 byte</entry>
           </row>
 
@@ -200,7 +200,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     valid Unicode string encoded as UTF-8. In case of the two latter
     types, the additional requirements for a D-Bus object path or
     type signature should be satisfied. Those requirements should be
-    verified by the recepient of the message.
+    verified by the recipient of the message.
     </para>
   </refsect1>
 
@@ -219,35 +219,35 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <variablelist>
 
       <varlistentry>
-        <term><varname>-EINVAL</varname></term>
+        <term><constant>-EINVAL</constant></term>
 
         <listitem><para>Specified parameter is invalid.
         </para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-EPERM</varname></term>
+        <term><constant>-EPERM</constant></term>
 
         <listitem><para>Message has been sealed.
         </para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ESTALE</varname></term>
+        <term><constant>-ESTALE</constant></term>
 
         <listitem><para>Message is in invalid state.
         </para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENXIO</varname></term>
+        <term><constant>-ENXIO</constant></term>
 
         <listitem><para>Message cannot be appended to.
         </para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
         <listitem><para>Memory allocation failed.</para></listitem>
       </varlistentry>
@@ -260,7 +260,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>The <function>sd_bus_append_basic()</function> function
     described here is available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index 963abc252d48ac97a742cee7254927c5b8c62ead..77d966e68184243fdedda408df56f430dd36878b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_string_memfd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec, sd_bus_message_append_string_space — Attach a string to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>sd_memfd *<var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_space(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">s</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169135024"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The functions
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_string_memfd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec, sd_bus_message_append_string_space — Attach a string to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_space(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">s</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182424512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The functions
     <code class="function">sd_bus_message_append_string_memfd</code> and
     <code class="function">sd_bus_message_append_string_iovec</code> can be
     used to append a single string (item of type "<code class="literal">s</code>")
     the message, it returns a pointer to the destination area to
     the caller in pointer <em class="parameter"><code>p</code></em>. Space for the string
     of length <em class="parameter"><code>size</code></em> plus the terminating
-    <code class="constant">NUL</code> is allocated.</p></div><div class="refsect1"><a name="idm214168480256"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, those calls return 0 or a positive integer. On
-    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214169750000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The functions described here are available as a shared library,
+    <code class="constant">NUL</code> is allocated.</p></div><div class="refsect1"><a name="idm214186357680"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, those calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186348112"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The functions described here are available as a shared library,
     which can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214167904208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214186345200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>,
index eabb36c28979e810020a82bdcaeb75a1fda1c926..8e747981e32eb351c2f977abdbbc91eb89a31fc0 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_MESSAGE_APPEND_STRING_MEMFD" "3" "" "systemd 215" "sd_bus_message_append_string_memfd"
+.TH "SD_BUS_MESSAGE_APPEND_STRING_MEMFD" "3" "" "systemd 217" "sd_bus_message_append_string_memfd"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -29,7 +29,7 @@ sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec, sd_bus_m
 .fi
 .ft
 .HP \w'int\ sd_bus_message_append_string_memfd('u
-.BI "int sd_bus_message_append_string_memfd(sd_bus_message\ *" "m" ", sd_memfd\ *" "memfd" ");"
+.BI "int sd_bus_message_append_string_memfd(sd_bus_message\ *" "m" ", int\ " "memfd" ");"
 .HP \w'int\ sd_bus_message_append_string_iovec('u
 .BI "int sd_bus_message_append_string_iovec(sd_bus_message\ *" "m" ", const\ struct\ iovec\ *" "iov" ", unsigned\ " "n" ");"
 .HP \w'int\ sd_bus_message_append_string_space('u
@@ -91,27 +91,27 @@ On success, those calls return 0 or a positive integer\&. On failure, they retur
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified parameter is invalid\&.
 .RE
 .PP
-\fI\-EPERM\fR
+\fB\-EPERM\fR
 .RS 4
 Message has been sealed\&.
 .RE
 .PP
-\fI\-ESTALE\fR
+\fB\-ESTALE\fR
 .RS 4
 Message is in invalid state\&.
 .RE
 .PP
-\fI\-ENXIO\fR
+\fB\-ENXIO\fR
 .RS 4
 Message cannot be appended to\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index 963abc252d48ac97a742cee7254927c5b8c62ead..77d966e68184243fdedda408df56f430dd36878b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_string_memfd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec, sd_bus_message_append_string_space — Attach a string to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>sd_memfd *<var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_space(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">s</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169135024"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The functions
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_string_memfd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec, sd_bus_message_append_string_space — Attach a string to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_space(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">s</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182424512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The functions
     <code class="function">sd_bus_message_append_string_memfd</code> and
     <code class="function">sd_bus_message_append_string_iovec</code> can be
     used to append a single string (item of type "<code class="literal">s</code>")
     the message, it returns a pointer to the destination area to
     the caller in pointer <em class="parameter"><code>p</code></em>. Space for the string
     of length <em class="parameter"><code>size</code></em> plus the terminating
-    <code class="constant">NUL</code> is allocated.</p></div><div class="refsect1"><a name="idm214168480256"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, those calls return 0 or a positive integer. On
-    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214169750000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The functions described here are available as a shared library,
+    <code class="constant">NUL</code> is allocated.</p></div><div class="refsect1"><a name="idm214186357680"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, those calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186348112"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The functions described here are available as a shared library,
     which can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214167904208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214186345200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>,
index b44c482f2826335797d3b97c67495aa63789b531..d18ca1a85824492e97458637f7519ff4fcfb79bc 100644 (file)
@@ -58,7 +58,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       <funcprototype>
         <funcdef>int sd_bus_message_append_string_memfd</funcdef>
         <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
-        <paramdef>sd_memfd *<parameter>memfd</parameter></paramdef>
+        <paramdef>int <parameter>memfd</parameter></paramdef>
       </funcprototype>
 
       <funcprototype>
@@ -135,7 +135,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <para>The functions described here are available as a shared library,
     which can be compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index 963abc252d48ac97a742cee7254927c5b8c62ead..77d966e68184243fdedda408df56f430dd36878b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_string_memfd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec, sd_bus_message_append_string_space — Attach a string to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>sd_memfd *<var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_space(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">s</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169135024"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The functions
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_string_memfd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec, sd_bus_message_append_string_space — Attach a string to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_memfd(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">memfd</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_iovec(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_string_space(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">s</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182424512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The functions
     <code class="function">sd_bus_message_append_string_memfd</code> and
     <code class="function">sd_bus_message_append_string_iovec</code> can be
     used to append a single string (item of type "<code class="literal">s</code>")
     the message, it returns a pointer to the destination area to
     the caller in pointer <em class="parameter"><code>p</code></em>. Space for the string
     of length <em class="parameter"><code>size</code></em> plus the terminating
-    <code class="constant">NUL</code> is allocated.</p></div><div class="refsect1"><a name="idm214168480256"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, those calls return 0 or a positive integer. On
-    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214169750000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The functions described here are available as a shared library,
+    <code class="constant">NUL</code> is allocated.</p></div><div class="refsect1"><a name="idm214186357680"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, those calls return 0 or a positive integer. On
+    failure, they returns a negative errno-style error code.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186348112"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The functions described here are available as a shared library,
     which can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214167904208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214186345200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>,
index 8141e6a520da2c50ebc25c65b58376ec7eb9bbbf..6bc426af7b64efbe24f0ea0979a57a19bc8f0a7e 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_MESSAGE_APPEND_STRV" "3" "" "systemd 215" "sd_bus_message_append_strv"
+.TH "SD_BUS_MESSAGE_APPEND_STRV" "3" "" "systemd 217" "sd_bus_message_append_strv"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -57,27 +57,27 @@ On success, this call returns 0 or a positive integer\&. On failure, a negative
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified parameter is invalid\&.
 .RE
 .PP
-\fI\-EPERM\fR
+\fB\-EPERM\fR
 .RS 4
 Message has been sealed\&.
 .RE
 .PP
-\fI\-ESTALE\fR
+\fB\-ESTALE\fR
 .RS 4
 Message is in invalid state\&.
 .RE
 .PP
-\fI\-ENXIO\fR
+\fB\-ENXIO\fR
 .RS 4
 Message cannot be appended to\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index adc34362f977c63061b9f91dbc4a367cb5b9645e..918d7837cf007c8a096186180cc25f81205991b0 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_append_strv"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_strv — Attach an array of strings to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_strv(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">l</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173257712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append</code> function can be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_append_strv"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_append_strv — Attach an array of strings to a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int sd_bus_message_append_strv(</code></td><td>sd_bus_message *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">l</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214187328320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="function">sd_bus_message_append</code> function can be
     used to append an array of strings to message
     <em class="parameter"><code>m</code></em>. The parameter <em class="parameter"><code>l</code></em>
     shall point to a <code class="constant">NULL</code>-terminated array of pointers
     containing the message and may be changed after this call. Note
     that the signature of <em class="parameter"><code>l</code></em> parameter is to be
     treated as <span class="type">const char *const *</span>, and the contents
-    will not be modified.</p></div><div class="refsect1"><a name="idm214172434464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this call returns 0 or a positive integer. On
-    failure, a negative errno-style error code is returned.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
-        </p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
-        </p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
-        </p></dd><dt id="-ENXIO"><span class="term"><code class="varname">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
-        </p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173186080"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_append_append_strv()</code> function
+    will not be modified.</p></div><div class="refsect1"><a name="idm214187320112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this call returns 0 or a positive integer. On
+    failure, a negative errno-style error code is returned.</p></div><div class="refsect1"><a name="errors"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid.
+        </p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>Message has been sealed.
+        </p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>Message is in invalid state.
+        </p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p>Message cannot be appended to.
+        </p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214187317888"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_append_append_strv()</code> function
     described here is available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214171672208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214191213072"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>,
index a4e8350f32861895112d234c2a9e9914806f27e3..898a7c464b9a87fad7464789290f91beb157ff64 100644 (file)
@@ -97,7 +97,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>The <function>sd_bus_append_append_strv()</function> function
     described here is available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index de6a3cd2ca72a9e8b797300bff507aadad3c05cf..8ac6ac8e5803d1c06b52d0e17ddb2821d697a305 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_MESSAGE_GET_COOKIE" "3" "" "systemd 215" "sd_bus_message_get_cookie"
+.TH "SD_BUS_MESSAGE_GET_COOKIE" "3" "" "systemd 217" "sd_bus_message_get_cookie"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -50,12 +50,12 @@ On success, the cookie/reply cookie is returned in the specified 64\-bit unsigne
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 A specified parameter is invalid\&.
 .RE
 .PP
-\fI\-ENODATA\fR
+\fB\-ENODATA\fR
 .RS 4
 No cookie has been assigned to this message\&. This either indicates that the message has not been sent yet and hence has no cookie assigned, or that the message is not a method response message and hence carries a reply cookie field\&.
 .RE
index 8ef6368a1cdbb6d9fe2a6084a7a1737e98ea8d5e..ec1c8ff20dbd99b53baea6f0d018cbce8399cfeb 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_get_cookie"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_cookie, sd_bus_message_get_reply_cookie — Returns the transaction cookie of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_reply_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214165938928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_cookie()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_get_cookie"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_cookie, sd_bus_message_get_reply_cookie — Returns the transaction cookie of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_reply_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169739968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_cookie()</code> returns
                 the transaction cookie of a message. The cookie
                 uniquely identifies a message within each bus peer,
                 but is not globally unique. It is assigned when a
                 cookie, only response messages carry a reply cookie
                 field.</p><p>Both functions take a message object as first
                 parameter and a place to store the 64-bit cookie
-                in.</p></div><div class="refsect1"><a name="idm214168449712"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                in.</p></div><div class="refsect1"><a name="idm214169736016"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
                 errno-style error code.</p><p>On success, the cookie/reply cookie is returned
-                in the specified 64-bit unsigned integer variable.</p></div><div class="refsect1"><a name="idm214167487344"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
-                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No cookie has been
+                in the specified 64-bit unsigned integer variable.</p></div><div class="refsect1"><a name="idm214169734144"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
+                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No cookie has been
                                 assigned to this message. This either
                                 indicates that the message has not
                                 been sent yet and hence has no cookie
                                 assigned, or that the message is not a
                                 method response message and hence
                                 carries a reply cookie
-                                field.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166489008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_message_get_cookie()</code>
+                                field.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173628000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_message_get_cookie()</code>
                 and <code class="function">sd_bus_message_get_reply_cookie()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214166665392"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214173623536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
                         <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>
index c761e5636fa38dd3d2e14772ab145774be82a253..3e3f9bd7be8acdb33ec9fcd5ef1b7a4521360959 100644 (file)
 
                 <variablelist>
                         <varlistentry>
-                                <term><varname>-EINVAL</varname></term>
+                                <term><constant>-EINVAL</constant></term>
 
                                 <listitem><para>A specified parameter
                                 is invalid.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-ENODATA</varname></term>
+                                <term><constant>-ENODATA</constant></term>
 
                                 <listitem><para>No cookie has been
                                 assigned to this message. This either
                 and <function>sd_bus_message_get_reply_cookie()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 867497efd1b4a2a31cd1df2bedba64030c57698b..11568d62a55824f15d1de9faaaf9d381cd46bfdf 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_MESSAGE_GET_MONOTONIC_USEC" "3" "" "systemd 215" "sd_bus_message_get_monotonic_usec"
+.TH "SD_BUS_MESSAGE_GET_MONOTONIC_USEC" "3" "" "systemd 217" "sd_bus_message_get_monotonic_usec"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -69,12 +69,12 @@ On success, the timestamp or sequence number is returned in the specified 64\-bi
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 A specified parameter is invalid\&.
 .RE
 .PP
-\fI\-ENODATA\fR
+\fB\-ENODATA\fR
 .RS 4
 No timestamp or sequence number information is attached to the passed message\&. This error is returned if the underlying transport does not support timestamping or assigning of sequence numbers, or if this feature has not been negotiated with
 \fBsd_bus_negotiate_timestamp\fR(3)\&.
index 1088e33271caa1f9278679e0736292e518db27f6..501de2987e7aa297e7a11c1a878613dbd3a0f63f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_get_monotonic_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_monotonic_usec, sd_bus_message_get_realtime_usec, sd_bus_message_get_seqnum — Retrieve the sender timestamps and sequence number of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_monotonic_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_realtime_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_seqnum</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">seqnum</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214167303664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_monotonic_usec()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_get_monotonic_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_monotonic_usec, sd_bus_message_get_realtime_usec, sd_bus_message_get_seqnum — Retrieve the sender timestamps and sequence number of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_monotonic_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_realtime_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_seqnum</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">seqnum</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192513472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_monotonic_usec()</code>
                 returns the monotonic timestamp of the time the
                 message was sent. This value is in microseconds since
                 the "<code class="literal">CLOCK_MONOTONIC</code>" epoch, see
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details.</p><p>Similar,
                 <code class="function">sd_bus_message_get_realtime_usec()</code>
                 returns the realtime (wallclock) timestamp of the time
                 some bus transports, and only after support for them
                 has been negotiated with the
                 <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>
-                call.</p></div><div class="refsect1"><a name="idm214166630240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                call.</p></div><div class="refsect1"><a name="idm214196401632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
                 errno-style error code.</p><p>On success, the timestamp or sequence number is
                 returned in the specified 64-bit unsigned integer
-                variable.</p></div><div class="refsect1"><a name="idm214166835648"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
-                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No timestamp or
+                variable.</p></div><div class="refsect1"><a name="idm214196399728"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
+                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No timestamp or
                                 sequence number information is
                                 attached to the passed message. This
                                 error is returned if the underlying
                                 timestamping or assigning of sequence
                                 numbers, or if this feature has not
                                 been negotiated with
-                                <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166448368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
+                                <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196393904"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
                 <code class="function">sd_bus_message_get_monotonic_usec()</code>,
                 <code class="function">sd_bus_message_get_realtime_usec()</code>,
                 and <code class="function">sd_bus_message_get_seqnum()</code>
                 interfaces are available as a shared library, which
                 can be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214168606432"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214196381440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
                         <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
                         <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
                         <a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a>
                 </p></div></div></body></html>
index 0a11a31230155c998ca080f3fe8ef65bffe39166..290faf2a5b41ea62f5cfe77f6b8faed2eb14d16e 100644 (file)
 
                 <variablelist>
                         <varlistentry>
-                                <term><varname>-EINVAL</varname></term>
+                                <term><constant>-EINVAL</constant></term>
 
                                 <listitem><para>A specified parameter
                                 is invalid.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-ENODATA</varname></term>
+                                <term><constant>-ENODATA</constant></term>
 
                                 <listitem><para>No timestamp or
                                 sequence number information is
                 and <function>sd_bus_message_get_seqnum()</function>
                 interfaces are available as a shared library, which
                 can be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 1088e33271caa1f9278679e0736292e518db27f6..501de2987e7aa297e7a11c1a878613dbd3a0f63f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_get_monotonic_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_monotonic_usec, sd_bus_message_get_realtime_usec, sd_bus_message_get_seqnum — Retrieve the sender timestamps and sequence number of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_monotonic_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_realtime_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_seqnum</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">seqnum</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214167303664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_monotonic_usec()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_get_monotonic_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_monotonic_usec, sd_bus_message_get_realtime_usec, sd_bus_message_get_seqnum — Retrieve the sender timestamps and sequence number of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_monotonic_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_realtime_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_seqnum</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">seqnum</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192513472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_monotonic_usec()</code>
                 returns the monotonic timestamp of the time the
                 message was sent. This value is in microseconds since
                 the "<code class="literal">CLOCK_MONOTONIC</code>" epoch, see
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details.</p><p>Similar,
                 <code class="function">sd_bus_message_get_realtime_usec()</code>
                 returns the realtime (wallclock) timestamp of the time
                 some bus transports, and only after support for them
                 has been negotiated with the
                 <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>
-                call.</p></div><div class="refsect1"><a name="idm214166630240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                call.</p></div><div class="refsect1"><a name="idm214196401632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
                 errno-style error code.</p><p>On success, the timestamp or sequence number is
                 returned in the specified 64-bit unsigned integer
-                variable.</p></div><div class="refsect1"><a name="idm214166835648"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
-                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No timestamp or
+                variable.</p></div><div class="refsect1"><a name="idm214196399728"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
+                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No timestamp or
                                 sequence number information is
                                 attached to the passed message. This
                                 error is returned if the underlying
                                 timestamping or assigning of sequence
                                 numbers, or if this feature has not
                                 been negotiated with
-                                <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166448368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
+                                <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196393904"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
                 <code class="function">sd_bus_message_get_monotonic_usec()</code>,
                 <code class="function">sd_bus_message_get_realtime_usec()</code>,
                 and <code class="function">sd_bus_message_get_seqnum()</code>
                 interfaces are available as a shared library, which
                 can be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214168606432"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214196381440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
                         <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
                         <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
                         <a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a>
                 </p></div></div></body></html>
index 8ef6368a1cdbb6d9fe2a6084a7a1737e98ea8d5e..ec1c8ff20dbd99b53baea6f0d018cbce8399cfeb 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_get_cookie"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_cookie, sd_bus_message_get_reply_cookie — Returns the transaction cookie of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_reply_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214165938928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_cookie()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_get_cookie"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_cookie, sd_bus_message_get_reply_cookie — Returns the transaction cookie of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_reply_cookie</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">cookie</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169739968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_cookie()</code> returns
                 the transaction cookie of a message. The cookie
                 uniquely identifies a message within each bus peer,
                 but is not globally unique. It is assigned when a
                 cookie, only response messages carry a reply cookie
                 field.</p><p>Both functions take a message object as first
                 parameter and a place to store the 64-bit cookie
-                in.</p></div><div class="refsect1"><a name="idm214168449712"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                in.</p></div><div class="refsect1"><a name="idm214169736016"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
                 errno-style error code.</p><p>On success, the cookie/reply cookie is returned
-                in the specified 64-bit unsigned integer variable.</p></div><div class="refsect1"><a name="idm214167487344"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
-                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No cookie has been
+                in the specified 64-bit unsigned integer variable.</p></div><div class="refsect1"><a name="idm214169734144"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
+                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No cookie has been
                                 assigned to this message. This either
                                 indicates that the message has not
                                 been sent yet and hence has no cookie
                                 assigned, or that the message is not a
                                 method response message and hence
                                 carries a reply cookie
-                                field.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166489008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_message_get_cookie()</code>
+                                field.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173628000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_message_get_cookie()</code>
                 and <code class="function">sd_bus_message_get_reply_cookie()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214166665392"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214173623536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
                         <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>
index 1088e33271caa1f9278679e0736292e518db27f6..501de2987e7aa297e7a11c1a878613dbd3a0f63f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_message_get_monotonic_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_monotonic_usec, sd_bus_message_get_realtime_usec, sd_bus_message_get_seqnum — Retrieve the sender timestamps and sequence number of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_monotonic_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_realtime_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_seqnum</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">seqnum</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214167303664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_monotonic_usec()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_message_get_monotonic_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_message_get_monotonic_usec, sd_bus_message_get_realtime_usec, sd_bus_message_get_seqnum — Retrieve the sender timestamps and sequence number of a message</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_monotonic_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_realtime_usec</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_message_get_seqnum</b>(</code></td><td>sd_bus_message *<var class="pdparam">message</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">seqnum</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192513472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_message_get_monotonic_usec()</code>
                 returns the monotonic timestamp of the time the
                 message was sent. This value is in microseconds since
                 the "<code class="literal">CLOCK_MONOTONIC</code>" epoch, see
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details.</p><p>Similar,
                 <code class="function">sd_bus_message_get_realtime_usec()</code>
                 returns the realtime (wallclock) timestamp of the time
                 some bus transports, and only after support for them
                 has been negotiated with the
                 <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>
-                call.</p></div><div class="refsect1"><a name="idm214166630240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                call.</p></div><div class="refsect1"><a name="idm214196401632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
                 errno-style error code.</p><p>On success, the timestamp or sequence number is
                 returned in the specified 64-bit unsigned integer
-                variable.</p></div><div class="refsect1"><a name="idm214166835648"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
-                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="varname">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No timestamp or
+                variable.</p></div><div class="refsect1"><a name="idm214196399728"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
+                                is invalid.</p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p>No timestamp or
                                 sequence number information is
                                 attached to the passed message. This
                                 error is returned if the underlying
                                 timestamping or assigning of sequence
                                 numbers, or if this feature has not
                                 been negotiated with
-                                <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166448368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
+                                <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196393904"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
                 <code class="function">sd_bus_message_get_monotonic_usec()</code>,
                 <code class="function">sd_bus_message_get_realtime_usec()</code>,
                 and <code class="function">sd_bus_message_get_seqnum()</code>
                 interfaces are available as a shared library, which
                 can be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214168606432"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214196381440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
                         <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
                         <a href="sd_bus_negotiate_timestamp.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamp</span>(3)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
                         <a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a>
                 </p></div></div></body></html>
index 5661e46548f4237f92f843a311bc7dca4aa6a533..8e1ae5e6e9fc113818c75191ee120f869ea9345e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_negotiate_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_negotiate_fds, sd_bus_negotiate_timestamps, sd_bus_negotiate_creds — Control feature negotiation on bus connections</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_fds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_timestamp</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_creds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169882656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_negotiate_fds()</code> controls whether
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_negotiate_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_negotiate_fds, sd_bus_negotiate_timestamps, sd_bus_negotiate_creds — Control feature negotiation on bus connections</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_fds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_timestamp</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_creds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182561168"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_negotiate_fds()</code> controls whether
     file descriptor passing shall be negotiated for the specified bus
     connection. It takes a bus object and a boolean, which, when true,
     enables file descriptor passing, and, when false, disables it. Note
     are attached by the kernel and cannot be manipulated by
     userspace. By default, no sender credentials are attached.</p><p>These functions may be called only before the connection has
     been started with
-    <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214169485440"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions returns 0 or a
+    <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214186446144"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions returns 0 or a
     positive integer. On failure, they return a negative errno-style
-    error code.</p></div><div class="refsect1"><a name="idm214170824416"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>The bus connection has already been started.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170355552"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_negotiate_fs()</code> and the other
+    error code.</p></div><div class="refsect1"><a name="idm214186444816"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>The bus connection has already been started.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186441760"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_negotiate_fs()</code> and the other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214171086400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214186430896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>,
index 067a287f1e471140a93ceabce9a33d576612188c..f818af4d245d3c8314f86b0856c6074ede2109f7 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_NEGOTIATE_FDS" "3" "" "systemd 215" "sd_bus_negotiate_fds"
+.TH "SD_BUS_NEGOTIATE_FDS" "3" "" "systemd 217" "sd_bus_negotiate_fds"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -73,7 +73,7 @@ On success, these functions returns 0 or a positive integer\&. On failure, they
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EPERM\fR
+\fB\-EPERM\fR
 .RS 4
 The bus connection has already been started\&.
 .RE
index 5661e46548f4237f92f843a311bc7dca4aa6a533..8e1ae5e6e9fc113818c75191ee120f869ea9345e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_negotiate_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_negotiate_fds, sd_bus_negotiate_timestamps, sd_bus_negotiate_creds — Control feature negotiation on bus connections</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_fds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_timestamp</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_creds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169882656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_negotiate_fds()</code> controls whether
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_negotiate_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_negotiate_fds, sd_bus_negotiate_timestamps, sd_bus_negotiate_creds — Control feature negotiation on bus connections</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_fds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_timestamp</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_creds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182561168"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_negotiate_fds()</code> controls whether
     file descriptor passing shall be negotiated for the specified bus
     connection. It takes a bus object and a boolean, which, when true,
     enables file descriptor passing, and, when false, disables it. Note
     are attached by the kernel and cannot be manipulated by
     userspace. By default, no sender credentials are attached.</p><p>These functions may be called only before the connection has
     been started with
-    <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214169485440"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions returns 0 or a
+    <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214186446144"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions returns 0 or a
     positive integer. On failure, they return a negative errno-style
-    error code.</p></div><div class="refsect1"><a name="idm214170824416"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>The bus connection has already been started.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170355552"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_negotiate_fs()</code> and the other
+    error code.</p></div><div class="refsect1"><a name="idm214186444816"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>The bus connection has already been started.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186441760"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_negotiate_fs()</code> and the other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214171086400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214186430896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>,
index 09563f8f7ffa837d8e600e6d1dba451b8d4048b4..fb313e34fb2013c0ae174b45cb875c699891b1b7 100644 (file)
@@ -143,7 +143,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <variablelist>
       <varlistentry>
-        <term><varname>-EPERM</varname></term>
+        <term><constant>-EPERM</constant></term>
 
         <listitem><para>The bus connection has already been started.</para></listitem>
       </varlistentry>
@@ -156,7 +156,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_negotiate_fs()</function> and the other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index 5661e46548f4237f92f843a311bc7dca4aa6a533..8e1ae5e6e9fc113818c75191ee120f869ea9345e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_negotiate_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_negotiate_fds, sd_bus_negotiate_timestamps, sd_bus_negotiate_creds — Control feature negotiation on bus connections</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_fds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_timestamp</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_creds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169882656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_negotiate_fds()</code> controls whether
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_negotiate_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_negotiate_fds, sd_bus_negotiate_timestamps, sd_bus_negotiate_creds — Control feature negotiation on bus connections</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_fds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_timestamp</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_negotiate_creds</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">b</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182561168"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_negotiate_fds()</code> controls whether
     file descriptor passing shall be negotiated for the specified bus
     connection. It takes a bus object and a boolean, which, when true,
     enables file descriptor passing, and, when false, disables it. Note
     are attached by the kernel and cannot be manipulated by
     userspace. By default, no sender credentials are attached.</p><p>These functions may be called only before the connection has
     been started with
-    <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214169485440"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions returns 0 or a
+    <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214186446144"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions returns 0 or a
     positive integer. On failure, they return a negative errno-style
-    error code.</p></div><div class="refsect1"><a name="idm214170824416"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>The bus connection has already been started.</p></dd></dl></div></div><div class="refsect1"><a name="idm214170355552"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_negotiate_fs()</code> and the other
+    error code.</p></div><div class="refsect1"><a name="idm214186444816"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p>The bus connection has already been started.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186441760"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_negotiate_fs()</code> and the other
     functions described here are available as a shared library, which
     can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214171086400"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214186430896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_start.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_start</span>(3)</span></a>,
index 51fd3f1a9e8a8cf8a6970ca2c589644532d892ee..98769d956bb6d6ac7b732ed2e5b5ab7ad8513efe 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_NEW" "3" "" "systemd 215" "sd_bus_new"
+.TH "SD_BUS_NEW" "3" "" "systemd 217" "sd_bus_new"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -70,7 +70,7 @@ always returns
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index b0918107d804cdd5dfdff89e932198590e550f5e..2bcbc737d5404b1f10c0dd4c5daf422a87bb465b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_new, sd_bus_ref, sd_bus_unref — Create a new bus object and create or destroy references to it</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_new</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_ref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_unref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214198019136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_new()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_new, sd_bus_ref, sd_bus_unref — Create a new bus object and create or destroy references to it</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_new</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_ref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_unref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188703008"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_new()</code> creates a new bus
     object. This object is reference-counted, and will be destroyed
     when all references are gone. Initially, the caller of this
     function owns the sole reference.</p><p><code class="function">sd_bus_ref()</code> creates a new reference to
     zero, <em class="parameter"><code>bus</code></em> cannot be used anymore, so
     further calls to <code class="function">sd_bus_ref()</code> or
     <code class="function">sd_bus_unref()</code> are illegal.</p><p><code class="function">sd_bus_unref()</code> destroys a reference to
-    <em class="parameter"><code>bus</code></em>.</p></div><div class="refsect1"><a name="idm214201910768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_new()</code> returns 0 or a
+    <em class="parameter"><code>bus</code></em>.</p></div><div class="refsect1"><a name="idm214192594352"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_new()</code> returns 0 or a
     positive integer. On failure, it returns a negative errno-style
     error code.</p><p><code class="function">sd_bus_ref</code> always returns the argument.
     </p><p><code class="function">sd_bus_unref</code> always returns
-    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214201906368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214201903264"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_new()</code> and other functions
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214192589952"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192586848"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_new()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214201900048"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214192583312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>,
index b36d66cca600162384ad0cbe1df414d96a97aeae..8c56dc0d20c22866693c6bd326f2b3b3d3cda0dc 100644 (file)
@@ -112,7 +112,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <variablelist>
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
         <listitem><para>Memory allocation failed.</para></listitem>
       </varlistentry>
@@ -125,7 +125,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_new()</function> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index 751aa00ecd6d15316a70d836ed753cddc162564e..eb22562e08d7c56ca8de5a51077145060ad52e54 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214201032336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194775536"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
     object and opens a connection to the user bus.
     <code class="function">sd_bus_open_system()</code> does the same, but
     connects to the system bus.</p><p>If the <code class="varname">$DBUS_SESSION_BUS_ADDRESS</code> environment
     variable is set
-    (cf. <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
+    (cf. <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
     it will be used as the address of the user bus. This variable can
     contain multiple addresses separated by "<code class="literal">;</code>". If
     this variable is not set, a suitable default for the default user
@@ -48,9 +48,9 @@
     <code class="function">sd_bus_default_user()</code>, and subsequent
     invocations returns a reference to the same object.</p><p><code class="function">sd_bus_default_system()</code> is similar to
     <code class="function">sd_bus_default_user()</code>, but connects to the
-    system bus.</p></div><div class="refsect1"><a name="idm214201008656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+    system bus.</p></div><div class="refsect1"><a name="idm214194751488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
     integer. On failure, these calls return a negative
-    errno-style error code.</p></div><div class="refsect1"><a name="idm214201007328"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214194750160"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
     <code class="function">sd_bus_open_system()</code>,
     <code class="function">sd_bus_open_system_remote()</code>, and
     <code class="function">sd_bus_open_system_machine()</code> return a new
     <a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a>.
     </p><p>The functions <code class="function">sd_bus_default_user()</code> and
     <code class="function">sd_bus_default_system()</code> do not create a new
-    reference.</p></div><div class="refsect1"><a name="idm214201000368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
-      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    reference.</p></div><div class="refsect1"><a name="idm214194743200"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
+      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200994176"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194737008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214200991008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214194733568"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
index 751aa00ecd6d15316a70d836ed753cddc162564e..eb22562e08d7c56ca8de5a51077145060ad52e54 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214201032336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194775536"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
     object and opens a connection to the user bus.
     <code class="function">sd_bus_open_system()</code> does the same, but
     connects to the system bus.</p><p>If the <code class="varname">$DBUS_SESSION_BUS_ADDRESS</code> environment
     variable is set
-    (cf. <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
+    (cf. <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
     it will be used as the address of the user bus. This variable can
     contain multiple addresses separated by "<code class="literal">;</code>". If
     this variable is not set, a suitable default for the default user
@@ -48,9 +48,9 @@
     <code class="function">sd_bus_default_user()</code>, and subsequent
     invocations returns a reference to the same object.</p><p><code class="function">sd_bus_default_system()</code> is similar to
     <code class="function">sd_bus_default_user()</code>, but connects to the
-    system bus.</p></div><div class="refsect1"><a name="idm214201008656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+    system bus.</p></div><div class="refsect1"><a name="idm214194751488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
     integer. On failure, these calls return a negative
-    errno-style error code.</p></div><div class="refsect1"><a name="idm214201007328"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214194750160"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
     <code class="function">sd_bus_open_system()</code>,
     <code class="function">sd_bus_open_system_remote()</code>, and
     <code class="function">sd_bus_open_system_machine()</code> return a new
     <a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a>.
     </p><p>The functions <code class="function">sd_bus_default_user()</code> and
     <code class="function">sd_bus_default_system()</code> do not create a new
-    reference.</p></div><div class="refsect1"><a name="idm214201000368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
-      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    reference.</p></div><div class="refsect1"><a name="idm214194743200"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
+      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200994176"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194737008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214200991008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214194733568"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
index 751aa00ecd6d15316a70d836ed753cddc162564e..eb22562e08d7c56ca8de5a51077145060ad52e54 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214201032336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194775536"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
     object and opens a connection to the user bus.
     <code class="function">sd_bus_open_system()</code> does the same, but
     connects to the system bus.</p><p>If the <code class="varname">$DBUS_SESSION_BUS_ADDRESS</code> environment
     variable is set
-    (cf. <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
+    (cf. <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
     it will be used as the address of the user bus. This variable can
     contain multiple addresses separated by "<code class="literal">;</code>". If
     this variable is not set, a suitable default for the default user
@@ -48,9 +48,9 @@
     <code class="function">sd_bus_default_user()</code>, and subsequent
     invocations returns a reference to the same object.</p><p><code class="function">sd_bus_default_system()</code> is similar to
     <code class="function">sd_bus_default_user()</code>, but connects to the
-    system bus.</p></div><div class="refsect1"><a name="idm214201008656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+    system bus.</p></div><div class="refsect1"><a name="idm214194751488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
     integer. On failure, these calls return a negative
-    errno-style error code.</p></div><div class="refsect1"><a name="idm214201007328"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214194750160"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
     <code class="function">sd_bus_open_system()</code>,
     <code class="function">sd_bus_open_system_remote()</code>, and
     <code class="function">sd_bus_open_system_machine()</code> return a new
     <a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a>.
     </p><p>The functions <code class="function">sd_bus_default_user()</code> and
     <code class="function">sd_bus_default_system()</code> do not create a new
-    reference.</p></div><div class="refsect1"><a name="idm214201000368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
-      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    reference.</p></div><div class="refsect1"><a name="idm214194743200"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
+      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200994176"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194737008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214200991008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214194733568"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
index 256fc5645acb69f1c8c770bdbb71987be0db5b2c..c771e5be9faf86fb48fff995561a8ce31df832dc 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_OPEN_USER" "3" "" "systemd 215" "sd_bus_open_user"
+.TH "SD_BUS_OPEN_USER" "3" "" "systemd 217" "sd_bus_open_user"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -104,13 +104,13 @@ do not create a new reference\&.
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 Specified parameter is invalid (\fBNULL\fR
 in case of output parameters)\&.
 .RE
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
 Memory allocation failed\&.
 .RE
index 751aa00ecd6d15316a70d836ed753cddc162564e..eb22562e08d7c56ca8de5a51077145060ad52e54 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214201032336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_open_user"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_open_user, sd_bus_open_system, sd_bus_open_system_remote, sd_bus_open_system_container, sd_bus_default_user, sd_bus_default_system — Open a connection to the system or user bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_remote</b>(</code></td><td>const char *<var class="pdparam">host</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_open_system_container</b>(</code></td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_user</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_default_system</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194775536"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_open_user()</code> creates a new bus
     object and opens a connection to the user bus.
     <code class="function">sd_bus_open_system()</code> does the same, but
     connects to the system bus.</p><p>If the <code class="varname">$DBUS_SESSION_BUS_ADDRESS</code> environment
     variable is set
-    (cf. <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
+    (cf. <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>),
     it will be used as the address of the user bus. This variable can
     contain multiple addresses separated by "<code class="literal">;</code>". If
     this variable is not set, a suitable default for the default user
@@ -48,9 +48,9 @@
     <code class="function">sd_bus_default_user()</code>, and subsequent
     invocations returns a reference to the same object.</p><p><code class="function">sd_bus_default_system()</code> is similar to
     <code class="function">sd_bus_default_user()</code>, but connects to the
-    system bus.</p></div><div class="refsect1"><a name="idm214201008656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+    system bus.</p></div><div class="refsect1"><a name="idm214194751488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
     integer. On failure, these calls return a negative
-    errno-style error code.</p></div><div class="refsect1"><a name="idm214201007328"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214194750160"></a><h2 id="Reference ownership">Reference ownership<a class="headerlink" title="Permalink to this headline" href="#Reference%20ownership">¶</a></h2><p>Functions <code class="function">sd_bus_open_user()</code>,
     <code class="function">sd_bus_open_system()</code>,
     <code class="function">sd_bus_open_system_remote()</code>, and
     <code class="function">sd_bus_open_system_machine()</code> return a new
     <a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a>.
     </p><p>The functions <code class="function">sd_bus_default_user()</code> and
     <code class="function">sd_bus_default_system()</code> do not create a new
-    reference.</p></div><div class="refsect1"><a name="idm214201000368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
-      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
+    reference.</p></div><div class="refsect1"><a name="idm214194743200"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><p>In addition, any further connection-related errors may be
+      by returned. See <a href="sd_bus_send.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_send</span>(3)</span></a>.</p><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>Specified parameter is invalid
         (<code class="constant">NULL</code> in case of output
-        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200994176"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
+        parameters).</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194737008"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_open_user()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214200991008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214194733568"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>,
index 740977e1cfd5455470a4fd8f515c9ae44cad7c3f..47f836148636376d377819197ecfc893c40ddc87 100644 (file)
@@ -102,7 +102,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <para>If the <varname>$DBUS_SESSION_BUS_ADDRESS</varname> environment
     variable is set
-    (cf. <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
+    (cf. <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
     it will be used as the address of the user bus. This variable can
     contain multiple addresses separated by <literal>;</literal>. If
     this variable is not set, a suitable default for the default user
@@ -171,7 +171,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <variablelist>
 
       <varlistentry>
-        <term><varname>-EINVAL</varname></term>
+        <term><constant>-EINVAL</constant></term>
 
         <listitem><para>Specified parameter is invalid
         (<constant>NULL</constant> in case of output
@@ -179,7 +179,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
         <listitem><para>Memory allocation failed.</para></listitem>
       </varlistentry>
@@ -195,7 +195,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_open_user()</function> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index f945a48fac3db43b02578fe15dbdf2e7deb3f147..ed1966fcd9eac971619e3e7f8914251d551f1e9d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_path_encode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_path_encode, sd_bus_path_decode — Convert an external identifier into an object path and back</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_encode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">external_id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_decode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_external_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214181642128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_path_encode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_path_encode, sd_bus_path_decode — Convert an external identifier into an object path and back</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_encode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">external_id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_decode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_external_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185589568"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
     <code class="function">sd_bus_path_decode()</code> convert external
     identifier strings into object paths and back. These functions are
     useful to map application-specific string identifiers of any kind
@@ -49,7 +49,7 @@
     external identifier string.</p><p>The escaping used will replace all characters which are
     invalid in a bus object path by "<code class="literal">_</code>", followed by a
     hexadecimal value. As a special case, the empty string will be
-    replaced by a lone "<code class="literal">_</code>".</p></div><div class="refsect1"><a name="idm214185531008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_path_encode()</code>
+    replaced by a lone "<code class="literal">_</code>".</p></div><div class="refsect1"><a name="idm214189477488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_path_encode()</code>
     returns positive or 0, and a valid bus path in the return
     argument. On success, <code class="function">sd_bus_path_decode()</code>
     returns a positive value if the prefixed matched, or 0 if it
     the return parameter. On failure, a negative errno-style error
     number is returned by either function. The returned strings must
     be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>'d
-    by the caller.</p></div><div class="refsect1"><a name="idm214185527104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>'d
+    by the caller.</p></div><div class="refsect1"><a name="idm214189473264"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
     <code class="function">sd_bus_path_decode()</code> are available as a
     shared library, which can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214185523200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214189469088"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
     </p></div></div></body></html>
index 2eec3d9eb2d8ba59ec22f817dd29953ebf4bef2d..4da57b3bf223f5f9fb4ec796b09fd4edc7795533 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_PATH_ENCODE" "3" "" "systemd 215" "sd_bus_path_encode"
+.TH "SD_BUS_PATH_ENCODE" "3" "" "systemd 217" "sd_bus_path_encode"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index f945a48fac3db43b02578fe15dbdf2e7deb3f147..ed1966fcd9eac971619e3e7f8914251d551f1e9d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_path_encode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_path_encode, sd_bus_path_decode — Convert an external identifier into an object path and back</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_encode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">external_id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_decode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_external_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214181642128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_path_encode"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_path_encode, sd_bus_path_decode — Convert an external identifier into an object path and back</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_encode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">external_id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_path_decode</b>(</code></td><td>const char *<var class="pdparam">prefix</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret_external_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185589568"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
     <code class="function">sd_bus_path_decode()</code> convert external
     identifier strings into object paths and back. These functions are
     useful to map application-specific string identifiers of any kind
@@ -49,7 +49,7 @@
     external identifier string.</p><p>The escaping used will replace all characters which are
     invalid in a bus object path by "<code class="literal">_</code>", followed by a
     hexadecimal value. As a special case, the empty string will be
-    replaced by a lone "<code class="literal">_</code>".</p></div><div class="refsect1"><a name="idm214185531008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_path_encode()</code>
+    replaced by a lone "<code class="literal">_</code>".</p></div><div class="refsect1"><a name="idm214189477488"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_path_encode()</code>
     returns positive or 0, and a valid bus path in the return
     argument. On success, <code class="function">sd_bus_path_decode()</code>
     returns a positive value if the prefixed matched, or 0 if it
     the return parameter. On failure, a negative errno-style error
     number is returned by either function. The returned strings must
     be
-    <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>'d
-    by the caller.</p></div><div class="refsect1"><a name="idm214185527104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
+    <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>'d
+    by the caller.</p></div><div class="refsect1"><a name="idm214189473264"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_path_encode()</code> and
     <code class="function">sd_bus_path_decode()</code> are available as a
     shared library, which can be compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214185523200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214189469088"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
-      <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+      <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
     </p></div></div></body></html>
index 5849127bedaf73fb4ad2a9bd27773f0a46a6a82c..c96b0ac8056f423f025c2777c43da28150fc1a13 100644 (file)
@@ -123,7 +123,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     the return parameter. On failure, a negative errno-style error
     number is returned by either function. The returned strings must
     be
-    <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>'d
+    <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>'d
     by the caller.</para>
   </refsect1>
 
@@ -133,7 +133,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_bus_path_encode()</function> and
     <function>sd_bus_path_decode()</function> are available as a
     shared library, which can be compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
@@ -143,7 +143,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+      <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>
   </refsect1>
 
index b0918107d804cdd5dfdff89e932198590e550f5e..2bcbc737d5404b1f10c0dd4c5daf422a87bb465b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_new, sd_bus_ref, sd_bus_unref — Create a new bus object and create or destroy references to it</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_new</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_ref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_unref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214198019136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_new()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_new, sd_bus_ref, sd_bus_unref — Create a new bus object and create or destroy references to it</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_new</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_ref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_unref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188703008"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_new()</code> creates a new bus
     object. This object is reference-counted, and will be destroyed
     when all references are gone. Initially, the caller of this
     function owns the sole reference.</p><p><code class="function">sd_bus_ref()</code> creates a new reference to
     zero, <em class="parameter"><code>bus</code></em> cannot be used anymore, so
     further calls to <code class="function">sd_bus_ref()</code> or
     <code class="function">sd_bus_unref()</code> are illegal.</p><p><code class="function">sd_bus_unref()</code> destroys a reference to
-    <em class="parameter"><code>bus</code></em>.</p></div><div class="refsect1"><a name="idm214201910768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_new()</code> returns 0 or a
+    <em class="parameter"><code>bus</code></em>.</p></div><div class="refsect1"><a name="idm214192594352"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_new()</code> returns 0 or a
     positive integer. On failure, it returns a negative errno-style
     error code.</p><p><code class="function">sd_bus_ref</code> always returns the argument.
     </p><p><code class="function">sd_bus_unref</code> always returns
-    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214201906368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214201903264"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_new()</code> and other functions
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214192589952"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192586848"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_new()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214201900048"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214192583312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>,
index 4caf9281df7d46e8718fe273f5845bad18979179..ee0ae7507b4de2313835eb10969feedb26735c5d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_request_name"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_request_name, sd_bus_release_name — Request or release a well-known name on a bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_request_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_release_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192288720"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_request_name()</code> requests
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_request_name"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_request_name, sd_bus_release_name — Request or release a well-known name on a bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_request_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_release_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193270672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_request_name()</code> requests
                 a well-known name on a bus. It takes a bus connection,
                 a valid bus name and a flags parameter. The flags
                 parameter is a combination of the following
@@ -41,7 +41,7 @@
                                 of the name when the name is already
                                 taken.</p></dd></dl></div><p><code class="function">sd_bus_release_name()</code> releases
                 an acquired well-known name. It takes a bus connection
-                and a valid bus name as parameters.</p></div><div class="refsect1"><a name="idm214196178624"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                and a valid bus name as parameters.</p></div><div class="refsect1"><a name="idm214197159440"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
                 errno-style error code.</p><p>If <code class="varname">SD_BUS_NAME_QUEUE</code> is
                 specified, <code class="function">sd_bus_request_name()</code>
                 signals to be notified when the name is successfully
                 acquired. <code class="function">sd_bus_request_name()</code>
                 returns &gt; 0 when the name has immediately been
-                acquired successfully.</p></div><div class="refsect1"><a name="idm214196173680"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EALREADY"><span class="term"><code class="varname">-EALREADY</code></span><a class="headerlink" title="Permalink to this term" href="#-EALREADY">¶</a></dt><dd><p>The caller already is
+                acquired successfully.</p></div><div class="refsect1"><a name="idm214197154544"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EALREADY"><span class="term"><code class="constant">-EALREADY</code></span><a class="headerlink" title="Permalink to this term" href="#-EALREADY">¶</a></dt><dd><p>The caller already is
                                 the owner of the specified
-                                name.</p></dd><dt id="-EEXIST"><span class="term"><code class="varname">-EEXIST</code></span><a class="headerlink" title="Permalink to this term" href="#-EEXIST">¶</a></dt><dd><p>The name has already
+                                name.</p></dd><dt id="-EEXIST"><span class="term"><code class="constant">-EEXIST</code></span><a class="headerlink" title="Permalink to this term" href="#-EEXIST">¶</a></dt><dd><p>The name has already
                                 been acquired by a different peer, and
                                 SD_BUS_NAME_REPLACE_EXISTING was not
                                 specified or the other peer did not
                                 specify SD_BUS_NAME_ALLOW_REPLACEMENT
                                 while acquiring the
-                                name.</p></dd><dt id="-ESRCH"><span class="term"><code class="varname">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>It was attempted to
+                                name.</p></dd><dt id="-ESRCH"><span class="term"><code class="constant">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>It was attempted to
                                 release a name that is currently not
                                 registered on the
-                                bus.</p></dd><dt id="-EADDRINUSE"><span class="term"><code class="varname">-EADDRINUSE</code></span><a class="headerlink" title="Permalink to this term" href="#-EADDRINUSE">¶</a></dt><dd><p>It was attempted to
+                                bus.</p></dd><dt id="-EADDRINUSE"><span class="term"><code class="constant">-EADDRINUSE</code></span><a class="headerlink" title="Permalink to this term" href="#-EADDRINUSE">¶</a></dt><dd><p>It was attempted to
                                 release a name that is owned by a
                                 different peer on the
-                                bus.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
-                                is invalid.</p></dd><dt id="-ENOTCONN"><span class="term"><code class="varname">-ENOTCONN</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTCONN">¶</a></dt><dd><p>The bus connection has
-                                been disconnected.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The bus connection has
+                                bus.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
+                                is invalid.</p></dd><dt id="-ENOTCONN"><span class="term"><code class="constant">-ENOTCONN</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTCONN">¶</a></dt><dd><p>The bus connection has
+                                been disconnected.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The bus connection has
                                 been created in a different process
-                                than the current one.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196153616"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_acquire_name()</code>
+                                than the current one.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197134496"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_acquire_name()</code>
                 and <code class="function">sd_bus_release_name()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214196149504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214197130064"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
                         <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>
index 5b8907ca49cc4bed4325e6a8cb01cf531e223e0d..33947caab9d3b85070b0ac5491edc53119e6e9e7 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_BUS_REQUEST_NAME" "3" "" "systemd 215" "sd_bus_request_name"
+.TH "SD_BUS_REQUEST_NAME" "3" "" "systemd 217" "sd_bus_request_name"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -77,37 +77,37 @@ returns > 0 when the name has immediately been acquired successfully\&.
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-EALREADY\fR
+\fB\-EALREADY\fR
 .RS 4
 The caller already is the owner of the specified name\&.
 .RE
 .PP
-\fI\-EEXIST\fR
+\fB\-EEXIST\fR
 .RS 4
 The name has already been acquired by a different peer, and SD_BUS_NAME_REPLACE_EXISTING was not specified or the other peer did not specify SD_BUS_NAME_ALLOW_REPLACEMENT while acquiring the name\&.
 .RE
 .PP
-\fI\-ESRCH\fR
+\fB\-ESRCH\fR
 .RS 4
 It was attempted to release a name that is currently not registered on the bus\&.
 .RE
 .PP
-\fI\-EADDRINUSE\fR
+\fB\-EADDRINUSE\fR
 .RS 4
 It was attempted to release a name that is owned by a different peer on the bus\&.
 .RE
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 A specified parameter is invalid\&.
 .RE
 .PP
-\fI\-ENOTCONN\fR
+\fB\-ENOTCONN\fR
 .RS 4
 The bus connection has been disconnected\&.
 .RE
 .PP
-\fI\-ECHILD\fR
+\fB\-ECHILD\fR
 .RS 4
 The bus connection has been created in a different process than the current one\&.
 .RE
index 4caf9281df7d46e8718fe273f5845bad18979179..ee0ae7507b4de2313835eb10969feedb26735c5d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_request_name"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_request_name, sd_bus_release_name — Request or release a well-known name on a bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_request_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_release_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192288720"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_request_name()</code> requests
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_request_name"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_request_name, sd_bus_release_name — Request or release a well-known name on a bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_request_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_release_name</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193270672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_request_name()</code> requests
                 a well-known name on a bus. It takes a bus connection,
                 a valid bus name and a flags parameter. The flags
                 parameter is a combination of the following
@@ -41,7 +41,7 @@
                                 of the name when the name is already
                                 taken.</p></dd></dl></div><p><code class="function">sd_bus_release_name()</code> releases
                 an acquired well-known name. It takes a bus connection
-                and a valid bus name as parameters.</p></div><div class="refsect1"><a name="idm214196178624"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                and a valid bus name as parameters.</p></div><div class="refsect1"><a name="idm214197159440"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
                 errno-style error code.</p><p>If <code class="varname">SD_BUS_NAME_QUEUE</code> is
                 specified, <code class="function">sd_bus_request_name()</code>
                 signals to be notified when the name is successfully
                 acquired. <code class="function">sd_bus_request_name()</code>
                 returns &gt; 0 when the name has immediately been
-                acquired successfully.</p></div><div class="refsect1"><a name="idm214196173680"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EALREADY"><span class="term"><code class="varname">-EALREADY</code></span><a class="headerlink" title="Permalink to this term" href="#-EALREADY">¶</a></dt><dd><p>The caller already is
+                acquired successfully.</p></div><div class="refsect1"><a name="idm214197154544"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EALREADY"><span class="term"><code class="constant">-EALREADY</code></span><a class="headerlink" title="Permalink to this term" href="#-EALREADY">¶</a></dt><dd><p>The caller already is
                                 the owner of the specified
-                                name.</p></dd><dt id="-EEXIST"><span class="term"><code class="varname">-EEXIST</code></span><a class="headerlink" title="Permalink to this term" href="#-EEXIST">¶</a></dt><dd><p>The name has already
+                                name.</p></dd><dt id="-EEXIST"><span class="term"><code class="constant">-EEXIST</code></span><a class="headerlink" title="Permalink to this term" href="#-EEXIST">¶</a></dt><dd><p>The name has already
                                 been acquired by a different peer, and
                                 SD_BUS_NAME_REPLACE_EXISTING was not
                                 specified or the other peer did not
                                 specify SD_BUS_NAME_ALLOW_REPLACEMENT
                                 while acquiring the
-                                name.</p></dd><dt id="-ESRCH"><span class="term"><code class="varname">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>It was attempted to
+                                name.</p></dd><dt id="-ESRCH"><span class="term"><code class="constant">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p>It was attempted to
                                 release a name that is currently not
                                 registered on the
-                                bus.</p></dd><dt id="-EADDRINUSE"><span class="term"><code class="varname">-EADDRINUSE</code></span><a class="headerlink" title="Permalink to this term" href="#-EADDRINUSE">¶</a></dt><dd><p>It was attempted to
+                                bus.</p></dd><dt id="-EADDRINUSE"><span class="term"><code class="constant">-EADDRINUSE</code></span><a class="headerlink" title="Permalink to this term" href="#-EADDRINUSE">¶</a></dt><dd><p>It was attempted to
                                 release a name that is owned by a
                                 different peer on the
-                                bus.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
-                                is invalid.</p></dd><dt id="-ENOTCONN"><span class="term"><code class="varname">-ENOTCONN</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTCONN">¶</a></dt><dd><p>The bus connection has
-                                been disconnected.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The bus connection has
+                                bus.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>A specified parameter
+                                is invalid.</p></dd><dt id="-ENOTCONN"><span class="term"><code class="constant">-ENOTCONN</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTCONN">¶</a></dt><dd><p>The bus connection has
+                                been disconnected.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The bus connection has
                                 been created in a different process
-                                than the current one.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196153616"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_acquire_name()</code>
+                                than the current one.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197134496"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_bus_acquire_name()</code>
                 and <code class="function">sd_bus_release_name()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214196149504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214197130064"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
                         <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>
index e3a9266e4728b612c91d396cafb06aff426e3c1f..ca082183cca7e4f3719dd873bdcf4c002452d5e5 100644 (file)
 
                 <variablelist>
                         <varlistentry>
-                                <term><varname>-EALREADY</varname></term>
+                                <term><constant>-EALREADY</constant></term>
 
                                 <listitem><para>The caller already is
                                 the owner of the specified
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-EEXIST</varname></term>
+                                <term><constant>-EEXIST</constant></term>
 
                                 <listitem><para>The name has already
                                 been acquired by a different peer, and
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-ESRCH</varname></term>
+                                <term><constant>-ESRCH</constant></term>
 
                                 <listitem><para>It was attempted to
                                 release a name that is currently not
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-EADDRINUSE</varname></term>
+                                <term><constant>-EADDRINUSE</constant></term>
 
                                 <listitem><para>It was attempted to
                                 release a name that is owned by a
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-EINVAL</varname></term>
+                                <term><constant>-EINVAL</constant></term>
 
                                 <listitem><para>A specified parameter
                                 is invalid.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-ENOTCONN</varname></term>
+                                <term><constant>-ENOTCONN</constant></term>
 
                                 <listitem><para>The bus connection has
                                 been disconnected.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-ECHILD</varname></term>
+                                <term><constant>-ECHILD</constant></term>
 
                                 <listitem><para>The bus connection has
                                 been created in a different process
                 and <function>sd_bus_release_name()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index b0918107d804cdd5dfdff89e932198590e550f5e..2bcbc737d5404b1f10c0dd4c5daf422a87bb465b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_bus_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_new, sd_bus_ref, sd_bus_unref — Create a new bus object and create or destroy references to it</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_new</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_ref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_unref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214198019136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_new()</code> creates a new bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_bus_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_bus_new, sd_bus_ref, sd_bus_unref — Create a new bus object and create or destroy references to it</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_bus_new</b>(</code></td><td>sd_bus **<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_ref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_bus_unref</b>(</code></td><td>sd_bus *<var class="pdparam">bus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188703008"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_bus_new()</code> creates a new bus
     object. This object is reference-counted, and will be destroyed
     when all references are gone. Initially, the caller of this
     function owns the sole reference.</p><p><code class="function">sd_bus_ref()</code> creates a new reference to
     zero, <em class="parameter"><code>bus</code></em> cannot be used anymore, so
     further calls to <code class="function">sd_bus_ref()</code> or
     <code class="function">sd_bus_unref()</code> are illegal.</p><p><code class="function">sd_bus_unref()</code> destroys a reference to
-    <em class="parameter"><code>bus</code></em>.</p></div><div class="refsect1"><a name="idm214201910768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_new()</code> returns 0 or a
+    <em class="parameter"><code>bus</code></em>.</p></div><div class="refsect1"><a name="idm214192594352"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_bus_new()</code> returns 0 or a
     positive integer. On failure, it returns a negative errno-style
     error code.</p><p><code class="function">sd_bus_ref</code> always returns the argument.
     </p><p><code class="function">sd_bus_unref</code> always returns
-    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214201906368"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214201903264"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_new()</code> and other functions
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214192589952"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Memory allocation failed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192586848"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_bus_new()</code> and other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214201900048"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214192583312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-bus.html"><span class="citerefentry"><span class="refentrytitle">sd-bus</span>(3)</span></a>,
       <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>,
diff --git a/man/sd_event_add_child.3 b/man/sd_event_add_child.3
new file mode 100644 (file)
index 0000000..4878d81
--- /dev/null
@@ -0,0 +1,127 @@
+'\" t
+.TH "SD_EVENT_ADD_CHILD" "3" "" "systemd 217" "sd_event_add_child"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sd_event_add_child, sd_event_source_get_child_pid \- Add a child state change event source to an event loop
+.SH "SYNOPSIS"
+.sp
+.ft B
+.nf
+#include <systemd/sd\-bus\&.h>
+.fi
+.ft
+.HP \w'int\ sd_event_add_child('u
+.BI "int sd_event_add_child(sd_event\ *" "event" ", sd_event_source\ **" "source" ", pid_t\ " "pid" ", int\ " "options" ", sd_event_child_handler_t\ " "handler" ", void\ *" "userdata" ");"
+.HP \w'typedef\ int\ (*sd_event_child_handler_t)('u
+.BI "typedef int (*sd_event_child_handler_t)(sd_event_source\ *" "s" ", const\ siginfo_t\ *" "si" ", void\ *" "userdata" ");"
+.HP \w'int\ sd_event_source_get_child_pid('u
+.BI "int sd_event_source_get_child_pid(sd_event_source\ *" "source" ", pid_t\ *" "pid" ");"
+.SH "DESCRIPTION"
+.PP
+\fBsd_event_add_child()\fR
+adds a new child state change event source to an event loop object\&. The event loop is specified in
+\fIevent\fR, the event source is returned in the
+\fIsource\fR
+parameter\&. The
+\fIpid\fR
+parameter specifies the process to watch\&. The
+\fIhandler\fR
+must reference a function to call when the process changes state\&. The handler function will be passed the
+\fIuserdata\fR
+pointer, which may be chosen freely by the caller\&. The handler also receives a pointer to a
+const siginfo_t
+structure containing the information about the event\&. The
+\fIoptions\fR
+parameter determines which state changes will be watched for\&. It must contain an OR\-ed mask of
+\fBWEXITED\fR
+(watch for the child terminating),
+\fBWSTOPPED\fR
+(watch for the child being stopped by a signal), and
+\fBWCONTINUED\fR
+(watch for the child being resumed by a signal)\&. See
+\fBwaitid\fR(2)
+for futher information\&.
+.PP
+Only a single handler may be installed for a specific child\&. The handler is enabled for a single event (\fBSD_EVENT_ONESHOT\fR), but this may be changed with
+\fBsd_event_source_set_enabled\fR(3)\&. If the handler function returns a negative error code, it will be disabled after the invocation, even if
+\fBSD_EVENT_ON\fR
+mode is set\&.
+.PP
+\fBsd_event_source_get_child_pid()\fR
+retrieves the configured
+\fIpid\fR
+of a child state change event source created previously with
+\fBsd_event_add_child()\fR\&. It takes the event source object as the
+\fIsource\fR
+parameter and a pointer to
+\fBpid_t\fR
+to return the result in\&.
+.SH "RETURN VALUE"
+.PP
+On success, these functions return 0 or a positive integer\&. On failure, they return a negative errno\-style error code\&.
+.SH "ERRORS"
+.PP
+Returned errors may indicate the following problems:
+.PP
+\fB\-ENOMEM\fR
+.RS 4
+Not enough memory to allocate an object\&.
+.RE
+.PP
+\fB\-EINVAL\fR
+.RS 4
+An invalid argument has been passed\&. This includes specyfing an empty mask in
+\fIoptions\fR
+or a mask which constains values different than a combination of
+\fBWEXITED\fR,
+\fBWSTOPPED\fR, and
+\fBWCONTINUED\fR\&.
+.RE
+.PP
+\fB\-EBUSY\fR
+.RS 4
+An handler is already installed for this child\&.
+.RE
+.PP
+\fB\-ESTALE\fR
+.RS 4
+The event loop is already terminated\&.
+.RE
+.PP
+\fB\-ECHILD\fR
+.RS 4
+The event loop has been created in a different process\&.
+.RE
+.SH "NOTES"
+.PP
+\fBsd_event_add_child()\fR
+and the other functions described here are available as a shared library, which can be compiled and linked to with the
+\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
+file\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsd-event\fR(3),
+\fBsd_event_new\fR(3),
+\fBsd_event_add_time\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_source_set_enabled\fR(3)
diff --git a/man/sd_event_add_child.html b/man/sd_event_add_child.html
new file mode 100644 (file)
index 0000000..e4871f4
--- /dev/null
@@ -0,0 +1,75 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_add_child</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_child"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_child, sd_event_source_get_child_pid — Add a child state change event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_child</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">options</var>, </td></tr><tr><td> </td><td>sd_event_child_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_child_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>const siginfo_t *<var class="pdparam">si</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_child_pid</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179602432"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_child()</code> adds a new child
+    state change event source to an event loop object. The event loop
+    is specified in <em class="parameter"><code>event</code></em>, the event source is
+    returned in the <em class="parameter"><code>source</code></em> parameter. The
+    <em class="parameter"><code>pid</code></em> parameter specifies the process to
+    watch. The <em class="parameter"><code>handler</code></em> must reference a
+    function to call when the process changes state. The handler
+    function will be passed the <em class="parameter"><code>userdata</code></em>
+    pointer, which may be chosen freely by the caller. The handler
+    also receives a pointer to a <span class="structname">const
+    siginfo_t</span> structure containing the information about
+    the event. The <em class="parameter"><code>options</code></em> parameter determines
+    which state changes will be watched for. It must contain an OR-ed
+    mask of <code class="constant">WEXITED</code> (watch for the child
+    terminating), <code class="constant">WSTOPPED</code> (watch for the child
+    being stopped by a signal), and <code class="constant">WCONTINUED</code>
+    (watch for the child being resumed by a signal). See
+    <a href="http://man7.org/linux/man-pages/man2/waitid.2.html"><span class="citerefentry"><span class="refentrytitle">waitid</span>(2)</span></a>
+    for futher information.</p><p>Only a single handler may be installed for a specific
+    child. The handler is enabled
+    for a single event (<code class="constant">SD_EVENT_ONESHOT</code>),
+    but this may be
+    changed with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
+    </p><p><code class="function">sd_event_source_get_child_pid()</code>
+    retrieves the configured <em class="parameter"><code>pid</code></em> of a child
+    state change event source created previously with
+    <code class="function">sd_event_add_child()</code>. It takes the event
+    source object as the <em class="parameter"><code>source</code></em> parameter and a
+    pointer to <span class="type">pid_t</span> to return the result in.
+    </p></div><div class="refsect1"><a name="idm214179587632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code.</p></div><div class="refsect1"><a name="idm214179578880"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed. This includes
+        specyfing an empty mask in <em class="parameter"><code>options</code></em> or a mask
+        which constains values different than a combination of
+        <code class="constant">WEXITED</code>, <code class="constant">WSTOPPED</code>, and
+        <code class="constant">WCONTINUED</code>.
+        </p></dd><dt id="-EBUSY"><span class="term"><code class="constant">-EBUSY</code></span><a class="headerlink" title="Permalink to this term" href="#-EBUSY">¶</a></dt><dd><p>An handler is already installed for this
+        child.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179567968"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_child()</code> and the other functions
+    described here are available as a shared library, which can be
+    compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214179564432"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_add_child.xml b/man/sd_event_add_child.xml
new file mode 100644 (file)
index 0000000..012fdb6
--- /dev/null
@@ -0,0 +1,206 @@
+<?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">
+
+<!--
+This file is part of systemd.
+
+Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+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="sd_event_add_child" conditional="ENABLE_KDBUS">
+
+  <refentryinfo>
+    <title>sd_event_add_child</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>More text</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_add_child</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_add_child</refname>
+    <refname>sd_event_source_get_child_pid</refname>
+
+    <refpurpose>Add a child state change event source to an event loop</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_add_child</function></funcdef>
+        <paramdef>sd_event *<parameter>event</parameter></paramdef>
+        <paramdef>sd_event_source **<parameter>source</parameter></paramdef>
+        <paramdef>pid_t <parameter>pid</parameter></paramdef>
+        <paramdef>int <parameter>options</parameter></paramdef>
+        <paramdef>sd_event_child_handler_t <parameter>handler</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>typedef int (*<function>sd_event_child_handler_t</function>)</funcdef>
+        <paramdef>sd_event_source *<parameter>s</parameter></paramdef>
+        <paramdef>const siginfo_t *<parameter>si</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_source_get_child_pid</function></funcdef>
+        <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+        <paramdef>pid_t *<parameter>pid</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_event_add_child()</function> adds a new child
+    state change event source to an event loop object. The event loop
+    is specified in <parameter>event</parameter>, the event source is
+    returned in the <parameter>source</parameter> parameter. The
+    <parameter>pid</parameter> parameter specifies the process to
+    watch. The <parameter>handler</parameter> must reference a
+    function to call when the process changes state. The handler
+    function will be passed the <parameter>userdata</parameter>
+    pointer, which may be chosen freely by the caller. The handler
+    also receives a pointer to a <structname>const
+    siginfo_t</structname> structure containing the information about
+    the event. The <parameter>options</parameter> parameter determines
+    which state changes will be watched for. It must contain an OR-ed
+    mask of <constant>WEXITED</constant> (watch for the child
+    terminating), <constant>WSTOPPED</constant> (watch for the child
+    being stopped by a signal), and <constant>WCONTINUED</constant>
+    (watch for the child being resumed by a signal). See
+    <citerefentry><refentrytitle>waitid</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+    for futher information.</para>
+
+    <para>Only a single handler may be installed for a specific
+    child. The handler is enabled
+    for a single event (<constant>SD_EVENT_ONESHOT</constant>),
+    but this may be
+    changed with
+    <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <constant>SD_EVENT_ON</constant> mode is set.
+    </para>
+
+    <para><function>sd_event_source_get_child_pid()</function>
+    retrieves the configured <parameter>pid</parameter> of a child
+    state change event source created previously with
+    <function>sd_event_add_child()</function>. It takes the event
+    source object as the <parameter>source</parameter> parameter and a
+    pointer to <type>pid_t</type> to return the result in.
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, these functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-ENOMEM</constant></term>
+
+        <listitem><para>Not enough memory to allocate an object.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para>An invalid argument has been passed. This includes
+        specyfing an empty mask in <parameter>options</parameter> or a mask
+        which constains values different than a combination of
+        <constant>WEXITED</constant>, <constant>WSTOPPED</constant>, and
+        <constant>WCONTINUED</constant>.
+        </para></listitem>
+
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-EBUSY</constant></term>
+
+        <listitem><para>An handler is already installed for this
+        child.</para></listitem>
+
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ESTALE</constant></term>
+
+        <listitem><para>The event loop is already terminated.</para></listitem>
+
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ECHILD</constant></term>
+
+        <listitem><para>The event loop has been created in a different process.</para></listitem>
+
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para><function>sd_event_add_child()</function> and the other functions
+    described here are available as a shared library, which can be
+    compiled and linked to with the
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_event_add_defer.3 b/man/sd_event_add_defer.3
new file mode 100644 (file)
index 0000000..511df43
--- /dev/null
@@ -0,0 +1,102 @@
+'\" t
+.TH "SD_EVENT_ADD_DEFER" "3" "" "systemd 217" "sd_event_add_defer"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sd_event_add_defer, sd_event_add_post, sd_event_add_exit \- Add static event sources to an event loop
+.SH "SYNOPSIS"
+.sp
+.ft B
+.nf
+#include <systemd/sd\-bus\&.h>
+.fi
+.ft
+.HP \w'int\ sd_event_add_defer('u
+.BI "int sd_event_add_defer(sd_event\ *" "event" ", sd_event_source\ **" "source" ", sd_event_handler_t\ " "handler" ", void\ *" "userdata" ");"
+.HP \w'int\ sd_event_add_post('u
+.BI "int sd_event_add_post(sd_event\ *" "event" ", sd_event_source\ **" "source" ", sd_event_handler_t\ " "handler" ", void\ *" "userdata" ");"
+.HP \w'int\ sd_event_add_exit('u
+.BI "int sd_event_add_exit(sd_event\ *" "event" ", sd_event_source\ **" "source" ", sd_event_handler_t\ " "handler" ", void\ *" "userdata" ");"
+.HP \w'typedef\ int\ (*sd_event_handler_t)('u
+.BI "typedef int (*sd_event_handler_t)(sd_event_source\ *" "s" ", void\ *" "userdata" ");"
+.SH "DESCRIPTION"
+.PP
+Those three functions add new event sources to an event loop object\&. The event loop is specified in
+\fIevent\fR, the event source is returned in the
+\fIsource\fR
+parameter\&. The event sources are enabled statically and will "fire" when the event loop is run and the conditions described below are met\&. The handler function will be passed the
+\fIuserdata\fR
+pointer, which may be chosen freely by the caller\&.
+.PP
+\fBsd_event_add_defer()\fR
+adds a new event source that will "fire" the next time the event loop is run\&. By default, the handler will be called once (\fBSD_EVENT_ONESHOT\fR)\&.
+.PP
+\fBsd_event_add_defer()\fR
+adds a new event source that will "fire" if any event handlers are invoked whenever the event loop is run\&. By default, the source is enabled permanently (\fBSD_EVENT_ON\fR)\&.
+.PP
+\fBsd_event_add_exit()\fR
+adds a new event source that will "fire" when the event loop is terminated with
+\fBsd_event_exit()\fR\&.
+.PP
+The
+\fBsd_event_source_set_enabled\fR(3)
+function may be used to enable the event source permanently (\fBSD_EVENT_ON\fR) or to make it fire just once (\fBSD_EVENT_ONESHOT\fR)\&. If the handler function returns a negative error code, it will be disabled after the invocation, even if
+\fBSD_EVENT_ON\fR
+mode is set\&.
+.SH "RETURN VALUE"
+.PP
+On success, this functions return 0 or a positive integer\&. On failure, they return a negative errno\-style error code\&.
+.SH "ERRORS"
+.PP
+Returned errors may indicate the following problems:
+.PP
+\fB\-ENOMEM\fR
+.RS 4
+Not enough memory to allocate an object\&.
+.RE
+.PP
+\fB\-EINVAL\fR
+.RS 4
+An invalid argument has been passed\&.
+.RE
+.PP
+\fB\-ESTALE\fR
+.RS 4
+The event loop is already terminated\&.
+.RE
+.PP
+\fB\-ECHILD\fR
+.RS 4
+The event loop has been created in a different process\&.
+.RE
+.SH "NOTES"
+.PP
+Functions described here are available as a shared library, which can be compiled and linked to with the
+\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
+file\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsd-event\fR(3),
+\fBsd_event_new\fR(3),
+\fBsd_event_add_time\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_source_set_enabled\fR(3)
diff --git a/man/sd_event_add_defer.html b/man/sd_event_add_defer.html
new file mode 100644 (file)
index 0000000..0b5123a
--- /dev/null
@@ -0,0 +1,57 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_add_defer</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_defer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_defer, sd_event_add_post, sd_event_add_exit — Add static event sources to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_defer</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_post</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_exit</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195117488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Those three functions add new event sources to an event loop
+    object. The event loop is specified in
+    <em class="parameter"><code>event</code></em>, the event source is returned in the
+    <em class="parameter"><code>source</code></em> parameter. The event sources are
+    enabled statically and will "fire" when the event loop is run and
+    the conditions described below are met. The handler function will
+    be passed the <em class="parameter"><code>userdata</code></em> pointer, which may
+    be chosen freely by the caller.</p><p><code class="function">sd_event_add_defer()</code> adds a new event
+    source that will "fire" the next time the event loop is run. By
+    default, the handler will be called once
+    (<code class="constant">SD_EVENT_ONESHOT</code>).</p><p><code class="function">sd_event_add_defer()</code> adds a new event
+    source that will "fire" if any event handlers are invoked whenever
+    the event loop is run. By default, the source is enabled
+    permanently (<code class="constant">SD_EVENT_ON</code>).</p><p><code class="function">sd_event_add_exit()</code> adds a new event
+    source that will "fire" when the event loop is terminated
+    with <code class="function">sd_event_exit()</code>.</p><p>The
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    function may be used to enable the event source permanently
+    (<code class="constant">SD_EVENT_ON</code>) or to make it fire just once
+    (<code class="constant">SD_EVENT_ONESHOT</code>). If the handler function
+    returns a negative error code, it will be disabled after the
+    invocation, even if <code class="constant">SD_EVENT_ON</code> mode is
+    set.</p></div><div class="refsect1"><a name="idm214195106368"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code.</p></div><div class="refsect1"><a name="idm214195097712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214195090240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a shared library,
+    which can be compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214195087280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_add_defer.xml b/man/sd_event_add_defer.xml
new file mode 100644 (file)
index 0000000..442600a
--- /dev/null
@@ -0,0 +1,191 @@
+<?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">
+
+<!--
+This file is part of systemd.
+
+Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+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="sd_event_add_defer" conditional="ENABLE_KDBUS">
+
+  <refentryinfo>
+    <title>sd_event_add_defer</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>More text</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_add_defer</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_add_defer</refname>
+    <refname>sd_event_add_post</refname>
+    <refname>sd_event_add_exit</refname>
+
+    <refpurpose>Add static event sources to an event loop</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_add_defer</function></funcdef>
+        <paramdef>sd_event *<parameter>event</parameter></paramdef>
+        <paramdef>sd_event_source **<parameter>source</parameter></paramdef>
+        <paramdef>sd_event_handler_t <parameter>handler</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_add_post</function></funcdef>
+        <paramdef>sd_event *<parameter>event</parameter></paramdef>
+        <paramdef>sd_event_source **<parameter>source</parameter></paramdef>
+        <paramdef>sd_event_handler_t <parameter>handler</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_add_exit</function></funcdef>
+        <paramdef>sd_event *<parameter>event</parameter></paramdef>
+        <paramdef>sd_event_source **<parameter>source</parameter></paramdef>
+        <paramdef>sd_event_handler_t <parameter>handler</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>typedef int (*<function>sd_event_handler_t</function>)</funcdef>
+        <paramdef>sd_event_source *<parameter>s</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>Those three functions add new event sources to an event loop
+    object. The event loop is specified in
+    <parameter>event</parameter>, the event source is returned in the
+    <parameter>source</parameter> parameter. The event sources are
+    enabled statically and will "fire" when the event loop is run and
+    the conditions described below are met. The handler function will
+    be passed the <parameter>userdata</parameter> pointer, which may
+    be chosen freely by the caller.</para>
+
+    <para><function>sd_event_add_defer()</function> adds a new event
+    source that will "fire" the next time the event loop is run. By
+    default, the handler will be called once
+    (<constant>SD_EVENT_ONESHOT</constant>).</para>
+
+    <para><function>sd_event_add_defer()</function> adds a new event
+    source that will "fire" if any event handlers are invoked whenever
+    the event loop is run. By default, the source is enabled
+    permanently (<constant>SD_EVENT_ON</constant>).</para>
+
+    <para><function>sd_event_add_exit()</function> adds a new event
+    source that will "fire" when the event loop is terminated
+    with <function>sd_event_exit()</function>.</para>
+
+    <para>The
+    <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    function may be used to enable the event source permanently
+    (<constant>SD_EVENT_ON</constant>) or to make it fire just once
+    (<constant>SD_EVENT_ONESHOT</constant>). If the handler function
+    returns a negative error code, it will be disabled after the
+    invocation, even if <constant>SD_EVENT_ON</constant> mode is
+    set.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, this functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-ENOMEM</constant></term>
+
+        <listitem><para>Not enough memory to allocate an object.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para>An invalid argument has been passed.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ESTALE</constant></term>
+
+        <listitem><para>The event loop is already terminated.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ECHILD</constant></term>
+
+        <listitem><para>The event loop has been created in a different process.</para></listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>Functions described here are available as a shared library,
+    which can be compiled and linked to with the
+    <constant>libsystemd</constant> <citerefentry
+    project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_event_add_exit.3 b/man/sd_event_add_exit.3
new file mode 100644 (file)
index 0000000..026fd6a
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_event_add_defer.3
diff --git a/man/sd_event_add_exit.html b/man/sd_event_add_exit.html
new file mode 100644 (file)
index 0000000..0b5123a
--- /dev/null
@@ -0,0 +1,57 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_add_defer</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_defer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_defer, sd_event_add_post, sd_event_add_exit — Add static event sources to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_defer</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_post</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_exit</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195117488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Those three functions add new event sources to an event loop
+    object. The event loop is specified in
+    <em class="parameter"><code>event</code></em>, the event source is returned in the
+    <em class="parameter"><code>source</code></em> parameter. The event sources are
+    enabled statically and will "fire" when the event loop is run and
+    the conditions described below are met. The handler function will
+    be passed the <em class="parameter"><code>userdata</code></em> pointer, which may
+    be chosen freely by the caller.</p><p><code class="function">sd_event_add_defer()</code> adds a new event
+    source that will "fire" the next time the event loop is run. By
+    default, the handler will be called once
+    (<code class="constant">SD_EVENT_ONESHOT</code>).</p><p><code class="function">sd_event_add_defer()</code> adds a new event
+    source that will "fire" if any event handlers are invoked whenever
+    the event loop is run. By default, the source is enabled
+    permanently (<code class="constant">SD_EVENT_ON</code>).</p><p><code class="function">sd_event_add_exit()</code> adds a new event
+    source that will "fire" when the event loop is terminated
+    with <code class="function">sd_event_exit()</code>.</p><p>The
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    function may be used to enable the event source permanently
+    (<code class="constant">SD_EVENT_ON</code>) or to make it fire just once
+    (<code class="constant">SD_EVENT_ONESHOT</code>). If the handler function
+    returns a negative error code, it will be disabled after the
+    invocation, even if <code class="constant">SD_EVENT_ON</code> mode is
+    set.</p></div><div class="refsect1"><a name="idm214195106368"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code.</p></div><div class="refsect1"><a name="idm214195097712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214195090240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a shared library,
+    which can be compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214195087280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_add_post.3 b/man/sd_event_add_post.3
new file mode 100644 (file)
index 0000000..026fd6a
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_event_add_defer.3
diff --git a/man/sd_event_add_post.html b/man/sd_event_add_post.html
new file mode 100644 (file)
index 0000000..0b5123a
--- /dev/null
@@ -0,0 +1,57 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_add_defer</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_defer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_defer, sd_event_add_post, sd_event_add_exit — Add static event sources to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_defer</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_post</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_exit</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>sd_event_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195117488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Those three functions add new event sources to an event loop
+    object. The event loop is specified in
+    <em class="parameter"><code>event</code></em>, the event source is returned in the
+    <em class="parameter"><code>source</code></em> parameter. The event sources are
+    enabled statically and will "fire" when the event loop is run and
+    the conditions described below are met. The handler function will
+    be passed the <em class="parameter"><code>userdata</code></em> pointer, which may
+    be chosen freely by the caller.</p><p><code class="function">sd_event_add_defer()</code> adds a new event
+    source that will "fire" the next time the event loop is run. By
+    default, the handler will be called once
+    (<code class="constant">SD_EVENT_ONESHOT</code>).</p><p><code class="function">sd_event_add_defer()</code> adds a new event
+    source that will "fire" if any event handlers are invoked whenever
+    the event loop is run. By default, the source is enabled
+    permanently (<code class="constant">SD_EVENT_ON</code>).</p><p><code class="function">sd_event_add_exit()</code> adds a new event
+    source that will "fire" when the event loop is terminated
+    with <code class="function">sd_event_exit()</code>.</p><p>The
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    function may be used to enable the event source permanently
+    (<code class="constant">SD_EVENT_ON</code>) or to make it fire just once
+    (<code class="constant">SD_EVENT_ONESHOT</code>). If the handler function
+    returns a negative error code, it will be disabled after the
+    invocation, even if <code class="constant">SD_EVENT_ON</code> mode is
+    set.</p></div><div class="refsect1"><a name="idm214195106368"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, this functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code.</p></div><div class="refsect1"><a name="idm214195097712"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214195090240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a shared library,
+    which can be compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214195087280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_add_signal.3 b/man/sd_event_add_signal.3
new file mode 100644 (file)
index 0000000..ba3604b
--- /dev/null
@@ -0,0 +1,114 @@
+'\" t
+.TH "SD_EVENT_ADD_SIGNAL" "3" "" "systemd 217" "sd_event_add_signal"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sd_event_add_signal, sd_event_source_get_signal \- Add a signal event source to an event loop
+.SH "SYNOPSIS"
+.sp
+.ft B
+.nf
+#include <systemd/sd\-bus\&.h>
+.fi
+.ft
+.HP \w'int\ sd_event_add_signal('u
+.BI "int sd_event_add_signal(sd_event\ *" "event" ", sd_event_source\ **" "source" ", int\ " "signal" ", sd_event_signal_handler_t\ " "handler" ", void\ *" "userdata" ");"
+.HP \w'typedef\ int\ (*sd_event_signal_handler_t)('u
+.BI "typedef int (*sd_event_signal_handler_t)(sd_event_source\ *" "s" ", const\ struct\ signalfd_siginfo\ *" "si" ", void\ *" "userdata" ");"
+.HP \w'int\ sd_event_source_get_signal('u
+.BI "int sd_event_source_get_signal(sd_event_source\ *" "source" ");"
+.SH "DESCRIPTION"
+.PP
+\fBsd_event_add_signal()\fR
+adds a new signal event source to an event loop object\&. The event loop is specified in
+\fIevent\fR, the event source is returned in the
+\fIsource\fR
+parameter\&. The
+\fIsignal\fR
+parameter specifies the signal to be handled (see
+\fBsignal\fR(7))\&. The
+\fIhandler\fR
+must reference a function to call when the signal is delivered or be
+\fBNULL\fR\&. The handler function will be passed the
+\fIuserdata\fR
+pointer, which may be chosen freely by the caller\&. The handler also receives a pointer to a
+const struct signalfd_siginfo
+containing the information about the received signal\&. See
+\fBsignalfd\fR(2)
+for futher information\&.
+.PP
+Only a single handler may be installed for a specific signal\&. The signal will be unblocked, and must be blocked when the function is called\&. If the handler is not specified (\fIhandler\fR
+is
+\fBNULL\fR), a default handler which causes the program to exit will be used\&. By default, the handler is enabled permanently (\fBSD_EVENT_ON\fR), but this may be changed with
+\fBsd_event_source_set_enabled\fR(3)\&. If the handler function returns a negative error code, it will be disabled after the invocation, even if
+\fBSD_EVENT_ON\fR
+mode is set\&.
+.PP
+\fBsd_event_source_get_signal()\fR
+retrieves the configured signal number of a signal event source created previously with
+\fBsd_event_add_signal()\fR\&. It takes the event source object as the
+\fIsource\fR
+parameter\&.
+.SH "RETURN VALUE"
+.PP
+On success, these functions return 0 or a positive integer\&. On failure, they return a negative errno\-style error code\&.
+.SH "ERRORS"
+.PP
+Returned errors may indicate the following problems:
+.PP
+\fB\-ENOMEM\fR
+.RS 4
+Not enough memory to allocate an object\&.
+.RE
+.PP
+\fB\-EINVAL\fR
+.RS 4
+An invalid argument has been passed\&.
+.RE
+.PP
+\fB\-EBUSY\fR
+.RS 4
+An handler is already installed for this signal or the signal was not blocked previously\&.
+.RE
+.PP
+\fB\-ESTALE\fR
+.RS 4
+The event loop is already terminated\&.
+.RE
+.PP
+\fB\-ECHILD\fR
+.RS 4
+The event loop has been created in a different process\&.
+.RE
+.SH "NOTES"
+.PP
+\fBsd_event_add_signal()\fR
+and the other functions described here are available as a shared library, which can be compiled and linked to with the
+\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
+file\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsd-event\fR(3),
+\fBsd_event_new\fR(3),
+\fBsd_event_add_time\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_source_set_enabled\fR(3)
diff --git a/man/sd_event_add_signal.html b/man/sd_event_add_signal.html
new file mode 100644 (file)
index 0000000..872254e
--- /dev/null
@@ -0,0 +1,68 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_add_signal</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_signal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_signal, sd_event_source_get_signal — Add a signal event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_signal</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">signal</var>, </td></tr><tr><td> </td><td>sd_event_signal_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_signal_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>const struct signalfd_siginfo *<var class="pdparam">si</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_signal</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214187837424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_signal()</code> adds a new signal
+    event source to an event loop object. The event loop is specified
+    in <em class="parameter"><code>event</code></em>, the event source is returned in
+    the <em class="parameter"><code>source</code></em> parameter. The
+    <em class="parameter"><code>signal</code></em> parameter specifies the signal to be handled
+    (see
+    <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>).
+    The <em class="parameter"><code>handler</code></em> must reference a function to
+    call when the signal is delivered or be <code class="constant">NULL</code>.
+    The handler function will be passed the
+    <em class="parameter"><code>userdata</code></em> pointer, which may be chosen
+    freely by the caller. The handler also receives a pointer to a
+    <span class="structname">const struct signalfd_siginfo</span> containing
+    the information about the received signal. See
+    <a href="http://man7.org/linux/man-pages/man2/signalfd.2.html"><span class="citerefentry"><span class="refentrytitle">signalfd</span>(2)</span></a>
+    for futher information.</p><p>Only a single handler may be installed for a specific
+    signal. The signal will be unblocked, and must be
+    blocked when the function is called. If the handler is not
+    specified (<em class="parameter"><code>handler</code></em> is
+    <code class="constant">NULL</code>), a default handler which causes the
+    program to exit will be used.  By default, the handler is enabled
+    permanently (<code class="constant">SD_EVENT_ON</code>), but this may be
+    changed with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
+    </p><p><code class="function">sd_event_source_get_signal()</code> retrieves
+    the configured signal number of a signal event source created
+    previously with <code class="function">sd_event_add_signal()</code>. It
+    takes the event source object as the <em class="parameter"><code>source</code></em>
+    parameter.</p></div><div class="refsect1"><a name="idm214191776320"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code. </p></div><div class="refsect1"><a name="idm214191774992"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-EBUSY"><span class="term"><code class="constant">-EBUSY</code></span><a class="headerlink" title="Permalink to this term" href="#-EBUSY">¶</a></dt><dd><p>An handler is already installed for this
+        signal or the signal was not blocked previously.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191765968"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_signal()</code> and the other functions
+    described here are available as a shared library, which can be
+    compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214191755216"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_add_signal.xml b/man/sd_event_add_signal.xml
new file mode 100644 (file)
index 0000000..6584268
--- /dev/null
@@ -0,0 +1,198 @@
+<?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">
+
+<!--
+This file is part of systemd.
+
+Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+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="sd_event_add_signal" conditional="ENABLE_KDBUS">
+
+  <refentryinfo>
+    <title>sd_event_add_signal</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>More text</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_add_signal</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_add_signal</refname>
+    <refname>sd_event_source_get_signal</refname>
+
+    <refpurpose>Add a signal event source to an event loop</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_add_signal</function></funcdef>
+        <paramdef>sd_event *<parameter>event</parameter></paramdef>
+        <paramdef>sd_event_source **<parameter>source</parameter></paramdef>
+        <paramdef>int <parameter>signal</parameter></paramdef>
+        <paramdef>sd_event_signal_handler_t <parameter>handler</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>typedef int (*<function>sd_event_signal_handler_t</function>)</funcdef>
+        <paramdef>sd_event_source *<parameter>s</parameter></paramdef>
+        <paramdef>const struct signalfd_siginfo *<parameter>si</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_source_get_signal</function></funcdef>
+        <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_event_add_signal()</function> adds a new signal
+    event source to an event loop object. The event loop is specified
+    in <parameter>event</parameter>, the event source is returned in
+    the <parameter>source</parameter> parameter. The
+    <parameter>signal</parameter> parameter specifies the signal to be handled
+    (see
+    <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
+    The <parameter>handler</parameter> must reference a function to
+    call when the signal is delivered or be <constant>NULL</constant>.
+    The handler function will be passed the
+    <parameter>userdata</parameter> pointer, which may be chosen
+    freely by the caller. The handler also receives a pointer to a
+    <structname>const struct signalfd_siginfo</structname> containing
+    the information about the received signal. See
+    <citerefentry><refentrytitle>signalfd</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+    for futher information.</para>
+
+    <para>Only a single handler may be installed for a specific
+    signal. The signal will be unblocked, and must be
+    blocked when the function is called. If the handler is not
+    specified (<parameter>handler</parameter> is
+    <constant>NULL</constant>), a default handler which causes the
+    program to exit will be used.  By default, the handler is enabled
+    permanently (<constant>SD_EVENT_ON</constant>), but this may be
+    changed with
+    <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <constant>SD_EVENT_ON</constant> mode is set.
+    </para>
+
+    <para><function>sd_event_source_get_signal()</function> retrieves
+    the configured signal number of a signal event source created
+    previously with <function>sd_event_add_signal()</function>. It
+    takes the event source object as the <parameter>source</parameter>
+    parameter.</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, these functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code. </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-ENOMEM</constant></term>
+
+        <listitem><para>Not enough memory to allocate an object.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para>An invalid argument has been passed.</para></listitem>
+
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-EBUSY</constant></term>
+
+        <listitem><para>An handler is already installed for this
+        signal or the signal was not blocked previously.</para></listitem>
+
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ESTALE</constant></term>
+
+        <listitem><para>The event loop is already terminated.</para></listitem>
+
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ECHILD</constant></term>
+
+        <listitem><para>The event loop has been created in a different process.</para></listitem>
+
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para><function>sd_event_add_signal()</function> and the other functions
+    described here are available as a shared library, which can be
+    compiled and linked to with the
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
index 8e8e44cca0017bb2c43544eedaacb61609a046b3..837920c41c45f75a174a47c6c195c22774b0f476 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_EVENT_ADD_TIME" "3" "" "systemd 215" "sd_event_add_time"
+.TH "SD_EVENT_ADD_TIME" "3" "" "systemd 217" "sd_event_add_time"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -30,6 +30,8 @@ sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_
 .ft
 .HP \w'int\ sd_event_add_time('u
 .BI "int sd_event_add_time(sd_event\ *" "event" ", sd_event_source\ **" "source" ", clockid_t\ " "clock" ", uint64_t\ " "usec" ", uint64_t\ " "accuracy" ", sd_event_time_handler_t\ " "handler" ", void\ *" "userdata" ");"
+.HP \w'typedef\ int\ (*sd_event_time_handler_t)('u
+.BI "typedef int (*sd_event_time_handler_t)(sd_event_source\ *" "s" ", uint64_t\ " "usec" ", void\ *" "userdata" ");"
 .HP \w'int\ sd_event_source_get_time('u
 .BI "int sd_event_source_get_time(sd_event_source\ *" "source" ", usec_t\ *" "usec" ");"
 .HP \w'int\ sd_event_source_set_time('u
@@ -63,8 +65,12 @@ parameter takes an additional accuracy value in microseconds specifying a time t
 shall reference a function to call when the timer elapses\&. The handler function will be passed the
 \fIuserdata\fR
 pointer, which may be chosen freely by the caller\&. The handler is also passed the configured time it was triggered, however it might actually have been called at a slightly later time, subject to the specified accuracy value, the kernel timer slack (see
-\fBprctl\fR(2)) and additional scheduling latencies\&. By default, the timer will elapse once (SD_EVENT_ONESHOT), but this may be changed with
-\fBsd_event_source_set_enabled\fR(3)\&. If the handler function returns a negative error code, it will be disabled after the invocation, even if SD_EVENT_ON mode is set\&.
+\fBprctl\fR(2)) and additional scheduling latencies\&.
+.PP
+By default, the timer will elapse once (\fBSD_EVENT_ONESHOT\fR), but this may be changed with
+\fBsd_event_source_set_enabled\fR(3)\&. If the handler function returns a negative error code, it will be disabled after the invocation, even if
+\fBSD_EVENT_ON\fR
+mode is set\&.
 .PP
 \fBsd_event_source_get_time()\fR
 retrieves the configured time value of a timer event source created previously with
@@ -92,27 +98,27 @@ On success, these functions return 0 or a positive integer\&. On failure, they r
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
-Not enough memory to allocate object\&.
+Not enough memory to allocate an object\&.
 .RE
 .PP
-\fI\-EINVAL\fR
+\fB\-EINVAL\fR
 .RS 4
 An invalid argument has been passed\&.
 .RE
 .PP
-\fI\-ESTALE\fR
+\fB\-ESTALE\fR
 .RS 4
 The event loop is already terminated\&.
 .RE
 .PP
-\fI\-ECHILD\fR
+\fB\-ECHILD\fR
 .RS 4
 The event loop has been created in a different process\&.
 .RE
 .PP
-\fI\-ENOTSUP\fR
+\fB\-ENOTSUP\fR
 .RS 4
 The selected clock is not supported by the event loop implementation\&.
 .RE
@@ -127,5 +133,8 @@ file\&.
 \fBsystemd\fR(1),
 \fBsd-event\fR(3),
 \fBsd_event_new\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
 \fBclock_gettime\fR(2),
 \fBsd_event_source_set_enabled\fR(3)
index 893572092a94695db0700428bbf6a3be11da0e5c..8035f625f25bd8526fdb831f003a1a99f5033556 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185413552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_time_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188667792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
     event source to an event loop object. The event loop is specified
     in <em class="parameter"><code>event</code></em>, the event source is returned in
     the <em class="parameter"><code>source</code></em> parameter. The
@@ -27,7 +27,7 @@
     one of <code class="constant">CLOCK_REALTIME</code>,
     <code class="constant">CLOCK_MONOTONIC</code> and
     <code class="constant">CLOCK_BOOTTIME_ALARM</code>. See
-    <a href="timerfd_create.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
+    <a href="http://man7.org/linux/man-pages/man2/timerfd_create.2.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
     for details regarding the various types of clocks. The
     <em class="parameter"><code>usec</code></em> parameter takes a time value in
     microseconds, relative to the clock's epoch specifying when the
     also passed the configured time it was triggered, however it might
     actually have been called at a slightly later time, subject to the
     specified accuracy value, the kernel timer slack (see
-    <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
-    and additional scheduling latencies. By default, the timer will
-    elapse once (SD_EVENT_ONESHOT), but this may be changed with
-    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>. If
-    the handler function returns a negative error code, it will be
-    disabled after the invocation, even if SD_EVENT_ON mode is set.
+    <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
+    and additional scheduling latencies.</p><p>By default, the timer will elapse once
+    (<code class="constant">SD_EVENT_ONESHOT</code>), but this may be changed
+    with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
     </p><p><code class="function">sd_event_source_get_time()</code> retrieves
     the configured time value of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     retrieves the configured clock of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     the event source object and a pointer to a variable to store the
-    clock identifier in.</p></div><div class="refsect1"><a name="idm214185385088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    clock identifier in.</p></div><div class="refsect1"><a name="idm214188638272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
     integer. On failure, they return a negative errno-style error
-    code. </p></div><div class="refsect1"><a name="idm214185383760"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="varname">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180461872"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
+    code. </p></div><div class="refsect1"><a name="idm214188636944"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="constant">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188628032"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180458928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214183947136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
-      <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
       <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
     </p></div></div></body></html>
index dc25784388a7f50ad14d98c5987f324ddf51ef72..77b8828bb3a5ff55e17d93a4e818283076020823 100644 (file)
@@ -68,6 +68,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
         <paramdef>void *<parameter>userdata</parameter></paramdef>
       </funcprototype>
 
+      <funcprototype>
+        <funcdef>typedef int (*<function>sd_event_time_handler_t</function>)</funcdef>
+        <paramdef>sd_event_source *<parameter>s</parameter></paramdef>
+        <paramdef>uint64_t <parameter>usec</parameter></paramdef>
+        <paramdef>void *<parameter>userdata</parameter></paramdef>
+      </funcprototype>
+
       <funcprototype>
         <funcdef>int <function>sd_event_source_get_time</function></funcdef>
         <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
@@ -132,11 +139,15 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     actually have been called at a slightly later time, subject to the
     specified accuracy value, the kernel timer slack (see
     <citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>)
-    and additional scheduling latencies. By default, the timer will
-    elapse once (SD_EVENT_ONESHOT), but this may be changed with
-    <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
-    the handler function returns a negative error code, it will be
-    disabled after the invocation, even if SD_EVENT_ON mode is set.
+    and additional scheduling latencies.</para>
+
+    <para>By default, the timer will elapse once
+    (<constant>SD_EVENT_ONESHOT</constant>), but this may be changed
+    with
+    <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <constant>SD_EVENT_ON</constant> mode is set.
     </para>
 
     <para><function>sd_event_source_get_time()</function> retrieves
@@ -185,34 +196,34 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <variablelist>
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
-        <listitem><para>Not enough memory to allocate object.</para></listitem>
+        <listitem><para>Not enough memory to allocate an object.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-EINVAL</varname></term>
+        <term><constant>-EINVAL</constant></term>
 
         <listitem><para>An invalid argument has been passed.</para></listitem>
 
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ESTALE</varname></term>
+        <term><constant>-ESTALE</constant></term>
 
         <listitem><para>The event loop is already terminated.</para></listitem>
 
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ECHILD</varname></term>
+        <term><constant>-ECHILD</constant></term>
 
         <listitem><para>The event loop has been created in a different process.</para></listitem>
 
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-ENOTSUP</varname></term>
+        <term><constant>-ENOTSUP</constant></term>
 
         <listitem><para>The selected clock is not supported by the event loop implementation.</para></listitem>
 
@@ -226,7 +237,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_event_add_time()</function> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
@@ -237,6 +248,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>
index 435ad812e2c669251b75b2090edc0aa2ce0295c0..c66e5c76f2d89ac40ccd3c6f60cd0c0d2ed85c98 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169459136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176190048"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
     loop object. The event loop object is returned in the
     <em class="parameter"><code>event</code></em> parameter. After use, drop
     the returned reference with
     <code class="function">sd_event_unref()</code>. When the last reference is
-    dropped, the event loop is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
+    dropped, the object is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
     to the default event loop object of the calling thread, possibly
     allocating a new object if no default event loop object has been
     allocated yet for the thread. After use, drop the returned
     recommended to use this call instead of
     <code class="function">sd_event_new()</code> in order to share event loop
     objects between various components that are dispatched in the same
-    thread. All threads either have exactly zero or one default event loop
-    associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
-    counter of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
-    reference counter of the specified event loop object by one. If
-    the counter hits zero, the event loop object is freed. Note that it
+    thread. All threads have exactly either zero or one default event loop
+    objects associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
+    count of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
+    reference count of the specified event loop object by one. If
+    the count hits zero, the object is freed. Note that it
     is freed regardless of whether it is the default event loop object for a
     thread or not. This means that allocating an event loop with
     <code class="function">sd_event_default()</code>, then releasing it, and
     then acquiring a new one with
     <code class="function">sd_event_default()</code> will result in two
-    distinct objects. Note that, in order to free an event loop object,
+    distinct objects. Note that in order to free an event loop object,
     all remaining event sources of the event loop also need to be
-    freed as they each keep a reference to it.</p></div><div class="refsect1"><a name="idm214173348800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
+    freed as each keeps a reference to it.</p></div><div class="refsect1"><a name="idm214176180016"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
     <code class="function">sd_event_default()</code> return 0 or a positive
     integer. On failure, they return a negative errno-style error
     code. <code class="function">sd_event_ref()</code> always returns a pointer
     to the event loop object passed
     in. <code class="function">sd_event_unref()</code> always returns
-    NULL.</p></div><div class="refsect1"><a name="idm214173344688"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object</p></dd><dt id="-EMFILE"><span class="term"><code class="varname">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173340144"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214180128816"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate the object.</p></dd><dt id="-EMFILE"><span class="term"><code class="constant">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180124320"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214173329680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214180120832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_add_io.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_io</span>(3)</span></a>,
diff --git a/man/sd_event_get_fd.3 b/man/sd_event_get_fd.3
new file mode 100644 (file)
index 0000000..5ce73e4
--- /dev/null
@@ -0,0 +1,154 @@
+'\" t
+.TH "SD_EVENT_GET_FD" "3" "" "systemd 217" "sd_event_get_fd"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sd_event_get_fd \- Obtain a file descriptor to poll for event loop events
+.SH "SYNOPSIS"
+.sp
+.ft B
+.nf
+#include <systemd/sd\-bus\&.h>
+.fi
+.ft
+.HP \w'int\ sd_event_get_fd('u
+.BI "int sd_event_get_fd(sd_bus\ *" "event" ");"
+.SH "DESCRIPTION"
+.PP
+\fBsd_event_get_fd()\fR
+returns the file descriptor that the event loop object returned by the
+\fBsd_event_new\fR(3)
+function uses to wait for events\&. This file descriptor can be polled for events\&. This makes it possible to embed the
+\fBsd-event\fR(3)
+event loop inside of another event loop\&.
+.SH "RETURN VALUE"
+.PP
+On success,
+\fBsd_event_get_fd()\fR
+returns a non\-negative integer\&. On failure, it returns a negative errno\-style error code\&.
+.SH "ERRORS"
+.PP
+Returned errors may indicate the following problems:
+.PP
+\fB\-EINVAL\fR
+.RS 4
+\fIevent\fR
+is not a valid pointer to an
+sd_event
+structure\&.
+.RE
+.PP
+\fB\-ECHILD\fR
+.RS 4
+The event loop has been created in a different process\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBExample\ \&1.\ \&Integration in glib event loop\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+/***
+  Copyright 2014 Tom Gundersen
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software\&.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT\&. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE\&.
+***/
+
+#include <assert\&.h>
+#include <errno\&.h>
+#include <stdlib\&.h>
+
+typedef struct SDEventSource {
+        GSource source;
+        GPollFD pollfd;
+        sd_event *event;
+} SDEventSource;
+
+static gboolean event_prepare(GSource *source, gint *timeout_) {
+        return sd_event_prepare(((SDEventSource *)source)\->event) > 0;
+}
+
+static gboolean event_check(GSource *source) {
+        return sd_event_wait(((SDEventSource *)source)\->event, 0) > 0;
+}
+
+static gboolean event_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) {
+        return sd_event_dispatch(((SDEventSource *)source)\->event) > 0;
+}
+
+static void event_finalize(GSource *source) {
+        sd_event_unref(((SDEventSource *)source)\->event);
+}
+
+static GSourceFuncs event_funcs = {
+        \&.prepare = event_prepare,
+        \&.check = event_check,
+        \&.dispatch = event_dispatch,
+        \&.finalize = event_finalize,
+};
+
+GSource *g_sd_event_create_source(sd_event *event) {
+        SDEventSource *source;
+
+        source = (SDEventSource *)g_source_new(&event_funcs, sizeof(SDEventSource));
+
+        source\->event = sd_event_ref(event);
+        source\->pollfd\&.fd = sd_event_get_fd(event);
+        source\->pollfd\&.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+
+        g_source_add_poll((GSource *)source, &source\->pollfd);
+
+        return (GSource *)source;
+}
+.fi
+.if n \{\
+.RE
+.\}
+.SH "NOTES"
+.PP
+\fBsd_event_get_fd()\fR
+is available as a shared library, which can be compiled and linked to with the
+\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
+file\&.
+.SH "SEE ALSO"
+.PP
+\fBsd-event\fR(3),
+\fBsd_event_new\fR(3),
+\fBsd_event_ref\fR(3)
diff --git a/man/sd_event_get_fd.html b/man/sd_event_get_fd.html
new file mode 100644 (file)
index 0000000..468b326
--- /dev/null
@@ -0,0 +1,109 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_get_fd</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_get_fd — Obtain a file descriptor to poll for event loop events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_get_fd</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197478448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_get_fd()</code> returns the file
+    descriptor that the event loop object returned by the
+    <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>
+    function uses to wait for events. This file descriptor can be
+    polled for events. This makes it possible to embed the
+    <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>
+    event loop inside of another event loop.</p></div><div class="refsect1"><a name="idm214197522016"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_get_fd()</code> returns a
+    non-negative integer. On failure, it returns a negative
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214193682832"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p><em class="parameter"><code>event</code></em> is not a valid
+        pointer to an <span class="structname">sd_event</span> structure.
+        </p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214193677280"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214193676608"></a><p class="title"><b>Example 1. Integration in glib event loop</b></p><div class="example-contents"><pre class="programlisting">/***
+  Copyright 2014 Tom Gundersen
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+***/
+
+#include &lt;assert.h&gt;
+#include &lt;errno.h&gt;
+#include &lt;stdlib.h&gt;
+
+typedef struct SDEventSource {
+        GSource source;
+        GPollFD pollfd;
+        sd_event *event;
+} SDEventSource;
+
+static gboolean event_prepare(GSource *source, gint *timeout_) {
+        return sd_event_prepare(((SDEventSource *)source)-&gt;event) &gt; 0;
+}
+
+static gboolean event_check(GSource *source) {
+        return sd_event_wait(((SDEventSource *)source)-&gt;event, 0) &gt; 0;
+}
+
+static gboolean event_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) {
+        return sd_event_dispatch(((SDEventSource *)source)-&gt;event) &gt; 0;
+}
+
+static void event_finalize(GSource *source) {
+        sd_event_unref(((SDEventSource *)source)-&gt;event);
+}
+
+static GSourceFuncs event_funcs = {
+        .prepare = event_prepare,
+        .check = event_check,
+        .dispatch = event_dispatch,
+        .finalize = event_finalize,
+};
+
+GSource *g_sd_event_create_source(sd_event *event) {
+        SDEventSource *source;
+
+        source = (SDEventSource *)g_source_new(&amp;event_funcs, sizeof(SDEventSource));
+
+        source-&gt;event = sd_event_ref(event);
+        source-&gt;pollfd.fd = sd_event_get_fd(event);
+        source-&gt;pollfd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+
+        g_source_add_poll((GSource *)source, &amp;source-&gt;pollfd);
+
+        return (GSource *)source;
+}
+</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214193674368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_get_fd()</code> is available as a
+    shared library, which can be compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214193670912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_ref</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_get_fd.xml b/man/sd_event_get_fd.xml
new file mode 100644 (file)
index 0000000..f60d807
--- /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">
+
+<!--
+This file is part of systemd.
+
+Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+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="sd_event_get_fd" conditional="ENABLE_KDBUS"
+        xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>sd_event_get_fd</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>More text</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_get_fd</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_get_fd</refname>
+
+    <refpurpose>Obtain a file descriptor to poll for event loop events</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_get_fd</function></funcdef>
+        <paramdef>sd_bus *<parameter>event</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_event_get_fd()</function> returns the file
+    descriptor that the event loop object returned by the
+    <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    function uses to wait for events. This file descriptor can be
+    polled for events. This makes it possible to embed the
+    <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    event loop inside of another event loop.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>sd_event_get_fd()</function> returns a
+    non-negative integer. On failure, it returns a negative
+    errno-style error code.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para><parameter>event</parameter> is not a valid
+        pointer to an <structname>sd_event</structname> structure.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ECHILD</constant></term>
+
+        <listitem><para>The event loop has been created in a different process.</para></listitem>
+
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Examples</title>
+
+    <example>
+      <title>Integration in glib event loop</title>
+
+      <programlisting><xi:include href="glib-event-glue.c" parse="text" /></programlisting>
+    </example>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para><function>sd_event_get_fd()</function> is available as a
+    shared library, which can be compiled and linked to with the
+    <constant>libsystemd</constant> <citerefentry
+    project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_event_get_name.3 b/man/sd_event_get_name.3
new file mode 100644 (file)
index 0000000..ca45537
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_event_set_name.3
diff --git a/man/sd_event_get_name.html b/man/sd_event_get_name.html
new file mode 100644 (file)
index 0000000..08e03f4
--- /dev/null
@@ -0,0 +1,54 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_set_name</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_set_name"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_set_name, sd_event_get_name — Set human-readable names for event sources</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_set_name</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_get_name</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195670128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_set_name()</code> can be used to set
+    an arbitrary name for the event source
+    <em class="parameter"><code>source</code></em>. This name will be used in error
+    messages generated by
+    <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>
+    for this source. Specified <em class="parameter"><code>name</code></em> must point
+    to a <code class="constant">NUL</code>-terminated string or be
+    <code class="constant">NULL</code>. In the latter case, the name will be
+    unset. The string is copied internally, so the
+    <em class="parameter"><code>name</code></em> argument is not referenced after the
+    function returns.</p><p><code class="function">sd_event_set_name()</code> can be used to
+    query the current name assigned to source
+    <em class="parameter"><code>source</code></em>. It returns a pointer to the current
+    name (possibly <code class="constant">NULL</code>) in
+    <em class="parameter"><code>name</code></em>.</p></div><div class="refsect1"><a name="idm214191824592"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_set_name()</code> and
+    <code class="function">sd_event_get_name()</code> return a
+    non-negative integer. On failure, they return a negative
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214191821856"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p><em class="parameter"><code>source</code></em> is not a valid
+        pointer to an <span class="structname">sd_event_source</span>
+        structure or the <em class="parameter"><code>name</code></em> argument for
+        <code class="function">sd_event_get_name()</code> is
+        <code class="constant">NULL</code>.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to copy the
+        name.</p></dd></dl></div></div><div class="refsect1"><a name="idm214195767536"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
+    shared library, which can be compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214195764624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="sd_event_run.html"><span class="citerefentry"><span class="refentrytitle">sd_event_run</span>(3)</span></a>
+    </p></div></div></body></html>
index 4bc01b1da4c02dd366747772d5b52114b10de906..858186e8ff39fb305c290df68fe70a995354bf46 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_EVENT_NEW" "3" "" "systemd 215" "sd_event_new"
+.TH "SD_EVENT_NEW" "3" "" "systemd 217" "sd_event_new"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -42,22 +42,22 @@ sd_event_new, sd_event_default, sd_event_ref, sd_event_unref \- Acquire and rele
 allocates a new event loop object\&. The event loop object is returned in the
 \fIevent\fR
 parameter\&. After use, drop the returned reference with
-\fBsd_event_unref()\fR\&. When the last reference is dropped, the event loop is freed\&.
+\fBsd_event_unref()\fR\&. When the last reference is dropped, the object is freed\&.
 .PP
 \fBsd_event_default()\fR
 acquires a reference to the default event loop object of the calling thread, possibly allocating a new object if no default event loop object has been allocated yet for the thread\&. After use, drop the returned reference with
 \fBsd_event_unref()\fR\&. When the last reference is dropped, the event loop is freed\&. If this function is called while the object returned from a previous call from the same thread is still referenced, the same object is returned again, but the reference is increased by one\&. It is recommended to use this call instead of
 \fBsd_event_new()\fR
-in order to share event loop objects between various components that are dispatched in the same thread\&. All threads either have exactly zero or one default event loop associated, but never more\&.
+in order to share event loop objects between various components that are dispatched in the same thread\&. All threads have exactly either zero or one default event loop objects associated, but never more\&.
 .PP
 \fBsd_event_ref()\fR
-increases the reference counter of the specified event loop object by one\&.
+increases the reference count of the specified event loop object by one\&.
 .PP
 \fBsd_event_unref()\fR
-decreases the reference counter of the specified event loop object by one\&. If the counter hits zero, the event loop object is freed\&. Note that it is freed regardless of whether it is the default event loop object for a thread or not\&. This means that allocating an event loop with
+decreases the reference count of the specified event loop object by one\&. If the count hits zero, the object is freed\&. Note that it is freed regardless of whether it is the default event loop object for a thread or not\&. This means that allocating an event loop with
 \fBsd_event_default()\fR, then releasing it, and then acquiring a new one with
 \fBsd_event_default()\fR
-will result in two distinct objects\&. Note that, in order to free an event loop object, all remaining event sources of the event loop also need to be freed as they each keep a reference to it\&.
+will result in two distinct objects\&. Note that in order to free an event loop object, all remaining event sources of the event loop also need to be freed as each keeps a reference to it\&.
 .SH "RETURN VALUE"
 .PP
 On success,
@@ -68,17 +68,18 @@ return 0 or a positive integer\&. On failure, they return a negative errno\-styl
 \fBsd_event_ref()\fR
 always returns a pointer to the event loop object passed in\&.
 \fBsd_event_unref()\fR
-always returns NULL\&.
+always returns
+\fBNULL\fR\&.
 .SH "ERRORS"
 .PP
 Returned errors may indicate the following problems:
 .PP
-\fI\-ENOMEM\fR
+\fB\-ENOMEM\fR
 .RS 4
-Not enough memory to allocate object
+Not enough memory to allocate the object\&.
 .RE
 .PP
-\fI\-EMFILE\fR
+\fB\-EMFILE\fR
 .RS 4
 The maximum number of event loops has been allocated\&.
 .RE
index 435ad812e2c669251b75b2090edc0aa2ce0295c0..c66e5c76f2d89ac40ccd3c6f60cd0c0d2ed85c98 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169459136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176190048"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
     loop object. The event loop object is returned in the
     <em class="parameter"><code>event</code></em> parameter. After use, drop
     the returned reference with
     <code class="function">sd_event_unref()</code>. When the last reference is
-    dropped, the event loop is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
+    dropped, the object is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
     to the default event loop object of the calling thread, possibly
     allocating a new object if no default event loop object has been
     allocated yet for the thread. After use, drop the returned
     recommended to use this call instead of
     <code class="function">sd_event_new()</code> in order to share event loop
     objects between various components that are dispatched in the same
-    thread. All threads either have exactly zero or one default event loop
-    associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
-    counter of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
-    reference counter of the specified event loop object by one. If
-    the counter hits zero, the event loop object is freed. Note that it
+    thread. All threads have exactly either zero or one default event loop
+    objects associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
+    count of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
+    reference count of the specified event loop object by one. If
+    the count hits zero, the object is freed. Note that it
     is freed regardless of whether it is the default event loop object for a
     thread or not. This means that allocating an event loop with
     <code class="function">sd_event_default()</code>, then releasing it, and
     then acquiring a new one with
     <code class="function">sd_event_default()</code> will result in two
-    distinct objects. Note that, in order to free an event loop object,
+    distinct objects. Note that in order to free an event loop object,
     all remaining event sources of the event loop also need to be
-    freed as they each keep a reference to it.</p></div><div class="refsect1"><a name="idm214173348800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
+    freed as each keeps a reference to it.</p></div><div class="refsect1"><a name="idm214176180016"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
     <code class="function">sd_event_default()</code> return 0 or a positive
     integer. On failure, they return a negative errno-style error
     code. <code class="function">sd_event_ref()</code> always returns a pointer
     to the event loop object passed
     in. <code class="function">sd_event_unref()</code> always returns
-    NULL.</p></div><div class="refsect1"><a name="idm214173344688"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object</p></dd><dt id="-EMFILE"><span class="term"><code class="varname">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173340144"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214180128816"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate the object.</p></dd><dt id="-EMFILE"><span class="term"><code class="constant">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180124320"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214173329680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214180120832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_add_io.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_io</span>(3)</span></a>,
index 35e58ea755e480cb8a9b1dabad4850a3f0c04794..d392ed30b0a67e867303f2a2cf0aa99ddbcb44a4 100644 (file)
@@ -86,7 +86,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <parameter>event</parameter> parameter. After use, drop
     the returned reference with
     <function>sd_event_unref()</function>. When the last reference is
-    dropped, the event loop is freed.</para>
+    dropped, the object is freed.</para>
 
     <para><function>sd_event_default()</function> acquires a reference
     to the default event loop object of the calling thread, possibly
@@ -100,23 +100,23 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     recommended to use this call instead of
     <function>sd_event_new()</function> in order to share event loop
     objects between various components that are dispatched in the same
-    thread. All threads either have exactly zero or one default event loop
-    associated, but never more.</para>
+    thread. All threads have exactly either zero or one default event loop
+    objects associated, but never more.</para>
 
     <para><function>sd_event_ref()</function> increases the reference
-    counter of the specified event loop object by one.</para>
+    count of the specified event loop object by one.</para>
 
     <para><function>sd_event_unref()</function> decreases the
-    reference counter of the specified event loop object by one. If
-    the counter hits zero, the event loop object is freed. Note that it
+    reference count of the specified event loop object by one. If
+    the count hits zero, the object is freed. Note that it
     is freed regardless of whether it is the default event loop object for a
     thread or not. This means that allocating an event loop with
     <function>sd_event_default()</function>, then releasing it, and
     then acquiring a new one with
     <function>sd_event_default()</function> will result in two
-    distinct objects. Note that, in order to free an event loop object,
+    distinct objects. Note that in order to free an event loop object,
     all remaining event sources of the event loop also need to be
-    freed as they each keep a reference to it.</para>
+    freed as each keeps a reference to it.</para>
   </refsect1>
 
   <refsect1>
@@ -128,7 +128,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     code. <function>sd_event_ref()</function> always returns a pointer
     to the event loop object passed
     in. <function>sd_event_unref()</function> always returns
-    NULL.</para>
+    <constant>NULL</constant>.</para>
   </refsect1>
 
   <refsect1>
@@ -138,13 +138,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <variablelist>
       <varlistentry>
-        <term><varname>-ENOMEM</varname></term>
+        <term><constant>-ENOMEM</constant></term>
 
-        <listitem><para>Not enough memory to allocate object</para></listitem>
+        <listitem><para>Not enough memory to allocate the object.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>-EMFILE</varname></term>
+        <term><constant>-EMFILE</constant></term>
 
         <listitem><para>The maximum number of event loops has been allocated.</para></listitem>
 
@@ -158,7 +158,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para><function>sd_event_new()</function> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     file.</para>
   </refsect1>
 
index 435ad812e2c669251b75b2090edc0aa2ce0295c0..c66e5c76f2d89ac40ccd3c6f60cd0c0d2ed85c98 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169459136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176190048"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
     loop object. The event loop object is returned in the
     <em class="parameter"><code>event</code></em> parameter. After use, drop
     the returned reference with
     <code class="function">sd_event_unref()</code>. When the last reference is
-    dropped, the event loop is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
+    dropped, the object is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
     to the default event loop object of the calling thread, possibly
     allocating a new object if no default event loop object has been
     allocated yet for the thread. After use, drop the returned
     recommended to use this call instead of
     <code class="function">sd_event_new()</code> in order to share event loop
     objects between various components that are dispatched in the same
-    thread. All threads either have exactly zero or one default event loop
-    associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
-    counter of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
-    reference counter of the specified event loop object by one. If
-    the counter hits zero, the event loop object is freed. Note that it
+    thread. All threads have exactly either zero or one default event loop
+    objects associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
+    count of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
+    reference count of the specified event loop object by one. If
+    the count hits zero, the object is freed. Note that it
     is freed regardless of whether it is the default event loop object for a
     thread or not. This means that allocating an event loop with
     <code class="function">sd_event_default()</code>, then releasing it, and
     then acquiring a new one with
     <code class="function">sd_event_default()</code> will result in two
-    distinct objects. Note that, in order to free an event loop object,
+    distinct objects. Note that in order to free an event loop object,
     all remaining event sources of the event loop also need to be
-    freed as they each keep a reference to it.</p></div><div class="refsect1"><a name="idm214173348800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
+    freed as each keeps a reference to it.</p></div><div class="refsect1"><a name="idm214176180016"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
     <code class="function">sd_event_default()</code> return 0 or a positive
     integer. On failure, they return a negative errno-style error
     code. <code class="function">sd_event_ref()</code> always returns a pointer
     to the event loop object passed
     in. <code class="function">sd_event_unref()</code> always returns
-    NULL.</p></div><div class="refsect1"><a name="idm214173344688"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object</p></dd><dt id="-EMFILE"><span class="term"><code class="varname">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173340144"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214180128816"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate the object.</p></dd><dt id="-EMFILE"><span class="term"><code class="constant">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180124320"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214173329680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214180120832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_add_io.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_io</span>(3)</span></a>,
diff --git a/man/sd_event_set_name.3 b/man/sd_event_set_name.3
new file mode 100644 (file)
index 0000000..526cc72
--- /dev/null
@@ -0,0 +1,94 @@
+'\" t
+.TH "SD_EVENT_SET_NAME" "3" "" "systemd 217" "sd_event_set_name"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sd_event_set_name, sd_event_get_name \- Set human\-readable names for event sources
+.SH "SYNOPSIS"
+.sp
+.ft B
+.nf
+#include <systemd/sd\-bus\&.h>
+.fi
+.ft
+.HP \w'int\ sd_event_set_name('u
+.BI "int sd_event_set_name(sd_event_source\ *" "source" ", const\ char\ *" "name" ");"
+.HP \w'int\ sd_event_get_name('u
+.BI "int sd_event_get_name(sd_event_source\ *" "source" ", const\ char\ **" "name" ");"
+.SH "DESCRIPTION"
+.PP
+\fBsd_event_set_name()\fR
+can be used to set an arbitrary name for the event source
+\fIsource\fR\&. This name will be used in error messages generated by
+\fBsd-event\fR(3)
+for this source\&. Specified
+\fIname\fR
+must point to a
+\fBNUL\fR\-terminated string or be
+\fBNULL\fR\&. In the latter case, the name will be unset\&. The string is copied internally, so the
+\fIname\fR
+argument is not referenced after the function returns\&.
+.PP
+\fBsd_event_set_name()\fR
+can be used to query the current name assigned to source
+\fIsource\fR\&. It returns a pointer to the current name (possibly
+\fBNULL\fR) in
+\fIname\fR\&.
+.SH "RETURN VALUE"
+.PP
+On success,
+\fBsd_event_set_name()\fR
+and
+\fBsd_event_get_name()\fR
+return a non\-negative integer\&. On failure, they return a negative errno\-style error code\&.
+.SH "ERRORS"
+.PP
+Returned errors may indicate the following problems:
+.PP
+\fB\-EINVAL\fR
+.RS 4
+\fIsource\fR
+is not a valid pointer to an
+sd_event_source
+structure or the
+\fIname\fR
+argument for
+\fBsd_event_get_name()\fR
+is
+\fBNULL\fR\&.
+.RE
+.PP
+\fB\-ENOMEM\fR
+.RS 4
+Not enough memory to copy the name\&.
+.RE
+.SH "NOTES"
+.PP
+Functions described here are available as a shared library, which can be compiled and linked to with the
+\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
+file\&.
+.SH "SEE ALSO"
+.PP
+\fBsd-event\fR(3),
+\fBsd_event_add_time\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_run\fR(3)
diff --git a/man/sd_event_set_name.html b/man/sd_event_set_name.html
new file mode 100644 (file)
index 0000000..08e03f4
--- /dev/null
@@ -0,0 +1,54 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_set_name</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_set_name"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_set_name, sd_event_get_name — Set human-readable names for event sources</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_set_name</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_get_name</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195670128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_set_name()</code> can be used to set
+    an arbitrary name for the event source
+    <em class="parameter"><code>source</code></em>. This name will be used in error
+    messages generated by
+    <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>
+    for this source. Specified <em class="parameter"><code>name</code></em> must point
+    to a <code class="constant">NUL</code>-terminated string or be
+    <code class="constant">NULL</code>. In the latter case, the name will be
+    unset. The string is copied internally, so the
+    <em class="parameter"><code>name</code></em> argument is not referenced after the
+    function returns.</p><p><code class="function">sd_event_set_name()</code> can be used to
+    query the current name assigned to source
+    <em class="parameter"><code>source</code></em>. It returns a pointer to the current
+    name (possibly <code class="constant">NULL</code>) in
+    <em class="parameter"><code>name</code></em>.</p></div><div class="refsect1"><a name="idm214191824592"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_set_name()</code> and
+    <code class="function">sd_event_get_name()</code> return a
+    non-negative integer. On failure, they return a negative
+    errno-style error code.</p></div><div class="refsect1"><a name="idm214191821856"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p><em class="parameter"><code>source</code></em> is not a valid
+        pointer to an <span class="structname">sd_event_source</span>
+        structure or the <em class="parameter"><code>name</code></em> argument for
+        <code class="function">sd_event_get_name()</code> is
+        <code class="constant">NULL</code>.</p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to copy the
+        name.</p></dd></dl></div></div><div class="refsect1"><a name="idm214195767536"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
+    shared library, which can be compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214195764624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="sd_event_run.html"><span class="citerefentry"><span class="refentrytitle">sd_event_run</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_set_name.xml b/man/sd_event_set_name.xml
new file mode 100644 (file)
index 0000000..551eef3
--- /dev/null
@@ -0,0 +1,151 @@
+<?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">
+
+<!--
+This file is part of systemd.
+
+Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+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="sd_event_set_name" conditional="ENABLE_KDBUS"
+        xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>sd_event_set_name</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>More text</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_set_name</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_set_name</refname>
+    <refname>sd_event_get_name</refname>
+
+    <refpurpose>Set human-readable names for event sources</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_set_name</function></funcdef>
+        <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+        <paramdef>const char *<parameter>name</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_get_name</function></funcdef>
+        <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+        <paramdef>const char **<parameter>name</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_event_set_name()</function> can be used to set
+    an arbitrary name for the event source
+    <parameter>source</parameter>. This name will be used in error
+    messages generated by
+    <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    for this source. Specified <parameter>name</parameter> must point
+    to a <constant>NUL</constant>-terminated string or be
+    <constant>NULL</constant>. In the latter case, the name will be
+    unset. The string is copied internally, so the
+    <parameter>name</parameter> argument is not referenced after the
+    function returns.</para>
+
+    <para><function>sd_event_set_name()</function> can be used to
+    query the current name assigned to source
+    <parameter>source</parameter>. It returns a pointer to the current
+    name (possibly <constant>NULL</constant>) in
+    <parameter>name</parameter>.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>sd_event_set_name()</function> and
+    <function>sd_event_get_name()</function> return a
+    non-negative integer. On failure, they return a negative
+    errno-style error code.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Errors</title>
+
+    <para>Returned errors may indicate the following problems:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><constant>-EINVAL</constant></term>
+
+        <listitem><para><parameter>source</parameter> is not a valid
+        pointer to an <structname>sd_event_source</structname>
+        structure or the <parameter>name</parameter> argument for
+        <function>sd_event_get_name()</function> is
+        <constant>NULL</constant>.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><constant>-ENOMEM</constant></term>
+
+        <listitem><para>Not enough memory to copy the
+        name.</para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Notes</title>
+
+    <para>Functions described here are available as a
+    shared library, which can be compiled and linked to with the
+    <constant>libsystemd</constant> <citerefentry
+    project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    file.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_run</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/sd_event_source_get_child_pid.3 b/man/sd_event_source_get_child_pid.3
new file mode 100644 (file)
index 0000000..c212ace
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_event_add_child.3
diff --git a/man/sd_event_source_get_child_pid.html b/man/sd_event_source_get_child_pid.html
new file mode 100644 (file)
index 0000000..e4871f4
--- /dev/null
@@ -0,0 +1,75 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_add_child</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_child"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_child, sd_event_source_get_child_pid — Add a child state change event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_child</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">options</var>, </td></tr><tr><td> </td><td>sd_event_child_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_child_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>const siginfo_t *<var class="pdparam">si</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_child_pid</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>pid_t *<var class="pdparam">pid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179602432"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_child()</code> adds a new child
+    state change event source to an event loop object. The event loop
+    is specified in <em class="parameter"><code>event</code></em>, the event source is
+    returned in the <em class="parameter"><code>source</code></em> parameter. The
+    <em class="parameter"><code>pid</code></em> parameter specifies the process to
+    watch. The <em class="parameter"><code>handler</code></em> must reference a
+    function to call when the process changes state. The handler
+    function will be passed the <em class="parameter"><code>userdata</code></em>
+    pointer, which may be chosen freely by the caller. The handler
+    also receives a pointer to a <span class="structname">const
+    siginfo_t</span> structure containing the information about
+    the event. The <em class="parameter"><code>options</code></em> parameter determines
+    which state changes will be watched for. It must contain an OR-ed
+    mask of <code class="constant">WEXITED</code> (watch for the child
+    terminating), <code class="constant">WSTOPPED</code> (watch for the child
+    being stopped by a signal), and <code class="constant">WCONTINUED</code>
+    (watch for the child being resumed by a signal). See
+    <a href="http://man7.org/linux/man-pages/man2/waitid.2.html"><span class="citerefentry"><span class="refentrytitle">waitid</span>(2)</span></a>
+    for futher information.</p><p>Only a single handler may be installed for a specific
+    child. The handler is enabled
+    for a single event (<code class="constant">SD_EVENT_ONESHOT</code>),
+    but this may be
+    changed with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
+    </p><p><code class="function">sd_event_source_get_child_pid()</code>
+    retrieves the configured <em class="parameter"><code>pid</code></em> of a child
+    state change event source created previously with
+    <code class="function">sd_event_add_child()</code>. It takes the event
+    source object as the <em class="parameter"><code>source</code></em> parameter and a
+    pointer to <span class="type">pid_t</span> to return the result in.
+    </p></div><div class="refsect1"><a name="idm214179587632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code.</p></div><div class="refsect1"><a name="idm214179578880"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed. This includes
+        specyfing an empty mask in <em class="parameter"><code>options</code></em> or a mask
+        which constains values different than a combination of
+        <code class="constant">WEXITED</code>, <code class="constant">WSTOPPED</code>, and
+        <code class="constant">WCONTINUED</code>.
+        </p></dd><dt id="-EBUSY"><span class="term"><code class="constant">-EBUSY</code></span><a class="headerlink" title="Permalink to this term" href="#-EBUSY">¶</a></dt><dd><p>An handler is already installed for this
+        child.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179567968"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_child()</code> and the other functions
+    described here are available as a shared library, which can be
+    compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214179564432"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    </p></div></div></body></html>
diff --git a/man/sd_event_source_get_signal.3 b/man/sd_event_source_get_signal.3
new file mode 100644 (file)
index 0000000..159be56
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_event_add_signal.3
diff --git a/man/sd_event_source_get_signal.html b/man/sd_event_source_get_signal.html
new file mode 100644 (file)
index 0000000..872254e
--- /dev/null
@@ -0,0 +1,68 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_event_add_signal</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_signal"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_signal, sd_event_source_get_signal — Add a signal event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_signal</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">signal</var>, </td></tr><tr><td> </td><td>sd_event_signal_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_signal_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>const struct signalfd_siginfo *<var class="pdparam">si</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_signal</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214187837424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_signal()</code> adds a new signal
+    event source to an event loop object. The event loop is specified
+    in <em class="parameter"><code>event</code></em>, the event source is returned in
+    the <em class="parameter"><code>source</code></em> parameter. The
+    <em class="parameter"><code>signal</code></em> parameter specifies the signal to be handled
+    (see
+    <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>).
+    The <em class="parameter"><code>handler</code></em> must reference a function to
+    call when the signal is delivered or be <code class="constant">NULL</code>.
+    The handler function will be passed the
+    <em class="parameter"><code>userdata</code></em> pointer, which may be chosen
+    freely by the caller. The handler also receives a pointer to a
+    <span class="structname">const struct signalfd_siginfo</span> containing
+    the information about the received signal. See
+    <a href="http://man7.org/linux/man-pages/man2/signalfd.2.html"><span class="citerefentry"><span class="refentrytitle">signalfd</span>(2)</span></a>
+    for futher information.</p><p>Only a single handler may be installed for a specific
+    signal. The signal will be unblocked, and must be
+    blocked when the function is called. If the handler is not
+    specified (<em class="parameter"><code>handler</code></em> is
+    <code class="constant">NULL</code>), a default handler which causes the
+    program to exit will be used.  By default, the handler is enabled
+    permanently (<code class="constant">SD_EVENT_ON</code>), but this may be
+    changed with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
+    </p><p><code class="function">sd_event_source_get_signal()</code> retrieves
+    the configured signal number of a signal event source created
+    previously with <code class="function">sd_event_add_signal()</code>. It
+    takes the event source object as the <em class="parameter"><code>source</code></em>
+    parameter.</p></div><div class="refsect1"><a name="idm214191776320"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    integer. On failure, they return a negative errno-style error
+    code. </p></div><div class="refsect1"><a name="idm214191774992"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-EBUSY"><span class="term"><code class="constant">-EBUSY</code></span><a class="headerlink" title="Permalink to this term" href="#-EBUSY">¶</a></dt><dd><p>An handler is already installed for this
+        signal or the signal was not blocked previously.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191765968"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_signal()</code> and the other functions
+    described here are available as a shared library, which can be
+    compiled and linked to with the
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214191755216"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+      <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
+      <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
+      <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
+    </p></div></div></body></html>
index 893572092a94695db0700428bbf6a3be11da0e5c..8035f625f25bd8526fdb831f003a1a99f5033556 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185413552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_time_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188667792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
     event source to an event loop object. The event loop is specified
     in <em class="parameter"><code>event</code></em>, the event source is returned in
     the <em class="parameter"><code>source</code></em> parameter. The
@@ -27,7 +27,7 @@
     one of <code class="constant">CLOCK_REALTIME</code>,
     <code class="constant">CLOCK_MONOTONIC</code> and
     <code class="constant">CLOCK_BOOTTIME_ALARM</code>. See
-    <a href="timerfd_create.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
+    <a href="http://man7.org/linux/man-pages/man2/timerfd_create.2.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
     for details regarding the various types of clocks. The
     <em class="parameter"><code>usec</code></em> parameter takes a time value in
     microseconds, relative to the clock's epoch specifying when the
     also passed the configured time it was triggered, however it might
     actually have been called at a slightly later time, subject to the
     specified accuracy value, the kernel timer slack (see
-    <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
-    and additional scheduling latencies. By default, the timer will
-    elapse once (SD_EVENT_ONESHOT), but this may be changed with
-    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>. If
-    the handler function returns a negative error code, it will be
-    disabled after the invocation, even if SD_EVENT_ON mode is set.
+    <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
+    and additional scheduling latencies.</p><p>By default, the timer will elapse once
+    (<code class="constant">SD_EVENT_ONESHOT</code>), but this may be changed
+    with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
     </p><p><code class="function">sd_event_source_get_time()</code> retrieves
     the configured time value of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     retrieves the configured clock of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     the event source object and a pointer to a variable to store the
-    clock identifier in.</p></div><div class="refsect1"><a name="idm214185385088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    clock identifier in.</p></div><div class="refsect1"><a name="idm214188638272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
     integer. On failure, they return a negative errno-style error
-    code. </p></div><div class="refsect1"><a name="idm214185383760"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="varname">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180461872"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
+    code. </p></div><div class="refsect1"><a name="idm214188636944"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="constant">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188628032"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180458928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214183947136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
-      <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
       <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
     </p></div></div></body></html>
index 893572092a94695db0700428bbf6a3be11da0e5c..8035f625f25bd8526fdb831f003a1a99f5033556 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185413552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_time_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188667792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
     event source to an event loop object. The event loop is specified
     in <em class="parameter"><code>event</code></em>, the event source is returned in
     the <em class="parameter"><code>source</code></em> parameter. The
@@ -27,7 +27,7 @@
     one of <code class="constant">CLOCK_REALTIME</code>,
     <code class="constant">CLOCK_MONOTONIC</code> and
     <code class="constant">CLOCK_BOOTTIME_ALARM</code>. See
-    <a href="timerfd_create.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
+    <a href="http://man7.org/linux/man-pages/man2/timerfd_create.2.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
     for details regarding the various types of clocks. The
     <em class="parameter"><code>usec</code></em> parameter takes a time value in
     microseconds, relative to the clock's epoch specifying when the
     also passed the configured time it was triggered, however it might
     actually have been called at a slightly later time, subject to the
     specified accuracy value, the kernel timer slack (see
-    <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
-    and additional scheduling latencies. By default, the timer will
-    elapse once (SD_EVENT_ONESHOT), but this may be changed with
-    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>. If
-    the handler function returns a negative error code, it will be
-    disabled after the invocation, even if SD_EVENT_ON mode is set.
+    <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
+    and additional scheduling latencies.</p><p>By default, the timer will elapse once
+    (<code class="constant">SD_EVENT_ONESHOT</code>), but this may be changed
+    with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
     </p><p><code class="function">sd_event_source_get_time()</code> retrieves
     the configured time value of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     retrieves the configured clock of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     the event source object and a pointer to a variable to store the
-    clock identifier in.</p></div><div class="refsect1"><a name="idm214185385088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    clock identifier in.</p></div><div class="refsect1"><a name="idm214188638272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
     integer. On failure, they return a negative errno-style error
-    code. </p></div><div class="refsect1"><a name="idm214185383760"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="varname">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180461872"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
+    code. </p></div><div class="refsect1"><a name="idm214188636944"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="constant">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188628032"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180458928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214183947136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
-      <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
       <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
     </p></div></div></body></html>
index 893572092a94695db0700428bbf6a3be11da0e5c..8035f625f25bd8526fdb831f003a1a99f5033556 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185413552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_time_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188667792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
     event source to an event loop object. The event loop is specified
     in <em class="parameter"><code>event</code></em>, the event source is returned in
     the <em class="parameter"><code>source</code></em> parameter. The
@@ -27,7 +27,7 @@
     one of <code class="constant">CLOCK_REALTIME</code>,
     <code class="constant">CLOCK_MONOTONIC</code> and
     <code class="constant">CLOCK_BOOTTIME_ALARM</code>. See
-    <a href="timerfd_create.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
+    <a href="http://man7.org/linux/man-pages/man2/timerfd_create.2.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
     for details regarding the various types of clocks. The
     <em class="parameter"><code>usec</code></em> parameter takes a time value in
     microseconds, relative to the clock's epoch specifying when the
     also passed the configured time it was triggered, however it might
     actually have been called at a slightly later time, subject to the
     specified accuracy value, the kernel timer slack (see
-    <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
-    and additional scheduling latencies. By default, the timer will
-    elapse once (SD_EVENT_ONESHOT), but this may be changed with
-    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>. If
-    the handler function returns a negative error code, it will be
-    disabled after the invocation, even if SD_EVENT_ON mode is set.
+    <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
+    and additional scheduling latencies.</p><p>By default, the timer will elapse once
+    (<code class="constant">SD_EVENT_ONESHOT</code>), but this may be changed
+    with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
     </p><p><code class="function">sd_event_source_get_time()</code> retrieves
     the configured time value of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     retrieves the configured clock of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     the event source object and a pointer to a variable to store the
-    clock identifier in.</p></div><div class="refsect1"><a name="idm214185385088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    clock identifier in.</p></div><div class="refsect1"><a name="idm214188638272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
     integer. On failure, they return a negative errno-style error
-    code. </p></div><div class="refsect1"><a name="idm214185383760"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="varname">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180461872"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
+    code. </p></div><div class="refsect1"><a name="idm214188636944"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="constant">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188628032"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180458928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214183947136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
-      <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
       <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
     </p></div></div></body></html>
index 893572092a94695db0700428bbf6a3be11da0e5c..8035f625f25bd8526fdb831f003a1a99f5033556 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185413552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_time_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188667792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
     event source to an event loop object. The event loop is specified
     in <em class="parameter"><code>event</code></em>, the event source is returned in
     the <em class="parameter"><code>source</code></em> parameter. The
@@ -27,7 +27,7 @@
     one of <code class="constant">CLOCK_REALTIME</code>,
     <code class="constant">CLOCK_MONOTONIC</code> and
     <code class="constant">CLOCK_BOOTTIME_ALARM</code>. See
-    <a href="timerfd_create.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
+    <a href="http://man7.org/linux/man-pages/man2/timerfd_create.2.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
     for details regarding the various types of clocks. The
     <em class="parameter"><code>usec</code></em> parameter takes a time value in
     microseconds, relative to the clock's epoch specifying when the
     also passed the configured time it was triggered, however it might
     actually have been called at a slightly later time, subject to the
     specified accuracy value, the kernel timer slack (see
-    <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
-    and additional scheduling latencies. By default, the timer will
-    elapse once (SD_EVENT_ONESHOT), but this may be changed with
-    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>. If
-    the handler function returns a negative error code, it will be
-    disabled after the invocation, even if SD_EVENT_ON mode is set.
+    <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
+    and additional scheduling latencies.</p><p>By default, the timer will elapse once
+    (<code class="constant">SD_EVENT_ONESHOT</code>), but this may be changed
+    with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
     </p><p><code class="function">sd_event_source_get_time()</code> retrieves
     the configured time value of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     retrieves the configured clock of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     the event source object and a pointer to a variable to store the
-    clock identifier in.</p></div><div class="refsect1"><a name="idm214185385088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    clock identifier in.</p></div><div class="refsect1"><a name="idm214188638272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
     integer. On failure, they return a negative errno-style error
-    code. </p></div><div class="refsect1"><a name="idm214185383760"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="varname">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180461872"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
+    code. </p></div><div class="refsect1"><a name="idm214188636944"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="constant">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188628032"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180458928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214183947136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
-      <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
       <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
     </p></div></div></body></html>
index 893572092a94695db0700428bbf6a3be11da0e5c..8035f625f25bd8526fdb831f003a1a99f5033556 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185413552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_add_time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_add_time, sd_event_source_get_time, sd_event_source_set_time, sd_event_source_get_time_accuracy, sd_event_source_set_time_accuracy, sd_event_source_get_time_clock — Add a timer event source to an event loop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_add_time</b>(</code></td><td>sd_event *<var class="pdparam">event</var>, </td></tr><tr><td> </td><td>sd_event_source **<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t <var class="pdparam">clock</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">accuracy</var>, </td></tr><tr><td> </td><td>sd_event_time_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">typedef int (*<b class="fsfunc">sd_event_time_handler_t</b>)(</code></td><td>sd_event_source *<var class="pdparam">s</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>void *<var class="pdparam">userdata</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_set_time_accuracy</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>usec_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_source_get_time_clock</b>(</code></td><td>sd_event_source *<var class="pdparam">source</var>, </td></tr><tr><td> </td><td>clockid_t *<var class="pdparam">clock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188667792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_add_time()</code> adds a new timer
     event source to an event loop object. The event loop is specified
     in <em class="parameter"><code>event</code></em>, the event source is returned in
     the <em class="parameter"><code>source</code></em> parameter. The
@@ -27,7 +27,7 @@
     one of <code class="constant">CLOCK_REALTIME</code>,
     <code class="constant">CLOCK_MONOTONIC</code> and
     <code class="constant">CLOCK_BOOTTIME_ALARM</code>. See
-    <a href="timerfd_create.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
+    <a href="http://man7.org/linux/man-pages/man2/timerfd_create.2.html"><span class="citerefentry"><span class="refentrytitle">timerfd_create</span>(2)</span></a>
     for details regarding the various types of clocks. The
     <em class="parameter"><code>usec</code></em> parameter takes a time value in
     microseconds, relative to the clock's epoch specifying when the
     also passed the configured time it was triggered, however it might
     actually have been called at a slightly later time, subject to the
     specified accuracy value, the kernel timer slack (see
-    <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
-    and additional scheduling latencies. By default, the timer will
-    elapse once (SD_EVENT_ONESHOT), but this may be changed with
-    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>. If
-    the handler function returns a negative error code, it will be
-    disabled after the invocation, even if SD_EVENT_ON mode is set.
+    <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>)
+    and additional scheduling latencies.</p><p>By default, the timer will elapse once
+    (<code class="constant">SD_EVENT_ONESHOT</code>), but this may be changed
+    with
+    <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>.
+    If the handler function returns a negative error code, it will be
+    disabled after the invocation, even if
+    <code class="constant">SD_EVENT_ON</code> mode is set.
     </p><p><code class="function">sd_event_source_get_time()</code> retrieves
     the configured time value of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     retrieves the configured clock of a timer event source created
     previously with <code class="function">sd_event_add_time()</code>. It takes
     the event source object and a pointer to a variable to store the
-    clock identifier in.</p></div><div class="refsect1"><a name="idm214185385088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
+    clock identifier in.</p></div><div class="refsect1"><a name="idm214188638272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these functions return 0 or a positive
     integer. On failure, they return a negative errno-style error
-    code. </p></div><div class="refsect1"><a name="idm214185383760"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object.</p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="varname">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="varname">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180461872"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
+    code. </p></div><div class="refsect1"><a name="idm214188636944"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate an object.</p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p>An invalid argument has been passed.</p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p>The event loop is already terminated.</p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p>The event loop has been created in a different process.</p></dd><dt id="-ENOTSUP"><span class="term"><code class="constant">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p>The selected clock is not supported by the event loop implementation.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188628032"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_add_time()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214180458928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214183947136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>,
-      <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+      <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>,
+      <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>,
+      <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
       <a href="sd_event_source_set_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_enabled</span>(3)</span></a>
     </p></div></div></body></html>
index 435ad812e2c669251b75b2090edc0aa2ce0295c0..c66e5c76f2d89ac40ccd3c6f60cd0c0d2ed85c98 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214169459136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_event_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_event_new, sd_event_default, sd_event_ref, sd_event_unref — Acquire and release an event loop object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-bus.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_new</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_event_default</b>(</code></td><td>sd_bus **<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_ref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_bus *<b class="fsfunc">sd_event_unref</b>(</code></td><td>sd_bus *<var class="pdparam">event</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176190048"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_event_new()</code> allocates a new event
     loop object. The event loop object is returned in the
     <em class="parameter"><code>event</code></em> parameter. After use, drop
     the returned reference with
     <code class="function">sd_event_unref()</code>. When the last reference is
-    dropped, the event loop is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
+    dropped, the object is freed.</p><p><code class="function">sd_event_default()</code> acquires a reference
     to the default event loop object of the calling thread, possibly
     allocating a new object if no default event loop object has been
     allocated yet for the thread. After use, drop the returned
     recommended to use this call instead of
     <code class="function">sd_event_new()</code> in order to share event loop
     objects between various components that are dispatched in the same
-    thread. All threads either have exactly zero or one default event loop
-    associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
-    counter of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
-    reference counter of the specified event loop object by one. If
-    the counter hits zero, the event loop object is freed. Note that it
+    thread. All threads have exactly either zero or one default event loop
+    objects associated, but never more.</p><p><code class="function">sd_event_ref()</code> increases the reference
+    count of the specified event loop object by one.</p><p><code class="function">sd_event_unref()</code> decreases the
+    reference count of the specified event loop object by one. If
+    the count hits zero, the object is freed. Note that it
     is freed regardless of whether it is the default event loop object for a
     thread or not. This means that allocating an event loop with
     <code class="function">sd_event_default()</code>, then releasing it, and
     then acquiring a new one with
     <code class="function">sd_event_default()</code> will result in two
-    distinct objects. Note that, in order to free an event loop object,
+    distinct objects. Note that in order to free an event loop object,
     all remaining event sources of the event loop also need to be
-    freed as they each keep a reference to it.</p></div><div class="refsect1"><a name="idm214173348800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
+    freed as each keeps a reference to it.</p></div><div class="refsect1"><a name="idm214176180016"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_event_new()</code> and
     <code class="function">sd_event_default()</code> return 0 or a positive
     integer. On failure, they return a negative errno-style error
     code. <code class="function">sd_event_ref()</code> always returns a pointer
     to the event loop object passed
     in. <code class="function">sd_event_unref()</code> always returns
-    NULL.</p></div><div class="refsect1"><a name="idm214173344688"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate object</p></dd><dt id="-EMFILE"><span class="term"><code class="varname">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173340144"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
+    <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214180128816"></a><h2 id="Errors">Errors<a class="headerlink" title="Permalink to this headline" href="#Errors">¶</a></h2><p>Returned errors may indicate the following problems:</p><div class="variablelist"><dl class="variablelist"><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p>Not enough memory to allocate the object.</p></dd><dt id="-EMFILE"><span class="term"><code class="constant">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p>The maximum number of event loops has been allocated.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180124320"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><code class="function">sd_event_new()</code> and the other functions
     described here are available as a shared library, which can be
     compiled and linked to with the
-    <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-    file.</p></div><div class="refsect1"><a name="idm214173329680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+    file.</p></div><div class="refsect1"><a name="idm214180120832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="sd-event.html"><span class="citerefentry"><span class="refentrytitle">sd-event</span>(3)</span></a>,
       <a href="sd_event_add_io.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_io</span>(3)</span></a>,
index 693a9655d134887becae0b0bd5184a327e8d66e0..d6ef6cb4dc5f0c13919b87dd6a1ddfc221938195 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188979664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182274704"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
                 to determine all currently available local
                 seats. Returns a <code class="constant">NULL</code> terminated array of seat
                 identifiers. The returned array and all strings it
                 references need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p>Similarly, <code class="function">sd_get_sessions()</code> may
                 be used to determine all Unix users who currently have login sessions.</p><p>Similarly,
                 <code class="function">sd_get_machine_names()</code> may be
                 used to determine all current virtual machines and
-                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214188972032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
+                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214182266800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> return the
                 number of entries in the arrays. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188967808"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214186167504"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192866880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186161680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index 1e78df34ef33c4e6c8c7ae854a816e2bc41ff0c8..34a0e702e480524fd8d4f3c369c9fb525a583257 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_GET_SEATS" "3" "" "systemd 215" "sd_get_seats"
+.TH "SD_GET_SEATS" "3" "" "systemd 217" "sd_get_seats"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 693a9655d134887becae0b0bd5184a327e8d66e0..d6ef6cb4dc5f0c13919b87dd6a1ddfc221938195 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188979664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182274704"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
                 to determine all currently available local
                 seats. Returns a <code class="constant">NULL</code> terminated array of seat
                 identifiers. The returned array and all strings it
                 references need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p>Similarly, <code class="function">sd_get_sessions()</code> may
                 be used to determine all Unix users who currently have login sessions.</p><p>Similarly,
                 <code class="function">sd_get_machine_names()</code> may be
                 used to determine all current virtual machines and
-                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214188972032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
+                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214182266800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> return the
                 number of entries in the arrays. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188967808"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214186167504"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192866880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186161680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index a49dde80c8fbc07b4c5db0657ae7f31cd46cf8f7..76527c3f6fdbb4277fb9fcad1e137abb872e5b48 100644 (file)
@@ -85,7 +85,7 @@
                 seats. Returns a <constant>NULL</constant> terminated array of seat
                 identifiers. The returned array and all strings it
                 references need to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use. Note that instead of an empty array
                 <constant>NULL</constant> may be returned and should be considered
                 equivalent to an empty array.</para>
                 <function>sd_get_machine_names()</function> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 693a9655d134887becae0b0bd5184a327e8d66e0..d6ef6cb4dc5f0c13919b87dd6a1ddfc221938195 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188979664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182274704"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
                 to determine all currently available local
                 seats. Returns a <code class="constant">NULL</code> terminated array of seat
                 identifiers. The returned array and all strings it
                 references need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p>Similarly, <code class="function">sd_get_sessions()</code> may
                 be used to determine all Unix users who currently have login sessions.</p><p>Similarly,
                 <code class="function">sd_get_machine_names()</code> may be
                 used to determine all current virtual machines and
-                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214188972032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
+                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214182266800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> return the
                 number of entries in the arrays. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188967808"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214186167504"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192866880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186161680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index 693a9655d134887becae0b0bd5184a327e8d66e0..d6ef6cb4dc5f0c13919b87dd6a1ddfc221938195 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188979664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_get_seats"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_get_seats, sd_get_sessions, sd_get_uids, sd_get_machine_names — Determine available seats, sessions, logged in users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_seats</b>(</code></td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_sessions</b>(</code></td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_uids</b>(</code></td><td>uid_t **<var class="pdparam">users</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_get_machine_names</b>(</code></td><td>char ***<var class="pdparam">machines</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182274704"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_get_seats()</code> may be used
                 to determine all currently available local
                 seats. Returns a <code class="constant">NULL</code> terminated array of seat
                 identifiers. The returned array and all strings it
                 references need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p>Similarly, <code class="function">sd_get_sessions()</code> may
                 be used to determine all Unix users who currently have login sessions.</p><p>Similarly,
                 <code class="function">sd_get_machine_names()</code> may be
                 used to determine all current virtual machines and
-                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214188972032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
+                containers on the system.</p><p>Note that the returned lists are not sorted and in an undefined order.</p></div><div class="refsect1"><a name="idm214182266800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> return the
                 number of entries in the arrays. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188967808"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214186167504"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_get_seats()</code>,
                 <code class="function">sd_get_sessions()</code>,
                 <code class="function">sd_get_uids()</code> and
                 <code class="function">sd_get_machine_names()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192866880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186161680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index 913e12f3247b208f1463c5ef1193713668dee8cd..d4a2a71839e86649ea43fee1697560438408ed1c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191197712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214182199552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
                 process and generate 128-bit ID values. The 128-bit ID
                 values processed and generated by these APIs are a
                 generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
@@ -55,7 +55,7 @@
 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> may be used
                 to format a 128-bit ID in a
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 format string, as shown in the following
                 example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
         sd_id128_t id;
 }</pre><p>Note that new, randomized IDs may be generated
                 with
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
-                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214187744304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214179846512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214191643840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214186132384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
                 </p></div></div></body></html>
index fa0af57c6f4f8aad8625ba4b49d6fab5015b65dc..89dac78c36f79a7b91dc7d3ecfe7ab94ebb4c60b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_id128_to_string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_to_string, sd_id128_from_string — Format or parse 128-bit IDs as strings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">char *<b class="fsfunc">sd_id128_to_string</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, char <var class="pdparam">s</var>[33]<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_from_string</b>(</code></td><td>const char *<var class="pdparam">s</var>, sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171729760"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_to_string()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_id128_to_string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_to_string, sd_id128_from_string — Format or parse 128-bit IDs as strings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">char *<b class="fsfunc">sd_id128_to_string</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, char <var class="pdparam">s</var>[33]<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_from_string</b>(</code></td><td>const char *<var class="pdparam">s</var>, sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214198522032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_to_string()</code>
                 formats a 128-bit ID as a character string. It expects
                 the ID and a string array capable of storing 33
                 characters. The ID will be formatted as 32 lowercase
                 architectures, i.e. the results do not depend on
                 endianness.</p><p>When formatting a 128-bit ID into a string, it is
                 often easier to use a format string for
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>. This
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>. This
                 is easily done using the
                 <code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> macros. For
                 more information see
-                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214171795728"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_id128_to_string()</code> always
+                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214202469152"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_id128_to_string()</code> always
                 succeeds and returns a pointer to the string array
                 passed in. <code class="function">sd_id128_from_string</code>
                 returns 0 on success, in which case
                 <em class="parameter"><code>ret</code></em> is filled in, or a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214171792528"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_to_string()</code>
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214202465952"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_to_string()</code>
                 and <code class="function">sd_id128_from_string()</code> interfaces are
                 available as a shared library, which can be compiled and
-                linked to with the "<code class="literal">libsystemd</code>" <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214171788160"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                linked to with the "<code class="literal">libsystemd</code>" <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214202461312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 </p></div></div></body></html>
index 5dafbf8f8b157b337b00aa1537a533eda2243608..42656d8384df838c17b1a3dcab6c6e8e0ab9741f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_id128_get_machine"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_get_machine, sd_id128_get_boot — Retrieve 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_machine</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_boot</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214189049216"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_get_machine()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_id128_get_machine"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_get_machine, sd_id128_get_boot — Retrieve 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_machine</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_boot</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184937184"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_get_machine()</code>
                 returns the machine ID of the executing host. This
                 reads and parses the
                 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
@@ -32,7 +32,7 @@
                 file exposed by the kernel. It is randomly generated
                 early at boot and is unique for every running kernel
                 instance. See
-                <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
+                <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
                 for more information. This function also internally
                 caches the returned ID to make this call a cheap
                 operation.</p><p>Note that
                 one. For more information, see
                 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>.</p><p>For more information about the
                 "<code class="literal">sd_id128_t</code>" type see
-                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214188999632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The two calls return 0 on success (in which
+                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214188884112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The two calls return 0 on success (in which
                 case <em class="parameter"><code>ret</code></em> is filled in), or a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188738304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_get_machine()</code>
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188882272"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_get_machine()</code>
                 and <code class="function">sd_id128_get_boot()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                "<code class="literal">libsystemd</code>" <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188748720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                "<code class="literal">libsystemd</code>" <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188877616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
-                        <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>
                 </p></div></div></body></html>
index 6c6f1d0c2de1f962131ecd156718015f1adfbe1e..f9d972d66dc3a8fcdd924245dac6d3eeefabc35f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_ID128_GET_MACHINE" "3" "" "systemd 215" "sd_id128_get_machine"
+.TH "SD_ID128_GET_MACHINE" "3" "" "systemd 217" "sd_id128_get_machine"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 5dafbf8f8b157b337b00aa1537a533eda2243608..42656d8384df838c17b1a3dcab6c6e8e0ab9741f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_id128_get_machine"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_get_machine, sd_id128_get_boot — Retrieve 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_machine</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_boot</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214189049216"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_get_machine()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_id128_get_machine"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_get_machine, sd_id128_get_boot — Retrieve 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_machine</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_get_boot</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184937184"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_get_machine()</code>
                 returns the machine ID of the executing host. This
                 reads and parses the
                 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
@@ -32,7 +32,7 @@
                 file exposed by the kernel. It is randomly generated
                 early at boot and is unique for every running kernel
                 instance. See
-                <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
+                <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
                 for more information. This function also internally
                 caches the returned ID to make this call a cheap
                 operation.</p><p>Note that
                 one. For more information, see
                 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>.</p><p>For more information about the
                 "<code class="literal">sd_id128_t</code>" type see
-                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214188999632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The two calls return 0 on success (in which
+                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214188884112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The two calls return 0 on success (in which
                 case <em class="parameter"><code>ret</code></em> is filled in), or a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188738304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_get_machine()</code>
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188882272"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_get_machine()</code>
                 and <code class="function">sd_id128_get_boot()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                "<code class="literal">libsystemd</code>" <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188748720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                "<code class="literal">libsystemd</code>" <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188877616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
-                        <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>
                 </p></div></div></body></html>
index 164fcb73a5ddbaf7b6c7f45fd49ae8190d50b15b..b3bf529c388f99d82b39d0e952628c5b3ad28fe1 100644 (file)
@@ -83,7 +83,7 @@
                 file exposed by the kernel. It is randomly generated
                 early at boot and is unique for every running kernel
                 instance. See
-                <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>
                 for more information. This function also internally
                 caches the returned ID to make this call a cheap
                 operation.</para>
                 and <function>sd_id128_get_boot()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <literal>libsystemd</literal> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 5e64581d3c80ac2bc94185dfb5449d3f7cae26d0..c9a7dce1422a835e984768ea28d703bf9a8b68b1 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_ID128_RANDOMIZE" "3" "" "systemd 215" "sd_id128_randomize"
+.TH "SD_ID128_RANDOMIZE" "3" "" "systemd 217" "sd_id128_randomize"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 310d29961110cec66b3cd4ed5156a67b5ec34186..990c73f287f7c2823d19cecadd4727c88301925a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_id128_randomize"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_randomize — Generate 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_randomize</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193952784"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_randomize()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_id128_randomize"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_randomize — Generate 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_randomize</b>(</code></td><td>sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175519184"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_randomize()</code>
                 generates a new randomized 128-bit ID and returns it
                 in <em class="parameter"><code>ret</code></em>. Every invocation
                 returns a new randomly generated ID. This uses the
                 <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
                 <code class="option">--new-id</code> option may be used as a
                 command-line front-end for
-                <code class="function">sd_id128_randomize()</code>.</p></div><div class="refsect1"><a name="idm214193496448"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The call returns 0 on success (in which
+                <code class="function">sd_id128_randomize()</code>.</p></div><div class="refsect1"><a name="idm214175510592"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The call returns 0 on success (in which
                 case <em class="parameter"><code>ret</code></em> is filled in), or a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214192733072"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_randomize()</code> interface
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214175508752"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_randomize()</code> interface
                 is available as a shared library, which can be compiled
                 and linked to with the
-                "<code class="literal">libsystemd</code>" <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214193438416"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                "<code class="literal">libsystemd</code>" <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214179462704"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
-                        <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
                 </p></div></div></body></html>
index e345004eaeb0d9c2ad06d1aa1c939ed13ab938e6..8c01ce826e3a6bd712a28d3bc5c885589662b3d9 100644 (file)
@@ -97,7 +97,7 @@
                 <para>The <function>sd_id128_randomize()</function> interface
                 is available as a shared library, which can be compiled
                 and linked to with the
-                <literal>libsystemd</literal> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 913e12f3247b208f1463c5ef1193713668dee8cd..d4a2a71839e86649ea43fee1697560438408ed1c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214191197712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm214182199552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
                 process and generate 128-bit ID values. The 128-bit ID
                 values processed and generated by these APIs are a
                 generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
@@ -55,7 +55,7 @@
 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> may be used
                 to format a 128-bit ID in a
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 format string, as shown in the following
                 example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
         sd_id128_t id;
 }</pre><p>Note that new, randomized IDs may be generated
                 with
                 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
-                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214187744304"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                <code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm214179846512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-  file.</p></div><div class="refsect1"><a name="idm214191643840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  file.</p></div><div class="refsect1"><a name="idm214186132384"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
                         <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
                         <a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
                 </p></div></div></body></html>
index 6e5ff0b727cccb941aa9b533447f4c64630fc9b7..7ee3ce063765876164abe439b61c332f7851c34f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_ID128_TO_STRING" "3" "" "systemd 215" "sd_id128_to_string"
+.TH "SD_ID128_TO_STRING" "3" "" "systemd 217" "sd_id128_to_string"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index fa0af57c6f4f8aad8625ba4b49d6fab5015b65dc..89dac78c36f79a7b91dc7d3ecfe7ab94ebb4c60b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_id128_to_string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_to_string, sd_id128_from_string — Format or parse 128-bit IDs as strings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">char *<b class="fsfunc">sd_id128_to_string</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, char <var class="pdparam">s</var>[33]<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_from_string</b>(</code></td><td>const char *<var class="pdparam">s</var>, sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171729760"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_to_string()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_id128_to_string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_id128_to_string, sd_id128_from_string — Format or parse 128-bit IDs as strings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">char *<b class="fsfunc">sd_id128_to_string</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, char <var class="pdparam">s</var>[33]<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_id128_from_string</b>(</code></td><td>const char *<var class="pdparam">s</var>, sd_id128_t *<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214198522032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_id128_to_string()</code>
                 formats a 128-bit ID as a character string. It expects
                 the ID and a string array capable of storing 33
                 characters. The ID will be formatted as 32 lowercase
                 architectures, i.e. the results do not depend on
                 endianness.</p><p>When formatting a 128-bit ID into a string, it is
                 often easier to use a format string for
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>. This
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>. This
                 is easily done using the
                 <code class="function">SD_ID128_FORMAT_STR</code> and
                 <code class="function">SD_ID128_FORMAT_VAL()</code> macros. For
                 more information see
-                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214171795728"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_id128_to_string()</code> always
+                <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>.</p></div><div class="refsect1"><a name="idm214202469152"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_id128_to_string()</code> always
                 succeeds and returns a pointer to the string array
                 passed in. <code class="function">sd_id128_from_string</code>
                 returns 0 on success, in which case
                 <em class="parameter"><code>ret</code></em> is filled in, or a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214171792528"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_to_string()</code>
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214202465952"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_id128_to_string()</code>
                 and <code class="function">sd_id128_from_string()</code> interfaces are
                 available as a shared library, which can be compiled and
-                linked to with the "<code class="literal">libsystemd</code>" <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214171788160"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                linked to with the "<code class="literal">libsystemd</code>" <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214202461312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>,
-                        <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 </p></div></div></body></html>
index 23e2bed5e3ca7885321d94e04606360c3dad1d28..62badda8e244181ae9ba2731b438cd17fec0ea42 100644 (file)
@@ -94,7 +94,7 @@
 
                 <para>When formatting a 128-bit ID into a string, it is
                 often easier to use a format string for
-                <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>. This
+                <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>. This
                 is easily done using the
                 <function>SD_ID128_FORMAT_STR</function> and
                 <function>SD_ID128_FORMAT_VAL()</function> macros. For
                 <para>The <function>sd_id128_to_string()</function>
                 and <function>sd_id128_from_string()</function> interfaces are
                 available as a shared library, which can be compiled and
-                linked to with the <literal>libsystemd</literal> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                linked to with the <literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 1ebc84a5feb54ae65be463ca84f50e07dc4fd1ec..eb477c24edb2a46e143ce9d9b9b5b5525561ea76 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_IS_FIFO" "3" "" "systemd 215" "sd_is_fifo"
+.TH "SD_IS_FIFO" "3" "" "systemd 217" "sd_is_fifo"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 374575e03bacd42e9911fdc4bcbf454380b51021..d2e3d59b3303530891c179ce256afaa1491e4b88 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182952992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188037616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
                 to check whether the specified file descriptor refers
                 to a FIFO or pipe. If the <em class="parameter"><code>path</code></em>
                 parameter is not <code class="constant">NULL</code>, it is
                 descriptor is bound to the specified file
                 name. Special files in this context are character
                 device nodes and files in <code class="filename">/proc</code>
-                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214178000768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214183036656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If the file descriptor is of
                 the specified type and bound to the specified address,
                 a positive return value is returned, otherwise
-                zero.</p></div><div class="refsect1"><a name="idm214177999328"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                zero.</p></div><div class="refsect1"><a name="idm214183035216"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these function use a combination of
                 <code class="filename">fstat()</code> and
                 <code class="filename">getsockname()</code> to check the file
-                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214177996192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214183032080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
index 374575e03bacd42e9911fdc4bcbf454380b51021..d2e3d59b3303530891c179ce256afaa1491e4b88 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182952992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188037616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
                 to check whether the specified file descriptor refers
                 to a FIFO or pipe. If the <em class="parameter"><code>path</code></em>
                 parameter is not <code class="constant">NULL</code>, it is
                 descriptor is bound to the specified file
                 name. Special files in this context are character
                 device nodes and files in <code class="filename">/proc</code>
-                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214178000768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214183036656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If the file descriptor is of
                 the specified type and bound to the specified address,
                 a positive return value is returned, otherwise
-                zero.</p></div><div class="refsect1"><a name="idm214177999328"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                zero.</p></div><div class="refsect1"><a name="idm214183035216"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these function use a combination of
                 <code class="filename">fstat()</code> and
                 <code class="filename">getsockname()</code> to check the file
-                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214177996192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214183032080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
index 374575e03bacd42e9911fdc4bcbf454380b51021..d2e3d59b3303530891c179ce256afaa1491e4b88 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182952992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188037616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
                 to check whether the specified file descriptor refers
                 to a FIFO or pipe. If the <em class="parameter"><code>path</code></em>
                 parameter is not <code class="constant">NULL</code>, it is
                 descriptor is bound to the specified file
                 name. Special files in this context are character
                 device nodes and files in <code class="filename">/proc</code>
-                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214178000768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214183036656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If the file descriptor is of
                 the specified type and bound to the specified address,
                 a positive return value is returned, otherwise
-                zero.</p></div><div class="refsect1"><a name="idm214177999328"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                zero.</p></div><div class="refsect1"><a name="idm214183035216"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these function use a combination of
                 <code class="filename">fstat()</code> and
                 <code class="filename">getsockname()</code> to check the file
-                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214177996192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214183032080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
index 374575e03bacd42e9911fdc4bcbf454380b51021..d2e3d59b3303530891c179ce256afaa1491e4b88 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182952992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188037616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
                 to check whether the specified file descriptor refers
                 to a FIFO or pipe. If the <em class="parameter"><code>path</code></em>
                 parameter is not <code class="constant">NULL</code>, it is
                 descriptor is bound to the specified file
                 name. Special files in this context are character
                 device nodes and files in <code class="filename">/proc</code>
-                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214178000768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214183036656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If the file descriptor is of
                 the specified type and bound to the specified address,
                 a positive return value is returned, otherwise
-                zero.</p></div><div class="refsect1"><a name="idm214177999328"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                zero.</p></div><div class="refsect1"><a name="idm214183035216"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these function use a combination of
                 <code class="filename">fstat()</code> and
                 <code class="filename">getsockname()</code> to check the file
-                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214177996192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214183032080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
index 374575e03bacd42e9911fdc4bcbf454380b51021..d2e3d59b3303530891c179ce256afaa1491e4b88 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182952992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188037616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
                 to check whether the specified file descriptor refers
                 to a FIFO or pipe. If the <em class="parameter"><code>path</code></em>
                 parameter is not <code class="constant">NULL</code>, it is
                 descriptor is bound to the specified file
                 name. Special files in this context are character
                 device nodes and files in <code class="filename">/proc</code>
-                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214178000768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214183036656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If the file descriptor is of
                 the specified type and bound to the specified address,
                 a positive return value is returned, otherwise
-                zero.</p></div><div class="refsect1"><a name="idm214177999328"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                zero.</p></div><div class="refsect1"><a name="idm214183035216"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these function use a combination of
                 <code class="filename">fstat()</code> and
                 <code class="filename">getsockname()</code> to check the file
-                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214177996192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214183032080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
index 374575e03bacd42e9911fdc4bcbf454380b51021..d2e3d59b3303530891c179ce256afaa1491e4b88 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182952992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_is_fifo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq, sd_is_special — Check the type of a file descriptor</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_fifo</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_inet</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">family</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">port</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_socket_unix</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">listening</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_mq</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_is_special</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188037616"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_is_fifo()</code> may be called
                 to check whether the specified file descriptor refers
                 to a FIFO or pipe. If the <em class="parameter"><code>path</code></em>
                 parameter is not <code class="constant">NULL</code>, it is
                 descriptor is bound to the specified file
                 name. Special files in this context are character
                 device nodes and files in <code class="filename">/proc</code>
-                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214178000768"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                or <code class="filename">/sys</code>.</p></div><div class="refsect1"><a name="idm214183036656"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If the file descriptor is of
                 the specified type and bound to the specified address,
                 a positive return value is returned, otherwise
-                zero.</p></div><div class="refsect1"><a name="idm214177999328"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                zero.</p></div><div class="refsect1"><a name="idm214183035216"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these function use a combination of
                 <code class="filename">fstat()</code> and
                 <code class="filename">getsockname()</code> to check the file
-                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214177996192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                descriptor type and where it is bound to.</p></div><div class="refsect1"><a name="idm214183032080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index 7ab72895ae34a8dc72ab00b37c2d4165e8f0aaa9..0ecf197dce96ed62c9f668598e2acfcb54658c9d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175498320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214174636560"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
                 a match by which to filter the entries of the journal
                 file. Matches applied with this call will filter what
                 can be iterated through and read from the journal file
                 is removed and all entries in the journal will be
                 iterated again.</p><p>Note that filtering via matches only applies to
                 the way the journal is read, it has no effect on storage
-                on disk.</p></div><div class="refsect1"><a name="idm214175672320"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
+                on disk.</p></div><div class="refsect1"><a name="idm214178567184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code> and
                 <code class="function">sd_journal_add_conjunction()</code>
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_flush_matches()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214175668288"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178563136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code>,
                 <code class="function">sd_journal_add_conjunction()</code> and
                 <code class="function">sd_journal_flush_matches()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214175662688"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178557216"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
                 context object to iterate only through messages
                 generated by the Avahi service at the four error log
                 levels, plus all messages of the message ID
@@ -110,7 +110,7 @@ int add_matches(sd_journal *j) {
         sd_journal_add_match(j, "PRIORITY=3", 0);
         sd_journal_add_disjunction(j);
         sd_journal_add_match(j, "MESSAGE_ID=03bb1dab98ab4ecfbf6fff2738bdd964", 0);
-}</pre></div><div class="refsect1"><a name="idm214175659984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178554512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 7ab72895ae34a8dc72ab00b37c2d4165e8f0aaa9..0ecf197dce96ed62c9f668598e2acfcb54658c9d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175498320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214174636560"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
                 a match by which to filter the entries of the journal
                 file. Matches applied with this call will filter what
                 can be iterated through and read from the journal file
                 is removed and all entries in the journal will be
                 iterated again.</p><p>Note that filtering via matches only applies to
                 the way the journal is read, it has no effect on storage
-                on disk.</p></div><div class="refsect1"><a name="idm214175672320"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
+                on disk.</p></div><div class="refsect1"><a name="idm214178567184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code> and
                 <code class="function">sd_journal_add_conjunction()</code>
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_flush_matches()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214175668288"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178563136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code>,
                 <code class="function">sd_journal_add_conjunction()</code> and
                 <code class="function">sd_journal_flush_matches()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214175662688"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178557216"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
                 context object to iterate only through messages
                 generated by the Avahi service at the four error log
                 levels, plus all messages of the message ID
@@ -110,7 +110,7 @@ int add_matches(sd_journal *j) {
         sd_journal_add_match(j, "PRIORITY=3", 0);
         sd_journal_add_disjunction(j);
         sd_journal_add_match(j, "MESSAGE_ID=03bb1dab98ab4ecfbf6fff2738bdd964", 0);
-}</pre></div><div class="refsect1"><a name="idm214175659984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178554512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 953918a7550adf114c14181fb848b0fe0d7bd374..774e23fc34d1241af0dedd052e8088167cfaa00d 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_ADD_MATCH" "3" "" "systemd 215" "sd_journal_add_match"
+.TH "SD_JOURNAL_ADD_MATCH" "3" "" "systemd 217" "sd_journal_add_match"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 7ab72895ae34a8dc72ab00b37c2d4165e8f0aaa9..0ecf197dce96ed62c9f668598e2acfcb54658c9d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175498320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214174636560"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
                 a match by which to filter the entries of the journal
                 file. Matches applied with this call will filter what
                 can be iterated through and read from the journal file
                 is removed and all entries in the journal will be
                 iterated again.</p><p>Note that filtering via matches only applies to
                 the way the journal is read, it has no effect on storage
-                on disk.</p></div><div class="refsect1"><a name="idm214175672320"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
+                on disk.</p></div><div class="refsect1"><a name="idm214178567184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code> and
                 <code class="function">sd_journal_add_conjunction()</code>
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_flush_matches()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214175668288"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178563136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code>,
                 <code class="function">sd_journal_add_conjunction()</code> and
                 <code class="function">sd_journal_flush_matches()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214175662688"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178557216"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
                 context object to iterate only through messages
                 generated by the Avahi service at the four error log
                 levels, plus all messages of the message ID
@@ -110,7 +110,7 @@ int add_matches(sd_journal *j) {
         sd_journal_add_match(j, "PRIORITY=3", 0);
         sd_journal_add_disjunction(j);
         sd_journal_add_match(j, "MESSAGE_ID=03bb1dab98ab4ecfbf6fff2738bdd964", 0);
-}</pre></div><div class="refsect1"><a name="idm214175659984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178554512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 2daca1629c5895cb00622cf7dfdb92e9e8f563a9..21a5ab13421a7bb03dacd1d2a19f4222ce845316 100644 (file)
                 <function>sd_journal_flush_matches()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index 5eb35328b8224011850385b38c6d4580476e211f..cd5044bbbe7807fa027b16367eb14631cfb493b4 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182872080"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173981200"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
                 the data object associated with a specific field from
                 the current journal entry. It takes four arguments:
                 the journal context object, a string with the field
@@ -77,7 +77,7 @@
                 having to decompress large compressed data objects in
                 full.</p><p><code class="function">sd_journal_get_data_threshold()</code>
                 returns the currently configured data field size
-                threshold.</p></div><div class="refsect1"><a name="idm214182845904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
+                threshold.</p></div><div class="refsect1"><a name="idm214173955088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the current entry does not include the
                 specified field, -ENOENT is returned. If
@@ -92,7 +92,7 @@
                 nothing. <code class="function">sd_journal_set_data_threshold()</code>
                 and <code class="function">sd_journal_get_threshold()</code>
                 return 0 on success or a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214182839856"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
+                code.</p></div><div class="refsect1"><a name="idm214173949040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
                 <code class="function">sd_journal_enumerate_data()</code>,
                 <code class="function">sd_journal_restart_data()</code>,
                 <code class="function">sd_journal_set_data_threshold()</code>
                 <code class="function">sd_journal_get_data_threshold()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214177917392"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214169030976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 for a complete example how to use
                 <code class="function">sd_journal_get_data()</code>.</p><p>Use the
@@ -114,7 +114,7 @@ int print_fields(sd_journal *j) {
         SD_JOURNAL_FOREACH_DATA(j, data, length)
                 printf("%.*s\n", (int) length, data);
 }
-...</pre></div><div class="refsect1"><a name="idm214177912896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+...</pre></div><div class="refsect1"><a name="idm214169026480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 8419624e21ee409961fc0d86d32be581518ef48f..7431591f4fdf231eacea2a5a61c48a13b39957e2 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197431712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178362992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 queries the journal for all unique values the
                 specified field can take. It takes two arguments: the
                 journal to query and the field name to look
                 influenced by matches set with
                 <code class="function">sd_journal_add_match()</code> but this
                 might change in a later version of this
-                software.</p></div><div class="refsect1"><a name="idm214197493904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+                software.</p></div><div class="refsect1"><a name="idm214178349152"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 returns 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_enumerate_unique()</code>
                 returns a positive integer if the next field data has
                 been read, 0 when no more fields are known, or a
                 negative errno-style error
                 code. <code class="function">sd_journal_restart_unique()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214197490352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178338080"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
                 <code class="function">sd_journal_enumerate_unique()</code> and
                 <code class="function">sd_journal_restart_unique()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197485472"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178332928"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
                 <code class="function">SD_JOURNAL_FOREACH_UNIQUE</code> macro
                 to iterate through all values a field of the journal
                 can take. The following example lists all unit names
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
                 printf("%.*s\n", (int) l, (const char*) d);
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197482672"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178328448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 7ab72895ae34a8dc72ab00b37c2d4165e8f0aaa9..0ecf197dce96ed62c9f668598e2acfcb54658c9d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214175498320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_add_match"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_add_match, sd_journal_add_disjunction, sd_journal_add_conjunction, sd_journal_flush_matches — Add or remove entry matches</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_match</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_disjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_add_conjunction</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_flush_matches</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214174636560"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_add_match()</code> adds
                 a match by which to filter the entries of the journal
                 file. Matches applied with this call will filter what
                 can be iterated through and read from the journal file
                 is removed and all entries in the journal will be
                 iterated again.</p><p>Note that filtering via matches only applies to
                 the way the journal is read, it has no effect on storage
-                on disk.</p></div><div class="refsect1"><a name="idm214175672320"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
+                on disk.</p></div><div class="refsect1"><a name="idm214178567184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code> and
                 <code class="function">sd_journal_add_conjunction()</code>
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_flush_matches()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214175668288"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178563136"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_add_match()</code>,
                 <code class="function">sd_journal_add_disjunction()</code>,
                 <code class="function">sd_journal_add_conjunction()</code> and
                 <code class="function">sd_journal_flush_matches()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214175662688"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178557216"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following example adds matches to a journal
                 context object to iterate only through messages
                 generated by the Avahi service at the four error log
                 levels, plus all messages of the message ID
@@ -110,7 +110,7 @@ int add_matches(sd_journal *j) {
         sd_journal_add_match(j, "PRIORITY=3", 0);
         sd_journal_add_disjunction(j);
         sd_journal_add_match(j, "MESSAGE_ID=03bb1dab98ab4ecfbf6fff2738bdd964", 0);
-}</pre></div><div class="refsect1"><a name="idm214175659984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178554512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index c533f54944ce61d7dc0c7e977a262217a8fb74ef..fb48d98f58cef8082b0f251d02581e138b335ced 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_GET_CATALOG" "3" "" "systemd 215" "sd_journal_get_catalog"
+.TH "SD_JOURNAL_GET_CATALOG" "3" "" "systemd 217" "sd_journal_get_catalog"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -74,7 +74,8 @@ file\&.
 \fBsd-journal\fR(3),
 \fBsd_journal_open\fR(3),
 \fBsd_journal_next\fR(3),
-\fBsd_journal_get_data\fR(3)\fBmalloc\fR(3)
+\fBsd_journal_get_data\fR(3),
+\fBmalloc\fR(3)
 .SH "NOTES"
 .IP " 1." 4
 Journal Message Catalogs
index 8e5b9442aee429cad47cd54547bcc0a872820d11..7602ab331c993aadf121bd06e396073d66f49cee 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_catalog"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_catalog, sd_journal_get_catalog_for_message_id — Retrieve message catalog entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog_for_message_id</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178125312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_catalog"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_catalog, sd_journal_get_catalog_for_message_id — Retrieve message catalog entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog_for_message_id</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214189797280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
                 retrieves a message catalog entry for the current
                 journal entry. This will look up an entry in the
                 message catalog by using the
                 open journal context is necessary for this), and no
                 field substitution is performed.</p><p>For more information about the journal message
                 catalog please refer to the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/catalog" target="_top">Journal
-                Message Catalogs</a> documentation page.</p></div><div class="refsect1"><a name="idm214178119184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
+                Message Catalogs</a> documentation page.</p></div><div class="refsect1"><a name="idm214189791104"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
                 and
                 <code class="function">sd_journal_get_catalog_for_message_id()</code>
                 return 0 on success or a negative errno-style error
                 code. If no matching message catalog entry is found,
                 -ENOENT is returned.</p><p>On successful return, <em class="parameter"><code>ret</code></em>
                 points to a new string, which must be freed with
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214178315952"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_catalog()</code> and
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.
+                </p></div><div class="refsect1"><a name="idm214193744144"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_catalog()</code> and
                 <code class="function">sd_journal_get_catalog_for_message_id()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214178311808"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214193739728"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
+                        <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
                         <a href="malloc.html"><span class="citerefentry"><span class="refentrytitle">malloc</span>(3)</span></a>
                 </p></div></div></body></html>
index f84815022f7c8a2a95396d66b401de0be584e68b..c38a645ede4c903c618183f8c3590ffe5b2f39d9 100644 (file)
 
                 <para>On successful return, <parameter>ret</parameter>
                 points to a new string, which must be freed with
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
                 </para>
         </refsect1>
 
                 <function>sd_journal_get_catalog_for_message_id()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 </para>
         </refsect1>
index 8e5b9442aee429cad47cd54547bcc0a872820d11..7602ab331c993aadf121bd06e396073d66f49cee 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_catalog"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_catalog, sd_journal_get_catalog_for_message_id — Retrieve message catalog entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog_for_message_id</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178125312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_catalog"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_catalog, sd_journal_get_catalog_for_message_id — Retrieve message catalog entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_catalog_for_message_id</b>(</code></td><td>sd_id128_t <var class="pdparam">id</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214189797280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
                 retrieves a message catalog entry for the current
                 journal entry. This will look up an entry in the
                 message catalog by using the
                 open journal context is necessary for this), and no
                 field substitution is performed.</p><p>For more information about the journal message
                 catalog please refer to the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/catalog" target="_top">Journal
-                Message Catalogs</a> documentation page.</p></div><div class="refsect1"><a name="idm214178119184"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
+                Message Catalogs</a> documentation page.</p></div><div class="refsect1"><a name="idm214189791104"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_catalog()</code>
                 and
                 <code class="function">sd_journal_get_catalog_for_message_id()</code>
                 return 0 on success or a negative errno-style error
                 code. If no matching message catalog entry is found,
                 -ENOENT is returned.</p><p>On successful return, <em class="parameter"><code>ret</code></em>
                 points to a new string, which must be freed with
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214178315952"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_catalog()</code> and
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.
+                </p></div><div class="refsect1"><a name="idm214193744144"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_catalog()</code> and
                 <code class="function">sd_journal_get_catalog_for_message_id()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214178311808"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214193739728"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
+                        <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
                         <a href="malloc.html"><span class="citerefentry"><span class="refentrytitle">malloc</span>(3)</span></a>
                 </p></div></div></body></html>
index 8b9d169a45c7e0e1f55c142ff1ad1cf411aaaf78..3a9795bf8cc72b74e228a1f88f7bd3a4fcd5ac63 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_GET_CURSOR" "3" "" "systemd 215" "sd_journal_get_cursor"
+.TH "SD_JOURNAL_GET_CURSOR" "3" "" "systemd 217" "sd_journal_get_cursor"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index c1bcbb4d211530eff0fe4d4c9f16fb86dfc552a2..f52e38e8ab62f73a75fa1272a8483044b49bb0e8 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_cursor"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cursor, sd_journal_test_cursor — Get cursor string for or test cursor string against the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_test_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172116480"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_cursor"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cursor, sd_journal_test_cursor — Get cursor string for or test cursor string against the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_test_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176235488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
                 returns a cursor string for the current journal
                 entry. A cursor is a serialization of the current
                 journal position formatted as text. The string only
@@ -38,7 +38,7 @@
                 string is allocated via libc
                 <a href="malloc.html"><span class="citerefentry"><span class="refentrytitle">malloc</span>(3)</span></a>
                 and should be freed after use with
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.</p><p>Note that
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.</p><p>Note that
                 <code class="function">sd_journal_get_cursor()</code> will not
                 work before
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>
                 whether the entry being sought to was actually found
                 in the journal or the next closest entry was used
-                instead.</p></div><div class="refsect1"><a name="idm214172307584"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
+                instead.</p></div><div class="refsect1"><a name="idm214180182880"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
                 returns 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_test_cursor()</code>
                 returns positive if the current entry matches the
                 specified cursor, 0 if it does not match the specified
                 cursor or a negative errno-style error code on
-                failure.</p></div><div class="refsect1"><a name="idm214172304784"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_cursor()</code>
+                failure.</p></div><div class="refsect1"><a name="idm214180180080"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_cursor()</code>
                 and <code class="function">sd_journal_test_cursor()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214172300656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214180175680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 015c14011e845da328e67c6a68ed3198a4301f4d..3f5483bbdaf5e295abf9fe34803b3e71483a8e45 100644 (file)
@@ -89,7 +89,7 @@
                 string is allocated via libc
                 <citerefentry><refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 and should be freed after use with
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
 
                 <para>Note that
                 <function>sd_journal_get_cursor()</function> will not
                 and <function>sd_journal_test_cursor()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 102524b106756785393895a63c7fb2a40593b3ad..44c8e6afebce2a1c86879ade8ff1534de247142d 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_cutoff_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cutoff_realtime_usec, sd_journal_get_cutoff_monotonic_usec — Read cut-off timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214196451792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
-                gets the realtime (wallclock) timestamps of the first
-                and last entries accessible in the journal.  It takes
-                three arguments: the journal context object and two
-                pointers to 64-bit unsigned integers to store the
-                timestamps in. The timestamps are in microseconds
-                since the epoch,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_cutoff_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cutoff_realtime_usec, sd_journal_get_cutoff_monotonic_usec — Read cut-off timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177515120"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
+                retrieves the realtime (wallclock) timestamps of the
+                first and last entries accessible in the journal.  It
+                takes three arguments: the journal context object
+                <em class="parameter"><code>j</code></em> and two pointers
+                <em class="parameter"><code>from</code></em> and
+                <em class="parameter"><code>to</code></em> pointing at 64-bit unsigned
+                integers to store the timestamps in. The timestamps
+                are in microseconds since the epoch,
                 i.e. <code class="constant">CLOCK_REALTIME</code>. Either one
                 of the two timestamp arguments may be passed as
                 <code class="constant">NULL</code> in case the timestamp is not
                 needed, but not both.</p><p><code class="function">sd_journal_get_cutoff_monotonic_usec()</code>
-                gets the monotonic timestamps of the first and last
-                entries accessible in the journal. It takes three
-                arguments: the journal context object, a 128-bit
-                identifier for the boot, and two pointers to 64-bit
-                unsigned integers to store the timestamps. The
-                timestamps are in microseconds since boot-up of the
-                specific boot,
+                retrieves the monotonic timestamps of the first and
+                last entries accessible in the journal. It takes three
+                arguments: the journal context object
+                <em class="parameter"><code>j</code></em>, a 128-bit identifier for the
+                boot <em class="parameter"><code>boot_id</code></em>, and two pointers
+                to 64-bit unsigned integers to store the timestamps,
+                <em class="parameter"><code>from</code></em> and
+                <em class="parameter"><code>to</code></em>. The timestamps are in
+                microseconds since boot-up of the specific boot,
                 i.e. <code class="constant">CLOCK_MONOTONIC</code>. Since the
                 monotonic clock begins new with every reboot it only
                 defines a well-defined point in time when used
                 timestamps for the boot identified by the passed boot
                 ID. Either one of the two timestamp arguments may be
                 passed as <code class="constant">NULL</code> in case the
-                timestamp is not needed, but not both.</p></div><div class="refsect1"><a name="idm214196646256"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
+                timestamp is not needed, but not both.</p></div><div class="refsect1"><a name="idm214181401984"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_cutoff_monotonic_usec()</code>
                 return 1 on success, 0 if not suitable entries are in
-                the journal or a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214196643584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
+                the journal or a negative errno-style error code.</p><p>Locations pointed to by parameters
+                <em class="parameter"><code>from</code></em> and
+                <em class="parameter"><code>to</code></em> will be set only if the
+                return value is positive, and obviously, the
+                parameters are non-null.</p></div><div class="refsect1"><a name="idm214181397408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
                 <code class="function">sd_journal_get_cutoff_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_cutoff_monotonic_usec()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214196639424"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214181392976"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
                         <a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index da5c40d7106d11e0a26f7dd3f1ed2a3d297c3f29..3c7e81a6c607c8c6f926b1da5ae48cf61469a589 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_GET_CUTOFF_REALTIME_USEC" "3" "" "systemd 215" "sd_journal_get_cutoff_realtime_usec"
+.TH "SD_JOURNAL_GET_CUTOFF_REALTIME_USEC" "3" "" "systemd 217" "sd_journal_get_cutoff_realtime_usec"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -35,13 +35,24 @@ sd_journal_get_cutoff_realtime_usec, sd_journal_get_cutoff_monotonic_usec \- Rea
 .SH "DESCRIPTION"
 .PP
 \fBsd_journal_get_cutoff_realtime_usec()\fR
-gets the realtime (wallclock) timestamps of the first and last entries accessible in the journal\&. It takes three arguments: the journal context object and two pointers to 64\-bit unsigned integers to store the timestamps in\&. The timestamps are in microseconds since the epoch, i\&.e\&.
+retrieves the realtime (wallclock) timestamps of the first and last entries accessible in the journal\&. It takes three arguments: the journal context object
+\fIj\fR
+and two pointers
+\fIfrom\fR
+and
+\fIto\fR
+pointing at 64\-bit unsigned integers to store the timestamps in\&. The timestamps are in microseconds since the epoch, i\&.e\&.
 \fBCLOCK_REALTIME\fR\&. Either one of the two timestamp arguments may be passed as
 \fBNULL\fR
 in case the timestamp is not needed, but not both\&.
 .PP
 \fBsd_journal_get_cutoff_monotonic_usec()\fR
-gets the monotonic timestamps of the first and last entries accessible in the journal\&. It takes three arguments: the journal context object, a 128\-bit identifier for the boot, and two pointers to 64\-bit unsigned integers to store the timestamps\&. The timestamps are in microseconds since boot\-up of the specific boot, i\&.e\&.
+retrieves the monotonic timestamps of the first and last entries accessible in the journal\&. It takes three arguments: the journal context object
+\fIj\fR, a 128\-bit identifier for the boot
+\fIboot_id\fR, and two pointers to 64\-bit unsigned integers to store the timestamps,
+\fIfrom\fR
+and
+\fIto\fR\&. The timestamps are in microseconds since boot\-up of the specific boot, i\&.e\&.
 \fBCLOCK_MONOTONIC\fR\&. Since the monotonic clock begins new with every reboot it only defines a well\-defined point in time when used together with an identifier identifying the boot, see
 \fBsd_id128_get_boot\fR(3)
 for more information\&. The function will return the timestamps for the boot identified by the passed boot ID\&. Either one of the two timestamp arguments may be passed as
@@ -53,6 +64,12 @@ in case the timestamp is not needed, but not both\&.
 and
 \fBsd_journal_get_cutoff_monotonic_usec()\fR
 return 1 on success, 0 if not suitable entries are in the journal or a negative errno\-style error code\&.
+.PP
+Locations pointed to by parameters
+\fIfrom\fR
+and
+\fIto\fR
+will be set only if the return value is positive, and obviously, the parameters are non\-null\&.
 .SH "NOTES"
 .PP
 The
index 102524b106756785393895a63c7fb2a40593b3ad..44c8e6afebce2a1c86879ade8ff1534de247142d 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_cutoff_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cutoff_realtime_usec, sd_journal_get_cutoff_monotonic_usec — Read cut-off timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214196451792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
-                gets the realtime (wallclock) timestamps of the first
-                and last entries accessible in the journal.  It takes
-                three arguments: the journal context object and two
-                pointers to 64-bit unsigned integers to store the
-                timestamps in. The timestamps are in microseconds
-                since the epoch,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_cutoff_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cutoff_realtime_usec, sd_journal_get_cutoff_monotonic_usec — Read cut-off timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cutoff_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">from</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">to</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177515120"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
+                retrieves the realtime (wallclock) timestamps of the
+                first and last entries accessible in the journal.  It
+                takes three arguments: the journal context object
+                <em class="parameter"><code>j</code></em> and two pointers
+                <em class="parameter"><code>from</code></em> and
+                <em class="parameter"><code>to</code></em> pointing at 64-bit unsigned
+                integers to store the timestamps in. The timestamps
+                are in microseconds since the epoch,
                 i.e. <code class="constant">CLOCK_REALTIME</code>. Either one
                 of the two timestamp arguments may be passed as
                 <code class="constant">NULL</code> in case the timestamp is not
                 needed, but not both.</p><p><code class="function">sd_journal_get_cutoff_monotonic_usec()</code>
-                gets the monotonic timestamps of the first and last
-                entries accessible in the journal. It takes three
-                arguments: the journal context object, a 128-bit
-                identifier for the boot, and two pointers to 64-bit
-                unsigned integers to store the timestamps. The
-                timestamps are in microseconds since boot-up of the
-                specific boot,
+                retrieves the monotonic timestamps of the first and
+                last entries accessible in the journal. It takes three
+                arguments: the journal context object
+                <em class="parameter"><code>j</code></em>, a 128-bit identifier for the
+                boot <em class="parameter"><code>boot_id</code></em>, and two pointers
+                to 64-bit unsigned integers to store the timestamps,
+                <em class="parameter"><code>from</code></em> and
+                <em class="parameter"><code>to</code></em>. The timestamps are in
+                microseconds since boot-up of the specific boot,
                 i.e. <code class="constant">CLOCK_MONOTONIC</code>. Since the
                 monotonic clock begins new with every reboot it only
                 defines a well-defined point in time when used
                 timestamps for the boot identified by the passed boot
                 ID. Either one of the two timestamp arguments may be
                 passed as <code class="constant">NULL</code> in case the
-                timestamp is not needed, but not both.</p></div><div class="refsect1"><a name="idm214196646256"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
+                timestamp is not needed, but not both.</p></div><div class="refsect1"><a name="idm214181401984"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cutoff_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_cutoff_monotonic_usec()</code>
                 return 1 on success, 0 if not suitable entries are in
-                the journal or a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214196643584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
+                the journal or a negative errno-style error code.</p><p>Locations pointed to by parameters
+                <em class="parameter"><code>from</code></em> and
+                <em class="parameter"><code>to</code></em> will be set only if the
+                return value is positive, and obviously, the
+                parameters are non-null.</p></div><div class="refsect1"><a name="idm214181397408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
                 <code class="function">sd_journal_get_cutoff_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_cutoff_monotonic_usec()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214196639424"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214181392976"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
                         <a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 6df4b26e6fe0e2758d802a860ea02b019835cac5..673cff45910307b8714334c8e695b37fad018d0c 100644 (file)
                 <title>Description</title>
 
                 <para><function>sd_journal_get_cutoff_realtime_usec()</function>
-                gets the realtime (wallclock) timestamps of the first
-                and last entries accessible in the journal.  It takes
-                three arguments: the journal context object and two
-                pointers to 64-bit unsigned integers to store the
-                timestamps in. The timestamps are in microseconds
-                since the epoch,
+                retrieves the realtime (wallclock) timestamps of the
+                first and last entries accessible in the journal.  It
+                takes three arguments: the journal context object
+                <parameter>j</parameter> and two pointers
+                <parameter>from</parameter> and
+                <parameter>to</parameter> pointing at 64-bit unsigned
+                integers to store the timestamps in. The timestamps
+                are in microseconds since the epoch,
                 i.e. <constant>CLOCK_REALTIME</constant>. Either one
                 of the two timestamp arguments may be passed as
                 <constant>NULL</constant> in case the timestamp is not
                 needed, but not both.</para>
 
                 <para><function>sd_journal_get_cutoff_monotonic_usec()</function>
-                gets the monotonic timestamps of the first and last
-                entries accessible in the journal. It takes three
-                arguments: the journal context object, a 128-bit
-                identifier for the boot, and two pointers to 64-bit
-                unsigned integers to store the timestamps. The
-                timestamps are in microseconds since boot-up of the
-                specific boot,
+                retrieves the monotonic timestamps of the first and
+                last entries accessible in the journal. It takes three
+                arguments: the journal context object
+                <parameter>j</parameter>, a 128-bit identifier for the
+                boot <parameter>boot_id</parameter>, and two pointers
+                to 64-bit unsigned integers to store the timestamps,
+                <parameter>from</parameter> and
+                <parameter>to</parameter>. The timestamps are in
+                microseconds since boot-up of the specific boot,
                 i.e. <constant>CLOCK_MONOTONIC</constant>. Since the
                 monotonic clock begins new with every reboot it only
                 defines a well-defined point in time when used
                 <function>sd_journal_get_cutoff_monotonic_usec()</function>
                 return 1 on success, 0 if not suitable entries are in
                 the journal or a negative errno-style error code.</para>
+
+                <para>Locations pointed to by parameters
+                <parameter>from</parameter> and
+                <parameter>to</parameter> will be set only if the
+                return value is positive, and obviously, the
+                parameters are non-null.</para>
         </refsect1>
 
         <refsect1>
                 <function>sd_journal_get_cutoff_monotonic_usec()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index d5e48eced383fccf67301f989012b0d4bddede23..b21b49ab0f5b3ba0f44399932777edc0014a8d6b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_GET_DATA" "3" "" "systemd 215" "sd_journal_get_data"
+.TH "SD_JOURNAL_GET_DATA" "3" "" "systemd 217" "sd_journal_get_data"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 5eb35328b8224011850385b38c6d4580476e211f..cd5044bbbe7807fa027b16367eb14631cfb493b4 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182872080"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173981200"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
                 the data object associated with a specific field from
                 the current journal entry. It takes four arguments:
                 the journal context object, a string with the field
@@ -77,7 +77,7 @@
                 having to decompress large compressed data objects in
                 full.</p><p><code class="function">sd_journal_get_data_threshold()</code>
                 returns the currently configured data field size
-                threshold.</p></div><div class="refsect1"><a name="idm214182845904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
+                threshold.</p></div><div class="refsect1"><a name="idm214173955088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the current entry does not include the
                 specified field, -ENOENT is returned. If
@@ -92,7 +92,7 @@
                 nothing. <code class="function">sd_journal_set_data_threshold()</code>
                 and <code class="function">sd_journal_get_threshold()</code>
                 return 0 on success or a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214182839856"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
+                code.</p></div><div class="refsect1"><a name="idm214173949040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
                 <code class="function">sd_journal_enumerate_data()</code>,
                 <code class="function">sd_journal_restart_data()</code>,
                 <code class="function">sd_journal_set_data_threshold()</code>
                 <code class="function">sd_journal_get_data_threshold()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214177917392"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214169030976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 for a complete example how to use
                 <code class="function">sd_journal_get_data()</code>.</p><p>Use the
@@ -114,7 +114,7 @@ int print_fields(sd_journal *j) {
         SD_JOURNAL_FOREACH_DATA(j, data, length)
                 printf("%.*s\n", (int) length, data);
 }
-...</pre></div><div class="refsect1"><a name="idm214177912896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+...</pre></div><div class="refsect1"><a name="idm214169026480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 12229390472374ce81478c69f48fce456f2daa40..19fbcd35c0e87b1701a7beae62fe3989e34c158e 100644 (file)
                 <function>sd_journal_get_data_threshold()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 5eb35328b8224011850385b38c6d4580476e211f..cd5044bbbe7807fa027b16367eb14631cfb493b4 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182872080"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173981200"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
                 the data object associated with a specific field from
                 the current journal entry. It takes four arguments:
                 the journal context object, a string with the field
@@ -77,7 +77,7 @@
                 having to decompress large compressed data objects in
                 full.</p><p><code class="function">sd_journal_get_data_threshold()</code>
                 returns the currently configured data field size
-                threshold.</p></div><div class="refsect1"><a name="idm214182845904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
+                threshold.</p></div><div class="refsect1"><a name="idm214173955088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the current entry does not include the
                 specified field, -ENOENT is returned. If
@@ -92,7 +92,7 @@
                 nothing. <code class="function">sd_journal_set_data_threshold()</code>
                 and <code class="function">sd_journal_get_threshold()</code>
                 return 0 on success or a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214182839856"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
+                code.</p></div><div class="refsect1"><a name="idm214173949040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
                 <code class="function">sd_journal_enumerate_data()</code>,
                 <code class="function">sd_journal_restart_data()</code>,
                 <code class="function">sd_journal_set_data_threshold()</code>
                 <code class="function">sd_journal_get_data_threshold()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214177917392"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214169030976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 for a complete example how to use
                 <code class="function">sd_journal_get_data()</code>.</p><p>Use the
@@ -114,7 +114,7 @@ int print_fields(sd_journal *j) {
         SD_JOURNAL_FOREACH_DATA(j, data, length)
                 printf("%.*s\n", (int) length, data);
 }
-...</pre></div><div class="refsect1"><a name="idm214177912896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+...</pre></div><div class="refsect1"><a name="idm214169026480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 77f881cdd0e938c580772106bbed6a37b1fbbca2..aadf0ac1625824021c918410878d17c30878c6bd 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_GET_FD" "3" "" "systemd 215" "sd_journal_get_fd"
+.TH "SD_JOURNAL_GET_FD" "3" "" "systemd 217" "sd_journal_get_fd"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 809f00b9f3b8c98e62e4801d639b89752160bc60..3aa79ce100874a130913ec864d8ad5cce666abd6 100644 (file)
@@ -255,7 +255,7 @@ else {
                 <function>sd_journal_wait()</function> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 132d7e038c8102150265398752bb7dd1db8f7674..a50355ec3dd8e964ff52846bdf448b135bd527ef 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_realtime_usec, sd_journal_get_monotonic_usec — Read timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>sd_id128_t *<var class="pdparam">boot_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173749456"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_realtime_usec, sd_journal_get_monotonic_usec — Read timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>sd_id128_t *<var class="pdparam">boot_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176329296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
                 gets the realtime (wallclock) timestamp of the
                 current journal entry. It takes two arguments: the
                 journal context object and a pointer to a 64-bit
                 is not of the current system boot.</p><p>Note that these functions will not work before
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 (or related call) has been called at least
-                once, in order to position the read pointer at a valid entry.</p></div><div class="refsect1"><a name="idm214173943232"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
+                once, in order to position the read pointer at a valid entry.</p></div><div class="refsect1"><a name="idm214180220256"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_monotonic_usec()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the boot ID parameter was passed <code class="constant">NULL</code> and the
                 monotonic timestamp of the current journal entry is
-                not of the current system boot, -ESTALE is returned by <code class="function">sd_journal_get_monotonic_usec()</code>.</p></div><div class="refsect1"><a name="idm214173939296"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
+                not of the current system boot, -ESTALE is returned by <code class="function">sd_journal_get_monotonic_usec()</code>.</p></div><div class="refsect1"><a name="idm214180216320"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
                 <code class="function">sd_journal_get_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_monotonic_usec()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214173935136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214180211888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
                         <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
                         <a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
                         <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>
                 </p></div></div></body></html>
index 8feee846b21c10e46b44c34c063fdd1db36a12b2..3d35c44c17b725dc42f509e4814d8b2037c02008 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_GET_REALTIME_USEC" "3" "" "systemd 215" "sd_journal_get_realtime_usec"
+.TH "SD_JOURNAL_GET_REALTIME_USEC" "3" "" "systemd 217" "sd_journal_get_realtime_usec"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 132d7e038c8102150265398752bb7dd1db8f7674..a50355ec3dd8e964ff52846bdf448b135bd527ef 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_realtime_usec, sd_journal_get_monotonic_usec — Read timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>sd_id128_t *<var class="pdparam">boot_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173749456"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_realtime_usec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_realtime_usec, sd_journal_get_monotonic_usec — Read timestamps from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var>, </td></tr><tr><td> </td><td>sd_id128_t *<var class="pdparam">boot_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176329296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
                 gets the realtime (wallclock) timestamp of the
                 current journal entry. It takes two arguments: the
                 journal context object and a pointer to a 64-bit
                 is not of the current system boot.</p><p>Note that these functions will not work before
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 (or related call) has been called at least
-                once, in order to position the read pointer at a valid entry.</p></div><div class="refsect1"><a name="idm214173943232"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
+                once, in order to position the read pointer at a valid entry.</p></div><div class="refsect1"><a name="idm214180220256"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_monotonic_usec()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the boot ID parameter was passed <code class="constant">NULL</code> and the
                 monotonic timestamp of the current journal entry is
-                not of the current system boot, -ESTALE is returned by <code class="function">sd_journal_get_monotonic_usec()</code>.</p></div><div class="refsect1"><a name="idm214173939296"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
+                not of the current system boot, -ESTALE is returned by <code class="function">sd_journal_get_monotonic_usec()</code>.</p></div><div class="refsect1"><a name="idm214180216320"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The
                 <code class="function">sd_journal_get_realtime_usec()</code>
                 and
                 <code class="function">sd_journal_get_monotonic_usec()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214173935136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214180211888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
                         <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
                         <a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>,
                         <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>
                 </p></div></div></body></html>
index 0912c56deaea4c71446aff5a26dd3a2d67222b0a..18fbdca722e0f35ce50d9d1e45a09110f22829cd 100644 (file)
                 <function>sd_journal_get_monotonic_usec()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 67373a7a80c9c684e274547bfe7de0000ebbdeda..a8a665373b77c54a57ee72752f609f420530b44e 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_GET_USAGE" "3" "" "systemd 215" "sd_journal_get_usage"
+.TH "SD_JOURNAL_GET_USAGE" "3" "" "systemd 217" "sd_journal_get_usage"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 67d5d5edee2c388d6613eb86b75595b9e3dc143a..5dc694966b90a2c835e28f8da26dae57532cbd5d 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_usage"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_usage — Journal disk usage</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_usage</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">bytes</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179445872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_usage()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_usage"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_usage — Journal disk usage</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_usage</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">bytes</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184763776"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_usage()</code>
                 determines the total disk space currently used by
                 journal files (in bytes). If
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code> was passed
                 when opening the journal, this value will only reflect
                 the size of journal files of the local host, otherwise
-                of all hosts.</p></div><div class="refsect1"><a name="idm214179443376"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_usage()</code>
+                of all hosts.</p></div><div class="refsect1"><a name="idm214184761280"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_usage()</code>
                 returns 0 on success or a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214179316592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_usage()</code>
+                code.</p></div><div class="refsect1"><a name="idm214184759424"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_usage()</code>
                 interface is available as a shared library, which can be
                 compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214179313200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214184755760"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 5119fba2306a3a6d81c0a784f0703dd8d5af6a6a..cd996bdb8f340a16090e44f3b20f278c420bce36 100644 (file)
@@ -86,7 +86,7 @@
                 <para>The <function>sd_journal_get_usage()</function>
                 interface is available as a shared library, which can be
                 compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index f165863bb147c7b51adf91b7c37b85b2c0b5e2de..49d74abb7f0096bf143a7641499ee3c4b9309352 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_NEXT" "3" "" "systemd 215" "sd_journal_next"
+.TH "SD_JOURNAL_NEXT" "3" "" "systemd 217" "sd_journal_next"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 8d2ec8cd7db7aaacad26b4debb890fe52c70c8d1..cd0c40ecc2ee36c6e642432a79fcc8e6197bb39d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197612176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186673504"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
                 the read pointer into the journal by one entry. The
                 only argument taken is a journal context object as
                 allocated via
@@ -48,7 +48,7 @@
                 for an example. Similarly,
                 <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
                 may be used for iterating the journal in reverse
-                order.</p></div><div class="refsect1"><a name="idm214197598784"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
+                order.</p></div><div class="refsect1"><a name="idm214186660112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
                 advanced/set back on success or a negative errno-style
                 error code. When the end or beginning of the journal
                 is reached, a number smaller than requested is
                 <code class="function">sd_journal_previous()</code> reach the
                 end/beginning of the journal they will return 0,
                 instead of 1 when they are successful. This should be
-                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214197588368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
+                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214186649728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
                 <code class="function">sd_journal_next_skip()</code> and
                 <code class="function">sd_journal_previous_skip()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197582832"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186643872"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
         }
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197579328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214186640368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 5e691a15bab156b5652ed8da00d1f1993d16ce8d..4df6b4e6fd9ff75943c014ff5113d98490465c22 100644 (file)
                 <function>sd_journal_previous_skip()</function> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 8d2ec8cd7db7aaacad26b4debb890fe52c70c8d1..cd0c40ecc2ee36c6e642432a79fcc8e6197bb39d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197612176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186673504"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
                 the read pointer into the journal by one entry. The
                 only argument taken is a journal context object as
                 allocated via
@@ -48,7 +48,7 @@
                 for an example. Similarly,
                 <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
                 may be used for iterating the journal in reverse
-                order.</p></div><div class="refsect1"><a name="idm214197598784"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
+                order.</p></div><div class="refsect1"><a name="idm214186660112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
                 advanced/set back on success or a negative errno-style
                 error code. When the end or beginning of the journal
                 is reached, a number smaller than requested is
                 <code class="function">sd_journal_previous()</code> reach the
                 end/beginning of the journal they will return 0,
                 instead of 1 when they are successful. This should be
-                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214197588368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
+                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214186649728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
                 <code class="function">sd_journal_next_skip()</code> and
                 <code class="function">sd_journal_previous_skip()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197582832"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186643872"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
         }
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197579328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214186640368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 795794831c91c5739b59179637da3506eedb7793..2e6eeafb9ec6693581f70c632d1627aecafeba1b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_OPEN" "3" "" "systemd 215" "sd_journal_open"
+.TH "SD_JOURNAL_OPEN" "3" "" "systemd 217" "sd_journal_open"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index 3d8a23ddfcc21b2bcfcffb89c1c57bbeb48bf184..2d1dbc32f8a1619c9c06646c311ab2ee2a9b4800 100644 (file)
                 <function>sd_journal_close()</function> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index df228940e21693f7b0ad805c75c39bec16dd9b67..04bdc0841b0126fa29aa7034631266a29f606c72 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214202620928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214171075312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_open()</code> opens
                 the log journal for reading. It will find all journal
                 files automatically and interleave them automatically
                 when reading. As first argument it takes a pointer to
                 locally, to its closest entry in time)
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
                 <code class="function">sd_journal_get_fd()</code> and related
-                calls.</p></div><div class="refsect1"><a name="idm214202586464"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                calls.</p></div><div class="refsect1"><a name="idm214171040560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code>, and
                 <code class="function">sd_journal_open_files()</code> calls
                 return 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_close()</code> returns
-                nothing.</p></div><div class="refsect1"><a name="idm214202582256"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
+                nothing.</p></div><div class="refsect1"><a name="idm214171036352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_open_directory()</code> and
                 <code class="function">sd_journal_close()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197661808"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214166120416"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p><code class="function">sd_journal_open()</code>,
                 <code class="function">sd_journal_close()</code>,
                 <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
                 <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
                 and <code class="function">sd_journal_open_files()</code>
                 were added in systemd-205.
                 <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
-                was deprecated.</p></div><div class="refsect1"><a name="idm214197655472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                was deprecated.</p></div><div class="refsect1"><a name="idm214166114080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
index a80243707201a36ec5dc8e69e489291ecea0b275..3580f993048caba4045dd0574d47b8d1adbd66c6 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193392656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179273248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
                 used to submit simple, plain text log entries to the
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 or
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
                 priority value is one of
                 <code class="constant">LOG_EMERG</code>,
                 <code class="constant">LOG_ALERT</code>,
@@ -37,7 +37,7 @@
                 <code class="constant">LOG_INFO</code>,
                 <code class="constant">LOG_DEBUG</code>, as defined in
                 <code class="filename">syslog.h</code>, see
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
@@ -83,7 +83,7 @@
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
                 the message string is passed as <code class="constant">NULL</code> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -103,7 +103,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 invoked. This is implemented with macros. If this is
                 not desired, it can be turned off by defining
                 SD_JOURNAL_SUPPRESS_LOCATION before including
-                <code class="filename">sd-journal.h</code>.</p><p><a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 and <code class="function">sd_journal_print()</code> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -118,32 +118,32 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 log entries that are generated via
                 <code class="function">sd_journal_send()</code>. Using
                 <code class="function">syslog()</code> has the benefit of being
-                more portable.</p></div><div class="refsect1"><a name="idm214193498576"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
+                more portable.</p></div><div class="refsect1"><a name="idm214179230560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
                 variable itself is not altered.</p><p>If
                 <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
                 is not running (the socket is not present), those
-                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214193495056"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
+                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214174312880"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
                 safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
                 </p><p><code class="function">sd_journal_print</code>,
                 <code class="function">sd_journal_printv</code>,
                 <code class="function">sd_journal_send</code>, and
                 <code class="function">sd_journal_perror</code> are
-                not async signal safe.</p></div><div class="refsect1"><a name="idm214193489376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
+                not async signal safe.</p></div><div class="refsect1"><a name="idm214174307824"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
                 <code class="function">sd_journal_printv()</code>,
                 <code class="function">sd_journal_send()</code> and
                 <code class="function">sd_journal_sendv()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188855456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214174302624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
-                        <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
                         <a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
-                        <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
                         <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
index 8d2ec8cd7db7aaacad26b4debb890fe52c70c8d1..cd0c40ecc2ee36c6e642432a79fcc8e6197bb39d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197612176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186673504"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
                 the read pointer into the journal by one entry. The
                 only argument taken is a journal context object as
                 allocated via
@@ -48,7 +48,7 @@
                 for an example. Similarly,
                 <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
                 may be used for iterating the journal in reverse
-                order.</p></div><div class="refsect1"><a name="idm214197598784"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
+                order.</p></div><div class="refsect1"><a name="idm214186660112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
                 advanced/set back on success or a negative errno-style
                 error code. When the end or beginning of the journal
                 is reached, a number smaller than requested is
                 <code class="function">sd_journal_previous()</code> reach the
                 end/beginning of the journal they will return 0,
                 instead of 1 when they are successful. This should be
-                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214197588368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
+                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214186649728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
                 <code class="function">sd_journal_next_skip()</code> and
                 <code class="function">sd_journal_previous_skip()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197582832"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186643872"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
         }
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197579328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214186640368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 8d2ec8cd7db7aaacad26b4debb890fe52c70c8d1..cd0c40ecc2ee36c6e642432a79fcc8e6197bb39d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197612176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186673504"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_next()</code> advances
                 the read pointer into the journal by one entry. The
                 only argument taken is a journal context object as
                 allocated via
@@ -48,7 +48,7 @@
                 for an example. Similarly,
                 <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
                 may be used for iterating the journal in reverse
-                order.</p></div><div class="refsect1"><a name="idm214197598784"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
+                order.</p></div><div class="refsect1"><a name="idm214186660112"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return the number of entries
                 advanced/set back on success or a negative errno-style
                 error code. When the end or beginning of the journal
                 is reached, a number smaller than requested is
                 <code class="function">sd_journal_previous()</code> reach the
                 end/beginning of the journal they will return 0,
                 instead of 1 when they are successful. This should be
-                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214197588368"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
+                considered an EOF marker.</p></div><div class="refsect1"><a name="idm214186649728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
                 <code class="function">sd_journal_next_skip()</code> and
                 <code class="function">sd_journal_previous_skip()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197582832"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214186643872"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
         }
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197579328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214186640368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 501d37f2f2db68819860d9598f0e8dbe2a27f1df..ae14b30210154318c4bfbbd9386622b5bdce9518 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_PRINT" "3" "" "systemd 215" "sd_journal_print"
+.TH "SD_JOURNAL_PRINT" "3" "" "systemd 217" "sd_journal_print"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index a80243707201a36ec5dc8e69e489291ecea0b275..3580f993048caba4045dd0574d47b8d1adbd66c6 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193392656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179273248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
                 used to submit simple, plain text log entries to the
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 or
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
                 priority value is one of
                 <code class="constant">LOG_EMERG</code>,
                 <code class="constant">LOG_ALERT</code>,
@@ -37,7 +37,7 @@
                 <code class="constant">LOG_INFO</code>,
                 <code class="constant">LOG_DEBUG</code>, as defined in
                 <code class="filename">syslog.h</code>, see
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
@@ -83,7 +83,7 @@
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
                 the message string is passed as <code class="constant">NULL</code> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -103,7 +103,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 invoked. This is implemented with macros. If this is
                 not desired, it can be turned off by defining
                 SD_JOURNAL_SUPPRESS_LOCATION before including
-                <code class="filename">sd-journal.h</code>.</p><p><a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 and <code class="function">sd_journal_print()</code> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -118,32 +118,32 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 log entries that are generated via
                 <code class="function">sd_journal_send()</code>. Using
                 <code class="function">syslog()</code> has the benefit of being
-                more portable.</p></div><div class="refsect1"><a name="idm214193498576"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
+                more portable.</p></div><div class="refsect1"><a name="idm214179230560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
                 variable itself is not altered.</p><p>If
                 <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
                 is not running (the socket is not present), those
-                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214193495056"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
+                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214174312880"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
                 safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
                 </p><p><code class="function">sd_journal_print</code>,
                 <code class="function">sd_journal_printv</code>,
                 <code class="function">sd_journal_send</code>, and
                 <code class="function">sd_journal_perror</code> are
-                not async signal safe.</p></div><div class="refsect1"><a name="idm214193489376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
+                not async signal safe.</p></div><div class="refsect1"><a name="idm214174307824"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
                 <code class="function">sd_journal_printv()</code>,
                 <code class="function">sd_journal_send()</code> and
                 <code class="function">sd_journal_sendv()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188855456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214174302624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
-                        <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
                         <a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
-                        <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
                         <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
index 0b78502c5fef33993413ded4bdefa0ccd6ebfb80..055094c9a2d8070ba2d6e69195e644e45fc1ea62 100644 (file)
@@ -98,9 +98,9 @@
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 or
-                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
+                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
                 priority value is one of
                 <constant>LOG_EMERG</constant>,
                 <constant>LOG_ALERT</constant>,
                 <constant>LOG_INFO</constant>,
                 <constant>LOG_DEBUG</constant>, as defined in
                 <filename>syslog.h</filename>, see
-                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
+                <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
                 the message string is passed as <constant>NULL</constant> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -193,7 +193,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 SD_JOURNAL_SUPPRESS_LOCATION before including
                 <filename>sd-journal.h</filename>.</para>
 
-                <para><citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <para><citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 and <function>sd_journal_print()</function> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -216,7 +216,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
 
                 <para>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 variable itself is not altered.</para>
 
                 <para>If
@@ -247,7 +247,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 <function>sd_journal_sendv()</function> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
@@ -258,9 +258,9 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>perror</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
index a80243707201a36ec5dc8e69e489291ecea0b275..3580f993048caba4045dd0574d47b8d1adbd66c6 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193392656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179273248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
                 used to submit simple, plain text log entries to the
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 or
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
                 priority value is one of
                 <code class="constant">LOG_EMERG</code>,
                 <code class="constant">LOG_ALERT</code>,
@@ -37,7 +37,7 @@
                 <code class="constant">LOG_INFO</code>,
                 <code class="constant">LOG_DEBUG</code>, as defined in
                 <code class="filename">syslog.h</code>, see
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
@@ -83,7 +83,7 @@
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
                 the message string is passed as <code class="constant">NULL</code> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -103,7 +103,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 invoked. This is implemented with macros. If this is
                 not desired, it can be turned off by defining
                 SD_JOURNAL_SUPPRESS_LOCATION before including
-                <code class="filename">sd-journal.h</code>.</p><p><a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 and <code class="function">sd_journal_print()</code> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -118,32 +118,32 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 log entries that are generated via
                 <code class="function">sd_journal_send()</code>. Using
                 <code class="function">syslog()</code> has the benefit of being
-                more portable.</p></div><div class="refsect1"><a name="idm214193498576"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
+                more portable.</p></div><div class="refsect1"><a name="idm214179230560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
                 variable itself is not altered.</p><p>If
                 <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
                 is not running (the socket is not present), those
-                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214193495056"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
+                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214174312880"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
                 safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
                 </p><p><code class="function">sd_journal_print</code>,
                 <code class="function">sd_journal_printv</code>,
                 <code class="function">sd_journal_send</code>, and
                 <code class="function">sd_journal_perror</code> are
-                not async signal safe.</p></div><div class="refsect1"><a name="idm214193489376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
+                not async signal safe.</p></div><div class="refsect1"><a name="idm214174307824"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
                 <code class="function">sd_journal_printv()</code>,
                 <code class="function">sd_journal_send()</code> and
                 <code class="function">sd_journal_sendv()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188855456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214174302624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
-                        <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
                         <a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
-                        <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
                         <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index b18f3911f5e7c38bd74e5a0e7a48dc0ebe35e50f..0ab77263c4beaa186b5b4af1543ca2cd13825642 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_QUERY_UNIQUE" "3" "" "systemd 215" "sd_journal_query_unique"
+.TH "SD_JOURNAL_QUERY_UNIQUE" "3" "" "systemd 217" "sd_journal_query_unique"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 8419624e21ee409961fc0d86d32be581518ef48f..7431591f4fdf231eacea2a5a61c48a13b39957e2 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197431712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178362992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 queries the journal for all unique values the
                 specified field can take. It takes two arguments: the
                 journal to query and the field name to look
                 influenced by matches set with
                 <code class="function">sd_journal_add_match()</code> but this
                 might change in a later version of this
-                software.</p></div><div class="refsect1"><a name="idm214197493904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+                software.</p></div><div class="refsect1"><a name="idm214178349152"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 returns 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_enumerate_unique()</code>
                 returns a positive integer if the next field data has
                 been read, 0 when no more fields are known, or a
                 negative errno-style error
                 code. <code class="function">sd_journal_restart_unique()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214197490352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178338080"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
                 <code class="function">sd_journal_enumerate_unique()</code> and
                 <code class="function">sd_journal_restart_unique()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197485472"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178332928"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
                 <code class="function">SD_JOURNAL_FOREACH_UNIQUE</code> macro
                 to iterate through all values a field of the journal
                 can take. The following example lists all unit names
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
                 printf("%.*s\n", (int) l, (const char*) d);
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197482672"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178328448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 250c7a9ff85315c822dcdb93561dcd2841f3f68f..8f0e6b816062a5849de6c6f5e9110a8b25566d3b 100644 (file)
                 <function>sd_journal_restart_unique()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 5eb35328b8224011850385b38c6d4580476e211f..cd5044bbbe7807fa027b16367eb14631cfb493b4 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182872080"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173981200"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
                 the data object associated with a specific field from
                 the current journal entry. It takes four arguments:
                 the journal context object, a string with the field
@@ -77,7 +77,7 @@
                 having to decompress large compressed data objects in
                 full.</p><p><code class="function">sd_journal_get_data_threshold()</code>
                 returns the currently configured data field size
-                threshold.</p></div><div class="refsect1"><a name="idm214182845904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
+                threshold.</p></div><div class="refsect1"><a name="idm214173955088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the current entry does not include the
                 specified field, -ENOENT is returned. If
@@ -92,7 +92,7 @@
                 nothing. <code class="function">sd_journal_set_data_threshold()</code>
                 and <code class="function">sd_journal_get_threshold()</code>
                 return 0 on success or a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214182839856"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
+                code.</p></div><div class="refsect1"><a name="idm214173949040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
                 <code class="function">sd_journal_enumerate_data()</code>,
                 <code class="function">sd_journal_restart_data()</code>,
                 <code class="function">sd_journal_set_data_threshold()</code>
                 <code class="function">sd_journal_get_data_threshold()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214177917392"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214169030976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 for a complete example how to use
                 <code class="function">sd_journal_get_data()</code>.</p><p>Use the
@@ -114,7 +114,7 @@ int print_fields(sd_journal *j) {
         SD_JOURNAL_FOREACH_DATA(j, data, length)
                 printf("%.*s\n", (int) length, data);
 }
-...</pre></div><div class="refsect1"><a name="idm214177912896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+...</pre></div><div class="refsect1"><a name="idm214169026480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 8419624e21ee409961fc0d86d32be581518ef48f..7431591f4fdf231eacea2a5a61c48a13b39957e2 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197431712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178362992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 queries the journal for all unique values the
                 specified field can take. It takes two arguments: the
                 journal to query and the field name to look
                 influenced by matches set with
                 <code class="function">sd_journal_add_match()</code> but this
                 might change in a later version of this
-                software.</p></div><div class="refsect1"><a name="idm214197493904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
+                software.</p></div><div class="refsect1"><a name="idm214178349152"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_query_unique()</code>
                 returns 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_enumerate_unique()</code>
                 returns a positive integer if the next field data has
                 been read, 0 when no more fields are known, or a
                 negative errno-style error
                 code. <code class="function">sd_journal_restart_unique()</code>
-                returns nothing.</p></div><div class="refsect1"><a name="idm214197490352"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
+                returns nothing.</p></div><div class="refsect1"><a name="idm214178338080"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
                 <code class="function">sd_journal_enumerate_unique()</code> and
                 <code class="function">sd_journal_restart_unique()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214197485472"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214178332928"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Use the
                 <code class="function">SD_JOURNAL_FOREACH_UNIQUE</code> macro
                 to iterate through all values a field of the journal
                 can take. The following example lists all unit names
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
                 printf("%.*s\n", (int) l, (const char*) d);
         sd_journal_close(j);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214197482672"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214178328448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 63314fe0247f415b7f7a302e93d0f46bb8009185..8855ac172341eb2d64e244d7272f1a30341e84a9 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
-                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186439344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
+                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188285792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
                 seeks to the beginning of the journal, i.e. the oldest
                 available entry.</p><p>Similarly,
                 <code class="function">sd_journal_seek_tail()</code> may be
                 if
                 <a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a>
                 is used the closest preceding entry is sought
-                to.</p></div><div class="refsect1"><a name="idm214186572240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214186571056"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
+                to.</p></div><div class="refsect1"><a name="idm214188272048"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214188263536"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
                 <code class="function">sd_journal_seek_tail()</code>,
                 <code class="function">sd_journal_seek_monotonic_usec()</code>,
                 <code class="function">sd_journal_seek_realtime_usec()</code>,
                 and <code class="function">sd_journal_seek_cursor()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214186564736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188256944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index aabca0bef574d39a84a213b799c9c3ac2630097c..41c1f0657f8fa8da8ac5550fb68e48408133fa5f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_SEEK_HEAD" "3" "" "systemd 215" "sd_journal_seek_head"
+.TH "SD_JOURNAL_SEEK_HEAD" "3" "" "systemd 217" "sd_journal_seek_head"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 63314fe0247f415b7f7a302e93d0f46bb8009185..8855ac172341eb2d64e244d7272f1a30341e84a9 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
-                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186439344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
+                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188285792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
                 seeks to the beginning of the journal, i.e. the oldest
                 available entry.</p><p>Similarly,
                 <code class="function">sd_journal_seek_tail()</code> may be
                 if
                 <a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a>
                 is used the closest preceding entry is sought
-                to.</p></div><div class="refsect1"><a name="idm214186572240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214186571056"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
+                to.</p></div><div class="refsect1"><a name="idm214188272048"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214188263536"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
                 <code class="function">sd_journal_seek_tail()</code>,
                 <code class="function">sd_journal_seek_monotonic_usec()</code>,
                 <code class="function">sd_journal_seek_realtime_usec()</code>,
                 and <code class="function">sd_journal_seek_cursor()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214186564736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188256944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 284479a1df7017840e05b23b3360072688630a42..2ef37e528850adba69b7017fc80cac5501bc533c 100644 (file)
                 and <function>sd_journal_seek_cursor()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 63314fe0247f415b7f7a302e93d0f46bb8009185..8855ac172341eb2d64e244d7272f1a30341e84a9 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
-                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186439344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
+                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188285792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
                 seeks to the beginning of the journal, i.e. the oldest
                 available entry.</p><p>Similarly,
                 <code class="function">sd_journal_seek_tail()</code> may be
                 if
                 <a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a>
                 is used the closest preceding entry is sought
-                to.</p></div><div class="refsect1"><a name="idm214186572240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214186571056"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
+                to.</p></div><div class="refsect1"><a name="idm214188272048"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214188263536"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
                 <code class="function">sd_journal_seek_tail()</code>,
                 <code class="function">sd_journal_seek_monotonic_usec()</code>,
                 <code class="function">sd_journal_seek_realtime_usec()</code>,
                 and <code class="function">sd_journal_seek_cursor()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214186564736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188256944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 63314fe0247f415b7f7a302e93d0f46bb8009185..8855ac172341eb2d64e244d7272f1a30341e84a9 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
-                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186439344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
+                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188285792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
                 seeks to the beginning of the journal, i.e. the oldest
                 available entry.</p><p>Similarly,
                 <code class="function">sd_journal_seek_tail()</code> may be
                 if
                 <a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a>
                 is used the closest preceding entry is sought
-                to.</p></div><div class="refsect1"><a name="idm214186572240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214186571056"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
+                to.</p></div><div class="refsect1"><a name="idm214188272048"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214188263536"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
                 <code class="function">sd_journal_seek_tail()</code>,
                 <code class="function">sd_journal_seek_monotonic_usec()</code>,
                 <code class="function">sd_journal_seek_realtime_usec()</code>,
                 and <code class="function">sd_journal_seek_cursor()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214186564736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188256944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index 63314fe0247f415b7f7a302e93d0f46bb8009185..8855ac172341eb2d64e244d7272f1a30341e84a9 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
-                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214186439344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_seek_head"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor — Seek to a position in the
+                journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_head</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_tail</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_monotonic_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>sd_id128_t <var class="pdparam">boot_id</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_realtime_usec</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_seek_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188285792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_seek_head()</code>
                 seeks to the beginning of the journal, i.e. the oldest
                 available entry.</p><p>Similarly,
                 <code class="function">sd_journal_seek_tail()</code> may be
                 if
                 <a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a>
                 is used the closest preceding entry is sought
-                to.</p></div><div class="refsect1"><a name="idm214186572240"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214186571056"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
+                to.</p></div><div class="refsect1"><a name="idm214188272048"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The functions return 0 on success or a negative
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214188263536"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_seek_head()</code>,
                 <code class="function">sd_journal_seek_tail()</code>,
                 <code class="function">sd_journal_seek_monotonic_usec()</code>,
                 <code class="function">sd_journal_seek_realtime_usec()</code>,
                 and <code class="function">sd_journal_seek_cursor()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214186564736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188256944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index a80243707201a36ec5dc8e69e489291ecea0b275..3580f993048caba4045dd0574d47b8d1adbd66c6 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193392656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179273248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
                 used to submit simple, plain text log entries to the
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 or
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
                 priority value is one of
                 <code class="constant">LOG_EMERG</code>,
                 <code class="constant">LOG_ALERT</code>,
@@ -37,7 +37,7 @@
                 <code class="constant">LOG_INFO</code>,
                 <code class="constant">LOG_DEBUG</code>, as defined in
                 <code class="filename">syslog.h</code>, see
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
@@ -83,7 +83,7 @@
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
                 the message string is passed as <code class="constant">NULL</code> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -103,7 +103,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 invoked. This is implemented with macros. If this is
                 not desired, it can be turned off by defining
                 SD_JOURNAL_SUPPRESS_LOCATION before including
-                <code class="filename">sd-journal.h</code>.</p><p><a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 and <code class="function">sd_journal_print()</code> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -118,32 +118,32 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 log entries that are generated via
                 <code class="function">sd_journal_send()</code>. Using
                 <code class="function">syslog()</code> has the benefit of being
-                more portable.</p></div><div class="refsect1"><a name="idm214193498576"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
+                more portable.</p></div><div class="refsect1"><a name="idm214179230560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
                 variable itself is not altered.</p><p>If
                 <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
                 is not running (the socket is not present), those
-                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214193495056"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
+                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214174312880"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
                 safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
                 </p><p><code class="function">sd_journal_print</code>,
                 <code class="function">sd_journal_printv</code>,
                 <code class="function">sd_journal_send</code>, and
                 <code class="function">sd_journal_perror</code> are
-                not async signal safe.</p></div><div class="refsect1"><a name="idm214193489376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
+                not async signal safe.</p></div><div class="refsect1"><a name="idm214174307824"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
                 <code class="function">sd_journal_printv()</code>,
                 <code class="function">sd_journal_send()</code> and
                 <code class="function">sd_journal_sendv()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188855456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214174302624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
-                        <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
                         <a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
-                        <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
                         <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
index a80243707201a36ec5dc8e69e489291ecea0b275..3580f993048caba4045dd0574d47b8d1adbd66c6 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193392656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179273248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_print()</code> may be
                 used to submit simple, plain text log entries to the
                 system journal. The first argument is a priority
                 value. This is followed by a format string and its
                 parameters, similar to
-                <a href="printf.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
                 or
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
                 priority value is one of
                 <code class="constant">LOG_EMERG</code>,
                 <code class="constant">LOG_ALERT</code>,
@@ -37,7 +37,7 @@
                 <code class="constant">LOG_INFO</code>,
                 <code class="constant">LOG_DEBUG</code>, as defined in
                 <code class="filename">syslog.h</code>, see
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 for details. It is recommended to use this call to
                 submit log messages in the application locale or system
                 locale and in UTF-8 format, but no such restrictions
@@ -83,7 +83,7 @@
                 the passed string, suffixed with ": " and a human
                 readable representation of the current error code
                 stored in
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
                 the message string is passed as <code class="constant">NULL</code> or empty string,
                 only the error string representation will be written,
                 prefixed with nothing. An additional journal field
@@ -103,7 +103,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 invoked. This is implemented with macros. If this is
                 not desired, it can be turned off by defining
                 SD_JOURNAL_SUPPRESS_LOCATION before including
-                <code class="filename">sd-journal.h</code>.</p><p><a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 and <code class="function">sd_journal_print()</code> may
                 largely be used interchangeably
                 functionality-wise. However, note that log messages
@@ -118,32 +118,32 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
                 log entries that are generated via
                 <code class="function">sd_journal_send()</code>. Using
                 <code class="function">syslog()</code> has the benefit of being
-                more portable.</p></div><div class="refsect1"><a name="idm214193498576"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
+                more portable.</p></div><div class="refsect1"><a name="idm214179230560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The four calls return 0 on success or a negative
                 errno-style error code. The
-                <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
                 variable itself is not altered.</p><p>If
                 <a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
                 is not running (the socket is not present), those
-                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214193495056"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
+                functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm214174312880"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety">¶</a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
                 safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
                 </p><p><code class="function">sd_journal_print</code>,
                 <code class="function">sd_journal_printv</code>,
                 <code class="function">sd_journal_send</code>, and
                 <code class="function">sd_journal_perror</code> are
-                not async signal safe.</p></div><div class="refsect1"><a name="idm214193489376"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
+                not async signal safe.</p></div><div class="refsect1"><a name="idm214174307824"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_print()</code>,
                 <code class="function">sd_journal_printv()</code>,
                 <code class="function">sd_journal_send()</code> and
                 <code class="function">sd_journal_sendv()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214188855456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214174302624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
-                        <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
                         <a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
-                        <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
                         <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
index 5eb35328b8224011850385b38c6d4580476e211f..cd5044bbbe7807fa027b16367eb14631cfb493b4 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214182872080"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173981200"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_data()</code> gets
                 the data object associated with a specific field from
                 the current journal entry. It takes four arguments:
                 the journal context object, a string with the field
@@ -77,7 +77,7 @@
                 having to decompress large compressed data objects in
                 full.</p><p><code class="function">sd_journal_get_data_threshold()</code>
                 returns the currently configured data field size
-                threshold.</p></div><div class="refsect1"><a name="idm214182845904"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
+                threshold.</p></div><div class="refsect1"><a name="idm214173955088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_data()</code>
                 returns 0 on success or a negative errno-style error
                 code. If the current entry does not include the
                 specified field, -ENOENT is returned. If
@@ -92,7 +92,7 @@
                 nothing. <code class="function">sd_journal_set_data_threshold()</code>
                 and <code class="function">sd_journal_get_threshold()</code>
                 return 0 on success or a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214182839856"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
+                code.</p></div><div class="refsect1"><a name="idm214173949040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_data()</code>,
                 <code class="function">sd_journal_enumerate_data()</code>,
                 <code class="function">sd_journal_restart_data()</code>,
                 <code class="function">sd_journal_set_data_threshold()</code>
                 <code class="function">sd_journal_get_data_threshold()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214177917392"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214169030976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>See
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 for a complete example how to use
                 <code class="function">sd_journal_get_data()</code>.</p><p>Use the
@@ -114,7 +114,7 @@ int print_fields(sd_journal *j) {
         SD_JOURNAL_FOREACH_DATA(j, data, length)
                 printf("%.*s\n", (int) length, data);
 }
-...</pre></div><div class="refsect1"><a name="idm214177912896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+...</pre></div><div class="refsect1"><a name="idm214169026480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
index 00741b0081d790b36830b61a5c4fc13552f9ac95..d3551445257552a57fca44528eb00e3f53b5ffbb 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_JOURNAL_STREAM_FD" "3" "" "systemd 215" "sd_journal_stream_fd"
+.TH "SD_JOURNAL_STREAM_FD" "3" "" "systemd 217" "sd_journal_stream_fd"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 8c6c4359c3b13535a0e27df96c156ac34f2e6ca4..419a930ee011d51b753108f6fce13819653b0b29 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_stream_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_stream_fd — Create log stream file descriptor to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_stream_fd</b>(</code></td><td>const char *<var class="pdparam">identifier</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">level_prefix</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214173639024"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_stream_fd()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_stream_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_stream_fd — Create log stream file descriptor to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_stream_fd</b>(</code></td><td>const char *<var class="pdparam">identifier</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">level_prefix</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192036416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_stream_fd()</code> may
                 be used to create a log stream file descriptor. Log
                 messages written to this file descriptor as simple
                 newline-separated text strings are written to the
                 <code class="constant">LOG_INFO</code>,
                 <code class="constant">LOG_DEBUG</code>, as defined in
                 <code class="filename">syslog.h</code>, see
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 for details. The third argument is a boolean: if true
                 kernel-style log priority level prefixes (such as
                 <code class="constant">SD_WARNING</code>) are interpreted, see
                 <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>
                 for more information.</p><p>It is recommended that applications log UTF-8
                 messages only with this API, but this is not
-                enforced.</p></div><div class="refsect1"><a name="idm214173632368"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The call returns a valid write-only file descriptor on success or a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214173631056"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_stream_fd()</code>
+                enforced.</p></div><div class="refsect1"><a name="idm214195925936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>The call returns a valid write-only file descriptor on success or a
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214195924624"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_stream_fd()</code>
                 interface is available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214173627664"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Creating a log stream suitable for
-                <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>:</p><pre class="programlisting">#include &lt;syslog.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214195921120"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Creating a log stream suitable for
+                <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>:</p><pre class="programlisting">#include &lt;syslog.h&gt;
 #include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;unistd.h&gt;
@@ -79,12 +79,12 @@ int main(int argc, char *argv[]) {
         fprintf(log, SD_WARNING "This is a warning!\n");
         fclose(log);
         return 0;
-}</pre></div><div class="refsect1"><a name="idm214173625024"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214195916128"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>,
-                        <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
-                        <a href="fprintf.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>
                 </p></div></div></body></html>
index 2cfaa87e9a18c175a908df8edad49a2cd51869ac..c9ce7cdb227e0279f432e94ba850af3a7c139667 100644 (file)
@@ -88,7 +88,7 @@
                 <constant>LOG_INFO</constant>,
                 <constant>LOG_DEBUG</constant>, as defined in
                 <filename>syslog.h</filename>, see
-                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 for details. The third argument is a boolean: if true
                 kernel-style log priority level prefixes (such as
                 <constant>SD_WARNING</constant>) are interpreted, see
                 <para>The <function>sd_journal_stream_fd()</function>
                 interface is available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
                 <title>Examples</title>
 
                 <para>Creating a log stream suitable for
-                <citerefentry><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>:</para>
+                <citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>:</para>
 
                 <programlisting>#include &lt;syslog.h&gt;
 #include &lt;stdio.h&gt;
@@ -161,8 +161,8 @@ int main(int argc, char *argv[]) {
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                 </para>
         </refsect1>
index c1bcbb4d211530eff0fe4d4c9f16fb86dfc552a2..f52e38e8ab62f73a75fa1272a8483044b49bb0e8 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_cursor"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cursor, sd_journal_test_cursor — Get cursor string for or test cursor string against the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_test_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172116480"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_cursor"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_cursor, sd_journal_test_cursor — Get cursor string for or test cursor string against the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_test_cursor</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">cursor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214176235488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
                 returns a cursor string for the current journal
                 entry. A cursor is a serialization of the current
                 journal position formatted as text. The string only
@@ -38,7 +38,7 @@
                 string is allocated via libc
                 <a href="malloc.html"><span class="citerefentry"><span class="refentrytitle">malloc</span>(3)</span></a>
                 and should be freed after use with
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.</p><p>Note that
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>.</p><p>Note that
                 <code class="function">sd_journal_get_cursor()</code> will not
                 work before
                 <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
                 <a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>
                 whether the entry being sought to was actually found
                 in the journal or the next closest entry was used
-                instead.</p></div><div class="refsect1"><a name="idm214172307584"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
+                instead.</p></div><div class="refsect1"><a name="idm214180182880"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_cursor()</code>
                 returns 0 on success or a negative errno-style error
                 code. <code class="function">sd_journal_test_cursor()</code>
                 returns positive if the current entry matches the
                 specified cursor, 0 if it does not match the specified
                 cursor or a negative errno-style error code on
-                failure.</p></div><div class="refsect1"><a name="idm214172304784"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_cursor()</code>
+                failure.</p></div><div class="refsect1"><a name="idm214180180080"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_cursor()</code>
                 and <code class="function">sd_journal_test_cursor()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214172300656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214180175680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
index a5d9515e05c50feb63dc590efd804e3d99c93f46..7fd7c09ba7aef7c0eca7de9c3155f58470d6ffb7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
-                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185830672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
+                interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177185680"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a file descriptor that may be asynchronously polled in
                 an external event loop and is signaled as soon as the
                 journal changes, because new entries or files were
                 added, rotation took place, or files have been
                 deleted, and similar. The file descriptor is suitable
                 for usage in
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
                 <code class="function">sd_journal_get_events()</code> for an
                 events mask to watch for. The call takes one argument:
                 the journal context object. Note that not all file
@@ -53,7 +53,7 @@
                 <code class="constant">CLOCK_MONOTONIC</code> for timing out
                 <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for, this will fill in
@@ -112,7 +112,7 @@ else {
                 no need to invoke this function directly as
                 <code class="function">sd_journal_get_timeout()</code> on these
                 file systems will ask for timeouts explicitly
-                anyway.</p></div><div class="refsect1"><a name="idm214185790416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
+                anyway.</p></div><div class="refsect1"><a name="idm214177145424"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p><code class="function">sd_journal_get_fd()</code> returns
                 a valid file descriptor on success or a negative
                 errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
                 returns a combination of <code class="constant">POLLIN</code>,
@@ -138,15 +138,15 @@ else {
                 probably refresh their entire display, while in the
                 case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
                 sufficient to simply continue reading at the previous
-                end of the journal.</p></div><div class="refsect1"><a name="idm214180864000"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
+                end of the journal.</p></div><div class="refsect1"><a name="idm214172223728"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
                 <code class="function">sd_journal_get_events()</code>,
                 <code class="function">sd_journal_reliable_fd()</code>,
                 <code class="function">sd_journal_process()</code> and
                 <code class="function">sd_journal_wait()</code> interfaces are
                 available as a shared library, which can be compiled and
                 linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214180858416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214172217904"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #include &lt;systemd/sd-journal.h&gt;
 
@@ -208,11 +208,11 @@ int wait_for_changes(sd_journal *j) {
         pollfd.events = sd_journal_get_events(j);
         poll(&amp;pollfd, 1, msec);
         return sd_journal_process(j);
-}</pre></div><div class="refsect1"><a name="idm214180851792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+}</pre></div><div class="refsect1"><a name="idm214172211280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
                         <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
                         <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 200266671c027f6800d333d76f929f7b1f8c37fc..fac099adf97e0bbfa95210561fdad4550cf493e5 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_LISTEN_FDS" "3" "" "systemd 215" "sd_listen_fds"
+.TH "SD_LISTEN_FDS" "3" "" "systemd 217" "sd_listen_fds"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 25181fca86b97ca5735e2ca286c2cc13d137eed3..4347527078fbffedf9e6ad6ace2160c50ccaa00e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_listen_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_listen_fds, SD_LISTEN_FDS_START — Check for file descriptors passed by the system manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><pre class="funcsynopsisinfo">#define SD_LISTEN_FDS_START 3</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_listen_fds</b>(</code></td><td>int <var class="pdparam">unset_environment</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197560512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_listen_fds()</code> shall be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_listen_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_listen_fds, SD_LISTEN_FDS_START — Check for file descriptors passed by the system manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><pre class="funcsynopsisinfo">#define SD_LISTEN_FDS_START 3</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_listen_fds</b>(</code></td><td>int <var class="pdparam">unset_environment</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214193016000"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_listen_fds()</code> shall be
                 called by a daemon to check for file descriptors
                 passed by the init system as part of the socket-based
                 activation logic.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
@@ -50,7 +50,7 @@
                 datagram or stream socket matters a lot for the most
                 common program logics and should be checked.</p><p>This function call will set the FD_CLOEXEC flag
                 for all passed file descriptors to avoid further
-                inheritance to children of the calling process.</p></div><div class="refsect1"><a name="idm214197624416"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
+                inheritance to children of the calling process.</p></div><div class="refsect1"><a name="idm214193005168"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
                 errno-style error code. If
                 <code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code>
                 was not set or was not correctly set for this daemon and
@@ -58,9 +58,9 @@
                 returned. Otherwise, the number of file descriptors
                 passed is returned. The application may find them
                 starting with file descriptor SD_LISTEN_FDS_START,
-                i.e. file descriptor 3.</p></div><div class="refsect1"><a name="idm214197551888"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                i.e. file descriptor 3.</p></div><div class="refsect1"><a name="idm214196903888"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, this function checks whether the
                 <code class="varname">$LISTEN_PID</code> environment variable
                 equals the daemon PID. If not, it returns
                 variable, then sets the FD_CLOEXEC flag for the parsed
                 number of file descriptors starting from
                 SD_LISTEN_FDS_START. Finally, it returns the parsed
-                number.</p></div><div class="refsect1"><a name="idm214197548512"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code>, </span><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID">¶</a></dt><dd><p>Set by the init system
+                number.</p></div><div class="refsect1"><a name="idm214196900512"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code>, </span><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID">¶</a></dt><dd><p>Set by the init system
                                 for supervised processes that use
                                 socket-based activation. This
                                 environment variable specifies the
                                 data
                                 <code class="function">sd_listen_fds()</code>
                                 parses. See above for
-                                details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197690240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196895968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
index 476bbace1ecbd065eb8f8ac00e8e07b139478300..27cbb03ca2c7102914bf53ca62fb8095a50ed16e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197895280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172182448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
                 be used to monitor login sessions, users, seats, and
                 virtual machines/containers. Via a monitor object a
                 file descriptor can be integrated into an application
@@ -54,7 +54,7 @@
                 may be used to retrieve the file descriptor of the
                 monitor object that may be integrated in an
                 application defined event loop, based around
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
                 or a similar interface. The application should include
                 the returned file descriptor as wake-up source for the
                 events mask returned by
@@ -79,7 +79,7 @@
                 microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
                 for timing out <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for this will fill in
@@ -102,7 +102,7 @@ else {
                 for brevity's sake. The calculated <code class="varname">msec</code>
                 integer can be passed directly as
                 <code class="function">poll()</code>'s timeout
-                parameter.</p></div><div class="refsect1"><a name="idm214197859856"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                parameter.</p></div><div class="refsect1"><a name="idm214176052000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_flush()</code> and
                 <code class="function">sd_login_monitor_get_timeout()</code>
@@ -114,7 +114,7 @@ else {
                 <code class="constant">POLLOUT</code> and suchlike. On failure,
                 these calls return a negative errno-style error
                 code.</p><p><code class="function">sd_login_monitor_unref()</code>
-                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214197852544"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214176044592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_unref()</code>,
                 <code class="function">sd_login_monitor_flush()</code>,
                 <code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,11 +122,11 @@ else {
                 <code class="function">sd_login_monitor_get_timeout()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192935712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214176037248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 476bbace1ecbd065eb8f8ac00e8e07b139478300..27cbb03ca2c7102914bf53ca62fb8095a50ed16e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197895280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172182448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
                 be used to monitor login sessions, users, seats, and
                 virtual machines/containers. Via a monitor object a
                 file descriptor can be integrated into an application
@@ -54,7 +54,7 @@
                 may be used to retrieve the file descriptor of the
                 monitor object that may be integrated in an
                 application defined event loop, based around
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
                 or a similar interface. The application should include
                 the returned file descriptor as wake-up source for the
                 events mask returned by
@@ -79,7 +79,7 @@
                 microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
                 for timing out <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for this will fill in
@@ -102,7 +102,7 @@ else {
                 for brevity's sake. The calculated <code class="varname">msec</code>
                 integer can be passed directly as
                 <code class="function">poll()</code>'s timeout
-                parameter.</p></div><div class="refsect1"><a name="idm214197859856"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                parameter.</p></div><div class="refsect1"><a name="idm214176052000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_flush()</code> and
                 <code class="function">sd_login_monitor_get_timeout()</code>
@@ -114,7 +114,7 @@ else {
                 <code class="constant">POLLOUT</code> and suchlike. On failure,
                 these calls return a negative errno-style error
                 code.</p><p><code class="function">sd_login_monitor_unref()</code>
-                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214197852544"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214176044592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_unref()</code>,
                 <code class="function">sd_login_monitor_flush()</code>,
                 <code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,11 +122,11 @@ else {
                 <code class="function">sd_login_monitor_get_timeout()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192935712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214176037248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 476bbace1ecbd065eb8f8ac00e8e07b139478300..27cbb03ca2c7102914bf53ca62fb8095a50ed16e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197895280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172182448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
                 be used to monitor login sessions, users, seats, and
                 virtual machines/containers. Via a monitor object a
                 file descriptor can be integrated into an application
@@ -54,7 +54,7 @@
                 may be used to retrieve the file descriptor of the
                 monitor object that may be integrated in an
                 application defined event loop, based around
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
                 or a similar interface. The application should include
                 the returned file descriptor as wake-up source for the
                 events mask returned by
@@ -79,7 +79,7 @@
                 microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
                 for timing out <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for this will fill in
@@ -102,7 +102,7 @@ else {
                 for brevity's sake. The calculated <code class="varname">msec</code>
                 integer can be passed directly as
                 <code class="function">poll()</code>'s timeout
-                parameter.</p></div><div class="refsect1"><a name="idm214197859856"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                parameter.</p></div><div class="refsect1"><a name="idm214176052000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_flush()</code> and
                 <code class="function">sd_login_monitor_get_timeout()</code>
@@ -114,7 +114,7 @@ else {
                 <code class="constant">POLLOUT</code> and suchlike. On failure,
                 these calls return a negative errno-style error
                 code.</p><p><code class="function">sd_login_monitor_unref()</code>
-                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214197852544"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214176044592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_unref()</code>,
                 <code class="function">sd_login_monitor_flush()</code>,
                 <code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,11 +122,11 @@ else {
                 <code class="function">sd_login_monitor_get_timeout()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192935712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214176037248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 476bbace1ecbd065eb8f8ac00e8e07b139478300..27cbb03ca2c7102914bf53ca62fb8095a50ed16e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197895280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172182448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
                 be used to monitor login sessions, users, seats, and
                 virtual machines/containers. Via a monitor object a
                 file descriptor can be integrated into an application
@@ -54,7 +54,7 @@
                 may be used to retrieve the file descriptor of the
                 monitor object that may be integrated in an
                 application defined event loop, based around
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
                 or a similar interface. The application should include
                 the returned file descriptor as wake-up source for the
                 events mask returned by
@@ -79,7 +79,7 @@
                 microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
                 for timing out <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for this will fill in
@@ -102,7 +102,7 @@ else {
                 for brevity's sake. The calculated <code class="varname">msec</code>
                 integer can be passed directly as
                 <code class="function">poll()</code>'s timeout
-                parameter.</p></div><div class="refsect1"><a name="idm214197859856"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                parameter.</p></div><div class="refsect1"><a name="idm214176052000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_flush()</code> and
                 <code class="function">sd_login_monitor_get_timeout()</code>
@@ -114,7 +114,7 @@ else {
                 <code class="constant">POLLOUT</code> and suchlike. On failure,
                 these calls return a negative errno-style error
                 code.</p><p><code class="function">sd_login_monitor_unref()</code>
-                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214197852544"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214176044592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_unref()</code>,
                 <code class="function">sd_login_monitor_flush()</code>,
                 <code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,11 +122,11 @@ else {
                 <code class="function">sd_login_monitor_get_timeout()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192935712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214176037248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 476bbace1ecbd065eb8f8ac00e8e07b139478300..27cbb03ca2c7102914bf53ca62fb8095a50ed16e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197895280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172182448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
                 be used to monitor login sessions, users, seats, and
                 virtual machines/containers. Via a monitor object a
                 file descriptor can be integrated into an application
@@ -54,7 +54,7 @@
                 may be used to retrieve the file descriptor of the
                 monitor object that may be integrated in an
                 application defined event loop, based around
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
                 or a similar interface. The application should include
                 the returned file descriptor as wake-up source for the
                 events mask returned by
@@ -79,7 +79,7 @@
                 microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
                 for timing out <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for this will fill in
@@ -102,7 +102,7 @@ else {
                 for brevity's sake. The calculated <code class="varname">msec</code>
                 integer can be passed directly as
                 <code class="function">poll()</code>'s timeout
-                parameter.</p></div><div class="refsect1"><a name="idm214197859856"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                parameter.</p></div><div class="refsect1"><a name="idm214176052000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_flush()</code> and
                 <code class="function">sd_login_monitor_get_timeout()</code>
@@ -114,7 +114,7 @@ else {
                 <code class="constant">POLLOUT</code> and suchlike. On failure,
                 these calls return a negative errno-style error
                 code.</p><p><code class="function">sd_login_monitor_unref()</code>
-                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214197852544"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214176044592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_unref()</code>,
                 <code class="function">sd_login_monitor_flush()</code>,
                 <code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,11 +122,11 @@ else {
                 <code class="function">sd_login_monitor_get_timeout()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192935712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214176037248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 946a914a481bccea015d8ee95f55c852ec91133f..781fbd24238ee64fe7d71d37ef3bf3bee89b90f6 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_LOGIN_MONITOR_NEW" "3" "" "systemd 215" "sd_login_monitor_new"
+.TH "SD_LOGIN_MONITOR_NEW" "3" "" "systemd 217" "sd_login_monitor_new"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 476bbace1ecbd065eb8f8ac00e8e07b139478300..27cbb03ca2c7102914bf53ca62fb8095a50ed16e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197895280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172182448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
                 be used to monitor login sessions, users, seats, and
                 virtual machines/containers. Via a monitor object a
                 file descriptor can be integrated into an application
@@ -54,7 +54,7 @@
                 may be used to retrieve the file descriptor of the
                 monitor object that may be integrated in an
                 application defined event loop, based around
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
                 or a similar interface. The application should include
                 the returned file descriptor as wake-up source for the
                 events mask returned by
@@ -79,7 +79,7 @@
                 microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
                 for timing out <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for this will fill in
@@ -102,7 +102,7 @@ else {
                 for brevity's sake. The calculated <code class="varname">msec</code>
                 integer can be passed directly as
                 <code class="function">poll()</code>'s timeout
-                parameter.</p></div><div class="refsect1"><a name="idm214197859856"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                parameter.</p></div><div class="refsect1"><a name="idm214176052000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_flush()</code> and
                 <code class="function">sd_login_monitor_get_timeout()</code>
@@ -114,7 +114,7 @@ else {
                 <code class="constant">POLLOUT</code> and suchlike. On failure,
                 these calls return a negative errno-style error
                 code.</p><p><code class="function">sd_login_monitor_unref()</code>
-                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214197852544"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214176044592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_unref()</code>,
                 <code class="function">sd_login_monitor_flush()</code>,
                 <code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,11 +122,11 @@ else {
                 <code class="function">sd_login_monitor_get_timeout()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192935712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214176037248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
index 4d9e76d1442f16ac2a66a6cc61696c07c7b4fbdf..ba6623826fd114235e2283fa6759d66be398475d 100644 (file)
@@ -226,7 +226,7 @@ else {
                 <function>sd_login_monitor_get_timeout()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 476bbace1ecbd065eb8f8ac00e8e07b139478300..27cbb03ca2c7102914bf53ca62fb8095a50ed16e 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214197895280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_login_monitor_new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_login_monitor_new, sd_login_monitor_unref, sd_login_monitor_flush, sd_login_monitor_get_fd, sd_login_monitor_get_events, sd_login_monitor_get_timeout, sd_login_monitor — Monitor login sessions, seats, users and virtual machines/containers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_new</b>(</code></td><td>const char *<var class="pdparam">category</var>, </td></tr><tr><td> </td><td>sd_login_monitor **<var class="pdparam">ret</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">sd_login_monitor *<b class="fsfunc">sd_login_monitor_unref</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_flush</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_fd</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_events</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_login_monitor_get_timeout</b>(</code></td><td>sd_login_monitor *<var class="pdparam">m</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172182448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_login_monitor_new()</code> may
                 be used to monitor login sessions, users, seats, and
                 virtual machines/containers. Via a monitor object a
                 file descriptor can be integrated into an application
@@ -54,7 +54,7 @@
                 may be used to retrieve the file descriptor of the
                 monitor object that may be integrated in an
                 application defined event loop, based around
-                <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>
                 or a similar interface. The application should include
                 the returned file descriptor as wake-up source for the
                 events mask returned by
@@ -79,7 +79,7 @@
                 microseconds since the epoch of <code class="constant">CLOCK_MONOTONIC</code>
                 for timing out <code class="function">poll()</code> in
                 <code class="varname">timeout_usec</code>. See
-                <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 for details about
                 <code class="constant">CLOCK_MONOTONIC</code>. If there is no
                 timeout to wait for this will fill in
@@ -102,7 +102,7 @@ else {
                 for brevity's sake. The calculated <code class="varname">msec</code>
                 integer can be passed directly as
                 <code class="function">poll()</code>'s timeout
-                parameter.</p></div><div class="refsect1"><a name="idm214197859856"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                parameter.</p></div><div class="refsect1"><a name="idm214176052000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_flush()</code> and
                 <code class="function">sd_login_monitor_get_timeout()</code>
@@ -114,7 +114,7 @@ else {
                 <code class="constant">POLLOUT</code> and suchlike. On failure,
                 these calls return a negative errno-style error
                 code.</p><p><code class="function">sd_login_monitor_unref()</code>
-                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214197852544"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
+                always returns <code class="constant">NULL</code>.</p></div><div class="refsect1"><a name="idm214176044592"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_login_monitor_new()</code>,
                 <code class="function">sd_login_monitor_unref()</code>,
                 <code class="function">sd_login_monitor_flush()</code>,
                 <code class="function">sd_login_monitor_get_fd()</code>,
@@ -122,11 +122,11 @@ else {
                 <code class="function">sd_login_monitor_get_timeout()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214192935712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214176037248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>,
-                        <a href="poll.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
-                        <a href="clock_gettime.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
                 </p></div></div></body></html>
diff --git a/man/sd_machine_get_class.3 b/man/sd_machine_get_class.3
new file mode 100644 (file)
index 0000000..626b8c4
--- /dev/null
@@ -0,0 +1,68 @@
+'\" t
+.TH "SD_MACHINE_GET_CLASS" "3" "" "systemd 217" "sd_machine_get_class"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sd_machine_get_class, sd_machine_get_ifindices \- Determine the class and network interface indices of a locally running virtual machine or container\&.
+.SH "SYNOPSIS"
+.sp
+.ft B
+.nf
+#include <systemd/sd\-login\&.h>
+.fi
+.ft
+.HP \w'int\ sd_machine_get_class('u
+.BI "int sd_machine_get_class(const\ char*\ " "machine" ", char\ *" "class" ");"
+.HP \w'int\ sd_machine_get_ifindices('u
+.BI "int sd_machine_get_ifindices(const\ char*\ " "machine" ", int\ **" "ifindices" ");"
+.SH "DESCRIPTION"
+.PP
+\fBsd_machine_get_class()\fR
+may be used to determine the class of a locally running virtual machine or container that is registered with
+\fBsystemd-machined.service\fR(8)\&. The string returned is either
+"vm"
+or
+"container"\&. The returned string needs to be freed with the libc
+\fBfree\fR(3)
+call after use\&.
+.PP
+\fBsd_machine_get_ifindices()\fR
+may be used to determine the numeric indices of the network interfaces on the host that are pointing towards the specified locally running virtual machine or container that is registered with
+\fBsystemd-machined.service\fR(8)\&. The returned array needs to be freed with the libc
+\fBfree\fR(3)
+call after use\&.
+.SH "RETURN VALUE"
+.PP
+On success, these calls return 0 or a positive integer\&. On failure, these calls return a negative errno\-style error code\&.
+.SH "NOTES"
+.PP
+The
+\fBsd_machine_get_class()\fR
+and
+\fBsd_machine_get_ifindices()\fR
+interfaces are available as a shared library, which can be compiled and linked to with the
+\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
+file\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsd-login\fR(3),
+\fBsystemd-machined.service\fR(8),
+\fBsd_pid_get_machine_name\fR(3)
diff --git a/man/sd_machine_get_class.html b/man/sd_machine_get_class.html
new file mode 100644 (file)
index 0000000..93f3d8b
--- /dev/null
@@ -0,0 +1,51 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_machine_get_class</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_machine_get_class"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_machine_get_class, sd_machine_get_ifindices — Determine the class and network interface
+                indices of a locally running virtual machine or
+                container.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_machine_get_class</b>(</code></td><td>const char* <var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>char *<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_machine_get_ifindices</b>(</code></td><td>const char* <var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int **<var class="pdparam">ifindices</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214190198416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_machine_get_class()</code> may
+                be used to determine the class of a locally running
+                virtual machine or container that is registered with
+                <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>. The
+                string returned is either "<code class="literal">vm</code>" or
+                "<code class="literal">container</code>".  The returned string
+                needs to be freed with the libc <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_machine_get_ifindices()</code>
+                may be used to determine the numeric indices of the
+                network interfaces on the host that are pointing
+                towards the specified locally running virtual machine
+                or container that is registered with
+                <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>. The
+                returned array needs to be freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p></div><div class="refsect1"><a name="idm214194091168"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                integer. On failure, these calls return a negative
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214194089808"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_machine_get_class()</code> and
+                <code class="function">sd_machine_get_ifindices()</code> interfaces are
+                available as a shared library, which can be compiled
+                and linked to with the
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214194085456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>,
+                        <a href="sd_pid_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_machine_name</span>(3)</span></a>
+                </p></div></div></body></html>
diff --git a/man/sd_machine_get_class.xml b/man/sd_machine_get_class.xml
new file mode 100644 (file)
index 0000000..d06b752
--- /dev/null
@@ -0,0 +1,126 @@
+<?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">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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="sd_machine_get_class">
+
+        <refentryinfo>
+                <title>sd_machine_get_class</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart@poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>sd_machine_get_class</refentrytitle>
+                <manvolnum>3</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>sd_machine_get_class</refname>
+                <refname>sd_machine_get_ifindices</refname>
+                <refpurpose>Determine the class and network interface
+                indices of a locally running virtual machine or
+                container.</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <funcsynopsis>
+                        <funcsynopsisinfo>#include &lt;systemd/sd-login.h&gt;</funcsynopsisinfo>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_machine_get_class</function></funcdef>
+                                <paramdef>const char* <parameter>machine</parameter></paramdef>
+                                <paramdef>char *<parameter>class</parameter></paramdef>
+                        </funcprototype>
+
+                        <funcprototype>
+                                <funcdef>int <function>sd_machine_get_ifindices</function></funcdef>
+                                <paramdef>const char* <parameter>machine</parameter></paramdef>
+                                <paramdef>int **<parameter>ifindices</parameter></paramdef>
+                        </funcprototype>
+                </funcsynopsis>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><function>sd_machine_get_class()</function> may
+                be used to determine the class of a locally running
+                virtual machine or container that is registered with
+                <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
+                string returned is either <literal>vm</literal> or
+                <literal>container</literal>.  The returned string
+                needs to be freed with the libc <citerefentry
+                project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                call after use.</para>
+
+                <para><function>sd_machine_get_ifindices()</function>
+                may be used to determine the numeric indices of the
+                network interfaces on the host that are pointing
+                towards the specified locally running virtual machine
+                or container that is registered with
+                <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
+                returned array needs to be freed with the libc
+                <citerefentry
+                project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                call after use.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Return Value</title>
+
+                <para>On success, these calls return 0 or a positive
+                integer. On failure, these calls return a negative
+                errno-style error code.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Notes</title>
+
+                <para>The <function>sd_machine_get_class()</function> and
+                <function>sd_machine_get_ifindices()</function> interfaces are
+                available as a shared library, which can be compiled
+                and linked to with the
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                file.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_pid_get_machine_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
diff --git a/man/sd_machine_get_ifindices.3 b/man/sd_machine_get_ifindices.3
new file mode 100644 (file)
index 0000000..97a20e3
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_machine_get_class.3
diff --git a/man/sd_machine_get_ifindices.html b/man/sd_machine_get_ifindices.html
new file mode 100644 (file)
index 0000000..93f3d8b
--- /dev/null
@@ -0,0 +1,51 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_machine_get_class</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_machine_get_class"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_machine_get_class, sd_machine_get_ifindices — Determine the class and network interface
+                indices of a locally running virtual machine or
+                container.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_machine_get_class</b>(</code></td><td>const char* <var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>char *<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_machine_get_ifindices</b>(</code></td><td>const char* <var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int **<var class="pdparam">ifindices</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214190198416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_machine_get_class()</code> may
+                be used to determine the class of a locally running
+                virtual machine or container that is registered with
+                <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>. The
+                string returned is either "<code class="literal">vm</code>" or
+                "<code class="literal">container</code>".  The returned string
+                needs to be freed with the libc <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_machine_get_ifindices()</code>
+                may be used to determine the numeric indices of the
+                network interfaces on the host that are pointing
+                towards the specified locally running virtual machine
+                or container that is registered with
+                <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>. The
+                returned array needs to be freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p></div><div class="refsect1"><a name="idm214194091168"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                integer. On failure, these calls return a negative
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214194089808"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_machine_get_class()</code> and
+                <code class="function">sd_machine_get_ifindices()</code> interfaces are
+                available as a shared library, which can be compiled
+                and linked to with the
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214194085456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>,
+                        <a href="sd_pid_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_machine_name</span>(3)</span></a>
+                </p></div></div></body></html>
index 505743401dee9034383299a26e64ba02e1c7a178..ae3808402ed3be7e4c3add956a3f70e1e9b8a6d8 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_NOTIFY" "3" "" "systemd 215" "sd_notify"
+.TH "SD_NOTIFY" "3" "" "systemd 217" "sd_notify"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -20,7 +20,7 @@
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
 .SH "NAME"
-sd_notify, sd_notifyf \- Notify service manager about start\-up completion and other daemon status changes
+sd_notify, sd_notifyf \- Notify service manager about start\-up completion and other service status changes
 .SH "SYNOPSIS"
 .sp
 .ft B
@@ -35,7 +35,7 @@ sd_notify, sd_notifyf \- Notify service manager about start\-up completion and o
 .SH "DESCRIPTION"
 .PP
 \fBsd_notify()\fR
-shall be called by a daemon to notify the init system about status changes\&. It can be used to send arbitrary information, encoded in an environment\-block\-like string\&. Most importantly it can be used for start\-up completion notification\&.
+may be called by a service to notify the service manager about state changes\&. It can be used to send arbitrary information, encoded in an environment\-block\-like string\&. Most importantly it can be used for start\-up completion notification\&.
 .PP
 If the
 \fIunset_environment\fR
@@ -53,27 +53,48 @@ parameter should contain a newline\-separated list of variable assignments, simi
 .PP
 READY=1
 .RS 4
-Tells the init system that daemon startup is finished\&. This is only used by systemd if the service definition file has Type=notify set\&. The passed argument is a boolean "1" or "0"\&. Since there is little value in signaling non\-readiness, the only value daemons should send is "READY=1"\&.
+Tells the service manager that service startup is finished\&. This is only used by systemd if the service definition file has Type=notify set\&. Since there is little value in signaling non\-readiness, the only value services should send is
+"READY=1"
+(i\&.e\&.
+"READY=0"
+is not defined)\&.
+.RE
+.PP
+RELOADING=1
+.RS 4
+Tells the service manager that the service is reloading its configuration\&. This is useful to allow the service manager to track the service\*(Aqs internal state, and present it to the user\&. Note that a service that sends this notification must also send a
+"READY=1"
+notification when it completed reloading its configuration\&.
+.RE
+.PP
+STOPPING=1
+.RS 4
+Tells the service manager that the service is beginning its shutdown\&. This is useful to allow the service manager to track the service\*(Aqs internal state, and present it to the user\&.
 .RE
 .PP
 STATUS=\&.\&.\&.
 .RS 4
-Passes a single\-line status string back to the init system that describes the daemon state\&. This is free\-form and can be used for various purposes: general state feedback, fsck\-like programs could pass completion percentages and failing programs could pass a human readable error message\&. Example: "STATUS=Completed 66% of file system check\&.\&.\&."
+Passes a single\-line UTF\-8 status string back to the service manager that describes the service state\&. This is free\-form and can be used for various purposes: general state feedback, fsck\-like programs could pass completion percentages and failing programs could pass a human readable error message\&. Example:
+"STATUS=Completed 66% of file system check\&.\&.\&."
 .RE
 .PP
 ERRNO=\&.\&.\&.
 .RS 4
-If a daemon fails, the errno\-style error code, formatted as string\&. Example: "ERRNO=2" for ENOENT\&.
+If a service fails, the errno\-style error code, formatted as string\&. Example:
+"ERRNO=2"
+for ENOENT\&.
 .RE
 .PP
 BUSERROR=\&.\&.\&.
 .RS 4
-If a daemon fails, the D\-Bus error\-style error code\&. Example: "BUSERROR=org\&.freedesktop\&.DBus\&.Error\&.TimedOut"
+If a service fails, the D\-Bus error\-style error code\&. Example:
+"BUSERROR=org\&.freedesktop\&.DBus\&.Error\&.TimedOut"
 .RE
 .PP
 MAINPID=\&.\&.\&.
 .RS 4
-The main pid of the daemon, in case the init system did not fork off the process itself\&. Example: "MAINPID=4711"
+The main pid of the service, in case the service manager did not fork off the process itself\&. Example:
+"MAINPID=4711"
 .RE
 .PP
 WATCHDOG=1
@@ -82,20 +103,16 @@ Tells systemd to update the watchdog timestamp\&. This is the keep\-alive ping t
 \fIWatchdogSec=\fR
 is enabled for it\&. See
 \fBsystemd.service\fR(5)
-for details\&. It is recommended to send this message if the
-\fI$WATCHDOG_PID\fR
-environment variable has been set to the PID of the service process, in every half the time interval that is specified in the
-\fI$WATCHDOG_USEC\fR
-environment variable\&. See
+for information how to enable this functionality and
 \fBsd_watchdog_enabled\fR(3)
-for details\&.
+for the details of how the service can check if the the watchdog is enabled\&.
 .RE
 .PP
 It is recommended to prefix variable names that are not shown in the list above with
 \fIX_\fR
 to avoid namespace clashes\&.
 .PP
-Note that systemd will accept status data sent from a daemon only if the
+Note that systemd will accept status data sent from a service only if the
 \fINotifyAccess=\fR
 option is correctly set in the service definition file\&. See
 \fBsystemd.service\fR(5)
@@ -124,12 +141,12 @@ socket referenced in the
 environment variable\&. If the first character of
 \fI$NOTIFY_SOCKET\fR
 is
-"@", the string is understood as Linux abstract namespace socket\&. The datagram is accompanied by the process credentials of the sending daemon, using SCM_CREDENTIALS\&.
+"@", the string is understood as Linux abstract namespace socket\&. The datagram is accompanied by the process credentials of the sending service, using SCM_CREDENTIALS\&.
 .SH "ENVIRONMENT"
 .PP
 \fI$NOTIFY_SOCKET\fR
 .RS 4
-Set by the init system for supervised processes for status and start\-up completion notification\&. This environment variable specifies the socket
+Set by the service manager for supervised processes for status and start\-up completion notification\&. This environment variable specifies the socket
 \fBsd_notify()\fR
 talks to\&. See above for details\&.
 .RE
@@ -137,7 +154,7 @@ talks to\&. See above for details\&.
 .PP
 \fBExample\ \&1.\ \&Start-up Notification\fR
 .PP
-When a daemon finished starting up, it might issue the following call to notify the init system:
+When a service finished starting up, it might issue the following call to notify the service manager:
 .sp
 .if n \{\
 .RS 4
@@ -151,7 +168,7 @@ sd_notify(0, "READY=1");
 .PP
 \fBExample\ \&2.\ \&Extended Start-up Notification\fR
 .PP
-A daemon could send the following after completing initialization:
+A service could send the following after completing initialization:
 .sp
 .if n \{\
 .RS 4
@@ -168,7 +185,7 @@ sd_notifyf(0, "READY=1\en"
 .PP
 \fBExample\ \&3.\ \&Error Cause Notification\fR
 .PP
-A daemon could send the following shortly before exiting, on failure
+A service could send the following shortly before exiting, on failure
 .sp
 .if n \{\
 .RS 4
index 8a757598020255f9327508d88a4ccd02f5858470..3ce2a27acc196cd7a7098b9bc8329b23c63d288c 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_notify"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_notify, sd_notifyf — Notify service manager about start-up completion and other daemon status changes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notify</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notifyf</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214198380880"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_notify()</code> shall be called
-                by a daemon to notify the init system about status
-                changes. It can be used to send arbitrary information,
-                encoded in an environment-block-like string. Most
-                importantly it can be used for start-up completion
-                notification.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_notify"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_notify, sd_notifyf — Notify service manager about start-up completion and other service status changes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notify</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notifyf</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178979136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_notify()</code> may be called
+                by a service to notify the service manager about
+                state changes. It can be used to send arbitrary
+                information, encoded in an environment-block-like
+                string. Most importantly it can be used for start-up
+                completion notification.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
                 parameter is non-zero, <code class="function">sd_notify()</code>
                 will unset the <code class="varname">$NOTIFY_SOCKET</code>
                 environment variable before returning (regardless of
                 block. A trailing newline is implied if none is
                 specified. The string may contain any kind of variable
                 assignments, but the following shall be considered
-                well-known:</p><div class="variablelist"><dl class="variablelist"><dt id="READY=1"><span class="term">READY=1</span><a class="headerlink" title="Permalink to this term" href="#READY=1">¶</a></dt><dd><p>Tells the init system
-                                that daemon startup is finished. This
-                                is only used by systemd if the service
-                                definition file has Type=notify
-                                set. The passed argument is a boolean
-                                "1" or "0". Since there is little
+                well-known:</p><div class="variablelist"><dl class="variablelist"><dt id="READY=1"><span class="term">READY=1</span><a class="headerlink" title="Permalink to this term" href="#READY=1">¶</a></dt><dd><p>Tells the service
+                                manager that service startup is
+                                finished. This is only used by systemd
+                                if the service definition file has
+                                Type=notify set. Since there is little
                                 value in signaling non-readiness, the
-                                only value daemons should send is
-                                "READY=1".</p></dd><dt id="STATUS=..."><span class="term">STATUS=...</span><a class="headerlink" title="Permalink to this term" href="#STATUS=...">¶</a></dt><dd><p>Passes a single-line
-                                status string back to the init system
-                                that describes the daemon state. This
+                                only value services should send is
+                                "<code class="literal">READY=1</code>"
+                                (i.e. "<code class="literal">READY=0</code>" is
+                                not defined).</p></dd><dt id="RELOADING=1"><span class="term">RELOADING=1</span><a class="headerlink" title="Permalink to this term" href="#RELOADING=1">¶</a></dt><dd><p>Tells the service manager
+                                that the service is reloading its
+                                configuration. This is useful to allow
+                                the service manager to track the service's
+                                internal state, and present it to the
+                                user. Note that a service that sends
+                                this notification must also send a
+                                "<code class="literal">READY=1</code>"
+                                notification when it completed
+                                reloading its
+                                configuration.</p></dd><dt id="STOPPING=1"><span class="term">STOPPING=1</span><a class="headerlink" title="Permalink to this term" href="#STOPPING=1">¶</a></dt><dd><p>Tells the service manager
+                                that the service is beginning its
+                                shutdown. This is useful to allow the
+                                service manager to track the service's
+                                internal state, and present it to the
+                                user.</p></dd><dt id="STATUS=..."><span class="term">STATUS=...</span><a class="headerlink" title="Permalink to this term" href="#STATUS=...">¶</a></dt><dd><p>Passes a single-line
+                                UTF-8 status string back to the service manager
+                                that describes the service state. This
                                 is free-form and can be used for
                                 various purposes: general state
                                 feedback, fsck-like programs could
                                 pass completion percentages and
                                 failing programs could pass a human
                                 readable error message. Example:
-                                "STATUS=Completed 66% of file system
-                                check..."</p></dd><dt id="ERRNO=..."><span class="term">ERRNO=...</span><a class="headerlink" title="Permalink to this term" href="#ERRNO=...">¶</a></dt><dd><p>If a daemon fails, the
+                                "<code class="literal">STATUS=Completed 66% of file
+                                system
+                                check...</code>"</p></dd><dt id="ERRNO=..."><span class="term">ERRNO=...</span><a class="headerlink" title="Permalink to this term" href="#ERRNO=...">¶</a></dt><dd><p>If a service fails, the
                                 errno-style error code, formatted as
-                                string. Example: "ERRNO=2" for
-                                ENOENT.</p></dd><dt id="BUSERROR=..."><span class="term">BUSERROR=...</span><a class="headerlink" title="Permalink to this term" href="#BUSERROR=...">¶</a></dt><dd><p>If a daemon fails, the
+                                string. Example: "<code class="literal">ERRNO=2</code>" for
+                                ENOENT.</p></dd><dt id="BUSERROR=..."><span class="term">BUSERROR=...</span><a class="headerlink" title="Permalink to this term" href="#BUSERROR=...">¶</a></dt><dd><p>If a service fails, the
                                 D-Bus error-style error code. Example:
-                                "BUSERROR=org.freedesktop.DBus.Error.TimedOut"</p></dd><dt id="MAINPID=..."><span class="term">MAINPID=...</span><a class="headerlink" title="Permalink to this term" href="#MAINPID=...">¶</a></dt><dd><p>The main pid of the
-                                daemon, in case the init system did
+                                "<code class="literal">BUSERROR=org.freedesktop.DBus.Error.TimedOut</code>"</p></dd><dt id="MAINPID=..."><span class="term">MAINPID=...</span><a class="headerlink" title="Permalink to this term" href="#MAINPID=...">¶</a></dt><dd><p>The main pid of the
+                                service, in case the service manager did
                                 not fork off the process
                                 itself. Example:
-                                "MAINPID=4711"</p></dd><dt id="WATCHDOG=1"><span class="term">WATCHDOG=1</span><a class="headerlink" title="Permalink to this term" href="#WATCHDOG=1">¶</a></dt><dd><p>Tells systemd to
+                                "<code class="literal">MAINPID=4711</code>"</p></dd><dt id="WATCHDOG=1"><span class="term">WATCHDOG=1</span><a class="headerlink" title="Permalink to this term" href="#WATCHDOG=1">¶</a></dt><dd><p>Tells systemd to
                                 update the watchdog timestamp. This is
                                 the keep-alive ping that services need
                                 to issue in regular intervals if
                                 <code class="varname">WatchdogSec=</code> is
                                 enabled for it. See
                                 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>
-                                for details. It is recommended to send
-                                this message if the
-                                <code class="varname">$WATCHDOG_PID</code>
-                                environment variable has been set to
-                                the PID of the service process, in
-                                every half the time interval that is
-                                specified in the
-                                <code class="varname">$WATCHDOG_USEC</code>
-                                environment variable. See
+                                for information how to enable this
+                                functionality and
                                 <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
-                                for details.</p></dd></dl></div><p>It is recommended to prefix variable names that
+                                for the details of how the service can
+                                check if the the watchdog is enabled.
+                                </p></dd></dl></div><p>It is recommended to prefix variable names that
                 are not shown in the list above with
                 <code class="varname">X_</code> to avoid namespace
                 clashes.</p><p>Note that systemd will accept status data sent
-                from a daemon only if the
+                from a service only if the
                 <code class="varname">NotifyAccess=</code> option is correctly
                 set in the service definition file. See
                 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>
                 for details.</p><p><code class="function">sd_notifyf()</code> is similar to
                 <code class="function">sd_notify()</code> but takes a
                 <code class="function">printf()</code>-like format string plus
-                arguments.</p></div><div class="refsect1"><a name="idm214198431088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                arguments.</p></div><div class="refsect1"><a name="idm214182840288"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If
                 <code class="varname">$NOTIFY_SOCKET</code> was not set and
                 hence no status data could be sent, 0 is returned. If
                 positive return value. In order to support both, init
                 systems that implement this scheme and those which
                 do not, it is generally recommended to ignore the return
-                value of this call.</p></div><div class="refsect1"><a name="idm214198428960"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                value of this call.</p></div><div class="refsect1"><a name="idm214182838160"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these functions send a single
                 datagram with the state string as payload to the
                 <code class="constant">AF_UNIX</code> socket referenced in the
                 <code class="varname">$NOTIFY_SOCKET</code> is "<code class="literal">@</code>", the string is
                 understood as Linux abstract namespace socket. The
                 datagram is accompanied by the process credentials of
-                the sending daemon, using SCM_CREDENTIALS.</p></div><div class="refsect1"><a name="idm214198417120"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$NOTIFY_SOCKET"><span class="term"><code class="varname">$NOTIFY_SOCKET</code></span><a class="headerlink" title="Permalink to this term" href="#%24NOTIFY_SOCKET">¶</a></dt><dd><p>Set by the init system
+                the sending service, using SCM_CREDENTIALS.</p></div><div class="refsect1"><a name="idm214182833760"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$NOTIFY_SOCKET"><span class="term"><code class="varname">$NOTIFY_SOCKET</code></span><a class="headerlink" title="Permalink to this term" href="#%24NOTIFY_SOCKET">¶</a></dt><dd><p>Set by the service manager
                                 for supervised processes for status
                                 and start-up completion
                                 notification. This environment variable
                                 specifies the socket
                                 <code class="function">sd_notify()</code> talks
-                                to. See above for details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198413216"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214198412544"></a><p class="title"><b>Example 1. Start-up Notification</b></p><div class="example-contents"><p>When a daemon finished starting up, it
+                                to. See above for details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214182829856"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214182829184"></a><p class="title"><b>Example 1. Start-up Notification</b></p><div class="example-contents"><p>When a service finished starting up, it
                         might issue the following call to notify
-                        the init system:</p><pre class="programlisting">sd_notify(0, "READY=1");</pre></div></div><br class="example-break"><div class="example"><a name="idm214198410496"></a><p class="title"><b>Example 2. Extended Start-up Notification</b></p><div class="example-contents"><p>A daemon could send the following after
+                        the service manager:</p><pre class="programlisting">sd_notify(0, "READY=1");</pre></div></div><br class="example-break"><div class="example"><a name="idm214182827136"></a><p class="title"><b>Example 2. Extended Start-up Notification</b></p><div class="example-contents"><p>A service could send the following after
                         completing initialization:</p><pre class="programlisting">sd_notifyf(0, "READY=1\n"
               "STATUS=Processing requests...\n"
               "MAINPID=%lu",
-              (unsigned long) getpid());</pre></div></div><br class="example-break"><div class="example"><a name="idm214198408368"></a><p class="title"><b>Example 3. Error Cause Notification</b></p><div class="example-contents"><p>A daemon could send the following shortly before exiting, on failure</p><pre class="programlisting">sd_notifyf(0, "STATUS=Failed to start up: %s\n"
+              (unsigned long) getpid());</pre></div></div><br class="example-break"><div class="example"><a name="idm214177910944"></a><p class="title"><b>Example 3. Error Cause Notification</b></p><div class="example-contents"><p>A service could send the following shortly before exiting, on failure</p><pre class="programlisting">sd_notifyf(0, "STATUS=Failed to start up: %s\n"
               "ERRNO=%i",
               strerror(errno),
-              errno);</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214198406240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+              errno);</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214177909008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
index 6bf823076332871f64bbf94c9b99b278f94a76cd..35f6f71ab37b00a6919e6912bd00e4ed4b648cc3 100644 (file)
@@ -46,7 +46,7 @@
         <refnamediv>
                 <refname>sd_notify</refname>
                 <refname>sd_notifyf</refname>
-                <refpurpose>Notify service manager about start-up completion and other daemon status changes</refpurpose>
+                <refpurpose>Notify service manager about start-up completion and other service status changes</refpurpose>
         </refnamediv>
 
         <refsynopsisdiv>
 
         <refsect1>
                 <title>Description</title>
-                <para><function>sd_notify()</function> shall be called
-                by a daemon to notify the init system about status
-                changes. It can be used to send arbitrary information,
-                encoded in an environment-block-like string. Most
-                importantly it can be used for start-up completion
-                notification.</para>
+                <para><function>sd_notify()</function> may be called
+                by a service to notify the service manager about
+                state changes. It can be used to send arbitrary
+                information, encoded in an environment-block-like
+                string. Most importantly it can be used for start-up
+                completion notification.</para>
 
                 <para>If the <parameter>unset_environment</parameter>
                 parameter is non-zero, <function>sd_notify()</function>
                         <varlistentry>
                                 <term>READY=1</term>
 
-                                <listitem><para>Tells the init system
-                                that daemon startup is finished. This
-                                is only used by systemd if the service
-                                definition file has Type=notify
-                                set. The passed argument is a boolean
-                                "1" or "0". Since there is little
+                                <listitem><para>Tells the service
+                                manager that service startup is
+                                finished. This is only used by systemd
+                                if the service definition file has
+                                Type=notify set. Since there is little
                                 value in signaling non-readiness, the
-                                only value daemons should send is
-                                "READY=1".</para></listitem>
+                                only value services should send is
+                                <literal>READY=1</literal>
+                                (i.e. <literal>READY=0</literal> is
+                                not defined).</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term>RELOADING=1</term>
+
+                                <listitem><para>Tells the service manager
+                                that the service is reloading its
+                                configuration. This is useful to allow
+                                the service manager to track the service's
+                                internal state, and present it to the
+                                user. Note that a service that sends
+                                this notification must also send a
+                                <literal>READY=1</literal>
+                                notification when it completed
+                                reloading its
+                                configuration.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term>STOPPING=1</term>
+
+                                <listitem><para>Tells the service manager
+                                that the service is beginning its
+                                shutdown. This is useful to allow the
+                                service manager to track the service's
+                                internal state, and present it to the
+                                user.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term>STATUS=...</term>
 
                                 <listitem><para>Passes a single-line
-                                status string back to the init system
-                                that describes the daemon state. This
+                                UTF-8 status string back to the service manager
+                                that describes the service state. This
                                 is free-form and can be used for
                                 various purposes: general state
                                 feedback, fsck-like programs could
                                 pass completion percentages and
                                 failing programs could pass a human
                                 readable error message. Example:
-                                "STATUS=Completed 66% of file system
-                                check..."</para></listitem>
+                                <literal>STATUS=Completed 66% of file
+                                system
+                                check...</literal></para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term>ERRNO=...</term>
 
-                                <listitem><para>If a daemon fails, the
+                                <listitem><para>If a service fails, the
                                 errno-style error code, formatted as
-                                string. Example: "ERRNO=2" for
+                                string. Example: <literal>ERRNO=2</literal> for
                                 ENOENT.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term>BUSERROR=...</term>
 
-                                <listitem><para>If a daemon fails, the
+                                <listitem><para>If a service fails, the
                                 D-Bus error-style error code. Example:
-                                "BUSERROR=org.freedesktop.DBus.Error.TimedOut"</para></listitem>
+                                <literal>BUSERROR=org.freedesktop.DBus.Error.TimedOut</literal></para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term>MAINPID=...</term>
 
                                 <listitem><para>The main pid of the
-                                daemon, in case the init system did
+                                service, in case the service manager did
                                 not fork off the process
                                 itself. Example:
-                                "MAINPID=4711"</para></listitem>
+                                <literal>MAINPID=4711</literal></para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <varname>WatchdogSec=</varname> is
                                 enabled for it. See
                                 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-                                for details. It is recommended to send
-                                this message if the
-                                <varname>$WATCHDOG_PID</varname>
-                                environment variable has been set to
-                                the PID of the service process, in
-                                every half the time interval that is
-                                specified in the
-                                <varname>$WATCHDOG_USEC</varname>
-                                environment variable. See
+                                for information how to enable this
+                                functionality and
                                 <citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                                for details.</para></listitem>
+                                for the details of how the service can
+                                check if the the watchdog is enabled.
+                                </para></listitem>
                         </varlistentry>
                 </variablelist>
 
                 clashes.</para>
 
                 <para>Note that systemd will accept status data sent
-                from a daemon only if the
+                from a service only if the
                 <varname>NotifyAccess=</varname> option is correctly
                 set in the service definition file. See
                 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 <varname>$NOTIFY_SOCKET</varname> is <literal>@</literal>, the string is
                 understood as Linux abstract namespace socket. The
                 datagram is accompanied by the process credentials of
-                the sending daemon, using SCM_CREDENTIALS.</para>
+                the sending service, using SCM_CREDENTIALS.</para>
         </refsect1>
 
         <refsect1>
                         <varlistentry>
                                 <term><varname>$NOTIFY_SOCKET</varname></term>
 
-                                <listitem><para>Set by the init system
+                                <listitem><para>Set by the service manager
                                 for supervised processes for status
                                 and start-up completion
                                 notification. This environment variable
                 <example>
                         <title>Start-up Notification</title>
 
-                        <para>When a daemon finished starting up, it
+                        <para>When a service finished starting up, it
                         might issue the following call to notify
-                        the init system:</para>
+                        the service manager:</para>
 
                         <programlisting>sd_notify(0, "READY=1");</programlisting>
                 </example>
                 <example>
                         <title>Extended Start-up Notification</title>
 
-                        <para>A daemon could send the following after
+                        <para>A service could send the following after
                         completing initialization:</para>
 
                         <programlisting>sd_notifyf(0, "READY=1\n"
                 <example>
                         <title>Error Cause Notification</title>
 
-                        <para>A daemon could send the following shortly before exiting, on failure</para>
+                        <para>A service could send the following shortly before exiting, on failure</para>
 
                         <programlisting>sd_notifyf(0, "STATUS=Failed to start up: %s\n"
               "ERRNO=%i",
index 8a757598020255f9327508d88a4ccd02f5858470..3ce2a27acc196cd7a7098b9bc8329b23c63d288c 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_notify"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_notify, sd_notifyf — Notify service manager about start-up completion and other daemon status changes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notify</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notifyf</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214198380880"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_notify()</code> shall be called
-                by a daemon to notify the init system about status
-                changes. It can be used to send arbitrary information,
-                encoded in an environment-block-like string. Most
-                importantly it can be used for start-up completion
-                notification.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_notify"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_notify, sd_notifyf — Notify service manager about start-up completion and other service status changes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notify</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_notifyf</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214178979136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_notify()</code> may be called
+                by a service to notify the service manager about
+                state changes. It can be used to send arbitrary
+                information, encoded in an environment-block-like
+                string. Most importantly it can be used for start-up
+                completion notification.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
                 parameter is non-zero, <code class="function">sd_notify()</code>
                 will unset the <code class="varname">$NOTIFY_SOCKET</code>
                 environment variable before returning (regardless of
                 block. A trailing newline is implied if none is
                 specified. The string may contain any kind of variable
                 assignments, but the following shall be considered
-                well-known:</p><div class="variablelist"><dl class="variablelist"><dt id="READY=1"><span class="term">READY=1</span><a class="headerlink" title="Permalink to this term" href="#READY=1">¶</a></dt><dd><p>Tells the init system
-                                that daemon startup is finished. This
-                                is only used by systemd if the service
-                                definition file has Type=notify
-                                set. The passed argument is a boolean
-                                "1" or "0". Since there is little
+                well-known:</p><div class="variablelist"><dl class="variablelist"><dt id="READY=1"><span class="term">READY=1</span><a class="headerlink" title="Permalink to this term" href="#READY=1">¶</a></dt><dd><p>Tells the service
+                                manager that service startup is
+                                finished. This is only used by systemd
+                                if the service definition file has
+                                Type=notify set. Since there is little
                                 value in signaling non-readiness, the
-                                only value daemons should send is
-                                "READY=1".</p></dd><dt id="STATUS=..."><span class="term">STATUS=...</span><a class="headerlink" title="Permalink to this term" href="#STATUS=...">¶</a></dt><dd><p>Passes a single-line
-                                status string back to the init system
-                                that describes the daemon state. This
+                                only value services should send is
+                                "<code class="literal">READY=1</code>"
+                                (i.e. "<code class="literal">READY=0</code>" is
+                                not defined).</p></dd><dt id="RELOADING=1"><span class="term">RELOADING=1</span><a class="headerlink" title="Permalink to this term" href="#RELOADING=1">¶</a></dt><dd><p>Tells the service manager
+                                that the service is reloading its
+                                configuration. This is useful to allow
+                                the service manager to track the service's
+                                internal state, and present it to the
+                                user. Note that a service that sends
+                                this notification must also send a
+                                "<code class="literal">READY=1</code>"
+                                notification when it completed
+                                reloading its
+                                configuration.</p></dd><dt id="STOPPING=1"><span class="term">STOPPING=1</span><a class="headerlink" title="Permalink to this term" href="#STOPPING=1">¶</a></dt><dd><p>Tells the service manager
+                                that the service is beginning its
+                                shutdown. This is useful to allow the
+                                service manager to track the service's
+                                internal state, and present it to the
+                                user.</p></dd><dt id="STATUS=..."><span class="term">STATUS=...</span><a class="headerlink" title="Permalink to this term" href="#STATUS=...">¶</a></dt><dd><p>Passes a single-line
+                                UTF-8 status string back to the service manager
+                                that describes the service state. This
                                 is free-form and can be used for
                                 various purposes: general state
                                 feedback, fsck-like programs could
                                 pass completion percentages and
                                 failing programs could pass a human
                                 readable error message. Example:
-                                "STATUS=Completed 66% of file system
-                                check..."</p></dd><dt id="ERRNO=..."><span class="term">ERRNO=...</span><a class="headerlink" title="Permalink to this term" href="#ERRNO=...">¶</a></dt><dd><p>If a daemon fails, the
+                                "<code class="literal">STATUS=Completed 66% of file
+                                system
+                                check...</code>"</p></dd><dt id="ERRNO=..."><span class="term">ERRNO=...</span><a class="headerlink" title="Permalink to this term" href="#ERRNO=...">¶</a></dt><dd><p>If a service fails, the
                                 errno-style error code, formatted as
-                                string. Example: "ERRNO=2" for
-                                ENOENT.</p></dd><dt id="BUSERROR=..."><span class="term">BUSERROR=...</span><a class="headerlink" title="Permalink to this term" href="#BUSERROR=...">¶</a></dt><dd><p>If a daemon fails, the
+                                string. Example: "<code class="literal">ERRNO=2</code>" for
+                                ENOENT.</p></dd><dt id="BUSERROR=..."><span class="term">BUSERROR=...</span><a class="headerlink" title="Permalink to this term" href="#BUSERROR=...">¶</a></dt><dd><p>If a service fails, the
                                 D-Bus error-style error code. Example:
-                                "BUSERROR=org.freedesktop.DBus.Error.TimedOut"</p></dd><dt id="MAINPID=..."><span class="term">MAINPID=...</span><a class="headerlink" title="Permalink to this term" href="#MAINPID=...">¶</a></dt><dd><p>The main pid of the
-                                daemon, in case the init system did
+                                "<code class="literal">BUSERROR=org.freedesktop.DBus.Error.TimedOut</code>"</p></dd><dt id="MAINPID=..."><span class="term">MAINPID=...</span><a class="headerlink" title="Permalink to this term" href="#MAINPID=...">¶</a></dt><dd><p>The main pid of the
+                                service, in case the service manager did
                                 not fork off the process
                                 itself. Example:
-                                "MAINPID=4711"</p></dd><dt id="WATCHDOG=1"><span class="term">WATCHDOG=1</span><a class="headerlink" title="Permalink to this term" href="#WATCHDOG=1">¶</a></dt><dd><p>Tells systemd to
+                                "<code class="literal">MAINPID=4711</code>"</p></dd><dt id="WATCHDOG=1"><span class="term">WATCHDOG=1</span><a class="headerlink" title="Permalink to this term" href="#WATCHDOG=1">¶</a></dt><dd><p>Tells systemd to
                                 update the watchdog timestamp. This is
                                 the keep-alive ping that services need
                                 to issue in regular intervals if
                                 <code class="varname">WatchdogSec=</code> is
                                 enabled for it. See
                                 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>
-                                for details. It is recommended to send
-                                this message if the
-                                <code class="varname">$WATCHDOG_PID</code>
-                                environment variable has been set to
-                                the PID of the service process, in
-                                every half the time interval that is
-                                specified in the
-                                <code class="varname">$WATCHDOG_USEC</code>
-                                environment variable. See
+                                for information how to enable this
+                                functionality and
                                 <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
-                                for details.</p></dd></dl></div><p>It is recommended to prefix variable names that
+                                for the details of how the service can
+                                check if the the watchdog is enabled.
+                                </p></dd></dl></div><p>It is recommended to prefix variable names that
                 are not shown in the list above with
                 <code class="varname">X_</code> to avoid namespace
                 clashes.</p><p>Note that systemd will accept status data sent
-                from a daemon only if the
+                from a service only if the
                 <code class="varname">NotifyAccess=</code> option is correctly
                 set in the service definition file. See
                 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>
                 for details.</p><p><code class="function">sd_notifyf()</code> is similar to
                 <code class="function">sd_notify()</code> but takes a
                 <code class="function">printf()</code>-like format string plus
-                arguments.</p></div><div class="refsect1"><a name="idm214198431088"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
+                arguments.</p></div><div class="refsect1"><a name="idm214182840288"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
                 errno-style error code. If
                 <code class="varname">$NOTIFY_SOCKET</code> was not set and
                 hence no status data could be sent, 0 is returned. If
                 positive return value. In order to support both, init
                 systems that implement this scheme and those which
                 do not, it is generally recommended to ignore the return
-                value of this call.</p></div><div class="refsect1"><a name="idm214198428960"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                value of this call.</p></div><div class="refsect1"><a name="idm214182838160"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, these functions send a single
                 datagram with the state string as payload to the
                 <code class="constant">AF_UNIX</code> socket referenced in the
                 <code class="varname">$NOTIFY_SOCKET</code> is "<code class="literal">@</code>", the string is
                 understood as Linux abstract namespace socket. The
                 datagram is accompanied by the process credentials of
-                the sending daemon, using SCM_CREDENTIALS.</p></div><div class="refsect1"><a name="idm214198417120"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$NOTIFY_SOCKET"><span class="term"><code class="varname">$NOTIFY_SOCKET</code></span><a class="headerlink" title="Permalink to this term" href="#%24NOTIFY_SOCKET">¶</a></dt><dd><p>Set by the init system
+                the sending service, using SCM_CREDENTIALS.</p></div><div class="refsect1"><a name="idm214182833760"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$NOTIFY_SOCKET"><span class="term"><code class="varname">$NOTIFY_SOCKET</code></span><a class="headerlink" title="Permalink to this term" href="#%24NOTIFY_SOCKET">¶</a></dt><dd><p>Set by the service manager
                                 for supervised processes for status
                                 and start-up completion
                                 notification. This environment variable
                                 specifies the socket
                                 <code class="function">sd_notify()</code> talks
-                                to. See above for details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198413216"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214198412544"></a><p class="title"><b>Example 1. Start-up Notification</b></p><div class="example-contents"><p>When a daemon finished starting up, it
+                                to. See above for details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214182829856"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214182829184"></a><p class="title"><b>Example 1. Start-up Notification</b></p><div class="example-contents"><p>When a service finished starting up, it
                         might issue the following call to notify
-                        the init system:</p><pre class="programlisting">sd_notify(0, "READY=1");</pre></div></div><br class="example-break"><div class="example"><a name="idm214198410496"></a><p class="title"><b>Example 2. Extended Start-up Notification</b></p><div class="example-contents"><p>A daemon could send the following after
+                        the service manager:</p><pre class="programlisting">sd_notify(0, "READY=1");</pre></div></div><br class="example-break"><div class="example"><a name="idm214182827136"></a><p class="title"><b>Example 2. Extended Start-up Notification</b></p><div class="example-contents"><p>A service could send the following after
                         completing initialization:</p><pre class="programlisting">sd_notifyf(0, "READY=1\n"
               "STATUS=Processing requests...\n"
               "MAINPID=%lu",
-              (unsigned long) getpid());</pre></div></div><br class="example-break"><div class="example"><a name="idm214198408368"></a><p class="title"><b>Example 3. Error Cause Notification</b></p><div class="example-contents"><p>A daemon could send the following shortly before exiting, on failure</p><pre class="programlisting">sd_notifyf(0, "STATUS=Failed to start up: %s\n"
+              (unsigned long) getpid());</pre></div></div><br class="example-break"><div class="example"><a name="idm214177910944"></a><p class="title"><b>Example 3. Error Cause Notification</b></p><div class="example-contents"><p>A service could send the following shortly before exiting, on failure</p><pre class="programlisting">sd_notifyf(0, "STATUS=Failed to start up: %s\n"
               "ERRNO=%i",
               strerror(errno),
-              errno);</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214198406240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+              errno);</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214177909008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index ec0467ce8b3efb875361727c2bb3c727ef55c756..18323e58c2c44911a8968b54268ba4e31a98a70a 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_PID_GET_SESSION" "3" "" "systemd 215" "sd_pid_get_session"
+.TH "SD_PID_GET_SESSION" "3" "" "systemd 217" "sd_pid_get_session"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -134,4 +134,5 @@ is completely unrelated to the process session identifier as returned by
 \fBsd-login\fR(3),
 \fBsd_session_is_active\fR(3),
 \fBgetsid\fR(2),
-\fBsystemd.slice\fR(5)
+\fBsystemd.slice\fR(5),
+\fBsystemd-machined.service\fR(8)
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 933138da16e90f796870ade5a81d429299ee482b..050f701da3ee0c40400a72ec878889d5149d5ac4 100644 (file)
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_pid_get_unit()</function> may be
                 use <function>sd_pid_get_user_unit()</function> for
                 that.) The returned string needs to be freed with the
                 libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_pid_get_user_unit()</function> may
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_pid_get_slice()</function> may be
                 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para>If the <varname>pid</varname> parameter of any
                 <function>sd_peer_get_slice()</function> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
 
                 <para>Note that the login session identifier as
                         <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>getsid</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 541808f63fd04bc949f749ca4f40cd3dcf391b2d..5d64eecda0fd8c5b4bfe647e98b197e87598570a 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_pid_get_session"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_pid_get_session, sd_pid_get_unit, sd_pid_get_user_unit, sd_pid_get_owner_uid, sd_pid_get_machine_name, sd_pid_get_slice, sd_peer_get_session, sd_peer_get_unit, sd_peer_get_user_unit, sd_peer_get_owner_uid, sd_peer_get_machine_name, sd_peer_get_slice — Determine session, service, owner of a
                 session, container/VM or slice of a specific
-                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214179159952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
+                PID or socket peer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_session</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_user_unit</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_owner_uid</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_machine_name</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_pid_get_slice</b>(</code></td><td>pid_t <var class="pdparam">pid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_session</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_user_unit</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">unit</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_owner_uid</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_machine_name</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_peer_get_slice</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">slice</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177807600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_pid_get_session()</code> may be
                 used to determine the login session identifier of a
                 process identified by the specified process
                 identifier. The session identifier is a short string,
@@ -32,7 +32,7 @@
                 threads). For processes not being part of a login
                 session this function will fail. The returned string
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_unit()</code> may be
                 used to determine the systemd system unit (i.e. system
                 service) identifier of a process identified by the
@@ -46,7 +46,7 @@
                 use <code class="function">sd_pid_get_user_unit()</code> for
                 that.) The returned string needs to be freed with the
                 libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_user_unit()</code> may
                 be used to determine the systemd user unit (i.e. user
                 service) identifier of a process identified by the
                 container is a member of. The machine name is a short
                 string, suitable for usage in file system paths. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_pid_get_slice()</code> may be
                 used to determine the slice unit the process is a
                 member of. See
                 <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
                 for details about slices. The returned string needs to
                 be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p>If the <code class="varname">pid</code> parameter of any
                 of these functions is passed as 0, the operation is
                 executed for the calling process.</p><p>The <code class="function">sd_peer_get_session()</code>,
@@ -84,9 +84,9 @@
                 <code class="function">sd_peer_get_slice()</code> calls operate
                 similar to their PID counterparts, but operate on a
                 connected AF_UNIX socket and retrieve information
-                about the connected peer process.</p></div><div class="refsect1"><a name="idm214174228912"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
+                about the connected peer process.</p></div><div class="refsect1"><a name="idm214173154800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success, these calls return 0 or a positive
                 integer. On failure, these calls return a negative
-                errno-style error code.</p></div><div class="refsect1"><a name="idm214174227584"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
+                errno-style error code.</p></div><div class="refsect1"><a name="idm214173153472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_pid_get_session()</code>,
                 <code class="function">sd_pid_get_unit()</code>,
                 <code class="function">sd_pid_get_user_unit()</code>,
                 <code class="function">sd_pid_get_owner_uid()</code>,
                 <code class="function">sd_peer_get_slice()</code> interfaces are
                 available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
                 file.</p><p>Note that the login session identifier as
                 returned by <code class="function">sd_pid_get_session()</code>
                 is completely unrelated to the process session
                 identifier as returned by
-                <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214174215712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>.</p></div><div class="refsect1"><a name="idm214173141360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>,
-                        <a href="getsid.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
-                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/getsid.2.html"><span class="citerefentry"><span class="refentrytitle">getsid</span>(2)</span></a>,
+                        <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
+                        <a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>
                 </p></div></div></body></html>
diff --git a/man/sd_readahead.3 b/man/sd_readahead.3
deleted file mode 100644 (file)
index c2b0e12..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-'\" t
-.TH "SD_READAHEAD" "3" "" "systemd 215" "sd_readahead"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-sd_readahead \- Control ongoing disk boot\-time read\-ahead operations
-.SH "SYNOPSIS"
-.sp
-.ft B
-.nf
-#include "sd\-readahead\&.h"
-.fi
-.ft
-.HP \w'int\ sd_readahead('u
-.BI "int sd_readahead(const\ char\ *" "action" ");"
-.SH "DESCRIPTION"
-.PP
-\fBsd_readahead()\fR
-may be called by programs involved with early boot\-up to control ongoing boot\-time disk read\-ahead operations\&. It may be used to terminate read\-ahead operations in case an uncommon disk access pattern is to be expected and hence read\-ahead replay or collection is unlikely to have the desired speed\-up effect on the current or future boot\-ups\&.
-.PP
-The
-\fIaction\fR
-should be one of the following strings:
-.PP
-cancel
-.RS 4
-Terminates read\-ahead data collection, and drops all read\-ahead data collected during this boot\-up\&.
-.RE
-.PP
-done
-.RS 4
-Terminates read\-ahead data collection, but keeps all read\-ahead data collected during this boot\-up around for use during subsequent boot\-ups\&.
-.RE
-.PP
-noreplay
-.RS 4
-Terminates read\-ahead replay\&.
-.RE
-.SH "RETURN VALUE"
-.PP
-On failure, these calls return a negative errno\-style error code\&. It is generally recommended to ignore the return value of this call\&.
-.SH "NOTES"
-.PP
-This function is provided by the reference implementation of APIs for controlling boot\-time read\-ahead and distributed with the systemd package\&. The algorithm it implements is simple, and can easily be reimplemented in daemons if it is important to support this interface without using the reference implementation\&.
-.PP
-Internally, this function creates a file in
-/run/systemd/readahead/
-which is then used as flag file to notify the read\-ahead subsystem\&.
-.PP
-For details about the algorithm check the liberally licensed reference implementation sources:
-\m[blue]\fB\%http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c\fR\m[]
-and
-\m[blue]\fB\%http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h\fR\m[]
-.PP
-\fBsd_readahead()\fR
-is implemented in the reference implementation\*(Aqs drop\-in
-sd\-readahead\&.c
-and
-sd\-readahead\&.h
-files\&. It is recommended that applications consuming this API copy the implementation into their source tree\&. For more details about the reference implementation, see
-\fBsd-readahead\fR(3)
-.PP
-If \-DDISABLE_SYSTEMD is set during compilation, this function will always return 0 and otherwise become a NOP\&.
-.SH "EXAMPLES"
-.PP
-\fBExample\ \&1.\ \&Cancelling all read-ahead operations\fR
-.PP
-During boots where SELinux has to relabel the file system hierarchy, it will create a large amount of disk accesses that are not necessary during normal boots\&. Hence it is a good idea to disable both read\-ahead replay and read\-ahead collection\&.
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-sd_readahead("cancel");
-sd_readahead("noreplay");
-.fi
-.if n \{\
-.RE
-.\}
-.SH "SEE ALSO"
-.PP
-\fBsystemd\fR(1),
-\fBsd-readahead\fR(3),
-\fBdaemon\fR(7)
diff --git a/man/sd_readahead.html b/man/sd_readahead.html
deleted file mode 100644 (file)
index 2d63b7d..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_readahead</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
-    a.headerlink {
-      color: #c60f0f;
-      font-size: 0.8em;
-      padding: 0 4px 0 4px;
-      text-decoration: none;
-      visibility: hidden;
-    }
-
-    a.headerlink:hover {
-      background-color: #c60f0f;
-      color: white;
-    }
-
-    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
-      visibility: visible;
-    }
-  </style><a href="index.html">Index </a>·
-  <a href="systemd.directives.html">Directives </a>·
-  <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_readahead"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_readahead — Control ongoing disk boot-time read-ahead operations</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include "sd-readahead.h"</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_readahead</b>(</code></td><td>const char *<var class="pdparam">action</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214180411520"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_readahead()</code> may be
-                called by programs involved with early boot-up to
-                control ongoing boot-time disk read-ahead operations. It may be
-                used to terminate read-ahead operations in case an
-                uncommon disk access pattern is to be expected and
-                hence read-ahead replay or collection is unlikely to
-                have the desired speed-up effect on the current or
-                future boot-ups.</p><p>The <em class="parameter"><code>action</code></em> should be one
-                of the following strings:</p><div class="variablelist"><dl class="variablelist"><dt id="cancel"><span class="term">cancel</span><a class="headerlink" title="Permalink to this term" href="#cancel">¶</a></dt><dd><p>Terminates read-ahead
-                                data collection, and drops all
-                                read-ahead data collected during this
-                                boot-up.</p></dd><dt id="done"><span class="term">done</span><a class="headerlink" title="Permalink to this term" href="#done">¶</a></dt><dd><p>Terminates read-ahead
-                                data collection, but keeps all
-                                read-ahead data collected during this
-                                boot-up around for use during
-                                subsequent boot-ups.</p></dd><dt id="noreplay"><span class="term">noreplay</span><a class="headerlink" title="Permalink to this term" href="#noreplay">¶</a></dt><dd><p>Terminates read-ahead
-                                replay.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180403328"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, these calls return a negative
-                errno-style error code. It is generally recommended to
-                ignore the return value of this call.</p></div><div class="refsect1"><a name="idm214180401968"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>This function is provided by the reference
-                implementation of APIs for controlling boot-time
-                read-ahead and distributed with the systemd
-                package. The algorithm it implements is simple, and
-                can easily be reimplemented in daemons if it is
-                important to support this interface without using the
-                reference implementation.</p><p>Internally, this function creates a file in
-                <code class="filename">/run/systemd/readahead/</code> which is
-                then used as flag file to notify the read-ahead
-                subsystem.</p><p>For details about the algorithm check the
-                liberally licensed reference implementation sources:
-                <a class="ulink" href="http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c" target="_top">http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c</a>
-                and <a class="ulink" href="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h" target="_top">http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h</a></p><p><code class="function">sd_readahead()</code> is
-                implemented in the reference implementation's drop-in
-                <code class="filename">sd-readahead.c</code> and
-                <code class="filename">sd-readahead.h</code> files. It is
-                recommended that applications consuming this API copy
-                the implementation into their source tree. For more
-                details about the reference implementation, see
-                <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a></p><p>If -DDISABLE_SYSTEMD is set during compilation,
-                this function will always return 0 and otherwise
-                become a NOP.</p></div><div class="refsect1"><a name="idm214184347568"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214184346896"></a><p class="title"><b>Example 1. Cancelling all read-ahead operations</b></p><div class="example-contents"><p>During boots where SELinux has to
-                        relabel the file system hierarchy, it will
-                        create a large amount of disk accesses that
-                        are not necessary during normal boots. Hence
-                        it is a good idea to disable both read-ahead replay and read-ahead collection.
-                        </p><pre class="programlisting">sd_readahead("cancel");
-sd_readahead("noreplay");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214184344576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a>,
-                        <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>
-                </p></div></div></body></html>
diff --git a/man/sd_readahead.xml b/man/sd_readahead.xml
deleted file mode 100644 (file)
index 9827299..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-<?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">
-
-<!--
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  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="sd_readahead" conditional='ENABLE_READAHEAD'>
-
-        <refentryinfo>
-                <title>sd_readahead</title>
-                <productname>systemd</productname>
-
-                <authorgroup>
-                        <author>
-                                <contrib>Developer</contrib>
-                                <firstname>Lennart</firstname>
-                                <surname>Poettering</surname>
-                                <email>lennart@poettering.net</email>
-                        </author>
-                </authorgroup>
-        </refentryinfo>
-
-        <refmeta>
-                <refentrytitle>sd_readahead</refentrytitle>
-                <manvolnum>3</manvolnum>
-        </refmeta>
-
-        <refnamediv>
-                <refname>sd_readahead</refname>
-                <refpurpose>Control ongoing disk boot-time read-ahead operations</refpurpose>
-        </refnamediv>
-
-        <refsynopsisdiv>
-                <funcsynopsis>
-                        <funcsynopsisinfo>#include "sd-readahead.h"</funcsynopsisinfo>
-
-                        <funcprototype>
-                                <funcdef>int <function>sd_readahead</function></funcdef>
-                                <paramdef>const char *<parameter>action</parameter></paramdef>
-                        </funcprototype>
-                </funcsynopsis>
-        </refsynopsisdiv>
-
-        <refsect1>
-                <title>Description</title>
-                <para><function>sd_readahead()</function> may be
-                called by programs involved with early boot-up to
-                control ongoing boot-time disk read-ahead operations. It may be
-                used to terminate read-ahead operations in case an
-                uncommon disk access pattern is to be expected and
-                hence read-ahead replay or collection is unlikely to
-                have the desired speed-up effect on the current or
-                future boot-ups.</para>
-
-                <para>The <parameter>action</parameter> should be one
-                of the following strings:</para>
-
-                <variablelist>
-                        <varlistentry>
-                                <term>cancel</term>
-
-                                <listitem><para>Terminates read-ahead
-                                data collection, and drops all
-                                read-ahead data collected during this
-                                boot-up.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term>done</term>
-
-                                <listitem><para>Terminates read-ahead
-                                data collection, but keeps all
-                                read-ahead data collected during this
-                                boot-up around for use during
-                                subsequent boot-ups.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term>noreplay</term>
-
-                                <listitem><para>Terminates read-ahead
-                                replay.</para></listitem>
-                        </varlistentry>
-
-                </variablelist>
-
-        </refsect1>
-
-        <refsect1>
-                <title>Return Value</title>
-
-                <para>On failure, these calls return a negative
-                errno-style error code. It is generally recommended to
-                ignore the return value of this call.</para>
-        </refsect1>
-
-        <refsect1>
-                <title>Notes</title>
-
-                <para>This function is provided by the reference
-                implementation of APIs for controlling boot-time
-                read-ahead and distributed with the systemd
-                package. The algorithm it implements is simple, and
-                can easily be reimplemented in daemons if it is
-                important to support this interface without using the
-                reference implementation.</para>
-
-                <para>Internally, this function creates a file in
-                <filename>/run/systemd/readahead/</filename> which is
-                then used as flag file to notify the read-ahead
-                subsystem.</para>
-
-                <para>For details about the algorithm check the
-                liberally licensed reference implementation sources:
-                <ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c"/>
-                and <ulink
-                url="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h"/></para>
-
-                <para><function>sd_readahead()</function> is
-                implemented in the reference implementation's drop-in
-                <filename>sd-readahead.c</filename> and
-                <filename>sd-readahead.h</filename> files. It is
-                recommended that applications consuming this API copy
-                the implementation into their source tree. For more
-                details about the reference implementation, see
-                <citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
-
-                <para>If -DDISABLE_SYSTEMD is set during compilation,
-                this function will always return 0 and otherwise
-                become a NOP.</para>
-        </refsect1>
-
-        <refsect1>
-                <title>Examples</title>
-
-                <example>
-                        <title>Cancelling all read-ahead operations</title>
-
-                        <para>During boots where SELinux has to
-                        relabel the file system hierarchy, it will
-                        create a large amount of disk accesses that
-                        are not necessary during normal boots. Hence
-                        it is a good idea to disable both read-ahead replay and read-ahead collection.
-                        </para>
-
-                        <programlisting>sd_readahead("cancel");
-sd_readahead("noreplay");</programlisting>
-                </example>
-
-        </refsect1>
-
-        <refsect1>
-                <title>See Also</title>
-                <para>
-                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>
-                </para>
-        </refsect1>
-
-</refentry>
index 2dddb5d81d85f6bd1b3c8f1e92b2e46459b7a2d4..541cc614462c6bfad38839e1832ad3a54acde1cf 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195794128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184359984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
                 used to determine which session is currently active on
                 a seat, if there is any. Returns the session
                 identifier and the user identifier of the Unix user
@@ -28,7 +28,7 @@
                 <code class="constant">NULL</code>, in case only one of the
                 parameters shall be queried. The returned string needs
                 to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_seat_get_sessions()</code> may
                 be used to determine all sessions on the specified
                 seat. Returns two arrays, one (<code class="constant">NULL</code> terminated) with
@@ -40,7 +40,7 @@
                 <code class="constant">NULL</code> in case these values need not to be
                 determined. The arrays and the strings referenced by
                 them need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p><code class="function">sd_seat_can_multi_session()</code>
@@ -56,7 +56,7 @@
                 of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the seat of the session of the calling process, if
-                there is any.</p></div><div class="refsect1"><a name="idm214195782032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
+                there is any.</p></div><div class="refsect1"><a name="idm214188252496"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
                 <code class="function">sd_seat_get_active()</code>
                 returns 0 or a positive integer. On success,
                 <code class="function">sd_seat_get_sessions()</code> returns
                 <code class="function">sd_seat_can_tty</code> and
                 <code class="function">sd_seat_can_graphical</code> return a
                 positive integer, if it fails 0. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214195769616"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188247440"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
                 <code class="function">sd_seat_get_sessions()</code>,
                 <code class="function">sd_seat_can_multi_session()</code>,
                 <code class="function">sd_seat_can_tty()</code> and
                 <code class="function">sd_seat_can_grapical()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214195763328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188233600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index 2dddb5d81d85f6bd1b3c8f1e92b2e46459b7a2d4..541cc614462c6bfad38839e1832ad3a54acde1cf 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195794128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184359984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
                 used to determine which session is currently active on
                 a seat, if there is any. Returns the session
                 identifier and the user identifier of the Unix user
@@ -28,7 +28,7 @@
                 <code class="constant">NULL</code>, in case only one of the
                 parameters shall be queried. The returned string needs
                 to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_seat_get_sessions()</code> may
                 be used to determine all sessions on the specified
                 seat. Returns two arrays, one (<code class="constant">NULL</code> terminated) with
@@ -40,7 +40,7 @@
                 <code class="constant">NULL</code> in case these values need not to be
                 determined. The arrays and the strings referenced by
                 them need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p><code class="function">sd_seat_can_multi_session()</code>
@@ -56,7 +56,7 @@
                 of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the seat of the session of the calling process, if
-                there is any.</p></div><div class="refsect1"><a name="idm214195782032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
+                there is any.</p></div><div class="refsect1"><a name="idm214188252496"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
                 <code class="function">sd_seat_get_active()</code>
                 returns 0 or a positive integer. On success,
                 <code class="function">sd_seat_get_sessions()</code> returns
                 <code class="function">sd_seat_can_tty</code> and
                 <code class="function">sd_seat_can_graphical</code> return a
                 positive integer, if it fails 0. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214195769616"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188247440"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
                 <code class="function">sd_seat_get_sessions()</code>,
                 <code class="function">sd_seat_can_multi_session()</code>,
                 <code class="function">sd_seat_can_tty()</code> and
                 <code class="function">sd_seat_can_grapical()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214195763328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188233600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index 2dddb5d81d85f6bd1b3c8f1e92b2e46459b7a2d4..541cc614462c6bfad38839e1832ad3a54acde1cf 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195794128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184359984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
                 used to determine which session is currently active on
                 a seat, if there is any. Returns the session
                 identifier and the user identifier of the Unix user
@@ -28,7 +28,7 @@
                 <code class="constant">NULL</code>, in case only one of the
                 parameters shall be queried. The returned string needs
                 to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_seat_get_sessions()</code> may
                 be used to determine all sessions on the specified
                 seat. Returns two arrays, one (<code class="constant">NULL</code> terminated) with
@@ -40,7 +40,7 @@
                 <code class="constant">NULL</code> in case these values need not to be
                 determined. The arrays and the strings referenced by
                 them need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p><code class="function">sd_seat_can_multi_session()</code>
@@ -56,7 +56,7 @@
                 of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the seat of the session of the calling process, if
-                there is any.</p></div><div class="refsect1"><a name="idm214195782032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
+                there is any.</p></div><div class="refsect1"><a name="idm214188252496"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
                 <code class="function">sd_seat_get_active()</code>
                 returns 0 or a positive integer. On success,
                 <code class="function">sd_seat_get_sessions()</code> returns
                 <code class="function">sd_seat_can_tty</code> and
                 <code class="function">sd_seat_can_graphical</code> return a
                 positive integer, if it fails 0. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214195769616"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188247440"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
                 <code class="function">sd_seat_get_sessions()</code>,
                 <code class="function">sd_seat_can_multi_session()</code>,
                 <code class="function">sd_seat_can_tty()</code> and
                 <code class="function">sd_seat_can_grapical()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214195763328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188233600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index 4e1dd2fe26d62cbbc4bb2f126fec12060c2b8ff3..50bc72af1d9f115d4e96af5b1355e9ae970641e1 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_SEAT_GET_ACTIVE" "3" "" "systemd 215" "sd_seat_get_active"
+.TH "SD_SEAT_GET_ACTIVE" "3" "" "systemd 217" "sd_seat_get_active"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 2dddb5d81d85f6bd1b3c8f1e92b2e46459b7a2d4..541cc614462c6bfad38839e1832ad3a54acde1cf 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195794128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184359984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
                 used to determine which session is currently active on
                 a seat, if there is any. Returns the session
                 identifier and the user identifier of the Unix user
@@ -28,7 +28,7 @@
                 <code class="constant">NULL</code>, in case only one of the
                 parameters shall be queried. The returned string needs
                 to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_seat_get_sessions()</code> may
                 be used to determine all sessions on the specified
                 seat. Returns two arrays, one (<code class="constant">NULL</code> terminated) with
@@ -40,7 +40,7 @@
                 <code class="constant">NULL</code> in case these values need not to be
                 determined. The arrays and the strings referenced by
                 them need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p><code class="function">sd_seat_can_multi_session()</code>
@@ -56,7 +56,7 @@
                 of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the seat of the session of the calling process, if
-                there is any.</p></div><div class="refsect1"><a name="idm214195782032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
+                there is any.</p></div><div class="refsect1"><a name="idm214188252496"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
                 <code class="function">sd_seat_get_active()</code>
                 returns 0 or a positive integer. On success,
                 <code class="function">sd_seat_get_sessions()</code> returns
                 <code class="function">sd_seat_can_tty</code> and
                 <code class="function">sd_seat_can_graphical</code> return a
                 positive integer, if it fails 0. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214195769616"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188247440"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
                 <code class="function">sd_seat_get_sessions()</code>,
                 <code class="function">sd_seat_can_multi_session()</code>,
                 <code class="function">sd_seat_can_tty()</code> and
                 <code class="function">sd_seat_can_grapical()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214195763328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188233600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index ba6cfeb66931bdb3daf515ce06747a5133bcc08d..20c7b99daa312995ec97b9b9319f719a7e8edd43 100644 (file)
@@ -99,7 +99,7 @@
                 <constant>NULL</constant>, in case only one of the
                 parameters shall be queried. The returned string needs
                 to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_seat_get_sessions()</function> may
                 <constant>NULL</constant> in case these values need not to be
                 determined. The arrays and the strings referenced by
                 them need to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use. Note that instead of an empty array
                 <constant>NULL</constant> may be returned and should be considered
                 equivalent to an empty array.</para>
                 <function>sd_seat_can_grapical()</function> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index 2dddb5d81d85f6bd1b3c8f1e92b2e46459b7a2d4..541cc614462c6bfad38839e1832ad3a54acde1cf 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214195794128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session, sd_seat_can_tty, sd_seat_can_graphical — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char *<var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t **<var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214184359984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_seat_get_active()</code> may be
                 used to determine which session is currently active on
                 a seat, if there is any. Returns the session
                 identifier and the user identifier of the Unix user
@@ -28,7 +28,7 @@
                 <code class="constant">NULL</code>, in case only one of the
                 parameters shall be queried. The returned string needs
                 to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_seat_get_sessions()</code> may
                 be used to determine all sessions on the specified
                 seat. Returns two arrays, one (<code class="constant">NULL</code> terminated) with
@@ -40,7 +40,7 @@
                 <code class="constant">NULL</code> in case these values need not to be
                 determined. The arrays and the strings referenced by
                 them need to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that instead of an empty array
                 <code class="constant">NULL</code> may be returned and should be considered
                 equivalent to an empty array.</p><p><code class="function">sd_seat_can_multi_session()</code>
@@ -56,7 +56,7 @@
                 of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the seat of the session of the calling process, if
-                there is any.</p></div><div class="refsect1"><a name="idm214195782032"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
+                there is any.</p></div><div class="refsect1"><a name="idm214188252496"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p> On success,
                 <code class="function">sd_seat_get_active()</code>
                 returns 0 or a positive integer. On success,
                 <code class="function">sd_seat_get_sessions()</code> returns
                 <code class="function">sd_seat_can_tty</code> and
                 <code class="function">sd_seat_can_graphical</code> return a
                 positive integer, if it fails 0. On failure, these
-                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214195769616"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
+                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idm214188247440"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_seat_get_active()</code>,
                 <code class="function">sd_seat_get_sessions()</code>,
                 <code class="function">sd_seat_can_multi_session()</code>,
                 <code class="function">sd_seat_can_tty()</code> and
                 <code class="function">sd_seat_can_grapical()</code> interfaces
                 are available as a shared library, which can be compiled
                 and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214195763328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214188233600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
diff --git a/man/sd_session_get_desktop.3 b/man/sd_session_get_desktop.3
new file mode 100644 (file)
index 0000000..b9ad5cd
--- /dev/null
@@ -0,0 +1 @@
+.so man3/sd_session_is_active.3
diff --git a/man/sd_session_get_desktop.html b/man/sd_session_get_desktop.html
new file mode 100644 (file)
index 0000000..70bd2ff
--- /dev/null
@@ -0,0 +1,159 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>sd_session_is_active</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+                be used to determine whether the session identified by
+                the specified session identifier is currently active
+                (i.e. currently in the foreground and available for
+                user input) or not.</p><p><code class="function">sd_session_is_remote()</code> may
+                be used to determine whether the session identified by
+                the specified session identifier is a remote session
+                (i.e. its remote host is known) or not.</p><p><code class="function">sd_session_get_state()</code> may
+                be used to determine the state of the session
+                identified by the specified session identifier. The
+                following states are currently known:
+                "<code class="literal">online</code>" (session logged in, but
+                session not active, i.e. not in the foreground),
+                "<code class="literal">active</code>" (session logged in and
+                active, i.e. in the foreground),
+                "<code class="literal">closing</code>" (session nominally logged
+                out, but some processes belonging to it are still
+                around). In the future additional states might be
+                defined, client code should be written to be robust in
+                regards to additional state strings being
+                returned. This function is a more generic version of
+                <code class="function">sd_session_is_active()</code>. The returned
+                string needs to be freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
+                used to determine the user identifier of the Unix user the session
+                identified by the specified session identifier belongs
+                to.</p><p><code class="function">sd_session_get_seat()</code> may
+                be used to determine the seat identifier of the seat
+                the session identified by the specified session
+                identifier belongs to. Note that not all sessions are
+                attached to a seat, this call will fail for them. The
+                returned string needs to be freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_service()</code>
+                may be used to determine the name of the service (as
+                passed during PAM session setup) that registered the
+                session identified by the specified session
+                identifier. The returned string needs to be freed with
+                the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_type()</code> may
+                be used to determine the type of the session
+                identified by the specified session identifier. The
+                returned string is one of "<code class="literal">x11</code>",
+                "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
+                "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
+                needs to be freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_class()</code> may
+                be used to determine the class of the session
+                identified by the specified session identifier. The
+                returned string is one of "<code class="literal">user</code>",
+                "<code class="literal">greeter</code>",
+                "<code class="literal">lock-screen</code>", or
+                "<code class="literal">background</code>" and needs to be freed
+                with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_display()</code>
+                may be used to determine the X11 display of the
+                session identified by the specified session
+                identifier. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
+                may be used to determine the remote hostname of the
+                session identified by the specified session
+                identifier. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
+                may be used to determine the remote username of the
+                session identified by the specified session
+                identifier. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use. Note that this value is rarely known
+                to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
+                may be used to determine the TTY device of the
+                session identified by the specified session
+                identifier. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_vt()</code>
+                may be used to determine the VT number of the
+                session identified by the specified session
+                identifier. This function will return an error if
+                the seat does not support VTs.</p><p>If the <code class="varname">session</code> parameter of
+                any of these functions is passed as
+                <code class="constant">NULL</code>, the operation is executed
+                for the session the calling process is a member of, if
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                <code class="function">sd_session_is_active()</code> and
+                <code class="function">sd_session_is_remote()</code> return a
+                positive integer; if it fails, 0.  On success,
+                <code class="function">sd_session_get_state()</code>,
+                <code class="function">sd_session_get_uid()</code>,
+                <code class="function">sd_session_get_seat()</code>,
+                <code class="function">sd_session_get_service()</code>,
+                <code class="function">sd_session_get_type()</code>,
+                <code class="function">sd_session_get_class()</code>,
+                <code class="function">sd_session_get_display()</code>,
+                <code class="function">sd_session_get_remote_user()</code>,
+                <code class="function">sd_session_get_remote_host()</code> and
+                <code class="function">sd_session_get_tty()</code> return 0 or
+                a positive integer. On failure, these calls return a
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                <code class="function">sd_session_get_state()</code>,
+                <code class="function">sd_session_get_uid()</code>,
+                <code class="function">sd_session_get_seat()</code>,
+                <code class="function">sd_session_get_service()</code>,
+                <code class="function">sd_session_get_type()</code>,
+                <code class="function">sd_session_get_class()</code>,
+                <code class="function">sd_session_get_display()</code>,
+                <code class="function">sd_session_get_remote_host()</code>,
+                <code class="function">sd_session_get_remote_user()</code> and
+                <code class="function">sd_session_get_tty()</code>
+                interfaces are available as a shared library, which can
+                be compiled and linked to with the
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
+                        <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
+                </p></div></div></body></html>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index 9fe5bafabc5a45b0b6977936ca5612aefef21ef3..cdbd083dff3f0787e9f614d504b63d7ccec9c088 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_SESSION_IS_ACTIVE" "3" "" "systemd 215" "sd_session_is_active"
+.TH "SD_SESSION_IS_ACTIVE" "3" "" "systemd 217" "sd_session_is_active"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -20,7 +20,7 @@
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
 .SH "NAME"
-sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user \- Determine state of a specific session
+sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user \- Determine state of a specific session
 .SH "SYNOPSIS"
 .sp
 .ft B
@@ -44,6 +44,8 @@ sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get
 .BI "int sd_session_get_type(const\ char\ *" "session" ", char\ **" "type" ");"
 .HP \w'int\ sd_session_get_class('u
 .BI "int sd_session_get_class(const\ char\ *" "session" ", char\ **" "class" ");"
+.HP \w'int\ sd_session_get_desktop('u
+.BI "int sd_session_get_desktop(const\ char\ *" "session" ", char\ **" "desktop" ");"
 .HP \w'int\ sd_session_get_display('u
 .BI "int sd_session_get_display(const\ char\ *" "session" ", char\ **" "display" ");"
 .HP \w'int\ sd_session_get_remote_host('u
@@ -109,6 +111,13 @@ and needs to be freed with the libc
 \fBfree\fR(3)
 call after use\&.
 .PP
+\fBsd_session_get_desktop()\fR
+may be used to determine the brand of the desktop running on the session identified by the specified session identifier\&. This field can be set freely by desktop environments and does not follow any special formatting\&. However, desktops are strongly recommended to use the same identifiers and capitalization as for
+\fI$XDG_CURRENT_DESKTOP\fR, as defined by the
+\m[blue]\fBDesktop Entry Specification\fR\m[]\&\s-2\u[1]\d\s+2\&. The returned string needs to be freed with the libc
+\fBfree\fR(3)
+call after use\&.
+.PP
 \fBsd_session_get_display()\fR
 may be used to determine the X11 display of the session identified by the specified session identifier\&. The returned string needs to be freed with the libc
 \fBfree\fR(3)
@@ -178,3 +187,9 @@ file\&.
 \fBsystemd\fR(1),
 \fBsd-login\fR(3),
 \fBsd_pid_get_session\fR(3)
+.SH "NOTES"
+.IP " 1." 4
+Desktop Entry Specification
+.RS 4
+\%http://standards.freedesktop.org/desktop-entry-spec/latest/
+.RE
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index 407354ae7fe5a1706cdf4571d8798502f9535d90..e9840669c27c4efa4b0181bf5c88ba63c6a6e79c 100644 (file)
@@ -51,6 +51,7 @@
                 <refname>sd_session_get_service</refname>
                 <refname>sd_session_get_type</refname>
                 <refname>sd_session_get_class</refname>
+                <refname>sd_session_get_desktop</refname>
                 <refname>sd_session_get_display</refname>
                 <refname>sd_session_get_tty</refname>
                 <refname>sd_session_get_vt</refname>
                                 <paramdef>char **<parameter>class</parameter></paramdef>
                         </funcprototype>
 
+                        <funcprototype>
+                                <funcdef>int <function>sd_session_get_desktop</function></funcdef>
+                                <paramdef>const char *<parameter>session</parameter></paramdef>
+                                <paramdef>char **<parameter>desktop</parameter></paramdef>
+                        </funcprototype>
+
                         <funcprototype>
                                 <funcdef>int <function>sd_session_get_display</function></funcdef>
                                 <paramdef>const char *<parameter>session</parameter></paramdef>
                 returned. This function is a more generic version of
                 <function>sd_session_is_active()</function>. The returned
                 string needs to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_uid()</function> may be
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_service()</function>
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_type()</function> may
                 <literal>wayland</literal>, <literal>tty</literal>,
                 <literal>mir</literal> or <literal>unspecified</literal> and
                 needs to be freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_class()</function> may
                 <literal>lock-screen</literal>, or
                 <literal>background</literal> and needs to be freed
                 with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                call after use.</para>
+
+                <para><function>sd_session_get_desktop()</function> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <varname>$XDG_CURRENT_DESKTOP</varname>, as defined by
+                the <ulink
+                url="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop
+                Entry
+                Specification</ulink>. The returned string needs to be
+                freed with the libc
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_display()</function>
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_remote_host()</function>
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_remote_user()</function>
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</para>
 
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_session_get_vt()</function>
                 <function>sd_session_get_tty()</function>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
index a1ad58aea8b30c899c0ca7ad71e0efc8ae27d3f2..70bd2ffa359b46387f38d4721fb3fda34f44bfc6 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214172690320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_session_is_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_session_is_active, sd_session_is_remote, sd_session_get_state, sd_session_get_uid, sd_session_get_seat, sd_session_get_service, sd_session_get_type, sd_session_get_class, sd_session_get_desktop, sd_session_get_display, sd_session_get_tty, sd_session_get_vt, sd_session_get_remote_host, sd_session_get_remote_user — Determine state of a specific session</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_active</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_is_remote</b>(</code></td><td>const char *<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_state</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_uid</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t *<var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_seat</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_service</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">service</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_type</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_class</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">class</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_desktop</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">desktop</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_display</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">display</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_host</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_host</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_remote_user</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">remote_user</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_tty</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">tty</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_session_get_vt</b>(</code></td><td>const char *<var class="pdparam">session</var>, </td></tr><tr><td> </td><td>unsigned int *<var class="pdparam">vt</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214194513424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_session_is_active()</code> may
                 be used to determine whether the session identified by
                 the specified session identifier is currently active
                 (i.e. currently in the foreground and available for
@@ -42,7 +42,7 @@
                 returned. This function is a more generic version of
                 <code class="function">sd_session_is_active()</code>. The returned
                 string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_uid()</code> may be
                 used to determine the user identifier of the Unix user the session
                 identified by the specified session identifier belongs
                 identifier belongs to. Note that not all sessions are
                 attached to a seat, this call will fail for them. The
                 returned string needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_service()</code>
                 may be used to determine the name of the service (as
                 passed during PAM session setup) that registered the
                 session identified by the specified session
                 identifier. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_type()</code> may
                 be used to determine the type of the session
                 identified by the specified session identifier. The
@@ -67,7 +67,7 @@
                 "<code class="literal">wayland</code>", "<code class="literal">tty</code>",
                 "<code class="literal">mir</code>" or "<code class="literal">unspecified</code>" and
                 needs to be freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_class()</code> may
                 be used to determine the class of the session
                 identified by the specified session identifier. The
                 "<code class="literal">lock-screen</code>", or
                 "<code class="literal">background</code>" and needs to be freed
                 with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                call after use.</p><p><code class="function">sd_session_get_desktop()</code> may
+                be used to determine the brand of the desktop running on
+                the session identified by the specified session identifier.
+                This field can be set freely by desktop environments and
+                does not follow any special formatting. However, desktops
+                are strongly recommended to use the same identifiers and
+                capitalization as for
+                <code class="varname">$XDG_CURRENT_DESKTOP</code>, as defined by
+                the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">Desktop
+                Entry
+                Specification</a>. The returned string needs to be
+                freed with the libc
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_display()</code>
                 may be used to determine the X11 display of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_host()</code>
                 may be used to determine the remote hostname of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_remote_user()</code>
                 may be used to determine the remote username of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use. Note that this value is rarely known
                 to the system, and even then should not be relied on.</p><p><code class="function">sd_session_get_tty()</code>
                 may be used to determine the TTY device of the
                 session identified by the specified session
                 identifier. The returned string needs to be
                 freed with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_session_get_vt()</code>
                 may be used to determine the VT number of the
                 session identified by the specified session
                 any of these functions is passed as
                 <code class="constant">NULL</code>, the operation is executed
                 for the session the calling process is a member of, if
-                there is any.</p></div><div class="refsect1"><a name="idm214167746672"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
+                there is any.</p></div><div class="refsect1"><a name="idm214189843936"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>If the test succeeds,
                 <code class="function">sd_session_is_active()</code> and
                 <code class="function">sd_session_is_remote()</code> return a
                 positive integer; if it fails, 0.  On success,
                 <code class="function">sd_session_get_remote_host()</code> and
                 <code class="function">sd_session_get_tty()</code> return 0 or
                 a positive integer. On failure, these calls return a
-                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214167737776"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
+                negative errno-style error code.</p></div><div class="refsect1"><a name="idm214189835040"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>The <code class="function">sd_session_is_active()</code>,
                 <code class="function">sd_session_get_state()</code>,
                 <code class="function">sd_session_get_uid()</code>,
                 <code class="function">sd_session_get_seat()</code>,
                 <code class="function">sd_session_get_tty()</code>
                 interfaces are available as a shared library, which can
                 be compiled and linked to with the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                file.</p></div><div class="refsect1"><a name="idm214167728448"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                file.</p></div><div class="refsect1"><a name="idm214189825472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>
index eb0bb356aa3996144ce7b50087049ccf36609a1d..36da3dac4d10706009718c102b02702f21d9783c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192661936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177844416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
                 used to determine the login state of a specific Unix
                 user identifier. The following states are currently
                 known: "<code class="literal">offline</code>" (user not logged in
@@ -36,7 +36,7 @@
                 in regards to additional state strings being
                 returned. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_uid_is_on_seat()</code> may be
                 used to determine whether a specific user is logged in
                 or active on a specific seat. Accepts a Unix user
@@ -59,7 +59,7 @@
                 <code class="constant">NULL</code> terminated string array of session identifiers in
                 <em class="parameter"><code>sessions</code></em> which needs to be
                 freed by the caller with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use, including all the strings
                 referenced. If the string array parameter is passed as
                 <code class="constant">NULL</code>, the array will not be filled in, but the return
@@ -77,7 +77,7 @@
                 returns the name of the "primary" session of a user.
                 If the user has graphical sessions, it will be the
                 oldest graphical session. Otherwise, it will be the
-                oldest open session.</p></div><div class="refsect1"><a name="idm214192636272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                oldest open session.</p></div><div class="refsect1"><a name="idm214181723120"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_uid_get_state()</code> returns 0 or a
                 positive integer. If the test succeeds,
                 <code class="function">sd_uid_is_on_seat()</code> returns a
                 <code class="function">sd_uid_get_display()</code> returns
                 a non-negative code on success. On failure,
                 these calls return a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214192631280"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
+                code.</p></div><div class="refsect1"><a name="idm214181718240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
                 shared library, and can be compiled and linked to
                 using the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                entry.</p></div><div class="refsect1"><a name="idm214192628592"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                entry.</p></div><div class="refsect1"><a name="idm214181715280"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
                 <code class="function">sd_uid_is_on_seat()</code>,
                 <code class="function">sd_uid_get_sessions()</code>,
                 and <code class="function">sd_uid_get_seats()</code> functions
                 were added in systemd-31.
 
                 <p><code class="function">sd_uid_get_display()</code> was
-                added in systemd-213.</p></div><div class="refsect1"><a name="idm214192624000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                added in systemd-213.</p></div><div class="refsect1"><a name="idm214181710688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a>
index eb0bb356aa3996144ce7b50087049ccf36609a1d..36da3dac4d10706009718c102b02702f21d9783c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192661936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177844416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
                 used to determine the login state of a specific Unix
                 user identifier. The following states are currently
                 known: "<code class="literal">offline</code>" (user not logged in
@@ -36,7 +36,7 @@
                 in regards to additional state strings being
                 returned. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_uid_is_on_seat()</code> may be
                 used to determine whether a specific user is logged in
                 or active on a specific seat. Accepts a Unix user
@@ -59,7 +59,7 @@
                 <code class="constant">NULL</code> terminated string array of session identifiers in
                 <em class="parameter"><code>sessions</code></em> which needs to be
                 freed by the caller with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use, including all the strings
                 referenced. If the string array parameter is passed as
                 <code class="constant">NULL</code>, the array will not be filled in, but the return
@@ -77,7 +77,7 @@
                 returns the name of the "primary" session of a user.
                 If the user has graphical sessions, it will be the
                 oldest graphical session. Otherwise, it will be the
-                oldest open session.</p></div><div class="refsect1"><a name="idm214192636272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                oldest open session.</p></div><div class="refsect1"><a name="idm214181723120"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_uid_get_state()</code> returns 0 or a
                 positive integer. If the test succeeds,
                 <code class="function">sd_uid_is_on_seat()</code> returns a
                 <code class="function">sd_uid_get_display()</code> returns
                 a non-negative code on success. On failure,
                 these calls return a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214192631280"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
+                code.</p></div><div class="refsect1"><a name="idm214181718240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
                 shared library, and can be compiled and linked to
                 using the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                entry.</p></div><div class="refsect1"><a name="idm214192628592"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                entry.</p></div><div class="refsect1"><a name="idm214181715280"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
                 <code class="function">sd_uid_is_on_seat()</code>,
                 <code class="function">sd_uid_get_sessions()</code>,
                 and <code class="function">sd_uid_get_seats()</code> functions
                 were added in systemd-31.
 
                 <p><code class="function">sd_uid_get_display()</code> was
-                added in systemd-213.</p></div><div class="refsect1"><a name="idm214192624000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                added in systemd-213.</p></div><div class="refsect1"><a name="idm214181710688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a>
index eb0bb356aa3996144ce7b50087049ccf36609a1d..36da3dac4d10706009718c102b02702f21d9783c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192661936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177844416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
                 used to determine the login state of a specific Unix
                 user identifier. The following states are currently
                 known: "<code class="literal">offline</code>" (user not logged in
@@ -36,7 +36,7 @@
                 in regards to additional state strings being
                 returned. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_uid_is_on_seat()</code> may be
                 used to determine whether a specific user is logged in
                 or active on a specific seat. Accepts a Unix user
@@ -59,7 +59,7 @@
                 <code class="constant">NULL</code> terminated string array of session identifiers in
                 <em class="parameter"><code>sessions</code></em> which needs to be
                 freed by the caller with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use, including all the strings
                 referenced. If the string array parameter is passed as
                 <code class="constant">NULL</code>, the array will not be filled in, but the return
@@ -77,7 +77,7 @@
                 returns the name of the "primary" session of a user.
                 If the user has graphical sessions, it will be the
                 oldest graphical session. Otherwise, it will be the
-                oldest open session.</p></div><div class="refsect1"><a name="idm214192636272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                oldest open session.</p></div><div class="refsect1"><a name="idm214181723120"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_uid_get_state()</code> returns 0 or a
                 positive integer. If the test succeeds,
                 <code class="function">sd_uid_is_on_seat()</code> returns a
                 <code class="function">sd_uid_get_display()</code> returns
                 a non-negative code on success. On failure,
                 these calls return a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214192631280"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
+                code.</p></div><div class="refsect1"><a name="idm214181718240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
                 shared library, and can be compiled and linked to
                 using the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                entry.</p></div><div class="refsect1"><a name="idm214192628592"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                entry.</p></div><div class="refsect1"><a name="idm214181715280"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
                 <code class="function">sd_uid_is_on_seat()</code>,
                 <code class="function">sd_uid_get_sessions()</code>,
                 and <code class="function">sd_uid_get_seats()</code> functions
                 were added in systemd-31.
 
                 <p><code class="function">sd_uid_get_display()</code> was
-                added in systemd-213.</p></div><div class="refsect1"><a name="idm214192624000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                added in systemd-213.</p></div><div class="refsect1"><a name="idm214181710688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a>
index 2f55772b964d4715dfbdbe090d24929c1b5346df..9850c62b4d160bf4fef542a20f7cd40c27adfe11 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_UID_GET_STATE" "3" "" "systemd 215" "sd_uid_get_state"
+.TH "SD_UID_GET_STATE" "3" "" "systemd 217" "sd_uid_get_state"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index eb0bb356aa3996144ce7b50087049ccf36609a1d..36da3dac4d10706009718c102b02702f21d9783c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192661936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177844416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
                 used to determine the login state of a specific Unix
                 user identifier. The following states are currently
                 known: "<code class="literal">offline</code>" (user not logged in
@@ -36,7 +36,7 @@
                 in regards to additional state strings being
                 returned. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_uid_is_on_seat()</code> may be
                 used to determine whether a specific user is logged in
                 or active on a specific seat. Accepts a Unix user
@@ -59,7 +59,7 @@
                 <code class="constant">NULL</code> terminated string array of session identifiers in
                 <em class="parameter"><code>sessions</code></em> which needs to be
                 freed by the caller with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use, including all the strings
                 referenced. If the string array parameter is passed as
                 <code class="constant">NULL</code>, the array will not be filled in, but the return
@@ -77,7 +77,7 @@
                 returns the name of the "primary" session of a user.
                 If the user has graphical sessions, it will be the
                 oldest graphical session. Otherwise, it will be the
-                oldest open session.</p></div><div class="refsect1"><a name="idm214192636272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                oldest open session.</p></div><div class="refsect1"><a name="idm214181723120"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_uid_get_state()</code> returns 0 or a
                 positive integer. If the test succeeds,
                 <code class="function">sd_uid_is_on_seat()</code> returns a
                 <code class="function">sd_uid_get_display()</code> returns
                 a non-negative code on success. On failure,
                 these calls return a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214192631280"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
+                code.</p></div><div class="refsect1"><a name="idm214181718240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
                 shared library, and can be compiled and linked to
                 using the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                entry.</p></div><div class="refsect1"><a name="idm214192628592"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                entry.</p></div><div class="refsect1"><a name="idm214181715280"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
                 <code class="function">sd_uid_is_on_seat()</code>,
                 <code class="function">sd_uid_get_sessions()</code>,
                 and <code class="function">sd_uid_get_seats()</code> functions
                 were added in systemd-31.
 
                 <p><code class="function">sd_uid_get_display()</code> was
-                added in systemd-213.</p></div><div class="refsect1"><a name="idm214192624000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                added in systemd-213.</p></div><div class="refsect1"><a name="idm214181710688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a>
index 1007a7917b3abc6a7d001473ae8ecde4ccce3399..e1b345c2779a1774bb94d72445ba43e2207a8c9f 100644 (file)
                 in regards to additional state strings being
                 returned. The returned string needs to be freed with
                 the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use.</para>
 
                 <para><function>sd_uid_is_on_seat()</function> may be
                 <constant>NULL</constant> terminated string array of session identifiers in
                 <parameter>sessions</parameter> which needs to be
                 freed by the caller with the libc
-                <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call after use, including all the strings
                 referenced. If the string array parameter is passed as
                 <constant>NULL</constant>, the array will not be filled in, but the return
                 <para>Functions described here are available as a
                 shared library, and can be compiled and linked to
                 using the
-                <constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 entry.</para>
         </refsect1>
 
index eb0bb356aa3996144ce7b50087049ccf36609a1d..36da3dac4d10706009718c102b02702f21d9783c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214192661936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_uid_get_state"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_uid_get_state, sd_uid_is_on_seat, sd_uid_get_sessions, sd_uid_get_seats, sd_uid_get_display — Determine login state of a specific Unix user ID</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_state</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">state</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_is_on_seat</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_sessions</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">sessions</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_seats</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">require_active</var>, </td></tr><tr><td> </td><td>char ***<var class="pdparam">seats</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_uid_get_display</b>(</code></td><td>uid_t <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>char **<var class="pdparam">session</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214177844416"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_uid_get_state()</code> may be
                 used to determine the login state of a specific Unix
                 user identifier. The following states are currently
                 known: "<code class="literal">offline</code>" (user not logged in
@@ -36,7 +36,7 @@
                 in regards to additional state strings being
                 returned. The returned string needs to be freed with
                 the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use.</p><p><code class="function">sd_uid_is_on_seat()</code> may be
                 used to determine whether a specific user is logged in
                 or active on a specific seat. Accepts a Unix user
@@ -59,7 +59,7 @@
                 <code class="constant">NULL</code> terminated string array of session identifiers in
                 <em class="parameter"><code>sessions</code></em> which needs to be
                 freed by the caller with the libc
-                <a href="free.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/free.3.html"><span class="citerefentry"><span class="refentrytitle">free</span>(3)</span></a>
                 call after use, including all the strings
                 referenced. If the string array parameter is passed as
                 <code class="constant">NULL</code>, the array will not be filled in, but the return
@@ -77,7 +77,7 @@
                 returns the name of the "primary" session of a user.
                 If the user has graphical sessions, it will be the
                 oldest graphical session. Otherwise, it will be the
-                oldest open session.</p></div><div class="refsect1"><a name="idm214192636272"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
+                oldest open session.</p></div><div class="refsect1"><a name="idm214181723120"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On success,
                 <code class="function">sd_uid_get_state()</code> returns 0 or a
                 positive integer. If the test succeeds,
                 <code class="function">sd_uid_is_on_seat()</code> returns a
                 <code class="function">sd_uid_get_display()</code> returns
                 a non-negative code on success. On failure,
                 these calls return a negative errno-style error
-                code.</p></div><div class="refsect1"><a name="idm214192631280"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
+                code.</p></div><div class="refsect1"><a name="idm214181718240"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>Functions described here are available as a
                 shared library, and can be compiled and linked to
                 using the
-                <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
-                entry.</p></div><div class="refsect1"><a name="idm214192628592"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
+                <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+                entry.</p></div><div class="refsect1"><a name="idm214181715280"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><code class="function">sd_uid_get_state()</code>,
                 <code class="function">sd_uid_is_on_seat()</code>,
                 <code class="function">sd_uid_get_sessions()</code>,
                 and <code class="function">sd_uid_get_seats()</code> functions
                 were added in systemd-31.
 
                 <p><code class="function">sd_uid_get_display()</code> was
-                added in systemd-213.</p></div><div class="refsect1"><a name="idm214192624000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                added in systemd-213.</p></div><div class="refsect1"><a name="idm214181710688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
                         <a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a>
index b6cfa63a30c20b9a4e6d5cd04153fe8ac0c18b53..bff296a2ffa29b301ac0e90f7de22ae400749295 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SD_WATCHDOG_ENABLED" "3" "" "systemd 215" "sd_watchdog_enabled"
+.TH "SD_WATCHDOG_ENABLED" "3" "" "systemd 217" "sd_watchdog_enabled"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -36,6 +36,15 @@ sd_watchdog_enabled \- Check whether the service manager expects watchdog keep\-
 may be called by a service to detect whether the service manager expects regular keep\-alive watchdog notification events from it, and the timeout after which the manager will act on the service if it did not get such a notification\&.
 .PP
 If the
+\fI$WATCHDOG_USEC\fR
+environment variable is set, and the
+\fI$WATCHDOG_PID\fR
+variable is unset or set to the PID of the current process, the service manager expects notifications from this process\&. The manager will usually terminate a service when it does not get a notification message within the specified time after startup and after each previous message\&. It is recommended that a daemon sends a keep\-alive notification message to the service manager every half of the time returned here\&. Notification messages may be sent with
+\fBsd_notify\fR(3)
+with a message string of
+"WATCHDOG=1"\&.
+.PP
+If the
 \fIunset_environment\fR
 parameter is non\-zero,
 \fBsd_watchdog_enabled()\fR
@@ -43,18 +52,15 @@ will unset the
 \fI$WATCHDOG_USEC\fR
 and
 \fI$WATCHDOG_PID\fR
-environment variables before returning (regardless of whether the function call itself succeeded or not)\&. Further calls to
+environment variables before returning (regardless of whether the function call itself succeeded or not)\&. Those variables are no longer inherited by child processes\&. Further calls to
 \fBsd_watchdog_enabled()\fR
-will then return with zero, but the variable is no longer inherited by child processes\&.
+will also return with zero\&.
 .PP
 If the
 \fIusec\fR
 parameter is non\-NULL,
 \fBsd_watchdog_enabled()\fR
-will return the timeout in \(mcs for the watchdog logic\&. The service manager will usually terminate a service when it did not get a notification message within the specified time after startup and after each previous message\&. It is recommended that a daemon sends a keep\-alive notification message to the service manager every half of the time returned here\&. Notification messages may be sent with
-\fBsd_notify\fR(3)
-with a message string of
-"WATCHDOG=1"\&.
+will write the timeout in \(mcs for the watchdog logic to it\&.
 .PP
 To enable service supervision with the watchdog logic, use
 \fIWatchdogSec=\fR
@@ -90,6 +96,16 @@ Set by the system manager for supervised process for which watchdog support is e
 .RS 4
 Set by the system manager for supervised process for which watchdog support is enabled, and contains the watchdog timeout in \(mcs See above for details\&.
 .RE
+.SH "HISTORY"
+.PP
+The watchdog functionality and the
+\fI$WATCHDOG_USEC\fR
+variable were added in systemd\-41\&.
+.PP
+\fBsd_watchdog_enabled()\fR
+function was added in systemd\-209\&. Since that version the
+\fI$WATCHDOG_PID\fR
+variable is also set\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
index 53efa4ce4c44aabeb0df618aaddf64f8d25120fe..81fd22d59450ceb7c1e6401d2c3ce6b22821e925 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sd_watchdog_enabled"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_watchdog_enabled — Check whether the service manager expects watchdog keep-alive notifications from a service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_watchdog_enabled</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214185911456"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_watchdog_enabled()</code> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sd_watchdog_enabled"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_watchdog_enabled — Check whether the service manager expects watchdog keep-alive notifications from a service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_watchdog_enabled</b>(</code></td><td>int <var class="pdparam">unset_environment</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm214188989744"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="function">sd_watchdog_enabled()</code> may
                 be called by a service to detect whether the service
                 manager expects regular keep-alive watchdog
                 notification events from it, and the timeout after
                 which the manager will act on the service if it did
-                not get such a notification.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
+                not get such a notification.</p><p>If the <code class="varname">$WATCHDOG_USEC</code>
+                environment variable is set, and the
+                <code class="varname">$WATCHDOG_PID</code> variable is unset or
+                set to the PID of the current process, the service
+                manager expects notifications from this process. The
+                manager will usually terminate a service when it does
+                not get a notification message within the specified
+                time after startup and after each previous message. It
+                is recommended that a daemon sends a keep-alive
+                notification message to the service manager every half
+                of the time returned here. Notification messages may
+                be sent with
+                <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>
+                with a message string of
+                "<code class="literal">WATCHDOG=1</code>".</p><p>If the <em class="parameter"><code>unset_environment</code></em>
                 parameter is non-zero,
                 <code class="function">sd_watchdog_enabled()</code> will unset
                 the <code class="varname">$WATCHDOG_USEC</code> and
                 <code class="varname">$WATCHDOG_PID</code> environment variables
-                before returning (regardless of whether the function call
-                itself succeeded or not). Further calls to
-                <code class="function">sd_watchdog_enabled()</code> will then
-                return with zero, but the variable is no longer
-                inherited by child processes.</p><p>If the <em class="parameter"><code>usec</code></em> parameter is
+                before returning (regardless of whether the function
+                call itself succeeded or not). Those variables are no
+                longer inherited by child processes. Further calls to
+                <code class="function">sd_watchdog_enabled()</code> will also
+                return with zero.</p><p>If the <em class="parameter"><code>usec</code></em> parameter is
                 non-NULL, <code class="function">sd_watchdog_enabled()</code>
-                will return the timeout in µs for the watchdog
-                logic. The service manager will usually terminate a
-                service when it did not get a notification message
-                within the specified time after startup and after each
-                previous message. It is recommended that a daemon
-                sends a keep-alive notification message to the service
-                manager every half of the time returned
-                here. Notification messages may be sent with
-                <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>
-                with a message string of
-                "<code class="literal">WATCHDOG=1</code>".</p><p>To enable service supervision with the watchdog
+                will write the timeout in µs for the watchdog
+                logic to it.</p><p>To enable service supervision with the watchdog
                 logic, use <code class="varname">WatchdogSec=</code> in service
                 files. See
                 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>
-                for details.</p></div><div class="refsect1"><a name="idm214185975520"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
+                for details.</p></div><div class="refsect1"><a name="idm214192878384"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value">¶</a></h2><p>On failure, this call returns a negative
                 errno-style error code. If the service manager expects
                 watchdog keep-alive notification messages to be sent,
                 &gt; 0 is returned, otherwise 0 is returned. Only if
                 the return value is &gt; 0, the
                 <em class="parameter"><code>usec</code></em> parameter is valid after
-                the call.</p></div><div class="refsect1"><a name="idm214185902512"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
+                the call.</p></div><div class="refsect1"><a name="idm214192876096"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
   library, which can be compiled and linked to with the
-  <code class="constant">libsystemd</code> <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
+  <code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
   file.</p><p>Internally, this functions parses the
                 <code class="varname">$WATCHDOG_PID</code> and
                 <code class="varname">$WATCHDOG_USEC</code> environment
@@ -65,7 +70,7 @@
                 <code class="varname">$WATCHDOG_PID</code> does containe the PID
                 of the current process, under the assumption that in
                 that case, the variables were set for a different
-                process further up the process tree.</p></div><div class="refsect1"><a name="idm214185898800"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$WATCHDOG_PID"><span class="term"><code class="varname">$WATCHDOG_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24WATCHDOG_PID">¶</a></dt><dd><p>Set by the system
+                process further up the process tree.</p></div><div class="refsect1"><a name="idm214192872384"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$WATCHDOG_PID"><span class="term"><code class="varname">$WATCHDOG_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24WATCHDOG_PID">¶</a></dt><dd><p>Set by the system
                                 manager for supervised process for
                                 which watchdog support is enabled, and
                                 contains the PID of that process. See
                                 which watchdog support is enabled, and
                                 contains the watchdog timeout in µs
                                 See above for
-                                details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186040224"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192867120"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>The watchdog functionality and the
+                <code class="varname">$WATCHDOG_USEC</code> variable were
+                added in systemd-41.</p><p><code class="function">sd_watchdog_enabled()</code>
+                function was added in systemd-209. Since that version
+                the <code class="varname">$WATCHDOG_PID</code> variable is also
+                set.</p></div><div class="refsect1"><a name="idm214192864000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
index 41640276405080abeb041d31cbb13ca536ee06c9..462d7c66176c6a26775eb58416df1c7156ae0152 100644 (file)
                 which the manager will act on the service if it did
                 not get such a notification.</para>
 
+                <para>If the <varname>$WATCHDOG_USEC</varname>
+                environment variable is set, and the
+                <varname>$WATCHDOG_PID</varname> variable is unset or
+                set to the PID of the current process, the service
+                manager expects notifications from this process. The
+                manager will usually terminate a service when it does
+                not get a notification message within the specified
+                time after startup and after each previous message. It
+                is recommended that a daemon sends a keep-alive
+                notification message to the service manager every half
+                of the time returned here. Notification messages may
+                be sent with
+                <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                with a message string of
+                <literal>WATCHDOG=1</literal>.</para>
+
                 <para>If the <parameter>unset_environment</parameter>
                 parameter is non-zero,
                 <function>sd_watchdog_enabled()</function> will unset
                 the <varname>$WATCHDOG_USEC</varname> and
                 <varname>$WATCHDOG_PID</varname> environment variables
-                before returning (regardless of whether the function call
-                itself succeeded or not). Further calls to
-                <function>sd_watchdog_enabled()</function> will then
-                return with zero, but the variable is no longer
-                inherited by child processes.</para>
+                before returning (regardless of whether the function
+                call itself succeeded or not). Those variables are no
+                longer inherited by child processes. Further calls to
+                <function>sd_watchdog_enabled()</function> will also
+                return with zero.</para>
 
                 <para>If the <parameter>usec</parameter> parameter is
                 non-NULL, <function>sd_watchdog_enabled()</function>
-                will return the timeout in µs for the watchdog
-                logic. The service manager will usually terminate a
-                service when it did not get a notification message
-                within the specified time after startup and after each
-                previous message. It is recommended that a daemon
-                sends a keep-alive notification message to the service
-                manager every half of the time returned
-                here. Notification messages may be sent with
-                <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                with a message string of
-                <literal>WATCHDOG=1</literal>.</para>
+                will write the timeout in µs for the watchdog
+                logic to it.</para>
 
                 <para>To enable service supervision with the watchdog
                 logic, use <varname>WatchdogSec=</varname> in service
                 of the current process, under the assumption that in
                 that case, the variables were set for a different
                 process further up the process tree.</para>
-
         </refsect1>
 
         <refsect1>
                 </variablelist>
         </refsect1>
 
+        <refsect1>
+                <title>History</title>
+
+                <para>The watchdog functionality and the
+                <varname>$WATCHDOG_USEC</varname> variable were
+                added in systemd-41.</para>
+
+                <para><function>sd_watchdog_enabled()</function>
+                function was added in systemd-209. Since that version
+                the <varname>$WATCHDOG_PID</varname> variable is also
+                set.</para>
+        </refsect1>
+
         <refsect1>
                 <title>See Also</title>
                 <para>
index 6064a884dcb7ac50fb9912dcff6541b9e1ce093e..11541bcc08747cb8d77875c81a4e03dd866924e7 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SHUTDOWN" "8" "" "systemd 215" "shutdown"
+.TH "SHUTDOWN" "8" "" "systemd 217" "shutdown"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index bee7b21e66b7ce29fbe00e3c2cd6a0bb7cd58e57..e9bb0f04b4c457455bd544d14f73361ddb54d573 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="shutdown"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>shutdown — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">shutdown [OPTIONS...]  [TIME]  [WALL...]</code> </p></div></div><div class="refsect1"><a name="idm214194988640"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>shutdown</strong></span> may be used to halt,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="shutdown"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>shutdown — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">shutdown [OPTIONS...]  [TIME]  [WALL...]</code> </p></div></div><div class="refsect1"><a name="idm214188355232"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>shutdown</strong></span> may be used to halt,
                 power-off or reboot the machine.</p><p>The first argument may be a time string (which
                 is usually "<code class="literal">now</code>"). Optionally, this
                 may be followed by a wall message to be sent to all
@@ -37,7 +37,7 @@
                 before the system goes down the
                 <code class="filename">/run/nologin</code> file is created to
                 ensure that further logins shall not be
-                allowed.</p></div><div class="refsect1"><a name="idm214195054320"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+                allowed.</p></div><div class="refsect1"><a name="idm214188346272"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p>Halt the machine.</p></dd><dt id="-P"><span class="term"><code class="option">-P</code>, </span><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#-P">¶</a></dt><dd><p>Power-off the
                                 machine (the default).</p></dd><dt id="-r"><span class="term"><code class="option">-r</code>, </span><span class="term"><code class="option">--reboot</code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p>Reboot the
                                 machine.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Equivalent to
                                 <span class="command"><strong>shutdown</strong></span> with a
                                 time argument that is not
                                 "<code class="literal">+0</code>" or
-                                "<code class="literal">now</code>".</p></dd></dl></div></div><div class="refsect1"><a name="idm214195111840"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214195110656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                "<code class="literal">now</code>".</p></dd></dl></div></div><div class="refsect1"><a name="idm214192282544"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214192274288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index 737258514f45bf036b3a1a01c314e44d5a0308f0..6a4c1844a47ad819ca709d3e428c68c4fe87017c 100644 (file)
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 9b1ae9acbeb85e7c2eaba0306f8cb19a022266c3..da04529b7653b9a318fd3ff64e3f9a490dfc5607 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSCTL\&.D" "5" "" "systemd 215" "sysctl.d"
+.TH "SYSCTL\&.D" "5" "" "systemd 217" "sysctl.d"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -114,13 +114,13 @@ kernel\&.domainname=example\&.com
 .PP
 \fBExample\ \&2.\ \&Disable packet filter on bridged packets (method one)\fR
 .PP
-/etc/udev/rules\&.d/99\-bridge\&.conf:
+/etc/udev/rules\&.d/99\-bridge\&.rules:
 .sp
 .if n \{\
 .RS 4
 .\}
 .nf
-ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd\-sysctl \-\-prefix=/proc/sys/net/bridge"
+ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd\-sysctl \-\-prefix=/net/bridge"
 .fi
 .if n \{\
 .RE
@@ -173,4 +173,5 @@ net\&.bridge\&.bridge\-nf\-call\-arptables = 0
 \fBsystemd-sysctl.service\fR(8),
 \fBsystemd-delta\fR(1),
 \fBsysctl\fR(8),
-\fBsysctl.conf\fR(5)\fBmodprobe\fR(8)
+\fBsysctl.conf\fR(5),
+\fBmodprobe\fR(8)
index 52df8ce0dc471604577e0393920a08cc71f12b15..b28e0d0a719bed2024806ca92dab6cae8624e62f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sysctl.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sysctl.d — Configure kernel parameters at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/sysctl.d/*.conf</code></p><p><code class="filename">/run/sysctl.d/*.conf</code></p><p><code class="filename">/usr/lib/sysctl.d/*.conf</code></p></div><div class="refsect1"><a name="idm214178788384"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>At boot,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sysctl.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sysctl.d — Configure kernel parameters at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/sysctl.d/*.conf</code></p><p><code class="filename">/run/sysctl.d/*.conf</code></p><p><code class="filename">/usr/lib/sysctl.d/*.conf</code></p></div><div class="refsect1"><a name="idm214180570224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>At boot,
                 <a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a>
                 reads configuration files from the above directories
                 to configure
                 <a href="sysctl.html"><span class="citerefentry"><span class="refentrytitle">sysctl</span>(8)</span></a>
-                kernel parameters.</p></div><div class="refsect1"><a name="idm214180384960"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>The configuration files contain a list of
+                kernel parameters.</p></div><div class="refsect1"><a name="idm214180567216"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>The configuration files contain a list of
                 variable assignments, separated by newlines. Empty
                 lines and lines whose first non-whitespace character
                 is "<code class="literal">#</code>" or "<code class="literal">;</code>" are
                 less efficient option is to add the module to
                 <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, causing it to be loaded statically
                 before sysctl settings are applied (see
-                example below).</p></div><div class="refsect1"><a name="idm214180508656"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214180507984"></a><p class="title"><b>Example 1. Set kernel YP domain name</b></p><div class="example-contents"><p><code class="filename">/etc/sysctl.d/domain-name.conf</code>:
-                        </p><pre class="programlisting">kernel.domainname=example.com</pre></div></div><br class="example-break"><div class="example"><a name="idm214180505408"></a><p class="title"><b>Example 2. Disable packet filter on bridged packets (method one)</b></p><div class="example-contents"><p><code class="filename">/etc/udev/rules.d/99-bridge.conf</code>:
-                        </p><pre class="programlisting">ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge"
+                example below).</p></div><div class="refsect1"><a name="idm214184487664"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214184486992"></a><p class="title"><b>Example 1. Set kernel YP domain name</b></p><div class="example-contents"><p><code class="filename">/etc/sysctl.d/domain-name.conf</code>:
+                        </p><pre class="programlisting">kernel.domainname=example.com</pre></div></div><br class="example-break"><div class="example"><a name="idm214184484416"></a><p class="title"><b>Example 2. Disable packet filter on bridged packets (method one)</b></p><div class="example-contents"><p><code class="filename">/etc/udev/rules.d/99-bridge.rules</code>:
+                        </p><pre class="programlisting">ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/bridge"
 </pre><p><code class="filename">/etc/sysctl.d/bridge.conf</code>:
                         </p><pre class="programlisting">net.bridge.bridge-nf-call-ip6tables = 0
 net.bridge.bridge-nf-call-iptables = 0
 net.bridge.bridge-nf-call-arptables = 0
-</pre></div></div><br class="example-break"><div class="example"><a name="idm214180493760"></a><p class="title"><b>Example 3. Disable packet filter on bridged packets (method two)</b></p><div class="example-contents"><p><code class="filename">/etc/modules-load.d/bridge.conf</code>:
+</pre></div></div><br class="example-break"><div class="example"><a name="idm214184480064"></a><p class="title"><b>Example 3. Disable packet filter on bridged packets (method two)</b></p><div class="example-contents"><p><code class="filename">/etc/modules-load.d/bridge.conf</code>:
                         </p><pre class="programlisting">bridge</pre><p><code class="filename">/etc/sysctl.d/bridge.conf</code>:
                         </p><pre class="programlisting">net.bridge.bridge-nf-call-ip6tables = 0
 net.bridge.bridge-nf-call-iptables = 0
 net.bridge.bridge-nf-call-arptables = 0
-</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214180489376"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214184475680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a>,
                         <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>,
                         <a href="sysctl.html"><span class="citerefentry"><span class="refentrytitle">sysctl</span>(8)</span></a>,
-                        <a href="sysctl.conf.html"><span class="citerefentry"><span class="refentrytitle">sysctl.conf</span>(5)</span></a>
+                        <a href="sysctl.conf.html"><span class="citerefentry"><span class="refentrytitle">sysctl.conf</span>(5)</span></a>,
                         <a href="modprobe.html"><span class="citerefentry"><span class="refentrytitle">modprobe</span>(8)</span></a>
                 </p></div></div></body></html>
index dd73f922363081ab76f68570d1557782e4a5d113..7b51b68cc665c71137b143300c4068cac16f9060 100644 (file)
 
                 <example>
                         <title>Disable packet filter on bridged packets (method one)</title>
-                        <para><filename>/etc/udev/rules.d/99-bridge.conf</filename>:
+                        <para><filename>/etc/udev/rules.d/99-bridge.rules</filename>:
                         </para>
 
-                        <programlisting>ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge"
+                        <programlisting>ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/bridge"
 </programlisting>
 
                         <para><filename>/etc/sysctl.d/bridge.conf</filename>:
@@ -194,7 +194,7 @@ net.bridge.bridge-nf-call-arptables = 0
                         <citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sysctl.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>sysctl.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
index 504e36d2098c47b994b77c3e46b96daadb560370..961e45db953a095d4613dda0d429296df34ad5ea 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMCTL" "1" "" "systemd 215" "systemctl"
+.TH "SYSTEMCTL" "1" "" "systemd 217" "systemctl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -28,8 +28,10 @@ systemctl \- Control the systemd system and service manager
 .PP
 \fBsystemctl\fR
 may be used to introspect and control the state of the
+"systemd"
+system and service manager\&. Please refer to
 \fBsystemd\fR(1)
-system and service manager\&.
+for an introduction into the basic concepts and functionality this tool manages\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
@@ -452,9 +454,7 @@ systemd unit file\&.
 .sp
 This command should not be confused with the
 \fBdaemon\-reload\fR
-or
-\fBload\fR
-commands\&.
+command\&.
 .RE
 .PP
 \fBrestart \fR\fB\fIPATTERN\fR\fR\fB\&.\&.\&.\fR
@@ -627,6 +627,10 @@ Depending on whether
 \fB\-\-runtime\fR, or
 \fB\-\-global\fR
 is specified, this enables the unit for the system, for the calling user only, for only this boot of the system, or for all future logins of all users, or only this boot\&. Note that in the last case, no systemd daemon configuration is reloaded\&.
+.sp
+Using
+\fBenable\fR
+on masked units results in an error\&.
 .RE
 .PP
 \fBdisable \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
@@ -769,7 +773,7 @@ to control whether units shall be enabled and disabled, or only enabled, or only
 .RS 4
 Mask one or more unit files, as specified on the command line\&. This will link these units to
 /dev/null, making it impossible to start them\&. This is a stronger version of
-\fBdisable\fR, since it prohibits all kinds of activation of the unit, including manual activation\&. Use this option with care\&. This honors the
+\fBdisable\fR, since it prohibits all kinds of activation of the unit, including enablement and manual activation\&. Use this option with care\&. This honors the
 \fB\-\-runtime\fR
 option to only mask temporarily until the next reboot of the system\&.
 .RE
@@ -780,6 +784,26 @@ Unmask one or more unit files, as specified on the command line\&. This will und
 \fBmask\fR\&.
 .RE
 .PP
+\fBadd\-wants \fR\fB\fITARGET\fR\fR\fB \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR, \fBadd\-requires \fR\fB\fITARGET\fR\fR\fB \fR\fB\fINAME\fR\fR\fB\&.\&.\&.\fR
+.RS 4
+Adds
+"Wants="
+resp\&.
+"Requires="
+dependency to the specified
+\fITARGET\fR
+for one or more units\&.
+.sp
+This command honors
+\fB\-\-system\fR,
+\fB\-\-user\fR,
+\fB\-\-runtime\fR
+and
+\fB\-\-global\fR
+in a similar way as
+\fBenable\fR\&.
+.RE
+.PP
 \fBlink \fR\fB\fIFILENAME\fR\fR\fB\&.\&.\&.\fR
 .RS 4
 Link a unit file that is not in the unit file search paths into the unit file search path\&. This requires an absolute path to a unit file\&. The effect of this can be undone with
@@ -865,13 +889,11 @@ Import all, one or more environment variables set on the client into the systemd
 .PP
 \fBdaemon\-reload\fR
 .RS 4
-Reload systemd manager configuration\&. This will reload all unit files and recreate the entire dependency tree\&. While the daemon is being reloaded, all sockets systemd listens on on behalf of user configuration will stay accessible\&.
+Reload systemd manager configuration\&. This will reload all unit files and recreate the entire dependency tree\&. While the daemon is being reloaded, all sockets systemd listens on behalf of user configuration will stay accessible\&.
 .sp
 This command should not be confused with the
-\fBload\fR
-or
 \fBreload\fR
-commands\&.
+command\&.
 .RE
 .PP
 \fBdaemon\-reexec\fR
@@ -883,9 +905,66 @@ Reexecute the systemd manager\&. This will serialize the manager state, reexecut
 .PP
 \fBis\-system\-running\fR
 .RS 4
-Checks whether the system is running\&. This returns success when the system is fully up and running, meaning not in startup, shutdown or maintainance mode\&. Failure is returned otherwise\&. In addition, the current state is printed in a short string to standard output\&. Use
+Checks whether the system is operational\&. This returns success when the system is fully up and running, meaning not in startup, shutdown or maintenance mode\&. Failure is returned otherwise\&. In addition, the current state is printed in a short string to standard output, see table below\&. Use
 \fB\-\-quiet\fR
-to suppress output of this state string\&.
+to suppress this output\&.
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.B Table\ \&2.\ \&Manager Operational States
+.TS
+allbox tab(:);
+lB lB.
+T{
+Name
+T}:T{
+Description
+T}
+.T&
+l l
+l l
+l l
+l l
+l l
+l l.
+T{
+\fIinitializing\fR
+T}:T{
+Early bootup, before
+basic\&.target
+is reached or the
+\fImaintenance\fR
+state entered\&.
+T}
+T{
+\fIstarting\fR
+T}:T{
+Late bootup, before the job queue becomes idle for the first time, or one of the rescue targets are reached\&.
+T}
+T{
+\fIrunning\fR
+T}:T{
+The system is fully operational\&.
+T}
+T{
+\fIdegraded\fR
+T}:T{
+The system is operational but one or more units failed\&.
+T}
+T{
+\fImaintenance\fR
+T}:T{
+The rescue or emergency target is active\&.
+T}
+T{
+\fIstopping\fR
+T}:T{
+The manager is shutting down\&.
+T}
+.TE
+.sp 1
 .RE
 .PP
 \fBdefault\fR
index 5780ae2565e2636556057806cbbb975e7f8787f5..448a1de87f31cfd2f9c0eae89892ad6a1d415157 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemctl — Control the systemd system and service manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemctl</code>  [OPTIONS...]  COMMAND  [NAME...]</p></div></div><div class="refsect1"><a name="idm214173287904"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemctl</strong></span> may be used to
-    introspect and control the state of the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemctl — Control the systemd system and service manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemctl</code>  [OPTIONS...]  COMMAND  [NAME...]</p></div></div><div class="refsect1"><a name="idm214185151824"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemctl</strong></span> may be used to introspect and
+    control the state of the "<code class="literal">systemd</code>" system and
+    service manager. Please refer to
     <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-    system and service manager.</p></div><div class="refsect1"><a name="idm214173285312"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--type=</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>The argument should be a comma-separated list of unit
+    for an introduction into the basic concepts and functionality this
+    tool manages.</p></div><div class="refsect1"><a name="idm214185148480"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--type=</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>The argument should be a comma-separated list of unit
           types such as <code class="option">service</code> and
           <code class="option">socket</code>.
           </p><p>If one of the arguments is a unit type, when listing
       <span class="command"><strong>machinectl -H
       <em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p><a name="machine-text"></a>Execute operation on a local container. Specify a
       container name to connect to.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168669712"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood:</p><div class="refsect2"><a name="idm214168668688"></a><h3 id="Unit Commands">Unit Commands<a class="headerlink" title="Permalink to this headline" href="#Unit%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-units PATTERN..."><span class="term"><span class="command"><strong>list-units [<span class="optional"><em class="replaceable"><code>PATTERN</code></em>...</span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-units%20PATTERN...">¶</a></dt><dd><p>List known units (subject to limitations specified
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183987104"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood:</p><div class="refsect2"><a name="idm214183986080"></a><h3 id="Unit Commands">Unit Commands<a class="headerlink" title="Permalink to this headline" href="#Unit%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-units PATTERN..."><span class="term"><span class="command"><strong>list-units [<span class="optional"><em class="replaceable"><code>PATTERN</code></em>...</span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-units%20PATTERN...">¶</a></dt><dd><p>List known units (subject to limitations specified
             with <code class="option">-t</code>). If one or more
             <em class="replaceable"><code>PATTERN</code></em>s are specified, only
             units matching one of them are shown.</p><p>This is the default command.</p></dd><dt id="list-sockets PATTERN..."><span class="term"><span class="command"><strong>list-sockets [<span class="optional"><em class="replaceable"><code>PATTERN</code></em>...</span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-sockets%20PATTERN...">¶</a></dt><dd><p>List socket units ordered by listening address.
@@ -264,8 +266,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             <code class="filename">httpd.conf</code> in the web server, not the
             <code class="filename">apache.service</code> systemd unit
             file.</p><p>This command should not be confused with the
-            <span class="command"><strong>daemon-reload</strong></span> or <span class="command"><strong>load</strong></span>
-            commands.</p></dd><dt id="restart PATTERN..."><span class="term"><span class="command"><strong>restart <em class="replaceable"><code>PATTERN</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#restart%20PATTERN...">¶</a></dt><dd><p>Restart one or more units specified on the command
+            <span class="command"><strong>daemon-reload</strong></span> command.</p></dd><dt id="restart PATTERN..."><span class="term"><span class="command"><strong>restart <em class="replaceable"><code>PATTERN</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#restart%20PATTERN...">¶</a></dt><dd><p>Restart one or more units specified on the command
             line. If the units are not running yet, they will be
             started.</p></dd><dt id="try-restart PATTERN..."><span class="term"><span class="command"><strong>try-restart <em class="replaceable"><code>PATTERN</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#try-restart%20PATTERN...">¶</a></dt><dd><p>Restart one or more units specified on the command
             line if the units are running. This does nothing if units are not
@@ -357,7 +358,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             <code class="filename">default.target</code> is implied. Target units
             are recursively expanded.  When <code class="option">--all</code> is
             passed, all other units are recursively expanded as
-            well.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168583040"></a><h3 id="Unit File Commands">Unit File Commands<a class="headerlink" title="Permalink to this headline" href="#Unit%20File%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-unit-files PATTERN..."><span class="term"><span class="command"><strong>list-unit-files [<span class="optional"><em class="replaceable"><code>PATTERN...</code></em></span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-unit-files%20PATTERN...">¶</a></dt><dd><p>List installed unit files. If one or more
+            well.</p></dd></dl></div></div><div class="refsect2"><a name="idm214183901456"></a><h3 id="Unit File Commands">Unit File Commands<a class="headerlink" title="Permalink to this headline" href="#Unit%20File%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-unit-files PATTERN..."><span class="term"><span class="command"><strong>list-unit-files [<span class="optional"><em class="replaceable"><code>PATTERN...</code></em></span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-unit-files%20PATTERN...">¶</a></dt><dd><p>List installed unit files. If one or more
             <em class="replaceable"><code>PATTERN</code></em>s are specified, only
             units whose filename (just the last component of the path)
             matches one of them are shown.</p></dd><dt id="enable NAME..."><span class="term"><span class="command"><strong>enable <em class="replaceable"><code>NAME</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#enable%20NAME...">¶</a></dt><dd><p>Enable one or more unit files or unit file instances,
@@ -400,7 +401,8 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             for the system, for the calling user only, for only this boot of
             the system, or for all future logins of all users, or only this
             boot.  Note that in the last case, no systemd daemon
-            configuration is reloaded.</p></dd><dt id="disable NAME..."><span class="term"><span class="command"><strong>disable <em class="replaceable"><code>NAME</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#disable%20NAME...">¶</a></dt><dd><p>Disables one or more units. This removes all symlinks
+            configuration is reloaded.</p><p>Using <span class="command"><strong>enable</strong></span> on masked units
+            results in an error.</p></dd><dt id="disable NAME..."><span class="term"><span class="command"><strong>disable <em class="replaceable"><code>NAME</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#disable%20NAME...">¶</a></dt><dd><p>Disables one or more units. This removes all symlinks
             to the specified unit files from the unit configuration
             directory, and hence undoes the changes made by
             <span class="command"><strong>enable</strong></span>. Note however that this removes
@@ -421,7 +423,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             exit code of 0 if at least one is enabled, non-zero
             otherwise. Prints the current enable status (see table).
             To suppress this output, use <code class="option">--quiet</code>.
-            </p><div class="table"><a name="idm214168555792"></a><p class="title"><b>Table 1. 
+            </p><div class="table"><a name="idm214183873200"></a><p class="title"><b>Table 1. 
                 <span class="command">is-enabled</span> output
               </b></p><div class="table-contents"><table summary="
                 is-enabled output
@@ -449,12 +451,20 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             <code class="filename">/dev/null</code>, making it impossible to
             start them. This is a stronger version of
             <span class="command"><strong>disable</strong></span>, since it prohibits all kinds of
-            activation of the unit, including manual activation. Use
-            this option with care. This honors the
+            activation of the unit, including enablement and manual
+            activation. Use this option with care. This honors the
             <code class="option">--runtime</code> option to only mask temporarily
             until the next reboot of the system.</p></dd><dt id="unmask NAME..."><span class="term"><span class="command"><strong>unmask <em class="replaceable"><code>NAME</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#unmask%20NAME...">¶</a></dt><dd><p>Unmask one or more unit files, as specified on the
             command line. This will undo the effect of
-            <span class="command"><strong>mask</strong></span>.</p></dd><dt id="link FILENAME..."><span class="term"><span class="command"><strong>link <em class="replaceable"><code>FILENAME</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#link%20FILENAME...">¶</a></dt><dd><p>Link a unit file that is not in the unit file search
+            <span class="command"><strong>mask</strong></span>.</p></dd><dt id="add-wants TARGET
+          NAME..."><span class="term"><span class="command"><strong>add-wants <em class="replaceable"><code>TARGET</code></em>
+          <em class="replaceable"><code>NAME</code></em>...</strong></span>, </span><span class="term"><span class="command"><strong>add-requires <em class="replaceable"><code>TARGET</code></em>
+          <em class="replaceable"><code>NAME</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#add-wants%20TARGET%0A%20%20%20%20%20%20%20%20%20%20NAME...">¶</a></dt><dd><p>Adds "<code class="literal">Wants=</code>" resp. "<code class="literal">Requires=</code>"
+            dependency to the specified <em class="replaceable"><code>TARGET</code></em> for
+            one or more units. </p><p>This command honors <code class="option">--system</code>,
+            <code class="option">--user</code>, <code class="option">--runtime</code> and
+            <code class="option">--global</code> in a similar way as
+            <span class="command"><strong>enable</strong></span>.</p></dd><dt id="link FILENAME..."><span class="term"><span class="command"><strong>link <em class="replaceable"><code>FILENAME</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#link%20FILENAME...">¶</a></dt><dd><p>Link a unit file that is not in the unit file search
             paths into the unit file search path. This requires an
             absolute path to a unit file. The effect of this can be
             undone with <span class="command"><strong>disable</strong></span>. The effect of this
@@ -462,15 +472,15 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             <span class="command"><strong>start</strong></span> and other commands although it
             is not installed directly in the unit search path.</p></dd><dt id="get-default"><span class="term"><span class="command"><strong>get-default</strong></span></span><a class="headerlink" title="Permalink to this term" href="#get-default">¶</a></dt><dd><p>Get the default target specified
             via <code class="filename">default.target</code> link.</p></dd><dt id="set-default NAME"><span class="term"><span class="command"><strong>set-default <em class="replaceable"><code>NAME</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-default%20NAME">¶</a></dt><dd><p>Set the default target to boot into. Command links
-            <code class="filename">default.target</code> to the given unit.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168502768"></a><h3 id="Machine Commands">Machine Commands<a class="headerlink" title="Permalink to this headline" href="#Machine%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-machines PATTERN..."><span class="term"><span class="command"><strong>list-machines [<span class="optional"><em class="replaceable"><code>PATTERN</code></em>...</span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-machines%20PATTERN...">¶</a></dt><dd><p>List the host and all running local containers with
+            <code class="filename">default.target</code> to the given unit.</p></dd></dl></div></div><div class="refsect2"><a name="idm214183811792"></a><h3 id="Machine Commands">Machine Commands<a class="headerlink" title="Permalink to this headline" href="#Machine%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-machines PATTERN..."><span class="term"><span class="command"><strong>list-machines [<span class="optional"><em class="replaceable"><code>PATTERN</code></em>...</span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-machines%20PATTERN...">¶</a></dt><dd><p>List the host and all running local containers with
             their state. If one or more
             <em class="replaceable"><code>PATTERN</code></em>s are specified, only
             containers matching one of them are shown.
-            </p></dd></dl></div></div><div class="refsect2"><a name="idm214168498576"></a><h3 id="Job Commands">Job Commands<a class="headerlink" title="Permalink to this headline" href="#Job%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-jobs PATTERN..."><span class="term"><span class="command"><strong>list-jobs [<span class="optional"><em class="replaceable"><code>PATTERN...</code></em></span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-jobs%20PATTERN...">¶</a></dt><dd><p>List jobs that are in progress. If one or more
+            </p></dd></dl></div></div><div class="refsect2"><a name="idm214183807600"></a><h3 id="Job Commands">Job Commands<a class="headerlink" title="Permalink to this headline" href="#Job%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="list-jobs PATTERN..."><span class="term"><span class="command"><strong>list-jobs [<span class="optional"><em class="replaceable"><code>PATTERN...</code></em></span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-jobs%20PATTERN...">¶</a></dt><dd><p>List jobs that are in progress. If one or more
             <em class="replaceable"><code>PATTERN</code></em>s are specified, only
             jobs for units matching one of them are shown.</p></dd><dt id="cancel JOB..."><span class="term"><span class="command"><strong>cancel <em class="replaceable"><code>JOB</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#cancel%20JOB...">¶</a></dt><dd><p>Cancel one or more jobs specified on the command line
             by their numeric job IDs. If no job ID is specified, cancel
-            all pending jobs.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168492112"></a><h3 id="Snapshot Commands">Snapshot Commands<a class="headerlink" title="Permalink to this headline" href="#Snapshot%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="snapshot NAME"><span class="term"><span class="command"><strong>snapshot [<span class="optional"><em class="replaceable"><code>NAME</code></em></span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#snapshot%20NAME">¶</a></dt><dd><p>Create a snapshot. If a snapshot name is specified,
+            all pending jobs.</p></dd></dl></div></div><div class="refsect2"><a name="idm214183801136"></a><h3 id="Snapshot Commands">Snapshot Commands<a class="headerlink" title="Permalink to this headline" href="#Snapshot%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="snapshot NAME"><span class="term"><span class="command"><strong>snapshot [<span class="optional"><em class="replaceable"><code>NAME</code></em></span>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#snapshot%20NAME">¶</a></dt><dd><p>Create a snapshot. If a snapshot name is specified,
             the new snapshot will be named after it. If none is
             specified, an automatic snapshot name is generated. In
             either case, the snapshot name used is printed to standard
@@ -485,7 +495,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             which units are running or are stopped, they do not
             save/restore any other state. Snapshots are dynamic and lost
             on reboot.</p></dd><dt id="delete PATTERN..."><span class="term"><span class="command"><strong>delete <em class="replaceable"><code>PATTERN</code></em>...</strong></span></span><a class="headerlink" title="Permalink to this term" href="#delete%20PATTERN...">¶</a></dt><dd><p>Remove a snapshot previously created with
-            <span class="command"><strong>snapshot</strong></span>.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168483120"></a><h3 id="Environment Commands">Environment Commands<a class="headerlink" title="Permalink to this headline" href="#Environment%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="show-environment"><span class="term"><span class="command"><strong>show-environment</strong></span></span><a class="headerlink" title="Permalink to this term" href="#show-environment">¶</a></dt><dd><p>Dump the systemd manager environment block. The
+            <span class="command"><strong>snapshot</strong></span>.</p></dd></dl></div></div><div class="refsect2"><a name="idm214183792144"></a><h3 id="Environment Commands">Environment Commands<a class="headerlink" title="Permalink to this headline" href="#Environment%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="show-environment"><span class="term"><span class="command"><strong>show-environment</strong></span></span><a class="headerlink" title="Permalink to this term" href="#show-environment">¶</a></dt><dd><p>Dump the systemd manager environment block. The
             environment block will be dumped in straight-forward form
             suitable for sourcing into a shell script. This environment
             block will be passed to all processes the manager
@@ -500,26 +510,34 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             imported. Otherwise, a list of one or more environment
             variable names should be passed, whose client-side values
             are then imported into the manager's environment
-            block.</p></dd></dl></div></div><div class="refsect2"><a name="idm214173480768"></a><h3 id="Manager Lifecycle Commands">Manager Lifecycle Commands<a class="headerlink" title="Permalink to this headline" href="#Manager%20Lifecycle%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="daemon-reload"><span class="term"><span class="command"><strong>daemon-reload</strong></span></span><a class="headerlink" title="Permalink to this term" href="#daemon-reload">¶</a></dt><dd><p>Reload systemd manager configuration. This will reload
+            block.</p></dd></dl></div></div><div class="refsect2"><a name="idm214183781088"></a><h3 id="Manager Lifecycle Commands">Manager Lifecycle Commands<a class="headerlink" title="Permalink to this headline" href="#Manager%20Lifecycle%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="daemon-reload"><span class="term"><span class="command"><strong>daemon-reload</strong></span></span><a class="headerlink" title="Permalink to this term" href="#daemon-reload">¶</a></dt><dd><p>Reload systemd manager configuration. This will reload
             all unit files and recreate the entire dependency
             tree. While the daemon is being reloaded, all sockets systemd
-            listens on on behalf of user configuration will stay
+            listens on behalf of user configuration will stay
             accessible.</p><p>This command should not be confused
-            with the <span class="command"><strong>load</strong></span> or
-            <span class="command"><strong>reload</strong></span> commands.</p></dd><dt id="daemon-reexec"><span class="term"><span class="command"><strong>daemon-reexec</strong></span></span><a class="headerlink" title="Permalink to this term" href="#daemon-reexec">¶</a></dt><dd><p>Reexecute the systemd manager. This will serialize the
+            with the <span class="command"><strong>reload</strong></span> command.</p></dd><dt id="daemon-reexec"><span class="term"><span class="command"><strong>daemon-reexec</strong></span></span><a class="headerlink" title="Permalink to this term" href="#daemon-reexec">¶</a></dt><dd><p>Reexecute the systemd manager. This will serialize the
             manager state, reexecute the process and deserialize the
             state again. This command is of little use except for
             debugging and package upgrades. Sometimes, it might be
             helpful as a heavy-weight <span class="command"><strong>daemon-reload</strong></span>.
             While the daemon is being reexecuted, all sockets systemd listening
             on behalf of user configuration will stay accessible.
-            </p></dd></dl></div></div><div class="refsect2"><a name="idm214168455376"></a><h3 id="System Commands">System Commands<a class="headerlink" title="Permalink to this headline" href="#System%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="is-system-running"><span class="term"><span class="command"><strong>is-system-running</strong></span></span><a class="headerlink" title="Permalink to this term" href="#is-system-running">¶</a></dt><dd><p>Checks whether the system is running. This returns
-            success when the system is fully up and running, meaning
-            not in startup, shutdown or maintainance mode. Failure is
-            returned otherwise. In addition, the current state is
-            printed in a short string to standard output. Use
-            <code class="option">--quiet</code> to suppress output of this state
-            string.</p></dd><dt id="default"><span class="term"><span class="command"><strong>default</strong></span></span><a class="headerlink" title="Permalink to this term" href="#default">¶</a></dt><dd><p>Enter default mode. This is mostly equivalent to
+            </p></dd></dl></div></div><div class="refsect2"><a name="idm214183773648"></a><h3 id="System Commands">System Commands<a class="headerlink" title="Permalink to this headline" href="#System%20Commands">¶</a></h3><div class="variablelist"><dl class="variablelist"><dt id="is-system-running"><span class="term"><span class="command"><strong>is-system-running</strong></span></span><a class="headerlink" title="Permalink to this term" href="#is-system-running">¶</a></dt><dd><p>Checks whether the system is operational. This
+            returns success when the system is fully up and running,
+            meaning not in startup, shutdown or maintenance
+            mode. Failure is returned otherwise. In addition, the
+            current state is printed in a short string to standard
+            output, see table below. Use <code class="option">--quiet</code> to
+            suppress this output.</p><div class="table"><a name="idm214183770352"></a><p class="title"><b>Table 2. Manager Operational States</b></p><div class="table-contents"><table summary="Manager Operational States" border="1"><colgroup><col class="name"><col class="description"></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">initializing</code></td><td><p>Early bootup, before
+                    <code class="filename">basic.target</code> is reached
+                    or the <code class="varname">maintenance</code> state entered.
+                    </p></td></tr><tr><td><code class="varname">starting</code></td><td><p>Late bootup, before the job queue
+                    becomes idle for the first time, or one of the
+                    rescue targets are reached.</p></td></tr><tr><td><code class="varname">running</code></td><td><p>The system is fully
+                    operational.</p></td></tr><tr><td><code class="varname">degraded</code></td><td><p>The system is operational but one or more
+                    units failed.</p></td></tr><tr><td><code class="varname">maintenance</code></td><td><p>The rescue or emergency target is
+                    active.</p></td></tr><tr><td><code class="varname">stopping</code></td><td><p>The manager is shutting
+                    down.</p></td></tr></tbody></table></div></div><br class="table-break"></dd><dt id="default"><span class="term"><span class="command"><strong>default</strong></span></span><a class="headerlink" title="Permalink to this term" href="#default">¶</a></dt><dd><p>Enter default mode. This is mostly equivalent to
             <span class="command"><strong>isolate default.target</strong></span>.</p></dd><dt id="rescue"><span class="term"><span class="command"><strong>rescue</strong></span></span><a class="headerlink" title="Permalink to this term" href="#rescue">¶</a></dt><dd><p>Enter rescue mode. This is mostly equivalent to
             <span class="command"><strong>isolate rescue.target</strong></span>, but also prints a
             wall message to all users.</p></dd><dt id="emergency"><span class="term"><span class="command"><strong>emergency</strong></span></span><a class="headerlink" title="Permalink to this term" href="#emergency">¶</a></dt><dd><p>Enter emergency mode. This is mostly equivalent to
@@ -554,7 +572,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             systems. This may result in data loss.</p><p>If the optional argument
             <em class="replaceable"><code>arg</code></em> is given, it will be passed
             as the optional argument to the
-            <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>
+            <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>
             system call. The value is architecture and firmware
             specific. As an example, "<code class="literal">recovery</code>" might
             be used to trigger system recovery, and
@@ -587,7 +605,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             equal to the empty string, the state of the initrd's system
             manager process is passed to the main system manager, which
             allows later introspection of the state of the services
-            involved in the initrd boot.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168410608"></a><h3 id="Parameter Syntax">Parameter Syntax<a class="headerlink" title="Permalink to this headline" href="#Parameter%20Syntax">¶</a></h3><p>Unit commands listed above take either a single unit name
+            involved in the initrd boot.</p></dd></dl></div></div><div class="refsect2"><a name="idm214183713808"></a><h3 id="Parameter Syntax">Parameter Syntax<a class="headerlink" title="Permalink to this headline" href="#Parameter%20Syntax">¶</a></h3><p>Unit commands listed above take either a single unit name
       (designated as <em class="replaceable"><code>NAME</code></em>), or multiple
       unit specifications (designated as
       <em class="replaceable"><code>PATTERN</code></em>...). In the first case, the
@@ -631,8 +649,8 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
       </p><pre class="programlisting"># systemctl enable foo.service</pre><p>
       or
       </p><pre class="programlisting"># systemctl link /path/to/foo.service</pre><p>
-      </p></div></div><div class="refsect1"><a name="idm214168395616"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-    code otherwise.</p></div><div class="refsect1"><a name="idm214152885568"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
+      </p></div></div><div class="refsect1"><a name="idm214183698816"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+    code otherwise.</p></div><div class="refsect1"><a name="idm214170172736"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                         <code class="option">--no-pager</code> is not given;
                         overrides <code class="varname">$PAGER</code>.  Setting
                         this to an empty string or the value
@@ -640,7 +658,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
                         <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                         options passed to
                         <span class="command"><strong>less</strong></span>
-                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214168393888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214183697088"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="systemadm.html"><span class="citerefentry"><span class="refentrytitle">systemadm</span>(1)</span></a>,
       <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
@@ -648,7 +666,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
       <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
       <a href="systemd.resource-management.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-management</span>(5)</span></a>,
       <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
-      <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>,
       <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>
       <a href="glob.html"><span class="citerefentry"><span class="refentrytitle">glob</span>(7)</span></a>
     </p></div></div></body></html>
index a1f170e43061d5f742b67449ef6868f7cd20f000..7cbaa6ccb0112ca831c0b3a02751bb42f29c053e 100644 (file)
@@ -60,10 +60,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
   <refsect1>
     <title>Description</title>
 
-    <para><command>systemctl</command> may be used to
-    introspect and control the state of the
+    <para><command>systemctl</command> may be used to introspect and
+    control the state of the <literal>systemd</literal> system and
+    service manager. Please refer to
     <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-    system and service manager.</para>
+    for an introduction into the basic concepts and functionality this
+    tool manages.</para>
   </refsect1>
 
   <refsect1>
@@ -637,8 +639,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             file.</para>
 
             <para>This command should not be confused with the
-            <command>daemon-reload</command> or <command>load</command>
-            commands.</para>
+            <command>daemon-reload</command> command.</para>
           </listitem>
 
         </varlistentry>
@@ -923,6 +924,9 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             the system, or for all future logins of all users, or only this
             boot.  Note that in the last case, no systemd daemon
             configuration is reloaded.</para>
+
+            <para>Using <command>enable</command> on masked units
+            results in an error.</para>
           </listitem>
         </varlistentry>
 
@@ -1079,8 +1083,8 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             <filename>/dev/null</filename>, making it impossible to
             start them. This is a stronger version of
             <command>disable</command>, since it prohibits all kinds of
-            activation of the unit, including manual activation. Use
-            this option with care. This honors the
+            activation of the unit, including enablement and manual
+            activation. Use this option with care. This honors the
             <option>--runtime</option> option to only mask temporarily
             until the next reboot of the system.</para>
           </listitem>
@@ -1096,6 +1100,25 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
           </listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term><command>add-wants <replaceable>TARGET</replaceable>
+          <replaceable>NAME</replaceable>...</command></term>
+          <term><command>add-requires <replaceable>TARGET</replaceable>
+          <replaceable>NAME</replaceable>...</command></term>
+
+          <listitem>
+            <para>Adds <literal>Wants=</literal> resp. <literal>Requires=</literal>
+            dependency to the specified <replaceable>TARGET</replaceable> for
+            one or more units. </para>
+
+            <para>This command honors <option>--system</option>,
+            <option>--user</option>, <option>--runtime</option> and
+            <option>--global</option> in a similar way as
+            <command>enable</command>.</para>
+
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term><command>link <replaceable>FILENAME</replaceable>...</command></term>
 
@@ -1274,10 +1297,9 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
             <para>Reload systemd manager configuration. This will reload
             all unit files and recreate the entire dependency
             tree. While the daemon is being reloaded, all sockets systemd
-            listens on on behalf of user configuration will stay
+            listens on behalf of user configuration will stay
             accessible.</para> <para>This command should not be confused
-            with the <command>load</command> or
-            <command>reload</command> commands.</para>
+            with the <command>reload</command> command.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
@@ -1305,13 +1327,62 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
           <term><command>is-system-running</command></term>
 
           <listitem>
-            <para>Checks whether the system is running. This returns
-            success when the system is fully up and running, meaning
-            not in startup, shutdown or maintainance mode. Failure is
-            returned otherwise. In addition, the current state is
-            printed in a short string to standard output. Use
-            <option>--quiet</option> to suppress output of this state
-            string.</para>
+            <para>Checks whether the system is operational. This
+            returns success when the system is fully up and running,
+            meaning not in startup, shutdown or maintenance
+            mode. Failure is returned otherwise. In addition, the
+            current state is printed in a short string to standard
+            output, see table below. Use <option>--quiet</option> to
+            suppress this output.</para>
+
+            <table>
+              <title>Manager Operational States</title>
+              <tgroup cols='2'>
+                <colspec colname='name' />
+                <colspec colname='description' />
+                <thead>
+                  <row>
+                    <entry>Name</entry>
+                    <entry>Description</entry>
+                  </row>
+                </thead>
+                <tbody>
+                  <row>
+                    <entry><varname>initializing</varname></entry>
+                    <entry><para>Early bootup, before
+                    <filename>basic.target</filename> is reached
+                    or the <varname>maintenance</varname> state entered.
+                    </para></entry>
+                  </row>
+                  <row>
+                    <entry><varname>starting</varname></entry>
+                    <entry><para>Late bootup, before the job queue
+                    becomes idle for the first time, or one of the
+                    rescue targets are reached.</para></entry>
+                  </row>
+                  <row>
+                    <entry><varname>running</varname></entry>
+                    <entry><para>The system is fully
+                    operational.</para></entry>
+                  </row>
+                  <row>
+                    <entry><varname>degraded</varname></entry>
+                    <entry><para>The system is operational but one or more
+                    units failed.</para></entry>
+                  </row>
+                  <row>
+                    <entry><varname>maintenance</varname></entry>
+                    <entry><para>The rescue or emergency target is
+                    active.</para></entry>
+                  </row>
+                  <row>
+                    <entry><varname>stopping</varname></entry>
+                    <entry><para>The manager is shutting
+                    down.</para></entry>
+                  </row>
+                </tbody>
+              </tgroup>
+            </table>
           </listitem>
         </varlistentry>
 
@@ -1549,7 +1620,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
       <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd.resource-management</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>
       <citerefentry><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
     </para>
index b5adf99c85b3a0998516a2d09b684961614adf2e..21d19dfa9d0ff3cb9aa79fafe76de167266eb84f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-ACTIVATE" "8" "" "systemd 215" "systemd-activate"
+.TH "SYSTEMD\-ACTIVATE" "8" "" "systemd 217" "systemd-activate"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -89,7 +89,9 @@ See
 Same as in
 \fBsystemd\fR(1)\&.
 .RE
-.SH "EXAMPLE 1"
+.SH "EXAMPLES"
+.PP
+\fBExample\ \&1.\ \&Run an echo server on port 2000\fR
 .sp
 .if n \{\
 .RS 4
@@ -101,8 +103,7 @@ $ /usr/lib/systemd/systemd\-activate \-l 2000 \-a cat
 .RE
 .\}
 .PP
-This runs an echo server on port 2000\&.
-.SH "EXAMPLE 2"
+\fBExample\ \&2.\ \&Run a socket activated instance of systemd-journal-gatewayd(8)\fR
 .sp
 .if n \{\
 .RS 4
@@ -113,9 +114,6 @@ $ /usr/lib/systemd/systemd\-activate \-l 19531 /usr/lib/systemd/systemd\-journal
 .if n \{\
 .RE
 .\}
-.PP
-This runs a socket activated instance of
-\fBsystemd-journal-gatewayd\fR(8)\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
index fe6f0f4a981d3fc45660e05760662e7c86a1073e..21f592d1417ceeeefacf9f3fbe17a43b59ea5061 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-activate"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-activate — Test socket activation of daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-activate</code>  [OPTIONS...]  <em class="replaceable"><code>daemon</code></em>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214176941344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-activate</strong></span> can be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-activate"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-activate — Test socket activation of daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-activate</code>  [OPTIONS...]  <em class="replaceable"><code>daemon</code></em>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214197882096"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-activate</strong></span> can be used to
     launch a socket activated daemon from the command-line for
     testing purposes. It can also be used to launch single instances
     of the daemon per connection (inetd-style).
@@ -33,7 +33,7 @@
     to <span class="command"><strong>systemd-activate</strong></span> will be passed through to
     the dameon, in the original positions. Other sockets specified
     with <code class="option">--listen</code> will use consecutive descriptors.
-    </p></div><div class="refsect1"><a name="idm214177010960"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="-l address"><span class="term"><code class="option">-l <em class="replaceable"><code>address</code></em></code>, </span><span class="term"><code class="option">--listen=<em class="replaceable"><code>address</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-l%20address">¶</a></dt><dd><p>Listen on this <em class="replaceable"><code>address</code></em>.
+    </p></div><div class="refsect1"><a name="idm214197876160"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="-l address"><span class="term"><code class="option">-l <em class="replaceable"><code>address</code></em></code>, </span><span class="term"><code class="option">--listen=<em class="replaceable"><code>address</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-l%20address">¶</a></dt><dd><p>Listen on this <em class="replaceable"><code>address</code></em>.
         Takes a string like "<code class="literal">2000</code>" or
         "<code class="literal">127.0.0.1:2001</code>".</p></dd><dt id="-a"><span class="term"><code class="option">-a</code>, </span><span class="term"><code class="option">--accept</code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p>Launch a separate instance of daemon per
         connection and pass the connection socket as standard input
         variable–value pair. Otherwise, obtain the value from the
         environment of <span class="command"><strong>systemd-activate</strong></span> itself.
         </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177071616"></a><h2 id="Environment variables">Environment variables<a class="headerlink" title="Permalink to this headline" href="#Environment%20variables">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code>, </span><span class="term"><code class="varname">$LISTEN_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS">¶</a></dt><dd><p>See
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214201815968"></a><h2 id="Environment variables">Environment variables<a class="headerlink" title="Permalink to this headline" href="#Environment%20variables">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code>, </span><span class="term"><code class="varname">$LISTEN_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS">¶</a></dt><dd><p>See
         <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>.</p></dd><dt id="$SYSTEMD_LOG_TARGET"><span class="term"><code class="varname">$SYSTEMD_LOG_TARGET</code>, </span><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code>, </span><span class="term"><code class="varname">$SYSTEMD_LOG_COLOR</code>, </span><span class="term"><code class="varname">$SYSTEMD_LOG_LOCATION</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_TARGET">¶</a></dt><dd><p>Same as in
-        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177063344"></a><h2 id="Example 1">Example 1<a class="headerlink" title="Permalink to this headline" href="#Example%201">¶</a></h2><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 2000 -a cat</pre><p>This runs an echo server on port 2000.</p></div><div class="refsect1"><a name="idm214177061456"></a><h2 id="Example 2">Example 2<a class="headerlink" title="Permalink to this headline" href="#Example%202">¶</a></h2><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd</pre><p>This runs a socket activated instance of
-    <a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214177058800"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214201800864"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214201800192"></a><p class="title"><b>Example 1. Run an echo server on port 2000</b></p><div class="example-contents"><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 2000 -a cat</pre></div></div><br class="example-break"><div class="example"><a name="idm214201798720"></a><p class="title"><b>Example 2. Run a socket activated instance of <a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a></b></p><div class="example-contents"><pre class="programlisting">$ /usr/lib/systemd/systemd-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214201796432"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
       <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
index 717f5c0c28c8303c7ae44865e958c018d7f30d47..cde4263c3c477f1efe53e2eb258b0895335be316 100644 (file)
@@ -144,20 +144,19 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
   </refsect1>
 
   <refsect1>
-    <title>Example 1</title>
+    <title>Examples</title>
 
-    <programlisting>$ /usr/lib/systemd/systemd-activate -l 2000 -a cat</programlisting>
+    <example>
+      <title>Run an echo server on port 2000</title>
 
-    <para>This runs an echo server on port 2000.</para>
-  </refsect1>
-
-  <refsect1>
-    <title>Example 2</title>
+      <programlisting>$ /usr/lib/systemd/systemd-activate -l 2000 -a cat</programlisting>
+    </example>
 
-    <programlisting>$ /usr/lib/systemd/systemd-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd</programlisting>
+    <example>
+      <title>Run a socket activated instance of <citerefentry><refentrytitle>systemd-journal-gatewayd</refentrytitle><manvolnum>8</manvolnum></citerefentry></title>
 
-    <para>This runs a socket activated instance of
-    <citerefentry><refentrytitle>systemd-journal-gatewayd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+      <programlisting>$ /usr/lib/systemd/systemd-activate -l 19531 /usr/lib/systemd/systemd-journal-gatewayd</programlisting>
+    </example>
   </refsect1>
 
   <refsect1>
index 6073a49e5852ba58fa46257e43f920a3ecb942b5..1d166b33b0e5c83476d5bec681c7c9c0cf98ce4d 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-ANALYZE" "1" "" "systemd 215" "systemd-analyze"
+.TH "SYSTEMD\-ANALYZE" "1" "" "systemd 217" "systemd-analyze"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -36,10 +36,12 @@ systemd-analyze \- Analyze system boot\-up performance
 \fBsystemd\-analyze\fR [OPTIONS...] dump
 .HP \w'\fBsystemd\-analyze\fR\ 'u
 \fBsystemd\-analyze\fR [OPTIONS...] set\-log\-level [\fILEVEL\fR]
+.HP \w'\fBsystemd\-analyze\fR\ 'u
+\fBsystemd\-analyze\fR [OPTIONS...] verify [\fIFILES\fR...]
 .SH "DESCRIPTION"
 .PP
 \fBsystemd\-analyze\fR
-may be used to determine system boot\-up performance statistics and retrieve other state and tracing information from the system and service manager\&.
+may be used to determine system boot\-up performance statistics and retrieve other state and tracing information from the system and service manager, and to verify the correctness of unit files\&.
 .PP
 \fBsystemd\-analyze time\fR
 prints the time spent in the kernel before userspace has been reached, the time spent in the initial RAM disk (initrd) before normal system userspace has been reached, and the time normal system userspace took to initialize\&. Note that these measurements simply measure the time passed up to the point where all system services have been spawned, but not necessarily until they fully finished initialization or the disk is idle\&.
@@ -79,6 +81,9 @@ daemon to
 described in
 \fBsystemd\fR(1))\&.
 .PP
+\fBsystemd\-analyze verify\fR
+will load unit files and print warnings if any errors are detected\&. Files specified on the command line will be loaded, but also any other units referenced by them\&. This command works by prepending the directories for all command line arguments at the beginning of the unit load path, which means that all units files found in those directories will be used in preference to the unit files found in the standard locations, even if not listed explicitly\&.
+.PP
 If no command is passed,
 \fBsystemd\-analyze time\fR
 is implied\&.
@@ -88,12 +93,12 @@ The following options are understood:
 .PP
 \fB\-\-user\fR
 .RS 4
-Shows performance data of user sessions instead of the system manager\&.
+Operates on the user systemd instance\&.
 .RE
 .PP
 \fB\-\-system\fR
 .RS 4
-Shows performance data of the system manager\&. This is the implied default\&.
+Operates on the system systemd instance\&. This is the implied default\&.
 .RE
 .PP
 \fB\-\-order\fR, \fB\-\-require\fR
@@ -139,6 +144,12 @@ earlier, than the latest unit in the same level\&. The unit of
 is seconds unless specified with a different unit, e\&.g\&. "50ms"\&.
 .RE
 .PP
+\fB\-\-no\-man\fR
+.RS 4
+Do not invoke man to verify the existence of man pages listen in
+\fIDocumentation=\fR\&.
+.RE
+.PP
 \fB\-H\fR, \fB\-\-host=\fR
 .RS 4
 Execute the operation remotely\&. Specify a hostname, or a username and hostname separated by
@@ -169,23 +180,22 @@ Do not pipe output into a pager\&.
 .SH "EXIT STATUS"
 .PP
 On success, 0 is returned, a non\-zero failure code otherwise\&.
-.SH "EXAMPLES"
+.SH "EXAMPLES FOR DOT"
 .PP
-This plots all dependencies of any unit whose name starts with
-"avahi\-daemon\&.":
+\fBExample\ \&1.\ \&Plots all dependencies of any unit whose name starts with "avahi\-daemon"\fR
 .sp
 .if n \{\
 .RS 4
 .\}
 .nf
 $ systemd\-analyze dot \*(Aqavahi\-daemon\&.*\*(Aq | dot \-Tsvg > avahi\&.svg
-$ eog avahi\&.svg
+                        $ eog avahi\&.svg
 .fi
 .if n \{\
 .RE
 .\}
 .PP
-This plots the dependencies between all known target units:
+\fBExample\ \&2.\ \&Plots the dependencies between all known target units\fR
 .sp
 .if n \{\
 .RS 4
@@ -193,6 +203,111 @@ This plots the dependencies between all known target units:
 .nf
 systemd\-analyze dot \-\-to\-pattern=\*(Aq*\&.target\*(Aq \-\-from\-pattern=\*(Aq*\&.target\*(Aq | dot \-Tsvg > targets\&.svg
 $ eog targets\&.svg
+.fi
+.if n \{\
+.RE
+.\}
+.SH "EXAMPLES FOR VERIFY"
+.PP
+The following errors are currently detected:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+unknown sections and directives,
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+missing dependencies which are required to start the given unit,
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+man pages listed in
+\fIDocumentation=\fR
+which are not found in the system,
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+commands listed in
+\fIExecStart=\fR
+and similar which are not found in the system or not executable\&.
+.RE
+.PP
+\fBExample\ \&3.\ \&Misspelt directives\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ cat \&./user\&.slice
+[Unit]
+WhatIsThis=11
+Documentation=man:nosuchfile(1)
+Requires=different\&.service
+
+[Service]
+Desription=x
+
+$ systemd\-verify \&./user\&.slice
+[\&./user\&.slice:9] Unknown lvalue \*(AqWhatIsThis\*(Aq in section \*(AqUnit\*(Aq
+[\&./user\&.slice:13] Unknown section \*(AqService\*(Aq\&. Ignoring\&.
+Error: org\&.freedesktop\&.systemd1\&.LoadFailed:
+         Unit different\&.service failed to load:
+         No such file or directory\&.
+Failed to create user\&.slice/start: Invalid argument
+user\&.slice: man nosuchfile(1) command failed with code 16
+                        
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+\fBExample\ \&4.\ \&Missing service units\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ tail \&./a\&.socket \&./b\&.socket
+==> \&./a\&.socket <==
+[Socket]
+ListenStream=100
+
+==> \&./b\&.socket <==
+[Socket]
+ListenStream=100
+Accept=yes
+
+$ systemd\-verify \&./a\&.socket \&./b\&.socket
+Service a\&.service not loaded, a\&.socket cannot be started\&.
+Service b@0\&.service not loaded, b\&.socket cannot be started\&.
+                        
 .fi
 .if n \{\
 .RE
index 2e10ebba007e224f81daf52a5877c1057abecbce..be077d42cd98c77c70cb1e26217a7db11fef28f5 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-analyze"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-analyze — Analyze system boot-up performance</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...] [time]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  blame </p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  critical-chain  [<em class="replaceable"><code>UNIT</code></em>...]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  plot  [&gt; file.svg]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  dot  [<em class="replaceable"><code>PATTERN</code></em>...] [&gt; file.dot]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  dump </p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  set-log-level  [<em class="replaceable"><code>LEVEL</code></em>]</p></div></div><div class="refsect1"><a name="idm214183644624"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-analyze</strong></span> may be used
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-analyze"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-analyze — Analyze system boot-up performance</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...] [time]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  blame </p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  critical-chain  [<em class="replaceable"><code>UNIT</code></em>...]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  plot  [&gt; file.svg]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  dot  [<em class="replaceable"><code>PATTERN</code></em>...] [&gt; file.dot]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  dump </p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  set-log-level  [<em class="replaceable"><code>LEVEL</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-analyze</code>  [OPTIONS...]  verify  [<em class="replaceable"><code>FILES</code></em>...]</p></div></div><div class="refsect1"><a name="idm214189717184"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-analyze</strong></span> may be used
                 to determine system boot-up performance statistics and
                 retrieve other state and tracing information from the
-                system and service manager.</p><p><span class="command"><strong>systemd-analyze time</strong></span>
+                system and service manager, and to verify the
+                correctness of unit files.</p><p><span class="command"><strong>systemd-analyze time</strong></span>
                 prints the time spent in the kernel before
                 userspace has been reached, the time spent in the
                 initial RAM disk (initrd) before normal system
                 daemon to <em class="replaceable"><code>LEVEL</code></em> (accepts
                 the same values as <code class="option">--log-level=</code>
                 described in
-                <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>).</p><p>If no command is passed, <span class="command"><strong>systemd-analyze
-                time</strong></span> is implied.</p></div><div class="refsect1"><a name="idm214183618672"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--user"><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--user">¶</a></dt><dd><p>Shows performance data
-                                of user sessions instead of the system
-                                manager.</p></dd><dt id="--system"><span class="term"><code class="option">--system</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p>Shows performance data
-                                of the system manager. This is the
-                                implied default.</p></dd><dt id="--order"><span class="term"><code class="option">--order</code>, </span><span class="term"><code class="option">--require</code></span><a class="headerlink" title="Permalink to this term" href="#--order">¶</a></dt><dd><p>When used in
+                <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>).</p><p><span class="command"><strong>systemd-analyze verify</strong></span> will
+                load unit files and print warnings if any errors are
+                detected. Files specified on the command line will be
+                loaded, but also any other units referenced by
+                them. This command works by prepending the directories
+                for all command line arguments at the beginning of the
+                unit load path, which means that all units files found
+                in those directories will be used in preference to the
+                unit files found in the standard locations, even if
+                not listed explicitly.</p><p>If no command is passed, <span class="command"><strong>systemd-analyze
+                time</strong></span> is implied.</p></div><div class="refsect1"><a name="idm214189696704"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--user"><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--user">¶</a></dt><dd><p>Operates on the user
+                                systemd instance.</p></dd><dt id="--system"><span class="term"><code class="option">--system</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p>Operates on the system
+                                systemd instance. This is the implied
+                                default.</p></dd><dt id="--order"><span class="term"><code class="option">--order</code>, </span><span class="term"><code class="option">--require</code></span><a class="headerlink" title="Permalink to this term" href="#--order">¶</a></dt><dd><p>When used in
                                 conjunction with the
                                 <span class="command"><strong>dot</strong></span> command (see
                                 above), selects which dependencies are
                                 latest unit in the same level. The unit of
                                 <em class="replaceable"><code>timespan</code></em> is seconds
                                 unless specified with a different unit,
-                                e.g. "50ms".</p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p><a name="host-text"></a>Execute the operation remotely. Specify a hostname, or a
+                                e.g. "50ms".</p></dd><dt id="--no-man"><span class="term"><code class="option">--no-man</code></span><a class="headerlink" title="Permalink to this term" href="#--no-man">¶</a></dt><dd><p>Do not invoke man to verify the existence
+                                of man pages listen in <code class="varname">Documentation=</code>.
+                                </p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p><a name="host-text"></a>Execute the operation remotely. Specify a hostname, or a
       username and hostname separated by "<code class="literal">@</code>", to
       connect to. The hostname may optionally be suffixed by a
       container name, separated by "<code class="literal">:</code>", which
       <span class="command"><strong>machinectl -H
       <em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p><a name="machine-text"></a>Execute operation on a local container. Specify a
       container name to connect to.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214178965472"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214178964320"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>This plots all dependencies of any unit whose
-                name starts with "<code class="literal">avahi-daemon.</code>":</p><pre class="programlisting">$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg &gt; avahi.svg
-$ eog avahi.svg</pre><p>This plots the dependencies between all known target units:</p><pre class="programlisting">systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg &gt; targets.svg
-$ eog targets.svg</pre></div><div class="refsect1"><a name="idm214166569984"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184702272"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214184701120"></a><h2 id="Examples for dot">Examples for <span class="command"><strong>dot</strong></span><a class="headerlink" title="Permalink to this headline" href="#Examples%20for%20dot">¶</a></h2><div class="example"><a name="idm214184699984"></a><p class="title"><b>Example 1. Plots all dependencies of any unit whose
+                        name starts with "<code class="literal">avahi-daemon</code>"</b></p><div class="example-contents"><pre class="programlisting">$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg &gt; avahi.svg
+                        $ eog avahi.svg</pre></div></div><br class="example-break"><div class="example"><a name="idm214184697984"></a><p class="title"><b>Example 2. Plots the dependencies between all known target units</b></p><div class="example-contents"><pre class="programlisting">systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg &gt; targets.svg
+$ eog targets.svg</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214184696336"></a><h2 id="Examples for verify">Examples for <span class="command"><strong>verify</strong></span><a class="headerlink" title="Permalink to this headline" href="#Examples%20for%20verify">¶</a></h2><p>The following errors are currently detected:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>unknown sections and
+                        directives, </p></li><li class="listitem"><p>missing dependencies which are
+                        required to start the given unit,
+                        </p></li><li class="listitem"><p>man pages listed in
+                        <code class="varname">Documentation=</code> which are
+                        not found in the system,</p></li><li class="listitem"><p>commands listed in
+                        <code class="varname">ExecStart=</code> and similar
+                        which are not found in the system or not
+                        executable.</p></li></ul></div><div class="example"><a name="idm214184691360"></a><p class="title"><b>Example 3. Misspelt directives</b></p><div class="example-contents"><pre class="programlisting">$ cat ./user.slice
+[Unit]
+WhatIsThis=11
+Documentation=man:nosuchfile(1)
+Requires=different.service
+
+[Service]
+Desription=x
+
+$ systemd-verify ./user.slice
+[./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
+[./user.slice:13] Unknown section 'Service'. Ignoring.
+Error: org.freedesktop.systemd1.LoadFailed:
+         Unit different.service failed to load:
+         No such file or directory.
+Failed to create user.slice/start: Invalid argument
+user.slice: man nosuchfile(1) command failed with code 16
+                        </pre></div></div><br class="example-break"><div class="example"><a name="idm214184689424"></a><p class="title"><b>Example 4. Missing service units</b></p><div class="example-contents"><pre class="programlisting">$ tail ./a.socket ./b.socket
+==&gt; ./a.socket &lt;==
+[Socket]
+ListenStream=100
+
+==&gt; ./b.socket &lt;==
+[Socket]
+ListenStream=100
+Accept=yes
+
+$ systemd-verify ./a.socket ./b.socket
+Service a.service not loaded, a.socket cannot be started.
+Service b@0.service not loaded, b.socket cannot be started.
+                        </pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214169968496"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                         <code class="option">--no-pager</code> is not given;
                         overrides <code class="varname">$PAGER</code>.  Setting
                         this to an empty string or the value
@@ -140,7 +189,7 @@ $ eog targets.svg</pre></div><div class="refsect1"><a name="idm214166569984"></a
                         <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                         options passed to
                         <span class="command"><strong>less</strong></span>
-                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214178960288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214184686768"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
                 </p></div></div></body></html>
index c7a25985ca9a116299626f112bb57e36383895f8..073e807b416097b2adc4d005530dc14086d4187c 100644 (file)
                         <arg choice="plain">set-log-level</arg>
                         <arg choice="opt"><replaceable>LEVEL</replaceable></arg>
                 </cmdsynopsis>
+                <cmdsynopsis>
+                        <command>systemd-analyze</command>
+                        <arg choice="opt" rep="repeat">OPTIONS</arg>
+                        <arg choice="plain">verify</arg>
+                        <arg choice="opt" rep="repeat"><replaceable>FILES</replaceable></arg>
+                </cmdsynopsis>
         </refsynopsisdiv>
 
         <refsect1>
                 <para><command>systemd-analyze</command> may be used
                 to determine system boot-up performance statistics and
                 retrieve other state and tracing information from the
-                system and service manager.</para>
+                system and service manager, and to verify the
+                correctness of unit files.</para>
 
                 <para><command>systemd-analyze time</command>
                 prints the time spent in the kernel before
                 described in
                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para>
 
+                <para><command>systemd-analyze verify</command> will
+                load unit files and print warnings if any errors are
+                detected. Files specified on the command line will be
+                loaded, but also any other units referenced by
+                them. This command works by prepending the directories
+                for all command line arguments at the beginning of the
+                unit load path, which means that all units files found
+                in those directories will be used in preference to the
+                unit files found in the standard locations, even if
+                not listed explicitly.</para>
+
                 <para>If no command is passed, <command>systemd-analyze
                 time</command> is implied.</para>
 
                         <varlistentry>
                                 <term><option>--user</option></term>
 
-                                <listitem><para>Shows performance data
-                                of user sessions instead of the system
-                                manager.</para></listitem>
+                                <listitem><para>Operates on the user
+                                systemd instance.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term><option>--system</option></term>
 
-                                <listitem><para>Shows performance data
-                                of the system manager. This is the
-                                implied default.</para></listitem>
+                                <listitem><para>Operates on the system
+                                systemd instance. This is the implied
+                                default.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 e.g. "50ms".</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>--no-man</option></term>
+
+                                <listitem><para>Do not invoke man to verify the existence
+                                of man pages listen in <varname>Documentation=</varname>.
+                                </para></listitem>
+                        </varlistentry>
+
                         <xi:include href="user-system-options.xml" xpointer="host" />
                         <xi:include href="user-system-options.xml" xpointer="machine" />
 
         </refsect1>
 
         <refsect1>
-                <title>Examples</title>
+                <title>Examples for <command>dot</command></title>
 
-                <para>This plots all dependencies of any unit whose
-                name starts with <literal>avahi-daemon.</literal>:</para>
+                <example>
+                        <title>Plots all dependencies of any unit whose
+                        name starts with <literal>avahi-daemon</literal></title>
 
-                <programlisting>$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg > avahi.svg
-$ eog avahi.svg</programlisting>
+                        <programlisting>$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg > avahi.svg
+                        $ eog avahi.svg</programlisting>
+                </example>
 
-                <para>This plots the dependencies between all known target units:</para>
+                <example>
+                        <title>Plots the dependencies between all known target units</title>
 
-                <programlisting>systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg > targets.svg
+                        <programlisting>systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg > targets.svg
 $ eog targets.svg</programlisting>
+                </example>
+        </refsect1>
 
-
+        <refsect1>
+                <title>Examples for <command>verify</command></title>
+
+                <para>The following errors are currently detected:</para>
+                <itemizedlist>
+                        <listitem><para>unknown sections and
+                        directives, </para></listitem>
+
+                        <listitem><para>missing dependencies which are
+                        required to start the given unit,
+                        </para></listitem>
+
+                        <listitem><para>man pages listed in
+                        <varname>Documentation=</varname> which are
+                        not found in the system,</para></listitem>
+
+                        <listitem><para>commands listed in
+                        <varname>ExecStart=</varname> and similar
+                        which are not found in the system or not
+                        executable.</para></listitem>
+                </itemizedlist>
+
+                <example>
+                        <title>Misspelt directives</title>
+
+                        <programlisting>$ cat ./user.slice
+[Unit]
+WhatIsThis=11
+Documentation=man:nosuchfile(1)
+Requires=different.service
+
+[Service]
+Desription=x
+
+$ systemd-verify ./user.slice
+[./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
+[./user.slice:13] Unknown section 'Service'. Ignoring.
+Error: org.freedesktop.systemd1.LoadFailed:
+         Unit different.service failed to load:
+         No such file or directory.
+Failed to create user.slice/start: Invalid argument
+user.slice: man nosuchfile(1) command failed with code 16
+                        </programlisting>
+                </example>
+
+                <example>
+                        <title>Missing service units</title>
+
+                        <programlisting>$ tail ./a.socket ./b.socket
+==> ./a.socket &lt;==
+[Socket]
+ListenStream=100
+
+==> ./b.socket &lt;==
+[Socket]
+ListenStream=100
+Accept=yes
+
+$ systemd-verify ./a.socket ./b.socket
+Service a.service not loaded, a.socket cannot be started.
+Service b@0.service not loaded, b.socket cannot be started.
+                        </programlisting>
+                </example>
         </refsect1>
 
         <xi:include href="less-variables.xml" />
index c9c494fff792e42bc8b7d94736d40fbdf2d3ea09..ca461c5c57bf40ca8112c82fb42a941c47945116 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
-                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214174234032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
+                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214167738832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
                 is a system service that queries the user for system
                 passwords (such as hard disk encryption keys and SSL
                 certificate passphrases) on the console. It is
@@ -29,7 +29,7 @@
                 boot. <code class="filename">systemd-ask-password-wall.service</code>
                 is a system service that informs all logged in users
                 for system passwords via
-                <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
+                <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
                 is intended to be used after boot to ensure that users
                 are properly notified.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents" target="_top">
                 developer documentation</a> for more information
@@ -37,8 +37,8 @@
                 <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>
                 with either the <span class="command"><strong>--watch --console</strong></span>
                 or <span class="command"><strong>--watch --wall</strong></span> command line
-                parameters.</p></div><div class="refsect1"><a name="idm214174221776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                parameters.</p></div><div class="refsect1"><a name="idm214167730880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index 3836de551ac814d1df71528a03e02c121b71f873..2d3e63a55de8f584d6bc2803005df4429dcc3b2b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-ASK\-PASSWORD\-CONSOLE\&.SERVICE" "8" "" "systemd 215" "systemd-ask-password-console.service"
+.TH "SYSTEMD\-ASK\-PASSWORD\-CONSOLE\&.SERVICE" "8" "" "systemd 217" "systemd-ask-password-console.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index c9c494fff792e42bc8b7d94736d40fbdf2d3ea09..ca461c5c57bf40ca8112c82fb42a941c47945116 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
-                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214174234032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
+                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214167738832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
                 is a system service that queries the user for system
                 passwords (such as hard disk encryption keys and SSL
                 certificate passphrases) on the console. It is
@@ -29,7 +29,7 @@
                 boot. <code class="filename">systemd-ask-password-wall.service</code>
                 is a system service that informs all logged in users
                 for system passwords via
-                <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
+                <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
                 is intended to be used after boot to ensure that users
                 are properly notified.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents" target="_top">
                 developer documentation</a> for more information
@@ -37,8 +37,8 @@
                 <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>
                 with either the <span class="command"><strong>--watch --console</strong></span>
                 or <span class="command"><strong>--watch --wall</strong></span> command line
-                parameters.</p></div><div class="refsect1"><a name="idm214174221776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                parameters.</p></div><div class="refsect1"><a name="idm214167730880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index 6c87feb179c9844648d14c94763ee4c0ba1baa3e..536dad9c67df2a571499e9717621bf72c16edc3a 100644 (file)
@@ -68,7 +68,7 @@
                 boot. <filename>systemd-ask-password-wall.service</filename>
                 is a system service that informs all logged in users
                 for system passwords via
-                <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>. It
+                <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>. It
                 is intended to be used after boot to ensure that users
                 are properly notified.</para>
 
@@ -89,7 +89,7 @@
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index c9c494fff792e42bc8b7d94736d40fbdf2d3ea09..ca461c5c57bf40ca8112c82fb42a941c47945116 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
-                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214174234032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
+                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214167738832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
                 is a system service that queries the user for system
                 passwords (such as hard disk encryption keys and SSL
                 certificate passphrases) on the console. It is
@@ -29,7 +29,7 @@
                 boot. <code class="filename">systemd-ask-password-wall.service</code>
                 is a system service that informs all logged in users
                 for system passwords via
-                <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
+                <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
                 is intended to be used after boot to ensure that users
                 are properly notified.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents" target="_top">
                 developer documentation</a> for more information
@@ -37,8 +37,8 @@
                 <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>
                 with either the <span class="command"><strong>--watch --console</strong></span>
                 or <span class="command"><strong>--watch --wall</strong></span> command line
-                parameters.</p></div><div class="refsect1"><a name="idm214174221776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                parameters.</p></div><div class="refsect1"><a name="idm214167730880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index c9c494fff792e42bc8b7d94736d40fbdf2d3ea09..ca461c5c57bf40ca8112c82fb42a941c47945116 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
-                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214174234032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-ask-password-console.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password-console.service, systemd-ask-password-console.path, systemd-ask-password-wall.service, systemd-ask-password-wall.path — Query the user for system passwords on the
+                console and via wall</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-ask-password-console.service</code></p><p><code class="filename">systemd-ask-password-console.path</code></p><p><code class="filename">systemd-ask-password-wall.service</code></p><p><code class="filename">systemd-ask-password-wall.path</code></p></div><div class="refsect1"><a name="idm214167738832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-ask-password-console.service</code>
                 is a system service that queries the user for system
                 passwords (such as hard disk encryption keys and SSL
                 certificate passphrases) on the console. It is
@@ -29,7 +29,7 @@
                 boot. <code class="filename">systemd-ask-password-wall.service</code>
                 is a system service that informs all logged in users
                 for system passwords via
-                <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
+                <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>. It
                 is intended to be used after boot to ensure that users
                 are properly notified.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents" target="_top">
                 developer documentation</a> for more information
@@ -37,8 +37,8 @@
                 <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>
                 with either the <span class="command"><strong>--watch --console</strong></span>
                 or <span class="command"><strong>--watch --wall</strong></span> command line
-                parameters.</p></div><div class="refsect1"><a name="idm214174221776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                parameters.</p></div><div class="refsect1"><a name="idm214167730880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index a88cf250a1eb3880a8f9477544ca0ca70bb13e64..5e647c24e860d6be84ea6ad2dc92b7a3fb712037 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-ASK\-PASSWORD" "1" "" "systemd 215" "systemd-ask-password"
+.TH "SYSTEMD\-ASK\-PASSWORD" "1" "" "systemd 217" "systemd-ask-password"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -58,6 +58,13 @@ Specify an icon name alongside the password query, which may be used in all agen
 Specify the query timeout in seconds\&. Defaults to 90s\&. A timeout of 0 waits indefinitely\&.
 .RE
 .PP
+\fB\-\-echo\fR
+.RS 4
+Echo the user input instead of masking it\&. This is useful when using
+systemd\-ask\-password
+to query for usernames\&.
+.RE
+.PP
 \fB\-\-no\-tty\fR
 .RS 4
 Never ask for password on current TTY even if one is available\&. Always use agent system\&.
index 3ec0c4641c33b458b2d09ceff5008f94c36586f3..e260d4fad5e57ed95b8e69e8617f0f4cae2c5a7b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-ask-password"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password — Query the user for a system password</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-ask-password [OPTIONS...]  [MESSAGE]</code> </p></div></div><div class="refsect1"><a name="idm214169972928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-ask-password</strong></span> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-ask-password"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password — Query the user for a system password</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-ask-password [OPTIONS...]  [MESSAGE]</code> </p></div></div><div class="refsect1"><a name="idm214182498928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-ask-password</strong></span> may be
                 used to query a system password or passphrase from the
                 user, using a question message specified on the
                 command line. When run from a TTY it will query a
@@ -36,7 +36,7 @@
                 asking the user for passwords using Plymouth; a
                 boot-time password agent querying the user directly on
                 the console; an agent requesting password input via a
-                <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 message; an agent suitable for running in a GNOME
                 session; a command line agent which can be started
                 temporarily to process queued password requests; a TTY
@@ -47,7 +47,7 @@
                 Password Agent Specification</a>.</p><p>If a password is queried on a TTY, the user may
                 press TAB to hide the asterisks normally shown for
                 each character typed. Pressing Backspace as first key
-                achieves the same effect.</p></div><div class="refsect1"><a name="idm214173855824"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--icon="><span class="term"><code class="option">--icon=</code></span><a class="headerlink" title="Permalink to this term" href="#--icon=">¶</a></dt><dd><p>Specify an icon name
+                achieves the same effect.</p></div><div class="refsect1"><a name="idm214182490912"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--icon="><span class="term"><code class="option">--icon=</code></span><a class="headerlink" title="Permalink to this term" href="#--icon=">¶</a></dt><dd><p>Specify an icon name
                                 alongside the password query, which may
                                 be used in all agents supporting
                                 graphical display. The icon name
                                 Specification</a>.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p>Specify the query
                                 timeout in seconds. Defaults to
                                 90s. A timeout of 0 waits indefinitely.
+                                </p></dd><dt id="--echo"><span class="term"><code class="option">--echo</code></span><a class="headerlink" title="Permalink to this term" href="#--echo">¶</a></dt><dd><p>Echo the user input
+                                instead of masking it. This is useful
+                                when using
+                                <code class="filename">systemd-ask-password</code>
+                                to query for usernames.
                                 </p></dd><dt id="--no-tty"><span class="term"><code class="option">--no-tty</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tty">¶</a></dt><dd><p>Never ask for password
                                 on current TTY even if one is
                                 available. Always use agent
                                 accept multiple passwords. This will
                                 output one password per
                                 line.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd></dl></div></div><div class="refsect1"><a name="idm214173749680"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214173748496"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd></dl></div></div><div class="refsect1"><a name="idm214186431472"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214186430288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
-                        <a href="plymouth.html"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://linux.die.net/man/8/plymouth"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index 805827efc30ae6e5a92e098fe6d291ee5ac0a460..448df621005bb7693a422549b1dcf28fa673f40c 100644 (file)
@@ -78,7 +78,7 @@
                 asking the user for passwords using Plymouth; a
                 boot-time password agent querying the user directly on
                 the console; an agent requesting password input via a
-                <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 message; an agent suitable for running in a GNOME
                 session; a command line agent which can be started
                 temporarily to process queued password requests; a TTY
                                 </para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>--echo</option></term>
+
+                                <listitem><para>Echo the user input
+                                instead of masking it. This is useful
+                                when using
+                                <filename>systemd-ask-password</filename>
+                                to query for usernames.
+                                </para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><option>--no-tty</option></term>
 
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 6c48f7c57c551633b6bdd9f47da40e1db6e5688a..c5a0516a108994647b4a71f719c619f8690087fb 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-backlight@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-backlight@.service, systemd-backlight — Load and save the display backlight brightness at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-backlight@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-backlight</code></p></div><div class="refsect1"><a name="idm214201334672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-backlight@.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-backlight@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-backlight@.service, systemd-backlight — Load and save the display backlight brightness at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-backlight@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-backlight</code></p></div><div class="refsect1"><a name="idm214194712832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-backlight@.service</code>
                 is a service that restores the display backlight
                 brightness at early boot and saves it at shutdown. On
                 disk, the backlight brightness is stored in
-                <code class="filename">/var/lib/systemd/backlight/</code>.</p></div><div class="refsect1"><a name="idm214202765200"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-backlight</code> understands
+                <code class="filename">/var/lib/systemd/backlight/</code>.</p></div><div class="refsect1"><a name="idm214194710144"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-backlight</code> understands
                 the following kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.restore_state="><span class="term"><code class="varname">systemd.restore_state=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.restore_state=">¶</a></dt><dd><p>Takes a boolean
                                 argument. Defaults to
                                 "<code class="literal">1</code>". If
                                 "<code class="literal">0</code>", does not restore
                                 the backlight settings on boot. However,
                                 settings will still be stored on shutdown.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214199022576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214194704560"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 </p></div></div></body></html>
index f85c5981fb858f1f1f4ab5f5de85bbe4d2bc5626..5d30c4a4290542579d0dfa50fa6197a2817ed729 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-BACKLIGHT@\&.SERVICE" "8" "" "systemd 215" "systemd-backlight@.service"
+.TH "SYSTEMD\-BACKLIGHT@\&.SERVICE" "8" "" "systemd 217" "systemd-backlight@.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 6c48f7c57c551633b6bdd9f47da40e1db6e5688a..c5a0516a108994647b4a71f719c619f8690087fb 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-backlight@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-backlight@.service, systemd-backlight — Load and save the display backlight brightness at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-backlight@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-backlight</code></p></div><div class="refsect1"><a name="idm214201334672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-backlight@.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-backlight@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-backlight@.service, systemd-backlight — Load and save the display backlight brightness at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-backlight@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-backlight</code></p></div><div class="refsect1"><a name="idm214194712832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-backlight@.service</code>
                 is a service that restores the display backlight
                 brightness at early boot and saves it at shutdown. On
                 disk, the backlight brightness is stored in
-                <code class="filename">/var/lib/systemd/backlight/</code>.</p></div><div class="refsect1"><a name="idm214202765200"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-backlight</code> understands
+                <code class="filename">/var/lib/systemd/backlight/</code>.</p></div><div class="refsect1"><a name="idm214194710144"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-backlight</code> understands
                 the following kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.restore_state="><span class="term"><code class="varname">systemd.restore_state=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.restore_state=">¶</a></dt><dd><p>Takes a boolean
                                 argument. Defaults to
                                 "<code class="literal">1</code>". If
                                 "<code class="literal">0</code>", does not restore
                                 the backlight settings on boot. However,
                                 settings will still be stored on shutdown.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214199022576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214194704560"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 </p></div></div></body></html>
index 683892d27c9fe4c81b744020edb80499d8306819..dde84a23fa4bb3f82fd52af7169483711a34232e 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-binfmt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-binfmt.service, systemd-binfmt — Configure additional binary formats for executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-binfmt.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-binfmt</code></p></div><div class="refsect1"><a name="idm214195358608"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-binfmt.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-binfmt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-binfmt.service, systemd-binfmt — Configure additional binary formats for executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-binfmt.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-binfmt</code></p></div><div class="refsect1"><a name="idm214196504320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-binfmt.service</code> is
                 an early-boot service that registers additional binary
                 formats for executables in the kernel.</p><p>See
                 <a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214196788528"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                service.</p></div><div class="refsect1"><a name="idm214196501104"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>,
-                        <a href="wine.html"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
+                        <a href="http://linux.die.net/man/8/wine"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
                 </p></div></div></body></html>
index 516e9150f12c5ebb8788172a88b49afcb8a69ac7..77ce40f5fd5c991782a0dc5a139e826705c67690 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-BINFMT\&.SERVICE" "8" "" "systemd 215" "systemd-binfmt.service"
+.TH "SYSTEMD\-BINFMT\&.SERVICE" "8" "" "systemd 217" "systemd-binfmt.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 683892d27c9fe4c81b744020edb80499d8306819..dde84a23fa4bb3f82fd52af7169483711a34232e 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-binfmt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-binfmt.service, systemd-binfmt — Configure additional binary formats for executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-binfmt.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-binfmt</code></p></div><div class="refsect1"><a name="idm214195358608"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-binfmt.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-binfmt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-binfmt.service, systemd-binfmt — Configure additional binary formats for executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-binfmt.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-binfmt</code></p></div><div class="refsect1"><a name="idm214196504320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-binfmt.service</code> is
                 an early-boot service that registers additional binary
                 formats for executables in the kernel.</p><p>See
                 <a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214196788528"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                service.</p></div><div class="refsect1"><a name="idm214196501104"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>,
-                        <a href="wine.html"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
+                        <a href="http://linux.die.net/man/8/wine"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
                 </p></div></div></body></html>
index 748e41780a51d7ff656e6719b1cabebb3fea63c9..cb96048369e3420ff3583e8098f828e95753a1ad 100644 (file)
@@ -69,7 +69,7 @@
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 4682bec1771ae76ff5e61efd15e9ca281a6647b7..c02031bf6aa4f3f4967744be22b82867dc499697 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-BOOTCHART" "1" "" "systemd 215" "systemd-bootchart"
+.TH "SYSTEMD\-BOOTCHART" "1" "" "systemd 217" "systemd-bootchart"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -65,7 +65,7 @@ One can execute
 \fBsystemd\-bootchart\fR
 as normal application from the commandline\&. In this mode it is highly recommended to pass the
 \fB\-r\fR
-flag in order to not graph the time elapsed since boot and before systemd\-bootchart was started, as it may result in extremely large graphs\&.
+flag in order to not graph the time elapsed since boot and before systemd\-bootchart was started, as it may result in extremely large graphs\&. The time elapsed since boot might also include any time that the system was suspended\&.
 .RE
 .SH "OPTIONS"
 .PP
index 1b7a8da36c2fd7c929aaab08543e23900caf521b..7271c0d8d4fa1e4f4f9f056b4d0673998a1a88fd 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-bootchart"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bootchart — Boot performance graphing tool</p></div><div class="refsect1"><a name="idm214173999824"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-bootchart"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bootchart — Boot performance graphing tool</p></div><div class="refsect1"><a name="idm214194990432"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
                         <span class="command"><strong>systemd-bootchart</strong></span> is a
                         tool, usually run at system startup, that
                         collects the CPU load, disk load, memory
@@ -59,7 +59,7 @@
                         <code class="varname">MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518</code>.
                         Journal field <code class="varname">BOOTCHART=</code> contains
                         the bootchart in SVG format.
-                </p></div><div class="refsect1"><a name="idm214174603200"></a><h2 id="Invocation">Invocation<a class="headerlink" title="Permalink to this headline" href="#Invocation">¶</a></h2><p><span class="command"><strong>systemd-bootchart</strong></span> can be invoked in several different ways:</p><div class="variablelist"><dl class="variablelist"><dt id="Kernel invocation"><span class="term"><span class="emphasis"><em>Kernel invocation</em></span></span><a class="headerlink" title="Permalink to this term" href="#Kernel%20invocation">¶</a></dt><dd><p>The kernel can invoke
+                </p></div><div class="refsect1"><a name="idm214194981552"></a><h2 id="Invocation">Invocation<a class="headerlink" title="Permalink to this headline" href="#Invocation">¶</a></h2><p><span class="command"><strong>systemd-bootchart</strong></span> can be invoked in several different ways:</p><div class="variablelist"><dl class="variablelist"><dt id="Kernel invocation"><span class="term"><span class="emphasis"><em>Kernel invocation</em></span></span><a class="headerlink" title="Permalink to this term" href="#Kernel%20invocation">¶</a></dt><dd><p>The kernel can invoke
                                 <span class="command"><strong>systemd-bootchart</strong></span>
                                 instead of the init process. In turn,
                                 <span class="command"><strong>systemd-bootchart</strong></span>
                                 not graph the time elapsed since boot
                                 and before systemd-bootchart was
                                 started, as it may result in extremely
-                                large graphs.  </p></dd></dl></div></div><div class="refsect1"><a name="idm214174594304"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>These options can also be set in the
+                                large graphs. The time elapsed since boot
+                                might also include any time that the system
+                                was suspended.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198872752"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>These options can also be set in the
                 <code class="filename">/etc/systemd/bootchart.conf</code>
                 file. See
-                <a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>.
+                <a href="http://man7.org/linux/man-pages/man5/bootchart.conf.5.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>.
                 </p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="-n"><span class="term"><code class="option">-n</code>, </span><span class="term"><code class="option">--sample <em class="replaceable"><code>N</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p>Specify the number of
                                 samples, <em class="replaceable"><code>N</code></em>,
                                 </p></dd><dt id="-e"><span class="term"><code class="option">-e</code>, </span><span class="term"><code class="option">--entropy</code></span><a class="headerlink" title="Permalink to this term" href="#-e">¶</a></dt><dd><p>Enable logging and graphing
                                 of the kernel random entropy pool size.</p></dd><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--scale-x <em class="replaceable"><code>N</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Horizontal scaling factor for all variable
                                 graph components.</p></dd><dt id="-y"><span class="term"><code class="option">-y</code>, </span><span class="term"><code class="option">--scale-y <em class="replaceable"><code>N</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-y">¶</a></dt><dd><p>Vertical scaling factor for all variable
-                                graph components.</p></dd></dl></div></div><div class="refsect1"><a name="idm214178454400"></a><h2 id="Output">Output<a class="headerlink" title="Permalink to this headline" href="#Output">¶</a></h2><p><span class="command"><strong>systemd-bootchart</strong></span> generates SVG graphs. In order to render those
+                                graph components.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198830192"></a><h2 id="Output">Output<a class="headerlink" title="Permalink to this headline" href="#Output">¶</a></h2><p><span class="command"><strong>systemd-bootchart</strong></span> generates SVG graphs. In order to render those
                 on a graphical display any SVG capable viewer can be used. It should be
                 noted that the SVG render engines in most browsers (including Chrome
                 and Firefox) are many times faster than dedicated graphical applications
                 like Gimp and Inkscape.  Just point your browser at <a class="ulink" href="file:///run/log/" target="_top">file:///run/log/</a>!
-                </p></div><div class="refsect1"><a name="idm214178451696"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>This version of bootchart was implemented from
+                </p></div><div class="refsect1"><a name="idm214198827488"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History">¶</a></h2><p>This version of bootchart was implemented from
                 scratch, but is inspired by former bootchart
                 incantations:</p><div class="variablelist"><dl class="variablelist"><dt id="Original bash"><span class="term"><span class="emphasis"><em>Original bash</em></span></span><a class="headerlink" title="Permalink to this term" href="#Original%20bash">¶</a></dt><dd><p>The original bash/shell code implemented
                                 bootchart. This version created a compressed tarball for
                 efficient and simpler. There are no longer any timing issues with the data
                 collector and the grapher, as the graphing cannot be run until the data
                 has been collected. Also, the data kept in memory is reduced to the absolute
-                minimum needed.</p></div><div class="refsect1"><a name="idm214178442608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>
-                </p></div><div class="refsect1"><a name="idm214173815824"></a><h2 id="Bugs">Bugs<a class="headerlink" title="Permalink to this headline" href="#Bugs">¶</a></h2><p>systemd-bootchart does not get the model information for the hard drive
+                minimum needed.</p></div><div class="refsect1"><a name="idm214193904464"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="http://man7.org/linux/man-pages/man5/bootchart.conf.5.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>
+                </p></div><div class="refsect1"><a name="idm214193902304"></a><h2 id="Bugs">Bugs<a class="headerlink" title="Permalink to this headline" href="#Bugs">¶</a></h2><p>systemd-bootchart does not get the model information for the hard drive
                 unless the root device is specified with <code class="code">root=/dev/sdxY</code>. Using
                 UUIDs or PARTUUIDs will boot fine, but the hard drive model will not be
                 added to the chart.</p><p>For bugs, please contact the author and current maintainer:</p><table border="0" summary="Simple list" class="simplelist"><tr><td>Auke Kok <code class="email">&lt;<a class="email" href="mailto:auke-jan.h.kok@intel.com">auke-jan.h.kok@intel.com</a>&gt;</code></td></tr></table></div></div></body></html>
index d83d032553c5f0c0a0448ae6b4ba4c932abb9cef..150ca48f39b6c669f32f96f64cc4b1358059616e 100644 (file)
                                 not graph the time elapsed since boot
                                 and before systemd-bootchart was
                                 started, as it may result in extremely
-                                large graphs.  </para></listitem>
+                                large graphs. The time elapsed since boot
+                                might also include any time that the system
+                                was suspended.</para></listitem>
                         </varlistentry>
                 </variablelist>
         </refsect1>
                 <para>These options can also be set in the
                 <filename>/etc/systemd/bootchart.conf</filename>
                 file. See
-                <citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+                <citerefentry project='man-pages'><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
                 </para>
 
                 <variablelist>
         <refsect1>
                 <title>See Also</title>
                 <para>
-                        <citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 481047f5b781bf2736b657ca94df22435dac46c6..48c4058a8a0033efe2cb04820f421ab3cce29fa7 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-BUS\-PROXYD" "8" "" "systemd 215" "systemd-bus-proxyd"
+.TH "SYSTEMD\-BUS\-PROXYD" "8" "" "systemd 217" "systemd-bus-proxyd"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -39,7 +39,7 @@ The following options are understood:
 \fB\-\-address=\fR\fB\fIADDRESS\fR\fR\fB[:\fIADDRESS\&.\&.\&.\fR]\fR
 .RS 4
 Connect to the bus specified by
-\fIADDRESS\fR\&. Multiple colon\-seperated addresses can be specified, in which case
+\fIADDRESS\fR\&. Multiple colon\-separated addresses can be specified, in which case
 \fBsystemd\-bus\-proxyd\fR
 will attempt to connect to them in turn\&.
 .RE
index 221c7f8b01c53d70090c00f2e4633c2170c92edc..6112da32b60f66f8692d4be6a8d3f4de3b71bf58 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-bus-proxyd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bus-proxyd — Connect STDIO or a socket to a given bus address</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-bus-proxyd</code>  [OPTIONS...] [<em class="replaceable"><code>PLACEHOLDER</code></em>]</p></div></div><div class="refsect1"><a name="idm214171683136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-bus-proxyd</strong></span> will proxy D-Bus
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-bus-proxyd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bus-proxyd — Connect STDIO or a socket to a given bus address</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-bus-proxyd</code>  [OPTIONS...] [<em class="replaceable"><code>PLACEHOLDER</code></em>]</p></div></div><div class="refsect1"><a name="idm214179453392"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-bus-proxyd</strong></span> will proxy D-Bus
     messages to and from a bus. The will be either the system bus or
     the bus specified with <code class="option">--address</code> when that option
     is given. Messages will be proxied to/from standard input and
     output, or the socket received through socket activation.</p><p>This program can be used to connect a program using classic
-    D-Bus to kdbus.</p></div><div class="refsect1"><a name="idm214171680304"></a><h2 id="Options and Arguments">Options and Arguments<a class="headerlink" title="Permalink to this headline" href="#Options%20and%20Arguments">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--address=ADDRESS:ADDRESS..."><span class="term"><code class="option">--address=<em class="replaceable"><code>ADDRESS</code></em>[<span class="optional">:<em class="replaceable"><code>ADDRESS...</code></em></span>]</code></span><a class="headerlink" title="Permalink to this term" href="#--address=ADDRESS:ADDRESS...">¶</a></dt><dd><p>Connect to the bus specified by
-          <em class="replaceable"><code>ADDRESS</code></em>. Multiple colon-seperated
+    D-Bus to kdbus.</p></div><div class="refsect1"><a name="idm214179496816"></a><h2 id="Options and Arguments">Options and Arguments<a class="headerlink" title="Permalink to this headline" href="#Options%20and%20Arguments">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--address=ADDRESS:ADDRESS..."><span class="term"><code class="option">--address=<em class="replaceable"><code>ADDRESS</code></em>[<span class="optional">:<em class="replaceable"><code>ADDRESS...</code></em></span>]</code></span><a class="headerlink" title="Permalink to this term" href="#--address=ADDRESS:ADDRESS...">¶</a></dt><dd><p>Connect to the bus specified by
+          <em class="replaceable"><code>ADDRESS</code></em>. Multiple colon-separated
           addresses can be specified, in which case
           <span class="command"><strong>systemd-bus-proxyd</strong></span> will attempt to
           connect to them in turn.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p><em class="replaceable"><code>PLACEHOLDER</code></em>, if given, must be a string
     of "<code class="literal">x</code>" and will be used to display information about
     the process that <span class="command"><strong>systemd-bus-proxyd</strong></span> is forwarding
-    messages for.</p></div><div class="refsect1"><a name="idm214171671136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    messages for.</p></div><div class="refsect1"><a name="idm214175650480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="dbus-daemon.html"><span class="citerefentry"><span class="refentrytitle">dbus-daemon</span>(1)</span></a>,
       <a class="ulink" href="http://freedesktop.org/wiki/Software/dbus" target="_top">D-Bus</a>,
       <a class="ulink" href="https://code.google.com/p/d-bus/" target="_top">kdbus</a>
index 7f9f239f34e9033a59eefb98bb62ae097199d61f..f72e6c7137f0c8d9761c9a1657e7bdc2a29fb998 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-bus-proxyd@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bus-proxyd@.service, systemd-bus-proxyd.socket — Proxy classic D-Bus clients to kdbus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-bus-proxyd@.service</code></p><p><code class="filename">systemd-bus-proxyd.socket</code></p></div><div class="refsect1"><a name="idm214195818032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-bus-proxyd.socket</code> will launch
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-bus-proxyd@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bus-proxyd@.service, systemd-bus-proxyd.socket — Proxy classic D-Bus clients to kdbus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-bus-proxyd@.service</code></p><p><code class="filename">systemd-bus-proxyd.socket</code></p></div><div class="refsect1"><a name="idm214188096576"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-bus-proxyd.socket</code> will launch
     <code class="filename">systemd-bus-proxyd@.service</code> for connections
     to the classic D-Bus socket in
     <code class="filename">/var/run/dbus/system_bus_socket</code>.</p><p><code class="filename">systemd-bus-proxyd@.service</code> is launched
     for an existing D-Bus connection and will use
     <span class="command"><strong>systemd-bus-proxyd</strong></span> to proxy messages from this
     connection to the system bus (either kdbus or classic D-Bus).
-    </p></div><div class="refsect1"><a name="idm214195813072"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-      <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>
-      <a href="dbus-daemon.html"><span class="citerefentry"><span class="refentrytitle">dbus-daemon</span>(1)</span></a>
-      <a class="ulink" href="http://freedesktop.org/wiki/Software/dbus" target="_top">D-Bus</a>
+    </p></div><div class="refsect1"><a name="idm214189412512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>,
+      <a href="dbus-daemon.html"><span class="citerefentry"><span class="refentrytitle">dbus-daemon</span>(1)</span></a>,
+      <a class="ulink" href="http://freedesktop.org/wiki/Software/dbus" target="_top">D-Bus</a>,
       <a class="ulink" href="https://code.google.com/p/d-bus/" target="_top">kdbus</a>
     </p></div></div></body></html>
index 91a6fe36852300babe05d1be52139194cc81d899..f9400f034d2d024aa0424f1b1d177d4e1aa6d33b 100644 (file)
@@ -80,7 +80,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
         <listitem>
           <para>Connect to the bus specified by
-          <replaceable>ADDRESS</replaceable>. Multiple colon-seperated
+          <replaceable>ADDRESS</replaceable>. Multiple colon-separated
           addresses can be specified, in which case
           <command>systemd-bus-proxyd</command> will attempt to
           connect to them in turn.</para>
index 03e5dc35159da780de9fd1429d9f1dbc3f5f61ec..931285cad65cc1278af2e39c6f5400ac9bfbd24a 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-BUS\-PROXYD@\&.SERVICE" "8" "" "systemd 215" "systemd-bus-proxyd@.service"
+.TH "SYSTEMD\-BUS\-PROXYD@\&.SERVICE" "8" "" "systemd 217" "systemd-bus-proxyd@.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -40,7 +40,10 @@ is launched for an existing D\-Bus connection and will use
 to proxy messages from this connection to the system bus (either kdbus or classic D\-Bus)\&.
 .SH "SEE ALSO"
 .PP
-\fBsystemd-bus-proxyd\fR(8)\fBdbus-daemon\fR(1)\m[blue]\fBD\-Bus\fR\m[]\&\s-2\u[1]\d\s+2\m[blue]\fBkdbus\fR\m[]\&\s-2\u[2]\d\s+2
+\fBsystemd-bus-proxyd\fR(8),
+\fBdbus-daemon\fR(1),
+\m[blue]\fBD\-Bus\fR\m[]\&\s-2\u[1]\d\s+2,
+\m[blue]\fBkdbus\fR\m[]\&\s-2\u[2]\d\s+2
 .SH "NOTES"
 .IP " 1." 4
 D-Bus
index 7f9f239f34e9033a59eefb98bb62ae097199d61f..f72e6c7137f0c8d9761c9a1657e7bdc2a29fb998 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-bus-proxyd@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bus-proxyd@.service, systemd-bus-proxyd.socket — Proxy classic D-Bus clients to kdbus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-bus-proxyd@.service</code></p><p><code class="filename">systemd-bus-proxyd.socket</code></p></div><div class="refsect1"><a name="idm214195818032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-bus-proxyd.socket</code> will launch
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-bus-proxyd@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-bus-proxyd@.service, systemd-bus-proxyd.socket — Proxy classic D-Bus clients to kdbus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-bus-proxyd@.service</code></p><p><code class="filename">systemd-bus-proxyd.socket</code></p></div><div class="refsect1"><a name="idm214188096576"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-bus-proxyd.socket</code> will launch
     <code class="filename">systemd-bus-proxyd@.service</code> for connections
     to the classic D-Bus socket in
     <code class="filename">/var/run/dbus/system_bus_socket</code>.</p><p><code class="filename">systemd-bus-proxyd@.service</code> is launched
     for an existing D-Bus connection and will use
     <span class="command"><strong>systemd-bus-proxyd</strong></span> to proxy messages from this
     connection to the system bus (either kdbus or classic D-Bus).
-    </p></div><div class="refsect1"><a name="idm214195813072"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-      <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>
-      <a href="dbus-daemon.html"><span class="citerefentry"><span class="refentrytitle">dbus-daemon</span>(1)</span></a>
-      <a class="ulink" href="http://freedesktop.org/wiki/Software/dbus" target="_top">D-Bus</a>
+    </p></div><div class="refsect1"><a name="idm214189412512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>,
+      <a href="dbus-daemon.html"><span class="citerefentry"><span class="refentrytitle">dbus-daemon</span>(1)</span></a>,
+      <a class="ulink" href="http://freedesktop.org/wiki/Software/dbus" target="_top">D-Bus</a>,
       <a class="ulink" href="https://code.google.com/p/d-bus/" target="_top">kdbus</a>
     </p></div></div></body></html>
index 3a5930d574a0d109b414c6d1b08c4c819fd630d7..f8e457696b4f9adbddf38d17be7db4722b3bc3e4 100644 (file)
@@ -72,9 +72,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <title>See Also</title>
 
     <para>
-      <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-      <citerefentry><refentrytitle>dbus-daemon</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-      <ulink url="http://freedesktop.org/wiki/Software/dbus">D-Bus</ulink>
+      <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>dbus-daemon</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <ulink url="http://freedesktop.org/wiki/Software/dbus">D-Bus</ulink>,
       <ulink url="https://code.google.com/p/d-bus/">kdbus</ulink>
     </para>
   </refsect1>
index 0280d83c3d86c76e5cdf11a01c387ace7305facb..79fc9bf55ef7eeb2ceb32b175470b78bc7c27b56 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-CAT" "1" "" "systemd 215" "systemd-cat"
+.TH "SYSTEMD\-CAT" "1" "" "systemd 217" "systemd-cat"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index f94e6c4b2c0f41cb361a0a1aff87a17f70ec9c53..2448ea072bd973e2482ee2d38bd6240f21f56157 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-cat"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cat — Connect a pipeline or program's output with the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cat [OPTIONS...]  [COMMAND]  [ARGUMENTS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">systemd-cat [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214173873072"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cat</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-cat"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cat — Connect a pipeline or program's output with the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cat [OPTIONS...]  [COMMAND]  [ARGUMENTS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">systemd-cat [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214197994976"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cat</strong></span> may be used to
                 connect the standard input and output of a process to the
                 journal, or as a filter tool in a shell pipeline to
                 pass the output the previous pipeline element
@@ -28,7 +28,7 @@
                 everything it reads from standard input (stdin) to the journal.</p><p>If parameters are passed, they are executed as
                 command line with standard output (stdout) and standard
                 error output (stderr) connected to the journal, so
-                that all it writes is stored in the journal.</p></div><div class="refsect1"><a name="idm214173943168"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+                that all it writes is stored in the journal.</p></div><div class="refsect1"><a name="idm214197991136"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--identifier=</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Specify a short string
                                 that is used to identify the logging
                                 tool. If not specified, no identification
@@ -47,7 +47,7 @@
                                 to the same named levels). These
                                 priority values are the same as
                                 defined by
-                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. Defaults
+                                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. Defaults
                                 to "<code class="literal">info</code>". Note that
                                 this simply controls the default,
                                 individual lines may be logged with
                                 ("<code class="literal">notice</code>"), and
                                 similar for the other priority
                                 levels. Takes a boolean
-                                argument.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173999760"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214173998576"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214173997904"></a><p class="title"><b>Example 1. Invoke a program</b></p><div class="example-contents"><p>This calls <code class="filename">/bin/ls</code>
+                                argument.</p></dd></dl></div></div><div class="refsect1"><a name="idm214201926064"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214201924880"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214201924208"></a><p class="title"><b>Example 1. Invoke a program</b></p><div class="example-contents"><p>This calls <code class="filename">/bin/ls</code>
                         with standard output and error connected to the
-                        journal:</p><pre class="programlisting"># systemd-cat ls</pre></div></div><br class="example-break"><div class="example"><a name="idm214173994912"></a><p class="title"><b>Example 2. Usage in a shell pipeline</b></p><div class="example-contents"><p>This builds a shell pipeline also
+                        journal:</p><pre class="programlisting"># systemd-cat ls</pre></div></div><br class="example-break"><div class="example"><a name="idm214201914032"></a><p class="title"><b>Example 2. Usage in a shell pipeline</b></p><div class="example-contents"><p>This builds a shell pipeline also
                         invoking <code class="filename">/bin/ls</code> and
                         writes the output it generates to the
                         journal:</p><pre class="programlisting"># ls | systemd-cat</pre></div></div><br class="example-break"><p>Even though the two examples have very similar
                 effects the first is preferable since only one process
                 is running at a time, and both stdout and stderr are
                 captured while in the second example, only stdout is
-                captured.</p></div><div class="refsect1"><a name="idm214173991408"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                captured.</p></div><div class="refsect1"><a name="idm214201910528"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="logger.html"><span class="citerefentry"><span class="refentrytitle">logger</span>(1)</span></a>
index 4098a76bc77099a47136ecee55a4bf60a0ce6cbb..e5a867be2262f0fcc1ad2d9eadbf949a1567bcff 100644 (file)
                                 to the same named levels). These
                                 priority values are the same as
                                 defined by
-                                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Defaults
+                                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Defaults
                                 to <literal>info</literal>. Note that
                                 this simply controls the default,
                                 individual lines may be logged with
index e9f732b6d4eb7b5a1a8a272187df1c1d808d5d8a..f7bcb2725a67120f5b952be7e3a07e1cbd8aa22c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-CGLS" "1" "" "systemd 215" "systemd-cgls"
+.TH "SYSTEMD\-CGLS" "1" "" "systemd 217" "systemd-cgls"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 29cf4bfa8a57d47f07f71ab6bfdf9f1a9d326e71..73836f6accc247428e06e4b2d6bd9b9acc257914 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-cgls"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cgls — Recursively show control group contents</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cgls</code>  [OPTIONS...] [CGROUP...]</p></div></div><div class="refsect1"><a name="idm214184118624"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cgls</strong></span> recursively
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-cgls"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cgls — Recursively show control group contents</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cgls</code>  [OPTIONS...] [CGROUP...]</p></div></div><div class="refsect1"><a name="idm214186615120"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cgls</strong></span> recursively
                 shows the contents of the selected Linux control group
                 hierarchy in a tree. If arguments are specified, shows
                 all member processes of the specified control groups
@@ -32,7 +32,7 @@
                 of the control group the working directory refers
                 to. Otherwise, the full systemd control group hierarchy
                 is shown.</p><p>By default, empty control groups are not
-                shown.</p></div><div class="refsect1"><a name="idm214187929552"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--all"><span class="term"><code class="option">--all</code></span><a class="headerlink" title="Permalink to this term" href="#--all">¶</a></dt><dd><p>Do not hide empty
+                shown.</p></div><div class="refsect1"><a name="idm214186611488"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--all"><span class="term"><code class="option">--all</code></span><a class="headerlink" title="Permalink to this term" href="#--all">¶</a></dt><dd><p>Do not hide empty
                                 control groups in the
                                 output.</p></dd><dt id="-l"><span class="term"><code class="option">-l</code>, </span><span class="term"><code class="option">--full</code></span><a class="headerlink" title="Permalink to this term" href="#-l">¶</a></dt><dd><p>Do not ellipsize
                                 process tree members.</p></dd><dt id="-k"><span class="term"><code class="option">-k</code></span><a class="headerlink" title="Permalink to this term" href="#-k">¶</a></dt><dd><p>Include kernel
                                 the part corresponding to the
                                 container <em class="replaceable"><code>MACHINE</code></em>.
                                 </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214187869968"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214187868784"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190554080"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214190552896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>,
                         <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>,
-                        <a href="ps.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/ps.1.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>
                 </p></div></div></body></html>
index 230957ba2df453507c374a82fb436a8e9b0a05cd..d8dbe6862e7f10fde419dc584196753f049569fb 100644 (file)
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 68d7b304f198a228469dc0fefb47c38fa3d26e14..27ff3e26dc07d2745d2ce47436da802620e41a1a 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-CGTOP" "1" "" "systemd 215" "systemd-cgtop"
+.TH "SYSTEMD\-CGTOP" "1" "" "systemd 217" "systemd-cgtop"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 4f157ea6fbb8400f65bba6244b0c0cedbdb5b7a7..719247740f8d0752cdae4d4ee3be2ca832ed1c8e 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-cgtop"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cgtop — Show top control groups by their resource usage</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cgtop</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214195806768"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cgtop</strong></span> shows the top
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-cgtop"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cgtop — Show top control groups by their resource usage</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-cgtop</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214199915168"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-cgtop</strong></span> shows the top
                 control groups of the local Linux control group
                 hierarchy, ordered by their CPU, memory, or disk I/O load. The
                 display is refreshed in regular intervals (by default
                 every 1s), similar in style to
-                <a href="top.html"><span class="citerefentry"><span class="refentrytitle">top</span>(1)</span></a>.
+                <a href="http://man7.org/linux/man-pages/man1/top.1.html"><span class="citerefentry"><span class="refentrytitle">top</span>(1)</span></a>.
                 If <span class="command"><strong>systemd-cgtop</strong></span> is not connected
                 to a tty, only one iteration is performed and no
                 columns headers are printed. This mode is suitable for
@@ -48,7 +48,7 @@
                 the services in question, no resource accounting will
                 be available for system services and the data shown by
                 <span class="command"><strong>systemd-cgtop</strong></span> will be
-                incomplete.</p></div><div class="refsect1"><a name="idm214199989184"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-p"><span class="term"><code class="option">-p</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Order by control group
+                incomplete.</p></div><div class="refsect1"><a name="idm214199784384"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-p"><span class="term"><code class="option">-p</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Order by control group
                                 path name.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Order by number of
                                 tasks in control
                                 group (i.e. threads and processes).</p></dd><dt id="-c"><span class="term"><code class="option">-c</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Order by CPU load.</p></dd><dt id="-m"><span class="term"><code class="option">-m</code></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p>Order by memory usage.</p></dd><dt id="-i"><span class="term"><code class="option">-i</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p>Order by disk I/O load.</p></dd><dt id="-b"><span class="term"><code class="option">-b</code>, </span><span class="term"><code class="option">--batch</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p>Run in "batch" mode:
@@ -75,7 +75,7 @@
                                 only the first level of control groups
                                 is monitored, and so on. Defaults to
                                 3.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200041872"></a><h2 id="Keys">Keys<a class="headerlink" title="Permalink to this headline" href="#Keys">¶</a></h2><p><span class="command"><strong>systemd-cgtop</strong></span> is an
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199948288"></a><h2 id="Keys">Keys<a class="headerlink" title="Permalink to this headline" href="#Keys">¶</a></h2><p><span class="command"><strong>systemd-cgtop</strong></span> is an
                 interactive tool and may be controlled via user input
                 using the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="h"><span class="term">h</span><a class="headerlink" title="Permalink to this term" href="#h">¶</a></dt><dd><p>Shows a short help text.</p></dd><dt id="SPACE"><span class="term">SPACE</span><a class="headerlink" title="Permalink to this term" href="#SPACE">¶</a></dt><dd><p>Immediately refresh output.</p></dd><dt id="q"><span class="term">q</span><a class="headerlink" title="Permalink to this term" href="#q">¶</a></dt><dd><p>Terminate the program.</p></dd><dt id="p"><span class="term">p, </span><span class="term">t, </span><span class="term">c, </span><span class="term">m, </span><span class="term">i</span><a class="headerlink" title="Permalink to this term" href="#p">¶</a></dt><dd><p>Sort the control groups
                                 by path, number of tasks, CPU load,
                                 load, respectively.</p></dd><dt id="%"><span class="term">%</span><a class="headerlink" title="Permalink to this term" href="#%">¶</a></dt><dd><p>Toggle between showing CPU time as
                                 time or percentage.</p></dd><dt id="+"><span class="term">+, </span><span class="term">-</span><a class="headerlink" title="Permalink to this term" href="#+">¶</a></dt><dd><p>Increase
                                 or decrease refresh
-                                delay, respectively.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200022192"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214200021008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                delay, respectively.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199935792"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214199934608"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>,
                         <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
-                        <a href="top.html"><span class="citerefentry"><span class="refentrytitle">top</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/top.1.html"><span class="citerefentry"><span class="refentrytitle">top</span>(1)</span></a>
                 </p></div></div></body></html>
index 73f8e741898f7d4cd73aead32ae03ecc4d8cec75..8ee552a012a205f7160b256418aa5ac23350ddd0 100644 (file)
@@ -63,7 +63,7 @@
                 hierarchy, ordered by their CPU, memory, or disk I/O load. The
                 display is refreshed in regular intervals (by default
                 every 1s), similar in style to
-                <citerefentry><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+                <citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
                 If <command>systemd-cgtop</command> is not connected
                 to a tty, only one iteration is performed and no
                 columns headers are printed. This mode is suitable for
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
diff --git a/man/systemd-coredump.8 b/man/systemd-coredump.8
new file mode 100644 (file)
index 0000000..bccdbfb
--- /dev/null
@@ -0,0 +1,66 @@
+'\" t
+.TH "SYSTEMD\-COREDUMP" "8" "" "systemd 217" "systemd-coredump"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+systemd-coredump \- Log and store core dumps
+.SH "SYNOPSIS"
+.PP
+/usr/lib/systemd/systemd\-coredump
+.SH "DESCRIPTION"
+.PP
+\fBsystemd\-coredump\fR
+can be used as a helper binary by the kernel when a user space program receives a fatal signal and dumps core\&. For it to be used in this capacity, it must be specified by the
+\fIkernel\&.core_pattern\fR\ \&\fBsysctl\fR(8)
+setting\&. Systemd installs
+/usr/lib/sysctl\&.d/50\-coredump\&.conf
+which configures
+\fIkernel\&.core_pattern\fR
+to invoke
+\fBsystemd\-coredump\fR\&. This file may be masked or overriden to use a different setting following normal
+\fBsysctl.d\fR(5)
+rules\&.
+.PP
+The behaviour of a specific program upon reception of a signal is governed by a few factors which are described in detail in
+\fBcore\fR(5)\&. In particular, the coredump will only be processed when the related resource limits are high enough\&. For programs started by
+\fBsystemd\fR
+those may be set using
+\fILimitCore=\fR
+(see
+\fBsystemd.exec\fR(5))\&.
+.PP
+\fBsystemd\-coredump\fR
+will log the coredump including a backtrace if possible, and store the core (contents of process\*(Aq memory contents) in an external file on disk in
+/var/lib/systemd/coredump, or directly in the journal\&. This behaviour may be modified using
+\fBcoredump.conf\fR(5)\&.
+.PP
+Apart from the
+\fBjournalctl\fR(1)
+log viewer,
+\fBcoredumpctl\fR(1)
+may be used to list and extract coredumps\&.
+.SH "SEE ALSO"
+.PP
+\fBcoredump.conf\fR(5),
+\fBcoredumpctl\fR(1),
+\fBsystemd-journald.service\fR(8),
+\fBcore\fR(5),
+\fBsysctl.d\fR(5),
+\fBsystemd-sysctl.service\fR(8)\&.
diff --git a/man/systemd-coredump.html b/man/systemd-coredump.html
new file mode 100644 (file)
index 0000000..5f85f61
--- /dev/null
@@ -0,0 +1,56 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-coredump</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-coredump"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-coredump — Log and store core dumps</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/systemd-coredump</code></p></div><div class="refsect1"><a name="idm214189554448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-coredump</strong></span> can be used as a helper
+    binary by the kernel when a user space program receives a fatal
+    signal and dumps core. For it to be used in this capacity, it must
+    be specified by the
+    <code class="varname">kernel.core_pattern</code> <a href="http://man7.org/linux/man-pages/man8/sysctl.8.html"><span class="citerefentry"><span class="refentrytitle">sysctl</span>(8)</span></a>
+    setting. Systemd installs
+    <code class="filename">/usr/lib/sysctl.d/50-coredump.conf</code> which
+    configures <code class="varname">kernel.core_pattern</code> to invoke
+    <span class="command"><strong>systemd-coredump</strong></span>. This file may be masked or
+    overriden to use a different setting following normal
+    <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a> rules.</p><p>The behaviour of a specific program upon reception of a
+    signal is governed by a few factors which are described in detail
+    in <a href="http://man7.org/linux/man-pages/man5/core.5.html"><span class="citerefentry"><span class="refentrytitle">core</span>(5)</span></a>.
+    In particular, the coredump will only be processed when the
+    related resource limits are high enough. For programs started by
+    <span class="command"><strong>systemd</strong></span> those may be set using
+    <code class="varname">LimitCore=</code> (see
+    <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>).
+    </p><p><span class="command"><strong>systemd-coredump</strong></span> will log the coredump
+    including a backtrace if possible, and store the core (contents of
+    process' memory contents) in an external file on disk in
+    <code class="filename">/var/lib/systemd/coredump</code>, or directly in
+    the journal. This behaviour may be modified using
+    <a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>.</p><p>Apart from the
+    <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>
+    log viewer,
+    <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>
+    may be used to list and extract coredumps.</p></div><div class="refsect1"><a name="idm214189539728"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>,
+      <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>,
+      <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
+      <a href="http://man7.org/linux/man-pages/man5/core.5.html"><span class="citerefentry"><span class="refentrytitle">core</span>(5)</span></a>,
+      <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>,
+      <a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a>.
+    </p></div></div></body></html>
diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml
new file mode 100644 (file)
index 0000000..b83b278
--- /dev/null
@@ -0,0 +1,105 @@
+<?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">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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="systemd-coredump" conditional='ENABLE_COREDUMP'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>systemd-coredump</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Lennart</firstname>
+        <surname>Poettering</surname>
+        <email>lennart@poettering.net</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>systemd-coredump</refentrytitle>
+    <manvolnum>8</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>systemd-coredump</refname>
+    <refpurpose>Log and store core dumps</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <para><filename>/usr/lib/systemd/systemd-coredump</filename></para>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><command>systemd-coredump</command> can be used as a helper
+    binary by the kernel when a user space program receives a fatal
+    signal and dumps core. For it to be used in this capacity, it must
+    be specified by the
+    <varname>kernel.core_pattern</varname> <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    setting. Systemd installs
+    <filename>/usr/lib/sysctl.d/50-coredump.conf</filename> which
+    configures <varname>kernel.core_pattern</varname> to invoke
+    <command>systemd-coredump</command>. This file may be masked or
+    overriden to use a different setting following normal
+    <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> rules.</para>
+
+    <para>The behaviour of a specific program upon reception of a
+    signal is governed by a few factors which are described in detail
+    in <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+    In particular, the coredump will only be processed when the
+    related resource limits are high enough. For programs started by
+    <command>systemd</command> those may be set using
+    <varname>LimitCore=</varname> (see
+    <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+    </para>
+
+    <para><command>systemd-coredump</command> will log the coredump
+    including a backtrace if possible, and store the core (contents of
+    process' memory contents) in an external file on disk in
+    <filename>/var/lib/systemd/coredump</filename>, or directly in
+    the journal. This behaviour may be modified using
+    <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+
+    <para>Apart from the
+    <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    log viewer,
+    <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    may be used to list and extract coredumps.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para>
+      <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+    </para>
+  </refsect1>
+</refentry>
index a85ee5876ad4074600218284d6f453925921407c..2deec1892598f4797e6fefef63e52cc5ffe59ff4 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-CRYPTSETUP\-GENERATOR" "8" "" "systemd 215" "systemd-cryptsetup-generator"
+.TH "SYSTEMD\-CRYPTSETUP\-GENERATOR" "8" "" "systemd 217" "systemd-cryptsetup-generator"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index f3dfb64fcac0e0300dc8a6b4eb82694ff9d65cd1..5cbd6ba8736ffe2af46ebda57f3472ec6bdd2f41 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-cryptsetup-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cryptsetup-generator — Unit generator for <code class="filename">/etc/crypttab</code></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-cryptsetup-generator</code></p></div><div class="refsect1"><a name="idm214192676864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-cryptsetup-generator</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-cryptsetup-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cryptsetup-generator — Unit generator for <code class="filename">/etc/crypttab</code></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-cryptsetup-generator</code></p></div><div class="refsect1"><a name="idm214187720112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-cryptsetup-generator</code>
                 is a generator that translates
                 <code class="filename">/etc/crypttab</code> into native systemd
                 units early at boot and when configuration of the
@@ -27,7 +27,7 @@
                 <a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a>
                 units as necessary.</p><p><code class="filename">systemd-cryptsetup-generator</code>
                 implements the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Generators" target="_top">generator
-                specification</a>.</p></div><div class="refsect1"><a name="idm214192674672"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-cryptsetup-generator</code> understands
+                specification</a>.</p></div><div class="refsect1"><a name="idm214187714944"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-cryptsetup-generator</code> understands
                 the following kernel command line parameters:</p><div class="variablelist"><dl class="variablelist"><dt id="luks="><span class="term"><code class="varname">luks=</code>, </span><span class="term"><code class="varname">rd.luks=</code></span><a class="headerlink" title="Permalink to this term" href="#luks=">¶</a></dt><dd><p>Takes a boolean
                                 argument. Defaults to
                                 "<code class="literal">yes</code>". If
@@ -90,7 +90,7 @@
                                 (initrd) while
                                 <code class="varname">luks.key=</code> is
                                 honored by both the main system and
-                                the initrd.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192788848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                the initrd.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191633376"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>,
                         <a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a>,
index 5a165512d3aa2133be8deb0ce23e2dc599937a8b..bb64f551ca5f8ffd686f24be3e0f8a79095646a7 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-cryptsetup@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cryptsetup@.service, systemd-cryptsetup — Full disk decryption logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-cryptsetup@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-cryptsetup</code></p></div><div class="refsect1"><a name="idm214177258816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-cryptsetup@.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-cryptsetup@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cryptsetup@.service, systemd-cryptsetup — Full disk decryption logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-cryptsetup@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-cryptsetup</code></p></div><div class="refsect1"><a name="idm214188628768"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-cryptsetup@.service</code>
                 is a service responsible for setting up encrypted
                 block devices. It is instantiated for each device that
                 requires decryption for access.</p><p><code class="filename">systemd-cryptsetup@.service</code>
@@ -31,7 +31,7 @@
                 <code class="filename">/etc/crypttab</code> is translated into
                 <code class="filename">systemd-cryptsetup@.service</code> units
                 by
-                <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214173494288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214188622256"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>,
                         <a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>,
index 94285dabe1aee9e7d4fbb0033d2a43743a6c9538..543a0707b61108f296571838427cc04a09eb6d4c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-CRYPTSETUP@\&.SERVICE" "8" "" "systemd 215" "systemd-cryptsetup@.service"
+.TH "SYSTEMD\-CRYPTSETUP@\&.SERVICE" "8" "" "systemd 217" "systemd-cryptsetup@.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 5a165512d3aa2133be8deb0ce23e2dc599937a8b..bb64f551ca5f8ffd686f24be3e0f8a79095646a7 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-cryptsetup@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cryptsetup@.service, systemd-cryptsetup — Full disk decryption logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-cryptsetup@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-cryptsetup</code></p></div><div class="refsect1"><a name="idm214177258816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-cryptsetup@.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-cryptsetup@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-cryptsetup@.service, systemd-cryptsetup — Full disk decryption logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-cryptsetup@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-cryptsetup</code></p></div><div class="refsect1"><a name="idm214188628768"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-cryptsetup@.service</code>
                 is a service responsible for setting up encrypted
                 block devices. It is instantiated for each device that
                 requires decryption for access.</p><p><code class="filename">systemd-cryptsetup@.service</code>
@@ -31,7 +31,7 @@
                 <code class="filename">/etc/crypttab</code> is translated into
                 <code class="filename">systemd-cryptsetup@.service</code> units
                 by
-                <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214173494288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214188622256"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>,
                         <a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>,
index 1e435a98d4682288c21fb8a78994853ff7b88531..f608caa78eb2f6ecc888b72e9b1ba362ff839e87 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-DEBUG\-GENERATOR" "8" "" "systemd 215" "systemd-debug-generator"
+.TH "SYSTEMD\-DEBUG\-GENERATOR" "8" "" "systemd 217" "systemd-debug-generator"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -38,7 +38,7 @@ command\&. This is useful to boot with certain units removed from the initial bo
 .PP
 If the
 \fBsystemd\&.wants=\fR
-option is specified and followed by a unit name, a start job for this unit is added to the initial transaction\&. This is useful to start one ore more additional units at boot\&. May be specified more than once\&.
+option is specified and followed by a unit name, a start job for this unit is added to the initial transaction\&. This is useful to start one or more additional units at boot\&. May be specified more than once\&.
 .PP
 If the
 \fBsystemd\&.debug\-shell\fR
index 80ec5a531a43fea052e62c4614dba88bbf804c1d..08e98727633d146267007954ed48c18dced2c421 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-debug-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-debug-generator — Generator for enabling a runtime debug shell and masking specific units at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-debug-generator</code></p></div><div class="refsect1"><a name="idm214183945248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-debug-generator</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-debug-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-debug-generator — Generator for enabling a runtime debug shell and masking specific units at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-debug-generator</code></p></div><div class="refsect1"><a name="idm214191671520"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-debug-generator</code> is
                 a generator that reads the kernel command line and
                 understands three options:</p><p>If the <code class="option">systemd.mask=</code> option is
                 specified and followed by a unit name, this unit is
@@ -31,7 +31,7 @@
                 specified more than once.</p><p>If the <code class="option">systemd.wants=</code> option is
                 specified and followed by a unit name, a start job for
                 this unit is added to the initial transaction. This is
-                useful to start one ore more additional units at
+                useful to start one or more additional units at
                 boot. May be specified more than once.</p><p>If the <code class="option">systemd.debug-shell</code>
                 option is specified, the debug shell service
                 "<code class="literal">debug-shell.service</code>" is pulled into
@@ -41,7 +41,7 @@
                 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>'s
                 <span class="command"><strong>enable</strong></span> command.</p><p><code class="filename">systemd-debug-generator</code>
                 implements the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Generators" target="_top">generator
-                specification</a>.</p></div><div class="refsect1"><a name="idm214187199856"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                specification</a>.</p></div><div class="refsect1"><a name="idm214191542208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>
index ce4750e530150bf38030f603352bf755917c5e05..a2bef5fe28397e2188662c780724f8074761dc42 100644 (file)
@@ -68,7 +68,7 @@
                 <para>If the <option>systemd.wants=</option> option is
                 specified and followed by a unit name, a start job for
                 this unit is added to the initial transaction. This is
-                useful to start one ore more additional units at
+                useful to start one or more additional units at
                 boot. May be specified more than once.</para>
 
                 <para>If the <option>systemd.debug-shell</option>
index 9a303508b8756cd93c6ed9b562542ec2f9d6d703..4bcf856c919708a7de7d8e05f7b248fe069dfece 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-DELTA" "1" "" "systemd 215" "systemd-delta"
+.TH "SYSTEMD\-DELTA" "1" "" "systemd 217" "systemd-delta"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index c2364f006280eac194f871a8c0a12b57af92d7e0..18306c7d5179925ebe493c1e8304214016d2253d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-delta"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-delta — Find overridden configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-delta</code>  [OPTIONS...] [<em class="replaceable"><code>PREFIX</code></em>[<span class="optional">/<em class="replaceable"><code>SUFFIX</code></em></span>]|<em class="replaceable"><code>SUFFIX</code></em>...]</p></div></div><div class="refsect1"><a name="idm214187729312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-delta</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-delta"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-delta — Find overridden configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-delta</code>  [OPTIONS...] [<em class="replaceable"><code>PREFIX</code></em>[<span class="optional">/<em class="replaceable"><code>SUFFIX</code></em></span>]|<em class="replaceable"><code>SUFFIX</code></em>...]</p></div></div><div class="refsect1"><a name="idm214199855760"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-delta</strong></span> may be used to
                 identify and compare configuration files that override
                 other configuration files. Files in
                 <code class="filename">/etc</code> have highest priority, files
@@ -57,7 +57,7 @@
                 all configuration files will be analyzed. If the
                 commandline argument is not given at all, all
                 configuration files will be analyzed. See below for
-                some examples.</p></div><div class="refsect1"><a name="idm214191606976"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--type=</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>When listing the
+                some examples.</p></div><div class="refsect1"><a name="idm214199920224"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--type=</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>When listing the
                                 differences, only list those that are
                                 asked for. The list itself is a
                                 comma-separated list of desired
@@ -75,8 +75,8 @@
                                 diff as well. This option takes a
                                 boolean argument. If omitted, it defaults
                                 to <code class="option">true</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191664528"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>To see all local configuration:</p><pre class="programlisting">systemd-delta</pre><p>To see all runtime configuration:</p><pre class="programlisting">systemd-delta /run</pre><p>To see all system unit configuration changes:</p><pre class="programlisting">systemd-delta systemd/system</pre><p>To see all runtime "drop-in" changes for system units:</p><pre class="programlisting">systemd-delta --type=extended /run/systemd/system</pre></div><div class="refsect1"><a name="idm214191659360"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214191658176"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199894240"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>To see all local configuration:</p><pre class="programlisting">systemd-delta</pre><p>To see all runtime configuration:</p><pre class="programlisting">systemd-delta /run</pre><p>To see all system unit configuration changes:</p><pre class="programlisting">systemd-delta systemd/system</pre><p>To see all runtime "drop-in" changes for system units:</p><pre class="programlisting">systemd-delta --type=extended /run/systemd/system</pre></div><div class="refsect1"><a name="idm214199889120"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214199887936"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
                 </p></div></div></body></html>
index 3bcdf53b3b55a9bb8f50ad5239983f4480374a33..d7edffb9d287c49e0480848eb804075a5ec5805b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-DETECT\-VIRT" "1" "" "systemd 215" "systemd-detect-virt"
+.TH "SYSTEMD\-DETECT\-VIRT" "1" "" "systemd 217" "systemd-detect-virt"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -28,23 +28,124 @@ systemd-detect-virt \- Detect execution in a virtualized environment
 .PP
 \fBsystemd\-detect\-virt\fR
 detects execution in a virtualized environment\&. It identifies the virtualization technology and can distinguish full VM virtualization from container virtualization\&.
+systemd\-detect\-virt
+exits with a return value of 0 (success) if a virtualization technology is detected, and non\-zero (error) otherwise\&. By default any type of virtualization is detected, and the options
+\fB\-\-container\fR
+and
+\fB\-\-vm\fR
+can be used to limit what types of virtualization are detected\&.
 .PP
 When executed without
 \fB\-\-quiet\fR
 will print a short identifier for the detected virtualization technology\&. The following technologies are currently identified:
-\fIqemu\fR,
-\fIkvm\fR,
-\fIvmware\fR,
-\fImicrosoft\fR,
-\fIoracle\fR,
-\fIxen\fR,
-\fIbochs\fR,
-\fIchroot\fR,
-\fIuml\fR,
-\fIopenvz\fR,
-\fIlxc\fR,
-\fIlxc\-libvirt\fR,
-\fIsystemd\-nspawn\fR\&.
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.B Table\ \&1.\ \&Known virtualization technologies (both VM, i.e. full hardware virtualization, and container, i.e. shared kernel virtualization)
+.TS
+allbox tab(:);
+lB lB lB.
+T{
+Type
+T}:T{
+ID
+T}:T{
+Product
+T}
+.T&
+l l l
+^ l l
+^ l l
+^ l l
+^ l l
+^ l l
+^ l l
+^ l l
+^ l l
+l l l
+^ l l
+^ l l
+^ l l
+^ l l
+^.
+T{
+VM
+T}:T{
+\fIqemu\fR
+T}:T{
+QEMU software virtualization
+T}
+:T{
+\fIkvm\fR
+T}:T{
+Linux KVM kernel virtual machine
+T}
+:T{
+\fIzvm\fR
+T}:T{
+s390 z/VM
+T}
+:T{
+\fIvmware\fR
+T}:T{
+VMware Workstation or Server, and related products
+T}
+:T{
+\fImicrosoft\fR
+T}:T{
+Hyper\-V, also known as Viridian or Windows Server Virtualization
+T}
+:T{
+\fIoracle\fR
+T}:T{
+Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)
+T}
+:T{
+\fIxen\fR
+T}:T{
+Xen hypervisor (only domU, not dom0)
+T}
+:T{
+\fIbochs\fR
+T}:T{
+Bochs Emulator
+T}
+:T{
+\fIuml\fR
+T}:T{
+User\-mode Linux
+T}
+T{
+container
+T}:T{
+\fIopenvz\fR
+T}:T{
+OpenVZ/Virtuozzo
+T}
+:T{
+\fIlxc\fR
+T}:T{
+Linux container implementation by LXC
+T}
+:T{
+\fIlxc\-libvirt\fR
+T}:T{
+Linux container implementation by libvirt
+T}
+:T{
+\fIsystemd\-nspawn\fR
+T}:T{
+systemd\*(Aqs minimal container implementation, see \fBsystemd-nspawn\fR(1)
+T}
+:T{
+\fIdocker\fR
+T}:T{
+Docker container manager
+T}
+.TE
+.sp 1
 .PP
 If multiple virtualization solutions are used, only the "innermost" is detected and identified\&. That means if both VM virtualization and container virtualization are used in conjunction, only the latter will be identified (unless
 \fB\-\-vm\fR
@@ -82,4 +183,5 @@ Print a short version string and exit\&.
 If a virtualization technology is detected, 0 is returned, a non\-zero code otherwise\&.
 .SH "SEE ALSO"
 .PP
-\fBsystemd\fR(1)
+\fBsystemd\fR(1),
+\fBsystemd-nspawn\fR(1)
index 503292fa5025742d773a357232af5ef0893f53e4..f823d3038c83ae0a9569284e3128ba62bf8d7188 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-detect-virt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-detect-virt — Detect execution in a virtualized environment</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-detect-virt [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214176292544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-detect-virt</strong></span> detects
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-detect-virt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-detect-virt — Detect execution in a virtualized environment</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-detect-virt [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm214177448704"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-detect-virt</strong></span> detects
                 execution in a virtualized environment. It identifies
                 the virtualization technology and can distinguish full
                 VM virtualization from container
-                virtualization.</p><p>When executed without <code class="option">--quiet</code>
+                virtualization. <code class="filename">systemd-detect-virt</code>
+                exits with a return value of 0 (success) if a
+                virtualization technology is detected, and non-zero
+                (error) otherwise. By default any type of
+                virtualization is detected, and the options
+                <code class="option">--container</code> and <code class="option">--vm</code>
+                can be used to limit what types of virtualization are
+                detected.</p><p>When executed without <code class="option">--quiet</code>
                 will print a short identifier for the detected
                 virtualization technology. The following technologies
-                are currently identified: <code class="varname">qemu</code>,
-                <code class="varname">kvm</code>, <code class="varname">vmware</code>,
-                <code class="varname">microsoft</code>,
-                <code class="varname">oracle</code>, <code class="varname">xen</code>,
-                <code class="varname">bochs</code>, <code class="varname">chroot</code>,
-                <code class="varname">uml</code>,
-                <code class="varname">openvz</code>, <code class="varname">lxc</code>,
-                <code class="varname">lxc-libvirt</code>,
-                <code class="varname">systemd-nspawn</code>.</p><p>If multiple virtualization solutions are used,
+                are currently identified:</p><div class="table"><a name="idm214177443872"></a><p class="title"><b>Table 1. Known virtualization technologies (both
+                  VM, i.e. full hardware virtualization,
+                  and container, i.e. shared kernel virtualization)</b></p><div class="table-contents"><table summary="Known virtualization technologies (both
+                  VM, i.e. full hardware virtualization,
+                  and container, i.e. shared kernel virtualization)" border="1"><colgroup><col align="left" class="type"><col align="left" class="id"><col align="left" class="product"></colgroup><thead><tr><th align="left">Type</th><th align="left">ID</th><th align="left">Product</th></tr></thead><tbody><tr><td rowspan="9" align="left">VM</td><td align="left"><code class="varname">qemu</code></td><td align="left">QEMU software virtualization</td></tr><tr><td align="left"><code class="varname">kvm</code></td><td align="left">Linux KVM kernel virtual machine</td></tr><tr><td align="left"><code class="varname">zvm</code></td><td align="left">s390 z/VM</td></tr><tr><td align="left"><code class="varname">vmware</code></td><td align="left">VMware Workstation or Server, and related products</td></tr><tr><td align="left"><code class="varname">microsoft</code></td><td align="left">Hyper-V, also known as Viridian or Windows Server Virtualization</td></tr><tr><td align="left"><code class="varname">oracle</code></td><td align="left">Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</td></tr><tr><td align="left"><code class="varname">xen</code></td><td align="left">Xen hypervisor (only domU, not dom0)</td></tr><tr><td align="left"><code class="varname">bochs</code></td><td align="left">Bochs Emulator</td></tr><tr><td align="left"><code class="varname">uml</code></td><td align="left">User-mode Linux</td></tr><tr><td rowspan="6" align="left">container</td><td align="left"><code class="varname">openvz</code></td><td align="left">OpenVZ/Virtuozzo</td></tr><tr><td align="left"><code class="varname">lxc</code></td><td align="left">Linux container implementation by LXC</td></tr><tr><td align="left"><code class="varname">lxc-libvirt</code></td><td align="left">Linux container implementation by libvirt</td></tr><tr><td align="left"><code class="varname">systemd-nspawn</code></td><td align="left">systemd's minimal container implementation, see <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></td></tr><tr><td align="left"><code class="varname">docker</code></td><td align="left">Docker container manager</td></tr></tbody></table></div></div><br class="table-break"><p>If multiple virtualization solutions are used,
                 only the "innermost" is detected and identified. That
                 means if both VM virtualization and container
                 virtualization are used in conjunction, only the latter
                 will be identified (unless <code class="option">--vm</code> is
-                passed).</p></div><div class="refsect1"><a name="idm214180477776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-c"><span class="term"><code class="option">-c</code>, </span><span class="term"><code class="option">--container</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Only detects container
+                passed).</p></div><div class="refsect1"><a name="idm214177484544"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-c"><span class="term"><code class="option">-c</code>, </span><span class="term"><code class="option">--container</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Only detects container
                                 virtualization (i.e. shared kernel
                                 virtualization).</p></dd><dt id="-v"><span class="term"><code class="option">-v</code>, </span><span class="term"><code class="option">--vm</code></span><a class="headerlink" title="Permalink to this term" href="#-v">¶</a></dt><dd><p>Only detects VM
                                 virtualization (i.e. full hardware
                                 virtualization).</p></dd><dt id="-q"><span class="term"><code class="option">-q</code>, </span><span class="term"><code class="option">--quiet</code></span><a class="headerlink" title="Permalink to this term" href="#-q">¶</a></dt><dd><p>Suppress output of the
                                 virtualization technology
                                 identifier.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180374080"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>If a virtualization technology is detected, 0 is
-                returned, a non-zero code otherwise.</p></div><div class="refsect1"><a name="idm214180372784"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177474832"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>If a virtualization technology is detected, 0 is
+                returned, a non-zero code otherwise.</p></div><div class="refsect1"><a name="idm214177473536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>
                 </p></div></div></body></html>
index bdf220eb28ce0df05123a8bf0ee0ff1d64ac4ff5..d8e881cf2e82f49ed6b41207b84713ce7255f29e 100644 (file)
                 execution in a virtualized environment. It identifies
                 the virtualization technology and can distinguish full
                 VM virtualization from container
-                virtualization.</para>
+                virtualization. <filename>systemd-detect-virt</filename>
+                exits with a return value of 0 (success) if a
+                virtualization technology is detected, and non-zero
+                (error) otherwise. By default any type of
+                virtualization is detected, and the options
+                <option>--container</option> and <option>--vm</option>
+                can be used to limit what types of virtualization are
+                detected.</para>
 
                 <para>When executed without <option>--quiet</option>
                 will print a short identifier for the detected
                 virtualization technology. The following technologies
-                are currently identified: <varname>qemu</varname>,
-                <varname>kvm</varname>, <varname>vmware</varname>,
-                <varname>microsoft</varname>,
-                <varname>oracle</varname>, <varname>xen</varname>,
-                <varname>bochs</varname>, <varname>chroot</varname>,
-                <varname>uml</varname>,
-                <varname>openvz</varname>, <varname>lxc</varname>,
-                <varname>lxc-libvirt</varname>,
-                <varname>systemd-nspawn</varname>.</para>
+                are currently identified:</para>
+
+                <table>
+                  <title>Known virtualization technologies (both
+                  VM, i.e. full hardware virtualization,
+                  and container, i.e. shared kernel virtualization)</title>
+                  <tgroup cols='3' align='left' colsep='1' rowsep='1'>
+                    <colspec colname="type" />
+                    <colspec colname="id" />
+                    <colspec colname="product" />
+                    <thead>
+                      <row>
+                        <entry>Type</entry>
+                        <entry>ID</entry>
+                        <entry>Product</entry>
+                      </row>
+                    </thead>
+                    <tbody>
+                      <row>
+                        <entry morerows="8">VM</entry>
+                        <entry><varname>qemu</varname></entry>
+                        <entry>QEMU software virtualization</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>kvm</varname></entry>
+                        <entry>Linux KVM kernel virtual machine</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>zvm</varname></entry>
+                        <entry>s390 z/VM</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>vmware</varname></entry>
+                        <entry>VMware Workstation or Server, and related products</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>microsoft</varname></entry>
+                        <entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>oracle</varname></entry>
+                        <entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>xen</varname></entry>
+                        <entry>Xen hypervisor (only domU, not dom0)</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>bochs</varname></entry>
+                        <entry>Bochs Emulator</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>uml</varname></entry>
+                        <entry>User-mode Linux</entry>
+                      </row>
+
+                      <row>
+                        <entry morerows="5">container</entry>
+                        <entry><varname>openvz</varname></entry>
+                        <entry>OpenVZ/Virtuozzo</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>lxc</varname></entry>
+                        <entry>Linux container implementation by LXC</entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>lxc-libvirt</varname></entry>
+                        <entry>Linux container implementation by libvirt</entry>
+                      </row>
+
+                      <row>
+                         <entry><varname>systemd-nspawn</varname></entry>
+                         <entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
+                      </row>
+
+                      <row>
+                        <entry><varname>docker</varname></entry>
+                        <entry>Docker container manager</entry>
+                      </row>
+                    </tbody>
+                  </tgroup>
+                </table>
 
                 <para>If multiple virtualization solutions are used,
                 only the "innermost" is detected and identified. That
         <refsect1>
                 <title>See Also</title>
                 <para>
-                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index d1ebfbbd829f1413dd196af2b620f44b0f318a4c..33d07b9fb3655e270660598fe280139ba173367e 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-EFI\-BOOT\-GENERATOR" "8" "" "systemd 215" "systemd-efi-boot-generator"
+.TH "SYSTEMD\-EFI\-BOOT\-GENERATOR" "8" "" "systemd 217" "systemd-efi-boot-generator"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index e36a0c40bac71e723701d6f37be988b0d7e82a1d..b25e36ffb0cee0c6456686a75a48441fcc886bc1 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-efi-boot-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-efi-boot-generator — Generator for automatically mounting the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-efi-boot-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-efi-boot-generator — Generator for automatically mounting the
                 EFI System Partition used by the current boot to
-                <code class="filename">/boot</code></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-efi-boot-generator</code></p></div><div class="refsect1"><a name="idm214175786880"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-efi-boot-generator</code>
+                <code class="filename">/boot</code></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-efi-boot-generator</code></p></div><div class="refsect1"><a name="idm214188295760"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-efi-boot-generator</code>
                 is a generator that automatically creates mount and
                 automount units for the EFI System Partition (ESP),
                 mounting it to <code class="filename">/boot</code>. Note that
@@ -34,7 +34,7 @@
                 automount unit, the mount will only be activated
                 on-demand, when accessed.</p><p><code class="filename">systemd-efi-boot-generator</code>
                 implements the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Generators" target="_top">generator
-                specification</a>.</p></div><div class="refsect1"><a name="idm214178650096"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                specification</a>.</p></div><div class="refsect1"><a name="idm214188170192"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>,
                         <a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>,
diff --git a/man/systemd-escape.1 b/man/systemd-escape.1
new file mode 100644 (file)
index 0000000..cc5d1c2
--- /dev/null
@@ -0,0 +1,160 @@
+'\" t
+.TH "SYSTEMD\-ESCAPE" "1" "" "systemd 217" "systemd-escape"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+systemd-escape \- Escape strings for usage in system unit names
+.SH "SYNOPSIS"
+.HP \w'\fBsystemd\-escape\ \fR\fB[OPTIONS...]\fR\fB\ \fR\fB[STRING...]\fR\ 'u
+\fBsystemd\-escape \fR\fB[OPTIONS...]\fR\fB \fR\fB[STRING...]\fR
+.SH "DESCRIPTION"
+.PP
+\fBsystemd\-escape\fR
+may be used to escape strings for inclusion in systemd unit names\&. The command may be used to escape and to undo escaping of strings\&.
+.PP
+The command takes any number of strings on the command line, and will process them individually, one after the other\&. It will output them separated by spaces to stdout\&.
+.PP
+By default this command will escape the strings passed, unless
+\fB\-\-unescape\fR
+is passed which results in the inverse operation being applied\&. If
+\fB\-\-mangle\fR
+a special mode of escaping is applied instead, which assumes a string to be already escaped but will escape everything that appears obviously non\-escaped\&.
+.SH "OPTIONS"
+.PP
+The following options are understood:
+.PP
+\fB\-\-suffix=\fR
+.RS 4
+Appends the specified unit type suffix to the escaped string\&. Takes one of the unit types supported by systemd, such as
+"\&.service"
+or
+"\&.mount"\&. May not be used in conjunction with
+\fB\-\-template=\fR,
+\fB\-\-unescape\fR
+or
+\fB\-\-mangle\fR\&.
+.RE
+.PP
+\fB\-\-template=\fR
+.RS 4
+Inserts the escaped strings in a unit name template\&. Takes a unit name template such as
+foobar@\&.service
+May not be used in conjunction with
+\fB\-\-suffix=\fR,
+\fB\-\-unescape\fR
+or
+\fB\-\-mangle\fR\&.
+.RE
+.PP
+\fB\-\-path\fR, \fB\-p\fR
+.RS 4
+When escaping or unescaping a string, assume it refers to a file system path\&. This enables special processing of the initial
+"/"
+of the path\&.
+.RE
+.PP
+\fB\-\-unescape\fR
+.RS 4
+Instead of escaping the specified strings, undo the escaping, reversing the operation\&. May not be used in conjunction with
+\fB\-\-suffix=\fR,
+\fB\-\-template=\fR
+or
+\fB\-\-mangle\fR\&.
+.RE
+.PP
+\fB\-\-mangle\fR
+.RS 4
+Like
+\fB\-\-escape\fR, but only escape characters that are obviously not escaped yet, and possibly automatically append an appropriate unit type suffix to the string\&. May not be used in conjunction with
+\fB\-\-suffix=\fR,
+\fB\-\-template=\fR
+or
+\fB\-\-unescape\fR\&.
+.RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Print a short help text and exit\&.
+.RE
+.PP
+\fB\-\-version\fR
+.RS 4
+Print a short version string and exit\&.
+.RE
+.SH "EXAMPLES"
+.PP
+Escape a single string:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ systemd\-escape \*(AqHallöchen, Meister\*(Aq
+Hall\exc3\exb6chen\ex2c\ex20Meister
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+To undo escaping on a single string:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ systemd\-escape \-u \*(AqHall\exc3\exb6chen\ex2c\ex20Meister\*(Aq
+Hallöchen, Meister
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+To generate the mount unit for a path:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ systemd\-escape \-p \-\-suffix=mount "/tmp//waldi/foobar/"
+tmp\-waldi\-foobar\&.mount
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+To generate instance names of three strings
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ systemd\-escape \-\-template=systemd\-nspawn@\&.service \*(AqMy Container 1\*(Aq \*(Aqcontainerb\*(Aq \*(Aqcontainer/III\*(Aq
+systemd\-nspawn@My\ex20Container\ex201\&.service systemd\-nspawn@containerb\&.service systemd\-nspawn@container\-III\&.service
+.fi
+.if n \{\
+.RE
+.\}
+.SH "EXIT STATUS"
+.PP
+On success, 0 is returned, a non\-zero failure code otherwise\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsystemctl\fR(1)
diff --git a/man/systemd-escape.html b/man/systemd-escape.html
new file mode 100644 (file)
index 0000000..14d1d78
--- /dev/null
@@ -0,0 +1,79 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-escape</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-escape"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-escape — Escape strings for usage in system unit names</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-escape [OPTIONS...]  [STRING...]</code> </p></div></div><div class="refsect1"><a name="idm214186856320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-escape</strong></span> may be used to
+                escape strings for inclusion in systemd unit
+                names. The command may be used to escape and to undo
+                escaping of strings.</p><p>The command takes any number of strings on the
+                command line, and will process them individually, one
+                after the other. It will output them separated by
+                spaces to stdout.</p><p>By default this command will escape the strings
+                passed, unless <code class="option">--unescape</code> is passed
+                which results in the inverse operation being
+                applied. If <code class="option">--mangle</code> a special mode
+                of escaping is applied instead, which assumes a string
+                to be already escaped but will escape everything that
+                appears obviously non-escaped.</p></div><div class="refsect1"><a name="idm214186852208"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--suffix="><span class="term"><code class="option">--suffix=</code></span><a class="headerlink" title="Permalink to this term" href="#--suffix=">¶</a></dt><dd><p>Appends the specified
+                                unit type suffix to the escaped
+                                string. Takes one of the unit types
+                                supported by systemd, such as
+                                "<code class="literal">.service</code>" or
+                                "<code class="literal">.mount</code>". May not be
+                                used in conjunction with
+                                <code class="option">--template=</code>,
+                                <code class="option">--unescape</code> or
+                                <code class="option">--mangle</code>.</p></dd><dt id="--template="><span class="term"><code class="option">--template=</code></span><a class="headerlink" title="Permalink to this term" href="#--template=">¶</a></dt><dd><p>Inserts the escaped
+                                strings in a unit name template. Takes
+                                a unit name template such as
+                                <code class="filename">foobar@.service</code>
+                                May not be used in conjunction with
+                                <code class="option">--suffix=</code>,
+                                <code class="option">--unescape</code> or
+                                <code class="option">--mangle</code>.</p></dd><dt id="--path"><span class="term"><code class="option">--path</code>, </span><span class="term"><code class="option">-p</code></span><a class="headerlink" title="Permalink to this term" href="#--path">¶</a></dt><dd><p>When escaping or
+                                unescaping a string, assume it refers
+                                to a file system path. This enables
+                                special processing of the initial
+                                "<code class="literal">/</code>" of the
+                                path.</p></dd><dt id="--unescape"><span class="term"><code class="option">--unescape</code></span><a class="headerlink" title="Permalink to this term" href="#--unescape">¶</a></dt><dd><p>Instead of escaping
+                                the specified strings, undo the
+                                escaping, reversing the operation. May
+                                not be used in conjunction with
+                                <code class="option">--suffix=</code>,
+                                <code class="option">--template=</code> or
+                                <code class="option">--mangle</code>.</p></dd><dt id="--mangle"><span class="term"><code class="option">--mangle</code></span><a class="headerlink" title="Permalink to this term" href="#--mangle">¶</a></dt><dd><p>Like
+                                <code class="option">--escape</code>, but only
+                                escape characters that are obviously
+                                not escaped yet, and possibly
+                                automatically append an appropriate
+                                unit type suffix to the string. May
+                                not be used in conjunction with
+                                <code class="option">--suffix=</code>,
+                                <code class="option">--template=</code> or
+                                <code class="option">--unescape</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186907120"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Escape a single string:</p><pre class="programlisting">$ systemd-escape 'Hallöchen, Meister'
+Hall\xc3\xb6chen\x2c\x20Meister</pre><p>To undo escaping on a single string:</p><pre class="programlisting">$ systemd-escape -u 'Hall\xc3\xb6chen\x2c\x20Meister'
+Hallöchen, Meister</pre><p>To generate the mount unit for a path:</p><pre class="programlisting">$ systemd-escape -p --suffix=mount "/tmp//waldi/foobar/"
+tmp-waldi-foobar.mount</pre><p>To generate instance names of three strings</p><pre class="programlisting">$ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III'
+systemd-nspawn@My\x20Container\x201.service systemd-nspawn@containerb.service systemd-nspawn@container-III.service</pre></div><div class="refsect1"><a name="idm214186894128"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214186892944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
+                </p></div></div></body></html>
diff --git a/man/systemd-escape.xml b/man/systemd-escape.xml
new file mode 100644 (file)
index 0000000..b2a4a9c
--- /dev/null
@@ -0,0 +1,193 @@
+<?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">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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="systemd-escape"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+        <refentryinfo>
+                <title>systemd-escape</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart@poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>systemd-escape</refentrytitle>
+                <manvolnum>1</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>systemd-escape</refname>
+                <refpurpose>Escape strings for usage in system unit names</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <cmdsynopsis>
+                        <command>systemd-escape <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">STRING</arg></command>
+                </cmdsynopsis>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><command>systemd-escape</command> may be used to
+                escape strings for inclusion in systemd unit
+                names. The command may be used to escape and to undo
+                escaping of strings.</para>
+
+                <para>The command takes any number of strings on the
+                command line, and will process them individually, one
+                after the other. It will output them separated by
+                spaces to stdout.</para>
+
+                <para>By default this command will escape the strings
+                passed, unless <option>--unescape</option> is passed
+                which results in the inverse operation being
+                applied. If <option>--mangle</option> a special mode
+                of escaping is applied instead, which assumes a string
+                to be already escaped but will escape everything that
+                appears obviously non-escaped.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Options</title>
+
+                <para>The following options are understood:</para>
+
+                <variablelist>
+                        <varlistentry>
+                                <term><option>--suffix=</option></term>
+
+                                <listitem><para>Appends the specified
+                                unit type suffix to the escaped
+                                string. Takes one of the unit types
+                                supported by systemd, such as
+                                <literal>.service</literal> or
+                                <literal>.mount</literal>. May not be
+                                used in conjunction with
+                                <option>--template=</option>,
+                                <option>--unescape</option> or
+                                <option>--mangle</option>.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--template=</option></term>
+
+                                <listitem><para>Inserts the escaped
+                                strings in a unit name template. Takes
+                                a unit name template such as
+                                <filename>foobar@.service</filename>
+                                May not be used in conjunction with
+                                <option>--suffix=</option>,
+                                <option>--unescape</option> or
+                                <option>--mangle</option>.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--path</option></term>
+                                <term><option>-p</option></term>
+
+                                <listitem><para>When escaping or
+                                unescaping a string, assume it refers
+                                to a file system path. This enables
+                                special processing of the initial
+                                <literal>/</literal> of the
+                                path.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--unescape</option></term>
+
+                                <listitem><para>Instead of escaping
+                                the specified strings, undo the
+                                escaping, reversing the operation. May
+                                not be used in conjunction with
+                                <option>--suffix=</option>,
+                                <option>--template=</option> or
+                                <option>--mangle</option>.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--mangle</option></term>
+
+                                <listitem><para>Like
+                                <option>--escape</option>, but only
+                                escape characters that are obviously
+                                not escaped yet, and possibly
+                                automatically append an appropriate
+                                unit type suffix to the string. May
+                                not be used in conjunction with
+                                <option>--suffix=</option>,
+                                <option>--template=</option> or
+                                <option>--unescape</option>.</para></listitem>
+                        </varlistentry>
+
+                        <xi:include href="standard-options.xml" xpointer="help" />
+                        <xi:include href="standard-options.xml" xpointer="version" />
+                </variablelist>
+
+        </refsect1>
+
+        <refsect1>
+                <title>Examples</title>
+
+                <para>Escape a single string:</para>
+                <programlisting>$ systemd-escape 'Hallöchen, Meister'
+Hall\xc3\xb6chen\x2c\x20Meister</programlisting>
+
+                <para>To undo escaping on a single string:</para>
+                <programlisting>$ systemd-escape -u 'Hall\xc3\xb6chen\x2c\x20Meister'
+Hallöchen, Meister</programlisting>
+
+                <para>To generate the mount unit for a path:</para>
+                <programlisting>$ systemd-escape -p --suffix=mount "/tmp//waldi/foobar/"
+tmp-waldi-foobar.mount</programlisting>
+
+                <para>To generate instance names of three strings</para>
+                <programlisting>$ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III'
+systemd-nspawn@My\x20Container\x201.service systemd-nspawn@containerb.service systemd-nspawn@container-III.service</programlisting>
+        </refsect1>
+
+        <refsect1>
+                <title>Exit status</title>
+
+                <para>On success, 0 is returned, a non-zero failure
+                code otherwise.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
diff --git a/man/systemd-firstboot.1 b/man/systemd-firstboot.1
new file mode 100644 (file)
index 0000000..2ec8f9b
--- /dev/null
@@ -0,0 +1,227 @@
+'\" t
+.TH "SYSTEMD\-FIRSTBOOT" "1" "" "systemd 217" "systemd-firstboot"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+systemd-firstboot, systemd-firstboot.service \- Initialize basic system settings on or before the first boot\-up of a system
+.SH "SYNOPSIS"
+.HP \w'\fBsystemd\-firstboot\fR\ 'u
+\fBsystemd\-firstboot\fR [OPTIONS...]
+.PP
+systemd\-firstboot\&.service
+.SH "DESCRIPTION"
+.PP
+\fBsystemd\-firstboot\fR
+initializes the most basic system settings interactively on the first boot, or optionally non\-interactively when a system image is created\&. The following settings may be set up:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The system locale, more specifically the two locale variables
+\fILANG=\fR
+and
+\fILC_MESSAGES\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The system time zone
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The system host name
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The machine ID of the system
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The root user\*(Aqs password
+.RE
+.PP
+Each of the fields may either be queried interactively from the users, set non\-interactively on the tool\*(Aqs command line, or be copied from a host system that is used to set up the system image\&.
+.PP
+If a setting is already initialized it will not be overwritten and the user will not be prompted for the setting\&.
+.PP
+Note that this tool operates directly on the file system and does not involve any running system services, unlike
+\fBlocalectl\fR(1),
+\fBtimedatectl\fR(1)
+or
+\fBhostnamectl\fR(1)\&. This allows
+\fBsystemd\-firstboot\fR
+to operate on mounted but not booted disk images and in early boot\&. It is not recommended to use
+\fBsystemd\-firstboot\fR
+on the running system while it is up\&.
+.SH "OPTIONS"
+.PP
+The following options are understood:
+.PP
+\fB\-\-root=\fR\fB\fIroot\fR\fR
+.RS 4
+Takes a directory path as an argument\&. All paths will be prefixed with the given alternate
+\fIroot\fR
+path, including config search paths\&. This is useful to operate on a system image mounted to the specified directory instead of the host system itself\&.
+.RE
+.PP
+\fB\-\-locale=\fR\fB\fILOCALE\fR\fR, \fB\-\-locale\-messages=\fR\fB\fILOCALE\fR\fR
+.RS 4
+Sets the system locale, more specifically the
+\fILANG=\fR
+and
+\fILC_MESSAGES\fR
+settings\&. The argument should be a valid locale identifier, such as
+"de_DE\&.UTF\-8"\&. This controls the
+\fBlocale.conf\fR(5)
+configuration file\&.
+.RE
+.PP
+\fB\-\-timezone=\fR\fB\fITIMEZONE\fR\fR
+.RS 4
+Sets the system time zone\&. The argument should be a valid time zone identifier, such as
+"Europe/Berlin"\&. This controls the
+\fBlocaltime\fR(5)
+symlink\&.
+.RE
+.PP
+\fB\-\-hostname=\fR\fB\fIHOSTNAME\fR\fR
+.RS 4
+Sets the system hostname\&. The argument should be a host name, compatible with DNS\&. This controls the
+\fBhostname\fR(5)
+configuration file\&.
+.RE
+.PP
+\fB\-\-machine\-id=\fR\fB\fIID\fR\fR
+.RS 4
+Sets the system\*(Aqs machine ID\&. This controls the
+\fBmachine-id\fR(5)
+file\&.
+.RE
+.PP
+\fB\-\-root\-password=\fR\fB\fIPASSWORD\fR\fR, \fB\-\-root\-password\-file=\fR\fB\fIPATH\fR\fR
+.RS 4
+Sets the password of the system\*(Aqs root user\&. This creates a
+\fBshadow\fR(5)
+file\&. This setting exists in two forms:
+\fB\-\-root\-password=\fR
+accepts the password to set directly on the command line,
+\fB\-\-root\-password\-file=\fR
+reads it from a file\&. Note that it is not recommended specifying passwords on the command line as other users might be able to see them simply by invoking
+\fBps\fR(1)\&.
+.RE
+.PP
+\fB\-\-prompt\-locale\fR, \fB\-\-prompt\-timezone\fR, \fB\-\-prompt\-hostname\fR, \fB\-\-prompt\-root\-password\fR
+.RS 4
+.PP
+Prompt the user interactively for a specific basic setting\&. Note that any explicit configuration settings specified on the command line take precedence, and the user is not prompted for it\&.
+.RE
+.PP
+\fB\-\-prompt\fR
+.RS 4
+.PP
+Query the user for locale, timezone, hostname and root password\&. This is equivalent to specifying
+\fB\-\-prompt\-locale\fR,
+\fB\-\-prompt\-timezone\fR,
+\fB\-\-prompt\-hostname\fR,
+\fB\-\-prompt\-root\-password\fR
+in combination\&.
+.RE
+.PP
+\fB\-\-copy\-locale\fR, \fB\-\-copy\-timezone\fR, \fB\-\-copy\-root\-password\fR
+.RS 4
+.PP
+Copy a specific basic setting from the host\&. This only works in combination with
+\fB\-\-root=\fR
+(see above)\&.
+.RE
+.PP
+\fB\-\-copy\fR
+.RS 4
+.PP
+Copy locale, time zone and root password from the host\&. This is equivalent to specifying
+\fB\-\-copy\-locale\fR,
+\fB\-\-copy\-timezone\fR,
+\fB\-\-copy\-root\-password\fR
+in combination\&.
+.RE
+.PP
+\fB\-\-setup\-machine\-id\fR
+.RS 4
+.PP
+Initialize the system\*(Aqs machine ID to a random ID\&. This only works in combination with
+\fB\-\-root=\fR\&.
+.RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Print a short help text and exit\&.
+.RE
+.PP
+\fB\-\-version\fR
+.RS 4
+Print a short version string and exit\&.
+.RE
+.SH "EXIT STATUS"
+.PP
+On success, 0 is returned, a non\-zero failure code otherwise\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBlocale.conf\fR(5),
+\fBlocaltime\fR(5),
+\fBhostname\fR(5),
+\fBmachine-id\fR(5),
+\fBshadow\fR(5),
+\fBsystemd-machine-id-setup\fR(1),
+\fBlocalectl\fR(1),
+\fBtimedatectl\fR(1),
+\fBhostnamectl\fR(1)
diff --git a/man/systemd-firstboot.html b/man/systemd-firstboot.html
new file mode 100644 (file)
index 0000000..192a826
--- /dev/null
@@ -0,0 +1,103 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-firstboot</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-firstboot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-firstboot, systemd-firstboot.service — Initialize basic system settings on or before the first boot-up of a system</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-firstboot</code>  [OPTIONS...]</p></div><p><code class="filename">systemd-firstboot.service</code></p></div><div class="refsect1"><a name="idm214191623488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-firstboot</strong></span> initializes
+                the most basic system settings interactively on the
+                first boot, or optionally non-interactively when a
+                system image is created. The following settings may be
+                set up:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>The system locale, more
+                        specifically the two locale variables
+                        <code class="varname">LANG=</code> and
+                        <code class="varname">LC_MESSAGES</code></p></li><li class="listitem"><p>The system time zone</p></li><li class="listitem"><p>The system host name</p></li><li class="listitem"><p>The machine ID of the system</p></li><li class="listitem"><p>The root user's password</p></li></ul></div><p>Each of the fields may either be queried
+                interactively from the users, set non-interactively on
+                the tool's command line, or be copied from a host
+                system that is used to set up the system image.</p><p>If a setting is already initialized it will not
+                be overwritten and the user will not be prompted for
+                the setting.</p><p>Note that this tool operates directly on the
+                file system and does not involve any running system
+                services, unlike
+                <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
+                <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>
+                or
+                <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>. This
+                allows <span class="command"><strong>systemd-firstboot</strong></span> to operate
+                on mounted but not booted disk images and in early
+                boot. It is not recommended to use
+                <span class="command"><strong>systemd-firstboot</strong></span> on the running
+                system while it is up.</p></div><div class="refsect1"><a name="idm214191493136"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
+                                as an argument. All paths will be
+                                prefixed with the given alternate
+                                <em class="replaceable"><code>root</code></em> path,
+                                including config search paths. This is
+                                useful to operate on a system image
+                                mounted to the specified directory
+                                instead of the host system itself.
+                                </p></dd><dt id="--locale=LOCALE"><span class="term"><code class="option">--locale=<em class="replaceable"><code>LOCALE</code></em></code>, </span><span class="term"><code class="option">--locale-messages=<em class="replaceable"><code>LOCALE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--locale=LOCALE">¶</a></dt><dd><p>Sets the system
+                                locale, more specifically the
+                                <code class="varname">LANG=</code> and
+                                <code class="varname">LC_MESSAGES</code>
+                                settings. The argument should be a
+                                valid locale identifier, such as
+                                "<code class="literal">de_DE.UTF-8</code>". This
+                                controls the
+                                <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>
+                                configuration file.</p></dd><dt id="--timezone=TIMEZONE"><span class="term"><code class="option">--timezone=<em class="replaceable"><code>TIMEZONE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--timezone=TIMEZONE">¶</a></dt><dd><p>Sets the system time
+                                zone. The argument should be a valid
+                                time zone identifier, such as
+                                "<code class="literal">Europe/Berlin</code>". This
+                                controls the
+                                <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>
+                                symlink.</p></dd><dt id="--hostname=HOSTNAME"><span class="term"><code class="option">--hostname=<em class="replaceable"><code>HOSTNAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--hostname=HOSTNAME">¶</a></dt><dd><p>Sets the system
+                                hostname. The argument should be a
+                                host name, compatible with DNS. This
+                                controls the
+                                <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>
+                                configuration file.</p></dd><dt id="--machine-id=ID"><span class="term"><code class="option">--machine-id=<em class="replaceable"><code>ID</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--machine-id=ID">¶</a></dt><dd><p>Sets the system's machine ID. This
+                                controls the
+                                <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
+                                file.</p></dd><dt id="--root-password=PASSWORD"><span class="term"><code class="option">--root-password=<em class="replaceable"><code>PASSWORD</code></em></code>, </span><span class="term"><code class="option">--root-password-file=<em class="replaceable"><code>PATH</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root-password=PASSWORD">¶</a></dt><dd><p>Sets the password of
+                                the system's root user. This creates a
+                                <a href="shadow.html"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>
+                                file. This setting exists in two
+                                forms:
+                                <code class="option">--root-password=</code>
+                                accepts the password to set directly
+                                on the command line,
+                                <code class="option">--root-password-file=</code>
+                                reads it from a file. Note that
+                                it is not recommended specifying
+                                passwords on the command line as other
+                                users might be able to see them
+                                simply by invoking
+                                <a href="ps.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>.</p></dd><dt id="--prompt-locale"><span class="term"><code class="option">--prompt-locale</code>, </span><span class="term"><code class="option">--prompt-timezone</code>, </span><span class="term"><code class="option">--prompt-hostname</code>, </span><span class="term"><code class="option">--prompt-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt-locale">¶</a></dt><dd></dd><dt id="--prompt"><span class="term"><code class="option">--prompt</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt">¶</a></dt><dd></dd><dt id="--copy-locale"><span class="term"><code class="option">--copy-locale</code>, </span><span class="term"><code class="option">--copy-timezone</code>, </span><span class="term"><code class="option">--copy-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--copy-locale">¶</a></dt><dd></dd><dt id="--copy"><span class="term"><code class="option">--copy</code></span><a class="headerlink" title="Permalink to this term" href="#--copy">¶</a></dt><dd></dd><dt id="--setup-machine-id"><span class="term"><code class="option">--setup-machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#--setup-machine-id">¶</a></dt><dd></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191640304"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214186727456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
+                        <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
+                        <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
+                        <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
+                        <a href="shadow.html"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>,
+                        <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>,
+                        <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
+                        <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
+                        <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
+                </p></div></div></body></html>
diff --git a/man/systemd-firstboot.service.1 b/man/systemd-firstboot.service.1
new file mode 100644 (file)
index 0000000..0899234
--- /dev/null
@@ -0,0 +1 @@
+.so man1/systemd-firstboot.1
diff --git a/man/systemd-firstboot.service.html b/man/systemd-firstboot.service.html
new file mode 100644 (file)
index 0000000..192a826
--- /dev/null
@@ -0,0 +1,103 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-firstboot</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-firstboot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-firstboot, systemd-firstboot.service — Initialize basic system settings on or before the first boot-up of a system</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-firstboot</code>  [OPTIONS...]</p></div><p><code class="filename">systemd-firstboot.service</code></p></div><div class="refsect1"><a name="idm214191623488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-firstboot</strong></span> initializes
+                the most basic system settings interactively on the
+                first boot, or optionally non-interactively when a
+                system image is created. The following settings may be
+                set up:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>The system locale, more
+                        specifically the two locale variables
+                        <code class="varname">LANG=</code> and
+                        <code class="varname">LC_MESSAGES</code></p></li><li class="listitem"><p>The system time zone</p></li><li class="listitem"><p>The system host name</p></li><li class="listitem"><p>The machine ID of the system</p></li><li class="listitem"><p>The root user's password</p></li></ul></div><p>Each of the fields may either be queried
+                interactively from the users, set non-interactively on
+                the tool's command line, or be copied from a host
+                system that is used to set up the system image.</p><p>If a setting is already initialized it will not
+                be overwritten and the user will not be prompted for
+                the setting.</p><p>Note that this tool operates directly on the
+                file system and does not involve any running system
+                services, unlike
+                <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
+                <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>
+                or
+                <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>. This
+                allows <span class="command"><strong>systemd-firstboot</strong></span> to operate
+                on mounted but not booted disk images and in early
+                boot. It is not recommended to use
+                <span class="command"><strong>systemd-firstboot</strong></span> on the running
+                system while it is up.</p></div><div class="refsect1"><a name="idm214191493136"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
+                                as an argument. All paths will be
+                                prefixed with the given alternate
+                                <em class="replaceable"><code>root</code></em> path,
+                                including config search paths. This is
+                                useful to operate on a system image
+                                mounted to the specified directory
+                                instead of the host system itself.
+                                </p></dd><dt id="--locale=LOCALE"><span class="term"><code class="option">--locale=<em class="replaceable"><code>LOCALE</code></em></code>, </span><span class="term"><code class="option">--locale-messages=<em class="replaceable"><code>LOCALE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--locale=LOCALE">¶</a></dt><dd><p>Sets the system
+                                locale, more specifically the
+                                <code class="varname">LANG=</code> and
+                                <code class="varname">LC_MESSAGES</code>
+                                settings. The argument should be a
+                                valid locale identifier, such as
+                                "<code class="literal">de_DE.UTF-8</code>". This
+                                controls the
+                                <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>
+                                configuration file.</p></dd><dt id="--timezone=TIMEZONE"><span class="term"><code class="option">--timezone=<em class="replaceable"><code>TIMEZONE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--timezone=TIMEZONE">¶</a></dt><dd><p>Sets the system time
+                                zone. The argument should be a valid
+                                time zone identifier, such as
+                                "<code class="literal">Europe/Berlin</code>". This
+                                controls the
+                                <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>
+                                symlink.</p></dd><dt id="--hostname=HOSTNAME"><span class="term"><code class="option">--hostname=<em class="replaceable"><code>HOSTNAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--hostname=HOSTNAME">¶</a></dt><dd><p>Sets the system
+                                hostname. The argument should be a
+                                host name, compatible with DNS. This
+                                controls the
+                                <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>
+                                configuration file.</p></dd><dt id="--machine-id=ID"><span class="term"><code class="option">--machine-id=<em class="replaceable"><code>ID</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--machine-id=ID">¶</a></dt><dd><p>Sets the system's machine ID. This
+                                controls the
+                                <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
+                                file.</p></dd><dt id="--root-password=PASSWORD"><span class="term"><code class="option">--root-password=<em class="replaceable"><code>PASSWORD</code></em></code>, </span><span class="term"><code class="option">--root-password-file=<em class="replaceable"><code>PATH</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root-password=PASSWORD">¶</a></dt><dd><p>Sets the password of
+                                the system's root user. This creates a
+                                <a href="shadow.html"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>
+                                file. This setting exists in two
+                                forms:
+                                <code class="option">--root-password=</code>
+                                accepts the password to set directly
+                                on the command line,
+                                <code class="option">--root-password-file=</code>
+                                reads it from a file. Note that
+                                it is not recommended specifying
+                                passwords on the command line as other
+                                users might be able to see them
+                                simply by invoking
+                                <a href="ps.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>.</p></dd><dt id="--prompt-locale"><span class="term"><code class="option">--prompt-locale</code>, </span><span class="term"><code class="option">--prompt-timezone</code>, </span><span class="term"><code class="option">--prompt-hostname</code>, </span><span class="term"><code class="option">--prompt-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt-locale">¶</a></dt><dd></dd><dt id="--prompt"><span class="term"><code class="option">--prompt</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt">¶</a></dt><dd></dd><dt id="--copy-locale"><span class="term"><code class="option">--copy-locale</code>, </span><span class="term"><code class="option">--copy-timezone</code>, </span><span class="term"><code class="option">--copy-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--copy-locale">¶</a></dt><dd></dd><dt id="--copy"><span class="term"><code class="option">--copy</code></span><a class="headerlink" title="Permalink to this term" href="#--copy">¶</a></dt><dd></dd><dt id="--setup-machine-id"><span class="term"><code class="option">--setup-machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#--setup-machine-id">¶</a></dt><dd></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191640304"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214186727456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
+                        <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
+                        <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
+                        <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
+                        <a href="shadow.html"><span class="citerefentry"><span class="refentrytitle">shadow</span>(5)</span></a>,
+                        <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>,
+                        <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>,
+                        <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
+                        <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
+                </p></div></div></body></html>
diff --git a/man/systemd-firstboot.xml b/man/systemd-firstboot.xml
new file mode 100644 (file)
index 0000000..8d97302
--- /dev/null
@@ -0,0 +1,286 @@
+<?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">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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="systemd-firstboot"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+        <refentryinfo>
+                <title>systemd-firstboot</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart@poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>systemd-firstboot</refentrytitle>
+                <manvolnum>1</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>systemd-firstboot</refname>
+                <refname>systemd-firstboot.service</refname>
+                <refpurpose>Initialize basic system settings on or before the first boot-up of a system</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <cmdsynopsis>
+                        <command>systemd-firstboot</command>
+                        <arg choice="opt" rep="repeat">OPTIONS</arg>
+                </cmdsynopsis>
+
+                <para><filename>systemd-firstboot.service</filename></para>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><command>systemd-firstboot</command> initializes
+                the most basic system settings interactively on the
+                first boot, or optionally non-interactively when a
+                system image is created. The following settings may be
+                set up:</para>
+
+                <itemizedlist>
+                        <listitem><para>The system locale, more
+                        specifically the two locale variables
+                        <varname>LANG=</varname> and
+                        <varname>LC_MESSAGES</varname></para></listitem>
+
+                        <listitem><para>The system time zone</para></listitem>
+
+                        <listitem><para>The system host name</para></listitem>
+
+                        <listitem><para>The machine ID of the system</para></listitem>
+
+                        <listitem><para>The root user's password</para></listitem>
+                </itemizedlist>
+
+                <para>Each of the fields may either be queried
+                interactively from the users, set non-interactively on
+                the tool's command line, or be copied from a host
+                system that is used to set up the system image.</para>
+
+                <para>If a setting is already initialized it will not
+                be overwritten and the user will not be prompted for
+                the setting.</para>
+
+                <para>Note that this tool operates directly on the
+                file system and does not involve any running system
+                services, unlike
+                <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                or
+                <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. This
+                allows <command>systemd-firstboot</command> to operate
+                on mounted but not booted disk images and in early
+                boot. It is not recommended to use
+                <command>systemd-firstboot</command> on the running
+                system while it is up.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Options</title>
+
+                <para>The following options are understood:</para>
+
+                <variablelist>
+                        <varlistentry>
+                                <term><option>--root=<replaceable>root</replaceable></option></term>
+                                <listitem><para>Takes a directory path
+                                as an argument. All paths will be
+                                prefixed with the given alternate
+                                <replaceable>root</replaceable> path,
+                                including config search paths. This is
+                                useful to operate on a system image
+                                mounted to the specified directory
+                                instead of the host system itself.
+                                </para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--locale=<replaceable>LOCALE</replaceable></option></term>
+                                <term><option>--locale-messages=<replaceable>LOCALE</replaceable></option></term>
+
+                                <listitem><para>Sets the system
+                                locale, more specifically the
+                                <varname>LANG=</varname> and
+                                <varname>LC_MESSAGES</varname>
+                                settings. The argument should be a
+                                valid locale identifier, such as
+                                <literal>de_DE.UTF-8</literal>. This
+                                controls the
+                                <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                configuration file.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--timezone=<replaceable>TIMEZONE</replaceable></option></term>
+
+                                <listitem><para>Sets the system time
+                                zone. The argument should be a valid
+                                time zone identifier, such as
+                                <literal>Europe/Berlin</literal>. This
+                                controls the
+                                <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                symlink.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--hostname=<replaceable>HOSTNAME</replaceable></option></term>
+
+                                <listitem><para>Sets the system
+                                hostname. The argument should be a
+                                host name, compatible with DNS. This
+                                controls the
+                                <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                configuration file.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--machine-id=<replaceable>ID</replaceable></option></term>
+
+                                <listitem><para>Sets the system's machine ID. This
+                                controls the
+                                <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                file.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--root-password=<replaceable>PASSWORD</replaceable></option></term>
+                                <term><option>--root-password-file=<replaceable>PATH</replaceable></option></term>
+
+                                <listitem><para>Sets the password of
+                                the system's root user. This creates a
+                                <citerefentry><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                file. This setting exists in two
+                                forms:
+                                <option>--root-password=</option>
+                                accepts the password to set directly
+                                on the command line,
+                                <option>--root-password-file=</option>
+                                reads it from a file. Note that
+                                it is not recommended specifying
+                                passwords on the command line as other
+                                users might be able to see them
+                                simply by invoking
+                                <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--prompt-locale</option></term>
+                                <term><option>--prompt-timezone</option></term>
+                                <term><option>--prompt-hostname</option></term>
+                                <term><option>--prompt-root-password</option></term>
+
+                                <para>Prompt the user interactively
+                                for a specific basic setting. Note
+                                that any explicit configuration
+                                settings specified on the command line
+                                take precedence, and the user is not
+                                prompted for it.</para>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--prompt</option></term>
+
+                                <para>Query the user for locale,
+                                timezone, hostname and root
+                                password. This is equivalent to
+                                specifying
+                                <option>--prompt-locale</option>,
+                                <option>--prompt-timezone</option>,
+                                <option>--prompt-hostname</option>,
+                                <option>--prompt-root-password</option>
+                                in combination.</para>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--copy-locale</option></term>
+                                <term><option>--copy-timezone</option></term>
+                                <term><option>--copy-root-password</option></term>
+
+                                <para>Copy a specific basic setting
+                                from the host. This only works in
+                                combination with
+                                <option>--root=</option> (see
+                                above).</para>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--copy</option></term>
+
+                                <para>Copy locale, time zone and root
+                                password from the host. This is
+                                equivalent to specifying
+                                <option>--copy-locale</option>,
+                                <option>--copy-timezone</option>,
+                                <option>--copy-root-password</option>
+                                in combination.</para>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><option>--setup-machine-id</option></term>
+
+                                <para>Initialize the system's machine
+                                ID to a random ID. This only works in
+                                combination with
+                                <option>--root=</option>.</para>
+                        </varlistentry>
+
+                        <xi:include href="standard-options.xml" xpointer="help" />
+                        <xi:include href="standard-options.xml" xpointer="version" />
+                </variablelist>
+
+        </refsect1>
+
+        <refsect1>
+                <title>Exit status</title>
+
+                <para>On success, 0 is returned, a non-zero failure
+                code otherwise.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
index 620237e6e1902bf5f779be64bd43ca0d426f1c8f..caa8db97897628fbe921407b965c6c6c968032ff 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-fsck@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck — File system checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-fsck@.service</code></p><p><code class="filename">systemd-fsck-root.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-fsck</code></p></div><div class="refsect1"><a name="idm214190706880"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fsck@.service</code> and
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-fsck@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck — File system checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-fsck@.service</code></p><p><code class="filename">systemd-fsck-root.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-fsck</code></p></div><div class="refsect1"><a name="idm214171488128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fsck@.service</code> and
                 <code class="filename">systemd-fsck-root.service</code> are
                 services responsible for file system checks. They are
                 instantiated for each device that is configured for
@@ -48,7 +48,7 @@
                 file system check fails for a service without
                 <code class="option">nofail</code>, emergency mode is activated,
                 by isolating to
-                <code class="filename">emergency.target</code>.</p></div><div class="refsect1"><a name="idm214194586864"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fsck</code> understands
+                <code class="filename">emergency.target</code>.</p></div><div class="refsect1"><a name="idm214171359008"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fsck</code> understands
                 one kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="fsck.mode="><span class="term"><code class="varname">fsck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#fsck.mode=">¶</a></dt><dd><p>One of
                                 "<code class="literal">auto</code>",
                                 "<code class="literal">force</code>",
@@ -71,7 +71,7 @@
                                 </code>" will answer yes to all questions by
                                 fsck and "<code class="literal">no</code>" will answer no to
                                 all questions.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214194648592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214171539424"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="fsck.html"><span class="citerefentry"><span class="refentrytitle">fsck</span>(8)</span></a>,
                         <a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a>,
index 620237e6e1902bf5f779be64bd43ca0d426f1c8f..caa8db97897628fbe921407b965c6c6c968032ff 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-fsck@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck — File system checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-fsck@.service</code></p><p><code class="filename">systemd-fsck-root.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-fsck</code></p></div><div class="refsect1"><a name="idm214190706880"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fsck@.service</code> and
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-fsck@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck — File system checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-fsck@.service</code></p><p><code class="filename">systemd-fsck-root.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-fsck</code></p></div><div class="refsect1"><a name="idm214171488128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fsck@.service</code> and
                 <code class="filename">systemd-fsck-root.service</code> are
                 services responsible for file system checks. They are
                 instantiated for each device that is configured for
@@ -48,7 +48,7 @@
                 file system check fails for a service without
                 <code class="option">nofail</code>, emergency mode is activated,
                 by isolating to
-                <code class="filename">emergency.target</code>.</p></div><div class="refsect1"><a name="idm214194586864"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fsck</code> understands
+                <code class="filename">emergency.target</code>.</p></div><div class="refsect1"><a name="idm214171359008"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fsck</code> understands
                 one kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="fsck.mode="><span class="term"><code class="varname">fsck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#fsck.mode=">¶</a></dt><dd><p>One of
                                 "<code class="literal">auto</code>",
                                 "<code class="literal">force</code>",
@@ -71,7 +71,7 @@
                                 </code>" will answer yes to all questions by
                                 fsck and "<code class="literal">no</code>" will answer no to
                                 all questions.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214194648592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214171539424"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="fsck.html"><span class="citerefentry"><span class="refentrytitle">fsck</span>(8)</span></a>,
                         <a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a>,
index 9e7f3c09e36a6d268b7e2a09ed686ef77e639729..18c3f97bcf0e835677fd43d853fff5074bec3c59 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-FSCK@\&.SERVICE" "8" "" "systemd 215" "systemd-fsck@.service"
+.TH "SYSTEMD\-FSCK@\&.SERVICE" "8" "" "systemd 217" "systemd-fsck@.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 620237e6e1902bf5f779be64bd43ca0d426f1c8f..caa8db97897628fbe921407b965c6c6c968032ff 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-fsck@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck — File system checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-fsck@.service</code></p><p><code class="filename">systemd-fsck-root.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-fsck</code></p></div><div class="refsect1"><a name="idm214190706880"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fsck@.service</code> and
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-fsck@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck — File system checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-fsck@.service</code></p><p><code class="filename">systemd-fsck-root.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-fsck</code></p></div><div class="refsect1"><a name="idm214171488128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fsck@.service</code> and
                 <code class="filename">systemd-fsck-root.service</code> are
                 services responsible for file system checks. They are
                 instantiated for each device that is configured for
@@ -48,7 +48,7 @@
                 file system check fails for a service without
                 <code class="option">nofail</code>, emergency mode is activated,
                 by isolating to
-                <code class="filename">emergency.target</code>.</p></div><div class="refsect1"><a name="idm214194586864"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fsck</code> understands
+                <code class="filename">emergency.target</code>.</p></div><div class="refsect1"><a name="idm214171359008"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fsck</code> understands
                 one kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="fsck.mode="><span class="term"><code class="varname">fsck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#fsck.mode=">¶</a></dt><dd><p>One of
                                 "<code class="literal">auto</code>",
                                 "<code class="literal">force</code>",
@@ -71,7 +71,7 @@
                                 </code>" will answer yes to all questions by
                                 fsck and "<code class="literal">no</code>" will answer no to
                                 all questions.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214194648592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214171539424"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="fsck.html"><span class="citerefentry"><span class="refentrytitle">fsck</span>(8)</span></a>,
                         <a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a>,
index 2d919574fe5d40459578ec55963f9ed985c32f5f..3e20966e89765b7d4a7db6e136e910a80a7d6ffd 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-FSTAB\-GENERATOR" "8" "" "systemd 215" "systemd-fstab-generator"
+.TH "SYSTEMD\-FSTAB\-GENERATOR" "8" "" "systemd 217" "systemd-fstab-generator"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -64,6 +64,96 @@ is honored only by initial RAM disk (initrd) while
 \fIfstab=\fR
 is honored by both the main system and the initrd\&.
 .RE
+.PP
+\fIroot=\fR
+.RS 4
+Takes the root filesystem to mount in the initrd\&.
+\fIroot=\fR
+is honored by the initrd\&.
+.RE
+.PP
+\fIrootfstype=\fR
+.RS 4
+Takes the root filesystem type that will be passed to the mount command\&.
+\fIrootfstype=\fR
+is honored by the initrd\&.
+.RE
+.PP
+\fIrootflags=\fR
+.RS 4
+Takes the root filesystem mount options to use\&.
+\fIrootflags=\fR
+is honored by the initrd\&.
+.RE
+.PP
+\fImount\&.usr=\fR
+.RS 4
+Takes the
+/usr
+filesystem to be mounted by the initrd\&. If
+\fImount\&.usrfstype=\fR
+or
+\fImount\&.usrflags=\fR
+is set, then
+\fImount\&.usr=\fR
+will default to the value set in
+\fIroot=\fR\&.
+.sp
+Otherwise this parameter defaults to the
+/usr
+entry found in
+/etc/fstab
+on the root filesystem\&.
+.sp
+\fImount\&.usr=\fR
+is honored by the initrd\&.
+.RE
+.PP
+\fImount\&.usrfstype=\fR
+.RS 4
+Takes the
+/usr
+filesystem type that will be passed to the mount command\&. If
+\fImount\&.usr=\fR
+or
+\fImount\&.usrflags=\fR
+is set, then
+\fImount\&.usrfstype=\fR
+will default to the value set in
+\fIrootfstype=\fR\&.
+.sp
+Otherwise this value will be read from the
+/usr
+entry in
+/etc/fstab
+on the root filesystem\&.
+.sp
+\fImount\&.usrfstype=\fR
+is honored by the initrd\&.
+.RE
+.PP
+\fImount\&.usrflags=\fR
+.RS 4
+Takes the
+/usr
+filesystem mount options to use\&. If
+\fImount\&.usr=\fR
+or
+\fImount\&.usrfstype=\fR
+is set, then
+\fImount\&.usrflages=\fR
+will default to the value set in
+\fIrootflags=\fR\&.
+.sp
+Otherwise this value will be read from the
+/usr
+entry in
+/etc/fstab
+on the root filesystem\&.
+.sp
+\fImount\&.usrflags=\fR
+is honored by the initrd\&.
+.RE
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
index 18f7f8c9feb2660e7f0a15fa22fa4f6fb8883b65..5d07a8681d85023403c1cc95734a6afdeb352e83 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-fstab-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fstab-generator — Unit generator for /etc/fstab</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-fstab-generator</code></p></div><div class="refsect1"><a name="idm214184883232"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fstab-generator</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-fstab-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-fstab-generator — Unit generator for /etc/fstab</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-fstab-generator</code></p></div><div class="refsect1"><a name="idm214179125120"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-fstab-generator</code> is
                 a generator that translates
                 <code class="filename">/etc/fstab</code> (see
                 <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>
@@ -38,7 +38,7 @@
                 <code class="filename">/etc/fstab</code> mount options this
                 generator understands.</p><p><code class="filename">systemd-fstab-generator</code>
                 implements the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Generators" target="_top">generator
-                specification</a>.</p></div><div class="refsect1"><a name="idm214188139680"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fstab-generator</code> understands
+                specification</a>.</p></div><div class="refsect1"><a name="idm214179116160"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-fstab-generator</code> understands
                 the following kernel command line parameters:</p><div class="variablelist"><dl class="variablelist"><dt id="fstab="><span class="term"><code class="varname">fstab=</code>, </span><span class="term"><code class="varname">rd.fstab=</code></span><a class="headerlink" title="Permalink to this term" href="#fstab=">¶</a></dt><dd><p>Takes a boolean
                                 argument. Defaults to
                                 "<code class="literal">yes</code>". If
                                 (initrd) while
                                 <code class="varname">fstab=</code> is
                                 honored by both the main system and
-                                the initrd.  </p></dd></dl></div></div><div class="refsect1"><a name="idm214188037552"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                the initrd.</p></dd><dt id="root="><span class="term"><code class="varname">root=</code></span><a class="headerlink" title="Permalink to this term" href="#root=">¶</a></dt><dd><p>Takes the root filesystem to mount
+                                in the initrd.
+                                <code class="varname">root=</code> is
+                                honored by the initrd.</p></dd><dt id="rootfstype="><span class="term"><code class="varname">rootfstype=</code></span><a class="headerlink" title="Permalink to this term" href="#rootfstype=">¶</a></dt><dd><p>Takes the root filesystem type that
+                                will be passed to the mount command.
+                                <code class="varname">rootfstype=</code> is
+                                honored by the initrd.</p></dd><dt id="rootflags="><span class="term"><code class="varname">rootflags=</code></span><a class="headerlink" title="Permalink to this term" href="#rootflags=">¶</a></dt><dd><p>Takes the root filesystem mount options
+                                to use. <code class="varname">rootflags=</code> is
+                                honored by the initrd.</p></dd><dt id="mount.usr="><span class="term"><code class="varname">mount.usr=</code></span><a class="headerlink" title="Permalink to this term" href="#mount.usr=">¶</a></dt><dd><p>Takes the <code class="filename">/usr</code>
+                                filesystem to be mounted by the initrd. If
+                                <code class="varname">mount.usrfstype=</code> or
+                                <code class="varname">mount.usrflags=</code> is set, then
+                                <code class="varname">mount.usr=</code> will default to the value set in
+                                <code class="varname">root=</code>.</p><p>Otherwise this parameter defaults to the
+                                <code class="filename">/usr</code> entry
+                                found in <code class="filename">/etc/fstab</code> on the root
+                                filesystem.</p><p><code class="varname">mount.usr=</code> is honored by the initrd.
+                                </p></dd><dt id="mount.usrfstype="><span class="term"><code class="varname">mount.usrfstype=</code></span><a class="headerlink" title="Permalink to this term" href="#mount.usrfstype=">¶</a></dt><dd><p>Takes the <code class="filename">/usr</code>
+                                filesystem type that will be passed to the mount
+                                command. If <code class="varname">mount.usr=</code> or
+                                <code class="varname">mount.usrflags=</code> is set, then
+                                <code class="varname">mount.usrfstype=</code> will default to the value set in
+                                <code class="varname">rootfstype=</code>.</p><p>Otherwise this value will be read from the
+                                <code class="filename">/usr</code> entry in
+                                <code class="filename">/etc/fstab</code> on the root filesystem.</p><p><code class="varname">mount.usrfstype=</code> is
+                                honored by the initrd.</p></dd><dt id="mount.usrflags="><span class="term"><code class="varname">mount.usrflags=</code></span><a class="headerlink" title="Permalink to this term" href="#mount.usrflags=">¶</a></dt><dd><p>Takes the <code class="filename">/usr</code>
+                                filesystem mount options to use. If
+                                <code class="varname">mount.usr=</code> or
+                                <code class="varname">mount.usrfstype=</code> is set, then
+                                <code class="varname">mount.usrflages=</code> will default to the value set in
+                                <code class="varname">rootflags=</code>.</p><p>Otherwise this value will be read from the
+                                <code class="filename">/usr</code> entry in
+                                <code class="filename">/etc/fstab</code> on the root filesystem.</p><p><code class="varname">mount.usrflags=</code> is
+                                honored by the initrd.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183029264"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>,
                         <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>,
index e3cf5d2bfb56d15ac836f4c3bac6b05750b11ea5..65b48eea0787237ac293769aa847f3f44c8c2d4d 100644 (file)
                                 (initrd) while
                                 <varname>fstab=</varname> is
                                 honored by both the main system and
-                                the initrd.  </para></listitem>
+                                the initrd.</para></listitem>
                         </varlistentry>
+                        <varlistentry>
+                                <term><varname>root=</varname></term>
+
+                                <listitem><para>Takes the root filesystem to mount
+                                in the initrd.
+                                <varname>root=</varname> is
+                                honored by the initrd.</para></listitem>
+                        </varlistentry>
+                        <varlistentry>
+                                <term><varname>rootfstype=</varname></term>
+
+                                <listitem><para>Takes the root filesystem type that
+                                will be passed to the mount command.
+                                <varname>rootfstype=</varname> is
+                                honored by the initrd.</para></listitem>
+                        </varlistentry>
+                        <varlistentry>
+                                <term><varname>rootflags=</varname></term>
+
+                                <listitem><para>Takes the root filesystem mount options
+                                to use. <varname>rootflags=</varname> is
+                                honored by the initrd.</para></listitem>
+                        </varlistentry>
+                        <varlistentry>
+                                <term><varname>mount.usr=</varname></term>
+
+                                <listitem><para>Takes the <filename>/usr</filename>
+                                filesystem to be mounted by the initrd. If
+                                <varname>mount.usrfstype=</varname> or
+                                <varname>mount.usrflags=</varname> is set, then
+                                <varname>mount.usr=</varname> will default to the value set in
+                                <varname>root=</varname>.</para>
+
+                                <para>Otherwise this parameter defaults to the
+                                <filename>/usr</filename> entry
+                                found in <filename>/etc/fstab</filename> on the root
+                                filesystem.</para>
+
+                                <para><varname>mount.usr=</varname> is honored by the initrd.
+                                </para></listitem>
+                        </varlistentry>
+                        <varlistentry>
+                                <term><varname>mount.usrfstype=</varname></term>
+
+                                <listitem><para>Takes the <filename>/usr</filename>
+                                filesystem type that will be passed to the mount
+                                command. If <varname>mount.usr=</varname> or
+                                <varname>mount.usrflags=</varname> is set, then
+                                <varname>mount.usrfstype=</varname> will default to the value set in
+                                <varname>rootfstype=</varname>.</para>
+
+                                <para>Otherwise this value will be read from the
+                                <filename>/usr</filename> entry in
+                                <filename>/etc/fstab</filename> on the root filesystem.</para>
+
+                                <para><varname>mount.usrfstype=</varname> is
+                                honored by the initrd.</para></listitem>
+                        </varlistentry>
+                        <varlistentry>
+                                <term><varname>mount.usrflags=</varname></term>
+
+                                <listitem><para>Takes the <filename>/usr</filename>
+                                filesystem mount options to use. If
+                                <varname>mount.usr=</varname> or
+                                <varname>mount.usrfstype=</varname> is set, then
+                                <varname>mount.usrflages=</varname> will default to the value set in
+                                <varname>rootflags=</varname>.</para>
 
+                                <para>Otherwise this value will be read from the
+                                <filename>/usr</filename> entry in
+                                <filename>/etc/fstab</filename> on the root filesystem.</para>
+
+                                <para><varname>mount.usrflags=</varname> is
+                                honored by the initrd.</para></listitem>
+                        </varlistentry>
                 </variablelist>
         </refsect1>
 
index 4f2c22bb95687b7f9773e06435eae4966af6ab3a..5c80e0f6c03b7faea4716d9b47276479db13c741 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-GETTY\-GENERATOR" "8" "" "systemd 215" "systemd-getty-generator"
+.TH "SYSTEMD\-GETTY\-GENERATOR" "8" "" "systemd 217" "systemd-getty-generator"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index be3ff82dbb7ce5efb5f6974af13aca23f8bd5083..2c53ff7cf5fd3007ba835d0ebd18c1f981e8ae86 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-getty-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-getty-generator — Generator for enabling getty instances on
-                the console</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-getty-generator</code></p></div><div class="refsect1"><a name="idm214186861600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-getty-generator</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-getty-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-getty-generator — Generator for enabling getty instances on
+                the console</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-getty-generator</code></p></div><div class="refsect1"><a name="idm214198953984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-getty-generator</code> is
                 a generator that automatically instantiates
                 <code class="filename">serial-getty@.service</code> on the
                 kernel console <code class="filename">/dev/console</code> if
@@ -46,7 +46,7 @@
                 specification</a>.</p><p>Further information about configuration of
                 gettys you may find in <a class="ulink" href="http://0pointer.de/blog/projects/serial-console.html" target="_top">systemd
                 for Administrators, Part XVI: Gettys on Serial
-                Consoles (and Elsewhere)</a>.</p></div><div class="refsect1"><a name="idm214190115808"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                Consoles (and Elsewhere)</a>.</p></div><div class="refsect1"><a name="idm214198942816"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="agetty.html"><span class="citerefentry"><span class="refentrytitle">agetty</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/agetty.8.html"><span class="citerefentry"><span class="refentrytitle">agetty</span>(8)</span></a>
                 </p></div></div></body></html>
index 2f3d124186ac1c508b150f4a5623f1772dc37d77..f6a66896dfdfe764ee9a89e22c97d095d9ea3f15 100644 (file)
@@ -94,7 +94,7 @@
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>agetty</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>agetty</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index d5b25bb1aed7416bff601a537fe3463ca62d5ae5..4d2a55da17f1632fb40d8fa34fde79b73b407e41 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-GPT\-AUTO\-GENERATOR" "8" "" "systemd 215" "systemd-gpt-auto-generator"
+.TH "SYSTEMD\-GPT\-AUTO\-GENERATOR" "8" "" "systemd 217" "systemd-gpt-auto-generator"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 2acc82ece1b36592d52cab22e0d2886685021b50..5e58713edc110326720524eb6da11192f41dfa28 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-gpt-auto-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-gpt-auto-generator — Generator for automatically discovering
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-gpt-auto-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-gpt-auto-generator — Generator for automatically discovering
                 and mounting root, <code class="filename">/home</code> and
                 <code class="filename">/srv</code> partitions, as well as
                 discovering and enabling swap partitions, based on GPT
-                partition type GUIDs.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</code></p></div><div class="refsect1"><a name="idm214198372016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-gpt-auto-generator</code>
+                partition type GUIDs.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</code></p></div><div class="refsect1"><a name="idm214176858576"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-gpt-auto-generator</code>
                 is a unit generator that automatically discovers root,
                 <code class="filename">/home</code>, <code class="filename">/srv</code>
                 and swap partitions and creates mount and swap units
@@ -47,7 +47,7 @@
                 in <code class="filename">/etc/fstab</code> or suchlike
                 unnecessary.</p><p>This generator looks for the partitions based on
                 their partition type GUID. The following partition
-                type GUIDs are identified:</p><div class="table"><a name="idm214198412432"></a><p class="title"><b>Table 1. Partition Type GUIDs</b></p><div class="table-contents"><table summary="Partition Type GUIDs" border="1"><colgroup><col align="left" class="guid"><col align="left" class="name"><col align="left" class="explanation"></colgroup><thead><tr><th align="left">Partition Type GUID</th><th align="left">Name</th><th align="left">Explanation</th></tr></thead><tbody><tr><td align="left">44479540-f297-41b2-9af7-d131d5f0458a</td><td align="left"><code class="filename">Root Partition (x86)</code></td><td align="left">On 32-bit x86 systems, the first x86 root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">4f68bce3-e8cd-4db1-96e7-fbcaf984b709</td><td align="left"><code class="filename">Root Partition (x86-64)</code></td><td align="left">On 64-bit x86 systems, the first x86-64 root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">69dad710-2ce4-4e3c-b16c-21a1d49abed3</td><td align="left"><code class="filename">Root Partition (32-bit ARM)</code></td><td align="left">On 32-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">b921b045-1df0-41c3-af44-4c6f280d3fae</td><td align="left"><code class="filename">Root Partition (64-bit ARM)</code></td><td align="left">On 64-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">933ac7e1-2eb4-4f13-b844-0e14e2aef915</td><td align="left">Home Partition</td><td align="left">The first home partition on the disk the root partition is located on is mounted to <code class="filename">/home</code>.</td></tr><tr><td align="left">3b8f8425-20e0-4f3b-907f-1a25a76f98e8</td><td align="left">Server Data Partition</td><td align="left">The first server data partition on the disk the root partition is located on is mounted to <code class="filename">/srv</code>.</td></tr><tr><td align="left">0657fd6d-a4ab-43c4-84e5-0933c84b4f4f</td><td align="left">Swap</td><td align="left">All swap partitions located on the disk the root partition is located on are enabled.</td></tr></tbody></table></div></div><br class="table-break"><p>The <code class="filename">/home</code> and
+                type GUIDs are identified:</p><div class="table"><a name="idm214176850288"></a><p class="title"><b>Table 1. Partition Type GUIDs</b></p><div class="table-contents"><table summary="Partition Type GUIDs" border="1"><colgroup><col align="left" class="guid"><col align="left" class="name"><col align="left" class="explanation"></colgroup><thead><tr><th align="left">Partition Type GUID</th><th align="left">Name</th><th align="left">Explanation</th></tr></thead><tbody><tr><td align="left">44479540-f297-41b2-9af7-d131d5f0458a</td><td align="left"><code class="filename">Root Partition (x86)</code></td><td align="left">On 32-bit x86 systems, the first x86 root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">4f68bce3-e8cd-4db1-96e7-fbcaf984b709</td><td align="left"><code class="filename">Root Partition (x86-64)</code></td><td align="left">On 64-bit x86 systems, the first x86-64 root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">69dad710-2ce4-4e3c-b16c-21a1d49abed3</td><td align="left"><code class="filename">Root Partition (32-bit ARM)</code></td><td align="left">On 32-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">b921b045-1df0-41c3-af44-4c6f280d3fae</td><td align="left"><code class="filename">Root Partition (64-bit ARM)</code></td><td align="left">On 64-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <code class="filename">/</code>.</td></tr><tr><td align="left">933ac7e1-2eb4-4f13-b844-0e14e2aef915</td><td align="left">Home Partition</td><td align="left">The first home partition on the disk the root partition is located on is mounted to <code class="filename">/home</code>.</td></tr><tr><td align="left">3b8f8425-20e0-4f3b-907f-1a25a76f98e8</td><td align="left">Server Data Partition</td><td align="left">The first server data partition on the disk the root partition is located on is mounted to <code class="filename">/srv</code>.</td></tr><tr><td align="left">0657fd6d-a4ab-43c4-84e5-0933c84b4f4f</td><td align="left">Swap</td><td align="left">All swap partitions located on the disk the root partition is located on are enabled.</td></tr></tbody></table></div></div><br class="table-break"><p>The <code class="filename">/home</code> and
                 <code class="filename">/srv</code> partitions may be encrypted
                 in LUKS format. In this case a device mapper device is
                 set up under the names
@@ -63,7 +63,7 @@
                 default subvolumes on them, using <span class="command"><strong>btrfs
                 subvolume set-default</strong></span>.</p><p><code class="filename">systemd-gpt-auto-generator</code>
                 implements the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Generators" target="_top">Generator
-                Specification</a>.</p></div><div class="refsect1"><a name="idm214198458240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                Specification</a>.</p></div><div class="refsect1"><a name="idm214180764048"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>,
                         <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a>,
index b0613e9b2533f6095f59cd88afd71cd52563938b..34642f90d0d0f0d9c60592b8816a14926d7b8600 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-HALT\&.SERVICE" "8" "" "systemd 215" "systemd-halt.service"
+.TH "SYSTEMD\-HALT\&.SERVICE" "8" "" "systemd 217" "systemd-halt.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 4a22e8c9fc16e31eab8579fee56de6f97e42887b..ee0d32acd1460ea39a5f0c71b1f07ce8d7b0ed16 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214183037312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214184940736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
                 system service that is pulled in by
                 <code class="filename">halt.target</code> and is responsible
                 for the actual system halt. Similarly,
                 related units) should never be executed
                 directly. Instead, trigger system shutdown with a
                 command such as "<code class="literal">systemctl halt</code>" or
-                suchlike.</p></div><div class="refsect1"><a name="idm214183155536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                suchlike.</p></div><div class="refsect1"><a name="idm214188878512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
-                        <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
                         <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>
                 </p></div></div></body></html>
diff --git a/man/systemd-hibernate-resume-generator.8 b/man/systemd-hibernate-resume-generator.8
new file mode 100644 (file)
index 0000000..e895185
--- /dev/null
@@ -0,0 +1,53 @@
+'\" t
+.TH "SYSTEMD\-HIBERNATE\-RESUME\-GENERATOR" "8" "" "systemd 217" "systemd-hibernate-resume-generator"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+systemd-hibernate-resume-generator \- Unit generator for resume= kernel parameter
+.SH "SYNOPSIS"
+.PP
+/usr/lib/systemd/system\-generators/systemd\-hibernate\-resume\-generator
+.SH "DESCRIPTION"
+.PP
+systemd\-hibernate\-resume\-generator
+is a generator that instantiates
+\fBsystemd-hibernate-resume@.service\fR(8)
+unit according to the value of
+\fBresume=\fR
+parameter specified on the kernel command line\&.
+.SH "KERNEL COMMAND LINE"
+.PP
+systemd\-hibernate\-resume\-generator
+understands the following kernel command line parameters:
+.PP
+\fIresume=\fR
+.RS 4
+Takes a path to the resume device\&. Both persistent block device paths like
+/dev/disk/by\-foo/bar
+and
+\fBfstab\fR(5)\-style specifiers like
+"FOO=bar"
+are supported\&.
+.RE
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsystemd-hibernate-resume@.service\fR(8),
+\fBkernel-command-line\fR(7)
diff --git a/man/systemd-hibernate-resume-generator.html b/man/systemd-hibernate-resume-generator.html
new file mode 100644 (file)
index 0000000..0255930
--- /dev/null
@@ -0,0 +1,36 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-hibernate-resume-generator</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-hibernate-resume-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-hibernate-resume-generator — Unit generator for resume= kernel parameter</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator</code></p></div><div class="refsect1"><a name="idm214176216960"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-hibernate-resume-generator</code> is
+                a generator that instantiates
+                <a href="systemd-hibernate-resume@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume@.service</span>(8)</span></a>
+                unit according to the value of <code class="option">resume=</code>
+                parameter specified on the kernel command line.</p></div><div class="refsect1"><a name="idm214176214080"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-hibernate-resume-generator</code> understands
+                the following kernel command line parameters:</p><div class="variablelist"><dl class="variablelist"><dt id="resume="><span class="term"><code class="varname">resume=</code></span><a class="headerlink" title="Permalink to this term" href="#resume=">¶</a></dt><dd><p>Takes a path to the resume
+                                device. Both persistent block device paths like
+                                <code class="filename">/dev/disk/by-foo/bar</code> and
+                                <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>-style
+                                specifiers like "<code class="literal">FOO=bar</code>"
+                                are supported.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176207888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="systemd-hibernate-resume@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume@.service</span>(8)</span></a>,
+                        <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>
+                </p></div></div></body></html>
diff --git a/man/systemd-hibernate-resume-generator.xml b/man/systemd-hibernate-resume-generator.xml
new file mode 100644 (file)
index 0000000..e010c23
--- /dev/null
@@ -0,0 +1,93 @@
+<?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">
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Ivan Shapovalov
+
+  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="systemd-hibernate-resume-generator">
+
+        <refentryinfo>
+                <title>systemd-hibernate-resume-generator</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Ivan</firstname>
+                                <surname>Shapovalov</surname>
+                                <email>intelfx100@gmail.com</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>systemd-hibernate-resume-generator</refentrytitle>
+                <manvolnum>8</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>systemd-hibernate-resume-generator</refname>
+                <refpurpose>Unit generator for resume= kernel parameter</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <para><filename>/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator</filename></para>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><filename>systemd-hibernate-resume-generator</filename> is
+                a generator that instantiates
+                <citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                unit according to the value of <option>resume=</option>
+                parameter specified on the kernel command line.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>Kernel Command Line</title>
+
+                <para><filename>systemd-hibernate-resume-generator</filename> understands
+                the following kernel command line parameters:</para>
+
+                <variablelist class='kernel-commandline-options'>
+
+                        <varlistentry>
+                                <term><varname>resume=</varname></term>
+
+                                <listitem><para>Takes a path to the resume
+                                device. Both persistent block device paths like
+                                <filename>/dev/disk/by-foo/bar</filename> and
+                                <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>-style
+                                specifiers like <literal>FOO=bar</literal>
+                                are supported.</para></listitem>
+                        </varlistentry>
+
+                </variablelist>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
diff --git a/man/systemd-hibernate-resume.8 b/man/systemd-hibernate-resume.8
new file mode 100644 (file)
index 0000000..b1da697
--- /dev/null
@@ -0,0 +1 @@
+.so man8/systemd-hibernate-resume@.service.8
diff --git a/man/systemd-hibernate-resume.html b/man/systemd-hibernate-resume.html
new file mode 100644 (file)
index 0000000..bff6044
--- /dev/null
@@ -0,0 +1,35 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-hibernate-resume@.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-hibernate-resume@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-hibernate-resume@.service, systemd-hibernate-resume — Resume from hibernation</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-hibernate-resume@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-hibernate-resume</code></p></div><div class="refsect1"><a name="idm214172549968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-hibernate-resume@.service</code>
+                initiates the resume from hibernation. It is
+                instantiated with the device to resume from as the
+                template argument.</p><p><code class="filename">systemd-hibernate-resume</code> only supports
+                the in-kernel hibernation implementation, known as
+                <a class="ulink" href="https://www.kernel.org/doc/Documentation/power/swsusp.txt" target="_top">swsusp</a>.
+                Internally, it works by writing the major:minor of specified
+                device node to <code class="filename">/sys/power/resume</code>.</p><p>Failing to initiate a resume is not an error condition.
+                It may mean that there was no resume image (e. g. if the
+                system has been simply powered off and not hibernated). In
+                such case, the boot is ordinarily continued.</p></div><div class="refsect1"><a name="idm214172544816"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a>
+                </p></div></div></body></html>
diff --git a/man/systemd-hibernate-resume@.service.8 b/man/systemd-hibernate-resume@.service.8
new file mode 100644 (file)
index 0000000..22e732f
--- /dev/null
@@ -0,0 +1,49 @@
+'\" t
+.TH "SYSTEMD\-HIBERNATE\-RESUME@\&.SERVICE" "8" "" "systemd 217" "systemd-hibernate-resume@.service"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+systemd-hibernate-resume@.service, systemd-hibernate-resume \- Resume from hibernation
+.SH "SYNOPSIS"
+.PP
+systemd\-hibernate\-resume@\&.service
+.PP
+/usr/lib/systemd/systemd\-hibernate\-resume
+.SH "DESCRIPTION"
+.PP
+systemd\-hibernate\-resume@\&.service
+initiates the resume from hibernation\&. It is instantiated with the device to resume from as the template argument\&.
+.PP
+systemd\-hibernate\-resume
+only supports the in\-kernel hibernation implementation, known as
+\m[blue]\fBswsusp\fR\m[]\&\s-2\u[1]\d\s+2\&. Internally, it works by writing the major:minor of specified device node to
+/sys/power/resume\&.
+.PP
+Failing to initiate a resume is not an error condition\&. It may mean that there was no resume image (e\&. g\&. if the system has been simply powered off and not hibernated)\&. In such case, the boot is ordinarily continued\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsystemd-hibernate-resume-generator\fR(8)
+.SH "NOTES"
+.IP " 1." 4
+swsusp
+.RS 4
+\%https://www.kernel.org/doc/Documentation/power/swsusp.txt
+.RE
diff --git a/man/systemd-hibernate-resume@.service.html b/man/systemd-hibernate-resume@.service.html
new file mode 100644 (file)
index 0000000..bff6044
--- /dev/null
@@ -0,0 +1,35 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-hibernate-resume@.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-hibernate-resume@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-hibernate-resume@.service, systemd-hibernate-resume — Resume from hibernation</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-hibernate-resume@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-hibernate-resume</code></p></div><div class="refsect1"><a name="idm214172549968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-hibernate-resume@.service</code>
+                initiates the resume from hibernation. It is
+                instantiated with the device to resume from as the
+                template argument.</p><p><code class="filename">systemd-hibernate-resume</code> only supports
+                the in-kernel hibernation implementation, known as
+                <a class="ulink" href="https://www.kernel.org/doc/Documentation/power/swsusp.txt" target="_top">swsusp</a>.
+                Internally, it works by writing the major:minor of specified
+                device node to <code class="filename">/sys/power/resume</code>.</p><p>Failing to initiate a resume is not an error condition.
+                It may mean that there was no resume image (e. g. if the
+                system has been simply powered off and not hibernated). In
+                such case, the boot is ordinarily continued.</p></div><div class="refsect1"><a name="idm214172544816"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a>
+                </p></div></div></body></html>
diff --git a/man/systemd-hibernate-resume@.service.xml b/man/systemd-hibernate-resume@.service.xml
new file mode 100644 (file)
index 0000000..30bfd88
--- /dev/null
@@ -0,0 +1,82 @@
+<?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">
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Ivan Shapovalov
+
+  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="systemd-hibernate-resume@.service">
+
+        <refentryinfo>
+                <title>systemd-hibernate-resume@.service</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Ivan</firstname>
+                                <surname>Shapovalov</surname>
+                                <email>intelfx100@gmail.com</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>systemd-hibernate-resume@.service</refentrytitle>
+                <manvolnum>8</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>systemd-hibernate-resume@.service</refname>
+                <refname>systemd-hibernate-resume</refname>
+                <refpurpose>Resume from hibernation</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <para><filename>systemd-hibernate-resume@.service</filename></para>
+                <para><filename>/usr/lib/systemd/systemd-hibernate-resume</filename></para>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para><filename>systemd-hibernate-resume@.service</filename>
+                initiates the resume from hibernation. It is
+                instantiated with the device to resume from as the
+                template argument.</para>
+
+                <para><filename>systemd-hibernate-resume</filename> only supports
+                the in-kernel hibernation implementation, known as
+                <ulink url="https://www.kernel.org/doc/Documentation/power/swsusp.txt">swsusp</ulink>.
+                Internally, it works by writing the major:minor of specified
+                device node to <filename>/sys/power/resume</filename>.</para>
+
+                <para>Failing to initiate a resume is not an error condition.
+                It may mean that there was no resume image (e. g. if the
+                system has been simply powered off and not hibernated). In
+                such case, the boot is ordinarily continued.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>See Also</title>
+                <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                </para>
+        </refsect1>
+
+</refentry>
index 854aa8358db1a2e9d7b3422eff57678fa1e24f0d..a0b41de574bde7246e986bf89c7055d8a1ad6afb 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sleep</code></p></div><div class="refsect1"><a name="idm214187249136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/system-sleep</code></p></div><div class="refsect1"><a name="idm214181934464"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
                 a system service that is pulled in by
                 <code class="filename">suspend.target</code> and is responsible
                 for the actual system suspend. Similarly,
                 where can be configured in the "<code class="literal">[Sleep]</code>"
                 section of <code class="filename">/etc/systemd/sleep.conf</code>.
                 See <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214191127792"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
+                </p></div><div class="refsect1"><a name="idm214185815200"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
                 following commands:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="suspend"><span class="term"><code class="option">suspend</code>, </span><span class="term"><code class="option">hibernate</code>, </span><span class="term"><code class="option">hybrid-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p>Suspend, hibernate, or
-                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191121168"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214185808528"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>,
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
index e5cf0a077425db02ba7425632f2e6cb73e3b721e..e2ba6cb6e627c9fac91fd9921a601c56625cd22f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-hostnamed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-hostnamed.service, systemd-hostnamed — Host name bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-hostnamed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-hostnamed</code></p></div><div class="refsect1"><a name="idm214196354864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-hostnamed</code> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-hostnamed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-hostnamed.service, systemd-hostnamed — Host name bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-hostnamed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-hostnamed</code></p></div><div class="refsect1"><a name="idm214186307968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-hostnamed</code> is a system
                 service that may be used as a mechanism to change the
                 system's hostname. <code class="filename">systemd-hostnamed</code> is
                 automatically activated on request and terminates
                 is a command-line client to this service.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/hostnamed" target="_top">
                 developer documentation</a> for information about
                 the APIs <code class="filename">systemd-hostnamed</code>
-                provides.</p></div><div class="refsect1"><a name="idm214194413056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214186302272"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
                         <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
                         <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>,
-                        <a href="sethostname.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
                 </p></div></div></body></html>
index bddca889e133fb7c43813256df17d619704e1804..a1e46c1db3bdd03f9ac5cc5693988fe1885accb3 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-HOSTNAMED\&.SERVICE" "8" "" "systemd 215" "systemd-hostnamed.service"
+.TH "SYSTEMD\-HOSTNAMED\&.SERVICE" "8" "" "systemd 217" "systemd-hostnamed.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index e5cf0a077425db02ba7425632f2e6cb73e3b721e..e2ba6cb6e627c9fac91fd9921a601c56625cd22f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-hostnamed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-hostnamed.service, systemd-hostnamed — Host name bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-hostnamed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-hostnamed</code></p></div><div class="refsect1"><a name="idm214196354864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-hostnamed</code> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-hostnamed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-hostnamed.service, systemd-hostnamed — Host name bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-hostnamed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-hostnamed</code></p></div><div class="refsect1"><a name="idm214186307968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-hostnamed</code> is a system
                 service that may be used as a mechanism to change the
                 system's hostname. <code class="filename">systemd-hostnamed</code> is
                 automatically activated on request and terminates
                 is a command-line client to this service.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/hostnamed" target="_top">
                 developer documentation</a> for information about
                 the APIs <code class="filename">systemd-hostnamed</code>
-                provides.</p></div><div class="refsect1"><a name="idm214194413056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214186302272"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
                         <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
                         <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>,
-                        <a href="sethostname.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
                 </p></div></div></body></html>
index 854aa8358db1a2e9d7b3422eff57678fa1e24f0d..a0b41de574bde7246e986bf89c7055d8a1ad6afb 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sleep</code></p></div><div class="refsect1"><a name="idm214187249136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/system-sleep</code></p></div><div class="refsect1"><a name="idm214181934464"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
                 a system service that is pulled in by
                 <code class="filename">suspend.target</code> and is responsible
                 for the actual system suspend. Similarly,
                 where can be configured in the "<code class="literal">[Sleep]</code>"
                 section of <code class="filename">/etc/systemd/sleep.conf</code>.
                 See <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214191127792"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
+                </p></div><div class="refsect1"><a name="idm214185815200"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
                 following commands:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="suspend"><span class="term"><code class="option">suspend</code>, </span><span class="term"><code class="option">hibernate</code>, </span><span class="term"><code class="option">hybrid-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p>Suspend, hibernate, or
-                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191121168"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214185808528"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>,
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
index 81964bbad2b8406307a01f4242fb067680775f55..1b1525ff58e4c2dafc0c9484a0e88e5a2df002f9 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-INHIBIT" "1" "" "systemd 215" "systemd-inhibit"
+.TH "SYSTEMD\-INHIBIT" "1" "" "systemd 217" "systemd-inhibit"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 911459fcf037a85d5215f27564b22ee2a44e46f6..108652d8c483516d8ac2dd52886184245c095a68 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-inhibit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-inhibit — Execute a program with an inhibition lock taken</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-inhibit [OPTIONS...]  [COMMAND]  [ARGUMENTS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">systemd-inhibit [OPTIONS...] --list</code> </p></div></div><div class="refsect1"><a name="idm214188595296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-inhibit</strong></span> may be used
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-inhibit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-inhibit — Execute a program with an inhibition lock taken</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-inhibit [OPTIONS...]  [COMMAND]  [ARGUMENTS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">systemd-inhibit [OPTIONS...] --list</code> </p></div></div><div class="refsect1"><a name="idm214185423696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-inhibit</strong></span> may be used
                 to execute a program with a shutdown, sleep or idle
                 inhibitor lock taken. The lock will be acquired before
                 the specified command line is executed and released
@@ -29,7 +29,7 @@
                 to avoid system suspends while an optical disc is
                 being recorded, or similar operations that should not
                 be interrupted.</p><p>For more information see the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/inhibit" target="_top">Inhibitor
-                Lock Developer Documentation</a>.</p></div><div class="refsect1"><a name="idm214188640000"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--what="><span class="term"><code class="option">--what=</code></span><a class="headerlink" title="Permalink to this term" href="#--what=">¶</a></dt><dd><p>Takes a colon-separated
+                Lock Developer Documentation</a>.</p></div><div class="refsect1"><a name="idm214185419888"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--what="><span class="term"><code class="option">--what=</code></span><a class="headerlink" title="Permalink to this term" href="#--what=">¶</a></dt><dd><p>Takes a colon-separated
                                 list of one or more
                                 operations to inhibit:
                                 "<code class="literal">shutdown</code>",
                                 "<code class="literal">shutdown</code>".</p></dd><dt id="--list"><span class="term"><code class="option">--list</code></span><a class="headerlink" title="Permalink to this term" href="#--list">¶</a></dt><dd><p>Lists all active
                                 inhibition locks instead of acquiring
                                 one.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188694752"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>Returns the exit status of the executed program.</p></div><div class="refsect1"><a name="idm214188693568"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting"># systemd-inhibit wodim foobar.iso</pre><p>This burns the ISO image
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214189342752"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>Returns the exit status of the executed program.</p></div><div class="refsect1"><a name="idm214189341568"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><pre class="programlisting"># systemd-inhibit wodim foobar.iso</pre><p>This burns the ISO image
                 <code class="filename">foobar.iso</code> on a CD using
-                <a href="wodim.html"><span class="citerefentry"><span class="refentrytitle">wodim</span>(1)</span></a>,
+                <a href="http://man7.org/linux/man-pages/man1/wodim.1.html"><span class="citerefentry"><span class="refentrytitle">wodim</span>(1)</span></a>,
                 and inhibits system sleeping, shutdown and idle while
-                doing so.</p></div><div class="refsect1"><a name="idm214188690080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                doing so.</p></div><div class="refsect1"><a name="idm214189337712"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a>
                 </p></div></div></body></html>
index 555c5414b4d1fd270d992db00a2c8e90a22420ed..c694744fb9945083dee3387152afa3f1252a49e5 100644 (file)
 
                 <para>This burns the ISO image
                 <filename>foobar.iso</filename> on a CD using
-                <citerefentry><refentrytitle>wodim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                <citerefentry project='man-pages'><refentrytitle>wodim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                 and inhibits system sleeping, shutdown and idle while
                 doing so.</para>
         </refsect1>
index 47264459929e16978536676f713d8f31d45a72d0..cf00d867289eed60663c2276862f36ce6d0702c1 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-initctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-initctl.service, systemd-initctl.socket, systemd-initctl — /dev/initctl compatibility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-initctl.service</code></p><p><code class="filename">systemd-initctl.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-initctl</code></p></div><div class="refsect1"><a name="idm214170800944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-initctl</code> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-initctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-initctl.service, systemd-initctl.socket, systemd-initctl — /dev/initctl compatibility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-initctl.service</code></p><p><code class="filename">systemd-initctl.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-initctl</code></p></div><div class="refsect1"><a name="idm214174608944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-initctl</code> is a system
                 service that implements compatibility with the
                 <code class="filename">/dev/initctl</code> FIFO file system
                 object, as implemented by the SysV init system. <code class="filename">systemd-initctl</code> is
                 automatically activated on request and terminates
-                itself when it is unused.</p></div><div class="refsect1"><a name="idm214170797584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                itself when it is unused.</p></div><div class="refsect1"><a name="idm214174605584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 </p></div></div></body></html>
index fa0bf96e05d99c863524f3b504ca3cdc95b5ef16..08d9aed399c477c9b418d63ad71aeeef97d25111 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-INITCTL\&.SERVICE" "8" "" "systemd 215" "systemd-initctl.service"
+.TH "SYSTEMD\-INITCTL\&.SERVICE" "8" "" "systemd 217" "systemd-initctl.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 47264459929e16978536676f713d8f31d45a72d0..cf00d867289eed60663c2276862f36ce6d0702c1 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-initctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-initctl.service, systemd-initctl.socket, systemd-initctl — /dev/initctl compatibility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-initctl.service</code></p><p><code class="filename">systemd-initctl.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-initctl</code></p></div><div class="refsect1"><a name="idm214170800944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-initctl</code> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-initctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-initctl.service, systemd-initctl.socket, systemd-initctl — /dev/initctl compatibility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-initctl.service</code></p><p><code class="filename">systemd-initctl.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-initctl</code></p></div><div class="refsect1"><a name="idm214174608944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-initctl</code> is a system
                 service that implements compatibility with the
                 <code class="filename">/dev/initctl</code> FIFO file system
                 object, as implemented by the SysV init system. <code class="filename">systemd-initctl</code> is
                 automatically activated on request and terminates
-                itself when it is unused.</p></div><div class="refsect1"><a name="idm214170797584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                itself when it is unused.</p></div><div class="refsect1"><a name="idm214174605584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 </p></div></div></body></html>
index 47264459929e16978536676f713d8f31d45a72d0..cf00d867289eed60663c2276862f36ce6d0702c1 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-initctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-initctl.service, systemd-initctl.socket, systemd-initctl — /dev/initctl compatibility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-initctl.service</code></p><p><code class="filename">systemd-initctl.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-initctl</code></p></div><div class="refsect1"><a name="idm214170800944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-initctl</code> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-initctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-initctl.service, systemd-initctl.socket, systemd-initctl — /dev/initctl compatibility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-initctl.service</code></p><p><code class="filename">systemd-initctl.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-initctl</code></p></div><div class="refsect1"><a name="idm214174608944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-initctl</code> is a system
                 service that implements compatibility with the
                 <code class="filename">/dev/initctl</code> FIFO file system
                 object, as implemented by the SysV init system. <code class="filename">systemd-initctl</code> is
                 automatically activated on request and terminates
-                itself when it is unused.</p></div><div class="refsect1"><a name="idm214170797584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                itself when it is unused.</p></div><div class="refsect1"><a name="idm214174605584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 </p></div></div></body></html>
index 3fbf8e6c6f49fb42a23664fb5e537ffa2dfff230..92df8ae77cce684433680732e4873ac073a7949a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journal-gatewayd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd — HTTP server for journal events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journal-gatewayd.service</code></p><p><code class="filename">systemd-journal-gatewayd.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-journal-gatewayd</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214188770192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-journal-gatewayd</strong></span> serves journal
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journal-gatewayd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd — HTTP server for journal events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journal-gatewayd.service</code></p><p><code class="filename">systemd-journal-gatewayd.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-journal-gatewayd</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214184246976"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-journal-gatewayd</strong></span> serves journal
     events over the network. Clients must connect using
     HTTP. The server listens on port 19531 by default.
     If <code class="option">--cert=</code> is specified, the server expects
     and expects to receive a single socket. Use
     <span class="command"><strong>systemctl start systemd-journal-gatewayd.socket</strong></span> to start
     the service, and <span class="command"><strong>systemctl enable systemd-journal-gatewayd.socket</strong></span>
-    to have it started on boot.</p></div><div class="refsect1"><a name="idm214184977408"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p>Specify the path to a file containing a server
+    to have it started on boot.</p></div><div class="refsect1"><a name="idm214184241968"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p>Specify the path to a file containing a server
         certificate in PEM format. This option switches
         <span class="command"><strong>systemd-journal-gatewayd</strong></span> into HTTPS mode
         and must be used together with
         <code class="option">--key=</code>.</p></dd><dt id="--key="><span class="term"><code class="option">--key=</code></span><a class="headerlink" title="Permalink to this term" href="#--key=">¶</a></dt><dd><p>Specify the path to a file containing a server
         key in PEM format corresponding to the certificate specified
         with <code class="option">--cert=</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184969312"></a><h2 id="Supported URLs">Supported URLs<a class="headerlink" title="Permalink to this headline" href="#Supported%20URLs">¶</a></h2><p>The following URLs are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="/browse"><span class="term"><code class="uri">/browse</code></span><a class="headerlink" title="Permalink to this term" href="#/browse">¶</a></dt><dd><p>Interactive browsing.</p></dd><dt id="/entries[?option1&amp;option2=value...]"><span class="term"><code class="uri">/entries[?option1&amp;option2=value...]</code></span><a class="headerlink" title="Permalink to this term" href="#/entries%5B?option1&amp;option2=value...%5D">¶</a></dt><dd><p>Retrieval of events in various formats.</p><p>The <code class="option">Accept:</code> part of the HTTP header
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188190784"></a><h2 id="Supported URLs">Supported URLs<a class="headerlink" title="Permalink to this headline" href="#Supported%20URLs">¶</a></h2><p>The following URLs are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="/browse"><span class="term"><code class="uri">/browse</code></span><a class="headerlink" title="Permalink to this term" href="#/browse">¶</a></dt><dd><p>Interactive browsing.</p></dd><dt id="/entries[?option1&amp;option2=value...]"><span class="term"><code class="uri">/entries[?option1&amp;option2=value...]</code></span><a class="headerlink" title="Permalink to this term" href="#/entries%5B?option1&amp;option2=value...%5D">¶</a></dt><dd><p>Retrieval of events in various formats.</p><p>The <code class="option">Accept:</code> part of the HTTP header
         determines the format. Supported values are described below.
         </p><p>The <code class="option">Range:</code> part of the HTTP header
         determines the range of events returned. Supported values are
@@ -48,7 +48,7 @@
   "os_pretty_name" : "Fedora 19 (Rawhide)",
   "virtualization" : "kvm",
   ...}</pre><p>
-        </p></dd><dt id="/fields/FIELD_NAME"><span class="term"><code class="uri">/fields/<em class="replaceable"><code>FIELD_NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/fields/FIELD_NAME">¶</a></dt><dd><p>Return a list of values of this field present in the logs.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188863728"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header">¶</a></h2><p>
+        </p></dd><dt id="/fields/FIELD_NAME"><span class="term"><code class="uri">/fields/<em class="replaceable"><code>FIELD_NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/fields/FIELD_NAME">¶</a></dt><dd><p>Return a list of values of this field present in the logs.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188178912"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header">¶</a></h2><p>
       <code class="option">Accept: <em class="replaceable"><code>format</code></em></code>
     </p><p>Recognized formats:</p><div class="variablelist"><dl class="variablelist"><dt id="text/plain"><span class="term"><code class="constant">text/plain</code></span><a class="headerlink" title="Permalink to this term" href="#text/plain">¶</a></dt><dd><p>The default. Plaintext syslog-like output,
         one line per journal entry
         transfer
         (like <span class="command"><strong>journalctl --output export</strong></span>).
         See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
-        Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188842016"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header">¶</a></h2><p>
+        Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188157632"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header">¶</a></h2><p>
       <code class="option">Range: entries=<em class="replaceable"><code>cursor</code></em>[[:<em class="replaceable"><code>num_skip</code></em>]:<em class="replaceable"><code>num_entries</code></em>]</code>
     </p><p>where
       <code class="option">cursor</code> is a cursor string,
       <code class="option">num_skip</code> is an integer,
       <code class="option">num_entries</code> is an unsigned integer.
-    </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm214188836848"></a><h2 id="URL GET parameters">URL GET parameters<a class="headerlink" title="Permalink to this headline" href="#URL%20GET%20parameters">¶</a></h2><p>Following parameters can be used as part of the URL:</p><div class="variablelist"><dl class="variablelist"><dt id="follow"><span class="term"><code class="uri">follow</code></span><a class="headerlink" title="Permalink to this term" href="#follow">¶</a></dt><dd><p>wait for new events
+    </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm214188152512"></a><h2 id="URL GET parameters">URL GET parameters<a class="headerlink" title="Permalink to this headline" href="#URL%20GET%20parameters">¶</a></h2><p>Following parameters can be used as part of the URL:</p><div class="variablelist"><dl class="variablelist"><dt id="follow"><span class="term"><code class="uri">follow</code></span><a class="headerlink" title="Permalink to this term" href="#follow">¶</a></dt><dd><p>wait for new events
         (like <span class="command"><strong>journalctl --follow</strong></span>, except that
         the number of events returned is not limited).</p></dd><dt id="discrete"><span class="term"><code class="uri">discrete</code></span><a class="headerlink" title="Permalink to this term" href="#discrete">¶</a></dt><dd><p>Test that the specified cursor refers to an
         entry in the journal. Returns just this entry.</p></dd><dt id="boot"><span class="term"><code class="uri">boot</code></span><a class="headerlink" title="Permalink to this term" href="#boot">¶</a></dt><dd><p>Limit events to the current boot of the system
         (like <span class="command"><strong>journalctl --this--boot</strong></span>).</p></dd><dt id="KEY=match"><span class="term"><code class="uri"><em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>match</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#KEY=match">¶</a></dt><dd><p>Match journal fields. See
-        <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188826192"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Retrieve events from this boot from local journal
+        <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183175136"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Retrieve events from this boot from local journal
     in <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
     Export Format</a>:
     </p><pre class="programlisting">curl --silent -H'Accept: application/vnd.fdo.journal' \
        'http://localhost:19531/entries?boot'</pre><p>
     </p><p>Listen for core dumps:
-    </p><pre class="programlisting">curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</pre></div><div class="refsect1"><a name="idm214184189536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p><pre class="programlisting">curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</pre></div><div class="refsect1"><a name="idm214183171632"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
       <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
index 804f8af709330ea8777a40f4cc0e2511382a7463..69df7f3dc27b0d086bb67ccd7a5ecde0537f49ac 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-JOURNAL\-GATEWAYD\&.SERVICE" "8" "" "systemd 215" "systemd-journal-gatewayd.service"
+.TH "SYSTEMD\-JOURNAL\-GATEWAYD\&.SERVICE" "8" "" "systemd 217" "systemd-journal-gatewayd.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 3fbf8e6c6f49fb42a23664fb5e537ffa2dfff230..92df8ae77cce684433680732e4873ac073a7949a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journal-gatewayd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd — HTTP server for journal events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journal-gatewayd.service</code></p><p><code class="filename">systemd-journal-gatewayd.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-journal-gatewayd</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214188770192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-journal-gatewayd</strong></span> serves journal
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journal-gatewayd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd — HTTP server for journal events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journal-gatewayd.service</code></p><p><code class="filename">systemd-journal-gatewayd.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-journal-gatewayd</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214184246976"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-journal-gatewayd</strong></span> serves journal
     events over the network. Clients must connect using
     HTTP. The server listens on port 19531 by default.
     If <code class="option">--cert=</code> is specified, the server expects
     and expects to receive a single socket. Use
     <span class="command"><strong>systemctl start systemd-journal-gatewayd.socket</strong></span> to start
     the service, and <span class="command"><strong>systemctl enable systemd-journal-gatewayd.socket</strong></span>
-    to have it started on boot.</p></div><div class="refsect1"><a name="idm214184977408"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p>Specify the path to a file containing a server
+    to have it started on boot.</p></div><div class="refsect1"><a name="idm214184241968"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p>Specify the path to a file containing a server
         certificate in PEM format. This option switches
         <span class="command"><strong>systemd-journal-gatewayd</strong></span> into HTTPS mode
         and must be used together with
         <code class="option">--key=</code>.</p></dd><dt id="--key="><span class="term"><code class="option">--key=</code></span><a class="headerlink" title="Permalink to this term" href="#--key=">¶</a></dt><dd><p>Specify the path to a file containing a server
         key in PEM format corresponding to the certificate specified
         with <code class="option">--cert=</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184969312"></a><h2 id="Supported URLs">Supported URLs<a class="headerlink" title="Permalink to this headline" href="#Supported%20URLs">¶</a></h2><p>The following URLs are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="/browse"><span class="term"><code class="uri">/browse</code></span><a class="headerlink" title="Permalink to this term" href="#/browse">¶</a></dt><dd><p>Interactive browsing.</p></dd><dt id="/entries[?option1&amp;option2=value...]"><span class="term"><code class="uri">/entries[?option1&amp;option2=value...]</code></span><a class="headerlink" title="Permalink to this term" href="#/entries%5B?option1&amp;option2=value...%5D">¶</a></dt><dd><p>Retrieval of events in various formats.</p><p>The <code class="option">Accept:</code> part of the HTTP header
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188190784"></a><h2 id="Supported URLs">Supported URLs<a class="headerlink" title="Permalink to this headline" href="#Supported%20URLs">¶</a></h2><p>The following URLs are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="/browse"><span class="term"><code class="uri">/browse</code></span><a class="headerlink" title="Permalink to this term" href="#/browse">¶</a></dt><dd><p>Interactive browsing.</p></dd><dt id="/entries[?option1&amp;option2=value...]"><span class="term"><code class="uri">/entries[?option1&amp;option2=value...]</code></span><a class="headerlink" title="Permalink to this term" href="#/entries%5B?option1&amp;option2=value...%5D">¶</a></dt><dd><p>Retrieval of events in various formats.</p><p>The <code class="option">Accept:</code> part of the HTTP header
         determines the format. Supported values are described below.
         </p><p>The <code class="option">Range:</code> part of the HTTP header
         determines the range of events returned. Supported values are
@@ -48,7 +48,7 @@
   "os_pretty_name" : "Fedora 19 (Rawhide)",
   "virtualization" : "kvm",
   ...}</pre><p>
-        </p></dd><dt id="/fields/FIELD_NAME"><span class="term"><code class="uri">/fields/<em class="replaceable"><code>FIELD_NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/fields/FIELD_NAME">¶</a></dt><dd><p>Return a list of values of this field present in the logs.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188863728"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header">¶</a></h2><p>
+        </p></dd><dt id="/fields/FIELD_NAME"><span class="term"><code class="uri">/fields/<em class="replaceable"><code>FIELD_NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/fields/FIELD_NAME">¶</a></dt><dd><p>Return a list of values of this field present in the logs.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188178912"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header">¶</a></h2><p>
       <code class="option">Accept: <em class="replaceable"><code>format</code></em></code>
     </p><p>Recognized formats:</p><div class="variablelist"><dl class="variablelist"><dt id="text/plain"><span class="term"><code class="constant">text/plain</code></span><a class="headerlink" title="Permalink to this term" href="#text/plain">¶</a></dt><dd><p>The default. Plaintext syslog-like output,
         one line per journal entry
         transfer
         (like <span class="command"><strong>journalctl --output export</strong></span>).
         See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
-        Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188842016"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header">¶</a></h2><p>
+        Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188157632"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header">¶</a></h2><p>
       <code class="option">Range: entries=<em class="replaceable"><code>cursor</code></em>[[:<em class="replaceable"><code>num_skip</code></em>]:<em class="replaceable"><code>num_entries</code></em>]</code>
     </p><p>where
       <code class="option">cursor</code> is a cursor string,
       <code class="option">num_skip</code> is an integer,
       <code class="option">num_entries</code> is an unsigned integer.
-    </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm214188836848"></a><h2 id="URL GET parameters">URL GET parameters<a class="headerlink" title="Permalink to this headline" href="#URL%20GET%20parameters">¶</a></h2><p>Following parameters can be used as part of the URL:</p><div class="variablelist"><dl class="variablelist"><dt id="follow"><span class="term"><code class="uri">follow</code></span><a class="headerlink" title="Permalink to this term" href="#follow">¶</a></dt><dd><p>wait for new events
+    </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm214188152512"></a><h2 id="URL GET parameters">URL GET parameters<a class="headerlink" title="Permalink to this headline" href="#URL%20GET%20parameters">¶</a></h2><p>Following parameters can be used as part of the URL:</p><div class="variablelist"><dl class="variablelist"><dt id="follow"><span class="term"><code class="uri">follow</code></span><a class="headerlink" title="Permalink to this term" href="#follow">¶</a></dt><dd><p>wait for new events
         (like <span class="command"><strong>journalctl --follow</strong></span>, except that
         the number of events returned is not limited).</p></dd><dt id="discrete"><span class="term"><code class="uri">discrete</code></span><a class="headerlink" title="Permalink to this term" href="#discrete">¶</a></dt><dd><p>Test that the specified cursor refers to an
         entry in the journal. Returns just this entry.</p></dd><dt id="boot"><span class="term"><code class="uri">boot</code></span><a class="headerlink" title="Permalink to this term" href="#boot">¶</a></dt><dd><p>Limit events to the current boot of the system
         (like <span class="command"><strong>journalctl --this--boot</strong></span>).</p></dd><dt id="KEY=match"><span class="term"><code class="uri"><em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>match</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#KEY=match">¶</a></dt><dd><p>Match journal fields. See
-        <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188826192"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Retrieve events from this boot from local journal
+        <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183175136"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Retrieve events from this boot from local journal
     in <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
     Export Format</a>:
     </p><pre class="programlisting">curl --silent -H'Accept: application/vnd.fdo.journal' \
        'http://localhost:19531/entries?boot'</pre><p>
     </p><p>Listen for core dumps:
-    </p><pre class="programlisting">curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</pre></div><div class="refsect1"><a name="idm214184189536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p><pre class="programlisting">curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</pre></div><div class="refsect1"><a name="idm214183171632"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
       <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
index 3fbf8e6c6f49fb42a23664fb5e537ffa2dfff230..92df8ae77cce684433680732e4873ac073a7949a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journal-gatewayd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd — HTTP server for journal events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journal-gatewayd.service</code></p><p><code class="filename">systemd-journal-gatewayd.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-journal-gatewayd</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214188770192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-journal-gatewayd</strong></span> serves journal
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journal-gatewayd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-gatewayd.service, systemd-journal-gatewayd.socket, systemd-journal-gatewayd — HTTP server for journal events</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journal-gatewayd.service</code></p><p><code class="filename">systemd-journal-gatewayd.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-journal-gatewayd</code>  [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm214184246976"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-journal-gatewayd</strong></span> serves journal
     events over the network. Clients must connect using
     HTTP. The server listens on port 19531 by default.
     If <code class="option">--cert=</code> is specified, the server expects
     and expects to receive a single socket. Use
     <span class="command"><strong>systemctl start systemd-journal-gatewayd.socket</strong></span> to start
     the service, and <span class="command"><strong>systemctl enable systemd-journal-gatewayd.socket</strong></span>
-    to have it started on boot.</p></div><div class="refsect1"><a name="idm214184977408"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p>Specify the path to a file containing a server
+    to have it started on boot.</p></div><div class="refsect1"><a name="idm214184241968"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p>Specify the path to a file containing a server
         certificate in PEM format. This option switches
         <span class="command"><strong>systemd-journal-gatewayd</strong></span> into HTTPS mode
         and must be used together with
         <code class="option">--key=</code>.</p></dd><dt id="--key="><span class="term"><code class="option">--key=</code></span><a class="headerlink" title="Permalink to this term" href="#--key=">¶</a></dt><dd><p>Specify the path to a file containing a server
         key in PEM format corresponding to the certificate specified
         with <code class="option">--cert=</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184969312"></a><h2 id="Supported URLs">Supported URLs<a class="headerlink" title="Permalink to this headline" href="#Supported%20URLs">¶</a></h2><p>The following URLs are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="/browse"><span class="term"><code class="uri">/browse</code></span><a class="headerlink" title="Permalink to this term" href="#/browse">¶</a></dt><dd><p>Interactive browsing.</p></dd><dt id="/entries[?option1&amp;option2=value...]"><span class="term"><code class="uri">/entries[?option1&amp;option2=value...]</code></span><a class="headerlink" title="Permalink to this term" href="#/entries%5B?option1&amp;option2=value...%5D">¶</a></dt><dd><p>Retrieval of events in various formats.</p><p>The <code class="option">Accept:</code> part of the HTTP header
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188190784"></a><h2 id="Supported URLs">Supported URLs<a class="headerlink" title="Permalink to this headline" href="#Supported%20URLs">¶</a></h2><p>The following URLs are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="/browse"><span class="term"><code class="uri">/browse</code></span><a class="headerlink" title="Permalink to this term" href="#/browse">¶</a></dt><dd><p>Interactive browsing.</p></dd><dt id="/entries[?option1&amp;option2=value...]"><span class="term"><code class="uri">/entries[?option1&amp;option2=value...]</code></span><a class="headerlink" title="Permalink to this term" href="#/entries%5B?option1&amp;option2=value...%5D">¶</a></dt><dd><p>Retrieval of events in various formats.</p><p>The <code class="option">Accept:</code> part of the HTTP header
         determines the format. Supported values are described below.
         </p><p>The <code class="option">Range:</code> part of the HTTP header
         determines the range of events returned. Supported values are
@@ -48,7 +48,7 @@
   "os_pretty_name" : "Fedora 19 (Rawhide)",
   "virtualization" : "kvm",
   ...}</pre><p>
-        </p></dd><dt id="/fields/FIELD_NAME"><span class="term"><code class="uri">/fields/<em class="replaceable"><code>FIELD_NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/fields/FIELD_NAME">¶</a></dt><dd><p>Return a list of values of this field present in the logs.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188863728"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header">¶</a></h2><p>
+        </p></dd><dt id="/fields/FIELD_NAME"><span class="term"><code class="uri">/fields/<em class="replaceable"><code>FIELD_NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/fields/FIELD_NAME">¶</a></dt><dd><p>Return a list of values of this field present in the logs.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188178912"></a><h2 id="Accept header">Accept header<a class="headerlink" title="Permalink to this headline" href="#Accept%20header">¶</a></h2><p>
       <code class="option">Accept: <em class="replaceable"><code>format</code></em></code>
     </p><p>Recognized formats:</p><div class="variablelist"><dl class="variablelist"><dt id="text/plain"><span class="term"><code class="constant">text/plain</code></span><a class="headerlink" title="Permalink to this term" href="#text/plain">¶</a></dt><dd><p>The default. Plaintext syslog-like output,
         one line per journal entry
         transfer
         (like <span class="command"><strong>journalctl --output export</strong></span>).
         See <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
-        Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188842016"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header">¶</a></h2><p>
+        Export Format</a> for more information.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188157632"></a><h2 id="Range header">Range header<a class="headerlink" title="Permalink to this headline" href="#Range%20header">¶</a></h2><p>
       <code class="option">Range: entries=<em class="replaceable"><code>cursor</code></em>[[:<em class="replaceable"><code>num_skip</code></em>]:<em class="replaceable"><code>num_entries</code></em>]</code>
     </p><p>where
       <code class="option">cursor</code> is a cursor string,
       <code class="option">num_skip</code> is an integer,
       <code class="option">num_entries</code> is an unsigned integer.
-    </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm214188836848"></a><h2 id="URL GET parameters">URL GET parameters<a class="headerlink" title="Permalink to this headline" href="#URL%20GET%20parameters">¶</a></h2><p>Following parameters can be used as part of the URL:</p><div class="variablelist"><dl class="variablelist"><dt id="follow"><span class="term"><code class="uri">follow</code></span><a class="headerlink" title="Permalink to this term" href="#follow">¶</a></dt><dd><p>wait for new events
+    </p><p>Range defaults to all available events.</p></div><div class="refsect1"><a name="idm214188152512"></a><h2 id="URL GET parameters">URL GET parameters<a class="headerlink" title="Permalink to this headline" href="#URL%20GET%20parameters">¶</a></h2><p>Following parameters can be used as part of the URL:</p><div class="variablelist"><dl class="variablelist"><dt id="follow"><span class="term"><code class="uri">follow</code></span><a class="headerlink" title="Permalink to this term" href="#follow">¶</a></dt><dd><p>wait for new events
         (like <span class="command"><strong>journalctl --follow</strong></span>, except that
         the number of events returned is not limited).</p></dd><dt id="discrete"><span class="term"><code class="uri">discrete</code></span><a class="headerlink" title="Permalink to this term" href="#discrete">¶</a></dt><dd><p>Test that the specified cursor refers to an
         entry in the journal. Returns just this entry.</p></dd><dt id="boot"><span class="term"><code class="uri">boot</code></span><a class="headerlink" title="Permalink to this term" href="#boot">¶</a></dt><dd><p>Limit events to the current boot of the system
         (like <span class="command"><strong>journalctl --this--boot</strong></span>).</p></dd><dt id="KEY=match"><span class="term"><code class="uri"><em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>match</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#KEY=match">¶</a></dt><dd><p>Match journal fields. See
-        <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188826192"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Retrieve events from this boot from local journal
+        <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183175136"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Retrieve events from this boot from local journal
     in <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
     Export Format</a>:
     </p><pre class="programlisting">curl --silent -H'Accept: application/vnd.fdo.journal' \
        'http://localhost:19531/entries?boot'</pre><p>
     </p><p>Listen for core dumps:
-    </p><pre class="programlisting">curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</pre></div><div class="refsect1"><a name="idm214184189536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p><pre class="programlisting">curl 'http://localhost:19531/entries?follow&amp;MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</pre></div><div class="refsect1"><a name="idm214183171632"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
       <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
index af336e874230fcef2ce17a70136d419c8ec4b611..01177cdd98a66e2e57ffaaba87ec647a4def863c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-JOURNAL\-REMOTE" "8" "" "systemd 215" "systemd-journal-remote"
+.TH "SYSTEMD\-JOURNAL\-REMOTE" "8" "" "systemd 217" "systemd-journal-remote"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
 .SH "NAME"
-systemd-journal-remote \- Stream journal messages over the network
+systemd-journal-remote \- Receive journal messages over the network
 .SH "SYNOPSIS"
 .HP \w'\fBsystemd\-journal\-remote\fR\ 'u
-\fBsystemd\-journal\-remote\fR [OPTIONS...] [\-o/\-\-output=DIR|FILE] [SOURCES...]
+\fBsystemd\-journal\-remote\fR [OPTIONS...] [\-o/\-\-output=\fIDIR\fR|\fIFILE\fR] [SOURCES...]
 .SH "DESCRIPTION"
 .PP
 systemd\-journal\-remote
-is a command to receive serialized journal events and store them to the journal\&. Input streams must be in the
+is a command to receive serialized journal events and store them to the journal\&. Input streams are in the
 \m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[1]\d\s+2, i\&.e\&. like the output from
-\fBjournalctl \-\-output=export\fR\&.
+\fBjournalctl \-\-output=export\fR\&. For transport over the network, this serialized stream is usually carried over an HTTPS connection\&.
 .SH "SOURCES"
 .PP
 Sources can be either "active" (\fBsystemd\-journal\-remote\fR
@@ -112,11 +112,11 @@ above\&. In the latter case, an HTTP or HTTPS server will be spawned using this
 The location of the output journal can be specified with
 \fB\-o\fR
 or
-\fB\-\-output=\fR\&.
+\fB\-\-output=\fR\&. For "active" sources, this option is required\&.
 .PP
 \fB\-\-output=\fR\fB\fIFILE\fR\fR
 .RS 4
-Will write to this journal\&. The filename must end with
+Will write to this journal file\&. The filename must end with
 \&.journal\&. The file will be created if it does not exist\&. If necessary (journal file full, or corrupted), the file will be renamed following normal journald rules and a new journal file will be created in its stead\&.
 .RE
 .PP
@@ -131,34 +131,27 @@ will be generated using the rules described below\&.
 If
 \fB\-\-output=\fR
 is not used, the output directory
-/var/log/journal/\fImachine\-id\fR/
-will be used, where
-\fImachine\-id\fR
-is the identifier of the current system (see
-\fBmachine-id\fR(5))\&. In case the output file is not specified, journal files will be created underneath the selected directory\&. Files will be called
-remote\-\fIvariable\fR\&.journal, where the
-\fIvariable\fR
-part is generated based on what passive and active sources are specified\&. It is recommended to give a full output filename\&.
-.PP
-In case of "active" sources, if the hostname is known, it will be used in the
-\fIvariable\fR
-part\&. Otherwise, local address and port number will be used, or
-"stdin"
-for events passed over standard input, and
-"multiple"
-if more than one source is specified\&.
+/var/log/journal/remote/
+will be used\&. In case the output file is not specified, journal files will be created underneath the selected directory\&. Files will be called
+remote\-\fIhostname\fR\&.journal, where the
+\fIhostname\fR
+part is the escaped hostname of the source endpoint of the connection, or the numerical address if the hostname cannot be determined\&.
+.PP
+In case of "active" sources, the output file name must always be given explicitly\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
 .PP
-\fB\-\-help\fR, \fB\-h\fR
+\fB\-\-split\-mode\fR
 .RS 4
-Print a short help text and exit\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Print a short version string and exit\&.
+One of
+\fBnone\fR
+or
+\fBhost\fR\&. For the first, only one output journal file is used\&. For the latter, a separate output file is used, based on the hostname of the other endpoint of a connection\&.
+.sp
+In case of "active" sources, the output file name must always be given explicitly and only
+\fBnone\fR
+is allowed\&.
 .RE
 .PP
 \fB\-\-compress\fR, \fB\-\-no\-compress\fR
@@ -197,6 +190,16 @@ Examples:
 .RE
 .\}
 .RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Print a short help text and exit\&.
+.RE
+.PP
+\fB\-\-version\fR
+.RS 4
+Print a short version string and exit\&.
+.RE
 .SH "EXAMPLES"
 .PP
 Copy local journal events to a different journal directory:
@@ -230,9 +233,10 @@ systemd\-journal\-remote \-\-url http://some\&.host:19531/
 .sp
 .SH "SEE ALSO"
 .PP
+\fBsystemd-journal-upload\fR(8),
 \fBjournalctl\fR(1),
 \fBsystemd-journald.service\fR(8),
-\fBsystemd-journal-gatewayd.service\fR(8)\&.
+\fBsystemd-journal-gatewayd.service\fR(8)
 .SH "NOTES"
 .IP " 1." 4
 Journal Export Format
index ef90cc0f6840aa86deb414c6000f89751255ca17..5ba04c6e8847f0d9d0814bb94fb4a27f82a270a5 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journal-remote"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-remote — Stream journal messages over the network</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-journal-remote</code>  [OPTIONS...] [-o/--output=DIR|FILE] [SOURCES...]</p></div></div><div class="refsect1"><a name="idm214192157056"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journal-remote"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-remote — Receive journal messages over the network</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-journal-remote</code>  [OPTIONS...] [-o/--output=<em class="replaceable"><code>DIR</code></em>|<em class="replaceable"><code>FILE</code></em>] [SOURCES...]</p></div></div><div class="refsect1"><a name="idm214172089888"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
       <code class="filename">systemd-journal-remote</code> is a command to
       receive serialized journal events and store them to the journal.
-      Input streams must be in the
+      Input streams are in the
       <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">
         Journal Export Format
       </a>,
       i.e. like the output from
-      <span class="command"><strong>journalctl --output=export</strong></span>.
-    </p></div><div class="refsect1"><a name="idm214188367888"></a><h2 id="Sources">Sources<a class="headerlink" title="Permalink to this headline" href="#Sources">¶</a></h2><p>
+      <span class="command"><strong>journalctl --output=export</strong></span>. For transport over
+      the network, this serialized stream is usually carried over an
+      HTTPS connection.
+    </p></div><div class="refsect1"><a name="idm214172086368"></a><h2 id="Sources">Sources<a class="headerlink" title="Permalink to this headline" href="#Sources">¶</a></h2><p>
       Sources can be either "active"
       (<span class="command"><strong>systemd-journal-remote</strong></span> requests and pulls
       the data), or "passive"
         <code class="option">--listen-https=-<em class="replaceable"><code>n</code></em></code>
         above. In the latter case, an HTTP or HTTPS server will be
         spawned using this descriptor and connections must be made
-        over the HTTP protocol.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192241888"></a><h2 id="Sinks">Sinks<a class="headerlink" title="Permalink to this headline" href="#Sinks">¶</a></h2><p>The location of the output journal can be specified
-    with <code class="option">-o</code> or <code class="option">--output=</code>.
-    </p><div class="variablelist"><dl class="variablelist"><dt id="--output=FILE"><span class="term"><code class="option">--output=<em class="replaceable"><code>FILE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--output=FILE">¶</a></dt><dd><p>Will write to this journal. The filename must
-        end with <code class="filename">.journal</code>. The file will be
-        created if it does not exist. If necessary (journal file
-        full, or corrupted), the file will be renamed following normal
+        over the HTTP protocol.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176005424"></a><h2 id="Sinks">Sinks<a class="headerlink" title="Permalink to this headline" href="#Sinks">¶</a></h2><p>The location of the output journal can be specified
+    with <code class="option">-o</code> or <code class="option">--output=</code>. For "active"
+    sources, this option is required.
+    </p><div class="variablelist"><dl class="variablelist"><dt id="--output=FILE"><span class="term"><code class="option">--output=<em class="replaceable"><code>FILE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--output=FILE">¶</a></dt><dd><p>Will write to this journal file. The filename
+        must end with <code class="filename">.journal</code>. The file will be
+        created if it does not exist. If necessary (journal file full,
+        or corrupted), the file will be renamed following normal
         journald rules and a new journal file will be created in its
         stead.</p></dd><dt id="--output=DIR"><span class="term"><code class="option">--output=<em class="replaceable"><code>DIR</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--output=DIR">¶</a></dt><dd><p>Will create journal files underneath directory
         <em class="replaceable"><code>DIR</code></em>. The directory must exist. If
         necessary (journal files over size, or corrupted), journal
         files will be rotated following normal journald rules. Names
         of files underneath <em class="replaceable"><code>DIR</code></em> will be
-        generated using the rules described below.</p></dd></dl></div><p>If <code class="option">--output=</code> is not used, the output directory
-    <code class="filename">/var/log/journal/<em class="replaceable"><code>machine-id</code></em>/</code>
-    will be used, where <em class="replaceable"><code>machine-id</code></em> is the
-    identifier of the current system (see
-    <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>).
-    In case the output file is not specified, journal files will be
-    created underneath the selected directory. Files will be called
-    <code class="filename">remote-<em class="replaceable"><code>variable</code></em>.journal</code>,
-    where the <em class="replaceable"><code>variable</code></em> part is generated
-    based on what passive and active sources are specified. It is
-    recommended to give a full output filename.</p><p>In case of "active" sources, if the hostname is known, it
-    will be used in the <em class="replaceable"><code>variable</code></em> part.
-    Otherwise, local address and port number will be used, or
-    "<code class="literal">stdin</code>" for events passed over standard
-    input, and "<code class="literal">multiple</code>" if more than one source
-    is specified.</p></div><div class="refsect1"><a name="idm214192219344"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code>, </span><span class="term"><code class="option">-h</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p>Print a short help
-        text and exit.</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>Print a short version
-        string and exit.</p></dd><dt id="--compress"><span class="term"><code class="option">--compress</code>, </span><span class="term"><code class="option">--no-compress</code></span><a class="headerlink" title="Permalink to this term" href="#--compress">¶</a></dt><dd><p>Compress or not, respectively, the data in the
+        generated using the rules described below.</p></dd></dl></div><p>If <code class="option">--output=</code> is not used, the output
+    directory <code class="filename">/var/log/journal/remote/</code> will be
+    used.  In case the output file is not specified, journal files
+    will be created underneath the selected directory. Files will be
+    called
+    <code class="filename">remote-<em class="replaceable"><code>hostname</code></em>.journal</code>,
+    where the <em class="replaceable"><code>hostname</code></em> part is the
+    escaped hostname of the source endpoint of the connection, or the
+    numerical address if the hostname cannot be determined.</p><p>In case of "active" sources, the output file name must
+    always be given explicitly.</p></div><div class="refsect1"><a name="idm214175993824"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--split-mode"><span class="term"><code class="option">--split-mode</code></span><a class="headerlink" title="Permalink to this term" href="#--split-mode">¶</a></dt><dd><p>One of <code class="constant">none</code> or
+        <code class="constant">host</code>. For the first, only one output
+        journal file is used. For the latter, a separate output file
+        is used, based on the hostname of the other endpoint of a
+        connection.</p><p>In case of "active" sources, the output file name must
+        always be given explicitly and only <code class="constant">none</code>
+        is allowed.</p></dd><dt id="--compress"><span class="term"><code class="option">--compress</code>, </span><span class="term"><code class="option">--no-compress</code></span><a class="headerlink" title="Permalink to this term" href="#--compress">¶</a></dt><dd><p>Compress or not, respectively, the data in the
         journal using XZ.</p></dd><dt id="--seal"><span class="term"><code class="option">--seal</code>, </span><span class="term"><code class="option">--no-seal</code></span><a class="headerlink" title="Permalink to this term" href="#--seal">¶</a></dt><dd><p>Periodically sign or not, respectively, the
         data in the journal using Forward Secure Sealing.
         </p></dd><dt id="--getter=PROG --option1 --option2"><span class="term"><code class="option">--getter=<em class="replaceable"><code>PROG --option1 --option2</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--getter=PROG%20--option1%20--option2">¶</a></dt><dd><p>Program to invoke to retrieve data. The journal
-        event stream must be generated on standard output.</p><p>Examples:</p><pre class="programlisting">--getter='curl "-HAccept: application/vnd.fdo.journal" https://some.host:19531/'</pre><pre class="programlisting">--getter='wget --header="Accept: application/vnd.fdo.journal" -O- https://some.host:19531/'</pre></dd></dl></div></div><div class="refsect1"><a name="idm214187575664"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Copy local journal events to a different journal directory:
+        event stream must be generated on standard output.</p><p>Examples:</p><pre class="programlisting">--getter='curl "-HAccept: application/vnd.fdo.journal" https://some.host:19531/'</pre><pre class="programlisting">--getter='wget --header="Accept: application/vnd.fdo.journal" -O- https://some.host:19531/'</pre></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171013136"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Copy local journal events to a different journal directory:
     </p><pre class="programlisting">
 journalctl -o export | systemd-journal-remote -o /tmp/dir -
     </pre><p>
@@ -130,8 +132,9 @@ journalctl -o export | systemd-journal-remote -o /tmp/dir -
     </p><pre class="programlisting">
 systemd-journal-remote --url http://some.host:19531/
     </pre><p>
-    </p></div><div class="refsect1"><a name="idm214187571248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></div><div class="refsect1"><a name="idm214171008960"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>,
       <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
       <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
-      <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>.
+      <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>
     </p></div></div></body></html>
index 972c3227e4804a15e43d5ddd920d3c463ea4631f..08c0283d82e4d210a013b0dd409db1ed847b1aac 100644 (file)
@@ -21,7 +21,8 @@ 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="systemd-journal-remote" conditional='HAVE_MICROHTTPD'>
+<refentry id="systemd-journal-remote" conditional='HAVE_MICROHTTPD'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>systemd-journal-remote</title>
@@ -44,14 +45,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
   <refnamediv>
     <refname>systemd-journal-remote</refname>
-    <refpurpose>Stream journal messages over the network</refpurpose>
+    <refpurpose>Receive journal messages over the network</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
     <cmdsynopsis>
       <command>systemd-journal-remote</command>
       <arg choice="opt" rep="repeat">OPTIONS</arg>
-      <arg choice="opt" rep="norepeat">-o/--output=DIR|FILE</arg>
+      <arg choice="opt" rep="norepeat">-o/--output=<replaceable>DIR</replaceable>|<replaceable>FILE</replaceable></arg>
       <arg choice="opt" rep="repeat">SOURCES</arg>
     </cmdsynopsis>
   </refsynopsisdiv>
@@ -62,12 +63,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>
       <filename>systemd-journal-remote</filename> is a command to
       receive serialized journal events and store them to the journal.
-      Input streams must be in the
+      Input streams are in the
       <ulink url="http://www.freedesktop.org/wiki/Software/systemd/export">
         Journal Export Format
       </ulink>,
       i.e. like the output from
-      <command>journalctl --output=export</command>.
+      <command>journalctl --output=export</command>. For transport over
+      the network, this serialized stream is usually carried over an
+      HTTPS connection.
     </para>
   </refsect1>
 
@@ -184,17 +187,18 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <title>Sinks</title>
 
     <para>The location of the output journal can be specified
-    with <option>-o</option> or <option>--output=</option>.
+    with <option>-o</option> or <option>--output=</option>. For "active"
+    sources, this option is required.
     </para>
 
     <variablelist>
       <varlistentry>
         <term><option>--output=<replaceable>FILE</replaceable></option></term>
 
-        <listitem><para>Will write to this journal. The filename must
-        end with <filename>.journal</filename>. The file will be
-        created if it does not exist. If necessary (journal file
-        full, or corrupted), the file will be renamed following normal
+        <listitem><para>Will write to this journal file. The filename
+        must end with <filename>.journal</filename>. The file will be
+        created if it does not exist. If necessary (journal file full,
+        or corrupted), the file will be renamed following normal
         journald rules and a new journal file will be created in its
         stead.</para></listitem>
       </varlistentry>
@@ -211,24 +215,18 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       </varlistentry>
     </variablelist>
 
-    <para>If <option>--output=</option> is not used, the output directory
-    <filename>/var/log/journal/<replaceable>machine-id</replaceable>/</filename>
-    will be used, where <replaceable>machine-id</replaceable> is the
-    identifier of the current system (see
-    <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
-    In case the output file is not specified, journal files will be
-    created underneath the selected directory. Files will be called
-    <filename>remote-<replaceable>variable</replaceable>.journal</filename>,
-    where the <replaceable>variable</replaceable> part is generated
-    based on what passive and active sources are specified. It is
-    recommended to give a full output filename.</para>
-
-    <para>In case of "active" sources, if the hostname is known, it
-    will be used in the <replaceable>variable</replaceable> part.
-    Otherwise, local address and port number will be used, or
-    <literal>stdin</literal> for events passed over standard
-    input, and <literal>multiple</literal> if more than one source
-    is specified.</para>
+    <para>If <option>--output=</option> is not used, the output
+    directory <filename>/var/log/journal/remote/</filename> will be
+    used.  In case the output file is not specified, journal files
+    will be created underneath the selected directory. Files will be
+    called
+    <filename>remote-<replaceable>hostname</replaceable>.journal</filename>,
+    where the <replaceable>hostname</replaceable> part is the
+    escaped hostname of the source endpoint of the connection, or the
+    numerical address if the hostname cannot be determined.</para>
+
+    <para>In case of "active" sources, the output file name must
+    always be given explicitly.</para>
   </refsect1>
 
   <refsect1>
@@ -238,18 +236,17 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
 
     <variablelist>
       <varlistentry>
-        <term><option>--help</option></term>
-        <term><option>-h</option></term>
+        <term><option>--split-mode</option></term>
 
-        <listitem><para>Print a short help
-        text and exit.</para></listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--version</option></term>
+        <listitem><para>One of <constant>none</constant> or
+        <constant>host</constant>. For the first, only one output
+        journal file is used. For the latter, a separate output file
+        is used, based on the hostname of the other endpoint of a
+        connection.</para>
 
-        <listitem><para>Print a short version
-        string and exit.</para></listitem>
+        <para>In case of "active" sources, the output file name must
+        always be given explicitly and only <constant>none</constant>
+        is allowed.</para></listitem>
       </varlistentry>
 
       <varlistentry>
@@ -282,6 +279,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
         <programlisting>--getter='wget --header="Accept: application/vnd.fdo.journal" -O- https://some.host:19531/'</programlisting>
         </listitem>
       </varlistentry>
+
+      <xi:include href="standard-options.xml" xpointer="help" />
+      <xi:include href="standard-options.xml" xpointer="version" />
     </variablelist>
   </refsect1>
 
@@ -306,9 +306,10 @@ systemd-journal-remote --url http://some.host:19531/
   <refsect1>
     <title>See Also</title>
     <para>
+      <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+      <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
     </para>
   </refsect1>
 </refentry>
diff --git a/man/systemd-journal-upload.8 b/man/systemd-journal-upload.8
new file mode 100644 (file)
index 0000000..80119ae
--- /dev/null
@@ -0,0 +1,201 @@
+'\" t
+.TH "SYSTEMD\-JOURNAL\-UPLOAD" "8" "" "systemd 217" "systemd-journal-upload"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+systemd-journal-upload \- Send journal messages over the network
+.SH "SYNOPSIS"
+.HP \w'\fBsystemd\-journal\-upload\fR\ 'u
+\fBsystemd\-journal\-upload\fR [OPTIONS...] [\-u/\-\-url=\fIURL\fR] [SOURCES...]
+.SH "DESCRIPTION"
+.PP
+\fBsystemd\-journal\-upload\fR
+will upload journal entries to the URL specified with
+\fB\-\-url\fR\&. Unless limited by one of the options specified below, all journal entries accessible to the user the program is running as will be uploaded, and then the program will wait and send new entries as they become available\&.
+.SH "OPTIONS"
+.PP
+\fB\-u\fR, \fB\-\-url=\fR\fB[https://]\fR\fB\fIURL\fR\fR, \fB\-\-url=\fR\fB[http://]\fR\fB\fIURL\fR\fR
+.RS 4
+Upload to the specified address\&.
+\fIURL\fR
+may specify either just the hostname or both the protocol and hostname\&.
+\fBhttps\fR
+is the default\&.
+.RE
+.PP
+\fB\-\-system\fR, \fB\-\-user\fR
+.RS 4
+Limit uploaded entries to entries from system services and the kernel, or to entries from services of current user\&. This has the same meaning as
+\fB\-\-system\fR
+and
+\fB\-\-user\fR
+options for
+\fBjournalctl\fR(1)\&. If neither is specified, all accessible entries are uploaded\&.
+.RE
+.PP
+\fB\-m\fR, \fB\-\-merge\fR
+.RS 4
+Upload entries interleaved from all available journals, including other machines\&. This has the same meaning as
+\fB\-\-merge\fR
+option for
+\fBjournalctl\fR(1)\&.
+.RE
+.PP
+\fB\-D\fR, \fB\-\-directory=\fR\fB\fIDIR\fR\fR
+.RS 4
+Takes a directory path as argument\&. Upload entries from the specified journal directory
+\fIDIR\fR
+instead of the default runtime and system journal paths\&. This has the same meaning as
+\fB\-\-directory\fR
+option for
+\fBjournalctl\fR(1)\&.
+.RE
+.PP
+\fB\-\-file=\fR\fB\fIGLOB\fR\fR
+.RS 4
+Takes a file glob as an argument\&. Upload entries from the specified journal files matching
+\fIGLOB\fR
+instead of the default runtime and system journal paths\&. May be specified multiple times, in which case files will be suitably interleaved\&. This has the same meaning as
+\fB\-\-file\fR
+option for
+\fBjournalctl\fR(1)\&.
+.RE
+.PP
+\fB\-\-cursor=\fR
+.RS 4
+Upload entries from the location in the journal specified by the passed cursor\&. This has the same meaning as
+\fB\-\-cursor\fR
+option for
+\fBjournalctl\fR(1)\&.
+.RE
+.PP
+\fB\-\-after\-cursor=\fR
+.RS 4
+Upload entries from the location in the journal
+\fIafter\fR
+the location specified by the this cursor\&. This has the same meaning as
+\fB\-\-after\-cursor\fR
+option for
+\fBjournalctl\fR(1)\&.
+.RE
+.PP
+\fB\-\-save\-state\fR[=\fIPATH\fR]
+.RS 4
+Upload entries from the location in the journal
+\fIafter\fR
+the location specified by the cursor saved in file at
+\fIPATH\fR
+(/var/lib/systemd/journal\-upload/state
+by default)\&. After an entry is successfully uploaded, update this file with the cursor of that entry\&.
+.RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Print a short help text and exit\&.
+.RE
+.PP
+\fB\-\-version\fR
+.RS 4
+Print a short version string and exit\&.
+.RE
+.SH "EXIT STATUS"
+.PP
+On success, 0 is returned; otherwise, a non\-zero failure code is returned\&.
+.SH "EXAMPLES"
+.PP
+\fBExample\ \&1.\ \&Setting up certificates for authentication\fR
+.PP
+Certificates signed by a trusted authority are used to verify that the server to which messages are uploaded is legitimate, and vice versa, that the client is trusted\&.
+.PP
+A suitable set of certificates can be generated with
+\fBopenssl\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+openssl req \-newkey rsa:2048 \-days 3650 \-x509 \-nodes \e
+      \-out ca\&.pem \-keyout ca\&.key \-subj \*(Aq/CN=Certificate authority/\*(Aq
+
+cat >ca\&.conf <<EOF
+[ ca ]
+default_ca = this
+
+[ this ]
+new_certs_dir = \&.
+certificate = ca\&.pem
+database = \&./index
+private_key = ca\&.key
+serial = \&./serial
+default_days = 3650
+default_md = default
+policy = policy_anything
+
+[ policy_anything ]
+countryName             = optional
+stateOrProvinceName     = optional
+localityName            = optional
+organizationName        = optional
+organizationalUnitName  = optional
+commonName              = supplied
+emailAddress            = optional
+EOF
+
+touch index
+echo 0001 > serial
+
+SERVER=server
+CLIENT=client
+
+openssl req \-newkey rsa:1024 \-nodes \-out $SERVER\&.csr \-keyout $SERVER\&.key \-subj "/CN=$SERVER/"
+openssl ca \-batch \-config ca\&.conf \-notext \-in $SERVER\&.csr \-out $SERVER\&.pem
+
+openssl req \-newkey rsa:1024 \-nodes \-out $CLIENT\&.csr \-keyout $CLIENT\&.key \-subj "/CN=$CLIENT/"
+openssl ca \-batch \-config ca\&.conf \-notext \-in $CLIENT\&.csr \-out $CLIENT\&.pem
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+Generated files
+ca\&.pem,
+server\&.pem, and
+server\&.key
+should be installed on server, and
+ca\&.pem,
+client\&.pem, and
+client\&.key
+on the client\&. The location of those files can be specified using
+\fITrustedCertificateFile=\fR,
+\fIServerCertificateFile=\fR,
+\fIServerKeyFile=\fR, in
+/etc/systemd/journal\-remote\&.conf
+and
+/etc/systemd/journal\-upload\&.conf
+respectively\&. The default locations can be queried by using
+\fBsystemd\-journal\-remote \-\-help\fR
+and
+\fBsystemd\-journal\-upload \-\-help\fR\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd-journal-remote\fR(8),
+\fBjournalctl\fR(1),
+\fBsystemd-journald.service\fR(8),
+\fBsystemd-journal-gatewayd.service\fR(8)
diff --git a/man/systemd-journal-upload.html b/man/systemd-journal-upload.html
new file mode 100644 (file)
index 0000000..55bf819
--- /dev/null
@@ -0,0 +1,132 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-journal-upload</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journal-upload"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journal-upload — Send journal messages over the network</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-journal-upload</code>  [OPTIONS...] [-u/--url=<em class="replaceable"><code>URL</code></em>] [SOURCES...]</p></div></div><div class="refsect1"><a name="idm214196653968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
+      <span class="command"><strong>systemd-journal-upload</strong></span> will upload journal
+      entries to the URL specified with <code class="option">--url</code>. Unless
+      limited by one of the options specified below, all journal
+      entries accessible to the user the program is running as will be
+      uploaded, and then the program will wait and send new entries
+      as they become available.
+    </p></div><div class="refsect1"><a name="idm214196651408"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--url=[<span class="optional">https://</span>]<em class="replaceable"><code>URL</code></em></code>, </span><span class="term"><code class="option">--url=[<span class="optional">http://</span>]<em class="replaceable"><code>URL</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Upload to the specified
+        address. <em class="replaceable"><code>URL</code></em> may specify either
+        just the hostname or both the protocol and
+        hostname. <code class="constant">https</code> is the default.
+        </p></dd><dt id="--system"><span class="term"><code class="option">--system</code>, </span><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p>Limit uploaded entries to entries from system
+        services and the kernel, or to entries from services of
+        current user. This has the same meaning as
+        <code class="option">--system</code> and <code class="option">--user</code> options
+        for
+        <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>. If
+        neither is specified, all accessible entries are uploaded.
+        </p></dd><dt id="-m"><span class="term"><code class="option">-m</code>, </span><span class="term"><code class="option">--merge</code></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p>Upload entries interleaved from all available
+        journals, including other machines. This has the same meaning
+        as <code class="option">--merge</code> option for
+        <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.</p></dd><dt id="-D"><span class="term"><code class="option">-D</code>, </span><span class="term"><code class="option">--directory=<em class="replaceable"><code>DIR</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-D">¶</a></dt><dd><p>Takes a directory path as argument. Upload
+        entries from the specified journal directory
+        <em class="replaceable"><code>DIR</code></em> instead of the default runtime
+        and system journal paths. This has the same meaning as
+        <code class="option">--directory</code> option for
+        <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
+        </p></dd><dt id="--file=GLOB"><span class="term"><code class="option">--file=<em class="replaceable"><code>GLOB</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--file=GLOB">¶</a></dt><dd><p>Takes a file glob as an argument. Upload
+        entries from the specified journal files matching
+        <em class="replaceable"><code>GLOB</code></em> instead of the default runtime
+        and system journal paths. May be specified multiple times, in
+        which case files will be suitably interleaved. This has the same meaning as
+        <code class="option">--file</code> option for
+        <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
+        </p></dd><dt id="--cursor="><span class="term"><code class="option">--cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--cursor=">¶</a></dt><dd><p>Upload entries from the location in the
+        journal specified by the passed cursor. This has the same
+        meaning as <code class="option">--cursor</code> option for
+        <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.</p></dd><dt id="--after-cursor="><span class="term"><code class="option">--after-cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--after-cursor=">¶</a></dt><dd><p>Upload entries from the location in the
+        journal <span class="emphasis"><em>after</em></span> the location specified by
+        the this cursor.  This has the same meaning as
+        <code class="option">--after-cursor</code> option for
+        <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
+        </p></dd><dt id="--save-state=PATH"><span class="term"><code class="option">--save-state</code>[<span class="optional">=<em class="replaceable"><code>PATH</code></em></span>]</span><a class="headerlink" title="Permalink to this term" href="#--save-state=PATH">¶</a></dt><dd><p>Upload entries from the location in the
+        journal <span class="emphasis"><em>after</em></span> the location specified by
+        the cursor saved in file at <em class="replaceable"><code>PATH</code></em>
+        (<code class="filename">/var/lib/systemd/journal-upload/state</code> by default).
+        After an entry is successfully uploaded, update this file
+        with the cursor of that entry.
+        </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200568176"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned; otherwise, a non-zero
+    failure code is returned.</p></div><div class="refsect1"><a name="idm214200566992"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214200566320"></a><p class="title"><b>Example 1. Setting up certificates for authentication</b></p><div class="example-contents"><p>Certificates signed by a trusted authority are used to
+      verify that the server to which messages are uploaded is
+      legitimate, and vice versa, that the client is trusted.</p><p>A suitable set of certificates can be generated with
+      <span class="command"><strong>openssl</strong></span>:</p><pre class="programlisting">openssl req -newkey rsa:2048 -days 3650 -x509 -nodes \
+      -out ca.pem -keyout ca.key -subj '/CN=Certificate authority/'
+
+cat &gt;ca.conf &lt;&lt;EOF
+[ ca ]
+default_ca = this
+
+[ this ]
+new_certs_dir = .
+certificate = ca.pem
+database = ./index
+private_key = ca.key
+serial = ./serial
+default_days = 3650
+default_md = default
+policy = policy_anything
+
+[ policy_anything ]
+countryName             = optional
+stateOrProvinceName     = optional
+localityName            = optional
+organizationName        = optional
+organizationalUnitName  = optional
+commonName              = supplied
+emailAddress            = optional
+EOF
+
+touch index
+echo 0001 &gt; serial
+
+SERVER=server
+CLIENT=client
+
+openssl req -newkey rsa:1024 -nodes -out $SERVER.csr -keyout $SERVER.key -subj "/CN=$SERVER/"
+openssl ca -batch -config ca.conf -notext -in $SERVER.csr -out $SERVER.pem
+
+openssl req -newkey rsa:1024 -nodes -out $CLIENT.csr -keyout $CLIENT.key -subj "/CN=$CLIENT/"
+openssl ca -batch -config ca.conf -notext -in $CLIENT.csr -out $CLIENT.pem
+</pre><p>Generated files <code class="filename">ca.pem</code>,
+      <code class="filename">server.pem</code>, and
+      <code class="filename">server.key</code> should be installed on server,
+      and <code class="filename">ca.pem</code>,
+      <code class="filename">client.pem</code>, and
+      <code class="filename">client.key</code> on the client. The location of
+      those files can be specified using
+      <code class="varname">TrustedCertificateFile=</code>,
+      <code class="varname">ServerCertificateFile=</code>,
+      <code class="varname">ServerKeyFile=</code>, in
+      <code class="filename">/etc/systemd/journal-remote.conf</code> and
+      <code class="filename">/etc/systemd/journal-upload.conf</code>
+      respectively. The default locations can be queried by using
+      <span class="command"><strong>systemd-journal-remote --help</strong></span> and
+      <span class="command"><strong>systemd-journal-upload --help</strong></span>.</p></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214200552880"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>,
+      <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
+      <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
+      <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>
+    </p></div></div></body></html>
diff --git a/man/systemd-journal-upload.xml b/man/systemd-journal-upload.xml
new file mode 100644 (file)
index 0000000..b4422f2
--- /dev/null
@@ -0,0 +1,263 @@
+<?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">
+
+<!--
+This file is part of systemd.
+
+Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+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="systemd-journal-upload" conditional='HAVE_MICROHTTPD'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>systemd-journal-upload</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>systemd-journal-upload</refentrytitle>
+    <manvolnum>8</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>systemd-journal-upload</refname>
+    <refpurpose>Send journal messages over the network</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>systemd-journal-upload</command>
+      <arg choice="opt" rep="repeat">OPTIONS</arg>
+      <arg choice="opt" rep="norepeat">-u/--url=<replaceable>URL</replaceable></arg>
+      <arg choice="opt" rep="repeat">SOURCES</arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>
+      <command>systemd-journal-upload</command> will upload journal
+      entries to the URL specified with <option>--url</option>. Unless
+      limited by one of the options specified below, all journal
+      entries accessible to the user the program is running as will be
+      uploaded, and then the program will wait and send new entries
+      as they become available.
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Options</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-u</option></term>
+        <term><option>--url=<optional>https://</optional><replaceable>URL</replaceable></option></term>
+        <term><option>--url=<optional>http://</optional><replaceable>URL</replaceable></option></term>
+
+        <listitem><para>Upload to the specified
+        address. <replaceable>URL</replaceable> may specify either
+        just the hostname or both the protocol and
+        hostname. <constant>https</constant> is the default.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--system</option></term>
+        <term><option>--user</option></term>
+
+        <listitem><para>Limit uploaded entries to entries from system
+        services and the kernel, or to entries from services of
+        current user. This has the same meaning as
+        <option>--system</option> and <option>--user</option> options
+        for
+        <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. If
+        neither is specified, all accessible entries are uploaded.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-m</option></term>
+        <term><option>--merge</option></term>
+
+        <listitem><para>Upload entries interleaved from all available
+        journals, including other machines. This has the same meaning
+        as <option>--merge</option> option for
+        <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-D</option></term>
+        <term><option>--directory=<replaceable>DIR</replaceable></option></term>
+
+        <listitem><para>Takes a directory path as argument. Upload
+        entries from the specified journal directory
+        <replaceable>DIR</replaceable> instead of the default runtime
+        and system journal paths. This has the same meaning as
+        <option>--directory</option> option for
+        <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--file=<replaceable>GLOB</replaceable></option></term>
+
+        <listitem><para>Takes a file glob as an argument. Upload
+        entries from the specified journal files matching
+        <replaceable>GLOB</replaceable> instead of the default runtime
+        and system journal paths. May be specified multiple times, in
+        which case files will be suitably interleaved. This has the same meaning as
+        <option>--file</option> option for
+        <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--cursor=</option></term>
+
+        <listitem><para>Upload entries from the location in the
+        journal specified by the passed cursor. This has the same
+        meaning as <option>--cursor</option> option for
+        <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--after-cursor=</option></term>
+
+        <listitem><para>Upload entries from the location in the
+        journal <emphasis>after</emphasis> the location specified by
+        the this cursor.  This has the same meaning as
+        <option>--after-cursor</option> option for
+        <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+        </para></listitem>
+      </varlistentry>
+
+
+      <varlistentry>
+        <term><option>--save-state</option><optional>=<replaceable>PATH</replaceable></optional></term>
+
+        <listitem><para>Upload entries from the location in the
+        journal <emphasis>after</emphasis> the location specified by
+        the cursor saved in file at <replaceable>PATH</replaceable>
+        (<filename>/var/lib/systemd/journal-upload/state</filename> by default).
+        After an entry is successfully uploaded, update this file
+        with the cursor of that entry.
+        </para></listitem>
+      </varlistentry>
+
+      <xi:include href="standard-options.xml" xpointer="help" />
+      <xi:include href="standard-options.xml" xpointer="version" />
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Exit status</title>
+
+    <para>On success, 0 is returned; otherwise, a non-zero
+    failure code is returned.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Examples</title>
+    <example>
+      <title>Setting up certificates for authentication</title>
+
+      <para>Certificates signed by a trusted authority are used to
+      verify that the server to which messages are uploaded is
+      legitimate, and vice versa, that the client is trusted.</para>
+
+      <para>A suitable set of certificates can be generated with
+      <command>openssl</command>:</para>
+
+      <programlisting>openssl req -newkey rsa:2048 -days 3650 -x509 -nodes \
+      -out ca.pem -keyout ca.key -subj '/CN=Certificate authority/'
+
+cat >ca.conf &lt;&lt;EOF
+[ ca ]
+default_ca = this
+
+[ this ]
+new_certs_dir = .
+certificate = ca.pem
+database = ./index
+private_key = ca.key
+serial = ./serial
+default_days = 3650
+default_md = default
+policy = policy_anything
+
+[ policy_anything ]
+countryName             = optional
+stateOrProvinceName     = optional
+localityName            = optional
+organizationName        = optional
+organizationalUnitName  = optional
+commonName              = supplied
+emailAddress            = optional
+EOF
+
+touch index
+echo 0001 > serial
+
+SERVER=server
+CLIENT=client
+
+openssl req -newkey rsa:1024 -nodes -out $SERVER.csr -keyout $SERVER.key -subj "/CN=$SERVER/"
+openssl ca -batch -config ca.conf -notext -in $SERVER.csr -out $SERVER.pem
+
+openssl req -newkey rsa:1024 -nodes -out $CLIENT.csr -keyout $CLIENT.key -subj "/CN=$CLIENT/"
+openssl ca -batch -config ca.conf -notext -in $CLIENT.csr -out $CLIENT.pem
+</programlisting>
+
+      <para>Generated files <filename>ca.pem</filename>,
+      <filename>server.pem</filename>, and
+      <filename>server.key</filename> should be installed on server,
+      and <filename>ca.pem</filename>,
+      <filename>client.pem</filename>, and
+      <filename>client.key</filename> on the client. The location of
+      those files can be specified using
+      <varname>TrustedCertificateFile=</varname>,
+      <varname>ServerCertificateFile=</varname>,
+      <varname>ServerKeyFile=</varname>, in
+      <filename>/etc/systemd/journal-remote.conf</filename> and
+      <filename>/etc/systemd/journal-upload.conf</filename>
+      respectively. The default locations can be queried by using
+      <command>systemd-journal-remote --help</command> and
+      <command>systemd-journal-upload --help</command>.</para>
+    </example>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para>
+      <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+</refentry>
index 3e6678fc734e689057e2882f78304a97f575b1f8..ea9c270678e012105c8bff87a7381a4b3f381041 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214181031376"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214180661472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
                 system service that collects and stores logging data.
                 It creates and maintains structured, indexed journals
                 based on logging information that is received from the
                 kernel, from user processes via the libc
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 call, from standard input and standard error of system
                 services or via its native API. It will implicitly
                 collect numerous metadata fields for each log
@@ -49,7 +49,7 @@
                 further.</p><p>See
                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214181154000"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
+                service.</p></div><div class="refsect1"><a name="idm214184603344"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
                                 data from <code class="filename">/run/</code>
                                 is flushed to
                                 <code class="filename">/var/</code> in order to
@@ -62,7 +62,7 @@
                                 regardless of the
                                 configuration.</p></dd><dt id="SIGUSR2"><span class="term">SIGUSR2</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR2">¶</a></dt><dd><p>Request immediate
                                 rotation of the journal
-                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181146192"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
+                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184595536"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
                 <code class="filename">journald.conf</code> may be overridden on
                 the kernel command line:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.journald.forward_to_syslog="><span class="term"><code class="varname">systemd.journald.forward_to_syslog=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_kmsg=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_console=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_wall=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_syslog=">¶</a></dt><dd><p>Enables/disables
                                 forwarding of collected log messages
@@ -70,7 +70,7 @@
                                 system console or wall.
                                 </p><p>See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
-                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181138896"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
+                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184588240"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
                 by the "<code class="literal">systemd-journal</code>" system group
                 but are not writable. Adding a user to this group thus
                 enables her/him to read the journal files.</p><p>By default, each logged in user will get her/his
@@ -89,7 +89,7 @@
                 for existing journal files and for future journal
                 files created in the
                 <code class="filename">/var/log/journal/</code>
-                directory.</p></div><div class="refsect1"><a name="idm214181124160"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
+                directory.</p></div><div class="refsect1"><a name="idm214184573264"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
                                 <span class="command"><strong>systemd-journald</strong></span>
                                 behaviour. See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>.
                                 set in the
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                                 configuration file.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214176140576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214179589488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
+                        <a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
                         <a href="setfacl.html"><span class="citerefentry"><span class="refentrytitle">setfacl</span>(1)</span></a>,
                         <span class="command"><strong>pydoc systemd.journal</strong></span>.
                 </p></div></div></body></html>
index 3e6678fc734e689057e2882f78304a97f575b1f8..ea9c270678e012105c8bff87a7381a4b3f381041 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214181031376"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214180661472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
                 system service that collects and stores logging data.
                 It creates and maintains structured, indexed journals
                 based on logging information that is received from the
                 kernel, from user processes via the libc
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 call, from standard input and standard error of system
                 services or via its native API. It will implicitly
                 collect numerous metadata fields for each log
@@ -49,7 +49,7 @@
                 further.</p><p>See
                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214181154000"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
+                service.</p></div><div class="refsect1"><a name="idm214184603344"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
                                 data from <code class="filename">/run/</code>
                                 is flushed to
                                 <code class="filename">/var/</code> in order to
@@ -62,7 +62,7 @@
                                 regardless of the
                                 configuration.</p></dd><dt id="SIGUSR2"><span class="term">SIGUSR2</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR2">¶</a></dt><dd><p>Request immediate
                                 rotation of the journal
-                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181146192"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
+                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184595536"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
                 <code class="filename">journald.conf</code> may be overridden on
                 the kernel command line:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.journald.forward_to_syslog="><span class="term"><code class="varname">systemd.journald.forward_to_syslog=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_kmsg=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_console=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_wall=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_syslog=">¶</a></dt><dd><p>Enables/disables
                                 forwarding of collected log messages
@@ -70,7 +70,7 @@
                                 system console or wall.
                                 </p><p>See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
-                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181138896"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
+                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184588240"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
                 by the "<code class="literal">systemd-journal</code>" system group
                 but are not writable. Adding a user to this group thus
                 enables her/him to read the journal files.</p><p>By default, each logged in user will get her/his
@@ -89,7 +89,7 @@
                 for existing journal files and for future journal
                 files created in the
                 <code class="filename">/var/log/journal/</code>
-                directory.</p></div><div class="refsect1"><a name="idm214181124160"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
+                directory.</p></div><div class="refsect1"><a name="idm214184573264"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
                                 <span class="command"><strong>systemd-journald</strong></span>
                                 behaviour. See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>.
                                 set in the
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                                 configuration file.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214176140576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214179589488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
+                        <a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
                         <a href="setfacl.html"><span class="citerefentry"><span class="refentrytitle">setfacl</span>(1)</span></a>,
                         <span class="command"><strong>pydoc systemd.journal</strong></span>.
                 </p></div></div></body></html>
index dd937031e634a085873cf3bc25b4b660d679c182..a33e895f44faaf8a623d2dc8946551e5919ef39c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-JOURNALD\&.SERVICE" "8" "" "systemd 215" "systemd-journald.service"
+.TH "SYSTEMD\-JOURNALD\&.SERVICE" "8" "" "systemd 217" "systemd-journald.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -162,5 +162,6 @@ configuration file\&.
 \fBjournald.conf\fR(5),
 \fBsystemd.journal-fields\fR(7),
 \fBsd-journal\fR(3),
+\fBsystemd-coredump\fR(8),
 \fBsetfacl\fR(1),
 \fBpydoc systemd\&.journal\fR\&.
index 3e6678fc734e689057e2882f78304a97f575b1f8..ea9c270678e012105c8bff87a7381a4b3f381041 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214181031376"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214180661472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
                 system service that collects and stores logging data.
                 It creates and maintains structured, indexed journals
                 based on logging information that is received from the
                 kernel, from user processes via the libc
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 call, from standard input and standard error of system
                 services or via its native API. It will implicitly
                 collect numerous metadata fields for each log
@@ -49,7 +49,7 @@
                 further.</p><p>See
                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214181154000"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
+                service.</p></div><div class="refsect1"><a name="idm214184603344"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
                                 data from <code class="filename">/run/</code>
                                 is flushed to
                                 <code class="filename">/var/</code> in order to
@@ -62,7 +62,7 @@
                                 regardless of the
                                 configuration.</p></dd><dt id="SIGUSR2"><span class="term">SIGUSR2</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR2">¶</a></dt><dd><p>Request immediate
                                 rotation of the journal
-                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181146192"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
+                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184595536"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
                 <code class="filename">journald.conf</code> may be overridden on
                 the kernel command line:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.journald.forward_to_syslog="><span class="term"><code class="varname">systemd.journald.forward_to_syslog=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_kmsg=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_console=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_wall=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_syslog=">¶</a></dt><dd><p>Enables/disables
                                 forwarding of collected log messages
@@ -70,7 +70,7 @@
                                 system console or wall.
                                 </p><p>See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
-                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181138896"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
+                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184588240"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
                 by the "<code class="literal">systemd-journal</code>" system group
                 but are not writable. Adding a user to this group thus
                 enables her/him to read the journal files.</p><p>By default, each logged in user will get her/his
@@ -89,7 +89,7 @@
                 for existing journal files and for future journal
                 files created in the
                 <code class="filename">/var/log/journal/</code>
-                directory.</p></div><div class="refsect1"><a name="idm214181124160"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
+                directory.</p></div><div class="refsect1"><a name="idm214184573264"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
                                 <span class="command"><strong>systemd-journald</strong></span>
                                 behaviour. See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>.
                                 set in the
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                                 configuration file.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214176140576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214179589488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
+                        <a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
                         <a href="setfacl.html"><span class="citerefentry"><span class="refentrytitle">setfacl</span>(1)</span></a>,
                         <span class="command"><strong>pydoc systemd.journal</strong></span>.
                 </p></div></div></body></html>
index 7ac73ed66d821013250828eb2a3e73a198a9d732..1f1a7f1ca2b50fe80af33e9fbd539c300be4edd6 100644 (file)
@@ -65,7 +65,7 @@
                 It creates and maintains structured, indexed journals
                 based on logging information that is received from the
                 kernel, from user processes via the libc
-                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 call, from standard input and standard error of system
                 services or via its native API. It will implicitly
                 collect numerous metadata fields for each log
                         <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>setfacl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <command>pydoc systemd.journal</command>.
                 </para>
index 3e6678fc734e689057e2882f78304a97f575b1f8..ea9c270678e012105c8bff87a7381a4b3f381041 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214181031376"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">systemd-journald-dev-log.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm214180661472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> is a
                 system service that collects and stores logging data.
                 It creates and maintains structured, indexed journals
                 based on logging information that is received from the
                 kernel, from user processes via the libc
-                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                 call, from standard input and standard error of system
                 services or via its native API. It will implicitly
                 collect numerous metadata fields for each log
@@ -49,7 +49,7 @@
                 further.</p><p>See
                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214181154000"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
+                service.</p></div><div class="refsect1"><a name="idm214184603344"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
                                 data from <code class="filename">/run/</code>
                                 is flushed to
                                 <code class="filename">/var/</code> in order to
@@ -62,7 +62,7 @@
                                 regardless of the
                                 configuration.</p></dd><dt id="SIGUSR2"><span class="term">SIGUSR2</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR2">¶</a></dt><dd><p>Request immediate
                                 rotation of the journal
-                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181146192"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
+                                files.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184595536"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
                 <code class="filename">journald.conf</code> may be overridden on
                 the kernel command line:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.journald.forward_to_syslog="><span class="term"><code class="varname">systemd.journald.forward_to_syslog=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_kmsg=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_console=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_wall=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_syslog=">¶</a></dt><dd><p>Enables/disables
                                 forwarding of collected log messages
@@ -70,7 +70,7 @@
                                 system console or wall.
                                 </p><p>See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
-                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214181138896"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
+                                for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184588240"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are, by default, owned and readable
                 by the "<code class="literal">systemd-journal</code>" system group
                 but are not writable. Adding a user to this group thus
                 enables her/him to read the journal files.</p><p>By default, each logged in user will get her/his
@@ -89,7 +89,7 @@
                 for existing journal files and for future journal
                 files created in the
                 <code class="filename">/var/log/journal/</code>
-                directory.</p></div><div class="refsect1"><a name="idm214181124160"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
+                directory.</p></div><div class="refsect1"><a name="idm214184573264"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p>Configure
                                 <span class="command"><strong>systemd-journald</strong></span>
                                 behaviour. See
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>.
                                 set in the
                                 <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
                                 configuration file.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214176140576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214179589488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                         <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>,
                         <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
                         <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
+                        <a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
                         <a href="setfacl.html"><span class="citerefentry"><span class="refentrytitle">setfacl</span>(1)</span></a>,
                         <span class="command"><strong>pydoc systemd.journal</strong></span>.
                 </p></div></div></body></html>
index 4a22e8c9fc16e31eab8579fee56de6f97e42887b..ee0d32acd1460ea39a5f0c71b1f07ce8d7b0ed16 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214183037312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214184940736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
                 system service that is pulled in by
                 <code class="filename">halt.target</code> and is responsible
                 for the actual system halt. Similarly,
                 related units) should never be executed
                 directly. Instead, trigger system shutdown with a
                 command such as "<code class="literal">systemctl halt</code>" or
-                suchlike.</p></div><div class="refsect1"><a name="idm214183155536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                suchlike.</p></div><div class="refsect1"><a name="idm214188878512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
-                        <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
                         <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>
                 </p></div></div></body></html>
index e92a1efa11adbc344fffd8d18371de64bc3831ee..a3dcb0c6094da86811e7236b12956765ae09d398 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-localed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-localed.service, systemd-localed — Locale bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-localed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-localed</code></p></div><div class="refsect1"><a name="idm214174064512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-localed</code> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-localed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-localed.service, systemd-localed — Locale bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-localed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-localed</code></p></div><div class="refsect1"><a name="idm214196957856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-localed</code> is a system
                 service that may be used as mechanism to change the
                 system locale settings, as well as the console key
                 mapping and default X11 key
@@ -30,7 +30,7 @@
                 is a command line client to this service.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/localed" target="_top">
                 developer documentation</a> for information about
                 the APIs <code class="filename">systemd-localed</code>
-                provides.</p></div><div class="refsect1"><a name="idm214174058656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214200970624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
                         <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>,
index e1b929b15668e5b05b9d323e11e0aed2cf2bf233..78dd9c9d04ca3a2f2a99d172d05af3736d375ab7 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-LOCALED\&.SERVICE" "8" "" "systemd 215" "systemd-localed.service"
+.TH "SYSTEMD\-LOCALED\&.SERVICE" "8" "" "systemd 217" "systemd-localed.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index e92a1efa11adbc344fffd8d18371de64bc3831ee..a3dcb0c6094da86811e7236b12956765ae09d398 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-localed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-localed.service, systemd-localed — Locale bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-localed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-localed</code></p></div><div class="refsect1"><a name="idm214174064512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-localed</code> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-localed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-localed.service, systemd-localed — Locale bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-localed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-localed</code></p></div><div class="refsect1"><a name="idm214196957856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-localed</code> is a system
                 service that may be used as mechanism to change the
                 system locale settings, as well as the console key
                 mapping and default X11 key
@@ -30,7 +30,7 @@
                 is a command line client to this service.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/localed" target="_top">
                 developer documentation</a> for information about
                 the APIs <code class="filename">systemd-localed</code>
-                provides.</p></div><div class="refsect1"><a name="idm214174058656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214200970624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
                         <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>,
index bfa2dcfb55fe6cdac45de355c6f8cea1b155ca63..d86322026b37f0972b50a8dbd263ee8ae4f2a713 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-logind.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-logind.service, systemd-logind — Login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-logind.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-logind</code></p></div><div class="refsect1"><a name="idm214173995056"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-logind</strong></span> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-logind.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-logind.service, systemd-logind — Login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-logind.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-logind</code></p></div><div class="refsect1"><a name="idm214174819328"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-logind</strong></span> is a system
                 service that manages user logins. It is responsible
                 for:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Keeping track of users and
                         sessions, their processes and their idle
@@ -46,7 +46,7 @@
                 the APIs <code class="filename">systemd-logind</code>
                 provides.</p><p>For more information on the inhibition logic see
                 the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/inhibit" target="_top">Inhibitor
-                Lock Developer Documentation</a>.</p></div><div class="refsect1"><a name="idm214173981456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                Lock Developer Documentation</a>.</p></div><div class="refsect1"><a name="idm214178755488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a>,
                         <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>,
index 3ab8f7e2219921fa92f86274f01e42f6aadff0a1..f5ef14d10a4d26f90c3b426d24a25648ee9e1af1 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-LOGIND\&.SERVICE" "8" "" "systemd 215" "systemd-logind.service"
+.TH "SYSTEMD\-LOGIND\&.SERVICE" "8" "" "systemd 217" "systemd-logind.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index bfa2dcfb55fe6cdac45de355c6f8cea1b155ca63..d86322026b37f0972b50a8dbd263ee8ae4f2a713 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-logind.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-logind.service, systemd-logind — Login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-logind.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-logind</code></p></div><div class="refsect1"><a name="idm214173995056"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-logind</strong></span> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-logind.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-logind.service, systemd-logind — Login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-logind.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-logind</code></p></div><div class="refsect1"><a name="idm214174819328"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-logind</strong></span> is a system
                 service that manages user logins. It is responsible
                 for:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Keeping track of users and
                         sessions, their processes and their idle
@@ -46,7 +46,7 @@
                 the APIs <code class="filename">systemd-logind</code>
                 provides.</p><p>For more information on the inhibition logic see
                 the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/inhibit" target="_top">Inhibitor
-                Lock Developer Documentation</a>.</p></div><div class="refsect1"><a name="idm214173981456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                Lock Developer Documentation</a>.</p></div><div class="refsect1"><a name="idm214178755488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a>,
                         <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>,
index 70ba638b84c432089d5de79e36982fe050a0c555..3377250a514f812dde9b72025ca04decfb1f4204 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-MACHINE\-ID\-SETUP" "1" "" "systemd 215" "systemd-machine-id-setup"
+.TH "SYSTEMD\-MACHINE\-ID\-SETUP" "1" "" "systemd 217" "systemd-machine-id-setup"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -44,8 +44,12 @@ If run inside a KVM virtual machine and a UUID is passed via the
 \fB\-uuid\fR
 option, this UUID is used to initialize the machine ID instead of a randomly generated one\&. The caller must ensure that the UUID passed is sufficiently unique and is different for every booted instanced of the VM\&.
 .PP
-Similarly, if run inside a Linux container environment and a UUID is set for the container this is used to initialize the machine ID\&. For details see the documentation of the
+Similar, if run inside a Linux container environment and a UUID is set for the container this is used to initialize the machine ID\&. For details see the documentation of the
 \m[blue]\fBContainer Interface\fR\m[]\&\s-2\u[1]\d\s+2\&.
+.PP
+Use
+\fBsystemd-firstboot\fR(1)
+to initialize the machine ID on mounted (but not booted) system images\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
@@ -73,7 +77,8 @@ On success, 0 is returned, a non\-zero failure code otherwise\&.
 .PP
 \fBsystemd\fR(1),
 \fBmachine-id\fR(5),
-\fBdbus-uuidgen\fR(1)
+\fBdbus-uuidgen\fR(1),
+\fBsystemd-firstboot\fR(1)
 .SH "NOTES"
 .IP " 1." 4
 Container Interface
index d8e7338c8b3aa70aafe1ca382025de61c784b944..2e8ae9933deb717a3f91fac1bc80db3c847b9783 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-machine-id-setup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-machine-id-setup — Initialize the machine ID in /etc/machine-id</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-machine-id-setup</code> </p></div></div><div class="refsect1"><a name="idm214188444320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-machine-id-setup</strong></span> may
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-machine-id-setup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-machine-id-setup — Initialize the machine ID in /etc/machine-id</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-machine-id-setup</code> </p></div></div><div class="refsect1"><a name="idm214171951712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-machine-id-setup</strong></span> may
                 be used by system installer tools to initialize the
                 machine ID stored in
                 <code class="filename">/etc/machine-id</code> at install time
                 UUID is used to initialize the machine ID instead of a
                 randomly generated one. The caller must ensure that the
                 UUID passed is sufficiently unique and is different
-                for every booted instanced of the VM.</p><p>Similarly, if run inside a Linux container
+                for every booted instanced of the VM.</p><p>Similar, if run inside a Linux container
                 environment and a UUID is set for the container this
                 is used to initialize the machine ID. For details see
                 the documentation of the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface" target="_top">Container
-                Interface</a>.</p></div><div class="refsect1"><a name="idm214188484688"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
+                Interface</a>.</p><p>Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize the machine ID on mounted (but not
+                booted) system images.</p></div><div class="refsect1"><a name="idm214171942352"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
                                 as an argument. All paths will be
                                 prefixed with the given alternate
                                 <em class="replaceable"><code>root</code></em> path,
                                 including config search paths.
                                 </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188478912"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214188437312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214175837872"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214175836592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
-                        <a href="dbus-uuidgen.html"><span class="citerefentry"><span class="refentrytitle">dbus-uuidgen</span>(1)</span></a>
+                        <a href="dbus-uuidgen.html"><span class="citerefentry"><span class="refentrytitle">dbus-uuidgen</span>(1)</span></a>,
+                        <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                 </p></div></div></body></html>
index 62630fbcab86baefadbd2f2fa2abe23b9b4032d0..28352e357f9faa987a358e61a6831def0429742e 100644 (file)
                 UUID passed is sufficiently unique and is different
                 for every booted instanced of the VM.</para>
 
-                <para>Similarly, if run inside a Linux container
+                <para>Similar, if run inside a Linux container
                 environment and a UUID is set for the container this
                 is used to initialize the machine ID. For details see
                 the documentation of the <ulink
                 url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
                 Interface</ulink>.</para>
 
+                <para>Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize the machine ID on mounted (but not
+                booted) system images.</para>
+
         </refsect1>
 
         <refsect1>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>dbus-uuidgen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>dbus-uuidgen</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index e047ff1dcc01a7b16a539367f198f45f772be772..fc3d546ec3211a88815c3ead1043c1cb9fc7b41b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-machined.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-machined.service, systemd-machined — Virtual machine and container registration manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-machined.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-machined</code></p></div><div class="refsect1"><a name="idm214184685392"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-machined</strong></span> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-machined.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-machined.service, systemd-machined — Virtual machine and container registration manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-machined.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-machined</code></p></div><div class="refsect1"><a name="idm214181479648"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-machined</strong></span> is a
                 system service that keeps track of virtual machines
                 and containers, and processes belonging to
                 them.</p><p>See
@@ -28,7 +28,7 @@
                 way.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/machined" target="_top">
                 machined D-Bus API Documentation</a> for information about
                 the APIs <code class="filename">systemd-machined</code>
-                provides.</p></div><div class="refsect1"><a name="idm214184680320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214181474624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>.
index a1cc2a7b5cdea11bd6758c93bc6eaf59619e6615..3bb50febc8f847c7ea0914d0a7336717ec99f78a 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-MACHINED\&.SERVICE" "8" "" "systemd 215" "systemd-machined.service"
+.TH "SYSTEMD\-MACHINED\&.SERVICE" "8" "" "systemd 217" "systemd-machined.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index e047ff1dcc01a7b16a539367f198f45f772be772..fc3d546ec3211a88815c3ead1043c1cb9fc7b41b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-machined.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-machined.service, systemd-machined — Virtual machine and container registration manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-machined.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-machined</code></p></div><div class="refsect1"><a name="idm214184685392"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-machined</strong></span> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-machined.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-machined.service, systemd-machined — Virtual machine and container registration manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-machined.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-machined</code></p></div><div class="refsect1"><a name="idm214181479648"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-machined</strong></span> is a
                 system service that keeps track of virtual machines
                 and containers, and processes belonging to
                 them.</p><p>See
@@ -28,7 +28,7 @@
                 way.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/machined" target="_top">
                 machined D-Bus API Documentation</a> for information about
                 the APIs <code class="filename">systemd-machined</code>
-                provides.</p></div><div class="refsect1"><a name="idm214184680320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214181474624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>.
index 7b0ca8374021a07028392ed0db281e348b3573eb..fc814bb9ff10a5b493510f65527063a0d6647ffe 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-modules-load.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-modules-load.service, systemd-modules-load — Configure kernel modules to load at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-modules-load.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-modules-load</code></p></div><div class="refsect1"><a name="idm214192618816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-modules-load.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-modules-load.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-modules-load.service, systemd-modules-load — Configure kernel modules to load at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-modules-load.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-modules-load</code></p></div><div class="refsect1"><a name="idm214176107344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-modules-load.service</code>
                 is an early-boot service that loads kernel modules
                 from static configuration.</p><p>See
                 <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214192643280"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-modules-load.service</code> understands
+                service.</p></div><div class="refsect1"><a name="idm214176104128"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-modules-load.service</code> understands
                 the following kernel command line parameters:</p><div class="variablelist"><dl class="variablelist"><dt id="modules-load="><span class="term"><code class="varname">modules-load=</code>, </span><span class="term"><code class="varname">rd.modules-load=</code></span><a class="headerlink" title="Permalink to this term" href="#modules-load=">¶</a></dt><dd><p>Takes a comma-separated
                                 list of kernel modules to
                                 statically load during early boot. The
                                 option prefixed with
                                 "<code class="literal">rd.</code>" is read by the
                                 initial RAM disk
-                                only.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188851968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                only.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176098592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>,
                 </p></div></div></body></html>
index 56a64f3f624a09def3e280a0400f73f221ed5f11..3ffddefa061305ddcdd42fd1a942ee42e28da24b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-MODULES\-LOAD\&.SERVICE" "8" "" "systemd 215" "systemd-modules-load.service"
+.TH "SYSTEMD\-MODULES\-LOAD\&.SERVICE" "8" "" "systemd 217" "systemd-modules-load.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 7b0ca8374021a07028392ed0db281e348b3573eb..fc814bb9ff10a5b493510f65527063a0d6647ffe 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-modules-load.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-modules-load.service, systemd-modules-load — Configure kernel modules to load at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-modules-load.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-modules-load</code></p></div><div class="refsect1"><a name="idm214192618816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-modules-load.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-modules-load.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-modules-load.service, systemd-modules-load — Configure kernel modules to load at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-modules-load.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-modules-load</code></p></div><div class="refsect1"><a name="idm214176107344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-modules-load.service</code>
                 is an early-boot service that loads kernel modules
                 from static configuration.</p><p>See
                 <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214192643280"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-modules-load.service</code> understands
+                service.</p></div><div class="refsect1"><a name="idm214176104128"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-modules-load.service</code> understands
                 the following kernel command line parameters:</p><div class="variablelist"><dl class="variablelist"><dt id="modules-load="><span class="term"><code class="varname">modules-load=</code>, </span><span class="term"><code class="varname">rd.modules-load=</code></span><a class="headerlink" title="Permalink to this term" href="#modules-load=">¶</a></dt><dd><p>Takes a comma-separated
                                 list of kernel modules to
                                 statically load during early boot. The
                                 option prefixed with
                                 "<code class="literal">rd.</code>" is read by the
                                 initial RAM disk
-                                only.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188851968"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                only.</p></dd></dl></div></div><div class="refsect1"><a name="idm214176098592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>,
                 </p></div></div></body></html>
index fc03d13b8d826150913ba3b24f904eb423348880..a95d15a84cd7716a69539a494839a61f3e85caf7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-networkd-wait-online.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd-wait-online.service, systemd-networkd-wait-online — Wait for network to come online</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd-wait-online.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd-wait-online</code></p></div><div class="refsect1"><a name="idm214180302848"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd-wait-online</strong></span> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-networkd-wait-online.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd-wait-online.service, systemd-networkd-wait-online — Wait for network to come online</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd-wait-online.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd-wait-online</code></p></div><div class="refsect1"><a name="idm214183416848"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd-wait-online</strong></span> is a
                 one-shot system service that waits for the network to be configured.
                 By default, it will wait for all links it is aware of and which are managed by
                 <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
                 to be fully configured or failed, and for at least one link to gain a
-                carrier.</p></div><div class="refsect1"><a name="idm214180299920"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-i"><span class="term"><code class="option">-i</code>, </span><span class="term"><code class="option">--interface=</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p>Network interface to wait for
+                carrier.</p></div><div class="refsect1"><a name="idm214183413920"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-i"><span class="term"><code class="option">-i</code>, </span><span class="term"><code class="option">--interface=</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p>Network interface to wait for
                                 before deciding if the system is online. This is
                                 useful when a system has several interfaces which
                                 will be configured, but a particular one is necessary
                                 to access some network resources. This option may be
                                 used more than once to wait for multiple network
-                                interfaces.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180295792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                interfaces.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183409792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 09a17fc17b47399e69c5aafdb9a0504c4ebe1820..2a4e3ef22b6c909e721a8fc6f31c68a052f9bc57 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-NETWORKD\-WAIT\-ONLINE\&.SERVICE" "8" "" "systemd 215" "systemd-networkd.service"
+.TH "SYSTEMD\-NETWORKD\-WAIT\-ONLINE\&.SERVICE" "8" "" "systemd 217" "systemd-networkd.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index fc03d13b8d826150913ba3b24f904eb423348880..a95d15a84cd7716a69539a494839a61f3e85caf7 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-networkd-wait-online.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd-wait-online.service, systemd-networkd-wait-online — Wait for network to come online</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd-wait-online.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd-wait-online</code></p></div><div class="refsect1"><a name="idm214180302848"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd-wait-online</strong></span> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-networkd-wait-online.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd-wait-online.service, systemd-networkd-wait-online — Wait for network to come online</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd-wait-online.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd-wait-online</code></p></div><div class="refsect1"><a name="idm214183416848"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd-wait-online</strong></span> is a
                 one-shot system service that waits for the network to be configured.
                 By default, it will wait for all links it is aware of and which are managed by
                 <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
                 to be fully configured or failed, and for at least one link to gain a
-                carrier.</p></div><div class="refsect1"><a name="idm214180299920"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-i"><span class="term"><code class="option">-i</code>, </span><span class="term"><code class="option">--interface=</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p>Network interface to wait for
+                carrier.</p></div><div class="refsect1"><a name="idm214183413920"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-i"><span class="term"><code class="option">-i</code>, </span><span class="term"><code class="option">--interface=</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p>Network interface to wait for
                                 before deciding if the system is online. This is
                                 useful when a system has several interfaces which
                                 will be configured, but a particular one is necessary
                                 to access some network resources. This option may be
                                 used more than once to wait for multiple network
-                                interfaces.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180295792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                interfaces.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183409792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 8702ad5f257ccc6b34379345726ce6359f76b58e..e85642fc56258b6d0b9bcd220d267f025c3caa97 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-networkd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd.service, systemd-networkd — Network manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd</code></p></div><div class="refsect1"><a name="idm214195650544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd</strong></span> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-networkd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd.service, systemd-networkd — Network manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd</code></p></div><div class="refsect1"><a name="idm214185927664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd</strong></span> is a system
                 service that manages networks. It detects and configures
                 network devices as they appear, as well as creating virtual
                 network devices.</p><p>To configure low-level link settings independently of
@@ -30,7 +30,7 @@
                 networkd may also optionally be left in place on shutdown. This ensures
                 restarting networkd does not cut the network connection, and, in particular,
                 that it is safe to transition between the initrd and the real root,
-                and back.</p></div><div class="refsect1"><a name="idm214195646336"></a><h2 id="Configuration Files">Configuration Files<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Files">¶</a></h2><p>The configuration files are read from the files located in the
+                and back.</p></div><div class="refsect1"><a name="idm214185923504"></a><h2 id="Configuration Files">Configuration Files<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Files">¶</a></h2><p>The configuration files are read from the files located in the
                 system network directory <code class="filename">/usr/lib/systemd/network</code>,
                 the volatile runtime network directory
                 <code class="filename">/run/systemd/network</code> and the local administration
@@ -38,7 +38,7 @@
                 <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
                 and virtual network devices are configured in <code class="filename">.netdev</code> files, see
                 <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214195639536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                </p></div><div class="refsect1"><a name="idm214185916704"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>,
                         <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
index 3284ffa9a512636d2b7e84a436604d310f973da9..784997490ca3f1826435ebcbc2122fb557fe3793 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-NETWORKD\&.SERVICE" "8" "" "systemd 215" "systemd-networkd.service"
+.TH "SYSTEMD\-NETWORKD\&.SERVICE" "8" "" "systemd 217" "systemd-networkd.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 8702ad5f257ccc6b34379345726ce6359f76b58e..e85642fc56258b6d0b9bcd220d267f025c3caa97 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-networkd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd.service, systemd-networkd — Network manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd</code></p></div><div class="refsect1"><a name="idm214195650544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd</strong></span> is a system
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-networkd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-networkd.service, systemd-networkd — Network manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-networkd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-networkd</code></p></div><div class="refsect1"><a name="idm214185927664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-networkd</strong></span> is a system
                 service that manages networks. It detects and configures
                 network devices as they appear, as well as creating virtual
                 network devices.</p><p>To configure low-level link settings independently of
@@ -30,7 +30,7 @@
                 networkd may also optionally be left in place on shutdown. This ensures
                 restarting networkd does not cut the network connection, and, in particular,
                 that it is safe to transition between the initrd and the real root,
-                and back.</p></div><div class="refsect1"><a name="idm214195646336"></a><h2 id="Configuration Files">Configuration Files<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Files">¶</a></h2><p>The configuration files are read from the files located in the
+                and back.</p></div><div class="refsect1"><a name="idm214185923504"></a><h2 id="Configuration Files">Configuration Files<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Files">¶</a></h2><p>The configuration files are read from the files located in the
                 system network directory <code class="filename">/usr/lib/systemd/network</code>,
                 the volatile runtime network directory
                 <code class="filename">/run/systemd/network</code> and the local administration
@@ -38,7 +38,7 @@
                 <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
                 and virtual network devices are configured in <code class="filename">.netdev</code> files, see
                 <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214195639536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                </p></div><div class="refsect1"><a name="idm214185916704"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>,
                         <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
index 1e5ec0f3c1c9a988bc88a5ffb88004465769f43d..cabf8489f251f9751916662986ce549a63887a08 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-NOTIFY" "1" "" "systemd 215" "systemd-notify"
+.TH "SYSTEMD\-NOTIFY" "1" "" "systemd 217" "systemd-notify"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -72,12 +72,6 @@ Returns 0 if the system was booted up with systemd, non\-zero otherwise\&. If th
 \fBsd_booted\fR(3)\&.
 .RE
 .PP
-\fB\-\-readahead=\fR
-.RS 4
-Controls disk read\-ahead operations\&. The argument must be a string, and either "cancel", "done" or "noreplay"\&. For details about the semantics of this option see
-\fBsd_readahead\fR(3)\&.
-.RE
-.PP
 \fB\-h\fR, \fB\-\-help\fR
 .RS 4
 Print a short help text and exit\&.
index b9bb2260f359576afe28edb21037300f41d6ae0d..d955c5bd0713334f262fa62898370f8b31094005 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-notify"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-notify — Notify service manager about start-up completion and other daemon status changes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-notify [OPTIONS...]  [VARIABLE=VALUE...]</code> </p></div></div><div class="refsect1"><a name="idm214188130944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-notify</strong></span> may be
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-notify"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-notify — Notify service manager about start-up completion and other daemon status changes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-notify [OPTIONS...]  [VARIABLE=VALUE...]</code> </p></div></div><div class="refsect1"><a name="idm214168232032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-notify</strong></span> may be
                 called by daemon scripts to notify the init system
                 about status changes. It can be used to send arbitrary
                 information, encoded in an environment-block-like list
@@ -33,7 +33,7 @@
                 update.</p><p>Note that systemd will refuse reception of
                 status updates from this command unless
                 <code class="varname">NotifyAccess=all</code> is set for the
-                service unit this command is called from.</p></div><div class="refsect1"><a name="idm214188174048"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--ready"><span class="term"><code class="option">--ready</code></span><a class="headerlink" title="Permalink to this term" href="#--ready">¶</a></dt><dd><p>Inform the init system
+                service unit this command is called from.</p></div><div class="refsect1"><a name="idm214168226464"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--ready"><span class="term"><code class="option">--ready</code></span><a class="headerlink" title="Permalink to this term" href="#--ready">¶</a></dt><dd><p>Inform the init system
                                 about service start-up
                                 completion. This is equivalent to
                                 <span class="command"><strong>systemd-notify
                                 is hence unrelated to the other
                                 options. For details about the
                                 semantics of this option, see
-                                <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>.</p></dd><dt id="--readahead="><span class="term"><code class="option">--readahead=</code></span><a class="headerlink" title="Permalink to this term" href="#--readahead=">¶</a></dt><dd><p>Controls disk
-                                read-ahead operations. The argument
-                                must be a string, and either "cancel",
-                                "done" or "noreplay". For details
-                                about the semantics of this option see
-                                <a href="sd_readahead.html"><span class="citerefentry"><span class="refentrytitle">sd_readahead</span>(3)</span></a>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188240592"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214188239408"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214188238736"></a><p class="title"><b>Example 1. Start-up Notification and Status Updates</b></p><div class="example-contents"><p>A simple shell daemon that sends
+                                <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172109696"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214172108512"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214172107840"></a><p class="title"><b>Example 1. Start-up Notification and Status Updates</b></p><div class="example-contents"><p>A simple shell daemon that sends
                         start-up notifications after having set up its
                         communication channel. During runtime it sends
                         further status updates to the init
@@ -86,7 +81,7 @@ while : ; do
         # Do something with $a ...
 
         systemd-notify --status="Waiting for data..."
-done</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214188235728"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+done</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214172104832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
index 69baae0dce3759da57828062956c861ade94d52a..684f490099c831459f6aa380eeb0b884e17ee40d 100644 (file)
                                 <citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
                         </varlistentry>
 
-                        <varlistentry>
-                                <term><option>--readahead=</option></term>
-
-                                <listitem><para>Controls disk
-                                read-ahead operations. The argument
-                                must be a string, and either "cancel",
-                                "done" or "noreplay". For details
-                                about the semantics of this option see
-                                <citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
-                        </varlistentry>
-
                         <xi:include href="standard-options.xml" xpointer="help" />
                         <xi:include href="standard-options.xml" xpointer="version" />
                 </variablelist>
index bc66b6a3f6d33d736c00e9732907670a798f55da..068ac9449cf450603d6b8d89a36da63e64d24ec2 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-NSPAWN" "1" "" "systemd 215" "systemd-nspawn"
+.TH "SYSTEMD\-NSPAWN" "1" "" "systemd 217" "systemd-nspawn"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -327,6 +327,35 @@ are supported\&. This is useful when running a 32\-bit container on a 64\-bit ho
 Turns off any status output by the tool itself\&. When this switch is used, the only output from nspawn will be the console output of the container OS itself\&.
 .RE
 .PP
+\fB\-\-volatile\fR\fI=MODE\fR
+.RS 4
+Boots the container in volatile (ephemeral) mode\&. When no mode parameter is passed or when mode is specified as
+"yes"
+full volatile mode is enabled\&. This means the root directory is mounted as mostly unpopulated
+"tmpfs"
+instance, and
+/usr
+from the OS tree is mounted into it, read\-only (the system thus starts up with read\-only OS resources, but pristine state and configuration, any changes to the either are lost on shutdown)\&. When the mode parameter is specified as
+"state"
+the OS tree is mounted read\-only, but
+/var
+is mounted as
+"tmpfs"
+instance into it (the system thus starts up with read\-only OS resources and configuration, but pristine state, any changes to the latter are lost on shutdown)\&. When the mode parameter is specified as
+"no"
+(the default) the whole OS tree is made available writable\&.
+.sp
+Note that setting this to
+"yes"
+or
+"state"
+will only work correctly with operating systems in the container that can boot up with only
+/usr
+mounted, and are able to populate
+/var
+automatically, as needed\&.
+.RE
+.PP
 \fB\-h\fR, \fB\-\-help\fR
 .RS 4
 Print a short help text and exit\&.
@@ -336,7 +365,9 @@ Print a short help text and exit\&.
 .RS 4
 Print a short version string and exit\&.
 .RE
-.SH "EXAMPLE 1"
+.SH "EXAMPLES"
+.PP
+\fBExample\ \&1.\ \&Boot a minimal Fedora distribution in a container\fR
 .sp
 .if n \{\
 .RS 4
@@ -352,7 +383,8 @@ Print a short version string and exit\&.
 This installs a minimal Fedora distribution into the directory
 /srv/mycontainer/
 and then boots an OS in a namespace container in it\&.
-.SH "EXAMPLE 2"
+.PP
+\fBExample\ \&2.\ \&Spawn a shell in a container of a minimal Debian unstable distribution\fR
 .sp
 .if n \{\
 .RS 4
@@ -368,7 +400,8 @@ and then boots an OS in a namespace container in it\&.
 This installs a minimal Debian unstable distribution into the directory
 ~/debian\-tree/
 and then spawns a shell in a namespace container in it\&.
-.SH "EXAMPLE 3"
+.PP
+\fBExample\ \&3.\ \&Boot a minimal Arch Linux distribution in a container\fR
 .sp
 .if n \{\
 .RS 4
@@ -384,7 +417,8 @@ and then spawns a shell in a namespace container in it\&.
 This installs a mimimal Arch Linux distribution into the directory
 ~/arch\-tree/
 and then boots an OS in a namespace container in it\&.
-.SH "EXAMPLE 4"
+.PP
+\fBExample\ \&4.\ \&Enable Arch Linux container on boot\fR
 .sp
 .if n \{\
 .RS 4
@@ -401,7 +435,8 @@ and then boots an OS in a namespace container in it\&.
 This makes the Arch Linux container part of the
 multi\-user\&.target
 on the host\&.
-.SH "EXAMPLE 5"
+.PP
+\fBExample\ \&5.\ \&Boot into a btrfs snapshot of the host system\fR
 .sp
 .if n \{\
 .RS 4
@@ -415,7 +450,8 @@ on the host\&.
 .\}
 .PP
 This runs a copy of the host system in a btrfs snapshot\&.
-.SH "EXAMPLE 6"
+.PP
+\fBExample\ \&6.\ \&Run a container with SELinux sandbox security contexts\fR
 .sp
 .if n \{\
 .RS 4
@@ -427,8 +463,6 @@ This runs a copy of the host system in a btrfs snapshot\&.
 .if n \{\
 .RE
 .\}
-.PP
-This runs a container with SELinux sandbox security contexts\&.
 .SH "EXIT STATUS"
 .PP
 The exit code of the program executed in the container is returned\&.
index 157ce0a98e0d94e66e0dd85bd48ec3e93228e986..ea6b8841d059880cf43eb78196b7b4770eff009c 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-nspawn"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-nspawn — Spawn a namespace container for debugging, testing and building</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-nspawn</code>  [OPTIONS...] [<em class="replaceable"><code>COMMAND</code></em>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-nspawn"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-nspawn — Spawn a namespace container for debugging, testing and building</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-nspawn</code>  [OPTIONS...] [<em class="replaceable"><code>COMMAND</code></em>
                          [ARGS...]
-                        ]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-nspawn</code>   -b  [OPTIONS...] [ARGS...]</p></div></div><div class="refsect1"><a name="idm214170086240"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-nspawn</strong></span> may be used to
+                        ]</p></div><div class="cmdsynopsis"><p><code class="command">systemd-nspawn</code>   -b  [OPTIONS...] [ARGS...]</p></div></div><div class="refsect1"><a name="idm214181337840"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-nspawn</strong></span> may be used to
                 run a command or OS in a light-weight namespace
                 container. In many ways it is similar to
-                <a href="chroot.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(1)</span></a>,
+                <a href="http://man7.org/linux/man-pages/man1/chroot.1.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(1)</span></a>,
                 but more powerful since it fully virtualizes the file
                 system hierarchy, as well as the process tree, the
                 various IPC subsystems and the host and domain
                 this program is debugging and testing as well as
                 building of packages, distributions and software
                 involved with boot and systems management.</p><p>In contrast to
-                <a href="chroot.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(1)</span></a> <span class="command"><strong>systemd-nspawn</strong></span>
+                <a href="http://man7.org/linux/man-pages/man1/chroot.1.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(1)</span></a> <span class="command"><strong>systemd-nspawn</strong></span>
                 may be used to boot full Linux-based operating systems
                 in a container.</p><p>Use a tool like
-                <a href="yum.html"><span class="citerefentry"><span class="refentrytitle">yum</span>(8)</span></a>,
-                <a href="debootstrap.html"><span class="citerefentry"><span class="refentrytitle">debootstrap</span>(8)</span></a>,
+                <a href="http://linux.die.net/man/8/yum"><span class="citerefentry"><span class="refentrytitle">yum</span>(8)</span></a>,
+                <a href="http://linux.die.net/man/8/debootstrap"><span class="citerefentry"><span class="refentrytitle">debootstrap</span>(8)</span></a>,
                 or
-                <a href="pacman.html"><span class="citerefentry"><span class="refentrytitle">pacman</span>(8)</span></a>
+                <a href="https://www.archlinux.org/pacman/pacman.8.html"><span class="citerefentry"><span class="refentrytitle">pacman</span>(8)</span></a>
                 to set up an OS directory tree suitable as file system
                 hierarchy for <span class="command"><strong>systemd-nspawn</strong></span>
                 containers.</p><p>Note that <span class="command"><strong>systemd-nspawn</strong></span> will
@@ -79,7 +79,7 @@
                 <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>). It
                 might be necessary to add this file to the container
                 tree manually if the OS of the container is too old to
-                contain this file out-of-the-box.</p></div><div class="refsect1"><a name="idm214170139936"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>If option <code class="option">-b</code> is specified, the
+                contain this file out-of-the-box.</p></div><div class="refsect1"><a name="idm214185204208"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>If option <code class="option">-b</code> is specified, the
                 arguments are used as arguments for the init
                 binary. Otherwise, <em class="replaceable"><code>COMMAND</code></em>
                 specifies the program to launch in the container, and
                                 additional capabilities to grant the
                                 container. Takes a comma-separated
                                 list of capability names, see
-                                <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                                 for more information. Note that the
                                 following capabilities will be granted
                                 in any way: CAP_CHOWN,
                                 accessible via
                                 <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>
                                 and shown by tools such as
-                                <a href="ps.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>. If
+                                <a href="http://man7.org/linux/man-pages/man1/ps.1.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>. If
                                 the container does not run an init
                                 system, it is recommended to set this
                                 option to "<code class="literal">no</code>". Note
                                 session.</p></dd><dt id="--personality="><span class="term"><code class="option">--personality=</code></span><a class="headerlink" title="Permalink to this term" href="#--personality=">¶</a></dt><dd><p>Control the
                                 architecture ("personality") reported
                                 by
-                                <a href="uname.html"><span class="citerefentry"><span class="refentrytitle">uname</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/uname.2.html"><span class="citerefentry"><span class="refentrytitle">uname</span>(2)</span></a>
                                 in the container. Currently, only
                                 "<code class="literal">x86</code>" and
                                 "<code class="literal">x86-64</code>" are
                                 output by the tool itself. When this
                                 switch is used, the only output
                                 from nspawn will be the console output
-                                of the container OS itself.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214165060752"></a><h2 id="Example 1">Example 1<a class="headerlink" title="Permalink to this headline" href="#Example%201">¶</a></h2><pre class="programlisting"># yum -y --releasever=19 --nogpg --installroot=/srv/mycontainer --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-minimal
+                                of the container OS itself.</p></dd><dt id="--volatile=MODE"><span class="term"><code class="option">--volatile</code><em class="replaceable"><code>=MODE</code></em></span><a class="headerlink" title="Permalink to this term" href="#--volatile=MODE">¶</a></dt><dd><p>Boots the container in
+                                volatile (ephemeral) mode. When no
+                                mode parameter is passed or when mode
+                                is specified as "<code class="literal">yes</code>"
+                                full volatile mode is enabled. This
+                                means the root directory is mounted as
+                                mostly unpopulated
+                                "<code class="literal">tmpfs</code>" instance, and
+                                <code class="filename">/usr</code> from the OS
+                                tree is mounted into it, read-only
+                                (the system thus starts up with
+                                read-only OS resources, but pristine
+                                state and configuration, any changes
+                                to the either are lost on
+                                shutdown). When the mode parameter is
+                                specified as "<code class="literal">state</code>"
+                                the OS tree is mounted read-only, but
+                                <code class="filename">/var</code> is mounted
+                                as "<code class="literal">tmpfs</code>" instance
+                                into it (the system thus starts up
+                                with read-only OS resources and
+                                configuration, but pristine state, any
+                                changes to the latter are lost on
+                                shutdown). When the mode parameter is
+                                specified as "<code class="literal">no</code>"
+                                (the default) the whole OS tree is made
+                                available writable.</p><p>Note that setting this to
+                                "<code class="literal">yes</code>" or
+                                "<code class="literal">state</code>" will only
+                                work correctly with operating systems
+                                in the container that can boot up with
+                                only <code class="filename">/usr</code>
+                                mounted, and are able to populate
+                                <code class="filename">/var</code>
+                                automatically, as
+                                needed.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180168448"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="example"><a name="idm214180167808"></a><p class="title"><b>Example 1. Boot a minimal Fedora distribution in a container</b></p><div class="example-contents"><pre class="programlisting"># yum -y --releasever=19 --nogpg --installroot=/srv/mycontainer --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-minimal
 # systemd-nspawn -bD /srv/mycontainer</pre><p>This installs a minimal Fedora distribution into
-                the directory <code class="filename">/srv/mycontainer/</code> and
-                then boots an OS in a namespace container in
-                it.</p></div><div class="refsect1"><a name="idm214165057712"></a><h2 id="Example 2">Example 2<a class="headerlink" title="Permalink to this headline" href="#Example%202">¶</a></h2><pre class="programlisting"># debootstrap --arch=amd64 unstable ~/debian-tree/
+                        the directory <code class="filename">/srv/mycontainer/</code> and
+                        then boots an OS in a namespace container in
+                        it.</p></div></div><br class="example-break"><div class="example"><a name="idm214180164752"></a><p class="title"><b>Example 2. Spawn a shell in a container of a minimal Debian unstable distribution</b></p><div class="example-contents"><pre class="programlisting"># debootstrap --arch=amd64 unstable ~/debian-tree/
 # systemd-nspawn -D ~/debian-tree/</pre><p>This installs a minimal Debian unstable
-                distribution into the directory
-                <code class="filename">~/debian-tree/</code> and then spawns a
-                shell in a namespace container in it.</p></div><div class="refsect1"><a name="idm214165054992"></a><h2 id="Example 3">Example 3<a class="headerlink" title="Permalink to this headline" href="#Example%203">¶</a></h2><pre class="programlisting"># pacstrap -c -d ~/arch-tree/ base
+                        distribution into the directory
+                        <code class="filename">~/debian-tree/</code> and then spawns a
+                        shell in a namespace container in it.</p></div></div><br class="example-break"><div class="example"><a name="idm214180162016"></a><p class="title"><b>Example 3. Boot a minimal Arch Linux distribution in a container</b></p><div class="example-contents"><pre class="programlisting"># pacstrap -c -d ~/arch-tree/ base
 # systemd-nspawn -bD ~/arch-tree/</pre><p>This installs a mimimal Arch Linux distribution into
-                the directory <code class="filename">~/arch-tree/</code> and then
-                boots an OS in a namespace container in it.</p></div><div class="refsect1"><a name="idm214165052496"></a><h2 id="Example 4">Example 4<a class="headerlink" title="Permalink to this headline" href="#Example%204">¶</a></h2><pre class="programlisting"># mv ~/arch-tree /var/lib/container/arch
+                        the directory <code class="filename">~/arch-tree/</code> and then
+                        boots an OS in a namespace container in it.</p></div></div><br class="example-break"><div class="example"><a name="idm214180159408"></a><p class="title"><b>Example 4. Enable Arch Linux container on boot</b></p><div class="example-contents"><pre class="programlisting"># mv ~/arch-tree /var/lib/container/arch
 # systemctl enable systemd-nspawn@arch.service
 # systemctl start systemd-nspawn@arch.service</pre><p>This makes the Arch Linux container part of the
-                <code class="filename">multi-user.target</code> on the host.
-                </p></div><div class="refsect1"><a name="idm214165049952"></a><h2 id="Example 5">Example 5<a class="headerlink" title="Permalink to this headline" href="#Example%205">¶</a></h2><pre class="programlisting"># btrfs subvolume snapshot / /.tmp
+                        <code class="filename">multi-user.target</code> on the host.
+                        </p></div></div><br class="example-break"><div class="example"><a name="idm214180156768"></a><p class="title"><b>Example 5. Boot into a btrfs snapshot of the host system</b></p><div class="example-contents"><pre class="programlisting"># btrfs subvolume snapshot / /.tmp
 # systemd-nspawn --private-network -D /.tmp -b</pre><p>This runs a copy of the host system in a
-                btrfs snapshot.</p></div><div class="refsect1"><a name="idm214165047984"></a><h2 id="Example 6">Example 6<a class="headerlink" title="Permalink to this headline" href="#Example%206">¶</a></h2><pre class="programlisting"># chcon system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -R /srv/container
-# systemd-nspawn -L system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -Z system_u:system_r:svirt_lxc_net_t:s0:c0,c1 -D /srv/container /bin/sh</pre><p>This runs a container with SELinux sandbox security contexts.</p></div><div class="refsect1"><a name="idm214165045984"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>The exit code of the program executed in the
-                container is returned.</p></div><div class="refsect1"><a name="idm214165044736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        btrfs snapshot.</p></div></div><br class="example-break"><div class="example"><a name="idm214180154800"></a><p class="title"><b>Example 6. Run a container with SELinux sandbox security contexts</b></p><div class="example-contents"><pre class="programlisting"># chcon system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -R /srv/container
+# systemd-nspawn -L system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -Z system_u:system_r:svirt_lxc_net_t:s0:c0,c1 -D /srv/container /bin/sh</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214180153056"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>The exit code of the program executed in the
+                container is returned.</p></div><div class="refsect1"><a name="idm214180151808"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="chroot.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(1)</span></a>,
-                        <a href="yum.html"><span class="citerefentry"><span class="refentrytitle">yum</span>(8)</span></a>,
-                        <a href="debootstrap.html"><span class="citerefentry"><span class="refentrytitle">debootstrap</span>(8)</span></a>,
-                        <a href="pacman.html"><span class="citerefentry"><span class="refentrytitle">pacman</span>(8)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man1/chroot.1.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/8/yum"><span class="citerefentry"><span class="refentrytitle">yum</span>(8)</span></a>,
+                        <a href="http://linux.die.net/man/8/debootstrap"><span class="citerefentry"><span class="refentrytitle">debootstrap</span>(8)</span></a>,
+                        <a href="https://www.archlinux.org/pacman/pacman.8.html"><span class="citerefentry"><span class="refentrytitle">pacman</span>(8)</span></a>,
                         <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
                         <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>
                 </p></div></div></body></html>
index 950558feec085c53193ab3c2f933a09fa9af51c9..b3a2d328559273a6feccc01114ca7e562e419e98 100644 (file)
@@ -70,7 +70,7 @@
                 <para><command>systemd-nspawn</command> may be used to
                 run a command or OS in a light-weight namespace
                 container. In many ways it is similar to
-                <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                <citerefentry project='man-pages'><refentrytitle>chroot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                 but more powerful since it fully virtualizes the file
                 system hierarchy, as well as the process tree, the
                 various IPC subsystems and the host and domain
                 involved with boot and systems management.</para>
 
                 <para>In contrast to
-                <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>1</manvolnum></citerefentry> <command>systemd-nspawn</command>
+                <citerefentry project='man-pages'><refentrytitle>chroot</refentrytitle><manvolnum>1</manvolnum></citerefentry> <command>systemd-nspawn</command>
                 may be used to boot full Linux-based operating systems
                 in a container.</para>
 
                 <para>Use a tool like
-                <citerefentry><refentrytitle>yum</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                <citerefentry><refentrytitle>debootstrap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                <citerefentry project='die-net'><refentrytitle>yum</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                <citerefentry project='die-net'><refentrytitle>debootstrap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                 or
-                <citerefentry><refentrytitle>pacman</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                <citerefentry project='archlinux'><refentrytitle>pacman</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 to set up an OS directory tree suitable as file system
                 hierarchy for <command>systemd-nspawn</command>
                 containers.</para>
                                 additional capabilities to grant the
                                 container. Takes a comma-separated
                                 list of capability names, see
-                                <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                                 for more information. Note that the
                                 following capabilities will be granted
                                 in any way: CAP_CHOWN,
                                 accessible via
                                 <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                                 and shown by tools such as
-                                <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>. If
+                                <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>. If
                                 the container does not run an init
                                 system, it is recommended to set this
                                 option to <literal>no</literal>. Note
                                 of the container OS itself.</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><option>--volatile</option><replaceable>=MODE</replaceable></term>
+
+                                <listitem><para>Boots the container in
+                                volatile (ephemeral) mode. When no
+                                mode parameter is passed or when mode
+                                is specified as <literal>yes</literal>
+                                full volatile mode is enabled. This
+                                means the root directory is mounted as
+                                mostly unpopulated
+                                <literal>tmpfs</literal> instance, and
+                                <filename>/usr</filename> from the OS
+                                tree is mounted into it, read-only
+                                (the system thus starts up with
+                                read-only OS resources, but pristine
+                                state and configuration, any changes
+                                to the either are lost on
+                                shutdown). When the mode parameter is
+                                specified as <literal>state</literal>
+                                the OS tree is mounted read-only, but
+                                <filename>/var</filename> is mounted
+                                as <literal>tmpfs</literal> instance
+                                into it (the system thus starts up
+                                with read-only OS resources and
+                                configuration, but pristine state, any
+                                changes to the latter are lost on
+                                shutdown). When the mode parameter is
+                                specified as <literal>no</literal>
+                                (the default) the whole OS tree is made
+                                available writable.</para>
+
+                                <para>Note that setting this to
+                                <literal>yes</literal> or
+                                <literal>state</literal> will only
+                                work correctly with operating systems
+                                in the container that can boot up with
+                                only <filename>/usr</filename>
+                                mounted, and are able to populate
+                                <filename>/var</filename>
+                                automatically, as
+                                needed.</para></listitem>
+                        </varlistentry>
+
                         <xi:include href="standard-options.xml" xpointer="help" />
                         <xi:include href="standard-options.xml" xpointer="version" />
                 </variablelist>
         </refsect1>
 
         <refsect1>
-                <title>Example 1</title>
+                <title>Examples</title>
+                <example>
+                        <title>Boot a minimal Fedora distribution in a container</title>
 
-                <programlisting># yum -y --releasever=19 --nogpg --installroot=/srv/mycontainer --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-minimal
+                        <programlisting># yum -y --releasever=19 --nogpg --installroot=/srv/mycontainer --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-minimal
 # systemd-nspawn -bD /srv/mycontainer</programlisting>
 
-                <para>This installs a minimal Fedora distribution into
-                the directory <filename noindex='true'>/srv/mycontainer/</filename> and
-                then boots an OS in a namespace container in
-                it.</para>
-        </refsect1>
+                        <para>This installs a minimal Fedora distribution into
+                        the directory <filename noindex='true'>/srv/mycontainer/</filename> and
+                        then boots an OS in a namespace container in
+                        it.</para>
+                </example>
 
-        <refsect1>
-                <title>Example 2</title>
+                <example>
+                        <title>Spawn a shell in a container of a minimal Debian unstable distribution</title>
 
-                <programlisting># debootstrap --arch=amd64 unstable ~/debian-tree/
+                        <programlisting># debootstrap --arch=amd64 unstable ~/debian-tree/
 # systemd-nspawn -D ~/debian-tree/</programlisting>
 
-                <para>This installs a minimal Debian unstable
-                distribution into the directory
-                <filename>~/debian-tree/</filename> and then spawns a
-                shell in a namespace container in it.</para>
-        </refsect1>
+                        <para>This installs a minimal Debian unstable
+                        distribution into the directory
+                        <filename>~/debian-tree/</filename> and then spawns a
+                        shell in a namespace container in it.</para>
+                </example>
 
-        <refsect1>
-                <title>Example 3</title>
+                <example>
+                        <title>Boot a minimal Arch Linux distribution in a container</title>
 
-                <programlisting># pacstrap -c -d ~/arch-tree/ base
+                        <programlisting># pacstrap -c -d ~/arch-tree/ base
 # systemd-nspawn -bD ~/arch-tree/</programlisting>
 
-                <para>This installs a mimimal Arch Linux distribution into
-                the directory <filename>~/arch-tree/</filename> and then
-                boots an OS in a namespace container in it.</para>
-        </refsect1>
+                        <para>This installs a mimimal Arch Linux distribution into
+                        the directory <filename>~/arch-tree/</filename> and then
+                        boots an OS in a namespace container in it.</para>
+                </example>
 
-        <refsect1>
-                <title>Example 4</title>
+                <example>
+                        <title>Enable Arch Linux container on boot</title>
 
-                <programlisting># mv ~/arch-tree /var/lib/container/arch
+                        <programlisting># mv ~/arch-tree /var/lib/container/arch
 # systemctl enable systemd-nspawn@arch.service
 # systemctl start systemd-nspawn@arch.service</programlisting>
 
-                <para>This makes the Arch Linux container part of the
-                <filename>multi-user.target</filename> on the host.
-                </para>
-        </refsect1>
+                        <para>This makes the Arch Linux container part of the
+                        <filename>multi-user.target</filename> on the host.
+                        </para>
+                </example>
 
-        <refsect1>
-                <title>Example 5</title>
+                <example>
+                        <title>Boot into a btrfs snapshot of the host system</title>
 
-                <programlisting># btrfs subvolume snapshot / /.tmp
+                        <programlisting># btrfs subvolume snapshot / /.tmp
 # systemd-nspawn --private-network -D /.tmp -b</programlisting>
 
-                <para>This runs a copy of the host system in a
-                btrfs snapshot.</para>
-        </refsect1>
+                        <para>This runs a copy of the host system in a
+                        btrfs snapshot.</para>
+                </example>
 
-        <refsect1>
-                <title>Example 6</title>
+                <example>
+                        <title>Run a container with SELinux sandbox security contexts</title>
 
-                <programlisting># chcon system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -R /srv/container
+                        <programlisting># chcon system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -R /srv/container
 # systemd-nspawn -L system_u:object_r:svirt_sandbox_file_t:s0:c0,c1 -Z system_u:system_r:svirt_lxc_net_t:s0:c0,c1 -D /srv/container /bin/sh</programlisting>
-
-                <para>This runs a container with SELinux sandbox security contexts.</para>
+                </example>
         </refsect1>
 
         <refsect1>
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>yum</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>debootstrap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pacman</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>chroot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>yum</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>debootstrap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='archlinux'><refentrytitle>pacman</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
index be8a6e90938ed59fa4c021e711b1cf58bed5fb01..3045d70baf23ede148ecee5806eade902de4a017 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-PATH" "1" "" "systemd 215" "systemd-path"
+.TH "SYSTEMD\-PATH" "1" "" "systemd 217" "systemd-path"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 12ae0eb53815981d56c77f501b60e6b8ecd35328..2e1d5ee1c4c31405980713225ed53a0388752cbf 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-path"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-path — List and query system and user paths</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-path [OPTIONS...]  [NAME...]</code> </p></div></div><div class="refsect1"><a name="idm214172603008"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-path</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-path"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-path — List and query system and user paths</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-path [OPTIONS...]  [NAME...]</code> </p></div></div><div class="refsect1"><a name="idm214178136112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-path</strong></span> may be used to
                 query system and user paths. The tool makes many of
                 the paths described in
                 <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>
                 begins with "<code class="literal">search-</code>" don't refer to
                 individual paths, but instead a to a list of
                 colon-separated search paths, in their order of
-                precedence.</p></div><div class="refsect1"><a name="idm214172598688"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--suffix="><span class="term"><code class="option">--suffix=</code></span><a class="headerlink" title="Permalink to this term" href="#--suffix=">¶</a></dt><dd><p>The printed paths are
+                precedence.</p></div><div class="refsect1"><a name="idm214178131744"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--suffix="><span class="term"><code class="option">--suffix=</code></span><a class="headerlink" title="Permalink to this term" href="#--suffix=">¶</a></dt><dd><p>The printed paths are
                                 suffixed by the specified
                                 string.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172642528"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214172641344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214178126768"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214178125584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>
                 </p></div></div></body></html>
index 4a22e8c9fc16e31eab8579fee56de6f97e42887b..ee0d32acd1460ea39a5f0c71b1f07ce8d7b0ed16 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214183037312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214184940736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
                 system service that is pulled in by
                 <code class="filename">halt.target</code> and is responsible
                 for the actual system halt. Similarly,
                 related units) should never be executed
                 directly. Instead, trigger system shutdown with a
                 command such as "<code class="literal">systemctl halt</code>" or
-                suchlike.</p></div><div class="refsect1"><a name="idm214183155536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                suchlike.</p></div><div class="refsect1"><a name="idm214188878512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
-                        <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
                         <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>
                 </p></div></div></body></html>
index b4b549efd29a18731c24bbe610086fb48400929a..b06704fd4d0d48ae634cebe9e5321e51b9ac5688 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-quotacheck.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-quotacheck.service, systemd-quotacheck — File system quota checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-quotacheck.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-quotacheck</code></p></div><div class="refsect1"><a name="idm214197247856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-quotacheck.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-quotacheck.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-quotacheck.service, systemd-quotacheck — File system quota checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-quotacheck.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-quotacheck</code></p></div><div class="refsect1"><a name="idm214184339808"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-quotacheck.service</code>
                 is a service responsible for file system quota
                 checks. It is run once at boot after all necessary
                 file systems are mounted. It is pulled in only if at
-                least one file system has quotas enabled.</p></div><div class="refsect1"><a name="idm214197245824"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-quotacheck</code> understands
+                least one file system has quotas enabled.</p></div><div class="refsect1"><a name="idm214188100496"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-quotacheck</code> understands
                 one kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="quotacheck.mode="><span class="term"><code class="varname">quotacheck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#quotacheck.mode=">¶</a></dt><dd><p>One of
                                 "<code class="literal">auto</code>",
                                 "<code class="literal">force</code>",
@@ -38,7 +38,7 @@
                                 system quota
                                 checks. "<code class="literal">skip</code>" skips
                                 any file system quota
-                                checks.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197237024"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                checks.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188164240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="quotacheck.html"><span class="citerefentry"><span class="refentrytitle">quotacheck</span>(8)</span></a>,
                         <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a>
index 08a249cc97b85540135d3e8f465f5584f14dea0e..8b31cf3a842599f074c7971b25599e519f4f1439 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-QUOTACHECK\&.SERVICE" "8" "" "systemd 215" "systemd-quotacheck.service"
+.TH "SYSTEMD\-QUOTACHECK\&.SERVICE" "8" "" "systemd 217" "systemd-quotacheck.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index b4b549efd29a18731c24bbe610086fb48400929a..b06704fd4d0d48ae634cebe9e5321e51b9ac5688 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-quotacheck.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-quotacheck.service, systemd-quotacheck — File system quota checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-quotacheck.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-quotacheck</code></p></div><div class="refsect1"><a name="idm214197247856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-quotacheck.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-quotacheck.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-quotacheck.service, systemd-quotacheck — File system quota checker logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-quotacheck.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-quotacheck</code></p></div><div class="refsect1"><a name="idm214184339808"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-quotacheck.service</code>
                 is a service responsible for file system quota
                 checks. It is run once at boot after all necessary
                 file systems are mounted. It is pulled in only if at
-                least one file system has quotas enabled.</p></div><div class="refsect1"><a name="idm214197245824"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-quotacheck</code> understands
+                least one file system has quotas enabled.</p></div><div class="refsect1"><a name="idm214188100496"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-quotacheck</code> understands
                 one kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="quotacheck.mode="><span class="term"><code class="varname">quotacheck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#quotacheck.mode=">¶</a></dt><dd><p>One of
                                 "<code class="literal">auto</code>",
                                 "<code class="literal">force</code>",
@@ -38,7 +38,7 @@
                                 system quota
                                 checks. "<code class="literal">skip</code>" skips
                                 any file system quota
-                                checks.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197237024"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                checks.</p></dd></dl></div></div><div class="refsect1"><a name="idm214188164240"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="quotacheck.html"><span class="citerefentry"><span class="refentrytitle">quotacheck</span>(8)</span></a>,
                         <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a>
index 0e645981b91748fdd7e092824a8c11715d2cf10f..0299e9f20aa1591909f65babf34f20faf611386f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-random-seed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-random-seed.service, systemd-random-seed — Load and save the system random seed at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-random-seed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-random-seed</code></p></div><div class="refsect1"><a name="idm214168092576"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-random-seed.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-random-seed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-random-seed.service, systemd-random-seed — Load and save the system random seed at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-random-seed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-random-seed</code></p></div><div class="refsect1"><a name="idm214172862816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-random-seed.service</code>
                 is a service that restores the random seed of the
                 system at early-boot and saves it at shutdown. See
-                <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
+                <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
                 for details. Saving/restoring the random seed across
                 boots increases the amount of available entropy early
                 at boot. On disk the random seed is stored in
-                <code class="filename">/var/lib/systemd/random-seed</code>.</p></div><div class="refsect1"><a name="idm214168088912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="filename">/var/lib/systemd/random-seed</code>.</p></div><div class="refsect1"><a name="idm214176621824"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
                 </p></div></div></body></html>
index 9d370fc42fd5c5d4bddea55eaf07b0a0d2b5c2a9..92fbd9497d0390ba784b4ebe85f0e40bbd36d308 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-RANDOM\-SEED\&.SERVICE" "8" "" "systemd 215" "systemd-random-seed.service"
+.TH "SYSTEMD\-RANDOM\-SEED\&.SERVICE" "8" "" "systemd 217" "systemd-random-seed.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 0e645981b91748fdd7e092824a8c11715d2cf10f..0299e9f20aa1591909f65babf34f20faf611386f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-random-seed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-random-seed.service, systemd-random-seed — Load and save the system random seed at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-random-seed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-random-seed</code></p></div><div class="refsect1"><a name="idm214168092576"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-random-seed.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-random-seed.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-random-seed.service, systemd-random-seed — Load and save the system random seed at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-random-seed.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-random-seed</code></p></div><div class="refsect1"><a name="idm214172862816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-random-seed.service</code>
                 is a service that restores the random seed of the
                 system at early-boot and saves it at shutdown. See
-                <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
+                <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
                 for details. Saving/restoring the random seed across
                 boots increases the amount of available entropy early
                 at boot. On disk the random seed is stored in
-                <code class="filename">/var/lib/systemd/random-seed</code>.</p></div><div class="refsect1"><a name="idm214168088912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <code class="filename">/var/lib/systemd/random-seed</code>.</p></div><div class="refsect1"><a name="idm214176621824"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a>
                 </p></div></div></body></html>
diff --git a/man/systemd-readahead-collect.service.8 b/man/systemd-readahead-collect.service.8
deleted file mode 100644 (file)
index cb34b47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man8/systemd-readahead-replay.service.8
diff --git a/man/systemd-readahead-collect.service.html b/man/systemd-readahead-collect.service.html
deleted file mode 100644 (file)
index 0da54c5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-readahead-replay.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
-    a.headerlink {
-      color: #c60f0f;
-      font-size: 0.8em;
-      padding: 0 4px 0 4px;
-      text-decoration: none;
-      visibility: hidden;
-    }
-
-    a.headerlink:hover {
-      background-color: #c60f0f;
-      color: white;
-    }
-
-    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
-      visibility: visible;
-    }
-  </style><a href="index.html">Index </a>·
-  <a href="systemd.directives.html">Directives </a>·
-  <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-readahead-replay.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-readahead — Disk read ahead logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-readahead-replay.service</code></p><p><code class="filename">systemd-readahead-collect.service</code></p><p><code class="filename">systemd-readahead-done.service</code></p><p><code class="filename">systemd-readahead-done.timer</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-readahead/systemd-readahead</code>  [OPTIONS...]  COMMAND  [DIRECTORY | FILE]</p></div></div><div class="refsect1"><a name="idm214193075936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-readahead-collect.service</code>
-                is a service that collects disk usage patterns at boot
-                time. <code class="filename">systemd-readahead-replay.service</code>
-                is a service that replays this access data collected
-                at the subsequent boot. Since disks tend to be
-                magnitudes slower than RAM, this is intended to improve
-                boot speeds by pre-loading early at boot all data on
-                disk that is known to be read for the complete boot
-                process.</p><p><code class="filename">systemd-readahead-done.service</code>
-                is executed a short while after boot completed and signals
-                <code class="filename">systemd-readahead-collect.service</code>
-                to end data collection. On this signal, this service
-                will then sort the collected disk accesses and store
-                information about them in
-                <code class="filename">/.readahead</code>.</p><p>Normally, both
-                <code class="filename">systemd-readahead-collect.service</code>
-                and
-                <code class="filename">systemd-readahead-replay.service</code>
-                are activated at boot so that access patterns from the
-                preceding boot are replayed and new data collected
-                for the subsequent boot. However, on read-only media
-                where the collected data cannot be stored, it might
-                be a good idea to disable
-                <code class="filename">systemd-readahead-collect.service</code>.</p><p>On rotating media, when replaying disk accesses
-                at early boot,
-                <code class="filename">systemd-readahead-replay.service</code>
-                will order read requests by their location on disk. On
-                non-rotating media, they will be ordered by their
-                original access timestamp. If the file system supports
-                it,
-                <code class="filename">systemd-readahead-collect.service</code>
-                will also defragment and rearrange files on disk to
-                optimize subsequent boot times.</p></div><div class="refsect1"><a name="idm214197017776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><code class="filename">systemd-readahead</code> understands
-                the following options:</p><div class="variablelist"><dl class="variablelist"><dt id="--files-max="><span class="term"><code class="option">--files-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--files-max=">¶</a></dt><dd><p>Maximum number of
-                                files to read ahead. Only valid
-                                for thes <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="--file-size-max="><span class="term"><code class="option">--file-size-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--file-size-max=">¶</a></dt><dd><p>Maximum size of files
-                                in bytes to read ahead. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                and <span class="command"><strong>replay</strong></span>
-                                commands.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p>Maximum time in microseconds
-                                to spend collecting data. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197006432"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood by
-                <code class="filename">systemd-readahead</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="collect
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>collect
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#collect%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Collect read-ahead data on
-                                        early boot. When terminating, it will
-                                        write out a pack file to the indicated
-                                        directory containing the read-ahead
-                                        data. </p></dd><dt id="replay
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>replay
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#replay%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Perform read-ahead on the
-                                        specified directory tree.</p></dd><dt id="analyze
-                                [FILE]"><span class="term"><span class="command"><strong>analyze
-                                [<em class="replaceable"><code>FILE</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#analyze%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFILE%5D">¶</a></dt><dd><p>Dumps the content of the
-                                        read-ahead pack file to the
-                                        terminal. For each file, the
-                                        output lists approximately how
-                                        much will be read ahead by
-                                        the <span class="command"><strong>replay</strong></span>
-                                        command.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196988320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                </p></div></div></body></html>
diff --git a/man/systemd-readahead-done.service.8 b/man/systemd-readahead-done.service.8
deleted file mode 100644 (file)
index cb34b47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man8/systemd-readahead-replay.service.8
diff --git a/man/systemd-readahead-done.service.html b/man/systemd-readahead-done.service.html
deleted file mode 100644 (file)
index 0da54c5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-readahead-replay.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
-    a.headerlink {
-      color: #c60f0f;
-      font-size: 0.8em;
-      padding: 0 4px 0 4px;
-      text-decoration: none;
-      visibility: hidden;
-    }
-
-    a.headerlink:hover {
-      background-color: #c60f0f;
-      color: white;
-    }
-
-    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
-      visibility: visible;
-    }
-  </style><a href="index.html">Index </a>·
-  <a href="systemd.directives.html">Directives </a>·
-  <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-readahead-replay.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-readahead — Disk read ahead logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-readahead-replay.service</code></p><p><code class="filename">systemd-readahead-collect.service</code></p><p><code class="filename">systemd-readahead-done.service</code></p><p><code class="filename">systemd-readahead-done.timer</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-readahead/systemd-readahead</code>  [OPTIONS...]  COMMAND  [DIRECTORY | FILE]</p></div></div><div class="refsect1"><a name="idm214193075936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-readahead-collect.service</code>
-                is a service that collects disk usage patterns at boot
-                time. <code class="filename">systemd-readahead-replay.service</code>
-                is a service that replays this access data collected
-                at the subsequent boot. Since disks tend to be
-                magnitudes slower than RAM, this is intended to improve
-                boot speeds by pre-loading early at boot all data on
-                disk that is known to be read for the complete boot
-                process.</p><p><code class="filename">systemd-readahead-done.service</code>
-                is executed a short while after boot completed and signals
-                <code class="filename">systemd-readahead-collect.service</code>
-                to end data collection. On this signal, this service
-                will then sort the collected disk accesses and store
-                information about them in
-                <code class="filename">/.readahead</code>.</p><p>Normally, both
-                <code class="filename">systemd-readahead-collect.service</code>
-                and
-                <code class="filename">systemd-readahead-replay.service</code>
-                are activated at boot so that access patterns from the
-                preceding boot are replayed and new data collected
-                for the subsequent boot. However, on read-only media
-                where the collected data cannot be stored, it might
-                be a good idea to disable
-                <code class="filename">systemd-readahead-collect.service</code>.</p><p>On rotating media, when replaying disk accesses
-                at early boot,
-                <code class="filename">systemd-readahead-replay.service</code>
-                will order read requests by their location on disk. On
-                non-rotating media, they will be ordered by their
-                original access timestamp. If the file system supports
-                it,
-                <code class="filename">systemd-readahead-collect.service</code>
-                will also defragment and rearrange files on disk to
-                optimize subsequent boot times.</p></div><div class="refsect1"><a name="idm214197017776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><code class="filename">systemd-readahead</code> understands
-                the following options:</p><div class="variablelist"><dl class="variablelist"><dt id="--files-max="><span class="term"><code class="option">--files-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--files-max=">¶</a></dt><dd><p>Maximum number of
-                                files to read ahead. Only valid
-                                for thes <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="--file-size-max="><span class="term"><code class="option">--file-size-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--file-size-max=">¶</a></dt><dd><p>Maximum size of files
-                                in bytes to read ahead. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                and <span class="command"><strong>replay</strong></span>
-                                commands.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p>Maximum time in microseconds
-                                to spend collecting data. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197006432"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood by
-                <code class="filename">systemd-readahead</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="collect
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>collect
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#collect%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Collect read-ahead data on
-                                        early boot. When terminating, it will
-                                        write out a pack file to the indicated
-                                        directory containing the read-ahead
-                                        data. </p></dd><dt id="replay
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>replay
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#replay%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Perform read-ahead on the
-                                        specified directory tree.</p></dd><dt id="analyze
-                                [FILE]"><span class="term"><span class="command"><strong>analyze
-                                [<em class="replaceable"><code>FILE</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#analyze%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFILE%5D">¶</a></dt><dd><p>Dumps the content of the
-                                        read-ahead pack file to the
-                                        terminal. For each file, the
-                                        output lists approximately how
-                                        much will be read ahead by
-                                        the <span class="command"><strong>replay</strong></span>
-                                        command.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196988320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                </p></div></div></body></html>
diff --git a/man/systemd-readahead-done.timer.8 b/man/systemd-readahead-done.timer.8
deleted file mode 100644 (file)
index cb34b47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man8/systemd-readahead-replay.service.8
diff --git a/man/systemd-readahead-done.timer.html b/man/systemd-readahead-done.timer.html
deleted file mode 100644 (file)
index 0da54c5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-readahead-replay.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
-    a.headerlink {
-      color: #c60f0f;
-      font-size: 0.8em;
-      padding: 0 4px 0 4px;
-      text-decoration: none;
-      visibility: hidden;
-    }
-
-    a.headerlink:hover {
-      background-color: #c60f0f;
-      color: white;
-    }
-
-    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
-      visibility: visible;
-    }
-  </style><a href="index.html">Index </a>·
-  <a href="systemd.directives.html">Directives </a>·
-  <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-readahead-replay.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-readahead — Disk read ahead logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-readahead-replay.service</code></p><p><code class="filename">systemd-readahead-collect.service</code></p><p><code class="filename">systemd-readahead-done.service</code></p><p><code class="filename">systemd-readahead-done.timer</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-readahead/systemd-readahead</code>  [OPTIONS...]  COMMAND  [DIRECTORY | FILE]</p></div></div><div class="refsect1"><a name="idm214193075936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-readahead-collect.service</code>
-                is a service that collects disk usage patterns at boot
-                time. <code class="filename">systemd-readahead-replay.service</code>
-                is a service that replays this access data collected
-                at the subsequent boot. Since disks tend to be
-                magnitudes slower than RAM, this is intended to improve
-                boot speeds by pre-loading early at boot all data on
-                disk that is known to be read for the complete boot
-                process.</p><p><code class="filename">systemd-readahead-done.service</code>
-                is executed a short while after boot completed and signals
-                <code class="filename">systemd-readahead-collect.service</code>
-                to end data collection. On this signal, this service
-                will then sort the collected disk accesses and store
-                information about them in
-                <code class="filename">/.readahead</code>.</p><p>Normally, both
-                <code class="filename">systemd-readahead-collect.service</code>
-                and
-                <code class="filename">systemd-readahead-replay.service</code>
-                are activated at boot so that access patterns from the
-                preceding boot are replayed and new data collected
-                for the subsequent boot. However, on read-only media
-                where the collected data cannot be stored, it might
-                be a good idea to disable
-                <code class="filename">systemd-readahead-collect.service</code>.</p><p>On rotating media, when replaying disk accesses
-                at early boot,
-                <code class="filename">systemd-readahead-replay.service</code>
-                will order read requests by their location on disk. On
-                non-rotating media, they will be ordered by their
-                original access timestamp. If the file system supports
-                it,
-                <code class="filename">systemd-readahead-collect.service</code>
-                will also defragment and rearrange files on disk to
-                optimize subsequent boot times.</p></div><div class="refsect1"><a name="idm214197017776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><code class="filename">systemd-readahead</code> understands
-                the following options:</p><div class="variablelist"><dl class="variablelist"><dt id="--files-max="><span class="term"><code class="option">--files-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--files-max=">¶</a></dt><dd><p>Maximum number of
-                                files to read ahead. Only valid
-                                for thes <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="--file-size-max="><span class="term"><code class="option">--file-size-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--file-size-max=">¶</a></dt><dd><p>Maximum size of files
-                                in bytes to read ahead. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                and <span class="command"><strong>replay</strong></span>
-                                commands.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p>Maximum time in microseconds
-                                to spend collecting data. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197006432"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood by
-                <code class="filename">systemd-readahead</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="collect
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>collect
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#collect%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Collect read-ahead data on
-                                        early boot. When terminating, it will
-                                        write out a pack file to the indicated
-                                        directory containing the read-ahead
-                                        data. </p></dd><dt id="replay
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>replay
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#replay%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Perform read-ahead on the
-                                        specified directory tree.</p></dd><dt id="analyze
-                                [FILE]"><span class="term"><span class="command"><strong>analyze
-                                [<em class="replaceable"><code>FILE</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#analyze%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFILE%5D">¶</a></dt><dd><p>Dumps the content of the
-                                        read-ahead pack file to the
-                                        terminal. For each file, the
-                                        output lists approximately how
-                                        much will be read ahead by
-                                        the <span class="command"><strong>replay</strong></span>
-                                        command.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196988320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                </p></div></div></body></html>
diff --git a/man/systemd-readahead-replay.service.8 b/man/systemd-readahead-replay.service.8
deleted file mode 100644 (file)
index 84d4455..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-'\" t
-.TH "SYSTEMD\-READAHEAD\-REPLAY\&.SERVICE" "8" "" "systemd 215" "systemd-readahead-replay.service"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-readahead \- Disk read ahead logic
-.SH "SYNOPSIS"
-.PP
-systemd\-readahead\-replay\&.service
-.PP
-systemd\-readahead\-collect\&.service
-.PP
-systemd\-readahead\-done\&.service
-.PP
-systemd\-readahead\-done\&.timer
-.HP \w'\fB/usr/lib/systemd/systemd\-readahead/systemd\-readahead\fR\ 'u
-\fB/usr/lib/systemd/systemd\-readahead/systemd\-readahead\fR [OPTIONS...] COMMAND [DIRECTORY\ |\ FILE]
-.SH "DESCRIPTION"
-.PP
-systemd\-readahead\-collect\&.service
-is a service that collects disk usage patterns at boot time\&.
-systemd\-readahead\-replay\&.service
-is a service that replays this access data collected at the subsequent boot\&. Since disks tend to be magnitudes slower than RAM, this is intended to improve boot speeds by pre\-loading early at boot all data on disk that is known to be read for the complete boot process\&.
-.PP
-systemd\-readahead\-done\&.service
-is executed a short while after boot completed and signals
-systemd\-readahead\-collect\&.service
-to end data collection\&. On this signal, this service will then sort the collected disk accesses and store information about them in
-/\&.readahead\&.
-.PP
-Normally, both
-systemd\-readahead\-collect\&.service
-and
-systemd\-readahead\-replay\&.service
-are activated at boot so that access patterns from the preceding boot are replayed and new data collected for the subsequent boot\&. However, on read\-only media where the collected data cannot be stored, it might be a good idea to disable
-systemd\-readahead\-collect\&.service\&.
-.PP
-On rotating media, when replaying disk accesses at early boot,
-systemd\-readahead\-replay\&.service
-will order read requests by their location on disk\&. On non\-rotating media, they will be ordered by their original access timestamp\&. If the file system supports it,
-systemd\-readahead\-collect\&.service
-will also defragment and rearrange files on disk to optimize subsequent boot times\&.
-.SH "OPTIONS"
-.PP
-systemd\-readahead
-understands the following options:
-.PP
-\fB\-\-files\-max=\fR
-.RS 4
-Maximum number of files to read ahead\&. Only valid for thes
-\fBcollect\fR
-command\&.
-.RE
-.PP
-\fB\-\-file\-size\-max=\fR
-.RS 4
-Maximum size of files in bytes to read ahead\&. Only valid for the
-\fBcollect\fR
-and
-\fBreplay\fR
-commands\&.
-.RE
-.PP
-\fB\-\-timeout=\fR
-.RS 4
-Maximum time in microseconds to spend collecting data\&. Only valid for the
-\fBcollect\fR
-command\&.
-.RE
-.PP
-\fB\-h\fR, \fB\-\-help\fR
-.RS 4
-Print a short help text and exit\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Print a short version string and exit\&.
-.RE
-.SH "COMMANDS"
-.PP
-The following commands are understood by
-systemd\-readahead:
-.PP
-\fBcollect [\fR\fB\fIDIRECTORY\fR\fR\fB]\fR
-.RS 4
-Collect read\-ahead data on early boot\&. When terminating, it will write out a pack file to the indicated directory containing the read\-ahead data\&.
-.RE
-.PP
-\fBreplay [\fR\fB\fIDIRECTORY\fR\fR\fB]\fR
-.RS 4
-Perform read\-ahead on the specified directory tree\&.
-.RE
-.PP
-\fBanalyze [\fR\fB\fIFILE\fR\fR\fB]\fR
-.RS 4
-Dumps the content of the read\-ahead pack file to the terminal\&. For each file, the output lists approximately how much will be read ahead by the
-\fBreplay\fR
-command\&.
-.RE
-.SH "SEE ALSO"
-.PP
-\fBsystemd\fR(1)
diff --git a/man/systemd-readahead-replay.service.html b/man/systemd-readahead-replay.service.html
deleted file mode 100644 (file)
index 0da54c5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-readahead-replay.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
-    a.headerlink {
-      color: #c60f0f;
-      font-size: 0.8em;
-      padding: 0 4px 0 4px;
-      text-decoration: none;
-      visibility: hidden;
-    }
-
-    a.headerlink:hover {
-      background-color: #c60f0f;
-      color: white;
-    }
-
-    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
-      visibility: visible;
-    }
-  </style><a href="index.html">Index </a>·
-  <a href="systemd.directives.html">Directives </a>·
-  <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-readahead-replay.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-readahead — Disk read ahead logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-readahead-replay.service</code></p><p><code class="filename">systemd-readahead-collect.service</code></p><p><code class="filename">systemd-readahead-done.service</code></p><p><code class="filename">systemd-readahead-done.timer</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-readahead/systemd-readahead</code>  [OPTIONS...]  COMMAND  [DIRECTORY | FILE]</p></div></div><div class="refsect1"><a name="idm214193075936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-readahead-collect.service</code>
-                is a service that collects disk usage patterns at boot
-                time. <code class="filename">systemd-readahead-replay.service</code>
-                is a service that replays this access data collected
-                at the subsequent boot. Since disks tend to be
-                magnitudes slower than RAM, this is intended to improve
-                boot speeds by pre-loading early at boot all data on
-                disk that is known to be read for the complete boot
-                process.</p><p><code class="filename">systemd-readahead-done.service</code>
-                is executed a short while after boot completed and signals
-                <code class="filename">systemd-readahead-collect.service</code>
-                to end data collection. On this signal, this service
-                will then sort the collected disk accesses and store
-                information about them in
-                <code class="filename">/.readahead</code>.</p><p>Normally, both
-                <code class="filename">systemd-readahead-collect.service</code>
-                and
-                <code class="filename">systemd-readahead-replay.service</code>
-                are activated at boot so that access patterns from the
-                preceding boot are replayed and new data collected
-                for the subsequent boot. However, on read-only media
-                where the collected data cannot be stored, it might
-                be a good idea to disable
-                <code class="filename">systemd-readahead-collect.service</code>.</p><p>On rotating media, when replaying disk accesses
-                at early boot,
-                <code class="filename">systemd-readahead-replay.service</code>
-                will order read requests by their location on disk. On
-                non-rotating media, they will be ordered by their
-                original access timestamp. If the file system supports
-                it,
-                <code class="filename">systemd-readahead-collect.service</code>
-                will also defragment and rearrange files on disk to
-                optimize subsequent boot times.</p></div><div class="refsect1"><a name="idm214197017776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><code class="filename">systemd-readahead</code> understands
-                the following options:</p><div class="variablelist"><dl class="variablelist"><dt id="--files-max="><span class="term"><code class="option">--files-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--files-max=">¶</a></dt><dd><p>Maximum number of
-                                files to read ahead. Only valid
-                                for thes <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="--file-size-max="><span class="term"><code class="option">--file-size-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--file-size-max=">¶</a></dt><dd><p>Maximum size of files
-                                in bytes to read ahead. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                and <span class="command"><strong>replay</strong></span>
-                                commands.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p>Maximum time in microseconds
-                                to spend collecting data. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197006432"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood by
-                <code class="filename">systemd-readahead</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="collect
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>collect
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#collect%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Collect read-ahead data on
-                                        early boot. When terminating, it will
-                                        write out a pack file to the indicated
-                                        directory containing the read-ahead
-                                        data. </p></dd><dt id="replay
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>replay
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#replay%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Perform read-ahead on the
-                                        specified directory tree.</p></dd><dt id="analyze
-                                [FILE]"><span class="term"><span class="command"><strong>analyze
-                                [<em class="replaceable"><code>FILE</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#analyze%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFILE%5D">¶</a></dt><dd><p>Dumps the content of the
-                                        read-ahead pack file to the
-                                        terminal. For each file, the
-                                        output lists approximately how
-                                        much will be read ahead by
-                                        the <span class="command"><strong>replay</strong></span>
-                                        command.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196988320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                </p></div></div></body></html>
diff --git a/man/systemd-readahead-replay.service.xml b/man/systemd-readahead-replay.service.xml
deleted file mode 100644 (file)
index 669fe78..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-<?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">
-
-<!--
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  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="systemd-readahead-replay.service" conditional='ENABLE_READAHEAD'
-          xmlns:xi="http://www.w3.org/2001/XInclude">
-
-        <refentryinfo>
-                <title>systemd-readahead-replay.service</title>
-                <productname>systemd</productname>
-
-                <authorgroup>
-                        <author>
-                                <contrib>Developer</contrib>
-                                <firstname>Lennart</firstname>
-                                <surname>Poettering</surname>
-                                <email>lennart@poettering.net</email>
-                        </author>
-                </authorgroup>
-        </refentryinfo>
-
-        <refmeta>
-                <refentrytitle>systemd-readahead-replay.service</refentrytitle>
-                <manvolnum>8</manvolnum>
-        </refmeta>
-
-        <refnamediv>
-                <refname>systemd-readahead-replay.service</refname>
-                <refname>systemd-readahead-collect.service</refname>
-                <refname>systemd-readahead-done.service</refname>
-                <refname>systemd-readahead-done.timer</refname>
-                <refname>systemd-readahead</refname>
-                <refpurpose>Disk read ahead logic</refpurpose>
-        </refnamediv>
-
-        <refsynopsisdiv>
-                <para><filename>systemd-readahead-replay.service</filename></para>
-                <para><filename>systemd-readahead-collect.service</filename></para>
-                <para><filename>systemd-readahead-done.service</filename></para>
-                <para><filename>systemd-readahead-done.timer</filename></para>
-                <cmdsynopsis>
-                        <command>/usr/lib/systemd/systemd-readahead/systemd-readahead</command>
-                        <arg choice="opt" rep="repeat">OPTIONS</arg>
-                        <arg choice="plain">COMMAND</arg>
-                        <arg choice="opt">DIRECTORY | FILE</arg>
-                </cmdsynopsis>
-        </refsynopsisdiv>
-
-        <refsect1>
-                <title>Description</title>
-
-                <para><filename>systemd-readahead-collect.service</filename>
-                is a service that collects disk usage patterns at boot
-                time. <filename>systemd-readahead-replay.service</filename>
-                is a service that replays this access data collected
-                at the subsequent boot. Since disks tend to be
-                magnitudes slower than RAM, this is intended to improve
-                boot speeds by pre-loading early at boot all data on
-                disk that is known to be read for the complete boot
-                process.</para>
-
-                <para><filename>systemd-readahead-done.service</filename>
-                is executed a short while after boot completed and signals
-                <filename>systemd-readahead-collect.service</filename>
-                to end data collection. On this signal, this service
-                will then sort the collected disk accesses and store
-                information about them in
-                <filename>/.readahead</filename>.</para>
-
-                <para>Normally, both
-                <filename>systemd-readahead-collect.service</filename>
-                and
-                <filename>systemd-readahead-replay.service</filename>
-                are activated at boot so that access patterns from the
-                preceding boot are replayed and new data collected
-                for the subsequent boot. However, on read-only media
-                where the collected data cannot be stored, it might
-                be a good idea to disable
-                <filename>systemd-readahead-collect.service</filename>.</para>
-
-                <para>On rotating media, when replaying disk accesses
-                at early boot,
-                <filename>systemd-readahead-replay.service</filename>
-                will order read requests by their location on disk. On
-                non-rotating media, they will be ordered by their
-                original access timestamp. If the file system supports
-                it,
-                <filename>systemd-readahead-collect.service</filename>
-                will also defragment and rearrange files on disk to
-                optimize subsequent boot times.</para>
-        </refsect1>
-
-        <refsect1>
-                <title>Options</title>
-
-                <para><filename>systemd-readahead</filename> understands
-                the following options:</para>
-
-                <variablelist>
-                        <varlistentry>
-                                <term><option>--files-max=</option></term>
-
-                                <listitem><para>Maximum number of
-                                files to read ahead. Only valid
-                                for thes <command>collect</command>
-                                command.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><option>--file-size-max=</option></term>
-
-                                <listitem><para>Maximum size of files
-                                in bytes to read ahead. Only valid
-                                for the <command>collect</command>
-                                and <command>replay</command>
-                                commands.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><option>--timeout=</option></term>
-
-                                <listitem><para>Maximum time in microseconds
-                                to spend collecting data. Only valid
-                                for the <command>collect</command>
-                                command.</para></listitem>
-                        </varlistentry>
-
-                        <xi:include href="standard-options.xml" xpointer="help" />
-                        <xi:include href="standard-options.xml" xpointer="version" />
-                </variablelist>
-
-        </refsect1>
-
-        <refsect1>
-                <title>Commands</title>
-
-                <para>The following commands are understood by
-                <filename>systemd-readahead</filename>:</para> <variablelist>
-                        <varlistentry>
-                                <term><command>collect
-                                [<replaceable>DIRECTORY</replaceable>]</command></term>
-                                <listitem>
-                                        <para>Collect read-ahead data on
-                                        early boot. When terminating, it will
-                                        write out a pack file to the indicated
-                                        directory containing the read-ahead
-                                        data. </para>
-                                </listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><command>replay
-                                [<replaceable>DIRECTORY</replaceable>]</command></term>
-                                <listitem>
-                                        <para>Perform read-ahead on the
-                                        specified directory tree.</para>
-                                </listitem>
-                        </varlistentry>
-
-                        <varlistentry>
-                                <term><command>analyze
-                                [<replaceable>FILE</replaceable>]</command></term>
-                                <listitem>
-                                        <para>Dumps the content of the
-                                        read-ahead pack file to the
-                                        terminal. For each file, the
-                                        output lists approximately how
-                                        much will be read ahead by
-                                        the <command>replay</command>
-                                        command.</para>
-                                </listitem>
-                        </varlistentry>
-
-                </variablelist>
-        </refsect1>
-
-        <refsect1>
-                <title>See Also</title>
-                <para>
-                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                </para>
-        </refsect1>
-
-</refentry>
diff --git a/man/systemd-readahead.8 b/man/systemd-readahead.8
deleted file mode 100644 (file)
index cb34b47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man8/systemd-readahead-replay.service.8
diff --git a/man/systemd-readahead.html b/man/systemd-readahead.html
deleted file mode 100644 (file)
index 0da54c5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-readahead-replay.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
-    a.headerlink {
-      color: #c60f0f;
-      font-size: 0.8em;
-      padding: 0 4px 0 4px;
-      text-decoration: none;
-      visibility: hidden;
-    }
-
-    a.headerlink:hover {
-      background-color: #c60f0f;
-      color: white;
-    }
-
-    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
-      visibility: visible;
-    }
-  </style><a href="index.html">Index </a>·
-  <a href="systemd.directives.html">Directives </a>·
-  <a href="../python-systemd/index.html">Python </a>·
-  <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-readahead-replay.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-readahead — Disk read ahead logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-readahead-replay.service</code></p><p><code class="filename">systemd-readahead-collect.service</code></p><p><code class="filename">systemd-readahead-done.service</code></p><p><code class="filename">systemd-readahead-done.timer</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-readahead/systemd-readahead</code>  [OPTIONS...]  COMMAND  [DIRECTORY | FILE]</p></div></div><div class="refsect1"><a name="idm214193075936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-readahead-collect.service</code>
-                is a service that collects disk usage patterns at boot
-                time. <code class="filename">systemd-readahead-replay.service</code>
-                is a service that replays this access data collected
-                at the subsequent boot. Since disks tend to be
-                magnitudes slower than RAM, this is intended to improve
-                boot speeds by pre-loading early at boot all data on
-                disk that is known to be read for the complete boot
-                process.</p><p><code class="filename">systemd-readahead-done.service</code>
-                is executed a short while after boot completed and signals
-                <code class="filename">systemd-readahead-collect.service</code>
-                to end data collection. On this signal, this service
-                will then sort the collected disk accesses and store
-                information about them in
-                <code class="filename">/.readahead</code>.</p><p>Normally, both
-                <code class="filename">systemd-readahead-collect.service</code>
-                and
-                <code class="filename">systemd-readahead-replay.service</code>
-                are activated at boot so that access patterns from the
-                preceding boot are replayed and new data collected
-                for the subsequent boot. However, on read-only media
-                where the collected data cannot be stored, it might
-                be a good idea to disable
-                <code class="filename">systemd-readahead-collect.service</code>.</p><p>On rotating media, when replaying disk accesses
-                at early boot,
-                <code class="filename">systemd-readahead-replay.service</code>
-                will order read requests by their location on disk. On
-                non-rotating media, they will be ordered by their
-                original access timestamp. If the file system supports
-                it,
-                <code class="filename">systemd-readahead-collect.service</code>
-                will also defragment and rearrange files on disk to
-                optimize subsequent boot times.</p></div><div class="refsect1"><a name="idm214197017776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><code class="filename">systemd-readahead</code> understands
-                the following options:</p><div class="variablelist"><dl class="variablelist"><dt id="--files-max="><span class="term"><code class="option">--files-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--files-max=">¶</a></dt><dd><p>Maximum number of
-                                files to read ahead. Only valid
-                                for thes <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="--file-size-max="><span class="term"><code class="option">--file-size-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--file-size-max=">¶</a></dt><dd><p>Maximum size of files
-                                in bytes to read ahead. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                and <span class="command"><strong>replay</strong></span>
-                                commands.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p>Maximum time in microseconds
-                                to spend collecting data. Only valid
-                                for the <span class="command"><strong>collect</strong></span>
-                                command.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197006432"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood by
-                <code class="filename">systemd-readahead</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="collect
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>collect
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#collect%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Collect read-ahead data on
-                                        early boot. When terminating, it will
-                                        write out a pack file to the indicated
-                                        directory containing the read-ahead
-                                        data. </p></dd><dt id="replay
-                                [DIRECTORY]"><span class="term"><span class="command"><strong>replay
-                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#replay%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D">¶</a></dt><dd><p>Perform read-ahead on the
-                                        specified directory tree.</p></dd><dt id="analyze
-                                [FILE]"><span class="term"><span class="command"><strong>analyze
-                                [<em class="replaceable"><code>FILE</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#analyze%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFILE%5D">¶</a></dt><dd><p>Dumps the content of the
-                                        read-ahead pack file to the
-                                        terminal. For each file, the
-                                        output lists approximately how
-                                        much will be read ahead by
-                                        the <span class="command"><strong>replay</strong></span>
-                                        command.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196988320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-                </p></div></div></body></html>
index 4a22e8c9fc16e31eab8579fee56de6f97e42887b..ee0d32acd1460ea39a5f0c71b1f07ce8d7b0ed16 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214183037312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214184940736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
                 system service that is pulled in by
                 <code class="filename">halt.target</code> and is responsible
                 for the actual system halt. Similarly,
                 related units) should never be executed
                 directly. Instead, trigger system shutdown with a
                 command such as "<code class="literal">systemctl halt</code>" or
-                suchlike.</p></div><div class="refsect1"><a name="idm214183155536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                suchlike.</p></div><div class="refsect1"><a name="idm214188878512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
-                        <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
                         <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 5dfcda49ab896e5d95e457568de2d6e509063f79..7d2b25ac0221f2ad7b926ff05bd8ff6ba8555eac 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-remount-fs.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-remount-fs.service, systemd-remount-fs — Remount root and kernel file systems</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-remount-fs.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-remount-fs</code></p></div><div class="refsect1"><a name="idm214192871296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-remount-fs.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-remount-fs.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-remount-fs.service, systemd-remount-fs — Remount root and kernel file systems</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-remount-fs.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-remount-fs</code></p></div><div class="refsect1"><a name="idm214190157696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-remount-fs.service</code>
                 is an early-boot service that applies mount options
                 listed in
                 <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>
@@ -40,7 +40,7 @@
                 exist or lists no entries for the mentioned file
                 systems.</p><p>For a longer discussion of kernel API file
                 systems see <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems" target="_top">API
-                File Systems</a>.</p></div><div class="refsect1"><a name="idm214192910144"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                File Systems</a>.</p></div><div class="refsect1"><a name="idm214190147888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>,
                         <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>
index 72b98d8d254111930c95d7a67624734a22854d31..03acd44e6ca90b1c6b6085db797dab041d8bb122 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-REMOUNT\-FS\&.SERVICE" "8" "" "systemd 215" "systemd-remount-fs.service"
+.TH "SYSTEMD\-REMOUNT\-FS\&.SERVICE" "8" "" "systemd 217" "systemd-remount-fs.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 5dfcda49ab896e5d95e457568de2d6e509063f79..7d2b25ac0221f2ad7b926ff05bd8ff6ba8555eac 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-remount-fs.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-remount-fs.service, systemd-remount-fs — Remount root and kernel file systems</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-remount-fs.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-remount-fs</code></p></div><div class="refsect1"><a name="idm214192871296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-remount-fs.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-remount-fs.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-remount-fs.service, systemd-remount-fs — Remount root and kernel file systems</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-remount-fs.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-remount-fs</code></p></div><div class="refsect1"><a name="idm214190157696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-remount-fs.service</code>
                 is an early-boot service that applies mount options
                 listed in
                 <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>
@@ -40,7 +40,7 @@
                 exist or lists no entries for the mentioned file
                 systems.</p><p>For a longer discussion of kernel API file
                 systems see <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems" target="_top">API
-                File Systems</a>.</p></div><div class="refsect1"><a name="idm214192910144"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                File Systems</a>.</p></div><div class="refsect1"><a name="idm214190147888"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>,
                         <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>
index cce59f1b6d4ad72c063e46d138b2cf2eaa5faec9..ffacbe0a0e4e4992735274ec89401dffa8ff1233 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-resolved.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-resolved.service, systemd-resolved — Network Name Resolution manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-resolved.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-resolved</code></p></div><div class="refsect1"><a name="idm214173999872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-resolved</strong></span> is a system
-                service that manages network name resolution. It does so by
-                generating <code class="filename">/run/systemd/resolve/resolv.conf</code>,
-                which may be symlinked from <code class="filename">/etc/resolv.conf</code>.
-                The contents is generated from the global settings in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-resolved.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-resolved.service, systemd-resolved — Network Name Resolution manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-resolved.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-resolved</code></p></div><div class="refsect1"><a name="idm214167161184"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-resolved</strong></span> is a system
+                service that manages network name resolution. It
+                implements a caching DNS stub resolver and an LLMNR
+                resolver and responder. It also generates
+                <code class="filename">/run/systemd/resolve/resolv.conf</code>
+                for compatibility which may be symlinked from
+                <code class="filename">/etc/resolv.conf</code>.</p><p>The DNS servers contacted are determined from
+                the global settings in
                 <a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>,
-                the per-link static settings in <code class="filename">.network</code> files,
-                and the per-link dynamic settings received over DHCP. See
+                the per-link static settings in
+                <code class="filename">.network</code> files, and the per-link
+                dynamic settings received over DHCP. See
                 <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>
                 for more details.</p><p>Note that <code class="filename">/run/systemd/resolve/resolv.conf</code>
                 should not be used directly, but only through a symlink from
-                <code class="filename">/etc/resolv.conf</code>.</p></div><div class="refsect1"><a name="idm214173992080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>,
+                <code class="filename">/etc/resolv.conf</code>.</p></div><div class="refsect1"><a name="idm214170988208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>,
                         <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
                         <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
                 </p></div></div></body></html>
index cad43f6eea4de58eaecdd47df619ac135ea203c3..00e14231fd4dfa82937ea813ebccff0b80a1f96d 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-RESOLVED\&.SERVICE" "8" "" "systemd 215" "systemd-resolved.service"
+.TH "SYSTEMD\-RESOLVED\&.SERVICE" "8" "" "systemd 217" "systemd-resolved.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -29,9 +29,12 @@ systemd\-resolved\&.service
 .SH "DESCRIPTION"
 .PP
 \fBsystemd\-resolved\fR
-is a system service that manages network name resolution\&. It does so by generating
-/run/systemd/resolve/resolv\&.conf, which may be symlinked from
-/etc/resolv\&.conf\&. The contents is generated from the global settings in
+is a system service that manages network name resolution\&. It implements a caching DNS stub resolver and an LLMNR resolver and responder\&. It also generates
+/run/systemd/resolve/resolv\&.conf
+for compatibility which may be symlinked from
+/etc/resolv\&.conf\&.
+.PP
+The DNS servers contacted are determined from the global settings in
 \fBresolved.conf\fR(5), the per\-link static settings in
 \&.network
 files, and the per\-link dynamic settings received over DHCP\&. See
@@ -44,7 +47,7 @@ should not be used directly, but only through a symlink from
 /etc/resolv\&.conf\&.
 .SH "SEE ALSO"
 .PP
-\fBresolved.conf\fR(5),
 \fBsystemd\fR(1),
+\fBresolved.conf\fR(5),
 \fBsystemd.network\fR(5),
 \fBsystemd-networkd.service\fR(8)
index cce59f1b6d4ad72c063e46d138b2cf2eaa5faec9..ffacbe0a0e4e4992735274ec89401dffa8ff1233 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-resolved.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-resolved.service, systemd-resolved — Network Name Resolution manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-resolved.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-resolved</code></p></div><div class="refsect1"><a name="idm214173999872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-resolved</strong></span> is a system
-                service that manages network name resolution. It does so by
-                generating <code class="filename">/run/systemd/resolve/resolv.conf</code>,
-                which may be symlinked from <code class="filename">/etc/resolv.conf</code>.
-                The contents is generated from the global settings in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-resolved.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-resolved.service, systemd-resolved — Network Name Resolution manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-resolved.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-resolved</code></p></div><div class="refsect1"><a name="idm214167161184"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-resolved</strong></span> is a system
+                service that manages network name resolution. It
+                implements a caching DNS stub resolver and an LLMNR
+                resolver and responder. It also generates
+                <code class="filename">/run/systemd/resolve/resolv.conf</code>
+                for compatibility which may be symlinked from
+                <code class="filename">/etc/resolv.conf</code>.</p><p>The DNS servers contacted are determined from
+                the global settings in
                 <a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>,
-                the per-link static settings in <code class="filename">.network</code> files,
-                and the per-link dynamic settings received over DHCP. See
+                the per-link static settings in
+                <code class="filename">.network</code> files, and the per-link
+                dynamic settings received over DHCP. See
                 <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>
                 for more details.</p><p>Note that <code class="filename">/run/systemd/resolve/resolv.conf</code>
                 should not be used directly, but only through a symlink from
-                <code class="filename">/etc/resolv.conf</code>.</p></div><div class="refsect1"><a name="idm214173992080"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
-                        <a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>,
+                <code class="filename">/etc/resolv.conf</code>.</p></div><div class="refsect1"><a name="idm214170988208"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>,
                         <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
                         <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
                 </p></div></div></body></html>
index 839f46a12b129daeb28f4254187bf6651c1a679d..c44b10c4722a69dff4578177c34907403e9973fc 100644 (file)
                 <title>Description</title>
 
                 <para><command>systemd-resolved</command> is a system
-                service that manages network name resolution. It does so by
-                generating <filename>/run/systemd/resolve/resolv.conf</filename>,
-                which may be symlinked from <filename>/etc/resolv.conf</filename>.
-                The contents is generated from the global settings in
+                service that manages network name resolution. It
+                implements a caching DNS stub resolver and an LLMNR
+                resolver and responder. It also generates
+                <filename>/run/systemd/resolve/resolv.conf</filename>
+                for compatibility which may be symlinked from
+                <filename>/etc/resolv.conf</filename>.</para>
+
+                <para>The DNS servers contacted are determined from
+                the global settings in
                 <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                the per-link static settings in <filename>.network</filename> files,
-                and the per-link dynamic settings received over DHCP. See
+                the per-link static settings in
+                <filename>.network</filename> files, and the per-link
+                dynamic settings received over DHCP. See
                 <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 for more details.</para>
 
@@ -75,8 +81,8 @@
         <refsect1>
                 <title>See Also</title>
                 <para>
-                        <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
index b2696bf51ce8758c986f6d602fef8b5af5695e5b..6613f6dcc4dc40d0b8cb14e5e52ce6eaaefa7e99 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-rfkill@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-rfkill@.service, systemd-rfkill — Load and save the RF kill switch state at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-rfkill@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-rfkill</code></p></div><div class="refsect1"><a name="idm214183154400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-rfkill@.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-rfkill@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-rfkill@.service, systemd-rfkill — Load and save the RF kill switch state at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-rfkill@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-rfkill</code></p></div><div class="refsect1"><a name="idm214188726624"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-rfkill@.service</code> is
                 a service that restores the RF kill switch state at
                 early boot and saves it at shutdown. On disk, the RF
                 kill switch state is stored in
-                <code class="filename">/var/lib/systemd/rfkill/</code>.</p></div><div class="refsect1"><a name="idm214183151840"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-rfkill</code> understands
+                <code class="filename">/var/lib/systemd/rfkill/</code>.</p></div><div class="refsect1"><a name="idm214192486672"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-rfkill</code> understands
                 the following kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.restore_state="><span class="term"><code class="varname">systemd.restore_state=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.restore_state=">¶</a></dt><dd><p>Takes a boolean
                                 argument. Defaults to
                                 "<code class="literal">1</code>". If
                                 "<code class="literal">0</code>", does not restore
                                 the rfkill settings on boot. However,
                                 settings will still be stored on shutdown.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214183146256"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214192553600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 </p></div></div></body></html>
index 9d570bf917aa9fa4dd9d5fa0641bea37bbc96649..dfd7f718c2997aa09a0e332877641274a0ec0180 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-RFKILL@\&.SERVICE" "8" "" "systemd 215" "systemd-rfkill@.service"
+.TH "SYSTEMD\-RFKILL@\&.SERVICE" "8" "" "systemd 217" "systemd-rfkill@.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index b2696bf51ce8758c986f6d602fef8b5af5695e5b..6613f6dcc4dc40d0b8cb14e5e52ce6eaaefa7e99 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-rfkill@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-rfkill@.service, systemd-rfkill — Load and save the RF kill switch state at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-rfkill@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-rfkill</code></p></div><div class="refsect1"><a name="idm214183154400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-rfkill@.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-rfkill@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-rfkill@.service, systemd-rfkill — Load and save the RF kill switch state at boot and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-rfkill@.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-rfkill</code></p></div><div class="refsect1"><a name="idm214188726624"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-rfkill@.service</code> is
                 a service that restores the RF kill switch state at
                 early boot and saves it at shutdown. On disk, the RF
                 kill switch state is stored in
-                <code class="filename">/var/lib/systemd/rfkill/</code>.</p></div><div class="refsect1"><a name="idm214183151840"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-rfkill</code> understands
+                <code class="filename">/var/lib/systemd/rfkill/</code>.</p></div><div class="refsect1"><a name="idm214192486672"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p><code class="filename">systemd-rfkill</code> understands
                 the following kernel command line parameter:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.restore_state="><span class="term"><code class="varname">systemd.restore_state=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.restore_state=">¶</a></dt><dd><p>Takes a boolean
                                 argument. Defaults to
                                 "<code class="literal">1</code>". If
                                 "<code class="literal">0</code>", does not restore
                                 the rfkill settings on boot. However,
                                 settings will still be stored on shutdown.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214183146256"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214192553600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 </p></div></div></body></html>
index c776d77e8d060a67ca20066e7cff9ab655379a38..4906bff167e187c44f966ca8562c7738de467f64 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-RUN" "1" "" "systemd 215" "systemd-run"
+.TH "SYSTEMD\-RUN" "1" "" "systemd 217" "systemd-run"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 4fbb55239b6e7e91463126d5c5121852901b0725..b5bcf569d559af431588ccbfe803caf3359fb2aa 100644 (file)
@@ -19,9 +19,9 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-run"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-run — Run programs in transient scope or service units</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-run</code>  [OPTIONS...]  <em class="replaceable"><code>COMMAND</code></em>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-run"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-run — Run programs in transient scope or service units</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-run</code>  [OPTIONS...]  <em class="replaceable"><code>COMMAND</code></em>
        [ARGS...]
-       </p></div></div><div class="refsect1"><a name="idm214192991536"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-run</strong></span> may be used to create and start
+       </p></div></div><div class="refsect1"><a name="idm214184589872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-run</strong></span> may be used to create and start
     a transient <code class="filename">.service</code> or a
     <code class="filename">.scope</code> unit and run the specified
     <em class="replaceable"><code>COMMAND</code></em> in it.</p><p>If a command is run as transient service unit, it will be
@@ -36,7 +36,7 @@
     managed by the service manager similar to normal services, and
     will also show up in the output of <span class="command"><strong>systemctl
     list-units</strong></span>. Execution in this case is synchronous, and
-    execution will return only when the command finishes.</p></div><div class="refsect1"><a name="idm214193032512"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--scope"><span class="term"><code class="option">--scope</code></span><a class="headerlink" title="Permalink to this term" href="#--scope">¶</a></dt><dd><p>Create a transient <code class="filename">.scope</code> unit instead of
+    execution will return only when the command finishes.</p></div><div class="refsect1"><a name="idm214184582080"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--scope"><span class="term"><code class="option">--scope</code></span><a class="headerlink" title="Permalink to this term" href="#--scope">¶</a></dt><dd><p>Create a transient <code class="filename">.scope</code> unit instead of
           the default transient <code class="filename">.service</code> unit.
           </p></dd><dt id="--unit="><span class="term"><code class="option">--unit=</code></span><a class="headerlink" title="Permalink to this term" href="#--unit=">¶</a></dt><dd><p>Use this unit name instead of an automatically
         generated one.</p></dd><dt id="--property="><span class="term"><code class="option">--property=</code>, </span><span class="term"><code class="option">-p</code></span><a class="headerlink" title="Permalink to this term" href="#--property=">¶</a></dt><dd><p>Sets a unit property for the scope or service
@@ -89,8 +89,8 @@
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p>All command-line arguments after the first non-option
     argument become part of the commandline of the launched
     process. If a command is run as service unit, its first argument
-    needs to be an absolute binary path.</p></div><div class="refsect1"><a name="idm214193069376"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-    code otherwise.</p></div><div class="refsect1"><a name="idm214193068192"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following command will log the environment variables
+    needs to be an absolute binary path.</p></div><div class="refsect1"><a name="idm214188433264"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+    code otherwise.</p></div><div class="refsect1"><a name="idm214188432080"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>The following command will log the environment variables
     provided by systemd to services:</p><pre class="programlisting"># systemd-run env
 Running as unit run-19945.service.
 # journalctl -u run-19945.service
@@ -99,11 +99,11 @@ Sep 08 07:37:21 bupkis systemd[1]: Started /usr/bin/env.
 Sep 08 07:37:21 bupkis env[19948]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
 Sep 08 07:37:21 bupkis env[19948]: LANG=en_US.UTF-8
 Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.x86_64</pre><p>The following command invokes the
-    <a href="updatedb.html"><span class="citerefentry"><span class="refentrytitle">updatedb</span>(8)</span></a>
+    <a href="http://man7.org/linux/man-pages/man8/updatedb.8.html"><span class="citerefentry"><span class="refentrytitle">updatedb</span>(8)</span></a>
     tool, but lowers the block IO weight for it to 10. See
     <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>
     for more information on the <code class="varname">BlockIOWeight=</code>
-    property.</p><pre class="programlisting"># systemd-run -p BlockIOWeight=10 updatedb</pre></div><div class="refsect1"><a name="idm214188097824"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    property.</p><pre class="programlisting"># systemd-run -p BlockIOWeight=10 updatedb</pre></div><div class="refsect1"><a name="idm214183516288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
       <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
index e3c006a2e29d4ae9bdbf5b6cf0e8b2bf065f8853..0c9d13dd2dfbb9e01ed17379003dc2e961851774 100644 (file)
@@ -243,7 +243,7 @@ Sep 08 07:37:21 bupkis env[19948]: LANG=en_US.UTF-8
 Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.x86_64</programlisting>
 
     <para>The following command invokes the
-    <citerefentry><refentrytitle>updatedb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    <citerefentry project='man-pages'><refentrytitle>updatedb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
     tool, but lowers the block IO weight for it to 10. See
     <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
     for more information on the <varname>BlockIOWeight=</varname>
index 4a22e8c9fc16e31eab8579fee56de6f97e42887b..ee0d32acd1460ea39a5f0c71b1f07ce8d7b0ed16 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214183037312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm214184940736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a
                 system service that is pulled in by
                 <code class="filename">halt.target</code> and is responsible
                 for the actual system halt. Similarly,
                 related units) should never be executed
                 directly. Instead, trigger system shutdown with a
                 command such as "<code class="literal">systemctl halt</code>" or
-                suchlike.</p></div><div class="refsect1"><a name="idm214183155536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                suchlike.</p></div><div class="refsect1"><a name="idm214188878512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
-                        <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
                         <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>
                 </p></div></div></body></html>
index c1d4be749628921d3be8cc94cacf4da6f10062b0..2c8287b189563e63a6bbe99c2fa74be2897bd5d1 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-shutdownd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-shutdownd.service, systemd-shutdownd.socket, systemd-shutdownd — Scheduled shutdown service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-shutdownd.service</code></p><p><code class="filename">systemd-shutdownd.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></p></div><div class="refsect1"><a name="idm214188139152"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-shutdownd.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-shutdownd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-shutdownd.service, systemd-shutdownd.socket, systemd-shutdownd — Scheduled shutdown service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-shutdownd.service</code></p><p><code class="filename">systemd-shutdownd.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></p></div><div class="refsect1"><a name="idm214196230912"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-shutdownd.service</code> is a
                 system service that implements scheduled shutdowns, as
                 exposed by
                 <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>.
                 <code class="filename">systemd-shutdownd.service</code> is automatically activated on request and terminates
-                itself when it is unused.</p></div><div class="refsect1"><a name="idm214188135600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                itself when it is unused.</p></div><div class="refsect1"><a name="idm214196227360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>
                 </p></div></div></body></html>
index 279026ea1d27f7c30008f7f7abd7c58b77454c05..6b1c1c557667a8c5e7e86d78011977e5f30ea0ce 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SHUTDOWND\&.SERVICE" "8" "" "systemd 215" "systemd-shutdownd.service"
+.TH "SYSTEMD\-SHUTDOWND\&.SERVICE" "8" "" "systemd 217" "systemd-shutdownd.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index c1d4be749628921d3be8cc94cacf4da6f10062b0..2c8287b189563e63a6bbe99c2fa74be2897bd5d1 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-shutdownd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-shutdownd.service, systemd-shutdownd.socket, systemd-shutdownd — Scheduled shutdown service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-shutdownd.service</code></p><p><code class="filename">systemd-shutdownd.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></p></div><div class="refsect1"><a name="idm214188139152"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-shutdownd.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-shutdownd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-shutdownd.service, systemd-shutdownd.socket, systemd-shutdownd — Scheduled shutdown service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-shutdownd.service</code></p><p><code class="filename">systemd-shutdownd.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></p></div><div class="refsect1"><a name="idm214196230912"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-shutdownd.service</code> is a
                 system service that implements scheduled shutdowns, as
                 exposed by
                 <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>.
                 <code class="filename">systemd-shutdownd.service</code> is automatically activated on request and terminates
-                itself when it is unused.</p></div><div class="refsect1"><a name="idm214188135600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                itself when it is unused.</p></div><div class="refsect1"><a name="idm214196227360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>
                 </p></div></div></body></html>
index c1d4be749628921d3be8cc94cacf4da6f10062b0..2c8287b189563e63a6bbe99c2fa74be2897bd5d1 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-shutdownd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-shutdownd.service, systemd-shutdownd.socket, systemd-shutdownd — Scheduled shutdown service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-shutdownd.service</code></p><p><code class="filename">systemd-shutdownd.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></p></div><div class="refsect1"><a name="idm214188139152"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-shutdownd.service</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-shutdownd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-shutdownd.service, systemd-shutdownd.socket, systemd-shutdownd — Scheduled shutdown service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-shutdownd.service</code></p><p><code class="filename">systemd-shutdownd.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></p></div><div class="refsect1"><a name="idm214196230912"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-shutdownd.service</code> is a
                 system service that implements scheduled shutdowns, as
                 exposed by
                 <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>.
                 <code class="filename">systemd-shutdownd.service</code> is automatically activated on request and terminates
-                itself when it is unused.</p></div><div class="refsect1"><a name="idm214188135600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                itself when it is unused.</p></div><div class="refsect1"><a name="idm214196227360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>
                 </p></div></div></body></html>
index f8841031c4c2bb6f82293ba456af958b9e9ecc4d..3008c4c05a1a302be4983cc484e0a7ce4c1f4643 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SLEEP\&.CONF" "5" "" "systemd 215" "systemd-sleep.conf"
+.TH "SYSTEMD\-SLEEP\&.CONF" "5" "" "systemd 217" "systemd-sleep.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 23ffb33f4ac2cc23b36a9d14bd1a2d693b3f4d24..ffdd0c434698fe2c2c581ddce55602e3ee6a5b34 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-sleep.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sleep.conf — Suspend and hibernation configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/sleep.conf</code></p></div><div class="refsect1"><a name="idm214196026528"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd</strong></span> supports three general
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-sleep.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sleep.conf — Suspend and hibernation configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/sleep.conf</code></p></div><div class="refsect1"><a name="idm214171919648"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd</strong></span> supports three general
     power-saving modes:</p><div class="variablelist"><dl class="variablelist"><dt id="suspend"><span class="term">suspend</span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p>a low-power state
         where execution of the OS is paused,
         and complete power loss might result
@@ -48,7 +48,7 @@
     <a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a>
     when
     <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
-    attempts to suspend or hibernate the machine.</p></div><div class="refsect1"><a name="idm214196016080"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options can be configured in the
+    attempts to suspend or hibernate the machine.</p></div><div class="refsect1"><a name="idm214171909424"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options can be configured in the
     "<code class="literal">[Sleep]</code>" section of
     <code class="filename">/etc/systemd/sleep.conf</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="SuspendMode="><span class="term"><code class="varname">SuspendMode=</code>, </span><span class="term"><code class="varname">HibernateMode=</code>, </span><span class="term"><code class="varname">HybridSleepMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendMode=">¶</a></dt><dd><p>The string to be written to
         <code class="filename">/sys/power/disk</code> by,
         multiple values with whitespace. They will be tried
         in turn, until one is written without error. If
         neither succeeds, the operation will be aborted.
-        </p></dd></dl></div></div><div class="refsect1"><a name="idm214199900320"></a><h2 id="Example: freeze">Example: freeze<a class="headerlink" title="Permalink to this headline" href="#Example:%20freeze">¶</a></h2><p>Example: to exploit the <span class="quote">“<span class="quote">freeze</span>”</span> mode added
+        </p></dd></dl></div></div><div class="refsect1"><a name="idm214175795520"></a><h2 id="Example: freeze">Example: freeze<a class="headerlink" title="Permalink to this headline" href="#Example:%20freeze">¶</a></h2><p>Example: to exploit the <span class="quote">“<span class="quote">freeze</span>”</span> mode added
     in Linux 3.9, one can use <span class="command"><strong>systemctl suspend</strong></span>
     with
     </p><pre class="programlisting">[Sleep]
-SuspendState=freeze</pre></div><div class="refsect1"><a name="idm214199897376"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+SuspendState=freeze</pre></div><div class="refsect1"><a name="idm214175792576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a>,
       <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>,
       <a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a>,
index 854aa8358db1a2e9d7b3422eff57678fa1e24f0d..a0b41de574bde7246e986bf89c7055d8a1ad6afb 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sleep</code></p></div><div class="refsect1"><a name="idm214187249136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/system-sleep</code></p></div><div class="refsect1"><a name="idm214181934464"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
                 a system service that is pulled in by
                 <code class="filename">suspend.target</code> and is responsible
                 for the actual system suspend. Similarly,
                 where can be configured in the "<code class="literal">[Sleep]</code>"
                 section of <code class="filename">/etc/systemd/sleep.conf</code>.
                 See <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214191127792"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
+                </p></div><div class="refsect1"><a name="idm214185815200"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
                 following commands:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="suspend"><span class="term"><code class="option">suspend</code>, </span><span class="term"><code class="option">hibernate</code>, </span><span class="term"><code class="option">hybrid-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p>Suspend, hibernate, or
-                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191121168"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214185808528"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>,
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
index 632dbed58d602081aad322fc484238856e3d4a0d..47f1a3cd45834328231f2fb41b656b87bffca065 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SOCKET\-PROXYD" "8" "" "systemd 215" "systemd-socket-proxyd"
+.TH "SYSTEMD\-SOCKET\-PROXYD" "8" "" "systemd 217" "systemd-socket-proxyd"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index d07ff560b93dc71461b025803eb0df16188829e5..1ed92fc137217a1b6246010f7569c9e34dcb8f13 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-socket-proxyd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-socket-proxyd — Bidirectionally proxy local sockets to another (possibly remote) socket.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-socket-proxyd</code>  [<em class="replaceable"><code>OPTIONS</code></em>...]  <em class="replaceable"><code>HOST</code></em>:<em class="replaceable"><code>PORT</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">systemd-socket-proxyd</code>  [<em class="replaceable"><code>OPTIONS</code></em>...]  <em class="replaceable"><code>UNIX-DOMAIN-SOCKET-PATH</code></em>
-                         </p></div></div><div class="refsect1"><a name="idm214196073104"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-socket-proxyd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-socket-proxyd — Bidirectionally proxy local sockets to another (possibly remote) socket.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-socket-proxyd</code>  [<em class="replaceable"><code>OPTIONS</code></em>...]  <em class="replaceable"><code>HOST</code></em>:<em class="replaceable"><code>PORT</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">systemd-socket-proxyd</code>  [<em class="replaceable"><code>OPTIONS</code></em>...]  <em class="replaceable"><code>UNIX-DOMAIN-SOCKET-PATH</code></em>
+                         </p></div></div><div class="refsect1"><a name="idm214197668528"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
                 <span class="command"><strong>systemd-socket-proxyd</strong></span> is a generic
                 socket-activated network socket forwarder proxy daemon
                 for IPv4, IPv6 and UNIX stream sockets. It may be used
                 are support for socket activation with
                 "<code class="literal">Accept=false</code>" and an event-driven
                 design that scales better with the number of
-                connections.</p></div><div class="refsect1"><a name="idm214196067280"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214199963248"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214199962064"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="refsect2"><a name="idm214199961392"></a><h3 id="Simple Example">Simple Example<a class="headerlink" title="Permalink to this headline" href="#Simple%20Example">¶</a></h3><p>Use two services with a dependency
-                        and no namespace isolation.</p><div class="example"><a name="idm214199960336"></a><p class="title"><b>Example 1. proxy-to-nginx.socket</b></p><div class="example-contents"><pre class="programlisting">[Socket]
+                connections.</p></div><div class="refsect1"><a name="idm214197662800"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214201560752"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214201559568"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><div class="refsect2"><a name="idm214201558896"></a><h3 id="Simple Example">Simple Example<a class="headerlink" title="Permalink to this headline" href="#Simple%20Example">¶</a></h3><p>Use two services with a dependency
+                        and no namespace isolation.</p><div class="example"><a name="idm214201557744"></a><p class="title"><b>Example 1. proxy-to-nginx.socket</b></p><div class="example-contents"><pre class="programlisting">[Socket]
 ListenStream=80
 
 [Install]
-WantedBy=sockets.target</pre></div></div><br class="example-break"><div class="example"><a name="idm214199958768"></a><p class="title"><b>Example 2. proxy-to-nginx.service</b></p><div class="example-contents"><pre class="programlisting">[Unit]
+WantedBy=sockets.target</pre></div></div><br class="example-break"><div class="example"><a name="idm214201556176"></a><p class="title"><b>Example 2. proxy-to-nginx.service</b></p><div class="example-contents"><pre class="programlisting">[Unit]
 Requires=nginx.service
 After=nginx.service
 
 [Service]
 ExecStart=/usr/lib/systemd/systemd-socket-proxyd /tmp/nginx.sock
 PrivateTmp=yes
-PrivateNetwork=yes</pre></div></div><br class="example-break"><div class="example"><a name="idm214199957168"></a><p class="title"><b>Example 3. nginx.conf</b></p><div class="example-contents"><pre class="programlisting">
+PrivateNetwork=yes</pre></div></div><br class="example-break"><div class="example"><a name="idm214201554576"></a><p class="title"><b>Example 3. nginx.conf</b></p><div class="example-contents"><pre class="programlisting">
 [...]
 server {
     listen       unix:/tmp/nginx.sock;
     [...]
-</pre></div></div><br class="example-break"><div class="example"><a name="idm214199955424"></a><p class="title"><b>Example 4. Enabling the proxy</b></p><div class="example-contents"><pre class="programlisting"># systemctl enable proxy-to-nginx.socket
+</pre></div></div><br class="example-break"><div class="example"><a name="idm214201552832"></a><p class="title"><b>Example 4. Enabling the proxy</b></p><div class="example-contents"><pre class="programlisting"># systemctl enable proxy-to-nginx.socket
 # systemctl start proxy-to-nginx.socket
-$ curl http://localhost:80/</pre></div></div><br class="example-break"></div><div class="refsect2"><a name="idm214199953776"></a><h3 id="Namespace Example">Namespace Example<a class="headerlink" title="Permalink to this headline" href="#Namespace%20Example">¶</a></h3><p>Similar as above, but runs the socket
+$ curl http://localhost:80/</pre></div></div><br class="example-break"></div><div class="refsect2"><a name="idm214201551184"></a><h3 id="Namespace Example">Namespace Example<a class="headerlink" title="Permalink to this headline" href="#Namespace%20Example">¶</a></h3><p>Similar as above, but runs the socket
                         proxy and the main service in the same private
                         namespace, assuming that
                         <code class="filename">nginx.service</code> has
                         <code class="varname">PrivateTmp=</code> and
                         <code class="varname">PrivateNetwork=</code> set,
-                        too.</p><div class="example"><a name="idm214199950864"></a><p class="title"><b>Example 5. proxy-to-nginx.socket</b></p><div class="example-contents"><pre class="programlisting">[Socket]
+                        too.</p><div class="example"><a name="idm214201548320"></a><p class="title"><b>Example 5. proxy-to-nginx.socket</b></p><div class="example-contents"><pre class="programlisting">[Socket]
 ListenStream=80
 
 [Install]
-WantedBy=sockets.target</pre></div></div><br class="example-break"><div class="example"><a name="idm214199949296"></a><p class="title"><b>Example 6. proxy-to-nginx.service</b></p><div class="example-contents"><pre class="programlisting">[Unit]
+WantedBy=sockets.target</pre></div></div><br class="example-break"><div class="example"><a name="idm214201546752"></a><p class="title"><b>Example 6. proxy-to-nginx.service</b></p><div class="example-contents"><pre class="programlisting">[Unit]
 Requires=nginx.service
 After=nginx.service
 JoinsNamespaceOf=nginx.service
@@ -77,13 +77,13 @@ JoinsNamespaceOf=nginx.service
 [Service]
 ExecStart=/usr/lib/systemd/systemd-socket-proxyd 127.0.0.1:8080
 PrivateTmp=yes
-PrivateNetwork=yes</pre></div></div><br class="example-break"><div class="example"><a name="idm214199947664"></a><p class="title"><b>Example 7. nginx.conf</b></p><div class="example-contents"><pre class="programlisting">[...]
+PrivateNetwork=yes</pre></div></div><br class="example-break"><div class="example"><a name="idm214201545120"></a><p class="title"><b>Example 7. nginx.conf</b></p><div class="example-contents"><pre class="programlisting">[...]
 server {
     listen       8080;
     listen       unix:/tmp/nginx.sock;
-    [...]</pre></div></div><br class="example-break"><div class="example"><a name="idm214199938672"></a><p class="title"><b>Example 8. Enabling the proxy</b></p><div class="example-contents"><pre class="programlisting"># systemctl enable proxy-to-nginx.socket
+    [...]</pre></div></div><br class="example-break"><div class="example"><a name="idm214201536576"></a><p class="title"><b>Example 8. Enabling the proxy</b></p><div class="example-contents"><pre class="programlisting"># systemctl enable proxy-to-nginx.socket
 # systemctl start proxy-to-nginx.socket
-$ curl http://localhost:80/</pre></div></div><br class="example-break"></div></div><div class="refsect1"><a name="idm214199936864"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+$ curl http://localhost:80/</pre></div></div><br class="example-break"></div></div><div class="refsect1"><a name="idm214201534768"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
index 493cfef738f84f3001f1c5df139c63d340696408..a3c160939ee270de6d0289ea739f2b323afbe8b0 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SUSPEND\&.SERVICE" "8" "" "systemd 215" "systemd-suspend.service"
+.TH "SYSTEMD\-SUSPEND\&.SERVICE" "8" "" "systemd 217" "systemd-suspend.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -29,7 +29,7 @@ systemd\-hibernate\&.service
 .PP
 systemd\-hybrid\-sleep\&.service
 .PP
-/usr/lib/systemd/systemd\-sleep
+/usr/lib/systemd/system\-sleep
 .SH "DESCRIPTION"
 .PP
 systemd\-suspend\&.service
index 854aa8358db1a2e9d7b3422eff57678fa1e24f0d..a0b41de574bde7246e986bf89c7055d8a1ad6afb 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sleep</code></p></div><div class="refsect1"><a name="idm214187249136"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-suspend.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-sleep.service, systemd-sleep — System sleep state logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-suspend.service</code></p><p><code class="filename">systemd-hibernate.service</code></p><p><code class="filename">systemd-hybrid-sleep.service</code></p><p><code class="filename">/usr/lib/systemd/system-sleep</code></p></div><div class="refsect1"><a name="idm214181934464"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-suspend.service</code> is
                 a system service that is pulled in by
                 <code class="filename">suspend.target</code> and is responsible
                 for the actual system suspend. Similarly,
                 where can be configured in the "<code class="literal">[Sleep]</code>"
                 section of <code class="filename">/etc/systemd/sleep.conf</code>.
                 See <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>.
-                </p></div><div class="refsect1"><a name="idm214191127792"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
+                </p></div><div class="refsect1"><a name="idm214185815200"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p><span class="command"><strong>systemd-sleep</strong></span> understands the
                 following commands:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="suspend"><span class="term"><code class="option">suspend</code>, </span><span class="term"><code class="option">hibernate</code>, </span><span class="term"><code class="option">hybrid-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p>Suspend, hibernate, or
-                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191121168"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                put the system to hybrid sleep.</p></dd></dl></div></div><div class="refsect1"><a name="idm214185808528"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>,
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
index 690f961a21caff59870af0f24a9bea9d17eb6b02..9a3ae1b89eb193a9973acb66b3775475c1eef6ba 100644 (file)
@@ -56,7 +56,7 @@
                 <para><filename>systemd-suspend.service</filename></para>
                 <para><filename>systemd-hibernate.service</filename></para>
                 <para><filename>systemd-hybrid-sleep.service</filename></para>
-                <para><filename>/usr/lib/systemd/systemd-sleep</filename></para>
+                <para><filename>/usr/lib/systemd/system-sleep</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
index 78a481bec66c617920801beeebc83ae0bae9cafa..4113248e223c9c79bb45e66eeb8c32a61ddce85f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-sysctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysctl.service, systemd-sysctl — Configure kernel parameters at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-sysctl.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sysctl</code></p></div><div class="refsect1"><a name="idm214190241872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-sysctl.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-sysctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysctl.service, systemd-sysctl — Configure kernel parameters at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-sysctl.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sysctl</code></p></div><div class="refsect1"><a name="idm214186912336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-sysctl.service</code> is
                 an early-boot service that configures
                 <a href="sysctl.html"><span class="citerefentry"><span class="refentrytitle">sysctl</span>(8)</span></a>
                 kernel parameters.</p><p>See
                 <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214190237904"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                service.</p></div><div class="refsect1"><a name="idm214186908368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>,
                         <a href="sysctl.html"><span class="citerefentry"><span class="refentrytitle">sysctl</span>(8)</span></a>,
index 71760cef0b3671375996fe18fd308ee067b95d76..cdfb474c8360d111ea459645dcca1e8277beba53 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SYSCTL\&.SERVICE" "8" "" "systemd 215" "systemd-sysctl.service"
+.TH "SYSTEMD\-SYSCTL\&.SERVICE" "8" "" "systemd 217" "systemd-sysctl.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 78a481bec66c617920801beeebc83ae0bae9cafa..4113248e223c9c79bb45e66eeb8c32a61ddce85f 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-sysctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysctl.service, systemd-sysctl — Configure kernel parameters at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-sysctl.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sysctl</code></p></div><div class="refsect1"><a name="idm214190241872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-sysctl.service</code> is
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-sysctl.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysctl.service, systemd-sysctl — Configure kernel parameters at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-sysctl.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-sysctl</code></p></div><div class="refsect1"><a name="idm214186912336"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-sysctl.service</code> is
                 an early-boot service that configures
                 <a href="sysctl.html"><span class="citerefentry"><span class="refentrytitle">sysctl</span>(8)</span></a>
                 kernel parameters.</p><p>See
                 <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>
                 for information about the configuration of this
-                service.</p></div><div class="refsect1"><a name="idm214190237904"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                service.</p></div><div class="refsect1"><a name="idm214186908368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>,
                         <a href="sysctl.html"><span class="citerefentry"><span class="refentrytitle">sysctl</span>(8)</span></a>,
index c0d6f9d3cfa26bb1c7bc4b92a776dc0ff4adedce..1b40b6b4f6d5eb76e46e05a19af82e511ea29efd 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SYSTEM\-UPDATE\-GENERATOR" "8" "" "systemd 215" "systemd-system-update-generator"
+.TH "SYSTEMD\-SYSTEM\-UPDATE\-GENERATOR" "8" "" "systemd 217" "systemd-system-update-generator"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index ff92e770870074639ba49ea9763600ebab9d6ecf..589e9114d72141536679d676645d94e94032ed35 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-system-update-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-system-update-generator — Generator for redirecting boot to offline update mode</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-system-update-generator</code></p></div><div class="refsect1"><a name="idm214177526608"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-system-update-generator</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-system-update-generator"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-system-update-generator — Generator for redirecting boot to offline update mode</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/systemd/system-generators/systemd-system-update-generator</code></p></div><div class="refsect1"><a name="idm214169120848"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-system-update-generator</code>
                 is a generator that automatically redirects the boot
                 process to <code class="filename">system-update.target</code>
                 if <code class="filename">/system-update</code> exists. This is
@@ -28,7 +28,7 @@
                 Updates Specification</a>.
                 </p><p><code class="filename">systemd-system-update-generator</code>
                 implements the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Generators" target="_top">generator
-                specification</a>.</p></div><div class="refsect1"><a name="idm214177520992"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                specification</a>.</p></div><div class="refsect1"><a name="idm214169115232"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>
                 </p></div></div></body></html>
index 737c604d8f73dc8736de32edd486fca900c26204..f79bb117f49c1f369093648a13647b7f010fbaf6 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SYSTEM\&.CONF" "5" "" "systemd 215" "systemd-system.conf"
+.TH "SYSTEMD\-SYSTEM\&.CONF" "5" "" "systemd 217" "systemd-system.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 14058c0a68877061ca605786ed2af7710c7b2b7c..ae8d0dfd8fa1b37765574f6da024f37bf287b248 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-system.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-system.conf, systemd-user.conf — System and session service manager configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/system.conf</code></p><p><code class="filename">/etc/systemd/user.conf</code></p></div><div class="refsect1"><a name="idm214192121936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When run as system instance systemd reads the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-system.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-system.conf, systemd-user.conf — System and session service manager configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/system.conf</code></p><p><code class="filename">/etc/systemd/user.conf</code></p></div><div class="refsect1"><a name="idm214166493968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When run as system instance systemd reads the
                 configuration file <code class="filename">system.conf</code>,
                 otherwise <code class="filename">user.conf</code>. These
                 configuration files contain a few settings controlling
-                basic manager operations.</p></div><div class="refsect1"><a name="idm214192119184"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
+                basic manager operations.</p></div><div class="refsect1"><a name="idm214166491328"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
                 "<code class="literal">[Manager]</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="LogLevel="><span class="term"><code class="varname">LogLevel=</code>, </span><span class="term"><code class="varname">LogTarget=</code>, </span><span class="term"><code class="varname">LogColor=</code>, </span><span class="term"><code class="varname">LogLocation=</code>, </span><span class="term"><code class="varname">DumpCore=yes</code>, </span><span class="term"><code class="varname">CrashShell=no</code>, </span><span class="term"><code class="varname">ShowStatus=yes</code>, </span><span class="term"><code class="varname">CrashChVT=1</code>, </span><span class="term"><code class="varname">DefaultStandardOutput=journal</code>, </span><span class="term"><code class="varname">DefaultStandardError=inherit</code></span><a class="headerlink" title="Permalink to this term" href="#LogLevel=">¶</a></dt><dd><p>Configures various
                                 parameters of basic manager
                                 operation. These options may be
                                 capabilities to include in the
                                 capability bounding set for PID 1 and
                                 its children. See
-                                <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                                 for details. Takes a whitespace-separated
                                 list of capability names as read by
                                 <a href="cap_from_name.html"><span class="citerefentry"><span class="refentrytitle">cap_from_name</span>(3)</span></a>.
                                 timer slack controls the accuracy of
                                 wake-ups triggered by system
                                 timers. See
-                                <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
                                 for more information. Note that in
                                 contrast to most other time span
                                 definitions this parameter takes an
                                 executed processes. Takes a
                                 space-separated list of variable
                                 assignments. See
-                                <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
                                 for details about environment
                                 variables.</p><p>Example:
 
                                 settings.</p></dd><dt id="DefaultLimitCPU="><span class="term"><code class="varname">DefaultLimitCPU=</code>, </span><span class="term"><code class="varname">DefaultLimitFSIZE=</code>, </span><span class="term"><code class="varname">DefaultLimitDATA=</code>, </span><span class="term"><code class="varname">DefaultLimitSTACK=</code>, </span><span class="term"><code class="varname">DefaultLimitCORE=</code>, </span><span class="term"><code class="varname">DefaultLimitRSS=</code>, </span><span class="term"><code class="varname">DefaultLimitNOFILE=</code>, </span><span class="term"><code class="varname">DefaultLimitAS=</code>, </span><span class="term"><code class="varname">DefaultLimitNPROC=</code>, </span><span class="term"><code class="varname">DefaultLimitMEMLOCK=</code>, </span><span class="term"><code class="varname">DefaultLimitLOCKS=</code>, </span><span class="term"><code class="varname">DefaultLimitSIGPENDING=</code>, </span><span class="term"><code class="varname">DefaultLimitMSGQUEUE=</code>, </span><span class="term"><code class="varname">DefaultLimitNICE=</code>, </span><span class="term"><code class="varname">DefaultLimitRTPRIO=</code>, </span><span class="term"><code class="varname">DefaultLimitRTTIME=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitCPU=">¶</a></dt><dd><p>These settings control
                                 various default resource limits for
                                 units. See
-                                <a href="setrlimit.html"><span class="citerefentry"><span class="refentrytitle">setrlimit</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/setrlimit.2.html"><span class="citerefentry"><span class="refentrytitle">setrlimit</span>(2)</span></a>
                                 for details. Use the string
                                 <code class="varname">infinity</code> to
                                 configure no limit on a specific
                                 directives. Note that these resource
                                 limits are only defaults for units,
                                 they are not applied to PID 1
-                                itself.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191021312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                itself.</p></dd></dl></div></div><div class="refsect1"><a name="idm214165392720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
                           <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
-                          <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>,
-                          <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                          <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                   </p></div></div></body></html>
index e2b2bd8b6f75846c01e405d5bb5aff330efbe3d0..284516d93102c46dc98170e81b8fed6bd9ea0ed4 100644 (file)
                                 capabilities to include in the
                                 capability bounding set for PID 1 and
                                 its children. See
-                                <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                                 for details. Takes a whitespace-separated
                                 list of capability names as read by
                                 <citerefentry><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
                                 signal.</para></listitem>
                         </varlistentry>
 
-
                         <varlistentry>
                                 <term><varname>TimerSlackNSec=</varname></term>
 
                                 executed processes. Takes a
                                 space-separated list of variable
                                 assignments. See
-                                <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                                 for details about environment
                                 variables.</para>
 
                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                          <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                          <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index 31aa2d5e3d076e0dcf3919773e01fd99ac5212f7..e405084266f5d993d6bc412c34b575f714d2304b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-SYSUSERS" "8" "" "systemd 215" "systemd-sysusers"
+.TH "SYSTEMD\-SYSUSERS" "8" "" "systemd 217" "systemd-sysusers"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -34,7 +34,9 @@ creates system users and groups, based on the file format and location specified
 .PP
 If invoked with no arguments, it applies all directives from all files found\&. If one or more filenames are passed on the command line, only the directives in these files are applied\&. If only the basename of a file is specified, all directories as specified in
 \fBsysusers.d\fR(5)
-are searched for a matching file\&.
+are searched for a matching file\&. If the string
+\-
+is specified as filenames entries from the standard input of the process are read\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
index 754d8493f15fa8a36cace25c692b226bada2f073..56e8e4f1a1bbf7fd5b097a51046cd835a115611f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-sysusers"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysusers, systemd-sysusers.service — Allocate system users and groups</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-sysusers</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-sysusers.service</code></p></div><div class="refsect1"><a name="idm214168665600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-sysusers</strong></span> creates
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-sysusers"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysusers, systemd-sysusers.service — Allocate system users and groups</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-sysusers</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-sysusers.service</code></p></div><div class="refsect1"><a name="idm214193352752"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-sysusers</strong></span> creates
                 system users and groups, based on the file format and
                 location specified in
                 <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>.
                 basename of a file is specified, all directories as
                 specified in
                 <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>
-                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214168661280"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
+                are searched for a matching file. If the string
+                <code class="filename">-</code> is specified as filenames
+                entries from the standard input of the process are
+                read.</p></div><div class="refsect1"><a name="idm214193347648"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
                                 as an argument. All paths will be
                                 prefixed with the given alternate <em class="replaceable"><code>root</code></em>
                                 path, including config search paths.
                                 </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168655488"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214172553520"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214193341808"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214197240000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>
                 </p></div></div></body></html>
index 754d8493f15fa8a36cace25c692b226bada2f073..56e8e4f1a1bbf7fd5b097a51046cd835a115611f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-sysusers"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysusers, systemd-sysusers.service — Allocate system users and groups</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-sysusers</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-sysusers.service</code></p></div><div class="refsect1"><a name="idm214168665600"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-sysusers</strong></span> creates
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-sysusers"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-sysusers, systemd-sysusers.service — Allocate system users and groups</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-sysusers</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-sysusers.service</code></p></div><div class="refsect1"><a name="idm214193352752"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-sysusers</strong></span> creates
                 system users and groups, based on the file format and
                 location specified in
                 <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>.
                 basename of a file is specified, all directories as
                 specified in
                 <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>
-                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214168661280"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
+                are searched for a matching file. If the string
+                <code class="filename">-</code> is specified as filenames
+                entries from the standard input of the process are
+                read.</p></div><div class="refsect1"><a name="idm214193347648"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path
                                 as an argument. All paths will be
                                 prefixed with the given alternate <em class="replaceable"><code>root</code></em>
                                 path, including config search paths.
                                 </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168655488"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214172553520"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214193341808"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214197240000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>
                 </p></div></div></body></html>
index 4de1973dc6dfbb3ad3bf26e24a5b0964ac7f494c..68710603ad2810c2e20c0dad6d92ec957d94a018 100644 (file)
                 basename of a file is specified, all directories as
                 specified in
                 <citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-                are searched for a matching file.</para>
+                are searched for a matching file. If the string
+                <filename>-</filename> is specified as filenames
+                entries from the standard input of the process are
+                read.</para>
         </refsect1>
 
         <refsect1>
index 01a0c0706f3155c48c8b5cd391761c9c59403e5b..0f8161f86a5da8e46c28209594c86c1889f8e77a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-timedated.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timedated.service, systemd-timedated — Time and date bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timedated.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timedated</code></p></div><div class="refsect1"><a name="idm214182363888"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timedated</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-timedated.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timedated.service, systemd-timedated — Time and date bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timedated.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timedated</code></p></div><div class="refsect1"><a name="idm214191352160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timedated</code> is a
                 system service that may be used as a mechanism to change
                 the system clock and timezone, as well as to
                 enable/disable NTP time
@@ -30,9 +30,9 @@
                 is a command-line client to this service.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/timedated" target="_top">
                 developer documentation</a> for information about
                 the APIs <code class="filename">systemd-timedated</code>
-                provides.</p></div><div class="refsect1"><a name="idm214182358096"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214195181584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
                         <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
-                        <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/hwclock.8.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
                 </p></div></div></body></html>
index c4c70919e77df9fb4afb6c3aeb815243f6cb3942..f2610a9def005a683a88c4388796e0e594ab2720 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-TIMEDATED\&.SERVICE" "8" "" "systemd 215" "systemd-timedated.service"
+.TH "SYSTEMD\-TIMEDATED\&.SERVICE" "8" "" "systemd 217" "systemd-timedated.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 01a0c0706f3155c48c8b5cd391761c9c59403e5b..0f8161f86a5da8e46c28209594c86c1889f8e77a 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-timedated.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timedated.service, systemd-timedated — Time and date bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timedated.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timedated</code></p></div><div class="refsect1"><a name="idm214182363888"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timedated</code> is a
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-timedated.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timedated.service, systemd-timedated — Time and date bus mechanism</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timedated.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timedated</code></p></div><div class="refsect1"><a name="idm214191352160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timedated</code> is a
                 system service that may be used as a mechanism to change
                 the system clock and timezone, as well as to
                 enable/disable NTP time
@@ -30,9 +30,9 @@
                 is a command-line client to this service.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/timedated" target="_top">
                 developer documentation</a> for information about
                 the APIs <code class="filename">systemd-timedated</code>
-                provides.</p></div><div class="refsect1"><a name="idm214182358096"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                provides.</p></div><div class="refsect1"><a name="idm214195181584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
                         <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
-                        <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/hwclock.8.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
                 </p></div></div></body></html>
index 4f17bccc699e99e57dbb3311b88119c065c8f6bd..143d3403fb38e15b0b05508778829d7288e896b8 100644 (file)
@@ -81,7 +81,7 @@
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 2d634889a46e1c53e507e548738af0cab95c6819..79352d78f5e5b5ce098e0bd2ae97c960ca8a1326 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-timesyncd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timesyncd.service, systemd-timesyncd — Network Time Synchronization</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timesyncd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timesyncd</code></p></div><div class="refsect1"><a name="idm214193943296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timesyncd</code> is a
-                system service that may be used to synchronize the local
-                system clock with a Network Time Protocol Server.</p></div><div class="refsect1"><a name="idm214193941392"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-timesyncd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timesyncd.service, systemd-timesyncd — Network Time Synchronization</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timesyncd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timesyncd</code></p></div><div class="refsect1"><a name="idm214185183920"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timesyncd</code> is a
+                system service that may be used to synchronize the
+                local system clock with a remote Network Time Protocol
+                server. It also saves the local time to disk every
+                time the clock has been synchronized and uses this to
+                possibly advance the system realtime clock on
+                subsequent reboots to ensure it
+                monotonically advances even if the system lacks a
+                battery-buffered RTC chip.</p><p>The NTP servers contacted are determined from
+                the global settings in
+                <a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a>,
+                the per-link static settings in
+                <code class="filename">.network</code> files, and the per-link
+                dynamic settings received over DHCP. See
+                <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>
+                for more details.</p></div><div class="refsect1"><a name="idm214185178720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a>,
+                        <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
+                        <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>,
                         <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
                         <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
-                        <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/hwclock.8.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
                 </p></div></div></body></html>
index df33af2cf79d6d9ac78eabf1592e03cc3e792c46..266ead5e84c7ee921a6ec758cf55e94a286a039f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-TIMESYNCD\&.SERVICE" "8" "" "systemd 215" "systemd-timesyncd.service"
+.TH "SYSTEMD\-TIMESYNCD\&.SERVICE" "8" "" "systemd 217" "systemd-timesyncd.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -29,10 +29,20 @@ systemd\-timesyncd\&.service
 .SH "DESCRIPTION"
 .PP
 systemd\-timesyncd
-is a system service that may be used to synchronize the local system clock with a Network Time Protocol Server\&.
+is a system service that may be used to synchronize the local system clock with a remote Network Time Protocol server\&. It also saves the local time to disk every time the clock has been synchronized and uses this to possibly advance the system realtime clock on subsequent reboots to ensure it monotonically advances even if the system lacks a battery\-buffered RTC chip\&.
+.PP
+The NTP servers contacted are determined from the global settings in
+\fBtimesyncd.conf\fR(5), the per\-link static settings in
+\&.network
+files, and the per\-link dynamic settings received over DHCP\&. See
+\fBsystemd.network\fR(5)
+for more details\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
+\fBtimesyncd.conf\fR(5),
+\fBsystemd.network\fR(5),
+\fBsystemd-networkd.service\fR(8),
 \fBtimedatectl\fR(1),
 \fBlocaltime\fR(5),
 \fBhwclock\fR(8)
index 2d634889a46e1c53e507e548738af0cab95c6819..79352d78f5e5b5ce098e0bd2ae97c960ca8a1326 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-timesyncd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timesyncd.service, systemd-timesyncd — Network Time Synchronization</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timesyncd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timesyncd</code></p></div><div class="refsect1"><a name="idm214193943296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timesyncd</code> is a
-                system service that may be used to synchronize the local
-                system clock with a Network Time Protocol Server.</p></div><div class="refsect1"><a name="idm214193941392"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-timesyncd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-timesyncd.service, systemd-timesyncd — Network Time Synchronization</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-timesyncd.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-timesyncd</code></p></div><div class="refsect1"><a name="idm214185183920"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-timesyncd</code> is a
+                system service that may be used to synchronize the
+                local system clock with a remote Network Time Protocol
+                server. It also saves the local time to disk every
+                time the clock has been synchronized and uses this to
+                possibly advance the system realtime clock on
+                subsequent reboots to ensure it
+                monotonically advances even if the system lacks a
+                battery-buffered RTC chip.</p><p>The NTP servers contacted are determined from
+                the global settings in
+                <a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a>,
+                the per-link static settings in
+                <code class="filename">.network</code> files, and the per-link
+                dynamic settings received over DHCP. See
+                <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>
+                for more details.</p></div><div class="refsect1"><a name="idm214185178720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a>,
+                        <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>,
+                        <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>,
                         <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>,
                         <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
-                        <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/hwclock.8.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>
                 </p></div></div></body></html>
index 84c4899cacd4f04421f0a1c1baafec9a01ab15dd..47e243c2710236e8d35b1f6559570ccbbf0d0aea 100644 (file)
                 <title>Description</title>
 
                 <para><filename>systemd-timesyncd</filename> is a
-                system service that may be used to synchronize the local
-                system clock with a Network Time Protocol Server.</para>
+                system service that may be used to synchronize the
+                local system clock with a remote Network Time Protocol
+                server. It also saves the local time to disk every
+                time the clock has been synchronized and uses this to
+                possibly advance the system realtime clock on
+                subsequent reboots to ensure it
+                monotonically advances even if the system lacks a
+                battery-buffered RTC chip.</para>
+
+                <para>The NTP servers contacted are determined from
+                the global settings in
+                <citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                the per-link static settings in
+                <filename>.network</filename> files, and the per-link
+                dynamic settings received over DHCP. See
+                <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                for more details.</para>
         </refsect1>
 
         <refsect1>
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 545e33fbb9669806e2f786b1e40d568106fe4787..fb5b8befba800d755e363b442c706fd63271e209 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
-                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214182153968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
+                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214192976160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
                 deletes, and cleans up volatile and temporary files and
                 directories, based on the configuration file format and
                 location specified in
@@ -32,7 +32,7 @@
                 the basename of a configuration file is specified,
                 all configuration directories as specified in
                 <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
-                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214182149520"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
+                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214192971712"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
                                 passed, all files and directories
                                 marked with <code class="varname">f</code>,
                                 <code class="varname">F</code>,
@@ -77,8 +77,8 @@
                 example, during boot the following command line is
                 executed to ensure that all temporary and volatile
                 directories are removed and created according to the
-                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214186015536"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214186014352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214196837776"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214196836592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
                 </p></div></div></body></html>
index 545e33fbb9669806e2f786b1e40d568106fe4787..fb5b8befba800d755e363b442c706fd63271e209 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
-                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214182153968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
+                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214192976160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
                 deletes, and cleans up volatile and temporary files and
                 directories, based on the configuration file format and
                 location specified in
@@ -32,7 +32,7 @@
                 the basename of a configuration file is specified,
                 all configuration directories as specified in
                 <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
-                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214182149520"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
+                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214192971712"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
                                 passed, all files and directories
                                 marked with <code class="varname">f</code>,
                                 <code class="varname">F</code>,
@@ -77,8 +77,8 @@
                 example, during boot the following command line is
                 executed to ensure that all temporary and volatile
                 directories are removed and created according to the
-                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214186015536"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214186014352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214196837776"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214196836592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
                 </p></div></div></body></html>
index 545e33fbb9669806e2f786b1e40d568106fe4787..fb5b8befba800d755e363b442c706fd63271e209 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
-                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214182153968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
+                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214192976160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
                 deletes, and cleans up volatile and temporary files and
                 directories, based on the configuration file format and
                 location specified in
@@ -32,7 +32,7 @@
                 the basename of a configuration file is specified,
                 all configuration directories as specified in
                 <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
-                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214182149520"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
+                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214192971712"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
                                 passed, all files and directories
                                 marked with <code class="varname">f</code>,
                                 <code class="varname">F</code>,
@@ -77,8 +77,8 @@
                 example, during boot the following command line is
                 executed to ensure that all temporary and volatile
                 directories are removed and created according to the
-                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214186015536"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214186014352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214196837776"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214196836592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
                 </p></div></div></body></html>
index 545e33fbb9669806e2f786b1e40d568106fe4787..fb5b8befba800d755e363b442c706fd63271e209 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
-                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214182153968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
+                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214192976160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
                 deletes, and cleans up volatile and temporary files and
                 directories, based on the configuration file format and
                 location specified in
@@ -32,7 +32,7 @@
                 the basename of a configuration file is specified,
                 all configuration directories as specified in
                 <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
-                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214182149520"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
+                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214192971712"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
                                 passed, all files and directories
                                 marked with <code class="varname">f</code>,
                                 <code class="varname">F</code>,
@@ -77,8 +77,8 @@
                 example, during boot the following command line is
                 executed to ensure that all temporary and volatile
                 directories are removed and created according to the
-                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214186015536"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214186014352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214196837776"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214196836592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
                 </p></div></div></body></html>
index 0d49e68748cbe0b20fca0e15d817d6890ed1df89..dc791e9ce28c9b276b4fe903e72c5df622d50b0b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-TMPFILES" "8" "" "systemd 215" "systemd-tmpfiles"
+.TH "SYSTEMD\-TMPFILES" "8" "" "systemd 217" "systemd-tmpfiles"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 545e33fbb9669806e2f786b1e40d568106fe4787..fb5b8befba800d755e363b442c706fd63271e209 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
-                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214182153968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile
+                and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code>  [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm214192976160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates,
                 deletes, and cleans up volatile and temporary files and
                 directories, based on the configuration file format and
                 location specified in
@@ -32,7 +32,7 @@
                 the basename of a configuration file is specified,
                 all configuration directories as specified in
                 <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
-                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214182149520"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
+                are searched for a matching file.</p></div><div class="refsect1"><a name="idm214192971712"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is
                                 passed, all files and directories
                                 marked with <code class="varname">f</code>,
                                 <code class="varname">F</code>,
@@ -77,8 +77,8 @@
                 example, during boot the following command line is
                 executed to ensure that all temporary and volatile
                 directories are removed and created according to the
-                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214186015536"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214186014352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm214196837776"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214196836592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
                 </p></div></div></body></html>
index fcb8fcf5d92b46cbab95d3aa856092d75493dc88..567b3bef1c428cfba38f88aca6c0104f903baeb4 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-TTY\-ASK\-PASSWORD\-AGENT" "1" "" "systemd 215" "systemd-tty-ask-password-agent"
+.TH "SYSTEMD\-TTY\-ASK\-PASSWORD\-AGENT" "1" "" "systemd 217" "systemd-tty-ask-password-agent"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 5ea0056aaab61af331f442e924a3ccdf30295061..6f8e961e9e6810dd9eb55e04be5663df55839f74 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-tty-ask-password-agent"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tty-ask-password-agent — List or process pending systemd password requests</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tty-ask-password-agent [OPTIONS...]  [VARIABLE=VALUE...]</code> </p></div></div><div class="refsect1"><a name="idm214196749440"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tty-ask-password-agent</strong></span>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-tty-ask-password-agent"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tty-ask-password-agent — List or process pending systemd password requests</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tty-ask-password-agent [OPTIONS...]  [VARIABLE=VALUE...]</code> </p></div></div><div class="refsect1"><a name="idm214192547360"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tty-ask-password-agent</strong></span>
                 is a password agent that handles password
                 requests of the system, for example for hard disk
                 encryption passwords or SSL certificate passwords that
                 need to be queried at boot-time or during
                 runtime.</p><p><span class="command"><strong>systemd-tty-ask-password-agent</strong></span>
                 implements the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents" target="_top">Password
-                Agents Specification</a>.</p></div><div class="refsect1"><a name="idm214196745760"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--list"><span class="term"><code class="option">--list</code></span><a class="headerlink" title="Permalink to this term" href="#--list">¶</a></dt><dd><p>Lists all currently pending system password requests.</p></dd><dt id="--query"><span class="term"><code class="option">--query</code></span><a class="headerlink" title="Permalink to this term" href="#--query">¶</a></dt><dd><p>Process all currently
+                Agents Specification</a>.</p></div><div class="refsect1"><a name="idm214192543680"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--list"><span class="term"><code class="option">--list</code></span><a class="headerlink" title="Permalink to this term" href="#--list">¶</a></dt><dd><p>Lists all currently pending system password requests.</p></dd><dt id="--query"><span class="term"><code class="option">--query</code></span><a class="headerlink" title="Permalink to this term" href="#--query">¶</a></dt><dd><p>Process all currently
                                 pending system password requests by
                                 querying the user on the calling
                                 TTY.</p></dd><dt id="--watch"><span class="term"><code class="option">--watch</code></span><a class="headerlink" title="Permalink to this term" href="#--watch">¶</a></dt><dd><p>Continuously process
                                 password requests.</p></dd><dt id="--wall"><span class="term"><code class="option">--wall</code></span><a class="headerlink" title="Permalink to this term" href="#--wall">¶</a></dt><dd><p>Forward password
                                 requests to
-                                <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                                 instead of querying the user on the
                                 calling TTY.</p></dd><dt id="--plymouth"><span class="term"><code class="option">--plymouth</code></span><a class="headerlink" title="Permalink to this term" href="#--plymouth">¶</a></dt><dd><p>Ask question with
-                                <a href="plymouth.html"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>
+                                <a href="http://linux.die.net/man/8/plymouth"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>
                                 instead of querying the user on the
                                 calling TTY.</p></dd><dt id="--console"><span class="term"><code class="option">--console</code></span><a class="headerlink" title="Permalink to this term" href="#--console">¶</a></dt><dd><p>Ask question on
                                 <code class="filename">/dev/console</code>
                                 instead of querying the user on the
                                 calling TTY.  </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214200629952"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214200628768"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196427328"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214196426144"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>,
-                        <a href="plymouth.html"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/8/plymouth"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>
                 </p></div></div></body></html>
index e0df87d21701ac544aa9e577159a1a17a6f66c37..53bd3aa840e800bdc1e1dee947f911cf0f08ba39 100644 (file)
 
                                 <listitem><para>Forward password
                                 requests to
-                                <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                                 instead of querying the user on the
                                 calling TTY.</para></listitem>
                         </varlistentry>
                                 <term><option>--plymouth</option></term>
 
                                 <listitem><para>Ask question with
-                                <citerefentry><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                                <citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                                 instead of querying the user on the
                                 calling TTY.</para></listitem>
                         </varlistentry>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-ask-password-console.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index b733d8718c646d00dad0235a0d12aef525933464..9185473ad758fcb487881679965a1b495bce6b7b 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214168457344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
-      For every event, systemd-udevd executes matching instructions
-      specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the running daemon can be changed with
-    <span class="command"><strong>udevadm control</strong></span>.</p></div><div class="refsect1"><a name="idm214172352688"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--event-timeout=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214194974112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
+    For every event, systemd-udevd executes matching instructions
+    specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the daemon can be configured using
+    <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+    its command-line options, environment variables, and on the kernel
+    command-line, or changed dynamically with <span class="command"><strong>udevadm
+    control</strong></span>.
+    </p></div><div class="refsect1"><a name="idm214198868768"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
           instructions by the given number of seconds. This option
           might be useful when debugging system crashes during
           coldplug caused by loading non-working kernel
-          modules.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
+          modules.</p></dd><dt id="--event-timeout="><span class="term"><code class="option">--event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--event-timeout=">¶</a></dt><dd><p>Set the number of seconds to wait for events to finish. After
+          this time the event will be terminated. The default is 30 seconds.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
           When set to <code class="option">early</code> (the default), names will be
           resolved when the rules are parsed.  When set to
           <code class="option">late</code>, names will be resolved for every event.
           When set to <code class="option">never</code>, names will never be resolved
           and all devices will be owned by root.</p></dd><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172338224"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172327808"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198845024"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198841952"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
       <span class="command"><strong>systemd-udevd</strong></span> is used in an initrd.</p><dl class="variablelist"><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code>, </span><span class="term"><code class="varname">rd.udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p>Set the logging priority.</p></dd><dt id="udev.children-max="><span class="term"><code class="varname">udev.children-max=</code>, </span><span class="term"><code class="varname">rd.udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="udev.exec-delay="><span class="term"><code class="varname">udev.exec-delay=</code>, </span><span class="term"><code class="varname">rd.udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code> instructions by the given
           number of seconds. This option might be useful when
           debugging system crashes during coldplug caused by loading
-          non-working kernel modules.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
-          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172315600"></a><h2 id="Configuration file">Configuration file<a class="headerlink" title="Permalink to this headline" href="#Configuration%20file">¶</a></h2><p>udev expects its main configuration file at <code class="filename">/etc/udev/udev.conf</code>.
-   It consists of a set of variables allowing the user to override default udev values. All
-   empty lines or lines beginning with '#' are ignored. The following variables can be
-   set:</p><div class="variablelist"><dl class="variablelist"><dt id="udev_log"><span class="term"><code class="varname">udev_log</code></span><a class="headerlink" title="Permalink to this term" href="#udev_log">¶</a></dt><dd><p>The logging priority. Valid values are the numerical syslog priorities
-         or their textual representations: <code class="option">err</code>, <code class="option">info</code>
-         and <code class="option">debug</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172310000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></div></div></body></html>
+          non-working kernel modules.</p></dd><dt id="udev.event-timeout="><span class="term"><code class="varname">udev.event-timeout=</code>, </span><span class="term"><code class="varname">rd.udev.event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.event-timeout=">¶</a></dt><dd><p>Wait for events to finish up to the given number
+          of seconds. This option might be useful if events are
+          terminated due to kernel drivers taking too long to initialize.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
+          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198827344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+      <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
+      <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
+    </p></div></div></body></html>
index b733d8718c646d00dad0235a0d12aef525933464..9185473ad758fcb487881679965a1b495bce6b7b 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214168457344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
-      For every event, systemd-udevd executes matching instructions
-      specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the running daemon can be changed with
-    <span class="command"><strong>udevadm control</strong></span>.</p></div><div class="refsect1"><a name="idm214172352688"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--event-timeout=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214194974112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
+    For every event, systemd-udevd executes matching instructions
+    specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the daemon can be configured using
+    <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+    its command-line options, environment variables, and on the kernel
+    command-line, or changed dynamically with <span class="command"><strong>udevadm
+    control</strong></span>.
+    </p></div><div class="refsect1"><a name="idm214198868768"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
           instructions by the given number of seconds. This option
           might be useful when debugging system crashes during
           coldplug caused by loading non-working kernel
-          modules.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
+          modules.</p></dd><dt id="--event-timeout="><span class="term"><code class="option">--event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--event-timeout=">¶</a></dt><dd><p>Set the number of seconds to wait for events to finish. After
+          this time the event will be terminated. The default is 30 seconds.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
           When set to <code class="option">early</code> (the default), names will be
           resolved when the rules are parsed.  When set to
           <code class="option">late</code>, names will be resolved for every event.
           When set to <code class="option">never</code>, names will never be resolved
           and all devices will be owned by root.</p></dd><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172338224"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172327808"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198845024"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198841952"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
       <span class="command"><strong>systemd-udevd</strong></span> is used in an initrd.</p><dl class="variablelist"><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code>, </span><span class="term"><code class="varname">rd.udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p>Set the logging priority.</p></dd><dt id="udev.children-max="><span class="term"><code class="varname">udev.children-max=</code>, </span><span class="term"><code class="varname">rd.udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="udev.exec-delay="><span class="term"><code class="varname">udev.exec-delay=</code>, </span><span class="term"><code class="varname">rd.udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code> instructions by the given
           number of seconds. This option might be useful when
           debugging system crashes during coldplug caused by loading
-          non-working kernel modules.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
-          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172315600"></a><h2 id="Configuration file">Configuration file<a class="headerlink" title="Permalink to this headline" href="#Configuration%20file">¶</a></h2><p>udev expects its main configuration file at <code class="filename">/etc/udev/udev.conf</code>.
-   It consists of a set of variables allowing the user to override default udev values. All
-   empty lines or lines beginning with '#' are ignored. The following variables can be
-   set:</p><div class="variablelist"><dl class="variablelist"><dt id="udev_log"><span class="term"><code class="varname">udev_log</code></span><a class="headerlink" title="Permalink to this term" href="#udev_log">¶</a></dt><dd><p>The logging priority. Valid values are the numerical syslog priorities
-         or their textual representations: <code class="option">err</code>, <code class="option">info</code>
-         and <code class="option">debug</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172310000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></div></div></body></html>
+          non-working kernel modules.</p></dd><dt id="udev.event-timeout="><span class="term"><code class="varname">udev.event-timeout=</code>, </span><span class="term"><code class="varname">rd.udev.event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.event-timeout=">¶</a></dt><dd><p>Wait for events to finish up to the given number
+          of seconds. This option might be useful if events are
+          terminated due to kernel drivers taking too long to initialize.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
+          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198827344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+      <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
+      <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
+    </p></div></div></body></html>
index b733d8718c646d00dad0235a0d12aef525933464..9185473ad758fcb487881679965a1b495bce6b7b 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214168457344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
-      For every event, systemd-udevd executes matching instructions
-      specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the running daemon can be changed with
-    <span class="command"><strong>udevadm control</strong></span>.</p></div><div class="refsect1"><a name="idm214172352688"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--event-timeout=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214194974112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
+    For every event, systemd-udevd executes matching instructions
+    specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the daemon can be configured using
+    <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+    its command-line options, environment variables, and on the kernel
+    command-line, or changed dynamically with <span class="command"><strong>udevadm
+    control</strong></span>.
+    </p></div><div class="refsect1"><a name="idm214198868768"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
           instructions by the given number of seconds. This option
           might be useful when debugging system crashes during
           coldplug caused by loading non-working kernel
-          modules.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
+          modules.</p></dd><dt id="--event-timeout="><span class="term"><code class="option">--event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--event-timeout=">¶</a></dt><dd><p>Set the number of seconds to wait for events to finish. After
+          this time the event will be terminated. The default is 30 seconds.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
           When set to <code class="option">early</code> (the default), names will be
           resolved when the rules are parsed.  When set to
           <code class="option">late</code>, names will be resolved for every event.
           When set to <code class="option">never</code>, names will never be resolved
           and all devices will be owned by root.</p></dd><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172338224"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172327808"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198845024"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198841952"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
       <span class="command"><strong>systemd-udevd</strong></span> is used in an initrd.</p><dl class="variablelist"><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code>, </span><span class="term"><code class="varname">rd.udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p>Set the logging priority.</p></dd><dt id="udev.children-max="><span class="term"><code class="varname">udev.children-max=</code>, </span><span class="term"><code class="varname">rd.udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="udev.exec-delay="><span class="term"><code class="varname">udev.exec-delay=</code>, </span><span class="term"><code class="varname">rd.udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code> instructions by the given
           number of seconds. This option might be useful when
           debugging system crashes during coldplug caused by loading
-          non-working kernel modules.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
-          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172315600"></a><h2 id="Configuration file">Configuration file<a class="headerlink" title="Permalink to this headline" href="#Configuration%20file">¶</a></h2><p>udev expects its main configuration file at <code class="filename">/etc/udev/udev.conf</code>.
-   It consists of a set of variables allowing the user to override default udev values. All
-   empty lines or lines beginning with '#' are ignored. The following variables can be
-   set:</p><div class="variablelist"><dl class="variablelist"><dt id="udev_log"><span class="term"><code class="varname">udev_log</code></span><a class="headerlink" title="Permalink to this term" href="#udev_log">¶</a></dt><dd><p>The logging priority. Valid values are the numerical syslog priorities
-         or their textual representations: <code class="option">err</code>, <code class="option">info</code>
-         and <code class="option">debug</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172310000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></div></div></body></html>
+          non-working kernel modules.</p></dd><dt id="udev.event-timeout="><span class="term"><code class="varname">udev.event-timeout=</code>, </span><span class="term"><code class="varname">rd.udev.event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.event-timeout=">¶</a></dt><dd><p>Wait for events to finish up to the given number
+          of seconds. This option might be useful if events are
+          terminated due to kernel drivers taking too long to initialize.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
+          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198827344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+      <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
+      <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
+    </p></div></div></body></html>
index 5151de099395f4a3ed21c7a5bb9aba4138b8edce..438a4b240de84001d229b39eafdbb65098c46c3f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-UDEVD\&.SERVICE" "8" "" "systemd 215" "systemd-udevd.service"
+.TH "SYSTEMD\-UDEVD\&.SERVICE" "8" "" "systemd 217" "systemd-udevd.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -29,14 +29,15 @@ systemd\-udevd\-control\&.socket
 .PP
 systemd\-udevd\-kernel\&.socket
 .HP \w'\fB/usr/lib/systemd/systemd\-udevd\fR\ 'u
-\fB/usr/lib/systemd/systemd\-udevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\fR] [\fB\-\-children\-max=\fR] [\fB\-\-exec\-delay=\fR] [\fB\-\-resolve\-names=early|late|never\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
+\fB/usr/lib/systemd/systemd\-udevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\fR] [\fB\-\-children\-max=\fR] [\fB\-\-exec\-delay=\fR] [\fB\-\-event\-timeout=\fR] [\fB\-\-resolve\-names=early|late|never\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
 .SH "DESCRIPTION"
 .PP
 \fBsystemd\-udevd\fR
 listens to kernel uevents\&. For every event, systemd\-udevd executes matching instructions specified in udev rules\&. See
 \fBudev\fR(7)\&.
 .PP
-The behavior of the running daemon can be changed with
+The behavior of the daemon can be configured using
+\fBudev.conf\fR(5), its command\-line options, environment variables, and on the kernel command\-line, or changed dynamically with
 \fBudevadm control\fR\&.
 .SH "OPTIONS"
 .PP
@@ -62,6 +63,11 @@ Delay the execution of
 instructions by the given number of seconds\&. This option might be useful when debugging system crashes during coldplug caused by loading non\-working kernel modules\&.
 .RE
 .PP
+\fB\-\-event\-timeout=\fR
+.RS 4
+Set the number of seconds to wait for events to finish\&. After this time the event will be terminated\&. The default is 30 seconds\&.
+.RE
+.PP
 \fB\-\-resolve\-names=\fR
 .RS 4
 Specify when systemd\-udevd should resolve names of users and groups\&. When set to
@@ -109,24 +115,17 @@ Delay the execution of
 instructions by the given number of seconds\&. This option might be useful when debugging system crashes during coldplug caused by loading non\-working kernel modules\&.
 .RE
 .PP
-\fInet\&.ifnames=\fR
+\fIudev\&.event\-timeout=\fR, \fIrd\&.udev\&.event\-timeout=\fR
 .RS 4
-Network interfaces are renamed to give them predictable names when possible\&. It is enabled by default; specifying 0 disables it\&.
+Wait for events to finish up to the given number of seconds\&. This option might be useful if events are terminated due to kernel drivers taking too long to initialize\&.
 .RE
-.SH "CONFIGURATION FILE"
-.PP
-udev expects its main configuration file at
-/etc/udev/udev\&.conf\&. It consists of a set of variables allowing the user to override default udev values\&. All empty lines or lines beginning with \*(Aq#\*(Aq are ignored\&. The following variables can be set:
 .PP
-\fIudev_log\fR
+\fInet\&.ifnames=\fR
 .RS 4
-The logging priority\&. Valid values are the numerical syslog priorities or their textual representations:
-\fBerr\fR,
-\fBinfo\fR
-and
-\fBdebug\fR\&.
+Network interfaces are renamed to give them predictable names when possible\&. It is enabled by default; specifying 0 disables it\&.
 .RE
 .SH "SEE ALSO"
 .PP
+\fBudev.conf\fR(5),
 \fBudev\fR(7),
 \fBudevadm\fR(8)
index b733d8718c646d00dad0235a0d12aef525933464..9185473ad758fcb487881679965a1b495bce6b7b 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214168457344"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
-      For every event, systemd-udevd executes matching instructions
-      specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the running daemon can be changed with
-    <span class="command"><strong>udevadm control</strong></span>.</p></div><div class="refsect1"><a name="idm214172352688"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-udevd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd — Device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-udevd.service</code></p><p><code class="filename">systemd-udevd-control.socket</code></p><p><code class="filename">systemd-udevd-kernel.socket</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-udevd</code>  [<code class="option">--daemon</code>] [<code class="option">--debug</code>] [<code class="option">--children-max=</code>] [<code class="option">--exec-delay=</code>] [<code class="option">--event-timeout=</code>] [<code class="option">--resolve-names=early|late|never</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div></div><div class="refsect1"><a name="idm214194974112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-udevd</strong></span> listens to kernel uevents.
+    For every event, systemd-udevd executes matching instructions
+    specified in udev rules. See <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>.</p><p>The behavior of the daemon can be configured using
+    <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+    its command-line options, environment variables, and on the kernel
+    command-line, or changed dynamically with <span class="command"><strong>udevadm
+    control</strong></span>.
+    </p></div><div class="refsect1"><a name="idm214198868768"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p>Detach and run in the background.</p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code>
           instructions by the given number of seconds. This option
           might be useful when debugging system crashes during
           coldplug caused by loading non-working kernel
-          modules.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
+          modules.</p></dd><dt id="--event-timeout="><span class="term"><code class="option">--event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--event-timeout=">¶</a></dt><dd><p>Set the number of seconds to wait for events to finish. After
+          this time the event will be terminated. The default is 30 seconds.</p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p>Specify when systemd-udevd should resolve names of users and groups.
           When set to <code class="option">early</code> (the default), names will be
           resolved when the rules are parsed.  When set to
           <code class="option">late</code>, names will be resolved for every event.
           When set to <code class="option">never</code>, names will never be resolved
           and all devices will be owned by root.</p></dd><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172338224"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172327808"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198845024"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p>Set the logging priority.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198841952"></a><h2 id="Kernel command line">Kernel command line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20command%20line">¶</a></h2><div class="variablelist"><p>Parameters starting with "rd." will be read when
       <span class="command"><strong>systemd-udevd</strong></span> is used in an initrd.</p><dl class="variablelist"><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code>, </span><span class="term"><code class="varname">rd.udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p>Set the logging priority.</p></dd><dt id="udev.children-max="><span class="term"><code class="varname">udev.children-max=</code>, </span><span class="term"><code class="varname">rd.udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.children-max=">¶</a></dt><dd><p>Limit the number of events executed in parallel.</p></dd><dt id="udev.exec-delay="><span class="term"><code class="varname">udev.exec-delay=</code>, </span><span class="term"><code class="varname">rd.udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.exec-delay=">¶</a></dt><dd><p>Delay the execution of <code class="varname">RUN</code> instructions by the given
           number of seconds. This option might be useful when
           debugging system crashes during coldplug caused by loading
-          non-working kernel modules.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
-          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172315600"></a><h2 id="Configuration file">Configuration file<a class="headerlink" title="Permalink to this headline" href="#Configuration%20file">¶</a></h2><p>udev expects its main configuration file at <code class="filename">/etc/udev/udev.conf</code>.
-   It consists of a set of variables allowing the user to override default udev values. All
-   empty lines or lines beginning with '#' are ignored. The following variables can be
-   set:</p><div class="variablelist"><dl class="variablelist"><dt id="udev_log"><span class="term"><code class="varname">udev_log</code></span><a class="headerlink" title="Permalink to this term" href="#udev_log">¶</a></dt><dd><p>The logging priority. Valid values are the numerical syslog priorities
-         or their textual representations: <code class="option">err</code>, <code class="option">info</code>
-         and <code class="option">debug</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172310000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></div></div></body></html>
+          non-working kernel modules.</p></dd><dt id="udev.event-timeout="><span class="term"><code class="varname">udev.event-timeout=</code>, </span><span class="term"><code class="varname">rd.udev.event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.event-timeout=">¶</a></dt><dd><p>Wait for events to finish up to the given number
+          of seconds. This option might be useful if events are
+          terminated due to kernel drivers taking too long to initialize.</p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p>Network interfaces are renamed to give them predictable names
+          when possible. It is enabled by default; specifying 0 disables it.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198827344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a>,
+      <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
+      <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
+    </p></div></div></body></html>
index f44b7a0482098428f2c1fe7f27c7c8e1fa758548..ab5c1636b255a6bec6c68f8de1641ca3b14b6cda 100644 (file)
@@ -22,7 +22,6 @@
   <refmeta>
     <refentrytitle>systemd-udevd.service</refentrytitle>
     <manvolnum>8</manvolnum>
-    <refmiscinfo class="version"></refmiscinfo>
   </refmeta>
 
   <refnamediv>
@@ -44,6 +43,7 @@
       <arg><option>--debug</option></arg>
       <arg><option>--children-max=</option></arg>
       <arg><option>--exec-delay=</option></arg>
+      <arg><option>--event-timeout=</option></arg>
       <arg><option>--resolve-names=early|late|never</option></arg>
       <arg><option>--version</option></arg>
       <arg><option>--help</option></arg>
 
   <refsect1><title>Description</title>
     <para><command>systemd-udevd</command> listens to kernel uevents.
-      For every event, systemd-udevd executes matching instructions
-      specified in udev rules. See <citerefentry>
-      <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
-      </citerefentry>.</para>
-    <para>The behavior of the running daemon can be changed with
-    <command>udevadm control</command>.</para>
+    For every event, systemd-udevd executes matching instructions
+    specified in udev rules. See <citerefentry>
+    <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
+    </citerefentry>.</para>
+
+    <para>The behavior of the daemon can be configured using
+    <citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+    its command-line options, environment variables, and on the kernel
+    command-line, or changed dynamically with <command>udevadm
+    control</command>.
+    </para>
   </refsect1>
 
   <refsect1><title>Options</title>
         </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>--event-timeout=</option></term>
+        <listitem>
+          <para>Set the number of seconds to wait for events to finish. After
+          this time the event will be terminated. The default is 30 seconds.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>--resolve-names=</option></term>
         <listitem>
           non-working kernel modules.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><varname>udev.event-timeout=</varname></term>
+        <term><varname>rd.udev.event-timeout=</varname></term>
+        <listitem>
+          <para>Wait for events to finish up to the given number
+          of seconds. This option might be useful if events are
+          terminated due to kernel drivers taking too long to initialize.</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><varname>net.ifnames=</varname></term>
         <listitem>
          in kernel-command-line.xml -->
  </refsect1>
 
- <refsect1><title>Configuration file</title>
-   <para>udev expects its main configuration file at <filename>/etc/udev/udev.conf</filename>.
-   It consists of a set of variables allowing the user to override default udev values. All
-   empty lines or lines beginning with '#' are ignored. The following variables can be
-   set:</para>
-   <variablelist>
-     <varlistentry>
-       <term><varname>udev_log</varname></term>
-       <listitem>
-         <para>The logging priority. Valid values are the numerical syslog priorities
-         or their textual representations: <option>err</option>, <option>info</option>
-         and <option>debug</option>.</para>
-       </listitem>
-     </varlistentry>
-   </variablelist>
- </refsect1>
-
   <refsect1>
     <title>See Also</title>
-    <para><citerefentry>
-        <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
-      </citerefentry>, <citerefentry>
-        <refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum>
-    </citerefentry></para>
+    <para>
+      <citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    </para>
   </refsect1>
 </refentry>
index f121f6f12561553b04c6125955b5db2e91fd5867..a4da923db0ba82d461d4fa2a3e5a7dcb3301b816 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-update-done.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-done.service, systemd-update-done — Mark <code class="filename">/etc</code> and <code class="filename">/var</code> fully updated</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-done.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-done</code></p></div><div class="refsect1"><a name="idm214182720160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-done.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-update-done.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-done.service, systemd-update-done — Mark <code class="filename">/etc</code> and <code class="filename">/var</code> fully updated</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-done.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-done</code></p></div><div class="refsect1"><a name="idm214198944848"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-done.service</code>
                 is a service that is invoked as part of the first boot
                 after the vendor operating system resources in
                 <code class="filename">/usr</code> have been updated. This is
@@ -45,9 +45,9 @@
                 <code class="filename">/usr</code> are always followed by an
                 update of the modification time of
                 <code class="filename">/usr</code>, for example by invoking
-                <a href="touch.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
-                on it.</p></div><div class="refsect1"><a name="idm214186603664"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man1/touch.1.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
+                on it.</p></div><div class="refsect1"><a name="idm214202828160"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
-                        <a href="touch.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/touch.1.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
                 </p></div></div></body></html>
index 1cee9686cb0f6386a136d13ff4952892a64027bb..9d6bef75054870a309f3517df12744a66d506ec9 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-UPDATE\-DONE\&.SERVICE" "8" "" "systemd 215" "systemd-update-done.service"
+.TH "SYSTEMD\-UPDATE\-DONE\&.SERVICE" "8" "" "systemd 217" "systemd-update-done.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index f121f6f12561553b04c6125955b5db2e91fd5867..a4da923db0ba82d461d4fa2a3e5a7dcb3301b816 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-update-done.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-done.service, systemd-update-done — Mark <code class="filename">/etc</code> and <code class="filename">/var</code> fully updated</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-done.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-done</code></p></div><div class="refsect1"><a name="idm214182720160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-done.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-update-done.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-done.service, systemd-update-done — Mark <code class="filename">/etc</code> and <code class="filename">/var</code> fully updated</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-done.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-done</code></p></div><div class="refsect1"><a name="idm214198944848"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-done.service</code>
                 is a service that is invoked as part of the first boot
                 after the vendor operating system resources in
                 <code class="filename">/usr</code> have been updated. This is
@@ -45,9 +45,9 @@
                 <code class="filename">/usr</code> are always followed by an
                 update of the modification time of
                 <code class="filename">/usr</code>, for example by invoking
-                <a href="touch.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
-                on it.</p></div><div class="refsect1"><a name="idm214186603664"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                <a href="http://man7.org/linux/man-pages/man1/touch.1.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
+                on it.</p></div><div class="refsect1"><a name="idm214202828160"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
-                        <a href="touch.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/touch.1.html"><span class="citerefentry"><span class="refentrytitle">touch</span>(1)</span></a>
                 </p></div></div></body></html>
index a791beae62c6714cc71872b77c7b00e7bc01361c..c3b402b601a87451acd6c26a7df08673553901e9 100644 (file)
@@ -84,7 +84,7 @@
                 <filename>/usr</filename> are always followed by an
                 update of the modification time of
                 <filename>/usr</filename>, for example by invoking
-                <citerefentry><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 on it.</para>
 
         </refsect1>
@@ -94,7 +94,7 @@
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>touch</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index cd42c35b4c58f527a318fadd8838037dc0ade731..098622dcb3d136a4ecf03e123e4d84fb81d86043 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-update-utmp.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-utmp.service, systemd-update-utmp-runlevel.service, systemd-update-utmp — Write audit and utmp updates at bootup, runlevel
-                changes and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-utmp.service</code></p><p><code class="filename">systemd-update-utmp-runlevel.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></p></div><div class="refsect1"><a name="idm214191805296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-utmp-runlevel.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-update-utmp.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-utmp.service, systemd-update-utmp-runlevel.service, systemd-update-utmp — Write audit and utmp updates at bootup, runlevel
+                changes and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-utmp.service</code></p><p><code class="filename">systemd-update-utmp-runlevel.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></p></div><div class="refsect1"><a name="idm214182467296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-utmp-runlevel.service</code>
                 is a service that writes SysV runlevel changes to utmp
                 and wtmp, as well as the audit logs, as they
                 occur. <code class="filename">systemd-update-utmp.service</code>
-                does the same for system reboots and shutdown requests.</p></div><div class="refsect1"><a name="idm214191802656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                does the same for system reboots and shutdown requests.</p></div><div class="refsect1"><a name="idm214182464656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="utmp.html"><span class="citerefentry"><span class="refentrytitle">utmp</span>(5)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man5/utmp.5.html"><span class="citerefentry"><span class="refentrytitle">utmp</span>(5)</span></a>,
                         <a href="auditd.html"><span class="citerefentry"><span class="refentrytitle">auditd</span>(8)</span></a>
                 </p></div></div></body></html>
index cd42c35b4c58f527a318fadd8838037dc0ade731..098622dcb3d136a4ecf03e123e4d84fb81d86043 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-update-utmp.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-utmp.service, systemd-update-utmp-runlevel.service, systemd-update-utmp — Write audit and utmp updates at bootup, runlevel
-                changes and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-utmp.service</code></p><p><code class="filename">systemd-update-utmp-runlevel.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></p></div><div class="refsect1"><a name="idm214191805296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-utmp-runlevel.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-update-utmp.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-utmp.service, systemd-update-utmp-runlevel.service, systemd-update-utmp — Write audit and utmp updates at bootup, runlevel
+                changes and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-utmp.service</code></p><p><code class="filename">systemd-update-utmp-runlevel.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></p></div><div class="refsect1"><a name="idm214182467296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-utmp-runlevel.service</code>
                 is a service that writes SysV runlevel changes to utmp
                 and wtmp, as well as the audit logs, as they
                 occur. <code class="filename">systemd-update-utmp.service</code>
-                does the same for system reboots and shutdown requests.</p></div><div class="refsect1"><a name="idm214191802656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                does the same for system reboots and shutdown requests.</p></div><div class="refsect1"><a name="idm214182464656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="utmp.html"><span class="citerefentry"><span class="refentrytitle">utmp</span>(5)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man5/utmp.5.html"><span class="citerefentry"><span class="refentrytitle">utmp</span>(5)</span></a>,
                         <a href="auditd.html"><span class="citerefentry"><span class="refentrytitle">auditd</span>(8)</span></a>
                 </p></div></div></body></html>
index 14b1b72d5216f301900779fa8fe83119e4b77af1..bf34c56edee74a0b605f3f839ab31fe4e26cbf5b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-UPDATE\-UTMP\&.SERVICE" "8" "" "systemd 215" "systemd-update-utmp.service"
+.TH "SYSTEMD\-UPDATE\-UTMP\&.SERVICE" "8" "" "systemd 217" "systemd-update-utmp.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index cd42c35b4c58f527a318fadd8838037dc0ade731..098622dcb3d136a4ecf03e123e4d84fb81d86043 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-update-utmp.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-utmp.service, systemd-update-utmp-runlevel.service, systemd-update-utmp — Write audit and utmp updates at bootup, runlevel
-                changes and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-utmp.service</code></p><p><code class="filename">systemd-update-utmp-runlevel.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></p></div><div class="refsect1"><a name="idm214191805296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-utmp-runlevel.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-update-utmp.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-update-utmp.service, systemd-update-utmp-runlevel.service, systemd-update-utmp — Write audit and utmp updates at bootup, runlevel
+                changes and shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-update-utmp.service</code></p><p><code class="filename">systemd-update-utmp-runlevel.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></p></div><div class="refsect1"><a name="idm214182467296"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-update-utmp-runlevel.service</code>
                 is a service that writes SysV runlevel changes to utmp
                 and wtmp, as well as the audit logs, as they
                 occur. <code class="filename">systemd-update-utmp.service</code>
-                does the same for system reboots and shutdown requests.</p></div><div class="refsect1"><a name="idm214191802656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                does the same for system reboots and shutdown requests.</p></div><div class="refsect1"><a name="idm214182464656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="utmp.html"><span class="citerefentry"><span class="refentrytitle">utmp</span>(5)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man5/utmp.5.html"><span class="citerefentry"><span class="refentrytitle">utmp</span>(5)</span></a>,
                         <a href="auditd.html"><span class="citerefentry"><span class="refentrytitle">auditd</span>(8)</span></a>
                 </p></div></div></body></html>
index 0b316b1acc2b7c0a15333dfd82f808f0ff001e91..caa1d8f568f62cdb460208faacb0e99ce6b90448 100644 (file)
@@ -19,7 +19,7 @@
   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="systemd-update-utmp.service">
+<refentry id="systemd-update-utmp.service" conditional="HAVE_UTMP">
 
         <refentryinfo>
                 <title>systemd-update-utmp.service</title>
@@ -68,7 +68,7 @@
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>utmp</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>utmp</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>auditd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
index 49196d383635695f9f318fa4aaebc0fa4ce923e5..67d19538192aa2c0c2164605d00dc845ee7de4f0 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-user-sessions.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-user-sessions.service, systemd-user-sessions — Permit user logins after boot, prohibit user logins at shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-user-sessions.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-user-sessions</code></p></div><div class="refsect1"><a name="idm214173200672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-user-sessions.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-user-sessions.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-user-sessions.service, systemd-user-sessions — Permit user logins after boot, prohibit user logins at shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-user-sessions.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-user-sessions</code></p></div><div class="refsect1"><a name="idm214171551440"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-user-sessions.service</code>
                 is a service that controls user logins. After basic
                 system initialization is complete it removes
                 <code class="filename">/run/nologin</code>, thus permitting
@@ -27,8 +27,8 @@
                 <code class="filename">/run/nologin</code>, thus prohibiting
                 further logins. At the same time it also kills all
                 user processes, so that system shutdown may proceed
-                without any remaining user processes around.</p></div><div class="refsect1"><a name="idm214173197040"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                without any remaining user processes around.</p></div><div class="refsect1"><a name="idm214171575488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
-                        <a href="pam_nologin.html"><span class="citerefentry"><span class="refentrytitle">pam_nologin</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/pam_nologin.8.html"><span class="citerefentry"><span class="refentrytitle">pam_nologin</span>(8)</span></a>
                 </p></div></div></body></html>
index 52d68ac1e9fc61291ab52b60c87b45c04f4320b7..4c166b8ad0dced988bae480cbbd49ef58f1e0cfd 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-USER\-SESSIONS\&.SERVICE" "8" "" "systemd 215" "systemd-user-sessions.service"
+.TH "SYSTEMD\-USER\-SESSIONS\&.SERVICE" "8" "" "systemd 217" "systemd-user-sessions.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 49196d383635695f9f318fa4aaebc0fa4ce923e5..67d19538192aa2c0c2164605d00dc845ee7de4f0 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-user-sessions.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-user-sessions.service, systemd-user-sessions — Permit user logins after boot, prohibit user logins at shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-user-sessions.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-user-sessions</code></p></div><div class="refsect1"><a name="idm214173200672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-user-sessions.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-user-sessions.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-user-sessions.service, systemd-user-sessions — Permit user logins after boot, prohibit user logins at shutdown</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-user-sessions.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-user-sessions</code></p></div><div class="refsect1"><a name="idm214171551440"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-user-sessions.service</code>
                 is a service that controls user logins. After basic
                 system initialization is complete it removes
                 <code class="filename">/run/nologin</code>, thus permitting
@@ -27,8 +27,8 @@
                 <code class="filename">/run/nologin</code>, thus prohibiting
                 further logins. At the same time it also kills all
                 user processes, so that system shutdown may proceed
-                without any remaining user processes around.</p></div><div class="refsect1"><a name="idm214173197040"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                without any remaining user processes around.</p></div><div class="refsect1"><a name="idm214171575488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
-                        <a href="pam_nologin.html"><span class="citerefentry"><span class="refentrytitle">pam_nologin</span>(8)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man8/pam_nologin.8.html"><span class="citerefentry"><span class="refentrytitle">pam_nologin</span>(8)</span></a>
                 </p></div></div></body></html>
index fc93e2dc2f1167eb20c0215ee2755162337ec355..767cbc714a47fb0f9a27fe7ff8d360d4e79dff44 100644 (file)
@@ -70,7 +70,7 @@
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pam_nologin</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>pam_nologin</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 14058c0a68877061ca605786ed2af7710c7b2b7c..ae8d0dfd8fa1b37765574f6da024f37bf287b248 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-system.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-system.conf, systemd-user.conf — System and session service manager configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/system.conf</code></p><p><code class="filename">/etc/systemd/user.conf</code></p></div><div class="refsect1"><a name="idm214192121936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When run as system instance systemd reads the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-system.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-system.conf, systemd-user.conf — System and session service manager configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/system.conf</code></p><p><code class="filename">/etc/systemd/user.conf</code></p></div><div class="refsect1"><a name="idm214166493968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When run as system instance systemd reads the
                 configuration file <code class="filename">system.conf</code>,
                 otherwise <code class="filename">user.conf</code>. These
                 configuration files contain a few settings controlling
-                basic manager operations.</p></div><div class="refsect1"><a name="idm214192119184"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
+                basic manager operations.</p></div><div class="refsect1"><a name="idm214166491328"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>All options are configured in the
                 "<code class="literal">[Manager]</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="LogLevel="><span class="term"><code class="varname">LogLevel=</code>, </span><span class="term"><code class="varname">LogTarget=</code>, </span><span class="term"><code class="varname">LogColor=</code>, </span><span class="term"><code class="varname">LogLocation=</code>, </span><span class="term"><code class="varname">DumpCore=yes</code>, </span><span class="term"><code class="varname">CrashShell=no</code>, </span><span class="term"><code class="varname">ShowStatus=yes</code>, </span><span class="term"><code class="varname">CrashChVT=1</code>, </span><span class="term"><code class="varname">DefaultStandardOutput=journal</code>, </span><span class="term"><code class="varname">DefaultStandardError=inherit</code></span><a class="headerlink" title="Permalink to this term" href="#LogLevel=">¶</a></dt><dd><p>Configures various
                                 parameters of basic manager
                                 operation. These options may be
                                 capabilities to include in the
                                 capability bounding set for PID 1 and
                                 its children. See
-                                <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                                 for details. Takes a whitespace-separated
                                 list of capability names as read by
                                 <a href="cap_from_name.html"><span class="citerefentry"><span class="refentrytitle">cap_from_name</span>(3)</span></a>.
                                 timer slack controls the accuracy of
                                 wake-ups triggered by system
                                 timers. See
-                                <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
                                 for more information. Note that in
                                 contrast to most other time span
                                 definitions this parameter takes an
                                 executed processes. Takes a
                                 space-separated list of variable
                                 assignments. See
-                                <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
                                 for details about environment
                                 variables.</p><p>Example:
 
                                 settings.</p></dd><dt id="DefaultLimitCPU="><span class="term"><code class="varname">DefaultLimitCPU=</code>, </span><span class="term"><code class="varname">DefaultLimitFSIZE=</code>, </span><span class="term"><code class="varname">DefaultLimitDATA=</code>, </span><span class="term"><code class="varname">DefaultLimitSTACK=</code>, </span><span class="term"><code class="varname">DefaultLimitCORE=</code>, </span><span class="term"><code class="varname">DefaultLimitRSS=</code>, </span><span class="term"><code class="varname">DefaultLimitNOFILE=</code>, </span><span class="term"><code class="varname">DefaultLimitAS=</code>, </span><span class="term"><code class="varname">DefaultLimitNPROC=</code>, </span><span class="term"><code class="varname">DefaultLimitMEMLOCK=</code>, </span><span class="term"><code class="varname">DefaultLimitLOCKS=</code>, </span><span class="term"><code class="varname">DefaultLimitSIGPENDING=</code>, </span><span class="term"><code class="varname">DefaultLimitMSGQUEUE=</code>, </span><span class="term"><code class="varname">DefaultLimitNICE=</code>, </span><span class="term"><code class="varname">DefaultLimitRTPRIO=</code>, </span><span class="term"><code class="varname">DefaultLimitRTTIME=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitCPU=">¶</a></dt><dd><p>These settings control
                                 various default resource limits for
                                 units. See
-                                <a href="setrlimit.html"><span class="citerefentry"><span class="refentrytitle">setrlimit</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/setrlimit.2.html"><span class="citerefentry"><span class="refentrytitle">setrlimit</span>(2)</span></a>
                                 for details. Use the string
                                 <code class="varname">infinity</code> to
                                 configure no limit on a specific
                                 directives. Note that these resource
                                 limits are only defaults for units,
                                 they are not applied to PID 1
-                                itself.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191021312"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                itself.</p></dd></dl></div></div><div class="refsect1"><a name="idm214165392720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
                           <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
-                          <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>,
-                          <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                          <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                   </p></div></div></body></html>
index 815cb91ef6d9c2c0b97c2a078bd971f1dff896dc..32bc697d6ca1a0b0741f2abd40a4ecfae34a7111 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-vconsole-setup.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-vconsole-setup.service, systemd-vconsole-setup — Configure the virtual console at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-vconsole-setup.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-vconsole-setup</code></p></div><div class="refsect1"><a name="idm214182314736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-vconsole-setup.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-vconsole-setup.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-vconsole-setup.service, systemd-vconsole-setup — Configure the virtual console at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-vconsole-setup.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-vconsole-setup</code></p></div><div class="refsect1"><a name="idm214175898400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-vconsole-setup.service</code>
                 is an early-boot service that configures the virtual
                 console font and console keymap. Internally it calls
                 <a href="loadkeys.html"><span class="citerefentry"><span class="refentrytitle">loadkeys</span>(1)</span></a>
@@ -27,7 +27,7 @@
                 <a href="setfont.html"><span class="citerefentry"><span class="refentrytitle">setfont</span>(8)</span></a>.</p><p>See
                 <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>
                 for information about the configuration files understood by this
-                service.</p></div><div class="refsect1"><a name="idm214182309712"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
+                service.</p></div><div class="refsect1"><a name="idm214175893376"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
                 <code class="filename">vconsole.conf</code> may be overridden on
                 the kernel command line:</p><div class="variablelist"><dl class="variablelist"><dt id="vconsole.keymap="><span class="term"><code class="varname">vconsole.keymap=</code>, </span><span class="term"><code class="varname">vconsole.keymap.toggle=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.keymap=">¶</a></dt><dd><p>Overrides the key
                                 mapping table for the keyboard and the
@@ -35,7 +35,7 @@
                                 font, the console map, and the unicode
                                 font map.</p></dd></dl></div><p>See
                 <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>
-                for information about these settings.</p></div><div class="refsect1"><a name="idm214182301088"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                for information about these settings.</p></div><div class="refsect1"><a name="idm214175884752"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>,
                         <a href="loadkeys.html"><span class="citerefentry"><span class="refentrytitle">loadkeys</span>(1)</span></a>,
index ed5e954f478dd6e0e0331ecb89505cee7b15a02e..3b7519bbbef427e2cfb37212e0b0c2a9c091a608 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\-VCONSOLE\-SETUP\&.SERVICE" "8" "" "systemd 215" "systemd-vconsole-setup.service"
+.TH "SYSTEMD\-VCONSOLE\-SETUP\&.SERVICE" "8" "" "systemd 217" "systemd-vconsole-setup.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 815cb91ef6d9c2c0b97c2a078bd971f1dff896dc..32bc697d6ca1a0b0741f2abd40a4ecfae34a7111 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-vconsole-setup.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-vconsole-setup.service, systemd-vconsole-setup — Configure the virtual console at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-vconsole-setup.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-vconsole-setup</code></p></div><div class="refsect1"><a name="idm214182314736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-vconsole-setup.service</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd-vconsole-setup.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-vconsole-setup.service, systemd-vconsole-setup — Configure the virtual console at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-vconsole-setup.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-vconsole-setup</code></p></div><div class="refsect1"><a name="idm214175898400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-vconsole-setup.service</code>
                 is an early-boot service that configures the virtual
                 console font and console keymap. Internally it calls
                 <a href="loadkeys.html"><span class="citerefentry"><span class="refentrytitle">loadkeys</span>(1)</span></a>
@@ -27,7 +27,7 @@
                 <a href="setfont.html"><span class="citerefentry"><span class="refentrytitle">setfont</span>(8)</span></a>.</p><p>See
                 <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>
                 for information about the configuration files understood by this
-                service.</p></div><div class="refsect1"><a name="idm214182309712"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
+                service.</p></div><div class="refsect1"><a name="idm214175893376"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
                 <code class="filename">vconsole.conf</code> may be overridden on
                 the kernel command line:</p><div class="variablelist"><dl class="variablelist"><dt id="vconsole.keymap="><span class="term"><code class="varname">vconsole.keymap=</code>, </span><span class="term"><code class="varname">vconsole.keymap.toggle=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.keymap=">¶</a></dt><dd><p>Overrides the key
                                 mapping table for the keyboard and the
@@ -35,7 +35,7 @@
                                 font, the console map, and the unicode
                                 font map.</p></dd></dl></div><p>See
                 <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>
-                for information about these settings.</p></div><div class="refsect1"><a name="idm214182301088"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                for information about these settings.</p></div><div class="refsect1"><a name="idm214175884752"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a>,
                         <a href="loadkeys.html"><span class="citerefentry"><span class="refentrytitle">loadkeys</span>(1)</span></a>,
index 2c0de3ecb821eed5ecd1edc2dd269ce0f4dcbc6a..33b29094410e728a2052526e7419fb996c719cdf 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD" "1" "" "systemd 215" "systemd"
+.TH "SYSTEMD" "1" "" "systemd 217" "systemd"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -106,10 +106,8 @@ Show terse service status information while booting\&. This switch has no effect
 Set log target\&. Argument must be one of
 \fBconsole\fR,
 \fBjournal\fR,
-\fBsyslog\fR,
 \fBkmsg\fR,
 \fBjournal\-or\-kmsg\fR,
-\fBsyslog\-or\-kmsg\fR,
 \fBnull\fR\&.
 .RE
 .PP
@@ -609,7 +607,7 @@ on
 Immediately exits the manager (only available for \-\-user instances)\&.
 .RE
 .PP
-\fBSIGRTMIN+26\fR, \fBSIGRTMIN+27\fR, \fBSIGRTMIN+28\fR, \fBSIGRTMIN+29\fR
+\fBSIGRTMIN+26\fR, \fBSIGRTMIN+27\fR, \fBSIGRTMIN+28\fR
 .RS 4
 Sets the log level to
 "journal\-or\-kmsg"
@@ -619,21 +617,16 @@ on
 \fBSIGRTMIN+27\fR,
 "kmsg"
 on
-\fBSIGRTMIN+28\fR, or
-"syslog\-or\-kmsg"
-on
-\fBSIGRTMIN+29\fR), as controlled via
+\fBSIGRTMIN+28\fR), as controlled via
 \fIsystemd\&.log_target=journal\-or\-kmsg\fR
 (or
 \fIsystemd\&.log_target=console\fR
 on
-\fBSIGRTMIN+27\fR,
+\fBSIGRTMIN+27\fR
+or
 \fIsystemd\&.log_target=kmsg\fR
 on
-\fBSIGRTMIN+28\fR, or
-\fIsystemd\&.log_target=syslog\-or\-kmsg\fR
-on
-\fBSIGRTMIN+29\fR) on the kernel command line\&.
+\fBSIGRTMIN+28\fR) on the kernel command line\&.
 .RE
 .SH "ENVIRONMENT"
 .PP
@@ -792,14 +785,14 @@ Turn on debugging output\&. This is equivalent to
 \fIsystemd\&.log_level=debug\fR\&. Note that this option is also read by the kernel itself and enables kernel debug output\&. Passing this option hence turns on the debug output from both the system manager and the kernel\&.
 .RE
 .PP
-\fI\-b\fR, \fIemergency\fR
+\fIemergency\fR, \fI\-b\fR
 .RS 4
 Boot into emergency mode\&. This is equivalent to
 \fIsystemd\&.unit=emergency\&.target\fR
 and provided for compatibility reasons and to be easier to type\&.
 .RE
 .PP
-\fIsingle\fR, \fIs\fR, \fIS\fR, \fI1\fR
+\fIrescue\fR, \fIsingle\fR, \fIs\fR, \fIS\fR, \fI1\fR
 .RS 4
 Boot into rescue mode\&. This is equivalent to
 \fIsystemd\&.unit=rescue\&.target\fR
index c9c974f6441d2f59b300b82235d2314be96b5fde..4a059e75dbe1632d919217fb2b4283212932d47f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.AUTOMOUNT" "5" "" "systemd 215" "systemd.automount"
+.TH "SYSTEMD\&.AUTOMOUNT" "5" "" "systemd 217" "systemd.automount"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -85,7 +85,7 @@ Directories of automount points (and any parent directories) are automatically c
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.mount\fR(5),
 \fBmount\fR(8),
index 9929494976a36b439e38cc8ebb882e62f87005a2..8e5aec581b1d4c4d9087110bdf1bd1cd5e57476f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.automount"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.automount — Automount unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>automount</code></em>.automount</code></p></div><div class="refsect1"><a name="idm214167439760"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.automount"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.automount — Automount unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>automount</code></em>.automount</code></p></div><div class="refsect1"><a name="idm214173272912"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.automount</code>" encodes information
                 about a file system automount point controlled and
                 supervised by systemd.</p><p>This man page lists the configuration options
                 on-demand mounting as well as parallelized mounting of
                 file systems.</p><p>If an automount point is beneath another mount
                 point in the file system hierarchy, a dependency
-                between both units is created automatically.</p></div><div class="refsect1"><a name="idm214168557664"></a><h2 id="fstab"><code class="filename">fstab</code><a class="headerlink" title="Permalink to this headline" href="#fstab">¶</a></h2><p>Automount units may either be configured via unit
+                between both units is created automatically.</p></div><div class="refsect1"><a name="idm214173261408"></a><h2 id="fstab"><code class="filename">fstab</code><a class="headerlink" title="Permalink to this headline" href="#fstab">¶</a></h2><p>Automount units may either be configured via unit
                 files, or via <code class="filename">/etc/fstab</code> (see
                 <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>
                 for details).</p><p>For details how systemd parses
                 <code class="filename">/etc/fstab</code> see
                 <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>.</p><p>If an automount point is configured in both
                 <code class="filename">/etc/fstab</code> and a unit file, the
-                configuration in the latter takes precedence.</p></div><div class="refsect1"><a name="idm214167940944"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Automount files must include an [Automount]
+                configuration in the latter takes precedence.</p></div><div class="refsect1"><a name="idm214177206704"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Automount files must include an [Automount]
                 section, which carries information about the file
                 system automount points it supervises. The options
                 specific to the [Automount] section of automount units
@@ -75,9 +75,9 @@
                                 creating these directories. Takes an
                                 access mode in octal
                                 notation. Defaults to
-                                0755.</p></dd></dl></div></div><div class="refsect1"><a name="idm214169148816"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                0755.</p></dd></dl></div></div><div class="refsect1"><a name="idm214177200672"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>,
                           <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>,
index 34105126cd66ce72f3265fd379b2d86fcbf0caac..f04a4a492768bee29f9d28c402668d007be8f3a1 100644 (file)
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
index 1cf66eff1f3ee291635107be35d2f237085c5fa4..fd2af7843f24fe1078ca6c1ae1ea998dcf96745a 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.DEVICE" "5" "" "systemd 215" "systemd.device"
+.TH "SYSTEMD\&.DEVICE" "5" "" "systemd 217" "systemd.device"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -102,7 +102,7 @@ If set, this property is used as description string for the device unit\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBudev\fR(7),
 \fBsystemd.directives\fR(7)
index bf19e5d499091978c39ae322866ed6a7f3e41ea8..c9b2edb7e9f5b355ed77d5b37d2cf502e68262d2 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.device — Device unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>device</code></em>.device</code></p></div><div class="refsect1"><a name="idm214189737152"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.device — Device unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>device</code></em>.device</code></p></div><div class="refsect1"><a name="idm214169484112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.device</code>" encodes information about
                 a device unit as exposed in the
                 sysfs/<a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>
@@ -46,7 +46,7 @@
                 in systemd as <code class="filename">dev-sda5.device</code>. For
                 details about the escaping logic used to convert a
                 file system path to a unit name see
-                <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.</p></div><div class="refsect1"><a name="idm214187635920"></a><h2 id="The udev Database">The udev Database<a class="headerlink" title="Permalink to this headline" href="#The%20udev%20Database">¶</a></h2><p>The settings of device units may either be
+                <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.</p></div><div class="refsect1"><a name="idm214169471024"></a><h2 id="The udev Database">The udev Database<a class="headerlink" title="Permalink to this headline" href="#The%20udev%20Database">¶</a></h2><p>The settings of device units may either be
                 configured via unit files, or directly from the udev
                 database (which is recommended). The following udev device
                 properties are understood by systemd:</p><div class="variablelist"><dl class="variablelist"><dt id="SYSTEMD_WANTS="><span class="term"><code class="varname">SYSTEMD_WANTS=</code>, </span><span class="term"><code class="varname">SYSTEMD_USER_WANTS=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_WANTS=">¶</a></dt><dd><p>Adds dependencies of
@@ -96,9 +96,9 @@
                                 <code class="varname">SYSTEMD_READY=0</code> is
                                 set for a device.</p></dd><dt id="ID_MODEL_FROM_DATABASE="><span class="term"><code class="varname">ID_MODEL_FROM_DATABASE=</code>, </span><span class="term"><code class="varname">ID_MODEL=</code></span><a class="headerlink" title="Permalink to this term" href="#ID_MODEL_FROM_DATABASE=">¶</a></dt><dd><p>If set, this property is
                                 used as description string for the
-                                device unit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214189381632"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                device unit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173405536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
index 619fe1968046bfab9b6930a291179c53ccaeed10..557f15f906d79615e698ad521c1c2274406da719 100644 (file)
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
index eb0f053388832f00a3d914262926ff6d3e100a0c..cb6cc0150875a1f6a77b57576544b58e000a9fff 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.DIRECTIVES" "7" "" "systemd 215" "systemd.directives"
+.TH "SYSTEMD\&.DIRECTIVES" "7" "" "systemd 217" "systemd.directives"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -120,6 +120,11 @@ Directives for configuring units, used in unit files\&.
 \fBsystemd.service\fR(5)
 .RE
 .PP
+\fIBusPolicy=\fR
+.RS 4
+\fBsystemd.service\fR(5)
+.RE
+.PP
 \fICPUAccounting=\fR
 .RS 4
 \fBsystemd.resource-control\fR(5)
@@ -195,6 +200,11 @@ Directives for configuring units, used in unit files\&.
 \fBsystemd.unit\fR(5)
 .RE
 .PP
+\fIConditionFirstBoot=\fR
+.RS 4
+\fBsystemd.unit\fR(5)
+.RE
+.PP
 \fIConditionHost=\fR
 .RS 4
 \fBsystemd.unit\fR(5)
@@ -270,6 +280,11 @@ Directives for configuring units, used in unit files\&.
 \fBsystemd.unit\fR(5)
 .RE
 .PP
+\fIDeferAcceptSec=\fR
+.RS 4
+\fBsystemd.socket\fR(5)
+.RE
+.PP
 \fIDescription=\fR
 .RS 4
 \fBsystemd.unit\fR(5)
@@ -411,6 +426,16 @@ Directives for configuring units, used in unit files\&.
 \fBsystemd.exec\fR(5)
 .RE
 .PP
+\fIJobTimeoutAction=\fR
+.RS 4
+\fBsystemd.unit\fR(5)
+.RE
+.PP
+\fIJobTimeoutRebootArgument=\fR
+.RS 4
+\fBsystemd.unit\fR(5)
+.RE
+.PP
 \fIJobTimeoutSec=\fR
 .RS 4
 \fBsystemd.unit\fR(5)
@@ -426,6 +451,21 @@ Directives for configuring units, used in unit files\&.
 \fBsystemd.socket\fR(5)
 .RE
 .PP
+\fIKeepAliveIntervalSec=\fR
+.RS 4
+\fBsystemd.socket\fR(5)
+.RE
+.PP
+\fIKeepAliveProbes=\fR
+.RS 4
+\fBsystemd.socket\fR(5)
+.RE
+.PP
+\fIKeepAliveTimeSec=\fR
+.RS 4
+\fBsystemd.socket\fR(5)
+.RE
+.PP
 \fIKillMode=\fR
 .RS 4
 \fBsystemd.kill\fR(5)
@@ -596,6 +636,11 @@ Directives for configuring units, used in unit files\&.
 \fBsystemd.exec\fR(5)
 .RE
 .PP
+\fINoDelay=\fR
+.RS 4
+\fBsystemd.socket\fR(5)
+.RE
+.PP
 \fINoNewPrivileges=\fR
 .RS 4
 \fBsystemd.exec\fR(5)
@@ -658,7 +703,8 @@ Directives for configuring units, used in unit files\&.
 .PP
 \fIOptions=\fR
 .RS 4
-\fBsystemd.mount\fR(5)
+\fBsystemd.mount\fR(5),
+\fBsystemd.swap\fR(5)
 .RE
 .PP
 \fIPAMName=\fR
@@ -892,6 +938,11 @@ Directives for configuring units, used in unit files\&.
 \fBsystemd.exec\fR(5)
 .RE
 .PP
+\fISELinuxContextFromNet=\fR
+.RS 4
+\fBsystemd.socket\fR(5)
+.RE
+.PP
 \fISecureBits=\fR
 .RS 4
 \fBsystemd.exec\fR(5)
@@ -1379,6 +1430,21 @@ Kernel boot options for configuring the behaviour of the systemd process\&.
 \fBsystemd-modules-load.service\fR(8)
 .RE
 .PP
+\fImount\&.usr=\fR
+.RS 4
+\fBsystemd-fstab-generator\fR(8)
+.RE
+.PP
+\fImount\&.usrflags=\fR
+.RS 4
+\fBsystemd-fstab-generator\fR(8)
+.RE
+.PP
+\fImount\&.usrfstype=\fR
+.RS 4
+\fBsystemd-fstab-generator\fR(8)
+.RE
+.PP
 \fInet\&.ifnames=\fR
 .RS 4
 \fBkernel-command-line\fR(7),
@@ -1461,6 +1527,12 @@ Kernel boot options for configuring the behaviour of the systemd process\&.
 \fBsystemd-udevd.service\fR(8)
 .RE
 .PP
+\fIrd\&.udev\&.event\-timeout=\fR
+.RS 4
+\fBkernel-command-line\fR(7),
+\fBsystemd-udevd.service\fR(8)
+.RE
+.PP
 \fIrd\&.udev\&.exec\-delay=\fR
 .RS 4
 \fBkernel-command-line\fR(7),
@@ -1473,6 +1545,18 @@ Kernel boot options for configuring the behaviour of the systemd process\&.
 \fBsystemd-udevd.service\fR(8)
 .RE
 .PP
+\fIrescue\fR
+.RS 4
+\fBkernel-command-line\fR(7),
+\fBsystemd\fR(1)
+.RE
+.PP
+\fIresume=\fR
+.RS 4
+\fBkernel-command-line\fR(7),
+\fBsystemd-hibernate-resume-generator\fR(8)
+.RE
+.PP
 \fIro\fR
 .RS 4
 \fBkernel-command-line\fR(7)
@@ -1480,7 +1564,13 @@ Kernel boot options for configuring the behaviour of the systemd process\&.
 .PP
 \fIroot=\fR
 .RS 4
-\fBkernel-command-line\fR(7)
+\fBkernel-command-line\fR(7),
+\fBsystemd-fstab-generator\fR(8)
+.RE
+.PP
+\fIrootflags=\fR
+.RS 4
+\fBsystemd-fstab-generator\fR(8)
 .RE
 .PP
 \fIrootfsflags=\fR
@@ -1490,7 +1580,8 @@ Kernel boot options for configuring the behaviour of the systemd process\&.
 .PP
 \fIrootfstype=\fR
 .RS 4
-\fBkernel-command-line\fR(7)
+\fBkernel-command-line\fR(7),
+\fBsystemd-fstab-generator\fR(8)
 .RE
 .PP
 \fIrw\fR
@@ -1645,6 +1736,12 @@ Kernel boot options for configuring the behaviour of the systemd process\&.
 \fBsystemd-udevd.service\fR(8)
 .RE
 .PP
+\fIudev\&.event\-timeout=\fR
+.RS 4
+\fBkernel-command-line\fR(7),
+\fBsystemd-udevd.service\fR(8)
+.RE
+.PP
 \fIudev\&.exec\-delay=\fR
 .RS 4
 \fBkernel-command-line\fR(7),
@@ -2230,11 +2327,6 @@ Directives for configuring systemd units through the udev database\&.
 \fBudev\fR(7)
 .RE
 .PP
-\fBevent_timeout=\fR
-.RS 4
-\fBudev\fR(7)
-.RE
-.PP
 \fBlink_priority=\fR
 .RS 4
 \fBudev\fR(7)
@@ -2338,6 +2430,16 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.netdev\fR(5)
 .RE
 .PP
+\fIDomains=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
+\fIDownDelaySec=\fR
+.RS 4
+\fBsystemd.netdev\fR(5)
+.RE
+.PP
 \fIDriver=\fR
 .RS 4
 \fBsystemd.link\fR(5),
@@ -2349,6 +2451,16 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.link\fR(5)
 .RE
 .PP
+\fIFallbackDNS=\fR
+.RS 4
+\fBresolved.conf\fR(5)
+.RE
+.PP
+\fIFallbackNTP=\fR
+.RS 4
+\fBtimesyncd.conf\fR(5)
+.RE
+.PP
 \fIGateway=\fR
 .RS 4
 \fBsystemd.network\fR(5)
@@ -2371,6 +2483,11 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.network\fR(5)
 .RE
 .PP
+\fIIPv4LLRoute=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
 \fIId=\fR
 .RS 4
 \fBsystemd.netdev\fR(5)
@@ -2388,6 +2505,17 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.netdev\fR(5)
 .RE
 .PP
+\fILACPTransmitRate=\fR
+.RS 4
+\fBsystemd.netdev\fR(5)
+.RE
+.PP
+\fILLMNR=\fR
+.RS 4
+\fBresolved.conf\fR(5),
+\fBsystemd.network\fR(5)
+.RE
+.PP
 \fILabel=\fR
 .RS 4
 \fBsystemd.network\fR(5)
@@ -2415,6 +2543,11 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.network\fR(5)
 .RE
 .PP
+\fIMIIMonitorSec=\fR
+.RS 4
+\fBsystemd.netdev\fR(5)
+.RE
+.PP
 \fIMTUBytes=\fR
 .RS 4
 \fBsystemd.link\fR(5),
@@ -2426,6 +2559,11 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.netdev\fR(5)
 .RE
 .PP
+\fIMetric=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
 \fIMode=\fR
 .RS 4
 \fBsystemd.netdev\fR(5)
@@ -2436,6 +2574,12 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.netdev\fR(5)
 .RE
 .PP
+\fINTP=\fR
+.RS 4
+\fBsystemd.network\fR(5),
+\fBtimesyncd.conf\fR(5)
+.RE
+.PP
 \fIName=\fR
 .RS 4
 \fBsystemd.link\fR(5),
@@ -2464,11 +2608,26 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.network\fR(5)
 .RE
 .PP
+\fIPeer=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
 \fIRemote=\fR
 .RS 4
 \fBsystemd.netdev\fR(5)
 .RE
 .PP
+\fIRequestBroadcast=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
+\fIRouteMetric=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
 \fISendHostname=\fR
 .RS 4
 \fBsystemd.network\fR(5)
@@ -2484,6 +2643,11 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.netdev\fR(5)
 .RE
 .PP
+\fITransmitHashPolicy=\fR
+.RS 4
+\fBsystemd.netdev\fR(5)
+.RE
+.PP
 \fITunnel=\fR
 .RS 4
 \fBsystemd.network\fR(5)
@@ -2495,11 +2659,21 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.network\fR(5)
 .RE
 .PP
+\fIUpDelaySec=\fR
+.RS 4
+\fBsystemd.netdev\fR(5)
+.RE
+.PP
 \fIUseDNS=\fR
 .RS 4
 \fBsystemd.network\fR(5)
 .RE
 .PP
+\fIUseDomains=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
 \fIUseHostname=\fR
 .RS 4
 \fBsystemd.network\fR(5)
@@ -2530,6 +2704,11 @@ Directives for configuring network links through the net\-setup\-link udev built
 \fBsystemd.network\fR(5)
 .RE
 .PP
+\fIVendorClassIdentifier=\fR
+.RS 4
+\fBsystemd.network\fR(5)
+.RE
+.PP
 \fIVirtualization=\fR
 .RS 4
 \fBsystemd.link\fR(5),
@@ -2970,6 +3149,7 @@ Options which influence mounted filesystems and encrypted volumes\&.
 .PP
 \fBx\-systemd\&.device\-timeout=\fR
 .RS 4
+\fBcrypttab\fR(5),
 \fBsystemd.mount\fR(5)
 .RE
 .SH "SYSTEM MANAGER DIRECTIVES"
@@ -3325,7 +3505,8 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-\-after\-cursor=\fR
 .RS 4
-\fBjournalctl\fR(1)
+\fBjournalctl\fR(1),
+\fBsystemd-journal-upload\fR(8)
 .RE
 .PP
 \fB\-\-all\fR
@@ -3449,6 +3630,26 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-bootchart\fR(1)
 .RE
 .PP
+\fB\-\-copy\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-copy\-locale\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-copy\-root\-password\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-copy\-timezone\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 \fB\-\-crash\-shell\fR
 .RS 4
 \fBsystemd\fR(1)
@@ -3461,7 +3662,8 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-\-cursor=\fR
 .RS 4
-\fBjournalctl\fR(1)
+\fBjournalctl\fR(1),
+\fBsystemd-journal-upload\fR(8)
 .RE
 .PP
 \fB\-\-daemon\fR
@@ -3513,6 +3715,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fB\-\-directory=\fR
 .RS 4
 \fBjournalctl\fR(1),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-nspawn\fR(1)
 .RE
 .PP
@@ -3551,11 +3754,21 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd\fR(1)
 .RE
 .PP
+\fB\-\-echo\fR
+.RS 4
+\fBsystemd-ask-password\fR(1)
+.RE
+.PP
 \fB\-\-entropy\fR
 .RS 4
 \fBsystemd-bootchart\fR(1)
 .RE
 .PP
+\fB\-\-event\-timeout=\fR
+.RS 4
+\fBsystemd-udevd.service\fR(8)
+.RE
+.PP
 \fB\-\-exclude\-prefix=\fR
 .RS 4
 \fBsystemd-tmpfiles\fR(8)
@@ -3597,19 +3810,15 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBjournalctl\fR(1)
 .RE
 .PP
-\fB\-\-file\-size\-max=\fR
-.RS 4
-\fBsystemd-readahead-replay.service\fR(8)
-.RE
-.PP
 \fB\-\-file=\fR
 .RS 4
-\fBjournalctl\fR(1)
+\fBjournalctl\fR(1),
+\fBsystemd-journal-upload\fR(8)
 .RE
 .PP
-\fB\-\-files\-max=\fR
+\fB\-\-flush\fR
 .RS 4
-\fBsystemd-readahead-replay.service\fR(8)
+\fBjournalctl\fR(1)
 .RE
 .PP
 \fB\-\-follow\fR
@@ -3699,14 +3908,16 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-cgtop\fR(1),
 \fBsystemd-delta\fR(1),
 \fBsystemd-detect-virt\fR(1),
+\fBsystemd-escape\fR(1),
+\fBsystemd-firstboot\fR(1),
 \fBsystemd-inhibit\fR(1),
 \fBsystemd-journal-gatewayd.service\fR(8),
 \fBsystemd-journal-remote\fR(8),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-machine-id-setup\fR(1),
 \fBsystemd-notify\fR(1),
 \fBsystemd-nspawn\fR(1),
 \fBsystemd-path\fR(1),
-\fBsystemd-readahead-replay.service\fR(8),
 \fBsystemd-run\fR(1),
 \fBsystemd-socket-proxyd\fR(8),
 \fBsystemd-suspend.service\fR(8),
@@ -3732,6 +3943,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBtimedatectl\fR(1)
 .RE
 .PP
+\fB\-\-hostname=\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 \fB\-\-icon=\fR
 .RS 4
 \fBsystemd-ask-password\fR(1)
@@ -3739,6 +3955,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-\-identifier=\fR
 .RS 4
+\fBjournalctl\fR(1),
 \fBsystemd-cat\fR(1)
 .RE
 .PP
@@ -3851,6 +4068,16 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-activate\fR(8)
 .RE
 .PP
+\fB\-\-locale\-messages=\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-locale=\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 \fB\-\-log\-color=\fR
 .RS 4
 \fBsystemd\fR(1)
@@ -3876,6 +4103,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd\fR(1)
 .RE
 .PP
+\fB\-\-machine\-id=\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 \fB\-\-machine=\fR
 .RS 4
 \fBbusctl\fR(1),
@@ -3890,6 +4122,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBtimedatectl\fR(1)
 .RE
 .PP
+\fB\-\-mangle\fR
+.RS 4
+\fBsystemd-escape\fR(1)
+.RE
+.PP
 \fB\-\-match=\fR
 .RS 4
 \fBbusctl\fR(1)
@@ -3897,7 +4134,8 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-\-merge\fR
 .RS 4
-\fBjournalctl\fR(1)
+\fBjournalctl\fR(1),
+\fBsystemd-journal-upload\fR(8)
 .RE
 .PP
 \fB\-\-mode=\fR
@@ -3988,6 +4226,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemctl\fR(1)
 .RE
 .PP
+\fB\-\-no\-man\fR
+.RS 4
+\fBsystemd-analyze\fR(1)
+.RE
+.PP
 \fB\-\-no\-pager\fR
 .RS 4
 \fBbusctl\fR(1),
@@ -4064,6 +4307,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBudevadm\fR(8)
 .RE
 .PP
+\fB\-\-path\fR
+.RS 4
+\fBsystemd-escape\fR(1)
+.RE
+.PP
 \fB\-\-path=\fR
 .RS 4
 \fBudevadm\fR(8)
@@ -4121,10 +4369,29 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-nspawn\fR(1)
 .RE
 .PP
-\fB\-\-privileged\fR
+\fB\-\-prompt\fR
 .RS 4
-\fBhostnamectl\fR(1),
-\fBlocalectl\fR(1)
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-prompt\-hostname\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-prompt\-locale\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-prompt\-root\-password\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-prompt\-timezone\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
 .RE
 .PP
 \fB\-\-property\fR
@@ -4174,11 +4441,6 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-nspawn\fR(1)
 .RE
 .PP
-\fB\-\-readahead=\fR
-.RS 4
-\fBsystemd-notify\fR(1)
-.RE
-.PP
 \fB\-\-ready\fR
 .RS 4
 \fBsystemd-notify\fR(1)
@@ -4242,10 +4504,21 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBudevadm\fR(8)
 .RE
 .PP
+\fB\-\-root\-password\-file=\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+\fB\-\-root\-password=\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 \fB\-\-root=\fR
 .RS 4
 \fBjournalctl\fR(1),
 \fBsystemctl\fR(1),
+\fBsystemd-firstboot\fR(1),
 \fBsystemd-machine-id-setup\fR(1),
 \fBsystemd-sysusers\fR(8),
 \fBsystemd-tmpfiles\fR(8),
@@ -4262,6 +4535,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-bootchart\fR(1)
 .RE
 .PP
+\fB\-\-save\-state\fR
+.RS 4
+\fBsystemd-journal-upload\fR(8)
+.RE
+.PP
 \fB\-\-scale\-x\fR
 .RS 4
 \fBsystemd-bootchart\fR(1)
@@ -4314,6 +4592,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBjournalctl\fR(1)
 .RE
 .PP
+\fB\-\-setup\-machine\-id\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 \fB\-\-share\-system\fR
 .RS 4
 \fBsystemd-nspawn\fR(1)
@@ -4357,6 +4640,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-run\fR(1)
 .RE
 .PP
+\fB\-\-split\-mode\fR
+.RS 4
+\fBsystemd-journal-remote\fR(8)
+.RE
+.PP
 \fB\-\-start\-exec\-queue\fR
 .RS 4
 \fBudevadm\fR(8)
@@ -4394,6 +4682,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-\-suffix=\fR
 .RS 4
+\fBsystemd-escape\fR(1),
 \fBsystemd-path\fR(1)
 .RE
 .PP
@@ -4409,6 +4698,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemctl\fR(1),
 \fBsystemd\fR(1),
 \fBsystemd-analyze\fR(1),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-run\fR(1)
 .RE
 .PP
@@ -4417,6 +4707,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBudevadm\fR(8)
 .RE
 .PP
+\fB\-\-template=\fR
+.RS 4
+\fBsystemd-escape\fR(1)
+.RE
+.PP
 \fB\-\-test\fR
 .RS 4
 \fBsystemd\fR(1)
@@ -4430,10 +4725,14 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fB\-\-timeout=\fR
 .RS 4
 \fBsystemd-ask-password\fR(1),
-\fBsystemd-readahead-replay.service\fR(8),
 \fBudevadm\fR(8)
 .RE
 .PP
+\fB\-\-timezone=\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 \fB\-\-tmpfs=\fR
 .RS 4
 \fBsystemd-nspawn\fR(1)
@@ -4466,6 +4765,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-run\fR(1)
 .RE
 .PP
+\fB\-\-unescape\fR
+.RS 4
+\fBsystemd-escape\fR(1)
+.RE
+.PP
 \fB\-\-unique\fR
 .RS 4
 \fBbusctl\fR(1)
@@ -4495,7 +4799,8 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-\-url=\fR
 .RS 4
-\fBsystemd-journal-remote\fR(8)
+\fBsystemd-journal-remote\fR(8),
+\fBsystemd-journal-upload\fR(8)
 .RE
 .PP
 \fB\-\-user\fR
@@ -4505,6 +4810,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemctl\fR(1),
 \fBsystemd\fR(1),
 \fBsystemd-analyze\fR(1),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-run\fR(1)
 .RE
 .PP
@@ -4518,6 +4824,16 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-nspawn\fR(1)
 .RE
 .PP
+\fB\-\-usr\fR
+.RS 4
+\fBudevadm\fR(8)
+.RE
+.PP
+\fB\-\-utc\fR
+.RS 4
+\fBjournalctl\fR(1)
+.RE
+.PP
 \fB\-\-uuid=\fR
 .RS 4
 \fBsystemd-nspawn\fR(1)
@@ -4558,14 +4874,16 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-cgtop\fR(1),
 \fBsystemd-delta\fR(1),
 \fBsystemd-detect-virt\fR(1),
+\fBsystemd-escape\fR(1),
+\fBsystemd-firstboot\fR(1),
 \fBsystemd-inhibit\fR(1),
 \fBsystemd-journal-gatewayd.service\fR(8),
 \fBsystemd-journal-remote\fR(8),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-machine-id-setup\fR(1),
 \fBsystemd-notify\fR(1),
 \fBsystemd-nspawn\fR(1),
 \fBsystemd-path\fR(1),
-\fBsystemd-readahead-replay.service\fR(8),
 \fBsystemd-run\fR(1),
 \fBsystemd-socket-proxyd\fR(8),
 \fBsystemd-suspend.service\fR(8),
@@ -4582,6 +4900,11 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-detect-virt\fR(1)
 .RE
 .PP
+\fB\-\-volatile\fR
+.RS 4
+\fBsystemd-nspawn\fR(1)
+.RE
+.PP
 \fB\-\-wall\fR
 .RS 4
 \fBsystemd-tty-ask-password-agent\fR(1)
@@ -4630,6 +4953,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fB\-D\fR
 .RS 4
 \fBjournalctl\fR(1),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-nspawn\fR(1)
 .RE
 .PP
@@ -4686,8 +5010,6 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-P\fR
 .RS 4
-\fBhostnamectl\fR(1),
-\fBlocalectl\fR(1),
 \fBshutdown\fR(8),
 \fBudevadm\fR(8)
 .RE
@@ -4785,14 +5107,16 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-cgtop\fR(1),
 \fBsystemd-delta\fR(1),
 \fBsystemd-detect-virt\fR(1),
+\fBsystemd-escape\fR(1),
+\fBsystemd-firstboot\fR(1),
 \fBsystemd-inhibit\fR(1),
 \fBsystemd-journal-gatewayd.service\fR(8),
 \fBsystemd-journal-remote\fR(8),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-machine-id-setup\fR(1),
 \fBsystemd-notify\fR(1),
 \fBsystemd-nspawn\fR(1),
 \fBsystemd-path\fR(1),
-\fBsystemd-readahead-replay.service\fR(8),
 \fBsystemd-run\fR(1),
 \fBsystemd-socket-proxyd\fR(8),
 \fBsystemd-suspend.service\fR(8),
@@ -4840,6 +5164,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 .RS 4
 \fBjournalctl\fR(1),
 \fBsystemd-cgtop\fR(1),
+\fBsystemd-journal-upload\fR(8),
 \fBudevadm\fR(8)
 .RE
 .PP
@@ -4870,6 +5195,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fBsystemd-bootchart\fR(1),
 \fBsystemd-cat\fR(1),
 \fBsystemd-cgtop\fR(1),
+\fBsystemd-escape\fR(1),
 \fBsystemd-run\fR(1),
 \fBudevadm\fR(8)
 .RE
@@ -4902,6 +5228,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 .PP
 \fB\-t\fR
 .RS 4
+\fBjournalctl\fR(1),
 \fBsystemctl\fR(1),
 \fBsystemd-cat\fR(1),
 \fBsystemd-cgtop\fR(1),
@@ -4912,6 +5239,7 @@ Command\-line options accepted by programs in the systemd suite\&.
 \fB\-u\fR
 .RS 4
 \fBjournalctl\fR(1),
+\fBsystemd-journal-upload\fR(8),
 \fBsystemd-nspawn\fR(1),
 \fBudevadm\fR(8)
 .RE
@@ -5061,19 +5389,146 @@ Various constant used and/or defined by systemd\&.
 \fBsystemd\fR(1)
 .RE
 .PP
+\fB\-EADDRINUSE\fR
+.RS 4
+\fBsd_bus_request_name\fR(3)
+.RE
+.PP
+\fB\-EALREADY\fR
+.RS 4
+\fBsd_bus_request_name\fR(3)
+.RE
+.PP
+\fB\-EBUSY\fR
+.RS 4
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_signal\fR(3)
+.RE
+.PP
 \fB\-ECHILD\fR
 .RS 4
+\fBsd_bus_request_name\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_time\fR(3),
+\fBsd_event_get_fd\fR(3),
 \fBsd_journal_open\fR(3)
 .RE
 .PP
+\fB\-EEXIST\fR
+.RS 4
+\fBsd_bus_request_name\fR(3)
+.RE
+.PP
+\fB\-EINVAL\fR
+.RS 4
+\fBsd_bus_creds_get_pid\fR(3),
+\fBsd_bus_creds_new_from_pid\fR(3),
+\fBsd_bus_error\fR(3),
+\fBsd_bus_message_append\fR(3),
+\fBsd_bus_message_append_array\fR(3),
+\fBsd_bus_message_append_basic\fR(3),
+\fBsd_bus_message_append_string_memfd\fR(3),
+\fBsd_bus_message_append_strv\fR(3),
+\fBsd_bus_message_get_cookie\fR(3),
+\fBsd_bus_message_get_monotonic_usec\fR(3),
+\fBsd_bus_open_user\fR(3),
+\fBsd_bus_request_name\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_time\fR(3),
+\fBsd_event_get_fd\fR(3),
+\fBsd_event_set_name\fR(3)
+.RE
+.PP
+\fB\-EMFILE\fR
+.RS 4
+\fBsd_event_new\fR(3)
+.RE
+.PP
 \fB\-ENODATA\fR
 .RS 4
+\fBsd_bus_creds_get_pid\fR(3),
+\fBsd_bus_message_get_cookie\fR(3),
+\fBsd_bus_message_get_monotonic_usec\fR(3),
 \fBsd_bus_negotiate_fds\fR(3)
 .RE
 .PP
+\fB\-ENOENT\fR
+.RS 4
+\fBsd_bus_creds_get_pid\fR(3)
+.RE
+.PP
+\fB\-ENOMEM\fR
+.RS 4
+\fBsd_bus_creds_get_pid\fR(3),
+\fBsd_bus_creds_new_from_pid\fR(3),
+\fBsd_bus_error\fR(3),
+\fBsd_bus_message_append\fR(3),
+\fBsd_bus_message_append_array\fR(3),
+\fBsd_bus_message_append_basic\fR(3),
+\fBsd_bus_message_append_string_memfd\fR(3),
+\fBsd_bus_message_append_strv\fR(3),
+\fBsd_bus_new\fR(3),
+\fBsd_bus_open_user\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_time\fR(3),
+\fBsd_event_new\fR(3),
+\fBsd_event_set_name\fR(3)
+.RE
+.PP
+\fB\-ENOTCONN\fR
+.RS 4
+\fBsd_bus_request_name\fR(3)
+.RE
+.PP
+\fB\-ENOTSUP\fR
+.RS 4
+\fBsd_event_add_time\fR(3)
+.RE
+.PP
 \fB\-ENXIO\fR
 .RS 4
-\fBsd_bus_error\fR(3)
+\fBsd_bus_creds_get_pid\fR(3),
+\fBsd_bus_error\fR(3),
+\fBsd_bus_message_append\fR(3),
+\fBsd_bus_message_append_array\fR(3),
+\fBsd_bus_message_append_basic\fR(3),
+\fBsd_bus_message_append_string_memfd\fR(3),
+\fBsd_bus_message_append_strv\fR(3)
+.RE
+.PP
+\fB\-EPERM\fR
+.RS 4
+\fBsd_bus_message_append\fR(3),
+\fBsd_bus_message_append_array\fR(3),
+\fBsd_bus_message_append_basic\fR(3),
+\fBsd_bus_message_append_string_memfd\fR(3),
+\fBsd_bus_message_append_strv\fR(3),
+\fBsd_bus_negotiate_fds\fR(3)
+.RE
+.PP
+\fB\-ESRCH\fR
+.RS 4
+\fBsd_bus_creds_new_from_pid\fR(3),
+\fBsd_bus_request_name\fR(3)
+.RE
+.PP
+\fB\-ESTALE\fR
+.RS 4
+\fBsd_bus_message_append\fR(3),
+\fBsd_bus_message_append_array\fR(3),
+\fBsd_bus_message_append_basic\fR(3),
+\fBsd_bus_message_append_string_memfd\fR(3),
+\fBsd_bus_message_append_strv\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_time\fR(3)
 .RE
 .PP
 \fB0\fR
@@ -5186,6 +5641,11 @@ Various constant used and/or defined by systemd\&.
 \fBsystemd.exec\fR(5)
 .RE
 .PP
+\fBIP_FREEBIND\fR
+.RS 4
+\fBdaemon\fR(7)
+.RE
+.PP
 \fBLOG_ALERT\fR
 .RS 4
 \fBsd_journal_print\fR(3),
@@ -5241,6 +5701,7 @@ Various constant used and/or defined by systemd\&.
 \fBsd_bus_message_append_string_memfd\fR(3),
 \fBsd_bus_message_append_strv\fR(3),
 \fBsd_bus_path_encode\fR(3),
+\fBsd_event_set_name\fR(3),
 \fBsd_id128_to_string\fR(3),
 \fBsystemd.socket\fR(5)
 .RE
@@ -5257,6 +5718,9 @@ Various constant used and/or defined by systemd\&.
 \fBsd_bus_new\fR(3),
 \fBsd_bus_open_user\fR(3),
 \fBsd_bus_path_encode\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_new\fR(3),
+\fBsd_event_set_name\fR(3),
 \fBsd_get_seats\fR(3),
 \fBsd_is_fifo\fR(3),
 \fBsd_journal_get_cutoff_realtime_usec\fR(3),
@@ -5286,6 +5750,11 @@ Various constant used and/or defined by systemd\&.
 \fBsd_login_monitor_new\fR(3)
 .RE
 .PP
+\fBRLIMIT_NOFILE\fR
+.RS 4
+\fBdaemon\fR(7)
+.RE
+.PP
 \fBSD_BUS_CREDS_AUDIT_LOGIN_UID\fR
 .RS 4
 \fBsd_bus_creds_new_from_pid\fR(3)
@@ -5670,6 +6139,21 @@ Various constant used and/or defined by systemd\&.
 \fBsd_bus_message_append\fR(3)
 .RE
 .PP
+\fBSD_EVENT_ON\fR
+.RS 4
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_add_signal\fR(3),
+\fBsd_event_add_time\fR(3)
+.RE
+.PP
+\fBSD_EVENT_ONESHOT\fR
+.RS 4
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_add_time\fR(3)
+.RE
+.PP
 \fBSD_JOURNAL_APPEND\fR
 .RS 4
 \fBsd_journal_get_fd\fR(3)
@@ -5834,11 +6318,6 @@ Various constant used and/or defined by systemd\&.
 \fBsystemd\fR(1)
 .RE
 .PP
-\fBSIGRTMIN+29\fR
-.RS 4
-\fBsystemd\fR(1)
-.RE
-.PP
 \fBSIGRTMIN+3\fR
 .RS 4
 \fBsystemd\fR(1)
@@ -5924,6 +6403,31 @@ Various constant used and/or defined by systemd\&.
 \fBsystemd.socket\fR(5)
 .RE
 .PP
+\fBTCP_DEFER_ACCEPT\fR
+.RS 4
+\fBsystemd.socket\fR(5)
+.RE
+.PP
+\fBWCONTINUED\fR
+.RS 4
+\fBsd_event_add_child\fR(3)
+.RE
+.PP
+\fBWEXITED\fR
+.RS 4
+\fBsd_event_add_child\fR(3)
+.RE
+.PP
+\fBWSTOPPED\fR
+.RS 4
+\fBsd_event_add_child\fR(3)
+.RE
+.PP
+\fB_NSIG\fR
+.RS 4
+\fBdaemon\fR(7)
+.RE
+.PP
 \fB_SD_BUS_CREDS_ALL\fR
 .RS 4
 \fBsd_bus_creds_new_from_pid\fR(3)
@@ -5969,6 +6473,16 @@ Various constant used and/or defined by systemd\&.
 \fBsd_bus_error\fR(3)
 .RE
 .PP
+\fBhost\fR
+.RS 4
+\fBsystemd-journal-remote\fR(8)
+.RE
+.PP
+\fBhttps\fR
+.RS 4
+\fBsystemd-journal-upload\fR(8)
+.RE
+.PP
 \fBlate\fR
 .RS 4
 \fBudevadm\fR(8)
@@ -5995,8 +6509,13 @@ Various constant used and/or defined by systemd\&.
 \fBsd_bus_open_user\fR(3),
 \fBsd_bus_path_encode\fR(3),
 \fBsd_bus_request_name\fR(3),
+\fBsd_event_add_child\fR(3),
+\fBsd_event_add_defer\fR(3),
+\fBsd_event_add_signal\fR(3),
 \fBsd_event_add_time\fR(3),
+\fBsd_event_get_fd\fR(3),
 \fBsd_event_new\fR(3),
+\fBsd_event_set_name\fR(3),
 \fBsd_get_seats\fR(3),
 \fBsd_is_fifo\fR(3),
 \fBsd_journal_add_match\fR(3),
@@ -6015,6 +6534,7 @@ Various constant used and/or defined by systemd\&.
 \fBsd_journal_stream_fd\fR(3),
 \fBsd_listen_fds\fR(3),
 \fBsd_login_monitor_new\fR(3),
+\fBsd_machine_get_class\fR(3),
 \fBsd_notify\fR(3),
 \fBsd_pid_get_session\fR(3),
 \fBsd_seat_get_active\fR(3),
@@ -6048,6 +6568,11 @@ Various constant used and/or defined by systemd\&.
 \fBudevadm\fR(8)
 .RE
 .PP
+\fBnone\fR
+.RS 4
+\fBsystemd-journal-remote\fR(8)
+.RE
+.PP
 \fBpath\fR
 .RS 4
 \fBudevadm\fR(8)
@@ -6116,123 +6641,6 @@ Other configuration elements which don\*(Aqt fit in any of the above groups\&.
 \fBsystemd-journal-remote\fR(8)
 .RE
 .PP
-\fI\-EADDRINUSE\fR
-.RS 4
-\fBsd_bus_request_name\fR(3)
-.RE
-.PP
-\fI\-EALREADY\fR
-.RS 4
-\fBsd_bus_request_name\fR(3)
-.RE
-.PP
-\fB\-ECHILD\fR
-.RS 4
-\fBsd_bus_request_name\fR(3),
-\fBsd_event_add_time\fR(3)
-.RE
-.PP
-\fI\-EEXIST\fR
-.RS 4
-\fBsd_bus_request_name\fR(3)
-.RE
-.PP
-\fI\-EINVAL\fR
-.RS 4
-\fBsd_bus_creds_get_pid\fR(3),
-\fBsd_bus_creds_new_from_pid\fR(3),
-\fBsd_bus_error\fR(3),
-\fBsd_bus_message_append\fR(3),
-\fBsd_bus_message_append_array\fR(3),
-\fBsd_bus_message_append_basic\fR(3),
-\fBsd_bus_message_append_string_memfd\fR(3),
-\fBsd_bus_message_append_strv\fR(3),
-\fBsd_bus_message_get_cookie\fR(3),
-\fBsd_bus_message_get_monotonic_usec\fR(3),
-\fBsd_bus_open_user\fR(3),
-\fBsd_bus_request_name\fR(3),
-\fBsd_event_add_time\fR(3)
-.RE
-.PP
-\fI\-EMFILE\fR
-.RS 4
-\fBsd_event_new\fR(3)
-.RE
-.PP
-\fB\-ENODATA\fR
-.RS 4
-\fBsd_bus_creds_get_pid\fR(3),
-\fBsd_bus_message_get_cookie\fR(3),
-\fBsd_bus_message_get_monotonic_usec\fR(3)
-.RE
-.PP
-\fI\-ENOENT\fR
-.RS 4
-\fBsd_bus_creds_get_pid\fR(3)
-.RE
-.PP
-\fI\-ENOMEM\fR
-.RS 4
-\fBsd_bus_creds_get_pid\fR(3),
-\fBsd_bus_creds_new_from_pid\fR(3),
-\fBsd_bus_error\fR(3),
-\fBsd_bus_message_append\fR(3),
-\fBsd_bus_message_append_array\fR(3),
-\fBsd_bus_message_append_basic\fR(3),
-\fBsd_bus_message_append_string_memfd\fR(3),
-\fBsd_bus_message_append_strv\fR(3),
-\fBsd_bus_new\fR(3),
-\fBsd_bus_open_user\fR(3),
-\fBsd_event_add_time\fR(3),
-\fBsd_event_new\fR(3)
-.RE
-.PP
-\fI\-ENOTCONN\fR
-.RS 4
-\fBsd_bus_request_name\fR(3)
-.RE
-.PP
-\fI\-ENOTSUP\fR
-.RS 4
-\fBsd_event_add_time\fR(3)
-.RE
-.PP
-\fB\-ENXIO\fR
-.RS 4
-\fBsd_bus_creds_get_pid\fR(3),
-\fBsd_bus_message_append\fR(3),
-\fBsd_bus_message_append_array\fR(3),
-\fBsd_bus_message_append_basic\fR(3),
-\fBsd_bus_message_append_string_memfd\fR(3),
-\fBsd_bus_message_append_strv\fR(3)
-.RE
-.PP
-\fI\-EPERM\fR
-.RS 4
-\fBsd_bus_message_append\fR(3),
-\fBsd_bus_message_append_array\fR(3),
-\fBsd_bus_message_append_basic\fR(3),
-\fBsd_bus_message_append_string_memfd\fR(3),
-\fBsd_bus_message_append_strv\fR(3),
-\fBsd_bus_negotiate_fds\fR(3)
-.RE
-.PP
-\fI\-ESRCH\fR
-.RS 4
-\fBsd_bus_creds_new_from_pid\fR(3),
-\fBsd_bus_request_name\fR(3)
-.RE
-.PP
-\fI\-ESTALE\fR
-.RS 4
-\fBsd_bus_message_append\fR(3),
-\fBsd_bus_message_append_array\fR(3),
-\fBsd_bus_message_append_basic\fR(3),
-\fBsd_bus_message_append_string_memfd\fR(3),
-\fBsd_bus_message_append_strv\fR(3),
-\fBsd_event_add_time\fR(3)
-.RE
-.PP
 \fIANSI_COLOR=\fR
 .RS 4
 \fBos-release\fR(5)
@@ -6274,6 +6682,11 @@ Other configuration elements which don\*(Aqt fit in any of the above groups\&.
 \fBtmpfiles.d\fR(5)
 .RE
 .PP
+\fIDEPLOYMENT=\fR
+.RS 4
+\fBmachine-info\fR(5)
+.RE
+.PP
 \fIExternalSizeMax=\fR
 .RS 4
 \fBcoredump.conf\fR(5)
@@ -6334,6 +6747,11 @@ Other configuration elements which don\*(Aqt fit in any of the above groups\&.
 \fBlogind.conf\fR(5)
 .RE
 .PP
+\fIHandleLidSwitchDocked=\fR
+.RS 4
+\fBlogind.conf\fR(5)
+.RE
+.PP
 \fIHandlePowerKey=\fR
 .RS 4
 \fBlogind.conf\fR(5)
@@ -6424,6 +6842,11 @@ Other configuration elements which don\*(Aqt fit in any of the above groups\&.
 \fBtmpfiles.d\fR(5)
 .RE
 .PP
+\fILOCATION=\fR
+.RS 4
+\fBmachine-info\fR(5)
+.RE
+.PP
 \fILidSwitchIgnoreInhibited=\fR
 .RS 4
 \fBlogind.conf\fR(5)
@@ -6718,6 +7141,7 @@ Other configuration elements which don\*(Aqt fit in any of the above groups\&.
 .PP
 \fBr\fR
 .RS 4
+\fBsysusers.d\fR(5),
 \fBtmpfiles.d\fR(5)
 .RE
 .PP
@@ -6738,7 +7162,7 @@ Other configuration elements which don\*(Aqt fit in any of the above groups\&.
 .PP
 \fIudev_log\fR
 .RS 4
-\fBsystemd-udevd.service\fR(8)
+\fBudev.conf\fR(5)
 .RE
 .PP
 \fIunchanged\fR
@@ -6783,19 +7207,29 @@ $HOME/\&.config/systemd/user/
 \fBsystemd.unit\fR(5)
 .RE
 .PP
+$HOME/\&.local/share/systemd/user/
+.RS 4
+\fBsystemd.unit\fR(5)
+.RE
+.PP
 $XDG_CONFIG_HOME/systemd/user/
 .RS 4
 \fBsystemd.unit\fR(5)
 .RE
 .PP
-\-\&.slice
+$XDG_DATA_HOME/systemd/user/
 .RS 4
-\fBsystemd.special\fR(7)
+\fBsystemd.unit\fR(5)
 .RE
 .PP
-/\&.readahead
+$XDG_RUNTIME_DIR/systemd/user/
 .RS 4
-\fBsystemd-readahead-replay.service\fR(8)
+\fBsystemd.unit\fR(5)
+.RE
+.PP
+\-\&.slice
+.RS 4
+\fBsystemd.special\fR(7)
 .RE
 .PP
 /bin
@@ -6841,6 +7275,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd.exec\fR(5)
 .RE
 .PP
+/dev/disk/by\-foo/bar
+.RS 4
+\fBsystemd-hibernate-resume-generator\fR(8)
+.RE
+.PP
 /dev/full
 .RS 4
 \fBsystemd.resource-control\fR(5)
@@ -6891,6 +7330,7 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd.preset\fR(5),
 \fBsystemd.resource-control\fR(5),
 \fBsystemd.unit\fR(5),
+\fBsysusers.d\fR(5),
 \fBtmpfiles.d\fR(5),
 \fBudev\fR(7)
 .RE
@@ -6953,7 +7393,8 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd.network\fR(5),
 \fBsystemd.preset\fR(5),
 \fBsystemd.unit\fR(5),
-\fBudev\fR(7)
+\fBudev\fR(7),
+\fBudevadm\fR(8)
 .RE
 .PP
 /etc/\&.updated
@@ -7091,6 +7532,7 @@ $XDG_CONFIG_HOME/systemd/user/
 .PP
 /etc/resolv\&.conf
 .RS 4
+\fBresolved.conf\fR(5),
 \fBsystemd-resolved.service\fR(8)
 .RE
 .PP
@@ -7125,6 +7567,16 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBcoredump.conf\fR(5)
 .RE
 .PP
+/etc/systemd/journal\-remote\&.conf
+.RS 4
+\fBsystemd-journal-upload\fR(8)
+.RE
+.PP
+/etc/systemd/journal\-upload\&.conf
+.RS 4
+\fBsystemd-journal-upload\fR(8)
+.RE
+.PP
 /etc/systemd/journald\&.conf
 .RS 4
 \fBjournald.conf\fR(5),
@@ -7180,6 +7632,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-system.conf\fR(5)
 .RE
 .PP
+/etc/systemd/timesyncd\&.conf
+.RS 4
+\fBtimesyncd.conf\fR(5)
+.RE
+.PP
 /etc/systemd/user/
 .RS 4
 \fBsystemd.unit\fR(5)
@@ -7195,6 +7652,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-system.conf\fR(5)
 .RE
 .PP
+/etc/sysusers\&.d
+.RS 4
+\fBsysusers.d\fR(5)
+.RE
+.PP
 /etc/tmpfiles\&.d
 .RS 4
 \fBtmpfiles.d\fR(5)
@@ -7213,7 +7675,8 @@ $XDG_CONFIG_HOME/systemd/user/
 .PP
 /etc/udev/hwdb\&.d
 .RS 4
-\fBudev\fR(7)
+\fBudev\fR(7),
+\fBudevadm\fR(8)
 .RE
 .PP
 /etc/udev/rules\&.d
@@ -7221,14 +7684,14 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBudev\fR(7)
 .RE
 .PP
-/etc/udev/rules\&.d/99\-bridge\&.conf
+/etc/udev/rules\&.d/99\-bridge\&.rules
 .RS 4
 \fBsysctl.d\fR(5)
 .RE
 .PP
 /etc/udev/udev\&.conf
 .RS 4
-\fBsystemd-udevd.service\fR(8)
+\fBudev.conf\fR(5)
 .RE
 .PP
 /etc/vconsole\&.conf
@@ -7400,6 +7863,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-journald.service\fR(8)
 .RE
 .PP
+/run/systemd/log
+.RS 4
+\fBjournalctl\fR(1)
+.RE
+.PP
 /run/systemd/network
 .RS 4
 \fBsystemd-networkd.service\fR(8),
@@ -7418,11 +7886,6 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd\fR(1)
 .RE
 .PP
-/run/systemd/readahead/
-.RS 4
-\fBsd_readahead\fR(3)
-.RE
-.PP
 /run/systemd/resolve/resolv\&.conf
 .RS 4
 \fBsystemd-resolved.service\fR(8)
@@ -7454,6 +7917,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd.preset\fR(5)
 .RE
 .PP
+/run/sysusers\&.d
+.RS 4
+\fBsysusers.d\fR(5)
+.RE
+.PP
 /run/tmpfiles\&.d
 .RS 4
 \fBtmpfiles.d\fR(5)
@@ -7506,7 +7974,7 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBbootchart.conf\fR(5)
 .RE
 .PP
-/sbin/login
+/sbin/nologin
 .RS 4
 \fBsysusers.d\fR(5)
 .RE
@@ -7554,6 +8022,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-sleep.conf\fR(5)
 .RE
 .PP
+/sys/power/resume
+.RS 4
+\fBsystemd-hibernate-resume@.service\fR(8)
+.RE
+.PP
 /sys/power/state
 .RS 4
 \fBsystemd-sleep.conf\fR(5),
@@ -7599,6 +8072,8 @@ $XDG_CONFIG_HOME/systemd/user/
 .RS 4
 \fBbootup\fR(7),
 \fBfile-hierarchy\fR(7),
+\fBsystemd-fstab-generator\fR(8),
+\fBsystemd-nspawn\fR(1),
 \fBsystemd-remount-fs.service\fR(8),
 \fBsystemd-update-done.service\fR(8),
 \fBsystemd.exec\fR(5),
@@ -7673,6 +8148,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsysctl.d\fR(5)
 .RE
 .PP
+/usr/lib/sysctl\&.d/50\-coredump\&.conf
+.RS 4
+\fBsystemd-coredump\fR(8)
+.RE
+.PP
 /usr/lib/systemd/network
 .RS 4
 \fBsystemd-networkd.service\fR(8),
@@ -7717,6 +8197,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-gpt-auto-generator\fR(8)
 .RE
 .PP
+/usr/lib/systemd/system\-generators/systemd\-hibernate\-resume\-generator
+.RS 4
+\fBsystemd-hibernate-resume-generator\fR(8)
+.RE
+.PP
 /usr/lib/systemd/system\-generators/systemd\-system\-update\-generator
 .RS 4
 \fBsystemd-system-update-generator\fR(8)
@@ -7742,7 +8227,7 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-halt.service\fR(8)
 .RE
 .PP
-/usr/lib/systemd/system\-sleep/
+/usr/lib/systemd/system\-sleep
 .RS 4
 \fBsystemd-suspend.service\fR(8)
 .RE
@@ -7772,6 +8257,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-bus-proxyd\fR(8)
 .RE
 .PP
+/usr/lib/systemd/systemd\-coredump
+.RS 4
+\fBsystemd-coredump\fR(8)
+.RE
+.PP
 /usr/lib/systemd/systemd\-cryptsetup
 .RS 4
 \fBsystemd-cryptsetup@.service\fR(8)
@@ -7782,6 +8272,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-fsck@.service\fR(8)
 .RE
 .PP
+/usr/lib/systemd/systemd\-hibernate\-resume
+.RS 4
+\fBsystemd-hibernate-resume@.service\fR(8)
+.RE
+.PP
 /usr/lib/systemd/systemd\-hostnamed
 .RS 4
 \fBsystemd-hostnamed.service\fR(8)
@@ -7842,11 +8337,6 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-random-seed.service\fR(8)
 .RE
 .PP
-\fB/usr/lib/systemd/systemd\-readahead/systemd\-readahead\fR
-.RS 4
-\fBsystemd-readahead-replay.service\fR(8)
-.RE
-.PP
 /usr/lib/systemd/systemd\-remount\-fs
 .RS 4
 \fBsystemd-remount-fs.service\fR(8)
@@ -7872,11 +8362,6 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd-shutdownd.service\fR(8)
 .RE
 .PP
-/usr/lib/systemd/systemd\-sleep
-.RS 4
-\fBsystemd-suspend.service\fR(8)
-.RE
-.PP
 /usr/lib/systemd/systemd\-sysctl
 .RS 4
 \fBsystemd-sysctl.service\fR(8)
@@ -7927,7 +8412,7 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBsystemd.preset\fR(5)
 .RE
 .PP
-/usr/lib/sysusers\&.d/
+/usr/lib/sysusers\&.d
 .RS 4
 \fBsysusers.d\fR(5)
 .RE
@@ -7952,6 +8437,12 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBudev\fR(7)
 .RE
 .PP
+/usr/lib/udev/hwdb\&.bin
+.RS 4
+\fBudev\fR(7),
+\fBudevadm\fR(8)
+.RE
+.PP
 /usr/lib/udev/hwdb\&.d
 .RS 4
 \fBudev\fR(7)
@@ -8057,7 +8548,13 @@ $XDG_CONFIG_HOME/systemd/user/
 .PP
 /var/lib/systemd/coredump
 .RS 4
-\fBcoredump.conf\fR(5)
+\fBcoredump.conf\fR(5),
+\fBsystemd-coredump\fR(8)
+.RE
+.PP
+/var/lib/systemd/journal\-upload/state
+.RS 4
+\fBsystemd-journal-upload\fR(8)
 .RE
 .PP
 /var/lib/systemd/random\-seed
@@ -8078,11 +8575,15 @@ $XDG_CONFIG_HOME/systemd/user/
 /var/log/journal
 .RS 4
 \fBjournald.conf\fR(5),
-\fBsystemd-journal-remote\fR(8),
 \fBsystemd-journald.service\fR(8),
 \fBsystemd-nspawn\fR(1)
 .RE
 .PP
+/var/log/journal/remote/
+.RS 4
+\fBsystemd-journal-remote\fR(8)
+.RE
+.PP
 /var/log/journal/some\&.host/remote\-some~host\&.journal
 .RS 4
 \fBsystemd-journal-remote\fR(8)
@@ -8109,6 +8610,11 @@ $XDG_CONFIG_HOME/systemd/user/
 \fBfile-hierarchy\fR(7)
 .RE
 .PP
+/var/systemd/log
+.RS 4
+\fBjournalctl\fR(1)
+.RE
+.PP
 /var/tmp
 .RS 4
 \fBfile-hierarchy\fR(7),
@@ -8659,6 +9165,21 @@ systemd\-cryptsetup@\&.service
 \fBsystemd-detect-virt\fR(1)
 .RE
 .PP
+\fBsystemd\-escape\fR
+.RS 4
+\fBsystemd-escape\fR(1)
+.RE
+.PP
+\fBsystemd\-firstboot\fR
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
+systemd\-firstboot\&.service
+.RS 4
+\fBsystemd-firstboot\fR(1)
+.RE
+.PP
 systemd\-fsck\-root\&.service
 .RS 4
 \fBsystemd-fsck@.service\fR(8)
@@ -8674,6 +9195,11 @@ systemd\-halt\&.service
 \fBsystemd-halt.service\fR(8)
 .RE
 .PP
+systemd\-hibernate\-resume@\&.service
+.RS 4
+\fBsystemd-hibernate-resume@.service\fR(8)
+.RE
+.PP
 systemd\-hibernate\&.service
 .RS 4
 \fBsystemd-suspend.service\fR(8)
@@ -8719,6 +9245,11 @@ systemd\-journal\-gatewayd\&.socket
 \fBsystemd-journal-remote\fR(8)
 .RE
 .PP
+\fBsystemd\-journal\-upload\fR
+.RS 4
+\fBsystemd-journal-upload\fR(8)
+.RE
+.PP
 systemd\-journald\-dev\-log\&.socket
 .RS 4
 \fBsystemd-journald.service\fR(8)
@@ -8804,26 +9335,6 @@ systemd\-random\-seed\&.service
 \fBsystemd-random-seed.service\fR(8)
 .RE
 .PP
-systemd\-readahead\-collect\&.service
-.RS 4
-\fBsystemd-readahead-replay.service\fR(8)
-.RE
-.PP
-systemd\-readahead\-done\&.service
-.RS 4
-\fBsystemd-readahead-replay.service\fR(8)
-.RE
-.PP
-systemd\-readahead\-done\&.timer
-.RS 4
-\fBsystemd-readahead-replay.service\fR(8)
-.RE
-.PP
-systemd\-readahead\-replay\&.service
-.RS 4
-\fBsystemd-readahead-replay.service\fR(8)
-.RE
-.PP
 systemd\-reboot\&.service
 .RS 4
 \fBsystemd-halt.service\fR(8)
@@ -9012,4 +9523,4 @@ user\&.slice
 .RE
 .SH "COLOPHON"
 .PP
-This index contains 1621 entries in 14 sections, referring to 177 individual manual pages\&.
+This index contains 1709 entries in 14 sections, referring to 189 individual manual pages\&.
index d50976a6f3a58e97383171398a61c813837931df..0201be995bf6adbdcedc46f6a002889610d0b336 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.directives"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.directives — Index of configuration directives</p></div><div class="refsect1"><a name="idm214182825408"></a><h2 id="Unit directives">Unit directives<a class="headerlink" title="Permalink to this headline" href="#Unit%20directives">¶</a></h2><p>Directives for configuring units, used in unit
-                files.</p><div class="variablelist"><a name="unit-directives"></a><dl class="variablelist"><dt id="Accept="><span class="term"><code class="varname">Accept=</code></span><a class="headerlink" title="Permalink to this term" href="#Accept=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="AccuracySec="><span class="term"><code class="varname">AccuracySec=</code></span><a class="headerlink" title="Permalink to this term" href="#AccuracySec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="After="><span class="term"><code class="varname">After=</code></span><a class="headerlink" title="Permalink to this term" href="#After=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Alias="><span class="term"><code class="varname">Alias=</code></span><a class="headerlink" title="Permalink to this term" href="#Alias=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="AllowIsolate="><span class="term"><code class="varname">AllowIsolate=</code></span><a class="headerlink" title="Permalink to this term" href="#AllowIsolate=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Also="><span class="term"><code class="varname">Also=</code></span><a class="headerlink" title="Permalink to this term" href="#Also=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="AppArmorProfile="><span class="term"><code class="varname">AppArmorProfile=</code></span><a class="headerlink" title="Permalink to this term" href="#AppArmorProfile=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Backlog="><span class="term"><code class="varname">Backlog=</code></span><a class="headerlink" title="Permalink to this term" href="#Backlog=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Before="><span class="term"><code class="varname">Before=</code></span><a class="headerlink" title="Permalink to this term" href="#Before=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="BindIPv6Only="><span class="term"><code class="varname">BindIPv6Only=</code></span><a class="headerlink" title="Permalink to this term" href="#BindIPv6Only=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="BindToDevice="><span class="term"><code class="varname">BindToDevice=</code></span><a class="headerlink" title="Permalink to this term" href="#BindToDevice=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="BindsTo="><span class="term"><code class="varname">BindsTo=</code></span><a class="headerlink" title="Permalink to this term" href="#BindsTo=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="BlockIOAccounting="><span class="term"><code class="varname">BlockIOAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOAccounting=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIODeviceWeight="><span class="term"><code class="varname">BlockIODeviceWeight=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIODeviceWeight=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIOReadBandwidth="><span class="term"><code class="varname">BlockIOReadBandwidth=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOReadBandwidth=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIOWeight="><span class="term"><code class="varname">BlockIOWeight=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOWeight=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIOWriteBandwidth="><span class="term"><code class="varname">BlockIOWriteBandwidth=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOWriteBandwidth=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="Broadcast="><span class="term"><code class="varname">Broadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#Broadcast=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="BusName="><span class="term"><code class="varname">BusName=</code></span><a class="headerlink" title="Permalink to this term" href="#BusName=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="CPUAccounting="><span class="term"><code class="varname">CPUAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAccounting=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="CPUAffinity="><span class="term"><code class="varname">CPUAffinity=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAffinity=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUQuota="><span class="term"><code class="varname">CPUQuota=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUQuota=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="CPUSchedulingPolicy="><span class="term"><code class="varname">CPUSchedulingPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingPolicy=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUSchedulingPriority="><span class="term"><code class="varname">CPUSchedulingPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingPriority=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUSchedulingResetOnFork="><span class="term"><code class="varname">CPUSchedulingResetOnFork=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingResetOnFork=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUShares="><span class="term"><code class="varname">CPUShares=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUShares=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="Capabilities="><span class="term"><code class="varname">Capabilities=</code></span><a class="headerlink" title="Permalink to this term" href="#Capabilities=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CapabilityBoundingSet="><span class="term"><code class="varname">CapabilityBoundingSet=</code></span><a class="headerlink" title="Permalink to this term" href="#CapabilityBoundingSet=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ConditionACPower="><span class="term"><code class="varname">ConditionACPower=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionACPower=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionArchitecture="><span class="term"><code class="varname">ConditionArchitecture=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionArchitecture=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionCapability="><span class="term"><code class="varname">ConditionCapability=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionCapability=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionDirectoryNotEmpty="><span class="term"><code class="varname">ConditionDirectoryNotEmpty=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionDirectoryNotEmpty=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionFileIsExecutable="><span class="term"><code class="varname">ConditionFileIsExecutable=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionFileIsExecutable=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionFileNotEmpty="><span class="term"><code class="varname">ConditionFileNotEmpty=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionFileNotEmpty=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionHost="><span class="term"><code class="varname">ConditionHost=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionHost=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionKernelCommandLine="><span class="term"><code class="varname">ConditionKernelCommandLine=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionKernelCommandLine=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionNeedsUpdate="><span class="term"><code class="varname">ConditionNeedsUpdate=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionNeedsUpdate=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionNull="><span class="term"><code class="varname">ConditionNull=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionNull=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathExists="><span class="term"><code class="varname">ConditionPathExists=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathExists=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathExistsGlob="><span class="term"><code class="varname">ConditionPathExistsGlob=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathExistsGlob=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsDirectory="><span class="term"><code class="varname">ConditionPathIsDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsDirectory=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsMountPoint="><span class="term"><code class="varname">ConditionPathIsMountPoint=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsMountPoint=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsReadWrite="><span class="term"><code class="varname">ConditionPathIsReadWrite=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsReadWrite=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsSymbolicLink="><span class="term"><code class="varname">ConditionPathIsSymbolicLink=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsSymbolicLink=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionSecurity="><span class="term"><code class="varname">ConditionSecurity=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionSecurity=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionVirtualization="><span class="term"><code class="varname">ConditionVirtualization=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionVirtualization=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Conflicts="><span class="term"><code class="varname">Conflicts=</code></span><a class="headerlink" title="Permalink to this term" href="#Conflicts=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="DefaultDependencies="><span class="term"><code class="varname">DefaultDependencies=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultDependencies=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="DefaultInstance="><span class="term"><code class="varname">DefaultInstance=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultInstance=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="DeviceAllow="><span class="term"><code class="varname">DeviceAllow=</code></span><a class="headerlink" title="Permalink to this term" href="#DeviceAllow=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="DevicePolicy="><span class="term"><code class="varname">DevicePolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#DevicePolicy=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="DirectoryMode="><span class="term"><code class="varname">DirectoryMode=</code></span><a class="headerlink" title="Permalink to this term" href="#DirectoryMode=">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="DirectoryNotEmpty="><span class="term"><code class="varname">DirectoryNotEmpty=</code></span><a class="headerlink" title="Permalink to this term" href="#DirectoryNotEmpty=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="Documentation="><span class="term"><code class="varname">Documentation=</code></span><a class="headerlink" title="Permalink to this term" href="#Documentation=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Environment="><span class="term"><code class="varname">Environment=</code></span><a class="headerlink" title="Permalink to this term" href="#Environment=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="EnvironmentFile="><span class="term"><code class="varname">EnvironmentFile=</code></span><a class="headerlink" title="Permalink to this term" href="#EnvironmentFile=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ExecReload="><span class="term"><code class="varname">ExecReload=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecReload=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ExecStart="><span class="term"><code class="varname">ExecStart=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStart=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ExecStartPost="><span class="term"><code class="varname">ExecStartPost=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStartPost=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ExecStartPre="><span class="term"><code class="varname">ExecStartPre=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStartPre=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ExecStop="><span class="term"><code class="varname">ExecStop=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStop=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ExecStopPost="><span class="term"><code class="varname">ExecStopPost=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStopPost=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ExecStopPre="><span class="term"><code class="varname">ExecStopPre=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStopPre=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="FailureAction="><span class="term"><code class="varname">FailureAction=</code></span><a class="headerlink" title="Permalink to this term" href="#FailureAction=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="FreeBind="><span class="term"><code class="varname">FreeBind=</code></span><a class="headerlink" title="Permalink to this term" href="#FreeBind=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Group="><span class="term"><code class="varname">Group=</code></span><a class="headerlink" title="Permalink to this term" href="#Group=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="GuessMainPID="><span class="term"><code class="varname">GuessMainPID=</code></span><a class="headerlink" title="Permalink to this term" href="#GuessMainPID=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="IOSchedulingClass="><span class="term"><code class="varname">IOSchedulingClass=</code></span><a class="headerlink" title="Permalink to this term" href="#IOSchedulingClass=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="IOSchedulingPriority="><span class="term"><code class="varname">IOSchedulingPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#IOSchedulingPriority=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="IPTOS="><span class="term"><code class="varname">IPTOS=</code></span><a class="headerlink" title="Permalink to this term" href="#IPTOS=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="IPTTL="><span class="term"><code class="varname">IPTTL=</code></span><a class="headerlink" title="Permalink to this term" href="#IPTTL=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="IgnoreOnIsolate="><span class="term"><code class="varname">IgnoreOnIsolate=</code></span><a class="headerlink" title="Permalink to this term" href="#IgnoreOnIsolate=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="IgnoreOnSnapshot="><span class="term"><code class="varname">IgnoreOnSnapshot=</code></span><a class="headerlink" title="Permalink to this term" href="#IgnoreOnSnapshot=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="IgnoreSIGPIPE="><span class="term"><code class="varname">IgnoreSIGPIPE=</code></span><a class="headerlink" title="Permalink to this term" href="#IgnoreSIGPIPE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="InaccessibleDirectories="><span class="term"><code class="varname">InaccessibleDirectories=</code></span><a class="headerlink" title="Permalink to this term" href="#InaccessibleDirectories=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="JobTimeoutSec="><span class="term"><code class="varname">JobTimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#JobTimeoutSec=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="JoinsNamespaceOf="><span class="term"><code class="varname">JoinsNamespaceOf=</code></span><a class="headerlink" title="Permalink to this term" href="#JoinsNamespaceOf=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="KeepAlive="><span class="term"><code class="varname">KeepAlive=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAlive=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="KillMode="><span class="term"><code class="varname">KillMode=</code></span><a class="headerlink" title="Permalink to this term" href="#KillMode=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="KillSignal="><span class="term"><code class="varname">KillSignal=</code></span><a class="headerlink" title="Permalink to this term" href="#KillSignal=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="LimitAS="><span class="term"><code class="varname">LimitAS=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitAS=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitCORE="><span class="term"><code class="varname">LimitCORE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitCORE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitCPU="><span class="term"><code class="varname">LimitCPU=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitCPU=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitDATA="><span class="term"><code class="varname">LimitDATA=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitDATA=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitFSIZE="><span class="term"><code class="varname">LimitFSIZE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitFSIZE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitLOCKS="><span class="term"><code class="varname">LimitLOCKS=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitLOCKS=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitMEMLOCK="><span class="term"><code class="varname">LimitMEMLOCK=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitMEMLOCK=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitMSGQUEUE="><span class="term"><code class="varname">LimitMSGQUEUE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitMSGQUEUE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitNICE="><span class="term"><code class="varname">LimitNICE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitNICE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitNOFILE="><span class="term"><code class="varname">LimitNOFILE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitNOFILE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitNPROC="><span class="term"><code class="varname">LimitNPROC=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitNPROC=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitRSS="><span class="term"><code class="varname">LimitRSS=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitRSS=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitRTPRIO="><span class="term"><code class="varname">LimitRTPRIO=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitRTPRIO=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitRTTIME="><span class="term"><code class="varname">LimitRTTIME=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitRTTIME=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitSIGPENDING="><span class="term"><code class="varname">LimitSIGPENDING=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitSIGPENDING=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitSTACK="><span class="term"><code class="varname">LimitSTACK=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitSTACK=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ListenDatagram="><span class="term"><code class="varname">ListenDatagram=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenDatagram=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenFIFO="><span class="term"><code class="varname">ListenFIFO=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenFIFO=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenMessageQueue="><span class="term"><code class="varname">ListenMessageQueue=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenMessageQueue=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenNetlink="><span class="term"><code class="varname">ListenNetlink=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenNetlink=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenSequentialPacket="><span class="term"><code class="varname">ListenSequentialPacket=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenSequentialPacket=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenSpecial="><span class="term"><code class="varname">ListenSpecial=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenSpecial=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenStream="><span class="term"><code class="varname">ListenStream=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenStream=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MakeDirectory="><span class="term"><code class="varname">MakeDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#MakeDirectory=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="Mark="><span class="term"><code class="varname">Mark=</code></span><a class="headerlink" title="Permalink to this term" href="#Mark=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MaxConnections="><span class="term"><code class="varname">MaxConnections=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxConnections=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MemoryAccounting="><span class="term"><code class="varname">MemoryAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#MemoryAccounting=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="MemoryLimit="><span class="term"><code class="varname">MemoryLimit=</code></span><a class="headerlink" title="Permalink to this term" href="#MemoryLimit=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="MessageQueueMaxMessages="><span class="term"><code class="varname">MessageQueueMaxMessages=</code></span><a class="headerlink" title="Permalink to this term" href="#MessageQueueMaxMessages=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MessageQueueMessageSize="><span class="term"><code class="varname">MessageQueueMessageSize=</code></span><a class="headerlink" title="Permalink to this term" href="#MessageQueueMessageSize=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MountFlags="><span class="term"><code class="varname">MountFlags=</code></span><a class="headerlink" title="Permalink to this term" href="#MountFlags=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Nice="><span class="term"><code class="varname">Nice=</code></span><a class="headerlink" title="Permalink to this term" href="#Nice=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="NoNewPrivileges="><span class="term"><code class="varname">NoNewPrivileges=</code></span><a class="headerlink" title="Permalink to this term" href="#NoNewPrivileges=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="NonBlocking="><span class="term"><code class="varname">NonBlocking=</code></span><a class="headerlink" title="Permalink to this term" href="#NonBlocking=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="NotifyAccess="><span class="term"><code class="varname">NotifyAccess=</code></span><a class="headerlink" title="Permalink to this term" href="#NotifyAccess=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="OOMScoreAdjust="><span class="term"><code class="varname">OOMScoreAdjust=</code></span><a class="headerlink" title="Permalink to this term" href="#OOMScoreAdjust=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="OnActiveSec="><span class="term"><code class="varname">OnActiveSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnActiveSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnBootSec="><span class="term"><code class="varname">OnBootSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnBootSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnCalendar="><span class="term"><code class="varname">OnCalendar=</code></span><a class="headerlink" title="Permalink to this term" href="#OnCalendar=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnFailure="><span class="term"><code class="varname">OnFailure=</code></span><a class="headerlink" title="Permalink to this term" href="#OnFailure=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="OnFailureJobMode="><span class="term"><code class="varname">OnFailureJobMode=</code></span><a class="headerlink" title="Permalink to this term" href="#OnFailureJobMode=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="OnStartupSec="><span class="term"><code class="varname">OnStartupSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnStartupSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnUnitActiveSec="><span class="term"><code class="varname">OnUnitActiveSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnUnitActiveSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnUnitInactiveSec="><span class="term"><code class="varname">OnUnitInactiveSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnUnitInactiveSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="Options="><span class="term"><code class="varname">Options=</code></span><a class="headerlink" title="Permalink to this term" href="#Options=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="PAMName="><span class="term"><code class="varname">PAMName=</code></span><a class="headerlink" title="Permalink to this term" href="#PAMName=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PIDFile="><span class="term"><code class="varname">PIDFile=</code></span><a class="headerlink" title="Permalink to this term" href="#PIDFile=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="PartOf="><span class="term"><code class="varname">PartOf=</code></span><a class="headerlink" title="Permalink to this term" href="#PartOf=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="PassCredentials="><span class="term"><code class="varname">PassCredentials=</code></span><a class="headerlink" title="Permalink to this term" href="#PassCredentials=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="PassSecurity="><span class="term"><code class="varname">PassSecurity=</code></span><a class="headerlink" title="Permalink to this term" href="#PassSecurity=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="PathChanged="><span class="term"><code class="varname">PathChanged=</code></span><a class="headerlink" title="Permalink to this term" href="#PathChanged=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PathExists="><span class="term"><code class="varname">PathExists=</code></span><a class="headerlink" title="Permalink to this term" href="#PathExists=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PathExistsGlob="><span class="term"><code class="varname">PathExistsGlob=</code></span><a class="headerlink" title="Permalink to this term" href="#PathExistsGlob=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PathModified="><span class="term"><code class="varname">PathModified=</code></span><a class="headerlink" title="Permalink to this term" href="#PathModified=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PermissionsStartOnly="><span class="term"><code class="varname">PermissionsStartOnly=</code></span><a class="headerlink" title="Permalink to this term" href="#PermissionsStartOnly=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="Persistent="><span class="term"><code class="varname">Persistent=</code></span><a class="headerlink" title="Permalink to this term" href="#Persistent=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="Personality="><span class="term"><code class="varname">Personality=</code></span><a class="headerlink" title="Permalink to this term" href="#Personality=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PipeSize="><span class="term"><code class="varname">PipeSize=</code></span><a class="headerlink" title="Permalink to this term" href="#PipeSize=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Priority="><span class="term"><code class="varname">Priority=</code></span><a class="headerlink" title="Permalink to this term" href="#Priority=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="PrivateDevices="><span class="term"><code class="varname">PrivateDevices=</code></span><a class="headerlink" title="Permalink to this term" href="#PrivateDevices=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PrivateNetwork="><span class="term"><code class="varname">PrivateNetwork=</code></span><a class="headerlink" title="Permalink to this term" href="#PrivateNetwork=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PrivateTmp="><span class="term"><code class="varname">PrivateTmp=</code></span><a class="headerlink" title="Permalink to this term" href="#PrivateTmp=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PropagatesReloadTo="><span class="term"><code class="varname">PropagatesReloadTo=</code></span><a class="headerlink" title="Permalink to this term" href="#PropagatesReloadTo=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ProtectHome="><span class="term"><code class="varname">ProtectHome=</code></span><a class="headerlink" title="Permalink to this term" href="#ProtectHome=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ProtectSystem="><span class="term"><code class="varname">ProtectSystem=</code></span><a class="headerlink" title="Permalink to this term" href="#ProtectSystem=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ReadOnlyDirectories="><span class="term"><code class="varname">ReadOnlyDirectories=</code></span><a class="headerlink" title="Permalink to this term" href="#ReadOnlyDirectories=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ReadWriteDirectories="><span class="term"><code class="varname">ReadWriteDirectories=</code></span><a class="headerlink" title="Permalink to this term" href="#ReadWriteDirectories=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="RebootArgument="><span class="term"><code class="varname">RebootArgument=</code></span><a class="headerlink" title="Permalink to this term" href="#RebootArgument=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ReceiveBuffer="><span class="term"><code class="varname">ReceiveBuffer=</code></span><a class="headerlink" title="Permalink to this term" href="#ReceiveBuffer=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="RefuseManualStart="><span class="term"><code class="varname">RefuseManualStart=</code></span><a class="headerlink" title="Permalink to this term" href="#RefuseManualStart=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RefuseManualStop="><span class="term"><code class="varname">RefuseManualStop=</code></span><a class="headerlink" title="Permalink to this term" href="#RefuseManualStop=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ReloadPropagatedFrom="><span class="term"><code class="varname">ReloadPropagatedFrom=</code></span><a class="headerlink" title="Permalink to this term" href="#ReloadPropagatedFrom=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RemainAfterExit="><span class="term"><code class="varname">RemainAfterExit=</code></span><a class="headerlink" title="Permalink to this term" href="#RemainAfterExit=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RemoveOnStop="><span class="term"><code class="varname">RemoveOnStop=</code></span><a class="headerlink" title="Permalink to this term" href="#RemoveOnStop=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="RequiredBy="><span class="term"><code class="varname">RequiredBy=</code></span><a class="headerlink" title="Permalink to this term" href="#RequiredBy=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Requires="><span class="term"><code class="varname">Requires=</code></span><a class="headerlink" title="Permalink to this term" href="#Requires=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RequiresMountsFor="><span class="term"><code class="varname">RequiresMountsFor=</code></span><a class="headerlink" title="Permalink to this term" href="#RequiresMountsFor=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RequiresOverridable="><span class="term"><code class="varname">RequiresOverridable=</code></span><a class="headerlink" title="Permalink to this term" href="#RequiresOverridable=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Requisite="><span class="term"><code class="varname">Requisite=</code></span><a class="headerlink" title="Permalink to this term" href="#Requisite=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RequisiteOverridable="><span class="term"><code class="varname">RequisiteOverridable=</code></span><a class="headerlink" title="Permalink to this term" href="#RequisiteOverridable=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Restart="><span class="term"><code class="varname">Restart=</code></span><a class="headerlink" title="Permalink to this term" href="#Restart=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestartForceExitStatus="><span class="term"><code class="varname">RestartForceExitStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#RestartForceExitStatus=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestartPreventExitStatus="><span class="term"><code class="varname">RestartPreventExitStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#RestartPreventExitStatus=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestartSec="><span class="term"><code class="varname">RestartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#RestartSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestrictAddressFamilies="><span class="term"><code class="varname">RestrictAddressFamilies=</code></span><a class="headerlink" title="Permalink to this term" href="#RestrictAddressFamilies=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ReusePort="><span class="term"><code class="varname">ReusePort=</code></span><a class="headerlink" title="Permalink to this term" href="#ReusePort=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="RootDirectory="><span class="term"><code class="varname">RootDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#RootDirectory=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="RootDirectoryStartOnly="><span class="term"><code class="varname">RootDirectoryStartOnly=</code></span><a class="headerlink" title="Permalink to this term" href="#RootDirectoryStartOnly=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RuntimeDirectory="><span class="term"><code class="varname">RuntimeDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeDirectory=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="RuntimeDirectoryMode="><span class="term"><code class="varname">RuntimeDirectoryMode=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeDirectoryMode=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SELinuxContext="><span class="term"><code class="varname">SELinuxContext=</code></span><a class="headerlink" title="Permalink to this term" href="#SELinuxContext=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SecureBits="><span class="term"><code class="varname">SecureBits=</code></span><a class="headerlink" title="Permalink to this term" href="#SecureBits=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SendBuffer="><span class="term"><code class="varname">SendBuffer=</code></span><a class="headerlink" title="Permalink to this term" href="#SendBuffer=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SendSIGHUP="><span class="term"><code class="varname">SendSIGHUP=</code></span><a class="headerlink" title="Permalink to this term" href="#SendSIGHUP=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="SendSIGKILL="><span class="term"><code class="varname">SendSIGKILL=</code></span><a class="headerlink" title="Permalink to this term" href="#SendSIGKILL=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="Service="><span class="term"><code class="varname">Service=</code></span><a class="headerlink" title="Permalink to this term" href="#Service=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Slice="><span class="term"><code class="varname">Slice=</code></span><a class="headerlink" title="Permalink to this term" href="#Slice=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="SloppyOptions="><span class="term"><code class="varname">SloppyOptions=</code></span><a class="headerlink" title="Permalink to this term" href="#SloppyOptions=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="SmackLabel="><span class="term"><code class="varname">SmackLabel=</code></span><a class="headerlink" title="Permalink to this term" href="#SmackLabel=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SmackLabelIPIn="><span class="term"><code class="varname">SmackLabelIPIn=</code></span><a class="headerlink" title="Permalink to this term" href="#SmackLabelIPIn=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SmackLabelIPOut="><span class="term"><code class="varname">SmackLabelIPOut=</code></span><a class="headerlink" title="Permalink to this term" href="#SmackLabelIPOut=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SocketGroup="><span class="term"><code class="varname">SocketGroup=</code></span><a class="headerlink" title="Permalink to this term" href="#SocketGroup=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SocketMode="><span class="term"><code class="varname">SocketMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SocketMode=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SocketUser="><span class="term"><code class="varname">SocketUser=</code></span><a class="headerlink" title="Permalink to this term" href="#SocketUser=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Sockets="><span class="term"><code class="varname">Sockets=</code></span><a class="headerlink" title="Permalink to this term" href="#Sockets=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SourcePath="><span class="term"><code class="varname">SourcePath=</code></span><a class="headerlink" title="Permalink to this term" href="#SourcePath=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="StandardError="><span class="term"><code class="varname">StandardError=</code></span><a class="headerlink" title="Permalink to this term" href="#StandardError=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="StandardInput="><span class="term"><code class="varname">StandardInput=</code></span><a class="headerlink" title="Permalink to this term" href="#StandardInput=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="StandardOutput="><span class="term"><code class="varname">StandardOutput=</code></span><a class="headerlink" title="Permalink to this term" href="#StandardOutput=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="StartLimitAction="><span class="term"><code class="varname">StartLimitAction=</code></span><a class="headerlink" title="Permalink to this term" href="#StartLimitAction=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="StartLimitBurst="><span class="term"><code class="varname">StartLimitBurst=</code></span><a class="headerlink" title="Permalink to this term" href="#StartLimitBurst=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="StartLimitInterval="><span class="term"><code class="varname">StartLimitInterval=</code></span><a class="headerlink" title="Permalink to this term" href="#StartLimitInterval=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="StartupBlockIOWeight="><span class="term"><code class="varname">StartupBlockIOWeight=</code></span><a class="headerlink" title="Permalink to this term" href="#StartupBlockIOWeight=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="StartupCPUShares="><span class="term"><code class="varname">StartupCPUShares=</code></span><a class="headerlink" title="Permalink to this term" href="#StartupCPUShares=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="StopWhenUnneeded="><span class="term"><code class="varname">StopWhenUnneeded=</code></span><a class="headerlink" title="Permalink to this term" href="#StopWhenUnneeded=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="SuccessExitStatus="><span class="term"><code class="varname">SuccessExitStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#SuccessExitStatus=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SupplementaryGroups="><span class="term"><code class="varname">SupplementaryGroups=</code></span><a class="headerlink" title="Permalink to this term" href="#SupplementaryGroups=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Symlinks="><span class="term"><code class="varname">Symlinks=</code></span><a class="headerlink" title="Permalink to this term" href="#Symlinks=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SysVStartPriority="><span class="term"><code class="varname">SysVStartPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#SysVStartPriority=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SyslogFacility="><span class="term"><code class="varname">SyslogFacility=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogFacility=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SyslogIdentifier="><span class="term"><code class="varname">SyslogIdentifier=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogIdentifier=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SyslogLevel="><span class="term"><code class="varname">SyslogLevel=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogLevel=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SyslogLevelPrefix="><span class="term"><code class="varname">SyslogLevelPrefix=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogLevelPrefix=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SystemCallArchitectures="><span class="term"><code class="varname">SystemCallArchitectures=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallArchitectures=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SystemCallErrorNumber="><span class="term"><code class="varname">SystemCallErrorNumber=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallErrorNumber=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SystemCallFilter="><span class="term"><code class="varname">SystemCallFilter=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallFilter=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TCPCongestion="><span class="term"><code class="varname">TCPCongestion=</code></span><a class="headerlink" title="Permalink to this term" href="#TCPCongestion=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="TTYPath="><span class="term"><code class="varname">TTYPath=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYPath=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TTYReset="><span class="term"><code class="varname">TTYReset=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYReset=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TTYVHangup="><span class="term"><code class="varname">TTYVHangup=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYVHangup=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TTYVTDisallocate="><span class="term"><code class="varname">TTYVTDisallocate=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYVTDisallocate=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TimeoutSec="><span class="term"><code class="varname">TimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutSec=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="TimeoutStartSec="><span class="term"><code class="varname">TimeoutStartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutStartSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="TimeoutStopSec="><span class="term"><code class="varname">TimeoutStopSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutStopSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="TimerSlackNSec="><span class="term"><code class="varname">TimerSlackNSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimerSlackNSec=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Transparent="><span class="term"><code class="varname">Transparent=</code></span><a class="headerlink" title="Permalink to this term" href="#Transparent=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Type="><span class="term"><code class="varname">Type=</code></span><a class="headerlink" title="Permalink to this term" href="#Type=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="UMask="><span class="term"><code class="varname">UMask=</code></span><a class="headerlink" title="Permalink to this term" href="#UMask=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Unit="><span class="term"><code class="varname">Unit=</code></span><a class="headerlink" title="Permalink to this term" href="#Unit=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>, <a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="User="><span class="term"><code class="varname">User=</code></span><a class="headerlink" title="Permalink to this term" href="#User=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="UtmpIdentifier="><span class="term"><code class="varname">UtmpIdentifier=</code></span><a class="headerlink" title="Permalink to this term" href="#UtmpIdentifier=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="WakeSystem="><span class="term"><code class="varname">WakeSystem=</code></span><a class="headerlink" title="Permalink to this term" href="#WakeSystem=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="WantedBy="><span class="term"><code class="varname">WantedBy=</code></span><a class="headerlink" title="Permalink to this term" href="#WantedBy=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Wants="><span class="term"><code class="varname">Wants=</code></span><a class="headerlink" title="Permalink to this term" href="#Wants=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="WatchdogSec="><span class="term"><code class="varname">WatchdogSec=</code></span><a class="headerlink" title="Permalink to this term" href="#WatchdogSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="What="><span class="term"><code class="varname">What=</code></span><a class="headerlink" title="Permalink to this term" href="#What=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="Where="><span class="term"><code class="varname">Where=</code></span><a class="headerlink" title="Permalink to this term" href="#Where=">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="WorkingDirectory="><span class="term"><code class="varname">WorkingDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#WorkingDirectory=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214182458288"></a><h2 id="Options on the kernel command line">Options on the kernel command line<a class="headerlink" title="Permalink to this headline" href="#Options%20on%20the%20kernel%20command%20line">¶</a></h2><p>Kernel boot options for configuring the behaviour of the
-                systemd process.</p><div class="variablelist"><a name="kernel-commandline-options"></a><dl class="variablelist"><dt id="-b"><span class="term"><code class="option">-b</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="1"><span class="term"><code class="constant">1</code></span><a class="headerlink" title="Permalink to this term" href="#1">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="2"><span class="term"><code class="constant">2</code></span><a class="headerlink" title="Permalink to this term" href="#2">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="3"><span class="term"><code class="varname">3</code></span><a class="headerlink" title="Permalink to this term" href="#3">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="4"><span class="term"><code class="varname">4</code></span><a class="headerlink" title="Permalink to this term" href="#4">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="5"><span class="term"><code class="varname">5</code></span><a class="headerlink" title="Permalink to this term" href="#5">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="S"><span class="term"><code class="varname">S</code></span><a class="headerlink" title="Permalink to this term" href="#S">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="debug"><span class="term"><code class="varname">debug</code></span><a class="headerlink" title="Permalink to this term" href="#debug">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="emergency"><span class="term"><code class="varname">emergency</code></span><a class="headerlink" title="Permalink to this term" href="#emergency">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="fsck.mode="><span class="term"><code class="varname">fsck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#fsck.mode=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="fsck.repair="><span class="term"><code class="varname">fsck.repair=</code></span><a class="headerlink" title="Permalink to this term" href="#fsck.repair=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="fstab="><span class="term"><code class="varname">fstab=</code></span><a class="headerlink" title="Permalink to this term" href="#fstab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="locale.LANG="><span class="term"><code class="varname">locale.LANG=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LANG=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LANGUAGE="><span class="term"><code class="varname">locale.LANGUAGE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LANGUAGE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_ADDRESS="><span class="term"><code class="varname">locale.LC_ADDRESS=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_ADDRESS=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_COLLATE="><span class="term"><code class="varname">locale.LC_COLLATE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_COLLATE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_CTYPE="><span class="term"><code class="varname">locale.LC_CTYPE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_CTYPE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_IDENTIFICATION="><span class="term"><code class="varname">locale.LC_IDENTIFICATION=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_IDENTIFICATION=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_MEASUREMENT="><span class="term"><code class="varname">locale.LC_MEASUREMENT=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_MEASUREMENT=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_MESSAGES="><span class="term"><code class="varname">locale.LC_MESSAGES=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_MESSAGES=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_MONETARY="><span class="term"><code class="varname">locale.LC_MONETARY=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_MONETARY=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_NAME="><span class="term"><code class="varname">locale.LC_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_NAME=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_NUMERIC="><span class="term"><code class="varname">locale.LC_NUMERIC=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_NUMERIC=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_PAPER="><span class="term"><code class="varname">locale.LC_PAPER=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_PAPER=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_TELEPHONE="><span class="term"><code class="varname">locale.LC_TELEPHONE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_TELEPHONE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_TIME="><span class="term"><code class="varname">locale.LC_TIME=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_TIME=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="luks.crypttab="><span class="term"><code class="varname">luks.crypttab=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.crypttab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks.key="><span class="term"><code class="varname">luks.key=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.key=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks.options="><span class="term"><code class="varname">luks.options=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.options=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks.uuid="><span class="term"><code class="varname">luks.uuid=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.uuid=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks="><span class="term"><code class="varname">luks=</code></span><a class="headerlink" title="Permalink to this term" href="#luks=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="modules-load="><span class="term"><code class="varname">modules-load=</code></span><a class="headerlink" title="Permalink to this term" href="#modules-load=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="plymouth.enable="><span class="term"><code class="varname">plymouth.enable=</code></span><a class="headerlink" title="Permalink to this term" href="#plymouth.enable=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="quiet"><span class="term"><code class="varname">quiet</code></span><a class="headerlink" title="Permalink to this term" href="#quiet">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="quotacheck.mode="><span class="term"><code class="varname">quotacheck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#quotacheck.mode=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a></p></dd><dt id="rd.fstab="><span class="term"><code class="varname">rd.fstab=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.fstab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="rd.luks.crypttab="><span class="term"><code class="varname">rd.luks.crypttab=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.crypttab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks.key="><span class="term"><code class="varname">rd.luks.key=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.key=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks.options="><span class="term"><code class="varname">rd.luks.options=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.options=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks.uuid="><span class="term"><code class="varname">rd.luks.uuid=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.uuid=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks="><span class="term"><code class="varname">rd.luks=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.modules-load="><span class="term"><code class="varname">rd.modules-load=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.modules-load=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="rd.systemd.gpt_auto="><span class="term"><code class="varname">rd.systemd.gpt_auto=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.systemd.gpt_auto=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="rd.systemd.unit="><span class="term"><code class="varname">rd.systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.systemd.unit=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="rd.udev.children-max="><span class="term"><code class="varname">rd.udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.udev.children-max=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="rd.udev.exec-delay="><span class="term"><code class="varname">rd.udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.udev.exec-delay=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="rd.udev.log-priority="><span class="term"><code class="varname">rd.udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.udev.log-priority=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="ro"><span class="term"><code class="varname">ro</code></span><a class="headerlink" title="Permalink to this term" href="#ro">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="root="><span class="term"><code class="varname">root=</code></span><a class="headerlink" title="Permalink to this term" href="#root=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="rootfsflags="><span class="term"><code class="varname">rootfsflags=</code></span><a class="headerlink" title="Permalink to this term" href="#rootfsflags=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="rootfstype="><span class="term"><code class="varname">rootfstype=</code></span><a class="headerlink" title="Permalink to this term" href="#rootfstype=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="rw"><span class="term"><code class="varname">rw</code></span><a class="headerlink" title="Permalink to this term" href="#rw">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="s"><span class="term"><code class="varname">s</code></span><a class="headerlink" title="Permalink to this term" href="#s">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="single"><span class="term"><code class="varname">single</code></span><a class="headerlink" title="Permalink to this term" href="#single">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.confirm_spawn="><span class="term"><code class="varname">systemd.confirm_spawn=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.confirm_spawn=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.crash_chvt="><span class="term"><code class="varname">systemd.crash_chvt=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.crash_chvt=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.crash_shell="><span class="term"><code class="varname">systemd.crash_shell=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.crash_shell=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.debug-shell"><span class="term"><code class="varname">systemd.debug-shell</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.debug-shell">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="systemd.default_standard_error="><span class="term"><code class="varname">systemd.default_standard_error=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.default_standard_error=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.default_standard_output="><span class="term"><code class="varname">systemd.default_standard_output=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.default_standard_output=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.dump_core="><span class="term"><code class="varname">systemd.dump_core=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.dump_core=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.gpt_auto="><span class="term"><code class="varname">systemd.gpt_auto=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.gpt_auto=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="systemd.journald.forward_to_console="><span class="term"><code class="varname">systemd.journald.forward_to_console=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_console=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.journald.forward_to_kmsg="><span class="term"><code class="varname">systemd.journald.forward_to_kmsg=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_kmsg=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.journald.forward_to_syslog="><span class="term"><code class="varname">systemd.journald.forward_to_syslog=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_syslog=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.journald.forward_to_wall="><span class="term"><code class="varname">systemd.journald.forward_to_wall=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_wall=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.log_color="><span class="term"><code class="varname">systemd.log_color=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_color=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.log_level="><span class="term"><code class="varname">systemd.log_level=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_level=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.log_location="><span class="term"><code class="varname">systemd.log_location=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_location=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.log_target="><span class="term"><code class="varname">systemd.log_target=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_target=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.mask="><span class="term"><code class="varname">systemd.mask=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.mask=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="systemd.restore_state="><span class="term"><code class="varname">systemd.restore_state=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.restore_state=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a>, <a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="systemd.setenv="><span class="term"><code class="varname">systemd.setenv=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.setenv=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.show_status="><span class="term"><code class="varname">systemd.show_status=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.show_status=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.wants="><span class="term"><code class="varname">systemd.wants=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.wants=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="udev.children-max="><span class="term"><code class="varname">udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.children-max=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="udev.exec-delay="><span class="term"><code class="varname">udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.exec-delay=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="vconsole.font.map="><span class="term"><code class="varname">vconsole.font.map=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.font.map=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.font.unimap="><span class="term"><code class="varname">vconsole.font.unimap=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.font.unimap=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.font="><span class="term"><code class="varname">vconsole.font=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.font=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.keymap.toggle="><span class="term"><code class="varname">vconsole.keymap.toggle=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.keymap.toggle=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.keymap="><span class="term"><code class="varname">vconsole.keymap=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.keymap=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214182259936"></a><h2 id="Environment variables">Environment variables<a class="headerlink" title="Permalink to this headline" href="#Environment%20variables">¶</a></h2><p>Environment variables understood by the systemd
-                manager and other programs.</p><div class="variablelist"><a name="environment-variables"></a><dl class="variablelist"><dt id="$HOME"><span class="term"><code class="varname">$HOME</code></span><a class="headerlink" title="Permalink to this term" href="#%24HOME">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LANG"><span class="term"><code class="varname">$LANG</code></span><a class="headerlink" title="Permalink to this term" href="#%24LANG">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS">¶</a></dt><dd><p><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID">¶</a></dt><dd><p><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LOGNAME"><span class="term"><code class="varname">$LOGNAME</code></span><a class="headerlink" title="Permalink to this term" href="#%24LOGNAME">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$MAINPID"><span class="term"><code class="varname">$MAINPID</code></span><a class="headerlink" title="Permalink to this term" href="#%24MAINPID">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$MANAGERPID"><span class="term"><code class="varname">$MANAGERPID</code></span><a class="headerlink" title="Permalink to this term" href="#%24MANAGERPID">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$NOTIFY_SOCKET"><span class="term"><code class="varname">$NOTIFY_SOCKET</code></span><a class="headerlink" title="Permalink to this term" href="#%24NOTIFY_SOCKET">¶</a></dt><dd><p><a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$PATH"><span class="term"><code class="varname">$PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24PATH">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$PREVLEVEL"><span class="term"><code class="varname">$PREVLEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24PREVLEVEL">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="$RUNLEVEL"><span class="term"><code class="varname">$RUNLEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24RUNLEVEL">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="$SHELL"><span class="term"><code class="varname">$SHELL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SHELL">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="$SYSTEMD_LOG_COLOR"><span class="term"><code class="varname">$SYSTEMD_LOG_COLOR</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_COLOR">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_LOG_LEVEL"><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LEVEL">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_LOG_LOCATION"><span class="term"><code class="varname">$SYSTEMD_LOG_LOCATION</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LOCATION">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_LOG_TARGET"><span class="term"><code class="varname">$SYSTEMD_LOG_TARGET</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_TARGET">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="$SYSTEMD_SYSVINIT_PATH"><span class="term"><code class="varname">$SYSTEMD_SYSVINIT_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_SYSVINIT_PATH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$SYSTEMD_SYSVRCND_PATH"><span class="term"><code class="varname">$SYSTEMD_SYSVRCND_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_SYSVRCND_PATH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$SYSTEMD_UNIT_PATH"><span class="term"><code class="varname">$SYSTEMD_UNIT_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_UNIT_PATH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$TERM"><span class="term"><code class="varname">$TERM</code></span><a class="headerlink" title="Permalink to this term" href="#%24TERM">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="$USER"><span class="term"><code class="varname">$USER</code></span><a class="headerlink" title="Permalink to this term" href="#%24USER">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$WATCHDOG_PID"><span class="term"><code class="varname">$WATCHDOG_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24WATCHDOG_PID">¶</a></dt><dd><p><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a></p></dd><dt id="$WATCHDOG_USEC"><span class="term"><code class="varname">$WATCHDOG_USEC</code></span><a class="headerlink" title="Permalink to this term" href="#%24WATCHDOG_USEC">¶</a></dt><dd><p><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a></p></dd><dt id="$XDG_CONFIG_DIRS"><span class="term"><code class="varname">$XDG_CONFIG_DIRS</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_CONFIG_DIRS">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_CONFIG_HOME"><span class="term"><code class="varname">$XDG_CONFIG_HOME</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_CONFIG_HOME">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_DATA_DIRS"><span class="term"><code class="varname">$XDG_DATA_DIRS</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_DATA_DIRS">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_DATA_HOME"><span class="term"><code class="varname">$XDG_DATA_HOME</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_DATA_HOME">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_RUNTIME_DIR"><span class="term"><code class="varname">$XDG_RUNTIME_DIR</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_RUNTIME_DIR">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$XDG_SEAT"><span class="term"><code class="varname">$XDG_SEAT</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SEAT">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$XDG_SESSION_CLASS"><span class="term"><code class="varname">$XDG_SESSION_CLASS</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_CLASS">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="$XDG_SESSION_DESKTOP"><span class="term"><code class="varname">$XDG_SESSION_DESKTOP</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_DESKTOP">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="$XDG_SESSION_ID"><span class="term"><code class="varname">$XDG_SESSION_ID</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_ID">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$XDG_SESSION_TYPE"><span class="term"><code class="varname">$XDG_SESSION_TYPE</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_TYPE">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="$XDG_VTNR"><span class="term"><code class="varname">$XDG_VTNR</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_VTNR">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214182177312"></a><h2 id="UDEV directives">UDEV directives<a class="headerlink" title="Permalink to this headline" href="#UDEV%20directives">¶</a></h2><p>Directives for configuring systemd units through the
-                udev database.</p><div class="variablelist"><a name="udev-directives"></a><dl class="variablelist"><dt id="$$"><span class="term"><code class="option">$$</code></span><a class="headerlink" title="Permalink to this term" href="#%24%24">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$attr{file}"><span class="term"><code class="option">$attr{<em class="replaceable"><code>file</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%24attr%7Bfile%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$devnode"><span class="term"><code class="option">$devnode</code></span><a class="headerlink" title="Permalink to this term" href="#%24devnode">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$devpath"><span class="term"><code class="option">$devpath</code></span><a class="headerlink" title="Permalink to this term" href="#%24devpath">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$driver"><span class="term"><code class="option">$driver</code></span><a class="headerlink" title="Permalink to this term" href="#%24driver">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$env{key}"><span class="term"><code class="option">$env{<em class="replaceable"><code>key</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%24env%7Bkey%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$id"><span class="term"><code class="option">$id</code></span><a class="headerlink" title="Permalink to this term" href="#%24id">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$kernel"><span class="term"><code class="option">$kernel</code></span><a class="headerlink" title="Permalink to this term" href="#%24kernel">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$links"><span class="term"><code class="option">$links</code></span><a class="headerlink" title="Permalink to this term" href="#%24links">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$major"><span class="term"><code class="option">$major</code></span><a class="headerlink" title="Permalink to this term" href="#%24major">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$minor"><span class="term"><code class="option">$minor</code></span><a class="headerlink" title="Permalink to this term" href="#%24minor">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$name"><span class="term"><code class="option">$name</code></span><a class="headerlink" title="Permalink to this term" href="#%24name">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$number"><span class="term"><code class="option">$number</code></span><a class="headerlink" title="Permalink to this term" href="#%24number">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$parent"><span class="term"><code class="option">$parent</code></span><a class="headerlink" title="Permalink to this term" href="#%24parent">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$result"><span class="term"><code class="option">$result</code></span><a class="headerlink" title="Permalink to this term" href="#%24result">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$root"><span class="term"><code class="option">$root</code></span><a class="headerlink" title="Permalink to this term" href="#%24root">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$sys"><span class="term"><code class="option">$sys</code></span><a class="headerlink" title="Permalink to this term" href="#%24sys">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%%"><span class="term"><code class="option">%%</code></span><a class="headerlink" title="Permalink to this term" href="#%%">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%E{key}"><span class="term"><code class="option">%E{<em class="replaceable"><code>key</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%E%7Bkey%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%M"><span class="term"><code class="option">%M</code></span><a class="headerlink" title="Permalink to this term" href="#%M">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%N"><span class="term"><code class="option">%N</code></span><a class="headerlink" title="Permalink to this term" href="#%N">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%P"><span class="term"><code class="option">%P</code></span><a class="headerlink" title="Permalink to this term" href="#%P">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%S"><span class="term"><code class="option">%S</code></span><a class="headerlink" title="Permalink to this term" href="#%S">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%b"><span class="term"><code class="option">%b</code></span><a class="headerlink" title="Permalink to this term" href="#%b">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%c"><span class="term"><code class="option">%c</code></span><a class="headerlink" title="Permalink to this term" href="#%c">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%k"><span class="term"><code class="option">%k</code></span><a class="headerlink" title="Permalink to this term" href="#%k">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%m"><span class="term"><code class="option">%m</code></span><a class="headerlink" title="Permalink to this term" href="#%m">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%n"><span class="term"><code class="option">%n</code></span><a class="headerlink" title="Permalink to this term" href="#%n">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%p"><span class="term"><code class="option">%p</code></span><a class="headerlink" title="Permalink to this term" href="#%p">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%r"><span class="term"><code class="option">%r</code></span><a class="headerlink" title="Permalink to this term" href="#%r">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%s{file}"><span class="term"><code class="option">%s{<em class="replaceable"><code>file</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%s%7Bfile%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ACTION"><span class="term"><code class="varname">ACTION</code></span><a class="headerlink" title="Permalink to this term" href="#ACTION">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ATTRS{filename}"><span class="term"><code class="varname">ATTRS{<em class="replaceable"><code>filename</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#ATTRS%7Bfilename%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ATTR{filename}"><span class="term"><code class="varname">ATTR{<em class="replaceable"><code>filename</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#ATTR%7Bfilename%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="DEVPATH"><span class="term"><code class="varname">DEVPATH</code></span><a class="headerlink" title="Permalink to this term" href="#DEVPATH">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="DRIVER"><span class="term"><code class="varname">DRIVER</code></span><a class="headerlink" title="Permalink to this term" href="#DRIVER">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="DRIVERS"><span class="term"><code class="varname">DRIVERS</code></span><a class="headerlink" title="Permalink to this term" href="#DRIVERS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ENV{key}"><span class="term"><code class="varname">ENV{<em class="replaceable"><code>key</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#ENV%7Bkey%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="GOTO"><span class="term"><code class="varname">GOTO</code></span><a class="headerlink" title="Permalink to this term" href="#GOTO">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="GROUP"><span class="term"><code class="varname">GROUP</code></span><a class="headerlink" title="Permalink to this term" href="#GROUP">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ID_MODEL="><span class="term"><code class="varname">ID_MODEL=</code></span><a class="headerlink" title="Permalink to this term" href="#ID_MODEL=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="ID_MODEL_FROM_DATABASE="><span class="term"><code class="varname">ID_MODEL_FROM_DATABASE=</code></span><a class="headerlink" title="Permalink to this term" href="#ID_MODEL_FROM_DATABASE=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="IMPORT{type}"><span class="term"><code class="varname">IMPORT{<em class="replaceable"><code>type</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#IMPORT%7Btype%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="KERNEL"><span class="term"><code class="varname">KERNEL</code></span><a class="headerlink" title="Permalink to this term" href="#KERNEL">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="KERNELS"><span class="term"><code class="varname">KERNELS</code></span><a class="headerlink" title="Permalink to this term" href="#KERNELS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="LABEL"><span class="term"><code class="varname">LABEL</code></span><a class="headerlink" title="Permalink to this term" href="#LABEL">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="MODE"><span class="term"><code class="varname">MODE</code></span><a class="headerlink" title="Permalink to this term" href="#MODE">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="NAME"><span class="term"><code class="varname">NAME</code></span><a class="headerlink" title="Permalink to this term" href="#NAME">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="OPTIONS"><span class="term"><code class="varname">OPTIONS</code></span><a class="headerlink" title="Permalink to this term" href="#OPTIONS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="OWNER"><span class="term"><code class="varname">OWNER</code></span><a class="headerlink" title="Permalink to this term" href="#OWNER">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="PROGRAM"><span class="term"><code class="varname">PROGRAM</code></span><a class="headerlink" title="Permalink to this term" href="#PROGRAM">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="RESULT"><span class="term"><code class="varname">RESULT</code></span><a class="headerlink" title="Permalink to this term" href="#RESULT">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="RUN{type}"><span class="term"><code class="varname">RUN{<em class="replaceable"><code>type</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#RUN%7Btype%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SECLABEL{module}"><span class="term"><code class="varname">SECLABEL{<em class="replaceable"><code>module</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#SECLABEL%7Bmodule%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SUBSYSTEM"><span class="term"><code class="varname">SUBSYSTEM</code></span><a class="headerlink" title="Permalink to this term" href="#SUBSYSTEM">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SUBSYSTEMS"><span class="term"><code class="varname">SUBSYSTEMS</code></span><a class="headerlink" title="Permalink to this term" href="#SUBSYSTEMS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SYMLINK"><span class="term"><code class="varname">SYMLINK</code></span><a class="headerlink" title="Permalink to this term" href="#SYMLINK">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SYSTEMD_ALIAS="><span class="term"><code class="varname">SYSTEMD_ALIAS=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_ALIAS=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="SYSTEMD_READY="><span class="term"><code class="varname">SYSTEMD_READY=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_READY=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="SYSTEMD_USER_WANTS="><span class="term"><code class="varname">SYSTEMD_USER_WANTS=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_USER_WANTS=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="SYSTEMD_WANTS="><span class="term"><code class="varname">SYSTEMD_WANTS=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_WANTS=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="TAG"><span class="term"><code class="varname">TAG</code></span><a class="headerlink" title="Permalink to this term" href="#TAG">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="TAGS"><span class="term"><code class="varname">TAGS</code></span><a class="headerlink" title="Permalink to this term" href="#TAGS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="TEST{octal mode mask}"><span class="term"><code class="varname">TEST{<em class="replaceable"><code>octal mode mask</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#TEST%7Boctal%20mode%20mask%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="WAIT_FOR"><span class="term"><code class="varname">WAIT_FOR</code></span><a class="headerlink" title="Permalink to this term" href="#WAIT_FOR">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="event_timeout="><span class="term"><code class="option">event_timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#event_timeout=">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="link_priority="><span class="term"><code class="option">link_priority=</code></span><a class="headerlink" title="Permalink to this term" href="#link_priority=">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="nowatch"><span class="term"><code class="option">nowatch</code></span><a class="headerlink" title="Permalink to this term" href="#nowatch">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="static_node="><span class="term"><code class="option">static_node=</code></span><a class="headerlink" title="Permalink to this term" href="#static_node=">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="string_escape="><span class="term"><code class="option">string_escape=</code></span><a class="headerlink" title="Permalink to this term" href="#string_escape=">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="watch"><span class="term"><code class="option">watch</code></span><a class="headerlink" title="Permalink to this term" href="#watch">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214182057584"></a><h2 id="Network directives">Network directives<a class="headerlink" title="Permalink to this headline" href="#Network%20directives">¶</a></h2><p>Directives for configuring network links through the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.directives"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.directives — Index of configuration directives</p></div><div class="refsect1"><a name="idm214189980992"></a><h2 id="Unit directives">Unit directives<a class="headerlink" title="Permalink to this headline" href="#Unit%20directives">¶</a></h2><p>Directives for configuring units, used in unit
+                files.</p><div class="variablelist"><a name="unit-directives"></a><dl class="variablelist"><dt id="Accept="><span class="term"><code class="varname">Accept=</code></span><a class="headerlink" title="Permalink to this term" href="#Accept=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="AccuracySec="><span class="term"><code class="varname">AccuracySec=</code></span><a class="headerlink" title="Permalink to this term" href="#AccuracySec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="After="><span class="term"><code class="varname">After=</code></span><a class="headerlink" title="Permalink to this term" href="#After=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Alias="><span class="term"><code class="varname">Alias=</code></span><a class="headerlink" title="Permalink to this term" href="#Alias=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="AllowIsolate="><span class="term"><code class="varname">AllowIsolate=</code></span><a class="headerlink" title="Permalink to this term" href="#AllowIsolate=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Also="><span class="term"><code class="varname">Also=</code></span><a class="headerlink" title="Permalink to this term" href="#Also=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="AppArmorProfile="><span class="term"><code class="varname">AppArmorProfile=</code></span><a class="headerlink" title="Permalink to this term" href="#AppArmorProfile=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Backlog="><span class="term"><code class="varname">Backlog=</code></span><a class="headerlink" title="Permalink to this term" href="#Backlog=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Before="><span class="term"><code class="varname">Before=</code></span><a class="headerlink" title="Permalink to this term" href="#Before=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="BindIPv6Only="><span class="term"><code class="varname">BindIPv6Only=</code></span><a class="headerlink" title="Permalink to this term" href="#BindIPv6Only=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="BindToDevice="><span class="term"><code class="varname">BindToDevice=</code></span><a class="headerlink" title="Permalink to this term" href="#BindToDevice=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="BindsTo="><span class="term"><code class="varname">BindsTo=</code></span><a class="headerlink" title="Permalink to this term" href="#BindsTo=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="BlockIOAccounting="><span class="term"><code class="varname">BlockIOAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOAccounting=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIODeviceWeight="><span class="term"><code class="varname">BlockIODeviceWeight=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIODeviceWeight=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIOReadBandwidth="><span class="term"><code class="varname">BlockIOReadBandwidth=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOReadBandwidth=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIOWeight="><span class="term"><code class="varname">BlockIOWeight=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOWeight=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="BlockIOWriteBandwidth="><span class="term"><code class="varname">BlockIOWriteBandwidth=</code></span><a class="headerlink" title="Permalink to this term" href="#BlockIOWriteBandwidth=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="Broadcast="><span class="term"><code class="varname">Broadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#Broadcast=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="BusName="><span class="term"><code class="varname">BusName=</code></span><a class="headerlink" title="Permalink to this term" href="#BusName=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="BusPolicy="><span class="term"><code class="varname">BusPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#BusPolicy=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="CPUAccounting="><span class="term"><code class="varname">CPUAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAccounting=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="CPUAffinity="><span class="term"><code class="varname">CPUAffinity=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAffinity=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUQuota="><span class="term"><code class="varname">CPUQuota=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUQuota=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="CPUSchedulingPolicy="><span class="term"><code class="varname">CPUSchedulingPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingPolicy=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUSchedulingPriority="><span class="term"><code class="varname">CPUSchedulingPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingPriority=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUSchedulingResetOnFork="><span class="term"><code class="varname">CPUSchedulingResetOnFork=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingResetOnFork=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CPUShares="><span class="term"><code class="varname">CPUShares=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUShares=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="Capabilities="><span class="term"><code class="varname">Capabilities=</code></span><a class="headerlink" title="Permalink to this term" href="#Capabilities=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CapabilityBoundingSet="><span class="term"><code class="varname">CapabilityBoundingSet=</code></span><a class="headerlink" title="Permalink to this term" href="#CapabilityBoundingSet=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ConditionACPower="><span class="term"><code class="varname">ConditionACPower=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionACPower=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionArchitecture="><span class="term"><code class="varname">ConditionArchitecture=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionArchitecture=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionCapability="><span class="term"><code class="varname">ConditionCapability=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionCapability=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionDirectoryNotEmpty="><span class="term"><code class="varname">ConditionDirectoryNotEmpty=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionDirectoryNotEmpty=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionFileIsExecutable="><span class="term"><code class="varname">ConditionFileIsExecutable=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionFileIsExecutable=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionFileNotEmpty="><span class="term"><code class="varname">ConditionFileNotEmpty=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionFileNotEmpty=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionFirstBoot="><span class="term"><code class="varname">ConditionFirstBoot=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionFirstBoot=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionHost="><span class="term"><code class="varname">ConditionHost=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionHost=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionKernelCommandLine="><span class="term"><code class="varname">ConditionKernelCommandLine=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionKernelCommandLine=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionNeedsUpdate="><span class="term"><code class="varname">ConditionNeedsUpdate=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionNeedsUpdate=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionNull="><span class="term"><code class="varname">ConditionNull=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionNull=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathExists="><span class="term"><code class="varname">ConditionPathExists=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathExists=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathExistsGlob="><span class="term"><code class="varname">ConditionPathExistsGlob=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathExistsGlob=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsDirectory="><span class="term"><code class="varname">ConditionPathIsDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsDirectory=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsMountPoint="><span class="term"><code class="varname">ConditionPathIsMountPoint=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsMountPoint=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsReadWrite="><span class="term"><code class="varname">ConditionPathIsReadWrite=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsReadWrite=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionPathIsSymbolicLink="><span class="term"><code class="varname">ConditionPathIsSymbolicLink=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionPathIsSymbolicLink=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionSecurity="><span class="term"><code class="varname">ConditionSecurity=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionSecurity=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ConditionVirtualization="><span class="term"><code class="varname">ConditionVirtualization=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionVirtualization=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Conflicts="><span class="term"><code class="varname">Conflicts=</code></span><a class="headerlink" title="Permalink to this term" href="#Conflicts=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="DefaultDependencies="><span class="term"><code class="varname">DefaultDependencies=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultDependencies=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="DefaultInstance="><span class="term"><code class="varname">DefaultInstance=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultInstance=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="DeferAcceptSec="><span class="term"><code class="varname">DeferAcceptSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DeferAcceptSec=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="DeviceAllow="><span class="term"><code class="varname">DeviceAllow=</code></span><a class="headerlink" title="Permalink to this term" href="#DeviceAllow=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="DevicePolicy="><span class="term"><code class="varname">DevicePolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#DevicePolicy=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="DirectoryMode="><span class="term"><code class="varname">DirectoryMode=</code></span><a class="headerlink" title="Permalink to this term" href="#DirectoryMode=">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="DirectoryNotEmpty="><span class="term"><code class="varname">DirectoryNotEmpty=</code></span><a class="headerlink" title="Permalink to this term" href="#DirectoryNotEmpty=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="Documentation="><span class="term"><code class="varname">Documentation=</code></span><a class="headerlink" title="Permalink to this term" href="#Documentation=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Environment="><span class="term"><code class="varname">Environment=</code></span><a class="headerlink" title="Permalink to this term" href="#Environment=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="EnvironmentFile="><span class="term"><code class="varname">EnvironmentFile=</code></span><a class="headerlink" title="Permalink to this term" href="#EnvironmentFile=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ExecReload="><span class="term"><code class="varname">ExecReload=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecReload=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ExecStart="><span class="term"><code class="varname">ExecStart=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStart=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ExecStartPost="><span class="term"><code class="varname">ExecStartPost=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStartPost=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ExecStartPre="><span class="term"><code class="varname">ExecStartPre=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStartPre=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ExecStop="><span class="term"><code class="varname">ExecStop=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStop=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ExecStopPost="><span class="term"><code class="varname">ExecStopPost=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStopPost=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ExecStopPre="><span class="term"><code class="varname">ExecStopPre=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStopPre=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="FailureAction="><span class="term"><code class="varname">FailureAction=</code></span><a class="headerlink" title="Permalink to this term" href="#FailureAction=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="FreeBind="><span class="term"><code class="varname">FreeBind=</code></span><a class="headerlink" title="Permalink to this term" href="#FreeBind=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Group="><span class="term"><code class="varname">Group=</code></span><a class="headerlink" title="Permalink to this term" href="#Group=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="GuessMainPID="><span class="term"><code class="varname">GuessMainPID=</code></span><a class="headerlink" title="Permalink to this term" href="#GuessMainPID=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="IOSchedulingClass="><span class="term"><code class="varname">IOSchedulingClass=</code></span><a class="headerlink" title="Permalink to this term" href="#IOSchedulingClass=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="IOSchedulingPriority="><span class="term"><code class="varname">IOSchedulingPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#IOSchedulingPriority=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="IPTOS="><span class="term"><code class="varname">IPTOS=</code></span><a class="headerlink" title="Permalink to this term" href="#IPTOS=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="IPTTL="><span class="term"><code class="varname">IPTTL=</code></span><a class="headerlink" title="Permalink to this term" href="#IPTTL=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="IgnoreOnIsolate="><span class="term"><code class="varname">IgnoreOnIsolate=</code></span><a class="headerlink" title="Permalink to this term" href="#IgnoreOnIsolate=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="IgnoreOnSnapshot="><span class="term"><code class="varname">IgnoreOnSnapshot=</code></span><a class="headerlink" title="Permalink to this term" href="#IgnoreOnSnapshot=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="IgnoreSIGPIPE="><span class="term"><code class="varname">IgnoreSIGPIPE=</code></span><a class="headerlink" title="Permalink to this term" href="#IgnoreSIGPIPE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="InaccessibleDirectories="><span class="term"><code class="varname">InaccessibleDirectories=</code></span><a class="headerlink" title="Permalink to this term" href="#InaccessibleDirectories=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="JobTimeoutAction="><span class="term"><code class="varname">JobTimeoutAction=</code></span><a class="headerlink" title="Permalink to this term" href="#JobTimeoutAction=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="JobTimeoutRebootArgument="><span class="term"><code class="varname">JobTimeoutRebootArgument=</code></span><a class="headerlink" title="Permalink to this term" href="#JobTimeoutRebootArgument=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="JobTimeoutSec="><span class="term"><code class="varname">JobTimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#JobTimeoutSec=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="JoinsNamespaceOf="><span class="term"><code class="varname">JoinsNamespaceOf=</code></span><a class="headerlink" title="Permalink to this term" href="#JoinsNamespaceOf=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="KeepAlive="><span class="term"><code class="varname">KeepAlive=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAlive=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="KeepAliveIntervalSec="><span class="term"><code class="varname">KeepAliveIntervalSec=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAliveIntervalSec=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="KeepAliveProbes="><span class="term"><code class="varname">KeepAliveProbes=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAliveProbes=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="KeepAliveTimeSec="><span class="term"><code class="varname">KeepAliveTimeSec=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAliveTimeSec=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="KillMode="><span class="term"><code class="varname">KillMode=</code></span><a class="headerlink" title="Permalink to this term" href="#KillMode=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="KillSignal="><span class="term"><code class="varname">KillSignal=</code></span><a class="headerlink" title="Permalink to this term" href="#KillSignal=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="LimitAS="><span class="term"><code class="varname">LimitAS=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitAS=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitCORE="><span class="term"><code class="varname">LimitCORE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitCORE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitCPU="><span class="term"><code class="varname">LimitCPU=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitCPU=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitDATA="><span class="term"><code class="varname">LimitDATA=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitDATA=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitFSIZE="><span class="term"><code class="varname">LimitFSIZE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitFSIZE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitLOCKS="><span class="term"><code class="varname">LimitLOCKS=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitLOCKS=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitMEMLOCK="><span class="term"><code class="varname">LimitMEMLOCK=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitMEMLOCK=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitMSGQUEUE="><span class="term"><code class="varname">LimitMSGQUEUE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitMSGQUEUE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitNICE="><span class="term"><code class="varname">LimitNICE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitNICE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitNOFILE="><span class="term"><code class="varname">LimitNOFILE=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitNOFILE=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitNPROC="><span class="term"><code class="varname">LimitNPROC=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitNPROC=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitRSS="><span class="term"><code class="varname">LimitRSS=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitRSS=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitRTPRIO="><span class="term"><code class="varname">LimitRTPRIO=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitRTPRIO=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitRTTIME="><span class="term"><code class="varname">LimitRTTIME=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitRTTIME=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitSIGPENDING="><span class="term"><code class="varname">LimitSIGPENDING=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitSIGPENDING=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LimitSTACK="><span class="term"><code class="varname">LimitSTACK=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitSTACK=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ListenDatagram="><span class="term"><code class="varname">ListenDatagram=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenDatagram=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenFIFO="><span class="term"><code class="varname">ListenFIFO=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenFIFO=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenMessageQueue="><span class="term"><code class="varname">ListenMessageQueue=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenMessageQueue=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenNetlink="><span class="term"><code class="varname">ListenNetlink=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenNetlink=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenSequentialPacket="><span class="term"><code class="varname">ListenSequentialPacket=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenSequentialPacket=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenSpecial="><span class="term"><code class="varname">ListenSpecial=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenSpecial=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="ListenStream="><span class="term"><code class="varname">ListenStream=</code></span><a class="headerlink" title="Permalink to this term" href="#ListenStream=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MakeDirectory="><span class="term"><code class="varname">MakeDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#MakeDirectory=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="Mark="><span class="term"><code class="varname">Mark=</code></span><a class="headerlink" title="Permalink to this term" href="#Mark=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MaxConnections="><span class="term"><code class="varname">MaxConnections=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxConnections=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MemoryAccounting="><span class="term"><code class="varname">MemoryAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#MemoryAccounting=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="MemoryLimit="><span class="term"><code class="varname">MemoryLimit=</code></span><a class="headerlink" title="Permalink to this term" href="#MemoryLimit=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="MessageQueueMaxMessages="><span class="term"><code class="varname">MessageQueueMaxMessages=</code></span><a class="headerlink" title="Permalink to this term" href="#MessageQueueMaxMessages=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MessageQueueMessageSize="><span class="term"><code class="varname">MessageQueueMessageSize=</code></span><a class="headerlink" title="Permalink to this term" href="#MessageQueueMessageSize=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="MountFlags="><span class="term"><code class="varname">MountFlags=</code></span><a class="headerlink" title="Permalink to this term" href="#MountFlags=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Nice="><span class="term"><code class="varname">Nice=</code></span><a class="headerlink" title="Permalink to this term" href="#Nice=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="NoDelay="><span class="term"><code class="varname">NoDelay=</code></span><a class="headerlink" title="Permalink to this term" href="#NoDelay=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="NoNewPrivileges="><span class="term"><code class="varname">NoNewPrivileges=</code></span><a class="headerlink" title="Permalink to this term" href="#NoNewPrivileges=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="NonBlocking="><span class="term"><code class="varname">NonBlocking=</code></span><a class="headerlink" title="Permalink to this term" href="#NonBlocking=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="NotifyAccess="><span class="term"><code class="varname">NotifyAccess=</code></span><a class="headerlink" title="Permalink to this term" href="#NotifyAccess=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="OOMScoreAdjust="><span class="term"><code class="varname">OOMScoreAdjust=</code></span><a class="headerlink" title="Permalink to this term" href="#OOMScoreAdjust=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="OnActiveSec="><span class="term"><code class="varname">OnActiveSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnActiveSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnBootSec="><span class="term"><code class="varname">OnBootSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnBootSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnCalendar="><span class="term"><code class="varname">OnCalendar=</code></span><a class="headerlink" title="Permalink to this term" href="#OnCalendar=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnFailure="><span class="term"><code class="varname">OnFailure=</code></span><a class="headerlink" title="Permalink to this term" href="#OnFailure=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="OnFailureJobMode="><span class="term"><code class="varname">OnFailureJobMode=</code></span><a class="headerlink" title="Permalink to this term" href="#OnFailureJobMode=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="OnStartupSec="><span class="term"><code class="varname">OnStartupSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnStartupSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnUnitActiveSec="><span class="term"><code class="varname">OnUnitActiveSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnUnitActiveSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="OnUnitInactiveSec="><span class="term"><code class="varname">OnUnitInactiveSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnUnitInactiveSec=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="Options="><span class="term"><code class="varname">Options=</code></span><a class="headerlink" title="Permalink to this term" href="#Options=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="PAMName="><span class="term"><code class="varname">PAMName=</code></span><a class="headerlink" title="Permalink to this term" href="#PAMName=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PIDFile="><span class="term"><code class="varname">PIDFile=</code></span><a class="headerlink" title="Permalink to this term" href="#PIDFile=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="PartOf="><span class="term"><code class="varname">PartOf=</code></span><a class="headerlink" title="Permalink to this term" href="#PartOf=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="PassCredentials="><span class="term"><code class="varname">PassCredentials=</code></span><a class="headerlink" title="Permalink to this term" href="#PassCredentials=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="PassSecurity="><span class="term"><code class="varname">PassSecurity=</code></span><a class="headerlink" title="Permalink to this term" href="#PassSecurity=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="PathChanged="><span class="term"><code class="varname">PathChanged=</code></span><a class="headerlink" title="Permalink to this term" href="#PathChanged=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PathExists="><span class="term"><code class="varname">PathExists=</code></span><a class="headerlink" title="Permalink to this term" href="#PathExists=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PathExistsGlob="><span class="term"><code class="varname">PathExistsGlob=</code></span><a class="headerlink" title="Permalink to this term" href="#PathExistsGlob=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PathModified="><span class="term"><code class="varname">PathModified=</code></span><a class="headerlink" title="Permalink to this term" href="#PathModified=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a></p></dd><dt id="PermissionsStartOnly="><span class="term"><code class="varname">PermissionsStartOnly=</code></span><a class="headerlink" title="Permalink to this term" href="#PermissionsStartOnly=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="Persistent="><span class="term"><code class="varname">Persistent=</code></span><a class="headerlink" title="Permalink to this term" href="#Persistent=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="Personality="><span class="term"><code class="varname">Personality=</code></span><a class="headerlink" title="Permalink to this term" href="#Personality=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PipeSize="><span class="term"><code class="varname">PipeSize=</code></span><a class="headerlink" title="Permalink to this term" href="#PipeSize=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Priority="><span class="term"><code class="varname">Priority=</code></span><a class="headerlink" title="Permalink to this term" href="#Priority=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="PrivateDevices="><span class="term"><code class="varname">PrivateDevices=</code></span><a class="headerlink" title="Permalink to this term" href="#PrivateDevices=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PrivateNetwork="><span class="term"><code class="varname">PrivateNetwork=</code></span><a class="headerlink" title="Permalink to this term" href="#PrivateNetwork=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PrivateTmp="><span class="term"><code class="varname">PrivateTmp=</code></span><a class="headerlink" title="Permalink to this term" href="#PrivateTmp=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="PropagatesReloadTo="><span class="term"><code class="varname">PropagatesReloadTo=</code></span><a class="headerlink" title="Permalink to this term" href="#PropagatesReloadTo=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ProtectHome="><span class="term"><code class="varname">ProtectHome=</code></span><a class="headerlink" title="Permalink to this term" href="#ProtectHome=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ProtectSystem="><span class="term"><code class="varname">ProtectSystem=</code></span><a class="headerlink" title="Permalink to this term" href="#ProtectSystem=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ReadOnlyDirectories="><span class="term"><code class="varname">ReadOnlyDirectories=</code></span><a class="headerlink" title="Permalink to this term" href="#ReadOnlyDirectories=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ReadWriteDirectories="><span class="term"><code class="varname">ReadWriteDirectories=</code></span><a class="headerlink" title="Permalink to this term" href="#ReadWriteDirectories=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="RebootArgument="><span class="term"><code class="varname">RebootArgument=</code></span><a class="headerlink" title="Permalink to this term" href="#RebootArgument=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="ReceiveBuffer="><span class="term"><code class="varname">ReceiveBuffer=</code></span><a class="headerlink" title="Permalink to this term" href="#ReceiveBuffer=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="RefuseManualStart="><span class="term"><code class="varname">RefuseManualStart=</code></span><a class="headerlink" title="Permalink to this term" href="#RefuseManualStart=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RefuseManualStop="><span class="term"><code class="varname">RefuseManualStop=</code></span><a class="headerlink" title="Permalink to this term" href="#RefuseManualStop=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="ReloadPropagatedFrom="><span class="term"><code class="varname">ReloadPropagatedFrom=</code></span><a class="headerlink" title="Permalink to this term" href="#ReloadPropagatedFrom=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RemainAfterExit="><span class="term"><code class="varname">RemainAfterExit=</code></span><a class="headerlink" title="Permalink to this term" href="#RemainAfterExit=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RemoveOnStop="><span class="term"><code class="varname">RemoveOnStop=</code></span><a class="headerlink" title="Permalink to this term" href="#RemoveOnStop=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="RequiredBy="><span class="term"><code class="varname">RequiredBy=</code></span><a class="headerlink" title="Permalink to this term" href="#RequiredBy=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Requires="><span class="term"><code class="varname">Requires=</code></span><a class="headerlink" title="Permalink to this term" href="#Requires=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RequiresMountsFor="><span class="term"><code class="varname">RequiresMountsFor=</code></span><a class="headerlink" title="Permalink to this term" href="#RequiresMountsFor=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RequiresOverridable="><span class="term"><code class="varname">RequiresOverridable=</code></span><a class="headerlink" title="Permalink to this term" href="#RequiresOverridable=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Requisite="><span class="term"><code class="varname">Requisite=</code></span><a class="headerlink" title="Permalink to this term" href="#Requisite=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="RequisiteOverridable="><span class="term"><code class="varname">RequisiteOverridable=</code></span><a class="headerlink" title="Permalink to this term" href="#RequisiteOverridable=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Restart="><span class="term"><code class="varname">Restart=</code></span><a class="headerlink" title="Permalink to this term" href="#Restart=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestartForceExitStatus="><span class="term"><code class="varname">RestartForceExitStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#RestartForceExitStatus=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestartPreventExitStatus="><span class="term"><code class="varname">RestartPreventExitStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#RestartPreventExitStatus=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestartSec="><span class="term"><code class="varname">RestartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#RestartSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RestrictAddressFamilies="><span class="term"><code class="varname">RestrictAddressFamilies=</code></span><a class="headerlink" title="Permalink to this term" href="#RestrictAddressFamilies=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="ReusePort="><span class="term"><code class="varname">ReusePort=</code></span><a class="headerlink" title="Permalink to this term" href="#ReusePort=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="RootDirectory="><span class="term"><code class="varname">RootDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#RootDirectory=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="RootDirectoryStartOnly="><span class="term"><code class="varname">RootDirectoryStartOnly=</code></span><a class="headerlink" title="Permalink to this term" href="#RootDirectoryStartOnly=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="RuntimeDirectory="><span class="term"><code class="varname">RuntimeDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeDirectory=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="RuntimeDirectoryMode="><span class="term"><code class="varname">RuntimeDirectoryMode=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeDirectoryMode=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SELinuxContext="><span class="term"><code class="varname">SELinuxContext=</code></span><a class="headerlink" title="Permalink to this term" href="#SELinuxContext=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SELinuxContextFromNet="><span class="term"><code class="varname">SELinuxContextFromNet=</code></span><a class="headerlink" title="Permalink to this term" href="#SELinuxContextFromNet=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SecureBits="><span class="term"><code class="varname">SecureBits=</code></span><a class="headerlink" title="Permalink to this term" href="#SecureBits=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SendBuffer="><span class="term"><code class="varname">SendBuffer=</code></span><a class="headerlink" title="Permalink to this term" href="#SendBuffer=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SendSIGHUP="><span class="term"><code class="varname">SendSIGHUP=</code></span><a class="headerlink" title="Permalink to this term" href="#SendSIGHUP=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="SendSIGKILL="><span class="term"><code class="varname">SendSIGKILL=</code></span><a class="headerlink" title="Permalink to this term" href="#SendSIGKILL=">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a></p></dd><dt id="Service="><span class="term"><code class="varname">Service=</code></span><a class="headerlink" title="Permalink to this term" href="#Service=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Slice="><span class="term"><code class="varname">Slice=</code></span><a class="headerlink" title="Permalink to this term" href="#Slice=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="SloppyOptions="><span class="term"><code class="varname">SloppyOptions=</code></span><a class="headerlink" title="Permalink to this term" href="#SloppyOptions=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="SmackLabel="><span class="term"><code class="varname">SmackLabel=</code></span><a class="headerlink" title="Permalink to this term" href="#SmackLabel=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SmackLabelIPIn="><span class="term"><code class="varname">SmackLabelIPIn=</code></span><a class="headerlink" title="Permalink to this term" href="#SmackLabelIPIn=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SmackLabelIPOut="><span class="term"><code class="varname">SmackLabelIPOut=</code></span><a class="headerlink" title="Permalink to this term" href="#SmackLabelIPOut=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SocketGroup="><span class="term"><code class="varname">SocketGroup=</code></span><a class="headerlink" title="Permalink to this term" href="#SocketGroup=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SocketMode="><span class="term"><code class="varname">SocketMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SocketMode=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SocketUser="><span class="term"><code class="varname">SocketUser=</code></span><a class="headerlink" title="Permalink to this term" href="#SocketUser=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Sockets="><span class="term"><code class="varname">Sockets=</code></span><a class="headerlink" title="Permalink to this term" href="#Sockets=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SourcePath="><span class="term"><code class="varname">SourcePath=</code></span><a class="headerlink" title="Permalink to this term" href="#SourcePath=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="StandardError="><span class="term"><code class="varname">StandardError=</code></span><a class="headerlink" title="Permalink to this term" href="#StandardError=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="StandardInput="><span class="term"><code class="varname">StandardInput=</code></span><a class="headerlink" title="Permalink to this term" href="#StandardInput=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="StandardOutput="><span class="term"><code class="varname">StandardOutput=</code></span><a class="headerlink" title="Permalink to this term" href="#StandardOutput=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="StartLimitAction="><span class="term"><code class="varname">StartLimitAction=</code></span><a class="headerlink" title="Permalink to this term" href="#StartLimitAction=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="StartLimitBurst="><span class="term"><code class="varname">StartLimitBurst=</code></span><a class="headerlink" title="Permalink to this term" href="#StartLimitBurst=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="StartLimitInterval="><span class="term"><code class="varname">StartLimitInterval=</code></span><a class="headerlink" title="Permalink to this term" href="#StartLimitInterval=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="StartupBlockIOWeight="><span class="term"><code class="varname">StartupBlockIOWeight=</code></span><a class="headerlink" title="Permalink to this term" href="#StartupBlockIOWeight=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="StartupCPUShares="><span class="term"><code class="varname">StartupCPUShares=</code></span><a class="headerlink" title="Permalink to this term" href="#StartupCPUShares=">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="StopWhenUnneeded="><span class="term"><code class="varname">StopWhenUnneeded=</code></span><a class="headerlink" title="Permalink to this term" href="#StopWhenUnneeded=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="SuccessExitStatus="><span class="term"><code class="varname">SuccessExitStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#SuccessExitStatus=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SupplementaryGroups="><span class="term"><code class="varname">SupplementaryGroups=</code></span><a class="headerlink" title="Permalink to this term" href="#SupplementaryGroups=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Symlinks="><span class="term"><code class="varname">Symlinks=</code></span><a class="headerlink" title="Permalink to this term" href="#Symlinks=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SysVStartPriority="><span class="term"><code class="varname">SysVStartPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#SysVStartPriority=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SyslogFacility="><span class="term"><code class="varname">SyslogFacility=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogFacility=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SyslogIdentifier="><span class="term"><code class="varname">SyslogIdentifier=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogIdentifier=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SyslogLevel="><span class="term"><code class="varname">SyslogLevel=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogLevel=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SyslogLevelPrefix="><span class="term"><code class="varname">SyslogLevelPrefix=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogLevelPrefix=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SystemCallArchitectures="><span class="term"><code class="varname">SystemCallArchitectures=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallArchitectures=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SystemCallErrorNumber="><span class="term"><code class="varname">SystemCallErrorNumber=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallErrorNumber=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SystemCallFilter="><span class="term"><code class="varname">SystemCallFilter=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallFilter=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TCPCongestion="><span class="term"><code class="varname">TCPCongestion=</code></span><a class="headerlink" title="Permalink to this term" href="#TCPCongestion=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="TTYPath="><span class="term"><code class="varname">TTYPath=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYPath=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TTYReset="><span class="term"><code class="varname">TTYReset=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYReset=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TTYVHangup="><span class="term"><code class="varname">TTYVHangup=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYVHangup=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TTYVTDisallocate="><span class="term"><code class="varname">TTYVTDisallocate=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYVTDisallocate=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="TimeoutSec="><span class="term"><code class="varname">TimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutSec=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="TimeoutStartSec="><span class="term"><code class="varname">TimeoutStartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutStartSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="TimeoutStopSec="><span class="term"><code class="varname">TimeoutStopSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutStopSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="TimerSlackNSec="><span class="term"><code class="varname">TimerSlackNSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimerSlackNSec=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Transparent="><span class="term"><code class="varname">Transparent=</code></span><a class="headerlink" title="Permalink to this term" href="#Transparent=">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="Type="><span class="term"><code class="varname">Type=</code></span><a class="headerlink" title="Permalink to this term" href="#Type=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="UMask="><span class="term"><code class="varname">UMask=</code></span><a class="headerlink" title="Permalink to this term" href="#UMask=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="Unit="><span class="term"><code class="varname">Unit=</code></span><a class="headerlink" title="Permalink to this term" href="#Unit=">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>, <a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="User="><span class="term"><code class="varname">User=</code></span><a class="headerlink" title="Permalink to this term" href="#User=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="UtmpIdentifier="><span class="term"><code class="varname">UtmpIdentifier=</code></span><a class="headerlink" title="Permalink to this term" href="#UtmpIdentifier=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="WakeSystem="><span class="term"><code class="varname">WakeSystem=</code></span><a class="headerlink" title="Permalink to this term" href="#WakeSystem=">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a></p></dd><dt id="WantedBy="><span class="term"><code class="varname">WantedBy=</code></span><a class="headerlink" title="Permalink to this term" href="#WantedBy=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="Wants="><span class="term"><code class="varname">Wants=</code></span><a class="headerlink" title="Permalink to this term" href="#Wants=">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="WatchdogSec="><span class="term"><code class="varname">WatchdogSec=</code></span><a class="headerlink" title="Permalink to this term" href="#WatchdogSec=">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="What="><span class="term"><code class="varname">What=</code></span><a class="headerlink" title="Permalink to this term" href="#What=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="Where="><span class="term"><code class="varname">Where=</code></span><a class="headerlink" title="Permalink to this term" href="#Where=">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="WorkingDirectory="><span class="term"><code class="varname">WorkingDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#WorkingDirectory=">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214189599616"></a><h2 id="Options on the kernel command line">Options on the kernel command line<a class="headerlink" title="Permalink to this headline" href="#Options%20on%20the%20kernel%20command%20line">¶</a></h2><p>Kernel boot options for configuring the behaviour of the
+                systemd process.</p><div class="variablelist"><a name="kernel-commandline-options"></a><dl class="variablelist"><dt id="-b"><span class="term"><code class="option">-b</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="1"><span class="term"><code class="constant">1</code></span><a class="headerlink" title="Permalink to this term" href="#1">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="2"><span class="term"><code class="constant">2</code></span><a class="headerlink" title="Permalink to this term" href="#2">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="3"><span class="term"><code class="varname">3</code></span><a class="headerlink" title="Permalink to this term" href="#3">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="4"><span class="term"><code class="varname">4</code></span><a class="headerlink" title="Permalink to this term" href="#4">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="5"><span class="term"><code class="varname">5</code></span><a class="headerlink" title="Permalink to this term" href="#5">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="S"><span class="term"><code class="varname">S</code></span><a class="headerlink" title="Permalink to this term" href="#S">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="debug"><span class="term"><code class="varname">debug</code></span><a class="headerlink" title="Permalink to this term" href="#debug">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="emergency"><span class="term"><code class="varname">emergency</code></span><a class="headerlink" title="Permalink to this term" href="#emergency">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="fsck.mode="><span class="term"><code class="varname">fsck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#fsck.mode=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="fsck.repair="><span class="term"><code class="varname">fsck.repair=</code></span><a class="headerlink" title="Permalink to this term" href="#fsck.repair=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="fstab="><span class="term"><code class="varname">fstab=</code></span><a class="headerlink" title="Permalink to this term" href="#fstab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="locale.LANG="><span class="term"><code class="varname">locale.LANG=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LANG=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LANGUAGE="><span class="term"><code class="varname">locale.LANGUAGE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LANGUAGE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_ADDRESS="><span class="term"><code class="varname">locale.LC_ADDRESS=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_ADDRESS=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_COLLATE="><span class="term"><code class="varname">locale.LC_COLLATE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_COLLATE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_CTYPE="><span class="term"><code class="varname">locale.LC_CTYPE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_CTYPE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_IDENTIFICATION="><span class="term"><code class="varname">locale.LC_IDENTIFICATION=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_IDENTIFICATION=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_MEASUREMENT="><span class="term"><code class="varname">locale.LC_MEASUREMENT=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_MEASUREMENT=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_MESSAGES="><span class="term"><code class="varname">locale.LC_MESSAGES=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_MESSAGES=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_MONETARY="><span class="term"><code class="varname">locale.LC_MONETARY=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_MONETARY=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_NAME="><span class="term"><code class="varname">locale.LC_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_NAME=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_NUMERIC="><span class="term"><code class="varname">locale.LC_NUMERIC=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_NUMERIC=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_PAPER="><span class="term"><code class="varname">locale.LC_PAPER=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_PAPER=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_TELEPHONE="><span class="term"><code class="varname">locale.LC_TELEPHONE=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_TELEPHONE=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="locale.LC_TIME="><span class="term"><code class="varname">locale.LC_TIME=</code></span><a class="headerlink" title="Permalink to this term" href="#locale.LC_TIME=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="luks.crypttab="><span class="term"><code class="varname">luks.crypttab=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.crypttab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks.key="><span class="term"><code class="varname">luks.key=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.key=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks.options="><span class="term"><code class="varname">luks.options=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.options=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks.uuid="><span class="term"><code class="varname">luks.uuid=</code></span><a class="headerlink" title="Permalink to this term" href="#luks.uuid=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="luks="><span class="term"><code class="varname">luks=</code></span><a class="headerlink" title="Permalink to this term" href="#luks=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="modules-load="><span class="term"><code class="varname">modules-load=</code></span><a class="headerlink" title="Permalink to this term" href="#modules-load=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="mount.usr="><span class="term"><code class="varname">mount.usr=</code></span><a class="headerlink" title="Permalink to this term" href="#mount.usr=">¶</a></dt><dd><p><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="mount.usrflags="><span class="term"><code class="varname">mount.usrflags=</code></span><a class="headerlink" title="Permalink to this term" href="#mount.usrflags=">¶</a></dt><dd><p><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="mount.usrfstype="><span class="term"><code class="varname">mount.usrfstype=</code></span><a class="headerlink" title="Permalink to this term" href="#mount.usrfstype=">¶</a></dt><dd><p><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="net.ifnames="><span class="term"><code class="varname">net.ifnames=</code></span><a class="headerlink" title="Permalink to this term" href="#net.ifnames=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="plymouth.enable="><span class="term"><code class="varname">plymouth.enable=</code></span><a class="headerlink" title="Permalink to this term" href="#plymouth.enable=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="quiet"><span class="term"><code class="varname">quiet</code></span><a class="headerlink" title="Permalink to this term" href="#quiet">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="quotacheck.mode="><span class="term"><code class="varname">quotacheck.mode=</code></span><a class="headerlink" title="Permalink to this term" href="#quotacheck.mode=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a></p></dd><dt id="rd.fstab="><span class="term"><code class="varname">rd.fstab=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.fstab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="rd.luks.crypttab="><span class="term"><code class="varname">rd.luks.crypttab=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.crypttab=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks.key="><span class="term"><code class="varname">rd.luks.key=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.key=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks.options="><span class="term"><code class="varname">rd.luks.options=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.options=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks.uuid="><span class="term"><code class="varname">rd.luks.uuid=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks.uuid=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.luks="><span class="term"><code class="varname">rd.luks=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.luks=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="rd.modules-load="><span class="term"><code class="varname">rd.modules-load=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.modules-load=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="rd.systemd.gpt_auto="><span class="term"><code class="varname">rd.systemd.gpt_auto=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.systemd.gpt_auto=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="rd.systemd.unit="><span class="term"><code class="varname">rd.systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.systemd.unit=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="rd.udev.children-max="><span class="term"><code class="varname">rd.udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.udev.children-max=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="rd.udev.event-timeout="><span class="term"><code class="varname">rd.udev.event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.udev.event-timeout=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="rd.udev.exec-delay="><span class="term"><code class="varname">rd.udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.udev.exec-delay=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="rd.udev.log-priority="><span class="term"><code class="varname">rd.udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#rd.udev.log-priority=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="rescue"><span class="term"><code class="varname">rescue</code></span><a class="headerlink" title="Permalink to this term" href="#rescue">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="resume="><span class="term"><code class="varname">resume=</code></span><a class="headerlink" title="Permalink to this term" href="#resume=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a></p></dd><dt id="ro"><span class="term"><code class="varname">ro</code></span><a class="headerlink" title="Permalink to this term" href="#ro">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="root="><span class="term"><code class="varname">root=</code></span><a class="headerlink" title="Permalink to this term" href="#root=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="rootflags="><span class="term"><code class="varname">rootflags=</code></span><a class="headerlink" title="Permalink to this term" href="#rootflags=">¶</a></dt><dd><p><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="rootfsflags="><span class="term"><code class="varname">rootfsflags=</code></span><a class="headerlink" title="Permalink to this term" href="#rootfsflags=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="rootfstype="><span class="term"><code class="varname">rootfstype=</code></span><a class="headerlink" title="Permalink to this term" href="#rootfstype=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="rw"><span class="term"><code class="varname">rw</code></span><a class="headerlink" title="Permalink to this term" href="#rw">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="s"><span class="term"><code class="varname">s</code></span><a class="headerlink" title="Permalink to this term" href="#s">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="single"><span class="term"><code class="varname">single</code></span><a class="headerlink" title="Permalink to this term" href="#single">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.confirm_spawn="><span class="term"><code class="varname">systemd.confirm_spawn=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.confirm_spawn=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.crash_chvt="><span class="term"><code class="varname">systemd.crash_chvt=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.crash_chvt=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.crash_shell="><span class="term"><code class="varname">systemd.crash_shell=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.crash_shell=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.debug-shell"><span class="term"><code class="varname">systemd.debug-shell</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.debug-shell">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="systemd.default_standard_error="><span class="term"><code class="varname">systemd.default_standard_error=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.default_standard_error=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.default_standard_output="><span class="term"><code class="varname">systemd.default_standard_output=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.default_standard_output=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.dump_core="><span class="term"><code class="varname">systemd.dump_core=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.dump_core=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.gpt_auto="><span class="term"><code class="varname">systemd.gpt_auto=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.gpt_auto=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="systemd.journald.forward_to_console="><span class="term"><code class="varname">systemd.journald.forward_to_console=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_console=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.journald.forward_to_kmsg="><span class="term"><code class="varname">systemd.journald.forward_to_kmsg=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_kmsg=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.journald.forward_to_syslog="><span class="term"><code class="varname">systemd.journald.forward_to_syslog=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_syslog=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.journald.forward_to_wall="><span class="term"><code class="varname">systemd.journald.forward_to_wall=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_wall=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd.log_color="><span class="term"><code class="varname">systemd.log_color=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_color=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.log_level="><span class="term"><code class="varname">systemd.log_level=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_level=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.log_location="><span class="term"><code class="varname">systemd.log_location=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_location=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.log_target="><span class="term"><code class="varname">systemd.log_target=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.log_target=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.mask="><span class="term"><code class="varname">systemd.mask=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.mask=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="systemd.restore_state="><span class="term"><code class="varname">systemd.restore_state=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.restore_state=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a>, <a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="systemd.setenv="><span class="term"><code class="varname">systemd.setenv=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.setenv=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.show_status="><span class="term"><code class="varname">systemd.show_status=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.show_status=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd.wants="><span class="term"><code class="varname">systemd.wants=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.wants=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a></p></dd><dt id="udev.children-max="><span class="term"><code class="varname">udev.children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.children-max=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="udev.event-timeout="><span class="term"><code class="varname">udev.event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.event-timeout=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="udev.exec-delay="><span class="term"><code class="varname">udev.exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.exec-delay=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="udev.log-priority="><span class="term"><code class="varname">udev.log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#udev.log-priority=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="vconsole.font.map="><span class="term"><code class="varname">vconsole.font.map=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.font.map=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.font.unimap="><span class="term"><code class="varname">vconsole.font.unimap=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.font.unimap=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.font="><span class="term"><code class="varname">vconsole.font=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.font=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.keymap.toggle="><span class="term"><code class="varname">vconsole.keymap.toggle=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.keymap.toggle=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="vconsole.keymap="><span class="term"><code class="varname">vconsole.keymap=</code></span><a class="headerlink" title="Permalink to this term" href="#vconsole.keymap=">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214189383648"></a><h2 id="Environment variables">Environment variables<a class="headerlink" title="Permalink to this headline" href="#Environment%20variables">¶</a></h2><p>Environment variables understood by the systemd
+                manager and other programs.</p><div class="variablelist"><a name="environment-variables"></a><dl class="variablelist"><dt id="$HOME"><span class="term"><code class="varname">$HOME</code></span><a class="headerlink" title="Permalink to this term" href="#%24HOME">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LANG"><span class="term"><code class="varname">$LANG</code></span><a class="headerlink" title="Permalink to this term" href="#%24LANG">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS">¶</a></dt><dd><p><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID">¶</a></dt><dd><p><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$LOGNAME"><span class="term"><code class="varname">$LOGNAME</code></span><a class="headerlink" title="Permalink to this term" href="#%24LOGNAME">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$MAINPID"><span class="term"><code class="varname">$MAINPID</code></span><a class="headerlink" title="Permalink to this term" href="#%24MAINPID">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$MANAGERPID"><span class="term"><code class="varname">$MANAGERPID</code></span><a class="headerlink" title="Permalink to this term" href="#%24MANAGERPID">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$NOTIFY_SOCKET"><span class="term"><code class="varname">$NOTIFY_SOCKET</code></span><a class="headerlink" title="Permalink to this term" href="#%24NOTIFY_SOCKET">¶</a></dt><dd><p><a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$PATH"><span class="term"><code class="varname">$PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24PATH">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$PREVLEVEL"><span class="term"><code class="varname">$PREVLEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24PREVLEVEL">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="$RUNLEVEL"><span class="term"><code class="varname">$RUNLEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24RUNLEVEL">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="$SHELL"><span class="term"><code class="varname">$SHELL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SHELL">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="$SYSTEMD_LOG_COLOR"><span class="term"><code class="varname">$SYSTEMD_LOG_COLOR</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_COLOR">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_LOG_LEVEL"><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LEVEL">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_LOG_LOCATION"><span class="term"><code class="varname">$SYSTEMD_LOG_LOCATION</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LOCATION">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_LOG_TARGET"><span class="term"><code class="varname">$SYSTEMD_LOG_TARGET</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_TARGET">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="$SYSTEMD_SYSVINIT_PATH"><span class="term"><code class="varname">$SYSTEMD_SYSVINIT_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_SYSVINIT_PATH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$SYSTEMD_SYSVRCND_PATH"><span class="term"><code class="varname">$SYSTEMD_SYSVRCND_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_SYSVRCND_PATH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$SYSTEMD_UNIT_PATH"><span class="term"><code class="varname">$SYSTEMD_UNIT_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_UNIT_PATH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$TERM"><span class="term"><code class="varname">$TERM</code></span><a class="headerlink" title="Permalink to this term" href="#%24TERM">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$UDEV_LOG="><span class="term"><code class="varname">$UDEV_LOG=</code></span><a class="headerlink" title="Permalink to this term" href="#%24UDEV_LOG=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="$USER"><span class="term"><code class="varname">$USER</code></span><a class="headerlink" title="Permalink to this term" href="#%24USER">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$WATCHDOG_PID"><span class="term"><code class="varname">$WATCHDOG_PID</code></span><a class="headerlink" title="Permalink to this term" href="#%24WATCHDOG_PID">¶</a></dt><dd><p><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a></p></dd><dt id="$WATCHDOG_USEC"><span class="term"><code class="varname">$WATCHDOG_USEC</code></span><a class="headerlink" title="Permalink to this term" href="#%24WATCHDOG_USEC">¶</a></dt><dd><p><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a></p></dd><dt id="$XDG_CONFIG_DIRS"><span class="term"><code class="varname">$XDG_CONFIG_DIRS</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_CONFIG_DIRS">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_CONFIG_HOME"><span class="term"><code class="varname">$XDG_CONFIG_HOME</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_CONFIG_HOME">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_DATA_DIRS"><span class="term"><code class="varname">$XDG_DATA_DIRS</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_DATA_DIRS">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_DATA_HOME"><span class="term"><code class="varname">$XDG_DATA_HOME</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_DATA_HOME">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="$XDG_RUNTIME_DIR"><span class="term"><code class="varname">$XDG_RUNTIME_DIR</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_RUNTIME_DIR">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$XDG_SEAT"><span class="term"><code class="varname">$XDG_SEAT</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SEAT">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$XDG_SESSION_CLASS"><span class="term"><code class="varname">$XDG_SESSION_CLASS</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_CLASS">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="$XDG_SESSION_DESKTOP"><span class="term"><code class="varname">$XDG_SESSION_DESKTOP</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_DESKTOP">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="$XDG_SESSION_ID"><span class="term"><code class="varname">$XDG_SESSION_ID</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_ID">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="$XDG_SESSION_TYPE"><span class="term"><code class="varname">$XDG_SESSION_TYPE</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_SESSION_TYPE">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="$XDG_VTNR"><span class="term"><code class="varname">$XDG_VTNR</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_VTNR">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214189301024"></a><h2 id="UDEV directives">UDEV directives<a class="headerlink" title="Permalink to this headline" href="#UDEV%20directives">¶</a></h2><p>Directives for configuring systemd units through the
+                udev database.</p><div class="variablelist"><a name="udev-directives"></a><dl class="variablelist"><dt id="$$"><span class="term"><code class="option">$$</code></span><a class="headerlink" title="Permalink to this term" href="#%24%24">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$attr{file}"><span class="term"><code class="option">$attr{<em class="replaceable"><code>file</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%24attr%7Bfile%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$devnode"><span class="term"><code class="option">$devnode</code></span><a class="headerlink" title="Permalink to this term" href="#%24devnode">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$devpath"><span class="term"><code class="option">$devpath</code></span><a class="headerlink" title="Permalink to this term" href="#%24devpath">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$driver"><span class="term"><code class="option">$driver</code></span><a class="headerlink" title="Permalink to this term" href="#%24driver">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$env{key}"><span class="term"><code class="option">$env{<em class="replaceable"><code>key</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%24env%7Bkey%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$id"><span class="term"><code class="option">$id</code></span><a class="headerlink" title="Permalink to this term" href="#%24id">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$kernel"><span class="term"><code class="option">$kernel</code></span><a class="headerlink" title="Permalink to this term" href="#%24kernel">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$links"><span class="term"><code class="option">$links</code></span><a class="headerlink" title="Permalink to this term" href="#%24links">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$major"><span class="term"><code class="option">$major</code></span><a class="headerlink" title="Permalink to this term" href="#%24major">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$minor"><span class="term"><code class="option">$minor</code></span><a class="headerlink" title="Permalink to this term" href="#%24minor">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$name"><span class="term"><code class="option">$name</code></span><a class="headerlink" title="Permalink to this term" href="#%24name">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$number"><span class="term"><code class="option">$number</code></span><a class="headerlink" title="Permalink to this term" href="#%24number">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$parent"><span class="term"><code class="option">$parent</code></span><a class="headerlink" title="Permalink to this term" href="#%24parent">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$result"><span class="term"><code class="option">$result</code></span><a class="headerlink" title="Permalink to this term" href="#%24result">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$root"><span class="term"><code class="option">$root</code></span><a class="headerlink" title="Permalink to this term" href="#%24root">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="$sys"><span class="term"><code class="option">$sys</code></span><a class="headerlink" title="Permalink to this term" href="#%24sys">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%%"><span class="term"><code class="option">%%</code></span><a class="headerlink" title="Permalink to this term" href="#%%">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%E{key}"><span class="term"><code class="option">%E{<em class="replaceable"><code>key</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%E%7Bkey%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%M"><span class="term"><code class="option">%M</code></span><a class="headerlink" title="Permalink to this term" href="#%M">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%N"><span class="term"><code class="option">%N</code></span><a class="headerlink" title="Permalink to this term" href="#%N">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%P"><span class="term"><code class="option">%P</code></span><a class="headerlink" title="Permalink to this term" href="#%P">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%S"><span class="term"><code class="option">%S</code></span><a class="headerlink" title="Permalink to this term" href="#%S">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%b"><span class="term"><code class="option">%b</code></span><a class="headerlink" title="Permalink to this term" href="#%b">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%c"><span class="term"><code class="option">%c</code></span><a class="headerlink" title="Permalink to this term" href="#%c">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%k"><span class="term"><code class="option">%k</code></span><a class="headerlink" title="Permalink to this term" href="#%k">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%m"><span class="term"><code class="option">%m</code></span><a class="headerlink" title="Permalink to this term" href="#%m">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%n"><span class="term"><code class="option">%n</code></span><a class="headerlink" title="Permalink to this term" href="#%n">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%p"><span class="term"><code class="option">%p</code></span><a class="headerlink" title="Permalink to this term" href="#%p">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%r"><span class="term"><code class="option">%r</code></span><a class="headerlink" title="Permalink to this term" href="#%r">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="%s{file}"><span class="term"><code class="option">%s{<em class="replaceable"><code>file</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#%s%7Bfile%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ACTION"><span class="term"><code class="varname">ACTION</code></span><a class="headerlink" title="Permalink to this term" href="#ACTION">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ATTRS{filename}"><span class="term"><code class="varname">ATTRS{<em class="replaceable"><code>filename</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#ATTRS%7Bfilename%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ATTR{filename}"><span class="term"><code class="varname">ATTR{<em class="replaceable"><code>filename</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#ATTR%7Bfilename%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="DEVPATH"><span class="term"><code class="varname">DEVPATH</code></span><a class="headerlink" title="Permalink to this term" href="#DEVPATH">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="DRIVER"><span class="term"><code class="varname">DRIVER</code></span><a class="headerlink" title="Permalink to this term" href="#DRIVER">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="DRIVERS"><span class="term"><code class="varname">DRIVERS</code></span><a class="headerlink" title="Permalink to this term" href="#DRIVERS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ENV{key}"><span class="term"><code class="varname">ENV{<em class="replaceable"><code>key</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#ENV%7Bkey%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="GOTO"><span class="term"><code class="varname">GOTO</code></span><a class="headerlink" title="Permalink to this term" href="#GOTO">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="GROUP"><span class="term"><code class="varname">GROUP</code></span><a class="headerlink" title="Permalink to this term" href="#GROUP">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="ID_MODEL="><span class="term"><code class="varname">ID_MODEL=</code></span><a class="headerlink" title="Permalink to this term" href="#ID_MODEL=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="ID_MODEL_FROM_DATABASE="><span class="term"><code class="varname">ID_MODEL_FROM_DATABASE=</code></span><a class="headerlink" title="Permalink to this term" href="#ID_MODEL_FROM_DATABASE=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="IMPORT{type}"><span class="term"><code class="varname">IMPORT{<em class="replaceable"><code>type</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#IMPORT%7Btype%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="KERNEL"><span class="term"><code class="varname">KERNEL</code></span><a class="headerlink" title="Permalink to this term" href="#KERNEL">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="KERNELS"><span class="term"><code class="varname">KERNELS</code></span><a class="headerlink" title="Permalink to this term" href="#KERNELS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="LABEL"><span class="term"><code class="varname">LABEL</code></span><a class="headerlink" title="Permalink to this term" href="#LABEL">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="MODE"><span class="term"><code class="varname">MODE</code></span><a class="headerlink" title="Permalink to this term" href="#MODE">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="NAME"><span class="term"><code class="varname">NAME</code></span><a class="headerlink" title="Permalink to this term" href="#NAME">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="OPTIONS"><span class="term"><code class="varname">OPTIONS</code></span><a class="headerlink" title="Permalink to this term" href="#OPTIONS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="OWNER"><span class="term"><code class="varname">OWNER</code></span><a class="headerlink" title="Permalink to this term" href="#OWNER">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="PROGRAM"><span class="term"><code class="varname">PROGRAM</code></span><a class="headerlink" title="Permalink to this term" href="#PROGRAM">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="RESULT"><span class="term"><code class="varname">RESULT</code></span><a class="headerlink" title="Permalink to this term" href="#RESULT">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="RUN{type}"><span class="term"><code class="varname">RUN{<em class="replaceable"><code>type</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#RUN%7Btype%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SECLABEL{module}"><span class="term"><code class="varname">SECLABEL{<em class="replaceable"><code>module</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#SECLABEL%7Bmodule%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SUBSYSTEM"><span class="term"><code class="varname">SUBSYSTEM</code></span><a class="headerlink" title="Permalink to this term" href="#SUBSYSTEM">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SUBSYSTEMS"><span class="term"><code class="varname">SUBSYSTEMS</code></span><a class="headerlink" title="Permalink to this term" href="#SUBSYSTEMS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SYMLINK"><span class="term"><code class="varname">SYMLINK</code></span><a class="headerlink" title="Permalink to this term" href="#SYMLINK">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="SYSTEMD_ALIAS="><span class="term"><code class="varname">SYSTEMD_ALIAS=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_ALIAS=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="SYSTEMD_READY="><span class="term"><code class="varname">SYSTEMD_READY=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_READY=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="SYSTEMD_USER_WANTS="><span class="term"><code class="varname">SYSTEMD_USER_WANTS=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_USER_WANTS=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="SYSTEMD_WANTS="><span class="term"><code class="varname">SYSTEMD_WANTS=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSTEMD_WANTS=">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a></p></dd><dt id="TAG"><span class="term"><code class="varname">TAG</code></span><a class="headerlink" title="Permalink to this term" href="#TAG">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="TAGS"><span class="term"><code class="varname">TAGS</code></span><a class="headerlink" title="Permalink to this term" href="#TAGS">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="TEST{octal mode mask}"><span class="term"><code class="varname">TEST{<em class="replaceable"><code>octal mode mask</code></em>}</code></span><a class="headerlink" title="Permalink to this term" href="#TEST%7Boctal%20mode%20mask%7D">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="WAIT_FOR"><span class="term"><code class="varname">WAIT_FOR</code></span><a class="headerlink" title="Permalink to this term" href="#WAIT_FOR">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="link_priority="><span class="term"><code class="option">link_priority=</code></span><a class="headerlink" title="Permalink to this term" href="#link_priority=">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="nowatch"><span class="term"><code class="option">nowatch</code></span><a class="headerlink" title="Permalink to this term" href="#nowatch">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="static_node="><span class="term"><code class="option">static_node=</code></span><a class="headerlink" title="Permalink to this term" href="#static_node=">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="string_escape="><span class="term"><code class="option">string_escape=</code></span><a class="headerlink" title="Permalink to this term" href="#string_escape=">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="watch"><span class="term"><code class="option">watch</code></span><a class="headerlink" title="Permalink to this term" href="#watch">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214189182896"></a><h2 id="Network directives">Network directives<a class="headerlink" title="Permalink to this headline" href="#Network%20directives">¶</a></h2><p>Directives for configuring network links through the
                 net-setup-link udev builtin and networks through
-                systemd-networkd.</p><div class="variablelist"><a name="network-directives"></a><dl class="variablelist"><dt id="Address="><span class="term"><code class="varname">Address=</code></span><a class="headerlink" title="Permalink to this term" href="#Address=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Alias="><span class="term"><code class="varname">Alias=</code></span><a class="headerlink" title="Permalink to this term" href="#Alias=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="Architecture="><span class="term"><code class="varname">Architecture=</code></span><a class="headerlink" title="Permalink to this term" href="#Architecture=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="BitsPerSecond="><span class="term"><code class="varname">BitsPerSecond=</code></span><a class="headerlink" title="Permalink to this term" href="#BitsPerSecond=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="Bond="><span class="term"><code class="varname">Bond=</code></span><a class="headerlink" title="Permalink to this term" href="#Bond=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Bridge="><span class="term"><code class="varname">Bridge=</code></span><a class="headerlink" title="Permalink to this term" href="#Bridge=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Broadcast="><span class="term"><code class="varname">Broadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#Broadcast=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="CriticalConnection="><span class="term"><code class="varname">CriticalConnection=</code></span><a class="headerlink" title="Permalink to this term" href="#CriticalConnection=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DHCP="><span class="term"><code class="varname">DHCP=</code></span><a class="headerlink" title="Permalink to this term" href="#DHCP=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DHCPServer="><span class="term"><code class="varname">DHCPServer=</code></span><a class="headerlink" title="Permalink to this term" href="#DHCPServer=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DNS="><span class="term"><code class="varname">DNS=</code></span><a class="headerlink" title="Permalink to this term" href="#DNS=">¶</a></dt><dd><p><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Destination="><span class="term"><code class="varname">Destination=</code></span><a class="headerlink" title="Permalink to this term" href="#Destination=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DiscoverPathMTU="><span class="term"><code class="varname">DiscoverPathMTU=</code></span><a class="headerlink" title="Permalink to this term" href="#DiscoverPathMTU=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Driver="><span class="term"><code class="varname">Driver=</code></span><a class="headerlink" title="Permalink to this term" href="#Driver=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Duplex="><span class="term"><code class="varname">Duplex=</code></span><a class="headerlink" title="Permalink to this term" href="#Duplex=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="Gateway="><span class="term"><code class="varname">Gateway=</code></span><a class="headerlink" title="Permalink to this term" href="#Gateway=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Group="><span class="term"><code class="varname">Group=</code></span><a class="headerlink" title="Permalink to this term" href="#Group=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Host="><span class="term"><code class="varname">Host=</code></span><a class="headerlink" title="Permalink to this term" href="#Host=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="IPv4LL="><span class="term"><code class="varname">IPv4LL=</code></span><a class="headerlink" title="Permalink to this term" href="#IPv4LL=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Id="><span class="term"><code class="varname">Id=</code></span><a class="headerlink" title="Permalink to this term" href="#Id=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="KernelCommandLine="><span class="term"><code class="varname">KernelCommandLine=</code></span><a class="headerlink" title="Permalink to this term" href="#KernelCommandLine=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Kind="><span class="term"><code class="varname">Kind=</code></span><a class="headerlink" title="Permalink to this term" href="#Kind=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Label="><span class="term"><code class="varname">Label=</code></span><a class="headerlink" title="Permalink to this term" href="#Label=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Local="><span class="term"><code class="varname">Local=</code></span><a class="headerlink" title="Permalink to this term" href="#Local=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="MACAddress="><span class="term"><code class="varname">MACAddress=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddress=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="MACAddressPolicy="><span class="term"><code class="varname">MACAddressPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddressPolicy=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="MACVLAN="><span class="term"><code class="varname">MACVLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#MACVLAN=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="MTUBytes="><span class="term"><code class="varname">MTUBytes=</code></span><a class="headerlink" title="Permalink to this term" href="#MTUBytes=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="MacLearning="><span class="term"><code class="varname">MacLearning=</code></span><a class="headerlink" title="Permalink to this term" href="#MacLearning=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Mode="><span class="term"><code class="varname">Mode=</code></span><a class="headerlink" title="Permalink to this term" href="#Mode=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="MultiQueue="><span class="term"><code class="varname">MultiQueue=</code></span><a class="headerlink" title="Permalink to this term" href="#MultiQueue=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Name="><span class="term"><code class="varname">Name=</code></span><a class="headerlink" title="Permalink to this term" href="#Name=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="NamePolicy="><span class="term"><code class="varname">NamePolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#NamePolicy=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="OneQueue="><span class="term"><code class="varname">OneQueue=</code></span><a class="headerlink" title="Permalink to this term" href="#OneQueue=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="PacketInfo="><span class="term"><code class="varname">PacketInfo=</code></span><a class="headerlink" title="Permalink to this term" href="#PacketInfo=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Path="><span class="term"><code class="varname">Path=</code></span><a class="headerlink" title="Permalink to this term" href="#Path=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Remote="><span class="term"><code class="varname">Remote=</code></span><a class="headerlink" title="Permalink to this term" href="#Remote=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="SendHostname="><span class="term"><code class="varname">SendHostname=</code></span><a class="headerlink" title="Permalink to this term" href="#SendHostname=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="TOS="><span class="term"><code class="varname">TOS=</code></span><a class="headerlink" title="Permalink to this term" href="#TOS=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="TTL="><span class="term"><code class="varname">TTL=</code></span><a class="headerlink" title="Permalink to this term" href="#TTL=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Tunnel="><span class="term"><code class="varname">Tunnel=</code></span><a class="headerlink" title="Permalink to this term" href="#Tunnel=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Type="><span class="term"><code class="varname">Type=</code></span><a class="headerlink" title="Permalink to this term" href="#Type=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseDNS="><span class="term"><code class="varname">UseDNS=</code></span><a class="headerlink" title="Permalink to this term" href="#UseDNS=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseHostname="><span class="term"><code class="varname">UseHostname=</code></span><a class="headerlink" title="Permalink to this term" href="#UseHostname=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseMTU="><span class="term"><code class="varname">UseMTU=</code></span><a class="headerlink" title="Permalink to this term" href="#UseMTU=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseRoutes="><span class="term"><code class="varname">UseRoutes=</code></span><a class="headerlink" title="Permalink to this term" href="#UseRoutes=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="User="><span class="term"><code class="varname">User=</code></span><a class="headerlink" title="Permalink to this term" href="#User=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="VLAN="><span class="term"><code class="varname">VLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#VLAN=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="VXLAN="><span class="term"><code class="varname">VXLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#VXLAN=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Virtualization="><span class="term"><code class="varname">Virtualization=</code></span><a class="headerlink" title="Permalink to this term" href="#Virtualization=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="WakeOnLan="><span class="term"><code class="varname">WakeOnLan=</code></span><a class="headerlink" title="Permalink to this term" href="#WakeOnLan=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214181957344"></a><h2 id="Journal fields">Journal fields<a class="headerlink" title="Permalink to this headline" href="#Journal%20fields">¶</a></h2><p>Fields in the journal events with a well known meaning.</p><div class="variablelist"><a name="journal-directives"></a><dl class="variablelist"><dt id="CODE_FILE="><span class="term"><code class="varname">CODE_FILE=</code></span><a class="headerlink" title="Permalink to this term" href="#CODE_FILE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="CODE_FUNC="><span class="term"><code class="varname">CODE_FUNC=</code></span><a class="headerlink" title="Permalink to this term" href="#CODE_FUNC=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="CODE_LINE="><span class="term"><code class="varname">CODE_LINE=</code></span><a class="headerlink" title="Permalink to this term" href="#CODE_LINE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="COREDUMP_UNIT="><span class="term"><code class="varname">COREDUMP_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#COREDUMP_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="COREDUMP_USER_UNIT="><span class="term"><code class="varname">COREDUMP_USER_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#COREDUMP_USER_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="ERRNO="><span class="term"><code class="varname">ERRNO=</code></span><a class="headerlink" title="Permalink to this term" href="#ERRNO=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="MESSAGE="><span class="term"><code class="varname">MESSAGE=</code></span><a class="headerlink" title="Permalink to this term" href="#MESSAGE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="MESSAGE_ID="><span class="term"><code class="varname">MESSAGE_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#MESSAGE_ID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_AUDIT_LOGINUID="><span class="term"><code class="varname">OBJECT_AUDIT_LOGINUID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_AUDIT_LOGINUID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_AUDIT_SESSION="><span class="term"><code class="varname">OBJECT_AUDIT_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_AUDIT_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_CMDLINE="><span class="term"><code class="varname">OBJECT_CMDLINE=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_CMDLINE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_COMM="><span class="term"><code class="varname">OBJECT_COMM=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_COMM=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_EXE="><span class="term"><code class="varname">OBJECT_EXE=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_EXE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_GID="><span class="term"><code class="varname">OBJECT_GID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_GID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_PID="><span class="term"><code class="varname">OBJECT_PID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_PID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_CGROUP="><span class="term"><code class="varname">OBJECT_SYSTEMD_CGROUP=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_CGROUP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_OWNER_UID="><span class="term"><code class="varname">OBJECT_SYSTEMD_OWNER_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_OWNER_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_SESSION="><span class="term"><code class="varname">OBJECT_SYSTEMD_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_UNIT="><span class="term"><code class="varname">OBJECT_SYSTEMD_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_USER_UNIT="><span class="term"><code class="varname">OBJECT_SYSTEMD_USER_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_USER_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_UID="><span class="term"><code class="varname">OBJECT_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="PRIORITY="><span class="term"><code class="varname">PRIORITY=</code></span><a class="headerlink" title="Permalink to this term" href="#PRIORITY=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="SYSLOG_FACILITY="><span class="term"><code class="varname">SYSLOG_FACILITY=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSLOG_FACILITY=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="SYSLOG_IDENTIFIER="><span class="term"><code class="varname">SYSLOG_IDENTIFIER=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSLOG_IDENTIFIER=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="SYSLOG_PID="><span class="term"><code class="varname">SYSLOG_PID=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSLOG_PID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_AUDIT_LOGINUID="><span class="term"><code class="varname">_AUDIT_LOGINUID=</code></span><a class="headerlink" title="Permalink to this term" href="#_AUDIT_LOGINUID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_AUDIT_SESSION="><span class="term"><code class="varname">_AUDIT_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#_AUDIT_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_BOOT_ID="><span class="term"><code class="varname">_BOOT_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#_BOOT_ID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_CAP_EFFECTIVE="><span class="term"><code class="varname">_CAP_EFFECTIVE=</code></span><a class="headerlink" title="Permalink to this term" href="#_CAP_EFFECTIVE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_CMDLINE="><span class="term"><code class="varname">_CMDLINE=</code></span><a class="headerlink" title="Permalink to this term" href="#_CMDLINE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_COMM="><span class="term"><code class="varname">_COMM=</code></span><a class="headerlink" title="Permalink to this term" href="#_COMM=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_EXE="><span class="term"><code class="varname">_EXE=</code></span><a class="headerlink" title="Permalink to this term" href="#_EXE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_GID="><span class="term"><code class="varname">_GID=</code></span><a class="headerlink" title="Permalink to this term" href="#_GID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_HOSTNAME="><span class="term"><code class="varname">_HOSTNAME=</code></span><a class="headerlink" title="Permalink to this term" href="#_HOSTNAME=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_KERNEL_DEVICE="><span class="term"><code class="varname">_KERNEL_DEVICE=</code></span><a class="headerlink" title="Permalink to this term" href="#_KERNEL_DEVICE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_KERNEL_SUBSYSTEM="><span class="term"><code class="varname">_KERNEL_SUBSYSTEM=</code></span><a class="headerlink" title="Permalink to this term" href="#_KERNEL_SUBSYSTEM=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_MACHINE_ID="><span class="term"><code class="varname">_MACHINE_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#_MACHINE_ID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_PID="><span class="term"><code class="varname">_PID=</code></span><a class="headerlink" title="Permalink to this term" href="#_PID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SELINUX_CONTEXT="><span class="term"><code class="varname">_SELINUX_CONTEXT=</code></span><a class="headerlink" title="Permalink to this term" href="#_SELINUX_CONTEXT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SOURCE_REALTIME_TIMESTAMP="><span class="term"><code class="varname">_SOURCE_REALTIME_TIMESTAMP=</code></span><a class="headerlink" title="Permalink to this term" href="#_SOURCE_REALTIME_TIMESTAMP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_CGROUP="><span class="term"><code class="varname">_SYSTEMD_CGROUP=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_CGROUP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_OWNER_UID="><span class="term"><code class="varname">_SYSTEMD_OWNER_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_OWNER_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_SESSION="><span class="term"><code class="varname">_SYSTEMD_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_SLICE="><span class="term"><code class="varname">_SYSTEMD_SLICE=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_SLICE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_UNIT="><span class="term"><code class="varname">_SYSTEMD_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_USER_UNIT="><span class="term"><code class="varname">_SYSTEMD_USER_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_USER_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_TRANSPORT="><span class="term"><code class="varname">_TRANSPORT=</code></span><a class="headerlink" title="Permalink to this term" href="#_TRANSPORT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UDEV_DEVLINK="><span class="term"><code class="varname">_UDEV_DEVLINK=</code></span><a class="headerlink" title="Permalink to this term" href="#_UDEV_DEVLINK=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UDEV_DEVNODE="><span class="term"><code class="varname">_UDEV_DEVNODE=</code></span><a class="headerlink" title="Permalink to this term" href="#_UDEV_DEVNODE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UDEV_SYSNAME="><span class="term"><code class="varname">_UDEV_SYSNAME=</code></span><a class="headerlink" title="Permalink to this term" href="#_UDEV_SYSNAME=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UID="><span class="term"><code class="varname">_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="__CURSOR="><span class="term"><code class="varname">__CURSOR=</code></span><a class="headerlink" title="Permalink to this term" href="#__CURSOR=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="__MONOTONIC_TIMESTAMP="><span class="term"><code class="varname">__MONOTONIC_TIMESTAMP=</code></span><a class="headerlink" title="Permalink to this term" href="#__MONOTONIC_TIMESTAMP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="__REALTIME_TIMESTAMP="><span class="term"><code class="varname">__REALTIME_TIMESTAMP=</code></span><a class="headerlink" title="Permalink to this term" href="#__REALTIME_TIMESTAMP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214181869120"></a><h2 id="PAM configuration directives">PAM configuration directives<a class="headerlink" title="Permalink to this headline" href="#PAM%20configuration%20directives">¶</a></h2><p>Directives for configuring PAM behaviour.</p><div class="variablelist"><a name="pam-directives"></a><dl class="variablelist"><dt id="class="><span class="term"><code class="option">class=</code></span><a class="headerlink" title="Permalink to this term" href="#class=">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="debug"><span class="term"><code class="varname">debug</code></span><a class="headerlink" title="Permalink to this term" href="#debug">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="type="><span class="term"><code class="option">type=</code></span><a class="headerlink" title="Permalink to this term" href="#type=">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214181862528"></a><h2 id="/etc/crypttab and
+                systemd-networkd.</p><div class="variablelist"><a name="network-directives"></a><dl class="variablelist"><dt id="Address="><span class="term"><code class="varname">Address=</code></span><a class="headerlink" title="Permalink to this term" href="#Address=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Alias="><span class="term"><code class="varname">Alias=</code></span><a class="headerlink" title="Permalink to this term" href="#Alias=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="Architecture="><span class="term"><code class="varname">Architecture=</code></span><a class="headerlink" title="Permalink to this term" href="#Architecture=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="BitsPerSecond="><span class="term"><code class="varname">BitsPerSecond=</code></span><a class="headerlink" title="Permalink to this term" href="#BitsPerSecond=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="Bond="><span class="term"><code class="varname">Bond=</code></span><a class="headerlink" title="Permalink to this term" href="#Bond=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Bridge="><span class="term"><code class="varname">Bridge=</code></span><a class="headerlink" title="Permalink to this term" href="#Bridge=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Broadcast="><span class="term"><code class="varname">Broadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#Broadcast=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="CriticalConnection="><span class="term"><code class="varname">CriticalConnection=</code></span><a class="headerlink" title="Permalink to this term" href="#CriticalConnection=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DHCP="><span class="term"><code class="varname">DHCP=</code></span><a class="headerlink" title="Permalink to this term" href="#DHCP=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DHCPServer="><span class="term"><code class="varname">DHCPServer=</code></span><a class="headerlink" title="Permalink to this term" href="#DHCPServer=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DNS="><span class="term"><code class="varname">DNS=</code></span><a class="headerlink" title="Permalink to this term" href="#DNS=">¶</a></dt><dd><p><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Destination="><span class="term"><code class="varname">Destination=</code></span><a class="headerlink" title="Permalink to this term" href="#Destination=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DiscoverPathMTU="><span class="term"><code class="varname">DiscoverPathMTU=</code></span><a class="headerlink" title="Permalink to this term" href="#DiscoverPathMTU=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Domains="><span class="term"><code class="varname">Domains=</code></span><a class="headerlink" title="Permalink to this term" href="#Domains=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="DownDelaySec="><span class="term"><code class="varname">DownDelaySec=</code></span><a class="headerlink" title="Permalink to this term" href="#DownDelaySec=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Driver="><span class="term"><code class="varname">Driver=</code></span><a class="headerlink" title="Permalink to this term" href="#Driver=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Duplex="><span class="term"><code class="varname">Duplex=</code></span><a class="headerlink" title="Permalink to this term" href="#Duplex=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="FallbackDNS="><span class="term"><code class="varname">FallbackDNS=</code></span><a class="headerlink" title="Permalink to this term" href="#FallbackDNS=">¶</a></dt><dd><p><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a></p></dd><dt id="FallbackNTP="><span class="term"><code class="varname">FallbackNTP=</code></span><a class="headerlink" title="Permalink to this term" href="#FallbackNTP=">¶</a></dt><dd><p><a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a></p></dd><dt id="Gateway="><span class="term"><code class="varname">Gateway=</code></span><a class="headerlink" title="Permalink to this term" href="#Gateway=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Group="><span class="term"><code class="varname">Group=</code></span><a class="headerlink" title="Permalink to this term" href="#Group=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Host="><span class="term"><code class="varname">Host=</code></span><a class="headerlink" title="Permalink to this term" href="#Host=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="IPv4LL="><span class="term"><code class="varname">IPv4LL=</code></span><a class="headerlink" title="Permalink to this term" href="#IPv4LL=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="IPv4LLRoute="><span class="term"><code class="varname">IPv4LLRoute=</code></span><a class="headerlink" title="Permalink to this term" href="#IPv4LLRoute=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Id="><span class="term"><code class="varname">Id=</code></span><a class="headerlink" title="Permalink to this term" href="#Id=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="KernelCommandLine="><span class="term"><code class="varname">KernelCommandLine=</code></span><a class="headerlink" title="Permalink to this term" href="#KernelCommandLine=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Kind="><span class="term"><code class="varname">Kind=</code></span><a class="headerlink" title="Permalink to this term" href="#Kind=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="LACPTransmitRate="><span class="term"><code class="varname">LACPTransmitRate=</code></span><a class="headerlink" title="Permalink to this term" href="#LACPTransmitRate=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="LLMNR="><span class="term"><code class="varname">LLMNR=</code></span><a class="headerlink" title="Permalink to this term" href="#LLMNR=">¶</a></dt><dd><p><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Label="><span class="term"><code class="varname">Label=</code></span><a class="headerlink" title="Permalink to this term" href="#Label=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Local="><span class="term"><code class="varname">Local=</code></span><a class="headerlink" title="Permalink to this term" href="#Local=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="MACAddress="><span class="term"><code class="varname">MACAddress=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddress=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="MACAddressPolicy="><span class="term"><code class="varname">MACAddressPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddressPolicy=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="MACVLAN="><span class="term"><code class="varname">MACVLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#MACVLAN=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="MIIMonitorSec="><span class="term"><code class="varname">MIIMonitorSec=</code></span><a class="headerlink" title="Permalink to this term" href="#MIIMonitorSec=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="MTUBytes="><span class="term"><code class="varname">MTUBytes=</code></span><a class="headerlink" title="Permalink to this term" href="#MTUBytes=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="MacLearning="><span class="term"><code class="varname">MacLearning=</code></span><a class="headerlink" title="Permalink to this term" href="#MacLearning=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Metric="><span class="term"><code class="varname">Metric=</code></span><a class="headerlink" title="Permalink to this term" href="#Metric=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Mode="><span class="term"><code class="varname">Mode=</code></span><a class="headerlink" title="Permalink to this term" href="#Mode=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="MultiQueue="><span class="term"><code class="varname">MultiQueue=</code></span><a class="headerlink" title="Permalink to this term" href="#MultiQueue=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="NTP="><span class="term"><code class="varname">NTP=</code></span><a class="headerlink" title="Permalink to this term" href="#NTP=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a></p></dd><dt id="Name="><span class="term"><code class="varname">Name=</code></span><a class="headerlink" title="Permalink to this term" href="#Name=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="NamePolicy="><span class="term"><code class="varname">NamePolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#NamePolicy=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="OneQueue="><span class="term"><code class="varname">OneQueue=</code></span><a class="headerlink" title="Permalink to this term" href="#OneQueue=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="PacketInfo="><span class="term"><code class="varname">PacketInfo=</code></span><a class="headerlink" title="Permalink to this term" href="#PacketInfo=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Path="><span class="term"><code class="varname">Path=</code></span><a class="headerlink" title="Permalink to this term" href="#Path=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Peer="><span class="term"><code class="varname">Peer=</code></span><a class="headerlink" title="Permalink to this term" href="#Peer=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Remote="><span class="term"><code class="varname">Remote=</code></span><a class="headerlink" title="Permalink to this term" href="#Remote=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="RequestBroadcast="><span class="term"><code class="varname">RequestBroadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#RequestBroadcast=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="RouteMetric="><span class="term"><code class="varname">RouteMetric=</code></span><a class="headerlink" title="Permalink to this term" href="#RouteMetric=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="SendHostname="><span class="term"><code class="varname">SendHostname=</code></span><a class="headerlink" title="Permalink to this term" href="#SendHostname=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="TOS="><span class="term"><code class="varname">TOS=</code></span><a class="headerlink" title="Permalink to this term" href="#TOS=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="TTL="><span class="term"><code class="varname">TTL=</code></span><a class="headerlink" title="Permalink to this term" href="#TTL=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="TransmitHashPolicy="><span class="term"><code class="varname">TransmitHashPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#TransmitHashPolicy=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="Tunnel="><span class="term"><code class="varname">Tunnel=</code></span><a class="headerlink" title="Permalink to this term" href="#Tunnel=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Type="><span class="term"><code class="varname">Type=</code></span><a class="headerlink" title="Permalink to this term" href="#Type=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UpDelaySec="><span class="term"><code class="varname">UpDelaySec=</code></span><a class="headerlink" title="Permalink to this term" href="#UpDelaySec=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="UseDNS="><span class="term"><code class="varname">UseDNS=</code></span><a class="headerlink" title="Permalink to this term" href="#UseDNS=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseDomains="><span class="term"><code class="varname">UseDomains=</code></span><a class="headerlink" title="Permalink to this term" href="#UseDomains=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseHostname="><span class="term"><code class="varname">UseHostname=</code></span><a class="headerlink" title="Permalink to this term" href="#UseHostname=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseMTU="><span class="term"><code class="varname">UseMTU=</code></span><a class="headerlink" title="Permalink to this term" href="#UseMTU=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="UseRoutes="><span class="term"><code class="varname">UseRoutes=</code></span><a class="headerlink" title="Permalink to this term" href="#UseRoutes=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="User="><span class="term"><code class="varname">User=</code></span><a class="headerlink" title="Permalink to this term" href="#User=">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="VLAN="><span class="term"><code class="varname">VLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#VLAN=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="VXLAN="><span class="term"><code class="varname">VXLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#VXLAN=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="VendorClassIdentifier="><span class="term"><code class="varname">VendorClassIdentifier=</code></span><a class="headerlink" title="Permalink to this term" href="#VendorClassIdentifier=">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="Virtualization="><span class="term"><code class="varname">Virtualization=</code></span><a class="headerlink" title="Permalink to this term" href="#Virtualization=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="WakeOnLan="><span class="term"><code class="varname">WakeOnLan=</code></span><a class="headerlink" title="Permalink to this term" href="#WakeOnLan=">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214189053856"></a><h2 id="Journal fields">Journal fields<a class="headerlink" title="Permalink to this headline" href="#Journal%20fields">¶</a></h2><p>Fields in the journal events with a well known meaning.</p><div class="variablelist"><a name="journal-directives"></a><dl class="variablelist"><dt id="CODE_FILE="><span class="term"><code class="varname">CODE_FILE=</code></span><a class="headerlink" title="Permalink to this term" href="#CODE_FILE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="CODE_FUNC="><span class="term"><code class="varname">CODE_FUNC=</code></span><a class="headerlink" title="Permalink to this term" href="#CODE_FUNC=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="CODE_LINE="><span class="term"><code class="varname">CODE_LINE=</code></span><a class="headerlink" title="Permalink to this term" href="#CODE_LINE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="COREDUMP_UNIT="><span class="term"><code class="varname">COREDUMP_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#COREDUMP_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="COREDUMP_USER_UNIT="><span class="term"><code class="varname">COREDUMP_USER_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#COREDUMP_USER_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="ERRNO="><span class="term"><code class="varname">ERRNO=</code></span><a class="headerlink" title="Permalink to this term" href="#ERRNO=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="MESSAGE="><span class="term"><code class="varname">MESSAGE=</code></span><a class="headerlink" title="Permalink to this term" href="#MESSAGE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="MESSAGE_ID="><span class="term"><code class="varname">MESSAGE_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#MESSAGE_ID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_AUDIT_LOGINUID="><span class="term"><code class="varname">OBJECT_AUDIT_LOGINUID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_AUDIT_LOGINUID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_AUDIT_SESSION="><span class="term"><code class="varname">OBJECT_AUDIT_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_AUDIT_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_CMDLINE="><span class="term"><code class="varname">OBJECT_CMDLINE=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_CMDLINE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_COMM="><span class="term"><code class="varname">OBJECT_COMM=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_COMM=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_EXE="><span class="term"><code class="varname">OBJECT_EXE=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_EXE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_GID="><span class="term"><code class="varname">OBJECT_GID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_GID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_PID="><span class="term"><code class="varname">OBJECT_PID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_PID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_CGROUP="><span class="term"><code class="varname">OBJECT_SYSTEMD_CGROUP=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_CGROUP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_OWNER_UID="><span class="term"><code class="varname">OBJECT_SYSTEMD_OWNER_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_OWNER_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_SESSION="><span class="term"><code class="varname">OBJECT_SYSTEMD_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_UNIT="><span class="term"><code class="varname">OBJECT_SYSTEMD_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_SYSTEMD_USER_UNIT="><span class="term"><code class="varname">OBJECT_SYSTEMD_USER_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_SYSTEMD_USER_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="OBJECT_UID="><span class="term"><code class="varname">OBJECT_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#OBJECT_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="PRIORITY="><span class="term"><code class="varname">PRIORITY=</code></span><a class="headerlink" title="Permalink to this term" href="#PRIORITY=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="SYSLOG_FACILITY="><span class="term"><code class="varname">SYSLOG_FACILITY=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSLOG_FACILITY=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="SYSLOG_IDENTIFIER="><span class="term"><code class="varname">SYSLOG_IDENTIFIER=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSLOG_IDENTIFIER=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="SYSLOG_PID="><span class="term"><code class="varname">SYSLOG_PID=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSLOG_PID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_AUDIT_LOGINUID="><span class="term"><code class="varname">_AUDIT_LOGINUID=</code></span><a class="headerlink" title="Permalink to this term" href="#_AUDIT_LOGINUID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_AUDIT_SESSION="><span class="term"><code class="varname">_AUDIT_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#_AUDIT_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_BOOT_ID="><span class="term"><code class="varname">_BOOT_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#_BOOT_ID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_CAP_EFFECTIVE="><span class="term"><code class="varname">_CAP_EFFECTIVE=</code></span><a class="headerlink" title="Permalink to this term" href="#_CAP_EFFECTIVE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_CMDLINE="><span class="term"><code class="varname">_CMDLINE=</code></span><a class="headerlink" title="Permalink to this term" href="#_CMDLINE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_COMM="><span class="term"><code class="varname">_COMM=</code></span><a class="headerlink" title="Permalink to this term" href="#_COMM=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_EXE="><span class="term"><code class="varname">_EXE=</code></span><a class="headerlink" title="Permalink to this term" href="#_EXE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_GID="><span class="term"><code class="varname">_GID=</code></span><a class="headerlink" title="Permalink to this term" href="#_GID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_HOSTNAME="><span class="term"><code class="varname">_HOSTNAME=</code></span><a class="headerlink" title="Permalink to this term" href="#_HOSTNAME=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_KERNEL_DEVICE="><span class="term"><code class="varname">_KERNEL_DEVICE=</code></span><a class="headerlink" title="Permalink to this term" href="#_KERNEL_DEVICE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_KERNEL_SUBSYSTEM="><span class="term"><code class="varname">_KERNEL_SUBSYSTEM=</code></span><a class="headerlink" title="Permalink to this term" href="#_KERNEL_SUBSYSTEM=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_MACHINE_ID="><span class="term"><code class="varname">_MACHINE_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#_MACHINE_ID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_PID="><span class="term"><code class="varname">_PID=</code></span><a class="headerlink" title="Permalink to this term" href="#_PID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SELINUX_CONTEXT="><span class="term"><code class="varname">_SELINUX_CONTEXT=</code></span><a class="headerlink" title="Permalink to this term" href="#_SELINUX_CONTEXT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SOURCE_REALTIME_TIMESTAMP="><span class="term"><code class="varname">_SOURCE_REALTIME_TIMESTAMP=</code></span><a class="headerlink" title="Permalink to this term" href="#_SOURCE_REALTIME_TIMESTAMP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_CGROUP="><span class="term"><code class="varname">_SYSTEMD_CGROUP=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_CGROUP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_OWNER_UID="><span class="term"><code class="varname">_SYSTEMD_OWNER_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_OWNER_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_SESSION="><span class="term"><code class="varname">_SYSTEMD_SESSION=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_SESSION=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_SLICE="><span class="term"><code class="varname">_SYSTEMD_SLICE=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_SLICE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_UNIT="><span class="term"><code class="varname">_SYSTEMD_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_SYSTEMD_USER_UNIT="><span class="term"><code class="varname">_SYSTEMD_USER_UNIT=</code></span><a class="headerlink" title="Permalink to this term" href="#_SYSTEMD_USER_UNIT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_TRANSPORT="><span class="term"><code class="varname">_TRANSPORT=</code></span><a class="headerlink" title="Permalink to this term" href="#_TRANSPORT=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UDEV_DEVLINK="><span class="term"><code class="varname">_UDEV_DEVLINK=</code></span><a class="headerlink" title="Permalink to this term" href="#_UDEV_DEVLINK=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UDEV_DEVNODE="><span class="term"><code class="varname">_UDEV_DEVNODE=</code></span><a class="headerlink" title="Permalink to this term" href="#_UDEV_DEVNODE=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UDEV_SYSNAME="><span class="term"><code class="varname">_UDEV_SYSNAME=</code></span><a class="headerlink" title="Permalink to this term" href="#_UDEV_SYSNAME=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="_UID="><span class="term"><code class="varname">_UID=</code></span><a class="headerlink" title="Permalink to this term" href="#_UID=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="__CURSOR="><span class="term"><code class="varname">__CURSOR=</code></span><a class="headerlink" title="Permalink to this term" href="#__CURSOR=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="__MONOTONIC_TIMESTAMP="><span class="term"><code class="varname">__MONOTONIC_TIMESTAMP=</code></span><a class="headerlink" title="Permalink to this term" href="#__MONOTONIC_TIMESTAMP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="__REALTIME_TIMESTAMP="><span class="term"><code class="varname">__REALTIME_TIMESTAMP=</code></span><a class="headerlink" title="Permalink to this term" href="#__REALTIME_TIMESTAMP=">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214188965632"></a><h2 id="PAM configuration directives">PAM configuration directives<a class="headerlink" title="Permalink to this headline" href="#PAM%20configuration%20directives">¶</a></h2><p>Directives for configuring PAM behaviour.</p><div class="variablelist"><a name="pam-directives"></a><dl class="variablelist"><dt id="class="><span class="term"><code class="option">class=</code></span><a class="headerlink" title="Permalink to this term" href="#class=">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="debug"><span class="term"><code class="varname">debug</code></span><a class="headerlink" title="Permalink to this term" href="#debug">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="type="><span class="term"><code class="option">type=</code></span><a class="headerlink" title="Permalink to this term" href="#type=">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214188959040"></a><h2 id="/etc/crypttab and
                 /etc/fstab options"><code class="filename">/etc/crypttab</code> and
                 <code class="filename">/etc/fstab</code> options<a class="headerlink" title="Permalink to this headline" href="#/etc/crypttab%20and%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20/etc/fstab%20options">¶</a></h2><p>Options which influence mounted filesystems and
-                encrypted volumes.</p><div class="variablelist"><a name="fstab-options"></a><dl class="variablelist"><dt id="auto"><span class="term"><code class="constant">auto</code></span><a class="headerlink" title="Permalink to this term" href="#auto">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="cipher="><span class="term"><code class="option">cipher=</code></span><a class="headerlink" title="Permalink to this term" href="#cipher=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="discard"><span class="term"><code class="option">discard</code></span><a class="headerlink" title="Permalink to this term" href="#discard">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="fail"><span class="term"><code class="option">fail</code></span><a class="headerlink" title="Permalink to this term" href="#fail">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="hash="><span class="term"><code class="option">hash=</code></span><a class="headerlink" title="Permalink to this term" href="#hash=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="key-slot="><span class="term"><code class="option">key-slot=</code></span><a class="headerlink" title="Permalink to this term" href="#key-slot=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="keyfile-offset="><span class="term"><code class="option">keyfile-offset=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-offset=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="keyfile-size="><span class="term"><code class="option">keyfile-size=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-size=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="luks"><span class="term"><code class="option">luks</code></span><a class="headerlink" title="Permalink to this term" href="#luks">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="noauto"><span class="term"><code class="option">noauto</code></span><a class="headerlink" title="Permalink to this term" href="#noauto">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="nofail"><span class="term"><code class="option">nofail</code></span><a class="headerlink" title="Permalink to this term" href="#nofail">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="plain"><span class="term"><code class="option">plain</code></span><a class="headerlink" title="Permalink to this term" href="#plain">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="read-only"><span class="term"><code class="option">read-only</code></span><a class="headerlink" title="Permalink to this term" href="#read-only">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="readonly"><span class="term"><code class="option">readonly</code></span><a class="headerlink" title="Permalink to this term" href="#readonly">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="size="><span class="term"><code class="option">size=</code></span><a class="headerlink" title="Permalink to this term" href="#size=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="swap"><span class="term"><code class="option">swap</code></span><a class="headerlink" title="Permalink to this term" href="#swap">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt"><span class="term"><code class="option">tcrypt</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt-hidden"><span class="term"><code class="option">tcrypt-hidden</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-hidden">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt-keyfile="><span class="term"><code class="option">tcrypt-keyfile=</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-keyfile=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt-system"><span class="term"><code class="option">tcrypt-system</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-system">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="timeout="><span class="term"><code class="option">timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#timeout=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tmp"><span class="term"><code class="option">tmp</code></span><a class="headerlink" title="Permalink to this term" href="#tmp">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tries="><span class="term"><code class="option">tries=</code></span><a class="headerlink" title="Permalink to this term" href="#tries=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="verify"><span class="term"><code class="option">verify</code></span><a class="headerlink" title="Permalink to this term" href="#verify">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="x-initrd.mount"><span class="term"><code class="option">x-initrd.mount</code></span><a class="headerlink" title="Permalink to this term" href="#x-initrd.mount">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="x-systemd.automount"><span class="term"><code class="option">x-systemd.automount</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.automount">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="x-systemd.device-timeout="><span class="term"><code class="option">x-systemd.device-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.device-timeout=">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214181815200"></a><h2 id="System manager directives">System manager directives<a class="headerlink" title="Permalink to this headline" href="#System%20manager%20directives">¶</a></h2><p>Directives for configuring the behaviour of the
-                systemd process.</p><div class="variablelist"><a name="systemd-directives"></a><dl class="variablelist"><dt id="CPUAffinity="><span class="term"><code class="varname">CPUAffinity=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAffinity=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="CapabilityBoundingSet="><span class="term"><code class="varname">CapabilityBoundingSet=</code></span><a class="headerlink" title="Permalink to this term" href="#CapabilityBoundingSet=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="CrashChVT="><span class="term"><code class="varname">CrashChVT=</code></span><a class="headerlink" title="Permalink to this term" href="#CrashChVT=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="CrashShell="><span class="term"><code class="varname">CrashShell=</code></span><a class="headerlink" title="Permalink to this term" href="#CrashShell=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultBlockIOAccounting="><span class="term"><code class="varname">DefaultBlockIOAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultBlockIOAccounting=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultCPUAccounting="><span class="term"><code class="varname">DefaultCPUAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultCPUAccounting=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultEnvironment="><span class="term"><code class="varname">DefaultEnvironment=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultEnvironment=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitAS="><span class="term"><code class="varname">DefaultLimitAS=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitAS=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitCORE="><span class="term"><code class="varname">DefaultLimitCORE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitCORE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitCPU="><span class="term"><code class="varname">DefaultLimitCPU=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitCPU=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitDATA="><span class="term"><code class="varname">DefaultLimitDATA=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitDATA=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitFSIZE="><span class="term"><code class="varname">DefaultLimitFSIZE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitFSIZE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitLOCKS="><span class="term"><code class="varname">DefaultLimitLOCKS=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitLOCKS=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitMEMLOCK="><span class="term"><code class="varname">DefaultLimitMEMLOCK=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitMEMLOCK=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitMSGQUEUE="><span class="term"><code class="varname">DefaultLimitMSGQUEUE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitMSGQUEUE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitNICE="><span class="term"><code class="varname">DefaultLimitNICE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitNICE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitNOFILE="><span class="term"><code class="varname">DefaultLimitNOFILE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitNOFILE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitNPROC="><span class="term"><code class="varname">DefaultLimitNPROC=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitNPROC=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitRSS="><span class="term"><code class="varname">DefaultLimitRSS=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitRSS=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitRTPRIO="><span class="term"><code class="varname">DefaultLimitRTPRIO=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitRTPRIO=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitRTTIME="><span class="term"><code class="varname">DefaultLimitRTTIME=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitRTTIME=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitSIGPENDING="><span class="term"><code class="varname">DefaultLimitSIGPENDING=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitSIGPENDING=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitSTACK="><span class="term"><code class="varname">DefaultLimitSTACK=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitSTACK=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultMemoryAccounting="><span class="term"><code class="varname">DefaultMemoryAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultMemoryAccounting=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultRestartSec="><span class="term"><code class="varname">DefaultRestartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultRestartSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStandardError="><span class="term"><code class="varname">DefaultStandardError=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStandardError=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStandardOutput="><span class="term"><code class="varname">DefaultStandardOutput=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStandardOutput=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStartLimitBurst="><span class="term"><code class="varname">DefaultStartLimitBurst=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStartLimitBurst=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStartLimitInterval="><span class="term"><code class="varname">DefaultStartLimitInterval=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStartLimitInterval=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultTimeoutStartSec="><span class="term"><code class="varname">DefaultTimeoutStartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultTimeoutStartSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultTimeoutStopSec="><span class="term"><code class="varname">DefaultTimeoutStopSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultTimeoutStopSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultTimerAccuracySec="><span class="term"><code class="varname">DefaultTimerAccuracySec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultTimerAccuracySec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DumpCore="><span class="term"><code class="varname">DumpCore=</code></span><a class="headerlink" title="Permalink to this term" href="#DumpCore=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="HibernateMode="><span class="term"><code class="varname">HibernateMode=</code></span><a class="headerlink" title="Permalink to this term" href="#HibernateMode=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="HibernateState="><span class="term"><code class="varname">HibernateState=</code></span><a class="headerlink" title="Permalink to this term" href="#HibernateState=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="HybridSleepMode="><span class="term"><code class="varname">HybridSleepMode=</code></span><a class="headerlink" title="Permalink to this term" href="#HybridSleepMode=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="HybridSleepState="><span class="term"><code class="varname">HybridSleepState=</code></span><a class="headerlink" title="Permalink to this term" href="#HybridSleepState=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="JoinControllers="><span class="term"><code class="varname">JoinControllers=</code></span><a class="headerlink" title="Permalink to this term" href="#JoinControllers=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogColor="><span class="term"><code class="varname">LogColor=</code></span><a class="headerlink" title="Permalink to this term" href="#LogColor=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogLevel="><span class="term"><code class="varname">LogLevel=</code></span><a class="headerlink" title="Permalink to this term" href="#LogLevel=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogLocation="><span class="term"><code class="varname">LogLocation=</code></span><a class="headerlink" title="Permalink to this term" href="#LogLocation=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogTarget="><span class="term"><code class="varname">LogTarget=</code></span><a class="headerlink" title="Permalink to this term" href="#LogTarget=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="RuntimeWatchdogSec="><span class="term"><code class="varname">RuntimeWatchdogSec=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeWatchdogSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="ShowStatus="><span class="term"><code class="varname">ShowStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#ShowStatus=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="ShutdownWatchdogSec="><span class="term"><code class="varname">ShutdownWatchdogSec=</code></span><a class="headerlink" title="Permalink to this term" href="#ShutdownWatchdogSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="SuspendMode="><span class="term"><code class="varname">SuspendMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendMode=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="SuspendState="><span class="term"><code class="varname">SuspendState=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendState=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="SystemCallArchitectures="><span class="term"><code class="varname">SystemCallArchitectures=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallArchitectures=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="TimerSlackNSec="><span class="term"><code class="varname">TimerSlackNSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimerSlackNSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214181734896"></a><h2 id="bootchart.conf directives">bootchart.conf directives<a class="headerlink" title="Permalink to this headline" href="#bootchart.conf%20directives">¶</a></h2><p>Directives for configuring the behaviour of the
-                systemd-bootchart process.</p><div class="variablelist"><a name="bootchart-directives"></a><dl class="variablelist"><dt id="ControlGroup="><span class="term"><code class="varname">ControlGroup=</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Filter="><span class="term"><code class="varname">Filter=</code></span><a class="headerlink" title="Permalink to this term" href="#Filter=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Frequency="><span class="term"><code class="varname">Frequency=</code></span><a class="headerlink" title="Permalink to this term" href="#Frequency=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Init="><span class="term"><code class="varname">Init=</code></span><a class="headerlink" title="Permalink to this term" href="#Init=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Output="><span class="term"><code class="varname">Output=</code></span><a class="headerlink" title="Permalink to this term" href="#Output=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="PlotEntropyGraph="><span class="term"><code class="varname">PlotEntropyGraph=</code></span><a class="headerlink" title="Permalink to this term" href="#PlotEntropyGraph=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="PlotMemoryUsage="><span class="term"><code class="varname">PlotMemoryUsage=</code></span><a class="headerlink" title="Permalink to this term" href="#PlotMemoryUsage=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Relative="><span class="term"><code class="varname">Relative=</code></span><a class="headerlink" title="Permalink to this term" href="#Relative=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Samples="><span class="term"><code class="varname">Samples=</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="ScaleX="><span class="term"><code class="varname">ScaleX=</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleX=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="ScaleY="><span class="term"><code class="varname">ScaleY=</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleY=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214181715456"></a><h2 id="command-line options">command-line options<a class="headerlink" title="Permalink to this headline" href="#command-line%20options">¶</a></h2><p>Command-line options accepted by programs in the
-                systemd suite.</p><div class="variablelist"><a name="options"></a><dl class="variablelist"><dt id="--accept"><span class="term"><code class="option">--accept</code></span><a class="headerlink" title="Permalink to this term" href="#--accept">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="--accept-cached"><span class="term"><code class="option">--accept-cached</code></span><a class="headerlink" title="Permalink to this term" href="#--accept-cached">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--acquired"><span class="term"><code class="option">--acquired</code></span><a class="headerlink" title="Permalink to this term" href="#--acquired">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--action="><span class="term"><code class="option">--action=</code></span><a class="headerlink" title="Permalink to this term" href="#--action=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--activatable"><span class="term"><code class="option">--activatable</code></span><a class="headerlink" title="Permalink to this term" href="#--activatable">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--address="><span class="term"><code class="option">--address=</code></span><a class="headerlink" title="Permalink to this term" href="#--address=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a></p></dd><dt id="--adjust-system-clock"><span class="term"><code class="option">--adjust-system-clock</code></span><a class="headerlink" title="Permalink to this term" href="#--adjust-system-clock">¶</a></dt><dd><p><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--after"><span class="term"><code class="option">--after</code></span><a class="headerlink" title="Permalink to this term" href="#--after">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--after-cursor="><span class="term"><code class="option">--after-cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--after-cursor=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--all"><span class="term"><code class="option">--all</code></span><a class="headerlink" title="Permalink to this term" href="#--all">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="--attr-match="><span class="term"><code class="option">--attr-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--attr-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--attr-nomatch="><span class="term"><code class="option">--attr-nomatch=</code></span><a class="headerlink" title="Permalink to this term" href="#--attr-nomatch=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--attribute-walk"><span class="term"><code class="option">--attribute-walk</code></span><a class="headerlink" title="Permalink to this term" href="#--attribute-walk">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--batch"><span class="term"><code class="option">--batch</code></span><a class="headerlink" title="Permalink to this term" href="#--batch">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--before"><span class="term"><code class="option">--before</code></span><a class="headerlink" title="Permalink to this term" href="#--before">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--bind-ro="><span class="term"><code class="option">--bind-ro=</code></span><a class="headerlink" title="Permalink to this term" href="#--bind-ro=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--bind="><span class="term"><code class="option">--bind=</code></span><a class="headerlink" title="Permalink to this term" href="#--bind=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--boot"><span class="term"><code class="option">--boot</code></span><a class="headerlink" title="Permalink to this term" href="#--boot">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--boot="><span class="term"><code class="option">--boot=</code></span><a class="headerlink" title="Permalink to this term" href="#--boot=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--booted"><span class="term"><code class="option">--booted</code></span><a class="headerlink" title="Permalink to this term" href="#--booted">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--capability="><span class="term"><code class="option">--capability=</code></span><a class="headerlink" title="Permalink to this term" href="#--capability=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--catalog"><span class="term"><code class="option">--catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--clean"><span class="term"><code class="option">--clean</code></span><a class="headerlink" title="Permalink to this term" href="#--clean">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--cleanup-db"><span class="term"><code class="option">--cleanup-db</code></span><a class="headerlink" title="Permalink to this term" href="#--cleanup-db">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--cmdline"><span class="term"><code class="option">--cmdline</code></span><a class="headerlink" title="Permalink to this term" href="#--cmdline">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--compress"><span class="term"><code class="option">--compress</code></span><a class="headerlink" title="Permalink to this term" href="#--compress">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--confirm-spawn"><span class="term"><code class="option">--confirm-spawn</code></span><a class="headerlink" title="Permalink to this term" href="#--confirm-spawn">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--console"><span class="term"><code class="option">--console</code></span><a class="headerlink" title="Permalink to this term" href="#--console">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--container"><span class="term"><code class="option">--container</code></span><a class="headerlink" title="Permalink to this term" href="#--container">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a></p></dd><dt id="--control-group"><span class="term"><code class="option">--control-group</code></span><a class="headerlink" title="Permalink to this term" href="#--control-group">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--crash-shell"><span class="term"><code class="option">--crash-shell</code></span><a class="headerlink" title="Permalink to this term" href="#--crash-shell">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--cursor="><span class="term"><code class="option">--cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--cursor=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--default-standard-error="><span class="term"><code class="option">--default-standard-error=</code></span><a class="headerlink" title="Permalink to this term" href="#--default-standard-error=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--default-standard-output="><span class="term"><code class="option">--default-standard-output=</code></span><a class="headerlink" title="Permalink to this term" href="#--default-standard-output=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--delay="><span class="term"><code class="option">--delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--delay=">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--depth="><span class="term"><code class="option">--depth=</code></span><a class="headerlink" title="Permalink to this term" href="#--depth=">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--description="><span class="term"><code class="option">--description=</code></span><a class="headerlink" title="Permalink to this term" href="#--description=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--device-id-of-file="><span class="term"><code class="option">--device-id-of-file=</code></span><a class="headerlink" title="Permalink to this term" href="#--device-id-of-file=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--diff="><span class="term"><code class="option">--diff=</code></span><a class="headerlink" title="Permalink to this term" href="#--diff=">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="--directory="><span class="term"><code class="option">--directory=</code></span><a class="headerlink" title="Permalink to this term" href="#--directory=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--disk-usage"><span class="term"><code class="option">--disk-usage</code></span><a class="headerlink" title="Permalink to this term" href="#--disk-usage">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--dmesg"><span class="term"><code class="option">--dmesg</code></span><a class="headerlink" title="Permalink to this term" href="#--dmesg">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--drop-capability="><span class="term"><code class="option">--drop-capability=</code></span><a class="headerlink" title="Permalink to this term" href="#--drop-capability=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--dry-run"><span class="term"><code class="option">--dry-run</code></span><a class="headerlink" title="Permalink to this term" href="#--dry-run">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--dump-catalog"><span class="term"><code class="option">--dump-catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--dump-configuration-items"><span class="term"><code class="option">--dump-configuration-items</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-configuration-items">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--dump-core"><span class="term"><code class="option">--dump-core</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-core">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--entropy"><span class="term"><code class="option">--entropy</code></span><a class="headerlink" title="Permalink to this term" href="#--entropy">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--exclude-prefix="><span class="term"><code class="option">--exclude-prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--exclude-prefix=">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="--exit"><span class="term"><code class="option">--exit</code></span><a class="headerlink" title="Permalink to this term" href="#--exit">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--exit-if-exists="><span class="term"><code class="option">--exit-if-exists=</code></span><a class="headerlink" title="Permalink to this term" href="#--exit-if-exists=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--export"><span class="term"><code class="option">--export</code></span><a class="headerlink" title="Permalink to this term" href="#--export">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--export-db"><span class="term"><code class="option">--export-db</code></span><a class="headerlink" title="Permalink to this term" href="#--export-db">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--export-prefix="><span class="term"><code class="option">--export-prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--export-prefix=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--field="><span class="term"><code class="option">--field=</code></span><a class="headerlink" title="Permalink to this term" href="#--field=">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--file-size-max="><span class="term"><code class="option">--file-size-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--file-size-max=">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="--file="><span class="term"><code class="option">--file=</code></span><a class="headerlink" title="Permalink to this term" href="#--file=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--files-max="><span class="term"><code class="option">--files-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--files-max=">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="--follow"><span class="term"><code class="option">--follow</code></span><a class="headerlink" title="Permalink to this term" href="#--follow">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--force"><span class="term"><code class="option">--force</code></span><a class="headerlink" title="Permalink to this term" href="#--force">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--freq"><span class="term"><code class="option">--freq</code></span><a class="headerlink" title="Permalink to this term" href="#--freq">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--from-pattern="><span class="term"><code class="option">--from-pattern=</code></span><a class="headerlink" title="Permalink to this term" href="#--from-pattern=">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--full"><span class="term"><code class="option">--full</code></span><a class="headerlink" title="Permalink to this term" href="#--full">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="--fuzz="><span class="term"><code class="option">--fuzz=</code></span><a class="headerlink" title="Permalink to this term" href="#--fuzz=">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--getter="><span class="term"><code class="option">--getter=</code></span><a class="headerlink" title="Permalink to this term" href="#--getter=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--gid="><span class="term"><code class="option">--gid=</code></span><a class="headerlink" title="Permalink to this term" href="#--gid=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--global"><span class="term"><code class="option">--global</code></span><a class="headerlink" title="Permalink to this term" href="#--global">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--halt"><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#--halt">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="--header"><span class="term"><code class="option">--header</code></span><a class="headerlink" title="Permalink to this term" href="#--header">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a>, <a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>, <a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--host="><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#--host=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--icon="><span class="term"><code class="option">--icon=</code></span><a class="headerlink" title="Permalink to this term" href="#--icon=">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--identifier="><span class="term"><code class="option">--identifier=</code></span><a class="headerlink" title="Permalink to this term" href="#--identifier=">¶</a></dt><dd><p><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="--ignore-inhibitors"><span class="term"><code class="option">--ignore-inhibitors</code></span><a class="headerlink" title="Permalink to this term" href="#--ignore-inhibitors">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--image="><span class="term"><code class="option">--image=</code></span><a class="headerlink" title="Permalink to this term" href="#--image=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--init"><span class="term"><code class="option">--init</code></span><a class="headerlink" title="Permalink to this term" href="#--init">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--interface="><span class="term"><code class="option">--interface=</code></span><a class="headerlink" title="Permalink to this term" href="#--interface=">¶</a></dt><dd><p><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a></p></dd><dt id="--interval="><span class="term"><code class="option">--interval=</code></span><a class="headerlink" title="Permalink to this term" href="#--interval=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--iterations="><span class="term"><code class="option">--iterations=</code></span><a class="headerlink" title="Permalink to this term" href="#--iterations=">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--job-mode="><span class="term"><code class="option">--job-mode=</code></span><a class="headerlink" title="Permalink to this term" href="#--job-mode=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--keep-unit"><span class="term"><code class="option">--keep-unit</code></span><a class="headerlink" title="Permalink to this term" href="#--keep-unit">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--kernel"><span class="term"><code class="option">--kernel</code></span><a class="headerlink" title="Permalink to this term" href="#--kernel">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--key="><span class="term"><code class="option">--key=</code></span><a class="headerlink" title="Permalink to this term" href="#--key=">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="--kill-who="><span class="term"><code class="option">--kill-who=</code></span><a class="headerlink" title="Permalink to this term" href="#--kill-who=">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--level-prefix="><span class="term"><code class="option">--level-prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--level-prefix=">¶</a></dt><dd><p><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="--lines="><span class="term"><code class="option">--lines=</code></span><a class="headerlink" title="Permalink to this term" href="#--lines=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--link-journal="><span class="term"><code class="option">--link-journal=</code></span><a class="headerlink" title="Permalink to this term" href="#--link-journal=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--list"><span class="term"><code class="option">--list</code></span><a class="headerlink" title="Permalink to this term" href="#--list">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--list-boots"><span class="term"><code class="option">--list-boots</code></span><a class="headerlink" title="Permalink to this term" href="#--list-boots">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--list-catalog"><span class="term"><code class="option">--list-catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--list-catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--listen-http="><span class="term"><code class="option">--listen-http=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen-http=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--listen-https="><span class="term"><code class="option">--listen-https=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen-https=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--listen-raw="><span class="term"><code class="option">--listen-raw=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen-raw=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--listen="><span class="term"><code class="option">--listen=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen=">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="--log-color="><span class="term"><code class="option">--log-color=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-color=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--log-level="><span class="term"><code class="option">--log-level=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-level=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--log-location="><span class="term"><code class="option">--log-location=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-location=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--log-priority="><span class="term"><code class="option">--log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-priority=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--log-target="><span class="term"><code class="option">--log-target=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-target=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--machine="><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#--machine=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--match="><span class="term"><code class="option">--match=</code></span><a class="headerlink" title="Permalink to this term" href="#--match=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--merge"><span class="term"><code class="option">--merge</code></span><a class="headerlink" title="Permalink to this term" href="#--merge">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--mode="><span class="term"><code class="option">--mode=</code></span><a class="headerlink" title="Permalink to this term" href="#--mode=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--multiple"><span class="term"><code class="option">--multiple</code></span><a class="headerlink" title="Permalink to this term" href="#--multiple">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--name="><span class="term"><code class="option">--name=</code></span><a class="headerlink" title="Permalink to this term" href="#--name=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--network-bridge="><span class="term"><code class="option">--network-bridge=</code></span><a class="headerlink" title="Permalink to this term" href="#--network-bridge=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--network-interface="><span class="term"><code class="option">--network-interface=</code></span><a class="headerlink" title="Permalink to this term" href="#--network-interface=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--network-macvlan="><span class="term"><code class="option">--network-macvlan=</code></span><a class="headerlink" title="Permalink to this term" href="#--network-macvlan=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--network-veth"><span class="term"><code class="option">--network-veth</code></span><a class="headerlink" title="Permalink to this term" href="#--network-veth">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--new-id128"><span class="term"><code class="option">--new-id128</code></span><a class="headerlink" title="Permalink to this term" href="#--new-id128">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--nice="><span class="term"><code class="option">--nice=</code></span><a class="headerlink" title="Permalink to this term" href="#--nice=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--no-block"><span class="term"><code class="option">--no-block</code></span><a class="headerlink" title="Permalink to this term" href="#--no-block">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--no-compress"><span class="term"><code class="option">--no-compress</code></span><a class="headerlink" title="Permalink to this term" href="#--no-compress">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--no-convert"><span class="term"><code class="option">--no-convert</code></span><a class="headerlink" title="Permalink to this term" href="#--no-convert">¶</a></dt><dd><p><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a></p></dd><dt id="--no-filter"><span class="term"><code class="option">--no-filter</code></span><a class="headerlink" title="Permalink to this term" href="#--no-filter">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--no-full"><span class="term"><code class="option">--no-full</code></span><a class="headerlink" title="Permalink to this term" href="#--no-full">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--no-reload"><span class="term"><code class="option">--no-reload</code></span><a class="headerlink" title="Permalink to this term" href="#--no-reload">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--no-seal"><span class="term"><code class="option">--no-seal</code></span><a class="headerlink" title="Permalink to this term" href="#--no-seal">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--no-tail"><span class="term"><code class="option">--no-tail</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tail">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--no-tty"><span class="term"><code class="option">--no-tty</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tty">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a></p></dd><dt id="--no-wtmp"><span class="term"><code class="option">--no-wtmp</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wtmp">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="--order"><span class="term"><code class="option">--order</code></span><a class="headerlink" title="Permalink to this term" href="#--order">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--output"><span class="term"><code class="option">--output</code></span><a class="headerlink" title="Permalink to this term" href="#--output">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--output="><span class="term"><code class="option">--output=</code></span><a class="headerlink" title="Permalink to this term" href="#--output=">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--pager-end"><span class="term"><code class="option">--pager-end</code></span><a class="headerlink" title="Permalink to this term" href="#--pager-end">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--parent-match="><span class="term"><code class="option">--parent-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--parent-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--path="><span class="term"><code class="option">--path=</code></span><a class="headerlink" title="Permalink to this term" href="#--path=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--personality="><span class="term"><code class="option">--personality=</code></span><a class="headerlink" title="Permalink to this term" href="#--personality=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--pid="><span class="term"><code class="option">--pid=</code></span><a class="headerlink" title="Permalink to this term" href="#--pid=">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--plain"><span class="term"><code class="option">--plain</code></span><a class="headerlink" title="Permalink to this term" href="#--plain">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--plymouth"><span class="term"><code class="option">--plymouth</code></span><a class="headerlink" title="Permalink to this term" href="#--plymouth">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--poweroff"><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#--poweroff">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="--prefix="><span class="term"><code class="option">--prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--prefix=">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--preset-mode="><span class="term"><code class="option">--preset-mode=</code></span><a class="headerlink" title="Permalink to this term" href="#--preset-mode=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--pretty"><span class="term"><code class="option">--pretty</code></span><a class="headerlink" title="Permalink to this term" href="#--pretty">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="--priority="><span class="term"><code class="option">--priority=</code></span><a class="headerlink" title="Permalink to this term" href="#--priority=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="--private-network"><span class="term"><code class="option">--private-network</code></span><a class="headerlink" title="Permalink to this term" href="#--private-network">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--privileged"><span class="term"><code class="option">--privileged</code></span><a class="headerlink" title="Permalink to this term" href="#--privileged">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a></p></dd><dt id="--property"><span class="term"><code class="option">--property</code></span><a class="headerlink" title="Permalink to this term" href="#--property">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--property-match="><span class="term"><code class="option">--property-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--property-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--property="><span class="term"><code class="option">--property=</code></span><a class="headerlink" title="Permalink to this term" href="#--property=">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--pss"><span class="term"><code class="option">--pss</code></span><a class="headerlink" title="Permalink to this term" href="#--pss">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--query"><span class="term"><code class="option">--query</code></span><a class="headerlink" title="Permalink to this term" href="#--query">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--query="><span class="term"><code class="option">--query=</code></span><a class="headerlink" title="Permalink to this term" href="#--query=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--quiet"><span class="term"><code class="option">--quiet</code></span><a class="headerlink" title="Permalink to this term" href="#--quiet">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--read-only"><span class="term"><code class="option">--read-only</code></span><a class="headerlink" title="Permalink to this term" href="#--read-only">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--readahead="><span class="term"><code class="option">--readahead=</code></span><a class="headerlink" title="Permalink to this term" href="#--readahead=">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--ready"><span class="term"><code class="option">--ready</code></span><a class="headerlink" title="Permalink to this term" href="#--ready">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--reboot"><span class="term"><code class="option">--reboot</code></span><a class="headerlink" title="Permalink to this term" href="#--reboot">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="--recursive"><span class="term"><code class="option">--recursive</code></span><a class="headerlink" title="Permalink to this term" href="#--recursive">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--register="><span class="term"><code class="option">--register=</code></span><a class="headerlink" title="Permalink to this term" href="#--register=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--rel"><span class="term"><code class="option">--rel</code></span><a class="headerlink" title="Permalink to this term" href="#--rel">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--reload"><span class="term"><code class="option">--reload</code></span><a class="headerlink" title="Permalink to this term" href="#--reload">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--remain-after-exit"><span class="term"><code class="option">--remain-after-exit</code></span><a class="headerlink" title="Permalink to this term" href="#--remain-after-exit">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--remove"><span class="term"><code class="option">--remove</code></span><a class="headerlink" title="Permalink to this term" href="#--remove">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--require"><span class="term"><code class="option">--require</code></span><a class="headerlink" title="Permalink to this term" href="#--require">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--reverse"><span class="term"><code class="option">--reverse</code></span><a class="headerlink" title="Permalink to this term" href="#--reverse">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--root"><span class="term"><code class="option">--root</code></span><a class="headerlink" title="Permalink to this term" href="#--root">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--root="><span class="term"><code class="option">--root=</code></span><a class="headerlink" title="Permalink to this term" href="#--root=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--runtime"><span class="term"><code class="option">--runtime</code></span><a class="headerlink" title="Permalink to this term" href="#--runtime">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--sample"><span class="term"><code class="option">--sample</code></span><a class="headerlink" title="Permalink to this term" href="#--sample">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--scale-x"><span class="term"><code class="option">--scale-x</code></span><a class="headerlink" title="Permalink to this term" href="#--scale-x">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--scale-y"><span class="term"><code class="option">--scale-y</code></span><a class="headerlink" title="Permalink to this term" href="#--scale-y">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--scope"><span class="term"><code class="option">--scope</code></span><a class="headerlink" title="Permalink to this term" href="#--scope">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--seal"><span class="term"><code class="option">--seal</code></span><a class="headerlink" title="Permalink to this term" href="#--seal">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--selinux-apifs-context="><span class="term"><code class="option">--selinux-apifs-context=</code></span><a class="headerlink" title="Permalink to this term" href="#--selinux-apifs-context=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--selinux-context="><span class="term"><code class="option">--selinux-context=</code></span><a class="headerlink" title="Permalink to this term" href="#--selinux-context=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--send-sighup"><span class="term"><code class="option">--send-sighup</code></span><a class="headerlink" title="Permalink to this term" href="#--send-sighup">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--service-type="><span class="term"><code class="option">--service-type=</code></span><a class="headerlink" title="Permalink to this term" href="#--service-type=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--setenv="><span class="term"><code class="option">--setenv=</code></span><a class="headerlink" title="Permalink to this term" href="#--setenv=">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--setup-keys"><span class="term"><code class="option">--setup-keys</code></span><a class="headerlink" title="Permalink to this term" href="#--setup-keys">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--share-system"><span class="term"><code class="option">--share-system</code></span><a class="headerlink" title="Permalink to this term" href="#--share-system">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--show-cursor"><span class="term"><code class="option">--show-cursor</code></span><a class="headerlink" title="Permalink to this term" href="#--show-cursor">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--show-machine"><span class="term"><code class="option">--show-machine</code></span><a class="headerlink" title="Permalink to this term" href="#--show-machine">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--show-status="><span class="term"><code class="option">--show-status=</code></span><a class="headerlink" title="Permalink to this term" href="#--show-status=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--show-types"><span class="term"><code class="option">--show-types</code></span><a class="headerlink" title="Permalink to this term" href="#--show-types">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--signal="><span class="term"><code class="option">--signal=</code></span><a class="headerlink" title="Permalink to this term" href="#--signal=">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--since="><span class="term"><code class="option">--since=</code></span><a class="headerlink" title="Permalink to this term" href="#--since=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--slice="><span class="term"><code class="option">--slice=</code></span><a class="headerlink" title="Permalink to this term" href="#--slice=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--start-exec-queue"><span class="term"><code class="option">--start-exec-queue</code></span><a class="headerlink" title="Permalink to this term" href="#--start-exec-queue">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--state="><span class="term"><code class="option">--state=</code></span><a class="headerlink" title="Permalink to this term" href="#--state=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--static"><span class="term"><code class="option">--static</code></span><a class="headerlink" title="Permalink to this term" href="#--static">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="--status="><span class="term"><code class="option">--status=</code></span><a class="headerlink" title="Permalink to this term" href="#--status=">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--stop-exec-queue"><span class="term"><code class="option">--stop-exec-queue</code></span><a class="headerlink" title="Permalink to this term" href="#--stop-exec-queue">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--subsystem-match="><span class="term"><code class="option">--subsystem-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--subsystem-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--subsystem-nomatch="><span class="term"><code class="option">--subsystem-nomatch=</code></span><a class="headerlink" title="Permalink to this term" href="#--subsystem-nomatch=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--suffix="><span class="term"><code class="option">--suffix=</code></span><a class="headerlink" title="Permalink to this term" href="#--suffix=">¶</a></dt><dd><p><a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a></p></dd><dt id="--sysname-match="><span class="term"><code class="option">--sysname-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--sysname-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--system"><span class="term"><code class="option">--system</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--tag-match="><span class="term"><code class="option">--tag-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--tag-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--test"><span class="term"><code class="option">--test</code></span><a class="headerlink" title="Permalink to this term" href="#--test">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--test="><span class="term"><code class="option">--test=</code></span><a class="headerlink" title="Permalink to this term" href="#--test=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a>, <a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--tmpfs="><span class="term"><code class="option">--tmpfs=</code></span><a class="headerlink" title="Permalink to this term" href="#--tmpfs=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--to-pattern="><span class="term"><code class="option">--to-pattern=</code></span><a class="headerlink" title="Permalink to this term" href="#--to-pattern=">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--transient"><span class="term"><code class="option">--transient</code></span><a class="headerlink" title="Permalink to this term" href="#--transient">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="--type="><span class="term"><code class="option">--type=</code></span><a class="headerlink" title="Permalink to this term" href="#--type=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--udev"><span class="term"><code class="option">--udev</code></span><a class="headerlink" title="Permalink to this term" href="#--udev">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--uid="><span class="term"><code class="option">--uid=</code></span><a class="headerlink" title="Permalink to this term" href="#--uid=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--unique"><span class="term"><code class="option">--unique</code></span><a class="headerlink" title="Permalink to this term" href="#--unique">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--unit="><span class="term"><code class="option">--unit=</code></span><a class="headerlink" title="Permalink to this term" href="#--unit=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--until="><span class="term"><code class="option">--until=</code></span><a class="headerlink" title="Permalink to this term" href="#--until=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--update"><span class="term"><code class="option">--update</code></span><a class="headerlink" title="Permalink to this term" href="#--update">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--update-catalog"><span class="term"><code class="option">--update-catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--update-catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--url="><span class="term"><code class="option">--url=</code></span><a class="headerlink" title="Permalink to this term" href="#--url=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--user"><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--user">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--user-unit="><span class="term"><code class="option">--user-unit=</code></span><a class="headerlink" title="Permalink to this term" href="#--user-unit=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--user="><span class="term"><code class="option">--user=</code></span><a class="headerlink" title="Permalink to this term" href="#--user=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--uuid="><span class="term"><code class="option">--uuid=</code></span><a class="headerlink" title="Permalink to this term" href="#--uuid=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--verbose"><span class="term"><code class="option">--verbose</code></span><a class="headerlink" title="Permalink to this term" href="#--verbose">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--verify"><span class="term"><code class="option">--verify</code></span><a class="headerlink" title="Permalink to this term" href="#--verify">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--verify-key="><span class="term"><code class="option">--verify-key=</code></span><a class="headerlink" title="Permalink to this term" href="#--verify-key=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a>, <a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>, <a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--vm"><span class="term"><code class="option">--vm</code></span><a class="headerlink" title="Permalink to this term" href="#--vm">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a></p></dd><dt id="--wall"><span class="term"><code class="option">--wall</code></span><a class="headerlink" title="Permalink to this term" href="#--wall">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--watch"><span class="term"><code class="option">--watch</code></span><a class="headerlink" title="Permalink to this term" href="#--watch">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--what="><span class="term"><code class="option">--what=</code></span><a class="headerlink" title="Permalink to this term" href="#--what=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--who="><span class="term"><code class="option">--who=</code></span><a class="headerlink" title="Permalink to this term" href="#--who=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--why="><span class="term"><code class="option">--why=</code></span><a class="headerlink" title="Permalink to this term" href="#--why=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--wtmp-only"><span class="term"><code class="option">--wtmp-only</code></span><a class="headerlink" title="Permalink to this term" href="#--wtmp-only">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="-1"><span class="term"><code class="constant">-1</code></span><a class="headerlink" title="Permalink to this term" href="#-1">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a></p></dd><dt id="-A"><span class="term"><code class="option">-A</code></span><a class="headerlink" title="Permalink to this term" href="#-A">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-C"><span class="term"><code class="option">-C</code></span><a class="headerlink" title="Permalink to this term" href="#-C">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-D"><span class="term"><code class="option">-D</code></span><a class="headerlink" title="Permalink to this term" href="#-D">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-E"><span class="term"><code class="option">-E</code></span><a class="headerlink" title="Permalink to this term" href="#-E">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-F"><span class="term"><code class="option">-F</code></span><a class="headerlink" title="Permalink to this term" href="#-F">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-H"><span class="term"><code class="option">-H</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="-L"><span class="term"><code class="option">-L</code></span><a class="headerlink" title="Permalink to this term" href="#-L">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-M"><span class="term"><code class="option">-M</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="-N"><span class="term"><code class="option">-N</code></span><a class="headerlink" title="Permalink to this term" href="#-N">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-P"><span class="term"><code class="option">-P</code></span><a class="headerlink" title="Permalink to this term" href="#-P">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-R"><span class="term"><code class="option">-R</code></span><a class="headerlink" title="Permalink to this term" href="#-R">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-S"><span class="term"><code class="option">-S</code></span><a class="headerlink" title="Permalink to this term" href="#-S">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-Z"><span class="term"><code class="option">-Z</code></span><a class="headerlink" title="Permalink to this term" href="#-Z">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-a"><span class="term"><code class="option">-a</code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-b"><span class="term"><code class="option">-b</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-c"><span class="term"><code class="option">-c</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-d"><span class="term"><code class="option">-d</code></span><a class="headerlink" title="Permalink to this term" href="#-d">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-e"><span class="term"><code class="option">-e</code></span><a class="headerlink" title="Permalink to this term" href="#-e">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-f"><span class="term"><code class="option">-f</code></span><a class="headerlink" title="Permalink to this term" href="#-f">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-g"><span class="term"><code class="option">-g</code></span><a class="headerlink" title="Permalink to this term" href="#-g">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-h"><span class="term"><code class="option">-h</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a>, <a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>, <a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-i"><span class="term"><code class="option">-i</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-j"><span class="term"><code class="option">-j</code></span><a class="headerlink" title="Permalink to this term" href="#-j">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-k"><span class="term"><code class="option">-k</code></span><a class="headerlink" title="Permalink to this term" href="#-k">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-l"><span class="term"><code class="option">-l</code></span><a class="headerlink" title="Permalink to this term" href="#-l">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-m"><span class="term"><code class="option">-m</code></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-n"><span class="term"><code class="option">-n</code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-o"><span class="term"><code class="option">-o</code></span><a class="headerlink" title="Permalink to this term" href="#-o">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-p"><span class="term"><code class="option">-p</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-q"><span class="term"><code class="option">-q</code></span><a class="headerlink" title="Permalink to this term" href="#-q">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-r"><span class="term"><code class="option">-r</code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-s"><span class="term"><code class="option">-s</code></span><a class="headerlink" title="Permalink to this term" href="#-s">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-t"><span class="term"><code class="option">-t</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-u"><span class="term"><code class="option">-u</code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-v"><span class="term"><code class="option">-v</code></span><a class="headerlink" title="Permalink to this term" href="#-v">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-w"><span class="term"><code class="option">-w</code></span><a class="headerlink" title="Permalink to this term" href="#-w">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="-x"><span class="term"><code class="option">-x</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-y"><span class="term"><code class="option">-y</code></span><a class="headerlink" title="Permalink to this term" href="#-y">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="auto"><span class="term"><code class="constant">auto</code></span><a class="headerlink" title="Permalink to this term" href="#auto">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="cat"><span class="term"><code class="option">cat</code></span><a class="headerlink" title="Permalink to this term" href="#cat">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="closed"><span class="term"><code class="option">closed</code></span><a class="headerlink" title="Permalink to this term" href="#closed">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="driver"><span class="term"><code class="option">driver</code></span><a class="headerlink" title="Permalink to this term" href="#driver">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="export"><span class="term"><code class="option">export</code></span><a class="headerlink" title="Permalink to this term" href="#export">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="hibernate"><span class="term"><code class="option">hibernate</code></span><a class="headerlink" title="Permalink to this term" href="#hibernate">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="hybrid-sleep"><span class="term"><code class="option">hybrid-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#hybrid-sleep">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="journal"><span class="term"><code class="option">journal</code></span><a class="headerlink" title="Permalink to this term" href="#journal">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="json"><span class="term"><code class="option">json</code></span><a class="headerlink" title="Permalink to this term" href="#json">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="json-pretty"><span class="term"><code class="option">json-pretty</code></span><a class="headerlink" title="Permalink to this term" href="#json-pretty">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="json-sse"><span class="term"><code class="option">json-sse</code></span><a class="headerlink" title="Permalink to this term" href="#json-sse">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="kernel"><span class="term"><code class="option">kernel</code></span><a class="headerlink" title="Permalink to this term" href="#kernel">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="short"><span class="term"><code class="option">short</code></span><a class="headerlink" title="Permalink to this term" href="#short">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="short-iso"><span class="term"><code class="option">short-iso</code></span><a class="headerlink" title="Permalink to this term" href="#short-iso">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="short-monotonic"><span class="term"><code class="option">short-monotonic</code></span><a class="headerlink" title="Permalink to this term" href="#short-monotonic">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="short-precise"><span class="term"><code class="option">short-precise</code></span><a class="headerlink" title="Permalink to this term" href="#short-precise">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="stdout"><span class="term"><code class="option">stdout</code></span><a class="headerlink" title="Permalink to this term" href="#stdout">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="strict"><span class="term"><code class="option">strict</code></span><a class="headerlink" title="Permalink to this term" href="#strict">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="suspend"><span class="term"><code class="option">suspend</code></span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="syslog"><span class="term"><code class="option">syslog</code></span><a class="headerlink" title="Permalink to this term" href="#syslog">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="verbose"><span class="term"><code class="option">verbose</code></span><a class="headerlink" title="Permalink to this term" href="#verbose">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214181001584"></a><h2 id="Constants">Constants<a class="headerlink" title="Permalink to this headline" href="#Constants">¶</a></h2><p>Various constant used and/or defined by systemd.</p><div class="variablelist"><a name="constants"></a><dl class="variablelist"><dt id="-0"><span class="term"><code class="constant">-0</code></span><a class="headerlink" title="Permalink to this term" href="#-0">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="-1"><span class="term"><code class="constant">-1</code></span><a class="headerlink" title="Permalink to this term" href="#-1">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p><a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a></p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="0"><span class="term"><code class="constant">0</code></span><a class="headerlink" title="Permalink to this term" href="#0">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="1"><span class="term"><code class="constant">1</code></span><a class="headerlink" title="Permalink to this term" href="#1">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="2"><span class="term"><code class="constant">2</code></span><a class="headerlink" title="Permalink to this term" href="#2">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="AF_INET"><span class="term"><code class="constant">AF_INET</code></span><a class="headerlink" title="Permalink to this term" href="#AF_INET">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="AF_INET6"><span class="term"><code class="constant">AF_INET6</code></span><a class="headerlink" title="Permalink to this term" href="#AF_INET6">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="AF_NETLINK"><span class="term"><code class="constant">AF_NETLINK</code></span><a class="headerlink" title="Permalink to this term" href="#AF_NETLINK">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="AF_UNIX"><span class="term"><code class="constant">AF_UNIX</code></span><a class="headerlink" title="Permalink to this term" href="#AF_UNIX">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="AF_UNSPEC"><span class="term"><code class="constant">AF_UNSPEC</code></span><a class="headerlink" title="Permalink to this term" href="#AF_UNSPEC">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a></p></dd><dt id="CAP_DAC_OVERRIDE"><span class="term"><code class="constant">CAP_DAC_OVERRIDE</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_DAC_OVERRIDE">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CAP_MKNOD"><span class="term"><code class="constant">CAP_MKNOD</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_MKNOD">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CAP_SYS_ADMIN"><span class="term"><code class="constant">CAP_SYS_ADMIN</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_SYS_ADMIN">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CAP_SYS_PTRACE"><span class="term"><code class="constant">CAP_SYS_PTRACE</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_SYS_PTRACE">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CLOCK_BOOTTIME_ALARM"><span class="term"><code class="constant">CLOCK_BOOTTIME_ALARM</code></span><a class="headerlink" title="Permalink to this term" href="#CLOCK_BOOTTIME_ALARM">¶</a></dt><dd><p><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="CLOCK_MONOTONIC"><span class="term"><code class="constant">CLOCK_MONOTONIC</code></span><a class="headerlink" title="Permalink to this term" href="#CLOCK_MONOTONIC">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="CLOCK_REALTIME"><span class="term"><code class="constant">CLOCK_REALTIME</code></span><a class="headerlink" title="Permalink to this term" href="#CLOCK_REALTIME">¶</a></dt><dd><p><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="EACCES"><span class="term"><code class="constant">EACCES</code></span><a class="headerlink" title="Permalink to this term" href="#EACCES">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="EPERM"><span class="term"><code class="constant">EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#EPERM">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="EUCLEAN"><span class="term"><code class="constant">EUCLEAN</code></span><a class="headerlink" title="Permalink to this term" href="#EUCLEAN">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="LOG_ALERT"><span class="term"><code class="constant">LOG_ALERT</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_ALERT">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_CRIT"><span class="term"><code class="constant">LOG_CRIT</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_CRIT">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_DEBUG"><span class="term"><code class="constant">LOG_DEBUG</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_DEBUG">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_EMERG"><span class="term"><code class="constant">LOG_EMERG</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_EMERG">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_ERR"><span class="term"><code class="constant">LOG_ERR</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_ERR">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_INFO"><span class="term"><code class="constant">LOG_INFO</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_INFO">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_NOTICE"><span class="term"><code class="constant">LOG_NOTICE</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_NOTICE">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_WARNING"><span class="term"><code class="constant">LOG_WARNING</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_WARNING">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="NUL"><span class="term"><code class="constant">NUL</code></span><a class="headerlink" title="Permalink to this term" href="#NUL">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a>, <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="NULL"><span class="term"><code class="constant">NULL</code></span><a class="headerlink" title="Permalink to this term" href="#NULL">¶</a></dt><dd><p><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a>, <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>, <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a>, <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>, <a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a></p></dd><dt id="O_NONBLOCK"><span class="term"><code class="constant">O_NONBLOCK</code></span><a class="headerlink" title="Permalink to this term" href="#O_NONBLOCK">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="POLLIN"><span class="term"><code class="constant">POLLIN</code></span><a class="headerlink" title="Permalink to this term" href="#POLLIN">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a></p></dd><dt id="POLLOUT"><span class="term"><code class="constant">POLLOUT</code></span><a class="headerlink" title="Permalink to this term" href="#POLLOUT">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_AUDIT_LOGIN_UID"><span class="term"><code class="constant">SD_BUS_CREDS_AUDIT_LOGIN_UID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_AUDIT_LOGIN_UID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_AUDIT_SESSION_ID"><span class="term"><code class="constant">SD_BUS_CREDS_AUDIT_SESSION_ID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_AUDIT_SESSION_ID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_BOUNDING_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_BOUNDING_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_BOUNDING_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_CGROUP"><span class="term"><code class="constant">SD_BUS_CREDS_CGROUP</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_CGROUP">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_CMDLINE"><span class="term"><code class="constant">SD_BUS_CREDS_CMDLINE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_CMDLINE">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_COMM"><span class="term"><code class="constant">SD_BUS_CREDS_COMM</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_COMM">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_EFFECTIVE_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_EFFECTIVE_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_EFFECTIVE_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_EXE"><span class="term"><code class="constant">SD_BUS_CREDS_EXE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_EXE">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_GID"><span class="term"><code class="constant">SD_BUS_CREDS_GID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_GID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_INHERITABLE_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_INHERITABLE_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_INHERITABLE_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_OWNER_UID"><span class="term"><code class="constant">SD_BUS_CREDS_OWNER_UID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_OWNER_UID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_PERMITTED_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_PERMITTED_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_PERMITTED_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_PID"><span class="term"><code class="constant">SD_BUS_CREDS_PID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_PID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_PID_STARTTIME"><span class="term"><code class="constant">SD_BUS_CREDS_PID_STARTTIME</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_PID_STARTTIME">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_SELINUX_CONTEXT"><span class="term"><code class="constant">SD_BUS_CREDS_SELINUX_CONTEXT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_SELINUX_CONTEXT">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_SESSION"><span class="term"><code class="constant">SD_BUS_CREDS_SESSION</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_SESSION">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_SLICE"><span class="term"><code class="constant">SD_BUS_CREDS_SLICE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_SLICE">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_TID"><span class="term"><code class="constant">SD_BUS_CREDS_TID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_TID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_TID_COMM"><span class="term"><code class="constant">SD_BUS_CREDS_TID_COMM</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_TID_COMM">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_UID"><span class="term"><code class="constant">SD_BUS_CREDS_UID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_UID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_UNIQUE_NAME"><span class="term"><code class="constant">SD_BUS_CREDS_UNIQUE_NAME</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_UNIQUE_NAME">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_UNIT"><span class="term"><code class="constant">SD_BUS_CREDS_UNIT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_UNIT">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_USER_UNIT"><span class="term"><code class="constant">SD_BUS_CREDS_USER_UNIT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_USER_UNIT">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_WELL_KNOWN_NAMES"><span class="term"><code class="constant">SD_BUS_CREDS_WELL_KNOWN_NAMES</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_WELL_KNOWN_NAMES">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_ACCESS_DENIED"><span class="term"><code class="constant">SD_BUS_ERROR_ACCESS_DENIED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_ACCESS_DENIED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_ADDRESS_IN_USE"><span class="term"><code class="constant">SD_BUS_ERROR_ADDRESS_IN_USE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_ADDRESS_IN_USE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_AUTH_FAILED"><span class="term"><code class="constant">SD_BUS_ERROR_AUTH_FAILED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_AUTH_FAILED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_BAD_ADDRESS"><span class="term"><code class="constant">SD_BUS_ERROR_BAD_ADDRESS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_BAD_ADDRESS">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_DISCONNECTED"><span class="term"><code class="constant">SD_BUS_ERROR_DISCONNECTED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_DISCONNECTED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_FAILED"><span class="term"><code class="constant">SD_BUS_ERROR_FAILED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_FAILED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_FILE_EXISTS"><span class="term"><code class="constant">SD_BUS_ERROR_FILE_EXISTS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_FILE_EXISTS">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_FILE_NOT_FOUND"><span class="term"><code class="constant">SD_BUS_ERROR_FILE_NOT_FOUND</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_FILE_NOT_FOUND">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_INCONSISTENT_MESSAGE"><span class="term"><code class="constant">SD_BUS_ERROR_INCONSISTENT_MESSAGE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_INCONSISTENT_MESSAGE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_INVALID_ARGS"><span class="term"><code class="constant">SD_BUS_ERROR_INVALID_ARGS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_INVALID_ARGS">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_INVALID_SIGNATURE"><span class="term"><code class="constant">SD_BUS_ERROR_INVALID_SIGNATURE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_INVALID_SIGNATURE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_IO_ERROR"><span class="term"><code class="constant">SD_BUS_ERROR_IO_ERROR</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_IO_ERROR">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_LIMITS_EXCEEDED"><span class="term"><code class="constant">SD_BUS_ERROR_LIMITS_EXCEEDED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_LIMITS_EXCEEDED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_MAKE_CONST(name, message)"><span class="term"><code class="constant">SD_BUS_ERROR_MAKE_CONST(<em class="replaceable"><code>name</code></em>, <em class="replaceable"><code>message</code></em>)</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_MAKE_CONST(name,%20message)">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_MATCH_RULE_INVALID"><span class="term"><code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_MATCH_RULE_INVALID">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_MATCH_RULE_NOT_FOUND"><span class="term"><code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_MATCH_RULE_NOT_FOUND">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NAME_HAS_NO_OWNER"><span class="term"><code class="constant">SD_BUS_ERROR_NAME_HAS_NO_OWNER</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NAME_HAS_NO_OWNER">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NOT_SUPPORTED"><span class="term"><code class="constant">SD_BUS_ERROR_NOT_SUPPORTED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NOT_SUPPORTED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_MEMORY"><span class="term"><code class="constant">SD_BUS_ERROR_NO_MEMORY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_MEMORY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_NETWORK"><span class="term"><code class="constant">SD_BUS_ERROR_NO_NETWORK</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_NETWORK">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_REPLY"><span class="term"><code class="constant">SD_BUS_ERROR_NO_REPLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_REPLY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_SERVER"><span class="term"><code class="constant">SD_BUS_ERROR_NO_SERVER</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_SERVER">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NULL"><span class="term"><code class="constant">SD_BUS_ERROR_NULL</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NULL">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_PROPERTY_READ_ONLY"><span class="term"><code class="constant">SD_BUS_ERROR_PROPERTY_READ_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_PROPERTY_READ_ONLY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_SERVICE_UNKNOWN"><span class="term"><code class="constant">SD_BUS_ERROR_SERVICE_UNKNOWN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_SERVICE_UNKNOWN">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_TIMEOUT"><span class="term"><code class="constant">SD_BUS_ERROR_TIMEOUT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_TIMEOUT">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN"><span class="term"><code class="constant">SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_INTERFACE"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_INTERFACE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_INTERFACE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_METHOD"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_METHOD</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_METHOD">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_OBJECT"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_OBJECT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_OBJECT">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_PROPERTY"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_PROPERTY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_PROPERTY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_ARRAY"><span class="term"><code class="constant">SD_BUS_TYPE_ARRAY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_ARRAY">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_BOOLEAN"><span class="term"><code class="constant">SD_BUS_TYPE_BOOLEAN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_BOOLEAN">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_BYTE"><span class="term"><code class="constant">SD_BUS_TYPE_BYTE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_BYTE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_DICT_ENTRY_BEGIN"><span class="term"><code class="constant">SD_BUS_TYPE_DICT_ENTRY_BEGIN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_DICT_ENTRY_BEGIN">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_DICT_ENTRY_END"><span class="term"><code class="constant">SD_BUS_TYPE_DICT_ENTRY_END</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_DICT_ENTRY_END">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_DOUBLE"><span class="term"><code class="constant">SD_BUS_TYPE_DOUBLE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_DOUBLE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_INT16"><span class="term"><code class="constant">SD_BUS_TYPE_INT16</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_INT16">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_INT32"><span class="term"><code class="constant">SD_BUS_TYPE_INT32</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_INT32">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_INT64"><span class="term"><code class="constant">SD_BUS_TYPE_INT64</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_INT64">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_OBJECT_PATH"><span class="term"><code class="constant">SD_BUS_TYPE_OBJECT_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_OBJECT_PATH">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_SIGNATURE"><span class="term"><code class="constant">SD_BUS_TYPE_SIGNATURE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_SIGNATURE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_STRING"><span class="term"><code class="constant">SD_BUS_TYPE_STRING</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_STRING">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_STRUCT_BEGIN"><span class="term"><code class="constant">SD_BUS_TYPE_STRUCT_BEGIN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_STRUCT_BEGIN">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_STRUCT_END"><span class="term"><code class="constant">SD_BUS_TYPE_STRUCT_END</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_STRUCT_END">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UINT16"><span class="term"><code class="constant">SD_BUS_TYPE_UINT16</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UINT16">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UINT32"><span class="term"><code class="constant">SD_BUS_TYPE_UINT32</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UINT32">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UINT64"><span class="term"><code class="constant">SD_BUS_TYPE_UINT64</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UINT64">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UNIX_FD"><span class="term"><code class="constant">SD_BUS_TYPE_UNIX_FD</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UNIX_FD">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_VARIANT"><span class="term"><code class="constant">SD_BUS_TYPE_VARIANT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_VARIANT">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_APPEND"><span class="term"><code class="constant">SD_JOURNAL_APPEND</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_APPEND">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_CURRENT_USER"><span class="term"><code class="constant">SD_JOURNAL_CURRENT_USER</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_CURRENT_USER">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_INVALIDATE"><span class="term"><code class="constant">SD_JOURNAL_INVALIDATE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_INVALIDATE">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_LOCAL_ONLY"><span class="term"><code class="constant">SD_JOURNAL_LOCAL_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_LOCAL_ONLY">¶</a></dt><dd><p><a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a>, <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_NOP"><span class="term"><code class="constant">SD_JOURNAL_NOP</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_NOP">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_RUNTIME_ONLY"><span class="term"><code class="constant">SD_JOURNAL_RUNTIME_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_RUNTIME_ONLY">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_SYSTEM"><span class="term"><code class="constant">SD_JOURNAL_SYSTEM</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_SYSTEM">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_SYSTEM_ONLY"><span class="term"><code class="constant">SD_JOURNAL_SYSTEM_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_SYSTEM_ONLY">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_WARNING"><span class="term"><code class="constant">SD_WARNING</code></span><a class="headerlink" title="Permalink to this term" href="#SD_WARNING">¶</a></dt><dd><p><a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="SIGABRT"><span class="term"><code class="constant">SIGABRT</code></span><a class="headerlink" title="Permalink to this term" href="#SIGABRT">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SIGHUP"><span class="term"><code class="constant">SIGHUP</code></span><a class="headerlink" title="Permalink to this term" href="#SIGHUP">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SIGINT"><span class="term"><code class="constant">SIGINT</code></span><a class="headerlink" title="Permalink to this term" href="#SIGINT">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="SIGKILL"><span class="term"><code class="constant">SIGKILL</code></span><a class="headerlink" title="Permalink to this term" href="#SIGKILL">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="SIGPIPE"><span class="term"><code class="constant">SIGPIPE</code></span><a class="headerlink" title="Permalink to this term" href="#SIGPIPE">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SIGPWR"><span class="term"><code class="constant">SIGPWR</code></span><a class="headerlink" title="Permalink to this term" href="#SIGPWR">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+0"><span class="term"><code class="constant">SIGRTMIN+0</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+0">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+1"><span class="term"><code class="constant">SIGRTMIN+1</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+1">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+13"><span class="term"><code class="constant">SIGRTMIN+13</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+13">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+14"><span class="term"><code class="constant">SIGRTMIN+14</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+14">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+15"><span class="term"><code class="constant">SIGRTMIN+15</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+15">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+16"><span class="term"><code class="constant">SIGRTMIN+16</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+16">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+2"><span class="term"><code class="constant">SIGRTMIN+2</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+2">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+20"><span class="term"><code class="constant">SIGRTMIN+20</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+20">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+21"><span class="term"><code class="constant">SIGRTMIN+21</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+21">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+22"><span class="term"><code class="constant">SIGRTMIN+22</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+22">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+23"><span class="term"><code class="constant">SIGRTMIN+23</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+23">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+24"><span class="term"><code class="constant">SIGRTMIN+24</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+24">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+26"><span class="term"><code class="constant">SIGRTMIN+26</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+26">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+27"><span class="term"><code class="constant">SIGRTMIN+27</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+27">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+28"><span class="term"><code class="constant">SIGRTMIN+28</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+28">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+29"><span class="term"><code class="constant">SIGRTMIN+29</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+29">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+3"><span class="term"><code class="constant">SIGRTMIN+3</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+3">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+4"><span class="term"><code class="constant">SIGRTMIN+4</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+4">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+5"><span class="term"><code class="constant">SIGRTMIN+5</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+5">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+6"><span class="term"><code class="constant">SIGRTMIN+6</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+6">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGSTOP"><span class="term"><code class="constant">SIGSTOP</code></span><a class="headerlink" title="Permalink to this term" href="#SIGSTOP">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="SIGSYS"><span class="term"><code class="constant">SIGSYS</code></span><a class="headerlink" title="Permalink to this term" href="#SIGSYS">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SIGTERM"><span class="term"><code class="constant">SIGTERM</code></span><a class="headerlink" title="Permalink to this term" href="#SIGTERM">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="SIGUSR1"><span class="term"><code class="constant">SIGUSR1</code></span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGUSR2"><span class="term"><code class="constant">SIGUSR2</code></span><a class="headerlink" title="Permalink to this term" href="#SIGUSR2">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGWINCH"><span class="term"><code class="constant">SIGWINCH</code></span><a class="headerlink" title="Permalink to this term" href="#SIGWINCH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIG_DFL"><span class="term"><code class="constant">SIG_DFL</code></span><a class="headerlink" title="Permalink to this term" href="#SIG_DFL">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="SOCK_DGRAM"><span class="term"><code class="constant">SOCK_DGRAM</code></span><a class="headerlink" title="Permalink to this term" href="#SOCK_DGRAM">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SOCK_SEQPACKET"><span class="term"><code class="constant">SOCK_SEQPACKET</code></span><a class="headerlink" title="Permalink to this term" href="#SOCK_SEQPACKET">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SOCK_STREAM"><span class="term"><code class="constant">SOCK_STREAM</code></span><a class="headerlink" title="Permalink to this term" href="#SOCK_STREAM">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="_SD_BUS_CREDS_ALL"><span class="term"><code class="constant">_SD_BUS_CREDS_ALL</code></span><a class="headerlink" title="Permalink to this term" href="#_SD_BUS_CREDS_ALL">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="all"><span class="term"><code class="constant">all</code></span><a class="headerlink" title="Permalink to this term" href="#all">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="application/event-stream"><span class="term"><code class="constant">application/event-stream</code></span><a class="headerlink" title="Permalink to this term" href="#application/event-stream">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="application/json"><span class="term"><code class="constant">application/json</code></span><a class="headerlink" title="Permalink to this term" href="#application/json">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="application/vnd.fdo.journal"><span class="term"><code class="constant">application/vnd.fdo.journal</code></span><a class="headerlink" title="Permalink to this term" href="#application/vnd.fdo.journal">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="arm"><span class="term"><code class="constant">arm</code></span><a class="headerlink" title="Permalink to this term" href="#arm">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="auto"><span class="term"><code class="constant">auto</code></span><a class="headerlink" title="Permalink to this term" href="#auto">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="early"><span class="term"><code class="constant">early</code></span><a class="headerlink" title="Permalink to this term" href="#early">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="false"><span class="term"><code class="constant">false</code></span><a class="headerlink" title="Permalink to this term" href="#false">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="late"><span class="term"><code class="constant">late</code></span><a class="headerlink" title="Permalink to this term" href="#late">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="libsystemd"><span class="term"><code class="constant">libsystemd</code></span><a class="headerlink" title="Permalink to this term" href="#libsystemd">¶</a></dt><dd><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>, <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>, <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>, <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a>, <a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a>, <a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a>, <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a>, <a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>, <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a>, <a href="sd_journal_get_catalog.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog</span>(3)</span></a>, <a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>, <a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a>, <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>, <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>, <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a>, <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>, <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>, <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>, <a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a>, <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>, <a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a>, <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a></p></dd><dt id="libsystemd-bus"><span class="term"><code class="constant">libsystemd-bus</code></span><a class="headerlink" title="Permalink to this term" href="#libsystemd-bus">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="m"><span class="term"><code class="constant">m</code></span><a class="headerlink" title="Permalink to this term" href="#m">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="name"><span class="term"><code class="constant">name</code></span><a class="headerlink" title="Permalink to this term" href="#name">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="native"><span class="term"><code class="constant">native</code></span><a class="headerlink" title="Permalink to this term" href="#native">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="never"><span class="term"><code class="constant">never</code></span><a class="headerlink" title="Permalink to this term" href="#never">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="path"><span class="term"><code class="constant">path</code></span><a class="headerlink" title="Permalink to this term" href="#path">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="property"><span class="term"><code class="constant">property</code></span><a class="headerlink" title="Permalink to this term" href="#property">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="r"><span class="term"><code class="constant">r</code></span><a class="headerlink" title="Permalink to this term" href="#r">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="simple"><span class="term"><code class="constant">simple</code></span><a class="headerlink" title="Permalink to this term" href="#simple">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="symlink"><span class="term"><code class="constant">symlink</code></span><a class="headerlink" title="Permalink to this term" href="#symlink">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="text/plain"><span class="term"><code class="constant">text/plain</code></span><a class="headerlink" title="Permalink to this term" href="#text/plain">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="true"><span class="term"><code class="constant">true</code></span><a class="headerlink" title="Permalink to this term" href="#true">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="w"><span class="term"><code class="constant">w</code></span><a class="headerlink" title="Permalink to this term" href="#w">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="x32"><span class="term"><code class="constant">x32</code></span><a class="headerlink" title="Permalink to this term" href="#x32">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="x86"><span class="term"><code class="constant">x86</code></span><a class="headerlink" title="Permalink to this term" href="#x86">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="x86-64"><span class="term"><code class="constant">x86-64</code></span><a class="headerlink" title="Permalink to this term" href="#x86-64">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="~"><span class="term"><code class="constant">~</code></span><a class="headerlink" title="Permalink to this term" href="#~">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214180569680"></a><h2 id="Miscellaneous options and directives">Miscellaneous options and directives<a class="headerlink" title="Permalink to this headline" href="#Miscellaneous%20options%20and%20directives">¶</a></h2><p>Other configuration elements which don't fit in
-                any of the above groups.</p><div class="variablelist"><a name="miscellaneous"></a><dl class="variablelist"><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="-EADDRINUSE"><span class="term"><code class="varname">-EADDRINUSE</code></span><a class="headerlink" title="Permalink to this term" href="#-EADDRINUSE">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-EALREADY"><span class="term"><code class="varname">-EALREADY</code></span><a class="headerlink" title="Permalink to this term" href="#-EALREADY">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="-EEXIST"><span class="term"><code class="varname">-EEXIST</code></span><a class="headerlink" title="Permalink to this term" href="#-EEXIST">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-EINVAL"><span class="term"><code class="varname">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a>, <a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="-EMFILE"><span class="term"><code class="varname">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p><a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a></p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a>, <a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a></p></dd><dt id="-ENOENT"><span class="term"><code class="varname">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a></p></dd><dt id="-ENOMEM"><span class="term"><code class="varname">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a></p></dd><dt id="-ENOTCONN"><span class="term"><code class="varname">-ENOTCONN</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTCONN">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-ENOTSUP"><span class="term"><code class="varname">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a></p></dd><dt id="-EPERM"><span class="term"><code class="varname">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a></p></dd><dt id="-ESRCH"><span class="term"><code class="varname">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-ESTALE"><span class="term"><code class="varname">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="ANSI_COLOR="><span class="term"><code class="varname">ANSI_COLOR=</code></span><a class="headerlink" title="Permalink to this term" href="#ANSI_COLOR=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="BUG_REPORT_URL="><span class="term"><code class="varname">BUG_REPORT_URL=</code></span><a class="headerlink" title="Permalink to this term" href="#BUG_REPORT_URL=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="BUILD_ID="><span class="term"><code class="varname">BUILD_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#BUILD_ID=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="C"><span class="term"><code class="varname">C</code></span><a class="headerlink" title="Permalink to this term" href="#C">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="CHASSIS="><span class="term"><code class="varname">CHASSIS=</code></span><a class="headerlink" title="Permalink to this term" href="#CHASSIS=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="CPE_NAME="><span class="term"><code class="varname">CPE_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#CPE_NAME=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="Compress="><span class="term"><code class="varname">Compress=</code></span><a class="headerlink" title="Permalink to this term" href="#Compress=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>, <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="D"><span class="term"><code class="varname">D</code></span><a class="headerlink" title="Permalink to this term" href="#D">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="ExternalSizeMax="><span class="term"><code class="varname">ExternalSizeMax=</code></span><a class="headerlink" title="Permalink to this term" href="#ExternalSizeMax=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="F"><span class="term"><code class="varname">F</code></span><a class="headerlink" title="Permalink to this term" href="#F">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="FONT="><span class="term"><code class="varname">FONT=</code></span><a class="headerlink" title="Permalink to this term" href="#FONT=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="FONT_MAP="><span class="term"><code class="varname">FONT_MAP=</code></span><a class="headerlink" title="Permalink to this term" href="#FONT_MAP=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="FONT_UNIMAP="><span class="term"><code class="varname">FONT_UNIMAP=</code></span><a class="headerlink" title="Permalink to this term" href="#FONT_UNIMAP=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="ForwardToConsole="><span class="term"><code class="varname">ForwardToConsole=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToConsole=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="ForwardToKMsg="><span class="term"><code class="varname">ForwardToKMsg=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToKMsg=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="ForwardToSyslog="><span class="term"><code class="varname">ForwardToSyslog=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToSyslog=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="ForwardToWall="><span class="term"><code class="varname">ForwardToWall=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToWall=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="HOME_URL="><span class="term"><code class="varname">HOME_URL=</code></span><a class="headerlink" title="Permalink to this term" href="#HOME_URL=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="HandleHibernateKey="><span class="term"><code class="varname">HandleHibernateKey=</code></span><a class="headerlink" title="Permalink to this term" href="#HandleHibernateKey=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HandleLidSwitch="><span class="term"><code class="varname">HandleLidSwitch=</code></span><a class="headerlink" title="Permalink to this term" href="#HandleLidSwitch=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HandlePowerKey="><span class="term"><code class="varname">HandlePowerKey=</code></span><a class="headerlink" title="Permalink to this term" href="#HandlePowerKey=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HandleSuspendKey="><span class="term"><code class="varname">HandleSuspendKey=</code></span><a class="headerlink" title="Permalink to this term" href="#HandleSuspendKey=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HibernateKeyIgnoreInhibited="><span class="term"><code class="varname">HibernateKeyIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#HibernateKeyIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="ICON_NAME="><span class="term"><code class="varname">ICON_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#ICON_NAME=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="ID="><span class="term"><code class="varname">ID=</code></span><a class="headerlink" title="Permalink to this term" href="#ID=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="ID_LIKE="><span class="term"><code class="varname">ID_LIKE=</code></span><a class="headerlink" title="Permalink to this term" href="#ID_LIKE=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="IdleAction="><span class="term"><code class="varname">IdleAction=</code></span><a class="headerlink" title="Permalink to this term" href="#IdleAction=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="IdleActionSec="><span class="term"><code class="varname">IdleActionSec=</code></span><a class="headerlink" title="Permalink to this term" href="#IdleActionSec=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="InhibitDelayMaxSec="><span class="term"><code class="varname">InhibitDelayMaxSec=</code></span><a class="headerlink" title="Permalink to this term" href="#InhibitDelayMaxSec=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="JournalSizeMax="><span class="term"><code class="varname">JournalSizeMax=</code></span><a class="headerlink" title="Permalink to this term" href="#JournalSizeMax=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="KEYMAP="><span class="term"><code class="varname">KEYMAP=</code></span><a class="headerlink" title="Permalink to this term" href="#KEYMAP=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="KEYMAP_TOGGLE="><span class="term"><code class="varname">KEYMAP_TOGGLE=</code></span><a class="headerlink" title="Permalink to this term" href="#KEYMAP_TOGGLE=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="KeepFree="><span class="term"><code class="varname">KeepFree=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepFree=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="KillExcludeUsers="><span class="term"><code class="varname">KillExcludeUsers=</code></span><a class="headerlink" title="Permalink to this term" href="#KillExcludeUsers=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="KillOnlyUsers="><span class="term"><code class="varname">KillOnlyUsers=</code></span><a class="headerlink" title="Permalink to this term" href="#KillOnlyUsers=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="KillUserProcesses="><span class="term"><code class="varname">KillUserProcesses=</code></span><a class="headerlink" title="Permalink to this term" href="#KillUserProcesses=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="L"><span class="term"><code class="varname">L</code></span><a class="headerlink" title="Permalink to this term" href="#L">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="L+"><span class="term"><code class="varname">L+</code></span><a class="headerlink" title="Permalink to this term" href="#L+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="LidSwitchIgnoreInhibited="><span class="term"><code class="varname">LidSwitchIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#LidSwitchIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="MaxFileSec="><span class="term"><code class="varname">MaxFileSec=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxFileSec=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelConsole="><span class="term"><code class="varname">MaxLevelConsole=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelConsole=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelKMsg="><span class="term"><code class="varname">MaxLevelKMsg=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelKMsg=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelStore="><span class="term"><code class="varname">MaxLevelStore=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelStore=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelSyslog="><span class="term"><code class="varname">MaxLevelSyslog=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelSyslog=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelWall="><span class="term"><code class="varname">MaxLevelWall=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelWall=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxRetentionSec="><span class="term"><code class="varname">MaxRetentionSec=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxRetentionSec=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxUse="><span class="term"><code class="varname">MaxUse=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxUse=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="NAME="><span class="term"><code class="varname">NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#NAME=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="NAutoVTs="><span class="term"><code class="varname">NAutoVTs=</code></span><a class="headerlink" title="Permalink to this term" href="#NAutoVTs=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="PRETTY_HOSTNAME="><span class="term"><code class="varname">PRETTY_HOSTNAME=</code></span><a class="headerlink" title="Permalink to this term" href="#PRETTY_HOSTNAME=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="PRETTY_NAME="><span class="term"><code class="varname">PRETTY_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#PRETTY_NAME=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="PowerKeyIgnoreInhibited="><span class="term"><code class="varname">PowerKeyIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#PowerKeyIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="ProcessSizeMax="><span class="term"><code class="varname">ProcessSizeMax=</code></span><a class="headerlink" title="Permalink to this term" href="#ProcessSizeMax=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="R"><span class="term"><code class="varname">R</code></span><a class="headerlink" title="Permalink to this term" href="#R">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="RateLimitBurst="><span class="term"><code class="varname">RateLimitBurst=</code></span><a class="headerlink" title="Permalink to this term" href="#RateLimitBurst=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RateLimitInterval="><span class="term"><code class="varname">RateLimitInterval=</code></span><a class="headerlink" title="Permalink to this term" href="#RateLimitInterval=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RemoveIPC="><span class="term"><code class="varname">RemoveIPC=</code></span><a class="headerlink" title="Permalink to this term" href="#RemoveIPC=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="ReserveVT="><span class="term"><code class="varname">ReserveVT=</code></span><a class="headerlink" title="Permalink to this term" href="#ReserveVT=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="RuntimeDirectorySize="><span class="term"><code class="varname">RuntimeDirectorySize=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeDirectorySize=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="RuntimeKeepFree="><span class="term"><code class="varname">RuntimeKeepFree=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeKeepFree=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RuntimeMaxFileSize="><span class="term"><code class="varname">RuntimeMaxFileSize=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeMaxFileSize=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RuntimeMaxUse="><span class="term"><code class="varname">RuntimeMaxUse=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeMaxUse=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SD_BUS_NAME_ALLOW_REPLACEMENT"><span class="term"><code class="varname">SD_BUS_NAME_ALLOW_REPLACEMENT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_NAME_ALLOW_REPLACEMENT">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="SD_BUS_NAME_QUEUE"><span class="term"><code class="varname">SD_BUS_NAME_QUEUE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_NAME_QUEUE">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="SD_BUS_NAME_REPLACE_EXISTING"><span class="term"><code class="varname">SD_BUS_NAME_REPLACE_EXISTING</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_NAME_REPLACE_EXISTING">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="SUPPORT_URL="><span class="term"><code class="varname">SUPPORT_URL=</code></span><a class="headerlink" title="Permalink to this term" href="#SUPPORT_URL=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="Seal="><span class="term"><code class="varname">Seal=</code></span><a class="headerlink" title="Permalink to this term" href="#Seal=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SplitMode="><span class="term"><code class="varname">SplitMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SplitMode=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="Storage="><span class="term"><code class="varname">Storage=</code></span><a class="headerlink" title="Permalink to this term" href="#Storage=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>, <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SuspendKeyIgnoreInhibited="><span class="term"><code class="varname">SuspendKeyIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendKeyIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="SyncIntervalSec="><span class="term"><code class="varname">SyncIntervalSec=</code></span><a class="headerlink" title="Permalink to this term" href="#SyncIntervalSec=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SystemKeepFree="><span class="term"><code class="varname">SystemKeepFree=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemKeepFree=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SystemMaxFileSize="><span class="term"><code class="varname">SystemMaxFileSize=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemMaxFileSize=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SystemMaxUse="><span class="term"><code class="varname">SystemMaxUse=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemMaxUse=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="TTYPath="><span class="term"><code class="varname">TTYPath=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYPath=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="VERSION="><span class="term"><code class="varname">VERSION=</code></span><a class="headerlink" title="Permalink to this term" href="#VERSION=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="VERSION_ID="><span class="term"><code class="varname">VERSION_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#VERSION_ID=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="X"><span class="term"><code class="varname">X</code></span><a class="headerlink" title="Permalink to this term" href="#X">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="Z"><span class="term"><code class="varname">Z</code></span><a class="headerlink" title="Permalink to this term" href="#Z">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="b"><span class="term"><code class="varname">b</code></span><a class="headerlink" title="Permalink to this term" href="#b">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="b+"><span class="term"><code class="varname">b+</code></span><a class="headerlink" title="Permalink to this term" href="#b+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="c"><span class="term"><code class="varname">c</code></span><a class="headerlink" title="Permalink to this term" href="#c">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="c+"><span class="term"><code class="varname">c+</code></span><a class="headerlink" title="Permalink to this term" href="#c+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="d"><span class="term"><code class="varname">d</code></span><a class="headerlink" title="Permalink to this term" href="#d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="equivalent"><span class="term"><code class="varname">equivalent</code></span><a class="headerlink" title="Permalink to this term" href="#equivalent">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="extended"><span class="term"><code class="varname">extended</code></span><a class="headerlink" title="Permalink to this term" href="#extended">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="f"><span class="term"><code class="varname">f</code></span><a class="headerlink" title="Permalink to this term" href="#f">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="g"><span class="term"><code class="varname">g</code></span><a class="headerlink" title="Permalink to this term" href="#g">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="h"><span class="term"><code class="varname">h</code></span><a class="headerlink" title="Permalink to this term" href="#h">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="m"><span class="term"><code class="constant">m</code></span><a class="headerlink" title="Permalink to this term" href="#m">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="masked"><span class="term"><code class="varname">masked</code></span><a class="headerlink" title="Permalink to this term" href="#masked">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="min"><span class="term"><code class="varname">min</code></span><a class="headerlink" title="Permalink to this term" href="#min">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="ms"><span class="term"><code class="varname">ms</code></span><a class="headerlink" title="Permalink to this term" href="#ms">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="overridden"><span class="term"><code class="varname">overridden</code></span><a class="headerlink" title="Permalink to this term" href="#overridden">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="p"><span class="term"><code class="varname">p</code></span><a class="headerlink" title="Permalink to this term" href="#p">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="p+"><span class="term"><code class="varname">p+</code></span><a class="headerlink" title="Permalink to this term" href="#p+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="r"><span class="term"><code class="constant">r</code></span><a class="headerlink" title="Permalink to this term" href="#r">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="redirected"><span class="term"><code class="varname">redirected</code></span><a class="headerlink" title="Permalink to this term" href="#redirected">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="s"><span class="term"><code class="varname">s</code></span><a class="headerlink" title="Permalink to this term" href="#s">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="u"><span class="term"><code class="varname">u</code></span><a class="headerlink" title="Permalink to this term" href="#u">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="udev_log"><span class="term"><code class="varname">udev_log</code></span><a class="headerlink" title="Permalink to this term" href="#udev_log">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="unchanged"><span class="term"><code class="varname">unchanged</code></span><a class="headerlink" title="Permalink to this term" href="#unchanged">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="us"><span class="term"><code class="varname">us</code></span><a class="headerlink" title="Permalink to this term" href="#us">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="w"><span class="term"><code class="constant">w</code></span><a class="headerlink" title="Permalink to this term" href="#w">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="x"><span class="term"><code class="varname">x</code></span><a class="headerlink" title="Permalink to this term" href="#x">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="z"><span class="term"><code class="varname">z</code></span><a class="headerlink" title="Permalink to this term" href="#z">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214180336896"></a><h2 id="Files and directories">Files and directories<a class="headerlink" title="Permalink to this headline" href="#Files%20and%20directories">¶</a></h2><p>Paths and file names referred to in the
-                documentation.</p><div class="variablelist"><a name="filenames"></a><dl class="variablelist"><dt id="/"><span class="term"><code class="filename">/</code></span><a class="headerlink" title="Permalink to this term" href="#/">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="$HOME/.config/systemd/user/"><span class="term"><code class="filename">$HOME/.config/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#%24HOME/.config/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="$XDG_CONFIG_HOME/systemd/user/"><span class="term"><code class="filename">$XDG_CONFIG_HOME/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_CONFIG_HOME/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="-.slice"><span class="term"><code class="filename">-.slice</code></span><a class="headerlink" title="Permalink to this term" href="#-.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="/.readahead"><span class="term"><code class="filename">/.readahead</code></span><a class="headerlink" title="Permalink to this term" href="#/.readahead">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="/bin"><span class="term"><code class="filename">/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/bin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/bin/ls"><span class="term"><code class="filename">/bin/ls</code></span><a class="headerlink" title="Permalink to this term" href="#/bin/ls">¶</a></dt><dd><p><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="/boot"><span class="term"><code class="filename">/boot</code></span><a class="headerlink" title="Permalink to this term" href="#/boot">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf"><span class="term"><code class="filename">/boot/loader/entries/<em class="replaceable"><code>MACHINE-ID</code></em>-<em class="replaceable"><code>KERNEL-VERSION</code></em>.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/dev"><span class="term"><code class="filename">/dev</code></span><a class="headerlink" title="Permalink to this term" href="#/dev">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/dev/console"><span class="term"><code class="filename">/dev/console</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/console">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/dev/full"><span class="term"><code class="filename">/dev/full</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/full">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/hw_random"><span class="term"><code class="filename">/dev/hw_random</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/hw_random">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="/dev/initctl"><span class="term"><code class="filename">/dev/initctl</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/initctl">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="/dev/mapper/"><span class="term"><code class="filename">/dev/mapper/</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/mapper/">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="/dev/mapper/home"><span class="term"><code class="filename">/dev/mapper/home</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/mapper/home">¶</a></dt><dd><p><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/dev/mapper/srv"><span class="term"><code class="filename">/dev/mapper/srv</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/mapper/srv">¶</a></dt><dd><p><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/dev/net/tun"><span class="term"><code class="filename">/dev/net/tun</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/net/tun">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="/dev/null"><span class="term"><code class="filename">/dev/null</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/null">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/dev/random"><span class="term"><code class="filename">/dev/random</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/random">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/sda"><span class="term"><code class="filename">/dev/sda</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/sda">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/dev/sda5"><span class="term"><code class="filename">/dev/sda5</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/sda5">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/shm"><span class="term"><code class="filename">/dev/shm</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/shm">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/dev/urandom"><span class="term"><code class="filename">/dev/urandom</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/urandom">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/watchdog"><span class="term"><code class="filename">/dev/watchdog</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/watchdog">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="/dev/zero"><span class="term"><code class="filename">/dev/zero</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/zero">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/etc"><span class="term"><code class="filename">/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/etc">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a>, <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/etc/.updated"><span class="term"><code class="filename">/etc/.updated</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/.updated">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="/etc/adjtime"><span class="term"><code class="filename">/etc/adjtime</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/adjtime">¶</a></dt><dd><p><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="/etc/binfmt.d/"><span class="term"><code class="filename">/etc/binfmt.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/binfmt.d/">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/etc/binfmt.d/*.conf"><span class="term"><code class="filename">/etc/binfmt.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/binfmt.d/*.conf">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/etc/crypttab"><span class="term"><code class="filename">/etc/crypttab</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/crypttab">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>, <a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/etc/fstab"><span class="term"><code class="filename">/etc/fstab</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/fstab">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>, <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="/etc/group"><span class="term"><code class="filename">/etc/group</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/group">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/etc/hostname"><span class="term"><code class="filename">/etc/hostname</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/hostname">¶</a></dt><dd><p><a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="/etc/hosts"><span class="term"><code class="filename">/etc/hosts</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/hosts">¶</a></dt><dd><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a></p></dd><dt id="/etc/kernel/cmdline"><span class="term"><code class="filename">/etc/kernel/cmdline</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/kernel/cmdline">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/etc/kernel/install.d/"><span class="term"><code class="filename">/etc/kernel/install.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/kernel/install.d/">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/etc/kernel/install.d/*.install"><span class="term"><code class="filename">/etc/kernel/install.d/*.install</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/kernel/install.d/*.install">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/etc/locale.conf"><span class="term"><code class="filename">/etc/locale.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/locale.conf">¶</a></dt><dd><p><a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/etc/localtime"><span class="term"><code class="filename">/etc/localtime</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/localtime">¶</a></dt><dd><p><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="/etc/machine-id"><span class="term"><code class="filename">/etc/machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/machine-id">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/etc/machine-info"><span class="term"><code class="filename">/etc/machine-info</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/machine-info">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="/etc/modules-load.d/program.conf"><span class="term"><code class="filename">/etc/modules-load.d/<em class="replaceable"><code>program</code></em>.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/modules-load.d/program.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/etc/modules-load.d/*.conf"><span class="term"><code class="filename">/etc/modules-load.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/modules-load.d/*.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/etc/modules-load.d/bridge.conf"><span class="term"><code class="filename">/etc/modules-load.d/bridge.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/modules-load.d/bridge.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/nsswitch.conf"><span class="term"><code class="filename">/etc/nsswitch.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/nsswitch.conf">¶</a></dt><dd><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a></p></dd><dt id="/etc/os-release"><span class="term"><code class="filename">/etc/os-release</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/os-release">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/etc/passwd"><span class="term"><code class="filename">/etc/passwd</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/passwd">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/etc/resolv.conf"><span class="term"><code class="filename">/etc/resolv.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/resolv.conf">¶</a></dt><dd><p><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="/etc/sysctl.d/"><span class="term"><code class="filename">/etc/sysctl.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/sysctl.d/*.conf"><span class="term"><code class="filename">/etc/sysctl.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/*.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/sysctl.d/bridge.conf"><span class="term"><code class="filename">/etc/sysctl.d/bridge.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/bridge.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/sysctl.d/domain-name.conf"><span class="term"><code class="filename">/etc/sysctl.d/domain-name.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/domain-name.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/systemd/bootchart.conf"><span class="term"><code class="filename">/etc/systemd/bootchart.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/bootchart.conf">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="/etc/systemd/coredump.conf"><span class="term"><code class="filename">/etc/systemd/coredump.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/coredump.conf">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/etc/systemd/logind.conf"><span class="term"><code class="filename">/etc/systemd/logind.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/logind.conf">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/network"><span class="term"><code class="filename">/etc/systemd/network</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/network">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="/etc/systemd/resolved.conf"><span class="term"><code class="filename">/etc/systemd/resolved.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/resolved.conf">¶</a></dt><dd><p><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/sleep.conf"><span class="term"><code class="filename">/etc/systemd/sleep.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/sleep.conf">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="/etc/systemd/system/"><span class="term"><code class="filename">/etc/systemd/system/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/etc/systemd/system-preset/"><span class="term"><code class="filename">/etc/systemd/system-preset/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system-preset/">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/system-preset/*.preset"><span class="term"><code class="filename">/etc/systemd/system-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/system-preset/00-lennart.preset"><span class="term"><code class="filename">/etc/systemd/system-preset/00-lennart.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system-preset/00-lennart.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/system.conf"><span class="term"><code class="filename">/etc/systemd/system.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system.conf">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/user/"><span class="term"><code class="filename">/etc/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/etc/systemd/user-preset/*.preset"><span class="term"><code class="filename">/etc/systemd/user-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/user-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/user.conf"><span class="term"><code class="filename">/etc/systemd/user.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/user.conf">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="/etc/tmpfiles.d"><span class="term"><code class="filename">/etc/tmpfiles.d</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/tmpfiles.d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/etc/tmpfiles.d/*.conf"><span class="term"><code class="filename">/etc/tmpfiles.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/tmpfiles.d/*.conf">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/etc/udev/hwdb.bin"><span class="term"><code class="filename">/etc/udev/hwdb.bin</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/hwdb.bin">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="/etc/udev/hwdb.d"><span class="term"><code class="filename">/etc/udev/hwdb.d</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/hwdb.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/etc/udev/rules.d"><span class="term"><code class="filename">/etc/udev/rules.d</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/rules.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/etc/udev/rules.d/99-bridge.conf"><span class="term"><code class="filename">/etc/udev/rules.d/99-bridge.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/rules.d/99-bridge.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/udev/udev.conf"><span class="term"><code class="filename">/etc/udev/udev.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/udev.conf">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="/etc/vconsole.conf"><span class="term"><code class="filename">/etc/vconsole.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/vconsole.conf">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="/home"><span class="term"><code class="filename">/home</code></span><a class="headerlink" title="Permalink to this term" href="#/home">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/home/lennart"><span class="term"><code class="filename">/home/lennart</code></span><a class="headerlink" title="Permalink to this term" href="#/home/lennart">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a></p></dd><dt id="/lib"><span class="term"><code class="filename">/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/lib">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="/lib64"><span class="term"><code class="filename">/lib64</code></span><a class="headerlink" title="Permalink to this term" href="#/lib64">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/proc"><span class="term"><code class="filename">/proc</code></span><a class="headerlink" title="Permalink to this term" href="#/proc">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/proc/cmdline"><span class="term"><code class="filename">/proc/cmdline</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/cmdline">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/proc/devices"><span class="term"><code class="filename">/proc/devices</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/devices">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/proc/self/fd"><span class="term"><code class="filename">/proc/self/fd</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/self/fd">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="/proc/self/mountinfo"><span class="term"><code class="filename">/proc/self/mountinfo</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/self/mountinfo">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="/proc/self/sessionid"><span class="term"><code class="filename">/proc/self/sessionid</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/self/sessionid">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="/proc/sys"><span class="term"><code class="filename">/proc/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/proc/sys/kernel/domainname"><span class="term"><code class="filename">/proc/sys/kernel/domainname</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/kernel/domainname">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/proc/sys/kernel/random/boot_id"><span class="term"><code class="filename">/proc/sys/kernel/random/boot_id</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/kernel/random/boot_id">¶</a></dt><dd><p><a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a></p></dd><dt id="/proc/sys/net/ipv4/conf/enp3s0.200/forwarding"><span class="term"><code class="filename">/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/net/ipv4/conf/enp3s0.200/forwarding">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/proc/sys/net/ipv4/tcp_keepalive_time"><span class="term"><code class="filename">/proc/sys/net/ipv4/tcp_keepalive_time</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/net/ipv4/tcp_keepalive_time">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="/proc/sys/net/ipv6/bindv6only"><span class="term"><code class="filename">/proc/sys/net/ipv6/bindv6only</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/net/ipv6/bindv6only">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="/root"><span class="term"><code class="filename">/root</code></span><a class="headerlink" title="Permalink to this term" href="#/root">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/run"><span class="term"><code class="filename">/run</code></span><a class="headerlink" title="Permalink to this term" href="#/run">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/binfmt.d/*.conf"><span class="term"><code class="filename">/run/binfmt.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/binfmt.d/*.conf">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/run/foobar.pid"><span class="term"><code class="filename">/run/foobar.pid</code></span><a class="headerlink" title="Permalink to this term" href="#/run/foobar.pid">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="/run/log"><span class="term"><code class="filename">/run/log</code></span><a class="headerlink" title="Permalink to this term" href="#/run/log">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="/run/log/journal"><span class="term"><code class="filename">/run/log/journal</code></span><a class="headerlink" title="Permalink to this term" href="#/run/log/journal">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/run/modules-load.d/*.conf"><span class="term"><code class="filename">/run/modules-load.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/modules-load.d/*.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/run/nologin"><span class="term"><code class="filename">/run/nologin</code></span><a class="headerlink" title="Permalink to this term" href="#/run/nologin">¶</a></dt><dd><p><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a></p></dd><dt id="/run/sysctl.d/*.conf"><span class="term"><code class="filename">/run/sysctl.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/sysctl.d/*.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/run/systemd/journal/syslog"><span class="term"><code class="filename">/run/systemd/journal/syslog</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/journal/syslog">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/run/systemd/network"><span class="term"><code class="filename">/run/systemd/network</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/network">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="/run/systemd/notify"><span class="term"><code class="filename">/run/systemd/notify</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/notify">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/run/systemd/private"><span class="term"><code class="filename">/run/systemd/private</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/private">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/run/systemd/readahead/"><span class="term"><code class="filename">/run/systemd/readahead/</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/readahead/">¶</a></dt><dd><p><a href="sd_readahead.html"><span class="citerefentry"><span class="refentrytitle">sd_readahead</span>(3)</span></a></p></dd><dt id="/run/systemd/resolve/resolv.conf"><span class="term"><code class="filename">/run/systemd/resolve/resolv.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/resolve/resolv.conf">¶</a></dt><dd><p><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="/run/systemd/shutdownd"><span class="term"><code class="filename">/run/systemd/shutdownd</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/shutdownd">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/run/systemd/system/"><span class="term"><code class="filename">/run/systemd/system/</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/system/">¶</a></dt><dd><p><a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/run/systemd/system-preset/*.preset"><span class="term"><code class="filename">/run/systemd/system-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/system-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/run/systemd/user/"><span class="term"><code class="filename">/run/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/run/systemd/user-preset/*.preset"><span class="term"><code class="filename">/run/systemd/user-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/user-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/run/tmpfiles.d"><span class="term"><code class="filename">/run/tmpfiles.d</code></span><a class="headerlink" title="Permalink to this term" href="#/run/tmpfiles.d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/run/tmpfiles.d/*.conf"><span class="term"><code class="filename">/run/tmpfiles.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/tmpfiles.d/*.conf">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/run/udev/hwdb.d"><span class="term"><code class="filename">/run/udev/hwdb.d</code></span><a class="headerlink" title="Permalink to this term" href="#/run/udev/hwdb.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/udev/rules.d"><span class="term"><code class="filename">/run/udev/rules.d</code></span><a class="headerlink" title="Permalink to this term" href="#/run/udev/rules.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/udev/static_node-tags/tag"><span class="term"><code class="filename">/run/udev/static_node-tags/<em class="replaceable"><code>tag</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/run/udev/static_node-tags/tag">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/user"><span class="term"><code class="filename">/run/user</code></span><a class="headerlink" title="Permalink to this term" href="#/run/user">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/run/user/$USER"><span class="term"><code class="filename">/run/user/$USER</code></span><a class="headerlink" title="Permalink to this term" href="#/run/user/%24USER">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="/sbin"><span class="term"><code class="filename">/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/sbin/fsck."><span class="term"><code class="filename">/sbin/fsck.</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin/fsck.">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="/sbin/init"><span class="term"><code class="filename">/sbin/init</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin/init">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="/sbin/login"><span class="term"><code class="filename">/sbin/login</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin/login">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/srv"><span class="term"><code class="filename">/srv</code></span><a class="headerlink" title="Permalink to this term" href="#/srv">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/sys"><span class="term"><code class="filename">/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/sys">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="/sys/fs/cgroup"><span class="term"><code class="filename">/sys/fs/cgroup</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/fs/cgroup">¶</a></dt><dd><p><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="/sys/fs/cgroup/systemd/"><span class="term"><code class="filename">/sys/fs/cgroup/systemd/</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/fs/cgroup/systemd/">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/sys/fs/selinux"><span class="term"><code class="filename">/sys/fs/selinux</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/fs/selinux">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/sys/power/disk"><span class="term"><code class="filename">/sys/power/disk</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/power/disk">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="/sys/power/state"><span class="term"><code class="filename">/sys/power/state</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/power/state">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="/sysroot"><span class="term"><code class="filename">/sysroot</code></span><a class="headerlink" title="Permalink to this term" href="#/sysroot">¶</a></dt><dd><p><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a></p></dd><dt id="/sysroot/etc/fstab"><span class="term"><code class="filename">/sysroot/etc/fstab</code></span><a class="headerlink" title="Permalink to this term" href="#/sysroot/etc/fstab">¶</a></dt><dd><p><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a></p></dd><dt id="/system-update"><span class="term"><code class="filename">/system-update</code></span><a class="headerlink" title="Permalink to this term" href="#/system-update">¶</a></dt><dd><p><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="/tmp"><span class="term"><code class="filename">/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/tmp">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/tmp/var"><span class="term"><code class="filename">/tmp/var</code></span><a class="headerlink" title="Permalink to this term" href="#/tmp/var">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/upload"><span class="term"><code class="filename">/upload</code></span><a class="headerlink" title="Permalink to this term" href="#/upload">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="/usr"><span class="term"><code class="filename">/usr</code></span><a class="headerlink" title="Permalink to this term" href="#/usr">¶</a></dt><dd><p><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/usr/bin"><span class="term"><code class="filename">/usr/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/bin/mount"><span class="term"><code class="filename">/usr/bin/mount</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin/mount">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="/usr/bin/umount"><span class="term"><code class="filename">/usr/bin/umount</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin/umount">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="/usr/include"><span class="term"><code class="filename">/usr/include</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/include">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/lib"><span class="term"><code class="filename">/usr/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib/binfmt.d/*.conf"><span class="term"><code class="filename">/usr/lib/binfmt.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/binfmt.d/*.conf">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/usr/lib/kernel/install.d/"><span class="term"><code class="filename">/usr/lib/kernel/install.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/kernel/install.d/">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/usr/lib/kernel/install.d/*.install"><span class="term"><code class="filename">/usr/lib/kernel/install.d/*.install</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/kernel/install.d/*.install">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/usr/lib/modules-load.d/*.conf"><span class="term"><code class="filename">/usr/lib/modules-load.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/modules-load.d/*.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/usr/lib/os-release"><span class="term"><code class="filename">/usr/lib/os-release</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/os-release">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/usr/lib/sysctl.d/*.conf"><span class="term"><code class="filename">/usr/lib/sysctl.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/sysctl.d/*.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/network"><span class="term"><code class="filename">/usr/lib/systemd/network</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/network">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system"><span class="term"><code class="filename">/usr/lib/systemd/system</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-cryptsetup-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-cryptsetup-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-cryptsetup-generator">¶</a></dt><dd><p><a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-debug-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-debug-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-debug-generator">¶</a></dt><dd><p><a href="systemd-debug-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-debug-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-efi-boot-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-efi-boot-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-efi-boot-generator">¶</a></dt><dd><p><a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-fstab-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-fstab-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-fstab-generator">¶</a></dt><dd><p><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-getty-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-getty-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-getty-generator">¶</a></dt><dd><p><a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-gpt-auto-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-gpt-auto-generator">¶</a></dt><dd><p><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-system-update-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-system-update-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-system-update-generator">¶</a></dt><dd><p><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-preset/*.preset"><span class="term"><code class="filename">/usr/lib/systemd/system-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-preset/50-gnome.preset"><span class="term"><code class="filename">/usr/lib/systemd/system-preset/50-gnome.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-preset/50-gnome.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-preset/99-default.preset"><span class="term"><code class="filename">/usr/lib/systemd/system-preset/99-default.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-preset/99-default.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-shutdown/"><span class="term"><code class="filename">/usr/lib/systemd/system-shutdown/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-shutdown/">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-sleep/"><span class="term"><code class="filename">/usr/lib/systemd/system-sleep/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-sleep/">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-activate"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-activate</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-activate">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-backlight"><span class="term"><code class="filename">/usr/lib/systemd/systemd-backlight</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-backlight">¶</a></dt><dd><p><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-binfmt"><span class="term"><code class="filename">/usr/lib/systemd/systemd-binfmt</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-binfmt">¶</a></dt><dd><p><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-bootchart"><span class="term"><code class="filename">/usr/lib/systemd/systemd-bootchart</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-bootchart">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-bus-proxyd"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-bus-proxyd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-bus-proxyd">¶</a></dt><dd><p><a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-cryptsetup"><span class="term"><code class="filename">/usr/lib/systemd/systemd-cryptsetup</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-cryptsetup">¶</a></dt><dd><p><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-fsck"><span class="term"><code class="filename">/usr/lib/systemd/systemd-fsck</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-fsck">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-hostnamed"><span class="term"><code class="filename">/usr/lib/systemd/systemd-hostnamed</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-hostnamed">¶</a></dt><dd><p><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-initctl"><span class="term"><code class="filename">/usr/lib/systemd/systemd-initctl</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-initctl">¶</a></dt><dd><p><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-journal-gatewayd"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-journal-gatewayd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-journal-gatewayd">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-journald"><span class="term"><code class="filename">/usr/lib/systemd/systemd-journald</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-journald">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-localed"><span class="term"><code class="filename">/usr/lib/systemd/systemd-localed</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-localed">¶</a></dt><dd><p><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-logind"><span class="term"><code class="filename">/usr/lib/systemd/systemd-logind</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-logind">¶</a></dt><dd><p><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-machined"><span class="term"><code class="filename">/usr/lib/systemd/systemd-machined</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-machined">¶</a></dt><dd><p><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-modules-load"><span class="term"><code class="filename">/usr/lib/systemd/systemd-modules-load</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-modules-load">¶</a></dt><dd><p><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-networkd"><span class="term"><code class="filename">/usr/lib/systemd/systemd-networkd</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-networkd">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-networkd-wait-online"><span class="term"><code class="filename">/usr/lib/systemd/systemd-networkd-wait-online</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-networkd-wait-online">¶</a></dt><dd><p><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-quotacheck"><span class="term"><code class="filename">/usr/lib/systemd/systemd-quotacheck</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-quotacheck">¶</a></dt><dd><p><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-random-seed"><span class="term"><code class="filename">/usr/lib/systemd/systemd-random-seed</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-random-seed">¶</a></dt><dd><p><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-readahead/systemd-readahead"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-readahead/systemd-readahead</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-readahead/systemd-readahead">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-remount-fs"><span class="term"><code class="filename">/usr/lib/systemd/systemd-remount-fs</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-remount-fs">¶</a></dt><dd><p><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-resolved"><span class="term"><code class="filename">/usr/lib/systemd/systemd-resolved</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-resolved">¶</a></dt><dd><p><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-rfkill"><span class="term"><code class="filename">/usr/lib/systemd/systemd-rfkill</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-rfkill">¶</a></dt><dd><p><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-shutdown"><span class="term"><code class="filename">/usr/lib/systemd/systemd-shutdown</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-shutdown">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-shutdownd"><span class="term"><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-shutdownd">¶</a></dt><dd><p><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-sleep"><span class="term"><code class="filename">/usr/lib/systemd/systemd-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-sleep">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-sysctl"><span class="term"><code class="filename">/usr/lib/systemd/systemd-sysctl</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-sysctl">¶</a></dt><dd><p><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-timedated"><span class="term"><code class="filename">/usr/lib/systemd/systemd-timedated</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-timedated">¶</a></dt><dd><p><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-timesyncd"><span class="term"><code class="filename">/usr/lib/systemd/systemd-timesyncd</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-timesyncd">¶</a></dt><dd><p><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-udevd"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-udevd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-udevd">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-update-done"><span class="term"><code class="filename">/usr/lib/systemd/systemd-update-done</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-update-done">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-update-utmp"><span class="term"><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-update-utmp">¶</a></dt><dd><p><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-user-sessions"><span class="term"><code class="filename">/usr/lib/systemd/systemd-user-sessions</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-user-sessions">¶</a></dt><dd><p><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-vconsole-setup"><span class="term"><code class="filename">/usr/lib/systemd/systemd-vconsole-setup</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-vconsole-setup">¶</a></dt><dd><p><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/user/"><span class="term"><code class="filename">/usr/lib/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/user-preset/*.preset"><span class="term"><code class="filename">/usr/lib/systemd/user-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/user-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/sysusers.d/"><span class="term"><code class="filename">/usr/lib/sysusers.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/sysusers.d/">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/usr/lib/sysusers.d/*.conf"><span class="term"><code class="filename">/usr/lib/sysusers.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/sysusers.d/*.conf">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/usr/lib/tmpfiles.d"><span class="term"><code class="filename">/usr/lib/tmpfiles.d</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/tmpfiles.d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/usr/lib/tmpfiles.d/*.conf"><span class="term"><code class="filename">/usr/lib/tmpfiles.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/tmpfiles.d/*.conf">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/usr/lib/udev"><span class="term"><code class="filename">/usr/lib/udev</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/udev">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib/udev/hwdb.d"><span class="term"><code class="filename">/usr/lib/udev/hwdb.d</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/udev/hwdb.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib/udev/rules.d"><span class="term"><code class="filename">/usr/lib/udev/rules.d</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/udev/rules.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib64"><span class="term"><code class="filename">/usr/lib64</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib64">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/local/bin"><span class="term"><code class="filename">/usr/local/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/local/bin">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/local/lib/systemd/system"><span class="term"><code class="filename">/usr/local/lib/systemd/system</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/local/lib/systemd/system">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/usr/local/sbin"><span class="term"><code class="filename">/usr/local/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/local/sbin">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/sbin"><span class="term"><code class="filename">/usr/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/sbin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/share"><span class="term"><code class="filename">/usr/share</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/doc"><span class="term"><code class="filename">/usr/share/doc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/doc">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/factory"><span class="term"><code class="filename">/usr/share/factory</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/usr/share/factory/etc"><span class="term"><code class="filename">/usr/share/factory/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/etc">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/factory/var"><span class="term"><code class="filename">/usr/share/factory/var</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/var">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/zoneinfo/"><span class="term"><code class="filename">/usr/share/zoneinfo/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/zoneinfo/">¶</a></dt><dd><p><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a></p></dd><dt id="/var"><span class="term"><code class="filename">/var</code></span><a class="headerlink" title="Permalink to this term" href="#/var">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/var/.updated"><span class="term"><code class="filename">/var/.updated</code></span><a class="headerlink" title="Permalink to this term" href="#/var/.updated">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="/var/cache"><span class="term"><code class="filename">/var/cache</code></span><a class="headerlink" title="Permalink to this term" href="#/var/cache">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/lib"><span class="term"><code class="filename">/var/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/lib/dbus/machine-id"><span class="term"><code class="filename">/var/lib/dbus/machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/dbus/machine-id">¶</a></dt><dd><p><a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a></p></dd><dt id="/var/lib/systemd/backlight/"><span class="term"><code class="filename">/var/lib/systemd/backlight/</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/backlight/">¶</a></dt><dd><p><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a></p></dd><dt id="/var/lib/systemd/coredump"><span class="term"><code class="filename">/var/lib/systemd/coredump</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/coredump">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="/var/lib/systemd/random-seed"><span class="term"><code class="filename">/var/lib/systemd/random-seed</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/random-seed">¶</a></dt><dd><p><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a></p></dd><dt id="/var/lib/systemd/rfkill/"><span class="term"><code class="filename">/var/lib/systemd/rfkill/</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/rfkill/">¶</a></dt><dd><p><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="/var/log"><span class="term"><code class="filename">/var/log</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/log/journal"><span class="term"><code class="filename">/var/log/journal</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log/journal">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/var/log/journal/some.host/remote-some~host.journal"><span class="term"><code class="filename">/var/log/journal/some.host/remote-some~host.journal</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log/journal/some.host/remote-some~host.journal">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="/var/run"><span class="term"><code class="filename">/var/run</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/var/run/dbus/system_bus_socket"><span class="term"><code class="filename">/var/run/dbus/system_bus_socket</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run/dbus/system_bus_socket">¶</a></dt><dd><p><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a></p></dd><dt id="/var/run/utmp"><span class="term"><code class="filename">/var/run/utmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run/utmp">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="/var/spool"><span class="term"><code class="filename">/var/spool</code></span><a class="headerlink" title="Permalink to this term" href="#/var/spool">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/tmp"><span class="term"><code class="filename">/var/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/tmp">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="automount.automount"><span class="term"><code class="filename"><em class="replaceable"><code>automount</code></em>.automount</code></span><a class="headerlink" title="Permalink to this term" href="#automount.automount">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="basic.target"><span class="term"><code class="filename">basic.target</code></span><a class="headerlink" title="Permalink to this term" href="#basic.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="bluetooth.target"><span class="term"><code class="filename">bluetooth.target</code></span><a class="headerlink" title="Permalink to this term" href="#bluetooth.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="bootctl"><span class="term"><span class="command"><strong>bootctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#bootctl">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a></p></dd><dt id="busctl"><span class="term"><span class="command"><strong>busctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#busctl">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="coredumpctl"><span class="term"><span class="command"><strong>coredumpctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#coredumpctl">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a></p></dd><dt id="cryptsetup-pre.target"><span class="term"><code class="filename">cryptsetup-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#cryptsetup-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="cryptsetup.target"><span class="term"><code class="filename">cryptsetup.target</code></span><a class="headerlink" title="Permalink to this term" href="#cryptsetup.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="ctrl-alt-del.target"><span class="term"><code class="filename">ctrl-alt-del.target</code></span><a class="headerlink" title="Permalink to this term" href="#ctrl-alt-del.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="dbus.service"><span class="term"><code class="filename">dbus.service</code></span><a class="headerlink" title="Permalink to this term" href="#dbus.service">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="dbus.socket"><span class="term"><code class="filename">dbus.socket</code></span><a class="headerlink" title="Permalink to this term" href="#dbus.socket">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="default.target"><span class="term"><code class="filename">default.target</code></span><a class="headerlink" title="Permalink to this term" href="#default.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="device.device"><span class="term"><code class="filename"><em class="replaceable"><code>device</code></em>.device</code></span><a class="headerlink" title="Permalink to this term" href="#device.device">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="display-manager.service"><span class="term"><code class="filename">display-manager.service</code></span><a class="headerlink" title="Permalink to this term" href="#display-manager.service">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="emergency.target"><span class="term"><code class="filename">emergency.target</code></span><a class="headerlink" title="Permalink to this term" href="#emergency.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="exit.target"><span class="term"><code class="filename">exit.target</code></span><a class="headerlink" title="Permalink to this term" href="#exit.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="final.target"><span class="term"><code class="filename">final.target</code></span><a class="headerlink" title="Permalink to this term" href="#final.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="getty.target"><span class="term"><code class="filename">getty.target</code></span><a class="headerlink" title="Permalink to this term" href="#getty.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="graphical.target"><span class="term"><code class="filename">graphical.target</code></span><a class="headerlink" title="Permalink to this term" href="#graphical.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="halt"><span class="term"><span class="command"><strong>halt</strong></span></span><a class="headerlink" title="Permalink to this term" href="#halt">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="halt.target"><span class="term"><code class="filename">halt.target</code></span><a class="headerlink" title="Permalink to this term" href="#halt.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="hibernate.target"><span class="term"><code class="filename">hibernate.target</code></span><a class="headerlink" title="Permalink to this term" href="#hibernate.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="hostnamectl"><span class="term"><span class="command"><strong>hostnamectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#hostnamectl">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="hybrid-sleep.target"><span class="term"><code class="filename">hybrid-sleep.target</code></span><a class="headerlink" title="Permalink to this term" href="#hybrid-sleep.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="init"><span class="term"><span class="command"><strong>init</strong></span></span><a class="headerlink" title="Permalink to this term" href="#init">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="initrd-fs.target"><span class="term"><code class="filename">initrd-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#initrd-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="initrd-root-fs.target"><span class="term"><code class="filename">initrd-root-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#initrd-root-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="journalctl"><span class="term"><span class="command"><strong>journalctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#journalctl">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="kbrequest.target"><span class="term"><code class="filename">kbrequest.target</code></span><a class="headerlink" title="Permalink to this term" href="#kbrequest.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="kernel-install"><span class="term"><span class="command"><strong>kernel-install</strong></span></span><a class="headerlink" title="Permalink to this term" href="#kernel-install">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="kexec.target"><span class="term"><code class="filename">kexec.target</code></span><a class="headerlink" title="Permalink to this term" href="#kexec.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="link.link"><span class="term"><code class="filename"><em class="replaceable"><code>link</code></em>.link</code></span><a class="headerlink" title="Permalink to this term" href="#link.link">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="local-fs-pre.target"><span class="term"><code class="filename">local-fs-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#local-fs-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="local-fs.target"><span class="term"><code class="filename">local-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#local-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="localectl"><span class="term"><span class="command"><strong>localectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#localectl">¶</a></dt><dd><p><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a></p></dd><dt id="loginctl"><span class="term"><span class="command"><strong>loginctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#loginctl">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a></p></dd><dt id="machine.slice"><span class="term"><code class="filename">machine.slice</code></span><a class="headerlink" title="Permalink to this term" href="#machine.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="machinectl"><span class="term"><span class="command"><strong>machinectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#machinectl">¶</a></dt><dd><p><a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a></p></dd><dt id="mount.mount"><span class="term"><code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code></span><a class="headerlink" title="Permalink to this term" href="#mount.mount">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="multi-user.target"><span class="term"><code class="filename">multi-user.target</code></span><a class="headerlink" title="Permalink to this term" href="#multi-user.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="netdev.netdev"><span class="term"><code class="filename"><em class="replaceable"><code>netdev</code></em>.netdev</code></span><a class="headerlink" title="Permalink to this term" href="#netdev.netdev">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="network.network"><span class="term"><code class="filename"><em class="replaceable"><code>network</code></em>.network</code></span><a class="headerlink" title="Permalink to this term" href="#network.network">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="network-online.target"><span class="term"><code class="filename">network-online.target</code></span><a class="headerlink" title="Permalink to this term" href="#network-online.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="network-pre.target"><span class="term"><code class="filename">network-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#network-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="network.target"><span class="term"><code class="filename">network.target</code></span><a class="headerlink" title="Permalink to this term" href="#network.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="nss-lookup.target"><span class="term"><code class="filename">nss-lookup.target</code></span><a class="headerlink" title="Permalink to this term" href="#nss-lookup.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="nss-myhostname.la"><span class="term"><code class="filename">nss-myhostname.la</code></span><a class="headerlink" title="Permalink to this term" href="#nss-myhostname.la">¶</a></dt><dd><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a></p></dd><dt id="nss-user-lookup.target"><span class="term"><code class="filename">nss-user-lookup.target</code></span><a class="headerlink" title="Permalink to this term" href="#nss-user-lookup.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="pam_systemd.so"><span class="term"><code class="filename">pam_systemd.so</code></span><a class="headerlink" title="Permalink to this term" href="#pam_systemd.so">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="path.path"><span class="term"><code class="filename"><em class="replaceable"><code>path</code></em>.path</code></span><a class="headerlink" title="Permalink to this term" href="#path.path">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="paths.target"><span class="term"><code class="filename">paths.target</code></span><a class="headerlink" title="Permalink to this term" href="#paths.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="pkg-config"><span class="term"><span class="command"><strong>pkg-config</strong></span></span><a class="headerlink" title="Permalink to this term" href="#pkg-config">¶</a></dt><dd><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>, <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>, <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a></p></dd><dt id="poweroff"><span class="term"><span class="command"><strong>poweroff</strong></span></span><a class="headerlink" title="Permalink to this term" href="#poweroff">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="poweroff.target"><span class="term"><code class="filename">poweroff.target</code></span><a class="headerlink" title="Permalink to this term" href="#poweroff.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="printer.target"><span class="term"><code class="filename">printer.target</code></span><a class="headerlink" title="Permalink to this term" href="#printer.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="reboot"><span class="term"><span class="command"><strong>reboot</strong></span></span><a class="headerlink" title="Permalink to this term" href="#reboot">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="reboot.target"><span class="term"><code class="filename">reboot.target</code></span><a class="headerlink" title="Permalink to this term" href="#reboot.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="remote-fs-pre.target"><span class="term"><code class="filename">remote-fs-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#remote-fs-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="remote-fs.target"><span class="term"><code class="filename">remote-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#remote-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="rescue.target"><span class="term"><code class="filename">rescue.target</code></span><a class="headerlink" title="Permalink to this term" href="#rescue.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="rpcbind.target"><span class="term"><code class="filename">rpcbind.target</code></span><a class="headerlink" title="Permalink to this term" href="#rpcbind.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel"><span class="term"><span class="command"><strong>runlevel</strong></span></span><a class="headerlink" title="Permalink to this term" href="#runlevel">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="runlevel2.target"><span class="term"><code class="filename">runlevel2.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel2.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel3.target"><span class="term"><code class="filename">runlevel3.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel3.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel4.target"><span class="term"><code class="filename">runlevel4.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel4.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel5.target"><span class="term"><code class="filename">runlevel5.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel5.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="scope.scope"><span class="term"><code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code></span><a class="headerlink" title="Permalink to this term" href="#scope.scope">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="service.service"><span class="term"><code class="filename"><em class="replaceable"><code>service</code></em>.service</code></span><a class="headerlink" title="Permalink to this term" href="#service.service">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="shutdown"><span class="term"><span class="command"><strong>shutdown</strong></span></span><a class="headerlink" title="Permalink to this term" href="#shutdown">¶</a></dt><dd><p><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="shutdown.target"><span class="term"><code class="filename">shutdown.target</code></span><a class="headerlink" title="Permalink to this term" href="#shutdown.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sigpwr.target"><span class="term"><code class="filename">sigpwr.target</code></span><a class="headerlink" title="Permalink to this term" href="#sigpwr.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sleep.target"><span class="term"><code class="filename">sleep.target</code></span><a class="headerlink" title="Permalink to this term" href="#sleep.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="slice.slice"><span class="term"><code class="filename"><em class="replaceable"><code>slice</code></em>.slice</code></span><a class="headerlink" title="Permalink to this term" href="#slice.slice">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="smartcard.target"><span class="term"><code class="filename">smartcard.target</code></span><a class="headerlink" title="Permalink to this term" href="#smartcard.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="snapshot.snapshot"><span class="term"><code class="filename"><em class="replaceable"><code>snapshot</code></em>.snapshot</code></span><a class="headerlink" title="Permalink to this term" href="#snapshot.snapshot">¶</a></dt><dd><p><a href="systemd.snapshot.html"><span class="citerefentry"><span class="refentrytitle">systemd.snapshot</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="socket.socket"><span class="term"><code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code></span><a class="headerlink" title="Permalink to this term" href="#socket.socket">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="sockets.target"><span class="term"><code class="filename">sockets.target</code></span><a class="headerlink" title="Permalink to this term" href="#sockets.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sound.target"><span class="term"><code class="filename">sound.target</code></span><a class="headerlink" title="Permalink to this term" href="#sound.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="suspend.target"><span class="term"><code class="filename">suspend.target</code></span><a class="headerlink" title="Permalink to this term" href="#suspend.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="swap.swap"><span class="term"><code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code></span><a class="headerlink" title="Permalink to this term" href="#swap.swap">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="swap.target"><span class="term"><code class="filename">swap.target</code></span><a class="headerlink" title="Permalink to this term" href="#swap.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sysinit.target"><span class="term"><code class="filename">sysinit.target</code></span><a class="headerlink" title="Permalink to this term" href="#sysinit.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="syslog.socket"><span class="term"><code class="filename">syslog.socket</code></span><a class="headerlink" title="Permalink to this term" href="#syslog.socket">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="system-update.target"><span class="term"><code class="filename">system-update.target</code></span><a class="headerlink" title="Permalink to this term" href="#system-update.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="system.slice"><span class="term"><code class="filename">system.slice</code></span><a class="headerlink" title="Permalink to this term" href="#system.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="systemctl"><span class="term"><span class="command"><strong>systemctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemctl">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="systemd"><span class="term"><span class="command"><strong>systemd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd-analyze"><span class="term"><span class="command"><strong>systemd-analyze</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-analyze">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="systemd-ask-password"><span class="term"><span class="command"><strong>systemd-ask-password</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="systemd-ask-password-console.path"><span class="term"><code class="filename">systemd-ask-password-console.path</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-console.path">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-ask-password-console.service"><span class="term"><code class="filename">systemd-ask-password-console.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-console.service">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-ask-password-wall.path"><span class="term"><code class="filename">systemd-ask-password-wall.path</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-wall.path">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-ask-password-wall.service"><span class="term"><code class="filename">systemd-ask-password-wall.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-wall.service">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-backlight@.service"><span class="term"><code class="filename">systemd-backlight@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-backlight@.service">¶</a></dt><dd><p><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a></p></dd><dt id="systemd-binfmt.service"><span class="term"><code class="filename">systemd-binfmt.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-binfmt.service">¶</a></dt><dd><p><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a></p></dd><dt id="systemd-bus-proxyd.socket"><span class="term"><code class="filename">systemd-bus-proxyd.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-bus-proxyd.socket">¶</a></dt><dd><p><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a></p></dd><dt id="systemd-bus-proxyd@.service"><span class="term"><code class="filename">systemd-bus-proxyd@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-bus-proxyd@.service">¶</a></dt><dd><p><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a></p></dd><dt id="systemd-cat"><span class="term"><span class="command"><strong>systemd-cat</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-cat">¶</a></dt><dd><p><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="systemd-cgls"><span class="term"><span class="command"><strong>systemd-cgls</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-cgls">¶</a></dt><dd><p><a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="systemd-cgtop"><span class="term"><span class="command"><strong>systemd-cgtop</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-cgtop">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="systemd-cryptsetup@.service"><span class="term"><code class="filename">systemd-cryptsetup@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-cryptsetup@.service">¶</a></dt><dd><p><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a></p></dd><dt id="systemd-delta"><span class="term"><span class="command"><strong>systemd-delta</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-delta">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="systemd-detect-virt"><span class="term"><span class="command"><strong>systemd-detect-virt</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-detect-virt">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a></p></dd><dt id="systemd-fsck-root.service"><span class="term"><code class="filename">systemd-fsck-root.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-fsck-root.service">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="systemd-fsck@.service"><span class="term"><code class="filename">systemd-fsck@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-fsck@.service">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="systemd-halt.service"><span class="term"><code class="filename">systemd-halt.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-halt.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-hibernate.service"><span class="term"><code class="filename">systemd-hibernate.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-hibernate.service">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="systemd-hostnamed.service"><span class="term"><code class="filename">systemd-hostnamed.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-hostnamed.service">¶</a></dt><dd><p><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a></p></dd><dt id="systemd-hybrid-sleep.service"><span class="term"><code class="filename">systemd-hybrid-sleep.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-hybrid-sleep.service">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="systemd-inhibit"><span class="term"><span class="command"><strong>systemd-inhibit</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-inhibit">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="systemd-initctl.service"><span class="term"><code class="filename">systemd-initctl.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-initctl.service">¶</a></dt><dd><p><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="systemd-initctl.socket"><span class="term"><code class="filename">systemd-initctl.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-initctl.socket">¶</a></dt><dd><p><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="systemd-journal-gatewayd.service"><span class="term"><code class="filename">systemd-journal-gatewayd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journal-gatewayd.service">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="systemd-journal-gatewayd.socket"><span class="term"><code class="filename">systemd-journal-gatewayd.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journal-gatewayd.socket">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="systemd-journal-remote"><span class="term"><span class="command"><strong>systemd-journal-remote</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-journal-remote">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="systemd-journald-dev-log.socket"><span class="term"><code class="filename">systemd-journald-dev-log.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journald-dev-log.socket">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd-journald.service"><span class="term"><code class="filename">systemd-journald.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journald.service">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd-journald.socket"><span class="term"><code class="filename">systemd-journald.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journald.socket">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd-kexec.service"><span class="term"><code class="filename">systemd-kexec.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-kexec.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-localed.service"><span class="term"><code class="filename">systemd-localed.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-localed.service">¶</a></dt><dd><p><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a></p></dd><dt id="systemd-logind.service"><span class="term"><code class="filename">systemd-logind.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-logind.service">¶</a></dt><dd><p><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a></p></dd><dt id="systemd-machine-id-setup"><span class="term"><span class="command"><strong>systemd-machine-id-setup</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-machine-id-setup">¶</a></dt><dd><p><a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a></p></dd><dt id="systemd-machined.service"><span class="term"><code class="filename">systemd-machined.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-machined.service">¶</a></dt><dd><p><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a></p></dd><dt id="systemd-modules-load.service"><span class="term"><code class="filename">systemd-modules-load.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-modules-load.service">¶</a></dt><dd><p><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="systemd-networkd-wait-online.service"><span class="term"><code class="filename">systemd-networkd-wait-online.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-networkd-wait-online.service">¶</a></dt><dd><p><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a></p></dd><dt id="systemd-networkd.service"><span class="term"><code class="filename">systemd-networkd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-networkd.service">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a></p></dd><dt id="systemd-notify"><span class="term"><span class="command"><strong>systemd-notify</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-notify">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="systemd-nspawn"><span class="term"><span class="command"><strong>systemd-nspawn</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-nspawn">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="systemd-path"><span class="term"><span class="command"><strong>systemd-path</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-path">¶</a></dt><dd><p><a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a></p></dd><dt id="systemd-poweroff.service"><span class="term"><code class="filename">systemd-poweroff.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-poweroff.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-quotacheck.service"><span class="term"><code class="filename">systemd-quotacheck.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-quotacheck.service">¶</a></dt><dd><p><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a></p></dd><dt id="systemd-random-seed.service"><span class="term"><code class="filename">systemd-random-seed.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-random-seed.service">¶</a></dt><dd><p><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a></p></dd><dt id="systemd-readahead-collect.service"><span class="term"><code class="filename">systemd-readahead-collect.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-readahead-collect.service">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="systemd-readahead-done.service"><span class="term"><code class="filename">systemd-readahead-done.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-readahead-done.service">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="systemd-readahead-done.timer"><span class="term"><code class="filename">systemd-readahead-done.timer</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-readahead-done.timer">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="systemd-readahead-replay.service"><span class="term"><code class="filename">systemd-readahead-replay.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-readahead-replay.service">¶</a></dt><dd><p><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a></p></dd><dt id="systemd-reboot.service"><span class="term"><code class="filename">systemd-reboot.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-reboot.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-remount-fs.service"><span class="term"><code class="filename">systemd-remount-fs.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-remount-fs.service">¶</a></dt><dd><p><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a></p></dd><dt id="systemd-resolved.service"><span class="term"><code class="filename">systemd-resolved.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-resolved.service">¶</a></dt><dd><p><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="systemd-rfkill@.service"><span class="term"><code class="filename">systemd-rfkill@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-rfkill@.service">¶</a></dt><dd><p><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="systemd-run"><span class="term"><span class="command"><strong>systemd-run</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-run">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="systemd-shutdownd.service"><span class="term"><code class="filename">systemd-shutdownd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-shutdownd.service">¶</a></dt><dd><p><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a></p></dd><dt id="systemd-shutdownd.socket"><span class="term"><code class="filename">systemd-shutdownd.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-shutdownd.socket">¶</a></dt><dd><p><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a></p></dd><dt id="systemd-socket-proxyd"><span class="term"><span class="command"><strong>systemd-socket-proxyd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-socket-proxyd">¶</a></dt><dd><p><a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a></p></dd><dt id="systemd-suspend.service"><span class="term"><code class="filename">systemd-suspend.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-suspend.service">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="systemd-sysctl.service"><span class="term"><code class="filename">systemd-sysctl.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-sysctl.service">¶</a></dt><dd><p><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a></p></dd><dt id="systemd-sysusers"><span class="term"><span class="command"><strong>systemd-sysusers</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-sysusers">¶</a></dt><dd><p><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a></p></dd><dt id="systemd-sysusers.service"><span class="term"><code class="filename">systemd-sysusers.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-sysusers.service">¶</a></dt><dd><p><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a></p></dd><dt id="systemd-timedated.service"><span class="term"><code class="filename">systemd-timedated.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-timedated.service">¶</a></dt><dd><p><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a></p></dd><dt id="systemd-timesyncd.service"><span class="term"><code class="filename">systemd-timesyncd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-timesyncd.service">¶</a></dt><dd><p><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles"><span class="term"><span class="command"><strong>systemd-tmpfiles</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-clean.service"><span class="term"><code class="filename">systemd-tmpfiles-clean.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-clean.service">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-clean.timer"><span class="term"><code class="filename">systemd-tmpfiles-clean.timer</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-clean.timer">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-setup-dev.service"><span class="term"><code class="filename">systemd-tmpfiles-setup-dev.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-setup-dev.service">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-setup.service"><span class="term"><code class="filename">systemd-tmpfiles-setup.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-setup.service">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tty-ask-password-agent"><span class="term"><span class="command"><strong>systemd-tty-ask-password-agent</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-tty-ask-password-agent">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="systemd-udevd-control.socket"><span class="term"><code class="filename">systemd-udevd-control.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-udevd-control.socket">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="systemd-udevd-kernel.socket"><span class="term"><code class="filename">systemd-udevd-kernel.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-udevd-kernel.socket">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="systemd-udevd.service"><span class="term"><code class="filename">systemd-udevd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-udevd.service">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="systemd-update-done.service"><span class="term"><code class="filename">systemd-update-done.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-update-done.service">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="systemd-update-utmp-runlevel.service"><span class="term"><code class="filename">systemd-update-utmp-runlevel.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-update-utmp-runlevel.service">¶</a></dt><dd><p><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a></p></dd><dt id="systemd-update-utmp.service"><span class="term"><code class="filename">systemd-update-utmp.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-update-utmp.service">¶</a></dt><dd><p><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a></p></dd><dt id="systemd-user-sessions.service"><span class="term"><code class="filename">systemd-user-sessions.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-user-sessions.service">¶</a></dt><dd><p><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a></p></dd><dt id="systemd-vconsole-setup.service"><span class="term"><code class="filename">systemd-vconsole-setup.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-vconsole-setup.service">¶</a></dt><dd><p><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="target.target"><span class="term"><code class="filename"><em class="replaceable"><code>target</code></em>.target</code></span><a class="headerlink" title="Permalink to this term" href="#target.target">¶</a></dt><dd><p><a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="telinit"><span class="term"><span class="command"><strong>telinit</strong></span></span><a class="headerlink" title="Permalink to this term" href="#telinit">¶</a></dt><dd><p><a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a></p></dd><dt id="time-sync.target"><span class="term"><code class="filename">time-sync.target</code></span><a class="headerlink" title="Permalink to this term" href="#time-sync.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="timedatectl"><span class="term"><span class="command"><strong>timedatectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#timedatectl">¶</a></dt><dd><p><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="timer.timer"><span class="term"><code class="filename"><em class="replaceable"><code>timer</code></em>.timer</code></span><a class="headerlink" title="Permalink to this term" href="#timer.timer">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="timers.target"><span class="term"><code class="filename">timers.target</code></span><a class="headerlink" title="Permalink to this term" href="#timers.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="udevadm"><span class="term"><span class="command"><strong>udevadm</strong></span></span><a class="headerlink" title="Permalink to this term" href="#udevadm">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="umount.target"><span class="term"><code class="filename">umount.target</code></span><a class="headerlink" title="Permalink to this term" href="#umount.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="user.slice"><span class="term"><code class="filename">user.slice</code></span><a class="headerlink" title="Permalink to this term" href="#user.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214179507968"></a><h2 id="Colophon">Colophon<a class="headerlink" title="Permalink to this headline" href="#Colophon">¶</a></h2><p><a name="colophon"></a>This index contains 1621 entries in 14 sections,
-referring to 177 individual manual pages.
+                encrypted volumes.</p><div class="variablelist"><a name="fstab-options"></a><dl class="variablelist"><dt id="auto"><span class="term"><code class="constant">auto</code></span><a class="headerlink" title="Permalink to this term" href="#auto">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="cipher="><span class="term"><code class="option">cipher=</code></span><a class="headerlink" title="Permalink to this term" href="#cipher=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="discard"><span class="term"><code class="option">discard</code></span><a class="headerlink" title="Permalink to this term" href="#discard">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="fail"><span class="term"><code class="option">fail</code></span><a class="headerlink" title="Permalink to this term" href="#fail">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="hash="><span class="term"><code class="option">hash=</code></span><a class="headerlink" title="Permalink to this term" href="#hash=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="key-slot="><span class="term"><code class="option">key-slot=</code></span><a class="headerlink" title="Permalink to this term" href="#key-slot=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="keyfile-offset="><span class="term"><code class="option">keyfile-offset=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-offset=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="keyfile-size="><span class="term"><code class="option">keyfile-size=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-size=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="luks"><span class="term"><code class="option">luks</code></span><a class="headerlink" title="Permalink to this term" href="#luks">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="noauto"><span class="term"><code class="option">noauto</code></span><a class="headerlink" title="Permalink to this term" href="#noauto">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="nofail"><span class="term"><code class="option">nofail</code></span><a class="headerlink" title="Permalink to this term" href="#nofail">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="plain"><span class="term"><code class="option">plain</code></span><a class="headerlink" title="Permalink to this term" href="#plain">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="read-only"><span class="term"><code class="option">read-only</code></span><a class="headerlink" title="Permalink to this term" href="#read-only">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="readonly"><span class="term"><code class="option">readonly</code></span><a class="headerlink" title="Permalink to this term" href="#readonly">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="size="><span class="term"><code class="option">size=</code></span><a class="headerlink" title="Permalink to this term" href="#size=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="swap"><span class="term"><code class="option">swap</code></span><a class="headerlink" title="Permalink to this term" href="#swap">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt"><span class="term"><code class="option">tcrypt</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt-hidden"><span class="term"><code class="option">tcrypt-hidden</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-hidden">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt-keyfile="><span class="term"><code class="option">tcrypt-keyfile=</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-keyfile=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tcrypt-system"><span class="term"><code class="option">tcrypt-system</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-system">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="timeout="><span class="term"><code class="option">timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#timeout=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tmp"><span class="term"><code class="option">tmp</code></span><a class="headerlink" title="Permalink to this term" href="#tmp">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="tries="><span class="term"><code class="option">tries=</code></span><a class="headerlink" title="Permalink to this term" href="#tries=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="verify"><span class="term"><code class="option">verify</code></span><a class="headerlink" title="Permalink to this term" href="#verify">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="x-initrd.mount"><span class="term"><code class="option">x-initrd.mount</code></span><a class="headerlink" title="Permalink to this term" href="#x-initrd.mount">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="x-systemd.automount"><span class="term"><code class="option">x-systemd.automount</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.automount">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="x-systemd.device-timeout="><span class="term"><code class="option">x-systemd.device-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.device-timeout=">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214188910912"></a><h2 id="System manager directives">System manager directives<a class="headerlink" title="Permalink to this headline" href="#System%20manager%20directives">¶</a></h2><p>Directives for configuring the behaviour of the
+                systemd process.</p><div class="variablelist"><a name="systemd-directives"></a><dl class="variablelist"><dt id="CPUAffinity="><span class="term"><code class="varname">CPUAffinity=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAffinity=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="CapabilityBoundingSet="><span class="term"><code class="varname">CapabilityBoundingSet=</code></span><a class="headerlink" title="Permalink to this term" href="#CapabilityBoundingSet=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="CrashChVT="><span class="term"><code class="varname">CrashChVT=</code></span><a class="headerlink" title="Permalink to this term" href="#CrashChVT=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="CrashShell="><span class="term"><code class="varname">CrashShell=</code></span><a class="headerlink" title="Permalink to this term" href="#CrashShell=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultBlockIOAccounting="><span class="term"><code class="varname">DefaultBlockIOAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultBlockIOAccounting=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultCPUAccounting="><span class="term"><code class="varname">DefaultCPUAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultCPUAccounting=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultEnvironment="><span class="term"><code class="varname">DefaultEnvironment=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultEnvironment=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitAS="><span class="term"><code class="varname">DefaultLimitAS=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitAS=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitCORE="><span class="term"><code class="varname">DefaultLimitCORE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitCORE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitCPU="><span class="term"><code class="varname">DefaultLimitCPU=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitCPU=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitDATA="><span class="term"><code class="varname">DefaultLimitDATA=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitDATA=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitFSIZE="><span class="term"><code class="varname">DefaultLimitFSIZE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitFSIZE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitLOCKS="><span class="term"><code class="varname">DefaultLimitLOCKS=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitLOCKS=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitMEMLOCK="><span class="term"><code class="varname">DefaultLimitMEMLOCK=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitMEMLOCK=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitMSGQUEUE="><span class="term"><code class="varname">DefaultLimitMSGQUEUE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitMSGQUEUE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitNICE="><span class="term"><code class="varname">DefaultLimitNICE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitNICE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitNOFILE="><span class="term"><code class="varname">DefaultLimitNOFILE=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitNOFILE=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitNPROC="><span class="term"><code class="varname">DefaultLimitNPROC=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitNPROC=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitRSS="><span class="term"><code class="varname">DefaultLimitRSS=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitRSS=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitRTPRIO="><span class="term"><code class="varname">DefaultLimitRTPRIO=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitRTPRIO=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitRTTIME="><span class="term"><code class="varname">DefaultLimitRTTIME=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitRTTIME=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitSIGPENDING="><span class="term"><code class="varname">DefaultLimitSIGPENDING=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitSIGPENDING=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultLimitSTACK="><span class="term"><code class="varname">DefaultLimitSTACK=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultLimitSTACK=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultMemoryAccounting="><span class="term"><code class="varname">DefaultMemoryAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultMemoryAccounting=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultRestartSec="><span class="term"><code class="varname">DefaultRestartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultRestartSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStandardError="><span class="term"><code class="varname">DefaultStandardError=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStandardError=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStandardOutput="><span class="term"><code class="varname">DefaultStandardOutput=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStandardOutput=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStartLimitBurst="><span class="term"><code class="varname">DefaultStartLimitBurst=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStartLimitBurst=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultStartLimitInterval="><span class="term"><code class="varname">DefaultStartLimitInterval=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultStartLimitInterval=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultTimeoutStartSec="><span class="term"><code class="varname">DefaultTimeoutStartSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultTimeoutStartSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultTimeoutStopSec="><span class="term"><code class="varname">DefaultTimeoutStopSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultTimeoutStopSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DefaultTimerAccuracySec="><span class="term"><code class="varname">DefaultTimerAccuracySec=</code></span><a class="headerlink" title="Permalink to this term" href="#DefaultTimerAccuracySec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="DumpCore="><span class="term"><code class="varname">DumpCore=</code></span><a class="headerlink" title="Permalink to this term" href="#DumpCore=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="HibernateMode="><span class="term"><code class="varname">HibernateMode=</code></span><a class="headerlink" title="Permalink to this term" href="#HibernateMode=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="HibernateState="><span class="term"><code class="varname">HibernateState=</code></span><a class="headerlink" title="Permalink to this term" href="#HibernateState=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="HybridSleepMode="><span class="term"><code class="varname">HybridSleepMode=</code></span><a class="headerlink" title="Permalink to this term" href="#HybridSleepMode=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="HybridSleepState="><span class="term"><code class="varname">HybridSleepState=</code></span><a class="headerlink" title="Permalink to this term" href="#HybridSleepState=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="JoinControllers="><span class="term"><code class="varname">JoinControllers=</code></span><a class="headerlink" title="Permalink to this term" href="#JoinControllers=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogColor="><span class="term"><code class="varname">LogColor=</code></span><a class="headerlink" title="Permalink to this term" href="#LogColor=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogLevel="><span class="term"><code class="varname">LogLevel=</code></span><a class="headerlink" title="Permalink to this term" href="#LogLevel=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogLocation="><span class="term"><code class="varname">LogLocation=</code></span><a class="headerlink" title="Permalink to this term" href="#LogLocation=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="LogTarget="><span class="term"><code class="varname">LogTarget=</code></span><a class="headerlink" title="Permalink to this term" href="#LogTarget=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="RuntimeWatchdogSec="><span class="term"><code class="varname">RuntimeWatchdogSec=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeWatchdogSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="ShowStatus="><span class="term"><code class="varname">ShowStatus=</code></span><a class="headerlink" title="Permalink to this term" href="#ShowStatus=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="ShutdownWatchdogSec="><span class="term"><code class="varname">ShutdownWatchdogSec=</code></span><a class="headerlink" title="Permalink to this term" href="#ShutdownWatchdogSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="SuspendMode="><span class="term"><code class="varname">SuspendMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendMode=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="SuspendState="><span class="term"><code class="varname">SuspendState=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendState=">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="SystemCallArchitectures="><span class="term"><code class="varname">SystemCallArchitectures=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemCallArchitectures=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="TimerSlackNSec="><span class="term"><code class="varname">TimerSlackNSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimerSlackNSec=">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214188830608"></a><h2 id="bootchart.conf directives">bootchart.conf directives<a class="headerlink" title="Permalink to this headline" href="#bootchart.conf%20directives">¶</a></h2><p>Directives for configuring the behaviour of the
+                systemd-bootchart process.</p><div class="variablelist"><a name="bootchart-directives"></a><dl class="variablelist"><dt id="ControlGroup="><span class="term"><code class="varname">ControlGroup=</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Filter="><span class="term"><code class="varname">Filter=</code></span><a class="headerlink" title="Permalink to this term" href="#Filter=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Frequency="><span class="term"><code class="varname">Frequency=</code></span><a class="headerlink" title="Permalink to this term" href="#Frequency=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Init="><span class="term"><code class="varname">Init=</code></span><a class="headerlink" title="Permalink to this term" href="#Init=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Output="><span class="term"><code class="varname">Output=</code></span><a class="headerlink" title="Permalink to this term" href="#Output=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="PlotEntropyGraph="><span class="term"><code class="varname">PlotEntropyGraph=</code></span><a class="headerlink" title="Permalink to this term" href="#PlotEntropyGraph=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="PlotMemoryUsage="><span class="term"><code class="varname">PlotMemoryUsage=</code></span><a class="headerlink" title="Permalink to this term" href="#PlotMemoryUsage=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Relative="><span class="term"><code class="varname">Relative=</code></span><a class="headerlink" title="Permalink to this term" href="#Relative=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="Samples="><span class="term"><code class="varname">Samples=</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="ScaleX="><span class="term"><code class="varname">ScaleX=</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleX=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="ScaleY="><span class="term"><code class="varname">ScaleY=</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleY=">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214188811168"></a><h2 id="command-line options">command-line options<a class="headerlink" title="Permalink to this headline" href="#command-line%20options">¶</a></h2><p>Command-line options accepted by programs in the
+                systemd suite.</p><div class="variablelist"><a name="options"></a><dl class="variablelist"><dt id="--accept"><span class="term"><code class="option">--accept</code></span><a class="headerlink" title="Permalink to this term" href="#--accept">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="--accept-cached"><span class="term"><code class="option">--accept-cached</code></span><a class="headerlink" title="Permalink to this term" href="#--accept-cached">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--acquired"><span class="term"><code class="option">--acquired</code></span><a class="headerlink" title="Permalink to this term" href="#--acquired">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--action="><span class="term"><code class="option">--action=</code></span><a class="headerlink" title="Permalink to this term" href="#--action=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--activatable"><span class="term"><code class="option">--activatable</code></span><a class="headerlink" title="Permalink to this term" href="#--activatable">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--address="><span class="term"><code class="option">--address=</code></span><a class="headerlink" title="Permalink to this term" href="#--address=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a></p></dd><dt id="--adjust-system-clock"><span class="term"><code class="option">--adjust-system-clock</code></span><a class="headerlink" title="Permalink to this term" href="#--adjust-system-clock">¶</a></dt><dd><p><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--after"><span class="term"><code class="option">--after</code></span><a class="headerlink" title="Permalink to this term" href="#--after">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--after-cursor="><span class="term"><code class="option">--after-cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--after-cursor=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="--all"><span class="term"><code class="option">--all</code></span><a class="headerlink" title="Permalink to this term" href="#--all">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="--attr-match="><span class="term"><code class="option">--attr-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--attr-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--attr-nomatch="><span class="term"><code class="option">--attr-nomatch=</code></span><a class="headerlink" title="Permalink to this term" href="#--attr-nomatch=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--attribute-walk"><span class="term"><code class="option">--attribute-walk</code></span><a class="headerlink" title="Permalink to this term" href="#--attribute-walk">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--batch"><span class="term"><code class="option">--batch</code></span><a class="headerlink" title="Permalink to this term" href="#--batch">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--before"><span class="term"><code class="option">--before</code></span><a class="headerlink" title="Permalink to this term" href="#--before">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--bind-ro="><span class="term"><code class="option">--bind-ro=</code></span><a class="headerlink" title="Permalink to this term" href="#--bind-ro=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--bind="><span class="term"><code class="option">--bind=</code></span><a class="headerlink" title="Permalink to this term" href="#--bind=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--boot"><span class="term"><code class="option">--boot</code></span><a class="headerlink" title="Permalink to this term" href="#--boot">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--boot="><span class="term"><code class="option">--boot=</code></span><a class="headerlink" title="Permalink to this term" href="#--boot=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--booted"><span class="term"><code class="option">--booted</code></span><a class="headerlink" title="Permalink to this term" href="#--booted">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--capability="><span class="term"><code class="option">--capability=</code></span><a class="headerlink" title="Permalink to this term" href="#--capability=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--catalog"><span class="term"><code class="option">--catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--cert="><span class="term"><code class="option">--cert=</code></span><a class="headerlink" title="Permalink to this term" href="#--cert=">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="--children-max="><span class="term"><code class="option">--children-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--children-max=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--clean"><span class="term"><code class="option">--clean</code></span><a class="headerlink" title="Permalink to this term" href="#--clean">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--cleanup-db"><span class="term"><code class="option">--cleanup-db</code></span><a class="headerlink" title="Permalink to this term" href="#--cleanup-db">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--cmdline"><span class="term"><code class="option">--cmdline</code></span><a class="headerlink" title="Permalink to this term" href="#--cmdline">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--compress"><span class="term"><code class="option">--compress</code></span><a class="headerlink" title="Permalink to this term" href="#--compress">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--confirm-spawn"><span class="term"><code class="option">--confirm-spawn</code></span><a class="headerlink" title="Permalink to this term" href="#--confirm-spawn">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--console"><span class="term"><code class="option">--console</code></span><a class="headerlink" title="Permalink to this term" href="#--console">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--container"><span class="term"><code class="option">--container</code></span><a class="headerlink" title="Permalink to this term" href="#--container">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a></p></dd><dt id="--control-group"><span class="term"><code class="option">--control-group</code></span><a class="headerlink" title="Permalink to this term" href="#--control-group">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--copy"><span class="term"><code class="option">--copy</code></span><a class="headerlink" title="Permalink to this term" href="#--copy">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--copy-locale"><span class="term"><code class="option">--copy-locale</code></span><a class="headerlink" title="Permalink to this term" href="#--copy-locale">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--copy-root-password"><span class="term"><code class="option">--copy-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--copy-root-password">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--copy-timezone"><span class="term"><code class="option">--copy-timezone</code></span><a class="headerlink" title="Permalink to this term" href="#--copy-timezone">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--crash-shell"><span class="term"><code class="option">--crash-shell</code></span><a class="headerlink" title="Permalink to this term" href="#--crash-shell">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--cursor="><span class="term"><code class="option">--cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--cursor=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="--daemon"><span class="term"><code class="option">--daemon</code></span><a class="headerlink" title="Permalink to this term" href="#--daemon">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--default-standard-error="><span class="term"><code class="option">--default-standard-error=</code></span><a class="headerlink" title="Permalink to this term" href="#--default-standard-error=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--default-standard-output="><span class="term"><code class="option">--default-standard-output=</code></span><a class="headerlink" title="Permalink to this term" href="#--default-standard-output=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--delay="><span class="term"><code class="option">--delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--delay=">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--depth="><span class="term"><code class="option">--depth=</code></span><a class="headerlink" title="Permalink to this term" href="#--depth=">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--description="><span class="term"><code class="option">--description=</code></span><a class="headerlink" title="Permalink to this term" href="#--description=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--device-id-of-file="><span class="term"><code class="option">--device-id-of-file=</code></span><a class="headerlink" title="Permalink to this term" href="#--device-id-of-file=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--diff="><span class="term"><code class="option">--diff=</code></span><a class="headerlink" title="Permalink to this term" href="#--diff=">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="--directory="><span class="term"><code class="option">--directory=</code></span><a class="headerlink" title="Permalink to this term" href="#--directory=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--disk-usage"><span class="term"><code class="option">--disk-usage</code></span><a class="headerlink" title="Permalink to this term" href="#--disk-usage">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--dmesg"><span class="term"><code class="option">--dmesg</code></span><a class="headerlink" title="Permalink to this term" href="#--dmesg">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--drop-capability="><span class="term"><code class="option">--drop-capability=</code></span><a class="headerlink" title="Permalink to this term" href="#--drop-capability=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--dry-run"><span class="term"><code class="option">--dry-run</code></span><a class="headerlink" title="Permalink to this term" href="#--dry-run">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--dump-catalog"><span class="term"><code class="option">--dump-catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--dump-configuration-items"><span class="term"><code class="option">--dump-configuration-items</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-configuration-items">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--dump-core"><span class="term"><code class="option">--dump-core</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-core">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--echo"><span class="term"><code class="option">--echo</code></span><a class="headerlink" title="Permalink to this term" href="#--echo">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--entropy"><span class="term"><code class="option">--entropy</code></span><a class="headerlink" title="Permalink to this term" href="#--entropy">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--event-timeout="><span class="term"><code class="option">--event-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--event-timeout=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="--exclude-prefix="><span class="term"><code class="option">--exclude-prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--exclude-prefix=">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--exec-delay="><span class="term"><code class="option">--exec-delay=</code></span><a class="headerlink" title="Permalink to this term" href="#--exec-delay=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="--exit"><span class="term"><code class="option">--exit</code></span><a class="headerlink" title="Permalink to this term" href="#--exit">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--exit-if-exists="><span class="term"><code class="option">--exit-if-exists=</code></span><a class="headerlink" title="Permalink to this term" href="#--exit-if-exists=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--export"><span class="term"><code class="option">--export</code></span><a class="headerlink" title="Permalink to this term" href="#--export">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--export-db"><span class="term"><code class="option">--export-db</code></span><a class="headerlink" title="Permalink to this term" href="#--export-db">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--export-prefix="><span class="term"><code class="option">--export-prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--export-prefix=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--field="><span class="term"><code class="option">--field=</code></span><a class="headerlink" title="Permalink to this term" href="#--field=">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--file="><span class="term"><code class="option">--file=</code></span><a class="headerlink" title="Permalink to this term" href="#--file=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="--flush"><span class="term"><code class="option">--flush</code></span><a class="headerlink" title="Permalink to this term" href="#--flush">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--follow"><span class="term"><code class="option">--follow</code></span><a class="headerlink" title="Permalink to this term" href="#--follow">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--force"><span class="term"><code class="option">--force</code></span><a class="headerlink" title="Permalink to this term" href="#--force">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--freq"><span class="term"><code class="option">--freq</code></span><a class="headerlink" title="Permalink to this term" href="#--freq">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--from-pattern="><span class="term"><code class="option">--from-pattern=</code></span><a class="headerlink" title="Permalink to this term" href="#--from-pattern=">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--full"><span class="term"><code class="option">--full</code></span><a class="headerlink" title="Permalink to this term" href="#--full">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="--fuzz="><span class="term"><code class="option">--fuzz=</code></span><a class="headerlink" title="Permalink to this term" href="#--fuzz=">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--getter="><span class="term"><code class="option">--getter=</code></span><a class="headerlink" title="Permalink to this term" href="#--getter=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--gid="><span class="term"><code class="option">--gid=</code></span><a class="headerlink" title="Permalink to this term" href="#--gid=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--global"><span class="term"><code class="option">--global</code></span><a class="headerlink" title="Permalink to this term" href="#--global">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--halt"><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#--halt">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="--header"><span class="term"><code class="option">--header</code></span><a class="headerlink" title="Permalink to this term" href="#--header">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a>, <a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a>, <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>, <a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--host="><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#--host=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--hostname="><span class="term"><code class="option">--hostname=</code></span><a class="headerlink" title="Permalink to this term" href="#--hostname=">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--icon="><span class="term"><code class="option">--icon=</code></span><a class="headerlink" title="Permalink to this term" href="#--icon=">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--identifier="><span class="term"><code class="option">--identifier=</code></span><a class="headerlink" title="Permalink to this term" href="#--identifier=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="--ignore-inhibitors"><span class="term"><code class="option">--ignore-inhibitors</code></span><a class="headerlink" title="Permalink to this term" href="#--ignore-inhibitors">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--image="><span class="term"><code class="option">--image=</code></span><a class="headerlink" title="Permalink to this term" href="#--image=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--init"><span class="term"><code class="option">--init</code></span><a class="headerlink" title="Permalink to this term" href="#--init">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--interface="><span class="term"><code class="option">--interface=</code></span><a class="headerlink" title="Permalink to this term" href="#--interface=">¶</a></dt><dd><p><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a></p></dd><dt id="--interval="><span class="term"><code class="option">--interval=</code></span><a class="headerlink" title="Permalink to this term" href="#--interval=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--iterations="><span class="term"><code class="option">--iterations=</code></span><a class="headerlink" title="Permalink to this term" href="#--iterations=">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="--job-mode="><span class="term"><code class="option">--job-mode=</code></span><a class="headerlink" title="Permalink to this term" href="#--job-mode=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--keep-unit"><span class="term"><code class="option">--keep-unit</code></span><a class="headerlink" title="Permalink to this term" href="#--keep-unit">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--kernel"><span class="term"><code class="option">--kernel</code></span><a class="headerlink" title="Permalink to this term" href="#--kernel">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--key="><span class="term"><code class="option">--key=</code></span><a class="headerlink" title="Permalink to this term" href="#--key=">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="--kill-who="><span class="term"><code class="option">--kill-who=</code></span><a class="headerlink" title="Permalink to this term" href="#--kill-who=">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--level-prefix="><span class="term"><code class="option">--level-prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--level-prefix=">¶</a></dt><dd><p><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="--lines="><span class="term"><code class="option">--lines=</code></span><a class="headerlink" title="Permalink to this term" href="#--lines=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--link-journal="><span class="term"><code class="option">--link-journal=</code></span><a class="headerlink" title="Permalink to this term" href="#--link-journal=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--list"><span class="term"><code class="option">--list</code></span><a class="headerlink" title="Permalink to this term" href="#--list">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--list-boots"><span class="term"><code class="option">--list-boots</code></span><a class="headerlink" title="Permalink to this term" href="#--list-boots">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--list-catalog"><span class="term"><code class="option">--list-catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--list-catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--listen-http="><span class="term"><code class="option">--listen-http=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen-http=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--listen-https="><span class="term"><code class="option">--listen-https=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen-https=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--listen-raw="><span class="term"><code class="option">--listen-raw=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen-raw=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--listen="><span class="term"><code class="option">--listen=</code></span><a class="headerlink" title="Permalink to this term" href="#--listen=">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="--locale-messages="><span class="term"><code class="option">--locale-messages=</code></span><a class="headerlink" title="Permalink to this term" href="#--locale-messages=">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--locale="><span class="term"><code class="option">--locale=</code></span><a class="headerlink" title="Permalink to this term" href="#--locale=">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--log-color="><span class="term"><code class="option">--log-color=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-color=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--log-level="><span class="term"><code class="option">--log-level=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-level=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--log-location="><span class="term"><code class="option">--log-location=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-location=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--log-priority="><span class="term"><code class="option">--log-priority=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-priority=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--log-target="><span class="term"><code class="option">--log-target=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-target=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--machine-id="><span class="term"><code class="option">--machine-id=</code></span><a class="headerlink" title="Permalink to this term" href="#--machine-id=">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--machine="><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#--machine=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--mangle"><span class="term"><code class="option">--mangle</code></span><a class="headerlink" title="Permalink to this term" href="#--mangle">¶</a></dt><dd><p><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a></p></dd><dt id="--match="><span class="term"><code class="option">--match=</code></span><a class="headerlink" title="Permalink to this term" href="#--match=">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--merge"><span class="term"><code class="option">--merge</code></span><a class="headerlink" title="Permalink to this term" href="#--merge">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="--mode="><span class="term"><code class="option">--mode=</code></span><a class="headerlink" title="Permalink to this term" href="#--mode=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--multiple"><span class="term"><code class="option">--multiple</code></span><a class="headerlink" title="Permalink to this term" href="#--multiple">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--name="><span class="term"><code class="option">--name=</code></span><a class="headerlink" title="Permalink to this term" href="#--name=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--network-bridge="><span class="term"><code class="option">--network-bridge=</code></span><a class="headerlink" title="Permalink to this term" href="#--network-bridge=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--network-interface="><span class="term"><code class="option">--network-interface=</code></span><a class="headerlink" title="Permalink to this term" href="#--network-interface=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--network-macvlan="><span class="term"><code class="option">--network-macvlan=</code></span><a class="headerlink" title="Permalink to this term" href="#--network-macvlan=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--network-veth"><span class="term"><code class="option">--network-veth</code></span><a class="headerlink" title="Permalink to this term" href="#--network-veth">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--new-id128"><span class="term"><code class="option">--new-id128</code></span><a class="headerlink" title="Permalink to this term" href="#--new-id128">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--nice="><span class="term"><code class="option">--nice=</code></span><a class="headerlink" title="Permalink to this term" href="#--nice=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--no-block"><span class="term"><code class="option">--no-block</code></span><a class="headerlink" title="Permalink to this term" href="#--no-block">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--no-compress"><span class="term"><code class="option">--no-compress</code></span><a class="headerlink" title="Permalink to this term" href="#--no-compress">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--no-convert"><span class="term"><code class="option">--no-convert</code></span><a class="headerlink" title="Permalink to this term" href="#--no-convert">¶</a></dt><dd><p><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a></p></dd><dt id="--no-filter"><span class="term"><code class="option">--no-filter</code></span><a class="headerlink" title="Permalink to this term" href="#--no-filter">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--no-full"><span class="term"><code class="option">--no-full</code></span><a class="headerlink" title="Permalink to this term" href="#--no-full">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--no-man"><span class="term"><code class="option">--no-man</code></span><a class="headerlink" title="Permalink to this term" href="#--no-man">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="--no-reload"><span class="term"><code class="option">--no-reload</code></span><a class="headerlink" title="Permalink to this term" href="#--no-reload">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--no-seal"><span class="term"><code class="option">--no-seal</code></span><a class="headerlink" title="Permalink to this term" href="#--no-seal">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--no-tail"><span class="term"><code class="option">--no-tail</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tail">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--no-tty"><span class="term"><code class="option">--no-tty</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tty">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a></p></dd><dt id="--no-wtmp"><span class="term"><code class="option">--no-wtmp</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wtmp">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="--order"><span class="term"><code class="option">--order</code></span><a class="headerlink" title="Permalink to this term" href="#--order">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--output"><span class="term"><code class="option">--output</code></span><a class="headerlink" title="Permalink to this term" href="#--output">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--output="><span class="term"><code class="option">--output=</code></span><a class="headerlink" title="Permalink to this term" href="#--output=">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--pager-end"><span class="term"><code class="option">--pager-end</code></span><a class="headerlink" title="Permalink to this term" href="#--pager-end">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--parent-match="><span class="term"><code class="option">--parent-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--parent-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--path"><span class="term"><code class="option">--path</code></span><a class="headerlink" title="Permalink to this term" href="#--path">¶</a></dt><dd><p><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a></p></dd><dt id="--path="><span class="term"><code class="option">--path=</code></span><a class="headerlink" title="Permalink to this term" href="#--path=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--personality="><span class="term"><code class="option">--personality=</code></span><a class="headerlink" title="Permalink to this term" href="#--personality=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--pid="><span class="term"><code class="option">--pid=</code></span><a class="headerlink" title="Permalink to this term" href="#--pid=">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--plain"><span class="term"><code class="option">--plain</code></span><a class="headerlink" title="Permalink to this term" href="#--plain">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--plymouth"><span class="term"><code class="option">--plymouth</code></span><a class="headerlink" title="Permalink to this term" href="#--plymouth">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--poweroff"><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#--poweroff">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="--prefix="><span class="term"><code class="option">--prefix=</code></span><a class="headerlink" title="Permalink to this term" href="#--prefix=">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--preset-mode="><span class="term"><code class="option">--preset-mode=</code></span><a class="headerlink" title="Permalink to this term" href="#--preset-mode=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--pretty"><span class="term"><code class="option">--pretty</code></span><a class="headerlink" title="Permalink to this term" href="#--pretty">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="--priority="><span class="term"><code class="option">--priority=</code></span><a class="headerlink" title="Permalink to this term" href="#--priority=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="--private-network"><span class="term"><code class="option">--private-network</code></span><a class="headerlink" title="Permalink to this term" href="#--private-network">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--prompt"><span class="term"><code class="option">--prompt</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--prompt-hostname"><span class="term"><code class="option">--prompt-hostname</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt-hostname">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--prompt-locale"><span class="term"><code class="option">--prompt-locale</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt-locale">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--prompt-root-password"><span class="term"><code class="option">--prompt-root-password</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt-root-password">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--prompt-timezone"><span class="term"><code class="option">--prompt-timezone</code></span><a class="headerlink" title="Permalink to this term" href="#--prompt-timezone">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--property"><span class="term"><code class="option">--property</code></span><a class="headerlink" title="Permalink to this term" href="#--property">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--property-match="><span class="term"><code class="option">--property-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--property-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--property="><span class="term"><code class="option">--property=</code></span><a class="headerlink" title="Permalink to this term" href="#--property=">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--pss"><span class="term"><code class="option">--pss</code></span><a class="headerlink" title="Permalink to this term" href="#--pss">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--query"><span class="term"><code class="option">--query</code></span><a class="headerlink" title="Permalink to this term" href="#--query">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--query="><span class="term"><code class="option">--query=</code></span><a class="headerlink" title="Permalink to this term" href="#--query=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--quiet"><span class="term"><code class="option">--quiet</code></span><a class="headerlink" title="Permalink to this term" href="#--quiet">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--read-only"><span class="term"><code class="option">--read-only</code></span><a class="headerlink" title="Permalink to this term" href="#--read-only">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--ready"><span class="term"><code class="option">--ready</code></span><a class="headerlink" title="Permalink to this term" href="#--ready">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--reboot"><span class="term"><code class="option">--reboot</code></span><a class="headerlink" title="Permalink to this term" href="#--reboot">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="--recursive"><span class="term"><code class="option">--recursive</code></span><a class="headerlink" title="Permalink to this term" href="#--recursive">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--register="><span class="term"><code class="option">--register=</code></span><a class="headerlink" title="Permalink to this term" href="#--register=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--rel"><span class="term"><code class="option">--rel</code></span><a class="headerlink" title="Permalink to this term" href="#--rel">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--reload"><span class="term"><code class="option">--reload</code></span><a class="headerlink" title="Permalink to this term" href="#--reload">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--remain-after-exit"><span class="term"><code class="option">--remain-after-exit</code></span><a class="headerlink" title="Permalink to this term" href="#--remain-after-exit">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--remove"><span class="term"><code class="option">--remove</code></span><a class="headerlink" title="Permalink to this term" href="#--remove">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="--require"><span class="term"><code class="option">--require</code></span><a class="headerlink" title="Permalink to this term" href="#--require">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--resolve-names="><span class="term"><code class="option">--resolve-names=</code></span><a class="headerlink" title="Permalink to this term" href="#--resolve-names=">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--reverse"><span class="term"><code class="option">--reverse</code></span><a class="headerlink" title="Permalink to this term" href="#--reverse">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--root"><span class="term"><code class="option">--root</code></span><a class="headerlink" title="Permalink to this term" href="#--root">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--root-password-file="><span class="term"><code class="option">--root-password-file=</code></span><a class="headerlink" title="Permalink to this term" href="#--root-password-file=">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--root-password="><span class="term"><code class="option">--root-password=</code></span><a class="headerlink" title="Permalink to this term" href="#--root-password=">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--root="><span class="term"><code class="option">--root=</code></span><a class="headerlink" title="Permalink to this term" href="#--root=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--runtime"><span class="term"><code class="option">--runtime</code></span><a class="headerlink" title="Permalink to this term" href="#--runtime">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--sample"><span class="term"><code class="option">--sample</code></span><a class="headerlink" title="Permalink to this term" href="#--sample">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--save-state"><span class="term"><code class="option">--save-state</code></span><a class="headerlink" title="Permalink to this term" href="#--save-state">¶</a></dt><dd><p><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="--scale-x"><span class="term"><code class="option">--scale-x</code></span><a class="headerlink" title="Permalink to this term" href="#--scale-x">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--scale-y"><span class="term"><code class="option">--scale-y</code></span><a class="headerlink" title="Permalink to this term" href="#--scale-y">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="--scope"><span class="term"><code class="option">--scope</code></span><a class="headerlink" title="Permalink to this term" href="#--scope">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--seal"><span class="term"><code class="option">--seal</code></span><a class="headerlink" title="Permalink to this term" href="#--seal">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--selinux-apifs-context="><span class="term"><code class="option">--selinux-apifs-context=</code></span><a class="headerlink" title="Permalink to this term" href="#--selinux-apifs-context=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--selinux-context="><span class="term"><code class="option">--selinux-context=</code></span><a class="headerlink" title="Permalink to this term" href="#--selinux-context=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--send-sighup"><span class="term"><code class="option">--send-sighup</code></span><a class="headerlink" title="Permalink to this term" href="#--send-sighup">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--service-type="><span class="term"><code class="option">--service-type=</code></span><a class="headerlink" title="Permalink to this term" href="#--service-type=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--setenv="><span class="term"><code class="option">--setenv=</code></span><a class="headerlink" title="Permalink to this term" href="#--setenv=">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--setup-keys"><span class="term"><code class="option">--setup-keys</code></span><a class="headerlink" title="Permalink to this term" href="#--setup-keys">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--setup-machine-id"><span class="term"><code class="option">--setup-machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#--setup-machine-id">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--share-system"><span class="term"><code class="option">--share-system</code></span><a class="headerlink" title="Permalink to this term" href="#--share-system">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--show-cursor"><span class="term"><code class="option">--show-cursor</code></span><a class="headerlink" title="Permalink to this term" href="#--show-cursor">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--show-machine"><span class="term"><code class="option">--show-machine</code></span><a class="headerlink" title="Permalink to this term" href="#--show-machine">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--show-status="><span class="term"><code class="option">--show-status=</code></span><a class="headerlink" title="Permalink to this term" href="#--show-status=">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--show-types"><span class="term"><code class="option">--show-types</code></span><a class="headerlink" title="Permalink to this term" href="#--show-types">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--signal="><span class="term"><code class="option">--signal=</code></span><a class="headerlink" title="Permalink to this term" href="#--signal=">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--since="><span class="term"><code class="option">--since=</code></span><a class="headerlink" title="Permalink to this term" href="#--since=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--slice="><span class="term"><code class="option">--slice=</code></span><a class="headerlink" title="Permalink to this term" href="#--slice=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--split-mode"><span class="term"><code class="option">--split-mode</code></span><a class="headerlink" title="Permalink to this term" href="#--split-mode">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="--start-exec-queue"><span class="term"><code class="option">--start-exec-queue</code></span><a class="headerlink" title="Permalink to this term" href="#--start-exec-queue">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--state="><span class="term"><code class="option">--state=</code></span><a class="headerlink" title="Permalink to this term" href="#--state=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="--static"><span class="term"><code class="option">--static</code></span><a class="headerlink" title="Permalink to this term" href="#--static">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="--status="><span class="term"><code class="option">--status=</code></span><a class="headerlink" title="Permalink to this term" href="#--status=">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="--stop-exec-queue"><span class="term"><code class="option">--stop-exec-queue</code></span><a class="headerlink" title="Permalink to this term" href="#--stop-exec-queue">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--subsystem-match="><span class="term"><code class="option">--subsystem-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--subsystem-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--subsystem-nomatch="><span class="term"><code class="option">--subsystem-nomatch=</code></span><a class="headerlink" title="Permalink to this term" href="#--subsystem-nomatch=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--suffix="><span class="term"><code class="option">--suffix=</code></span><a class="headerlink" title="Permalink to this term" href="#--suffix=">¶</a></dt><dd><p><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a>, <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a></p></dd><dt id="--sysname-match="><span class="term"><code class="option">--sysname-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--sysname-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--system"><span class="term"><code class="option">--system</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--tag-match="><span class="term"><code class="option">--tag-match=</code></span><a class="headerlink" title="Permalink to this term" href="#--tag-match=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--template="><span class="term"><code class="option">--template=</code></span><a class="headerlink" title="Permalink to this term" href="#--template=">¶</a></dt><dd><p><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a></p></dd><dt id="--test"><span class="term"><code class="option">--test</code></span><a class="headerlink" title="Permalink to this term" href="#--test">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="--test="><span class="term"><code class="option">--test=</code></span><a class="headerlink" title="Permalink to this term" href="#--test=">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout=">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--timezone="><span class="term"><code class="option">--timezone=</code></span><a class="headerlink" title="Permalink to this term" href="#--timezone=">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="--tmpfs="><span class="term"><code class="option">--tmpfs=</code></span><a class="headerlink" title="Permalink to this term" href="#--tmpfs=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--to-pattern="><span class="term"><code class="option">--to-pattern=</code></span><a class="headerlink" title="Permalink to this term" href="#--to-pattern=">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="--transient"><span class="term"><code class="option">--transient</code></span><a class="headerlink" title="Permalink to this term" href="#--transient">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="--type="><span class="term"><code class="option">--type=</code></span><a class="headerlink" title="Permalink to this term" href="#--type=">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--udev"><span class="term"><code class="option">--udev</code></span><a class="headerlink" title="Permalink to this term" href="#--udev">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--uid="><span class="term"><code class="option">--uid=</code></span><a class="headerlink" title="Permalink to this term" href="#--uid=">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--unescape"><span class="term"><code class="option">--unescape</code></span><a class="headerlink" title="Permalink to this term" href="#--unescape">¶</a></dt><dd><p><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a></p></dd><dt id="--unique"><span class="term"><code class="option">--unique</code></span><a class="headerlink" title="Permalink to this term" href="#--unique">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="--unit="><span class="term"><code class="option">--unit=</code></span><a class="headerlink" title="Permalink to this term" href="#--unit=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--until="><span class="term"><code class="option">--until=</code></span><a class="headerlink" title="Permalink to this term" href="#--until=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--update"><span class="term"><code class="option">--update</code></span><a class="headerlink" title="Permalink to this term" href="#--update">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--update-catalog"><span class="term"><code class="option">--update-catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--update-catalog">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--url="><span class="term"><code class="option">--url=</code></span><a class="headerlink" title="Permalink to this term" href="#--url=">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="--user"><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--user">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="--user-unit="><span class="term"><code class="option">--user-unit=</code></span><a class="headerlink" title="Permalink to this term" href="#--user-unit=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--user="><span class="term"><code class="option">--user=</code></span><a class="headerlink" title="Permalink to this term" href="#--user=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--usr"><span class="term"><code class="option">--usr</code></span><a class="headerlink" title="Permalink to this term" href="#--usr">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--utc"><span class="term"><code class="option">--utc</code></span><a class="headerlink" title="Permalink to this term" href="#--utc">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--uuid="><span class="term"><code class="option">--uuid=</code></span><a class="headerlink" title="Permalink to this term" href="#--uuid=">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--verbose"><span class="term"><code class="option">--verbose</code></span><a class="headerlink" title="Permalink to this term" href="#--verbose">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--verify"><span class="term"><code class="option">--verify</code></span><a class="headerlink" title="Permalink to this term" href="#--verify">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--verify-key="><span class="term"><code class="option">--verify-key=</code></span><a class="headerlink" title="Permalink to this term" href="#--verify-key=">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a>, <a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a>, <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>, <a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="--vm"><span class="term"><code class="option">--vm</code></span><a class="headerlink" title="Permalink to this term" href="#--vm">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a></p></dd><dt id="--volatile"><span class="term"><code class="option">--volatile</code></span><a class="headerlink" title="Permalink to this term" href="#--volatile">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="--wall"><span class="term"><code class="option">--wall</code></span><a class="headerlink" title="Permalink to this term" href="#--wall">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--watch"><span class="term"><code class="option">--watch</code></span><a class="headerlink" title="Permalink to this term" href="#--watch">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="--what="><span class="term"><code class="option">--what=</code></span><a class="headerlink" title="Permalink to this term" href="#--what=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--who="><span class="term"><code class="option">--who=</code></span><a class="headerlink" title="Permalink to this term" href="#--who=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--why="><span class="term"><code class="option">--why=</code></span><a class="headerlink" title="Permalink to this term" href="#--why=">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="--wtmp-only"><span class="term"><code class="option">--wtmp-only</code></span><a class="headerlink" title="Permalink to this term" href="#--wtmp-only">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="-1"><span class="term"><code class="constant">-1</code></span><a class="headerlink" title="Permalink to this term" href="#-1">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a></p></dd><dt id="-A"><span class="term"><code class="option">-A</code></span><a class="headerlink" title="Permalink to this term" href="#-A">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-C"><span class="term"><code class="option">-C</code></span><a class="headerlink" title="Permalink to this term" href="#-C">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-D"><span class="term"><code class="option">-D</code></span><a class="headerlink" title="Permalink to this term" href="#-D">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-E"><span class="term"><code class="option">-E</code></span><a class="headerlink" title="Permalink to this term" href="#-E">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-F"><span class="term"><code class="option">-F</code></span><a class="headerlink" title="Permalink to this term" href="#-F">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-H"><span class="term"><code class="option">-H</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="-L"><span class="term"><code class="option">-L</code></span><a class="headerlink" title="Permalink to this term" href="#-L">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-M"><span class="term"><code class="option">-M</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="-N"><span class="term"><code class="option">-N</code></span><a class="headerlink" title="Permalink to this term" href="#-N">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-P"><span class="term"><code class="option">-P</code></span><a class="headerlink" title="Permalink to this term" href="#-P">¶</a></dt><dd><p><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-R"><span class="term"><code class="option">-R</code></span><a class="headerlink" title="Permalink to this term" href="#-R">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-S"><span class="term"><code class="option">-S</code></span><a class="headerlink" title="Permalink to this term" href="#-S">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-Z"><span class="term"><code class="option">-Z</code></span><a class="headerlink" title="Permalink to this term" href="#-Z">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-a"><span class="term"><code class="option">-a</code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-b"><span class="term"><code class="option">-b</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-c"><span class="term"><code class="option">-c</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-d"><span class="term"><code class="option">-d</code></span><a class="headerlink" title="Permalink to this term" href="#-d">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-e"><span class="term"><code class="option">-e</code></span><a class="headerlink" title="Permalink to this term" href="#-e">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-f"><span class="term"><code class="option">-f</code></span><a class="headerlink" title="Permalink to this term" href="#-f">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-g"><span class="term"><code class="option">-g</code></span><a class="headerlink" title="Permalink to this term" href="#-g">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-h"><span class="term"><code class="option">-h</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a>, <a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a>, <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a>, <a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a>, <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>, <a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a>, <a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a>, <a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>, <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>, <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-i"><span class="term"><code class="option">-i</code></span><a class="headerlink" title="Permalink to this term" href="#-i">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-j"><span class="term"><code class="option">-j</code></span><a class="headerlink" title="Permalink to this term" href="#-j">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="-k"><span class="term"><code class="option">-k</code></span><a class="headerlink" title="Permalink to this term" href="#-k">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-l"><span class="term"><code class="option">-l</code></span><a class="headerlink" title="Permalink to this term" href="#-l">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-m"><span class="term"><code class="option">-m</code></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-n"><span class="term"><code class="option">-n</code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-o"><span class="term"><code class="option">-o</code></span><a class="headerlink" title="Permalink to this term" href="#-o">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="-p"><span class="term"><code class="option">-p</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a>, <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a>, <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-q"><span class="term"><code class="option">-q</code></span><a class="headerlink" title="Permalink to this term" href="#-q">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-r"><span class="term"><code class="option">-r</code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-s"><span class="term"><code class="option">-s</code></span><a class="headerlink" title="Permalink to this term" href="#-s">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-t"><span class="term"><code class="option">-t</code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a>, <a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-u"><span class="term"><code class="option">-u</code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-v"><span class="term"><code class="option">-v</code></span><a class="headerlink" title="Permalink to this term" href="#-v">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-w"><span class="term"><code class="option">-w</code></span><a class="headerlink" title="Permalink to this term" href="#-w">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="-x"><span class="term"><code class="option">-x</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="-y"><span class="term"><code class="option">-y</code></span><a class="headerlink" title="Permalink to this term" href="#-y">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="auto"><span class="term"><code class="constant">auto</code></span><a class="headerlink" title="Permalink to this term" href="#auto">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="cat"><span class="term"><code class="option">cat</code></span><a class="headerlink" title="Permalink to this term" href="#cat">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="closed"><span class="term"><code class="option">closed</code></span><a class="headerlink" title="Permalink to this term" href="#closed">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="driver"><span class="term"><code class="option">driver</code></span><a class="headerlink" title="Permalink to this term" href="#driver">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="export"><span class="term"><code class="option">export</code></span><a class="headerlink" title="Permalink to this term" href="#export">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="hibernate"><span class="term"><code class="option">hibernate</code></span><a class="headerlink" title="Permalink to this term" href="#hibernate">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="hybrid-sleep"><span class="term"><code class="option">hybrid-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#hybrid-sleep">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="journal"><span class="term"><code class="option">journal</code></span><a class="headerlink" title="Permalink to this term" href="#journal">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="json"><span class="term"><code class="option">json</code></span><a class="headerlink" title="Permalink to this term" href="#json">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="json-pretty"><span class="term"><code class="option">json-pretty</code></span><a class="headerlink" title="Permalink to this term" href="#json-pretty">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="json-sse"><span class="term"><code class="option">json-sse</code></span><a class="headerlink" title="Permalink to this term" href="#json-sse">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="kernel"><span class="term"><code class="option">kernel</code></span><a class="headerlink" title="Permalink to this term" href="#kernel">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="short"><span class="term"><code class="option">short</code></span><a class="headerlink" title="Permalink to this term" href="#short">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="short-iso"><span class="term"><code class="option">short-iso</code></span><a class="headerlink" title="Permalink to this term" href="#short-iso">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="short-monotonic"><span class="term"><code class="option">short-monotonic</code></span><a class="headerlink" title="Permalink to this term" href="#short-monotonic">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="short-precise"><span class="term"><code class="option">short-precise</code></span><a class="headerlink" title="Permalink to this term" href="#short-precise">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="stdout"><span class="term"><code class="option">stdout</code></span><a class="headerlink" title="Permalink to this term" href="#stdout">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="strict"><span class="term"><code class="option">strict</code></span><a class="headerlink" title="Permalink to this term" href="#strict">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="suspend"><span class="term"><code class="option">suspend</code></span><a class="headerlink" title="Permalink to this term" href="#suspend">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="syslog"><span class="term"><code class="option">syslog</code></span><a class="headerlink" title="Permalink to this term" href="#syslog">¶</a></dt><dd><p><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="verbose"><span class="term"><code class="option">verbose</code></span><a class="headerlink" title="Permalink to this term" href="#verbose">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214188041392"></a><h2 id="Constants">Constants<a class="headerlink" title="Permalink to this headline" href="#Constants">¶</a></h2><p>Various constant used and/or defined by systemd.</p><div class="variablelist"><a name="constants"></a><dl class="variablelist"><dt id="-0"><span class="term"><code class="constant">-0</code></span><a class="headerlink" title="Permalink to this term" href="#-0">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="-1"><span class="term"><code class="constant">-1</code></span><a class="headerlink" title="Permalink to this term" href="#-1">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>, <a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="-EADDRINUSE"><span class="term"><code class="constant">-EADDRINUSE</code></span><a class="headerlink" title="Permalink to this term" href="#-EADDRINUSE">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-EALREADY"><span class="term"><code class="constant">-EALREADY</code></span><a class="headerlink" title="Permalink to this term" href="#-EALREADY">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-EBUSY"><span class="term"><code class="constant">-EBUSY</code></span><a class="headerlink" title="Permalink to this term" href="#-EBUSY">¶</a></dt><dd><p><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a></p></dd><dt id="-ECHILD"><span class="term"><code class="constant">-ECHILD</code></span><a class="headerlink" title="Permalink to this term" href="#-ECHILD">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a>, <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_event_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_event_get_fd</span>(3)</span></a>, <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="-EEXIST"><span class="term"><code class="constant">-EEXIST</code></span><a class="headerlink" title="Permalink to this term" href="#-EEXIST">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-EINVAL"><span class="term"><code class="constant">-EINVAL</code></span><a class="headerlink" title="Permalink to this term" href="#-EINVAL">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a>, <a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a>, <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_event_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_event_get_fd</span>(3)</span></a>, <a href="sd_event_set_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_set_name</span>(3)</span></a></p></dd><dt id="-EMFILE"><span class="term"><code class="constant">-EMFILE</code></span><a class="headerlink" title="Permalink to this term" href="#-EMFILE">¶</a></dt><dd><p><a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a></p></dd><dt id="-ENODATA"><span class="term"><code class="constant">-ENODATA</code></span><a class="headerlink" title="Permalink to this term" href="#-ENODATA">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a>, <a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a>, <a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a></p></dd><dt id="-ENOENT"><span class="term"><code class="constant">-ENOENT</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOENT">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a></p></dd><dt id="-ENOMEM"><span class="term"><code class="constant">-ENOMEM</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOMEM">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>, <a href="sd_event_set_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_set_name</span>(3)</span></a></p></dd><dt id="-ENOTCONN"><span class="term"><code class="constant">-ENOTCONN</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTCONN">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-ENOTSUP"><span class="term"><code class="constant">-ENOTSUP</code></span><a class="headerlink" title="Permalink to this term" href="#-ENOTSUP">¶</a></dt><dd><p><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="-ENXIO"><span class="term"><code class="constant">-ENXIO</code></span><a class="headerlink" title="Permalink to this term" href="#-ENXIO">¶</a></dt><dd><p><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a></p></dd><dt id="-EPERM"><span class="term"><code class="constant">-EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#-EPERM">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a></p></dd><dt id="-ESRCH"><span class="term"><code class="constant">-ESRCH</code></span><a class="headerlink" title="Permalink to this term" href="#-ESRCH">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="-ESTALE"><span class="term"><code class="constant">-ESTALE</code></span><a class="headerlink" title="Permalink to this term" href="#-ESTALE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="0"><span class="term"><code class="constant">0</code></span><a class="headerlink" title="Permalink to this term" href="#0">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="1"><span class="term"><code class="constant">1</code></span><a class="headerlink" title="Permalink to this term" href="#1">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="2"><span class="term"><code class="constant">2</code></span><a class="headerlink" title="Permalink to this term" href="#2">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="AF_INET"><span class="term"><code class="constant">AF_INET</code></span><a class="headerlink" title="Permalink to this term" href="#AF_INET">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="AF_INET6"><span class="term"><code class="constant">AF_INET6</code></span><a class="headerlink" title="Permalink to this term" href="#AF_INET6">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="AF_NETLINK"><span class="term"><code class="constant">AF_NETLINK</code></span><a class="headerlink" title="Permalink to this term" href="#AF_NETLINK">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="AF_UNIX"><span class="term"><code class="constant">AF_UNIX</code></span><a class="headerlink" title="Permalink to this term" href="#AF_UNIX">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="AF_UNSPEC"><span class="term"><code class="constant">AF_UNSPEC</code></span><a class="headerlink" title="Permalink to this term" href="#AF_UNSPEC">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a></p></dd><dt id="CAP_DAC_OVERRIDE"><span class="term"><code class="constant">CAP_DAC_OVERRIDE</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_DAC_OVERRIDE">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CAP_MKNOD"><span class="term"><code class="constant">CAP_MKNOD</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_MKNOD">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CAP_SYS_ADMIN"><span class="term"><code class="constant">CAP_SYS_ADMIN</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_SYS_ADMIN">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CAP_SYS_PTRACE"><span class="term"><code class="constant">CAP_SYS_PTRACE</code></span><a class="headerlink" title="Permalink to this term" href="#CAP_SYS_PTRACE">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="CLOCK_BOOTTIME_ALARM"><span class="term"><code class="constant">CLOCK_BOOTTIME_ALARM</code></span><a class="headerlink" title="Permalink to this term" href="#CLOCK_BOOTTIME_ALARM">¶</a></dt><dd><p><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="CLOCK_MONOTONIC"><span class="term"><code class="constant">CLOCK_MONOTONIC</code></span><a class="headerlink" title="Permalink to this term" href="#CLOCK_MONOTONIC">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="CLOCK_REALTIME"><span class="term"><code class="constant">CLOCK_REALTIME</code></span><a class="headerlink" title="Permalink to this term" href="#CLOCK_REALTIME">¶</a></dt><dd><p><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a></p></dd><dt id="EACCES"><span class="term"><code class="constant">EACCES</code></span><a class="headerlink" title="Permalink to this term" href="#EACCES">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="EPERM"><span class="term"><code class="constant">EPERM</code></span><a class="headerlink" title="Permalink to this term" href="#EPERM">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="EUCLEAN"><span class="term"><code class="constant">EUCLEAN</code></span><a class="headerlink" title="Permalink to this term" href="#EUCLEAN">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="IP_FREEBIND"><span class="term"><code class="constant">IP_FREEBIND</code></span><a class="headerlink" title="Permalink to this term" href="#IP_FREEBIND">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="LOG_ALERT"><span class="term"><code class="constant">LOG_ALERT</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_ALERT">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_CRIT"><span class="term"><code class="constant">LOG_CRIT</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_CRIT">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_DEBUG"><span class="term"><code class="constant">LOG_DEBUG</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_DEBUG">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_EMERG"><span class="term"><code class="constant">LOG_EMERG</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_EMERG">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_ERR"><span class="term"><code class="constant">LOG_ERR</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_ERR">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_INFO"><span class="term"><code class="constant">LOG_INFO</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_INFO">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_NOTICE"><span class="term"><code class="constant">LOG_NOTICE</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_NOTICE">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="LOG_WARNING"><span class="term"><code class="constant">LOG_WARNING</code></span><a class="headerlink" title="Permalink to this term" href="#LOG_WARNING">¶</a></dt><dd><p><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="NUL"><span class="term"><code class="constant">NUL</code></span><a class="headerlink" title="Permalink to this term" href="#NUL">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a>, <a href="sd_event_set_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_set_name</span>(3)</span></a>, <a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="NULL"><span class="term"><code class="constant">NULL</code></span><a class="headerlink" title="Permalink to this term" href="#NULL">¶</a></dt><dd><p><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>, <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>, <a href="sd_event_set_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_set_name</span>(3)</span></a>, <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>, <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a>, <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>, <a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a></p></dd><dt id="O_NONBLOCK"><span class="term"><code class="constant">O_NONBLOCK</code></span><a class="headerlink" title="Permalink to this term" href="#O_NONBLOCK">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="POLLIN"><span class="term"><code class="constant">POLLIN</code></span><a class="headerlink" title="Permalink to this term" href="#POLLIN">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a></p></dd><dt id="POLLOUT"><span class="term"><code class="constant">POLLOUT</code></span><a class="headerlink" title="Permalink to this term" href="#POLLOUT">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a></p></dd><dt id="RLIMIT_NOFILE"><span class="term"><code class="constant">RLIMIT_NOFILE</code></span><a class="headerlink" title="Permalink to this term" href="#RLIMIT_NOFILE">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="SD_BUS_CREDS_AUDIT_LOGIN_UID"><span class="term"><code class="constant">SD_BUS_CREDS_AUDIT_LOGIN_UID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_AUDIT_LOGIN_UID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_AUDIT_SESSION_ID"><span class="term"><code class="constant">SD_BUS_CREDS_AUDIT_SESSION_ID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_AUDIT_SESSION_ID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_BOUNDING_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_BOUNDING_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_BOUNDING_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_CGROUP"><span class="term"><code class="constant">SD_BUS_CREDS_CGROUP</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_CGROUP">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_CMDLINE"><span class="term"><code class="constant">SD_BUS_CREDS_CMDLINE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_CMDLINE">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_COMM"><span class="term"><code class="constant">SD_BUS_CREDS_COMM</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_COMM">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_EFFECTIVE_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_EFFECTIVE_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_EFFECTIVE_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_EXE"><span class="term"><code class="constant">SD_BUS_CREDS_EXE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_EXE">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_GID"><span class="term"><code class="constant">SD_BUS_CREDS_GID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_GID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_INHERITABLE_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_INHERITABLE_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_INHERITABLE_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_OWNER_UID"><span class="term"><code class="constant">SD_BUS_CREDS_OWNER_UID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_OWNER_UID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_PERMITTED_CAPS"><span class="term"><code class="constant">SD_BUS_CREDS_PERMITTED_CAPS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_PERMITTED_CAPS">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_PID"><span class="term"><code class="constant">SD_BUS_CREDS_PID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_PID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_PID_STARTTIME"><span class="term"><code class="constant">SD_BUS_CREDS_PID_STARTTIME</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_PID_STARTTIME">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_SELINUX_CONTEXT"><span class="term"><code class="constant">SD_BUS_CREDS_SELINUX_CONTEXT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_SELINUX_CONTEXT">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_SESSION"><span class="term"><code class="constant">SD_BUS_CREDS_SESSION</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_SESSION">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_SLICE"><span class="term"><code class="constant">SD_BUS_CREDS_SLICE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_SLICE">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_TID"><span class="term"><code class="constant">SD_BUS_CREDS_TID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_TID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_TID_COMM"><span class="term"><code class="constant">SD_BUS_CREDS_TID_COMM</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_TID_COMM">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_UID"><span class="term"><code class="constant">SD_BUS_CREDS_UID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_UID">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_UNIQUE_NAME"><span class="term"><code class="constant">SD_BUS_CREDS_UNIQUE_NAME</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_UNIQUE_NAME">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_UNIT"><span class="term"><code class="constant">SD_BUS_CREDS_UNIT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_UNIT">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_USER_UNIT"><span class="term"><code class="constant">SD_BUS_CREDS_USER_UNIT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_USER_UNIT">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_CREDS_WELL_KNOWN_NAMES"><span class="term"><code class="constant">SD_BUS_CREDS_WELL_KNOWN_NAMES</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_CREDS_WELL_KNOWN_NAMES">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_ACCESS_DENIED"><span class="term"><code class="constant">SD_BUS_ERROR_ACCESS_DENIED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_ACCESS_DENIED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_ADDRESS_IN_USE"><span class="term"><code class="constant">SD_BUS_ERROR_ADDRESS_IN_USE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_ADDRESS_IN_USE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_AUTH_FAILED"><span class="term"><code class="constant">SD_BUS_ERROR_AUTH_FAILED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_AUTH_FAILED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_BAD_ADDRESS"><span class="term"><code class="constant">SD_BUS_ERROR_BAD_ADDRESS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_BAD_ADDRESS">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_DISCONNECTED"><span class="term"><code class="constant">SD_BUS_ERROR_DISCONNECTED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_DISCONNECTED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_FAILED"><span class="term"><code class="constant">SD_BUS_ERROR_FAILED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_FAILED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_FILE_EXISTS"><span class="term"><code class="constant">SD_BUS_ERROR_FILE_EXISTS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_FILE_EXISTS">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_FILE_NOT_FOUND"><span class="term"><code class="constant">SD_BUS_ERROR_FILE_NOT_FOUND</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_FILE_NOT_FOUND">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_INCONSISTENT_MESSAGE"><span class="term"><code class="constant">SD_BUS_ERROR_INCONSISTENT_MESSAGE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_INCONSISTENT_MESSAGE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_INVALID_ARGS"><span class="term"><code class="constant">SD_BUS_ERROR_INVALID_ARGS</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_INVALID_ARGS">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_INVALID_SIGNATURE"><span class="term"><code class="constant">SD_BUS_ERROR_INVALID_SIGNATURE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_INVALID_SIGNATURE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_IO_ERROR"><span class="term"><code class="constant">SD_BUS_ERROR_IO_ERROR</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_IO_ERROR">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_LIMITS_EXCEEDED"><span class="term"><code class="constant">SD_BUS_ERROR_LIMITS_EXCEEDED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_LIMITS_EXCEEDED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_MAKE_CONST(name, message)"><span class="term"><code class="constant">SD_BUS_ERROR_MAKE_CONST(<em class="replaceable"><code>name</code></em>, <em class="replaceable"><code>message</code></em>)</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_MAKE_CONST(name,%20message)">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_MATCH_RULE_INVALID"><span class="term"><code class="constant">SD_BUS_ERROR_MATCH_RULE_INVALID</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_MATCH_RULE_INVALID">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_MATCH_RULE_NOT_FOUND"><span class="term"><code class="constant">SD_BUS_ERROR_MATCH_RULE_NOT_FOUND</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_MATCH_RULE_NOT_FOUND">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NAME_HAS_NO_OWNER"><span class="term"><code class="constant">SD_BUS_ERROR_NAME_HAS_NO_OWNER</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NAME_HAS_NO_OWNER">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NOT_SUPPORTED"><span class="term"><code class="constant">SD_BUS_ERROR_NOT_SUPPORTED</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NOT_SUPPORTED">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_MEMORY"><span class="term"><code class="constant">SD_BUS_ERROR_NO_MEMORY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_MEMORY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_NETWORK"><span class="term"><code class="constant">SD_BUS_ERROR_NO_NETWORK</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_NETWORK">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_REPLY"><span class="term"><code class="constant">SD_BUS_ERROR_NO_REPLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_REPLY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NO_SERVER"><span class="term"><code class="constant">SD_BUS_ERROR_NO_SERVER</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NO_SERVER">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_NULL"><span class="term"><code class="constant">SD_BUS_ERROR_NULL</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_NULL">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_PROPERTY_READ_ONLY"><span class="term"><code class="constant">SD_BUS_ERROR_PROPERTY_READ_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_PROPERTY_READ_ONLY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_SERVICE_UNKNOWN"><span class="term"><code class="constant">SD_BUS_ERROR_SERVICE_UNKNOWN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_SERVICE_UNKNOWN">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_TIMEOUT"><span class="term"><code class="constant">SD_BUS_ERROR_TIMEOUT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_TIMEOUT">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN"><span class="term"><code class="constant">SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_INTERFACE"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_INTERFACE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_INTERFACE">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_METHOD"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_METHOD</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_METHOD">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_OBJECT"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_OBJECT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_OBJECT">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_ERROR_UNKNOWN_PROPERTY"><span class="term"><code class="constant">SD_BUS_ERROR_UNKNOWN_PROPERTY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_ERROR_UNKNOWN_PROPERTY">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_ARRAY"><span class="term"><code class="constant">SD_BUS_TYPE_ARRAY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_ARRAY">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_BOOLEAN"><span class="term"><code class="constant">SD_BUS_TYPE_BOOLEAN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_BOOLEAN">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_BYTE"><span class="term"><code class="constant">SD_BUS_TYPE_BYTE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_BYTE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_DICT_ENTRY_BEGIN"><span class="term"><code class="constant">SD_BUS_TYPE_DICT_ENTRY_BEGIN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_DICT_ENTRY_BEGIN">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_DICT_ENTRY_END"><span class="term"><code class="constant">SD_BUS_TYPE_DICT_ENTRY_END</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_DICT_ENTRY_END">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_DOUBLE"><span class="term"><code class="constant">SD_BUS_TYPE_DOUBLE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_DOUBLE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_INT16"><span class="term"><code class="constant">SD_BUS_TYPE_INT16</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_INT16">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_INT32"><span class="term"><code class="constant">SD_BUS_TYPE_INT32</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_INT32">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_INT64"><span class="term"><code class="constant">SD_BUS_TYPE_INT64</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_INT64">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_OBJECT_PATH"><span class="term"><code class="constant">SD_BUS_TYPE_OBJECT_PATH</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_OBJECT_PATH">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_SIGNATURE"><span class="term"><code class="constant">SD_BUS_TYPE_SIGNATURE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_SIGNATURE">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_STRING"><span class="term"><code class="constant">SD_BUS_TYPE_STRING</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_STRING">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_STRUCT_BEGIN"><span class="term"><code class="constant">SD_BUS_TYPE_STRUCT_BEGIN</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_STRUCT_BEGIN">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_STRUCT_END"><span class="term"><code class="constant">SD_BUS_TYPE_STRUCT_END</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_STRUCT_END">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UINT16"><span class="term"><code class="constant">SD_BUS_TYPE_UINT16</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UINT16">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UINT32"><span class="term"><code class="constant">SD_BUS_TYPE_UINT32</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UINT32">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UINT64"><span class="term"><code class="constant">SD_BUS_TYPE_UINT64</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UINT64">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_UNIX_FD"><span class="term"><code class="constant">SD_BUS_TYPE_UNIX_FD</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_UNIX_FD">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a></p></dd><dt id="SD_BUS_TYPE_VARIANT"><span class="term"><code class="constant">SD_BUS_TYPE_VARIANT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_TYPE_VARIANT">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="SD_EVENT_ON"><span class="term"><code class="constant">SD_EVENT_ON</code></span><a class="headerlink" title="Permalink to this term" href="#SD_EVENT_ON">¶</a></dt><dd><p><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="SD_EVENT_ONESHOT"><span class="term"><code class="constant">SD_EVENT_ONESHOT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_EVENT_ONESHOT">¶</a></dt><dd><p><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_APPEND"><span class="term"><code class="constant">SD_JOURNAL_APPEND</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_APPEND">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_CURRENT_USER"><span class="term"><code class="constant">SD_JOURNAL_CURRENT_USER</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_CURRENT_USER">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_INVALIDATE"><span class="term"><code class="constant">SD_JOURNAL_INVALIDATE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_INVALIDATE">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_LOCAL_ONLY"><span class="term"><code class="constant">SD_JOURNAL_LOCAL_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_LOCAL_ONLY">¶</a></dt><dd><p><a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a>, <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_NOP"><span class="term"><code class="constant">SD_JOURNAL_NOP</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_NOP">¶</a></dt><dd><p><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_RUNTIME_ONLY"><span class="term"><code class="constant">SD_JOURNAL_RUNTIME_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_RUNTIME_ONLY">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_SYSTEM"><span class="term"><code class="constant">SD_JOURNAL_SYSTEM</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_SYSTEM">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_JOURNAL_SYSTEM_ONLY"><span class="term"><code class="constant">SD_JOURNAL_SYSTEM_ONLY</code></span><a class="headerlink" title="Permalink to this term" href="#SD_JOURNAL_SYSTEM_ONLY">¶</a></dt><dd><p><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a></p></dd><dt id="SD_WARNING"><span class="term"><code class="constant">SD_WARNING</code></span><a class="headerlink" title="Permalink to this term" href="#SD_WARNING">¶</a></dt><dd><p><a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a></p></dd><dt id="SIGABRT"><span class="term"><code class="constant">SIGABRT</code></span><a class="headerlink" title="Permalink to this term" href="#SIGABRT">¶</a></dt><dd><p><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SIGHUP"><span class="term"><code class="constant">SIGHUP</code></span><a class="headerlink" title="Permalink to this term" href="#SIGHUP">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SIGINT"><span class="term"><code class="constant">SIGINT</code></span><a class="headerlink" title="Permalink to this term" href="#SIGINT">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="SIGKILL"><span class="term"><code class="constant">SIGKILL</code></span><a class="headerlink" title="Permalink to this term" href="#SIGKILL">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="SIGPIPE"><span class="term"><code class="constant">SIGPIPE</code></span><a class="headerlink" title="Permalink to this term" href="#SIGPIPE">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a></p></dd><dt id="SIGPWR"><span class="term"><code class="constant">SIGPWR</code></span><a class="headerlink" title="Permalink to this term" href="#SIGPWR">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+0"><span class="term"><code class="constant">SIGRTMIN+0</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+0">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+1"><span class="term"><code class="constant">SIGRTMIN+1</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+1">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+13"><span class="term"><code class="constant">SIGRTMIN+13</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+13">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+14"><span class="term"><code class="constant">SIGRTMIN+14</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+14">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+15"><span class="term"><code class="constant">SIGRTMIN+15</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+15">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+16"><span class="term"><code class="constant">SIGRTMIN+16</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+16">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+2"><span class="term"><code class="constant">SIGRTMIN+2</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+2">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+20"><span class="term"><code class="constant">SIGRTMIN+20</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+20">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+21"><span class="term"><code class="constant">SIGRTMIN+21</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+21">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+22"><span class="term"><code class="constant">SIGRTMIN+22</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+22">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+23"><span class="term"><code class="constant">SIGRTMIN+23</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+23">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+24"><span class="term"><code class="constant">SIGRTMIN+24</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+24">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+26"><span class="term"><code class="constant">SIGRTMIN+26</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+26">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+27"><span class="term"><code class="constant">SIGRTMIN+27</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+27">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+28"><span class="term"><code class="constant">SIGRTMIN+28</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+28">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+3"><span class="term"><code class="constant">SIGRTMIN+3</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+3">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+4"><span class="term"><code class="constant">SIGRTMIN+4</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+4">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+5"><span class="term"><code class="constant">SIGRTMIN+5</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+5">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGRTMIN+6"><span class="term"><code class="constant">SIGRTMIN+6</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+6">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGSTOP"><span class="term"><code class="constant">SIGSTOP</code></span><a class="headerlink" title="Permalink to this term" href="#SIGSTOP">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="SIGSYS"><span class="term"><code class="constant">SIGSYS</code></span><a class="headerlink" title="Permalink to this term" href="#SIGSYS">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="SIGTERM"><span class="term"><code class="constant">SIGTERM</code></span><a class="headerlink" title="Permalink to this term" href="#SIGTERM">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="SIGUSR1"><span class="term"><code class="constant">SIGUSR1</code></span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGUSR2"><span class="term"><code class="constant">SIGUSR2</code></span><a class="headerlink" title="Permalink to this term" href="#SIGUSR2">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIGWINCH"><span class="term"><code class="constant">SIGWINCH</code></span><a class="headerlink" title="Permalink to this term" href="#SIGWINCH">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="SIG_DFL"><span class="term"><code class="constant">SIG_DFL</code></span><a class="headerlink" title="Permalink to this term" href="#SIG_DFL">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="SOCK_DGRAM"><span class="term"><code class="constant">SOCK_DGRAM</code></span><a class="headerlink" title="Permalink to this term" href="#SOCK_DGRAM">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SOCK_SEQPACKET"><span class="term"><code class="constant">SOCK_SEQPACKET</code></span><a class="headerlink" title="Permalink to this term" href="#SOCK_SEQPACKET">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="SOCK_STREAM"><span class="term"><code class="constant">SOCK_STREAM</code></span><a class="headerlink" title="Permalink to this term" href="#SOCK_STREAM">¶</a></dt><dd><p><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="TCP_DEFER_ACCEPT"><span class="term"><code class="constant">TCP_DEFER_ACCEPT</code></span><a class="headerlink" title="Permalink to this term" href="#TCP_DEFER_ACCEPT">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="WCONTINUED"><span class="term"><code class="constant">WCONTINUED</code></span><a class="headerlink" title="Permalink to this term" href="#WCONTINUED">¶</a></dt><dd><p><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a></p></dd><dt id="WEXITED"><span class="term"><code class="constant">WEXITED</code></span><a class="headerlink" title="Permalink to this term" href="#WEXITED">¶</a></dt><dd><p><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a></p></dd><dt id="WSTOPPED"><span class="term"><code class="constant">WSTOPPED</code></span><a class="headerlink" title="Permalink to this term" href="#WSTOPPED">¶</a></dt><dd><p><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a></p></dd><dt id="_NSIG"><span class="term"><code class="constant">_NSIG</code></span><a class="headerlink" title="Permalink to this term" href="#_NSIG">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="_SD_BUS_CREDS_ALL"><span class="term"><code class="constant">_SD_BUS_CREDS_ALL</code></span><a class="headerlink" title="Permalink to this term" href="#_SD_BUS_CREDS_ALL">¶</a></dt><dd><p><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a></p></dd><dt id="all"><span class="term"><code class="constant">all</code></span><a class="headerlink" title="Permalink to this term" href="#all">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="application/event-stream"><span class="term"><code class="constant">application/event-stream</code></span><a class="headerlink" title="Permalink to this term" href="#application/event-stream">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="application/json"><span class="term"><code class="constant">application/json</code></span><a class="headerlink" title="Permalink to this term" href="#application/json">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="application/vnd.fdo.journal"><span class="term"><code class="constant">application/vnd.fdo.journal</code></span><a class="headerlink" title="Permalink to this term" href="#application/vnd.fdo.journal">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="arm"><span class="term"><code class="constant">arm</code></span><a class="headerlink" title="Permalink to this term" href="#arm">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="auto"><span class="term"><code class="constant">auto</code></span><a class="headerlink" title="Permalink to this term" href="#auto">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="early"><span class="term"><code class="constant">early</code></span><a class="headerlink" title="Permalink to this term" href="#early">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="false"><span class="term"><code class="constant">false</code></span><a class="headerlink" title="Permalink to this term" href="#false">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="host"><span class="term"><code class="constant">host</code></span><a class="headerlink" title="Permalink to this term" href="#host">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="https"><span class="term"><code class="constant">https</code></span><a class="headerlink" title="Permalink to this term" href="#https">¶</a></dt><dd><p><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="late"><span class="term"><code class="constant">late</code></span><a class="headerlink" title="Permalink to this term" href="#late">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="libsystemd"><span class="term"><code class="constant">libsystemd</code></span><a class="headerlink" title="Permalink to this term" href="#libsystemd">¶</a></dt><dd><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>, <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>, <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>, <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a>, <a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a>, <a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a>, <a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a>, <a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a>, <a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a>, <a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a>, <a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a>, <a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a>, <a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a>, <a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a>, <a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a>, <a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a>, <a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a>, <a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a>, <a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a>, <a href="sd_event_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_event_get_fd</span>(3)</span></a>, <a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a>, <a href="sd_event_set_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_set_name</span>(3)</span></a>, <a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a>, <a href="sd_journal_get_catalog.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog</span>(3)</span></a>, <a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>, <a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>, <a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a>, <a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>, <a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a>, <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>, <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>, <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>, <a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a>, <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>, <a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>, <a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>, <a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a>, <a href="sd_machine_get_class.html"><span class="citerefentry"><span class="refentrytitle">sd_machine_get_class</span>(3)</span></a>, <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>, <a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a>, <a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a>, <a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a>, <a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a>, <a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a></p></dd><dt id="libsystemd-bus"><span class="term"><code class="constant">libsystemd-bus</code></span><a class="headerlink" title="Permalink to this term" href="#libsystemd-bus">¶</a></dt><dd><p><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a></p></dd><dt id="m"><span class="term"><code class="constant">m</code></span><a class="headerlink" title="Permalink to this term" href="#m">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="name"><span class="term"><code class="constant">name</code></span><a class="headerlink" title="Permalink to this term" href="#name">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="native"><span class="term"><code class="constant">native</code></span><a class="headerlink" title="Permalink to this term" href="#native">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="never"><span class="term"><code class="constant">never</code></span><a class="headerlink" title="Permalink to this term" href="#never">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="none"><span class="term"><code class="constant">none</code></span><a class="headerlink" title="Permalink to this term" href="#none">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="path"><span class="term"><code class="constant">path</code></span><a class="headerlink" title="Permalink to this term" href="#path">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="property"><span class="term"><code class="constant">property</code></span><a class="headerlink" title="Permalink to this term" href="#property">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="r"><span class="term"><code class="constant">r</code></span><a class="headerlink" title="Permalink to this term" href="#r">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="simple"><span class="term"><code class="constant">simple</code></span><a class="headerlink" title="Permalink to this term" href="#simple">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="symlink"><span class="term"><code class="constant">symlink</code></span><a class="headerlink" title="Permalink to this term" href="#symlink">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="text/plain"><span class="term"><code class="constant">text/plain</code></span><a class="headerlink" title="Permalink to this term" href="#text/plain">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="true"><span class="term"><code class="constant">true</code></span><a class="headerlink" title="Permalink to this term" href="#true">¶</a></dt><dd><p><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a></p></dd><dt id="w"><span class="term"><code class="constant">w</code></span><a class="headerlink" title="Permalink to this term" href="#w">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="x32"><span class="term"><code class="constant">x32</code></span><a class="headerlink" title="Permalink to this term" href="#x32">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="x86"><span class="term"><code class="constant">x86</code></span><a class="headerlink" title="Permalink to this term" href="#x86">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="x86-64"><span class="term"><code class="constant">x86-64</code></span><a class="headerlink" title="Permalink to this term" href="#x86-64">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="~"><span class="term"><code class="constant">~</code></span><a class="headerlink" title="Permalink to this term" href="#~">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214187509568"></a><h2 id="Miscellaneous options and directives">Miscellaneous options and directives<a class="headerlink" title="Permalink to this headline" href="#Miscellaneous%20options%20and%20directives">¶</a></h2><p>Other configuration elements which don't fit in
+                any of the above groups.</p><div class="variablelist"><a name="miscellaneous"></a><dl class="variablelist"><dt id="$LISTEN_FDS"><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_FDS">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="ANSI_COLOR="><span class="term"><code class="varname">ANSI_COLOR=</code></span><a class="headerlink" title="Permalink to this term" href="#ANSI_COLOR=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="BUG_REPORT_URL="><span class="term"><code class="varname">BUG_REPORT_URL=</code></span><a class="headerlink" title="Permalink to this term" href="#BUG_REPORT_URL=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="BUILD_ID="><span class="term"><code class="varname">BUILD_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#BUILD_ID=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="C"><span class="term"><code class="varname">C</code></span><a class="headerlink" title="Permalink to this term" href="#C">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="CHASSIS="><span class="term"><code class="varname">CHASSIS=</code></span><a class="headerlink" title="Permalink to this term" href="#CHASSIS=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="CPE_NAME="><span class="term"><code class="varname">CPE_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#CPE_NAME=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="Compress="><span class="term"><code class="varname">Compress=</code></span><a class="headerlink" title="Permalink to this term" href="#Compress=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>, <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="D"><span class="term"><code class="varname">D</code></span><a class="headerlink" title="Permalink to this term" href="#D">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="DEPLOYMENT="><span class="term"><code class="varname">DEPLOYMENT=</code></span><a class="headerlink" title="Permalink to this term" href="#DEPLOYMENT=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="ExternalSizeMax="><span class="term"><code class="varname">ExternalSizeMax=</code></span><a class="headerlink" title="Permalink to this term" href="#ExternalSizeMax=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="F"><span class="term"><code class="varname">F</code></span><a class="headerlink" title="Permalink to this term" href="#F">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="FONT="><span class="term"><code class="varname">FONT=</code></span><a class="headerlink" title="Permalink to this term" href="#FONT=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="FONT_MAP="><span class="term"><code class="varname">FONT_MAP=</code></span><a class="headerlink" title="Permalink to this term" href="#FONT_MAP=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="FONT_UNIMAP="><span class="term"><code class="varname">FONT_UNIMAP=</code></span><a class="headerlink" title="Permalink to this term" href="#FONT_UNIMAP=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="ForwardToConsole="><span class="term"><code class="varname">ForwardToConsole=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToConsole=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="ForwardToKMsg="><span class="term"><code class="varname">ForwardToKMsg=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToKMsg=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="ForwardToSyslog="><span class="term"><code class="varname">ForwardToSyslog=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToSyslog=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="ForwardToWall="><span class="term"><code class="varname">ForwardToWall=</code></span><a class="headerlink" title="Permalink to this term" href="#ForwardToWall=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="HOME_URL="><span class="term"><code class="varname">HOME_URL=</code></span><a class="headerlink" title="Permalink to this term" href="#HOME_URL=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="HandleHibernateKey="><span class="term"><code class="varname">HandleHibernateKey=</code></span><a class="headerlink" title="Permalink to this term" href="#HandleHibernateKey=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HandleLidSwitch="><span class="term"><code class="varname">HandleLidSwitch=</code></span><a class="headerlink" title="Permalink to this term" href="#HandleLidSwitch=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HandleLidSwitchDocked="><span class="term"><code class="varname">HandleLidSwitchDocked=</code></span><a class="headerlink" title="Permalink to this term" href="#HandleLidSwitchDocked=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HandlePowerKey="><span class="term"><code class="varname">HandlePowerKey=</code></span><a class="headerlink" title="Permalink to this term" href="#HandlePowerKey=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HandleSuspendKey="><span class="term"><code class="varname">HandleSuspendKey=</code></span><a class="headerlink" title="Permalink to this term" href="#HandleSuspendKey=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="HibernateKeyIgnoreInhibited="><span class="term"><code class="varname">HibernateKeyIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#HibernateKeyIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="ICON_NAME="><span class="term"><code class="varname">ICON_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#ICON_NAME=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="ID="><span class="term"><code class="varname">ID=</code></span><a class="headerlink" title="Permalink to this term" href="#ID=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="ID_LIKE="><span class="term"><code class="varname">ID_LIKE=</code></span><a class="headerlink" title="Permalink to this term" href="#ID_LIKE=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="IdleAction="><span class="term"><code class="varname">IdleAction=</code></span><a class="headerlink" title="Permalink to this term" href="#IdleAction=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="IdleActionSec="><span class="term"><code class="varname">IdleActionSec=</code></span><a class="headerlink" title="Permalink to this term" href="#IdleActionSec=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="InhibitDelayMaxSec="><span class="term"><code class="varname">InhibitDelayMaxSec=</code></span><a class="headerlink" title="Permalink to this term" href="#InhibitDelayMaxSec=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="JournalSizeMax="><span class="term"><code class="varname">JournalSizeMax=</code></span><a class="headerlink" title="Permalink to this term" href="#JournalSizeMax=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="KEYMAP="><span class="term"><code class="varname">KEYMAP=</code></span><a class="headerlink" title="Permalink to this term" href="#KEYMAP=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="KEYMAP_TOGGLE="><span class="term"><code class="varname">KEYMAP_TOGGLE=</code></span><a class="headerlink" title="Permalink to this term" href="#KEYMAP_TOGGLE=">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="KeepFree="><span class="term"><code class="varname">KeepFree=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepFree=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="KillExcludeUsers="><span class="term"><code class="varname">KillExcludeUsers=</code></span><a class="headerlink" title="Permalink to this term" href="#KillExcludeUsers=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="KillOnlyUsers="><span class="term"><code class="varname">KillOnlyUsers=</code></span><a class="headerlink" title="Permalink to this term" href="#KillOnlyUsers=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="KillUserProcesses="><span class="term"><code class="varname">KillUserProcesses=</code></span><a class="headerlink" title="Permalink to this term" href="#KillUserProcesses=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="L"><span class="term"><code class="varname">L</code></span><a class="headerlink" title="Permalink to this term" href="#L">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="L+"><span class="term"><code class="varname">L+</code></span><a class="headerlink" title="Permalink to this term" href="#L+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="LOCATION="><span class="term"><code class="varname">LOCATION=</code></span><a class="headerlink" title="Permalink to this term" href="#LOCATION=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="LidSwitchIgnoreInhibited="><span class="term"><code class="varname">LidSwitchIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#LidSwitchIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="MaxFileSec="><span class="term"><code class="varname">MaxFileSec=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxFileSec=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelConsole="><span class="term"><code class="varname">MaxLevelConsole=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelConsole=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelKMsg="><span class="term"><code class="varname">MaxLevelKMsg=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelKMsg=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelStore="><span class="term"><code class="varname">MaxLevelStore=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelStore=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelSyslog="><span class="term"><code class="varname">MaxLevelSyslog=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelSyslog=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxLevelWall="><span class="term"><code class="varname">MaxLevelWall=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxLevelWall=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxRetentionSec="><span class="term"><code class="varname">MaxRetentionSec=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxRetentionSec=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="MaxUse="><span class="term"><code class="varname">MaxUse=</code></span><a class="headerlink" title="Permalink to this term" href="#MaxUse=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="NAME="><span class="term"><code class="varname">NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#NAME=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="NAutoVTs="><span class="term"><code class="varname">NAutoVTs=</code></span><a class="headerlink" title="Permalink to this term" href="#NAutoVTs=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="PRETTY_HOSTNAME="><span class="term"><code class="varname">PRETTY_HOSTNAME=</code></span><a class="headerlink" title="Permalink to this term" href="#PRETTY_HOSTNAME=">¶</a></dt><dd><p><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="PRETTY_NAME="><span class="term"><code class="varname">PRETTY_NAME=</code></span><a class="headerlink" title="Permalink to this term" href="#PRETTY_NAME=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="PowerKeyIgnoreInhibited="><span class="term"><code class="varname">PowerKeyIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#PowerKeyIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="ProcessSizeMax="><span class="term"><code class="varname">ProcessSizeMax=</code></span><a class="headerlink" title="Permalink to this term" href="#ProcessSizeMax=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="R"><span class="term"><code class="varname">R</code></span><a class="headerlink" title="Permalink to this term" href="#R">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="RateLimitBurst="><span class="term"><code class="varname">RateLimitBurst=</code></span><a class="headerlink" title="Permalink to this term" href="#RateLimitBurst=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RateLimitInterval="><span class="term"><code class="varname">RateLimitInterval=</code></span><a class="headerlink" title="Permalink to this term" href="#RateLimitInterval=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RemoveIPC="><span class="term"><code class="varname">RemoveIPC=</code></span><a class="headerlink" title="Permalink to this term" href="#RemoveIPC=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="ReserveVT="><span class="term"><code class="varname">ReserveVT=</code></span><a class="headerlink" title="Permalink to this term" href="#ReserveVT=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="RuntimeDirectorySize="><span class="term"><code class="varname">RuntimeDirectorySize=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeDirectorySize=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="RuntimeKeepFree="><span class="term"><code class="varname">RuntimeKeepFree=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeKeepFree=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RuntimeMaxFileSize="><span class="term"><code class="varname">RuntimeMaxFileSize=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeMaxFileSize=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="RuntimeMaxUse="><span class="term"><code class="varname">RuntimeMaxUse=</code></span><a class="headerlink" title="Permalink to this term" href="#RuntimeMaxUse=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SD_BUS_NAME_ALLOW_REPLACEMENT"><span class="term"><code class="varname">SD_BUS_NAME_ALLOW_REPLACEMENT</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_NAME_ALLOW_REPLACEMENT">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="SD_BUS_NAME_QUEUE"><span class="term"><code class="varname">SD_BUS_NAME_QUEUE</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_NAME_QUEUE">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="SD_BUS_NAME_REPLACE_EXISTING"><span class="term"><code class="varname">SD_BUS_NAME_REPLACE_EXISTING</code></span><a class="headerlink" title="Permalink to this term" href="#SD_BUS_NAME_REPLACE_EXISTING">¶</a></dt><dd><p><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a></p></dd><dt id="SUPPORT_URL="><span class="term"><code class="varname">SUPPORT_URL=</code></span><a class="headerlink" title="Permalink to this term" href="#SUPPORT_URL=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="Seal="><span class="term"><code class="varname">Seal=</code></span><a class="headerlink" title="Permalink to this term" href="#Seal=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SplitMode="><span class="term"><code class="varname">SplitMode=</code></span><a class="headerlink" title="Permalink to this term" href="#SplitMode=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="Storage="><span class="term"><code class="varname">Storage=</code></span><a class="headerlink" title="Permalink to this term" href="#Storage=">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>, <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SuspendKeyIgnoreInhibited="><span class="term"><code class="varname">SuspendKeyIgnoreInhibited=</code></span><a class="headerlink" title="Permalink to this term" href="#SuspendKeyIgnoreInhibited=">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="SyncIntervalSec="><span class="term"><code class="varname">SyncIntervalSec=</code></span><a class="headerlink" title="Permalink to this term" href="#SyncIntervalSec=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SystemKeepFree="><span class="term"><code class="varname">SystemKeepFree=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemKeepFree=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SystemMaxFileSize="><span class="term"><code class="varname">SystemMaxFileSize=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemMaxFileSize=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="SystemMaxUse="><span class="term"><code class="varname">SystemMaxUse=</code></span><a class="headerlink" title="Permalink to this term" href="#SystemMaxUse=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="TTYPath="><span class="term"><code class="varname">TTYPath=</code></span><a class="headerlink" title="Permalink to this term" href="#TTYPath=">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a></p></dd><dt id="VERSION="><span class="term"><code class="varname">VERSION=</code></span><a class="headerlink" title="Permalink to this term" href="#VERSION=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="VERSION_ID="><span class="term"><code class="varname">VERSION_ID=</code></span><a class="headerlink" title="Permalink to this term" href="#VERSION_ID=">¶</a></dt><dd><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a></p></dd><dt id="X"><span class="term"><code class="varname">X</code></span><a class="headerlink" title="Permalink to this term" href="#X">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="Z"><span class="term"><code class="varname">Z</code></span><a class="headerlink" title="Permalink to this term" href="#Z">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="b"><span class="term"><code class="varname">b</code></span><a class="headerlink" title="Permalink to this term" href="#b">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="b+"><span class="term"><code class="varname">b+</code></span><a class="headerlink" title="Permalink to this term" href="#b+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="c"><span class="term"><code class="varname">c</code></span><a class="headerlink" title="Permalink to this term" href="#c">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="c+"><span class="term"><code class="varname">c+</code></span><a class="headerlink" title="Permalink to this term" href="#c+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="d"><span class="term"><code class="varname">d</code></span><a class="headerlink" title="Permalink to this term" href="#d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="equivalent"><span class="term"><code class="varname">equivalent</code></span><a class="headerlink" title="Permalink to this term" href="#equivalent">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="extended"><span class="term"><code class="varname">extended</code></span><a class="headerlink" title="Permalink to this term" href="#extended">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="f"><span class="term"><code class="varname">f</code></span><a class="headerlink" title="Permalink to this term" href="#f">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="g"><span class="term"><code class="varname">g</code></span><a class="headerlink" title="Permalink to this term" href="#g">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="h"><span class="term"><code class="varname">h</code></span><a class="headerlink" title="Permalink to this term" href="#h">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="m"><span class="term"><code class="constant">m</code></span><a class="headerlink" title="Permalink to this term" href="#m">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="masked"><span class="term"><code class="varname">masked</code></span><a class="headerlink" title="Permalink to this term" href="#masked">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="min"><span class="term"><code class="varname">min</code></span><a class="headerlink" title="Permalink to this term" href="#min">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="ms"><span class="term"><code class="varname">ms</code></span><a class="headerlink" title="Permalink to this term" href="#ms">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="overridden"><span class="term"><code class="varname">overridden</code></span><a class="headerlink" title="Permalink to this term" href="#overridden">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="p"><span class="term"><code class="varname">p</code></span><a class="headerlink" title="Permalink to this term" href="#p">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="p+"><span class="term"><code class="varname">p+</code></span><a class="headerlink" title="Permalink to this term" href="#p+">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="r"><span class="term"><code class="constant">r</code></span><a class="headerlink" title="Permalink to this term" href="#r">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="redirected"><span class="term"><code class="varname">redirected</code></span><a class="headerlink" title="Permalink to this term" href="#redirected">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="s"><span class="term"><code class="varname">s</code></span><a class="headerlink" title="Permalink to this term" href="#s">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="u"><span class="term"><code class="varname">u</code></span><a class="headerlink" title="Permalink to this term" href="#u">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="udev_log"><span class="term"><code class="varname">udev_log</code></span><a class="headerlink" title="Permalink to this term" href="#udev_log">¶</a></dt><dd><p><a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a></p></dd><dt id="unchanged"><span class="term"><code class="varname">unchanged</code></span><a class="headerlink" title="Permalink to this term" href="#unchanged">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="us"><span class="term"><code class="varname">us</code></span><a class="headerlink" title="Permalink to this term" href="#us">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="w"><span class="term"><code class="constant">w</code></span><a class="headerlink" title="Permalink to this term" href="#w">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="x"><span class="term"><code class="varname">x</code></span><a class="headerlink" title="Permalink to this term" href="#x">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="z"><span class="term"><code class="varname">z</code></span><a class="headerlink" title="Permalink to this term" href="#z">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214187329264"></a><h2 id="Files and directories">Files and directories<a class="headerlink" title="Permalink to this headline" href="#Files%20and%20directories">¶</a></h2><p>Paths and file names referred to in the
+                documentation.</p><div class="variablelist"><a name="filenames"></a><dl class="variablelist"><dt id="/"><span class="term"><code class="filename">/</code></span><a class="headerlink" title="Permalink to this term" href="#/">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="$HOME/.config/systemd/user/"><span class="term"><code class="filename">$HOME/.config/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#%24HOME/.config/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="$HOME/.local/share/systemd/user/"><span class="term"><code class="filename">$HOME/.local/share/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#%24HOME/.local/share/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="$XDG_CONFIG_HOME/systemd/user/"><span class="term"><code class="filename">$XDG_CONFIG_HOME/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_CONFIG_HOME/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="$XDG_DATA_HOME/systemd/user/"><span class="term"><code class="filename">$XDG_DATA_HOME/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_DATA_HOME/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="$XDG_RUNTIME_DIR/systemd/user/"><span class="term"><code class="filename">$XDG_RUNTIME_DIR/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#%24XDG_RUNTIME_DIR/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="-.slice"><span class="term"><code class="filename">-.slice</code></span><a class="headerlink" title="Permalink to this term" href="#-.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="/bin"><span class="term"><code class="filename">/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/bin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/bin/ls"><span class="term"><code class="filename">/bin/ls</code></span><a class="headerlink" title="Permalink to this term" href="#/bin/ls">¶</a></dt><dd><p><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="/boot"><span class="term"><code class="filename">/boot</code></span><a class="headerlink" title="Permalink to this term" href="#/boot">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf"><span class="term"><code class="filename">/boot/loader/entries/<em class="replaceable"><code>MACHINE-ID</code></em>-<em class="replaceable"><code>KERNEL-VERSION</code></em>.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/dev"><span class="term"><code class="filename">/dev</code></span><a class="headerlink" title="Permalink to this term" href="#/dev">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/dev/console"><span class="term"><code class="filename">/dev/console</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/console">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a>, <a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/dev/disk/by-foo/bar"><span class="term"><code class="filename">/dev/disk/by-foo/bar</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/disk/by-foo/bar">¶</a></dt><dd><p><a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a></p></dd><dt id="/dev/full"><span class="term"><code class="filename">/dev/full</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/full">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/hw_random"><span class="term"><code class="filename">/dev/hw_random</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/hw_random">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="/dev/initctl"><span class="term"><code class="filename">/dev/initctl</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/initctl">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="/dev/mapper/"><span class="term"><code class="filename">/dev/mapper/</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/mapper/">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a></p></dd><dt id="/dev/mapper/home"><span class="term"><code class="filename">/dev/mapper/home</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/mapper/home">¶</a></dt><dd><p><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/dev/mapper/srv"><span class="term"><code class="filename">/dev/mapper/srv</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/mapper/srv">¶</a></dt><dd><p><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/dev/net/tun"><span class="term"><code class="filename">/dev/net/tun</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/net/tun">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="/dev/null"><span class="term"><code class="filename">/dev/null</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/null">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/dev/random"><span class="term"><code class="filename">/dev/random</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/random">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/sda"><span class="term"><code class="filename">/dev/sda</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/sda">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/dev/sda5"><span class="term"><code class="filename">/dev/sda5</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/sda5">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/shm"><span class="term"><code class="filename">/dev/shm</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/shm">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/dev/urandom"><span class="term"><code class="filename">/dev/urandom</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/urandom">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/dev/watchdog"><span class="term"><code class="filename">/dev/watchdog</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/watchdog">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="/dev/zero"><span class="term"><code class="filename">/dev/zero</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/zero">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/etc"><span class="term"><code class="filename">/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/etc">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a>, <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="/etc/.updated"><span class="term"><code class="filename">/etc/.updated</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/.updated">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="/etc/adjtime"><span class="term"><code class="filename">/etc/adjtime</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/adjtime">¶</a></dt><dd><p><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="/etc/binfmt.d/"><span class="term"><code class="filename">/etc/binfmt.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/binfmt.d/">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/etc/binfmt.d/*.conf"><span class="term"><code class="filename">/etc/binfmt.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/binfmt.d/*.conf">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/etc/crypttab"><span class="term"><code class="filename">/etc/crypttab</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/crypttab">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>, <a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/etc/fstab"><span class="term"><code class="filename">/etc/fstab</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/fstab">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>, <a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a></p></dd><dt id="/etc/group"><span class="term"><code class="filename">/etc/group</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/group">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/etc/hostname"><span class="term"><code class="filename">/etc/hostname</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/hostname">¶</a></dt><dd><p><a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="/etc/hosts"><span class="term"><code class="filename">/etc/hosts</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/hosts">¶</a></dt><dd><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a></p></dd><dt id="/etc/kernel/cmdline"><span class="term"><code class="filename">/etc/kernel/cmdline</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/kernel/cmdline">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/etc/kernel/install.d/"><span class="term"><code class="filename">/etc/kernel/install.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/kernel/install.d/">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/etc/kernel/install.d/*.install"><span class="term"><code class="filename">/etc/kernel/install.d/*.install</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/kernel/install.d/*.install">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/etc/locale.conf"><span class="term"><code class="filename">/etc/locale.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/locale.conf">¶</a></dt><dd><p><a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/etc/localtime"><span class="term"><code class="filename">/etc/localtime</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/localtime">¶</a></dt><dd><p><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>, <a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="/etc/machine-id"><span class="term"><code class="filename">/etc/machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/machine-id">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>, <a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/etc/machine-info"><span class="term"><code class="filename">/etc/machine-info</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/machine-info">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>, <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a></p></dd><dt id="/etc/modules-load.d/program.conf"><span class="term"><code class="filename">/etc/modules-load.d/<em class="replaceable"><code>program</code></em>.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/modules-load.d/program.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/etc/modules-load.d/*.conf"><span class="term"><code class="filename">/etc/modules-load.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/modules-load.d/*.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/etc/modules-load.d/bridge.conf"><span class="term"><code class="filename">/etc/modules-load.d/bridge.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/modules-load.d/bridge.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/nsswitch.conf"><span class="term"><code class="filename">/etc/nsswitch.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/nsswitch.conf">¶</a></dt><dd><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a></p></dd><dt id="/etc/os-release"><span class="term"><code class="filename">/etc/os-release</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/os-release">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/etc/passwd"><span class="term"><code class="filename">/etc/passwd</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/passwd">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/etc/resolv.conf"><span class="term"><code class="filename">/etc/resolv.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/resolv.conf">¶</a></dt><dd><p><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a>, <a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="/etc/sysctl.d/"><span class="term"><code class="filename">/etc/sysctl.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/sysctl.d/*.conf"><span class="term"><code class="filename">/etc/sysctl.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/*.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/sysctl.d/bridge.conf"><span class="term"><code class="filename">/etc/sysctl.d/bridge.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/bridge.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/sysctl.d/domain-name.conf"><span class="term"><code class="filename">/etc/sysctl.d/domain-name.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysctl.d/domain-name.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/systemd/bootchart.conf"><span class="term"><code class="filename">/etc/systemd/bootchart.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/bootchart.conf">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="/etc/systemd/coredump.conf"><span class="term"><code class="filename">/etc/systemd/coredump.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/coredump.conf">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/journal-remote.conf"><span class="term"><code class="filename">/etc/systemd/journal-remote.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journal-remote.conf">¶</a></dt><dd><p><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="/etc/systemd/journal-upload.conf"><span class="term"><code class="filename">/etc/systemd/journal-upload.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journal-upload.conf">¶</a></dt><dd><p><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="/etc/systemd/journald.conf"><span class="term"><code class="filename">/etc/systemd/journald.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/journald.conf">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/etc/systemd/logind.conf"><span class="term"><code class="filename">/etc/systemd/logind.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/logind.conf">¶</a></dt><dd><p><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/network"><span class="term"><code class="filename">/etc/systemd/network</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/network">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="/etc/systemd/resolved.conf"><span class="term"><code class="filename">/etc/systemd/resolved.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/resolved.conf">¶</a></dt><dd><p><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/sleep.conf"><span class="term"><code class="filename">/etc/systemd/sleep.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/sleep.conf">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="/etc/systemd/system/"><span class="term"><code class="filename">/etc/systemd/system/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/etc/systemd/system-preset/"><span class="term"><code class="filename">/etc/systemd/system-preset/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system-preset/">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/system-preset/*.preset"><span class="term"><code class="filename">/etc/systemd/system-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/system-preset/00-lennart.preset"><span class="term"><code class="filename">/etc/systemd/system-preset/00-lennart.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system-preset/00-lennart.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/system.conf"><span class="term"><code class="filename">/etc/systemd/system.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/system.conf">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/timesyncd.conf"><span class="term"><code class="filename">/etc/systemd/timesyncd.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/timesyncd.conf">¶</a></dt><dd><p><a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a></p></dd><dt id="/etc/systemd/user/"><span class="term"><code class="filename">/etc/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/etc/systemd/user-preset/*.preset"><span class="term"><code class="filename">/etc/systemd/user-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/user-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/etc/systemd/user.conf"><span class="term"><code class="filename">/etc/systemd/user.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/systemd/user.conf">¶</a></dt><dd><p><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a></p></dd><dt id="/etc/sysusers.d"><span class="term"><code class="filename">/etc/sysusers.d</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/sysusers.d">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/etc/tmpfiles.d"><span class="term"><code class="filename">/etc/tmpfiles.d</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/tmpfiles.d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/etc/tmpfiles.d/*.conf"><span class="term"><code class="filename">/etc/tmpfiles.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/tmpfiles.d/*.conf">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/etc/udev/hwdb.bin"><span class="term"><code class="filename">/etc/udev/hwdb.bin</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/hwdb.bin">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="/etc/udev/hwdb.d"><span class="term"><code class="filename">/etc/udev/hwdb.d</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/hwdb.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="/etc/udev/rules.d"><span class="term"><code class="filename">/etc/udev/rules.d</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/rules.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/etc/udev/rules.d/99-bridge.rules"><span class="term"><code class="filename">/etc/udev/rules.d/99-bridge.rules</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/rules.d/99-bridge.rules">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/etc/udev/udev.conf"><span class="term"><code class="filename">/etc/udev/udev.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/udev/udev.conf">¶</a></dt><dd><p><a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a></p></dd><dt id="/etc/vconsole.conf"><span class="term"><code class="filename">/etc/vconsole.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/etc/vconsole.conf">¶</a></dt><dd><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a></p></dd><dt id="/home"><span class="term"><code class="filename">/home</code></span><a class="headerlink" title="Permalink to this term" href="#/home">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/home/lennart"><span class="term"><code class="filename">/home/lennart</code></span><a class="headerlink" title="Permalink to this term" href="#/home/lennart">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a></p></dd><dt id="/lib"><span class="term"><code class="filename">/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/lib">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="/lib64"><span class="term"><code class="filename">/lib64</code></span><a class="headerlink" title="Permalink to this term" href="#/lib64">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/proc"><span class="term"><code class="filename">/proc</code></span><a class="headerlink" title="Permalink to this term" href="#/proc">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a>, <a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/proc/cmdline"><span class="term"><code class="filename">/proc/cmdline</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/cmdline">¶</a></dt><dd><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>, <a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/proc/devices"><span class="term"><code class="filename">/proc/devices</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/devices">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a></p></dd><dt id="/proc/self/fd"><span class="term"><code class="filename">/proc/self/fd</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/self/fd">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="/proc/self/mountinfo"><span class="term"><code class="filename">/proc/self/mountinfo</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/self/mountinfo">¶</a></dt><dd><p><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a></p></dd><dt id="/proc/self/sessionid"><span class="term"><code class="filename">/proc/self/sessionid</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/self/sessionid">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="/proc/sys"><span class="term"><code class="filename">/proc/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/proc/sys/kernel/domainname"><span class="term"><code class="filename">/proc/sys/kernel/domainname</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/kernel/domainname">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/proc/sys/kernel/random/boot_id"><span class="term"><code class="filename">/proc/sys/kernel/random/boot_id</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/kernel/random/boot_id">¶</a></dt><dd><p><a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a></p></dd><dt id="/proc/sys/net/ipv4/conf/enp3s0.200/forwarding"><span class="term"><code class="filename">/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/net/ipv4/conf/enp3s0.200/forwarding">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/proc/sys/net/ipv4/tcp_keepalive_time"><span class="term"><code class="filename">/proc/sys/net/ipv4/tcp_keepalive_time</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/net/ipv4/tcp_keepalive_time">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="/proc/sys/net/ipv6/bindv6only"><span class="term"><code class="filename">/proc/sys/net/ipv6/bindv6only</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys/net/ipv6/bindv6only">¶</a></dt><dd><p><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a></p></dd><dt id="/root"><span class="term"><code class="filename">/root</code></span><a class="headerlink" title="Permalink to this term" href="#/root">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/run"><span class="term"><code class="filename">/run</code></span><a class="headerlink" title="Permalink to this term" href="#/run">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/binfmt.d/*.conf"><span class="term"><code class="filename">/run/binfmt.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/binfmt.d/*.conf">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/run/foobar.pid"><span class="term"><code class="filename">/run/foobar.pid</code></span><a class="headerlink" title="Permalink to this term" href="#/run/foobar.pid">¶</a></dt><dd><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a></p></dd><dt id="/run/log"><span class="term"><code class="filename">/run/log</code></span><a class="headerlink" title="Permalink to this term" href="#/run/log">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="/run/log/journal"><span class="term"><code class="filename">/run/log/journal</code></span><a class="headerlink" title="Permalink to this term" href="#/run/log/journal">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/run/modules-load.d/*.conf"><span class="term"><code class="filename">/run/modules-load.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/modules-load.d/*.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/run/nologin"><span class="term"><code class="filename">/run/nologin</code></span><a class="headerlink" title="Permalink to this term" href="#/run/nologin">¶</a></dt><dd><p><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>, <a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a></p></dd><dt id="/run/sysctl.d/*.conf"><span class="term"><code class="filename">/run/sysctl.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/sysctl.d/*.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/run/systemd/journal/syslog"><span class="term"><code class="filename">/run/systemd/journal/syslog</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/journal/syslog">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/run/systemd/log"><span class="term"><code class="filename">/run/systemd/log</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/log">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="/run/systemd/network"><span class="term"><code class="filename">/run/systemd/network</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/network">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="/run/systemd/notify"><span class="term"><code class="filename">/run/systemd/notify</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/notify">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/run/systemd/private"><span class="term"><code class="filename">/run/systemd/private</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/private">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/run/systemd/resolve/resolv.conf"><span class="term"><code class="filename">/run/systemd/resolve/resolv.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/resolve/resolv.conf">¶</a></dt><dd><p><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="/run/systemd/shutdownd"><span class="term"><code class="filename">/run/systemd/shutdownd</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/shutdownd">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/run/systemd/system/"><span class="term"><code class="filename">/run/systemd/system/</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/system/">¶</a></dt><dd><p><a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/run/systemd/system-preset/*.preset"><span class="term"><code class="filename">/run/systemd/system-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/system-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/run/systemd/user/"><span class="term"><code class="filename">/run/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/run/systemd/user-preset/*.preset"><span class="term"><code class="filename">/run/systemd/user-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/user-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/run/sysusers.d"><span class="term"><code class="filename">/run/sysusers.d</code></span><a class="headerlink" title="Permalink to this term" href="#/run/sysusers.d">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/run/tmpfiles.d"><span class="term"><code class="filename">/run/tmpfiles.d</code></span><a class="headerlink" title="Permalink to this term" href="#/run/tmpfiles.d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/run/tmpfiles.d/*.conf"><span class="term"><code class="filename">/run/tmpfiles.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/run/tmpfiles.d/*.conf">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/run/udev/hwdb.d"><span class="term"><code class="filename">/run/udev/hwdb.d</code></span><a class="headerlink" title="Permalink to this term" href="#/run/udev/hwdb.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/udev/rules.d"><span class="term"><code class="filename">/run/udev/rules.d</code></span><a class="headerlink" title="Permalink to this term" href="#/run/udev/rules.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/udev/static_node-tags/tag"><span class="term"><code class="filename">/run/udev/static_node-tags/<em class="replaceable"><code>tag</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/run/udev/static_node-tags/tag">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/run/user"><span class="term"><code class="filename">/run/user</code></span><a class="headerlink" title="Permalink to this term" href="#/run/user">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/run/user/$USER"><span class="term"><code class="filename">/run/user/$USER</code></span><a class="headerlink" title="Permalink to this term" href="#/run/user/%24USER">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="/sbin"><span class="term"><code class="filename">/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/sbin/fsck."><span class="term"><code class="filename">/sbin/fsck.</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin/fsck.">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="/sbin/init"><span class="term"><code class="filename">/sbin/init</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin/init">¶</a></dt><dd><p><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a></p></dd><dt id="/sbin/nologin"><span class="term"><code class="filename">/sbin/nologin</code></span><a class="headerlink" title="Permalink to this term" href="#/sbin/nologin">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/srv"><span class="term"><code class="filename">/srv</code></span><a class="headerlink" title="Permalink to this term" href="#/srv">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/sys"><span class="term"><code class="filename">/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/sys">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>, <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="/sys/fs/cgroup"><span class="term"><code class="filename">/sys/fs/cgroup</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/fs/cgroup">¶</a></dt><dd><p><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>, <a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="/sys/fs/cgroup/systemd/"><span class="term"><code class="filename">/sys/fs/cgroup/systemd/</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/fs/cgroup/systemd/">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/sys/fs/selinux"><span class="term"><code class="filename">/sys/fs/selinux</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/fs/selinux">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/sys/power/disk"><span class="term"><code class="filename">/sys/power/disk</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/power/disk">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a></p></dd><dt id="/sys/power/resume"><span class="term"><code class="filename">/sys/power/resume</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/power/resume">¶</a></dt><dd><p><a href="systemd-hibernate-resume@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume@.service</span>(8)</span></a></p></dd><dt id="/sys/power/state"><span class="term"><code class="filename">/sys/power/state</code></span><a class="headerlink" title="Permalink to this term" href="#/sys/power/state">¶</a></dt><dd><p><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a>, <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="/sysroot"><span class="term"><code class="filename">/sysroot</code></span><a class="headerlink" title="Permalink to this term" href="#/sysroot">¶</a></dt><dd><p><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a></p></dd><dt id="/sysroot/etc/fstab"><span class="term"><code class="filename">/sysroot/etc/fstab</code></span><a class="headerlink" title="Permalink to this term" href="#/sysroot/etc/fstab">¶</a></dt><dd><p><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a></p></dd><dt id="/system-update"><span class="term"><code class="filename">/system-update</code></span><a class="headerlink" title="Permalink to this term" href="#/system-update">¶</a></dt><dd><p><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a>, <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="/tmp"><span class="term"><code class="filename">/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/tmp">¶</a></dt><dd><p><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/tmp/var"><span class="term"><code class="filename">/tmp/var</code></span><a class="headerlink" title="Permalink to this term" href="#/tmp/var">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/upload"><span class="term"><code class="filename">/upload</code></span><a class="headerlink" title="Permalink to this term" href="#/upload">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="/usr"><span class="term"><code class="filename">/usr</code></span><a class="headerlink" title="Permalink to this term" href="#/usr">¶</a></dt><dd><p><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a>, <a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/usr/bin"><span class="term"><code class="filename">/usr/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/bin/mount"><span class="term"><code class="filename">/usr/bin/mount</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin/mount">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="/usr/bin/umount"><span class="term"><code class="filename">/usr/bin/umount</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin/umount">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="/usr/include"><span class="term"><code class="filename">/usr/include</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/include">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/lib"><span class="term"><code class="filename">/usr/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a>, <a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a>, <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>, <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>, <a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a>, <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib/binfmt.d/*.conf"><span class="term"><code class="filename">/usr/lib/binfmt.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/binfmt.d/*.conf">¶</a></dt><dd><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a></p></dd><dt id="/usr/lib/kernel/install.d/"><span class="term"><code class="filename">/usr/lib/kernel/install.d/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/kernel/install.d/">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/usr/lib/kernel/install.d/*.install"><span class="term"><code class="filename">/usr/lib/kernel/install.d/*.install</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/kernel/install.d/*.install">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="/usr/lib/modules-load.d/*.conf"><span class="term"><code class="filename">/usr/lib/modules-load.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/modules-load.d/*.conf">¶</a></dt><dd><p><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a></p></dd><dt id="/usr/lib/os-release"><span class="term"><code class="filename">/usr/lib/os-release</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/os-release">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a>, <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/usr/lib/sysctl.d/*.conf"><span class="term"><code class="filename">/usr/lib/sysctl.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/sysctl.d/*.conf">¶</a></dt><dd><p><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a></p></dd><dt id="/usr/lib/sysctl.d/50-coredump.conf"><span class="term"><code class="filename">/usr/lib/sysctl.d/50-coredump.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/sysctl.d/50-coredump.conf">¶</a></dt><dd><p><a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/network"><span class="term"><code class="filename">/usr/lib/systemd/network</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/network">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>, <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>, <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>, <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system"><span class="term"><code class="filename">/usr/lib/systemd/system</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-cryptsetup-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-cryptsetup-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-cryptsetup-generator">¶</a></dt><dd><p><a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-debug-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-debug-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-debug-generator">¶</a></dt><dd><p><a href="systemd-debug-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-debug-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-efi-boot-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-efi-boot-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-efi-boot-generator">¶</a></dt><dd><p><a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-fstab-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-fstab-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-fstab-generator">¶</a></dt><dd><p><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-getty-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-getty-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-getty-generator">¶</a></dt><dd><p><a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-gpt-auto-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-gpt-auto-generator">¶</a></dt><dd><p><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator">¶</a></dt><dd><p><a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-generators/systemd-system-update-generator"><span class="term"><code class="filename">/usr/lib/systemd/system-generators/systemd-system-update-generator</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-generators/systemd-system-update-generator">¶</a></dt><dd><p><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-preset/*.preset"><span class="term"><code class="filename">/usr/lib/systemd/system-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-preset/50-gnome.preset"><span class="term"><code class="filename">/usr/lib/systemd/system-preset/50-gnome.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-preset/50-gnome.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-preset/99-default.preset"><span class="term"><code class="filename">/usr/lib/systemd/system-preset/99-default.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-preset/99-default.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/system-shutdown/"><span class="term"><code class="filename">/usr/lib/systemd/system-shutdown/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-shutdown/">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/system-sleep"><span class="term"><code class="filename">/usr/lib/systemd/system-sleep</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/system-sleep">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-activate"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-activate</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-activate">¶</a></dt><dd><p><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-backlight"><span class="term"><code class="filename">/usr/lib/systemd/systemd-backlight</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-backlight">¶</a></dt><dd><p><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-binfmt"><span class="term"><code class="filename">/usr/lib/systemd/systemd-binfmt</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-binfmt">¶</a></dt><dd><p><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-bootchart"><span class="term"><code class="filename">/usr/lib/systemd/systemd-bootchart</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-bootchart">¶</a></dt><dd><p><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-bus-proxyd"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-bus-proxyd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-bus-proxyd">¶</a></dt><dd><p><a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-coredump"><span class="term"><code class="filename">/usr/lib/systemd/systemd-coredump</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-coredump">¶</a></dt><dd><p><a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-cryptsetup"><span class="term"><code class="filename">/usr/lib/systemd/systemd-cryptsetup</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-cryptsetup">¶</a></dt><dd><p><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-fsck"><span class="term"><code class="filename">/usr/lib/systemd/systemd-fsck</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-fsck">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-hibernate-resume"><span class="term"><code class="filename">/usr/lib/systemd/systemd-hibernate-resume</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-hibernate-resume">¶</a></dt><dd><p><a href="systemd-hibernate-resume@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-hostnamed"><span class="term"><code class="filename">/usr/lib/systemd/systemd-hostnamed</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-hostnamed">¶</a></dt><dd><p><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-initctl"><span class="term"><code class="filename">/usr/lib/systemd/systemd-initctl</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-initctl">¶</a></dt><dd><p><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-journal-gatewayd"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-journal-gatewayd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-journal-gatewayd">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-journald"><span class="term"><code class="filename">/usr/lib/systemd/systemd-journald</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-journald">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-localed"><span class="term"><code class="filename">/usr/lib/systemd/systemd-localed</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-localed">¶</a></dt><dd><p><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-logind"><span class="term"><code class="filename">/usr/lib/systemd/systemd-logind</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-logind">¶</a></dt><dd><p><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-machined"><span class="term"><code class="filename">/usr/lib/systemd/systemd-machined</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-machined">¶</a></dt><dd><p><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-modules-load"><span class="term"><code class="filename">/usr/lib/systemd/systemd-modules-load</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-modules-load">¶</a></dt><dd><p><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-networkd"><span class="term"><code class="filename">/usr/lib/systemd/systemd-networkd</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-networkd">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-networkd-wait-online"><span class="term"><code class="filename">/usr/lib/systemd/systemd-networkd-wait-online</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-networkd-wait-online">¶</a></dt><dd><p><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-quotacheck"><span class="term"><code class="filename">/usr/lib/systemd/systemd-quotacheck</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-quotacheck">¶</a></dt><dd><p><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-random-seed"><span class="term"><code class="filename">/usr/lib/systemd/systemd-random-seed</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-random-seed">¶</a></dt><dd><p><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-remount-fs"><span class="term"><code class="filename">/usr/lib/systemd/systemd-remount-fs</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-remount-fs">¶</a></dt><dd><p><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-resolved"><span class="term"><code class="filename">/usr/lib/systemd/systemd-resolved</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-resolved">¶</a></dt><dd><p><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-rfkill"><span class="term"><code class="filename">/usr/lib/systemd/systemd-rfkill</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-rfkill">¶</a></dt><dd><p><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-shutdown"><span class="term"><code class="filename">/usr/lib/systemd/systemd-shutdown</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-shutdown">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-shutdownd"><span class="term"><code class="filename">/usr/lib/systemd/systemd-shutdownd</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-shutdownd">¶</a></dt><dd><p><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-sysctl"><span class="term"><code class="filename">/usr/lib/systemd/systemd-sysctl</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-sysctl">¶</a></dt><dd><p><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-timedated"><span class="term"><code class="filename">/usr/lib/systemd/systemd-timedated</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-timedated">¶</a></dt><dd><p><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-timesyncd"><span class="term"><code class="filename">/usr/lib/systemd/systemd-timesyncd</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-timesyncd">¶</a></dt><dd><p><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-udevd"><span class="term"><span class="command"><strong>/usr/lib/systemd/systemd-udevd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-udevd">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-update-done"><span class="term"><code class="filename">/usr/lib/systemd/systemd-update-done</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-update-done">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-update-utmp"><span class="term"><code class="filename">/usr/lib/systemd/systemd-update-utmp</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-update-utmp">¶</a></dt><dd><p><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-user-sessions"><span class="term"><code class="filename">/usr/lib/systemd/systemd-user-sessions</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-user-sessions">¶</a></dt><dd><p><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/systemd-vconsole-setup"><span class="term"><code class="filename">/usr/lib/systemd/systemd-vconsole-setup</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/systemd-vconsole-setup">¶</a></dt><dd><p><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="/usr/lib/systemd/user/"><span class="term"><code class="filename">/usr/lib/systemd/user/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/user/">¶</a></dt><dd><p><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="/usr/lib/systemd/user-preset/*.preset"><span class="term"><code class="filename">/usr/lib/systemd/user-preset/*.preset</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/systemd/user-preset/*.preset">¶</a></dt><dd><p><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a></p></dd><dt id="/usr/lib/sysusers.d"><span class="term"><code class="filename">/usr/lib/sysusers.d</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/sysusers.d">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/usr/lib/sysusers.d/*.conf"><span class="term"><code class="filename">/usr/lib/sysusers.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/sysusers.d/*.conf">¶</a></dt><dd><p><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a></p></dd><dt id="/usr/lib/tmpfiles.d"><span class="term"><code class="filename">/usr/lib/tmpfiles.d</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/tmpfiles.d">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/usr/lib/tmpfiles.d/*.conf"><span class="term"><code class="filename">/usr/lib/tmpfiles.d/*.conf</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/tmpfiles.d/*.conf">¶</a></dt><dd><p><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/usr/lib/udev"><span class="term"><code class="filename">/usr/lib/udev</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/udev">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib/udev/hwdb.bin"><span class="term"><code class="filename">/usr/lib/udev/hwdb.bin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/udev/hwdb.bin">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>, <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="/usr/lib/udev/hwdb.d"><span class="term"><code class="filename">/usr/lib/udev/hwdb.d</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/udev/hwdb.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib/udev/rules.d"><span class="term"><code class="filename">/usr/lib/udev/rules.d</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/udev/rules.d">¶</a></dt><dd><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a></p></dd><dt id="/usr/lib64"><span class="term"><code class="filename">/usr/lib64</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib64">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/local/bin"><span class="term"><code class="filename">/usr/local/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/local/bin">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/local/lib/systemd/system"><span class="term"><code class="filename">/usr/local/lib/systemd/system</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/local/lib/systemd/system">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="/usr/local/sbin"><span class="term"><code class="filename">/usr/local/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/local/sbin">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/sbin"><span class="term"><code class="filename">/usr/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/sbin">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a></p></dd><dt id="/usr/share"><span class="term"><code class="filename">/usr/share</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/doc"><span class="term"><code class="filename">/usr/share/doc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/doc">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/factory"><span class="term"><code class="filename">/usr/share/factory</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/usr/share/factory/etc"><span class="term"><code class="filename">/usr/share/factory/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/etc">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/factory/var"><span class="term"><code class="filename">/usr/share/factory/var</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/var">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/usr/share/zoneinfo/"><span class="term"><code class="filename">/usr/share/zoneinfo/</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/zoneinfo/">¶</a></dt><dd><p><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a></p></dd><dt id="/var"><span class="term"><code class="filename">/var</code></span><a class="headerlink" title="Permalink to this term" href="#/var">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>, <a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/var/.updated"><span class="term"><code class="filename">/var/.updated</code></span><a class="headerlink" title="Permalink to this term" href="#/var/.updated">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="/var/cache"><span class="term"><code class="filename">/var/cache</code></span><a class="headerlink" title="Permalink to this term" href="#/var/cache">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/lib"><span class="term"><code class="filename">/var/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/lib/dbus/machine-id"><span class="term"><code class="filename">/var/lib/dbus/machine-id</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/dbus/machine-id">¶</a></dt><dd><p><a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a></p></dd><dt id="/var/lib/systemd/backlight/"><span class="term"><code class="filename">/var/lib/systemd/backlight/</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/backlight/">¶</a></dt><dd><p><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a></p></dd><dt id="/var/lib/systemd/coredump"><span class="term"><code class="filename">/var/lib/systemd/coredump</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/coredump">¶</a></dt><dd><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>, <a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a></p></dd><dt id="/var/lib/systemd/journal-upload/state"><span class="term"><code class="filename">/var/lib/systemd/journal-upload/state</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/journal-upload/state">¶</a></dt><dd><p><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="/var/lib/systemd/random-seed"><span class="term"><code class="filename">/var/lib/systemd/random-seed</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/random-seed">¶</a></dt><dd><p><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a></p></dd><dt id="/var/lib/systemd/rfkill/"><span class="term"><code class="filename">/var/lib/systemd/rfkill/</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib/systemd/rfkill/">¶</a></dt><dd><p><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="/var/log"><span class="term"><code class="filename">/var/log</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/log/journal"><span class="term"><code class="filename">/var/log/journal</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log/journal">¶</a></dt><dd><p><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>, <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>, <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="/var/log/journal/remote/"><span class="term"><code class="filename">/var/log/journal/remote/</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log/journal/remote/">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="/var/log/journal/some.host/remote-some~host.journal"><span class="term"><code class="filename">/var/log/journal/some.host/remote-some~host.journal</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log/journal/some.host/remote-some~host.journal">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="/var/run"><span class="term"><code class="filename">/var/run</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="/var/run/dbus/system_bus_socket"><span class="term"><code class="filename">/var/run/dbus/system_bus_socket</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run/dbus/system_bus_socket">¶</a></dt><dd><p><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a></p></dd><dt id="/var/run/utmp"><span class="term"><code class="filename">/var/run/utmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run/utmp">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="/var/spool"><span class="term"><code class="filename">/var/spool</code></span><a class="headerlink" title="Permalink to this term" href="#/var/spool">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a></p></dd><dt id="/var/systemd/log"><span class="term"><code class="filename">/var/systemd/log</code></span><a class="headerlink" title="Permalink to this term" href="#/var/systemd/log">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="/var/tmp"><span class="term"><code class="filename">/var/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/tmp">¶</a></dt><dd><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a>, <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a></p></dd><dt id="automount.automount"><span class="term"><code class="filename"><em class="replaceable"><code>automount</code></em>.automount</code></span><a class="headerlink" title="Permalink to this term" href="#automount.automount">¶</a></dt><dd><p><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="basic.target"><span class="term"><code class="filename">basic.target</code></span><a class="headerlink" title="Permalink to this term" href="#basic.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="bluetooth.target"><span class="term"><code class="filename">bluetooth.target</code></span><a class="headerlink" title="Permalink to this term" href="#bluetooth.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="bootctl"><span class="term"><span class="command"><strong>bootctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#bootctl">¶</a></dt><dd><p><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a></p></dd><dt id="busctl"><span class="term"><span class="command"><strong>busctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#busctl">¶</a></dt><dd><p><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a></p></dd><dt id="coredumpctl"><span class="term"><span class="command"><strong>coredumpctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#coredumpctl">¶</a></dt><dd><p><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a></p></dd><dt id="cryptsetup-pre.target"><span class="term"><code class="filename">cryptsetup-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#cryptsetup-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="cryptsetup.target"><span class="term"><code class="filename">cryptsetup.target</code></span><a class="headerlink" title="Permalink to this term" href="#cryptsetup.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="ctrl-alt-del.target"><span class="term"><code class="filename">ctrl-alt-del.target</code></span><a class="headerlink" title="Permalink to this term" href="#ctrl-alt-del.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="dbus.service"><span class="term"><code class="filename">dbus.service</code></span><a class="headerlink" title="Permalink to this term" href="#dbus.service">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="dbus.socket"><span class="term"><code class="filename">dbus.socket</code></span><a class="headerlink" title="Permalink to this term" href="#dbus.socket">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="default.target"><span class="term"><code class="filename">default.target</code></span><a class="headerlink" title="Permalink to this term" href="#default.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="device.device"><span class="term"><code class="filename"><em class="replaceable"><code>device</code></em>.device</code></span><a class="headerlink" title="Permalink to this term" href="#device.device">¶</a></dt><dd><p><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="display-manager.service"><span class="term"><code class="filename">display-manager.service</code></span><a class="headerlink" title="Permalink to this term" href="#display-manager.service">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="emergency.target"><span class="term"><code class="filename">emergency.target</code></span><a class="headerlink" title="Permalink to this term" href="#emergency.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="exit.target"><span class="term"><code class="filename">exit.target</code></span><a class="headerlink" title="Permalink to this term" href="#exit.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="final.target"><span class="term"><code class="filename">final.target</code></span><a class="headerlink" title="Permalink to this term" href="#final.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="getty.target"><span class="term"><code class="filename">getty.target</code></span><a class="headerlink" title="Permalink to this term" href="#getty.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="graphical.target"><span class="term"><code class="filename">graphical.target</code></span><a class="headerlink" title="Permalink to this term" href="#graphical.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="halt"><span class="term"><span class="command"><strong>halt</strong></span></span><a class="headerlink" title="Permalink to this term" href="#halt">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="halt.target"><span class="term"><code class="filename">halt.target</code></span><a class="headerlink" title="Permalink to this term" href="#halt.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="hibernate.target"><span class="term"><code class="filename">hibernate.target</code></span><a class="headerlink" title="Permalink to this term" href="#hibernate.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="hostnamectl"><span class="term"><span class="command"><strong>hostnamectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#hostnamectl">¶</a></dt><dd><p><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a></p></dd><dt id="hybrid-sleep.target"><span class="term"><code class="filename">hybrid-sleep.target</code></span><a class="headerlink" title="Permalink to this term" href="#hybrid-sleep.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="init"><span class="term"><span class="command"><strong>init</strong></span></span><a class="headerlink" title="Permalink to this term" href="#init">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="initrd-fs.target"><span class="term"><code class="filename">initrd-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#initrd-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="initrd-root-fs.target"><span class="term"><code class="filename">initrd-root-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#initrd-root-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="journalctl"><span class="term"><span class="command"><strong>journalctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#journalctl">¶</a></dt><dd><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a></p></dd><dt id="kbrequest.target"><span class="term"><code class="filename">kbrequest.target</code></span><a class="headerlink" title="Permalink to this term" href="#kbrequest.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="kernel-install"><span class="term"><span class="command"><strong>kernel-install</strong></span></span><a class="headerlink" title="Permalink to this term" href="#kernel-install">¶</a></dt><dd><p><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a></p></dd><dt id="kexec.target"><span class="term"><code class="filename">kexec.target</code></span><a class="headerlink" title="Permalink to this term" href="#kexec.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="link.link"><span class="term"><code class="filename"><em class="replaceable"><code>link</code></em>.link</code></span><a class="headerlink" title="Permalink to this term" href="#link.link">¶</a></dt><dd><p><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a></p></dd><dt id="local-fs-pre.target"><span class="term"><code class="filename">local-fs-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#local-fs-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="local-fs.target"><span class="term"><code class="filename">local-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#local-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="localectl"><span class="term"><span class="command"><strong>localectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#localectl">¶</a></dt><dd><p><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a></p></dd><dt id="loginctl"><span class="term"><span class="command"><strong>loginctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#loginctl">¶</a></dt><dd><p><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a></p></dd><dt id="machine.slice"><span class="term"><code class="filename">machine.slice</code></span><a class="headerlink" title="Permalink to this term" href="#machine.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="machinectl"><span class="term"><span class="command"><strong>machinectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#machinectl">¶</a></dt><dd><p><a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a></p></dd><dt id="mount.mount"><span class="term"><code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code></span><a class="headerlink" title="Permalink to this term" href="#mount.mount">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="multi-user.target"><span class="term"><code class="filename">multi-user.target</code></span><a class="headerlink" title="Permalink to this term" href="#multi-user.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="netdev.netdev"><span class="term"><code class="filename"><em class="replaceable"><code>netdev</code></em>.netdev</code></span><a class="headerlink" title="Permalink to this term" href="#netdev.netdev">¶</a></dt><dd><p><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a></p></dd><dt id="network.network"><span class="term"><code class="filename"><em class="replaceable"><code>network</code></em>.network</code></span><a class="headerlink" title="Permalink to this term" href="#network.network">¶</a></dt><dd><p><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a></p></dd><dt id="network-online.target"><span class="term"><code class="filename">network-online.target</code></span><a class="headerlink" title="Permalink to this term" href="#network-online.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="network-pre.target"><span class="term"><code class="filename">network-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#network-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="network.target"><span class="term"><code class="filename">network.target</code></span><a class="headerlink" title="Permalink to this term" href="#network.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="nss-lookup.target"><span class="term"><code class="filename">nss-lookup.target</code></span><a class="headerlink" title="Permalink to this term" href="#nss-lookup.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="nss-myhostname.la"><span class="term"><code class="filename">nss-myhostname.la</code></span><a class="headerlink" title="Permalink to this term" href="#nss-myhostname.la">¶</a></dt><dd><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a></p></dd><dt id="nss-user-lookup.target"><span class="term"><code class="filename">nss-user-lookup.target</code></span><a class="headerlink" title="Permalink to this term" href="#nss-user-lookup.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="pam_systemd.so"><span class="term"><code class="filename">pam_systemd.so</code></span><a class="headerlink" title="Permalink to this term" href="#pam_systemd.so">¶</a></dt><dd><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a></p></dd><dt id="path.path"><span class="term"><code class="filename"><em class="replaceable"><code>path</code></em>.path</code></span><a class="headerlink" title="Permalink to this term" href="#path.path">¶</a></dt><dd><p><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="paths.target"><span class="term"><code class="filename">paths.target</code></span><a class="headerlink" title="Permalink to this term" href="#paths.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="pkg-config"><span class="term"><span class="command"><strong>pkg-config</strong></span></span><a class="headerlink" title="Permalink to this term" href="#pkg-config">¶</a></dt><dd><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>, <a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a>, <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>, <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a></p></dd><dt id="poweroff"><span class="term"><span class="command"><strong>poweroff</strong></span></span><a class="headerlink" title="Permalink to this term" href="#poweroff">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="poweroff.target"><span class="term"><code class="filename">poweroff.target</code></span><a class="headerlink" title="Permalink to this term" href="#poweroff.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="printer.target"><span class="term"><code class="filename">printer.target</code></span><a class="headerlink" title="Permalink to this term" href="#printer.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="reboot"><span class="term"><span class="command"><strong>reboot</strong></span></span><a class="headerlink" title="Permalink to this term" href="#reboot">¶</a></dt><dd><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a></p></dd><dt id="reboot.target"><span class="term"><code class="filename">reboot.target</code></span><a class="headerlink" title="Permalink to this term" href="#reboot.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="remote-fs-pre.target"><span class="term"><code class="filename">remote-fs-pre.target</code></span><a class="headerlink" title="Permalink to this term" href="#remote-fs-pre.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="remote-fs.target"><span class="term"><code class="filename">remote-fs.target</code></span><a class="headerlink" title="Permalink to this term" href="#remote-fs.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="rescue.target"><span class="term"><code class="filename">rescue.target</code></span><a class="headerlink" title="Permalink to this term" href="#rescue.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="rpcbind.target"><span class="term"><code class="filename">rpcbind.target</code></span><a class="headerlink" title="Permalink to this term" href="#rpcbind.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel"><span class="term"><span class="command"><strong>runlevel</strong></span></span><a class="headerlink" title="Permalink to this term" href="#runlevel">¶</a></dt><dd><p><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a></p></dd><dt id="runlevel2.target"><span class="term"><code class="filename">runlevel2.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel2.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel3.target"><span class="term"><code class="filename">runlevel3.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel3.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel4.target"><span class="term"><code class="filename">runlevel4.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel4.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="runlevel5.target"><span class="term"><code class="filename">runlevel5.target</code></span><a class="headerlink" title="Permalink to this term" href="#runlevel5.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="scope.scope"><span class="term"><code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code></span><a class="headerlink" title="Permalink to this term" href="#scope.scope">¶</a></dt><dd><p><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="service.service"><span class="term"><code class="filename"><em class="replaceable"><code>service</code></em>.service</code></span><a class="headerlink" title="Permalink to this term" href="#service.service">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="shutdown"><span class="term"><span class="command"><strong>shutdown</strong></span></span><a class="headerlink" title="Permalink to this term" href="#shutdown">¶</a></dt><dd><p><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a></p></dd><dt id="shutdown.target"><span class="term"><code class="filename">shutdown.target</code></span><a class="headerlink" title="Permalink to this term" href="#shutdown.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sigpwr.target"><span class="term"><code class="filename">sigpwr.target</code></span><a class="headerlink" title="Permalink to this term" href="#sigpwr.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sleep.target"><span class="term"><code class="filename">sleep.target</code></span><a class="headerlink" title="Permalink to this term" href="#sleep.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="slice.slice"><span class="term"><code class="filename"><em class="replaceable"><code>slice</code></em>.slice</code></span><a class="headerlink" title="Permalink to this term" href="#slice.slice">¶</a></dt><dd><p><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="smartcard.target"><span class="term"><code class="filename">smartcard.target</code></span><a class="headerlink" title="Permalink to this term" href="#smartcard.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="snapshot.snapshot"><span class="term"><code class="filename"><em class="replaceable"><code>snapshot</code></em>.snapshot</code></span><a class="headerlink" title="Permalink to this term" href="#snapshot.snapshot">¶</a></dt><dd><p><a href="systemd.snapshot.html"><span class="citerefentry"><span class="refentrytitle">systemd.snapshot</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="socket.socket"><span class="term"><code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code></span><a class="headerlink" title="Permalink to this term" href="#socket.socket">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="sockets.target"><span class="term"><code class="filename">sockets.target</code></span><a class="headerlink" title="Permalink to this term" href="#sockets.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sound.target"><span class="term"><code class="filename">sound.target</code></span><a class="headerlink" title="Permalink to this term" href="#sound.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="suspend.target"><span class="term"><code class="filename">suspend.target</code></span><a class="headerlink" title="Permalink to this term" href="#suspend.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="swap.swap"><span class="term"><code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code></span><a class="headerlink" title="Permalink to this term" href="#swap.swap">¶</a></dt><dd><p><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>, <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>, <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>, <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="swap.target"><span class="term"><code class="filename">swap.target</code></span><a class="headerlink" title="Permalink to this term" href="#swap.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="sysinit.target"><span class="term"><code class="filename">sysinit.target</code></span><a class="headerlink" title="Permalink to this term" href="#sysinit.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="syslog.socket"><span class="term"><code class="filename">syslog.socket</code></span><a class="headerlink" title="Permalink to this term" href="#syslog.socket">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="system-update.target"><span class="term"><code class="filename">system-update.target</code></span><a class="headerlink" title="Permalink to this term" href="#system-update.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="system.slice"><span class="term"><code class="filename">system.slice</code></span><a class="headerlink" title="Permalink to this term" href="#system.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="systemctl"><span class="term"><span class="command"><strong>systemctl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemctl">¶</a></dt><dd><p><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a></p></dd><dt id="systemd"><span class="term"><span class="command"><strong>systemd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd">¶</a></dt><dd><p><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a></p></dd><dt id="systemd-analyze"><span class="term"><span class="command"><strong>systemd-analyze</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-analyze">¶</a></dt><dd><p><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a></p></dd><dt id="systemd-ask-password"><span class="term"><span class="command"><strong>systemd-ask-password</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password">¶</a></dt><dd><p><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a></p></dd><dt id="systemd-ask-password-console.path"><span class="term"><code class="filename">systemd-ask-password-console.path</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-console.path">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-ask-password-console.service"><span class="term"><code class="filename">systemd-ask-password-console.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-console.service">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-ask-password-wall.path"><span class="term"><code class="filename">systemd-ask-password-wall.path</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-wall.path">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-ask-password-wall.service"><span class="term"><code class="filename">systemd-ask-password-wall.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-ask-password-wall.service">¶</a></dt><dd><p><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a></p></dd><dt id="systemd-backlight@.service"><span class="term"><code class="filename">systemd-backlight@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-backlight@.service">¶</a></dt><dd><p><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a></p></dd><dt id="systemd-binfmt.service"><span class="term"><code class="filename">systemd-binfmt.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-binfmt.service">¶</a></dt><dd><p><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a></p></dd><dt id="systemd-bus-proxyd.socket"><span class="term"><code class="filename">systemd-bus-proxyd.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-bus-proxyd.socket">¶</a></dt><dd><p><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a></p></dd><dt id="systemd-bus-proxyd@.service"><span class="term"><code class="filename">systemd-bus-proxyd@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-bus-proxyd@.service">¶</a></dt><dd><p><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a></p></dd><dt id="systemd-cat"><span class="term"><span class="command"><strong>systemd-cat</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-cat">¶</a></dt><dd><p><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a></p></dd><dt id="systemd-cgls"><span class="term"><span class="command"><strong>systemd-cgls</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-cgls">¶</a></dt><dd><p><a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a></p></dd><dt id="systemd-cgtop"><span class="term"><span class="command"><strong>systemd-cgtop</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-cgtop">¶</a></dt><dd><p><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a></p></dd><dt id="systemd-cryptsetup@.service"><span class="term"><code class="filename">systemd-cryptsetup@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-cryptsetup@.service">¶</a></dt><dd><p><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a></p></dd><dt id="systemd-delta"><span class="term"><span class="command"><strong>systemd-delta</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-delta">¶</a></dt><dd><p><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a></p></dd><dt id="systemd-detect-virt"><span class="term"><span class="command"><strong>systemd-detect-virt</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-detect-virt">¶</a></dt><dd><p><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a></p></dd><dt id="systemd-escape"><span class="term"><span class="command"><strong>systemd-escape</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-escape">¶</a></dt><dd><p><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a></p></dd><dt id="systemd-firstboot"><span class="term"><span class="command"><strong>systemd-firstboot</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-firstboot">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="systemd-firstboot.service"><span class="term"><code class="filename">systemd-firstboot.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-firstboot.service">¶</a></dt><dd><p><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a></p></dd><dt id="systemd-fsck-root.service"><span class="term"><code class="filename">systemd-fsck-root.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-fsck-root.service">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="systemd-fsck@.service"><span class="term"><code class="filename">systemd-fsck@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-fsck@.service">¶</a></dt><dd><p><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a></p></dd><dt id="systemd-halt.service"><span class="term"><code class="filename">systemd-halt.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-halt.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-hibernate-resume@.service"><span class="term"><code class="filename">systemd-hibernate-resume@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-hibernate-resume@.service">¶</a></dt><dd><p><a href="systemd-hibernate-resume@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume@.service</span>(8)</span></a></p></dd><dt id="systemd-hibernate.service"><span class="term"><code class="filename">systemd-hibernate.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-hibernate.service">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="systemd-hostnamed.service"><span class="term"><code class="filename">systemd-hostnamed.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-hostnamed.service">¶</a></dt><dd><p><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a></p></dd><dt id="systemd-hybrid-sleep.service"><span class="term"><code class="filename">systemd-hybrid-sleep.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-hybrid-sleep.service">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="systemd-inhibit"><span class="term"><span class="command"><strong>systemd-inhibit</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-inhibit">¶</a></dt><dd><p><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a></p></dd><dt id="systemd-initctl.service"><span class="term"><code class="filename">systemd-initctl.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-initctl.service">¶</a></dt><dd><p><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="systemd-initctl.socket"><span class="term"><code class="filename">systemd-initctl.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-initctl.socket">¶</a></dt><dd><p><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a></p></dd><dt id="systemd-journal-gatewayd.service"><span class="term"><code class="filename">systemd-journal-gatewayd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journal-gatewayd.service">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="systemd-journal-gatewayd.socket"><span class="term"><code class="filename">systemd-journal-gatewayd.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journal-gatewayd.socket">¶</a></dt><dd><p><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a></p></dd><dt id="systemd-journal-remote"><span class="term"><span class="command"><strong>systemd-journal-remote</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-journal-remote">¶</a></dt><dd><p><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a></p></dd><dt id="systemd-journal-upload"><span class="term"><span class="command"><strong>systemd-journal-upload</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-journal-upload">¶</a></dt><dd><p><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a></p></dd><dt id="systemd-journald-dev-log.socket"><span class="term"><code class="filename">systemd-journald-dev-log.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journald-dev-log.socket">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd-journald.service"><span class="term"><code class="filename">systemd-journald.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journald.service">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd-journald.socket"><span class="term"><code class="filename">systemd-journald.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-journald.socket">¶</a></dt><dd><p><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a></p></dd><dt id="systemd-kexec.service"><span class="term"><code class="filename">systemd-kexec.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-kexec.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-localed.service"><span class="term"><code class="filename">systemd-localed.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-localed.service">¶</a></dt><dd><p><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a></p></dd><dt id="systemd-logind.service"><span class="term"><code class="filename">systemd-logind.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-logind.service">¶</a></dt><dd><p><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a></p></dd><dt id="systemd-machine-id-setup"><span class="term"><span class="command"><strong>systemd-machine-id-setup</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-machine-id-setup">¶</a></dt><dd><p><a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a></p></dd><dt id="systemd-machined.service"><span class="term"><code class="filename">systemd-machined.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-machined.service">¶</a></dt><dd><p><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a></p></dd><dt id="systemd-modules-load.service"><span class="term"><code class="filename">systemd-modules-load.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-modules-load.service">¶</a></dt><dd><p><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a></p></dd><dt id="systemd-networkd-wait-online.service"><span class="term"><code class="filename">systemd-networkd-wait-online.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-networkd-wait-online.service">¶</a></dt><dd><p><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a></p></dd><dt id="systemd-networkd.service"><span class="term"><code class="filename">systemd-networkd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-networkd.service">¶</a></dt><dd><p><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a></p></dd><dt id="systemd-notify"><span class="term"><span class="command"><strong>systemd-notify</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-notify">¶</a></dt><dd><p><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a></p></dd><dt id="systemd-nspawn"><span class="term"><span class="command"><strong>systemd-nspawn</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-nspawn">¶</a></dt><dd><p><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></p></dd><dt id="systemd-path"><span class="term"><span class="command"><strong>systemd-path</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-path">¶</a></dt><dd><p><a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a></p></dd><dt id="systemd-poweroff.service"><span class="term"><code class="filename">systemd-poweroff.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-poweroff.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-quotacheck.service"><span class="term"><code class="filename">systemd-quotacheck.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-quotacheck.service">¶</a></dt><dd><p><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a></p></dd><dt id="systemd-random-seed.service"><span class="term"><code class="filename">systemd-random-seed.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-random-seed.service">¶</a></dt><dd><p><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a></p></dd><dt id="systemd-reboot.service"><span class="term"><code class="filename">systemd-reboot.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-reboot.service">¶</a></dt><dd><p><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a></p></dd><dt id="systemd-remount-fs.service"><span class="term"><code class="filename">systemd-remount-fs.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-remount-fs.service">¶</a></dt><dd><p><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a></p></dd><dt id="systemd-resolved.service"><span class="term"><code class="filename">systemd-resolved.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-resolved.service">¶</a></dt><dd><p><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a></p></dd><dt id="systemd-rfkill@.service"><span class="term"><code class="filename">systemd-rfkill@.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-rfkill@.service">¶</a></dt><dd><p><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a></p></dd><dt id="systemd-run"><span class="term"><span class="command"><strong>systemd-run</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-run">¶</a></dt><dd><p><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a></p></dd><dt id="systemd-shutdownd.service"><span class="term"><code class="filename">systemd-shutdownd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-shutdownd.service">¶</a></dt><dd><p><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a></p></dd><dt id="systemd-shutdownd.socket"><span class="term"><code class="filename">systemd-shutdownd.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-shutdownd.socket">¶</a></dt><dd><p><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a></p></dd><dt id="systemd-socket-proxyd"><span class="term"><span class="command"><strong>systemd-socket-proxyd</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-socket-proxyd">¶</a></dt><dd><p><a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a></p></dd><dt id="systemd-suspend.service"><span class="term"><code class="filename">systemd-suspend.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-suspend.service">¶</a></dt><dd><p><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a></p></dd><dt id="systemd-sysctl.service"><span class="term"><code class="filename">systemd-sysctl.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-sysctl.service">¶</a></dt><dd><p><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a></p></dd><dt id="systemd-sysusers"><span class="term"><span class="command"><strong>systemd-sysusers</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-sysusers">¶</a></dt><dd><p><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a></p></dd><dt id="systemd-sysusers.service"><span class="term"><code class="filename">systemd-sysusers.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-sysusers.service">¶</a></dt><dd><p><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a></p></dd><dt id="systemd-timedated.service"><span class="term"><code class="filename">systemd-timedated.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-timedated.service">¶</a></dt><dd><p><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a></p></dd><dt id="systemd-timesyncd.service"><span class="term"><code class="filename">systemd-timesyncd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-timesyncd.service">¶</a></dt><dd><p><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles"><span class="term"><span class="command"><strong>systemd-tmpfiles</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-clean.service"><span class="term"><code class="filename">systemd-tmpfiles-clean.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-clean.service">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-clean.timer"><span class="term"><code class="filename">systemd-tmpfiles-clean.timer</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-clean.timer">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-setup-dev.service"><span class="term"><code class="filename">systemd-tmpfiles-setup-dev.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-setup-dev.service">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tmpfiles-setup.service"><span class="term"><code class="filename">systemd-tmpfiles-setup.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-tmpfiles-setup.service">¶</a></dt><dd><p><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a></p></dd><dt id="systemd-tty-ask-password-agent"><span class="term"><span class="command"><strong>systemd-tty-ask-password-agent</strong></span></span><a class="headerlink" title="Permalink to this term" href="#systemd-tty-ask-password-agent">¶</a></dt><dd><p><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a></p></dd><dt id="systemd-udevd-control.socket"><span class="term"><code class="filename">systemd-udevd-control.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-udevd-control.socket">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="systemd-udevd-kernel.socket"><span class="term"><code class="filename">systemd-udevd-kernel.socket</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-udevd-kernel.socket">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="systemd-udevd.service"><span class="term"><code class="filename">systemd-udevd.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-udevd.service">¶</a></dt><dd><p><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></dd><dt id="systemd-update-done.service"><span class="term"><code class="filename">systemd-update-done.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-update-done.service">¶</a></dt><dd><p><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a></p></dd><dt id="systemd-update-utmp-runlevel.service"><span class="term"><code class="filename">systemd-update-utmp-runlevel.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-update-utmp-runlevel.service">¶</a></dt><dd><p><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a></p></dd><dt id="systemd-update-utmp.service"><span class="term"><code class="filename">systemd-update-utmp.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-update-utmp.service">¶</a></dt><dd><p><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a></p></dd><dt id="systemd-user-sessions.service"><span class="term"><code class="filename">systemd-user-sessions.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-user-sessions.service">¶</a></dt><dd><p><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a></p></dd><dt id="systemd-vconsole-setup.service"><span class="term"><code class="filename">systemd-vconsole-setup.service</code></span><a class="headerlink" title="Permalink to this term" href="#systemd-vconsole-setup.service">¶</a></dt><dd><p><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a></p></dd><dt id="target.target"><span class="term"><code class="filename"><em class="replaceable"><code>target</code></em>.target</code></span><a class="headerlink" title="Permalink to this term" href="#target.target">¶</a></dt><dd><p><a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="telinit"><span class="term"><span class="command"><strong>telinit</strong></span></span><a class="headerlink" title="Permalink to this term" href="#telinit">¶</a></dt><dd><p><a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a></p></dd><dt id="time-sync.target"><span class="term"><code class="filename">time-sync.target</code></span><a class="headerlink" title="Permalink to this term" href="#time-sync.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="timedatectl"><span class="term"><span class="command"><strong>timedatectl</strong></span></span><a class="headerlink" title="Permalink to this term" href="#timedatectl">¶</a></dt><dd><p><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a></p></dd><dt id="timer.timer"><span class="term"><code class="filename"><em class="replaceable"><code>timer</code></em>.timer</code></span><a class="headerlink" title="Permalink to this term" href="#timer.timer">¶</a></dt><dd><p><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a>, <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a></p></dd><dt id="timers.target"><span class="term"><code class="filename">timers.target</code></span><a class="headerlink" title="Permalink to this term" href="#timers.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="udevadm"><span class="term"><span class="command"><strong>udevadm</strong></span></span><a class="headerlink" title="Permalink to this term" href="#udevadm">¶</a></dt><dd><p><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a></p></dd><dt id="umount.target"><span class="term"><code class="filename">umount.target</code></span><a class="headerlink" title="Permalink to this term" href="#umount.target">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd><dt id="user.slice"><span class="term"><code class="filename">user.slice</code></span><a class="headerlink" title="Permalink to this term" href="#user.slice">¶</a></dt><dd><p><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a></p></dd></dl></div></div><div class="refsect1"><a name="idm214186468944"></a><h2 id="Colophon">Colophon<a class="headerlink" title="Permalink to this headline" href="#Colophon">¶</a></h2><p><a name="colophon"></a>This index contains 1709 entries in 14 sections,
+referring to 189 individual manual pages.
 </p></div></div></body></html>
index fc62099bce75607f466cb1aa617d1c77f0525b3f..c7750bb08fbe818e9608d5bf2867f05b964a51ce 100644 (file)
@@ -68,6 +68,8 @@
 
 <varlistentry><term><varname>BusName=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>BusPolicy=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>CPUAccounting=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>CPUAffinity=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>ConditionFileNotEmpty=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>ConditionFirstBoot=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>ConditionHost=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>ConditionKernelCommandLine=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>DefaultInstance=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>DeferAcceptSec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Description=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>DeviceAllow=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>InaccessibleDirectories=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>JobTimeoutAction=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>JobTimeoutRebootArgument=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>JobTimeoutSec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>JoinsNamespaceOf=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>KeepAlive=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>KeepAliveIntervalSec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>KeepAliveProbes=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>KeepAliveTimeSec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>KillMode=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>KillSignal=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>Nice=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>NoDelay=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>NoNewPrivileges=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>NonBlocking=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>OnUnitInactiveSec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><varname>Options=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><varname>Options=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>PAMName=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><varname>SELinuxContext=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>SELinuxContextFromNet=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>SecureBits=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>SendBuffer=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>modules-load=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>mount.usr=</varname></term><listitem><para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>mount.usrflags=</varname></term><listitem><para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>mount.usrfstype=</varname></term><listitem><para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>net.ifnames=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>plymouth.enable=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>rd.udev.children-max=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>rd.udev.event-timeout=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>rd.udev.exec-delay=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>rd.udev.log-priority=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>rescue</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>resume=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>ro</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><varname>root=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><varname>root=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>rootflags=</varname></term><listitem><para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>rootfsflags=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><varname>rootfstype=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><varname>rootfstype=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>rw</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><varname>udev.children-max=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>udev.event-timeout=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>udev.exec-delay=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>udev.log-priority=</varname></term><listitem><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>WAIT_FOR</varname></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>event_timeout=</option></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><option>link_priority=</option></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>nowatch</option></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>DiscoverPathMTU=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>Domains=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>DownDelaySec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Driver=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>Duplex=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>FallbackDNS=</varname></term><listitem><para><citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>FallbackNTP=</varname></term><listitem><para><citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Gateway=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>Group=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>IPv4LL=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>IPv4LLRoute=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Id=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>KernelCommandLine=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>Kind=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>LACPTransmitRate=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>LLMNR=</varname></term><listitem><para><citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Label=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>Local=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>MACVLAN=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>MIIMonitorSec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>MTUBytes=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>MacLearning=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>Metric=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Mode=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>MultiQueue=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>NTP=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Name=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>NamePolicy=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>Path=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>Peer=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Remote=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>RequestBroadcast=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><varname>RouteMetric=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>SendHostname=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>TOS=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>TTL=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>TransmitHashPolicy=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Tunnel=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>Type=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>UpDelaySec=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>UseDNS=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>UseDomains=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>UseHostname=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>UseMTU=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>VXLAN=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>VendorClassIdentifier=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>Virtualization=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>WakeOnLan=</varname></term><listitem><para><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>x-systemd.automount</option></term><listitem><para><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>x-systemd.device-timeout=</option></term><listitem><para><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>x-systemd.device-timeout=</option></term><listitem><para><citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 </variablelist>
         </refsect1>
 
 <varlistentry><term><option>--after</option></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--after-cursor=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--after-cursor=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--all</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--control-group</option></term><listitem><para><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--copy</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--copy-locale</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--copy-root-password</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--copy-timezone</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--crash-shell</option></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--create</option></term><listitem><para><citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--cursor=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--cursor=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--daemon</option></term><listitem><para><citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--diff=</option></term><listitem><para><citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--directory=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--directory=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--disk-usage</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--dump-core</option></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--echo</option></term><listitem><para><citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--entropy</option></term><listitem><para><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--event-timeout=</option></term><listitem><para><citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--exclude-prefix=</option></term><listitem><para><citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--exec-delay=</option></term><listitem><para><citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--field=</option></term><listitem><para><citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--file-size-max=</option></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><option>--file=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--file=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--files-max=</option></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--flush</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--follow</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--header</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--help</option></term><listitem><para><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>runlevel</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--help</option></term><listitem><para><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>runlevel</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--host=</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--hostname=</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--icon=</option></term><listitem><para><citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--identifier=</option></term><listitem><para><citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--identifier=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--ignore-inhibitors</option></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--listen=</option></term><listitem><para><citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--locale-messages=</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--locale=</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--log-color=</option></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--log-level=</option></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--log-target=</option></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--machine-id=</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--machine=</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--mangle</option></term><listitem><para><citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--match=</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--merge</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--merge</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--mode=</option></term><listitem><para><citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--no-legend</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--no-man</option></term><listitem><para><citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--no-pager</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--no-reload</option></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--parent-match=</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--path</option></term><listitem><para><citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--path=</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--personality=</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--private-network</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--privileged</option></term><listitem><para><citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--prompt</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--prompt-hostname</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--prompt-locale</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--prompt-root-password</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--prompt-timezone</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--property</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--read-only</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--readahead=</option></term><listitem><para><citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><option>--ready</option></term><listitem><para><citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--reboot</option></term><listitem><para><citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--root</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--root=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--root-password-file=</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--root-password=</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--root=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--runtime</option></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--sample</option></term><listitem><para><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--save-state</option></term><listitem><para><citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--scale-x</option></term><listitem><para><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--scale-y</option></term><listitem><para><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--setup-keys</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--setup-machine-id</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--share-system</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--show-cursor</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--slice=</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--split-mode</option></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--start-exec-queue</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--state=</option></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--subsystem-nomatch=</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--suffix=</option></term><listitem><para><citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--suffix=</option></term><listitem><para><citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--sysname-match=</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--system</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--system</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--tag-match=</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--template=</option></term><listitem><para><citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--test</option></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--test=</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--timeout=</option></term><listitem><para><citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--timeout=</option></term><listitem><para><citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--timezone=</option></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--tmpfs=</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>--uid=</option></term><listitem><para><citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--unescape</option></term><listitem><para><citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--unique</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--unit=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--update-catalog</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--url=</option></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--url=</option></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--user</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--user</option></term><listitem><para><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--user-unit=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--user=</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--usr</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><option>--utc</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--uuid=</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--verbose</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--verify-key=</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>--version</option></term><listitem><para><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>--version</option></term><listitem><para><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--vm</option></term><listitem><para><citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><option>--volatile</option></term><listitem><para><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><option>--wall</option></term><listitem><para><citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>--watch</option></term><listitem><para><citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-C</option></term><listitem><para><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>-D</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>-D</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-E</option></term><listitem><para><citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>-N</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>-P</option></term><listitem><para><citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>-P</option></term><listitem><para><citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-R</option></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>-g</option></term><listitem><para><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>-h</option></term><listitem><para><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>-h</option></term><listitem><para><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-i</option></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-networkd-wait-online.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>-l</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>-m</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>-m</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-n</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-o</option></term><listitem><para><citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>-p</option></term><listitem><para><citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>-p</option></term><listitem><para><citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-q</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><option>-s</option></term><listitem><para><citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>-t</option></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>-t</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><option>-u</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><option>-u</option></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><option>-v</option></term><listitem><para><citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><constant>-1</constant></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>-ECHILD</constant></term><listitem><para><citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><constant>-EADDRINUSE</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-EALREADY</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-EBUSY</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ECHILD</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-EEXIST</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-EINVAL</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_set_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>-ENODATA</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><constant>-EMFILE</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>-ENXIO</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><constant>-ENODATA</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ENOENT</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ENOMEM</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_set_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ENOTCONN</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ENOTSUP</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ENXIO</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-EPERM</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ESRCH</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>-ESTALE</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>0</constant></term><listitem><para><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><constant>EUCLEAN</constant></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><constant>IP_FREEBIND</constant></term><listitem><para><citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><constant>LOG_ALERT</constant></term><listitem><para><citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>LOG_CRIT</constant></term><listitem><para><citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>LOG_WARNING</constant></term><listitem><para><citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>NUL</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><constant>NUL</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_set_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>NULL</constant></term><listitem><para><citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><constant>NULL</constant></term><listitem><para><citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_set_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>O_NONBLOCK</constant></term><listitem><para><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><constant>POLLOUT</constant></term><listitem><para><citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><constant>RLIMIT_NOFILE</constant></term><listitem><para><citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><constant>SD_BUS_CREDS_AUDIT_LOGIN_UID</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>SD_BUS_CREDS_AUDIT_SESSION_ID</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>SD_BUS_TYPE_VARIANT</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><constant>SD_EVENT_ON</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>SD_EVENT_ONESHOT</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><constant>SD_JOURNAL_APPEND</constant></term><listitem><para><citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>SD_JOURNAL_CURRENT_USER</constant></term><listitem><para><citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>SIGRTMIN+28</constant></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>SIGRTMIN+29</constant></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><constant>SIGRTMIN+3</constant></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>SIGRTMIN+4</constant></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>SOCK_STREAM</constant></term><listitem><para><citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><constant>TCP_DEFER_ACCEPT</constant></term><listitem><para><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>WCONTINUED</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>WEXITED</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>WSTOPPED</constant></term><listitem><para><citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>_NSIG</constant></term><listitem><para><citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><constant>_SD_BUS_CREDS_ALL</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>all</constant></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>false</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><constant>host</constant></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><constant>https</constant></term><listitem><para><citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><constant>late</constant></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>libsystemd</constant></term><listitem><para><citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><constant>libsystemd</constant></term><listitem><para><citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_set_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_machine_get_class</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>libsystemd-bus</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><constant>never</constant></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><constant>none</constant></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><constant>path</constant></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><constant>property</constant></term><listitem><para><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
                 <variablelist id="miscellaneous"><varlistentry><term><varname>$LISTEN_FDS</varname></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><varname>-EADDRINUSE</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-EALREADY</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><constant>-ECHILD</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-EEXIST</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-EINVAL</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-EMFILE</varname></term><listitem><para><citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><constant>-ENODATA</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-ENOENT</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-ENOMEM</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-ENOTCONN</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-ENOTSUP</varname></term><listitem><para><citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><constant>-ENXIO</constant></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-EPERM</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-ESRCH</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><varname>-ESTALE</varname></term><listitem><para><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><varname>ANSI_COLOR=</varname></term><listitem><para><citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>BUG_REPORT_URL=</varname></term><listitem><para><citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>D</varname></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>DEPLOYMENT=</varname></term><listitem><para><citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>ExternalSizeMax=</varname></term><listitem><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>F</varname></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>HandleLidSwitch=</varname></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>HandleLidSwitchDocked=</varname></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>HandlePowerKey=</varname></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>HandleSuspendKey=</varname></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>L+</varname></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><varname>LOCATION=</varname></term><listitem><para><citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><varname>LidSwitchIgnoreInhibited=</varname></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>MaxFileSec=</varname></term><listitem><para><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>p+</varname></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><constant>r</constant></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><constant>r</constant></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>redirected</varname></term><listitem><para><citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><varname>u</varname></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><varname>udev_log</varname></term><listitem><para><citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><varname>udev_log</varname></term><listitem><para><citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><varname>unchanged</varname></term><listitem><para><citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>$HOME/.config/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>$HOME/.local/share/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>$XDG_CONFIG_HOME/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>-.slice</filename></term><listitem><para><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>$XDG_DATA_HOME/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/.readahead</filename></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>$XDG_RUNTIME_DIR/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><filename>-.slice</filename></term><listitem><para><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/bin</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/dev/console</filename></term><listitem><para><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-getty-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/dev/disk/by-foo/bar</filename></term><listitem><para><citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/dev/full</filename></term><listitem><para><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/dev/hw_random</filename></term><listitem><para><citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/dev/net/tun</filename></term><listitem><para><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/dev/null</filename></term><listitem><para><citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/dev/null</filename></term><listitem><para><citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/dev/random</filename></term><listitem><para><citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/dev/zero</filename></term><listitem><para><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/etc</filename></term><listitem><para><citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/etc</filename></term><listitem><para><citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/.updated</filename></term><listitem><para><citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/etc/passwd</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/etc/resolv.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/etc/resolv.conf</filename></term><listitem><para><citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/sysctl.d/</filename></term><listitem><para><citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/etc/systemd/coredump.conf</filename></term><listitem><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/etc/systemd/journal-remote.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><filename>/etc/systemd/journal-upload.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/etc/systemd/journald.conf</filename></term><listitem><para><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/systemd/logind.conf</filename></term><listitem><para><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/systemd/system.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/etc/systemd/timesyncd.conf</filename></term><listitem><para><citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/etc/systemd/user/</filename></term><listitem><para><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/systemd/user-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/systemd/user.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/etc/sysusers.d</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/etc/tmpfiles.d</filename></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/tmpfiles.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/udev/hwdb.bin</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/etc/udev/hwdb.d</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/etc/udev/hwdb.d</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/udev/rules.d</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/etc/udev/rules.d/99-bridge.conf</filename></term><listitem><para><citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/etc/udev/rules.d/99-bridge.rules</filename></term><listitem><para><citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/etc/udev/udev.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/etc/udev/udev.conf</filename></term><listitem><para><citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/etc/vconsole.conf</filename></term><listitem><para><citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/run/systemd/journal/syslog</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/run/systemd/log</filename></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/run/systemd/network</filename></term><listitem><para><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/run/systemd/notify</filename></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/run/systemd/private</filename></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/run/systemd/readahead/</filename></term><listitem><para><citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><filename>/run/systemd/resolve/resolv.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/run/systemd/shutdownd</filename></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/run/systemd/user-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/run/sysusers.d</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/run/tmpfiles.d</filename></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/run/tmpfiles.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/sbin/init</filename></term><listitem><para><citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/sbin/login</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/sbin/nologin</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/srv</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/sys/power/disk</filename></term><listitem><para><citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/sys/power/resume</filename></term><listitem><para><citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/sys/power/state</filename></term><listitem><para><citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/sysroot</filename></term><listitem><para><citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/upload</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/usr</filename></term><listitem><para><citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-remount-fs.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/usr</filename></term><listitem><para><citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-remount-fs.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/bin</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/usr/lib/sysctl.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/usr/lib/sysctl.d/50-coredump.conf</filename></term><listitem><para><citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/usr/lib/systemd/network</filename></term><listitem><para><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/system</filename></term><listitem><para><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></term><listitem><para><citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator</filename></term><listitem><para><citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/usr/lib/systemd/system-generators/systemd-system-update-generator</filename></term><listitem><para><citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/system-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/system-shutdown/</filename></term><listitem><para><citerefentry><refentrytitle>systemd-halt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/usr/lib/systemd/system-sleep/</filename></term><listitem><para><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/usr/lib/systemd/system-sleep</filename></term><listitem><para><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><command>/usr/lib/systemd/systemd-activate</command></term><listitem><para><citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><command>/usr/lib/systemd/systemd-bus-proxyd</command></term><listitem><para><citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/usr/lib/systemd/systemd-coredump</filename></term><listitem><para><citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/usr/lib/systemd/systemd-cryptsetup</filename></term><listitem><para><citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/systemd-fsck</filename></term><listitem><para><citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/usr/lib/systemd/systemd-hibernate-resume</filename></term><listitem><para><citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/usr/lib/systemd/systemd-hostnamed</filename></term><listitem><para><citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/systemd-initctl</filename></term><listitem><para><citerefentry><refentrytitle>systemd-initctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/systemd-random-seed</filename></term><listitem><para><citerefentry><refentrytitle>systemd-random-seed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><command>/usr/lib/systemd/systemd-readahead/systemd-readahead</command></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><filename>/usr/lib/systemd/systemd-remount-fs</filename></term><listitem><para><citerefentry><refentrytitle>systemd-remount-fs.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/systemd-resolved</filename></term><listitem><para><citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/systemd-shutdownd</filename></term><listitem><para><citerefentry><refentrytitle>systemd-shutdownd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/usr/lib/systemd/systemd-sleep</filename></term><listitem><para><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><filename>/usr/lib/systemd/systemd-sysctl</filename></term><listitem><para><citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/systemd-timedated</filename></term><listitem><para><citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/systemd/user-preset/*.preset</filename></term><listitem><para><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/usr/lib/sysusers.d/</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/usr/lib/sysusers.d</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/sysusers.d/*.conf</filename></term><listitem><para><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/usr/lib/udev</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/usr/lib/udev/hwdb.bin</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/usr/lib/udev/hwdb.d</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/usr/lib/udev/rules.d</filename></term><listitem><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/var/lib/systemd/backlight/</filename></term><listitem><para><citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/var/lib/systemd/coredump</filename></term><listitem><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/var/lib/systemd/coredump</filename></term><listitem><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><filename>/var/lib/systemd/journal-upload/state</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/var/lib/systemd/random-seed</filename></term><listitem><para><citerefentry><refentrytitle>systemd-random-seed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/var/log</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>/var/log/journal</filename></term><listitem><para><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+<varlistentry><term><filename>/var/log/journal</filename></term><listitem><para><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><filename>/var/log/journal/remote/</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>/var/log/journal/some.host/remote-some~host.journal</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 
 <varlistentry><term><filename>/var/spool</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>/var/systemd/log</filename></term><listitem><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>/var/tmp</filename></term><listitem><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename><replaceable>automount</replaceable>.automount</filename></term><listitem><para><citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><command>systemd-detect-virt</command></term><listitem><para><citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><command>systemd-escape</command></term><listitem><para><citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><command>systemd-firstboot</command></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
+<varlistentry><term><filename>systemd-firstboot.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>systemd-fsck-root.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>systemd-fsck@.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>systemd-halt.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-halt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><filename>systemd-hibernate-resume@.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>systemd-hibernate.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>systemd-hostnamed.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><command>systemd-journal-remote</command></term><listitem><para><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
+<varlistentry><term><command>systemd-journal-upload</command></term><listitem><para><citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
+
 <varlistentry><term><filename>systemd-journald-dev-log.socket</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>systemd-journald.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>systemd-random-seed.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-random-seed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
-<varlistentry><term><filename>systemd-readahead-collect.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><filename>systemd-readahead-done.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><filename>systemd-readahead-done.timer</filename></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-
-<varlistentry><term><filename>systemd-readahead-replay.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
-
 <varlistentry><term><filename>systemd-reboot.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-halt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
 <varlistentry><term><filename>systemd-remount-fs.service</filename></term><listitem><para><citerefentry><refentrytitle>systemd-remount-fs.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></para></listitem></varlistentry>
 
         <refsect1>
                 <title>Colophon</title>
-                <para id="colophon">This index contains 1621 entries in 14 sections,
-referring to 177 individual manual pages.
+                <para id="colophon">This index contains 1709 entries in 14 sections,
+referring to 189 individual manual pages.
 </para>
         </refsect1>
 </refentry>
index 29202e82220b80ba15a198789153f4d44b9a1e47..9c8271020d7668f449c02e211cddfbfd6d4055c0 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.EXEC" "5" "" "systemd 215" "systemd.exec"
+.TH "SYSTEMD\&.EXEC" "5" "" "systemd 217" "systemd.exec"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -190,26 +190,36 @@ Controls where file descriptor 0 (STDIN) of the executed processes is connected
 \fBtty\-force\fR,
 \fBtty\-fail\fR
 or
-\fBsocket\fR\&. If
+\fBsocket\fR\&.
+.sp
+If
 \fBnull\fR
 is selected, standard input will be connected to
-/dev/null, i\&.e\&. all read attempts by the process will result in immediate EOF\&. If
+/dev/null, i\&.e\&. all read attempts by the process will result in immediate EOF\&.
+.sp
+If
 \fBtty\fR
 is selected, standard input is connected to a TTY (as configured by
 \fITTYPath=\fR, see below) and the executed process becomes the controlling process of the terminal\&. If the terminal is already being controlled by another process, the executed process waits until the current controlling process releases the terminal\&.
+.sp
 \fBtty\-force\fR
 is similar to
 \fBtty\fR, but the executed process is forcefully and immediately made the controlling process of the terminal, potentially removing previous controlling processes from the terminal\&.
+.sp
 \fBtty\-fail\fR
 is similar to
 \fBtty\fR
-but if the terminal already has a controlling process start\-up of the executed process fails\&. The
+but if the terminal already has a controlling process start\-up of the executed process fails\&.
+.sp
+The
 \fBsocket\fR
 option is only valid in socket\-activated services, and only when the socket configuration file (see
 \fBsystemd.socket\fR(5)
 for details) specifies a single socket only\&. If this option is set, standard input will be connected to the socket the service was activated from, which is primarily useful for compatibility with daemons designed for use with the traditional
 \fBinetd\fR(8)
-daemon\&. This setting defaults to
+daemon\&.
+.sp
+This setting defaults to
 \fBnull\fR\&.
 .RE
 .PP
@@ -219,38 +229,52 @@ Controls where file descriptor 1 (STDOUT) of the executed processes is connected
 \fBinherit\fR,
 \fBnull\fR,
 \fBtty\fR,
+\fBjournal\fR,
 \fBsyslog\fR,
 \fBkmsg\fR,
-\fBjournal\fR,
+\fBjournal+console\fR,
 \fBsyslog+console\fR,
-\fBkmsg+console\fR,
-\fBjournal+console\fR
+\fBkmsg+console\fR
 or
-\fBsocket\fR\&. If set to
-\fBinherit\fR, the file descriptor of standard input is duplicated for standard output\&. If set to
-\fBnull\fR, standard output will be connected to
-/dev/null, i\&.e\&. everything written to it will be lost\&. If set to
-\fBtty\fR, standard output will be connected to a tty (as configured via
+\fBsocket\fR\&.
+.sp
+\fBinherit\fR
+duplicates the file descriptor of standard input for standard output\&.
+.sp
+\fBnull\fR
+connects standard output to
+/dev/null, i\&.e\&. everything written to it will be lost\&.
+.sp
+\fBtty\fR
+connects standard output to a tty (as configured via
 \fITTYPath=\fR, see below)\&. If the TTY is used for output only, the executed process will not become the controlling process of the terminal, and will not fail or wait for other processes to release the terminal\&.
+.sp
+\fBjournal\fR
+connects standard output with the journal which is accessible via
+\fBjournalctl\fR(1)\&. Note that everything that is written to syslog or kmsg (see below) is implicitly stored in the journal as well, the specific two options listed below are hence supersets of this one\&.
+.sp
 \fBsyslog\fR
 connects standard output to the
 \fBsyslog\fR(3)
-system syslog service\&.
+system syslog service, in addition to the journal\&. Note that the journal daemon is usually configured to forward everything it receives to syslog anyway, in which case this option is no different from
+\fBjournal\fR\&.
+.sp
 \fBkmsg\fR
-connects it with the kernel log buffer which is accessible via
-\fBdmesg\fR(1)\&.
-\fBjournal\fR
-connects it with the journal which is accessible via
-\fBjournalctl\fR(1)
-(Note that everything that is written to syslog or kmsg is implicitly stored in the journal as well, those options are hence supersets of this one)\&.
-\fBsyslog+console\fR,
-\fBjournal+console\fR
+connects standard output with the kernel log buffer which is accessible via
+\fBdmesg\fR(1), in addition to the journal\&. The journal daemon might be configured to send all logs to kmsg anyway, in which case this option is no different from
+\fBjournal\fR\&.
+.sp
+\fBjournal+console\fR,
+\fBsyslog+console\fR
 and
 \fBkmsg+console\fR
-work similarly but copy the output to the system console as well\&.
+work in a similar way as the three options above but copy the output to the system console as well\&.
+.sp
 \fBsocket\fR
-connects standard output to a socket from socket activation, semantics are similar to the respective option of
-\fIStandardInput=\fR\&. This setting defaults to the value set with
+connects standard output to a socket acquired via socket activation\&. The semantics are similar to the same option of
+\fIStandardInput=\fR\&.
+.sp
+This setting defaults to the value set with
 \fBDefaultStandardOutput=\fR
 in
 \fBsystemd-system.conf\fR(5), which defaults to
@@ -301,14 +325,17 @@ is a virtual console terminal, try to deallocate the TTY before and after execut
 .PP
 \fISyslogIdentifier=\fR
 .RS 4
-Sets the process name to prefix log lines sent to syslog or the kernel log buffer with\&. If not set, defaults to the process name of the executed process\&. This option is only useful when
+Sets the process name to prefix log lines sent to the logging system or the kernel log buffer with\&. If not set, defaults to the process name of the executed process\&. This option is only useful when
 \fIStandardOutput=\fR
 or
 \fIStandardError=\fR
 are set to
-\fBsyslog\fR
+\fBsyslog\fR,
+\fBjournal\fR
 or
-\fBkmsg\fR\&.
+\fBkmsg\fR
+(or to the same settings in combination with
+\fB+console\fR)\&.
 .RE
 .PP
 \fISyslogFacility=\fR
@@ -427,16 +454,15 @@ does\&. If this option is not used, the capability bounding set is not modified
 .PP
 \fISecureBits=\fR
 .RS 4
-Controls the secure bits set for the executed process\&. See
-\fBcapabilities\fR(7)
-for details\&. Takes a list of strings:
+Controls the secure bits set for the executed process\&. Takes a space\-separated combination of options from the following list:
 \fBkeep\-caps\fR,
 \fBkeep\-caps\-locked\fR,
 \fBno\-setuid\-fixup\fR,
 \fBno\-setuid\-fixup\-locked\fR,
-\fBnoroot\fR
-and/or
-\fBnoroot\-locked\fR\&. This option may appear more than once in which case the secure bits are ORed\&. If the empty string is assigned to this option, the bits are reset to 0\&.
+\fBnoroot\fR, and
+\fBnoroot\-locked\fR\&. This option may appear more than once in which case the secure bits are ORed\&. If the empty string is assigned to this option, the bits are reset to 0\&. See
+\fBcapabilities\fR(7)
+for details\&.
 .RE
 .PP
 \fICapabilities=\fR
@@ -446,7 +472,7 @@ Controls the
 set for the executed process\&. Take a capability string describing the effective, permitted and inherited capability sets as documented in
 \fBcap_from_text\fR(3)\&. Note that these capability sets are usually influenced (and filtered) by the capabilities attached to the executed file\&. Due to that
 \fICapabilityBoundingSet=\fR
-is probably the much more useful setting\&.
+is probably a much more useful setting\&.
 .RE
 .PP
 \fIReadWriteDirectories=\fR, \fIReadOnlyDirectories=\fR, \fIInaccessibleDirectories=\fR
@@ -536,7 +562,7 @@ Takes a boolean argument or
 and
 /run/user
 are made inaccessible and empty for processes invoked by this unit\&. If set to
-"read\-only", the two directores are made read\-only instead\&. It is recommended to enable this setting for all long\-running services (in particular network\-facing ones), to ensure they cannot get access to private user data, unless the services actually require access to the user\*(Aqs private data\&. Note however that processes retaining the CAP_SYS_ADMIN capability can undo the effect of this setting\&. This setting is hence particularly useful for daemons which have this capability removed, for example with
+"read\-only", the two directories are made read\-only instead\&. It is recommended to enable this setting for all long\-running services (in particular network\-facing ones), to ensure they cannot get access to private user data, unless the services actually require access to the user\*(Aqs private data\&. Note however that processes retaining the CAP_SYS_ADMIN capability can undo the effect of this setting\&. This setting is hence particularly useful for daemons which have this capability removed, for example with
 \fICapabilityBoundingSet=\fR\&. Defaults to off\&.
 .RE
 .PP
@@ -557,10 +583,10 @@ to run processes so that none of their mounts and unmounts will propagate to the
 \fBprivate\fR
 to also ensure that no mounts and unmounts from the host will propagate into the unit processes\*(Aq namespace\&. Note that
 \fBslave\fR
-means that file systems mounted on the host might stay mounted continously in the unit\*(Aqs namespace, and thus keep the device busy\&. Note that the file system namespace related options (\fIPrivateTmp=\fR,
+means that file systems mounted on the host might stay mounted continuously in the unit\*(Aqs namespace, and thus keep the device busy\&. Note that the file system namespace related options (\fIPrivateTmp=\fR,
 \fIPrivateDevices=\fR,
-\fIReadOnlySystem=\fR,
-\fIProtectedHome=\fR,
+\fIProtectSystem=\fR,
+\fIProtectHome=\fR,
 \fIReadOnlyDirectories=\fR,
 \fIInaccessibleDirectories=\fR
 and
@@ -800,7 +826,7 @@ options above; to specify variables globally, use
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBjournalctl\fR(8),
 \fBsystemd.unit\fR(5),
 \fBsystemd.service\fR(5),
index e5376b908377f7841752c0ed5d5d0681fad3c3d1..b3c49b01667194611262736670e4b62b3afdf3ef 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.exec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.exec — Execution environment configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.exec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.exec — Execution environment configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
                 <code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code>,
                 <code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code>,
-                <code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code></p></div><div class="refsect1"><a name="idm214176829472"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Unit configuration files for services, sockets,
+                <code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code></p></div><div class="refsect1"><a name="idm214199554128"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Unit configuration files for services, sockets,
                 mount points, and swap devices share a subset of
                 configuration options which define the execution
                 environment of spawned processes.</p><p>This man page lists the configuration options
@@ -39,7 +39,7 @@
                 configuration files. The execution specific
                 configuration options are configured in the [Service],
                 [Socket], [Mount], or [Swap] sections, depending on the unit
-                type.</p></div><div class="refsect1"><a name="idm214178282400"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="WorkingDirectory="><span class="term"><code class="varname">WorkingDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#WorkingDirectory=">¶</a></dt><dd><p>Takes an absolute
+                type.</p></div><div class="refsect1"><a name="idm214199547648"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="WorkingDirectory="><span class="term"><code class="varname">WorkingDirectory=</code></span><a class="headerlink" title="Permalink to this term" href="#WorkingDirectory=">¶</a></dt><dd><p>Takes an absolute
                                 directory path. Sets the working
                                 directory for executed processes. If
                                 not set, defaults to the root directory
@@ -50,7 +50,7 @@
                                 directory path. Sets the root
                                 directory for executed processes, with
                                 the
-                                <a href="chroot.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/chroot.2.html"><span class="citerefentry"><span class="refentrytitle">chroot</span>(2)</span></a>
                                 system call. If this is used, it must
                                 be ensured that the process and all
                                 its auxiliary files are available in
@@ -80,7 +80,7 @@
                                 executed processes. Takes an integer
                                 between -20 (highest priority) and 19
                                 (lowest priority). See
-                                <a href="setpriority.html"><span class="citerefentry"><span class="refentrytitle">setpriority</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/setpriority.2.html"><span class="citerefentry"><span class="refentrytitle">setpriority</span>(2)</span></a>
                                 for details.</p></dd><dt id="OOMScoreAdjust="><span class="term"><code class="varname">OOMScoreAdjust=</code></span><a class="headerlink" title="Permalink to this term" href="#OOMScoreAdjust=">¶</a></dt><dd><p>Sets the adjustment
                                 level for the Out-Of-Memory killer for
                                 executed processes. Takes an integer
@@ -95,7 +95,7 @@
                                 <code class="option">realtime</code>,
                                 <code class="option">best-effort</code> or
                                 <code class="option">idle</code>. See
-                                <a href="ioprio_set.html"><span class="citerefentry"><span class="refentrytitle">ioprio_set</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/ioprio_set.2.html"><span class="citerefentry"><span class="refentrytitle">ioprio_set</span>(2)</span></a>
                                 for details.</p></dd><dt id="IOSchedulingPriority="><span class="term"><code class="varname">IOSchedulingPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#IOSchedulingPriority=">¶</a></dt><dd><p>Sets the IO scheduling
                                 priority for executed processes. Takes
                                 an integer between 0 (highest
                                 available priorities depend on the
                                 selected IO scheduling class (see
                                 above). See
-                                <a href="ioprio_set.html"><span class="citerefentry"><span class="refentrytitle">ioprio_set</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/ioprio_set.2.html"><span class="citerefentry"><span class="refentrytitle">ioprio_set</span>(2)</span></a>
                                 for details.</p></dd><dt id="CPUSchedulingPolicy="><span class="term"><code class="varname">CPUSchedulingPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingPolicy=">¶</a></dt><dd><p>Sets the CPU
                                 scheduling policy for executed
                                 processes. Takes one of
                                 <code class="option">idle</code>,
                                 <code class="option">fifo</code> or
                                 <code class="option">rr</code>. See
-                                <a href="sched_setscheduler.html"><span class="citerefentry"><span class="refentrytitle">sched_setscheduler</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html"><span class="citerefentry"><span class="refentrytitle">sched_setscheduler</span>(2)</span></a>
                                 for details.</p></dd><dt id="CPUSchedulingPriority="><span class="term"><code class="varname">CPUSchedulingPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingPriority=">¶</a></dt><dd><p>Sets the CPU
                                 scheduling priority for executed
                                 processes. The available priority
                                 real-time scheduling policies an
                                 integer between 1 (lowest priority)
                                 and 99 (highest priority) can be used.
-                                See <a href="sched_setscheduler.html"><span class="citerefentry"><span class="refentrytitle">sched_setscheduler</span>(2)</span></a>
+                                See <a href="http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html"><span class="citerefentry"><span class="refentrytitle">sched_setscheduler</span>(2)</span></a>
                                 for details.
                                 </p></dd><dt id="CPUSchedulingResetOnFork="><span class="term"><code class="varname">CPUSchedulingResetOnFork=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUSchedulingResetOnFork=">¶</a></dt><dd><p>Takes a boolean
                                 argument. If true, elevated CPU
                                 will be reset when the executed
                                 processes fork, and can hence not leak
                                 into child processes. See
-                                <a href="sched_setscheduler.html"><span class="citerefentry"><span class="refentrytitle">sched_setscheduler</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html"><span class="citerefentry"><span class="refentrytitle">sched_setscheduler</span>(2)</span></a>
                                 for details. Defaults to false.</p></dd><dt id="CPUAffinity="><span class="term"><code class="varname">CPUAffinity=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAffinity=">¶</a></dt><dd><p>Controls the CPU
                                 affinity of the executed
                                 processes. Takes a space-separated
                                 assigned, the mask is reset, all
                                 assignments prior to this will have no
                                 effect. See
-                                <a href="sched_setaffinity.html"><span class="citerefentry"><span class="refentrytitle">sched_setaffinity</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/sched_setaffinity.2.html"><span class="citerefentry"><span class="refentrytitle">sched_setaffinity</span>(2)</span></a>
                                 for details.</p></dd><dt id="UMask="><span class="term"><code class="varname">UMask=</code></span><a class="headerlink" title="Permalink to this term" href="#UMask=">¶</a></dt><dd><p>Controls the file mode
                                 creation mask. Takes an access mode in
                                 octal notation. See
-                                <a href="umask.html"><span class="citerefentry"><span class="refentrytitle">umask</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/umask.2.html"><span class="citerefentry"><span class="refentrytitle">umask</span>(2)</span></a>
                                 for details. Defaults to
                                 0022.</p></dd><dt id="Environment="><span class="term"><code class="varname">Environment=</code></span><a class="headerlink" title="Permalink to this term" href="#Environment=">¶</a></dt><dd><p>Sets environment
                                 variables for executed
                                 "<code class="literal">word3</code>", "<code class="literal">$word 5 6</code>".
                                 </p><p>
                                 See
-                                <a href="environ.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
                                 for details about environment variables.</p></dd><dt id="EnvironmentFile="><span class="term"><code class="varname">EnvironmentFile=</code></span><a class="headerlink" title="Permalink to this term" href="#EnvironmentFile=">¶</a></dt><dd><p>Similar to
                                 <code class="varname">Environment=</code> but
                                 reads the environment variables from a
                                 <code class="option">tty</code>,
                                 <code class="option">tty-force</code>,
                                 <code class="option">tty-fail</code> or
-                                <code class="option">socket</code>. If
-                                <code class="option">null</code> is selected,
-                                standard input will be connected to
+                                <code class="option">socket</code>.</p><p>If <code class="option">null</code> is
+                                selected, standard input will be
+                                connected to
                                 <code class="filename">/dev/null</code>,
                                 i.e. all read attempts by the process
-                                will result in immediate EOF. If
-                                <code class="option">tty</code> is selected,
-                                standard input is connected to a TTY
-                                (as configured by
+                                will result in immediate EOF.</p><p>If <code class="option">tty</code> is
+                                selected, standard input is connected
+                                to a TTY (as configured by
                                 <code class="varname">TTYPath=</code>, see
                                 below) and the executed process
                                 becomes the controlling process of the
                                 terminal. If the terminal is already
-                                being controlled by another process, the
-                                executed process waits until the current
-                                controlling process releases the
-                                terminal.
-                                <code class="option">tty-force</code>
-                                is similar to <code class="option">tty</code>,
-                                but the executed process is forcefully
-                                and immediately made the controlling
+                                being controlled by another process,
+                                the executed process waits until the
+                                current controlling process releases
+                                the terminal.</p><p><code class="option">tty-force</code> is similar
+                                to <code class="option">tty</code>, but the
+                                executed process is forcefully and
+                                immediately made the controlling
                                 process of the terminal, potentially
                                 removing previous controlling
                                 processes from the
-                                terminal. <code class="option">tty-fail</code> is
+                                terminal.</p><p><code class="option">tty-fail</code> is
                                 similar to <code class="option">tty</code> but if
                                 the terminal already has a controlling
                                 process start-up of the executed
-                                process fails.  The
-                                <code class="option">socket</code> option is only
-                                valid in socket-activated services,
-                                and only when the socket configuration
-                                file (see
+                                process fails.</p><p>The <code class="option">socket</code>
+                                option is only valid in
+                                socket-activated services, and only
+                                when the socket configuration file
+                                (see
                                 <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>
                                 for details) specifies a single socket
                                 only. If this option is set, standard
                                 with daemons designed for use with the
                                 traditional
                                 <a href="inetd.html"><span class="citerefentry"><span class="refentrytitle">inetd</span>(8)</span></a>
-                                daemon. This setting defaults to
+                                daemon.</p><p>This setting defaults to
                                 <code class="option">null</code>.</p></dd><dt id="StandardOutput="><span class="term"><code class="varname">StandardOutput=</code></span><a class="headerlink" title="Permalink to this term" href="#StandardOutput=">¶</a></dt><dd><p>Controls where file
                                 descriptor 1 (STDOUT) of the executed
                                 processes is connected to. Takes one
                                 of <code class="option">inherit</code>,
                                 <code class="option">null</code>,
                                 <code class="option">tty</code>,
+                                <code class="option">journal</code>,
                                 <code class="option">syslog</code>,
                                 <code class="option">kmsg</code>,
-                                <code class="option">journal</code>,
+                                <code class="option">journal+console</code>,
                                 <code class="option">syslog+console</code>,
-                                <code class="option">kmsg+console</code>,
-                                <code class="option">journal+console</code> or
-                                <code class="option">socket</code>. If set to
-                                <code class="option">inherit</code>, the file
-                                descriptor of standard input is
-                                duplicated for standard output. If set
-                                to <code class="option">null</code>, standard
-                                output will be connected to
+                                <code class="option">kmsg+console</code> or
+                                <code class="option">socket</code>.</p><p><code class="option">inherit</code>
+                                duplicates the file descriptor of
+                                standard input for standard
+                                output.</p><p><code class="option">null</code> connects
+                                standard output to
                                 <code class="filename">/dev/null</code>,
                                 i.e. everything written to it will be
-                                lost. If set to <code class="option">tty</code>,
-                                standard output will be connected to a
-                                tty (as configured via
+                                lost.</p><p><code class="option">tty</code> connects
+                                standard output to a tty (as
+                                configured via
                                 <code class="varname">TTYPath=</code>, see
                                 below). If the TTY is used for output
                                 only, the executed process will not
                                 become the controlling process of the
                                 terminal, and will not fail or wait
                                 for other processes to release the
-                                terminal. <code class="option">syslog</code>
-                                connects standard output to the
-                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
-                                system syslog
-                                service. <code class="option">kmsg</code>
-                                connects it with the kernel log buffer
-                                which is accessible via
-                                <a href="dmesg.html"><span class="citerefentry"><span class="refentrytitle">dmesg</span>(1)</span></a>. <code class="option">journal</code>
-                                connects it with the journal which is
-                                accessible via
-                                <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>
-                                (Note that everything that is written
-                                to syslog or kmsg is implicitly stored
-                                in the journal as well, those options
-                                are hence supersets of this
-                                one). <code class="option">syslog+console</code>,
-                                <code class="option">journal+console</code> and
-                                <code class="option">kmsg+console</code> work
-                                similarly but copy the output to the
-                                system console as
-                                well. <code class="option">socket</code> connects
-                                standard output to a socket from
-                                socket activation, semantics are
-                                similar to the respective option of
-                                <code class="varname">StandardInput=</code>.
-                                This setting defaults to the value set
-                                with
+                                terminal.</p><p><code class="option">journal</code>
+                                connects standard output with the
+                                journal which is accessible via
+                                <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>.
+                                Note that everything that is written
+                                to syslog or kmsg (see below) is
+                                implicitly stored in the journal as
+                                well, the specific two options listed
+                                below are hence supersets of this
+                                one.</p><p><code class="option">syslog</code> connects
+                                standard output to the <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                                system syslog service, in addition to
+                                the journal. Note that the journal
+                                daemon is usually configured to
+                                forward everything it receives to
+                                syslog anyway, in which case this
+                                option is no different from
+                                <code class="option">journal</code>.</p><p><code class="option">kmsg</code> connects
+                                standard output with the kernel log
+                                buffer which is accessible via
+                                <a href="http://man7.org/linux/man-pages/man1/dmesg.1.html"><span class="citerefentry"><span class="refentrytitle">dmesg</span>(1)</span></a>,
+                                in addition to the journal. The
+                                journal daemon might be configured to
+                                send all logs to kmsg anyway, in which
+                                case this option is no different from
+                                <code class="option">journal</code>.</p><p><code class="option">journal+console</code>,
+                                <code class="option">syslog+console</code> and
+                                <code class="option">kmsg+console</code> work in
+                                a similar way as the three options
+                                above but copy the output to the
+                                system console as well.</p><p><code class="option">socket</code> connects
+                                standard output to a socket acquired
+                                via socket activation. The semantics
+                                are similar to the same option of
+                                <code class="varname">StandardInput=</code>.</p><p>This setting defaults to the
+                                value set with
                                 <code class="option">DefaultStandardOutput=</code>
                                 in
                                 <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>,
                                 screen and scrollback buffer is
                                 cleared. Defaults to
                                 "<code class="literal">no</code>".</p></dd><dt id="SyslogIdentifier="><span class="term"><code class="varname">SyslogIdentifier=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogIdentifier=">¶</a></dt><dd><p>Sets the process name
-                                to prefix log lines sent to syslog or
-                                the kernel log buffer with. If not set,
-                                defaults to the process name of the
-                                executed process. This option is only
-                                useful when
+                                to prefix log lines sent to the
+                                logging system or the kernel log
+                                buffer with. If not set, defaults to
+                                the process name of the executed
+                                process. This option is only useful
+                                when
                                 <code class="varname">StandardOutput=</code> or
                                 <code class="varname">StandardError=</code> are
-                                set to <code class="option">syslog</code> or
-                                <code class="option">kmsg</code>.</p></dd><dt id="SyslogFacility="><span class="term"><code class="varname">SyslogFacility=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogFacility=">¶</a></dt><dd><p>Sets the syslog
+                                set to <code class="option">syslog</code>,
+                                <code class="option">journal</code> or
+                                <code class="option">kmsg</code> (or to the same
+                                settings in combination with
+                                <code class="option">+console</code>).</p></dd><dt id="SyslogFacility="><span class="term"><code class="varname">SyslogFacility=</code></span><a class="headerlink" title="Permalink to this term" href="#SyslogFacility=">¶</a></dt><dd><p>Sets the syslog
                                 facility to use when logging to
                                 syslog. One of <code class="option">kern</code>,
                                 <code class="option">user</code>,
                                 <code class="option">local5</code>,
                                 <code class="option">local6</code> or
                                 <code class="option">local7</code>. See
-                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                                 for details. This option is only
                                 useful when
                                 <code class="varname">StandardOutput=</code> or
                                 <code class="option">notice</code>,
                                 <code class="option">info</code>,
                                 <code class="option">debug</code>. See
-                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                                 for details. This option is only
                                 useful when
                                 <code class="varname">StandardOutput=</code> or
                                 processes. The timer slack controls
                                 the accuracy of wake-ups triggered by
                                 timers. See
-                                <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
                                 for more information. Note that in
                                 contrast to most other time span
                                 definitions this parameter takes an
                                 too.</p></dd><dt id="LimitCPU="><span class="term"><code class="varname">LimitCPU=</code>, </span><span class="term"><code class="varname">LimitFSIZE=</code>, </span><span class="term"><code class="varname">LimitDATA=</code>, </span><span class="term"><code class="varname">LimitSTACK=</code>, </span><span class="term"><code class="varname">LimitCORE=</code>, </span><span class="term"><code class="varname">LimitRSS=</code>, </span><span class="term"><code class="varname">LimitNOFILE=</code>, </span><span class="term"><code class="varname">LimitAS=</code>, </span><span class="term"><code class="varname">LimitNPROC=</code>, </span><span class="term"><code class="varname">LimitMEMLOCK=</code>, </span><span class="term"><code class="varname">LimitLOCKS=</code>, </span><span class="term"><code class="varname">LimitSIGPENDING=</code>, </span><span class="term"><code class="varname">LimitMSGQUEUE=</code>, </span><span class="term"><code class="varname">LimitNICE=</code>, </span><span class="term"><code class="varname">LimitRTPRIO=</code>, </span><span class="term"><code class="varname">LimitRTTIME=</code></span><a class="headerlink" title="Permalink to this term" href="#LimitCPU=">¶</a></dt><dd><p>These settings control
                                 various resource limits for executed
                                 processes. See
-                                <a href="setrlimit.html"><span class="citerefentry"><span class="refentrytitle">setrlimit</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/setrlimit.2.html"><span class="citerefentry"><span class="refentrytitle">setrlimit</span>(2)</span></a>
                                 for details. Use the string
                                 <code class="varname">infinity</code> to
                                 configure no limit on a specific
                                 <code class="varname">User=</code> setting. If
                                 not set, no PAM session will be opened
                                 for the executed processes. See
-                                <a href="pam.html"><span class="citerefentry"><span class="refentrytitle">pam</span>(8)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man8/pam.8.html"><span class="citerefentry"><span class="refentrytitle">pam</span>(8)</span></a>
                                 for details.</p></dd><dt id="CapabilityBoundingSet="><span class="term"><code class="varname">CapabilityBoundingSet=</code></span><a class="headerlink" title="Permalink to this term" href="#CapabilityBoundingSet=">¶</a></dt><dd><p>Controls which
                                 capabilities to include in the
                                 capability bounding set for the
                                 executed process. See
-                                <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                                 for details. Takes a whitespace-separated
                                 list of capability names as read by
                                 <a href="cap_from_name.html"><span class="citerefentry"><span class="refentrytitle">cap_from_name</span>(3)</span></a>,
                                 reset to the full set of available
                                 capabilities, also undoing any
                                 previous settings.</p></dd><dt id="SecureBits="><span class="term"><code class="varname">SecureBits=</code></span><a class="headerlink" title="Permalink to this term" href="#SecureBits=">¶</a></dt><dd><p>Controls the secure
-                                bits set for the executed process. See
-                                <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
-                                for details. Takes a list of strings:
+                                bits set for the executed process.
+                                Takes a space-separated combination of
+                                options from the following list:
                                 <code class="option">keep-caps</code>,
                                 <code class="option">keep-caps-locked</code>,
                                 <code class="option">no-setuid-fixup</code>,
                                 <code class="option">no-setuid-fixup-locked</code>,
-                                <code class="option">noroot</code> and/or
+                                <code class="option">noroot</code>, and
                                 <code class="option">noroot-locked</code>. This
                                 option may appear more than once in
-                                which case the secure bits are
-                                ORed. If the empty string is assigned
-                                to this option, the bits are reset to
-                                0.</p></dd><dt id="Capabilities="><span class="term"><code class="varname">Capabilities=</code></span><a class="headerlink" title="Permalink to this term" href="#Capabilities=">¶</a></dt><dd><p>Controls the
-                                <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                                which case the secure bits are ORed.
+                                If the empty string is assigned to
+                                this option, the bits are reset to 0.
+                                See <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                                for details.</p></dd><dt id="Capabilities="><span class="term"><code class="varname">Capabilities=</code></span><a class="headerlink" title="Permalink to this term" href="#Capabilities=">¶</a></dt><dd><p>Controls the
+                                <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                                 set for the executed process. Take a
                                 capability string describing the
                                 effective, permitted and inherited
                                 attached to the executed file. Due to
                                 that
                                 <code class="varname">CapabilityBoundingSet=</code>
-                                is probably the much more useful
+                                is probably a much more useful
                                 setting.</p></dd><dt id="ReadWriteDirectories="><span class="term"><code class="varname">ReadWriteDirectories=</code>, </span><span class="term"><code class="varname">ReadOnlyDirectories=</code>, </span><span class="term"><code class="varname">InaccessibleDirectories=</code></span><a class="headerlink" title="Permalink to this term" href="#ReadWriteDirectories=">¶</a></dt><dd><p>Sets up a new file
                                 system namespace for executed
                                 processes. These options may be used
                                 made inaccessible and empty for
                                 processes invoked by this unit. If set
                                 to "<code class="literal">read-only</code>", the
-                                two directores are made read-only
+                                two directories are made read-only
                                 instead. It is recommended to enable
                                 this setting for all long-running
                                 services (in particular network-facing
                                 system namespace set up for this
                                 unit's processes will receive or
                                 propagate mounts or unmounts. See
-                                <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/mount.2.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(2)</span></a>
                                 for details. Defaults to
                                 <code class="option">shared</code>. Use
                                 <code class="option">shared</code> to ensure that
                                 namespace. Note that
                                 <code class="option">slave</code> means that file
                                 systems mounted on the host might stay
-                                mounted continously in the unit's
+                                mounted continuously in the unit's
                                 namespace, and thus keep the device
                                 busy. Note that the file system
                                 namespace related options
                                 (<code class="varname">PrivateTmp=</code>,
                                 <code class="varname">PrivateDevices=</code>,
-                                <code class="varname">ReadOnlySystem=</code>,
-                                <code class="varname">ProtectedHome=</code>,
+                                <code class="varname">ProtectSystem=</code>,
+                                <code class="varname">ProtectHome=</code>,
                                 <code class="varname">ReadOnlyDirectories=</code>,
                                 <code class="varname">InaccessibleDirectories=</code>
                                 and
                                 applied as blacklist, otherwise as
                                 whitelist. Note that this restricts
                                 access to the
-                                <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/socket.2.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(2)</span></a>
                                 system call only. Sockets passed into
                                 the process by other means (for
                                 example, by using socket activation
                                 configured whitelist as it is
                                 frequently used for local
                                 communication, including for
-                                <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/syslog.2.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(2)</span></a>
                                 logging.</p></dd><dt id="Personality="><span class="term"><code class="varname">Personality=</code></span><a class="headerlink" title="Permalink to this term" href="#Personality=">¶</a></dt><dd><p>Controls which
                                 kernel architecture
-                                <a href="uname.html"><span class="citerefentry"><span class="refentrytitle">uname</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/uname.2.html"><span class="citerefentry"><span class="refentrytitle">uname</span>(2)</span></a>
                                 shall report, when invoked by unit
                                 processes. Takes one of
                                 <code class="constant">x86</code> and
                                 directories that require more complex
                                 or different configuration or lifetime
                                 guarantees, please consider using
-                                <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214175926544"></a><h2 id="Environment variables in spawned processes">Environment variables in spawned processes<a class="headerlink" title="Permalink to this headline" href="#Environment%20variables%20in%20spawned%20processes">¶</a></h2><p>Processes started by the system are executed in
+                                <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198239488"></a><h2 id="Environment variables in spawned processes">Environment variables in spawned processes<a class="headerlink" title="Permalink to this headline" href="#Environment%20variables%20in%20spawned%20processes">¶</a></h2><p>Processes started by the system are executed in
                 a clean environment in which select variables
                 listed below are set. System processes started by systemd
                 do not inherit variables from PID 1, but processes
                                 or
                                 <code class="varname">StandardError=tty</code>).
                                 See
-                                <a href="termcap.html"><span class="citerefentry"><span class="refentrytitle">termcap</span>(5)</span></a>.
+                                <a href="http://man7.org/linux/man-pages/man5/termcap.5.html"><span class="citerefentry"><span class="refentrytitle">termcap</span>(5)</span></a>.
                                 </p></dd></dl></div><p>Additional variables may be configured by the
                 following means: for processes spawned in specific
                 units, use the <code class="varname">Environment=</code> and
                 <code class="varname">systemd.setenv=</code> (see
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>). Additional
                 variables may also be set through PAM,
-                cf. <a href="pam_env.html"><span class="citerefentry"><span class="refentrytitle">pam_env</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214175887296"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                cf. <a href="http://man7.org/linux/man-pages/man8/pam_env.8.html"><span class="citerefentry"><span class="refentrytitle">pam_env</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214198199520"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(8)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                           <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
                           <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>,
-                          <a href="exec.html"><span class="citerefentry"><span class="refentrytitle">exec</span>(3)</span></a>
+                          <a href="http://man7.org/linux/man-pages/man3/exec.3.html"><span class="citerefentry"><span class="refentrytitle">exec</span>(3)</span></a>
                   </p></div></div></body></html>
index cc5442d45cf17be9b0c29051533cbf2428a44403..e9af4abd6d565797c3ebef271d91f9cf3d3b04f5 100644 (file)
                                 directory path. Sets the root
                                 directory for executed processes, with
                                 the
-                                <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
                                 system call. If this is used, it must
                                 be ensured that the process and all
                                 its auxiliary files are available in
 
                                 <para>
                                 See
-                                <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                                 for details about environment variables.</para></listitem>
                         </varlistentry>
                         <varlistentry>
                                 <option>tty</option>,
                                 <option>tty-force</option>,
                                 <option>tty-fail</option> or
-                                <option>socket</option>. If
-                                <option>null</option> is selected,
-                                standard input will be connected to
+                                <option>socket</option>.</para>
+
+                                <para>If <option>null</option> is
+                                selected, standard input will be
+                                connected to
                                 <filename>/dev/null</filename>,
                                 i.e. all read attempts by the process
-                                will result in immediate EOF. If
-                                <option>tty</option> is selected,
-                                standard input is connected to a TTY
-                                (as configured by
+                                will result in immediate EOF.</para>
+
+                                <para>If <option>tty</option> is
+                                selected, standard input is connected
+                                to a TTY (as configured by
                                 <varname>TTYPath=</varname>, see
                                 below) and the executed process
                                 becomes the controlling process of the
                                 terminal. If the terminal is already
-                                being controlled by another process, the
-                                executed process waits until the current
-                                controlling process releases the
-                                terminal.
-                                <option>tty-force</option>
-                                is similar to <option>tty</option>,
-                                but the executed process is forcefully
-                                and immediately made the controlling
+                                being controlled by another process,
+                                the executed process waits until the
+                                current controlling process releases
+                                the terminal.</para>
+
+                                <para><option>tty-force</option> is similar
+                                to <option>tty</option>, but the
+                                executed process is forcefully and
+                                immediately made the controlling
                                 process of the terminal, potentially
                                 removing previous controlling
                                 processes from the
-                                terminal. <option>tty-fail</option> is
+                                terminal.</para>
+
+                                <para><option>tty-fail</option> is
                                 similar to <option>tty</option> but if
                                 the terminal already has a controlling
                                 process start-up of the executed
-                                process fails.  The
-                                <option>socket</option> option is only
-                                valid in socket-activated services,
-                                and only when the socket configuration
-                                file (see
+                                process fails.</para>
+
+                                <para>The <option>socket</option>
+                                option is only valid in
+                                socket-activated services, and only
+                                when the socket configuration file
+                                (see
                                 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                                 for details) specifies a single socket
                                 only. If this option is set, standard
                                 with daemons designed for use with the
                                 traditional
                                 <citerefentry><refentrytitle>inetd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-                                daemon. This setting defaults to
+                                daemon.</para>
+
+                                <para>This setting defaults to
                                 <option>null</option>.</para></listitem>
                         </varlistentry>
                         <varlistentry>
                                 of <option>inherit</option>,
                                 <option>null</option>,
                                 <option>tty</option>,
+                                <option>journal</option>,
                                 <option>syslog</option>,
                                 <option>kmsg</option>,
-                                <option>journal</option>,
+                                <option>journal+console</option>,
                                 <option>syslog+console</option>,
-                                <option>kmsg+console</option>,
-                                <option>journal+console</option> or
-                                <option>socket</option>. If set to
-                                <option>inherit</option>, the file
-                                descriptor of standard input is
-                                duplicated for standard output. If set
-                                to <option>null</option>, standard
-                                output will be connected to
+                                <option>kmsg+console</option> or
+                                <option>socket</option>.</para>
+
+                                <para><option>inherit</option>
+                                duplicates the file descriptor of
+                                standard input for standard
+                                output.</para>
+
+                                <para><option>null</option> connects
+                                standard output to
                                 <filename>/dev/null</filename>,
                                 i.e. everything written to it will be
-                                lost. If set to <option>tty</option>,
-                                standard output will be connected to a
-                                tty (as configured via
+                                lost.</para>
+
+                                <para><option>tty</option> connects
+                                standard output to a tty (as
+                                configured via
                                 <varname>TTYPath=</varname>, see
                                 below). If the TTY is used for output
                                 only, the executed process will not
                                 become the controlling process of the
                                 terminal, and will not fail or wait
                                 for other processes to release the
-                                terminal. <option>syslog</option>
-                                connects standard output to the
-                                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                                system syslog
-                                service. <option>kmsg</option>
-                                connects it with the kernel log buffer
-                                which is accessible via
-                                <citerefentry><refentrytitle>dmesg</refentrytitle><manvolnum>1</manvolnum></citerefentry>. <option>journal</option>
-                                connects it with the journal which is
-                                accessible via
-                                <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                                (Note that everything that is written
-                                to syslog or kmsg is implicitly stored
-                                in the journal as well, those options
-                                are hence supersets of this
-                                one). <option>syslog+console</option>,
-                                <option>journal+console</option> and
-                                <option>kmsg+console</option> work
-                                similarly but copy the output to the
-                                system console as
-                                well. <option>socket</option> connects
-                                standard output to a socket from
-                                socket activation, semantics are
-                                similar to the respective option of
-                                <varname>StandardInput=</varname>.
-                                This setting defaults to the value set
-                                with
+                                terminal.</para>
+
+                                <para><option>journal</option>
+                                connects standard output with the
+                                journal which is accessible via
+                                <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+                                Note that everything that is written
+                                to syslog or kmsg (see below) is
+                                implicitly stored in the journal as
+                                well, the specific two options listed
+                                below are hence supersets of this
+                                one.</para>
+
+                                <para><option>syslog</option> connects
+                                standard output to the <citerefentry
+                                project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                system syslog service, in addition to
+                                the journal. Note that the journal
+                                daemon is usually configured to
+                                forward everything it receives to
+                                syslog anyway, in which case this
+                                option is no different from
+                                <option>journal</option>.</para>
+
+                                <para><option>kmsg</option> connects
+                                standard output with the kernel log
+                                buffer which is accessible via
+                                <citerefentry
+                                project='man-pages'><refentrytitle>dmesg</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                                in addition to the journal. The
+                                journal daemon might be configured to
+                                send all logs to kmsg anyway, in which
+                                case this option is no different from
+                                <option>journal</option>.</para>
+
+                                <para><option>journal+console</option>,
+                                <option>syslog+console</option> and
+                                <option>kmsg+console</option> work in
+                                a similar way as the three options
+                                above but copy the output to the
+                                system console as well.</para>
+
+                                <para><option>socket</option> connects
+                                standard output to a socket acquired
+                                via socket activation. The semantics
+                                are similar to the same option of
+                                <varname>StandardInput=</varname>.</para>
+
+                                <para>This setting defaults to the
+                                value set with
                                 <option>DefaultStandardOutput=</option>
                                 in
                                 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <varlistentry>
                                 <term><varname>SyslogIdentifier=</varname></term>
                                 <listitem><para>Sets the process name
-                                to prefix log lines sent to syslog or
-                                the kernel log buffer with. If not set,
-                                defaults to the process name of the
-                                executed process. This option is only
-                                useful when
+                                to prefix log lines sent to the
+                                logging system or the kernel log
+                                buffer with. If not set, defaults to
+                                the process name of the executed
+                                process. This option is only useful
+                                when
                                 <varname>StandardOutput=</varname> or
                                 <varname>StandardError=</varname> are
-                                set to <option>syslog</option> or
-                                <option>kmsg</option>.</para></listitem>
+                                set to <option>syslog</option>,
+                                <option>journal</option> or
+                                <option>kmsg</option> (or to the same
+                                settings in combination with
+                                <option>+console</option>).</para></listitem>
                         </varlistentry>
                         <varlistentry>
                                 <term><varname>SyslogFacility=</varname></term>
                                 <option>local5</option>,
                                 <option>local6</option> or
                                 <option>local7</option>. See
-                                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                 for details. This option is only
                                 useful when
                                 <varname>StandardOutput=</varname> or
                                 <option>notice</option>,
                                 <option>info</option>,
                                 <option>debug</option>. See
-                                <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                 for details. This option is only
                                 useful when
                                 <varname>StandardOutput=</varname> or
                                 <varname>User=</varname> setting. If
                                 not set, no PAM session will be opened
                                 for the executed processes. See
-                                <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                                 for details.</para></listitem>
                         </varlistentry>
 
                                 capabilities to include in the
                                 capability bounding set for the
                                 executed process. See
-                                <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                                 for details. Takes a whitespace-separated
                                 list of capability names as read by
                                 <citerefentry><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <varlistentry>
                                 <term><varname>SecureBits=</varname></term>
                                 <listitem><para>Controls the secure
-                                bits set for the executed process. See
-                                <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
-                                for details. Takes a list of strings:
+                                bits set for the executed process.
+                                Takes a space-separated combination of
+                                options from the following list:
                                 <option>keep-caps</option>,
                                 <option>keep-caps-locked</option>,
                                 <option>no-setuid-fixup</option>,
                                 <option>no-setuid-fixup-locked</option>,
-                                <option>noroot</option> and/or
+                                <option>noroot</option>, and
                                 <option>noroot-locked</option>. This
                                 option may appear more than once in
-                                which case the secure bits are
-                                ORed. If the empty string is assigned
-                                to this option, the bits are reset to
-                                0.</para></listitem>
+                                which case the secure bits are ORed.
+                                If the empty string is assigned to
+                                this option, the bits are reset to 0.
+                                See <citerefentry
+                                project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                for details.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term><varname>Capabilities=</varname></term>
                                 <listitem><para>Controls the
-                                <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                                 set for the executed process. Take a
                                 capability string describing the
                                 effective, permitted and inherited
                                 attached to the executed file. Due to
                                 that
                                 <varname>CapabilityBoundingSet=</varname>
-                                is probably the much more useful
+                                is probably a much more useful
                                 setting.</para></listitem>
                         </varlistentry>
 
                                 made inaccessible and empty for
                                 processes invoked by this unit. If set
                                 to <literal>read-only</literal>, the
-                                two directores are made read-only
+                                two directories are made read-only
                                 instead. It is recommended to enable
                                 this setting for all long-running
                                 services (in particular network-facing
                                 namespace. Note that
                                 <option>slave</option> means that file
                                 systems mounted on the host might stay
-                                mounted continously in the unit's
+                                mounted continuously in the unit's
                                 namespace, and thus keep the device
                                 busy. Note that the file system
                                 namespace related options
                                 (<varname>PrivateTmp=</varname>,
                                 <varname>PrivateDevices=</varname>,
-                                <varname>ReadOnlySystem=</varname>,
-                                <varname>ProtectedHome=</varname>,
+                                <varname>ProtectSystem=</varname>,
+                                <varname>ProtectHome=</varname>,
                                 <varname>ReadOnlyDirectories=</varname>,
                                 <varname>InaccessibleDirectories=</varname>
                                 and
                                 or
                                 <varname>StandardError=tty</varname>).
                                 See
-                                <citerefentry><refentrytitle>termcap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+                                <citerefentry project='man-pages'><refentrytitle>termcap</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
                                 </para></listitem>
                         </varlistentry>
                 </variablelist>
                 <varname>systemd.setenv=</varname> (see
                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>). Additional
                 variables may also be set through PAM,
-                cf. <citerefentry><refentrytitle>pam_env</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+                cf. <citerefentry project='man-pages'><refentrytitle>pam_env</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
         </refsect1>
 
         <refsect1>
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>exec</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                          <citerefentry project='man-pages'><refentrytitle>exec</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                   </para>
         </refsect1>
 
index df28bba8ae6ef44a4d4517cf28ef676816573fc3..30dd6c7dc26b7f6a09089da0f87800790c4a39b2 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd, init — systemd system and service manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">init [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214189898832"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>systemd is a system and service manager for
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd, init — systemd system and service manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">init [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214191869872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>systemd is a system and service manager for
                 Linux operating systems. When run as first process on
                 boot (as PID 1), it acts as init system that brings
                 up and maintains userspace services.</p><p>For compatibility with SysV, if systemd is called
@@ -34,7 +34,7 @@
                 <code class="filename">system.conf</code>, otherwise
                 <code class="filename">user.conf</code>. See
                 <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>
-                for more information.</p></div><div class="refsect1"><a name="idm214188084384"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--test"><span class="term"><code class="option">--test</code></span><a class="headerlink" title="Permalink to this term" href="#--test">¶</a></dt><dd><p>Determine startup
+                for more information.</p></div><div class="refsect1"><a name="idm214191861296"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--test"><span class="term"><code class="option">--test</code></span><a class="headerlink" title="Permalink to this term" href="#--test">¶</a></dt><dd><p>Determine startup
                                 sequence, dump it and exit. This is an
                                 option useful for debugging
                                 only.</p></dd><dt id="--dump-configuration-items"><span class="term"><code class="option">--dump-configuration-items</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-configuration-items">¶</a></dt><dd><p>Dump understood unit
                                 target. Argument must be one of
                                 <code class="option">console</code>,
                                 <code class="option">journal</code>,
-                                <code class="option">syslog</code>,
                                 <code class="option">kmsg</code>,
                                 <code class="option">journal-or-kmsg</code>,
-                                <code class="option">syslog-or-kmsg</code>,
                                 <code class="option">null</code>.</p></dd><dt id="--log-level="><span class="term"><code class="option">--log-level=</code></span><a class="headerlink" title="Permalink to this term" href="#--log-level=">¶</a></dt><dd><p>Set log level. As
                                 argument this accepts a numerical log
-                                level or the well-known <a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
+                                level or the well-known <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
                                 symbolic names (lowercase):
                                 <code class="option">emerg</code>,
                                 <code class="option">alert</code>,
                                 <code class="option">--default-standard-error=</code>
                                 to
                                 <code class="option">inherit</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
-    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214189143952"></a><h2 id="Concepts">Concepts<a class="headerlink" title="Permalink to this headline" href="#Concepts">¶</a></h2><p>systemd provides a dependency system between
+    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190798640"></a><h2 id="Concepts">Concepts<a class="headerlink" title="Permalink to this headline" href="#Concepts">¶</a></h2><p>systemd provides a dependency system between
                 various entities called "units" of 12 different
                 types. Units encapsulate various objects that are
                 relevant for system boot-up and maintenance. The
                 file system hierarchy (beneath
                 <code class="filename">/sys/fs/cgroup/systemd/</code>), or in tools
                 such as
-                <a href="ps.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>
+                <a href="http://man7.org/linux/man-pages/man1/ps.1.html"><span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span></a>
                 (<span class="command"><strong>ps xawf -eo pid,user,cgroup,args</strong></span>
                 is particularly useful to list all processes and the
                 systemd units they belong to.).</p><p>systemd is compatible with the SysV init system
                 or initrd environment should implement the
                 <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface" target="_top">Container
                 Interface</a> or <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface" target="_top">initrd
-                Interface</a> specifications, respectively.</p></div><div class="refsect1"><a name="idm214189453632"></a><h2 id="Directories">Directories<a class="headerlink" title="Permalink to this headline" href="#Directories">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="System unit directories"><span class="term">System unit directories</span><a class="headerlink" title="Permalink to this term" href="#System%20unit%20directories">¶</a></dt><dd><p>The systemd system
+                Interface</a> specifications, respectively.</p></div><div class="refsect1"><a name="idm214190748208"></a><h2 id="Directories">Directories<a class="headerlink" title="Permalink to this headline" href="#Directories">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="System unit directories"><span class="term">System unit directories</span><a class="headerlink" title="Permalink to this term" href="#System%20unit%20directories">¶</a></dt><dd><p>The systemd system
                                 manager reads unit configuration from
                                 various directories. Packages that
                                 want to install unit files shall place
                                 unit with a native unit configuration
                                 file cannot be started by activating it
                                 in the SysV runlevel link
-                                farm.</p></dd></dl></div></div><div class="refsect1"><a name="idm214189693872"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGTERM"><span class="term"><code class="constant">SIGTERM</code></span><a class="headerlink" title="Permalink to this term" href="#SIGTERM">¶</a></dt><dd><p>Upon receiving this
+                                farm.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190725744"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGTERM"><span class="term"><code class="constant">SIGTERM</code></span><a class="headerlink" title="Permalink to this term" href="#SIGTERM">¶</a></dt><dd><p>Upon receiving this
                                 signal the systemd system manager
                                 serializes its state, reexecutes
                                 itself and deserializes the saved
                                 the kernel command
                                 line.</p></dd><dt id="SIGRTMIN+24"><span class="term"><code class="constant">SIGRTMIN+24</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+24">¶</a></dt><dd><p>Immediately exits the
                                 manager (only available for --user
-                                instances).</p></dd><dt id="SIGRTMIN+26"><span class="term"><code class="constant">SIGRTMIN+26</code>, </span><span class="term"><code class="constant">SIGRTMIN+27</code>, </span><span class="term"><code class="constant">SIGRTMIN+28</code>, </span><span class="term"><code class="constant">SIGRTMIN+29</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+26">¶</a></dt><dd><p>Sets the log level to
-                                "<code class="literal">journal-or-kmsg</code>"
-                                (or "<code class="literal">console</code>" on
+                                instances).</p></dd><dt id="SIGRTMIN+26"><span class="term"><code class="constant">SIGRTMIN+26</code>, </span><span class="term"><code class="constant">SIGRTMIN+27</code>, </span><span class="term"><code class="constant">SIGRTMIN+28</code></span><a class="headerlink" title="Permalink to this term" href="#SIGRTMIN+26">¶</a></dt><dd><p>Sets the log level to
+                                "<code class="literal">journal-or-kmsg</code>" (or
+                                "<code class="literal">console</code>" on
                                 <code class="constant">SIGRTMIN+27</code>,
                                 "<code class="literal">kmsg</code>" on
-                                <code class="constant">SIGRTMIN+28</code>,
-                                or "<code class="literal">syslog-or-kmsg</code>"
-                                on <code class="constant">SIGRTMIN+29</code>), as
+                                <code class="constant">SIGRTMIN+28</code>), as
                                 controlled via
                                 <code class="varname">systemd.log_target=journal-or-kmsg</code>
-                                (or <code class="varname">systemd.log_target=console</code>
-                                on <code class="constant">SIGRTMIN+27</code>,
+                                (or
+                                <code class="varname">systemd.log_target=console</code>
+                                on <code class="constant">SIGRTMIN+27</code> or
                                 <code class="varname">systemd.log_target=kmsg</code>
-                                on <code class="constant">SIGRTMIN+28</code>,
-                                or
-                                <code class="varname">systemd.log_target=syslog-or-kmsg</code>
-                                on <code class="constant">SIGRTMIN+29</code>) on
-                                the kernel command
-                                line.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191284560"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_LOG_LEVEL"><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LEVEL">¶</a></dt><dd><p>systemd reads the
+                                on <code class="constant">SIGRTMIN+28</code>)
+                                on the kernel command
+                                line.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190659360"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_LOG_LEVEL"><span class="term"><code class="varname">$SYSTEMD_LOG_LEVEL</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_LEVEL">¶</a></dt><dd><p>systemd reads the
                                 log level from this environment
                                 variable. This can be overridden with
                                 <code class="option">--log-level=</code>.</p></dd><dt id="$SYSTEMD_LOG_TARGET"><span class="term"><code class="varname">$SYSTEMD_LOG_TARGET</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LOG_TARGET">¶</a></dt><dd><p>systemd reads the
                                 start-up completion notification. See
                                 <a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>
                                 for more information.
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214191260432"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>When run as system instance systemd parses a
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214190635936"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>When run as system instance systemd parses a
                 number of kernel command line
-                arguments<a href="#ftn.idm214191259376" class="footnote" name="idm214191259376"><sup class="footnote">[1]</sup></a>:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code>, </span><span class="term"><code class="varname">rd.systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p>Overrides the unit to
+                arguments<a href="#ftn.idm214190634912" class="footnote" name="idm214190634912"><sup class="footnote">[1]</sup></a>:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.unit="><span class="term"><code class="varname">systemd.unit=</code>, </span><span class="term"><code class="varname">rd.systemd.unit=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.unit=">¶</a></dt><dd><p>Overrides the unit to
                                 activate on boot. Defaults to
                                 <code class="filename">default.target</code>. This
                                 may be used to temporarily boot into a
                                 debug output.  Passing this option
                                 hence turns on the debug output from
                                 both the system manager and the
-                                kernel.</p></dd><dt id="-b"><span class="term"><code class="varname">-b</code>, </span><span class="term"><code class="varname">emergency</code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p>Boot into emergency
+                                kernel.</p></dd><dt id="emergency"><span class="term"><code class="varname">emergency</code>, </span><span class="term"><code class="varname">-b</code></span><a class="headerlink" title="Permalink to this term" href="#emergency">¶</a></dt><dd><p>Boot into emergency
                                 mode. This is equivalent to
                                 <code class="varname">systemd.unit=emergency.target</code>
-                                and provided for compatibility
-                                reasons and to be easier to type.</p></dd><dt id="single"><span class="term"><code class="varname">single</code>, </span><span class="term"><code class="varname">s</code>, </span><span class="term"><code class="varname">S</code>, </span><span class="term"><code class="varname">1</code></span><a class="headerlink" title="Permalink to this term" href="#single">¶</a></dt><dd><p>Boot into rescue
+                                and provided for compatibility reasons
+                                and to be easier to
+                                type.</p></dd><dt id="rescue"><span class="term"><code class="varname">rescue</code>, </span><span class="term"><code class="varname">single</code>, </span><span class="term"><code class="varname">s</code>, </span><span class="term"><code class="varname">S</code>, </span><span class="term"><code class="varname">1</code></span><a class="headerlink" title="Permalink to this term" href="#rescue">¶</a></dt><dd><p>Boot into rescue
                                 mode. This is equivalent to
                                 <code class="varname">systemd.unit=rescue.target</code>
                                 and provided for compatibility reasons
                                 </p></dd></dl></div><p>For other kernel command line parameters
                 understood by components of the core OS, please refer
                 to
-                <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214187977552"></a><h2 id="Sockets and FIFOs">Sockets and FIFOs<a class="headerlink" title="Permalink to this headline" href="#Sockets%20and%20FIFOs">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run/systemd/notify"><span class="term"><code class="filename">/run/systemd/notify</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/notify">¶</a></dt><dd><p>Daemon status
+                <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm214190574624"></a><h2 id="Sockets and FIFOs">Sockets and FIFOs<a class="headerlink" title="Permalink to this headline" href="#Sockets%20and%20FIFOs">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run/systemd/notify"><span class="term"><code class="filename">/run/systemd/notify</code></span><a class="headerlink" title="Permalink to this term" href="#/run/systemd/notify">¶</a></dt><dd><p>Daemon status
                                 notification socket. This is an
                                 <code class="constant">AF_UNIX</code> datagram socket and is used to
                                 implement the daemon notification
                                 unit. This is a named pipe in the file
                                 system. This interface is obsolete and
                                 should not be used in new
-                                applications.</p></dd></dl></div></div><div class="refsect1"><a name="idm214187964368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                applications.</p></dd></dl></div></div><div class="refsect1"><a name="idm214190561440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         The <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/" target="_top">systemd Homepage</a>,
                         <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>,
                         <a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a>,
                         <a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(5)</span></a>,
-                        <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
+                        <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
                         <a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a>,
-                        <a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man7/bootup.7.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>,
                         <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
-                </p></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idm214191259376" class="footnote"><p><a href="#idm214191259376" class="para"><sup class="para">[1] </sup></a>If run inside a Linux
+                </p></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idm214190634912" class="footnote"><p><a href="#idm214190634912" class="para"><sup class="para">[1] </sup></a>If run inside a Linux
                 container these arguments may be passed as command
                 line arguments to systemd itself, next to any of the
                 command line options listed in the Options section
index 1d037f92b2b68f2edd5c5c893c9c007a1cfa5dcc..cde58e85ce2de8dcbed771116b8821180b9f3496 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.INDEX" "7" "" "systemd 215" "systemd.index"
+.TH "SYSTEMD\&.INDEX" "7" "" "systemd 217" "systemd.index"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -179,9 +179,6 @@ systemd.index \- List all manpages from the systemd project
 \fBsd-login\fR(3)
 \-\- APIs for tracking logins
 .br
-\fBsd-readahead\fR(3)
-\-\- Reference implementation of APIs for controlling boot\-time read\-ahead
-.br
 \fBSD_ALERT\fR(3)
 \-\- APIs for new\-style daemons
 .br
@@ -203,6 +200,9 @@ systemd.index \- List all manpages from the systemd project
 \fBsd_bus_creds_get_comm\fR(3)
 \-\- Retrieve fields from a credentials object
 .br
+\fBsd_bus_creds_get_connection_name\fR(3)
+\-\- Retrieve fields from a credentials object
+.br
 \fBsd_bus_creds_get_exe\fR(3)
 \-\- Retrieve fields from a credentials object
 .br
@@ -407,18 +407,48 @@ systemd.index \- List all manpages from the systemd project
 \fBSD_ERR\fR(3)
 \-\- APIs for new\-style daemons
 .br
+\fBsd_event_add_child\fR(3)
+\-\- Add a child state change event source to an event loop
+.br
+\fBsd_event_add_defer\fR(3)
+\-\- Add static event sources to an event loop
+.br
+\fBsd_event_add_exit\fR(3)
+\-\- Add static event sources to an event loop
+.br
+\fBsd_event_add_post\fR(3)
+\-\- Add static event sources to an event loop
+.br
+\fBsd_event_add_signal\fR(3)
+\-\- Add a signal event source to an event loop
+.br
 \fBsd_event_add_time\fR(3)
 \-\- Add a timer event source to an event loop
 .br
 \fBsd_event_default\fR(3)
 \-\- Acquire and release an event loop object
 .br
+\fBsd_event_get_fd\fR(3)
+\-\- Obtain a file descriptor to poll for event loop events
+.br
+\fBsd_event_get_name\fR(3)
+\-\- Set human\-readable names for event sources
+.br
 \fBsd_event_new\fR(3)
 \-\- Acquire and release an event loop object
 .br
 \fBsd_event_ref\fR(3)
 \-\- Acquire and release an event loop object
 .br
+\fBsd_event_set_name\fR(3)
+\-\- Set human\-readable names for event sources
+.br
+\fBsd_event_source_get_child_pid\fR(3)
+\-\- Add a child state change event source to an event loop
+.br
+\fBsd_event_source_get_signal\fR(3)
+\-\- Add a signal event source to an event loop
+.br
 \fBsd_event_source_get_time\fR(3)
 \-\- Add a timer event source to an event loop
 .br
@@ -710,14 +740,20 @@ systemd.index \- List all manpages from the systemd project
 \fBsd_login_monitor_unref\fR(3)
 \-\- Monitor login sessions, seats, users and virtual machines/containers
 .br
+\fBsd_machine_get_class\fR(3)
+\-\- Determine the class and network interface indices of a locally running virtual machine or container\&.
+.br
+\fBsd_machine_get_ifindices\fR(3)
+\-\- Determine the class and network interface indices of a locally running virtual machine or container\&.
+.br
 \fBSD_NOTICE\fR(3)
 \-\- APIs for new\-style daemons
 .br
 \fBsd_notify\fR(3)
-\-\- Notify service manager about start\-up completion and other daemon status changes
+\-\- Notify service manager about start\-up completion and other service status changes
 .br
 \fBsd_notifyf\fR(3)
-\-\- Notify service manager about start\-up completion and other daemon status changes
+\-\- Notify service manager about start\-up completion and other service status changes
 .br
 \fBsd_peer_get_machine_name\fR(3)
 \-\- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer
@@ -755,9 +791,6 @@ systemd.index \- List all manpages from the systemd project
 \fBsd_pid_get_user_unit\fR(3)
 \-\- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer
 .br
-\fBsd_readahead\fR(3)
-\-\- Control ongoing disk boot\-time read\-ahead operations
-.br
 \fBsd_seat_can_graphical\fR(3)
 \-\- Determine state of a specific seat
 .br
@@ -776,6 +809,9 @@ systemd.index \- List all manpages from the systemd project
 \fBsd_session_get_class\fR(3)
 \-\- Determine state of a specific session
 .br
+\fBsd_session_get_desktop\fR(3)
+\-\- Determine state of a specific session
+.br
 \fBsd_session_get_display\fR(3)
 \-\- Determine state of a specific session
 .br
@@ -899,6 +935,9 @@ systemd.index \- List all manpages from the systemd project
 \fBsystemd-cgtop\fR(1)
 \-\- Show top control groups by their resource usage
 .br
+\fBsystemd-coredump\fR(8)
+\-\- Log and store core dumps
+.br
 \fBsystemd-cryptsetup\fR(8)
 \-\- Full disk decryption logic
 .br
@@ -920,6 +959,15 @@ systemd.index \- List all manpages from the systemd project
 \fBsystemd-efi-boot-generator\fR(8)
 \-\- Generator for automatically mounting the EFI System Partition used by the current boot to
 .br
+\fBsystemd-escape\fR(1)
+\-\- Escape strings for usage in system unit names
+.br
+\fBsystemd-firstboot\fR(1)
+\-\- Initialize basic system settings on or before the first boot\-up of a system
+.br
+\fBsystemd-firstboot.service\fR(1)
+\-\- Initialize basic system settings on or before the first boot\-up of a system
+.br
 \fBsystemd-fsck\fR(8)
 \-\- File system checker logic
 .br
@@ -941,6 +989,15 @@ systemd.index \- List all manpages from the systemd project
 \fBsystemd-halt.service\fR(8)
 \-\- System shutdown logic
 .br
+\fBsystemd-hibernate-resume\fR(8)
+\-\- Resume from hibernation
+.br
+\fBsystemd-hibernate-resume-generator\fR(8)
+\-\- Unit generator for resume= kernel parameter
+.br
+\fBsystemd-hibernate-resume@.service\fR(8)
+\-\- Resume from hibernation
+.br
 \fBsystemd-hibernate.service\fR(8)
 \-\- System sleep state logic
 .br
@@ -975,7 +1032,10 @@ systemd.index \- List all manpages from the systemd project
 \-\- HTTP server for journal events
 .br
 \fBsystemd-journal-remote\fR(8)
-\-\- Stream journal messages over the network
+\-\- Receive journal messages over the network
+.br
+\fBsystemd-journal-upload\fR(8)
+\-\- Send journal messages over the network
 .br
 \fBsystemd-journald\fR(8)
 \-\- Journal service
@@ -1055,21 +1115,6 @@ systemd.index \- List all manpages from the systemd project
 \fBsystemd-random-seed.service\fR(8)
 \-\- Load and save the system random seed at boot and shutdown
 .br
-\fBsystemd-readahead\fR(8)
-\-\- Disk read ahead logic
-.br
-\fBsystemd-readahead-collect.service\fR(8)
-\-\- Disk read ahead logic
-.br
-\fBsystemd-readahead-done.service\fR(8)
-\-\- Disk read ahead logic
-.br
-\fBsystemd-readahead-done.timer\fR(8)
-\-\- Disk read ahead logic
-.br
-\fBsystemd-readahead-replay.service\fR(8)
-\-\- Disk read ahead logic
-.br
 \fBsystemd-reboot.service\fR(8)
 \-\- System shutdown logic
 .br
@@ -1292,6 +1337,9 @@ systemd.index \- List all manpages from the systemd project
 \fBtimedatectl\fR(1)
 \-\- Control the system time and date
 .br
+\fBtimesyncd.conf\fR(5)
+\-\- Network Time Synchronization configuration file
+.br
 \fBtmpfiles.d\fR(5)
 \-\- Configuration for creation, deletion and cleaning of volatile and temporary files
 .br
@@ -1301,6 +1349,9 @@ systemd.index \- List all manpages from the systemd project
 \fBudev\fR(7)
 \-\- Dynamic device management
 .br
+\fBudev.conf\fR(5)
+\-\- Configuration for device event managing daemon
+.br
 \fBudevadm\fR(8)
 \-\- udev management tool
 .br
@@ -1315,4 +1366,4 @@ systemd.index \- List all manpages from the systemd project
 .PP
 \fBsystemd.directives\fR(7)
 .PP
-This index contains 412 entries, referring to 180 individual manual pages\&.
+This index contains 429 entries, referring to 191 individual manual pages\&.
index 6a68e816d6fbcef0bf1297fa2bf5ef944b566bdd..347308b620970b1f90eafe467668825326d41bc5 100644 (file)
@@ -19,6 +19,6 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.index — List all manpages from the systemd project</p></div><div class="refsect1"><a name="idm214175805536"></a><h2 id="B">B<a class="headerlink" title="Permalink to this headline" href="#B">¶</a></h2><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a> -- Configure additional binary formats for executables at boot<br><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a> -- Boot performance analysis graphing tool configuration file<br><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a> -- Control the firmware and boot manager settings<br><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a> -- System bootup process<br><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a> -- Introspect the bus<br></p></div><div class="refsect1"><a name="idm214175800544"></a><h2 id="C">C<a class="headerlink" title="Permalink to this headline" href="#C">¶</a></h2><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a> -- Coredump storage configuration file<br><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a> -- Retrieve coredumps from the journal<br><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a> -- Configuration for encrypted block devices<br></p></div><div class="refsect1"><a name="idm214175797344"></a><h2 id="D">D<a class="headerlink" title="Permalink to this headline" href="#D">¶</a></h2><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a> -- Writing and packaging system daemons<br></p></div><div class="refsect1"><a name="idm214175795936"></a><h2 id="F">F<a class="headerlink" title="Permalink to this headline" href="#F">¶</a></h2><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a> -- File system hierarchy overview<br></p></div><div class="refsect1"><a name="idm214175794528"></a><h2 id="H">H<a class="headerlink" title="Permalink to this headline" href="#H">¶</a></h2><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a> -- Local hostname configuration file<br><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a> -- Control the system hostname<br></p></div><div class="refsect1"><a name="idm214175791328"></a><h2 id="I">I<a class="headerlink" title="Permalink to this headline" href="#I">¶</a></h2><p><a href="init.html"><span class="citerefentry"><span class="refentrytitle">init</span>(1)</span></a> -- systemd system and service manager<br></p></div><div class="refsect1"><a name="idm214175789920"></a><h2 id="J">J<a class="headerlink" title="Permalink to this headline" href="#J">¶</a></h2><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a> -- Query the systemd journal<br><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a> -- Journal service configuration file<br></p></div><div class="refsect1"><a name="idm214175855872"></a><h2 id="K">K<a class="headerlink" title="Permalink to this headline" href="#K">¶</a></h2><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a> -- Kernel command line parameters<br><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a> -- Add and remove kernel and initramfs images to and from /boot<br></p></div><div class="refsect1"><a name="idm214175764816"></a><h2 id="L">L<a class="headerlink" title="Permalink to this headline" href="#L">¶</a></h2><p><a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a> -- Configuration file for locale settings<br><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a> -- Control the system locale and keyboard layout settings<br><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a> -- Local timezone configuration file<br><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a> -- Control the systemd login manager<br><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a> -- Login manager configuration file<br></p></div><div class="refsect1"><a name="idm214175759824"></a><h2 id="M">M<a class="headerlink" title="Permalink to this headline" href="#M">¶</a></h2><p><a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> -- Local machine ID configuration file<br><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a> -- Local machine information file<br><a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a> -- Control the systemd machine manager<br><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a> -- Configure kernel modules to load at boot<br></p></div><div class="refsect1"><a name="idm214175755728"></a><h2 id="N">N<a class="headerlink" title="Permalink to this headline" href="#N">¶</a></h2><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a> -- Provide hostname resolution for the locally configured system hostname.<br></p></div><div class="refsect1"><a name="idm214175754320"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a> -- Operating system identification<br></p></div><div class="refsect1"><a name="idm214175752912"></a><h2 id="P">P<a class="headerlink" title="Permalink to this headline" href="#P">¶</a></h2><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a> -- Register user sessions in the systemd login manager<br><a href="poweroff.html"><span class="citerefentry"><span class="refentrytitle">poweroff</span>(8)</span></a> -- Halt, power-off or reboot the machine<br></p></div><div class="refsect1"><a name="idm214175750608"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a> -- Network Name Resolution configuration file<br><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a> -- Print previous and current SysV runlevel<br></p></div><div class="refsect1"><a name="idm214175747408"></a><h2 id="S">S<a class="headerlink" title="Permalink to this headline" href="#S">¶</a></h2><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a> -- APIs for submitting and querying log entries to and from the journal<br><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a> -- APIs for tracking logins<br><a href="sd-readahead.html"><span class="citerefentry"><span class="refentrytitle">sd-readahead</span>(3)</span></a> -- Reference implementation of APIs for controlling boot-time read-ahead<br><a href="SD_ALERT.html"><span class="citerefentry"><span class="refentrytitle">SD_ALERT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a> -- Test whether the system is running the systemd init system<br><a href="sd_bus_creds_get_audit_login_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_login_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_audit_session_id.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_session_id</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cgroup.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cgroup</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cmdline.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cmdline</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_exe.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_exe</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_gid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_gid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_mask.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_mask</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_owner_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid_starttime.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid_starttime</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_selinux_context.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_selinux_context</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_session</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_slice</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unique_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unique_name</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_user_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_well_known_names.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_well_known_names</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_bounding_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_bounding_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_effective_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_effective_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_inheritable_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_inheritable_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_permitted_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_permitted_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_default_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_default_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_copy.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_copy</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_free.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_free</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_get_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_get_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_has_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_has_name</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_is_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_is_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_const.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_const</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errnof.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errnof</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a> -- Attach parts of message based on a format string<br><a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_iovec</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_memfd</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_space</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a> -- Attach a single part to a message<br><a href="sd_bus_message_append_string_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_iovec</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_space</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a> -- Attach an array of strings to a message<br><a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_realtime_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_reply_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_reply_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_seqnum.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_seqnum</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_negotiate_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_creds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_timestamps.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamps</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_open_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_container.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_container</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_remote</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_path_decode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_decode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_ref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_release_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_release_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="SD_CRIT.html"><span class="citerefentry"><span class="refentrytitle">SD_CRIT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_DEBUG.html"><span class="citerefentry"><span class="refentrytitle">SD_DEBUG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_EMERG.html"><span class="citerefentry"><span class="refentrytitle">SD_EMERG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_ERR.html"><span class="citerefentry"><span class="refentrytitle">SD_ERR</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_default.html"><span class="citerefentry"><span class="refentrytitle">sd_event_default</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_ref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_source_get_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_clock.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_clock</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_unref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_get_machine_names.html"><span class="citerefentry"><span class="refentrytitle">sd_get_machine_names</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_get_sessions</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_uids.html"><span class="citerefentry"><span class="refentrytitle">sd_get_uids</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="SD_ID128_CONST_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_CONST_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_equal.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_equal</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_VAL.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_VAL</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_from_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_from_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="SD_ID128_MAKE.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_MAKE</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> -- Generate 128-bit IDs<br><a href="sd_id128_t.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_t</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="SD_INFO.html"><span class="citerefentry"><span class="refentrytitle">SD_INFO</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_mq.html"><span class="citerefentry"><span class="refentrytitle">sd_is_mq</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_special.html"><span class="citerefentry"><span class="refentrytitle">sd_is_special</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_journal.html"><span class="citerefentry"><span class="refentrytitle">sd_journal</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_add_conjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_conjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_disjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_disjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_APPEND.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_APPEND</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_close.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_close</span>(3)</span></a> -- Open the system journal for reading<br><a href="SD_JOURNAL_CURRENT_USER.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_CURRENT_USER</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_enumerate_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_enumerate_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_flush_matches.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_flush_matches</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_FOREACH.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_BACKWARDS.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_BACKWARDS</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_DATA.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_DATA</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="SD_JOURNAL_FOREACH_UNIQUE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_UNIQUE</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_get_catalog.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_catalog_for_message_id.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog_for_message_id</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_get_cutoff_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_monotonic_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_events</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_monotonic_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_timeout</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a> -- Journal disk usage<br><a href="SD_JOURNAL_INVALIDATE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_INVALIDATE</span>(3)</span></a> -- Journal change notification interface<br><a href="SD_JOURNAL_LOCAL_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_LOCAL_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_next_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_NOP.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_NOP</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_container.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_container</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_directory.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_directory</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_files.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_files</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_perror.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_perror</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_previous_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_printv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_printv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_process.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_process</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_reliable_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_reliable_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_restart_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_restart_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="SD_JOURNAL_RUNTIME_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_RUNTIME_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_monotonic_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_realtime_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_tail.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_tail</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_send.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_send</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_sendv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_sendv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_set_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_set_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a> -- Create log stream file descriptor to the journal<br><a href="SD_JOURNAL_SUPPRESS_LOCATION.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SUPPRESS_LOCATION</span>(3)</span></a> -- Submit log entries to the journal<br><a href="SD_JOURNAL_SYSTEM.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SYSTEM</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_test_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_test_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_wait.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_wait</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="SD_LISTEN_FDS_START.html"><span class="citerefentry"><span class="refentrytitle">SD_LISTEN_FDS_START</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="sd_login_monitor.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_flush.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_flush</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_events</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_fd</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_timeout</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_unref</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="SD_NOTICE.html"><span class="citerefentry"><span class="refentrytitle">SD_NOTICE</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="sd_notifyf.html"><span class="citerefentry"><span class="refentrytitle">sd_notifyf</span>(3)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="sd_peer_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_readahead.html"><span class="citerefentry"><span class="refentrytitle">sd_readahead</span>(3)</span></a> -- Control ongoing disk boot-time read-ahead operations<br><a href="sd_seat_can_graphical.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_graphical</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_multi_session.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_multi_session</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_tty</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_sessions</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_session_get_class.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_class</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_display</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_host.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_host</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_user.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_user</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_service.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_service</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_state</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_tty</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_type.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_type</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_uid</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_vt.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_vt</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_remote</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_uid_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_display</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_seats</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_sessions</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_is_on_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_is_on_seat</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="SD_WARNING.html"><span class="citerefentry"><span class="refentrytitle">SD_WARNING</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a> -- Check whether the service manager expects watchdog keep-alive notifications from a service<br><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a> -- Configure kernel parameters at boot<br><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a> -- Control the systemd system and service manager<br><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> -- systemd system and service manager<br><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a> -- Test socket activation of daemons<br><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a> -- Analyze system boot-up performance<br><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a> -- Query the user for a system password<br><a href="systemd-ask-password-console.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-backlight.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-binfmt.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a> -- Boot performance graphing tool<br><a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a> -- Connect STDIO or a socket to a given bus address<br><a href="systemd-bus-proxyd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd.socket</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a> -- Connect a pipeline or program's output with the journal<br><a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a> -- Recursively show control group contents<br><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a> -- Show top control groups by their resource usage<br><a href="systemd-cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a> -- Unit generator for<br><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-debug-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-debug-generator</span>(8)</span></a> -- Generator for enabling a runtime debug shell and masking specific units at boot<br><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a> -- Find overridden configuration files<br><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a> -- Detect execution in a virtualized environment<br><a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a> -- Generator for automatically mounting the EFI System Partition used by the current boot to<br><a href="systemd-fsck.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck-root.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck-root.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a> -- Unit generator for /etc/fstab<br><a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a> -- Generator for enabling getty instances on the console<br><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a> -- Generator for automatically discovering and mounting root,<br><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-hostnamed.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a> -- Execute a program with an inhibition lock taken<br><a href="systemd-initctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.socket</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.socket</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a> -- Stream journal messages over the network<br><a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a> -- Journal service<br><a href="systemd-journald-dev-log.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald-dev-log.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-kexec.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-kexec.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-localed.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-logind.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind</span>(8)</span></a> -- Login manager<br><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a> -- Login manager<br><a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a> -- Initialize the machine ID in /etc/machine-id<br><a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-modules-load.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a> -- Network manager<br><a href="systemd-networkd-wait-online.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a> -- Network manager<br><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a> -- Spawn a namespace container for debugging, testing and building<br><a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a> -- List and query system and user paths<br><a href="systemd-poweroff.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-poweroff.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-quotacheck.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-random-seed.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-readahead.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-collect.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-collect.service</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-done.service</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-done.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-done.timer</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-readahead-replay.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-readahead-replay.service</span>(8)</span></a> -- Disk read ahead logic<br><a href="systemd-reboot.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-reboot.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-remount-fs.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-resolved.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-rfkill.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a> -- Run programs in transient scope or service units<br><a href="systemd-shutdown.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdown</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-shutdownd.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.socket</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a> -- Suspend and hibernation configuration file<br><a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a> -- Bidirectionally proxy local sockets to another (possibly remote) socket.<br><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sysctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a> -- Generator for redirecting boot to offline update mode<br><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-sysusers.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers.service</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-timedated.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timesyncd.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.timer</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup-dev.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup-dev.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a> -- List or process pending systemd password requests<br><a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-control.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-control.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-kernel.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-kernel.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-update-done.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done</span>(8)</span></a> -- Mark<br><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a> -- Mark<br><a href="systemd-update-utmp.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp-runlevel.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp-runlevel.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-user-sessions.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-user.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-vconsole-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a> -- Automount unit configuration<br><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a> -- Device unit configuration<br><a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a> -- Index of configuration directives<br><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a> -- Execution environment configuration<br><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a> -- Special journal fields<br><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a> -- Process killing procedure configuration<br><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a> -- Network device configuration<br><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a> -- Mount unit configuration<br><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a> -- Virtual Network Device configuration<br><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a> -- Network configuration<br><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a> -- Path unit configuration<br><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a> -- Service enablement presets<br><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a> -- Resource control unit settings<br><a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a> -- Scope unit configuration<br><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a> -- Service unit configuration<br><a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a> -- Slice unit configuration<br><a href="systemd.snapshot.html"><span class="citerefentry"><span class="refentrytitle">systemd.snapshot</span>(5)</span></a> -- Snapshot unit configuration<br><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a> -- Socket unit configuration<br><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a> -- Special systemd units<br><a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a> -- Swap unit configuration<br><a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a> -- Target unit configuration<br><a href="systemd.time.html"><span class="citerefentry"><span class="refentrytitle">systemd.time</span>(7)</span></a> -- Time and date specifications<br><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a> -- Timer unit configuration<br><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> -- Unit configuration<br><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a> -- Declarative allocation of system users and groups<br></p></div><div class="refsect1"><a name="idm214175387472"></a><h2 id="T">T<a class="headerlink" title="Permalink to this headline" href="#T">¶</a></h2><p><a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a> -- Change SysV runlevel<br><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a> -- Control the system time and date<br><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> -- Configuration for creation, deletion and cleaning of volatile and temporary files<br></p></div><div class="refsect1"><a name="idm214175383984"></a><h2 id="U">U<a class="headerlink" title="Permalink to this headline" href="#U">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a> -- Dynamic device management<br><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a> -- udev management tool<br></p></div><div class="refsect1"><a name="idm214175381520"></a><h2 id="V">V<a class="headerlink" title="Permalink to this headline" href="#V">¶</a></h2><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a> -- Configuration file for the virtual console<br></p></div><div class="refsect1"><a name="idm214175380016"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.index — List all manpages from the systemd project</p></div><div class="refsect1"><a name="idm214182042016"></a><h2 id="B">B<a class="headerlink" title="Permalink to this headline" href="#B">¶</a></h2><p><a href="binfmt.d.html"><span class="citerefentry"><span class="refentrytitle">binfmt.d</span>(5)</span></a> -- Configure additional binary formats for executables at boot<br><a href="bootchart.conf.html"><span class="citerefentry"><span class="refentrytitle">bootchart.conf</span>(5)</span></a> -- Boot performance analysis graphing tool configuration file<br><a href="bootctl.html"><span class="citerefentry"><span class="refentrytitle">bootctl</span>(1)</span></a> -- Control the firmware and boot manager settings<br><a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a> -- System bootup process<br><a href="busctl.html"><span class="citerefentry"><span class="refentrytitle">busctl</span>(1)</span></a> -- Introspect the bus<br></p></div><div class="refsect1"><a name="idm214182037024"></a><h2 id="C">C<a class="headerlink" title="Permalink to this headline" href="#C">¶</a></h2><p><a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a> -- Coredump storage configuration file<br><a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a> -- Retrieve coredumps from the journal<br><a href="crypttab.html"><span class="citerefentry"><span class="refentrytitle">crypttab</span>(5)</span></a> -- Configuration for encrypted block devices<br></p></div><div class="refsect1"><a name="idm214182033824"></a><h2 id="D">D<a class="headerlink" title="Permalink to this headline" href="#D">¶</a></h2><p><a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a> -- Writing and packaging system daemons<br></p></div><div class="refsect1"><a name="idm214182032416"></a><h2 id="F">F<a class="headerlink" title="Permalink to this headline" href="#F">¶</a></h2><p><a href="file-hierarchy.html"><span class="citerefentry"><span class="refentrytitle">file-hierarchy</span>(7)</span></a> -- File system hierarchy overview<br></p></div><div class="refsect1"><a name="idm214182031008"></a><h2 id="H">H<a class="headerlink" title="Permalink to this headline" href="#H">¶</a></h2><p><a href="halt.html"><span class="citerefentry"><span class="refentrytitle">halt</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a> -- Local hostname configuration file<br><a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a> -- Control the system hostname<br></p></div><div class="refsect1"><a name="idm214182027808"></a><h2 id="I">I<a class="headerlink" title="Permalink to this headline" href="#I">¶</a></h2><p><a href="init.html"><span class="citerefentry"><span class="refentrytitle">init</span>(1)</span></a> -- systemd system and service manager<br></p></div><div class="refsect1"><a name="idm214182026400"></a><h2 id="J">J<a class="headerlink" title="Permalink to this headline" href="#J">¶</a></h2><p><a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a> -- Query the systemd journal<br><a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a> -- Journal service configuration file<br></p></div><div class="refsect1"><a name="idm214182088896"></a><h2 id="K">K<a class="headerlink" title="Permalink to this headline" href="#K">¶</a></h2><p><a href="kernel-command-line.html"><span class="citerefentry"><span class="refentrytitle">kernel-command-line</span>(7)</span></a> -- Kernel command line parameters<br><a href="kernel-install.html"><span class="citerefentry"><span class="refentrytitle">kernel-install</span>(8)</span></a> -- Add and remove kernel and initramfs images to and from /boot<br></p></div><div class="refsect1"><a name="idm214182001296"></a><h2 id="L">L<a class="headerlink" title="Permalink to this headline" href="#L">¶</a></h2><p><a href="locale.conf.html"><span class="citerefentry"><span class="refentrytitle">locale.conf</span>(5)</span></a> -- Configuration file for locale settings<br><a href="localectl.html"><span class="citerefentry"><span class="refentrytitle">localectl</span>(1)</span></a> -- Control the system locale and keyboard layout settings<br><a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a> -- Local timezone configuration file<br><a href="loginctl.html"><span class="citerefentry"><span class="refentrytitle">loginctl</span>(1)</span></a> -- Control the systemd login manager<br><a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a> -- Login manager configuration file<br></p></div><div class="refsect1"><a name="idm214181996304"></a><h2 id="M">M<a class="headerlink" title="Permalink to this headline" href="#M">¶</a></h2><p><a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> -- Local machine ID configuration file<br><a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a> -- Local machine information file<br><a href="machinectl.html"><span class="citerefentry"><span class="refentrytitle">machinectl</span>(1)</span></a> -- Control the systemd machine manager<br><a href="modules-load.d.html"><span class="citerefentry"><span class="refentrytitle">modules-load.d</span>(5)</span></a> -- Configure kernel modules to load at boot<br></p></div><div class="refsect1"><a name="idm214181992208"></a><h2 id="N">N<a class="headerlink" title="Permalink to this headline" href="#N">¶</a></h2><p><a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a> -- Provide hostname resolution for the locally configured system hostname.<br></p></div><div class="refsect1"><a name="idm214181990800"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a> -- Operating system identification<br></p></div><div class="refsect1"><a name="idm214181989392"></a><h2 id="P">P<a class="headerlink" title="Permalink to this headline" href="#P">¶</a></h2><p><a href="pam_systemd.html"><span class="citerefentry"><span class="refentrytitle">pam_systemd</span>(8)</span></a> -- Register user sessions in the systemd login manager<br><a href="poweroff.html"><span class="citerefentry"><span class="refentrytitle">poweroff</span>(8)</span></a> -- Halt, power-off or reboot the machine<br></p></div><div class="refsect1"><a name="idm214181987088"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="resolved.conf.html"><span class="citerefentry"><span class="refentrytitle">resolved.conf</span>(5)</span></a> -- Network Name Resolution configuration file<br><a href="runlevel.html"><span class="citerefentry"><span class="refentrytitle">runlevel</span>(8)</span></a> -- Print previous and current SysV runlevel<br></p></div><div class="refsect1"><a name="idm214181983888"></a><h2 id="S">S<a class="headerlink" title="Permalink to this headline" href="#S">¶</a></h2><p><a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd-id128.html"><span class="citerefentry"><span class="refentrytitle">sd-id128</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a> -- APIs for submitting and querying log entries to and from the journal<br><a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a> -- APIs for tracking logins<br><a href="SD_ALERT.html"><span class="citerefentry"><span class="refentrytitle">SD_ALERT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a> -- Test whether the system is running the systemd init system<br><a href="sd_bus_creds_get_audit_login_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_login_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_audit_session_id.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_audit_session_id</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cgroup.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cgroup</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_cmdline.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_cmdline</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_connection_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_connection_name</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_exe.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_exe</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_gid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_gid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_mask.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_mask</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_owner_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_pid_starttime.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_pid_starttime</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_selinux_context.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_selinux_context</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_session</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_slice</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_tid_comm.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_tid_comm</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_uid</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unique_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unique_name</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_user_unit</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_get_well_known_names.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_get_well_known_names</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_bounding_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_bounding_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_effective_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_effective_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_inheritable_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_inheritable_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_has_permitted_cap.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_has_permitted_cap</span>(3)</span></a> -- Retrieve fields from a credentials object<br><a href="sd_bus_creds_new_from_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_new_from_pid</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_ref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_creds_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_creds_unref</span>(3)</span></a> -- Retrieve credentials object for the specified PID<br><a href="sd_bus_default_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_default_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_default_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_error.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_copy.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_copy</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_free.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_free</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_get_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_get_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_has_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_has_name</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_is_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_is_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_const.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_const</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errno.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errno</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_error_set_errnof.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_error_set_errnof</span>(3)</span></a> -- sd-bus error handling<br><a href="sd_bus_message_append.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append</span>(3)</span></a> -- Attach parts of message based on a format string<br><a href="sd_bus_message_append_array.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_iovec</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_memfd</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_array_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_array_space</span>(3)</span></a> -- Attach an array of items to a message<br><a href="sd_bus_message_append_basic.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_basic</span>(3)</span></a> -- Attach a single part to a message<br><a href="sd_bus_message_append_string_iovec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_iovec</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_memfd.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_memfd</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_string_space.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_string_space</span>(3)</span></a> -- Attach a string to a message<br><a href="sd_bus_message_append_strv.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_append_strv</span>(3)</span></a> -- Attach an array of strings to a message<br><a href="sd_bus_message_get_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_monotonic_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_realtime_usec</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_message_get_reply_cookie.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_reply_cookie</span>(3)</span></a> -- Returns the transaction cookie of a message<br><a href="sd_bus_message_get_seqnum.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_message_get_seqnum</span>(3)</span></a> -- Retrieve the sender timestamps and sequence number of a message<br><a href="sd_bus_negotiate_creds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_creds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_fds</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_negotiate_timestamps.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_negotiate_timestamps</span>(3)</span></a> -- Control feature negotiation on bus connections<br><a href="sd_bus_new.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_new</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_open_system.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_container.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_container</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_system_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_system_remote</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_open_user.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_open_user</span>(3)</span></a> -- Open a connection to the system or user bus<br><a href="sd_bus_path_decode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_decode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_path_encode.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_path_encode</span>(3)</span></a> -- Convert an external identifier into an object path and back<br><a href="sd_bus_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_ref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="sd_bus_release_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_release_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_request_name.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_request_name</span>(3)</span></a> -- Request or release a well-known name on a bus<br><a href="sd_bus_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_bus_unref</span>(3)</span></a> -- Create a new bus object and create or destroy references to it<br><a href="SD_CRIT.html"><span class="citerefentry"><span class="refentrytitle">SD_CRIT</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_DEBUG.html"><span class="citerefentry"><span class="refentrytitle">SD_DEBUG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_EMERG.html"><span class="citerefentry"><span class="refentrytitle">SD_EMERG</span>(3)</span></a> -- APIs for new-style daemons<br><a href="SD_ERR.html"><span class="citerefentry"><span class="refentrytitle">SD_ERR</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_event_add_child.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_child</span>(3)</span></a> -- Add a child state change event source to an event loop<br><a href="sd_event_add_defer.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_defer</span>(3)</span></a> -- Add static event sources to an event loop<br><a href="sd_event_add_exit.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_exit</span>(3)</span></a> -- Add static event sources to an event loop<br><a href="sd_event_add_post.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_post</span>(3)</span></a> -- Add static event sources to an event loop<br><a href="sd_event_add_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_signal</span>(3)</span></a> -- Add a signal event source to an event loop<br><a href="sd_event_add_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_add_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_default.html"><span class="citerefentry"><span class="refentrytitle">sd_event_default</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_event_get_fd</span>(3)</span></a> -- Obtain a file descriptor to poll for event loop events<br><a href="sd_event_get_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_get_name</span>(3)</span></a> -- Set human-readable names for event sources<br><a href="sd_event_new.html"><span class="citerefentry"><span class="refentrytitle">sd_event_new</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_ref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_ref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_event_set_name.html"><span class="citerefentry"><span class="refentrytitle">sd_event_set_name</span>(3)</span></a> -- Set human-readable names for event sources<br><a href="sd_event_source_get_child_pid.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_child_pid</span>(3)</span></a> -- Add a child state change event source to an event loop<br><a href="sd_event_source_get_signal.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_signal</span>(3)</span></a> -- Add a signal event source to an event loop<br><a href="sd_event_source_get_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_get_time_clock.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_get_time_clock</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_source_set_time_accuracy.html"><span class="citerefentry"><span class="refentrytitle">sd_event_source_set_time_accuracy</span>(3)</span></a> -- Add a timer event source to an event loop<br><a href="sd_event_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_event_unref</span>(3)</span></a> -- Acquire and release an event loop object<br><a href="sd_get_machine_names.html"><span class="citerefentry"><span class="refentrytitle">sd_get_machine_names</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_get_seats</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_get_sessions</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="sd_get_uids.html"><span class="citerefentry"><span class="refentrytitle">sd_get_uids</span>(3)</span></a> -- Determine available seats, sessions, logged in users and virtual machines/containers<br><a href="SD_ID128_CONST_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_CONST_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_equal.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_equal</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_STR.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_STR</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="SD_ID128_FORMAT_VAL.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_FORMAT_VAL</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_from_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_from_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="sd_id128_get_boot.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_boot</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a> -- Retrieve 128-bit IDs<br><a href="SD_ID128_MAKE.html"><span class="citerefentry"><span class="refentrytitle">SD_ID128_MAKE</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> -- Generate 128-bit IDs<br><a href="sd_id128_t.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_t</span>(3)</span></a> -- APIs for processing 128-bit IDs<br><a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a> -- Format or parse 128-bit IDs as strings<br><a href="SD_INFO.html"><span class="citerefentry"><span class="refentrytitle">SD_INFO</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_mq.html"><span class="citerefentry"><span class="refentrytitle">sd_is_mq</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_is_special.html"><span class="citerefentry"><span class="refentrytitle">sd_is_special</span>(3)</span></a> -- Check the type of a file descriptor<br><a href="sd_journal.html"><span class="citerefentry"><span class="refentrytitle">sd_journal</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_add_conjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_conjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_disjunction.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_disjunction</span>(3)</span></a> -- Add or remove entry matches<br><a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_APPEND.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_APPEND</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_close.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_close</span>(3)</span></a> -- Open the system journal for reading<br><a href="SD_JOURNAL_CURRENT_USER.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_CURRENT_USER</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_enumerate_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_enumerate_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_enumerate_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_flush_matches.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_flush_matches</span>(3)</span></a> -- Add or remove entry matches<br><a href="SD_JOURNAL_FOREACH.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_BACKWARDS.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_BACKWARDS</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_FOREACH_DATA.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_DATA</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="SD_JOURNAL_FOREACH_UNIQUE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_FOREACH_UNIQUE</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_get_catalog.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_catalog_for_message_id.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_catalog_for_message_id</span>(3)</span></a> -- Retrieve message catalog entry<br><a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_get_cutoff_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_monotonic_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_cutoff_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cutoff_realtime_usec</span>(3)</span></a> -- Read cut-off timestamps from the current journal entry<br><a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_events</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_monotonic_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a> -- Read timestamps from the current journal entry<br><a href="sd_journal_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_timeout</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_get_usage.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_usage</span>(3)</span></a> -- Journal disk usage<br><a href="SD_JOURNAL_INVALIDATE.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_INVALIDATE</span>(3)</span></a> -- Journal change notification interface<br><a href="SD_JOURNAL_LOCAL_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_LOCAL_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_next_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="SD_JOURNAL_NOP.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_NOP</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_container.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_container</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_directory.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_directory</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_open_files.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open_files</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_perror.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_perror</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_previous.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_previous_skip.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_previous_skip</span>(3)</span></a> -- Advance or set back the read pointer in the journal<br><a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_printv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_printv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_process.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_process</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="sd_journal_reliable_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_reliable_fd</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_journal_restart_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_data</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_restart_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_restart_unique</span>(3)</span></a> -- Read unique data fields from the journal<br><a href="SD_JOURNAL_RUNTIME_ONLY.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_RUNTIME_ONLY</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_monotonic_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_monotonic_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_realtime_usec</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_seek_tail.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_tail</span>(3)</span></a> -- Seek to a position in the journal<br><a href="sd_journal_send.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_send</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_sendv.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_sendv</span>(3)</span></a> -- Submit log entries to the journal<br><a href="sd_journal_set_data_threshold.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_set_data_threshold</span>(3)</span></a> -- Read data fields from the current journal entry<br><a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a> -- Create log stream file descriptor to the journal<br><a href="SD_JOURNAL_SUPPRESS_LOCATION.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SUPPRESS_LOCATION</span>(3)</span></a> -- Submit log entries to the journal<br><a href="SD_JOURNAL_SYSTEM.html"><span class="citerefentry"><span class="refentrytitle">SD_JOURNAL_SYSTEM</span>(3)</span></a> -- Open the system journal for reading<br><a href="sd_journal_test_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_test_cursor</span>(3)</span></a> -- Get cursor string for or test cursor string against the current journal entry<br><a href="sd_journal_wait.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_wait</span>(3)</span></a> -- Journal change notification interface<br><a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="SD_LISTEN_FDS_START.html"><span class="citerefentry"><span class="refentrytitle">SD_LISTEN_FDS_START</span>(3)</span></a> -- Check for file descriptors passed by the system manager<br><a href="sd_login_monitor.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_flush.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_flush</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_events.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_events</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_fd</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_get_timeout.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_get_timeout</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_new.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_new</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_login_monitor_unref.html"><span class="citerefentry"><span class="refentrytitle">sd_login_monitor_unref</span>(3)</span></a> -- Monitor login sessions, seats, users and virtual machines/containers<br><a href="sd_machine_get_class.html"><span class="citerefentry"><span class="refentrytitle">sd_machine_get_class</span>(3)</span></a> -- Determine the class and network interface indices of a locally running virtual machine or container.<br><a href="sd_machine_get_ifindices.html"><span class="citerefentry"><span class="refentrytitle">sd_machine_get_ifindices</span>(3)</span></a> -- Determine the class and network interface indices of a locally running virtual machine or container.<br><a href="SD_NOTICE.html"><span class="citerefentry"><span class="refentrytitle">SD_NOTICE</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a> -- Notify service manager about start-up completion and other service status changes<br><a href="sd_notifyf.html"><span class="citerefentry"><span class="refentrytitle">sd_notifyf</span>(3)</span></a> -- Notify service manager about start-up completion and other service status changes<br><a href="sd_peer_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_peer_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_peer_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_machine_name.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_machine_name</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_owner_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_owner_uid</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_session.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_session</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_slice.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_slice</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_pid_get_user_unit.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_get_user_unit</span>(3)</span></a> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<br><a href="sd_seat_can_graphical.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_graphical</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_multi_session.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_multi_session</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_can_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_can_tty</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_active.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_active</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_seat_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_seat_get_sessions</span>(3)</span></a> -- Determine state of a specific seat<br><a href="sd_session_get_class.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_class</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_desktop.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_desktop</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_display</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_host.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_host</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_remote_user.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_remote_user</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_service.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_service</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_state</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_tty.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_tty</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_type.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_type</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_uid.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_uid</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_get_vt.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_vt</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_active.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_active</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_session_is_remote.html"><span class="citerefentry"><span class="refentrytitle">sd_session_is_remote</span>(3)</span></a> -- Determine state of a specific session<br><a href="sd_uid_get_display.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_display</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_seats.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_seats</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_sessions.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_sessions</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_get_state.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_get_state</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="sd_uid_is_on_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_uid_is_on_seat</span>(3)</span></a> -- Determine login state of a specific Unix user ID<br><a href="SD_WARNING.html"><span class="citerefentry"><span class="refentrytitle">SD_WARNING</span>(3)</span></a> -- APIs for new-style daemons<br><a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a> -- Check whether the service manager expects watchdog keep-alive notifications from a service<br><a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a> -- Halt, power-off or reboot the machine<br><a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a> -- Configure kernel parameters at boot<br><a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a> -- Control the systemd system and service manager<br><a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> -- systemd system and service manager<br><a href="systemd-activate.html"><span class="citerefentry"><span class="refentrytitle">systemd-activate</span>(8)</span></a> -- Test socket activation of daemons<br><a href="systemd-analyze.html"><span class="citerefentry"><span class="refentrytitle">systemd-analyze</span>(1)</span></a> -- Analyze system boot-up performance<br><a href="systemd-ask-password.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password</span>(1)</span></a> -- Query the user for a system password<br><a href="systemd-ask-password-console.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-console.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-console.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.path.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.path</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-ask-password-wall.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-ask-password-wall.service</span>(8)</span></a> -- Query the user for system passwords on the console and via wall<br><a href="systemd-backlight.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-backlight@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-backlight@.service</span>(8)</span></a> -- Load and save the display backlight brightness at boot and shutdown<br><a href="systemd-binfmt.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a> -- Configure additional binary formats for executables at boot<br><a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a> -- Boot performance graphing tool<br><a href="systemd-bus-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd</span>(8)</span></a> -- Connect STDIO or a socket to a given bus address<br><a href="systemd-bus-proxyd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd.socket</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-bus-proxyd@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-bus-proxyd@.service</span>(8)</span></a> -- Proxy classic D-Bus clients to kdbus<br><a href="systemd-cat.html"><span class="citerefentry"><span class="refentrytitle">systemd-cat</span>(1)</span></a> -- Connect a pipeline or program's output with the journal<br><a href="systemd-cgls.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgls</span>(1)</span></a> -- Recursively show control group contents<br><a href="systemd-cgtop.html"><span class="citerefentry"><span class="refentrytitle">systemd-cgtop</span>(1)</span></a> -- Show top control groups by their resource usage<br><a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a> -- Log and store core dumps<br><a href="systemd-cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a> -- Unit generator for<br><a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a> -- Full disk decryption logic<br><a href="systemd-debug-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-debug-generator</span>(8)</span></a> -- Generator for enabling a runtime debug shell and masking specific units at boot<br><a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a> -- Find overridden configuration files<br><a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a> -- Detect execution in a virtualized environment<br><a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a> -- Generator for automatically mounting the EFI System Partition used by the current boot to<br><a href="systemd-escape.html"><span class="citerefentry"><span class="refentrytitle">systemd-escape</span>(1)</span></a> -- Escape strings for usage in system unit names<br><a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a> -- Initialize basic system settings on or before the first boot-up of a system<br><a href="systemd-firstboot.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot.service</span>(1)</span></a> -- Initialize basic system settings on or before the first boot-up of a system<br><a href="systemd-fsck.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck-root.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck-root.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fsck@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-fsck@.service</span>(8)</span></a> -- File system checker logic<br><a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a> -- Unit generator for /etc/fstab<br><a href="systemd-getty-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-getty-generator</span>(8)</span></a> -- Generator for enabling getty instances on the console<br><a href="systemd-gpt-auto-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-gpt-auto-generator</span>(8)</span></a> -- Generator for automatically discovering and mounting root,<br><a href="systemd-halt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-halt.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-hibernate-resume.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume</span>(8)</span></a> -- Resume from hibernation<br><a href="systemd-hibernate-resume-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume-generator</span>(8)</span></a> -- Unit generator for resume= kernel parameter<br><a href="systemd-hibernate-resume@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate-resume@.service</span>(8)</span></a> -- Resume from hibernation<br><a href="systemd-hibernate.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hibernate.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-hostnamed.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a> -- Host name bus mechanism<br><a href="systemd-hybrid-sleep.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hybrid-sleep.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-inhibit.html"><span class="citerefentry"><span class="refentrytitle">systemd-inhibit</span>(1)</span></a> -- Execute a program with an inhibition lock taken<br><a href="systemd-initctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.service</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-initctl.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-initctl.socket</span>(8)</span></a> -- /dev/initctl compatibility<br><a href="systemd-journal-gatewayd.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.service</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-gatewayd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-gatewayd.socket</span>(8)</span></a> -- HTTP server for journal events<br><a href="systemd-journal-remote.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-remote</span>(8)</span></a> -- Receive journal messages over the network<br><a href="systemd-journal-upload.html"><span class="citerefentry"><span class="refentrytitle">systemd-journal-upload</span>(8)</span></a> -- Send journal messages over the network<br><a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a> -- Journal service<br><a href="systemd-journald-dev-log.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald-dev-log.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a> -- Journal service<br><a href="systemd-journald.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.socket</span>(8)</span></a> -- Journal service<br><a href="systemd-kexec.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-kexec.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-localed.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-localed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-localed.service</span>(8)</span></a> -- Locale bus mechanism<br><a href="systemd-logind.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind</span>(8)</span></a> -- Login manager<br><a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a> -- Login manager<br><a href="systemd-machine-id-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-machine-id-setup</span>(1)</span></a> -- Initialize the machine ID in /etc/machine-id<br><a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a> -- Virtual machine and container registration manager<br><a href="systemd-modules-load.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-modules-load.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-modules-load.service</span>(8)</span></a> -- Configure kernel modules to load at boot<br><a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a> -- Network manager<br><a href="systemd-networkd-wait-online.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd-wait-online.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd-wait-online.service</span>(8)</span></a> -- Wait for network to come online<br><a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a> -- Network manager<br><a href="systemd-notify.html"><span class="citerefentry"><span class="refentrytitle">systemd-notify</span>(1)</span></a> -- Notify service manager about start-up completion and other daemon status changes<br><a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a> -- Spawn a namespace container for debugging, testing and building<br><a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a> -- List and query system and user paths<br><a href="systemd-poweroff.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-poweroff.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-quotacheck.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-quotacheck.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-quotacheck.service</span>(8)</span></a> -- File system quota checker logic<br><a href="systemd-random-seed.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-random-seed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-random-seed.service</span>(8)</span></a> -- Load and save the system random seed at boot and shutdown<br><a href="systemd-reboot.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-reboot.service</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-remount-fs.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-remount-fs.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-remount-fs.service</span>(8)</span></a> -- Remount root and kernel file systems<br><a href="systemd-resolved.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-resolved.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-resolved.service</span>(8)</span></a> -- Network Name Resolution manager<br><a href="systemd-rfkill.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-rfkill@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-rfkill@.service</span>(8)</span></a> -- Load and save the RF kill switch state at boot and shutdown<br><a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a> -- Run programs in transient scope or service units<br><a href="systemd-shutdown.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdown</span>(8)</span></a> -- System shutdown logic<br><a href="systemd-shutdownd.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.service</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-shutdownd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-shutdownd.socket</span>(8)</span></a> -- Scheduled shutdown service<br><a href="systemd-sleep.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sleep.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-sleep.conf</span>(5)</span></a> -- Suspend and hibernation configuration file<br><a href="systemd-socket-proxyd.html"><span class="citerefentry"><span class="refentrytitle">systemd-socket-proxyd</span>(8)</span></a> -- Bidirectionally proxy local sockets to another (possibly remote) socket.<br><a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a> -- System sleep state logic<br><a href="systemd-sysctl.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-sysctl.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysctl.service</span>(8)</span></a> -- Configure kernel parameters at boot<br><a href="systemd-system-update-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-system-update-generator</span>(8)</span></a> -- Generator for redirecting boot to offline update mode<br><a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-sysusers.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers.service</span>(8)</span></a> -- Allocate system users and groups<br><a href="systemd-timedated.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a> -- Time and date bus mechanism<br><a href="systemd-timesyncd.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a> -- Network Time Synchronization<br><a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-clean.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-clean.timer</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup-dev.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup-dev.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tmpfiles-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles-setup.service</span>(8)</span></a> -- Creates, deletes and cleans up volatile and temporary files and directories<br><a href="systemd-tty-ask-password-agent.html"><span class="citerefentry"><span class="refentrytitle">systemd-tty-ask-password-agent</span>(1)</span></a> -- List or process pending systemd password requests<br><a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-control.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-control.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd-kernel.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd-kernel.socket</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a> -- Device event managing daemon<br><a href="systemd-update-done.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done</span>(8)</span></a> -- Mark<br><a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a> -- Mark<br><a href="systemd-update-utmp.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp-runlevel.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp-runlevel.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-update-utmp.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-utmp.service</span>(8)</span></a> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<br><a href="systemd-user-sessions.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user-sessions.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-user-sessions.service</span>(8)</span></a> -- Permit user logins after boot, prohibit user logins at shutdown<br><a href="systemd-user.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-user.conf</span>(5)</span></a> -- System and session service manager configuration file<br><a href="systemd-vconsole-setup.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a> -- Configure the virtual console at boot<br><a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a> -- Automount unit configuration<br><a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a> -- Device unit configuration<br><a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a> -- Index of configuration directives<br><a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a> -- Execution environment configuration<br><a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a> -- Special journal fields<br><a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a> -- Process killing procedure configuration<br><a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a> -- Network device configuration<br><a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a> -- Mount unit configuration<br><a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a> -- Virtual Network Device configuration<br><a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a> -- Network configuration<br><a href="systemd.path.html"><span class="citerefentry"><span class="refentrytitle">systemd.path</span>(5)</span></a> -- Path unit configuration<br><a href="systemd.preset.html"><span class="citerefentry"><span class="refentrytitle">systemd.preset</span>(5)</span></a> -- Service enablement presets<br><a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a> -- Resource control unit settings<br><a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a> -- Scope unit configuration<br><a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a> -- Service unit configuration<br><a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a> -- Slice unit configuration<br><a href="systemd.snapshot.html"><span class="citerefentry"><span class="refentrytitle">systemd.snapshot</span>(5)</span></a> -- Snapshot unit configuration<br><a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a> -- Socket unit configuration<br><a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a> -- Special systemd units<br><a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a> -- Swap unit configuration<br><a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a> -- Target unit configuration<br><a href="systemd.time.html"><span class="citerefentry"><span class="refentrytitle">systemd.time</span>(7)</span></a> -- Time and date specifications<br><a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a> -- Timer unit configuration<br><a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> -- Unit configuration<br><a href="sysusers.d.html"><span class="citerefentry"><span class="refentrytitle">sysusers.d</span>(5)</span></a> -- Declarative allocation of system users and groups<br></p></div><div class="refsect1"><a name="idm214181607104"></a><h2 id="T">T<a class="headerlink" title="Permalink to this headline" href="#T">¶</a></h2><p><a href="telinit.html"><span class="citerefentry"><span class="refentrytitle">telinit</span>(8)</span></a> -- Change SysV runlevel<br><a href="timedatectl.html"><span class="citerefentry"><span class="refentrytitle">timedatectl</span>(1)</span></a> -- Control the system time and date<br><a href="timesyncd.conf.html"><span class="citerefentry"><span class="refentrytitle">timesyncd.conf</span>(5)</span></a> -- Network Time Synchronization configuration file<br><a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> -- Configuration for creation, deletion and cleaning of volatile and temporary files<br></p></div><div class="refsect1"><a name="idm214181602624"></a><h2 id="U">U<a class="headerlink" title="Permalink to this headline" href="#U">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a> -- Dynamic device management<br><a href="udev.conf.html"><span class="citerefentry"><span class="refentrytitle">udev.conf</span>(5)</span></a> -- Configuration for device event managing daemon<br><a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a> -- udev management tool<br></p></div><div class="refsect1"><a name="idm214181599168"></a><h2 id="V">V<a class="headerlink" title="Permalink to this headline" href="#V">¶</a></h2><p><a href="vconsole.conf.html"><span class="citerefentry"><span class="refentrytitle">vconsole.conf</span>(5)</span></a> -- Configuration file for the virtual console<br></p></div><div class="refsect1"><a name="idm214181597664"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
-    </p><p><a name="counts"></a>This index contains 412 entries, referring to 180 individual manual pages.</p></div></div></body></html>
+    </p><p><a name="counts"></a>This index contains 429 entries, referring to 191 individual manual pages.</p></div></div></body></html>
index 25b04570de545000d605b0a0bc3ad16392b47ccd..7779acf37f7779bd3b00b22ed236ce04bd716543 100644 (file)
     <refname>systemd.index</refname>
     <refpurpose>List all manpages from the systemd project</refpurpose>
   </refnamediv>
-<refsect1><title>B</title><para><citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configure additional binary formats for executables at boot<sbr/><citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Boot performance analysis graphing tool configuration file<sbr/><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the firmware and boot manager settings<sbr/><citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- System bootup process<sbr/><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Introspect the bus<sbr/></para></refsect1><refsect1><title>C</title><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Coredump storage configuration file<sbr/><citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Retrieve coredumps from the journal<sbr/><citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration for encrypted block devices<sbr/></para></refsect1><refsect1><title>D</title><para><citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Writing and packaging system daemons<sbr/></para></refsect1><refsect1><title>F</title><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- File system hierarchy overview<sbr/></para></refsect1><refsect1><title>H</title><para><citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/><citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local hostname configuration file<sbr/><citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the system hostname<sbr/></para></refsect1><refsect1><title>I</title><para><citerefentry><refentrytitle>init</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- systemd system and service manager<sbr/></para></refsect1><refsect1><title>J</title><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Query the systemd journal<sbr/><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Journal service configuration file<sbr/></para></refsect1><refsect1><title>K</title><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Kernel command line parameters<sbr/><citerefentry><refentrytitle>kernel-install</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Add and remove kernel and initramfs images to and from /boot<sbr/></para></refsect1><refsect1><title>L</title><para><citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration file for locale settings<sbr/><citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the system locale and keyboard layout settings<sbr/><citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local timezone configuration file<sbr/><citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the systemd login manager<sbr/><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Login manager configuration file<sbr/></para></refsect1><refsect1><title>M</title><para><citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local machine ID configuration file<sbr/><citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local machine information file<sbr/><citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the systemd machine manager<sbr/><citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configure kernel modules to load at boot<sbr/></para></refsect1><refsect1><title>N</title><para><citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Provide hostname resolution for the locally configured system hostname.<sbr/></para></refsect1><refsect1><title>O</title><para><citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Operating system identification<sbr/></para></refsect1><refsect1><title>P</title><para><citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Register user sessions in the systemd login manager<sbr/><citerefentry><refentrytitle>poweroff</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/></para></refsect1><refsect1><title>R</title><para><citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/><citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Network Name Resolution configuration file<sbr/><citerefentry><refentrytitle>runlevel</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Print previous and current SysV runlevel<sbr/></para></refsect1><refsect1><title>S</title><para><citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for submitting and querying log entries to and from the journal<sbr/><citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for tracking logins<sbr/><citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Reference implementation of APIs for controlling boot-time read-ahead<sbr/><citerefentry><refentrytitle>SD_ALERT</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Test whether the system is running the systemd init system<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_audit_login_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_audit_session_id</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_cgroup</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_cmdline</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_comm</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_exe</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_gid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_mask</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_pid_starttime</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_selinux_context</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_slice</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_tid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_tid_comm</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_unique_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_user_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_well_known_names</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_bounding_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_effective_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_inheritable_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_permitted_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_creds_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_creds_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_default_system</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_default_user</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_copy</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_free</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_get_errno</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_has_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_is_set</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set_const</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set_errno</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set_errnof</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach parts of message based on a format string<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array_iovec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array_space</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a single part to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_string_iovec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a string to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a string to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_string_space</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a string to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of strings to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Returns the transaction cookie of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve the sender timestamps and sequence number of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve the sender timestamps and sequence number of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_reply_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Returns the transaction cookie of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_seqnum</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve the sender timestamps and sequence number of a message<sbr/><citerefentry><refentrytitle>sd_bus_negotiate_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Control feature negotiation on bus connections<sbr/><citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Control feature negotiation on bus connections<sbr/><citerefentry><refentrytitle>sd_bus_negotiate_timestamps</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Control feature negotiation on bus connections<sbr/><citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create a new bus object and create or destroy references to it<sbr/><citerefentry><refentrytitle>sd_bus_open_system</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_open_system_container</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_open_system_remote</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_path_decode</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Convert an external identifier into an object path and back<sbr/><citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Convert an external identifier into an object path and back<sbr/><citerefentry><refentrytitle>sd_bus_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create a new bus object and create or destroy references to it<sbr/><citerefentry><refentrytitle>sd_bus_release_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Request or release a well-known name on a bus<sbr/><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Request or release a well-known name on a bus<sbr/><citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create a new bus object and create or destroy references to it<sbr/><citerefentry><refentrytitle>SD_CRIT</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>SD_DEBUG</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>SD_EMERG</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>SD_ERR</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_default</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_event_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_event_source_get_time</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_get_time_accuracy</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_get_time_clock</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_set_time</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_set_time_accuracy</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_get_machine_names</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_get_sessions</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_get_uids</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>SD_ID128_CONST_STR</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_equal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>SD_ID128_FORMAT_STR</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>SD_ID128_FORMAT_VAL</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_from_string</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Format or parse 128-bit IDs as strings<sbr/><citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve 128-bit IDs<sbr/><citerefentry><refentrytitle>SD_ID128_MAKE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Generate 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_t</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Format or parse 128-bit IDs as strings<sbr/><citerefentry><refentrytitle>SD_INFO</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_mq</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_socket</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_socket_inet</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_socket_unix</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_special</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_journal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_add_conjunction</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>sd_journal_add_disjunction</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>SD_JOURNAL_APPEND</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_close</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>SD_JOURNAL_CURRENT_USER</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_enumerate_data</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_enumerate_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>sd_journal_flush_matches</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH_BACKWARDS</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH_DATA</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH_UNIQUE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve message catalog entry<sbr/><citerefentry><refentrytitle>sd_journal_get_catalog_for_message_id</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve message catalog entry<sbr/><citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Get cursor string for or test cursor string against the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read cut-off timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read cut-off timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_data_threshold</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_events</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal disk usage<sbr/><citerefentry><refentrytitle>SD_JOURNAL_INVALIDATE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>SD_JOURNAL_LOCAL_ONLY</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>sd_journal_next_skip</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_NOP</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_open_container</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_open_directory</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_open_files</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_perror</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_previous</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>sd_journal_previous_skip</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_printv</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_process</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>sd_journal_reliable_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_restart_data</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_restart_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_RUNTIME_ONLY</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_tail</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_send</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_sendv</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_set_data_threshold</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create log stream file descriptor to the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_SUPPRESS_LOCATION</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_SYSTEM</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_test_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Get cursor string for or test cursor string against the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check for file descriptors passed by the system manager<sbr/><citerefentry><refentrytitle>SD_LISTEN_FDS_START</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check for file descriptors passed by the system manager<sbr/><citerefentry><refentrytitle>sd_login_monitor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_flush</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_get_events</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_get_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>SD_NOTICE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Notify service manager about start-up completion and other daemon status changes<sbr/><citerefentry><refentrytitle>sd_notifyf</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Notify service manager about start-up completion and other daemon status changes<sbr/><citerefentry><refentrytitle>sd_peer_get_machine_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_slice</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_user_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_machine_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_slice</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_user_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Control ongoing disk boot-time read-ahead operations<sbr/><citerefentry><refentrytitle>sd_seat_can_graphical</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_can_multi_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_can_tty</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_get_sessions</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_session_get_class</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_display</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_remote_host</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_remote_user</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_service</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_tty</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_vt</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_is_remote</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_uid_get_display</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_get_sessions</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_is_on_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>SD_WARNING</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check whether the service manager expects watchdog keep-alive notifications from a service<sbr/><citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/><citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configure kernel parameters at boot<sbr/><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the systemd system and service manager<sbr/><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- systemd system and service manager<sbr/><citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Test socket activation of daemons<sbr/><citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Analyze system boot-up performance<sbr/><citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Query the user for a system password<sbr/><citerefentry><refentrytitle>systemd-ask-password-console.path</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-ask-password-console.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-ask-password-wall.path</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-ask-password-wall.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-backlight</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the display backlight brightness at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the display backlight brightness at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-binfmt</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure additional binary formats for executables at boot<sbr/><citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure additional binary formats for executables at boot<sbr/><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Boot performance graphing tool<sbr/><citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Connect STDIO or a socket to a given bus address<sbr/><citerefentry><refentrytitle>systemd-bus-proxyd.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Proxy classic D-Bus clients to kdbus<sbr/><citerefentry><refentrytitle>systemd-bus-proxyd@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Proxy classic D-Bus clients to kdbus<sbr/><citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Connect a pipeline or program's output with the journal<sbr/><citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Recursively show control group contents<sbr/><citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Show top control groups by their resource usage<sbr/><citerefentry><refentrytitle>systemd-cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Full disk decryption logic<sbr/><citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Unit generator for<sbr/><citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Full disk decryption logic<sbr/><citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for enabling a runtime debug shell and masking specific units at boot<sbr/><citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Find overridden configuration files<sbr/><citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Detect execution in a virtualized environment<sbr/><citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for automatically mounting the EFI System Partition used by the current boot to<sbr/><citerefentry><refentrytitle>systemd-fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system checker logic<sbr/><citerefentry><refentrytitle>systemd-fsck-root.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system checker logic<sbr/><citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system checker logic<sbr/><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Unit generator for /etc/fstab<sbr/><citerefentry><refentrytitle>systemd-getty-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for enabling getty instances on the console<sbr/><citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for automatically discovering and mounting root,<sbr/><citerefentry><refentrytitle>systemd-halt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-hostnamed</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Host name bus mechanism<sbr/><citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Host name bus mechanism<sbr/><citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Execute a program with an inhibition lock taken<sbr/><citerefentry><refentrytitle>systemd-initctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- /dev/initctl compatibility<sbr/><citerefentry><refentrytitle>systemd-initctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- /dev/initctl compatibility<sbr/><citerefentry><refentrytitle>systemd-initctl.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- /dev/initctl compatibility<sbr/><citerefentry><refentrytitle>systemd-journal-gatewayd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- HTTP server for journal events<sbr/><citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- HTTP server for journal events<sbr/><citerefentry><refentrytitle>systemd-journal-gatewayd.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- HTTP server for journal events<sbr/><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Stream journal messages over the network<sbr/><citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-journald-dev-log.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-journald.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-kexec.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-localed</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Locale bus mechanism<sbr/><citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Locale bus mechanism<sbr/><citerefentry><refentrytitle>systemd-logind</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Login manager<sbr/><citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Login manager<sbr/><citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Initialize the machine ID in /etc/machine-id<sbr/><citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Virtual machine and container registration manager<sbr/><citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Virtual machine and container registration manager<sbr/><citerefentry><refentrytitle>systemd-modules-load</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel modules to load at boot<sbr/><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel modules to load at boot<sbr/><citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network manager<sbr/><citerefentry><refentrytitle>systemd-networkd-wait-online</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Wait for network to come online<sbr/><citerefentry><refentrytitle>systemd-networkd-wait-online.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Wait for network to come online<sbr/><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network manager<sbr/><citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Notify service manager about start-up completion and other daemon status changes<sbr/><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Spawn a namespace container for debugging, testing and building<sbr/><citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- List and query system and user paths<sbr/><citerefentry><refentrytitle>systemd-poweroff.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-quotacheck</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system quota checker logic<sbr/><citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system quota checker logic<sbr/><citerefentry><refentrytitle>systemd-random-seed</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the system random seed at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-random-seed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the system random seed at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-readahead</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Disk read ahead logic<sbr/><citerefentry><refentrytitle>systemd-readahead-collect.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Disk read ahead logic<sbr/><citerefentry><refentrytitle>systemd-readahead-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Disk read ahead logic<sbr/><citerefentry><refentrytitle>systemd-readahead-done.timer</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Disk read ahead logic<sbr/><citerefentry><refentrytitle>systemd-readahead-replay.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Disk read ahead logic<sbr/><citerefentry><refentrytitle>systemd-reboot.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-remount-fs</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Remount root and kernel file systems<sbr/><citerefentry><refentrytitle>systemd-remount-fs.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Remount root and kernel file systems<sbr/><citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Name Resolution manager<sbr/><citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Name Resolution manager<sbr/><citerefentry><refentrytitle>systemd-rfkill</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the RF kill switch state at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the RF kill switch state at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Run programs in transient scope or service units<sbr/><citerefentry><refentrytitle>systemd-shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-shutdownd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Scheduled shutdown service<sbr/><citerefentry><refentrytitle>systemd-shutdownd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Scheduled shutdown service<sbr/><citerefentry><refentrytitle>systemd-shutdownd.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Scheduled shutdown service<sbr/><citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Suspend and hibernation configuration file<sbr/><citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Bidirectionally proxy local sockets to another (possibly remote) socket.<sbr/><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel parameters at boot<sbr/><citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel parameters at boot<sbr/><citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for redirecting boot to offline update mode<sbr/><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- System and session service manager configuration file<sbr/><citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Allocate system users and groups<sbr/><citerefentry><refentrytitle>systemd-sysusers.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Allocate system users and groups<sbr/><citerefentry><refentrytitle>systemd-timedated</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Time and date bus mechanism<sbr/><citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Time and date bus mechanism<sbr/><citerefentry><refentrytitle>systemd-timesyncd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Time Synchronization<sbr/><citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Time Synchronization<sbr/><citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-clean.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-clean.timer</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-setup-dev.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- List or process pending systemd password requests<sbr/><citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-udevd-control.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-udevd-kernel.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-update-done</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Mark<sbr/><citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Mark<sbr/><citerefentry><refentrytitle>systemd-update-utmp</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<sbr/><citerefentry><refentrytitle>systemd-update-utmp-runlevel.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<sbr/><citerefentry><refentrytitle>systemd-update-utmp.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<sbr/><citerefentry><refentrytitle>systemd-user-sessions</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Permit user logins after boot, prohibit user logins at shutdown<sbr/><citerefentry><refentrytitle>systemd-user-sessions.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Permit user logins after boot, prohibit user logins at shutdown<sbr/><citerefentry><refentrytitle>systemd-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- System and session service manager configuration file<sbr/><citerefentry><refentrytitle>systemd-vconsole-setup</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure the virtual console at boot<sbr/><citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure the virtual console at boot<sbr/><citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Automount unit configuration<sbr/><citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Device unit configuration<sbr/><citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Index of configuration directives<sbr/><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Execution environment configuration<sbr/><citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Special journal fields<sbr/><citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Process killing procedure configuration<sbr/><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Network device configuration<sbr/><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Mount unit configuration<sbr/><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Virtual Network Device configuration<sbr/><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Network configuration<sbr/><citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Path unit configuration<sbr/><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Service enablement presets<sbr/><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Resource control unit settings<sbr/><citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Scope unit configuration<sbr/><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Service unit configuration<sbr/><citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Slice unit configuration<sbr/><citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Snapshot unit configuration<sbr/><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Socket unit configuration<sbr/><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Special systemd units<sbr/><citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Swap unit configuration<sbr/><citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Target unit configuration<sbr/><citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Time and date specifications<sbr/><citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Timer unit configuration<sbr/><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Unit configuration<sbr/><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Declarative allocation of system users and groups<sbr/></para></refsect1><refsect1><title>T</title><para><citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Change SysV runlevel<sbr/><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the system time and date<sbr/><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration for creation, deletion and cleaning of volatile and temporary files<sbr/></para></refsect1><refsect1><title>U</title><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Dynamic device management<sbr/><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- udev management tool<sbr/></para></refsect1><refsect1><title>V</title><para><citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration file for the virtual console<sbr/></para></refsect1><refsect1>
+<refsect1><title>B</title><para><citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configure additional binary formats for executables at boot<sbr/><citerefentry><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Boot performance analysis graphing tool configuration file<sbr/><citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the firmware and boot manager settings<sbr/><citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- System bootup process<sbr/><citerefentry><refentrytitle>busctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Introspect the bus<sbr/></para></refsect1><refsect1><title>C</title><para><citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Coredump storage configuration file<sbr/><citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Retrieve coredumps from the journal<sbr/><citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration for encrypted block devices<sbr/></para></refsect1><refsect1><title>D</title><para><citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Writing and packaging system daemons<sbr/></para></refsect1><refsect1><title>F</title><para><citerefentry><refentrytitle>file-hierarchy</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- File system hierarchy overview<sbr/></para></refsect1><refsect1><title>H</title><para><citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/><citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local hostname configuration file<sbr/><citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the system hostname<sbr/></para></refsect1><refsect1><title>I</title><para><citerefentry><refentrytitle>init</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- systemd system and service manager<sbr/></para></refsect1><refsect1><title>J</title><para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Query the systemd journal<sbr/><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Journal service configuration file<sbr/></para></refsect1><refsect1><title>K</title><para><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Kernel command line parameters<sbr/><citerefentry><refentrytitle>kernel-install</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Add and remove kernel and initramfs images to and from /boot<sbr/></para></refsect1><refsect1><title>L</title><para><citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration file for locale settings<sbr/><citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the system locale and keyboard layout settings<sbr/><citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local timezone configuration file<sbr/><citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the systemd login manager<sbr/><citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Login manager configuration file<sbr/></para></refsect1><refsect1><title>M</title><para><citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local machine ID configuration file<sbr/><citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Local machine information file<sbr/><citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the systemd machine manager<sbr/><citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configure kernel modules to load at boot<sbr/></para></refsect1><refsect1><title>N</title><para><citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Provide hostname resolution for the locally configured system hostname.<sbr/></para></refsect1><refsect1><title>O</title><para><citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Operating system identification<sbr/></para></refsect1><refsect1><title>P</title><para><citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Register user sessions in the systemd login manager<sbr/><citerefentry><refentrytitle>poweroff</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/></para></refsect1><refsect1><title>R</title><para><citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/><citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Network Name Resolution configuration file<sbr/><citerefentry><refentrytitle>runlevel</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Print previous and current SysV runlevel<sbr/></para></refsect1><refsect1><title>S</title><para><citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for submitting and querying log entries to and from the journal<sbr/><citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for tracking logins<sbr/><citerefentry><refentrytitle>SD_ALERT</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Test whether the system is running the systemd init system<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_audit_login_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_audit_session_id</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_cgroup</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_cmdline</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_comm</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_connection_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_exe</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_gid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_mask</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_pid_starttime</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_selinux_context</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_slice</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_tid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_tid_comm</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_unique_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_user_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_get_well_known_names</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_bounding_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_effective_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_inheritable_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_has_permitted_cap</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve fields from a credentials object<sbr/><citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_creds_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_creds_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve credentials object for the specified PID<sbr/><citerefentry><refentrytitle>sd_bus_default_system</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_default_user</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_copy</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_free</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_get_errno</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_has_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_is_set</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set_const</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set_errno</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_error_set_errnof</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- sd-bus error handling<sbr/><citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach parts of message based on a format string<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array_iovec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_array_space</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of items to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a single part to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_string_iovec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a string to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_string_memfd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a string to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_string_space</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach a string to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_append_strv</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Attach an array of strings to a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Returns the transaction cookie of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve the sender timestamps and sequence number of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve the sender timestamps and sequence number of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_reply_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Returns the transaction cookie of a message<sbr/><citerefentry><refentrytitle>sd_bus_message_get_seqnum</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve the sender timestamps and sequence number of a message<sbr/><citerefentry><refentrytitle>sd_bus_negotiate_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Control feature negotiation on bus connections<sbr/><citerefentry><refentrytitle>sd_bus_negotiate_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Control feature negotiation on bus connections<sbr/><citerefentry><refentrytitle>sd_bus_negotiate_timestamps</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Control feature negotiation on bus connections<sbr/><citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create a new bus object and create or destroy references to it<sbr/><citerefentry><refentrytitle>sd_bus_open_system</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_open_system_container</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_open_system_remote</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open a connection to the system or user bus<sbr/><citerefentry><refentrytitle>sd_bus_path_decode</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Convert an external identifier into an object path and back<sbr/><citerefentry><refentrytitle>sd_bus_path_encode</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Convert an external identifier into an object path and back<sbr/><citerefentry><refentrytitle>sd_bus_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create a new bus object and create or destroy references to it<sbr/><citerefentry><refentrytitle>sd_bus_release_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Request or release a well-known name on a bus<sbr/><citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Request or release a well-known name on a bus<sbr/><citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create a new bus object and create or destroy references to it<sbr/><citerefentry><refentrytitle>SD_CRIT</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>SD_DEBUG</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>SD_EMERG</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>SD_ERR</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a child state change event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add static event sources to an event loop<sbr/><citerefentry><refentrytitle>sd_event_add_exit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add static event sources to an event loop<sbr/><citerefentry><refentrytitle>sd_event_add_post</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add static event sources to an event loop<sbr/><citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a signal event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_default</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_event_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Obtain a file descriptor to poll for event loop events<sbr/><citerefentry><refentrytitle>sd_event_get_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Set human-readable names for event sources<sbr/><citerefentry><refentrytitle>sd_event_new</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_event_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_event_set_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Set human-readable names for event sources<sbr/><citerefentry><refentrytitle>sd_event_source_get_child_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a child state change event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_get_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a signal event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_get_time</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_get_time_accuracy</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_get_time_clock</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_set_time</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_source_set_time_accuracy</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add a timer event source to an event loop<sbr/><citerefentry><refentrytitle>sd_event_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Acquire and release an event loop object<sbr/><citerefentry><refentrytitle>sd_get_machine_names</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_get_sessions</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_get_uids</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine available seats, sessions, logged in users and virtual machines/containers<sbr/><citerefentry><refentrytitle>SD_ID128_CONST_STR</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_equal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>SD_ID128_FORMAT_STR</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>SD_ID128_FORMAT_VAL</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_from_string</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Format or parse 128-bit IDs as strings<sbr/><citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve 128-bit IDs<sbr/><citerefentry><refentrytitle>SD_ID128_MAKE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Generate 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_t</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for processing 128-bit IDs<sbr/><citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Format or parse 128-bit IDs as strings<sbr/><citerefentry><refentrytitle>SD_INFO</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_mq</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_socket</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_socket_inet</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_socket_unix</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_is_special</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check the type of a file descriptor<sbr/><citerefentry><refentrytitle>sd_journal</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_add_conjunction</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>sd_journal_add_disjunction</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>SD_JOURNAL_APPEND</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_close</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>SD_JOURNAL_CURRENT_USER</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_enumerate_data</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_enumerate_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>sd_journal_flush_matches</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Add or remove entry matches<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH_BACKWARDS</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH_DATA</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>SD_JOURNAL_FOREACH_UNIQUE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve message catalog entry<sbr/><citerefentry><refentrytitle>sd_journal_get_catalog_for_message_id</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Retrieve message catalog entry<sbr/><citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Get cursor string for or test cursor string against the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read cut-off timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read cut-off timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_data_threshold</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_events</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read timestamps from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_get_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal disk usage<sbr/><citerefentry><refentrytitle>SD_JOURNAL_INVALIDATE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>SD_JOURNAL_LOCAL_ONLY</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>sd_journal_next_skip</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_NOP</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_open_container</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_open_directory</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_open_files</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_perror</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_previous</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>sd_journal_previous_skip</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Advance or set back the read pointer in the journal<sbr/><citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_printv</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_process</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>sd_journal_reliable_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_journal_restart_data</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_restart_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read unique data fields from the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_RUNTIME_ONLY</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_seek_tail</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Seek to a position in the journal<sbr/><citerefentry><refentrytitle>sd_journal_send</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_sendv</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>sd_journal_set_data_threshold</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Read data fields from the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Create log stream file descriptor to the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_SUPPRESS_LOCATION</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Submit log entries to the journal<sbr/><citerefentry><refentrytitle>SD_JOURNAL_SYSTEM</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Open the system journal for reading<sbr/><citerefentry><refentrytitle>sd_journal_test_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Get cursor string for or test cursor string against the current journal entry<sbr/><citerefentry><refentrytitle>sd_journal_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Journal change notification interface<sbr/><citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check for file descriptors passed by the system manager<sbr/><citerefentry><refentrytitle>SD_LISTEN_FDS_START</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check for file descriptors passed by the system manager<sbr/><citerefentry><refentrytitle>sd_login_monitor</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_flush</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_get_events</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_get_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_login_monitor_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Monitor login sessions, seats, users and virtual machines/containers<sbr/><citerefentry><refentrytitle>sd_machine_get_class</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine the class and network interface indices of a locally running virtual machine or container.<sbr/><citerefentry><refentrytitle>sd_machine_get_ifindices</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine the class and network interface indices of a locally running virtual machine or container.<sbr/><citerefentry><refentrytitle>SD_NOTICE</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Notify service manager about start-up completion and other service status changes<sbr/><citerefentry><refentrytitle>sd_notifyf</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Notify service manager about start-up completion and other service status changes<sbr/><citerefentry><refentrytitle>sd_peer_get_machine_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_slice</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_peer_get_user_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_machine_name</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_slice</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_pid_get_user_unit</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine session, service, owner of a session, container/VM or slice of a specific PID or socket peer<sbr/><citerefentry><refentrytitle>sd_seat_can_graphical</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_can_multi_session</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_can_tty</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_seat_get_sessions</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific seat<sbr/><citerefentry><refentrytitle>sd_session_get_class</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_desktop</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_display</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_remote_host</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_remote_user</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_service</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_tty</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_get_vt</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_session_is_remote</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine state of a specific session<sbr/><citerefentry><refentrytitle>sd_uid_get_display</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_get_sessions</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>sd_uid_is_on_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Determine login state of a specific Unix user ID<sbr/><citerefentry><refentrytitle>SD_WARNING</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- APIs for new-style daemons<sbr/><citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry> -- Check whether the service manager expects watchdog keep-alive notifications from a service<sbr/><citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Halt, power-off or reboot the machine<sbr/><citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configure kernel parameters at boot<sbr/><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the systemd system and service manager<sbr/><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- systemd system and service manager<sbr/><citerefentry><refentrytitle>systemd-activate</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Test socket activation of daemons<sbr/><citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Analyze system boot-up performance<sbr/><citerefentry><refentrytitle>systemd-ask-password</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Query the user for a system password<sbr/><citerefentry><refentrytitle>systemd-ask-password-console.path</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-ask-password-console.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-ask-password-wall.path</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-ask-password-wall.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Query the user for system passwords on the console and via wall<sbr/><citerefentry><refentrytitle>systemd-backlight</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the display backlight brightness at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the display backlight brightness at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-binfmt</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure additional binary formats for executables at boot<sbr/><citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure additional binary formats for executables at boot<sbr/><citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Boot performance graphing tool<sbr/><citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Connect STDIO or a socket to a given bus address<sbr/><citerefentry><refentrytitle>systemd-bus-proxyd.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Proxy classic D-Bus clients to kdbus<sbr/><citerefentry><refentrytitle>systemd-bus-proxyd@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Proxy classic D-Bus clients to kdbus<sbr/><citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Connect a pipeline or program's output with the journal<sbr/><citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Recursively show control group contents<sbr/><citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Show top control groups by their resource usage<sbr/><citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Log and store core dumps<sbr/><citerefentry><refentrytitle>systemd-cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Full disk decryption logic<sbr/><citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Unit generator for<sbr/><citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Full disk decryption logic<sbr/><citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for enabling a runtime debug shell and masking specific units at boot<sbr/><citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Find overridden configuration files<sbr/><citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Detect execution in a virtualized environment<sbr/><citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for automatically mounting the EFI System Partition used by the current boot to<sbr/><citerefentry><refentrytitle>systemd-escape</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Escape strings for usage in system unit names<sbr/><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Initialize basic system settings on or before the first boot-up of a system<sbr/><citerefentry><refentrytitle>systemd-firstboot.service</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Initialize basic system settings on or before the first boot-up of a system<sbr/><citerefentry><refentrytitle>systemd-fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system checker logic<sbr/><citerefentry><refentrytitle>systemd-fsck-root.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system checker logic<sbr/><citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system checker logic<sbr/><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Unit generator for /etc/fstab<sbr/><citerefentry><refentrytitle>systemd-getty-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for enabling getty instances on the console<sbr/><citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for automatically discovering and mounting root,<sbr/><citerefentry><refentrytitle>systemd-halt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-hibernate-resume</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Resume from hibernation<sbr/><citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Unit generator for resume= kernel parameter<sbr/><citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Resume from hibernation<sbr/><citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-hostnamed</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Host name bus mechanism<sbr/><citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Host name bus mechanism<sbr/><citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-inhibit</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Execute a program with an inhibition lock taken<sbr/><citerefentry><refentrytitle>systemd-initctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- /dev/initctl compatibility<sbr/><citerefentry><refentrytitle>systemd-initctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- /dev/initctl compatibility<sbr/><citerefentry><refentrytitle>systemd-initctl.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- /dev/initctl compatibility<sbr/><citerefentry><refentrytitle>systemd-journal-gatewayd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- HTTP server for journal events<sbr/><citerefentry><refentrytitle>systemd-journal-gatewayd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- HTTP server for journal events<sbr/><citerefentry><refentrytitle>systemd-journal-gatewayd.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- HTTP server for journal events<sbr/><citerefentry><refentrytitle>systemd-journal-remote</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Receive journal messages over the network<sbr/><citerefentry><refentrytitle>systemd-journal-upload</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Send journal messages over the network<sbr/><citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-journald-dev-log.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-journald.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Journal service<sbr/><citerefentry><refentrytitle>systemd-kexec.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-localed</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Locale bus mechanism<sbr/><citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Locale bus mechanism<sbr/><citerefentry><refentrytitle>systemd-logind</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Login manager<sbr/><citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Login manager<sbr/><citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Initialize the machine ID in /etc/machine-id<sbr/><citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Virtual machine and container registration manager<sbr/><citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Virtual machine and container registration manager<sbr/><citerefentry><refentrytitle>systemd-modules-load</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel modules to load at boot<sbr/><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel modules to load at boot<sbr/><citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network manager<sbr/><citerefentry><refentrytitle>systemd-networkd-wait-online</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Wait for network to come online<sbr/><citerefentry><refentrytitle>systemd-networkd-wait-online.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Wait for network to come online<sbr/><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network manager<sbr/><citerefentry><refentrytitle>systemd-notify</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Notify service manager about start-up completion and other daemon status changes<sbr/><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Spawn a namespace container for debugging, testing and building<sbr/><citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- List and query system and user paths<sbr/><citerefentry><refentrytitle>systemd-poweroff.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-quotacheck</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system quota checker logic<sbr/><citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- File system quota checker logic<sbr/><citerefentry><refentrytitle>systemd-random-seed</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the system random seed at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-random-seed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the system random seed at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-reboot.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-remount-fs</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Remount root and kernel file systems<sbr/><citerefentry><refentrytitle>systemd-remount-fs.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Remount root and kernel file systems<sbr/><citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Name Resolution manager<sbr/><citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Name Resolution manager<sbr/><citerefentry><refentrytitle>systemd-rfkill</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the RF kill switch state at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Load and save the RF kill switch state at boot and shutdown<sbr/><citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Run programs in transient scope or service units<sbr/><citerefentry><refentrytitle>systemd-shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System shutdown logic<sbr/><citerefentry><refentrytitle>systemd-shutdownd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Scheduled shutdown service<sbr/><citerefentry><refentrytitle>systemd-shutdownd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Scheduled shutdown service<sbr/><citerefentry><refentrytitle>systemd-shutdownd.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Scheduled shutdown service<sbr/><citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-sleep.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Suspend and hibernation configuration file<sbr/><citerefentry><refentrytitle>systemd-socket-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Bidirectionally proxy local sockets to another (possibly remote) socket.<sbr/><citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- System sleep state logic<sbr/><citerefentry><refentrytitle>systemd-sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel parameters at boot<sbr/><citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure kernel parameters at boot<sbr/><citerefentry><refentrytitle>systemd-system-update-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Generator for redirecting boot to offline update mode<sbr/><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- System and session service manager configuration file<sbr/><citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Allocate system users and groups<sbr/><citerefentry><refentrytitle>systemd-sysusers.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Allocate system users and groups<sbr/><citerefentry><refentrytitle>systemd-timedated</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Time and date bus mechanism<sbr/><citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Time and date bus mechanism<sbr/><citerefentry><refentrytitle>systemd-timesyncd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Time Synchronization<sbr/><citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Network Time Synchronization<sbr/><citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-clean.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-clean.timer</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-setup-dev.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tmpfiles-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Creates, deletes and cleans up volatile and temporary files and directories<sbr/><citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- List or process pending systemd password requests<sbr/><citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-udevd-control.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-udevd-kernel.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Device event managing daemon<sbr/><citerefentry><refentrytitle>systemd-update-done</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Mark<sbr/><citerefentry><refentrytitle>systemd-update-done.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Mark<sbr/><citerefentry><refentrytitle>systemd-update-utmp</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<sbr/><citerefentry><refentrytitle>systemd-update-utmp-runlevel.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<sbr/><citerefentry><refentrytitle>systemd-update-utmp.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Write audit and utmp updates at bootup, runlevel changes and shutdown<sbr/><citerefentry><refentrytitle>systemd-user-sessions</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Permit user logins after boot, prohibit user logins at shutdown<sbr/><citerefentry><refentrytitle>systemd-user-sessions.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Permit user logins after boot, prohibit user logins at shutdown<sbr/><citerefentry><refentrytitle>systemd-user.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- System and session service manager configuration file<sbr/><citerefentry><refentrytitle>systemd-vconsole-setup</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure the virtual console at boot<sbr/><citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Configure the virtual console at boot<sbr/><citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Automount unit configuration<sbr/><citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Device unit configuration<sbr/><citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Index of configuration directives<sbr/><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Execution environment configuration<sbr/><citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Special journal fields<sbr/><citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Process killing procedure configuration<sbr/><citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Network device configuration<sbr/><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Mount unit configuration<sbr/><citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Virtual Network Device configuration<sbr/><citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Network configuration<sbr/><citerefentry><refentrytitle>systemd.path</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Path unit configuration<sbr/><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Service enablement presets<sbr/><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Resource control unit settings<sbr/><citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Scope unit configuration<sbr/><citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Service unit configuration<sbr/><citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Slice unit configuration<sbr/><citerefentry><refentrytitle>systemd.snapshot</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Snapshot unit configuration<sbr/><citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Socket unit configuration<sbr/><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Special systemd units<sbr/><citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Swap unit configuration<sbr/><citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Target unit configuration<sbr/><citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Time and date specifications<sbr/><citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Timer unit configuration<sbr/><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Unit configuration<sbr/><citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Declarative allocation of system users and groups<sbr/></para></refsect1><refsect1><title>T</title><para><citerefentry><refentrytitle>telinit</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- Change SysV runlevel<sbr/><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> -- Control the system time and date<sbr/><citerefentry><refentrytitle>timesyncd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Network Time Synchronization configuration file<sbr/><citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration for creation, deletion and cleaning of volatile and temporary files<sbr/></para></refsect1><refsect1><title>U</title><para><citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> -- Dynamic device management<sbr/><citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration for device event managing daemon<sbr/><citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry> -- udev management tool<sbr/></para></refsect1><refsect1><title>V</title><para><citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> -- Configuration file for the virtual console<sbr/></para></refsect1><refsect1>
     <title>See Also</title>
     <para>
       <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
     </para>
 
-    <para id="counts">This index contains 412 entries, referring to 180 individual manual pages.</para>
+    <para id="counts">This index contains 429 entries, referring to 191 individual manual pages.</para>
   </refsect1></refentry>
index bf863d0cc78c4695fe028b42ddbd9d78ada016f6..67b66e4e3863fedfa554a4a734dfda2961a31d56 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.JOURNAL\-FIELDS" "7" "" "systemd 215" "systemd.journal-fields"
+.TH "SYSTEMD\&.JOURNAL\-FIELDS" "7" "" "systemd 217" "systemd.journal-fields"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -254,7 +254,7 @@ The wallclock time (\fBCLOCK_REALTIME\fR) at the point in time the entry was rec
 .PP
 \fI__MONOTONIC_TIMESTAMP=\fR
 .RS 4
-The monotonic time (\fBCLOCK_MONOTONIC\fR) at the point in time the entry was received by the journal in microseconds, formatted as a decimal string\&. To be useful as an address for the entry, this should be combined with with the boot ID in
+The monotonic time (\fBCLOCK_MONOTONIC\fR) at the point in time the entry was received by the journal in microseconds, formatted as a decimal string\&. To be useful as an address for the entry, this should be combined with the boot ID in
 "_BOOT_ID="\&.
 .RE
 .SH "SEE ALSO"
index 45fe328cc7c0b63128bd579b0d0dee070b2fd876..b2e4a4dd46d83a2e0795485c6a6fdc12024c0794 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.journal-fields"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.journal-fields — Special journal fields</p></div><div class="refsect1"><a name="idm214184810768"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Entries in the journal resemble an environment
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.journal-fields"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.journal-fields — Special journal fields</p></div><div class="refsect1"><a name="idm214180811312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Entries in the journal resemble an environment
                 block in their syntax but with fields that can
                 include binary data. Primarily, fields are formatted
                 UTF-8 text strings, and binary formatting is used only
@@ -28,7 +28,7 @@
                 applications, but a few fields have special
                 meaning. All fields with special meanings are
                 optional. In some cases, fields may appear more than
-                once per entry.</p></div><div class="refsect1"><a name="idm214184434256"></a><h2 id="User Journal Fields">User Journal Fields<a class="headerlink" title="Permalink to this headline" href="#User%20Journal%20Fields">¶</a></h2><p>User fields are fields that are directly passed
+                once per entry.</p></div><div class="refsect1"><a name="idm214180809520"></a><h2 id="User Journal Fields">User Journal Fields<a class="headerlink" title="Permalink to this headline" href="#User%20Journal%20Fields">¶</a></h2><p>User fields are fields that are directly passed
                 from clients and stored in the journal.</p><div class="variablelist"><dl class="variablelist"><dt id="MESSAGE="><span class="term"><code class="varname">MESSAGE=</code></span><a class="headerlink" title="Permalink to this term" href="#MESSAGE=">¶</a></dt><dd><p>The human-readable
                                         message string for this
                                         entry. This is supposed to be
@@ -67,7 +67,7 @@
                                         number causing this entry, if
                                         any. Contains the numeric
                                         value of
-                                        <a href="errno.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
+                                        <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
                                         formatted as a decimal
                                         string.</p></dd><dt id="SYSLOG_FACILITY="><span class="term"><code class="varname">SYSLOG_FACILITY=</code>, </span><span class="term"><code class="varname">SYSLOG_IDENTIFIER=</code>, </span><span class="term"><code class="varname">SYSLOG_PID=</code></span><a class="headerlink" title="Permalink to this term" href="#SYSLOG_FACILITY=">¶</a></dt><dd><p>Syslog compatibility
                                         fields containing the facility
@@ -77,7 +77,7 @@
                                         PID. (Note that the tag is
                                         usually derived from glibc's
                                         <code class="varname">program_invocation_short_name</code>
-                                        variable, see <a href="program_invocation_short_name.html"><span class="citerefentry"><span class="refentrytitle">program_invocation_short_name</span>(3)</span></a>.)</p></dd></dl></div></div><div class="refsect1"><a name="idm214186362608"></a><h2 id="Trusted Journal Fields">Trusted Journal Fields<a class="headerlink" title="Permalink to this headline" href="#Trusted%20Journal%20Fields">¶</a></h2><p>Fields prefixed with an underscore are trusted
+                                        variable, see <a href="program_invocation_short_name.html"><span class="citerefentry"><span class="refentrytitle">program_invocation_short_name</span>(3)</span></a>.)</p></dd></dl></div></div><div class="refsect1"><a name="idm214184738672"></a><h2 id="Trusted Journal Fields">Trusted Journal Fields<a class="headerlink" title="Permalink to this headline" href="#Trusted%20Journal%20Fields">¶</a></h2><p>Fields prefixed with an underscore are trusted
                 fields, i.e. fields that are implicitly added by the
                 journal and cannot be altered by client code.</p><div class="variablelist"><dl class="variablelist"><dt id="_PID="><span class="term"><code class="varname">_PID=</code>, </span><span class="term"><code class="varname">_UID=</code>, </span><span class="term"><code class="varname">_GID=</code></span><a class="headerlink" title="Permalink to this term" href="#_PID=">¶</a></dt><dd><p>The process, user, and
                                         group ID of the process the
@@ -86,7 +86,7 @@
                                         string.</p></dd><dt id="_COMM="><span class="term"><code class="varname">_COMM=</code>, </span><span class="term"><code class="varname">_EXE=</code>, </span><span class="term"><code class="varname">_CMDLINE=</code></span><a class="headerlink" title="Permalink to this term" href="#_COMM=">¶</a></dt><dd><p>The name, the executable
                                         path, and the command line of
                                         the process the journal entry
-                                        originates from.</p></dd><dt id="_CAP_EFFECTIVE="><span class="term"><code class="varname">_CAP_EFFECTIVE=</code></span><a class="headerlink" title="Permalink to this term" href="#_CAP_EFFECTIVE=">¶</a></dt><dd><p>The effective <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a> of
+                                        originates from.</p></dd><dt id="_CAP_EFFECTIVE="><span class="term"><code class="varname">_CAP_EFFECTIVE=</code></span><a class="headerlink" title="Permalink to this term" href="#_CAP_EFFECTIVE=">¶</a></dt><dd><p>The effective <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a> of
                                         the process the journal entry
                                         originates from.</p></dd><dt id="_AUDIT_SESSION="><span class="term"><code class="varname">_AUDIT_SESSION=</code>, </span><span class="term"><code class="varname">_AUDIT_LOGINUID=</code></span><a class="headerlink" title="Permalink to this term" href="#_AUDIT_SESSION=">¶</a></dt><dd><p>The session and login
                                         UID of the process the journal
                                                         </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kernel%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>for those
                                                                 read from the
                                                                 kernel
-                                                                </p></dd></dl></div></dd></dl></div></div><div class="refsect1"><a name="idm214184538176"></a><h2 id="Kernel Journal Fields">Kernel Journal Fields<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Journal%20Fields">¶</a></h2><p>Kernel fields are fields that are used by
+                                                                </p></dd></dl></div></dd></dl></div></div><div class="refsect1"><a name="idm214179726640"></a><h2 id="Kernel Journal Fields">Kernel Journal Fields<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Journal%20Fields">¶</a></h2><p>Kernel fields are fields that are used by
                 messages originating in the kernel and stored in the
                 journal.</p><div class="variablelist"><dl class="variablelist"><dt id="_KERNEL_DEVICE="><span class="term"><code class="varname">_KERNEL_DEVICE=</code></span><a class="headerlink" title="Permalink to this term" href="#_KERNEL_DEVICE=">¶</a></dt><dd><p>The kernel device
                                         name. If the entry is
                                         pointing to the device node in
                                         <code class="filename">/dev</code>. This
                                         field is frequently set more
-                                        than once per entry.</p></dd></dl></div></div><div class="refsect1"><a name="idm214185136352"></a><h2 id="Fields to log on behalf of a different program">Fields to log on behalf of a different program<a class="headerlink" title="Permalink to this headline" href="#Fields%20to%20log%20on%20behalf%20of%20a%20different%20program">¶</a></h2><p>Fields in this section are used by programs
+                                        than once per entry.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179709200"></a><h2 id="Fields to log on behalf of a different program">Fields to log on behalf of a different program<a class="headerlink" title="Permalink to this headline" href="#Fields%20to%20log%20on%20behalf%20of%20a%20different%20program">¶</a></h2><p>Fields in this section are used by programs
                 to specify that they are logging on behalf of another
                 program or unit.
                 </p><p>Fields used by the <span class="command"><strong>systemd-coredump</strong></span>
                                         as described above, except that the
                                         process identified by <em class="replaceable"><code>PID</code></em>
                                         is described, instead of the process
-                                        which logged the message.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186169520"></a><h2 id="Address Fields">Address Fields<a class="headerlink" title="Permalink to this headline" href="#Address%20Fields">¶</a></h2><p>During serialization into external formats, such
+                                        which logged the message.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179685168"></a><h2 id="Address Fields">Address Fields<a class="headerlink" title="Permalink to this headline" href="#Address%20Fields">¶</a></h2><p>During serialization into external formats, such
                 as the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal
                 Export Format</a> or the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/json" target="_top">Journal
                 JSON Format</a>, the addresses of journal entries
                                         microseconds, formatted as a decimal
                                         string. To be useful as an
                                         address for the entry, this
-                                        should be combined with with the
+                                        should be combined with the
                                         boot ID in "<code class="literal">_BOOT_ID=</code>".
-                                        </p></dd></dl></div></div><div class="refsect1"><a name="idm214184586832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                        </p></dd></dl></div></div><div class="refsect1"><a name="idm214179671344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                           <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>,
index 472a0855cd7764232fddd96005b72c3114b4bcef..154b95ac7e2e3f8ca3752bab54411491e18281ed 100644 (file)
                                         number causing this entry, if
                                         any. Contains the numeric
                                         value of
-                                        <citerefentry><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                        <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                         formatted as a decimal
                                         string.</para>
                                 </listitem>
                         <varlistentry>
                                 <term><varname>_CAP_EFFECTIVE=</varname></term>
                                 <listitem>
-                                        <para>The effective <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> of
+                                        <para>The effective <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> of
                                         the process the journal entry
                                         originates from.</para>
                                 </listitem>
                                         microseconds, formatted as a decimal
                                         string. To be useful as an
                                         address for the entry, this
-                                        should be combined with with the
+                                        should be combined with the
                                         boot ID in <literal>_BOOT_ID=</literal>.
                                         </para>
                                 </listitem>
index 9465af28816d59e4c56b95efdf7c9a862390163e..7963f7f53cc4b7bebd301eddfce2db0e6f549ac2 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.KILL" "5" "" "systemd 215" "systemd.kill"
+.TH "SYSTEMD\&.KILL" "5" "" "systemd 217" "systemd.kill"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -111,7 +111,7 @@ to remaining processes after a timeout, if the normal shutdown procedure left pr
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBjournalctl\fR(8),
 \fBsystemd.unit\fR(5),
 \fBsystemd.service\fR(5),
index 0eb442d0efcc04bdfd2bdf477520d8d7d926aed9..3a7aae081141ace88b35032ad81ec113810b09a1 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.kill"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.kill — Process killing procedure
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.kill"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.kill — Process killing procedure
                 configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
                 <code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code>,
                 <code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code>,
                 <code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code>,
-                <code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code></p></div><div class="refsect1"><a name="idm214167918160"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Unit configuration files for services, sockets,
+                <code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code></p></div><div class="refsect1"><a name="idm214192753776"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Unit configuration files for services, sockets,
                 mount points, swap devices and scopes share a subset
                 of configuration options which define the
                 killing procedure of processes belonging to the unit.</p><p>This man page lists the configuration options
@@ -42,7 +42,7 @@
                 specific to each unit type.</p><p>The kill procedure
                 configuration options are configured in the [Service],
                 [Socket], [Mount] or [Swap] section, depending on the
-                unit type.</p></div><div class="refsect1"><a name="idm214169586688"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="KillMode="><span class="term"><code class="varname">KillMode=</code></span><a class="headerlink" title="Permalink to this term" href="#KillMode=">¶</a></dt><dd><p>Specifies how
+                unit type.</p></div><div class="refsect1"><a name="idm214192746032"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="KillMode="><span class="term"><code class="varname">KillMode=</code></span><a class="headerlink" title="Permalink to this term" href="#KillMode=">¶</a></dt><dd><p>Specifies how
                                 processes of this unit shall be
                                 killed. One of
                                 <code class="option">control-group</code>,
@@ -91,7 +91,7 @@
                                 signal (unless this is disabled via
                                 the <code class="varname">SendSIGKILL=</code>
                                 option). See
-                                <a href="kill.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/kill.2.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>
                                 for more
                                 information.</p><p>Defaults to
                                 <code class="option">control-group</code>.</p></dd><dt id="KillSignal="><span class="term"><code class="varname">KillSignal=</code></span><a class="headerlink" title="Permalink to this term" href="#KillSignal=">¶</a></dt><dd><p>Specifies which signal
                                 shutdown procedure left processes of
                                 the service around. Takes a boolean
                                 value. Defaults to "yes".
-                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214170164624"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214196666000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(8)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                           <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>,
                           <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
-                          <a href="kill.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man2/kill.2.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>,
                           <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>
                   </p></div></div></body></html>
index 39796470a090074eb279302d6e938b1cae9e07a6..caee371c815b98ab0bf646e721d6c3d1e6da29a8 100644 (file)
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
index 09349e9a2f262ffdd4d317bb4eb4c89252d73239..ef64a6f6ef49a4d50ddc41d83e4726b2db49d47c 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.LINK" "5" "" "systemd 215" "systemd.link"
+.TH "SYSTEMD\&.LINK" "5" "" "systemd 217" "systemd.link"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -165,7 +165,12 @@ may be disabled by specifying
 "net\&.ifnames=0"
 on the kernel commandline\&. Each of the policies may fail, and the first successful one is used\&. The name is not set directly, but is exported to udev as the property
 "ID_NET_NAME", which is, by default, used by a udev rule to set
-"NAME"\&. The available policies are:
+"NAME"\&. If the name has already been set by userspace, no renaming is performed\&. The available policies are:
+.PP
+"kernel"
+.RS 4
+If the kernel claims that the name it has set for a device is predictable, then no renaming is performed\&.
+.RE
 .PP
 "database"
 .RS 4
index 06ec2c42aa81b51717097e6e43774548a69055bd..649ed8210b028e2c73fdd4e989967b512f70637c 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.link"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.link — Network device configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>link</code></em>.link</code></p></div><div class="refsect1"><a name="idm214167301024"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Network link configuration is performed by the <span class="command"><strong>net_setup_link</strong></span>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.link"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.link — Network device configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>link</code></em>.link</code></p></div><div class="refsect1"><a name="idm214194408656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Network link configuration is performed by the <span class="command"><strong>net_setup_link</strong></span>
                 udev builtin.</p><p>The link files are read from the files located in the
                 system network directory <code class="filename">/usr/lib/systemd/network</code>,
                 the volatile runtime network directory <code class="filename">/run/systemd/network</code>,
@@ -37,7 +37,7 @@
                 determines if a given link file may be applied to a given device; and a
                 "<code class="literal">[Link]</code>" section specifying how the device should be
                 configured. The first (in lexical order) of the link files that matches
-                a given device is applied.</p></div><div class="refsect1"><a name="idm214167231168"></a><h2 id="[Match] Section Options">[Match] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMatch%5D%20Section%20Options">¶</a></h2><p>A link file is said to match a device if each of the entries in the
+                a given device is applied.</p></div><div class="refsect1"><a name="idm214194396848"></a><h2 id="[Match] Section Options">[Match] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMatch%5D%20Section%20Options">¶</a></h2><p>A link file is said to match a device if each of the entries in the
                 "<code class="literal">[Match]</code>" section matches, or if the section is empty.
                 The following keys are accepted:</p><div class="variablelist"><dl class="variablelist"><dt id="MACAddress="><span class="term"><code class="varname">MACAddress=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddress=">¶</a></dt><dd><p>The hardware address.</p></dd><dt id="Path="><span class="term"><code class="varname">Path=</code></span><a class="headerlink" title="Permalink to this term" href="#Path=">¶</a></dt><dd><p>The persistent path, as exposed by the
                                 udev property "<code class="literal">ID_PATH</code>". May
@@ -63,7 +63,7 @@
                                         specific architecture. See
                                         "<code class="literal">ConditionArchitecture=</code>" in
                                         <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
-                                        for details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214169589552"></a><h2 id="[Link] Section Options">[Link] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BLink%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Link]</code>" section accepts the following
+                                        for details.</p></dd></dl></div></div><div class="refsect1"><a name="idm214198314768"></a><h2 id="[Link] Section Options">[Link] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BLink%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Link]</code>" section accepts the following
                 keys:</p><div class="variablelist"><dl class="variablelist"><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p>A description of the device.</p></dd><dt id="Alias="><span class="term"><code class="varname">Alias=</code></span><a class="headerlink" title="Permalink to this term" href="#Alias=">¶</a></dt><dd><p>The "<code class="literal">ifalias</code>" is set to
                                         this value.</p></dd><dt id="MACAddressPolicy="><span class="term"><code class="varname">MACAddressPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddressPolicy=">¶</a></dt><dd><p>The policy by which the MAC address
                                         should be set. The available policies are:
                                         not set directly, but is exported to udev as
                                         the property "<code class="literal">ID_NET_NAME</code>",
                                         which is, by default, used by a udev rule to set
-                                        "<code class="literal">NAME</code>". The available policies
-                                        are:</p><div class="variablelist"><dl class="variablelist"><dt id="database"><span class="term">"<code class="literal">database</code>"</span><a class="headerlink" title="Permalink to this term" href="#database">¶</a></dt><dd><p>The name is set based on entries in
+                                        "<code class="literal">NAME</code>". If the name has already
+                                        been set by userspace, no renaming is performed.
+                                        The available policies are:</p><div class="variablelist"><dl class="variablelist"><dt id="kernel"><span class="term">"<code class="literal">kernel</code>"</span><a class="headerlink" title="Permalink to this term" href="#kernel">¶</a></dt><dd><p>If the kernel claims that the name it
+                                                                has set for a device is predictable, then
+                                                                no renaming is performed.
+                                                                </p></dd><dt id="database"><span class="term">"<code class="literal">database</code>"</span><a class="headerlink" title="Permalink to this term" href="#database">¶</a></dt><dd><p>The name is set based on entries in
                                                                 the udev's Hardware Database with the key
                                                                 "<code class="literal">ID_NET_NAME_FROM_DATABASE</code>".
                                                                 </p></dd><dt id="onboard"><span class="term">"<code class="literal">onboard</code>"</span><a class="headerlink" title="Permalink to this term" href="#onboard">¶</a></dt><dd><p>The name is set based on information given by
                                         The accepted values are "<code class="literal">half</code>"
                                         and "<code class="literal">full</code>".</p></dd><dt id="WakeOnLan="><span class="term"><code class="varname">WakeOnLan=</code></span><a class="headerlink" title="Permalink to this term" href="#WakeOnLan=">¶</a></dt><dd><p>The Wake-on-LAN policy to set for the
                                         device. The supported values are:</p><div class="variablelist"><dl class="variablelist"><dt id="phy"><span class="term">"<code class="literal">phy</code>"</span><a class="headerlink" title="Permalink to this term" href="#phy">¶</a></dt><dd><p>Wake on PHY activity.</p></dd><dt id="magic"><span class="term">"<code class="literal">magic</code>"</span><a class="headerlink" title="Permalink to this term" href="#magic">¶</a></dt><dd><p>Wake on receipt of a magic packet.
-                                                                </p></dd><dt id="off"><span class="term">"<code class="literal">off</code>"</span><a class="headerlink" title="Permalink to this term" href="#off">¶</a></dt><dd><p>Never wake.</p></dd></dl></div></dd></dl></div></div><div class="refsect1"><a name="idm214167421376"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214168941088"></a><p class="title"><b>Example 1. /etc/systemd/network/wireless.link</b></p><div class="example-contents"><pre class="programlisting">[Match]
+                                                                </p></dd><dt id="off"><span class="term">"<code class="literal">off</code>"</span><a class="headerlink" title="Permalink to this term" href="#off">¶</a></dt><dd><p>Never wake.</p></dd></dl></div></dd></dl></div></div><div class="refsect1"><a name="idm214193295888"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214193295248"></a><p class="title"><b>Example 1. /etc/systemd/network/wireless.link</b></p><div class="example-contents"><pre class="programlisting">[Match]
 MACAddress=12:34:56:78:9a:bc
 Driver=brcmsmac
 Path=pci-0000:02:00.0-*
@@ -131,7 +135,7 @@ Name=wireless0
 MTUBytes=1450
 BitsPerSecond=10M
 WakeOnLan=magic
-MACAddress=cb:a9:87:65:43:21</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214168063536"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+MACAddress=cb:a9:87:65:43:21</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214193293472"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>,
                         <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
                 </p></div></div></body></html>
index 05effc3b713c1a1e7c0ff6beb1e6dfcc311ab9d6..6075b39b790d1bc88783b7ea2fbae5cdab3bda74 100644 (file)
                                         not set directly, but is exported to udev as
                                         the property <literal>ID_NET_NAME</literal>,
                                         which is, by default, used by a udev rule to set
-                                        <literal>NAME</literal>. The available policies
-                                        are:</para>
+                                        <literal>NAME</literal>. If the name has already
+                                        been set by userspace, no renaming is performed.
+                                        The available policies are:</para>
 
                                         <variablelist>
+                                                <varlistentry>
+                                                        <term><literal>kernel</literal></term>
+                                                        <listitem>
+                                                                <para>If the kernel claims that the name it
+                                                                has set for a device is predictable, then
+                                                                no renaming is performed.
+                                                                </para>
+                                                        </listitem>
+                                                </varlistentry>
                                                 <varlistentry>
                                                         <term><literal>database</literal></term>
                                                         <listitem>
index 8b1ebf61df79123a7543f630f96d345d9f8c2e66..7dfe4b2a30b4f8807bcdb5bfa13db2dccd618a07 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.MOUNT" "5" "" "systemd 215" "systemd.mount"
+.TH "SYSTEMD\&.MOUNT" "5" "" "systemd 217" "systemd.mount"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -220,7 +220,7 @@ for more settings\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.exec\fR(5),
 \fBsystemd.kill\fR(5),
index 7f9bfe1a93c4d4c26c164dadcb120dabbe1d13e3..0bfb119be5e88165837959bb8d04319ae0a3c9b1 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.mount"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.mount — Mount unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code></p></div><div class="refsect1"><a name="idm214182106304"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.mount"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.mount — Mount unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code></p></div><div class="refsect1"><a name="idm214171396944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.mount</code>" encodes information about
                 a file system mount point controlled and supervised by
                 systemd.</p><p>This man page lists the configuration options
                 monitored by systemd and appear like any other mount
                 unit in systemd.
                 See <code class="filename">/proc/self/mountinfo</code> description
-                in <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>.
+                in <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>.
                 </p><p>Some file systems have special semantics as API
                 file systems for kernel-to-userspace and
                 userspace-to-userpace interfaces. Some of them may not
                 be changed via mount units, and cannot be disabled.
                 For a longer discussion see <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems" target="_top">API
-                File Systems</a>.</p></div><div class="refsect1"><a name="idm214182689296"></a><h2 id="/etc/fstab"><code class="filename">/etc/fstab</code><a class="headerlink" title="Permalink to this headline" href="#/etc/fstab">¶</a></h2><p>Mount units may either be configured via unit
+                File Systems</a>.</p></div><div class="refsect1"><a name="idm214175328256"></a><h2 id="/etc/fstab"><code class="filename">/etc/fstab</code><a class="headerlink" title="Permalink to this headline" href="#/etc/fstab">¶</a></h2><p>Mount units may either be configured via unit
                 files, or via <code class="filename">/etc/fstab</code> (see
                 <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>
                 for details). Mounts listed in
                 this is superseded by the rule that configuration in
                 <code class="filename">/etc</code> will always take precedence
                 over configuration in
-                <code class="filename">/usr</code>.</p></div><div class="refsect1"><a name="idm214181078496"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Mount files must include a [Mount] section,
+                <code class="filename">/usr</code>.</p></div><div class="refsect1"><a name="idm214170322832"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Mount files must include a [Mount] section,
                 which carries information about the file system mount points it
                 supervises. A number of options that may be used in
                 this section are shared with other unit types. These
                 <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>
                 and
                 <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>
-                for more settings.</p></div><div class="refsect1"><a name="idm214180019264"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                for more settings.</p></div><div class="refsect1"><a name="idm214170297488"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                           <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>,
                           <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                           <a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>,
-                          <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
                           <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>,
                           <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
index 3bc4d3aeff07e161eaa5de03f63c4a60b2c97238..ba841c3bab1b2f98d40544e755cf37ea7d5180fc 100644 (file)
                 monitored by systemd and appear like any other mount
                 unit in systemd.
                 See <filename>/proc/self/mountinfo</filename> description
-                in <citerefentry><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+                in <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
                 </para>
 
                 <para>Some file systems have special semantics as API
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                          <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
index 1254303650278b0ff25eb0ea876a8a623c88d2e6..2d934a500eeb4fd0f277daf19121ff504b70f547 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.NETDEV" "5" "" "systemd 215" "systemd.network"
+.TH "SYSTEMD\&.NETDEV" "5" "" "systemd 217" "systemd.network"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -30,7 +30,7 @@ Network setup is performed by
 \fBsystemd-networkd\fR(8)\&.
 .PP
 Virtual Network Device files must have the extension
-\&.netdev; other extensions are ignored\&. Virtual network devices are created as soon as networkd is started\&.
+\&.netdev; other extensions are ignored\&. Virtual network devices are created as soon as networkd is started\&. If a netdev with the specified name already exists, networkd will use that as\-is rather than create its own\&. Note that the settings of the pre\-existing netdev will not be changed by networkd\&.
 .PP
 The
 \&.netdev
@@ -117,20 +117,31 @@ The netdev kind\&. Currently,
 "gre",
 "sit",
 "vti",
-"veth", and
+"veth",
+"tun",
+"tap"
+and
 "dummy"
 are supported\&. This option is compulsory\&.
 .RE
 .PP
 \fIMTUBytes=\fR
 .RS 4
-The maximum transmission unit in bytes to set for the device\&. The usual suffixes K, M, G, are supported and are understood to the base of 1024\&.
+The maximum transmission unit in bytes to set for the device\&. The usual suffixes K, M, G, are supported and are understood to the base of 1024\&. This key is not currently suported for
+"tun"
+or
+"tap"
+devices\&.
 .RE
 .PP
 \fIMACAddress=\fR
 .RS 4
 The MAC address to use for the device\&. If none is given, one is generated based on the interface name and the
-\fBmachine-id\fR(5)\&.
+\fBmachine-id\fR(5)\&. This key is not currently suported for
+"tun"
+or
+"tap"
+devices\&.
 .RE
 .SH "[VLAN] SECTION OPTIONS"
 .PP
@@ -292,6 +303,59 @@ section only applies for netdevs of kind
 "tap", and accepts the same keys as the
 "[Tun]"
 section\&.
+.SH "[BOND] SECTION OPTIONS"
+.PP
+The
+"[Bond]"
+section accepts the following key:
+.PP
+\fIMode=\fR
+.RS 4
+Specifies one of the bonding policies\&. The default is
+"balance\-rr"
+(round robin)\&. Possible values are
+"balance\-rr",
+"active\-backup",
+"balance\-xor",
+"broadcast",
+"802\&.3ad",
+"balance\-tlb", and
+"balance\-alb"\&.
+.RE
+.PP
+\fITransmitHashPolicy=\fR
+.RS 4
+Selects the transmit hash policy to use for slave selection in balance\-xor, 802\&.3ad, and tlb modes\&. Possible values are
+"layer2",
+"layer3+4",
+"layer2+3",
+"encap2+3",
+"802\&.3ad", and
+"encap3+4"\&.
+.RE
+.PP
+\fILACPTransmitRate=\fR
+.RS 4
+Specifies the rate with which link partner transmits Link Aggregation Control Protocol Data Unit packets in 802\&.3ad mode\&. Possible values are
+"slow", which requests partner to transmit LACPDUs every 30 seconds, and
+"fast", which requests partner to transmit LACPDUs every second\&. The default value is
+"slow"\&.
+.RE
+.PP
+\fIMIIMonitorSec=\fR
+.RS 4
+Specifies the frequency that Media Independent Interface link monitoring will occur\&. A value of zero disables MII link monitoring\&. This values is rounded down to the nearest millisecond\&. The default value is 0\&.
+.RE
+.PP
+\fIUpDelaySec=\fR
+.RS 4
+Specifies the delay before a link is enabled after a link up status has been detected\&. This value is rounded down to a multiple of MIIMonitorSec\&. The default value is 0\&.
+.RE
+.PP
+\fIDownDelaySec=\fR
+.RS 4
+Specifies the delay before a link is disabled after a link down status has been detected\&. This value is rounded down to a multiple of MIIMonitorSec\&. The default value is 0\&.
+.RE
 .SH "EXAMPLE"
 .PP
 \fBExample\ \&1.\ \&/etc/systemd/network/bridge.netdev\fR
index cdbf952e5aaa468e80a96471c22246fee16e35b5..2d9f0b5f404f7bbd3a817835f13c3623545c595b 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.netdev"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.netdev — Virtual Network Device configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>netdev</code></em>.netdev</code></p></div><div class="refsect1"><a name="idm214175257200"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Network setup is performed by
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.netdev"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.netdev — Virtual Network Device configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>netdev</code></em>.netdev</code></p></div><div class="refsect1"><a name="idm214168274432"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Network setup is performed by
                 <a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a>.
                 </p><p>Virtual Network Device files must have the extension
                 <code class="filename">.netdev</code>; other extensions are ignored. Virtual
-                network devices are created as soon as networkd is started.</p><p>The <code class="filename">.netdev</code> files are read from the files located in the
+                network devices are created as soon as networkd is started. If a netdev
+                with the specified name already exists, networkd will use that as-is
+                rather than create its own. Note that the settings of the pre-existing
+                netdev will not be changed by networkd.</p><p>The <code class="filename">.netdev</code> files are read from the files located in the
                 system network directory <code class="filename">/usr/lib/systemd/network</code>,
                 the volatile runtime network directory
                 <code class="filename">/run/systemd/network</code> and the local administration
@@ -37,7 +40,7 @@
                 system-supplied configuration file with a local file if needed; a symlink in
                 <code class="filename">/etc</code> with the same name as a configuration file in
                 <code class="filename">/usr/lib</code>, pointing to <code class="filename">/dev/null</code>,
-                disables the configuration file entirely.</p></div><div class="refsect1"><a name="idm214175246240"></a><h2 id="[Match] Section Options">[Match] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMatch%5D%20Section%20Options">¶</a></h2><p>A virtual network device is only created if the
+                disables the configuration file entirely.</p></div><div class="refsect1"><a name="idm214171375568"></a><h2 id="[Match] Section Options">[Match] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMatch%5D%20Section%20Options">¶</a></h2><p>A virtual network device is only created if the
                 "<code class="literal">[Match]</code>" section matches the current
                 environment, or if the section is empty. The following keys are accepted:</p><div class="variablelist"><dl class="variablelist"><dt id="Host="><span class="term"><code class="varname">Host=</code></span><a class="headerlink" title="Permalink to this term" href="#Host=">¶</a></dt><dd><p>Matches against the hostname or machine ID of the
                                                 host. See "<code class="literal">ConditionHost=</code>" in
@@ -57,7 +60,7 @@
                                                 architecture. See "<code class="literal">ConditionArchitecture=</code>" in
                                                 <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
                                                 for details.
-                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214179182688"></a><h2 id="[NetDev] Section Options">[NetDev] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BNetDev%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[NetDev]</code>" section accepts the following
+                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214171434800"></a><h2 id="[NetDev] Section Options">[NetDev] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BNetDev%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[NetDev]</code>" section accepts the following
                         keys:</p><div class="variablelist"><dl class="variablelist"><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p>A free-form description of the netdev.
                                                 </p></dd><dt id="Name="><span class="term"><code class="varname">Name=</code></span><a class="headerlink" title="Permalink to this term" href="#Name=">¶</a></dt><dd><p>The interface name used when creating the
                                                 netdev. This option is compulsory.</p></dd><dt id="Kind="><span class="term"><code class="varname">Kind=</code></span><a class="headerlink" title="Permalink to this term" href="#Kind=">¶</a></dt><dd><p>The netdev kind. Currently, "<code class="literal">bridge</code>",
                                                 "<code class="literal">macvlan</code>", "<code class="literal">vxlan</code>",
                                                 "<code class="literal">ipip</code>", "<code class="literal">gre</code>",
                                                 "<code class="literal">sit</code>", "<code class="literal">vti</code>",
-                                                "<code class="literal">veth</code>", and "<code class="literal">dummy</code>"
+                                                "<code class="literal">veth</code>", "<code class="literal">tun</code>",
+                                                "<code class="literal">tap</code>" and "<code class="literal">dummy</code>"
                                                 are supported. This option is compulsory.</p></dd><dt id="MTUBytes="><span class="term"><code class="varname">MTUBytes=</code></span><a class="headerlink" title="Permalink to this term" href="#MTUBytes=">¶</a></dt><dd><p>The maximum transmission unit in bytes to
                                                 set for the device. The usual suffixes K, M, G,
                                                 are supported and are understood to the base of
-                                                1024.</p></dd><dt id="MACAddress="><span class="term"><code class="varname">MACAddress=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddress=">¶</a></dt><dd><p>The MAC address to use for the device.
+                                                1024. This key is not currently suported for
+                                                "<code class="literal">tun</code>" or "<code class="literal">tap</code>" devices.
+                                                </p></dd><dt id="MACAddress="><span class="term"><code class="varname">MACAddress=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddress=">¶</a></dt><dd><p>The MAC address to use for the device.
                                                 If none is given, one is generated based on
                                                 the interface name and the
                                                 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>.
-                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214179154848"></a><h2 id="[VLAN] Section Options">[VLAN] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BVLAN%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[VLAN]</code>" section only applies for netdevs of kind "<code class="literal">vlan</code>",
+                                                This key is not currently suported for "<code class="literal">tun</code>" or "<code class="literal">tap</code>" devices.
+                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214171403216"></a><h2 id="[VLAN] Section Options">[VLAN] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BVLAN%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[VLAN]</code>" section only applies for netdevs of kind "<code class="literal">vlan</code>",
                         and accepts the following key:</p><div class="variablelist"><dl class="variablelist"><dt id="Id="><span class="term"><code class="varname">Id=</code></span><a class="headerlink" title="Permalink to this term" href="#Id=">¶</a></dt><dd><p>The VLAN ID to use. An integer in the range 0–4094.
-                                                This option is compulsory.</p></dd></dl></div></div><div class="refsect1"><a name="idm214179149536"></a><h2 id="[MACVLAN] Section Options">[MACVLAN] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMACVLAN%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[MACVLAN]</code>" section only applies for netdevs of kind
+                                                This option is compulsory.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171397904"></a><h2 id="[MACVLAN] Section Options">[MACVLAN] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMACVLAN%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[MACVLAN]</code>" section only applies for netdevs of kind
                         "<code class="literal">macvlan</code>", and accepts the following key:</p><div class="variablelist"><dl class="variablelist"><dt id="Mode="><span class="term"><code class="varname">Mode=</code></span><a class="headerlink" title="Permalink to this term" href="#Mode=">¶</a></dt><dd><p>The MACVLAN mode to use. The supported options are
                                                 "<code class="literal">private</code>", "<code class="literal">vepa</code>",
                                                 "<code class="literal">bridge</code>" and "<code class="literal">passthru</code>".
-                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214174175360"></a><h2 id="[VXLAN] Section Options">[VXLAN] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BVXLAN%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[VXLAN]</code>" section only applies for netdevs of kind
+                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214166770112"></a><h2 id="[VXLAN] Section Options">[VXLAN] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BVXLAN%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[VXLAN]</code>" section only applies for netdevs of kind
                         "<code class="literal">vxlan</code>", and accepts the following key:</p><div class="variablelist"><dl class="variablelist"><dt id="Id="><span class="term"><code class="varname">Id=</code></span><a class="headerlink" title="Permalink to this term" href="#Id=">¶</a></dt><dd><p>The VXLAN ID to use.</p></dd><dt id="Group="><span class="term"><code class="varname">Group=</code></span><a class="headerlink" title="Permalink to this term" href="#Group=">¶</a></dt><dd><p>An assigned multicast group IP address.</p></dd><dt id="TOS="><span class="term"><code class="varname">TOS=</code></span><a class="headerlink" title="Permalink to this term" href="#TOS=">¶</a></dt><dd><p>The Type Of Service byte value for a vxlan interface.</p></dd><dt id="TTL="><span class="term"><code class="varname">TTL=</code></span><a class="headerlink" title="Permalink to this term" href="#TTL=">¶</a></dt><dd><p>A fixed Time To Live N on Virtual eXtensible Local Area Network packets.
                                                 N is a number in the range 1-255. 0 is a special value meaning that packets
                                                 inherit the TTL value.</p></dd><dt id="MacLearning="><span class="term"><code class="varname">MacLearning=</code></span><a class="headerlink" title="Permalink to this term" href="#MacLearning=">¶</a></dt><dd><p>A boolean. When true, enables dynamic MAC learning
-                                                to discover remote MAC addresses.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174163584"></a><h2 id="[Tunnel] Section Options">[Tunnel] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BTunnel%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Tunnel]</code>" section only applies for netdevs of kind
+                                                to discover remote MAC addresses.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166758336"></a><h2 id="[Tunnel] Section Options">[Tunnel] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BTunnel%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Tunnel]</code>" section only applies for netdevs of kind
                         "<code class="literal">ipip</code>", "<code class="literal">sit</code>", "<code class="literal">gre</code>" and
                         "<code class="literal">vti</code>" and accepts the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="Local="><span class="term"><code class="varname">Local=</code></span><a class="headerlink" title="Permalink to this term" href="#Local=">¶</a></dt><dd><p>A static local address for tunneled packets.
                                                 It must be an address on another interface of this host.</p></dd><dt id="Remote="><span class="term"><code class="varname">Remote=</code></span><a class="headerlink" title="Permalink to this term" href="#Remote=">¶</a></dt><dd><p>The remote endpoint of the tunnel.</p></dd><dt id="TOS="><span class="term"><code class="varname">TOS=</code></span><a class="headerlink" title="Permalink to this term" href="#TOS=">¶</a></dt><dd><p>The Type Of Service byte value for a tunnel interface.
                                                 </p></dd><dt id="TTL="><span class="term"><code class="varname">TTL=</code></span><a class="headerlink" title="Permalink to this term" href="#TTL=">¶</a></dt><dd><p>A fixed Time To Live N on tunneled packets.
                                                 N is a number in the range 1-255. 0 is a special value meaning that packets
                                                 inherit the TTL value. The default value for IPv4 tunnels is: inherit.
-                                                The default value for IPv6 tunnels is: 64.</p></dd><dt id="DiscoverPathMTU="><span class="term"><code class="varname">DiscoverPathMTU=</code></span><a class="headerlink" title="Permalink to this term" href="#DiscoverPathMTU=">¶</a></dt><dd><p>A boolean. When true, enables Path MTU Discovery on the tunnel.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174148736"></a><h2 id="[Peer] Section Options">[Peer] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BPeer%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Peer]</code>" section only applies for netdevs of kind "<code class="literal">veth</code>"
+                                                The default value for IPv6 tunnels is: 64.</p></dd><dt id="DiscoverPathMTU="><span class="term"><code class="varname">DiscoverPathMTU=</code></span><a class="headerlink" title="Permalink to this term" href="#DiscoverPathMTU=">¶</a></dt><dd><p>A boolean. When true, enables Path MTU Discovery on the tunnel.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166743568"></a><h2 id="[Peer] Section Options">[Peer] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BPeer%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Peer]</code>" section only applies for netdevs of kind "<code class="literal">veth</code>"
                         and accepts the following key:</p><div class="variablelist"><dl class="variablelist"><dt id="Name="><span class="term"><code class="varname">Name=</code></span><a class="headerlink" title="Permalink to this term" href="#Name=">¶</a></dt><dd><p>The interface name used when creating the netdev.
                                                 This option is compulsory.</p></dd><dt id="MACAddress="><span class="term"><code class="varname">MACAddress=</code></span><a class="headerlink" title="Permalink to this term" href="#MACAddress=">¶</a></dt><dd><p>The peer MACAddress, if not set it is generated in the same
-                                                way as the MAC address of the main interface.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174142064"></a><h2 id="[Tun] Section Options">[Tun] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BTun%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Tun]</code>" section only applies for netdevs of kind
+                                                way as the MAC address of the main interface.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166736896"></a><h2 id="[Tun] Section Options">[Tun] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BTun%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Tun]</code>" section only applies for netdevs of kind
                         "<code class="literal">tun</code>", and accepts the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="OneQueue="><span class="term"><code class="varname">OneQueue=</code></span><a class="headerlink" title="Permalink to this term" href="#OneQueue=">¶</a></dt><dd><p>Takes a boolean argument. Configures whether
                                         all packets are queued at the device (enabled), or a fixed number
                                         of packets are queued at the device and the rest at the
                                         protocol bytes). If disabled it indicates that the packets will be
                                         pure IP packets. Defaults to "<code class="literal">no</code>".</p></dd><dt id="User="><span class="term"><code class="varname">User=</code></span><a class="headerlink" title="Permalink to this term" href="#User=">¶</a></dt><dd><p>User to grant access to the <code class="filename">/dev/net/tun</code>
                                         device.</p></dd><dt id="Group="><span class="term"><code class="varname">Group=</code></span><a class="headerlink" title="Permalink to this term" href="#Group=">¶</a></dt><dd><p>Group to grant access to the <code class="filename">/dev/net/tun</code>
-                                        device.</p></dd></dl></div></div><div class="refsect1"><a name="idm214174126640"></a><h2 id="[Tap] Section Options">[Tap] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BTap%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Tap]</code>" section only applies for netdevs of kind
+                                        device.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166721472"></a><h2 id="[Tap] Section Options">[Tap] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BTap%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Tap]</code>" section only applies for netdevs of kind
                         "<code class="literal">tap</code>", and accepts the same keys as the
-                        "<code class="literal">[Tun]</code>" section.</p></div><div class="refsect1"><a name="idm214174123456"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214174122816"></a><p class="title"><b>Example 1. /etc/systemd/network/bridge.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+                        "<code class="literal">[Tun]</code>" section.</p></div><div class="refsect1"><a name="idm214166718288"></a><h2 id="[Bond] Section Options">[Bond] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BBond%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Bond]</code>" section accepts the following
+                        key:</p><div class="variablelist"><dl class="variablelist"><dt id="Mode="><span class="term"><code class="varname">Mode=</code></span><a class="headerlink" title="Permalink to this term" href="#Mode=">¶</a></dt><dd><p>Specifies one of the bonding policies. The default is
+                                          "<code class="literal">balance-rr</code>" (round robin). Possible values are
+                                                "<code class="literal">balance-rr</code>",
+                                                "<code class="literal">active-backup</code>",
+                                                "<code class="literal">balance-xor</code>",
+                                                "<code class="literal">broadcast</code>",
+                                                "<code class="literal">802.3ad</code>",
+                                                "<code class="literal">balance-tlb</code>", and
+                                                "<code class="literal">balance-alb</code>".
+                                          </p></dd><dt id="TransmitHashPolicy="><span class="term"><code class="varname">TransmitHashPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#TransmitHashPolicy=">¶</a></dt><dd><p>Selects the transmit hash policy to use for slave selection in
+                                    balance-xor, 802.3ad, and tlb modes. Possible values are
+                                    "<code class="literal">layer2</code>",
+                                    "<code class="literal">layer3+4</code>",
+                                    "<code class="literal">layer2+3</code>",
+                                    "<code class="literal">encap2+3</code>",
+                                    "<code class="literal">802.3ad</code>", and
+                                    "<code class="literal">encap3+4</code>".
+                                    </p></dd><dt id="LACPTransmitRate="><span class="term"><code class="varname">LACPTransmitRate=</code></span><a class="headerlink" title="Permalink to this term" href="#LACPTransmitRate=">¶</a></dt><dd><p>Specifies the rate with which link partner
+                                    transmits Link Aggregation Control Protocol Data Unit packets
+                                    in 802.3ad mode. Possible values are
+                                    "<code class="literal">slow</code>", which requests partner to transmit LACPDUs every 30 seconds, and
+                                    "<code class="literal">fast</code>", which requests partner to transmit LACPDUs every second.
+                                    The default value is "<code class="literal">slow</code>".</p></dd><dt id="MIIMonitorSec="><span class="term"><code class="varname">MIIMonitorSec=</code></span><a class="headerlink" title="Permalink to this term" href="#MIIMonitorSec=">¶</a></dt><dd><p>Specifies the frequency that Media Independent Interface link
+                                    monitoring will occur. A value of zero disables MII link monitoring.
+                                    This values is rounded down to the nearest millisecond. The default
+                                    value is 0.</p></dd><dt id="UpDelaySec="><span class="term"><code class="varname">UpDelaySec=</code></span><a class="headerlink" title="Permalink to this term" href="#UpDelaySec=">¶</a></dt><dd><p>Specifies the delay before a link is enabled after a link up
+                                    status has been detected. This value is rounded down to a multiple of
+                                    MIIMonitorSec. The default value is 0.</p></dd><dt id="DownDelaySec="><span class="term"><code class="varname">DownDelaySec=</code></span><a class="headerlink" title="Permalink to this term" href="#DownDelaySec=">¶</a></dt><dd><p>Specifies the delay before a link is disabled after a link down
+                                    status has been detected. This value is rounded down to a multiple of
+                                    MIIMonitorSec. The default value is 0.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166693440"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214166692800"></a><p class="title"><b>Example 1. /etc/systemd/network/bridge.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=bridge0
-Kind=bridge</pre></div></div><br class="example-break"><div class="example"><a name="idm214174121424"></a><p class="title"><b>Example 2. /etc/systemd/network/vlan1.netdev</b></p><div class="example-contents"><pre class="programlisting">[Match]
+Kind=bridge</pre></div></div><br class="example-break"><div class="example"><a name="idm214166691408"></a><p class="title"><b>Example 2. /etc/systemd/network/vlan1.netdev</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Virtualization=no
 
 [NetDev]
@@ -120,7 +157,7 @@ Name=vlan1
 Kind=vlan
 
 [VLAN]
-Id=1</pre></div></div><br class="example-break"><div class="example"><a name="idm214174119952"></a><p class="title"><b>Example 3. /etc/systemd/network/ipip.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+Id=1</pre></div></div><br class="example-break"><div class="example"><a name="idm214166689936"></a><p class="title"><b>Example 3. /etc/systemd/network/ipip.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=ipip-tun
 Kind=ipip
 MTUBytes=1480
@@ -128,42 +165,42 @@ MTUBytes=1480
 [Tunnel]
 Local=192.168.223.238
 Remote=192.169.224.239
-TTL=64</pre></div></div><br class="example-break"><div class="example"><a name="idm214174118432"></a><p class="title"><b>Example 4. /etc/systemd/network/tap.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+TTL=64</pre></div></div><br class="example-break"><div class="example"><a name="idm214166688416"></a><p class="title"><b>Example 4. /etc/systemd/network/tap.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=tap-test
 Kind=tap
 
 [Tap]
 MultiQueue=true
-PacketInfo=true</pre></div></div><br class="example-break"><div class="example"><a name="idm214174116960"></a><p class="title"><b>Example 5. /etc/systemd/network/sit.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+PacketInfo=true</pre></div></div><br class="example-break"><div class="example"><a name="idm214166686944"></a><p class="title"><b>Example 5. /etc/systemd/network/sit.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=sit-tun
 Kind=sit
 MTUBytes=1480
 
 [Tunnel]
 Local=10.65.223.238
-Remote=10.65.223.239</pre></div></div><br class="example-break"><div class="example"><a name="idm214174115456"></a><p class="title"><b>Example 6. /etc/systemd/network/gre.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+Remote=10.65.223.239</pre></div></div><br class="example-break"><div class="example"><a name="idm214166685440"></a><p class="title"><b>Example 6. /etc/systemd/network/gre.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=gre-tun
 Kind=gre
 MTUBytes=1480
 
 [Tunnel]
 Local=10.65.223.238
-Remote=10.65.223.239</pre></div></div><br class="example-break"><div class="example"><a name="idm214174113952"></a><p class="title"><b>Example 7. /etc/systemd/network/vti.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+Remote=10.65.223.239</pre></div></div><br class="example-break"><div class="example"><a name="idm214166683936"></a><p class="title"><b>Example 7. /etc/systemd/network/vti.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=vti-tun
 Kind=vti
 MTUBytes=1480
 
 [Tunnel]
 Local=10.65.223.238
-Remote=10.65.223.239</pre></div></div><br class="example-break"><div class="example"><a name="idm214174112448"></a><p class="title"><b>Example 8. /etc/systemd/network/veth.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+Remote=10.65.223.239</pre></div></div><br class="example-break"><div class="example"><a name="idm214166682432"></a><p class="title"><b>Example 8. /etc/systemd/network/veth.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=veth-test
 Kind=veth
 
 [Peer]
-Name=veth-peer</pre></div></div><br class="example-break"><div class="example"><a name="idm214174110976"></a><p class="title"><b>Example 9. /etc/systemd/network/dummy.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
+Name=veth-peer</pre></div></div><br class="example-break"><div class="example"><a name="idm214166680960"></a><p class="title"><b>Example 9. /etc/systemd/network/dummy.netdev</b></p><div class="example-contents"><pre class="programlisting">[NetDev]
 Name=dummy-test
 Kind=dummy
-MACAddress=12:34:56:78:9a:bc</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214174109376"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+MACAddress=12:34:56:78:9a:bc</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214166679360"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a>,
                         <a href="systemd.network.html"><span class="citerefentry"><span class="refentrytitle">systemd.network</span>(5)</span></a>
index c90bd8f98c13520e57d20753bf799d56e375fd90..275ee528a039af2db6baaae3c887d938d1b279a4 100644 (file)
 
                 <para>Virtual Network Device files must have the extension
                 <filename>.netdev</filename>; other extensions are ignored. Virtual
-                network devices are created as soon as networkd is started.</para>
+                network devices are created as soon as networkd is started. If a netdev
+                with the specified name already exists, networkd will use that as-is
+                rather than create its own. Note that the settings of the pre-existing
+                netdev will not be changed by networkd.</para>
 
                 <para>The <filename>.netdev</filename> files are read from the files located in the
                 system network directory <filename>/usr/lib/systemd/network</filename>,
                                                 <literal>macvlan</literal>, <literal>vxlan</literal>,
                                                 <literal>ipip</literal>, <literal>gre</literal>,
                                                 <literal>sit</literal>, <literal>vti</literal>,
-                                                <literal>veth</literal>, and <literal>dummy</literal>
+                                                <literal>veth</literal>, <literal>tun</literal>,
+                                                <literal>tap</literal> and <literal>dummy</literal>
                                                 are supported. This option is compulsory.</para>
                                         </listitem>
                                 </varlistentry>
                                                 <para>The maximum transmission unit in bytes to
                                                 set for the device. The usual suffixes K, M, G,
                                                 are supported and are understood to the base of
-                                                1024.</para>
+                                                1024. This key is not currently suported for
+                                                <literal>tun</literal> or <literal>tap</literal> devices.
+                                                </para>
                                         </listitem>
                                 </varlistentry>
                                 <varlistentry>
                                                 If none is given, one is generated based on
                                                 the interface name and the
                                                 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+                                                This key is not currently suported for <literal>tun</literal> or <literal>tap</literal> devices.
                                                 </para>
                                         </listitem>
                                 </varlistentry>
                         <literal>[Tun]</literal> section.</para>
         </refsect1>
 
+        <refsect1>
+                <title>[Bond] Section Options</title>
+
+                        <para>The <literal>[Bond]</literal> section accepts the following
+                        key:</para>
+
+                        <variablelist class='network-directives'>
+                                <varlistentry>
+                                        <term><varname>Mode=</varname></term>
+                                        <listitem>
+                                          <para>Specifies one of the bonding policies. The default is
+                                          <literal>balance-rr</literal> (round robin). Possible values are
+                                                <literal>balance-rr</literal>,
+                                                <literal>active-backup</literal>,
+                                                <literal>balance-xor</literal>,
+                                                <literal>broadcast</literal>,
+                                                <literal>802.3ad</literal>,
+                                                <literal>balance-tlb</literal>, and
+                                                <literal>balance-alb</literal>.
+                                          </para>
+                                        </listitem>
+                                </varlistentry>
+
+                                <varlistentry>
+                                  <term><varname>TransmitHashPolicy=</varname></term>
+                                  <listitem>
+                                    <para>Selects the transmit hash policy to use for slave selection in
+                                    balance-xor, 802.3ad, and tlb modes. Possible values are
+                                    <literal>layer2</literal>,
+                                    <literal>layer3+4</literal>,
+                                    <literal>layer2+3</literal>,
+                                    <literal>encap2+3</literal>,
+                                    <literal>802.3ad</literal>, and
+                                    <literal>encap3+4</literal>.
+                                    </para>
+                                  </listitem>
+                                </varlistentry>
+
+                                <varlistentry>
+                                  <term><varname>LACPTransmitRate=</varname></term>
+                                  <listitem>
+                                    <para>Specifies the rate with which link partner
+                                    transmits Link Aggregation Control Protocol Data Unit packets
+                                    in 802.3ad mode. Possible values are
+                                    <literal>slow</literal>, which requests partner to transmit LACPDUs every 30 seconds, and
+                                    <literal>fast</literal>, which requests partner to transmit LACPDUs every second.
+                                    The default value is <literal>slow</literal>.</para>
+                                  </listitem>
+                                </varlistentry>
+
+                                <varlistentry>
+                                  <term><varname>MIIMonitorSec=</varname></term>
+                                  <listitem>
+                                    <para>Specifies the frequency that Media Independent Interface link
+                                    monitoring will occur. A value of zero disables MII link monitoring.
+                                    This values is rounded down to the nearest millisecond. The default
+                                    value is 0.</para>
+                                  </listitem>
+                                </varlistentry>
+
+                                <varlistentry>
+                                  <term><varname>UpDelaySec=</varname></term>
+                                  <listitem>
+                                    <para>Specifies the delay before a link is enabled after a link up
+                                    status has been detected. This value is rounded down to a multiple of
+                                    MIIMonitorSec. The default value is 0.</para>
+                                  </listitem>
+                                </varlistentry>
+
+                                <varlistentry>
+                                  <term><varname>DownDelaySec=</varname></term>
+                                  <listitem>
+                                    <para>Specifies the delay before a link is disabled after a link down
+                                    status has been detected. This value is rounded down to a multiple of
+                                    MIIMonitorSec. The default value is 0.</para>
+                                  </listitem>
+                                </varlistentry>
+
+                        </variablelist>
+        </refsect1>
+
         <refsect1>
                 <title>Example</title>
                 <example>
index 07923d45eb28d3bf5f76b05073e6b088a1636584..f755e93fda2e1901d941dfaeea2f47c13d843703 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.NETWORK" "5" "" "systemd 215" "systemd.network"
+.TH "SYSTEMD\&.NETWORK" "5" "" "systemd 217" "systemd.network"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -155,9 +155,20 @@ A boolean\&. Enables a basic DHCPv4 server on the device\&. Mostly useful for ha
 .PP
 \fIIPv4LL=\fR
 .RS 4
-A boolean\&. When true, enables IPv4 link\-local support\&. If
-"DHCP="
-is also true, acquiring DHCP address will deprecate previously acquired IPv4 link\-local address or stop acquiring process if one has not been acquired before\&.
+A boolean\&. When true, enables IPv4 link\-local support\&.
+.RE
+.PP
+\fIIPv4LLRoute=\fR
+.RS 4
+A boolean\&. When true, sets up the route needed for non\-IPv4LL hosts to communicate with IPv4LL\-only hosts\&. Defaults to false\&.
+.RE
+.PP
+\fILLMNR=\fR
+.RS 4
+A boolean or
+"resolve"\&. When true, enables Link\-Local Multicast Name Resolution on the link, when set to
+"resolve"
+only resolution is enabled, but not announcement\&. Defaults to true\&.
 .RE
 .PP
 \fIAddress=\fR
@@ -182,6 +193,16 @@ A DNS server address, which must be in the format described in
 \fBinet_pton\fR(3)\&. This option may be specified more than once\&.
 .RE
 .PP
+\fIDomains=\fR
+.RS 4
+The domains used for DNS resolution over this link\&.
+.RE
+.PP
+\fINTP=\fR
+.RS 4
+An NTP server address\&. This option may be specified more than once\&.
+.RE
+.PP
 \fIBridge=\fR
 .RS 4
 The name of the bridge to add the link to\&.
@@ -226,6 +247,13 @@ As in the
 section\&. This key is mandatory\&.
 .RE
 .PP
+\fIPeer=\fR
+.RS 4
+The peer address in a point\-to\-point connection\&. Accepts the same format as the
+"Address"
+key\&.
+.RE
+.PP
 \fIBroadcast=\fR
 .RS 4
 The broadcast address, which must be in the format described in
@@ -255,7 +283,12 @@ section\&. This key is mandatory\&.
 .PP
 \fIDestination=\fR
 .RS 4
-The destination prefix of the route\&. Possibly followed by a slash and the prefixlength\&. If ommitted, a full\-length host route is assumed\&.
+The destination prefix of the route\&. Possibly followed by a slash and the prefixlength\&. If omitted, a full\-length host route is assumed\&.
+.RE
+.PP
+\fIMetric=\fR
+.RS 4
+The metric of the route\&. An unsigned integer
 .RE
 .SH "[DHCP] SECTION OPTIONS"
 .PP
@@ -283,6 +316,11 @@ When true (the default), the machine\*(Aqs hostname will be sent to the DHCP ser
 When true (the default), the hostname received from the DHCP server will be used as the transient hostname\&.
 .RE
 .PP
+\fIUseDomains=\fR
+.RS 4
+When true (not the default), the domain name received from the DHCP server will be used for DNS resolution over this link\&.
+.RE
+.PP
 \fIUseRoutes=\fR
 .RS 4
 When true (the default), the static routes will be requested from the DHCP server and added to the routing table with metric of 1024\&.
@@ -292,6 +330,21 @@ When true (the default), the static routes will be requested from the DHCP serve
 .RS 4
 When true, the connection will never be torn down even if the DHCP lease expires\&. This is contrary to the DHCP specification, but may be the best choice if, say, the root filesystem relies on this connection\&. Defaults to false\&.
 .RE
+.PP
+\fIVendorClassIdentifier=\fR
+.RS 4
+The vendor class identifier used to identify vendor type and configuration\&.
+.RE
+.PP
+\fIRequestBroadcast=\fR
+.RS 4
+Request the server to use broadcast messages before the IP address has been configured\&. This is necessary for devices that cannot receive RAW packets, or that cannot receive packets at all before an IP address has been configured\&. On the other hand, this must not be enabled on networks where broadcasts are filtered out\&.
+.RE
+.PP
+\fIRouteMetric=\fR
+.RS 4
+Set the routing metric for routes specified by the DHCP server\&.
+.RE
 .SH "EXAMPLE"
 .PP
 \fBExample\ \&1.\ \&/etc/systemd/network/50-static.network\fR
@@ -321,7 +374,7 @@ Gateway=192\&.168\&.0\&.1
 Name=en*
 
 [Network]
-DHCP=yes
+DHCP=both
 .fi
 .if n \{\
 .RE
index b2b8adcb00d6d069682303f9b2efe18a8d47d6d0..c4c5f20a63fc38f863af0830804d4aad9d0cb54d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.network"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.network — Network configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>network</code></em>.network</code></p></div><div class="refsect1"><a name="idm214167761904"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Network setup is performed by
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.network"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.network — Network configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>network</code></em>.network</code></p></div><div class="refsect1"><a name="idm214174099744"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Network setup is performed by
                <a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a>.
                </p><p>Network files must have the extension <code class="filename">.network</code>;
                 other extensions are ignored. Networks are applied to links whenever the links
@@ -37,7 +37,7 @@
                 system-supplied configuration file with a local file if needed; a symlink in
                 <code class="filename">/etc</code> with the same name as a configuration file in
                 <code class="filename">/usr/lib</code>, pointing to <code class="filename">/dev/null</code>,
-                disables the configuration file entirely.</p></div><div class="refsect1"><a name="idm214167750736"></a><h2 id="[Match] Section Options">[Match] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMatch%5D%20Section%20Options">¶</a></h2><p>The network file contains a "<code class="literal">[Match]</code>" section,
+                disables the configuration file entirely.</p></div><div class="refsect1"><a name="idm214177924016"></a><h2 id="[Match] Section Options">[Match] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BMatch%5D%20Section%20Options">¶</a></h2><p>The network file contains a "<code class="literal">[Match]</code>" section,
                         which determines if a given network file may be applied to a given device;
                         and a "<code class="literal">[Network]</code>" section specifying how the device should
                         be configured. The first (in lexical order) of the network files that
                                                 architecture. See "<code class="literal">ConditionArchitecture=</code>" in
                                                 <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
                                                 for details.
-                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214171662832"></a><h2 id="[Network] Section Options">[Network] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BNetwork%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Network]</code>" section accepts the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p>A description of the device. This is only used for
+                                                </p></dd></dl></div></div><div class="refsect1"><a name="idm214177961488"></a><h2 id="[Network] Section Options">[Network] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BNetwork%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Network]</code>" section accepts the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p>A description of the device. This is only used for
                                                 presentation purposes.</p></dd><dt id="DHCP="><span class="term"><code class="varname">DHCP=</code></span><a class="headerlink" title="Permalink to this term" href="#DHCP=">¶</a></dt><dd><p>Enables DHCPv4 and/or DHCPv6 support. Accepts
                                                 "<code class="literal">both</code>", "<code class="literal">none</code>",
                                                 "<code class="literal">v4</code>" or "<code class="literal">v6</code>".</p></dd><dt id="DHCPServer="><span class="term"><code class="varname">DHCPServer=</code></span><a class="headerlink" title="Permalink to this term" href="#DHCPServer=">¶</a></dt><dd><p>A boolean. Enables a basic DHCPv4 server on the
                                                 device. Mostly useful for handing out leases to container
                                                 instances.</p></dd><dt id="IPv4LL="><span class="term"><code class="varname">IPv4LL=</code></span><a class="headerlink" title="Permalink to this term" href="#IPv4LL=">¶</a></dt><dd><p>A boolean. When true, enables IPv4 link-local support.
-                                                If "<code class="literal">DHCP=</code>" is also true, acquiring DHCP address
-                                                will deprecate previously acquired IPv4 link-local address or
-                                                stop acquiring process if one has not been acquired before.
-                                                </p></dd><dt id="Address="><span class="term"><code class="varname">Address=</code></span><a class="headerlink" title="Permalink to this term" href="#Address=">¶</a></dt><dd><p>A static IPv4 or IPv6 address and its prefix length,
+                                                </p></dd><dt id="IPv4LLRoute="><span class="term"><code class="varname">IPv4LLRoute=</code></span><a class="headerlink" title="Permalink to this term" href="#IPv4LLRoute=">¶</a></dt><dd><p>A boolean. When true, sets up the route needed for
+                                                non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
+                                                to false.
+                                                </p></dd><dt id="LLMNR="><span class="term"><code class="varname">LLMNR=</code></span><a class="headerlink" title="Permalink to this term" href="#LLMNR=">¶</a></dt><dd><p>A boolean or "<code class="literal">resolve</code>". When true, enables
+                                                Link-Local Multicast Name Resolution on the link, when set to
+                                                "<code class="literal">resolve</code>" only resolution is enabled, but not
+                                                announcement. Defaults to true.</p></dd><dt id="Address="><span class="term"><code class="varname">Address=</code></span><a class="headerlink" title="Permalink to this term" href="#Address=">¶</a></dt><dd><p>A static IPv4 or IPv6 address and its prefix length,
                                                 separated by a "<code class="literal">/</code>" character. Specify this
                                                 key more than once to configure several addresses.
                                                 The format of the address must be as described in
                                                 This is a short-hand for a [Route] section only containing a Gateway
                                                 key. This option may be specified more than once.</p></dd><dt id="DNS="><span class="term"><code class="varname">DNS=</code></span><a class="headerlink" title="Permalink to this term" href="#DNS=">¶</a></dt><dd><p>A DNS server address, which must be in the format described in
                                                 <a href="inet_pton.html"><span class="citerefentry"><span class="refentrytitle">inet_pton</span>(3)</span></a>.
-                                                This option may be specified more than once.</p></dd><dt id="Bridge="><span class="term"><code class="varname">Bridge=</code></span><a class="headerlink" title="Permalink to this term" href="#Bridge=">¶</a></dt><dd><p>The name of the bridge to add the link to.</p></dd><dt id="Bond="><span class="term"><code class="varname">Bond=</code></span><a class="headerlink" title="Permalink to this term" href="#Bond=">¶</a></dt><dd><p>The name of the bond to add the link to.</p></dd><dt id="VLAN="><span class="term"><code class="varname">VLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#VLAN=">¶</a></dt><dd><p>The name of a VLAN to create on the link. This option
+                                                This option may be specified more than once.</p></dd><dt id="Domains="><span class="term"><code class="varname">Domains=</code></span><a class="headerlink" title="Permalink to this term" href="#Domains=">¶</a></dt><dd><p>The domains used for DNS resolution over this link.</p></dd><dt id="NTP="><span class="term"><code class="varname">NTP=</code></span><a class="headerlink" title="Permalink to this term" href="#NTP=">¶</a></dt><dd><p>An NTP server address. This option may be specified more than once.</p></dd><dt id="Bridge="><span class="term"><code class="varname">Bridge=</code></span><a class="headerlink" title="Permalink to this term" href="#Bridge=">¶</a></dt><dd><p>The name of the bridge to add the link to.</p></dd><dt id="Bond="><span class="term"><code class="varname">Bond=</code></span><a class="headerlink" title="Permalink to this term" href="#Bond=">¶</a></dt><dd><p>The name of the bond to add the link to.</p></dd><dt id="VLAN="><span class="term"><code class="varname">VLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#VLAN=">¶</a></dt><dd><p>The name of a VLAN to create on the link. This option
                                                 may be specified more than once.</p></dd><dt id="MACVLAN="><span class="term"><code class="varname">MACVLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#MACVLAN=">¶</a></dt><dd><p>The name of a MACVLAN to create on the link. This option
                                                 may be specified more than once.</p></dd><dt id="VXLAN="><span class="term"><code class="varname">VXLAN=</code></span><a class="headerlink" title="Permalink to this term" href="#VXLAN=">¶</a></dt><dd><p>The name of a VXLAN to create on the link. This option
                                                 may be specified more than once.</p></dd><dt id="Tunnel="><span class="term"><code class="varname">Tunnel=</code></span><a class="headerlink" title="Permalink to this term" href="#Tunnel=">¶</a></dt><dd><p>The name of a Tunnel to create on the link. This option
-                                                may be specified more than once.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166659648"></a><h2 id="[Address] Section Options">[Address] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BAddress%5D%20Section%20Options">¶</a></h2><p>An "<code class="literal">[Address]</code>" section accepts the following keys.
+                                                may be specified more than once.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173296032"></a><h2 id="[Address] Section Options">[Address] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BAddress%5D%20Section%20Options">¶</a></h2><p>An "<code class="literal">[Address]</code>" section accepts the following keys.
                         Specify several "<code class="literal">[Address]</code>" sections to configure several
-                        addresses.</p><div class="variablelist"><dl class="variablelist"><dt id="Address="><span class="term"><code class="varname">Address=</code></span><a class="headerlink" title="Permalink to this term" href="#Address=">¶</a></dt><dd><p>As in the "<code class="literal">[Network]</code>" section. This key is mandatory.</p></dd><dt id="Broadcast="><span class="term"><code class="varname">Broadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#Broadcast=">¶</a></dt><dd><p>The broadcast address, which must be in the format described in
+                        addresses.</p><div class="variablelist"><dl class="variablelist"><dt id="Address="><span class="term"><code class="varname">Address=</code></span><a class="headerlink" title="Permalink to this term" href="#Address=">¶</a></dt><dd><p>As in the "<code class="literal">[Network]</code>" section. This key is mandatory.</p></dd><dt id="Peer="><span class="term"><code class="varname">Peer=</code></span><a class="headerlink" title="Permalink to this term" href="#Peer=">¶</a></dt><dd><p>The peer address in a point-to-point connection. Accepts the same format as
+                                                the "<code class="literal">Address</code>" key.</p></dd><dt id="Broadcast="><span class="term"><code class="varname">Broadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#Broadcast=">¶</a></dt><dd><p>The broadcast address, which must be in the format described in
                                                 <a href="inet_pton.html"><span class="citerefentry"><span class="refentrytitle">inet_pton</span>(3)</span></a>.
                                                 This key only applies to IPv4 addresses. If it is not given, it is
-                                                derived from the "<code class="literal">Address</code>" key.</p></dd><dt id="Label="><span class="term"><code class="varname">Label=</code></span><a class="headerlink" title="Permalink to this term" href="#Label=">¶</a></dt><dd><p>An address label.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166649296"></a><h2 id="[Route] Section Options">[Route] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BRoute%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Route]</code>" section accepts the following keys. Specify
+                                                derived from the "<code class="literal">Address</code>" key.</p></dd><dt id="Label="><span class="term"><code class="varname">Label=</code></span><a class="headerlink" title="Permalink to this term" href="#Label=">¶</a></dt><dd><p>An address label.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173283248"></a><h2 id="[Route] Section Options">[Route] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BRoute%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[Route]</code>" section accepts the following keys. Specify
                         several "<code class="literal">[Route]</code>" sections to configure several routes.</p><div class="variablelist"><dl class="variablelist"><dt id="Gateway="><span class="term"><code class="varname">Gateway=</code></span><a class="headerlink" title="Permalink to this term" href="#Gateway=">¶</a></dt><dd><p>As in the "<code class="literal">[Network]</code>" section. This key is mandatory.</p></dd><dt id="Destination="><span class="term"><code class="varname">Destination=</code></span><a class="headerlink" title="Permalink to this term" href="#Destination=">¶</a></dt><dd><p>The destination prefix of the route. Possibly followed by a slash and the
-                                                prefixlength. If ommitted, a full-length host route is assumed.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166642016"></a><h2 id="[DHCP] Section Options">[DHCP] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BDHCP%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[DHCP]</code>" section accepts the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="UseDNS="><span class="term"><code class="varname">UseDNS=</code></span><a class="headerlink" title="Permalink to this term" href="#UseDNS=">¶</a></dt><dd><p>When true (the default), the DNS servers received from the DHCP server will
+                                                prefixlength. If omitted, a full-length host route is assumed.</p></dd><dt id="Metric="><span class="term"><code class="varname">Metric=</code></span><a class="headerlink" title="Permalink to this term" href="#Metric=">¶</a></dt><dd><p>The metric of the route. An unsigned integer</p></dd></dl></div></div><div class="refsect1"><a name="idm214173274400"></a><h2 id="[DHCP] Section Options">[DHCP] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BDHCP%5D%20Section%20Options">¶</a></h2><p>The "<code class="literal">[DHCP]</code>" section accepts the following keys:</p><div class="variablelist"><dl class="variablelist"><dt id="UseDNS="><span class="term"><code class="varname">UseDNS=</code></span><a class="headerlink" title="Permalink to this term" href="#UseDNS=">¶</a></dt><dd><p>When true (the default), the DNS servers received from the DHCP server will
                                                 be used and take precedence over any statically configured ones.</p></dd><dt id="UseMTU="><span class="term"><code class="varname">UseMTU=</code></span><a class="headerlink" title="Permalink to this term" href="#UseMTU=">¶</a></dt><dd><p>When true, the interface maximum transmission unit from the DHCP server will
                                                 be used on the current link. Defaults to false.</p></dd><dt id="SendHostname="><span class="term"><code class="varname">SendHostname=</code></span><a class="headerlink" title="Permalink to this term" href="#SendHostname=">¶</a></dt><dd><p>When true (the default), the machine's hostname will be sent to the DHCP
                                                 server</p></dd><dt id="UseHostname="><span class="term"><code class="varname">UseHostname=</code></span><a class="headerlink" title="Permalink to this term" href="#UseHostname=">¶</a></dt><dd><p>When true (the default), the hostname received from the DHCP server
-                                                will be used as the transient hostname.</p></dd><dt id="UseRoutes="><span class="term"><code class="varname">UseRoutes=</code></span><a class="headerlink" title="Permalink to this term" href="#UseRoutes=">¶</a></dt><dd><p>When true (the default), the static routes will be requested from the DHCP server
+                                                will be used as the transient hostname.</p></dd><dt id="UseDomains="><span class="term"><code class="varname">UseDomains=</code></span><a class="headerlink" title="Permalink to this term" href="#UseDomains=">¶</a></dt><dd><p>When true (not the default), the domain name received from the DHCP server
+                                                will be used for DNS resolution over this link.</p></dd><dt id="UseRoutes="><span class="term"><code class="varname">UseRoutes=</code></span><a class="headerlink" title="Permalink to this term" href="#UseRoutes=">¶</a></dt><dd><p>When true (the default), the static routes will be requested from the DHCP server
                                                 and added to the routing table with metric of 1024.</p></dd><dt id="CriticalConnection="><span class="term"><code class="varname">CriticalConnection=</code></span><a class="headerlink" title="Permalink to this term" href="#CriticalConnection=">¶</a></dt><dd><p>When true, the connection will never be torn down even if the DHCP lease
                                                 expires. This is contrary to the DHCP specification, but may be the best choice
-                                                if, say, the root filesystem relies on this connection. Defaults to false.</p></dd></dl></div></div><div class="refsect1"><a name="idm214166628384"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214166627744"></a><p class="title"><b>Example 1. /etc/systemd/network/50-static.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+                                                if, say, the root filesystem relies on this connection. Defaults to false.</p></dd><dt id="VendorClassIdentifier="><span class="term"><code class="varname">VendorClassIdentifier=</code></span><a class="headerlink" title="Permalink to this term" href="#VendorClassIdentifier=">¶</a></dt><dd><p>The vendor class identifier used to identify vendor type and configuration.</p></dd><dt id="RequestBroadcast="><span class="term"><code class="varname">RequestBroadcast=</code></span><a class="headerlink" title="Permalink to this term" href="#RequestBroadcast=">¶</a></dt><dd><p>Request the server to use broadcast messages before the IP address has been
+                                                configured. This is necessary for devices that cannot receive RAW packets, or that
+                                                cannot receive packets at all before an IP address has been configured. On the other
+                                                hand, this must not be enabled on networks where broadcasts are filtered out.</p></dd><dt id="RouteMetric="><span class="term"><code class="varname">RouteMetric=</code></span><a class="headerlink" title="Permalink to this term" href="#RouteMetric=">¶</a></dt><dd><p>Set the routing metric for routes specified by the DHCP server.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173253344"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214173252704"></a><p class="title"><b>Example 1. /etc/systemd/network/50-static.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=enp2s0
 
 [Network]
 Address=192.168.0.15/24
-Gateway=192.168.0.1</pre></div></div><br class="example-break"><div class="example"><a name="idm214166626256"></a><p class="title"><b>Example 2. /etc/systemd/network/80-dhcp.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+Gateway=192.168.0.1</pre></div></div><br class="example-break"><div class="example"><a name="idm214173251216"></a><p class="title"><b>Example 2. /etc/systemd/network/80-dhcp.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=en*
 
 [Network]
-DHCP=yes</pre></div></div><br class="example-break"><div class="example"><a name="idm214166624864"></a><p class="title"><b>Example 3. /etc/systemd/network/bridge-static.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+DHCP=both</pre></div></div><br class="example-break"><div class="example"><a name="idm214173249824"></a><p class="title"><b>Example 3. /etc/systemd/network/bridge-static.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=bridge0
 
 [Network]
 Address=192.168.0.15/24
 Gateway=192.168.0.1
-DNS=192.168.0.1</pre></div></div><br class="example-break"><div class="example"><a name="idm214166623360"></a><p class="title"><b>Example 4. /etc/systemd/network/bridge-slave-interface.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+DNS=192.168.0.1</pre></div></div><br class="example-break"><div class="example"><a name="idm214173248320"></a><p class="title"><b>Example 4. /etc/systemd/network/bridge-slave-interface.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=enp2s0
 
 [Network]
-Bridge=bridge0</pre></div></div><br class="example-break"><div class="example"><a name="idm214166621968"></a><p class="title"><b>Example 5. /etc/systemd/network/ipip.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+Bridge=bridge0</pre></div></div><br class="example-break"><div class="example"><a name="idm214173246928"></a><p class="title"><b>Example 5. /etc/systemd/network/ipip.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=em1
 
 [Network]
-Tunnel=ipip-tun</pre></div></div><br class="example-break"><div class="example"><a name="idm214166620576"></a><p class="title"><b>Example 6. /etc/systemd/network/sit.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+Tunnel=ipip-tun</pre></div></div><br class="example-break"><div class="example"><a name="idm214173245536"></a><p class="title"><b>Example 6. /etc/systemd/network/sit.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=em1
 
 [Network]
-Tunnel=sit-tun</pre></div></div><br class="example-break"><div class="example"><a name="idm214166619184"></a><p class="title"><b>Example 7. /etc/systemd/network/gre.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+Tunnel=sit-tun</pre></div></div><br class="example-break"><div class="example"><a name="idm214173244144"></a><p class="title"><b>Example 7. /etc/systemd/network/gre.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=em1
 
 [Network]
-Tunnel=gre-tun</pre></div></div><br class="example-break"><div class="example"><a name="idm214166617792"></a><p class="title"><b>Example 8. /etc/systemd/network/vti.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
+Tunnel=gre-tun</pre></div></div><br class="example-break"><div class="example"><a name="idm214173242752"></a><p class="title"><b>Example 8. /etc/systemd/network/vti.network</b></p><div class="example-contents"><pre class="programlisting">[Match]
 Name=em1
 
 [Network]
-Tunnel=vti-tun</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214166616272"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+Tunnel=vti-tun</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214173241232"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-networkd.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd</span>(8)</span></a>,
                         <a href="systemd.netdev.html"><span class="citerefentry"><span class="refentrytitle">systemd.netdev</span>(5)</span></a>
index 2b0eb567be02068683fa8074f2a63dfbdcb26ac7..4cc13b2afcbea6e1942866c43b8430e2a139d0da 100644 (file)
                                         <term><varname>IPv4LL=</varname></term>
                                         <listitem>
                                                 <para>A boolean. When true, enables IPv4 link-local support.
-                                                If <literal>DHCP=</literal> is also true, acquiring DHCP address
-                                                will deprecate previously acquired IPv4 link-local address or
-                                                stop acquiring process if one has not been acquired before.
                                                 </para>
                                         </listitem>
                                 </varlistentry>
+                                <varlistentry>
+                                        <term><varname>IPv4LLRoute=</varname></term>
+                                        <listitem>
+                                                <para>A boolean. When true, sets up the route needed for
+                                                non-IPv4LL hosts to communicate with IPv4LL-only hosts. Defaults
+                                                to false.
+                                                </para>
+                                        </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                        <term><varname>LLMNR=</varname></term>
+                                        <listitem>
+                                                <para>A boolean or <literal>resolve</literal>. When true, enables
+                                                Link-Local Multicast Name Resolution on the link, when set to
+                                                <literal>resolve</literal> only resolution is enabled, but not
+                                                announcement. Defaults to true.</para>
+                                        </listitem>
+                                </varlistentry>
                                 <varlistentry>
                                         <term><varname>Address=</varname></term>
                                         <listitem>
                                                 This option may be specified more than once.</para>
                                         </listitem>
                                 </varlistentry>
-<!-- TODO: document NTP= option when it is actually used somewhere -->
+                                <varlistentry>
+                                        <term><varname>Domains=</varname></term>
+                                        <listitem>
+                                                <para>The domains used for DNS resolution over this link.</para>
+                                        </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                        <term><varname>NTP=</varname></term>
+                                        <listitem>
+                                                <para>An NTP server address. This option may be specified more than once.</para>
+                                        </listitem>
+                                </varlistentry>
                                 <varlistentry>
                                         <term><varname>Bridge=</varname></term>
                                         <listitem>
                                                 <para>As in the <literal>[Network]</literal> section. This key is mandatory.</para>
                                         </listitem>
                                 </varlistentry>
+                                <varlistentry>
+                                        <term><varname>Peer=</varname></term>
+                                        <listitem>
+                                                <para>The peer address in a point-to-point connection. Accepts the same format as
+                                                the <literal>Address</literal> key.</para>
+                                        </listitem>
+                                </varlistentry>
                                 <varlistentry>
                                         <term><varname>Broadcast=</varname></term>
                                         <listitem>
                                         <term><varname>Destination=</varname></term>
                                         <listitem>
                                                 <para>The destination prefix of the route. Possibly followed by a slash and the
-                                                prefixlength. If ommitted, a full-length host route is assumed.</para>
+                                                prefixlength. If omitted, a full-length host route is assumed.</para>
+                                        </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                        <term><varname>Metric=</varname></term>
+                                        <listitem>
+                                                <para>The metric of the route. An unsigned integer</para>
                                         </listitem>
                                 </varlistentry>
                         </variablelist>
                                                 will be used as the transient hostname.</para>
                                         </listitem>
                                 </varlistentry>
+                                <varlistentry>
+                                        <term><varname>UseDomains=</varname></term>
+                                        <listitem>
+                                                <para>When true (not the default), the domain name received from the DHCP server
+                                                will be used for DNS resolution over this link.</para>
+                                        </listitem>
+                                </varlistentry>
                                 <varlistentry>
                                         <term><varname>UseRoutes=</varname></term>
                                         <listitem>
                                                 if, say, the root filesystem relies on this connection. Defaults to false.</para>
                                         </listitem>
                                 </varlistentry>
+                                <varlistentry>
+                                        <term><varname>VendorClassIdentifier=</varname></term>
+                                        <listitem>
+                                                <para>The vendor class identifier used to identify vendor type and configuration.</para>
+                                        </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                        <term><varname>RequestBroadcast=</varname></term>
+                                        <listitem>
+                                                <para>Request the server to use broadcast messages before the IP address has been
+                                                configured. This is necessary for devices that cannot receive RAW packets, or that
+                                                cannot receive packets at all before an IP address has been configured. On the other
+                                                hand, this must not be enabled on networks where broadcasts are filtered out.</para>
+                                        </listitem>
+                                </varlistentry>
+                                <varlistentry>
+                                        <term><varname>RouteMetric=</varname></term>
+                                        <listitem>
+                                                <para>Set the routing metric for routes specified by the DHCP server.</para>
+                                        </listitem>
+                                </varlistentry>
                        </variablelist>
 
         </refsect1>
@@ -457,7 +524,7 @@ Gateway=192.168.0.1</programlisting>
 Name=en*
 
 [Network]
-DHCP=yes</programlisting>
+DHCP=both</programlisting>
                 </example>
 
                 <example>
index ba9426565052c29fa74aa525cf202100ccd8ca0a..30846dfd0a9c29b0138cfa790ecc0aedff1294a3 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.PATH" "5" "" "systemd 215" "systemd.path"
+.TH "SYSTEMD\&.PATH" "5" "" "systemd 217" "systemd.path"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -115,7 +115,7 @@ is enabled, use the mode specified here to create the directories in question\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.service\fR(5),
 \fBinotify\fR(7),
index d544f8c703cf1fd191a7e232ed7624e1e0957a5d..77ba57cfc28569d52a3e28b181d665efb610ffb7 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.path"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.path — Path unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>path</code></em>.path</code></p></div><div class="refsect1"><a name="idm214171559104"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.path"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.path — Path unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>path</code></em>.path</code></p></div><div class="refsect1"><a name="idm214168398672"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.path</code>" encodes information about
                 a path monitored by systemd, for
                 path-based activation.</p><p>This man page lists the configuration options
@@ -51,7 +51,7 @@
                 that path units are terminated cleanly prior to system
                 shutdown. Only path units involved with early boot or
                 late system shutdown should disable this option.
-                </p></div><div class="refsect1"><a name="idm214171147168"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Path files must include a [Path] section,
+                </p></div><div class="refsect1"><a name="idm214168387808"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Path files must include a [Path] section,
                 which carries information about the path(s) it
                 monitors. The options specific to the [Path] section
                 of path units are the following:</p><div class="variablelist"><dl class="variablelist"><dt id="PathExists="><span class="term"><code class="varname">PathExists=</code>, </span><span class="term"><code class="varname">PathExistsGlob=</code>, </span><span class="term"><code class="varname">PathChanged=</code>, </span><span class="term"><code class="varname">PathModified=</code>, </span><span class="term"><code class="varname">DirectoryNotEmpty=</code></span><a class="headerlink" title="Permalink to this term" href="#PathExists=">¶</a></dt><dd><p>Defines paths to
                                 create the directories in
                                 question. Takes an access mode in
                                 octal notation. Defaults to
-                                <code class="option">0755</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214171452944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                <code class="option">0755</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172393616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                           <a href="inotify.html"><span class="citerefentry"><span class="refentrytitle">inotify</span>(7)</span></a>,
index 8d86fca5d6add41e51e53e02ae672e4c2d3bcc3e..c6d61cf2b1a609e049b11d5b39e109f6eaba1c00 100644 (file)
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>inotify</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
index 43eb191043c26d85e8033e428f9fb7ed0b40dd9b..3217719c0e285be315758fb8a30cc1d900e6c5bb 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.PRESET" "5" "" "systemd 215" "systemd.preset"
+.TH "SYSTEMD\&.PRESET" "5" "" "systemd 217" "systemd.preset"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 3013bf35061b8af558754e7f52843cb17b5a66be..8cbaceb65b9a435528f3ba299bdc544c1c3da115 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.preset"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.preset — Service enablement presets</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/system-preset/*.preset</code></p><p><code class="filename">/run/systemd/system-preset/*.preset</code></p><p><code class="filename">/usr/lib/systemd/system-preset/*.preset</code></p><p><code class="filename">/etc/systemd/user-preset/*.preset</code></p><p><code class="filename">/run/systemd/user-preset/*.preset</code></p><p><code class="filename">/usr/lib/systemd/user-preset/*.preset</code></p></div><div class="refsect1"><a name="idm214173617984"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Preset files may be used to encode policy which
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.preset"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.preset — Service enablement presets</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/system-preset/*.preset</code></p><p><code class="filename">/run/systemd/system-preset/*.preset</code></p><p><code class="filename">/usr/lib/systemd/system-preset/*.preset</code></p><p><code class="filename">/etc/systemd/user-preset/*.preset</code></p><p><code class="filename">/run/systemd/user-preset/*.preset</code></p><p><code class="filename">/usr/lib/systemd/user-preset/*.preset</code></p></div><div class="refsect1"><a name="idm214183693584"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Preset files may be used to encode policy which
                 units shall be enabled by default and which ones
                 shall be disabled. They are read by <span class="command"><strong>systemctl
                 preset</strong></span> (for more information see
@@ -44,7 +44,7 @@
                 units shall rather be disabled, it is necessary to ship
                 a preset file with a single, catchall
                 "<code class="filename">disable *</code>" line. (See example 1,
-                below.)</p></div><div class="refsect1"><a name="idm214172493824"></a><h2 id="Preset File Format">Preset File Format<a class="headerlink" title="Permalink to this headline" href="#Preset%20File%20Format">¶</a></h2><p>The preset files contain a list of
+                below.)</p></div><div class="refsect1"><a name="idm214183685552"></a><h2 id="Preset File Format">Preset File Format<a class="headerlink" title="Permalink to this headline" href="#Preset%20File%20Format">¶</a></h2><p>The preset files contain a list of
                 directives consisting of either the word
                 "<code class="literal">enable</code>" or
                 "<code class="literal">disable</code>" followed by a space and a
                 file supplied by the vendor, the recommended way is to
                 place a symlink to <code class="filename">/dev/null</code> in
                 <code class="filename">/etc/systemd/system-preset/</code>
-                bearing the same filename.</p></div><div class="refsect1"><a name="idm214172649696"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214173353776"></a><p class="title"><b>Example 1. Default off example <code class="filename">/usr/lib/systemd/system-preset/99-default.preset</code>:</b></p><div class="example-contents"><pre class="programlisting">disable *</pre></div></div><br class="example-break"><p>This disables all units. Due to the filename
+                bearing the same filename.</p></div><div class="refsect1"><a name="idm214187622080"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214187621408"></a><p class="title"><b>Example 1. Default off example <code class="filename">/usr/lib/systemd/system-preset/99-default.preset</code>:</b></p><div class="example-contents"><pre class="programlisting">disable *</pre></div></div><br class="example-break"><p>This disables all units. Due to the filename
                 prefix "<code class="literal">99-</code>", it will be read last and
                 hence can easily be overridden by spin or
-                administrator preset policy or suchlike.</p><div class="example"><a name="idm214172611440"></a><p class="title"><b>Example 2. A GNOME spin example <code class="filename">/usr/lib/systemd/system-preset/50-gnome.preset</code>:</b></p><div class="example-contents"><pre class="programlisting">enable gdm.service
+                administrator preset policy or suchlike.</p><div class="example"><a name="idm214187617968"></a><p class="title"><b>Example 2. A GNOME spin example <code class="filename">/usr/lib/systemd/system-preset/50-gnome.preset</code>:</b></p><div class="example-contents"><pre class="programlisting">enable gdm.service
 enable colord.service
 enable accounts-daemon.service
 enable avahi-daemon.*</pre></div></div><br class="example-break"><p>This enables the three mentioned units, plus all
@@ -92,7 +92,7 @@ enable avahi-daemon.*</pre></div></div><br class="example-break"><p>This enables
                 enabled as they are installed. It leaves all other
                 units untouched, and subject to other (later) preset
                 files, for example like the one from the first example
-                above.</p><div class="example"><a name="idm214172886672"></a><p class="title"><b>Example 3. Administrator policy <code class="filename">/etc/systemd/system-preset/00-lennart.preset</code>:</b></p><div class="example-contents"><pre class="programlisting">enable httpd.service
+                above.</p><div class="example"><a name="idm214187606960"></a><p class="title"><b>Example 3. Administrator policy <code class="filename">/etc/systemd/system-preset/00-lennart.preset</code>:</b></p><div class="example-contents"><pre class="programlisting">enable httpd.service
 enable sshd.service
 enable postfix.service
 disable *</pre></div></div><br class="example-break"><p>This enables three specific services and
@@ -100,7 +100,7 @@ disable *</pre></div></div><br class="example-break"><p>This enables three speci
                 to specifically select the units to enable, and
                 disable all others. Due to the filename prefix
                 "<code class="literal">00-</code>" it will be read early and hence
-                overrides all other preset policy files.</p></div><div class="refsect1"><a name="idm214173400832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                overrides all other preset policy files.</p></div><div class="refsect1"><a name="idm214187603296"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>
index b773936212bd7df138f2d92b1734cd01be94bf87..c2aa85dc36e8a959f090daeb556161f41dc62749 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.RESOURCE\-CONTROL" "5" "" "systemd 215" "systemd.resource-control"
+.TH "SYSTEMD\&.RESOURCE\-CONTROL" "5" "" "systemd 217" "systemd.resource-control"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -86,7 +86,7 @@ control group attribute\&. For details about this control group attribute, see
 \m[blue]\fBsched\-design\-CFS\&.txt\fR\m[]\&\s-2\u[2]\d\s+2\&.
 .sp
 Example:
-\fICPUShares=20%\fR
+\fICPUQuota=20%\fR
 ensures that the executed processes will never get more than 20% CPU time on one CPU\&.
 .sp
 Implies
index 9c1fe89d8dc1965ce1f40c3b9376de1ab1aed69f..647bc2d72520079f06823b2f1b4b023089bd9ab5 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.resource-control"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.resource-control — Resource control unit settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.resource-control"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.resource-control — Resource control unit settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p>
       <code class="filename"><em class="replaceable"><code>slice</code></em>.slice</code>,
       <code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code>,
       <code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
       <code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code>,
       <code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code>,
       <code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code>
-    </p></div><div class="refsect1"><a name="idm214193410544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Unit configuration files for services, slices, scopes,
+    </p></div><div class="refsect1"><a name="idm214168429840"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Unit configuration files for services, slices, scopes,
     sockets, mount points, and swap devices share a subset of
     configuration options for resource control of spawned
     processes. Internally, this relies on the Control Groups
@@ -47,7 +47,7 @@
     [Slice], [Scope], [Service], [Socket], [Mount], or [Swap]
     sections, depending on the unit type.</p><p>See the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/" target="_top">New
     Control Group Interfaces</a> for an introduction on how to make
-    use of resource control APIs from programs.</p></div><div class="refsect1"><a name="idm214190908640"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Units of the types listed above can have settings
+    use of resource control APIs from programs.</p></div><div class="refsect1"><a name="idm214168420672"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Units of the types listed above can have settings
     for resource control configuration:</p><div class="variablelist"><dl class="variablelist"><dt id="CPUAccounting="><span class="term"><code class="varname">CPUAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#CPUAccounting=">¶</a></dt><dd><p>Turn on CPU usage accounting for this unit. Takes a
           boolean argument. Note that turning on CPU accounting for
           one unit might also implicitly turn it on for all units
@@ -76,7 +76,7 @@
           one CPU. This controls the
           "<code class="literal">cpu.cfs_quota_us</code>" control group
           attribute. For details about this control group attribute,
-          see <a class="ulink" href="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt" target="_top">sched-design-CFS.txt</a>.</p><p>Example: <code class="varname">CPUShares=20%</code> ensures that
+          see <a class="ulink" href="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt" target="_top">sched-design-CFS.txt</a>.</p><p>Example: <code class="varname">CPUQuota=20%</code> ensures that
           the executed processes will never get more than 20% CPU time
           on one CPU.</p><p>Implies "<code class="literal">CPUAccounting=true</code>".</p></dd><dt id="MemoryAccounting="><span class="term"><code class="varname">MemoryAccounting=</code></span><a class="headerlink" title="Permalink to this term" href="#MemoryAccounting=">¶</a></dt><dd><p>Turn on process and kernel memory accounting for this
           unit. Takes a boolean argument. Note that turning on memory
           settings applied.</p><p>For units of type slice, the only accepted value for
           this setting is the parent slice. Since the name of a slice
           unit implies the parent slice, it is hence redundant to ever
-          set this parameter directly for slice units.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191662576"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+          set this parameter directly for slice units.</p></dd></dl></div></div><div class="refsect1"><a name="idm214167324176"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
       <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
index e91c260bf15d13c99fa8e9c3886d1085bb8e9fb0..968b328dd99e56ebccded57712069ce094091e57 100644 (file)
@@ -155,7 +155,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
           see <ulink
           url="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">sched-design-CFS.txt</ulink>.</para>
 
-          <para>Example: <varname>CPUShares=20%</varname> ensures that
+          <para>Example: <varname>CPUQuota=20%</varname> ensures that
           the executed processes will never get more than 20% CPU time
           on one CPU.</para>
 
index f3ae553979096cbc8d82979c25dda49333830790..aa35d081481e525c320a10b705ab6d07bd4064b2 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.SCOPE" "5" "" "systemd 215" "systemd.scope"
+.TH "SYSTEMD\&.SCOPE" "5" "" "systemd 217" "systemd.scope"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 5975e192dfa3614623b3b56a95cc977b8a2d336b..db4649da518ecb36c9d872a27ff29c70b431173d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.scope"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.scope — Scope unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code></p></div><div class="refsect1"><a name="idm214193636544"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Scope units are not configured via unit configuration files,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.scope"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.scope — Scope unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code></p></div><div class="refsect1"><a name="idm214167608048"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Scope units are not configured via unit configuration files,
     but are only created programmatically using the bus interfaces of
     systemd. They are named similar to filenames. A unit whose name
     ends in "<code class="literal">.scope</code>" refers to a scope unit. Scopes
@@ -38,7 +38,7 @@
     that scope units are removed prior to system
     shutdown. Only scope units involved with early boot or
     late system shutdown should disable this option.
-    </p></div><div class="refsect1"><a name="idm214192881920"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></div><div class="refsect1"><a name="idm214167600272"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="systemd-run.html"><span class="citerefentry"><span class="refentrytitle">systemd-run</span>(1)</span></a>,
       <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
index bcefbb3becc144fbe648fb2e7875abeedaeef03b..022fbab08b7ef7ceadcaba1e980ea59e0b78a43b 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.SERVICE" "5" "" "systemd 215" "systemd.service"
+.TH "SYSTEMD\&.SERVICE" "5" "" "systemd 217" "systemd.service"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -90,10 +90,11 @@ or
 .sp
 If set to
 \fBsimple\fR
-(the default value if neither
+(the default if neither
 \fIType=\fR
 nor
-\fIBusName=\fR
+\fIBusName=\fR, but
+\fIExecStart=\fR
 are specified), it is expected that the process configured with
 \fIExecStart=\fR
 is the main process of the service\&. In this mode, if the process offers functionality to other processes on the system, its communication channels should be installed before the daemon is started up (e\&.g\&. sockets set up by systemd, via socket activation), as systemd will immediately proceed starting follow\-up units\&.
@@ -112,7 +113,11 @@ Behavior of
 is similar to
 \fBsimple\fR; however, it is expected that the process has to exit before systemd starts follow\-up units\&.
 \fIRemainAfterExit=\fR
-is particularly useful for this type of service\&.
+is particularly useful for this type of service\&. This is the implied default if neither
+\fIType=\fR
+or
+\fIExecStart=\fR
+are specified\&.
 .sp
 Behavior of
 \fBdbus\fR
@@ -177,140 +182,83 @@ is set to
 \fBdbus\fR, but its use is otherwise recommended if the process takes a name on the D\-Bus bus\&.
 .RE
 .PP
-\fIExecStart=\fR
-.RS 4
-Commands with their arguments that are executed when this service is started\&. For each of the specified commands, the first argument must be an absolute and literal path to an executable\&.
-.sp
-When
-\fIType\fR
-is not
-\fBoneshot\fR, only one command may be given\&. When
-\fIType=oneshot\fR
-is used, more than one command may be specified\&. Multiple command lines may be concatenated in a single directive by separating them with semicolons (these semicolons must be passed as separate words)\&. Alternatively, this directive may be specified more than once with the same effect\&. Lone semicolons may be escaped as
-"\e;"\&. If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect\&.
-.sp
-Each command line is split on whitespace, with the first item being the command to execute, and the subsequent items being the arguments\&. Double quotes ("\&.\&.\&.") and single quotes (\*(Aq\&.\&.\&.\*(Aq) may be used, in which case everything until the next matching quote becomes part of the same argument\&. Quotes themselves are removed after parsing\&. In addition, a trailing backslash ("\e") may be used to merge lines\&. This syntax is intended to be very similar to shell syntax, but only the meta\-characters and expansions described in the following paragraphs are understood\&. Specifically, redirection using
-"<",
-"<<",
-">", and
-">>", pipes using
-"|", and running programs in the background using
-"&"
-and
-\fIother elements of shell syntax are not supported\fR\&.
-.sp
-If more than one command is specified, the commands are invoked sequentially in the order they appear in the unit file\&. If one of the commands fails (and is not prefixed with
-"\-"), other lines are not executed, and the unit is considered failed\&.
-.sp
-Unless
-\fIType=forking\fR
-is set, the process started via this command line will be considered the main process of the daemon\&.
-.sp
-The command line accepts
-"%"
-specifiers as described in
-\fBsystemd.unit\fR(5)\&. Note that the first argument of the command line (i\&.e\&. the program to execute) may not include specifiers\&.
-.sp
-Basic environment variable substitution is supported\&. Use
-"${FOO}"
-as part of a word, or as a word of its own, on the command line, in which case it will be replaced by the value of the environment variable including all whitespace it contains, resulting in a single argument\&. Use
-"$FOO"
-as a separate word on the command line, in which case it will be replaced by the value of the environment variable split at whitespace, resulting in zero or more arguments\&. To pass a literal dollar sign, use
-"$$"\&. Variables whose value is not known at expansion time are treated as empty strings\&. Note that the first argument (i\&.e\&. the program to execute) may not be a variable\&.
-.sp
-Variables to be used in this fashion may be defined through
-\fIEnvironment=\fR
-and
-\fIEnvironmentFile=\fR\&. In addition, variables listed in the section "Environment variables in spawned processes" in
-\fBsystemd.exec\fR(5), which are considered "static configuration", may be used (this includes e\&.g\&.
-\fI$USER\fR, but not
-\fI$TERM\fR)\&.
-.sp
-Optionally, if the absolute file name is prefixed with
-"@", the second token will be passed as
-"argv[0]"
-to the executed process, followed by the further arguments specified\&. If the absolute filename is prefixed with
-"\-", an exit code of the command normally considered a failure (i\&.e\&. non\-zero exit status or abnormal exit due to signal) is ignored and considered success\&. If both
-"\-"
+\fIBusPolicy=\fR
+.RS 4
+If specified, a custom
+\m[blue]\fBkdbus\fR\m[]\&\s-2\u[2]\d\s+2
+endpoint will be created and installed as the default bus node for the service\&. Such a custom endpoint can hold an own set of policy rules that are enforced on top of the bus\-wide ones\&. The custom endpoint is named after the service it was created for, and its node will be bind\-mounted over the default bus node location, so the service can only access the bus through its own endpoint\&. Note that custom bus endpoints default to a \*(Aqdeny all\*(Aq policy\&. Hence, if at least one
+\fIBusPolicy=\fR
+directive is given, you have to make sure to add explicit rules for everything the service should be able to do\&.
+.sp
+The value of this directive is comprised of two parts; the bus name, and a verb to specify to granted access, which is one of
+\fBsee\fR,
+\fBtalk\fR, or
+\fBown\fR\&.
+\fBtalk\fR
+implies
+\fBsee\fR, and
+\fBown\fR
+implies both
+\fBtalk\fR
 and
-"@"
-are used, they can appear in either order\&.
+\fBsee\fR\&. If multiple access levels are specified for the same bus name, the most powerful one takes effect\&.
 .sp
-Note that this setting does not directly support shell command lines\&. If shell command lines are to be used, they need to be passed explicitly to a shell implementation of some kind\&. Example:
+Examples:
 .sp
 .if n \{\
 .RS 4
 .\}
 .nf
-ExecStart=/bin/sh \-c \*(Aqdmesg | tac\*(Aq
+BusPolicy=org\&.freedesktop\&.systemd1 talk
 .fi
 .if n \{\
 .RE
 .\}
 .sp
-Example:
-.sp
 .if n \{\
 .RS 4
 .\}
 .nf
-ExecStart=/bin/echo one ; /bin/echo "two two"
+BusPolicy=org\&.foo\&.bar see
 .fi
 .if n \{\
 .RE
 .\}
 .sp
-This will execute
-\fB/bin/echo\fR
-two times, each time with one argument:
-"one"
-and
-"two two", respectively\&. Because two commands are specified,
-\fIType=oneshot\fR
-must be used\&.
-.sp
-Example:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-ExecStart=/bin/echo / >/dev/null & \e; \e
-/bin/ls
-.fi
-.if n \{\
+This option is only available on kdbus enabled systems\&.
 .RE
-.\}
+.PP
+\fIExecStart=\fR
+.RS 4
+Commands with their arguments that are executed when this service is started\&. The value is split into zero or more command lines is according to the rules described below (see section "Command Lines" below)\&.
 .sp
-This will execute
-\fB/bin/echo\fR
-with five arguments:
-"/",
-">/dev/null",
-"&",
-";", and
-"/bin/ls"\&.
+When
+\fIType\fR
+is not
+\fBoneshot\fR, only one command may and must be given\&. When
+\fIType=oneshot\fR
+is used, zero or more commands may be specified\&. This can be specified by providing multiple command lines in the same directive, or alternatively, this directive may be specified more than once with the same effect\&. If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect\&. If no
+\fIExecStart=\fR
+is specified, then the service must have
+\fIRemainAfterExit=yes\fR
+set\&.
 .sp
-Example:
+For each of the specified commands, the first argument must be an absolute and literal path to an executable\&. Optionally, if the absolute file name is prefixed with
+"@", the second token will be passed as
+"argv[0]"
+to the executed process, followed by the further arguments specified\&. If the absolute filename is prefixed with
+"\-", an exit code of the command normally considered a failure (i\&.e\&. non\-zero exit status or abnormal exit due to signal) is ignored and considered success\&. If both
+"\-"
+and
+"@"
+are used, they can appear in either order\&.
 .sp
-.if n \{\
-.RS 4
-.\}
-.nf
-Environment="ONE=one" \*(AqTWO=two two\*(Aq
-ExecStart=/bin/echo $ONE $TWO ${TWO}
-.fi
-.if n \{\
-.RE
-.\}
+If more than one command is specified, the commands are invoked sequentially in the order they appear in the unit file\&. If one of the commands fails (and is not prefixed with
+"\-"), other lines are not executed, and the unit is considered failed\&.
 .sp
-This will execute
-\fB/bin/echo\fR
-with four arguments:
-"one",
-"two",
-"two", and
-"two two"\&.
+Unless
+\fIType=forking\fR
+is set, the process started via this command line will be considered the main process of the daemon\&.
 .RE
 .PP
 \fIExecStartPre=\fR, \fIExecStartPost=\fR
@@ -382,10 +330,11 @@ Configures the time to sleep before restarting a service (as configured with
 Configures the time to wait for start\-up\&. If a daemon service does not signal start\-up completion within the configured time, the service will be considered failed and will be shut down again\&. Takes a unit\-less value in seconds, or a time span value such as "5min 20s"\&. Pass
 "0"
 to disable the timeout logic\&. Defaults to
-\fITimeoutStartSec=\fR
+\fIDefaultTimeoutStartSec=\fR
 from the manager configuration file, except when
 \fIType=oneshot\fR
-is used, in which case the timeout is disabled by default\&.
+is used, in which case the timeout is disabled by default (see
+\fBsystemd-system.conf\fR(5))\&.
 .RE
 .PP
 \fITimeoutStopSec=\fR
@@ -399,8 +348,9 @@ in
 \fBsystemd.kill\fR(5))\&. Takes a unit\-less value in seconds, or a time span value such as "5min 20s"\&. Pass
 "0"
 to disable the timeout logic\&. Defaults to
-\fITimeoutStartSec=\fR
-from the manager configuration file\&.
+\fIDefaultTimeoutStopSec=\fR
+from the manager configuration file (see
+\fBsystemd-system.conf\fR(5))\&.
 .RE
 .PP
 \fITimeoutSec=\fR
@@ -418,7 +368,8 @@ Configures the watchdog timeout for a service\&. The watchdog is activated when
 \fBsd_notify\fR(3)
 regularly with
 "WATCHDOG=1"
-(i\&.e\&. the "keep\-alive ping")\&. If the time between two such calls is larger than the configured time, then the service is placed in a failed state\&. By setting
+(i\&.e\&. the "keep\-alive ping")\&. If the time between two such calls is larger than the configured time, then the service is placed in a failed state and it will be terminated with
+\fISIGABRT\fR\&. By setting
 \fIRestart=\fR
 to
 \fBon\-failure\fR
@@ -621,7 +572,7 @@ are considered clean service terminations\&.
 Note that if a process has a signal handler installed and exits by calling
 \fB_exit\fR(2)
 in response to a signal, the information about the signal is lost\&. Programs should instead perform cleanup and kill themselves with the same signal instead\&. See
-\m[blue]\fBProper handling of SIGINT/SIGQUIT \(em How to be a proper program\fR\m[]\&\s-2\u[2]\d\s+2\&.
+\m[blue]\fBProper handling of SIGINT/SIGQUIT \(em How to be a proper program\fR\m[]\&\s-2\u[3]\d\s+2\&.
 .sp
 This option may appear more than once, in which case the list of successful exit statuses is merged\&. If the empty string is assigned to this option, the list is reset, all prior assignments of this option will have no effect\&.
 .RE
@@ -719,9 +670,9 @@ is not configured, it will be implicitly set to
 .PP
 \fISockets=\fR
 .RS 4
-Specifies the name of the socket units this service shall inherit the sockets from when the service is started\&. Normally it should not be necessary to use this setting as all sockets whose unit shares the same name as the service (ignoring the different suffix of course) are passed to the spawned process\&.
+Specifies the name of the socket units this service shall inherit socket file descriptors from when the service is started\&. Normally it should not be necessary to use this setting as all socket file descriptors whose unit shares the same name as the service (subject to the different unit name suffix of course) are passed to the spawned process\&.
 .sp
-Note that the same socket may be passed to multiple processes at the same time\&. Also note that a different service may be activated on incoming traffic than that which inherits the sockets\&. Or in other words: the
+Note that the same socket file descriptors may be passed to multiple processes simultaneously\&. Also note that a different service may be activated on incoming socket traffic than the one which is ultimately configured to inherit the socket file descriptors\&. Or in other words: the
 \fIService=\fR
 setting of
 \&.socket
@@ -763,8 +714,12 @@ and
 is hit\&. Takes one of
 \fBnone\fR,
 \fBreboot\fR,
-\fBreboot\-force\fR, or
-\fBreboot\-immediate\fR\&. If
+\fBreboot\-force\fR,
+\fBreboot\-immediate\fR,
+\fBpoweroff\fR,
+\fBpoweroff\-force\fR
+or
+\fBpoweroff\-immediate\fR\&. If
 \fBnone\fR
 is set, hitting the rate limit will trigger no action besides that the start will not be permitted\&.
 \fBreboot\fR
@@ -776,7 +731,19 @@ causes a forced reboot which will terminate all processes forcibly but should ca
 \fBreboot\-immediate\fR
 causes immediate execution of the
 \fBreboot\fR(2)
-system call, which might result in data loss\&. Defaults to
+system call, which might result in data loss\&. Similar,
+\fBpoweroff\fR,
+\fBpoweroff\-force\fR,
+\fBpoweroff\-immediate\fR
+have the effect of powering down the system with similar semantics\&. Defaults to
+\fBnone\fR\&.
+.RE
+.PP
+\fIFailureAction=\fR
+.RS 4
+Configure the action to take when the service enters a failed state\&. Takes the same values as
+\fIStartLimitAction=\fR
+and executes the same actions\&. Defaults to
 \fBnone\fR\&.
 .RE
 .PP
@@ -786,19 +753,13 @@ Configure the optional argument for the
 \fBreboot\fR(2)
 system call if
 \fIStartLimitAction=\fR
+or
+\fIFailureAction=\fR
 is a reboot action\&. This works just like the optional argument to
 \fBsystemctl reboot\fR
 command\&.
 .RE
 .PP
-\fIFailureAction=\fR
-.RS 4
-Configure the action to take when the service enters a failed state\&. Takes the same values as
-\fIStartLimitAction=\fR
-and executes the same actions\&. Defaults to
-\fBnone\fR\&.
-.RE
-.PP
 Check
 \fBsystemd.exec\fR(5)
 and
@@ -818,10 +779,156 @@ or
 \fIBefore=\fR, instead\&. For more details, see
 \fBsystemd.unit\fR(5)\&. If used, pass an integer value in the range 0\-99\&.
 .RE
+.SH "COMMAND LINES"
+.PP
+This section describes command line parsing and variable and specifier substitions for
+\fIExecStart=\fR,
+\fIExecStartPre=\fR,
+\fIExecStartPost=\fR,
+\fIExecReload=\fR,
+\fIExecStop=\fR, and
+\fIExecStopPost=\fR
+options\&.
+.PP
+Multiple command lines may be concatenated in a single directive by separating them with semicolons (these semicolons must be passed as separate words)\&. Lone semicolons may be escaped as
+"\e;"\&.
+.PP
+Each command line is split on whitespace, with the first item being the command to execute, and the subsequent items being the arguments\&. Double quotes ("\&.\&.\&.") and single quotes (\*(Aq\&.\&.\&.\*(Aq) may be used, in which case everything until the next matching quote becomes part of the same argument\&. Quotes themselves are removed after parsing\&. In addition, a trailing backslash ("\e") may be used to merge lines\&.
+.PP
+This syntax is intended to be very similar to shell syntax, but only the meta\-characters and expansions described in the following paragraphs are understood\&. Specifically, redirection using
+"<",
+"<<",
+">", and
+">>", pipes using
+"|", running programs in the background using
+"&", and
+\fIother elements of shell syntax are not supported\fR\&.
+.PP
+The command line accepts
+"%"
+specifiers as described in
+\fBsystemd.unit\fR(5)\&. Note that the first argument of the command line (i\&.e\&. the program to execute) may not include specifiers\&.
+.PP
+Basic environment variable substitution is supported\&. Use
+"${FOO}"
+as part of a word, or as a word of its own, on the command line, in which case it will be replaced by the value of the environment variable including all whitespace it contains, resulting in a single argument\&. Use
+"$FOO"
+as a separate word on the command line, in which case it will be replaced by the value of the environment variable split at whitespace resulting in zero or more arguments\&. For this type of expansion, quotes and respected when splitting into words, and afterwards removed\&.
+.PP
+Example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Environment="ONE=one" \*(AqTWO=two two\*(Aq
+ExecStart=/bin/echo $ONE $TWO ${TWO}
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+This will execute
+\fB/bin/echo\fR
+with four arguments:
+"one",
+"two",
+"two", and
+"two two"\&.
+.PP
+Example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Environment=ONE=\*(Aqone\*(Aq "TWO=\*(Aqtwo\ \&two\*(Aq\ \&too" THREE=
+ExecStart=/bin/echo ${ONE} ${TWO} ${THREE}
+ExecStart=/bin/echo $ONE $TWO $THREE
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+This results in
+echo
+being called twice, the first time with arguments
+"\*(Aqone\*(Aq",
+"\*(Aqtwo\ \&two\*(Aq\ \&too",
+"", and the second time with arguments
+"one",
+"two\ \&two",
+"too"\&.
+.PP
+To pass a literal dollar sign, use
+"$$"\&. Variables whose value is not known at expansion time are treated as empty strings\&. Note that the first argument (i\&.e\&. the program to execute) may not be a variable\&.
+.PP
+Variables to be used in this fashion may be defined through
+\fIEnvironment=\fR
+and
+\fIEnvironmentFile=\fR\&. In addition, variables listed in the section "Environment variables in spawned processes" in
+\fBsystemd.exec\fR(5), which are considered "static configuration", may be used (this includes e\&.g\&.
+\fI$USER\fR, but not
+\fI$TERM\fR)\&.
+.PP
+Note that shell command lines are not directly supported\&. If shell command lines are to be used, they need to be passed explicitly to a shell implementation of some kind\&. Example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+ExecStart=/bin/sh \-c \*(Aqdmesg | tac\*(Aq
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+Example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+ExecStart=/bin/echo one ; /bin/echo "two two"
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+This will execute
+\fB/bin/echo\fR
+two times, each time with one argument:
+"one"
+and
+"two two", respectively\&. Because two commands are specified,
+\fIType=oneshot\fR
+must be used\&.
+.PP
+Example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+ExecStart=/bin/echo / >/dev/null & \e; \e
+/bin/ls
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+This will execute
+\fB/bin/echo\fR
+with five arguments:
+"/",
+">/dev/null",
+"&",
+";", and
+"/bin/ls"\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.exec\fR(5),
 \fBsystemd.resource-control\fR(5),
@@ -834,6 +941,11 @@ Incompatibilities with SysV
 \%http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
 .RE
 .IP " 2." 4
+kdbus
+.RS 4
+\%https://code.google.com/p/d-bus/
+.RE
+.IP " 3." 4
 Proper handling of SIGINT/SIGQUIT \(em How to be a proper program
 .RS 4
 \%http://www.cons.org/cracauer/sigint.html
index d0571c6f392533ce3515e76a55f0f3f5a98188c7..adcdff1dbc78d6af13dca289eb2ca4a4600a6615 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.service — Service unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code></p></div><div class="refsect1"><a name="idm214197490064"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.service — Service unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code></p></div><div class="refsect1"><a name="idm214169930112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 <code class="filename">.service</code> encodes information
                 about a process controlled and supervised by
                 systemd.</p><p>This man page lists the configuration options
@@ -62,7 +62,7 @@
                 comprehensive but not 100%. For details about the
                 incompatibilities, see the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities" target="_top">Incompatibilities
                 with SysV</a> document.
-                </p></div><div class="refsect1"><a name="idm214201426880"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Service files must include a
+                </p></div><div class="refsect1"><a name="idm214173811712"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Service files must include a
                 "<code class="literal">[Service]</code>" section, which carries
                 information about the service and the process it
                 supervises. A number of options that may be used in
                                 <code class="option">notify</code> or
                                 <code class="option">idle</code>.</p><p>If set to
                                 <code class="option">simple</code> (the default
-                                value if neither
+                                if neither
                                 <code class="varname">Type=</code> nor
-                                <code class="varname">BusName=</code> are
+                                <code class="varname">BusName=</code>, but
+                                <code class="varname">ExecStart=</code> are
                                 specified), it is expected that the
                                 process configured with
                                 <code class="varname">ExecStart=</code> is the
                                 proceed with starting follow-up units
                                 as soon as the parent process
                                 exits.</p><p>Behavior of
-                                <code class="option">oneshot</code> is similar
-                                to <code class="option">simple</code>; however,
-                                it is expected that the process has to
+                                <code class="option">oneshot</code> is similar to
+                                <code class="option">simple</code>; however, it
+                                is expected that the process has to
                                 exit before systemd starts follow-up
                                 units. <code class="varname">RemainAfterExit=</code>
                                 is particularly useful for this type
-                                of service.</p><p>Behavior of
+                                of service. This is the implied
+                                default if neither
+                                <code class="varname">Type=</code> or
+                                <code class="varname">ExecStart=</code> are
+                                specified.</p><p>Behavior of
                                 <code class="option">dbus</code> is similar to
                                 <code class="option">simple</code>; however, it is
                                 expected that the daemon acquires a
                                 <code class="varname">Type=</code> is set to
                                 <code class="option">dbus</code>, but its use
                                 is otherwise recommended if the process
-                                takes a name on the D-Bus bus.</p></dd><dt id="ExecStart="><span class="term"><code class="varname">ExecStart=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStart=">¶</a></dt><dd><p>Commands with their
+                                takes a name on the D-Bus bus.</p></dd><dt id="BusPolicy="><span class="term"><code class="varname">BusPolicy=</code></span><a class="headerlink" title="Permalink to this term" href="#BusPolicy=">¶</a></dt><dd><p>If specified, a custom
+                                <a class="ulink" href="https://code.google.com/p/d-bus/" target="_top">kdbus</a>
+                                endpoint will be created and installed as the
+                                default bus node for the service. Such a custom
+                                endpoint can hold an own set of policy rules
+                                that are enforced on top of the bus-wide ones.
+                                The custom endpoint is named after the service
+                                it was created for, and its node will be
+                                bind-mounted over the default bus node
+                                location, so the service can only access the
+                                bus through its own endpoint. Note that custom
+                                bus endpoints default to a 'deny all' policy.
+                                Hence, if at least one
+                                <code class="varname">BusPolicy=</code> directive is
+                                given, you have to make sure to add explicit
+                                rules for everything the service should be able
+                                to do.</p><p>The value of this directive is comprised
+                                of two parts; the bus name, and a verb to
+                                specify to granted access, which is one of
+                                <code class="option">see</code>,
+                                <code class="option">talk</code>, or
+                                <code class="option">own</code>.
+                                <code class="option">talk</code> implies
+                                <code class="option">see</code>, and <code class="option">own</code>
+                                implies both <code class="option">talk</code> and
+                                <code class="option">see</code>.
+                                If multiple access levels are specified for the
+                                same bus name, the most powerful one takes
+                                effect.
+                                </p><p>Examples:</p><pre class="programlisting">BusPolicy=org.freedesktop.systemd1 talk</pre><pre class="programlisting">BusPolicy=org.foo.bar see</pre><p>This option is only available on kdbus enabled systems.</p></dd><dt id="ExecStart="><span class="term"><code class="varname">ExecStart=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStart=">¶</a></dt><dd><p>Commands with their
                                 arguments that are executed when this
-                                service is started. For each of the
-                                specified commands, the first argument
-                                must be an absolute and literal path
-                                to an executable.</p><p>When <code class="varname">Type</code> is
+                                service is started. The value is split
+                                into zero or more command lines is
+                                according to the rules described below
+                                (see section "Command Lines" below).
+                                </p><p>When <code class="varname">Type</code> is
                                 not <code class="option">oneshot</code>, only one
-                                command may be given. When
+                                command may and must be given. When
                                 <code class="varname">Type=oneshot</code> is
-                                used, more than one command may be
-                                specified. Multiple command lines may
-                                be concatenated in a single directive
-                                by separating them with semicolons
-                                (these semicolons must be passed as
-                                separate words). Alternatively, this
-                                directive may be specified more than
-                                once with the same effect.
-                                Lone semicolons may be escaped as
-                                "<code class="literal">\;</code>". If the empty
-                                string is assigned to this option, the
-                                list of commands to start is reset,
-                                prior assignments of this option will
-                                have no effect.</p><p>Each command line is split on
-                                whitespace, with the first item being
-                                the command to execute, and the
-                                subsequent items being the arguments.
-                                Double quotes ("...") and single
-                                quotes ('...') may be used, in which
-                                case everything until the next
-                                matching quote becomes part of the
-                                same argument. Quotes themselves are
-                                removed after parsing. In addition, a
-                                trailing backslash
-                                ("<code class="literal">\</code>") may be used to
-                                merge lines. This syntax is intended
-                                to be very similar to shell syntax,
-                                but only the meta-characters and
-                                expansions described in the following
-                                paragraphs are understood.
-                                Specifically, redirection using
-                                "<code class="literal">&lt;</code>",
-                                "<code class="literal">&lt;&lt;</code>",
-                                "<code class="literal">&gt;</code>", and
-                                "<code class="literal">&gt;&gt;</code>", pipes
-                                using "<code class="literal">|</code>", and
-                                running programs in the background
-                                using "<code class="literal">&amp;</code>"
-                                and <span class="emphasis"><em>other elements of shell
-                                syntax are not supported</em></span>.
-                                </p><p>If more than one command is
-                                specified, the commands are invoked
-                                sequentially in the order they appear
-                                in the unit file. If one of the
-                                commands fails (and is not prefixed
-                                with "<code class="literal">-</code>"), other lines
-                                are not executed, and the unit is
-                                considered failed.</p><p>Unless
-                                <code class="varname">Type=forking</code> is
-                                set, the process started via this
-                                command line will be considered the
-                                main process of the daemon.</p><p>The command line accepts
-                                "<code class="literal">%</code>" specifiers as
-                                described in
-                                <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
-                                Note that the first argument of the
-                                command line (i.e. the program to
-                                execute) may not include
-                                specifiers.</p><p>Basic environment variable
-                                substitution is supported. Use
-                                "<code class="literal">${FOO}</code>" as part of a
-                                word, or as a word of its own, on the
-                                command line, in which case it will be
-                                replaced by the value of the
-                                environment variable including all
-                                whitespace it contains, resulting in a
-                                single argument. Use
-                                "<code class="literal">$FOO</code>" as a separate
-                                word on the command line, in which
-                                case it will be replaced by the value
-                                of the environment variable split at
-                                whitespace, resulting in zero or more
-                                arguments. To pass a literal dollar
-                                sign, use "<code class="literal">$$</code>".
-                                Variables whose value is not known at
-                                expansion time are treated as empty
-                                strings. Note that the first argument
-                                (i.e. the program to execute) may not
-                                be a variable.</p><p>Variables to be used in this
-                                fashion may be defined through
-                                <code class="varname">Environment=</code> and
-                                <code class="varname">EnvironmentFile=</code>.
-                                In addition, variables listed in the
-                                section "Environment variables in
-                                spawned processes" in
-                                <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
-                                which are considered "static
-                                configuration", may be used (this includes
-                                e.g. <code class="varname">$USER</code>, but not
-                                <code class="varname">$TERM</code>).</p><p>Optionally, if the absolute file
-                                name is prefixed with
+                                used, zero or more commands may be
+                                specified. This can be specified by
+                                providing multiple command lines in
+                                the same directive, or alternatively,
+                                this directive may be specified more
+                                than once with the same effect. If the
+                                empty string is assigned to this
+                                option, the list of commands to start
+                                is reset, prior assignments of this
+                                option will have no effect. If no
+                                <code class="varname">ExecStart=</code> is
+                                specified, then the service must have
+                                <code class="varname">RemainAfterExit=yes</code>
+                                set.</p><p>For each of the specified
+                                commands, the first argument must be
+                                an absolute and literal path to an
+                                executable. Optionally, if the
+                                absolute file name is prefixed with
                                 "<code class="literal">@</code>", the second token
                                 will be passed as
                                 "<code class="literal">argv[0]</code>" to the
                                 "<code class="literal">-</code>", an exit code of
                                 the command normally considered a
                                 failure (i.e. non-zero exit status or
-                                abnormal exit due to signal) is ignored
-                                and considered success. If both
-                                "<code class="literal">-</code>" and
+                                abnormal exit due to signal) is
+                                ignored and considered success. If
+                                both "<code class="literal">-</code>" and
                                 "<code class="literal">@</code>" are used, they
-                                can appear in either order.</p><p>Note that this setting does not
-                                directly support shell command
-                                lines. If shell command lines are to
-                                be used, they need to be passed
-                                explicitly to a shell implementation
-                                of some kind. Example:</p><pre class="programlisting">ExecStart=/bin/sh -c 'dmesg | tac'</pre><p>Example:</p><pre class="programlisting">ExecStart=/bin/echo one ; /bin/echo "two two"</pre><p>This will execute
-                                <span class="command"><strong>/bin/echo</strong></span> two
-                                times, each time with one argument:
-                                "<code class="literal">one</code>" and
-                                "<code class="literal">two two</code>",
-                                respectively. Because two commands are
-                                specified,
-                                <code class="varname">Type=oneshot</code> must
-                                be used.</p><p>Example:</p><pre class="programlisting">ExecStart=/bin/echo / &gt;/dev/null &amp; \; \
-/bin/ls</pre><p>This will execute
-                                <span class="command"><strong>/bin/echo</strong></span> with five
-                                arguments: "<code class="literal">/</code>",
-                                "<code class="literal">&gt;/dev/null</code>",
-                                "<code class="literal">&amp;</code>",
-                                "<code class="literal">;</code>", and
-                                "<code class="literal">/bin/ls</code>".</p><p>Example:</p><pre class="programlisting">Environment="ONE=one" 'TWO=two two'
-ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
-                                <span class="command"><strong>/bin/echo</strong></span> with four
-                                arguments: "<code class="literal">one</code>",
-                                "<code class="literal">two</code>",
-                                "<code class="literal">two</code>", and
-                                "<code class="literal">two two</code>".</p></dd><dt id="ExecStartPre="><span class="term"><code class="varname">ExecStartPre=</code>, </span><span class="term"><code class="varname">ExecStartPost=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStartPre=">¶</a></dt><dd><p>Additional commands
+                                can appear in either order.</p><p>If more than one command is
+                                specified, the commands are invoked
+                                sequentially in the order they appear
+                                in the unit file. If one of the
+                                commands fails (and is not prefixed
+                                with "<code class="literal">-</code>"), other
+                                lines are not executed, and the unit
+                                is considered failed.</p><p>Unless
+                                <code class="varname">Type=forking</code> is
+                                set, the process started via this
+                                command line will be considered the
+                                main process of the daemon.</p></dd><dt id="ExecStartPre="><span class="term"><code class="varname">ExecStartPre=</code>, </span><span class="term"><code class="varname">ExecStartPost=</code></span><a class="headerlink" title="Permalink to this term" href="#ExecStartPre=">¶</a></dt><dd><p>Additional commands
                                 that are executed before or after
                                 the command in
                                 <code class="varname">ExecStart=</code>, respectively.
@@ -431,11 +378,12 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 time span value such as "5min
                                 20s". Pass "<code class="literal">0</code>" to
                                 disable the timeout logic. Defaults to
-                                <code class="varname">TimeoutStartSec=</code> from
+                                <code class="varname">DefaultTimeoutStartSec=</code> from
                                 the manager configuration file, except
                                 when <code class="varname">Type=oneshot</code> is
                                 used, in which case the timeout
-                                is disabled by default.
+                                is disabled by default
+                                (see <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>).
                                 </p></dd><dt id="TimeoutStopSec="><span class="term"><code class="varname">TimeoutStopSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutStopSec=">¶</a></dt><dd><p>Configures the time to
                                 wait for stop. If a service is asked
                                 to stop, but does not terminate in the
@@ -449,8 +397,9 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 time span value such as "5min
                                 20s". Pass "<code class="literal">0</code>" to disable
                                 the timeout logic. Defaults to
-                                <code class="varname">TimeoutStartSec=</code> from the
-                                manager configuration file.
+                                <code class="varname">DefaultTimeoutStopSec=</code> from the
+                                manager configuration file
+                                (see <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>).
                                 </p></dd><dt id="TimeoutSec="><span class="term"><code class="varname">TimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutSec=">¶</a></dt><dd><p>A shorthand for configuring
                                 both <code class="varname">TimeoutStartSec=</code>
                                 and <code class="varname">TimeoutStopSec=</code>
@@ -464,8 +413,9 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 (i.e. the "keep-alive ping"). If the time
                                 between two such calls is larger than
                                 the configured time, then the service
-                                is placed in a failed state. By
-                                setting <code class="varname">Restart=</code> to
+                                is placed in a failed state and it will
+                                be terminated with <code class="varname">SIGABRT</code>.
+                                By setting <code class="varname">Restart=</code> to
                                 <code class="option">on-failure</code> or
                                 <code class="option">always</code>, the service
                                 will be automatically restarted. The
@@ -554,7 +504,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 will be restarted regardless of
                                 whether it exited cleanly or not, got
                                 terminated abnormally by a signal, or
-                                hit a timeout.</p><div class="table"><a name="idm214196309824"></a><p class="title"><b>Table 1. Exit causes and the effect of the <code class="varname">Restart=</code> settings on them</b></p><div class="table-contents"><table summary="Exit causes and the effect of the Restart= settings on them" border="1"><colgroup><col class="path"><col class="expl"></colgroup><thead><tr><th>Restart settings/Exit causes</th><th><code class="option">no</code></th><th><code class="option">always</code></th><th><code class="option">on-success</code></th><th><code class="option">on-failure</code></th><th><code class="option">on-abnormal</code></th><th><code class="option">on-abort</code></th><th><code class="option">on-watchdog</code></th></tr></thead><tbody><tr><td>Clean exit code or signal</td><td> </td><td>X</td><td>X</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td>Unclean exit code</td><td> </td><td>X</td><td> </td><td>X</td><td> </td><td> </td><td> </td></tr><tr><td>Unclean signal</td><td> </td><td>X</td><td> </td><td>X</td><td>X</td><td>X</td><td> </td></tr><tr><td>Timeout</td><td> </td><td>X</td><td> </td><td>X</td><td>X</td><td> </td><td> </td></tr><tr><td>Watchdog</td><td> </td><td>X</td><td> </td><td>X</td><td>X</td><td> </td><td>X</td></tr></tbody></table></div></div><br class="table-break"><p>As exceptions to the setting
+                                hit a timeout.</p><div class="table"><a name="idm214168767440"></a><p class="title"><b>Table 1. Exit causes and the effect of the <code class="varname">Restart=</code> settings on them</b></p><div class="table-contents"><table summary="Exit causes and the effect of the Restart= settings on them" border="1"><colgroup><col class="path"><col class="expl"></colgroup><thead><tr><th>Restart settings/Exit causes</th><th><code class="option">no</code></th><th><code class="option">always</code></th><th><code class="option">on-success</code></th><th><code class="option">on-failure</code></th><th><code class="option">on-abnormal</code></th><th><code class="option">on-abort</code></th><th><code class="option">on-watchdog</code></th></tr></thead><tbody><tr><td>Clean exit code or signal</td><td> </td><td>X</td><td>X</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td>Unclean exit code</td><td> </td><td>X</td><td> </td><td>X</td><td> </td><td> </td><td> </td></tr><tr><td>Unclean signal</td><td> </td><td>X</td><td> </td><td>X</td><td>X</td><td>X</td><td> </td></tr><tr><td>Timeout</td><td> </td><td>X</td><td> </td><td>X</td><td>X</td><td> </td><td> </td></tr><tr><td>Watchdog</td><td> </td><td>X</td><td> </td><td>X</td><td>X</td><td> </td><td>X</td></tr></tbody></table></div></div><br class="table-break"><p>As exceptions to the setting
                                 above the service will not be
                                 restarted if the exit code or signal
                                 is specified in
@@ -591,7 +541,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 </p><p>Note that if a process has a
                                 signal handler installed and exits by
                                 calling
-                                <a href="_exit.html"><span class="citerefentry"><span class="refentrytitle">_exit</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/_exit.2.html"><span class="citerefentry"><span class="refentrytitle">_exit</span>(2)</span></a>
                                 in response to a signal, the
                                 information about the signal is lost.
                                 Programs should instead perform cleanup and kill themselves with the same signal instead. See
@@ -710,19 +660,22 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 to
                                 <code class="option">main</code>.</p></dd><dt id="Sockets="><span class="term"><code class="varname">Sockets=</code></span><a class="headerlink" title="Permalink to this term" href="#Sockets=">¶</a></dt><dd><p>Specifies the name of
                                 the socket units this service shall
-                                inherit the sockets from when the
-                                service is started. Normally it
-                                should not be necessary to use this
-                                setting as all sockets whose unit
+                                inherit socket file descriptors
+                                from when the service is
+                                started. Normally it should not be
+                                necessary to use this setting as all
+                                socket file descriptors whose unit
                                 shares the same name as the service
-                                (ignoring the different suffix of course)
-                                are passed to the spawned
-                                process.</p><p>Note that the same socket may be
-                                passed to multiple processes at the
-                                same time. Also note that a different
-                                service may be activated on incoming
-                                traffic than that which inherits the
-                                sockets. Or in other words: the
+                                (subject to the different unit name
+                                suffix of course) are passed to the
+                                spawned process.</p><p>Note that the same socket file
+                                descriptors may be passed to multiple
+                                processes simultaneously. Also note
+                                that a different service may be
+                                activated on incoming socket traffic
+                                than the one which is ultimately
+                                configured to inherit the socket file
+                                descriptors. Or in other words: the
                                 <code class="varname">Service=</code> setting of
                                 <code class="filename">.socket</code> units
                                 does not have to match the inverse of
@@ -784,45 +737,55 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 hit. Takes one of
                                 <code class="option">none</code>,
                                 <code class="option">reboot</code>,
-                                <code class="option">reboot-force</code>, or
-                                <code class="option">reboot-immediate</code>. If
-                                <code class="option">none</code> is set,
-                                hitting the rate limit will trigger no
-                                action besides that the start will not
-                                be permitted. <code class="option">reboot</code>
+                                <code class="option">reboot-force</code>,
+                                <code class="option">reboot-immediate</code>,
+                                <code class="option">poweroff</code>,
+                                <code class="option">poweroff-force</code> or
+                                <code class="option">poweroff-immediate</code>. If
+                                <code class="option">none</code> is set, hitting
+                                the rate limit will trigger no action
+                                besides that the start will not be
+                                permitted. <code class="option">reboot</code>
                                 causes a reboot following the normal
                                 shutdown procedure (i.e. equivalent to
                                 <span class="command"><strong>systemctl reboot</strong></span>).
-                                <code class="option">reboot-force</code> causes
-                                a forced reboot which will terminate
-                                all processes forcibly but should
-                                cause no dirty file systems on reboot
+                                <code class="option">reboot-force</code> causes a
+                                forced reboot which will terminate all
+                                processes forcibly but should cause no
+                                dirty file systems on reboot
                                 (i.e. equivalent to <span class="command"><strong>systemctl
                                 reboot -f</strong></span>) and
                                 <code class="option">reboot-immediate</code>
                                 causes immediate execution of the
-                                <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>
                                 system call, which might result in
-                                data loss. Defaults to
-                                <code class="option">none</code>.</p></dd><dt id="RebootArgument="><span class="term"><code class="varname">RebootArgument=</code></span><a class="headerlink" title="Permalink to this term" href="#RebootArgument=">¶</a></dt><dd><p>Configure the optional
+                                data loss. Similar,
+                                <code class="option">poweroff</code>,
+                                <code class="option">poweroff-force</code>,
+                                <code class="option">poweroff-immediate</code>
+                                have the effect of powering down the
+                                system with similar
+                                semantics. Defaults to
+                                <code class="option">none</code>.</p></dd><dt id="FailureAction="><span class="term"><code class="varname">FailureAction=</code></span><a class="headerlink" title="Permalink to this term" href="#FailureAction=">¶</a></dt><dd><p>Configure the action
+                                to take when the service enters a failed
+                                state. Takes the same values as
+                                <code class="varname">StartLimitAction=</code>
+                                and executes the same actions.
+                                Defaults to <code class="option">none</code>.
+                                </p></dd><dt id="RebootArgument="><span class="term"><code class="varname">RebootArgument=</code></span><a class="headerlink" title="Permalink to this term" href="#RebootArgument=">¶</a></dt><dd><p>Configure the optional
                                 argument for the
-                                <a href="reboot.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>
                                 system call if
                                 <code class="varname">StartLimitAction=</code>
+                                or <code class="varname">FailureAction=</code>
                                 is a reboot action. This works just
                                 like the optional argument to
                                 <span class="command"><strong>systemctl reboot</strong></span>
-                                command.</p></dd><dt id="FailureAction="><span class="term"><code class="varname">FailureAction=</code></span><a class="headerlink" title="Permalink to this term" href="#FailureAction=">¶</a></dt><dd><p>Configure the action
-                                to take when the service enters a failed
-                                state. Takes the same values as
-                                <code class="varname">StartLimitAction=</code>
-                                and executes the same actions.
-                                Defaults to <code class="option">none</code>.
-                                </p></dd></dl></div><p>Check
+                                command.</p></dd></dl></div><p>Check
                 <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>
                 and
                 <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>
-                for more settings.</p></div><div class="refsect1"><a name="idm214196210688"></a><h2 id="Compatibility Options">Compatibility Options<a class="headerlink" title="Permalink to this headline" href="#Compatibility%20Options">¶</a></h2><p>The following options are also available in the
+                for more settings.</p></div><div class="refsect1"><a name="idm214168665072"></a><h2 id="Compatibility Options">Compatibility Options<a class="headerlink" title="Permalink to this headline" href="#Compatibility%20Options">¶</a></h2><p>The following options are also available in the
                 "<code class="literal">[Service]</code>" section, but exist purely
                 for compatibility reasons and should not be used in
                 newly written service files.</p><div class="variablelist"><dl class="variablelist"><dt id="SysVStartPriority="><span class="term"><code class="varname">SysVStartPriority=</code></span><a class="headerlink" title="Permalink to this term" href="#SysVStartPriority=">¶</a></dt><dd><p>Set the SysV start
@@ -843,9 +806,91 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute
                                 instead. For more details, see
                                 <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
                                 If used, pass an integer value in the
-                                range 0-99.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196203136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                range 0-99.</p></dd></dl></div></div><div class="refsect1"><a name="idm214168658368"></a><h2 id="Command lines">Command lines<a class="headerlink" title="Permalink to this headline" href="#Command%20lines">¶</a></h2><p>This section describes command line parsing and
+                variable and specifier substitions for
+                <code class="varname">ExecStart=</code>,
+                <code class="varname">ExecStartPre=</code>,
+                <code class="varname">ExecStartPost=</code>,
+                <code class="varname">ExecReload=</code>,
+                <code class="varname">ExecStop=</code>, and
+                <code class="varname">ExecStopPost=</code> options.</p><p>Multiple command lines may be concatenated in a
+                single directive by separating them with semicolons
+                (these semicolons must be passed as separate words).
+                Lone semicolons may be escaped as
+                "<code class="literal">\;</code>".</p><p>Each command line is split on whitespace, with
+                the first item being the command to execute, and the
+                subsequent items being the arguments.  Double quotes
+                ("...") and single quotes ('...') may be used, in
+                which case everything until the next matching quote
+                becomes part of the same argument. Quotes themselves
+                are removed after parsing. In addition, a trailing
+                backslash ("<code class="literal">\</code>") may be used to merge
+                lines. </p><p>This syntax is intended to be very similar to
+                shell syntax, but only the meta-characters and
+                expansions described in the following paragraphs are
+                understood.  Specifically, redirection using
+                "<code class="literal">&lt;</code>", "<code class="literal">&lt;&lt;</code>",
+                "<code class="literal">&gt;</code>", and
+                "<code class="literal">&gt;&gt;</code>", pipes using
+                "<code class="literal">|</code>", running programs in the
+                background using "<code class="literal">&amp;</code>", and
+                <span class="emphasis"><em>other elements of shell syntax are not
+                supported</em></span>.</p><p>The command line accepts "<code class="literal">%</code>"
+                specifiers as described in
+                <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.
+                Note that the first argument of the command line
+                (i.e. the program to execute) may not include
+                specifiers.</p><p>Basic environment variable substitution is
+                supported. Use "<code class="literal">${FOO}</code>" as part of a
+                word, or as a word of its own, on the command line, in
+                which case it will be replaced by the value of the
+                environment variable including all whitespace it
+                contains, resulting in a single argument. Use
+                "<code class="literal">$FOO</code>" as a separate word on the
+                command line, in which case it will be replaced by the
+                value of the environment variable split at whitespace
+                resulting in zero or more arguments. For this type of
+                expansion, quotes and respected when splitting into
+                words, and afterwards removed.</p><p>Example:</p><pre class="programlisting">Environment="ONE=one" 'TWO=two two'
+ExecStart=/bin/echo $ONE $TWO ${TWO}</pre><p>This will execute <span class="command"><strong>/bin/echo</strong></span>
+                with four arguments: "<code class="literal">one</code>",
+                "<code class="literal">two</code>", "<code class="literal">two</code>", and
+                "<code class="literal">two two</code>".</p><p>Example:</p><pre class="programlisting">Environment=ONE='one' "TWO='two two' too" THREE=
+ExecStart=/bin/echo ${ONE} ${TWO} ${THREE}
+ExecStart=/bin/echo $ONE $TWO $THREE</pre><p>This results in <code class="filename">echo</code> being
+                called twice, the first time with arguments
+                "<code class="literal">'one'</code>",
+                "<code class="literal">'two two' too</code>", "<code class="literal"></code>",
+                and the second time with arguments
+                "<code class="literal">one</code>", "<code class="literal">two two</code>",
+                "<code class="literal">too</code>".
+                </p><p>To pass a literal dollar sign, use
+                "<code class="literal">$$</code>". Variables whose value is not
+                known at expansion time are treated as empty
+                strings. Note that the first argument (i.e. the
+                program to execute) may not be a variable.</p><p>Variables to be used in this fashion may be
+                defined through <code class="varname">Environment=</code> and
+                <code class="varname">EnvironmentFile=</code>.  In addition,
+                variables listed in the section "Environment variables
+                in spawned processes" in
+                <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
+                which are considered "static configuration", may be
+                used (this includes e.g. <code class="varname">$USER</code>, but
+                not <code class="varname">$TERM</code>).</p><p>Note that shell command lines are not directly
+                supported. If shell command lines are to be used, they
+                need to be passed explicitly to a shell implementation
+                of some kind. Example:</p><pre class="programlisting">ExecStart=/bin/sh -c 'dmesg | tac'</pre><p>Example:</p><pre class="programlisting">ExecStart=/bin/echo one ; /bin/echo "two two"</pre><p>This will execute <span class="command"><strong>/bin/echo</strong></span>
+                two times, each time with one argument:
+                "<code class="literal">one</code>" and "<code class="literal">two two</code>",
+                respectively. Because two commands are specified,
+                <code class="varname">Type=oneshot</code> must be used.</p><p>Example:</p><pre class="programlisting">ExecStart=/bin/echo / &gt;/dev/null &amp; \; \
+/bin/ls</pre><p>This will execute <span class="command"><strong>/bin/echo</strong></span>
+                with five arguments: "<code class="literal">/</code>",
+                "<code class="literal">&gt;/dev/null</code>",
+                "<code class="literal">&amp;</code>", "<code class="literal">;</code>", and
+                "<code class="literal">/bin/ls</code>".</p></div><div class="refsect1"><a name="idm214168617408"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                           <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
index 01312502601d57057f32d36b3b5c688a7f335fa8..e563b1968bb9e17d6a39fc229124c3513f4c9855 100644 (file)
 
                                 <para>If set to
                                 <option>simple</option> (the default
-                                value if neither
+                                if neither
                                 <varname>Type=</varname> nor
-                                <varname>BusName=</varname> are
+                                <varname>BusName=</varname>, but
+                                <varname>ExecStart=</varname> are
                                 specified), it is expected that the
                                 process configured with
                                 <varname>ExecStart=</varname> is the
                                 exits.</para>
 
                                 <para>Behavior of
-                                <option>oneshot</option> is similar
-                                to <option>simple</option>; however,
-                                it is expected that the process has to
+                                <option>oneshot</option> is similar to
+                                <option>simple</option>; however, it
+                                is expected that the process has to
                                 exit before systemd starts follow-up
                                 units. <varname>RemainAfterExit=</varname>
                                 is particularly useful for this type
-                                of service.</para>
+                                of service. This is the implied
+                                default if neither
+                                <varname>Type=</varname> or
+                                <varname>ExecStart=</varname> are
+                                specified.</para>
 
                                 <para>Behavior of
                                 <option>dbus</option> is similar to
                                 </listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>BusPolicy=</varname></term>
+
+                                <listitem><para>If specified, a custom
+                                <ulink url="https://code.google.com/p/d-bus/">kdbus</ulink>
+                                endpoint will be created and installed as the
+                                default bus node for the service. Such a custom
+                                endpoint can hold an own set of policy rules
+                                that are enforced on top of the bus-wide ones.
+                                The custom endpoint is named after the service
+                                it was created for, and its node will be
+                                bind-mounted over the default bus node
+                                location, so the service can only access the
+                                bus through its own endpoint. Note that custom
+                                bus endpoints default to a 'deny all' policy.
+                                Hence, if at least one
+                                <varname>BusPolicy=</varname> directive is
+                                given, you have to make sure to add explicit
+                                rules for everything the service should be able
+                                to do.</para>
+                                <para>The value of this directive is comprised
+                                of two parts; the bus name, and a verb to
+                                specify to granted access, which is one of
+                                <option>see</option>,
+                                <option>talk</option>, or
+                                <option>own</option>.
+                                <option>talk</option> implies
+                                <option>see</option>, and <option>own</option>
+                                implies both <option>talk</option> and
+                                <option>see</option>.
+                                If multiple access levels are specified for the
+                                same bus name, the most powerful one takes
+                                effect.
+                                </para>
+                                <para>Examples:</para>
+                                <programlisting>BusPolicy=org.freedesktop.systemd1 talk</programlisting>
+                                <programlisting>BusPolicy=org.foo.bar see</programlisting>
+                                <para>This option is only available on kdbus enabled systems.</para>
+                                </listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><varname>ExecStart=</varname></term>
                                 <listitem><para>Commands with their
                                 arguments that are executed when this
-                                service is started. For each of the
-                                specified commands, the first argument
-                                must be an absolute and literal path
-                                to an executable.</para>
+                                service is started. The value is split
+                                into zero or more command lines is
+                                according to the rules described below
+                                (see section "Command Lines" below).
+                                </para>
 
                                 <para>When <varname>Type</varname> is
                                 not <option>oneshot</option>, only one
-                                command may be given. When
+                                command may and must be given. When
                                 <varname>Type=oneshot</varname> is
-                                used, more than one command may be
-                                specified. Multiple command lines may
-                                be concatenated in a single directive
-                                by separating them with semicolons
-                                (these semicolons must be passed as
-                                separate words). Alternatively, this
-                                directive may be specified more than
-                                once with the same effect.
-                                Lone semicolons may be escaped as
-                                <literal>\;</literal>. If the empty
-                                string is assigned to this option, the
-                                list of commands to start is reset,
-                                prior assignments of this option will
-                                have no effect.</para>
-
-                                <para>Each command line is split on
-                                whitespace, with the first item being
-                                the command to execute, and the
-                                subsequent items being the arguments.
-                                Double quotes ("...") and single
-                                quotes ('...') may be used, in which
-                                case everything until the next
-                                matching quote becomes part of the
-                                same argument. Quotes themselves are
-                                removed after parsing. In addition, a
-                                trailing backslash
-                                (<literal>\</literal>) may be used to
-                                merge lines. This syntax is intended
-                                to be very similar to shell syntax,
-                                but only the meta-characters and
-                                expansions described in the following
-                                paragraphs are understood.
-                                Specifically, redirection using
-                                <literal>&lt;</literal>,
-                                <literal>&lt;&lt;</literal>,
-                                <literal>&gt;</literal>, and
-                                <literal>&gt;&gt;</literal>, pipes
-                                using <literal>|</literal>, and
-                                running programs in the background
-                                using <literal>&amp;</literal>
-                                and <emphasis>other elements of shell
-                                syntax are not supported</emphasis>.
-                                </para>
+                                used, zero or more commands may be
+                                specified. This can be specified by
+                                providing multiple command lines in
+                                the same directive, or alternatively,
+                                this directive may be specified more
+                                than once with the same effect. If the
+                                empty string is assigned to this
+                                option, the list of commands to start
+                                is reset, prior assignments of this
+                                option will have no effect. If no
+                                <varname>ExecStart=</varname> is
+                                specified, then the service must have
+                                <varname>RemainAfterExit=yes</varname>
+                                set.</para>
+
+                                <para>For each of the specified
+                                commands, the first argument must be
+                                an absolute and literal path to an
+                                executable. Optionally, if the
+                                absolute file name is prefixed with
+                                <literal>@</literal>, the second token
+                                will be passed as
+                                <literal>argv[0]</literal> to the
+                                executed process, followed by the
+                                further arguments specified. If the
+                                absolute filename is prefixed with
+                                <literal>-</literal>, an exit code of
+                                the command normally considered a
+                                failure (i.e. non-zero exit status or
+                                abnormal exit due to signal) is
+                                ignored and considered success. If
+                                both <literal>-</literal> and
+                                <literal>@</literal> are used, they
+                                can appear in either order.</para>
 
                                 <para>If more than one command is
                                 specified, the commands are invoked
                                 sequentially in the order they appear
                                 in the unit file. If one of the
                                 commands fails (and is not prefixed
-                                with <literal>-</literal>), other lines
-                                are not executed, and the unit is
-                                considered failed.</para>
+                                with <literal>-</literal>), other
+                                lines are not executed, and the unit
+                                is considered failed.</para>
 
                                 <para>Unless
                                 <varname>Type=forking</varname> is
                                 command line will be considered the
                                 main process of the daemon.</para>
 
-                                <para>The command line accepts
-                                <literal>%</literal> specifiers as
-                                described in
-                                <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
-                                Note that the first argument of the
-                                command line (i.e. the program to
-                                execute) may not include
-                                specifiers.</para>
-
-                                <para>Basic environment variable
-                                substitution is supported. Use
-                                <literal>${FOO}</literal> as part of a
-                                word, or as a word of its own, on the
-                                command line, in which case it will be
-                                replaced by the value of the
-                                environment variable including all
-                                whitespace it contains, resulting in a
-                                single argument. Use
-                                <literal>$FOO</literal> as a separate
-                                word on the command line, in which
-                                case it will be replaced by the value
-                                of the environment variable split at
-                                whitespace, resulting in zero or more
-                                arguments. To pass a literal dollar
-                                sign, use <literal>$$</literal>.
-                                Variables whose value is not known at
-                                expansion time are treated as empty
-                                strings. Note that the first argument
-                                (i.e. the program to execute) may not
-                                be a variable.</para>
-
-                                <para>Variables to be used in this
-                                fashion may be defined through
-                                <varname>Environment=</varname> and
-                                <varname>EnvironmentFile=</varname>.
-                                In addition, variables listed in the
-                                section "Environment variables in
-                                spawned processes" in
-                                <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                                which are considered "static
-                                configuration", may be used (this includes
-                                e.g. <varname>$USER</varname>, but not
-                                <varname>$TERM</varname>).</para>
-
-                                <para>Optionally, if the absolute file
-                                name is prefixed with
-                                <literal>@</literal>, the second token
-                                will be passed as
-                                <literal>argv[0]</literal> to the
-                                executed process, followed by the
-                                further arguments specified. If the
-                                absolute filename is prefixed with
-                                <literal>-</literal>, an exit code of
-                                the command normally considered a
-                                failure (i.e. non-zero exit status or
-                                abnormal exit due to signal) is ignored
-                                and considered success. If both
-                                <literal>-</literal> and
-                                <literal>@</literal> are used, they
-                                can appear in either order.</para>
-
-                                <para>Note that this setting does not
-                                directly support shell command
-                                lines. If shell command lines are to
-                                be used, they need to be passed
-                                explicitly to a shell implementation
-                                of some kind. Example:</para>
-                                <programlisting>ExecStart=/bin/sh -c 'dmesg | tac'</programlisting>
-                                <para>Example:</para>
-                                <programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"</programlisting>
-                                <para>This will execute
-                                <command>/bin/echo</command> two
-                                times, each time with one argument:
-                                <literal>one</literal> and
-                                <literal>two two</literal>,
-                                respectively. Because two commands are
-                                specified,
-                                <varname>Type=oneshot</varname> must
-                                be used.</para>
-
-                                <para>Example:</para>
-                                <programlisting>ExecStart=/bin/echo / &gt;/dev/null &amp; \; \
-/bin/ls</programlisting>
-                                <para>This will execute
-                                <command>/bin/echo</command> with five
-                                arguments: <literal>/</literal>,
-                                <literal>&gt;/dev/null</literal>,
-                                <literal>&amp;</literal>,
-                                <literal>;</literal>, and
-                                <literal>/bin/ls</literal>.</para>
-
-                                <para>Example:</para>
-                                <programlisting>Environment="ONE=one" 'TWO=two two'
-ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
-                                <para>This will execute
-                                <command>/bin/echo</command> with four
-                                arguments: <literal>one</literal>,
-                                <literal>two</literal>,
-                                <literal>two</literal>, and
-                                <literal>two two</literal>.</para>
                               </listitem>
                         </varlistentry>
 
@@ -605,11 +543,12 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 time span value such as "5min
                                 20s". Pass <literal>0</literal> to
                                 disable the timeout logic. Defaults to
-                                <varname>TimeoutStartSec=</varname> from
+                                <varname>DefaultTimeoutStartSec=</varname> from
                                 the manager configuration file, except
                                 when <varname>Type=oneshot</varname> is
                                 used, in which case the timeout
-                                is disabled by default.
+                                is disabled by default
+                                (see <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
                                 </para></listitem>
                         </varlistentry>
 
@@ -628,8 +567,9 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 time span value such as "5min
                                 20s". Pass <literal>0</literal> to disable
                                 the timeout logic. Defaults to
-                                <varname>TimeoutStartSec=</varname> from the
-                                manager configuration file.
+                                <varname>DefaultTimeoutStopSec=</varname> from the
+                                manager configuration file
+                                (see <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
                                 </para></listitem>
                         </varlistentry>
 
@@ -653,8 +593,9 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 (i.e. the "keep-alive ping"). If the time
                                 between two such calls is larger than
                                 the configured time, then the service
-                                is placed in a failed state. By
-                                setting <varname>Restart=</varname> to
+                                is placed in a failed state and it will
+                                be terminated with <varname>SIGABRT</varname>.
+                                By setting <varname>Restart=</varname> to
                                 <option>on-failure</option> or
                                 <option>always</option>, the service
                                 will be automatically restarted. The
@@ -1028,21 +969,24 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 <term><varname>Sockets=</varname></term>
                                 <listitem><para>Specifies the name of
                                 the socket units this service shall
-                                inherit the sockets from when the
-                                service is started. Normally it
-                                should not be necessary to use this
-                                setting as all sockets whose unit
+                                inherit socket file descriptors
+                                from when the service is
+                                started. Normally it should not be
+                                necessary to use this setting as all
+                                socket file descriptors whose unit
                                 shares the same name as the service
-                                (ignoring the different suffix of course)
-                                are passed to the spawned
-                                process.</para>
-
-                                <para>Note that the same socket may be
-                                passed to multiple processes at the
-                                same time. Also note that a different
-                                service may be activated on incoming
-                                traffic than that which inherits the
-                                sockets. Or in other words: the
+                                (subject to the different unit name
+                                suffix of course) are passed to the
+                                spawned process.</para>
+
+                                <para>Note that the same socket file
+                                descriptors may be passed to multiple
+                                processes simultaneously. Also note
+                                that a different service may be
+                                activated on incoming socket traffic
+                                than the one which is ultimately
+                                configured to inherit the socket file
+                                descriptors. Or in other words: the
                                 <varname>Service=</varname> setting of
                                 <filename>.socket</filename> units
                                 does not have to match the inverse of
@@ -1119,29 +1063,49 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 hit. Takes one of
                                 <option>none</option>,
                                 <option>reboot</option>,
-                                <option>reboot-force</option>, or
-                                <option>reboot-immediate</option>. If
-                                <option>none</option> is set,
-                                hitting the rate limit will trigger no
-                                action besides that the start will not
-                                be permitted. <option>reboot</option>
+                                <option>reboot-force</option>,
+                                <option>reboot-immediate</option>,
+                                <option>poweroff</option>,
+                                <option>poweroff-force</option> or
+                                <option>poweroff-immediate</option>. If
+                                <option>none</option> is set, hitting
+                                the rate limit will trigger no action
+                                besides that the start will not be
+                                permitted. <option>reboot</option>
                                 causes a reboot following the normal
                                 shutdown procedure (i.e. equivalent to
                                 <command>systemctl reboot</command>).
-                                <option>reboot-force</option> causes
-                                a forced reboot which will terminate
-                                all processes forcibly but should
-                                cause no dirty file systems on reboot
+                                <option>reboot-force</option> causes a
+                                forced reboot which will terminate all
+                                processes forcibly but should cause no
+                                dirty file systems on reboot
                                 (i.e. equivalent to <command>systemctl
                                 reboot -f</command>) and
                                 <option>reboot-immediate</option>
                                 causes immediate execution of the
                                 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
                                 system call, which might result in
-                                data loss. Defaults to
+                                data loss. Similar,
+                                <option>poweroff</option>,
+                                <option>poweroff-force</option>,
+                                <option>poweroff-immediate</option>
+                                have the effect of powering down the
+                                system with similar
+                                semantics. Defaults to
                                 <option>none</option>.</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>FailureAction=</varname></term>
+                                <listitem><para>Configure the action
+                                to take when the service enters a failed
+                                state. Takes the same values as
+                                <varname>StartLimitAction=</varname>
+                                and executes the same actions.
+                                Defaults to <option>none</option>.
+                                </para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><varname>RebootArgument=</varname></term>
                                 <listitem><para>Configure the optional
@@ -1149,23 +1113,13 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                                 <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
                                 system call if
                                 <varname>StartLimitAction=</varname>
+                                or <varname>FailureAction=</varname>
                                 is a reboot action. This works just
                                 like the optional argument to
                                 <command>systemctl reboot</command>
                                 command.</para></listitem>
                         </varlistentry>
 
-                        <varlistentry>
-                                <term><varname>FailureAction=</varname></term>
-                                <listitem><para>Configure the action
-                                to take when the service enters a failed
-                                state. Takes the same values as
-                                <varname>StartLimitAction=</varname>
-                                and executes the same actions.
-                                Defaults to <option>none</option>.
-                                </para></listitem>
-                        </varlistentry>
-
                 </variablelist>
 
                 <para>Check
@@ -1210,11 +1164,138 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
                 </variablelist>
         </refsect1>
 
+        <refsect1>
+                <title>Command lines</title>
+
+                <para>This section describes command line parsing and
+                variable and specifier substitions for
+                <varname>ExecStart=</varname>,
+                <varname>ExecStartPre=</varname>,
+                <varname>ExecStartPost=</varname>,
+                <varname>ExecReload=</varname>,
+                <varname>ExecStop=</varname>, and
+                <varname>ExecStopPost=</varname> options.</para>
+
+                <para>Multiple command lines may be concatenated in a
+                single directive by separating them with semicolons
+                (these semicolons must be passed as separate words).
+                Lone semicolons may be escaped as
+                <literal>\;</literal>.</para>
+
+                <para>Each command line is split on whitespace, with
+                the first item being the command to execute, and the
+                subsequent items being the arguments.  Double quotes
+                ("...") and single quotes ('...') may be used, in
+                which case everything until the next matching quote
+                becomes part of the same argument. Quotes themselves
+                are removed after parsing. In addition, a trailing
+                backslash (<literal>\</literal>) may be used to merge
+                lines. </para>
+
+                <para>This syntax is intended to be very similar to
+                shell syntax, but only the meta-characters and
+                expansions described in the following paragraphs are
+                understood.  Specifically, redirection using
+                <literal>&lt;</literal>, <literal>&lt;&lt;</literal>,
+                <literal>&gt;</literal>, and
+                <literal>&gt;&gt;</literal>, pipes using
+                <literal>|</literal>, running programs in the
+                background using <literal>&amp;</literal>, and
+                <emphasis>other elements of shell syntax are not
+                supported</emphasis>.</para>
+
+                <para>The command line accepts <literal>%</literal>
+                specifiers as described in
+                <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+                Note that the first argument of the command line
+                (i.e. the program to execute) may not include
+                specifiers.</para>
+
+                <para>Basic environment variable substitution is
+                supported. Use <literal>${FOO}</literal> as part of a
+                word, or as a word of its own, on the command line, in
+                which case it will be replaced by the value of the
+                environment variable including all whitespace it
+                contains, resulting in a single argument. Use
+                <literal>$FOO</literal> as a separate word on the
+                command line, in which case it will be replaced by the
+                value of the environment variable split at whitespace
+                resulting in zero or more arguments. For this type of
+                expansion, quotes and respected when splitting into
+                words, and afterwards removed.</para>
+
+                <para>Example:</para>
+
+                <programlisting>Environment="ONE=one" 'TWO=two two'
+ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
+
+                <para>This will execute <command>/bin/echo</command>
+                with four arguments: <literal>one</literal>,
+                <literal>two</literal>, <literal>two</literal>, and
+                <literal>two two</literal>.</para>
+
+                <para>Example:</para>
+                <programlisting>Environment=ONE='one' "TWO='two two' too" THREE=
+ExecStart=/bin/echo ${ONE} ${TWO} ${THREE}
+ExecStart=/bin/echo $ONE $TWO $THREE</programlisting>
+                <para>This results in <filename>echo</filename> being
+                called twice, the first time with arguments
+                <literal>'one'</literal>,
+                <literal>'two two' too</literal>, <literal></literal>,
+                and the second time with arguments
+                <literal>one</literal>, <literal>two two</literal>,
+                <literal>too</literal>.
+                </para>
+
+                <para>To pass a literal dollar sign, use
+                <literal>$$</literal>. Variables whose value is not
+                known at expansion time are treated as empty
+                strings. Note that the first argument (i.e. the
+                program to execute) may not be a variable.</para>
+
+                <para>Variables to be used in this fashion may be
+                defined through <varname>Environment=</varname> and
+                <varname>EnvironmentFile=</varname>.  In addition,
+                variables listed in the section "Environment variables
+                in spawned processes" in
+                <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                which are considered "static configuration", may be
+                used (this includes e.g. <varname>$USER</varname>, but
+                not <varname>$TERM</varname>).</para>
+
+                <para>Note that shell command lines are not directly
+                supported. If shell command lines are to be used, they
+                need to be passed explicitly to a shell implementation
+                of some kind. Example:</para>
+                <programlisting>ExecStart=/bin/sh -c 'dmesg | tac'</programlisting>
+
+                <para>Example:</para>
+
+                <programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"</programlisting>
+
+                <para>This will execute <command>/bin/echo</command>
+                two times, each time with one argument:
+                <literal>one</literal> and <literal>two two</literal>,
+                respectively. Because two commands are specified,
+                <varname>Type=oneshot</varname> must be used.</para>
+
+                <para>Example:</para>
+
+                <programlisting>ExecStart=/bin/echo / &gt;/dev/null &amp; \; \
+/bin/ls</programlisting>
+
+                <para>This will execute <command>/bin/echo</command>
+                with five arguments: <literal>/</literal>,
+                <literal>&gt;/dev/null</literal>,
+                <literal>&amp;</literal>, <literal>;</literal>, and
+                <literal>/bin/ls</literal>.</para>
+        </refsect1>
+
         <refsect1>
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
index a003914da0b8fea5116361a31a9a6a17e9e89fdc..a8c23f63657567b0149dd7ccf6626c4e3fe3aa41 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.SLICE" "5" "" "systemd 215" "systemd.slice"
+.TH "SYSTEMD\&.SLICE" "5" "" "systemd 217" "systemd.slice"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index afcb1168028040204bf134b47bab428c8fdfc0a1..306952c0a48b34309283e876651a8ab3f5ffe378 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.slice"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.slice — Slice unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>slice</code></em>.slice</code></p></div><div class="refsect1"><a name="idm214176181488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.slice"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.slice — Slice unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>slice</code></em>.slice</code></p></div><div class="refsect1"><a name="idm214173301488"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
     "<code class="literal">.slice</code>" encodes information about a slice which
     is a concept for hierarchically managing resources of a group of
     processes. This management is performed by creating a node in the
@@ -61,7 +61,7 @@
     that slice units are removed prior to system
     shutdown. Only slice units involved with early boot or
     late system shutdown should disable this option.
-    </p></div><div class="refsect1"><a name="idm214172331440"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+    </p></div><div class="refsect1"><a name="idm214177236832"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
       <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
       <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
index 1973bc96920491829aaeca7195dba5b65a42d0d9..cd38d36ac847add262f7f5dc6209d00a22dbd766 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.SNAPSHOT" "5" "" "systemd 215" "systemd.snapshot"
+.TH "SYSTEMD\&.SNAPSHOT" "5" "" "systemd 217" "systemd.snapshot"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -33,12 +33,12 @@ refers to a dynamic snapshot of the systemd runtime state\&.
 Snapshots are not configured on disk but created dynamically via
 \fBsystemctl snapshot\fR
 (see
-\fBsystemctl\fR(8)
+\fBsystemctl\fR(1)
 for details) or an equivalent command\&. When created, they will automatically get dependencies on the currently activated units\&. They act as saved runtime state of the systemd manager\&. Later on, the user may choose to return to the saved state via
 \fBsystemctl isolate\fR\&. They are useful to roll back to a defined state after temporarily starting/stopping services or similar\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.directives\fR(7)
index 521cda4801ec295c00db2510502e7bce1e5f1678..fe45e4c9134d545c4a576f75b16b984f2c25aedf 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.snapshot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.snapshot — Snapshot unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>snapshot</code></em>.snapshot</code></p></div><div class="refsect1"><a name="idm214193697152"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Snapshot units are not configured via unit
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.snapshot"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.snapshot — Snapshot unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>snapshot</code></em>.snapshot</code></p></div><div class="refsect1"><a name="idm214186248400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Snapshot units are not configured via unit
                 configuration files. Nonetheless they are named
                 similar to filenames. A unit whose name ends in
                 "<code class="literal">.snapshot</code>" refers to a dynamic
                 snapshot of the systemd runtime state.</p><p>Snapshots are not configured on disk but created
                 dynamically via <span class="command"><strong>systemctl snapshot</strong></span>
                 (see
-                <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>
+                <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
                 for details) or an equivalent command. When created,
                 they will automatically get dependencies on the
                 currently activated units. They act as saved
@@ -35,9 +35,9 @@
                 <span class="command"><strong>systemctl isolate</strong></span>. They are
                 useful to roll back to a defined state after
                 temporarily starting/stopping services or
-                similar.</p></div><div class="refsect1"><a name="idm214193691984"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                similar.</p></div><div class="refsect1"><a name="idm214186243232"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
                   </p></div></div></body></html>
index 1bb074a9b1168f8b2be82432f4fb1826d6c34647..f08e38e07e7047124daf90d5674f4d1aca7a1174 100644 (file)
@@ -63,7 +63,7 @@
                 <para>Snapshots are not configured on disk but created
                 dynamically via <command>systemctl snapshot</command>
                 (see
-                <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 for details) or an equivalent command. When created,
                 they will automatically get dependencies on the
                 currently activated units. They act as saved
@@ -79,7 +79,7 @@
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                   </para>
index ab4e5d4c44d1649c9243aa3b8c115463ad4f6e41..6ebf92fe10a83fc6cef383dddc582a5beda27896 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.SOCKET" "5" "" "systemd 215" "systemd.socket"
+.TH "SYSTEMD\&.SOCKET" "5" "" "systemd 217" "systemd.socket"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -278,6 +278,41 @@ for details\&.) Defaults to
 \fBfalse\fR\&.
 .RE
 .PP
+\fIKeepAliveTimeSec=\fR
+.RS 4
+Takes time (in seconds) as argument \&. The connection needs to remain idle before TCP starts sending keepalive probes\&. This controls the TCP_KEEPIDLE socket option (see
+\fBsocket\fR(7)
+and the
+\m[blue]\fBTCP Keepalive HOWTO\fR\m[]\&\s-2\u[1]\d\s+2
+for details\&.) Defaults value is 7200 seconds (2 hours)\&.
+.RE
+.PP
+\fIKeepAliveIntervalSec=\fR
+.RS 4
+Takes time (in seconds) as argument between individual keepalive probes, if the socket option SO_KEEPALIVE has been set on this socket seconds as argument\&. This controls the TCP_KEEPINTVL socket option (see
+\fBsocket\fR(7)
+and the
+\m[blue]\fBTCP Keepalive HOWTO\fR\m[]\&\s-2\u[1]\d\s+2
+for details\&.) Defaults value is 75 seconds\&.
+.RE
+.PP
+\fIKeepAliveProbes=\fR
+.RS 4
+Takes integer as argument\&. It\*(Aqs the number of unacknowledged probes to send before considering the connection dead and notifying the application layer\&. This controls the TCP_KEEPCNT socket option (see
+\fBsocket\fR(7)
+and the
+\m[blue]\fBTCP Keepalive HOWTO\fR\m[]\&\s-2\u[1]\d\s+2
+for details\&.) Defaults value is 9\&.
+.RE
+.PP
+\fINoDelay=\fR
+.RS 4
+Takes a boolean argument\&. TCP Nagle\*(Aqs algorithm works by combining a number of small outgoing messages, and sending them all at once\&. This controls the TCP_NODELAY socket option (see
+\fBtcp\fR(7)
+Defaults to
+\fBfalse\fR\&.
+.RE
+.PP
 \fIPriority=\fR
 .RS 4
 Takes an integer argument controlling the priority for all traffic sent from this socket\&. This controls the SO_PRIORITY socket option (see
@@ -285,6 +320,20 @@ Takes an integer argument controlling the priority for all traffic sent from thi
 for details\&.)\&.
 .RE
 .PP
+\fIDeferAcceptSec=\fR
+.RS 4
+Takes time (in seconds) as argument\&. If set, the listening process will be awakened only when data arrives on the socket, and not immediately when connection is established\&. When this option is set, the
+\fBTCP_DEFER_ACCEPT\fR
+socket option will be used (see
+\fBtcp\fR(7)), and the kernel will ignore initial ACK packets without any data\&. The argument specifies the approximate amount of time the kernel should wait for incoming data before falling back to the normal behaviour of honouring empty ACK packets\&. This option is beneficial for protocols where the client sends the data first (e\&.g\&. HTTP, in contrast to SMTP), because the server process will not be woken up unnecessarily before it can take any action\&.
+.sp
+If the client also uses the
+\fBTCP_DEFER_ACCEPT\fR
+option, the latency of the initial connection may be reduced, because the kernel will send data in the final packet establishing the connection (the third packet in the "three\-way handshake")\&.
+.sp
+Disabled by default\&.
+.RE
+.PP
 \fIReceiveBuffer=\fR, \fISendBuffer=\fR
 .RS 4
 Takes an integer argument controlling the receive or send buffer sizes of this socket, respectively\&. This controls the SO_RCVBUF and SO_SNDBUF socket options (see
@@ -340,6 +389,17 @@ and
 for details\&.
 .RE
 .PP
+\fISELinuxContextFromNet=\fR
+.RS 4
+Takes a boolean argument\&. When true, systemd will attempt to figure out the SELinux label used for the instantiated service from the information handed by the peer over the network\&. Note that only the security level is used from the information provided by the peer\&. Other parts of the resulting SELinux context originate from either the target binary that is effectively triggered by socket unit or from the value of the
+\fISELinuxContext=\fR
+option\&. This configuration option only affects sockets with
+\fIAccept=\fR
+mode set to
+"true"\&. Also note that this option is useful only when MLS/MCS SELinux policy is deployed\&. Defaults to
+"false"\&.
+.RE
+.PP
 \fIPipeSize=\fR
 .RS 4
 Takes a size in bytes\&. Controls the pipe buffer size of FIFOs configured in this socket unit\&. See
@@ -415,14 +475,17 @@ Configures the time to wait for the commands specified in
 \fIExecStopPre=\fR
 and
 \fIExecStopPost=\fR
-to finish\&. If a command does not exit within the configured time, the socket will be considered failed and be shut down again\&. All commands still running, will be terminated forcibly via
+to finish\&. If a command does not exit within the configured time, the socket will be considered failed and be shut down again\&. All commands still running will be terminated forcibly via
 \fBSIGTERM\fR, and after another delay of this time with
 \fBSIGKILL\fR\&. (See
 \fBKillMode=\fR
 in
-\fBsystemd.kill\fR(5)\&.) Takes a unit\-less value in seconds, or a time span value such as "5min 20s"\&. Pass 0 to disable the timeout logic\&. Defaults to
-\fITimeoutStartSec=\fR
-from the manager configuration file\&.
+\fBsystemd.kill\fR(5)\&.) Takes a unit\-less value in seconds, or a time span value such as "5min 20s"\&. Pass
+"0"
+to disable the timeout logic\&. Defaults to
+\fIDefaultTimeoutStartSec=\fR
+from the manager configuration file (see
+\fBsystemd-system.conf\fR(5))\&.
 .RE
 .PP
 \fIService=\fR
@@ -450,7 +513,7 @@ for more settings\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.exec\fR(5),
 \fBsystemd.kill\fR(5),
index 092ebb5612203bfbe3715824e4c42027b588c49b..624c41c46914e8fb5052b28357d9417444855fde 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.socket"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.socket — Socket unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code></p></div><div class="refsect1"><a name="idm214183103728"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.socket"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.socket — Socket unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code></p></div><div class="refsect1"><a name="idm214175910640"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.socket</code>" encodes information about
                 an IPC or network socket or a file system FIFO
                 controlled and supervised by systemd, for socket-based
@@ -97,7 +97,7 @@
                 <a href="inetd.html"><span class="citerefentry"><span class="refentrytitle">inetd</span>(8)</span></a>-style
                 socket passing (i.e. sockets passed in via standard input and
                 output, using <code class="varname">StandardInput=socket</code>
-                in the service file).</p></div><div class="refsect1"><a name="idm214183195712"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Socket files must include a [Socket] section,
+                in the service file).</p></div><div class="refsect1"><a name="idm214179835824"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Socket files must include a [Socket] section,
                 which carries information about the socket or FIFO it
                 supervises. A number of options that may be used in
                 this section are shared with other unit types. These
                                 replaced with a
                                 <code class="constant">NUL</code> character
                                 before binding. For details, see
-                                <a href="unix.html"><span class="citerefentry"><span class="refentrytitle">unix</span>(7)</span></a>.</p><p>If the address string is a
+                                <a href="http://man7.org/linux/man-pages/man7/unix.7.html"><span class="citerefentry"><span class="refentrytitle">unix</span>(7)</span></a>.</p><p>If the address string is a
                                 single number, it is read as port
                                 number to listen on via
                                 IPv6. Depending on the value of
                                 been accepted yet. This setting
                                 matters only for stream and sequential
                                 packet sockets. See
-                                <a href="listen.html"><span class="citerefentry"><span class="refentrytitle">listen</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/listen.2.html"><span class="citerefentry"><span class="refentrytitle">listen</span>(2)</span></a>
                                 for details. Defaults to SOMAXCONN
                                 (128).</p></dd><dt id="BindToDevice="><span class="term"><code class="varname">BindToDevice=</code></span><a class="headerlink" title="Permalink to this term" href="#BindToDevice=">¶</a></dt><dd><p>Specifies a network
                                 interface name to bind this socket
                                 <code class="option">Accept=false</code>. A
                                 daemon listening on an <code class="constant">AF_UNIX</code> socket
                                 may, but does not need to, call
-                                <a href="close.html"><span class="citerefentry"><span class="refentrytitle">close</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/close.2.html"><span class="citerefentry"><span class="refentrytitle">close</span>(2)</span></a>
                                 on the received socket before
                                 exiting. However, it must not unlink
                                 the socket from a file system. It
                                 should not invoke
-                                <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/shutdown.2.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(2)</span></a>
                                 on sockets it got with
                                 <code class="varname">Accept=false</code>, but
                                 it may do so for sockets it got with
                                 and the <a class="ulink" href="http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/" target="_top">TCP
                                 Keepalive HOWTO</a> for details.)
                                 Defaults to
+                                <code class="option">false</code>.</p></dd><dt id="KeepAliveTimeSec="><span class="term"><code class="varname">KeepAliveTimeSec=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAliveTimeSec=">¶</a></dt><dd><p>Takes time (in seconds) as argument . The connection needs to remain
+                                idle before TCP starts sending keepalive probes. This controls the TCP_KEEPIDLE
+                                socket option (see
+                                <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
+                                and the <a class="ulink" href="http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/" target="_top">TCP
+                                Keepalive HOWTO</a> for details.)
+                                Defaults value is 7200 seconds (2 hours).</p></dd><dt id="KeepAliveIntervalSec="><span class="term"><code class="varname">KeepAliveIntervalSec=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAliveIntervalSec=">¶</a></dt><dd><p>Takes time (in seconds) as argument between individual keepalive probes,
+                                if the socket option SO_KEEPALIVE has  been set on this socket seconds as argument.
+                                This controls the TCP_KEEPINTVL socket option (see
+                                <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
+                                and the <a class="ulink" href="http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/" target="_top">TCP
+                                Keepalive HOWTO</a> for details.)
+                                Defaults value is 75 seconds.</p></dd><dt id="KeepAliveProbes="><span class="term"><code class="varname">KeepAliveProbes=</code></span><a class="headerlink" title="Permalink to this term" href="#KeepAliveProbes=">¶</a></dt><dd><p>Takes integer as argument. It's the number of unacknowledged probes to
+                                send before considering the connection dead and notifying the application layer.
+                                This controls the TCP_KEEPCNT socket option (see
+                                <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
+                                and the <a class="ulink" href="http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/" target="_top">TCP
+                                Keepalive HOWTO</a> for details.)
+                                Defaults value is 9.</p></dd><dt id="NoDelay="><span class="term"><code class="varname">NoDelay=</code></span><a class="headerlink" title="Permalink to this term" href="#NoDelay=">¶</a></dt><dd><p>Takes a boolean
+                                argument. TCP Nagle's algorithm works by combining a number of
+                                small outgoing messages, and sending them all at once.
+                                This controls the TCP_NODELAY socket option (see
+                                <a href="tcp.html"><span class="citerefentry"><span class="refentrytitle">tcp</span>(7)</span></a>
+                                Defaults to
                                 <code class="option">false</code>.</p></dd><dt id="Priority="><span class="term"><code class="varname">Priority=</code></span><a class="headerlink" title="Permalink to this term" href="#Priority=">¶</a></dt><dd><p>Takes an integer
                                 argument controlling the priority for
                                 all traffic sent from this
                                 socket. This controls the SO_PRIORITY
                                 socket option (see
                                 <a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
-                                for details.).</p></dd><dt id="ReceiveBuffer="><span class="term"><code class="varname">ReceiveBuffer=</code>, </span><span class="term"><code class="varname">SendBuffer=</code></span><a class="headerlink" title="Permalink to this term" href="#ReceiveBuffer=">¶</a></dt><dd><p>Takes an integer
+                                for details.).</p></dd><dt id="DeferAcceptSec="><span class="term"><code class="varname">DeferAcceptSec=</code></span><a class="headerlink" title="Permalink to this term" href="#DeferAcceptSec=">¶</a></dt><dd><p>Takes time (in
+                                seconds) as argument. If set, the
+                                listening process will be awakened
+                                only when data arrives on the socket,
+                                and not immediately when connection is
+                                established. When this option is set,
+                                the
+                                <code class="constant">TCP_DEFER_ACCEPT</code>
+                                socket option will be used (see
+                                <a href="tcp.html"><span class="citerefentry"><span class="refentrytitle">tcp</span>(7)</span></a>),
+                                and the kernel will ignore initial ACK
+                                packets without any data. The argument
+                                specifies the approximate amount of
+                                time the kernel should wait for
+                                incoming data before falling back to
+                                the normal behaviour of honouring
+                                empty ACK packets. This option is
+                                beneficial for protocols where the
+                                client sends the data first (e.g.
+                                HTTP, in contrast to SMTP), because
+                                the server process will not be woken
+                                up unnecessarily before it can take
+                                any action.
+                                </p><p>If the client also uses the
+                                <code class="constant">TCP_DEFER_ACCEPT</code>
+                                option, the latency of the initial
+                                connection may be reduced, because the
+                                kernel will send data in the final
+                                packet establishing the connection
+                                (the third packet in the "three-way
+                                handshake").</p><p>Disabled by default.</p></dd><dt id="ReceiveBuffer="><span class="term"><code class="varname">ReceiveBuffer=</code>, </span><span class="term"><code class="varname">SendBuffer=</code></span><a class="headerlink" title="Permalink to this term" href="#ReceiveBuffer=">¶</a></dt><dd><p>Takes an integer
                                 argument controlling the receive or
                                 send buffer sizes of this socket,
                                 respectively. This controls the
                                 sets the SO_MARK socket option. See
                                 <a href="iptables.html"><span class="citerefentry"><span class="refentrytitle">iptables</span>(8)</span></a>
                                 for details.</p></dd><dt id="ReusePort="><span class="term"><code class="varname">ReusePort=</code></span><a class="headerlink" title="Permalink to this term" href="#ReusePort=">¶</a></dt><dd><p>Takes a boolean
-                                value. If true, allows multiple <a href="bind.html"><span class="citerefentry"><span class="refentrytitle">bind</span>(2)</span></a>s
+                                value. If true, allows multiple <a href="http://man7.org/linux/man-pages/man2/bind.2.html"><span class="citerefentry"><span class="refentrytitle">bind</span>(2)</span></a>s
                                 to this TCP or UDP port.  This
                                 controls the SO_REUSEPORT socket
                                 option.  See
                                 the incoming or outgoing connections
                                 of the socket, respectively. See
                                 <a class="ulink" href="https://www.kernel.org/doc/Documentation/security/Smack.txt" target="_top">Smack.txt</a>
-                                for details.</p></dd><dt id="PipeSize="><span class="term"><code class="varname">PipeSize=</code></span><a class="headerlink" title="Permalink to this term" href="#PipeSize=">¶</a></dt><dd><p>Takes a size in
+                                for details.</p></dd><dt id="SELinuxContextFromNet="><span class="term"><code class="varname">SELinuxContextFromNet=</code></span><a class="headerlink" title="Permalink to this term" href="#SELinuxContextFromNet=">¶</a></dt><dd><p>Takes a boolean
+                                 argument. When true, systemd will attempt
+                                 to figure out the SELinux label used
+                                 for the instantiated service from the
+                                 information handed by the peer over the
+                                 network. Note that only the security
+                                 level is used from the information
+                                 provided by the peer. Other parts of
+                                 the resulting SELinux context originate
+                                 from either the target binary that is
+                                 effectively triggered by socket unit
+                                 or from the value of the
+                                 <code class="varname">SELinuxContext=</code>
+                                 option. This configuration option only
+                                 affects sockets with
+                                 <code class="varname">Accept=</code> mode set to
+                                 "<code class="literal">true</code>". Also note that
+                                 this option is useful only when
+                                 MLS/MCS SELinux policy is
+                                 deployed. Defaults to
+                                 "<code class="literal">false</code>".
+                                 </p></dd><dt id="PipeSize="><span class="term"><code class="varname">PipeSize=</code></span><a class="headerlink" title="Permalink to this term" href="#PipeSize=">¶</a></dt><dd><p>Takes a size in
                                 bytes. Controls the pipe buffer size
                                 of FIFOs configured in this socket
                                 unit. See
-                                <a href="fcntl.html"><span class="citerefentry"><span class="refentrytitle">fcntl</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/fcntl.2.html"><span class="citerefentry"><span class="refentrytitle">fcntl</span>(2)</span></a>
                                 for details. The usual suffixes K, M,
                                 G are supported and are understood to
                                 the base of 1024.</p></dd><dt id="MessageQueueMaxMessages=,
                                 finish. If a command does not exit
                                 within the configured time, the socket
                                 will be considered failed and be shut
-                                down again. All commands still running,
+                                down again. All commands still running
                                 will be terminated forcibly via
                                 <code class="constant">SIGTERM</code>, and after another delay of
                                 this time with <code class="constant">SIGKILL</code>. (See
                                 <code class="option">KillMode=</code> in <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>.)
                                 Takes a unit-less value in seconds, or
                                 a time span value such as "5min
-                                20s". Pass 0 to disable the timeout
-                                logic. Defaults to <code class="varname">TimeoutStartSec=</code> from the
-                                manager configuration file.</p></dd><dt id="Service="><span class="term"><code class="varname">Service=</code></span><a class="headerlink" title="Permalink to this term" href="#Service=">¶</a></dt><dd><p>Specifies the service
+                                20s". Pass "<code class="literal">0</code>" to disable the timeout
+                                logic. Defaults to <code class="varname">DefaultTimeoutStartSec=</code> from the
+                                manager configuration file
+                                (see <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>).
+                                </p></dd><dt id="Service="><span class="term"><code class="varname">Service=</code></span><a class="headerlink" title="Permalink to this term" href="#Service=">¶</a></dt><dd><p>Specifies the service
                                 unit name to activate on incoming
                                 traffic. This setting is only allowed
                                 for sockets with
                 <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>
                 and
                 <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>
-                for more settings.</p></div><div class="refsect1"><a name="idm214178079200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                for more settings.</p></div><div class="refsect1"><a name="idm214174704688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                           <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>,
index aeeb97fccdccaa0063aaa6445af8f315ef796943..57f769f23a177b66a87be63d8623ee807a2ba276 100644 (file)
                                 replaced with a
                                 <constant>NUL</constant> character
                                 before binding. For details, see
-                                <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
+                                <citerefentry project='man-pages'><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
 
                                 <para>If the address string is a
                                 single number, it is read as port
                                 <option>false</option>.</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>KeepAliveTimeSec=</varname></term>
+                                <listitem><para>Takes time (in seconds) as argument . The connection needs to remain
+                                idle before TCP starts sending keepalive probes. This controls the TCP_KEEPIDLE
+                                socket option (see
+                                <citerefentry><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                and the <ulink
+                                url="http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/">TCP
+                                Keepalive HOWTO</ulink> for details.)
+                                Defaults value is 7200 seconds (2 hours).</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><varname>KeepAliveIntervalSec=</varname></term>
+                                <listitem><para>Takes time (in seconds) as argument between individual keepalive probes,
+                                if the socket option SO_KEEPALIVE has  been set on this socket seconds as argument.
+                                This controls the TCP_KEEPINTVL socket option (see
+                                <citerefentry><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                and the <ulink
+                                url="http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/">TCP
+                                Keepalive HOWTO</ulink> for details.)
+                                Defaults value is 75 seconds.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><varname>KeepAliveProbes=</varname></term>
+                                <listitem><para>Takes integer as argument. It's the number of unacknowledged probes to
+                                send before considering the connection dead and notifying the application layer.
+                                This controls the TCP_KEEPCNT socket option (see
+                                <citerefentry><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                and the <ulink
+                                url="http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/">TCP
+                                Keepalive HOWTO</ulink> for details.)
+                                Defaults value is 9.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><varname>NoDelay=</varname></term>
+                                <listitem><para>Takes a boolean
+                                argument. TCP Nagle's algorithm works by combining a number of
+                                small outgoing messages, and sending them all at once.
+                                This controls the TCP_NODELAY socket option (see
+                                <citerefentry><refentrytitle>tcp</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                Defaults to
+                                <option>false</option>.</para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><varname>Priority=</varname></term>
                                 <listitem><para>Takes an integer
                                 for details.).</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>DeferAcceptSec=</varname></term>
+
+                                <listitem><para>Takes time (in
+                                seconds) as argument. If set, the
+                                listening process will be awakened
+                                only when data arrives on the socket,
+                                and not immediately when connection is
+                                established. When this option is set,
+                                the
+                                <constant>TCP_DEFER_ACCEPT</constant>
+                                socket option will be used (see
+                                <citerefentry><refentrytitle>tcp</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
+                                and the kernel will ignore initial ACK
+                                packets without any data. The argument
+                                specifies the approximate amount of
+                                time the kernel should wait for
+                                incoming data before falling back to
+                                the normal behaviour of honouring
+                                empty ACK packets. This option is
+                                beneficial for protocols where the
+                                client sends the data first (e.g.
+                                HTTP, in contrast to SMTP), because
+                                the server process will not be woken
+                                up unnecessarily before it can take
+                                any action.
+                                </para>
+
+                                <para>If the client also uses the
+                                <constant>TCP_DEFER_ACCEPT</constant>
+                                option, the latency of the initial
+                                connection may be reduced, because the
+                                kernel will send data in the final
+                                packet establishing the connection
+                                (the third packet in the "three-way
+                                handshake").</para>
+
+                                <para>Disabled by default.</para>
+                                </listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><varname>ReceiveBuffer=</varname></term>
                                 <term><varname>SendBuffer=</varname></term>
                                 for details.</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                          <term><varname>SELinuxContextFromNet=</varname></term>
+                                 <listitem><para>Takes a boolean
+                                 argument. When true, systemd will attempt
+                                 to figure out the SELinux label used
+                                 for the instantiated service from the
+                                 information handed by the peer over the
+                                 network. Note that only the security
+                                 level is used from the information
+                                 provided by the peer. Other parts of
+                                 the resulting SELinux context originate
+                                 from either the target binary that is
+                                 effectively triggered by socket unit
+                                 or from the value of the
+                                 <varname>SELinuxContext=</varname>
+                                 option. This configuration option only
+                                 affects sockets with
+                                 <varname>Accept=</varname> mode set to
+                                 <literal>true</literal>. Also note that
+                                 this option is useful only when
+                                 MLS/MCS SELinux policy is
+                                 deployed. Defaults to
+                                 <literal>false</literal>.
+                                 </para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><varname>PipeSize=</varname></term>
                                 <listitem><para>Takes a size in
                                 finish. If a command does not exit
                                 within the configured time, the socket
                                 will be considered failed and be shut
-                                down again. All commands still running,
+                                down again. All commands still running
                                 will be terminated forcibly via
                                 <constant>SIGTERM</constant>, and after another delay of
                                 this time with <constant>SIGKILL</constant>. (See
                                 <option>KillMode=</option> in <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.)
                                 Takes a unit-less value in seconds, or
                                 a time span value such as "5min
-                                20s". Pass 0 to disable the timeout
-                                logic. Defaults to <varname>TimeoutStartSec=</varname> from the
-                                manager configuration file.</para></listitem>
+                                20s". Pass <literal>0</literal> to disable the timeout
+                                logic. Defaults to <varname>DefaultTimeoutStartSec=</varname> from the
+                                manager configuration file
+                                (see <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+                                </para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
index a417f38d78fe2a1c45b9bca2e344c401227bcb14..1732d9996ec3910feb2b810665755b74f435efda 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.SPECIAL" "7" "" "systemd 215" "systemd.special"
+.TH "SYSTEMD\&.SPECIAL" "7" "" "systemd 217" "systemd.special"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 1627fc638b561e4488a61f5e82e1850107899766..af69f1b9be7043667c208ce4828500167039144b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.special"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.special — Special systemd units</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">basic.target</code>,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.special"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.special — Special systemd units</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">basic.target</code>,
                 <code class="filename">bluetooth.target</code>,
                 <code class="filename">ctrl-alt-del.target</code>,
                 <code class="filename">cryptsetup.target</code>,
@@ -77,9 +77,9 @@
                 <code class="filename">-.slice</code>,
                 <code class="filename">system.slice</code>,
                 <code class="filename">user.slice</code>,
-                <code class="filename">machine.slice</code></p></div><div class="refsect1"><a name="idm214177962192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A few units are treated specially by
+                <code class="filename">machine.slice</code></p></div><div class="refsect1"><a name="idm214170466816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A few units are treated specially by
                 systemd. They have special internal semantics and
-                cannot be renamed.</p></div><div class="refsect1"><a name="idm214177960848"></a><h2 id="Special System Units">Special System Units<a class="headerlink" title="Permalink to this headline" href="#Special%20System%20Units">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="basic.target"><span class="term"><code class="filename">basic.target</code></span><a class="headerlink" title="Permalink to this term" href="#basic.target">¶</a></dt><dd><p>A special target unit
+                cannot be renamed.</p></div><div class="refsect1"><a name="idm214170465472"></a><h2 id="Special System Units">Special System Units<a class="headerlink" title="Permalink to this headline" href="#Special%20System%20Units">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="basic.target"><span class="term"><code class="filename">basic.target</code></span><a class="headerlink" title="Permalink to this term" href="#basic.target">¶</a></dt><dd><p>A special target unit
                                         covering basic boot-up.</p><p>systemd automatically
                                         adds dependencies of the types
                                         <code class="varname">Requires=</code>
                                         their mount unit, which is
                                         implicitly done when
                                         <code class="varname">DefaultDependencies=yes</code>
-                                        is set (the default).</p></dd></dl></div></div><div class="refsect1"><a name="idm214172840096"></a><h2 id="Special System Units for Devices">Special System Units for Devices<a class="headerlink" title="Permalink to this headline" href="#Special%20System%20Units%20for%20Devices">¶</a></h2><p>Some target units are automatically pulled in as
+                                        is set (the default).</p></dd></dl></div></div><div class="refsect1"><a name="idm214165347792"></a><h2 id="Special System Units for Devices">Special System Units for Devices<a class="headerlink" title="Permalink to this headline" href="#Special%20System%20Units%20for%20Devices">¶</a></h2><p>Some target units are automatically pulled in as
                 devices of certain kinds show up in the system. These
                 may be used to automatically activate various services
                 based on the specific type of the available
                                         boot.</p><p>This may be used to pull
                                         in audio management daemons
                                         dynamically when audio
-                                        hardware is found.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172826944"></a><h2 id="Special Passive System Units ">Special Passive System Units <a class="headerlink" title="Permalink to this headline" href="#Special%20Passive%20System%20Units%20">¶</a></h2><p>A number of special system targets are defined
+                                        hardware is found.</p></dd></dl></div></div><div class="refsect1"><a name="idm214165334640"></a><h2 id="Special Passive System Units ">Special Passive System Units <a class="headerlink" title="Permalink to this headline" href="#Special%20Passive%20System%20Units%20">¶</a></h2><p>A number of special system targets are defined
                 that can be used to properly order boot-up of optional
                 services. These targets are generally not part of the
                 initial boot transaction, unless they are explicitly
                                         init script service units with
                                         an LSB header referring to the
                                         "<code class="literal">$time</code>"
-                                        facility. </p></dd></dl></div></div><div class="refsect1"><a name="idm214172785472"></a><h2 id="Special User Units">Special User Units<a class="headerlink" title="Permalink to this headline" href="#Special%20User%20Units">¶</a></h2><p>When systemd runs as a user instance, the
+                                        facility. </p></dd></dl></div></div><div class="refsect1"><a name="idm214165293328"></a><h2 id="Special User Units">Special User Units<a class="headerlink" title="Permalink to this headline" href="#Special%20User%20Units">¶</a></h2><p>When systemd runs as a user instance, the
                 following special units are available, which have
                 similar definitions as their system counterparts:
                 <code class="filename">default.target</code>,
                                         which in turn should be
                                         conflicted by all units that
                                         want to be shut down on
-                                        user service manager exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172772576"></a><h2 id="Special Slice Units">Special Slice Units<a class="headerlink" title="Permalink to this headline" href="#Special%20Slice%20Units">¶</a></h2><p>There are four "<code class="literal">.slice</code>" units
+                                        user service manager exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214165280512"></a><h2 id="Special Slice Units">Special Slice Units<a class="headerlink" title="Permalink to this headline" href="#Special%20Slice%20Units">¶</a></h2><p>There are four "<code class="literal">.slice</code>" units
                 which form the basis of the hierarchy for assignment
                 of resources for services, users, and virtual machines
                 or containers.</p><div class="variablelist"><dl class="variablelist"><dt id="-.slice"><span class="term"><code class="filename">-.slice</code></span><a class="headerlink" title="Permalink to this term" href="#-.slice">¶</a></dt><dd><p>The root slice is the
                                         registered with
                                         <span class="command"><strong>systemd-machined</strong></span>
                                         are found in this slice.
-                                        </p></dd></dl></div></div><div class="refsect1"><a name="idm214172760096"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                        </p></dd></dl></div></div><div class="refsect1"><a name="idm214165268032"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                           <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
                           <a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>,
                           <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
-                          <a href="bootup.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>,
+                          <a href="http://man7.org/linux/man-pages/man7/bootup.7.html"><span class="citerefentry"><span class="refentrytitle">bootup</span>(7)</span></a>,
                           <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>
                   </p></div></div></body></html>
index f84639e2b4829d0ed6805289ecd47f7a30f10cd9..863d7f35d924b8c383c3ef59de63021b554c77fd 100644 (file)
                           <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                          <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                   </para>
         </refsect1>
index c49289a24405661b4bb0a85e26e4cf35e48f6219..2ab9145e06b66d18a6a1df10236c46d47f87fe59 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.SWAP" "5" "" "systemd 215" "systemd.swap"
+.TH "SYSTEMD\&.SWAP" "5" "" "systemd 217" "systemd.swap"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -99,6 +99,13 @@ for more information\&.) This option is mandatory\&.
 Swap priority to use when activating the swap device or file\&. This takes an integer\&. This setting is optional\&.
 .RE
 .PP
+\fIOptions=\fR
+.RS 4
+May contain an option string for the swap device\&. This may be used for controlling discard options among other functionality, if the swap backing device supports the discard or trim operation\&. (See
+\fBswapon\fR(8)
+for more information\&.)
+.RE
+.PP
 \fITimeoutSec=\fR
 .RS 4
 Configures the time to wait for the swapon command to finish\&. If a command does not exit within the configured time, the swap will be considered failed and be shut down again\&. All commands still running will be terminated forcibly via
@@ -106,9 +113,12 @@ Configures the time to wait for the swapon command to finish\&. If a command doe
 \fBSIGKILL\fR\&. (See
 \fBKillMode=\fR
 in
-\fBsystemd.kill\fR(5)\&.) Takes a unit\-less value in seconds, or a time span value such as "5min 20s"\&. Pass 0 to disable the timeout logic\&. Defaults to
-\fITimeoutStartSec=\fR
-from the manager configuration file\&.
+\fBsystemd.kill\fR(5)\&.) Takes a unit\-less value in seconds, or a time span value such as "5min 20s"\&. Pass
+"0"
+to disable the timeout logic\&. Defaults to
+\fIDefaultTimeoutStartSec=\fR
+from the manager configuration file (see
+\fBsystemd-system.conf\fR(5))\&.
 .RE
 .PP
 Check
@@ -119,7 +129,7 @@ for more settings\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.exec\fR(5),
 \fBsystemd.kill\fR(5),
index 383d1a31aef306ff27f6c7335abd9ae0609a2f03..a4f282427530e06eac6efc651d47f010121ba37d 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.swap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.swap — Swap unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code></p></div><div class="refsect1"><a name="idm214170852608"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.swap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.swap — Swap unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code></p></div><div class="refsect1"><a name="idm214167710448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.swap</code>" encodes information about a
                 swap device or file for memory paging controlled and
                 supervised by systemd.</p><p>This man page lists the configuration options
@@ -51,7 +51,7 @@
                 <code class="varname">DefaultDependencies=</code> enabled
                 implicitly acquire a conflicting dependency to
                 <code class="filename">umount.target</code> so that they are
-                deactivated at shutdown.</p></div><div class="refsect1"><a name="idm214167005072"></a><h2 id="fstab"><code class="filename">fstab</code><a class="headerlink" title="Permalink to this headline" href="#fstab">¶</a></h2><p>Swap units may either be configured via unit
+                deactivated at shutdown.</p></div><div class="refsect1"><a name="idm214167697520"></a><h2 id="fstab"><code class="filename">fstab</code><a class="headerlink" title="Permalink to this headline" href="#fstab">¶</a></h2><p>Swap units may either be configured via unit
                 files, or via <code class="filename">/etc/fstab</code> (see
                 <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>
                 for details). Swaps listed in
@@ -67,7 +67,7 @@
                 <code class="filename">/etc/fstab</code> are also added as
                 requirements to <code class="filename">swap.target</code>, so
                 that they are waited for and activated during
-                boot.</p></div><div class="refsect1"><a name="idm214170949104"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Swap files must include a [Swap] section, which
+                boot.</p></div><div class="refsect1"><a name="idm214171640160"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Swap files must include a [Swap] section, which
                 carries information about the swap device it
                 supervises. A number of options that may be used in
                 this section are shared with other unit types. These
                                 mandatory.</p></dd><dt id="Priority="><span class="term"><code class="varname">Priority=</code></span><a class="headerlink" title="Permalink to this term" href="#Priority=">¶</a></dt><dd><p>Swap priority to use
                                 when activating the swap device or
                                 file. This takes an integer. This
-                                setting is optional.</p></dd><dt id="TimeoutSec="><span class="term"><code class="varname">TimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutSec=">¶</a></dt><dd><p>Configures the time to
+                                setting is optional.</p></dd><dt id="Options="><span class="term"><code class="varname">Options=</code></span><a class="headerlink" title="Permalink to this term" href="#Options=">¶</a></dt><dd><p>May contain an option
+                                string for the swap device. This may
+                                be used for controlling discard
+                                options among other functionality, if
+                                the swap backing device supports the
+                                discard or trim operation. (See
+                                <a href="swapon.html"><span class="citerefentry"><span class="refentrytitle">swapon</span>(8)</span></a>
+                                for more information.)
+                                </p></dd><dt id="TimeoutSec="><span class="term"><code class="varname">TimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutSec=">¶</a></dt><dd><p>Configures the time to
                                 wait for the swapon command to
                                 finish. If a command does not exit
                                 within the configured time, the swap
                                 <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>.)
                                 Takes a unit-less value in seconds, or
                                 a time span value such as "5min
-                                20s". Pass 0 to disable the timeout
-                                logic. Defaults to <code class="varname">TimeoutStartSec=</code> from the
-                                manager configuration file.</p></dd></dl></div><p>Check
+                                20s". Pass "<code class="literal">0</code>" to disable the timeout
+                                logic. Defaults to <code class="varname">DefaultTimeoutStartSec=</code> from the
+                                manager configuration file
+                                (see <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>).
+                                </p></dd></dl></div><p>Check
                 <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>
                 and
                 <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>
-                for more settings.</p></div><div class="refsect1"><a name="idm214170924512"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                for more settings.</p></div><div class="refsect1"><a name="idm214171611248"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                           <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>,
index 492309e5363adfca1428462ba277e2004f1b816d..44c16e7bcc969d59f529504c2867ea67e50f2b60 100644 (file)
                                 setting is optional.</para></listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>Options=</varname></term>
+
+                                <listitem><para>May contain an option
+                                string for the swap device. This may
+                                be used for controlling discard
+                                options among other functionality, if
+                                the swap backing device supports the
+                                discard or trim operation. (See
+                                <citerefentry><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                                for more information.)
+                                </para></listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><varname>TimeoutSec=</varname></term>
                                 <listitem><para>Configures the time to
                                 <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.)
                                 Takes a unit-less value in seconds, or
                                 a time span value such as "5min
-                                20s". Pass 0 to disable the timeout
-                                logic. Defaults to <varname>TimeoutStartSec=</varname> from the
-                                manager configuration file.</para></listitem>
+                                20s". Pass <literal>0</literal> to disable the timeout
+                                logic. Defaults to <varname>DefaultTimeoutStartSec=</varname> from the
+                                manager configuration file
+                                (see <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+                                </para></listitem>
                         </varlistentry>
                 </variablelist>
 
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
index e50f9d9732ed6fca9aac5138ef1e1fca4cf42fce..60bc96977f61917f93b76c69f646e7d8078b81b1 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.TARGET" "5" "" "systemd 215" "systemd.target"
+.TH "SYSTEMD\&.TARGET" "5" "" "systemd 217" "systemd.target"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -54,7 +54,7 @@ if the units in question also have
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.special\fR(7),
 \fBsystemd.directives\fR(7)
index a23ce626a215cfc2d0dfda6e874d3180d1116d4c..8e25b2954680a92c5ad33a9e9c74aecf6bb06e1b 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.target"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.target — Target unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>target</code></em>.target</code></p></div><div class="refsect1"><a name="idm214170922224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.target"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.target — Target unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>target</code></em>.target</code></p></div><div class="refsect1"><a name="idm214194510576"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.target</code>" encodes information about
                 a target unit of systemd, which is used for grouping
                 units and as well-known synchronization points during
@@ -51,9 +51,9 @@
                 dependencies of type <code class="varname">After=</code> if the
                 units in question also have
                 <code class="varname">DefaultDependencies=true</code>.
-                </p></div><div class="refsect1"><a name="idm214167077728"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                </p></div><div class="refsect1"><a name="idm214194500720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
index 15662a548d8f60525349dd9205c7e5d376d64aa8..e2cdfd83c30b5a51f072ee55f10bf5c05a7757d0 100644 (file)
@@ -99,7 +99,7 @@
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
index 00841e73b8586183d0cf1a550e4d000607be3d2f..9ab3ad625c964f4b37fdc02b900d872f33afea42 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.TIME" "7" "" "systemd 215" "systemd.time"
+.TH "SYSTEMD\&.TIME" "7" "" "systemd 217" "systemd.time"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -277,17 +277,25 @@ is assumed\&.
 Timezone names may not be specified\&.
 .PP
 The special expressions
+"minutely",
 "hourly",
 "daily",
-"monthly"
-and
-"weekly"
+"monthly",
+"weekly",
+"yearly",
+"quarterly",
+"semiannually"
 may be used as calendar events which refer to
-"*\-*\-* *:00:00",
-"*\-*\-* 00:00:00",
-"*\-*\-01 00:00:00"
+"*\-*\-*\ \&*:*:00",
+"*\-*\-*\ \&*:00:00",
+"*\-*\-*\ \&00:00:00",
+"*\-*\-01\ \&00:00:00",
+"Mon\ \&*\-*\-*\ \&00:00:00",
+"*\-01\-01\ \&00:00:00",
+"*\-01,04,07,10\-01 00:00:0"
 and
-"Mon *\-*\-* 00:00:00", respectively\&.
+"*\-01,07\-01 00:00:00"
+respectively\&.
 .PP
 Examples for valid timestamps and their normalized form:
 .sp
@@ -319,6 +327,8 @@ Wed\-Sat,Tue 12\-10\-15 1:2:3 → Tue\-Sat 2012\-10\-15 01:02:03
                      daily → *\-*\-* 00:00:00
                    monthly → *\-*\-01 00:00:00
                     weekly → Mon *\-*\-* 00:00:00
+                    yearly → *\-01\-01 00:00:00
+                  annually → *\-01\-01 00:00:00
                      *:2/3 → *\-*\-* *:02/3:00
 .fi
 .if n \{\
index 918acb7026c4552d861212a08b1c41d425997d2a..c4290a8443820f05f0cdc25add260343c203cdc8 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.time — Time and date specifications</p></div><div class="refsect1"><a name="idm214177369584"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>In systemd, timestamps, time spans, and calendar
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.time"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.time — Time and date specifications</p></div><div class="refsect1"><a name="idm214176094960"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>In systemd, timestamps, time spans, and calendar
                 events are displayed and may be specified in closely
-                related syntaxes.</p></div><div class="refsect1"><a name="idm214173533376"></a><h2 id="Displaying Time Spans">Displaying Time Spans<a class="headerlink" title="Permalink to this headline" href="#Displaying%20Time%20Spans">¶</a></h2><p>Time spans refer to time durations. On display,
+                related syntaxes.</p></div><div class="refsect1"><a name="idm214176093616"></a><h2 id="Displaying Time Spans">Displaying Time Spans<a class="headerlink" title="Permalink to this headline" href="#Displaying%20Time%20Spans">¶</a></h2><p>Time spans refer to time durations. On display,
                 systemd will present time spans as a space-separated
                 series of time values each suffixed by a time
                 unit.</p><pre class="programlisting">2h 30min</pre><p>All specified time values are meant to be added
-                up. The above hence refers to 150 minutes.</p></div><div class="refsect1"><a name="idm214173530880"></a><h2 id="Parsing Time Spans">Parsing Time Spans<a class="headerlink" title="Permalink to this headline" href="#Parsing%20Time%20Spans">¶</a></h2><p>When parsing, systemd will accept the same
+                up. The above hence refers to 150 minutes.</p></div><div class="refsect1"><a name="idm214176091120"></a><h2 id="Parsing Time Spans">Parsing Time Spans<a class="headerlink" title="Permalink to this headline" href="#Parsing%20Time%20Spans">¶</a></h2><p>When parsing, systemd will accept the same
                 time span syntax. Separating spaces may be omitted. The
                 following time units are understood:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>usec, us</p></li><li class="listitem"><p>msec, ms</p></li><li class="listitem"><p>seconds, second, sec, s</p></li><li class="listitem"><p>minutes, minute, min, m</p></li><li class="listitem"><p>hours, hour, hr, h</p></li><li class="listitem"><p>days, day, d</p></li><li class="listitem"><p>weeks, week, w</p></li><li class="listitem"><p>months, month</p></li><li class="listitem"><p>years, year, y</p></li></ul></div><p>If no time unit is specified, generally seconds
                 are assumed, but some exceptions exist and are marked
 48hr
 1y 12month
 55s500ms
-300ms20s 5day</pre></div><div class="refsect1"><a name="idm214173521216"></a><h2 id="Displaying Timestamps">Displaying Timestamps<a class="headerlink" title="Permalink to this headline" href="#Displaying%20Timestamps">¶</a></h2><p>Timestamps refer to specific, unique points in
+300ms20s 5day</pre></div><div class="refsect1"><a name="idm214176081504"></a><h2 id="Displaying Timestamps">Displaying Timestamps<a class="headerlink" title="Permalink to this headline" href="#Displaying%20Timestamps">¶</a></h2><p>Timestamps refer to specific, unique points in
                 time. On display, systemd will format these in the
                 local timezone as follows:</p><pre class="programlisting">Fri 2012-11-23 23:02:15 CET</pre><p>The weekday is printed according to the locale
-                choice of the user.</p></div><div class="refsect1"><a name="idm214173518768"></a><h2 id="Parsing Timestamps">Parsing Timestamps<a class="headerlink" title="Permalink to this headline" href="#Parsing%20Timestamps">¶</a></h2><p>When parsing systemd will accept a similar
+                choice of the user.</p></div><div class="refsect1"><a name="idm214176079056"></a><h2 id="Parsing Timestamps">Parsing Timestamps<a class="headerlink" title="Permalink to this headline" href="#Parsing%20Timestamps">¶</a></h2><p>When parsing systemd will accept a similar
                 timestamp syntax, but excluding any timezone
                 specification (this limitation might be removed
                 eventually). The weekday specification is optional,
@@ -99,7 +99,7 @@
                 of invocation of the command) instead or in addition
                 to an absolute timestamp as described above. A
                 relative timestamp is formatted as follows:</p><p>2 months 5 days ago</p><p>Note that any relative timestamp will also parse
-                correctly where a timestamp is expected. (see above)</p></div><div class="refsect1"><a name="idm214177428256"></a><h2 id="Calendar Events">Calendar Events<a class="headerlink" title="Permalink to this headline" href="#Calendar%20Events">¶</a></h2><p>Calendar events may be used to refer to one or
+                correctly where a timestamp is expected. (see above)</p></div><div class="refsect1"><a name="idm214179989488"></a><h2 id="Calendar Events">Calendar Events<a class="headerlink" title="Permalink to this headline" href="#Calendar%20Events">¶</a></h2><p>Calendar events may be used to refer to one or
                 more points in time in a single expression. They form
                 a superset of the absolute timestamps explained above:</p><pre class="programlisting">Thu,Fri 2012-*-1,5 11:12:13</pre><p>The above refers to 11:12:13 of the first or
                 fifth day of any month of the year 2012, given that it
                 omitted, in which case the current day and 00:00:00 is
                 implied, respectively. If the second component is not
                 specified, "<code class="literal">:00</code>" is assumed.</p><p>Timezone names may not be specified.</p><p>The special expressions
+                "<code class="literal">minutely</code>",
                 "<code class="literal">hourly</code>", "<code class="literal">daily</code>",
-                "<code class="literal">monthly</code>" and "<code class="literal">weekly</code>"
-                may be used as calendar events which refer to
-                "<code class="literal">*-*-* *:00:00</code>", "<code class="literal">*-*-*
-                00:00:00</code>", "<code class="literal">*-*-01 00:00:00</code>" and
-                "<code class="literal">Mon *-*-* 00:00:00</code>",
-                respectively.</p><p>Examples for valid timestamps and their
+                "<code class="literal">monthly</code>", "<code class="literal">weekly</code>",
+                "<code class="literal">yearly</code>",
+                "<code class="literal">quarterly</code>",
+                "<code class="literal">semiannually</code>" may be used as
+                calendar events which refer to
+                "<code class="literal">*-*-* *:*:00</code>",
+                "<code class="literal">*-*-* *:00:00</code>",
+                "<code class="literal">*-*-* 00:00:00</code>",
+                "<code class="literal">*-*-01 00:00:00</code>",
+                "<code class="literal">Mon *-*-* 00:00:00</code>",
+                "<code class="literal">*-01-01 00:00:00</code>",
+                "<code class="literal">*-01,04,07,10-01 00:00:0</code>" and
+                "<code class="literal">*-01,07-01 00:00:00</code>" respectively.
+                </p><p>Examples for valid timestamps and their
                 normalized form:</p><pre class="programlisting">   Sat,Thu,Mon-Wed,Sat-Sun → Mon-Thu,Sat,Sun *-*-* 00:00:00
      Mon,Sun 12-*-* 2,1:23 → Mon,Sun 2012-*-* 01,02:23:00
                    Wed *-1 → Wed *-*-01 00:00:00
@@ -152,9 +161,11 @@ Wed-Sat,Tue 12-10-15 1:2:3 → Tue-Sat 2012-10-15 01:02:03
                      daily → *-*-* 00:00:00
                    monthly → *-*-01 00:00:00
                     weekly → Mon *-*-* 00:00:00
+                    yearly → *-01-01 00:00:00
+                  annually → *-01-01 00:00:00
                      *:2/3 → *-*-* *:02/3:00</pre><p>Calendar events are used by timer units, see
                   <a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a>
-                  for details.</p></div><div class="refsect1"><a name="idm214172453600"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                  for details.</p></div><div class="refsect1"><a name="idm214175007008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
                           <a href="systemd.timer.html"><span class="citerefentry"><span class="refentrytitle">systemd.timer</span>(5)</span></a>,
index 0706cdf54a099df460cf38e76df83e609b204890..f35ccd7f171b4bd6148d5b8294785896776a38ab 100644 (file)
                 <para>Timezone names may not be specified.</para>
 
                 <para>The special expressions
+                <literal>minutely</literal>,
                 <literal>hourly</literal>, <literal>daily</literal>,
-                <literal>monthly</literal> and <literal>weekly</literal>
-                may be used as calendar events which refer to
-                <literal>*-*-* *:00:00</literal>, <literal>*-*-*
-                00:00:00</literal>, <literal>*-*-01 00:00:00</literal> and
-                <literal>Mon *-*-* 00:00:00</literal>,
-                respectively.</para>
+                <literal>monthly</literal>, <literal>weekly</literal>,
+                <literal>yearly</literal>,
+                <literal>quarterly</literal>,
+                <literal>semiannually</literal> may be used as
+                calendar events which refer to
+                <literal>*-*-* *:*:00</literal>,
+                <literal>*-*-* *:00:00</literal>,
+                <literal>*-*-* 00:00:00</literal>,
+                <literal>*-*-01 00:00:00</literal>,
+                <literal>Mon *-*-* 00:00:00</literal>,
+                <literal>*-01-01 00:00:00</literal>,
+                <literal>*-01,04,07,10-01 00:00:0</literal> and
+                <literal>*-01,07-01 00:00:00</literal> respectively.
+                </para>
 
                 <para>Examples for valid timestamps and their
                 normalized form:</para>
@@ -277,6 +286,8 @@ Wed-Sat,Tue 12-10-15 1:2:3 → Tue-Sat 2012-10-15 01:02:03
                      daily → *-*-* 00:00:00
                    monthly → *-*-01 00:00:00
                     weekly → Mon *-*-* 00:00:00
+                    yearly → *-01-01 00:00:00
+                  annually → *-01-01 00:00:00
                      *:2/3 → *-*-* *:02/3:00</programlisting>
 
                   <para>Calendar events are used by timer units, see
index 5c9cdc9266622b67898336661494f6be6fa366e3..ca46c12fbf66db0596f953bb8d6e1234e5f58e6f 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.TIMER" "5" "" "systemd 215" "systemd.timer"
+.TH "SYSTEMD\&.TIMER" "5" "" "systemd 217" "systemd.timer"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -44,12 +44,21 @@ foo\&.service\&. The unit to activate may be controlled by
 Unless
 \fIDefaultDependencies=\fR
 is set to
-\fBfalse\fR, timer units will implicitly have dependencies of type
+\fBfalse\fR, all timer units will implicitly have dependencies of type
 \fIConflicts=\fR
 and
 \fIBefore=\fR
 on
-shutdown\&.target\&. These ensure that timer units are stopped cleanly prior to system shutdown\&. Only timer units involved with early boot or late system shutdown should disable this option\&.
+shutdown\&.target
+to ensure that they are stopped cleanly prior to system shutdown\&. Timer units with at least one
+\fIOnCalendar=\fR
+directive will have an additional
+\fIAfter=\fR
+dependency on
+timer\-sync\&.target
+to avoid being started before the system clock has been correctly set\&. Only timer units involved with early boot or late system shutdown should disable the
+\fIDefaultDependencies=\fR
+option\&.
 .SH "OPTIONS"
 .PP
 Timer files must include a [Timer] section, which carries information about the timer it defines\&. The options specific to the [Timer] section of timer units are the following:
@@ -144,7 +153,7 @@ Takes a boolean argument\&. If true, an elapsing timer will cause the system to
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.unit\fR(5),
 \fBsystemd.service\fR(5),
 \fBsystemd.time\fR(7),
index 318e134c7020d5861fcb4dc204ac1f9c240c8432..815e0513f6a6be895ffc24278940cade06f5a66f 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.timer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.timer — Timer unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>timer</code></em>.timer</code></p></div><div class="refsect1"><a name="idm214184246512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.timer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.timer — Timer unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>timer</code></em>.timer</code></p></div><div class="refsect1"><a name="idm214169044224"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                 "<code class="literal">.timer</code>" encodes information about
                 a timer controlled and supervised by systemd, for
                 timer-based activation.</p><p>This man page lists the configuration options
                 matching service <code class="filename">foo.service</code>. The
                 unit to activate may be controlled by
                 <code class="varname">Unit=</code> (see below).</p><p>Unless <code class="varname">DefaultDependencies=</code>
-                is set to <code class="option">false</code>, timer units will
+                is set to <code class="option">false</code>, all timer units will
                 implicitly have dependencies of type
                 <code class="varname">Conflicts=</code> and
                 <code class="varname">Before=</code> on
-                <code class="filename">shutdown.target</code>. These ensure
-                that timer units are stopped cleanly prior to system
-                shutdown. Only timer units involved with early boot or
-                late system shutdown should disable this
-                option.</p></div><div class="refsect1"><a name="idm214180402560"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Timer files must include a [Timer] section,
+                <code class="filename">shutdown.target</code> to ensure that
+                they are stopped cleanly prior to system shutdown.
+                Timer units with at least one
+                <code class="varname">OnCalendar=</code> directive will have an
+                additional <code class="varname">After=</code> dependency on
+                <code class="filename">timer-sync.target</code> to avoid
+                being started before the system clock has been
+                correctly set. Only timer units involved with early
+                boot or late system shutdown should disable the
+                <code class="varname">DefaultDependencies=</code> option.</p></div><div class="refsect1"><a name="idm214169032768"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Timer files must include a [Timer] section,
                 which carries information about the timer it
                 defines. The options specific to the [Timer] section
                 of timer units are the following:</p><div class="variablelist"><dl class="variablelist"><dt id="OnActiveSec="><span class="term"><code class="varname">OnActiveSec=</code>, </span><span class="term"><code class="varname">OnBootSec=</code>, </span><span class="term"><code class="varname">OnStartupSec=</code>, </span><span class="term"><code class="varname">OnUnitActiveSec=</code>, </span><span class="term"><code class="varname">OnUnitInactiveSec=</code></span><a class="headerlink" title="Permalink to this term" href="#OnActiveSec=">¶</a></dt><dd><p>Defines monotonic timers
                                 <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>'s
                                 <code class="varname">TimerSlackNSec=</code>
                                 setting. See
-                                <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
                                 for details. To optimize power
                                 consumption, make sure to set this
                                 value as high as possible and as low
                                 suspending it again after any work
                                 that is to be done is
                                 finished. Defaults to
-                                <code class="varname">false</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214184333120"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                <code class="varname">false</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214172940672"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                           <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                           <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                           <a href="systemd.time.html"><span class="citerefentry"><span class="refentrytitle">systemd.time</span>(7)</span></a>,
                           <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
                           <a href="systemd-system.conf.html"><span class="citerefentry"><span class="refentrytitle">systemd-system.conf</span>(5)</span></a>,
-                          <a href="prctl.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
+                          <a href="http://man7.org/linux/man-pages/man2/prctl.2.html"><span class="citerefentry"><span class="refentrytitle">prctl</span>(2)</span></a>
                   </p></div></div></body></html>
index d82b9bdc973b09846231bbef88799a855ab8e557..55b458557f357634ae7f27591cbd8cddf7001e30 100644 (file)
                 <varname>Unit=</varname> (see below).</para>
 
                 <para>Unless <varname>DefaultDependencies=</varname>
-                is set to <option>false</option>, timer units will
+                is set to <option>false</option>, all timer units will
                 implicitly have dependencies of type
                 <varname>Conflicts=</varname> and
                 <varname>Before=</varname> on
-                <filename>shutdown.target</filename>. These ensure
-                that timer units are stopped cleanly prior to system
-                shutdown. Only timer units involved with early boot or
-                late system shutdown should disable this
-                option.</para>
+                <filename>shutdown.target</filename> to ensure that
+                they are stopped cleanly prior to system shutdown.
+                Timer units with at least one
+                <varname>OnCalendar=</varname> directive will have an
+                additional <varname>After=</varname> dependency on
+                <filename>timer-sync.target</filename> to avoid
+                being started before the system clock has been
+                correctly set. Only timer units involved with early
+                boot or late system shutdown should disable the
+                <varname>DefaultDependencies=</varname> option.</para>
         </refsect1>
 
         <refsect1>
                   <title>See Also</title>
                   <para>
                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                          <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                           <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
index 8287026edbe8836640e340fa26a2223a4ec478d4..3f155708a30361130fe2b225294a0d297450c9f6 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSTEMD\&.UNIT" "5" "" "systemd 215" "systemd.unit"
+.TH "SYSTEMD\&.UNIT" "5" "" "systemd 217" "systemd.unit"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -48,7 +48,10 @@ systemd.unit \- Unit configuration
 $XDG_CONFIG_HOME/systemd/user/*
 $HOME/\&.config/systemd/user/*
 /etc/systemd/user/*
+$XDG_RUNTIME_DIR/systemd/user/*
 /run/systemd/user/*
+$XDG_DATA_HOME/systemd/user/*
+$HOME/\&.local/share/systemd/user/*
 /usr/lib/systemd/user/*
 \&.\&.\&.
                 
@@ -110,9 +113,9 @@ Along with a unit file
 foo\&.service, the directory
 foo\&.service\&.wants/
 may exist\&. All unit files symlinked from such a directory are implicitly added as dependencies of type
-\fIWanted=\fR
+\fIWants=\fR
 to the unit\&. This is useful to hook units into the start\-up of other units, without having to modify their unit files\&. For details about the semantics of
-\fIWanted=\fR, see below\&. The preferred way to create symlinks in the
+\fIWants=\fR, see below\&. The preferred way to create symlinks in the
 \&.wants/
 directory of a unit file is with the
 \fBenable\fR
@@ -129,7 +132,15 @@ foo\&.service, a directory
 foo\&.service\&.d/
 may exist\&. All files with the suffix
 "\&.conf"
-from this directory will be parsed after the file itself is parsed\&. This is useful to alter or add configuration settings to a unit, without having to modify their unit files\&. Make sure that the file that is included has the appropriate section headers before any directive\&.
+from this directory will be parsed after the file itself is parsed\&. This is useful to alter or add configuration settings to a unit, without having to modify their unit files\&. Make sure that the file that is included has the appropriate section headers before any directive\&. Note that for instanced units this logic will first look for the instance
+"\&.d/"
+subdirectory and read its
+"\&.conf"
+files, followed by the template
+"\&.d/"
+subdirectory and reads its
+"\&.conf"
+files\&.
 .PP
 Note that while systemd offers a flexible dependency system between units it is recommended to use this functionality only sparingly and instead rely on techniques such as bus\-based or socket\-based activation which make dependencies implicit, resulting in a both simpler and more flexible system\&.
 .PP
@@ -137,7 +148,7 @@ Some unit names reflect paths existing in the file system namespace\&. Example:
 dev\-sda\&.device
 refers to a device with the device node
 /dev/sda
-in the file system namespace\&. If this applies, a special way to escape the path name is used, so that the result is usable as part of a filename\&. Basically, given a path, "/" is replaced by "\-", and all unprintable characters and the "\-" are replaced by C\-style "\ex20" escapes\&. The root directory "/" is encoded as single dash, while otherwise the initial and ending "/" is removed from all paths during transformation\&. This escaping is reversible\&.
+in the file system namespace\&. If this applies, a special way to escape the path name is used, so that the result is usable as part of a filename\&. Basically, given a path, "/" is replaced by "\-", and all unprintable characters and the "\-" are replaced by C\-style "\ex2d" escapes\&. The root directory "/" is encoded as single dash, while otherwise the initial and ending "/" is removed from all paths during transformation\&. This escaping is reversible\&.
 .PP
 Optionally, units may be instantiated from a template file at runtime\&. This allows creation of multiple units from a single configuration file\&. If systemd looks for a unit configuration file, it will first search for the literal unit name in the file system\&. If that yields no success and the unit name contains an
 "@"
@@ -165,7 +176,9 @@ Unit files are loaded from a set of paths determined during compilation, describ
 .PP
 When systemd is running in user mode (\fB\-\-user\fR) and the variable
 \fI$SYSTEMD_UNIT_PATH\fR
-is set, this contents of this variable overrides the unit load path\&.
+is set, this contents of this variable overrides the unit load path\&. If
+\fI$SYSTEMD_UNIT_PATH\fR
+ends with an empty component (":"), the usual unit load path will be appended to the contents of the variable\&.
 .sp
 .it 1 an-trap
 .nr an-no-space-flag 1
@@ -220,6 +233,9 @@ l l
 l l
 l l
 l l
+l l
+l l
+l l
 l l.
 T{
 $XDG_CONFIG_HOME/systemd/user
@@ -237,14 +253,29 @@ T}:T{
 Local configuration
 T}
 T{
+$XDG_RUNTIME_DIR/systemd/user
+T}:T{
+Runtime units (only used when $XDG_RUNTIME_DIR is set)
+T}
+T{
 /run/systemd/user
 T}:T{
 Runtime units
 T}
 T{
+$XDG_DATA_HOME/systemd/user
+T}:T{
+Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is set)
+T}
+T{
+$HOME/\&.local/share/systemd/user
+T}:T{
+Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set)
+T}
+T{
 /usr/lib/systemd/user
 T}:T{
-Units of installed packages
+Units of packages that have been installed system\-wide
 T}
 .TE
 .sp 1
@@ -503,16 +534,28 @@ Takes a boolean argument\&. If
 \fBfalse\fR, this option does not disable all implicit dependencies, just non\-essential ones\&.
 .RE
 .PP
-\fIJobTimeoutSec=\fR
+\fIJobTimeoutSec=\fR, \fIJobTimeoutAction=\fR, \fIJobTimeoutRebootArgument=\fR
 .RS 4
-When clients are waiting for a job of this unit to complete, time out after the specified time\&. If this time limit is reached, the job will be cancelled, the unit however will not change state or even enter the
+When a job for this unit is queued a time\-out may be configured\&. If this time limit is reached, the job will be cancelled, the unit however will not change state or even enter the
 "failed"
 mode\&. This value defaults to 0 (job timeouts disabled), except for device units\&. NB: this timeout is independent from any unit\-specific timeout (for example, the timeout set with
-\fITimeout=\fR
+\fIStartTimeoutSec=\fR
 in service units) as the job timeout has no effect on the unit itself, only on the job that might be pending for it\&. Or in other words: unit\-specific timeouts are useful to abort unit state changes, and revert them\&. The job timeout set with this option however is useful to abort only the job waiting for the unit state to change\&.
+.sp
+\fIJobTimeoutAction=\fR
+optionally configures an additional action to take when the time\-out is hit\&. It takes the same values as the per\-service
+\fIStartLimitAction=\fR
+setting, see
+\fBsystemd.service\fR(5)
+for details\&. Defaults to
+\fBnone\fR\&.
+\fIJobTimeoutRebootArgument=\fR
+configures an optional reboot string to pass to the
+\fBreboot\fR(2)
+system call\&.
 .RE
 .PP
-\fIConditionArchitecture=\fR, \fIConditionVirtualization=\fR, \fIConditionHost=\fR, \fIConditionKernelCommandLine=\fR, \fIConditionSecurity=\fR, \fIConditionCapability=\fR, \fIConditionACPower=\fR, \fIConditionNeedsUpdate=\fR, \fIConditionPathExists=\fR, \fIConditionPathExistsGlob=\fR, \fIConditionPathIsDirectory=\fR, \fIConditionPathIsSymbolicLink=\fR, \fIConditionPathIsMountPoint=\fR, \fIConditionPathIsReadWrite=\fR, \fIConditionDirectoryNotEmpty=\fR, \fIConditionFileNotEmpty=\fR, \fIConditionFileIsExecutable=\fR, \fIConditionNull=\fR
+\fIConditionArchitecture=\fR, \fIConditionVirtualization=\fR, \fIConditionHost=\fR, \fIConditionKernelCommandLine=\fR, \fIConditionSecurity=\fR, \fIConditionCapability=\fR, \fIConditionACPower=\fR, \fIConditionNeedsUpdate=\fR, \fIConditionFirstBoot=\fR, \fIConditionPathExists=\fR, \fIConditionPathExistsGlob=\fR, \fIConditionPathIsDirectory=\fR, \fIConditionPathIsSymbolicLink=\fR, \fIConditionPathIsMountPoint=\fR, \fIConditionPathIsReadWrite=\fR, \fIConditionDirectoryNotEmpty=\fR, \fIConditionFileNotEmpty=\fR, \fIConditionFileIsExecutable=\fR, \fIConditionNull=\fR
 .RS 4
 Before starting a unit verify that the specified condition is true\&. If it is not true, the starting of the unit will be skipped, however all ordering dependencies of it are still respected\&. A failing condition will not result in the unit being moved into a failure state\&. The condition is checked at the time the queued start job is to be executed\&.
 .sp
@@ -521,7 +564,9 @@ may be used to check whether the system is running on a specific architecture\&.
 \fIx86\fR,
 \fIx86\-64\fR,
 \fIppc\fR,
+\fIppc\-le\fR,
 \fIppc64\fR,
+\fIppc64\-le\fR,
 \fIia64\fR,
 \fIparisc\fR,
 \fIparisc64\fR,
@@ -530,7 +575,9 @@ may be used to check whether the system is running on a specific architecture\&.
 \fIsparc\fR,
 \fIsparc64\fR,
 \fImips\fR,
+\fImips\-le\fR,
 \fImips64\fR,
+\fImips64\-le\fR,
 \fIalpha\fR,
 \fIarm\fR,
 \fIarm\-be\fR,
@@ -538,7 +585,9 @@ may be used to check whether the system is running on a specific architecture\&.
 \fIarm64\-be\fR,
 \fIsh\fR,
 \fIsh64\fR,
-\fIm86k\fR
+\fIm86k\fR,
+\fItilegx\fR,
+\fIcris\fR
 to test against a specific architecture\&. The architecture is determined from the information returned by
 \fBuname\fR(2)
 and is thus subject to
@@ -556,18 +605,21 @@ and
 to test against a generic type of virtualization solution, or one of
 \fIqemu\fR,
 \fIkvm\fR,
+\fIzvm\fR,
 \fIvmware\fR,
 \fImicrosoft\fR,
 \fIoracle\fR,
 \fIxen\fR,
 \fIbochs\fR,
-\fIchroot\fR,
 \fIuml\fR,
 \fIopenvz\fR,
 \fIlxc\fR,
 \fIlxc\-libvirt\fR,
-\fIsystemd\-nspawn\fR
-to test against a specific implementation\&. If multiple virtualization technologies are nested, only the innermost is considered\&. The test may be negated by prepending an exclamation mark\&.
+\fIsystemd\-nspawn\fR,
+\fIdocker\fR
+to test against a specific implementation\&. See
+\fBsystemd-detect-virt\fR(1)
+for a full list of known virtualization technologies and their identifiers\&. If multiple virtualization technologies are nested, only the innermost is considered\&. The test may be negated by prepending an exclamation mark\&.
 .sp
 \fIConditionHost=\fR
 may be used to match against the hostname or machine ID of the host\&. This either takes a hostname string (optionally with shell style globs) which is tested against the locally set hostname as returned by
@@ -616,6 +668,13 @@ or
 on the next following boot\&. Units making use of this condition should order themselves before
 \fBsystemd-update-done.service\fR(8), to make sure they run before the stamp files\*(Aqs modification time gets reset indicating a completed update\&.
 .sp
+\fIConditionFirstBoot=\fR
+takes a boolean argument\&. This condition may be used to conditionalize units on whether the system is booting up with an unpopulated
+/etc
+directory\&. This may be used to populate
+/etc
+on the first boot after factory reset, or when a new system instances boots up for the first time\&.
+.sp
 With
 \fIConditionPathExists=\fR
 a file existence condition is checked before a unit is started\&. If the specified absolute path name does not exist, the condition will fail\&. If the absolute path name passed to
@@ -676,7 +735,9 @@ A path to a configuration file this unit has been generated from\&. This is prim
 .RE
 .SH "[INSTALL] SECTION OPTIONS"
 .PP
-Unit file may include a [Install] section, which carries installation information for the unit\&. This section is not interpreted by
+Unit file may include an
+"[Install]"
+section, which carries installation information for the unit\&. This section is not interpreted by
 \fBsystemd\fR(1)
 during runtime\&. It is used exclusively by the
 \fBenable\fR
@@ -688,7 +749,7 @@ tool during installation of a unit:
 .PP
 \fIAlias=\fR
 .RS 4
-A space\-seperated list of additional names this unit shall be installed under\&. The names listed here must have the same suffix (i\&.e\&. type) as the unit file name\&. This option may be specified more than once, in which case all listed names are used\&. At installation time,
+A space\-separated list of additional names this unit shall be installed under\&. The names listed here must have the same suffix (i\&.e\&. type) as the unit file name\&. This option may be specified more than once, in which case all listed names are used\&. At installation time,
 \fBsystemctl enable\fR
 will create symlinks from these names to the unit filename\&.
 .RE
@@ -935,7 +996,7 @@ T}
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemctl\fR(8),
+\fBsystemctl\fR(1),
 \fBsystemd.special\fR(7),
 \fBsystemd.service\fR(5),
 \fBsystemd.socket\fR(5),
@@ -950,6 +1011,7 @@ T}
 \fBsystemd.scope\fR(5),
 \fBsystemd.slice\fR(5),
 \fBsystemd.time\fR(7),
+\fBsystemd-verify\fR(1),
 \fBcapabilities\fR(7),
 \fBsystemd.directives\fR(7),
 \fBuname\fR(1)
index 575eeff0f194ca253231d1fb616286cd0fc42557..cf32d913264d8a41e8877b949b2f2f5672bd9f50 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.unit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.unit — Unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.unit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.unit — Unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
                 <code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code>,
                 <code class="filename"><em class="replaceable"><code>device</code></em>.device</code>,
                 <code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code>,
                 </p></div><div class="literallayout"><p><code class="filename">$XDG_CONFIG_HOME/systemd/user/*</code><br>
 <code class="filename">$HOME/.config/systemd/user/*</code><br>
 <code class="filename">/etc/systemd/user/*</code><br>
+<code class="filename">$XDG_RUNTIME_DIR/systemd/user/*</code><br>
 <code class="filename">/run/systemd/user/*</code><br>
+<code class="filename">$XDG_DATA_HOME/systemd/user/*</code><br>
+<code class="filename">$HOME/.local/share/systemd/user/*</code><br>
 <code class="filename">/usr/lib/systemd/user/*</code><br>
 <code class="filename">...</code><br>
-                </p></div></div><div class="refsect1"><a name="idm214201004864"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file encodes information
+                </p></div></div><div class="refsect1"><a name="idm214195502288"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file encodes information
                 about a service, a socket, a device, a mount point, an
                 automount point, a swap file or partition, a start-up
                 target, a watched file system path, a timer controlled
                 <code class="filename">foo.service.wants/</code> may exist. All
                 unit files symlinked from such a directory are
                 implicitly added as dependencies of type
-                <code class="varname">Wanted=</code> to the unit. This is useful
+                <code class="varname">Wants=</code> to the unit. This is useful
                 to hook units into the start-up of other units,
                 without having to modify their unit files. For details
-                about the semantics of <code class="varname">Wanted=</code>, see
+                about the semantics of <code class="varname">Wants=</code>, see
                 below. The preferred way to create symlinks in the
                 <code class="filename">.wants/</code> directory of a unit file
                 is with the <span class="command"><strong>enable</strong></span> command of the
                 settings to a unit, without having to modify their
                 unit files. Make sure that the file that is included
                 has the appropriate section headers before any
-                directive.</p><p>Note that while systemd offers a flexible
+                directive. Note that for instanced units this logic
+                will first look for the instance
+                "<code class="literal">.d/</code>" subdirectory and read its
+                "<code class="literal">.conf</code>" files, followed by the
+                template "<code class="literal">.d/</code>" subdirectory and reads
+                its "<code class="literal">.conf</code>" files.</p><p>Note that while systemd offers a flexible
                 dependency system between units it is recommended to
                 use this functionality only sparingly and instead rely
                 on techniques such as bus-based or socket-based
                 result is usable as part of a filename. Basically,
                 given a path, "/" is replaced by "-", and all
                 unprintable characters and the "-" are replaced by
-                C-style "\x20" escapes. The root directory "/" is
+                C-style "\x2d" escapes. The root directory "/" is
                 encoded as single dash, while otherwise the initial
                 and ending "/" is removed from all paths during
                 transformation. This escaping is reversible.</p><p>Optionally, units may be instantiated from a
                 fully disable a unit, making it impossible to start it
                 even manually.</p><p>The unit file format is covered by the
                 <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise" target="_top">Interface
-                Stability Promise</a>.</p></div><div class="refsect1"><a name="idm214195948752"></a><h2 id="Unit Load Path">Unit Load Path<a class="headerlink" title="Permalink to this headline" href="#Unit%20Load%20Path">¶</a></h2><p>Unit files are loaded from a set of paths
+                Stability Promise</a>.</p></div><div class="refsect1"><a name="idm214194719104"></a><h2 id="Unit Load Path">Unit Load Path<a class="headerlink" title="Permalink to this headline" href="#Unit%20Load%20Path">¶</a></h2><p>Unit files are loaded from a set of paths
                 determined during compilation, described in the two
                 tables below. Unit files found in directories listed
                 earlier override files with the same name in
                 (<code class="option">--user</code>) and the variable
                 <code class="varname">$SYSTEMD_UNIT_PATH</code> is set, this
                 contents of this variable overrides the unit load
-                path.
-                </p><div class="table"><a name="idm214195946144"></a><p class="title"><b>Table 1. 
+                path. If <code class="varname">$SYSTEMD_UNIT_PATH</code> ends
+                with an empty component ("<code class="literal">:</code>"), the
+                usual unit load path will be appended to the contents
+                of the variable.</p><div class="table"><a name="idm214194715360"></a><p class="title"><b>Table 1. 
                     Load path when running in system mode (<code class="option">--system</code>).
                   </b></p><div class="table-contents"><table summary="
                     Load path when running in system mode (--system).
-                  " border="1"><colgroup><col class="path"><col class="expl"></colgroup><thead><tr><th>Path</th><th>Description</th></tr></thead><tbody><tr><td><code class="filename">/etc/systemd/system</code></td><td>Local configuration</td></tr><tr><td><code class="filename">/run/systemd/system</code></td><td>Runtime units</td></tr><tr><td><code class="filename">/usr/lib/systemd/system</code></td><td>Units of installed packages</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="idm214195936896"></a><p class="title"><b>Table 2. 
+                  " border="1"><colgroup><col class="path"><col class="expl"></colgroup><thead><tr><th>Path</th><th>Description</th></tr></thead><tbody><tr><td><code class="filename">/etc/systemd/system</code></td><td>Local configuration</td></tr><tr><td><code class="filename">/run/systemd/system</code></td><td>Runtime units</td></tr><tr><td><code class="filename">/usr/lib/systemd/system</code></td><td>Units of installed packages</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="idm214194706112"></a><p class="title"><b>Table 2. 
                     Load path when running in user mode (<code class="option">--user</code>).
                   </b></p><div class="table-contents"><table summary="
                     Load path when running in user mode (--user).
-                  " border="1"><colgroup><col class="path"><col class="expl"></colgroup><thead><tr><th>Path</th><th>Description</th></tr></thead><tbody><tr><td><code class="filename">$XDG_CONFIG_HOME/systemd/user</code></td><td>User configuration (only used when $XDG_CONFIG_HOME is set)</td></tr><tr><td><code class="filename">$HOME/.config/systemd/user</code></td><td>User configuration (only used when $XDG_CONFIG_HOME is not set)</td></tr><tr><td><code class="filename">/etc/systemd/user</code></td><td>Local configuration</td></tr><tr><td><code class="filename">/run/systemd/user</code></td><td>Runtime units</td></tr><tr><td><code class="filename">/usr/lib/systemd/user</code></td><td>Units of installed packages</td></tr></tbody></table></div></div><br class="table-break"><p>Additional units might be loaded into systemd
+                  " border="1"><colgroup><col class="path"><col class="expl"></colgroup><thead><tr><th>Path</th><th>Description</th></tr></thead><tbody><tr><td><code class="filename">$XDG_CONFIG_HOME/systemd/user</code></td><td>User configuration (only used when $XDG_CONFIG_HOME is set)</td></tr><tr><td><code class="filename">$HOME/.config/systemd/user</code></td><td>User configuration (only used when $XDG_CONFIG_HOME is not set)</td></tr><tr><td><code class="filename">/etc/systemd/user</code></td><td>Local configuration</td></tr><tr><td><code class="filename">$XDG_RUNTIME_DIR/systemd/user</code></td><td>Runtime units (only used when $XDG_RUNTIME_DIR is set)</td></tr><tr><td><code class="filename">/run/systemd/user</code></td><td>Runtime units</td></tr><tr><td><code class="filename">$XDG_DATA_HOME/systemd/user</code></td><td>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is set)</td></tr><tr><td><code class="filename">$HOME/.local/share/systemd/user</code></td><td>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set)</td></tr><tr><td><code class="filename">/usr/lib/systemd/user</code></td><td>Units of packages that have been installed system-wide</td></tr></tbody></table></div></div><br class="table-break"><p>Additional units might be loaded into systemd
                 ("linked") from directories not on the unit load
                 path. See the <span class="command"><strong>link</strong></span> command for
                 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>. Also,
                 some units are dynamically created via generators
                 <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/Generators/" target="_top">Generators</a>.
-                </p></div><div class="refsect1"><a name="idm214195921808"></a><h2 id="[Unit] Section Options">[Unit] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BUnit%5D%20Section%20Options">¶</a></h2><p>Unit file may include a [Unit] section, which
+                </p></div><div class="refsect1"><a name="idm214194686224"></a><h2 id="[Unit] Section Options">[Unit] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BUnit%5D%20Section%20Options">¶</a></h2><p>Unit file may include a [Unit] section, which
                 carries generic information about the unit that is not
                 dependent on the type of unit:</p><div class="variablelist"><dl class="variablelist"><dt id="Description="><span class="term"><code class="varname">Description=</code></span><a class="headerlink" title="Permalink to this term" href="#Description=">¶</a></dt><dd><p>A free-form string
                                 describing the unit. This is intended
                                 "<code class="literal">man:</code>". For more
                                 information about the syntax of these
                                 URIs, see
-                                <a href="uri.html"><span class="citerefentry"><span class="refentrytitle">uri</span>(7)</span></a>. The
+                                <a href="http://man7.org/linux/man-pages/man7/uri.7.html"><span class="citerefentry"><span class="refentrytitle">uri</span>(7)</span></a>. The
                                 URIs should be listed in order of
                                 relevance, starting with the most
                                 relevant. It is a good idea to first
                                 <code class="option">false</code>, this option
                                 does not disable all implicit
                                 dependencies, just non-essential
-                                ones.</p></dd><dt id="JobTimeoutSec="><span class="term"><code class="varname">JobTimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#JobTimeoutSec=">¶</a></dt><dd><p>When clients are
-                                waiting for a job of this unit to
-                                complete, time out after the specified
-                                time. If this time limit is reached,
-                                the job will be cancelled, the unit
-                                however will not change state or even
-                                enter the "<code class="literal">failed</code>"
-                                mode. This value defaults to 0 (job
-                                timeouts disabled), except for device
+                                ones.</p></dd><dt id="JobTimeoutSec="><span class="term"><code class="varname">JobTimeoutSec=</code>, </span><span class="term"><code class="varname">JobTimeoutAction=</code>, </span><span class="term"><code class="varname">JobTimeoutRebootArgument=</code></span><a class="headerlink" title="Permalink to this term" href="#JobTimeoutSec=">¶</a></dt><dd><p>When a job for this
+                                unit is queued a time-out may be
+                                configured. If this time limit is
+                                reached, the job will be cancelled,
+                                the unit however will not change state
+                                or even enter the
+                                "<code class="literal">failed</code>" mode. This
+                                value defaults to 0 (job timeouts
+                                disabled), except for device
                                 units. NB: this timeout is independent
                                 from any unit-specific timeout (for
                                 example, the timeout set with
-                                <code class="varname">Timeout=</code> in service
+                                <code class="varname">StartTimeoutSec=</code> in service
                                 units) as the job timeout has no
                                 effect on the unit itself, only on the
                                 job that might be pending for it. Or
                                 timeout set with this option however
                                 is useful to abort only the job
                                 waiting for the unit state to
-                                change.</p></dd><dt id="ConditionArchitecture="><span class="term"><code class="varname">ConditionArchitecture=</code>, </span><span class="term"><code class="varname">ConditionVirtualization=</code>, </span><span class="term"><code class="varname">ConditionHost=</code>, </span><span class="term"><code class="varname">ConditionKernelCommandLine=</code>, </span><span class="term"><code class="varname">ConditionSecurity=</code>, </span><span class="term"><code class="varname">ConditionCapability=</code>, </span><span class="term"><code class="varname">ConditionACPower=</code>, </span><span class="term"><code class="varname">ConditionNeedsUpdate=</code>, </span><span class="term"><code class="varname">ConditionPathExists=</code>, </span><span class="term"><code class="varname">ConditionPathExistsGlob=</code>, </span><span class="term"><code class="varname">ConditionPathIsDirectory=</code>, </span><span class="term"><code class="varname">ConditionPathIsSymbolicLink=</code>, </span><span class="term"><code class="varname">ConditionPathIsMountPoint=</code>, </span><span class="term"><code class="varname">ConditionPathIsReadWrite=</code>, </span><span class="term"><code class="varname">ConditionDirectoryNotEmpty=</code>, </span><span class="term"><code class="varname">ConditionFileNotEmpty=</code>, </span><span class="term"><code class="varname">ConditionFileIsExecutable=</code>, </span><span class="term"><code class="varname">ConditionNull=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionArchitecture=">¶</a></dt><dd><p>Before starting a unit
+                                change.</p><p><code class="varname">JobTimeoutAction=</code>
+                                optionally configures an additional
+                                action to take when the time-out is
+                                hit. It takes the same values as the
+                                per-service
+                                <code class="varname">StartLimitAction=</code>
+                                setting, see
+                                <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>
+                                for details. Defaults to
+                                <code class="option">none</code>. <code class="varname">JobTimeoutRebootArgument=</code>
+                                configures an optional reboot string
+                                to pass to the
+                                <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>
+                                system call.</p></dd><dt id="ConditionArchitecture="><span class="term"><code class="varname">ConditionArchitecture=</code>, </span><span class="term"><code class="varname">ConditionVirtualization=</code>, </span><span class="term"><code class="varname">ConditionHost=</code>, </span><span class="term"><code class="varname">ConditionKernelCommandLine=</code>, </span><span class="term"><code class="varname">ConditionSecurity=</code>, </span><span class="term"><code class="varname">ConditionCapability=</code>, </span><span class="term"><code class="varname">ConditionACPower=</code>, </span><span class="term"><code class="varname">ConditionNeedsUpdate=</code>, </span><span class="term"><code class="varname">ConditionFirstBoot=</code>, </span><span class="term"><code class="varname">ConditionPathExists=</code>, </span><span class="term"><code class="varname">ConditionPathExistsGlob=</code>, </span><span class="term"><code class="varname">ConditionPathIsDirectory=</code>, </span><span class="term"><code class="varname">ConditionPathIsSymbolicLink=</code>, </span><span class="term"><code class="varname">ConditionPathIsMountPoint=</code>, </span><span class="term"><code class="varname">ConditionPathIsReadWrite=</code>, </span><span class="term"><code class="varname">ConditionDirectoryNotEmpty=</code>, </span><span class="term"><code class="varname">ConditionFileNotEmpty=</code>, </span><span class="term"><code class="varname">ConditionFileIsExecutable=</code>, </span><span class="term"><code class="varname">ConditionNull=</code></span><a class="headerlink" title="Permalink to this term" href="#ConditionArchitecture=">¶</a></dt><dd><p>Before starting a unit
                                 verify that the specified condition is
                                 true. If it is not true, the starting
                                 of the unit will be skipped, however
                                 <code class="varname">x86</code>,
                                 <code class="varname">x86-64</code>,
                                 <code class="varname">ppc</code>,
+                                <code class="varname">ppc-le</code>,
                                 <code class="varname">ppc64</code>,
+                                <code class="varname">ppc64-le</code>,
                                 <code class="varname">ia64</code>,
                                 <code class="varname">parisc</code>,
                                 <code class="varname">parisc64</code>,
                                 <code class="varname">sparc</code>,
                                 <code class="varname">sparc64</code>,
                                 <code class="varname">mips</code>,
+                                <code class="varname">mips-le</code>,
                                 <code class="varname">mips64</code>,
+                                <code class="varname">mips64-le</code>,
                                 <code class="varname">alpha</code>,
                                 <code class="varname">arm</code>,
                                 <code class="varname">arm-be</code>,
                                 <code class="varname">arm64-be</code>,
                                 <code class="varname">sh</code>,
                                 <code class="varname">sh64</code>,
-                                <code class="varname">m86k</code> to test
+                                <code class="varname">m86k</code>,
+                                <code class="varname">tilegx</code>,
+                                <code class="varname">cris</code> to test
                                 against a specific architecture. The
                                 architecture is determined from the
                                 information returned by
-                                <a href="uname.html"><span class="citerefentry"><span class="refentrytitle">uname</span>(2)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man2/uname.2.html"><span class="citerefentry"><span class="refentrytitle">uname</span>(2)</span></a>
                                 and is thus subject to
-                                <a href="personality.html"><span class="citerefentry"><span class="refentrytitle">personality</span>(2)</span></a>. Note
+                                <a href="http://man7.org/linux/man-pages/man2/personality.2.html"><span class="citerefentry"><span class="refentrytitle">personality</span>(2)</span></a>. Note
                                 that a <code class="varname">Personality=</code>
                                 setting in the same unit file has no
                                 effect on this condition. A special
                                 virtualization solution, or one of
                                 <code class="varname">qemu</code>,
                                 <code class="varname">kvm</code>,
+                                <code class="varname">zvm</code>,
                                 <code class="varname">vmware</code>,
                                 <code class="varname">microsoft</code>,
                                 <code class="varname">oracle</code>,
                                 <code class="varname">xen</code>,
                                 <code class="varname">bochs</code>,
-                                <code class="varname">chroot</code>,
                                 <code class="varname">uml</code>,
                                 <code class="varname">openvz</code>,
                                 <code class="varname">lxc</code>,
                                 <code class="varname">lxc-libvirt</code>,
-                                <code class="varname">systemd-nspawn</code> to
-                                test against a specific
-                                implementation. If multiple
-                                virtualization technologies are nested,
-                                only the innermost is considered. The
-                                test may be negated by prepending an
-                                exclamation mark.</p><p><code class="varname">ConditionHost=</code>
+                                <code class="varname">systemd-nspawn</code>,
+                                <code class="varname">docker</code> to test
+                                against a specific implementation. See
+                                <a href="systemd-detect-virt.html"><span class="citerefentry"><span class="refentrytitle">systemd-detect-virt</span>(1)</span></a>
+                                for a full list of known
+                                virtualization technologies and their
+                                identifiers. If multiple
+                                virtualization technologies are
+                                nested, only the innermost is
+                                considered. The test may be negated by
+                                prepending an exclamation mark.</p><p><code class="varname">ConditionHost=</code>
                                 may be used to match against the
                                 hostname or machine ID of the
                                 host. This either takes a hostname
                                 string (optionally with shell style
                                 globs) which is tested against the
                                 locally set hostname as returned by
-                                <a href="gethostname.html"><span class="citerefentry"><span class="refentrytitle">gethostname</span>(2)</span></a>,
+                                <a href="http://man7.org/linux/man-pages/man2/gethostname.2.html"><span class="citerefentry"><span class="refentrytitle">gethostname</span>(2)</span></a>,
                                 or a machine ID formatted as string
                                 (see
                                 <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>).
                                 (i.e. this does not check whether
                                 capability is actually available in
                                 the permitted or effective sets, see
-                                <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
+                                <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>
                                 for details). Pass a capability name
                                 such as "<code class="literal">CAP_MKNOD</code>",
                                 possibly prefixed with an exclamation
                                 <a href="systemd-update-done.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-update-done.service</span>(8)</span></a>,
                                 to make sure they run before the stamp
                                 files's modification time gets reset
-                                indicating a completed update.</p><p>With
+                                indicating a completed update.</p><p><code class="varname">ConditionFirstBoot=</code>
+                                takes a boolean argument. This
+                                condition may be used to
+                                conditionalize units on whether the
+                                system is booting up with an
+                                unpopulated <code class="filename">/etc</code>
+                                directory. This may be used to
+                                populate <code class="filename">/etc</code> on
+                                the first boot after factory reset, or
+                                when a new system instances boots up
+                                for the first time.</p><p>With
                                 <code class="varname">ConditionPathExists=</code>
                                 a file existence condition is
                                 checked before a unit is started. If
                                 an external configuration file format
                                 into native unit files. This
                                 functionality should not be used in
-                                normal units.</p></dd></dl></div></div><div class="refsect1"><a name="idm214195738800"></a><h2 id="[Install] Section Options">[Install] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BInstall%5D%20Section%20Options">¶</a></h2><p>Unit file may include a [Install] section, which
-                carries installation information for the unit. This
-                section is not interpreted by
+                                normal units.</p></dd></dl></div></div><div class="refsect1"><a name="idm214194500064"></a><h2 id="[Install] Section Options">[Install] Section Options<a class="headerlink" title="Permalink to this headline" href="#%5BInstall%5D%20Section%20Options">¶</a></h2><p>Unit file may include an
+                "<code class="literal">[Install]</code>" section, which carries
+                installation information for the unit. This section is
+                not interpreted by
                 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                 during runtime. It is used exclusively by the
                 <span class="command"><strong>enable</strong></span> and
                 <span class="command"><strong>disable</strong></span> commands of the
                 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
-                tool during installation of a unit:</p><div class="variablelist"><dl class="variablelist"><dt id="Alias="><span class="term"><code class="varname">Alias=</code></span><a class="headerlink" title="Permalink to this term" href="#Alias=">¶</a></dt><dd><p>A space-seperated list
+                tool during installation of a unit:</p><div class="variablelist"><dl class="variablelist"><dt id="Alias="><span class="term"><code class="varname">Alias=</code></span><a class="headerlink" title="Permalink to this term" href="#Alias=">¶</a></dt><dd><p>A space-separated list
                                 of additional names this unit shall be
                                 installed under. The names listed here
                                 must have the same suffix (i.e. type)
                                 identifier.</p></dd></dl></div><p>The following specifiers are interpreted in the
                 Install section: %n, %N, %p, %i, %U, %u, %m, %H, %b, %v.
                 For their meaning see the next section.
-                </p></div><div class="refsect1"><a name="idm214195710624"></a><h2 id="Specifiers">Specifiers<a class="headerlink" title="Permalink to this headline" href="#Specifiers">¶</a></h2><p>Many settings resolve specifiers which may be
+                </p></div><div class="refsect1"><a name="idm214194462528"></a><h2 id="Specifiers">Specifiers<a class="headerlink" title="Permalink to this headline" href="#Specifiers">¶</a></h2><p>Many settings resolve specifiers which may be
                 used to write generic unit files referring to runtime
                 or unit parameters that are replaced when the unit
                 files are loaded. The following specifiers are
-                understood:</p><div class="table"><a name="idm214195709312"></a><p class="title"><b>Table 3. Specifiers available in unit files</b></p><div class="table-contents"><table summary="Specifiers available in unit files" border="1"><colgroup><col align="left" class="spec"><col align="left" class="mean"><col align="left" class="detail"></colgroup><thead><tr><th align="left">Specifier</th><th align="left">Meaning</th><th align="left">Details</th></tr></thead><tbody><tr><td align="left">"<code class="literal">%n</code>"</td><td align="left">Full unit name</td><td align="left"> </td></tr><tr><td align="left">"<code class="literal">%N</code>"</td><td align="left">Unescaped full unit name</td><td align="left">Same as "<code class="literal">%n</code>", but with escaping undone</td></tr><tr><td align="left">"<code class="literal">%p</code>"</td><td align="left">Prefix name</td><td align="left">For instantiated units, this refers to the string before the "<code class="literal">@</code>" character of the unit name. For non-instantiated units, this refers to the name of the unit with the type suffix removed.</td></tr><tr><td align="left">"<code class="literal">%P</code>"</td><td align="left">Unescaped prefix name</td><td align="left">Same as "<code class="literal">%p</code>", but with escaping undone</td></tr><tr><td align="left">"<code class="literal">%i</code>"</td><td align="left">Instance name</td><td align="left">For instantiated units: this is the string between the "<code class="literal">@</code>" character and the suffix of the unit name.</td></tr><tr><td align="left">"<code class="literal">%I</code>"</td><td align="left">Unescaped instance name</td><td align="left">Same as "<code class="literal">%i</code>", but with escaping undone</td></tr><tr><td align="left">"<code class="literal">%f</code>"</td><td align="left">Unescaped filename</td><td align="left">This is either the unescaped instance name (if applicable) with <code class="filename">/</code> prepended (if applicable), or the prefix name prepended with <code class="filename">/</code>.</td></tr><tr><td align="left">"<code class="literal">%c</code>"</td><td align="left">Control group path of the unit</td><td align="left">This path does not include the <code class="filename">/sys/fs/cgroup/systemd/</code> prefix.</td></tr><tr><td align="left">"<code class="literal">%r</code>"</td><td align="left">Control group path of the slice the unit is placed in</td><td align="left">This usually maps to the parent cgroup path of "<code class="literal">%c</code>".</td></tr><tr><td align="left">"<code class="literal">%R</code>"</td><td align="left">Root control group path below which slices and units are placed</td><td align="left">For system instances, this resolves to <code class="filename">/</code>, except in containers, where this maps to the container's root control group path.</td></tr><tr><td align="left">"<code class="literal">%t</code>"</td><td align="left">Runtime directory</td><td align="left">This is either <code class="filename">/run</code> (for the system manager) or the path "<code class="literal">$XDG_RUNTIME_DIR</code>" resolves to (for user managers).</td></tr><tr><td align="left">"<code class="literal">%u</code>"</td><td align="left">User name</td><td align="left">This is the name of the configured user of the unit, or (if none is set) the user running the systemd instance.</td></tr><tr><td align="left">"<code class="literal">%U</code>"</td><td align="left">User UID</td><td align="left">This is the numeric UID of the configured user of the unit, or (if none is set) the user running the systemd user instance. Note that this specifier is not available for units run by the systemd system instance (as opposed to those run by a systemd user instance), unless the user has been configured as a numeric UID in the first place or the configured user is the root user.</td></tr><tr><td align="left">"<code class="literal">%h</code>"</td><td align="left">User home directory</td><td align="left">This is the home directory of the configured user of the unit, or (if none is set) the user running the systemd user instance. Similar to "<code class="literal">%U</code>", this specifier is not available for units run by the systemd system instance, unless the configured user is the root user.</td></tr><tr><td align="left">"<code class="literal">%s</code>"</td><td align="left">User shell</td><td align="left">This is the shell of the configured user of the unit, or (if none is set) the user running the systemd user instance. Similar to "<code class="literal">%U</code>", this specifier is not available for units run by the systemd system instance, unless the configured user is the root user.</td></tr><tr><td align="left">"<code class="literal">%m</code>"</td><td align="left">Machine ID</td><td align="left">The machine ID of the running system, formatted as string. See <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%b</code>"</td><td align="left">Boot ID</td><td align="left">The boot ID of the running system, formatted as string. See <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%H</code>"</td><td align="left">Host name</td><td align="left">The hostname of the running system at the point in time the unit configuation is loaded.</td></tr><tr><td align="left">"<code class="literal">%v</code>"</td><td align="left">Kernel release</td><td align="left">Identical to <span class="command"><strong>uname -r</strong></span> output</td></tr><tr><td align="left">"<code class="literal">%%</code>"</td><td align="left">Single percent sign</td><td align="left">Use "<code class="literal">%%</code>" in place of "<code class="literal">%</code>" to specify a single percent sign.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214195651232"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                understood:</p><div class="table"><a name="idm214194461216"></a><p class="title"><b>Table 3. Specifiers available in unit files</b></p><div class="table-contents"><table summary="Specifiers available in unit files" border="1"><colgroup><col align="left" class="spec"><col align="left" class="mean"><col align="left" class="detail"></colgroup><thead><tr><th align="left">Specifier</th><th align="left">Meaning</th><th align="left">Details</th></tr></thead><tbody><tr><td align="left">"<code class="literal">%n</code>"</td><td align="left">Full unit name</td><td align="left"> </td></tr><tr><td align="left">"<code class="literal">%N</code>"</td><td align="left">Unescaped full unit name</td><td align="left">Same as "<code class="literal">%n</code>", but with escaping undone</td></tr><tr><td align="left">"<code class="literal">%p</code>"</td><td align="left">Prefix name</td><td align="left">For instantiated units, this refers to the string before the "<code class="literal">@</code>" character of the unit name. For non-instantiated units, this refers to the name of the unit with the type suffix removed.</td></tr><tr><td align="left">"<code class="literal">%P</code>"</td><td align="left">Unescaped prefix name</td><td align="left">Same as "<code class="literal">%p</code>", but with escaping undone</td></tr><tr><td align="left">"<code class="literal">%i</code>"</td><td align="left">Instance name</td><td align="left">For instantiated units: this is the string between the "<code class="literal">@</code>" character and the suffix of the unit name.</td></tr><tr><td align="left">"<code class="literal">%I</code>"</td><td align="left">Unescaped instance name</td><td align="left">Same as "<code class="literal">%i</code>", but with escaping undone</td></tr><tr><td align="left">"<code class="literal">%f</code>"</td><td align="left">Unescaped filename</td><td align="left">This is either the unescaped instance name (if applicable) with <code class="filename">/</code> prepended (if applicable), or the prefix name prepended with <code class="filename">/</code>.</td></tr><tr><td align="left">"<code class="literal">%c</code>"</td><td align="left">Control group path of the unit</td><td align="left">This path does not include the <code class="filename">/sys/fs/cgroup/systemd/</code> prefix.</td></tr><tr><td align="left">"<code class="literal">%r</code>"</td><td align="left">Control group path of the slice the unit is placed in</td><td align="left">This usually maps to the parent cgroup path of "<code class="literal">%c</code>".</td></tr><tr><td align="left">"<code class="literal">%R</code>"</td><td align="left">Root control group path below which slices and units are placed</td><td align="left">For system instances, this resolves to <code class="filename">/</code>, except in containers, where this maps to the container's root control group path.</td></tr><tr><td align="left">"<code class="literal">%t</code>"</td><td align="left">Runtime directory</td><td align="left">This is either <code class="filename">/run</code> (for the system manager) or the path "<code class="literal">$XDG_RUNTIME_DIR</code>" resolves to (for user managers).</td></tr><tr><td align="left">"<code class="literal">%u</code>"</td><td align="left">User name</td><td align="left">This is the name of the configured user of the unit, or (if none is set) the user running the systemd instance.</td></tr><tr><td align="left">"<code class="literal">%U</code>"</td><td align="left">User UID</td><td align="left">This is the numeric UID of the configured user of the unit, or (if none is set) the user running the systemd user instance. Note that this specifier is not available for units run by the systemd system instance (as opposed to those run by a systemd user instance), unless the user has been configured as a numeric UID in the first place or the configured user is the root user.</td></tr><tr><td align="left">"<code class="literal">%h</code>"</td><td align="left">User home directory</td><td align="left">This is the home directory of the configured user of the unit, or (if none is set) the user running the systemd user instance. Similar to "<code class="literal">%U</code>", this specifier is not available for units run by the systemd system instance, unless the configured user is the root user.</td></tr><tr><td align="left">"<code class="literal">%s</code>"</td><td align="left">User shell</td><td align="left">This is the shell of the configured user of the unit, or (if none is set) the user running the systemd user instance. Similar to "<code class="literal">%U</code>", this specifier is not available for units run by the systemd system instance, unless the configured user is the root user.</td></tr><tr><td align="left">"<code class="literal">%m</code>"</td><td align="left">Machine ID</td><td align="left">The machine ID of the running system, formatted as string. See <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%b</code>"</td><td align="left">Boot ID</td><td align="left">The boot ID of the running system, formatted as string. See <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%H</code>"</td><td align="left">Host name</td><td align="left">The hostname of the running system at the point in time the unit configuation is loaded.</td></tr><tr><td align="left">"<code class="literal">%v</code>"</td><td align="left">Kernel release</td><td align="left">Identical to <span class="command"><strong>uname -r</strong></span> output</td></tr><tr><td align="left">"<code class="literal">%%</code>"</td><td align="left">Single percent sign</td><td align="left">Use "<code class="literal">%%</code>" in place of "<code class="literal">%</code>" to specify a single percent sign.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm214194403136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
+                        <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                         <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
                         <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                         <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
                         <a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a>,
                         <a href="systemd.slice.html"><span class="citerefentry"><span class="refentrytitle">systemd.slice</span>(5)</span></a>,
                         <a href="systemd.time.html"><span class="citerefentry"><span class="refentrytitle">systemd.time</span>(7)</span></a>,
-                        <a href="capabilities.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>,
+                        <a href="systemd-verify.html"><span class="citerefentry"><span class="refentrytitle">systemd-verify</span>(1)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html"><span class="citerefentry"><span class="refentrytitle">capabilities</span>(7)</span></a>,
                         <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
                         <a href="uname.html"><span class="citerefentry"><span class="refentrytitle">uname</span>(1)</span></a>
                 </p></div></div></body></html>
index 960fb90dbd1d8080bbb97958327b0574b5270300..803eff24aa691e918e0e74939ac758222d286ca3 100644 (file)
                 <para><literallayout><filename>$XDG_CONFIG_HOME/systemd/user/*</filename>
 <filename>$HOME/.config/systemd/user/*</filename>
 <filename>/etc/systemd/user/*</filename>
+<filename>$XDG_RUNTIME_DIR/systemd/user/*</filename>
 <filename>/run/systemd/user/*</filename>
+<filename>$XDG_DATA_HOME/systemd/user/*</filename>
+<filename>$HOME/.local/share/systemd/user/*</filename>
 <filename>/usr/lib/systemd/user/*</filename>
 <filename>...</filename>
                 </literallayout></para>
                 <filename>foo.service.wants/</filename> may exist. All
                 unit files symlinked from such a directory are
                 implicitly added as dependencies of type
-                <varname>Wanted=</varname> to the unit. This is useful
+                <varname>Wants=</varname> to the unit. This is useful
                 to hook units into the start-up of other units,
                 without having to modify their unit files. For details
-                about the semantics of <varname>Wanted=</varname>, see
+                about the semantics of <varname>Wants=</varname>, see
                 below. The preferred way to create symlinks in the
                 <filename>.wants/</filename> directory of a unit file
                 is with the <command>enable</command> command of the
                 settings to a unit, without having to modify their
                 unit files. Make sure that the file that is included
                 has the appropriate section headers before any
-                directive.</para>
+                directive. Note that for instanced units this logic
+                will first look for the instance
+                <literal>.d/</literal> subdirectory and read its
+                <literal>.conf</literal> files, followed by the
+                template <literal>.d/</literal> subdirectory and reads
+                its <literal>.conf</literal> files.</para>
 
                 <para>Note that while systemd offers a flexible
                 dependency system between units it is recommended to
                 result is usable as part of a filename. Basically,
                 given a path, "/" is replaced by "-", and all
                 unprintable characters and the "-" are replaced by
-                C-style "\x20" escapes. The root directory "/" is
+                C-style "\x2d" escapes. The root directory "/" is
                 encoded as single dash, while otherwise the initial
                 and ending "/" is removed from all paths during
                 transformation. This escaping is reversible.</para>
                 (<option>--user</option>) and the variable
                 <varname>$SYSTEMD_UNIT_PATH</varname> is set, this
                 contents of this variable overrides the unit load
-                path.
-                </para>
+                path. If <varname>$SYSTEMD_UNIT_PATH</varname> ends
+                with an empty component (<literal>:</literal>), the
+                usual unit load path will be appended to the contents
+                of the variable.</para>
 
                 <table>
                   <title>
                         <entry><filename>/etc/systemd/user</filename></entry>
                         <entry>Local configuration</entry>
                       </row>
+                      <row>
+                        <entry><filename>$XDG_RUNTIME_DIR/systemd/user</filename></entry>
+                        <entry>Runtime units (only used when $XDG_RUNTIME_DIR is set)</entry>
+                      </row>
                       <row>
                         <entry><filename>/run/systemd/user</filename></entry>
                         <entry>Runtime units</entry>
                       </row>
+                      <row>
+                        <entry><filename>$XDG_DATA_HOME/systemd/user</filename></entry>
+                        <entry>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is set)</entry>
+                      </row>
+                      <row>
+                        <entry><filename>$HOME/.local/share/systemd/user</filename></entry>
+                        <entry>Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set)</entry>
+                      </row>
                       <row>
                         <entry><filename>/usr/lib/systemd/user</filename></entry>
-                        <entry>Units of installed packages</entry>
+                        <entry>Units of packages that have been installed system-wide</entry>
                       </row>
                     </tbody>
                   </tgroup>
                                 <literal>man:</literal>. For more
                                 information about the syntax of these
                                 URIs, see
-                                <citerefentry><refentrytitle>uri</refentrytitle><manvolnum>7</manvolnum></citerefentry>. The
+                                <citerefentry project='man-pages'><refentrytitle>uri</refentrytitle><manvolnum>7</manvolnum></citerefentry>. The
                                 URIs should be listed in order of
                                 relevance, starting with the most
                                 relevant. It is a good idea to first
 
                         <varlistentry>
                                 <term><varname>JobTimeoutSec=</varname></term>
-
-                                <listitem><para>When clients are
-                                waiting for a job of this unit to
-                                complete, time out after the specified
-                                time. If this time limit is reached,
-                                the job will be cancelled, the unit
-                                however will not change state or even
-                                enter the <literal>failed</literal>
-                                mode. This value defaults to 0 (job
-                                timeouts disabled), except for device
+                                <term><varname>JobTimeoutAction=</varname></term>
+                                <term><varname>JobTimeoutRebootArgument=</varname></term>
+
+                                <listitem><para>When a job for this
+                                unit is queued a time-out may be
+                                configured. If this time limit is
+                                reached, the job will be cancelled,
+                                the unit however will not change state
+                                or even enter the
+                                <literal>failed</literal> mode. This
+                                value defaults to 0 (job timeouts
+                                disabled), except for device
                                 units. NB: this timeout is independent
                                 from any unit-specific timeout (for
                                 example, the timeout set with
-                                <varname>Timeout=</varname> in service
+                                <varname>StartTimeoutSec=</varname> in service
                                 units) as the job timeout has no
                                 effect on the unit itself, only on the
                                 job that might be pending for it. Or
                                 timeout set with this option however
                                 is useful to abort only the job
                                 waiting for the unit state to
-                                change.</para></listitem>
+                                change.</para>
+
+                                <para><varname>JobTimeoutAction=</varname>
+                                optionally configures an additional
+                                action to take when the time-out is
+                                hit. It takes the same values as the
+                                per-service
+                                <varname>StartLimitAction=</varname>
+                                setting, see
+                                <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                for details. Defaults to
+                                <option>none</option>. <varname>JobTimeoutRebootArgument=</varname>
+                                configures an optional reboot string
+                                to pass to the
+                                <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+                                system call.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
                                 <term><varname>ConditionCapability=</varname></term>
                                 <term><varname>ConditionACPower=</varname></term>
                                 <term><varname>ConditionNeedsUpdate=</varname></term>
+                                <term><varname>ConditionFirstBoot=</varname></term>
                                 <term><varname>ConditionPathExists=</varname></term>
                                 <term><varname>ConditionPathExistsGlob=</varname></term>
                                 <term><varname>ConditionPathIsDirectory=</varname></term>
                                 <varname>x86</varname>,
                                 <varname>x86-64</varname>,
                                 <varname>ppc</varname>,
+                                <varname>ppc-le</varname>,
                                 <varname>ppc64</varname>,
+                                <varname>ppc64-le</varname>,
                                 <varname>ia64</varname>,
                                 <varname>parisc</varname>,
                                 <varname>parisc64</varname>,
                                 <varname>sparc</varname>,
                                 <varname>sparc64</varname>,
                                 <varname>mips</varname>,
+                                <varname>mips-le</varname>,
                                 <varname>mips64</varname>,
+                                <varname>mips64-le</varname>,
                                 <varname>alpha</varname>,
                                 <varname>arm</varname>,
                                 <varname>arm-be</varname>,
                                 <varname>arm64-be</varname>,
                                 <varname>sh</varname>,
                                 <varname>sh64</varname>,
-                                <varname>m86k</varname> to test
+                                <varname>m86k</varname>,
+                                <varname>tilegx</varname>,
+                                <varname>cris</varname> to test
                                 against a specific architecture. The
                                 architecture is determined from the
                                 information returned by
                                 virtualization solution, or one of
                                 <varname>qemu</varname>,
                                 <varname>kvm</varname>,
+                                <varname>zvm</varname>,
                                 <varname>vmware</varname>,
                                 <varname>microsoft</varname>,
                                 <varname>oracle</varname>,
                                 <varname>xen</varname>,
                                 <varname>bochs</varname>,
-                                <varname>chroot</varname>,
                                 <varname>uml</varname>,
                                 <varname>openvz</varname>,
                                 <varname>lxc</varname>,
                                 <varname>lxc-libvirt</varname>,
-                                <varname>systemd-nspawn</varname> to
-                                test against a specific
-                                implementation. If multiple
-                                virtualization technologies are nested,
-                                only the innermost is considered. The
-                                test may be negated by prepending an
-                                exclamation mark.</para>
+                                <varname>systemd-nspawn</varname>,
+                                <varname>docker</varname> to test
+                                against a specific implementation. See
+                                <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                                for a full list of known
+                                virtualization technologies and their
+                                identifiers. If multiple
+                                virtualization technologies are
+                                nested, only the innermost is
+                                considered. The test may be negated by
+                                prepending an exclamation mark.</para>
 
                                 <para><varname>ConditionHost=</varname>
                                 may be used to match against the
                                 (i.e. this does not check whether
                                 capability is actually available in
                                 the permitted or effective sets, see
-                                <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+                                <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                                 for details). Pass a capability name
                                 such as <literal>CAP_MKNOD</literal>,
                                 possibly prefixed with an exclamation
                                 files's modification time gets reset
                                 indicating a completed update.</para>
 
+                                <para><varname>ConditionFirstBoot=</varname>
+                                takes a boolean argument. This
+                                condition may be used to
+                                conditionalize units on whether the
+                                system is booting up with an
+                                unpopulated <filename>/etc</filename>
+                                directory. This may be used to
+                                populate <filename>/etc</filename> on
+                                the first boot after factory reset, or
+                                when a new system instances boots up
+                                for the first time.</para>
+
                                 <para>With
                                 <varname>ConditionPathExists=</varname>
                                 a file existence condition is
         <refsect1>
                 <title>[Install] Section Options</title>
 
-                <para>Unit file may include a [Install] section, which
-                carries installation information for the unit. This
-                section is not interpreted by
+                <para>Unit file may include an
+                <literal>[Install]</literal> section, which carries
+                installation information for the unit. This section is
+                not interpreted by
                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 during runtime. It is used exclusively by the
                 <command>enable</command> and
                         <varlistentry>
                                 <term><varname>Alias=</varname></term>
 
-                                <listitem><para>A space-seperated list
+                                <listitem><para>A space-separated list
                                 of additional names this unit shall be
                                 installed under. The names listed here
                                 must have the same suffix (i.e. type)
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-verify</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>uname</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
index 331e6c2ff6c4e770c905336ec04fd39e614a381c..bf7a7a6f67209c7dc4384d1e3c9af46ef1b191b4 100644 (file)
                                 target. Argument must be one of
                                 <option>console</option>,
                                 <option>journal</option>,
-                                <option>syslog</option>,
                                 <option>kmsg</option>,
                                 <option>journal-or-kmsg</option>,
-                                <option>syslog-or-kmsg</option>,
                                 <option>null</option>.</para></listitem>
                         </varlistentry>
                         <varlistentry>
 
                                 <listitem><para>Set log level. As
                                 argument this accepts a numerical log
-                                level or the well-known <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                                level or the well-known <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                                 symbolic names (lowercase):
                                 <option>emerg</option>,
                                 <option>alert</option>,
                 file system hierarchy (beneath
                 <filename>/sys/fs/cgroup/systemd/</filename>), or in tools
                 such as
-                <citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 (<command>ps xawf -eo pid,user,cgroup,args</command>
                 is particularly useful to list all processes and the
                 systemd units they belong to.).</para>
                                 <term><constant>SIGRTMIN+26</constant></term>
                                 <term><constant>SIGRTMIN+27</constant></term>
                                 <term><constant>SIGRTMIN+28</constant></term>
-                                <term><constant>SIGRTMIN+29</constant></term>
 
                                 <listitem><para>Sets the log level to
-                                <literal>journal-or-kmsg</literal>
-                                (or <literal>console</literal> on
+                                <literal>journal-or-kmsg</literal> (or
+                                <literal>console</literal> on
                                 <constant>SIGRTMIN+27</constant>,
                                 <literal>kmsg</literal> on
-                                <constant>SIGRTMIN+28</constant>,
-                                or <literal>syslog-or-kmsg</literal>
-                                on <constant>SIGRTMIN+29</constant>), as
+                                <constant>SIGRTMIN+28</constant>), as
                                 controlled via
                                 <varname>systemd.log_target=journal-or-kmsg</varname>
-                                (or <varname>systemd.log_target=console</varname>
-                                on <constant>SIGRTMIN+27</constant>,
+                                (or
+                                <varname>systemd.log_target=console</varname>
+                                on <constant>SIGRTMIN+27</constant> or
                                 <varname>systemd.log_target=kmsg</varname>
-                                on <constant>SIGRTMIN+28</constant>,
-                                or
-                                <varname>systemd.log_target=syslog-or-kmsg</varname>
-                                on <constant>SIGRTMIN+29</constant>) on
-                                the kernel command
+                                on <constant>SIGRTMIN+28</constant>)
+                                on the kernel command
                                 line.</para></listitem>
                         </varlistentry>
                 </variablelist>
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>-b</varname></term>
                                 <term><varname>emergency</varname></term>
+                                <term><varname>-b</varname></term>
 
                                 <listitem><para>Boot into emergency
                                 mode. This is equivalent to
                                 <varname>systemd.unit=emergency.target</varname>
-                                and provided for compatibility
-                                reasons and to be easier to type.</para></listitem>
+                                and provided for compatibility reasons
+                                and to be easier to
+                                type.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
+                                <term><varname>rescue</varname></term>
                                 <term><varname>single</varname></term>
                                 <term><varname>s</varname></term>
                                 <term><varname>S</varname></term>
                         <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
                 </para>
         </refsect1>
index c9315b68225305419a0f953853b9d187a24c5a41..b64cd9cfdc5f009defa1a0db9311d5e9a05b772e 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "SYSUSERS\&.D" "5" "" "systemd 215" "sysusers.d"
+.TH "SYSUSERS\&.D" "5" "" "systemd 217" "sysusers.d"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -28,20 +28,20 @@ sysusers.d \- Declarative allocation of system users and groups
 .PP
 \fBsystemd\-sysusers\fR
 uses the files from
-/usr/lib/sysusers\&.d/
-to create system users and groups at package installation or boot time\&. This tool may be used for allocating system users and groups only, it is not useful for creating non\-system users and groups, as it accessed
+sysusers\&.d
+directory to create system users and groups at package installation or boot time\&. This tool may be used to allocate system users and groups only, it is not useful for creating non\-system users and groups, as it accesses
 /etc/passwd
 and
 /etc/group
-directly, bypassing any more complex user database, for example any database involving NIS or LDAP\&.
-.SH "FILE FORMAT"
+directly, bypassing any more complex user databases, for example any database involving NIS or LDAP\&.
+.SH "CONFIGURATION FORMAT"
 .PP
-Each file shall be named in the style of
-\fIpackage\fR\&.conf\&.
+Each configuration file shall be named in the style of
+\fIpackage\fR\&.conf
+or
+\fIpackage\fR\-\fIpart\fR\&.conf\&. The second variant should be used when it is desirable to make it easy to override just this part of configuration\&.
 .PP
-All files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in\&. If multiple files specify the same user or group, the entry in the file with the lexicographically earliest name will be applied, all all other conflicting entries will be logged as errors\&. Users and groups are processed in the order they are listed\&.
-.PP
-The file format is one line per user or group containing name, ID and GECOS field description:
+The file format is one line per user or group containing name, ID, GECOS field description and home directory:
 .sp
 .if n \{\
 .RS 4
@@ -52,6 +52,7 @@ u httpd 440 "HTTP User"
 u authd /usr/bin/authd "Authorization user"
 g input \- \-
 m authd input
+u root 0 "Superuser" /root
 .fi
 .if n \{\
 .RE
@@ -63,8 +64,9 @@ The type consists of a single letter\&. The following line types are understood:
 \fIu\fR
 .RS 4
 Create a system user and group of the specified name should they not exist yet\&. The user\*(Aqs primary group will be set to the group bearing the same name\&. The user\*(Aqs shell will be set to
-/sbin/login, the home directory to
-/\&. The account will be created disabled, so that logins are not allowed\&.
+/sbin/nologin, the home directory to the specified home directory, or
+/
+if none is given\&. The account will be created disabled, so that logins are not allowed\&.
 .RE
 .PP
 \fIg\fR
@@ -78,32 +80,84 @@ implicitly create a matching group\&. The group will be created with no password
 .RS 4
 Add a user to a group\&. If the user or group are not existing yet, they will be implicitly created\&.
 .RE
+.PP
+\fIr\fR
+.RS 4
+Add a range of numeric UIDs/GIDs to the pool to allocate new UIDs and GIDs from\&. If no line of this type is specified the range of UIDs/GIDs is set to some compiled\-in default\&. Note that both UIDs and GIDs are allocated from the same pool, in order to ensure that users and groups of the same name are likely to carry the same numeric UID and GID\&.
+.RE
 .SS "Name"
 .PP
-The name field specifies the user or group name\&. It should be be shorter than 256 characters and avoid any non\-ASCII characters, and not begin with a numeric character\&. It is strongly recommended to pick user and group names that are unlikely to clash with normal users created by the administrator\&. A good scheme to guarantee this is by prefixing all system and group names with the underscore, and avoiding too generic names\&.
+The name field specifies the user or group name\&. It should be shorter than 31 characters and avoid any non\-ASCII characters, and not begin with a numeric character\&. It is strongly recommended to pick user and group names that are unlikely to clash with normal users created by the administrator\&. A good scheme to guarantee this is by prefixing all system and group names with the underscore, and avoiding too generic names\&.
 .PP
 For
 \fIm\fR
 lines this field should contain the user name to add to a group\&.
+.PP
+For lines of type
+\fIr\fR
+this field should be set to
+"\-"\&.
 .SS "ID"
 .PP
 For
 \fIu\fR
 and
 \fIg\fR
-the numeric 32bit UID or GID of the user/group\&. Do not use IDs 65535 or 4294967295, as they have special placeholder meanings\&. Specify "\-" for automatic UID/GID allocation for the user or group\&. Alternatively, specify an absolute path in the file system\&. In this case the UID/GID is read from the path\*(Aqs owner/group\&. This is useful to create users whose UID/GID match the owners of pre\-existing files (such as SUID or SGID binaries)\&.
+the numeric 32bit UID or GID of the user/group\&. Do not use IDs 65535 or 4294967295, as they have special placeholder meanings\&. Specify
+"\-"
+for automatic UID/GID allocation for the user or group\&. Alternatively, specify an absolute path in the file system\&. In this case the UID/GID is read from the path\*(Aqs owner/group\&. This is useful to create users whose UID/GID match the owners of pre\-existing files (such as SUID or SGID binaries)\&.
 .PP
 For
 \fIm\fR
 lines this field should contain the group name to add to a user to\&.
+.PP
+For lines of type
+\fIr\fR
+this field should be set to a UID/GID range in the format
+"FROM\-TO"
+where both values are formatted as decimal ASCII numbers\&. Alternatively, a single UID/GID may be specified formatted as decimal ASCII numbers\&.
 .SS "GECOS"
 .PP
 A short, descriptive string for users to be created, enclosed in quotation marks\&. Note that this field may not contain colons\&.
 .PP
 Only applies to lines of type
 \fIu\fR
-and should otherwise be left unset\&.
+and should otherwise be left unset, or be set to
+"\-"\&.
+.SS "Home Directory"
+.PP
+The home directory for a new system user\&. If omitted defaults to the root directory\&. It is recommended to not unnecessarily specify home directories for system users, unless software strictly requires one to be set\&.
+.PP
+Only applies to lines of type
+\fIu\fR
+and should otherwise be left unset, or be set to
+"\-"\&.
+.SH "OVERRIDING VENDOR CONFIGURATION"
+.PP
+Note that
+\fBsystemd\-sysusers\fR
+will do nothing if the specified users or groups already exist, so normally there no reason to override
+sysusers\&.d
+vendor configuration, except to block certain users or groups from being created\&.
+.PP
+Files in
+/etc/sysusers\&.d
+override files with the same name in
+/usr/lib/sysusers\&.d
+and
+/run/sysusers\&.d\&. Files in
+/run/sysusers\&.d
+override files with the same name in
+/usr/lib/sysusers\&.d\&. The scheme is the same as for
+\fBtmpfiles.d\fR(5), except for the directory name\&.
+.PP
+If the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to
+/dev/null
+in
+/etc/sysusers\&.d/
+bearing the same filename\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd\fR(1),
-\fBsystemd-sysusers\fR(8)
+\fBsystemd-sysusers\fR(8),
+\fBtmpfiles.d\fR(5)
index 42dec26004708219852d60f4abd53a568a64bdaf..a8796dd5e80ff24fa7d99c6e13b0500dbb646154 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="sysusers.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sysusers.d — Declarative allocation of system users and groups</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/sysusers.d/*.conf</code></p></div><div class="refsect1"><a name="idm214170527280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-sysusers</strong></span> uses the
-                files from <code class="filename">/usr/lib/sysusers.d/</code>
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="sysusers.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sysusers.d — Declarative allocation of system users and groups</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/usr/lib/sysusers.d/*.conf</code></p></div><div class="refsect1"><a name="idm214169941664"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-sysusers</strong></span> uses the
+                files from <code class="filename">sysusers.d</code> directory
                 to create system users and groups at package
-                installation or boot time. This tool may be used for
-                allocating system users and groups only, it is not
+                installation or boot time. This tool may be used to
+                allocate system users and groups only, it is not
                 useful for creating non-system users and groups, as it
-                accessed <code class="filename">/etc/passwd</code> and
+                accesses <code class="filename">/etc/passwd</code> and
                 <code class="filename">/etc/group</code> directly, bypassing
-                any more complex user database, for example any
-                database involving NIS or LDAP.</p></div><div class="refsect1"><a name="idm214170523056"></a><h2 id="File Format">File Format<a class="headerlink" title="Permalink to this headline" href="#File%20Format">¶</a></h2><p>Each file shall be named in the style of
-                <code class="filename"><em class="replaceable"><code>package</code></em>.conf</code>.</p><p>All files are sorted by their filename in
-                lexicographic order, regardless of which of the
-                directories they reside in. If multiple files specify
-                the same user or group, the entry in the file with the
-                lexicographically earliest name will be applied, all
-                all other conflicting entries will be logged as
-                errors. Users and groups are
-                processed in the order they are listed.</p><p>The file format is one line per user or group
-                containing name, ID and GECOS field description:</p><pre class="programlisting"># Type Name ID GECOS
+                any more complex user databases, for example any
+                database involving NIS or LDAP.</p></div><div class="refsect1"><a name="idm214169937424"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>Each configuration file shall be named in the
+                style of
+                <code class="filename"><em class="replaceable"><code>package</code></em>.conf</code>
+                or
+                <code class="filename"><em class="replaceable"><code>package</code></em>-<em class="replaceable"><code>part</code></em>.conf</code>.
+                The second variant should be used when it is desirable
+                to make it easy to override just this part of
+                configuration.</p><p>The file format is one line per user or group
+                containing name, ID, GECOS field description and home directory:</p><pre class="programlisting"># Type Name ID GECOS
 u httpd 440 "HTTP User"
 u authd /usr/bin/authd "Authorization user"
 g input - -
-m authd input</pre><div class="refsect2"><a name="idm214170518848"></a><h3 id="Type">Type<a class="headerlink" title="Permalink to this headline" href="#Type">¶</a></h3><p>The type consists of a single
+m authd input
+u root 0 "Superuser" /root</pre><div class="refsect2"><a name="idm214169932432"></a><h3 id="Type">Type<a class="headerlink" title="Permalink to this headline" href="#Type">¶</a></h3><p>The type consists of a single
                         letter. The following line types are
                         understood:</p><div class="variablelist"><dl class="variablelist"><dt id="u"><span class="term"><code class="varname">u</code></span><a class="headerlink" title="Permalink to this term" href="#u">¶</a></dt><dd><p>Create a
                                         system user and group of the
@@ -50,12 +50,14 @@ m authd input</pre><div class="refsect2"><a name="idm214170518848"></a><h3 id="T
                                         group will be set to the group
                                         bearing the same name. The
                                         user's shell will be set to
-                                        <code class="filename">/sbin/login</code>,
-                                        the home directory to
-                                        <code class="filename">/</code>. The
-                                        account will be created
-                                        disabled, so that logins are
-                                        not allowed.</p></dd><dt id="g"><span class="term"><code class="varname">g</code></span><a class="headerlink" title="Permalink to this term" href="#g">¶</a></dt><dd><p>Create a
+                                        <code class="filename">/sbin/nologin</code>,
+                                        the home directory to the
+                                        specified home directory, or
+                                        <code class="filename">/</code> if none
+                                        is given. The account will be
+                                        created disabled, so that
+                                        logins are not
+                                        allowed.</p></dd><dt id="g"><span class="term"><code class="varname">g</code></span><a class="headerlink" title="Permalink to this term" href="#g">¶</a></dt><dd><p>Create a
                                         system group of the specified
                                         name should it not exist
                                         yet. Note that
@@ -67,8 +69,21 @@ m authd input</pre><div class="refsect2"><a name="idm214170518848"></a><h3 id="T
                                         a group. If the user or group
                                         are not existing yet, they
                                         will be implicitly
-                                        created.</p></dd></dl></div></div><div class="refsect2"><a name="idm214174461584"></a><h3 id="Name">Name<a class="headerlink" title="Permalink to this headline" href="#Name">¶</a></h3><p>The name field specifies the user or
-                        group name. It should be be shorter than 256
+                                        created.</p></dd><dt id="r"><span class="term"><code class="varname">r</code></span><a class="headerlink" title="Permalink to this term" href="#r">¶</a></dt><dd><p>Add a range of
+                                        numeric UIDs/GIDs to the pool
+                                        to allocate new UIDs and GIDs
+                                        from. If no line of this type
+                                        is specified the range of
+                                        UIDs/GIDs is set to some
+                                        compiled-in default. Note that
+                                        both UIDs and GIDs are
+                                        allocated from the same pool,
+                                        in order to ensure that users
+                                        and groups of the same name
+                                        are likely to carry the same
+                                        numeric UID and
+                                        GID.</p></dd></dl></div></div><div class="refsect2"><a name="idm214173873440"></a><h3 id="Name">Name<a class="headerlink" title="Permalink to this headline" href="#Name">¶</a></h3><p>The name field specifies the user or
+                        group name. It should be shorter than 31
                         characters and avoid any non-ASCII characters,
                         and not begin with a numeric character. It is
                         strongly recommended to pick user and group
@@ -78,12 +93,14 @@ m authd input</pre><div class="refsect2"><a name="idm214170518848"></a><h3 id="T
                         system and group names with the underscore,
                         and avoiding too generic names.</p><p>For <code class="varname">m</code> lines this
                         field should contain the user name to add to a
-                        group.</p></div><div class="refsect2"><a name="idm214174458848"></a><h3 id="ID">ID<a class="headerlink" title="Permalink to this headline" href="#ID">¶</a></h3><p>For <code class="varname">u</code> and
+                        group.</p><p>For lines of type <code class="varname">r</code>
+                        this field should be set to
+                        "<code class="literal">-</code>".</p></div><div class="refsect2"><a name="idm214173868576"></a><h3 id="ID">ID<a class="headerlink" title="Permalink to this headline" href="#ID">¶</a></h3><p>For <code class="varname">u</code> and
                         <code class="varname">g</code> the numeric 32bit UID or
                         GID of the user/group. Do not use IDs 65535 or
                         4294967295, as they have special placeholder
-                        meanings. Specify "-" for automatic UID/GID
-                        allocation for the user or
+                        meanings. Specify "<code class="literal">-</code>" for
+                        automatic UID/GID allocation for the user or
                         group. Alternatively, specify an absolute path
                         in the file system. In this case the UID/GID
                         is read from the path's owner/group. This is
@@ -91,11 +108,45 @@ m authd input</pre><div class="refsect2"><a name="idm214170518848"></a><h3 id="T
                         owners of pre-existing files (such as SUID or
                         SGID binaries).</p><p>For <code class="varname">m</code> lines this
                         field should contain the group name to add to
-                        a user to.</p></div><div class="refsect2"><a name="idm214174454560"></a><h3 id="GECOS">GECOS<a class="headerlink" title="Permalink to this headline" href="#GECOS">¶</a></h3><p>A short, descriptive string for users to
+                        a user to.</p><p>For lines of type <code class="varname">r</code>
+                        this field should be set to a UID/GID range in
+                        the format "<code class="literal">FROM-TO</code>" where
+                        both values are formatted as decimal ASCII
+                        numbers. Alternatively, a single UID/GID may
+                        be specified formatted as decimal ASCII
+                        numbers.</p></div><div class="refsect2"><a name="idm214173855200"></a><h3 id="GECOS">GECOS<a class="headerlink" title="Permalink to this headline" href="#GECOS">¶</a></h3><p>A short, descriptive string for users to
                         be created, enclosed in quotation marks. Note
                         that this field may not contain colons.</p><p>Only applies to lines of type
                         <code class="varname">u</code> and should otherwise be
-                        left unset.</p></div></div><div class="refsect1"><a name="idm214174452288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        left unset, or be set to
+                        "<code class="literal">-</code>".</p></div><div class="refsect2"><a name="idm214173852288"></a><h3 id="Home Directory">Home Directory<a class="headerlink" title="Permalink to this headline" href="#Home%20Directory">¶</a></h3><p>The home directory for a new system
+                        user. If omitted defaults to the root
+                        directory. It is recommended to not
+                        unnecessarily specify home directories for
+                        system users, unless software strictly
+                        requires one to be set.</p><p>Only applies to lines of type
+                        <code class="varname">u</code> and should otherwise be
+                        left unset, or be set to
+                        "<code class="literal">-</code>".</p></div></div><div class="refsect1"><a name="idm214173849088"></a><h2 id="Overriding vendor configuration">Overriding vendor configuration<a class="headerlink" title="Permalink to this headline" href="#Overriding%20vendor%20configuration">¶</a></h2><p>Note that <span class="command"><strong>systemd-sysusers</strong></span>
+                will do nothing if the specified users or groups
+                already exist, so normally there no reason to override
+                <code class="filename">sysusers.d</code> vendor configuration,
+                except to block certain users or groups from being
+                created.</p><p>Files in <code class="filename">/etc/sysusers.d</code>
+                override files with the same name in
+                <code class="filename">/usr/lib/sysusers.d</code> and
+                <code class="filename">/run/sysusers.d</code>. Files in
+                <code class="filename">/run/sysusers.d</code> override files
+                with the same name in
+                <code class="filename">/usr/lib/sysusers.d</code>. The scheme is the same as for
+                <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>,
+                except for the directory name.</p><p>If the administrator wants to disable a
+                configuration file supplied by the vendor, the
+                recommended way is to place a symlink to
+                <code class="filename">/dev/null</code> in
+                <code class="filename">/etc/sysusers.d/</code> bearing the
+                same filename.</p></div><div class="refsect1"><a name="idm214173839456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>
+                        <a href="systemd-sysusers.html"><span class="citerefentry"><span class="refentrytitle">systemd-sysusers</span>(8)</span></a>,
+                        <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
                 </p></div></div></body></html>
index 549b3f6351eae3c3bf8019cdd25500e7699f6d07..18c71db63e737635eb213c4c12849f96862e1db2 100644 (file)
                 <title>Description</title>
 
                 <para><command>systemd-sysusers</command> uses the
-                files from <filename>/usr/lib/sysusers.d/</filename>
+                files from <filename>sysusers.d</filename> directory
                 to create system users and groups at package
-                installation or boot time. This tool may be used for
-                allocating system users and groups only, it is not
+                installation or boot time. This tool may be used to
+                allocate system users and groups only, it is not
                 useful for creating non-system users and groups, as it
-                accessed <filename>/etc/passwd</filename> and
+                accesses <filename>/etc/passwd</filename> and
                 <filename>/etc/group</filename> directly, bypassing
-                any more complex user database, for example any
+                any more complex user databases, for example any
                 database involving NIS or LDAP.</para>
-
         </refsect1>
 
         <refsect1>
-                <title>File Format</title>
-
-                <para>Each file shall be named in the style of
-                <filename><replaceable>package</replaceable>.conf</filename>.</para>
+                <title>Configuration Format</title>
 
-                <para>All files are sorted by their filename in
-                lexicographic order, regardless of which of the
-                directories they reside in. If multiple files specify
-                the same user or group, the entry in the file with the
-                lexicographically earliest name will be applied, all
-                all other conflicting entries will be logged as
-                errors. Users and groups are
-                processed in the order they are listed.</para>
+                <para>Each configuration file shall be named in the
+                style of
+                <filename><replaceable>package</replaceable>.conf</filename>
+                or
+                <filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>.
+                The second variant should be used when it is desirable
+                to make it easy to override just this part of
+                configuration.</para>
 
                 <para>The file format is one line per user or group
-                containing name, ID and GECOS field description:</para>
+                containing name, ID, GECOS field description and home directory:</para>
 
                 <programlisting># Type Name ID GECOS
 u httpd 440 "HTTP User"
 u authd /usr/bin/authd "Authorization user"
 g input - -
-m authd input</programlisting>
+m authd input
+u root 0 "Superuser" /root</programlisting>
 
                 <refsect2>
                         <title>Type</title>
@@ -106,12 +103,14 @@ m authd input</programlisting>
                                         group will be set to the group
                                         bearing the same name. The
                                         user's shell will be set to
-                                        <filename>/sbin/login</filename>,
-                                        the home directory to
-                                        <filename>/</filename>. The
-                                        account will be created
-                                        disabled, so that logins are
-                                        not allowed.</para></listitem>
+                                        <filename>/sbin/nologin</filename>,
+                                        the home directory to the
+                                        specified home directory, or
+                                        <filename>/</filename> if none
+                                        is given. The account will be
+                                        created disabled, so that
+                                        logins are not
+                                        allowed.</para></listitem>
                                 </varlistentry>
 
                                 <varlistentry>
@@ -135,6 +134,25 @@ m authd input</programlisting>
                                         will be implicitly
                                         created.</para></listitem>
                                 </varlistentry>
+
+                                <varlistentry>
+                                        <term><varname>r</varname></term>
+                                        <listitem><para>Add a range of
+                                        numeric UIDs/GIDs to the pool
+                                        to allocate new UIDs and GIDs
+                                        from. If no line of this type
+                                        is specified the range of
+                                        UIDs/GIDs is set to some
+                                        compiled-in default. Note that
+                                        both UIDs and GIDs are
+                                        allocated from the same pool,
+                                        in order to ensure that users
+                                        and groups of the same name
+                                        are likely to carry the same
+                                        numeric UID and
+                                        GID.</para></listitem>
+                                </varlistentry>
+
                         </variablelist>
                 </refsect2>
 
@@ -142,7 +160,7 @@ m authd input</programlisting>
                         <title>Name</title>
 
                         <para>The name field specifies the user or
-                        group name. It should be be shorter than 256
+                        group name. It should be shorter than 31
                         characters and avoid any non-ASCII characters,
                         and not begin with a numeric character. It is
                         strongly recommended to pick user and group
@@ -155,6 +173,10 @@ m authd input</programlisting>
                         <para>For <varname>m</varname> lines this
                         field should contain the user name to add to a
                         group.</para>
+
+                        <para>For lines of type <varname>r</varname>
+                        this field should be set to
+                        <literal>-</literal>.</para>
                 </refsect2>
 
                 <refsect2>
@@ -164,8 +186,8 @@ m authd input</programlisting>
                         <varname>g</varname> the numeric 32bit UID or
                         GID of the user/group. Do not use IDs 65535 or
                         4294967295, as they have special placeholder
-                        meanings. Specify "-" for automatic UID/GID
-                        allocation for the user or
+                        meanings. Specify <literal>-</literal> for
+                        automatic UID/GID allocation for the user or
                         group. Alternatively, specify an absolute path
                         in the file system. In this case the UID/GID
                         is read from the path's owner/group. This is
@@ -176,6 +198,14 @@ m authd input</programlisting>
                         <para>For <varname>m</varname> lines this
                         field should contain the group name to add to
                         a user to.</para>
+
+                        <para>For lines of type <varname>r</varname>
+                        this field should be set to a UID/GID range in
+                        the format <literal>FROM-TO</literal> where
+                        both values are formatted as decimal ASCII
+                        numbers. Alternatively, a single UID/GID may
+                        be specified formatted as decimal ASCII
+                        numbers.</para>
                 </refsect2>
 
                 <refsect2>
@@ -187,16 +217,62 @@ m authd input</programlisting>
 
                         <para>Only applies to lines of type
                         <varname>u</varname> and should otherwise be
-                        left unset.</para>
+                        left unset, or be set to
+                        <literal>-</literal>.</para>
+                </refsect2>
+
+                <refsect2>
+                        <title>Home Directory</title>
+
+                        <para>The home directory for a new system
+                        user. If omitted defaults to the root
+                        directory. It is recommended to not
+                        unnecessarily specify home directories for
+                        system users, unless software strictly
+                        requires one to be set.</para>
+
+                        <para>Only applies to lines of type
+                        <varname>u</varname> and should otherwise be
+                        left unset, or be set to
+                        <literal>-</literal>.</para>
                 </refsect2>
 
         </refsect1>
 
+        <refsect1>
+                <title>Overriding vendor configuration</title>
+
+                <para>Note that <command>systemd-sysusers</command>
+                will do nothing if the specified users or groups
+                already exist, so normally there no reason to override
+                <filename>sysusers.d</filename> vendor configuration,
+                except to block certain users or groups from being
+                created.</para>
+
+                <para>Files in <filename>/etc/sysusers.d</filename>
+                override files with the same name in
+                <filename>/usr/lib/sysusers.d</filename> and
+                <filename>/run/sysusers.d</filename>. Files in
+                <filename>/run/sysusers.d</filename> override files
+                with the same name in
+                <filename>/usr/lib/sysusers.d</filename>. The scheme is the same as for
+                <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+                except for the directory name.</para>
+
+                <para>If the administrator wants to disable a
+                configuration file supplied by the vendor, the
+                recommended way is to place a symlink to
+                <filename>/dev/null</filename> in
+                <filename>/etc/sysusers.d/</filename> bearing the
+                same filename.</para>
+        </refsect1>
+
         <refsect1>
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 3998563163b8f883b5f3930fd2e6fcb1e8e6a3de..bba0082d3ee8c53f66bd6b0d0853dfa2c4378499 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "TELINIT" "8" "" "systemd 215" "telinit"
+.TH "TELINIT" "8" "" "systemd 217" "telinit"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index ec53903825a254b858e2d9d4a43ac899e1889cdf..5b2dd5ddfbf78cbea0273f8c222e41032fb3f001 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="telinit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>telinit — Change SysV runlevel</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">telinit [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214191885648"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>telinit</strong></span> may be used to change
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="telinit"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>telinit — Change SysV runlevel</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">telinit [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214176517648"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>telinit</strong></span> may be used to change
                 the SysV system runlevel. Since the concept of SysV
                 runlevels is obsolete the runlevel requests
                 will be transparently translated into systemd unit
-                activation requests.</p></div><div class="refsect1"><a name="idm214191883632"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
+                activation requests.</p></div><div class="refsect1"><a name="idm214176515632"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
     </p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall">¶</a></dt><dd><p>Do not send wall
                                 message before
                                 reboot/halt/power-off.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="0"><span class="term"><span class="command"><strong>0</strong></span></span><a class="headerlink" title="Permalink to this term" href="#0">¶</a></dt><dd><p>Power-off the
                                 reexecute daemon and deserialize state
                                 again. This is equivalent to
                                 <span class="command"><strong>systemctl
-                                daemon-reexec</strong></span>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214195797504"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214195796320"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>This is a legacy command available for compatibility
+                                daemon-reexec</strong></span>.</p></dd></dl></div></div><div class="refsect1"><a name="idm214180430048"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214180428864"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes">¶</a></h2><p>This is a legacy command available for compatibility
                 only. It should not be used anymore, as the concept of
-                runlevels is obsolete.</p></div><div class="refsect1"><a name="idm214195794960"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                runlevels is obsolete.</p></div><div class="refsect1"><a name="idm214180427504"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
-                        <a href="wall.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
+                        <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
                 </p></div></div></body></html>
index 1949c950e024b33aed7a44ed9edaf7d6117dff57..33ea118bcb502c34f9e91d08af5f9ae071df0476 100644 (file)
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                        <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
index 02ed6cb13c7c881b56ff6b5bd6038712a9e31fc4..7f38cd98ff09cbc56053a7ba96abea32f38e34ad 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "TIMEDATECTL" "1" "" "systemd 215" "timedatectl"
+.TH "TIMEDATECTL" "1" "" "systemd 217" "timedatectl"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -28,6 +28,10 @@ timedatectl \- Control the system time and date
 .PP
 \fBtimedatectl\fR
 may be used to query and change the system clock and its settings\&.
+.PP
+Use
+\fBsystemd-firstboot\fR(1)
+to initialize the system time zone for mounted (but not booted) system images\&.
 .SH "OPTIONS"
 .PP
 The following options are understood:
@@ -205,4 +209,5 @@ chronyd\&.service \- NTP client/server
 \fBdate\fR(1),
 \fBlocaltime\fR(5),
 \fBsystemctl\fR(1),
-\fBsystemd-timedated.service\fR(8)
+\fBsystemd-timedated.service\fR(8),
+\fBsystemd-firstboot\fR(1)
index 65f327e2f290825331bd37a8dcfd204fbe63e50d..f696827c40794a5193e9acaecc040016357a2131 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="timedatectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>timedatectl — Control the system time and date</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">timedatectl [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214188218784"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>timedatectl</strong></span> may be used to
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="timedatectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>timedatectl — Control the system time and date</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">timedatectl [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm214176424592"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>timedatectl</strong></span> may be used to
                 query and change the system clock and its
-                settings.</p></div><div class="refsect1"><a name="idm214188216928"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
+                settings.</p><p>Use
+                <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
+                to initialize the system time zone for mounted (but not
+                booted) system images.</p></div><div class="refsect1"><a name="idm214176421392"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
                                 for authentication for privileged
                                 operations.</p></dd><dt id="--adjust-system-clock"><span class="term"><code class="option">--adjust-system-clock</code></span><a class="headerlink" title="Permalink to this term" href="#--adjust-system-clock">¶</a></dt><dd><p>If
                                 <span class="command"><strong>set-local-rtc</strong></span> is
                                 change the 3rd line of
                                 <code class="filename">/etc/adjtime</code>, as
                                 documented in
-                                <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>.</p></dd><dt id="set-ntp [BOOL]"><span class="term"><span class="command"><strong>set-ntp [BOOL]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-ntp%20%5BBOOL%5D">¶</a></dt><dd><p>Takes a boolean
+                                <a href="http://man7.org/linux/man-pages/man8/hwclock.8.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>.</p></dd><dt id="set-ntp [BOOL]"><span class="term"><span class="command"><strong>set-ntp [BOOL]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-ntp%20%5BBOOL%5D">¶</a></dt><dd><p>Takes a boolean
                                 argument. Controls whether NTP based
                                 network time synchronization is
                                 enabled (if
-                                available).</p></dd></dl></div></div><div class="refsect1"><a name="idm214192134048"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
-                code otherwise.</p></div><div class="refsect1"><a name="idm214173847264"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
+                                available).</p></dd></dl></div></div><div class="refsect1"><a name="idm214180321888"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
+                code otherwise.</p></div><div class="refsect1"><a name="idm214160789808"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                         <code class="option">--no-pager</code> is not given;
                         overrides <code class="varname">$PAGER</code>.  Setting
                         this to an empty string or the value
@@ -94,7 +97,7 @@
                         <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                         options passed to
                         <span class="command"><strong>less</strong></span>
-                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214192132352"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Show current settings:
+                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214180320176"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Show current settings:
                 </p><pre class="programlisting">$ timedatectl
       Local time: Fri, 2012-11-02 09:26:46 CET
   Universal time: Fri, 2012-11-02 08:26:46 UTC
@@ -125,11 +128,12 @@ chronyd.service - NTP client/server
           Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled)
           Active: active (running) since Fri, 2012-11-02 09:36:25 CET; 5s ago
 ...</pre><p>
-                </p></div><div class="refsect1"><a name="idm214192127008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                </p></div><div class="refsect1"><a name="idm214180426848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
-                        <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>,
-                        <a href="date.html"><span class="citerefentry"><span class="refentrytitle">date</span>(1)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man8/hwclock.8.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>,
+                        <a href="http://man7.org/linux/man-pages/man1/date.1.html"><span class="citerefentry"><span class="refentrytitle">date</span>(1)</span></a>,
                         <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
                         <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
-                        <a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a>
+                        <a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a>,
+                        <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
                 </p></div></div></body></html>
index ee75d423d75e773066320d996d8f90fb372bd4cf..f3edb8d61add36691cf9edc99258f46c30fa001f 100644 (file)
                 <para><command>timedatectl</command> may be used to
                 query and change the system clock and its
                 settings.</para>
+
+                <para>Use
+                <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                to initialize the system time zone for mounted (but not
+                booted) system images.</para>
         </refsect1>
 
         <refsect1>
                                 change the 3rd line of
                                 <filename>/etc/adjtime</filename>, as
                                 documented in
-                                <citerefentry><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para></listitem>
+                                <citerefentry project='man-pages'><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
@@ -236,11 +241,12 @@ chronyd.service - NTP client/server
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>date</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>hwclock</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry project='man-pages'><refentrytitle>date</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 </para>
         </refsect1>
 
diff --git a/man/timesyncd.conf.5 b/man/timesyncd.conf.5
new file mode 100644 (file)
index 0000000..1ce3795
--- /dev/null
@@ -0,0 +1,51 @@
+'\" t
+.TH "TIMESYNCD\&.CONF" "5" "" "systemd 217" "timesyncd.conf"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+timesyncd.conf \- Network Time Synchronization configuration file
+.SH "SYNOPSIS"
+.PP
+/etc/systemd/timesyncd\&.conf
+.SH "DESCRIPTION"
+.PP
+When starting, systemd\-timesyncd will read the configuration file
+timesyncd\&.conf\&. This configuration file controls NTP network time synchronization\&.
+.SH "OPTIONS"
+.PP
+\fINTP=\fR
+.RS 4
+A space separated list of NTP servers host names or IP addresses\&. During runtime this list is combined with any per\-interface NTP servers acquired from
+\fBsystemd-networkd.service\fR(8)\&. systemd\-timesyncd will contact all configured system or per\-interface servers in turn until one is found that responds\&. This setting defaults to the empty list\&.
+.RE
+.PP
+\fIFallbackNTP=\fR
+.RS 4
+A space separated list of NTP server host names or IP addresses to be used as the fallback NTP servers\&. Any per\-interface NTP servers obtained from
+\fBsystemd-networkd.service\fR(8)
+take precedence over this setting, as do any servers set via
+\fINTP=\fR
+above\&. This setting is hence only used if no other NTP server information is known\&. If this option is not given, a compiled\-in list of NTP servers is used instead\&.
+.RE
+.SH "SEE ALSO"
+.PP
+\fBsystemd\fR(1),
+\fBsystemd-timesyncd.service\fR(8),
+\fBsystemd-networkd.service\fR(8)
diff --git a/man/timesyncd.conf.html b/man/timesyncd.conf.html
new file mode 100644 (file)
index 0000000..b3fec1f
--- /dev/null
@@ -0,0 +1,53 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>timesyncd.conf</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="timesyncd.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>timesyncd.conf — Network Time Synchronization configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/timesyncd.conf</code></p></div><div class="refsect1"><a name="idm214173821824"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>When starting, systemd-timesyncd will read the
+                configuration file
+                <code class="filename">timesyncd.conf</code>.  This
+                configuration file controls NTP network time
+                synchronization.</p></div><div class="refsect1"><a name="idm214173819728"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="NTP="><span class="term"><code class="varname">NTP=</code></span><a class="headerlink" title="Permalink to this term" href="#NTP=">¶</a></dt><dd><p>A space separated list
+                                of NTP servers host names or IP
+                                addresses. During runtime this list is
+                                combined with any per-interface NTP
+                                servers acquired from
+                                <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>. systemd-timesyncd
+                                will contact all configured system or
+                                per-interface servers in turn until
+                                one is found that responds. This
+                                setting defaults to the empty
+                                list.</p></dd><dt id="FallbackNTP="><span class="term"><code class="varname">FallbackNTP=</code></span><a class="headerlink" title="Permalink to this term" href="#FallbackNTP=">¶</a></dt><dd><p>A space separated list
+                                of NTP server host names or IP
+                                addresses to be used as the fallback
+                                NTP servers. Any per-interface NTP
+                                servers obtained from
+                                <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
+                                take precedence over this setting, as
+                                do any servers set via
+                                <code class="varname">NTP=</code> above. This
+                                setting is hence only used if no other
+                                NTP server information is known. If
+                                this option is not given, a
+                                compiled-in list of NTP servers is
+                                used instead.</p></dd></dl></div></div><div class="refsect1"><a name="idm214173811792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
+                        <a href="systemd-timesyncd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timesyncd.service</span>(8)</span></a>,
+                        <a href="systemd-networkd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-networkd.service</span>(8)</span></a>
+                  </p></div></div></body></html>
diff --git a/man/timesyncd.conf.xml b/man/timesyncd.conf.xml
new file mode 100644 (file)
index 0000000..aeb7182
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+        "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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="timesyncd.conf" conditional='ENABLE_TIMESYNCD'>
+        <refentryinfo>
+                <title>timesyncd.conf</title>
+                <productname>systemd</productname>
+
+                <authorgroup>
+                        <author>
+                                <contrib>Developer</contrib>
+                                <firstname>Lennart</firstname>
+                                <surname>Poettering</surname>
+                                <email>lennart@poettering.net</email>
+                        </author>
+                </authorgroup>
+        </refentryinfo>
+
+        <refmeta>
+                <refentrytitle>timesyncd.conf</refentrytitle>
+                <manvolnum>5</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+                <refname>timesyncd.conf</refname>
+                <refpurpose>Network Time Synchronization configuration file</refpurpose>
+        </refnamediv>
+
+        <refsynopsisdiv>
+                <para><filename>/etc/systemd/timesyncd.conf</filename></para>
+        </refsynopsisdiv>
+
+        <refsect1>
+                <title>Description</title>
+
+                <para>When starting, systemd-timesyncd will read the
+                configuration file
+                <filename>timesyncd.conf</filename>.  This
+                configuration file controls NTP network time
+                synchronization.</para>
+
+        </refsect1>
+
+        <refsect1>
+                <title>Options</title>
+
+                <variablelist class='network-directives'>
+
+                        <varlistentry>
+                                <term><varname>NTP=</varname></term>
+                                <listitem><para>A space separated list
+                                of NTP servers host names or IP
+                                addresses. During runtime this list is
+                                combined with any per-interface NTP
+                                servers acquired from
+                                <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. systemd-timesyncd
+                                will contact all configured system or
+                                per-interface servers in turn until
+                                one is found that responds. This
+                                setting defaults to the empty
+                                list.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><varname>FallbackNTP=</varname></term>
+                                <listitem><para>A space separated list
+                                of NTP server host names or IP
+                                addresses to be used as the fallback
+                                NTP servers. Any per-interface NTP
+                                servers obtained from
+                                <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                                take precedence over this setting, as
+                                do any servers set via
+                                <varname>NTP=</varname> above. This
+                                setting is hence only used if no other
+                                NTP server information is known. If
+                                this option is not given, a
+                                compiled-in list of NTP servers is
+                                used instead.</para></listitem>
+                        </varlistentry>
+
+                </variablelist>
+        </refsect1>
+
+        <refsect1>
+                  <title>See Also</title>
+                  <para>
+                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                  </para>
+        </refsect1>
+
+</refentry>
index 53233a6a614ecc54b6116a93518df53f428d074f..da6ff8a65188c8a020078dd8c0ebe9baae8a85a0 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "TMPFILES\&.D" "5" "" "systemd 215" "tmpfiles.d"
+.TH "TMPFILES\&.D" "5" "" "systemd 217" "tmpfiles.d"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -144,14 +144,14 @@ are created\&.
 .RS 4
 Create a character device node if it does not exist yet\&. If suffixed with
 \fI+\fR
-and a file already exists where the device node is to be created, it will be removed and be replaced by the device node\&.
+and a file already exists where the device node is to be created, it will be removed and be replaced by the device node\&. It is recommended to suffix this entry with an exclamation mark to only create static device nodes at boot, as udev will not manage static device nodes that are created at runtime\&.
 .RE
 .PP
 \fIb\fR, \fIb+\fR
 .RS 4
 Create a block device node if it does not exist yet\&. If suffixed with
 \fI+\fR
-and a file already exists where the device node is to be created, it will be removed and be replaced by the device node\&.
+and a file already exists where the device node is to be created, it will be removed and be replaced by the device node\&. It is recommended to suffix this entry with an exclamation mark to only create static device nodes at boot, as udev will not manage static device nodes that are created at runtime\&.
 .RE
 .PP
 \fIC\fR
index 4a503f91af383ae053b0ee54427b7fe85a0a5fbf..2f92dbb10bbca17449eb01214d93fd4b258d2a0f 100644 (file)
@@ -19,8 +19,8 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="tmpfiles.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>tmpfiles.d — Configuration for creation, deletion and
-                cleaning of volatile and temporary files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/tmpfiles.d/*.conf</code></p><p><code class="filename">/run/tmpfiles.d/*.conf</code></p><p><code class="filename">/usr/lib/tmpfiles.d/*.conf</code></p></div><div class="refsect1"><a name="idm214189249856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> uses the
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="tmpfiles.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>tmpfiles.d — Configuration for creation, deletion and
+                cleaning of volatile and temporary files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/tmpfiles.d/*.conf</code></p><p><code class="filename">/run/tmpfiles.d/*.conf</code></p><p><code class="filename">/usr/lib/tmpfiles.d/*.conf</code></p></div><div class="refsect1"><a name="idm214198140992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> uses the
                 configuration files from the above directories to describe the
                 creation, cleaning and removal of volatile and
                 temporary files and directories which usually reside
@@ -38,7 +38,7 @@
                 consider declaring them in their unit files using
                 <code class="varname">RuntimeDirectory=</code>
                 (see <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a> for details),
-                if this is feasible.</p></div><div class="refsect1"><a name="idm214188157328"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>Each configuration file shall be named in the
+                if this is feasible.</p></div><div class="refsect1"><a name="idm214198129728"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format">¶</a></h2><p>Each configuration file shall be named in the
                 style of
                 <code class="filename"><em class="replaceable"><code>package</code></em>.conf</code>
                 or
@@ -75,7 +75,7 @@
                 containing type, path, mode, ownership, age, and argument
                 fields:</p><pre class="programlisting">#Type Path        Mode UID  GID  Age Argument
 d    /run/user   0755 root root 10d -
-L    /tmp/foobar -    -    -    -   /dev/null</pre><div class="refsect2"><a name="idm214192046416"></a><h3 id="Type">Type<a class="headerlink" title="Permalink to this headline" href="#Type">¶</a></h3><p>The type consists of a single letter and
+L    /tmp/foobar -    -    -    -   /dev/null</pre><div class="refsect2"><a name="idm214202069296"></a><h3 id="Type">Type<a class="headerlink" title="Permalink to this headline" href="#Type">¶</a></h3><p>The type consists of a single letter and
                         optionally an exclamation mark.</p><p>The following line types are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="f"><span class="term"><code class="varname">f</code></span><a class="headerlink" title="Permalink to this term" href="#f">¶</a></dt><dd><p>Create a file if it does not exist yet. If the argument parameter is given, it will be written to the file.</p></dd><dt id="F"><span class="term"><code class="varname">F</code></span><a class="headerlink" title="Permalink to this term" href="#F">¶</a></dt><dd><p>Create or truncate a file. If the argument parameter is given, it will be written to the file.</p></dd><dt id="w"><span class="term"><code class="varname">w</code></span><a class="headerlink" title="Permalink to this term" href="#w">¶</a></dt><dd><p>Write the argument parameter to a file, if the file exists.
                                             Lines of this type accept shell-style globs in place of normal path
                                             names. The argument parameter will be written without a trailing
@@ -107,7 +107,12 @@ L    /tmp/foobar -    -    -    -   /dev/null</pre><div class="refsect2"><a name
                                         device node is to be created,
                                         it will be removed and be
                                         replaced by the device
-                                        node.</p></dd><dt id="b"><span class="term"><code class="varname">b</code>, </span><span class="term"><code class="varname">b+</code></span><a class="headerlink" title="Permalink to this term" href="#b">¶</a></dt><dd><p>Create a block
+                                        node. It is recommended to suffix this
+                                        entry with an exclamation mark to only
+                                        create static device nodes at boot,
+                                        as udev will not manage static device
+                                        nodes that are created at runtime.
+                                        </p></dd><dt id="b"><span class="term"><code class="varname">b</code>, </span><span class="term"><code class="varname">b+</code></span><a class="headerlink" title="Permalink to this term" href="#b">¶</a></dt><dd><p>Create a block
                                         device node if it does not
                                         exist yet. If suffixed with
                                         <code class="varname">+</code> and a
@@ -115,7 +120,12 @@ L    /tmp/foobar -    -    -    -   /dev/null</pre><div class="refsect2"><a name
                                         device node is to be created,
                                         it will be removed and be
                                         replaced by the device
-                                        node.</p></dd><dt id="C"><span class="term"><code class="varname">C</code></span><a class="headerlink" title="Permalink to this term" href="#C">¶</a></dt><dd><p>Recursively
+                                        node. It is recommended to suffix this
+                                        entry with an exclamation mark to only
+                                        create static device nodes at boot,
+                                        as udev will not manage static device
+                                        nodes that are created at runtime.
+                                        </p></dd><dt id="C"><span class="term"><code class="varname">C</code></span><a class="headerlink" title="Permalink to this term" href="#C">¶</a></dt><dd><p>Recursively
                                         copy a file or directory, if
                                         the destination files or
                                         directories do not exist
@@ -203,9 +213,9 @@ d /tmp/.X11-unix 1777 root root 10d
 r! /tmp/.X[0-9]*-lock</pre><p>
                         The second line in contrast to the first one
                         would break a running system, and will only be
-                        executed with <code class="option">--boot</code>.</p></div><div class="refsect2"><a name="idm214187362048"></a><h3 id="Path">Path<a class="headerlink" title="Permalink to this headline" href="#Path">¶</a></h3><p>The file system path specification supports simple specifier
+                        executed with <code class="option">--boot</code>.</p></div><div class="refsect2"><a name="idm214197043056"></a><h3 id="Path">Path<a class="headerlink" title="Permalink to this headline" href="#Path">¶</a></h3><p>The file system path specification supports simple specifier
                         expansion. The following expansions are
-                        understood:</p><div class="table"><a name="idm214187360848"></a><p class="title"><b>Table 1. Specifiers available</b></p><div class="table-contents"><table summary="Specifiers available" border="1"><colgroup><col align="left" class="spec"><col align="left" class="mean"><col align="left" class="detail"></colgroup><thead><tr><th align="left">Specifier</th><th align="left">Meaning</th><th align="left">Details</th></tr></thead><tbody><tr><td align="left">"<code class="literal">%m</code>"</td><td align="left">Machine ID</td><td align="left">The machine ID of the running system, formatted as string. See <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%b</code>"</td><td align="left">Boot ID</td><td align="left">The boot ID of the running system, formatted as string. See <a href="random.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%H</code>"</td><td align="left">Host name</td><td align="left">The hostname of the running system.</td></tr><tr><td align="left">"<code class="literal">%v</code>"</td><td align="left">Kernel release</td><td align="left">Identical to <span class="command"><strong>uname -r</strong></span> output.</td></tr><tr><td align="left">"<code class="literal">%%</code>"</td><td align="left">Escaped %</td><td align="left">Single percent sign.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect2"><a name="idm214187343136"></a><h3 id="Mode">Mode<a class="headerlink" title="Permalink to this headline" href="#Mode">¶</a></h3><p>The file access mode to use when
+                        understood:</p><div class="table"><a name="idm214197041856"></a><p class="title"><b>Table 1. Specifiers available</b></p><div class="table-contents"><table summary="Specifiers available" border="1"><colgroup><col align="left" class="spec"><col align="left" class="mean"><col align="left" class="detail"></colgroup><thead><tr><th align="left">Specifier</th><th align="left">Meaning</th><th align="left">Details</th></tr></thead><tbody><tr><td align="left">"<code class="literal">%m</code>"</td><td align="left">Machine ID</td><td align="left">The machine ID of the running system, formatted as string. See <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%b</code>"</td><td align="left">Boot ID</td><td align="left">The boot ID of the running system, formatted as string. See <a href="http://man7.org/linux/man-pages/man4/random.4.html"><span class="citerefentry"><span class="refentrytitle">random</span>(4)</span></a> for more information.</td></tr><tr><td align="left">"<code class="literal">%H</code>"</td><td align="left">Host name</td><td align="left">The hostname of the running system.</td></tr><tr><td align="left">"<code class="literal">%v</code>"</td><td align="left">Kernel release</td><td align="left">Identical to <span class="command"><strong>uname -r</strong></span> output.</td></tr><tr><td align="left">"<code class="literal">%%</code>"</td><td align="left">Escaped %</td><td align="left">Single percent sign.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect2"><a name="idm214197024048"></a><h3 id="Mode">Mode<a class="headerlink" title="Permalink to this headline" href="#Mode">¶</a></h3><p>The file access mode to use when
                         creating this file or directory. If omitted or
                         when set to -, the default is used: 0755 for
                         directories, 0644 for all other file objects.
@@ -229,7 +239,7 @@ r! /tmp/.X[0-9]*-lock</pre><p>
                         addition, the sticky/SUID/SGID bit is removed unless
                         applied to a directory. This
                         functionality is particularly useful in
-                        conjunction with <code class="varname">Z</code>.</p></div><div class="refsect2"><a name="idm214187336352"></a><h3 id="UID, GID">UID, GID<a class="headerlink" title="Permalink to this headline" href="#UID,%20GID">¶</a></h3><p>The user and group to use for this file
+                        conjunction with <code class="varname">Z</code>.</p></div><div class="refsect2"><a name="idm214197017168"></a><h3 id="UID, GID">UID, GID<a class="headerlink" title="Permalink to this headline" href="#UID,%20GID">¶</a></h3><p>The user and group to use for this file
                         or directory. This may either be a numeric
                         user/group ID or a user or group name. If
                         omitted or when set to "<code class="literal">-</code>",
@@ -240,7 +250,7 @@ r! /tmp/.X[0-9]*-lock</pre><p>
                         parameters are ignored for
                         <code class="varname">x</code>, <code class="varname">r</code>,
                         <code class="varname">R</code>, <code class="varname">L</code>
-                        lines.</p></div><div class="refsect2"><a name="idm214187331808"></a><h3 id="Age">Age<a class="headerlink" title="Permalink to this headline" href="#Age">¶</a></h3><p>The date field, when set, is used to
+                        lines.</p></div><div class="refsect2"><a name="idm214197012528"></a><h3 id="Age">Age<a class="headerlink" title="Permalink to this headline" href="#Age">¶</a></h3><p>The date field, when set, is used to
                         decide what files to delete when cleaning. If
                         a file or directory is older than the current
                         time minus the age field, it is deleted. The
@@ -260,7 +270,7 @@ r! /tmp/.X[0-9]*-lock</pre><p>
                         is only applied to files and directories one
                         level inside the directory specified, but not
                         the files and directories immediately inside
-                        it.</p></div><div class="refsect2"><a name="idm214187320928"></a><h3 id="Argument">Argument<a class="headerlink" title="Permalink to this headline" href="#Argument">¶</a></h3><p>For <code class="varname">L</code> lines
+                        it.</p></div><div class="refsect2"><a name="idm214197001392"></a><h3 id="Argument">Argument<a class="headerlink" title="Permalink to this headline" href="#Argument">¶</a></h3><p>For <code class="varname">L</code> lines
                         determines the destination path of the
                         symlink. For <code class="varname">c</code>,
                         <code class="varname">b</code> determines the
@@ -274,9 +284,9 @@ r! /tmp/.X[0-9]*-lock</pre><p>
                         file, suffixed by a newline. For
                         <code class="varname">C</code>, specifies the source file
                         or directory. Ignored for all other
-                        lines.</p></div></div><div class="refsect1"><a name="idm214187315088"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214187314448"></a><p class="title"><b>Example 1. /etc/tmpfiles.d/screen.conf example</b></p><div class="example-contents"><p><span class="command"><strong>screen</strong></span> needs two directories created at boot with specific modes and ownership.</p><pre class="programlisting">d /run/screens  1777 root root 10d
-d /run/uscreens 0755 root root 10d12h</pre></div></div><br class="example-break"><div class="example"><a name="idm214187311984"></a><p class="title"><b>Example 2. /etc/tmpfiles.d/abrt.conf example</b></p><div class="example-contents"><p><span class="command"><strong>abrt</strong></span> needs a directory created at boot with specific mode and ownership and its content should be preserved.</p><pre class="programlisting">d /var/tmp/abrt 0755 abrt abrt
-x /var/tmp/abrt/*</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214187309456"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                        lines.</p></div></div><div class="refsect1"><a name="idm214196995552"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214196994912"></a><p class="title"><b>Example 1. /etc/tmpfiles.d/screen.conf example</b></p><div class="example-contents"><p><span class="command"><strong>screen</strong></span> needs two directories created at boot with specific modes and ownership.</p><pre class="programlisting">d /run/screens  1777 root root 10d
+d /run/uscreens 0755 root root 10d12h</pre></div></div><br class="example-break"><div class="example"><a name="idm214196992448"></a><p class="title"><b>Example 2. /etc/tmpfiles.d/abrt.conf example</b></p><div class="example-contents"><p><span class="command"><strong>abrt</strong></span> needs a directory created at boot with specific mode and ownership and its content should be preserved.</p><pre class="programlisting">d /var/tmp/abrt 0755 abrt abrt
+x /var/tmp/abrt/*</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214196989920"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                         <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                         <a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>,
                         <a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>,
index 81457c45e059b144398ad3c6ec3fb50219e7c9fd..f2360ba9a4a2982b2a7451599f7cc1ed5d9f81e5 100644 (file)
@@ -210,7 +210,12 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
                                         device node is to be created,
                                         it will be removed and be
                                         replaced by the device
-                                        node.</para></listitem>
+                                        node. It is recommended to suffix this
+                                        entry with an exclamation mark to only
+                                        create static device nodes at boot,
+                                        as udev will not manage static device
+                                        nodes that are created at runtime.
+                                        </para></listitem>
                                 </varlistentry>
 
                                 <varlistentry>
@@ -224,7 +229,12 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
                                         device node is to be created,
                                         it will be removed and be
                                         replaced by the device
-                                        node.</para></listitem>
+                                        node. It is recommended to suffix this
+                                        entry with an exclamation mark to only
+                                        create static device nodes at boot,
+                                        as udev will not manage static device
+                                        nodes that are created at runtime.
+                                        </para></listitem>
                                 </varlistentry>
 
                                 <varlistentry>
index 86e253d1b53eeaccc95b1b9438026eaf920a4005..27e05f1fea18b8e2f619db7155ac8d2109880d99 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "UDEV" "7" "" "systemd 215" "udev"
+.TH "UDEV" "7" "" "systemd 217" "udev"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -76,6 +76,11 @@ Assign a value to a key\&. Keys that represent a list are reset and only this si
 Add the value to a key that holds a list of entries\&.
 .RE
 .PP
+"\-="
+.RS 4
+Remove the value from a key that holds a list of entries\&.
+.RE
+.PP
 ":="
 .RS 4
 Assign a value to a key finally; disallow any later changes\&.
@@ -184,7 +189,7 @@ call\&. This key can be used in the same or in any later rule after a
 call\&.
 .RE
 .PP
-Most of the fields support shell glob pattern matching\&. The following pattern characters are supported:
+Most of the fields support shell glob pattern matching and alternate patterns\&. The following special characters are supported:
 .PP
 "*"
 .RS 4
@@ -213,6 +218,16 @@ is a
 "!", any characters not enclosed are matched\&.
 .RE
 .PP
+"|"
+.RS 4
+Separates alternative patterns\&. For example, the pattern string
+"abc|x*"
+would match either
+"abc"
+or
+"x*"\&.
+.RE
+.PP
 The following keys can get values assigned:
 .PP
 \fINAME\fR
@@ -367,11 +382,6 @@ Rule and device options:
 Specify the priority of the created symlinks\&. Devices with higher priorities overwrite existing symlinks of other devices\&. The default is 0\&.
 .RE
 .PP
-\fBevent_timeout=\fR
-.RS 4
-Number of seconds an event waits for operations to finish before giving up and terminating itself\&.
-.RE
-.PP
 \fBstring_escape=\fR\fB\fInone|replace\fR\fR
 .RS 4
 Usually control and other possibly unsafe characters are replaced in strings used for device naming\&. The mode of replacement can be specified with this option\&.
@@ -551,8 +561,11 @@ are ignored\&.
 The content of all hwdb files is read by
 \fBudevadm\fR(8)
 and compiled to a binary database located at
-/etc/udev/hwdb\&.bin\&. During runtime only the binary database is used\&.
+/etc/udev/hwdb\&.bin, or alternatively
+/usr/lib/udev/hwdb\&.bin
+if you want ship the compiled database in an immutable image\&. During runtime only the binary database is used\&.
 .SH "SEE ALSO"
 .PP
 \fBsystemd-udevd.service\fR(8),
-\fBudevadm\fR(8)\fBsystemd.link\fR(5)
+\fBudevadm\fR(8),
+\fBsystemd.link\fR(5)
diff --git a/man/udev.conf.5 b/man/udev.conf.5
new file mode 100644 (file)
index 0000000..b16c4e7
--- /dev/null
@@ -0,0 +1,50 @@
+'\" t
+.TH "UDEV\&.CONF" "5" "" "systemd 217" "udev.conf"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+udev.conf \- Configuration for device event managing daemon
+.SH "SYNOPSIS"
+.PP
+/etc/udev/udev\&.conf
+.SH "DESCRIPTION"
+.PP
+\fBsystemd-udevd\fR(8)
+expects its main configuration file at
+/etc/udev/udev\&.conf\&. It consists of a set of variables allowing the user to override default udev values\&. All empty lines or lines beginning with \*(Aq#\*(Aq are ignored\&. The following variables can be set:
+.PP
+\fIudev_log\fR
+.RS 4
+The logging priority\&. Valid values are the numerical syslog priorities or their textual representations:
+\fBerr\fR,
+\fBinfo\fR
+and
+\fBdebug\fR\&.
+.RE
+.PP
+In addition,
+systemd\-udevd
+can be configured by command\-line options and the kernel commandline (see
+\fBsystemd-udevd\fR(8))\&.
+.SH "SEE ALSO"
+.PP
+\fBsystemd-udevd\fR(8),
+\fBudev\fR(7),
+\fBudevadm\fR(8)
diff --git a/man/udev.conf.html b/man/udev.conf.html
new file mode 100644 (file)
index 0000000..bd43643
--- /dev/null
@@ -0,0 +1,40 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>udev.conf</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
+    a.headerlink {
+      color: #c60f0f;
+      font-size: 0.8em;
+      padding: 0 4px 0 4px;
+      text-decoration: none;
+      visibility: hidden;
+    }
+
+    a.headerlink:hover {
+      background-color: #c60f0f;
+      color: white;
+    }
+
+    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
+      visibility: visible;
+    }
+  </style><a href="index.html">Index </a>·
+  <a href="systemd.directives.html">Directives </a>·
+  <a href="../python-systemd/index.html">Python </a>·
+  <a href="../libudev/index.html">libudev </a>·
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="udev.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>udev.conf — Configuration for device event managing daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/udev/udev.conf</code></p></div><div class="refsect1"><a name="idm214167324176"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
+      <a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a>
+      expects its main configuration file at
+      <code class="filename">/etc/udev/udev.conf</code>. It consists of a set
+      of variables allowing the user to override default udev
+      values. All empty lines or lines beginning with '#' are
+      ignored. The following variables can be set:
+    </p><div class="variablelist"><dl class="variablelist"><dt id="udev_log"><span class="term"><code class="varname">udev_log</code></span><a class="headerlink" title="Permalink to this term" href="#udev_log">¶</a></dt><dd><p>The logging priority. Valid values are the numerical
+          syslog priorities or their textual representations:
+          <code class="option">err</code>, <code class="option">info</code> and
+          <code class="option">debug</code>.</p></dd></dl></div><p>
+      In addition, <code class="filename">systemd-udevd</code> can be configured
+      by command-line options and the kernel commandline (see
+      <a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a>).
+    </p></div><div class="refsect1"><a name="idm214167315952"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      <a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a>,
+      <a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
+      <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
+    </p></div></div></body></html>
diff --git a/man/udev.conf.xml b/man/udev.conf.xml
new file mode 100644 (file)
index 0000000..16ad41e
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version='1.0'?>
+<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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.conf"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>udev.conf</title>
+    <productname>systemd</productname>
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Kay</firstname>
+        <surname>Sievers</surname>
+        <email>kay@vrfy.org</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>udev.conf</refentrytitle>
+    <manvolnum>5</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>udev.conf</refname>
+    <refpurpose>Configuration for device event managing daemon</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <para><filename>/etc/udev/udev.conf</filename></para>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>
+      <citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+      expects its main configuration file at
+      <filename>/etc/udev/udev.conf</filename>. It consists of a set
+      of variables allowing the user to override default udev
+      values. All empty lines or lines beginning with '#' are
+      ignored. The following variables can be set:
+    </para>
+
+    <variablelist>
+      <varlistentry>
+        <term><varname>udev_log</varname></term>
+
+        <listitem>
+          <para>The logging priority. Valid values are the numerical
+          syslog priorities or their textual representations:
+          <option>err</option>, <option>info</option> and
+          <option>debug</option>.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>
+      In addition, <filename>systemd-udevd</filename> can be configured
+      by command-line options and the kernel commandline (see
+      <citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para>
+      <citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+</refentry>
index 958c501204eaa3251101fb8696a03a43b32e035e..2efb7b7ff18727be3c5fb95e3cf1ced7dc440246 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="udev"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>udev — Dynamic device management</p></div><div class="refsect1"><a name="idm214191469312"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>udev supplies the system software with device events, manages permissions
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="udev"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>udev — Dynamic device management</p></div><div class="refsect1"><a name="idm214199174656"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>udev supplies the system software with device events, manages permissions
     of device nodes and may create additional symlinks in the <code class="filename">/dev</code>
     directory, or renames network interfaces. The kernel usually just assigns unpredictable
     device names based on the order of discovery. Meaningful symlinks or network device
@@ -31,7 +31,7 @@
     provide additional device information to be stored in the udev database or
     to be used to create meaningful symlink names.</p><p>All device information udev processes is stored in the udev database and
     sent out to possible event subscribers. Access to all stored data and the event
-    sources is provided by the library libudev.</p></div><div class="refsect1"><a name="idm214191424784"></a><h2 id="Rules Files">Rules Files<a class="headerlink" title="Permalink to this headline" href="#Rules%20Files">¶</a></h2><p>The udev rules are read from the files located in the
+    sources is provided by the library libudev.</p></div><div class="refsect1"><a name="idm214199170112"></a><h2 id="Rules Files">Rules Files<a class="headerlink" title="Permalink to this headline" href="#Rules%20Files">¶</a></h2><p>The udev rules are read from the files located in the
       system rules directory <code class="filename">/usr/lib/udev/rules.d</code>,
       the volatile runtime directory <code class="filename">/run/udev/rules.d</code>
       and the local administration directory <code class="filename">/etc/udev/rules.d</code>.
@@ -53,7 +53,7 @@
       the event handling.</p><p>A rule consists of a comma-separated list of one or more key-value pairs.
       Each key has a distinct operation, depending on the used operator. Valid
       operators are:</p><div class="variablelist"><dl class="variablelist"><dt id="=="><span class="term">"<code class="literal">==</code>"</span><a class="headerlink" title="Permalink to this term" href="#==">¶</a></dt><dd><p>Compare for equality.</p></dd><dt id="!="><span class="term">"<code class="literal">!=</code>"</span><a class="headerlink" title="Permalink to this term" href="#!=">¶</a></dt><dd><p>Compare for inequality.</p></dd><dt id="="><span class="term">"<code class="literal">=</code>"</span><a class="headerlink" title="Permalink to this term" href="#=">¶</a></dt><dd><p>Assign a value to a key. Keys that represent a list are reset
-            and only this single value is assigned.</p></dd><dt id="+="><span class="term">"<code class="literal">+=</code>"</span><a class="headerlink" title="Permalink to this term" href="#+=">¶</a></dt><dd><p>Add the value to a key that holds a list of entries.</p></dd><dt id=":="><span class="term">"<code class="literal">:=</code>"</span><a class="headerlink" title="Permalink to this term" href="#:=">¶</a></dt><dd><p>Assign  a  value  to  a key finally; disallow any later changes.</p></dd></dl></div><p>The following key names can be used to match against device properties.
+            and only this single value is assigned.</p></dd><dt id="+="><span class="term">"<code class="literal">+=</code>"</span><a class="headerlink" title="Permalink to this term" href="#+=">¶</a></dt><dd><p>Add the value to a key that holds a list of entries.</p></dd><dt id="-="><span class="term">"<code class="literal">-=</code>"</span><a class="headerlink" title="Permalink to this term" href="#-=">¶</a></dt><dd><p>Remove the value from a key that holds a list of entries.</p></dd><dt id=":="><span class="term">"<code class="literal">:=</code>"</span><a class="headerlink" title="Permalink to this term" href="#:=">¶</a></dt><dd><p>Assign  a  value  to  a key finally; disallow any later changes.</p></dd></dl></div><p>The following key names can be used to match against device properties.
       Some of the keys also match against properties of the parent devices in sysfs,
       not only the device that has generated the event. If multiple keys that match
       a parent device are specified in a single rule, all these keys must match at
             is available in the <code class="varname">RESULT</code> key.</p><p>This can only be used for very short-running foreground tasks. For details,
             see <code class="varname">RUN</code>.</p></dd><dt id="RESULT"><span class="term"><code class="varname">RESULT</code></span><a class="headerlink" title="Permalink to this term" href="#RESULT">¶</a></dt><dd><p>Match the returned string of the last <code class="varname">PROGRAM</code> call.
             This key can be used in the same or in any later rule after a
-            <code class="varname">PROGRAM</code> call.</p></dd></dl></div><p>Most of the fields support shell glob pattern matching. The following
-      pattern characters are supported:</p><div class="variablelist"><dl class="variablelist"><dt id="*"><span class="term">"<code class="literal">*</code>"</span><a class="headerlink" title="Permalink to this term" href="#*">¶</a></dt><dd><p>Matches zero or more characters.</p></dd><dt id="?"><span class="term">"<code class="literal">?</code>"</span><a class="headerlink" title="Permalink to this term" href="#?">¶</a></dt><dd><p>Matches any single character.</p></dd><dt id="[]"><span class="term">"<code class="literal">[]</code>"</span><a class="headerlink" title="Permalink to this term" href="#%5B%5D">¶</a></dt><dd><p>Matches any single character specified within the brackets. For
+            <code class="varname">PROGRAM</code> call.</p></dd></dl></div><p>Most of the fields support shell glob pattern matching and
+      alternate patterns. The following special characters are supported:</p><div class="variablelist"><dl class="variablelist"><dt id="*"><span class="term">"<code class="literal">*</code>"</span><a class="headerlink" title="Permalink to this term" href="#*">¶</a></dt><dd><p>Matches zero or more characters.</p></dd><dt id="?"><span class="term">"<code class="literal">?</code>"</span><a class="headerlink" title="Permalink to this term" href="#?">¶</a></dt><dd><p>Matches any single character.</p></dd><dt id="[]"><span class="term">"<code class="literal">[]</code>"</span><a class="headerlink" title="Permalink to this term" href="#%5B%5D">¶</a></dt><dd><p>Matches any single character specified within the brackets. For
             example, the pattern string "<code class="literal">tty[SR]</code>"
             would match either "<code class="literal">ttyS</code>" or "<code class="literal">ttyR</code>".
             Ranges are also supported via the "<code class="literal">-</code>" character.
             For example, to match on the range of all digits, the pattern
             "<code class="literal">[0-9]</code>" could be used. If the first character
             following the "<code class="literal">[</code>" is a "<code class="literal">!</code>",
-            any characters not enclosed are matched.</p></dd></dl></div><p>The following keys can get values assigned:</p><div class="variablelist"><dl class="variablelist"><dt id="NAME"><span class="term"><code class="varname">NAME</code></span><a class="headerlink" title="Permalink to this term" href="#NAME">¶</a></dt><dd><p>The name to use for a network interface. See
+            any characters not enclosed are matched.</p></dd><dt id="|"><span class="term">"<code class="literal">|</code>"</span><a class="headerlink" title="Permalink to this term" href="#%7C">¶</a></dt><dd><p>Separates alternative patterns. For example, the pattern string
+            "<code class="literal">abc|x*</code>" would match either "<code class="literal">abc</code>"
+            or "<code class="literal">x*</code>".</p></dd></dl></div><p>The following keys can get values assigned:</p><div class="variablelist"><dl class="variablelist"><dt id="NAME"><span class="term"><code class="varname">NAME</code></span><a class="headerlink" title="Permalink to this term" href="#NAME">¶</a></dt><dd><p>The name to use for a network interface. See
             <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>
             for a higher-level mechanism for setting the interface name.
             The name of a device node cannot be changed by udev, only additional
             see <code class="option">RUN</code>.</p></dd><dt id="WAIT_FOR"><span class="term"><code class="varname">WAIT_FOR</code></span><a class="headerlink" title="Permalink to this term" href="#WAIT_FOR">¶</a></dt><dd><p>Wait for a file to become available or until a timeout of
             10 seconds expires. The path is relative to the sysfs device;
             if no path is specified, this waits for an attribute to appear.</p></dd><dt id="OPTIONS"><span class="term"><code class="varname">OPTIONS</code></span><a class="headerlink" title="Permalink to this term" href="#OPTIONS">¶</a></dt><dd><p>Rule and device options:</p><div class="variablelist"><dl class="variablelist"><dt id="link_priority=value"><span class="term"><code class="option">link_priority=<em class="replaceable"><code>value</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#link_priority=value">¶</a></dt><dd><p>Specify the priority of the created symlinks. Devices with higher
-                  priorities overwrite existing symlinks of other devices. The default is 0.</p></dd><dt id="event_timeout="><span class="term"><code class="option">event_timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#event_timeout=">¶</a></dt><dd><p>Number of seconds an event waits for operations to finish before
-                  giving up and terminating itself.</p></dd><dt id="string_escape=none|replace"><span class="term"><code class="option">string_escape=<em class="replaceable"><code>none|replace</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#string_escape=none%7Creplace">¶</a></dt><dd><p>Usually control and other possibly unsafe characters are replaced
+                  priorities overwrite existing symlinks of other devices. The default is 0.</p></dd><dt id="string_escape=none|replace"><span class="term"><code class="option">string_escape=<em class="replaceable"><code>none|replace</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#string_escape=none%7Creplace">¶</a></dt><dd><p>Usually control and other possibly unsafe characters are replaced
                   in strings used for device naming. The mode of replacement can be specified
                   with this option.</p></dd><dt id="static_node="><span class="term"><code class="option">static_node=</code></span><a class="headerlink" title="Permalink to this term" href="#static_node=">¶</a></dt><dd><p>Apply the permissions specified in this rule to the
                   static device node with the specified name. Also, for every
             If the number is followed by the "<code class="literal">+</code>" character, this part plus all remaining parts
             of the result string are substituted: "<code class="literal">%c{N+}</code>".</p></dd><dt id="$parent, %P"><span class="term"><code class="option">$parent</code>, <code class="option">%P</code></span><a class="headerlink" title="Permalink to this term" href="#%24parent,%20%P">¶</a></dt><dd><p>The node name of the parent device.</p></dd><dt id="$name"><span class="term"><code class="option">$name</code></span><a class="headerlink" title="Permalink to this term" href="#%24name">¶</a></dt><dd><p>The current name of the device. If not changed by a rule, it is the
             name of the kernel device.</p></dd><dt id="$links"><span class="term"><code class="option">$links</code></span><a class="headerlink" title="Permalink to this term" href="#%24links">¶</a></dt><dd><p>A space-separated list of the current symlinks. The value is
-            only set during a remove event or if an earlier rule assigned a value.</p></dd><dt id="$root, %r"><span class="term"><code class="option">$root</code>, <code class="option">%r</code></span><a class="headerlink" title="Permalink to this term" href="#%24root,%20%r">¶</a></dt><dd><p>The udev_root value.</p></dd><dt id="$sys, %S"><span class="term"><code class="option">$sys</code>, <code class="option">%S</code></span><a class="headerlink" title="Permalink to this term" href="#%24sys,%20%S">¶</a></dt><dd><p>The sysfs mount point.</p></dd><dt id="$devnode, %N"><span class="term"><code class="option">$devnode</code>, <code class="option">%N</code></span><a class="headerlink" title="Permalink to this term" href="#%24devnode,%20%N">¶</a></dt><dd><p>The name of the device node.</p></dd><dt id="%%"><span class="term"><code class="option">%%</code></span><a class="headerlink" title="Permalink to this term" href="#%%">¶</a></dt><dd><p>The "<code class="literal">%</code>" character itself.</p></dd><dt id="$$"><span class="term"><code class="option">$$</code></span><a class="headerlink" title="Permalink to this term" href="#%24%24">¶</a></dt><dd><p>The "<code class="literal">$</code>" character itself.</p></dd></dl></div></div><div class="refsect1"><a name="idm214186759088"></a><h2 id="Hardware Database Files">Hardware Database Files<a class="headerlink" title="Permalink to this headline" href="#Hardware%20Database%20Files">¶</a></h2><p>The hwdb files are read from the files located in the
+            only set during a remove event or if an earlier rule assigned a value.</p></dd><dt id="$root, %r"><span class="term"><code class="option">$root</code>, <code class="option">%r</code></span><a class="headerlink" title="Permalink to this term" href="#%24root,%20%r">¶</a></dt><dd><p>The udev_root value.</p></dd><dt id="$sys, %S"><span class="term"><code class="option">$sys</code>, <code class="option">%S</code></span><a class="headerlink" title="Permalink to this term" href="#%24sys,%20%S">¶</a></dt><dd><p>The sysfs mount point.</p></dd><dt id="$devnode, %N"><span class="term"><code class="option">$devnode</code>, <code class="option">%N</code></span><a class="headerlink" title="Permalink to this term" href="#%24devnode,%20%N">¶</a></dt><dd><p>The name of the device node.</p></dd><dt id="%%"><span class="term"><code class="option">%%</code></span><a class="headerlink" title="Permalink to this term" href="#%%">¶</a></dt><dd><p>The "<code class="literal">%</code>" character itself.</p></dd><dt id="$$"><span class="term"><code class="option">$$</code></span><a class="headerlink" title="Permalink to this term" href="#%24%24">¶</a></dt><dd><p>The "<code class="literal">$</code>" character itself.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197950448"></a><h2 id="Hardware Database Files">Hardware Database Files<a class="headerlink" title="Permalink to this headline" href="#Hardware%20Database%20Files">¶</a></h2><p>The hwdb files are read from the files located in the
       system hwdb directory <code class="filename">/usr/lib/udev/hwdb.d</code>,
       the volatile runtime directory <code class="filename">/run/udev/hwdb.d</code>
       and the local administration directory <code class="filename">/etc/udev/hwdb.d</code>.
       by "<code class="literal">=</code>". An empty line signifies the end
       of a record. Lines beginning with "<code class="literal">#</code>" are ignored.</p><p>The content of all hwdb files is read by
       <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
-      and compiled to a binary database located at <code class="filename">/etc/udev/hwdb.bin</code>.
-      During runtime only the binary database is used.</p></div><div class="refsect1"><a name="idm214186746656"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+      and compiled to a binary database located at <code class="filename">/etc/udev/hwdb.bin</code>,
+      or alternatively <code class="filename">/usr/lib/udev/hwdb.bin</code> if you want ship the compiled
+      database in an immutable image.
+      During runtime only the binary database is used.</p></div><div class="refsect1"><a name="idm214197937328"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
       <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a>,
-      <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>
+      <a href="udevadm.html"><span class="citerefentry"><span class="refentrytitle">udevadm</span>(8)</span></a>,
       <a href="systemd.link.html"><span class="citerefentry"><span class="refentrytitle">systemd.link</span>(5)</span></a>
     </p></div></div></body></html>
index 4e5f8f00aa3530cfea2ec491f8eb0a231f89b273..87c16c78eed46698ad3e362399513d640dcf5b62 100644 (file)
           </listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term><literal>-=</literal></term>
+          <listitem>
+            <para>Remove the value from a key that holds a list of entries.</para>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term><literal>:=</literal></term>
           <listitem>
         </varlistentry>
       </variablelist>
 
-      <para>Most of the fields support shell glob pattern matching. The following
-      pattern characters are supported:</para>
+      <para>Most of the fields support shell glob pattern matching and
+      alternate patterns. The following special characters are supported:</para>
       <variablelist>
         <varlistentry>
           <term><literal>*</literal></term>
             any characters not enclosed are matched.</para>
           </listitem>
         </varlistentry>
+        <varlistentry>
+          <term><literal>|</literal></term>
+          <listitem>
+            <para>Separates alternative patterns. For example, the pattern string
+            <literal>abc|x*</literal> would match either <literal>abc</literal>
+            or <literal>x*</literal>.</para>
+          </listitem>
+        </varlistentry>
       </variablelist>
 
       <para>The following keys can get values assigned:</para>
                   priorities overwrite existing symlinks of other devices. The default is 0.</para>
                 </listitem>
               </varlistentry>
-              <varlistentry>
-                <term><option>event_timeout=</option></term>
-                <listitem>
-                  <para>Number of seconds an event waits for operations to finish before
-                  giving up and terminating itself.</para>
-                </listitem>
-              </varlistentry>
               <varlistentry>
                 <term><option>string_escape=<replaceable>none|replace</replaceable></option></term>
                 <listitem>
 
       <para>The content of all hwdb files is read by
       <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-      and compiled to a binary database located at <filename>/etc/udev/hwdb.bin</filename>.
+      and compiled to a binary database located at <filename>/etc/udev/hwdb.bin</filename>,
+      or alternatively <filename>/usr/lib/udev/hwdb.bin</filename> if you want ship the compiled
+      database in an immutable image.
       During runtime only the binary database is used.</para>
   </refsect1>
 
       </citerefentry>,
       <citerefentry>
         <refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum>
-      </citerefentry>
+      </citerefentry>,
       <citerefentry>
         <refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum>
       </citerefentry>
index b5a1b3aee6dd05d89aab57a0f181b82f8ffa9e67..49d32150ff926168b8618e75df9afa5b5a4e4385 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "UDEVADM" "8" "" "systemd 215" "udevadm"
+.TH "UDEVADM" "8" "" "systemd 217" "udevadm"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -338,6 +338,16 @@ Compile the hardware database information located in /usr/lib/udev/hwdb\&.d/, /e
 /etc/udev/hwdb\&.bin\&. This should be done after any update to the source files; it will not be called automatically\&. The running udev daemon will detect a new database on its own and does not need to be notified about it\&.
 .RE
 .PP
+\fB\-\-usr\fR
+.RS 4
+Put the compiled database into
+/usr/lib/udev/hwdb\&.bin
+instead\&. Use this if you want to ship a pre\-compiled database in immutable system images, or don\*(Aqt use
+/etc/udev/hwdb\&.d
+and want to avoid large binary files in
+/etc\&.
+.RE
+.PP
 \fB\-t\fR, \fB\-\-test=\fR\fB\fIstring\fR\fR
 .RS 4
 Query the database with a modalias string, and print the retrieved properties\&.
index 6c0ff4410ae663eb9e8262b674c52479d9dd169f..a81987cfd81a6581a9169832c9f1f9cf227875d8 100644 (file)
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="udevadm"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>udevadm — udev management tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">udevadm</code>  [<code class="option">--debug</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div><div class="cmdsynopsis"><p><code class="command">udevadm info <em class="replaceable"><code>options</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm trigger [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm settle [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm control <em class="replaceable"><code>command</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm monitor [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm hwdb [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm test [<span class="optional">options</span>] <em class="replaceable"><code>devpath</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm test-builtin [<span class="optional">options</span>] <em class="replaceable"><code>command</code></em> <em class="replaceable"><code>devpath</code></em></code> </p></div></div><div class="refsect1"><a name="idm214169730704"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>udevadm</strong></span> expects a command and command
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="udevadm"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>udevadm — udev management tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">udevadm</code>  [<code class="option">--debug</code>] [<code class="option">--version</code>] [<code class="option">--help</code>]</p></div><div class="cmdsynopsis"><p><code class="command">udevadm info <em class="replaceable"><code>options</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm trigger [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm settle [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm control <em class="replaceable"><code>command</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm monitor [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm hwdb [<span class="optional">options</span>]</code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm test [<span class="optional">options</span>] <em class="replaceable"><code>devpath</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">udevadm test-builtin [<span class="optional">options</span>] <em class="replaceable"><code>command</code></em> <em class="replaceable"><code>devpath</code></em></code> </p></div></div><div class="refsect1"><a name="idm214201021856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>udevadm</strong></span> expects a command and command
     specific options.  It controls the runtime behavior of
     <span class="command"><strong>systemd-udevd</strong></span>, requests kernel events, manages
-    the event queue, and provides simple debugging mechanisms.</p></div><div class="refsect1"><a name="idm214169728176"></a><h2 id="OPTIONS">OPTIONS<a class="headerlink" title="Permalink to this headline" href="#OPTIONS">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>Print version number.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div><div class="refsect2"><a name="idm214173624144"></a><h3 id="udevadm info [OPTIONS] [DEVPATH|FILE]">udevadm info [<span class="optional"><em class="replaceable"><code>OPTIONS</code></em></span>] [<span class="optional"><em class="replaceable"><code>DEVPATH</code></em>|<em class="replaceable"><code>FILE</code></em></span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20info%20%5BOPTIONS%5D%20%5BDEVPATH%7CFILE%5D">¶</a></h3><p>Queries the udev database for device information
+    the event queue, and provides simple debugging mechanisms.</p></div><div class="refsect1"><a name="idm214201019328"></a><h2 id="OPTIONS">OPTIONS<a class="headerlink" title="Permalink to this headline" href="#OPTIONS">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--debug"><span class="term"><code class="option">--debug</code></span><a class="headerlink" title="Permalink to this term" href="#--debug">¶</a></dt><dd><p>Print debug messages to standard error.</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>Print version number.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div><div class="refsect2"><a name="idm214201012640"></a><h3 id="udevadm info [OPTIONS] [DEVPATH|FILE]">udevadm info [<span class="optional"><em class="replaceable"><code>OPTIONS</code></em></span>] [<span class="optional"><em class="replaceable"><code>DEVPATH</code></em>|<em class="replaceable"><code>FILE</code></em></span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20info%20%5BOPTIONS%5D%20%5BDEVPATH%7CFILE%5D">¶</a></h3><p>Queries the udev database for device information
       stored in the udev database. It can also query the properties
       of a device from its sysfs representation to help creating udev
       rules that match this device.</p><div class="variablelist"><dl class="variablelist"><dt id="-q"><span class="term"><code class="option">-q</code>, </span><span class="term"><code class="option">--query=<em class="replaceable"><code>TYPE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-q">¶</a></dt><dd><p>Query the database for the specified type of device
@@ -47,7 +47,7 @@
             query.</p></dd><dt id="-a"><span class="term"><code class="option">-a</code>, </span><span class="term"><code class="option">--attribute-walk</code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p>Print all sysfs properties of the specified device that can be used
             in udev rules to match the specified device. It prints all devices
             along the chain, up to the root of sysfs that can be used in udev rules.</p></dd><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--export</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Print output as key/value pairs. Values are enclosed in single quotes.</p></dd><dt id="-P"><span class="term"><code class="option">-P</code>, </span><span class="term"><code class="option">--export-prefix=<em class="replaceable"><code>NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-P">¶</a></dt><dd><p>Add a prefix to the key name of exported values.</p></dd><dt id="-d"><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--device-id-of-file=<em class="replaceable"><code>FILE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-d">¶</a></dt><dd><p>Print major/minor numbers of the underlying device, where the file
-            lives on.</p></dd><dt id="-e"><span class="term"><code class="option">-e</code>, </span><span class="term"><code class="option">--export-db</code></span><a class="headerlink" title="Permalink to this term" href="#-e">¶</a></dt><dd><p>Export the content of the udev database.</p></dd><dt id="-c"><span class="term"><code class="option">-c</code>, </span><span class="term"><code class="option">--cleanup-db</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Cleanup the udev database.</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>Print version.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168948752"></a><h3 id="udevadm trigger [options]">udevadm trigger [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20trigger%20%5Boptions%5D">¶</a></h3><p>Request device events from the kernel. Primarily used to replay events at system coldplug time.</p><div class="variablelist"><dl class="variablelist"><dt id="-v"><span class="term"><code class="option">-v</code>, </span><span class="term"><code class="option">--verbose</code></span><a class="headerlink" title="Permalink to this term" href="#-v">¶</a></dt><dd><p>Print the list of devices which will be triggered.</p></dd><dt id="-n"><span class="term"><code class="option">-n</code>, </span><span class="term"><code class="option">--dry-run</code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p>Do not actually trigger the event.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--type=<em class="replaceable"><code>TYPE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Trigger a specific type of devices. Valid types are:
+            lives on.</p></dd><dt id="-e"><span class="term"><code class="option">-e</code>, </span><span class="term"><code class="option">--export-db</code></span><a class="headerlink" title="Permalink to this term" href="#-e">¶</a></dt><dd><p>Export the content of the udev database.</p></dd><dt id="-c"><span class="term"><code class="option">-c</code>, </span><span class="term"><code class="option">--cleanup-db</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Cleanup the udev database.</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>Print version.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214195996480"></a><h3 id="udevadm trigger [options]">udevadm trigger [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20trigger%20%5Boptions%5D">¶</a></h3><p>Request device events from the kernel. Primarily used to replay events at system coldplug time.</p><div class="variablelist"><dl class="variablelist"><dt id="-v"><span class="term"><code class="option">-v</code>, </span><span class="term"><code class="option">--verbose</code></span><a class="headerlink" title="Permalink to this term" href="#-v">¶</a></dt><dd><p>Print the list of devices which will be triggered.</p></dd><dt id="-n"><span class="term"><code class="option">-n</code>, </span><span class="term"><code class="option">--dry-run</code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p>Do not actually trigger the event.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--type=<em class="replaceable"><code>TYPE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Trigger a specific type of devices. Valid types are:
             <span class="command"><strong>devices</strong></span>, <span class="command"><strong>subsystems</strong></span>.
             The default value is <span class="command"><strong>devices</strong></span>.</p></dd><dt id="-c"><span class="term"><code class="option">-c</code>, </span><span class="term"><code class="option">--action=<em class="replaceable"><code>ACTION</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Type of event to be triggered. The default value is
             <span class="command"><strong>change</strong></span>.</p></dd><dt id="-s"><span class="term"><code class="option">-s</code>, </span><span class="term"><code class="option">--subsystem-match=<em class="replaceable"><code>SUBSYSTEM</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-s">¶</a></dt><dd><p>Trigger events for devices which belong to a
             option can be specified multiple times.</p></dd><dt id="-y"><span class="term"><code class="option">-y</code>, </span><span class="term"><code class="option">--sysname-match=<em class="replaceable"><code>NAME</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-y">¶</a></dt><dd><p>Trigger events for devices with a matching sys
             device name. This option can be specified multiple times
             and supports shell style pattern matching.</p></dd><dt id="-b"><span class="term"><code class="option">-b</code>, </span><span class="term"><code class="option">--parent-match=<em class="replaceable"><code>SYSPATH</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-b">¶</a></dt><dd><p>Trigger events for all children of a given
-            device.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168910848"></a><h3 id="udevadm settle [options]">udevadm settle [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20settle%20%5Boptions%5D">¶</a></h3><p>Watches the udev event queue, and exits if all current events are handled.</p><div class="variablelist"><dl class="variablelist"><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--timeout=<em class="replaceable"><code>SECONDS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Maximum number of seconds to wait for the event
+            device.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214195958464"></a><h3 id="udevadm settle [options]">udevadm settle [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20settle%20%5Boptions%5D">¶</a></h3><p>Watches the udev event queue, and exits if all current events are handled.</p><div class="variablelist"><dl class="variablelist"><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--timeout=<em class="replaceable"><code>SECONDS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Maximum number of seconds to wait for the event
             queue to become empty. The default value is 120 seconds. A
             value of 0 will check if the queue is empty and always
-            return immediately.</p></dd><dt id="-E"><span class="term"><code class="option">-E</code>, </span><span class="term"><code class="option">--exit-if-exists=<em class="replaceable"><code>FILE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-E">¶</a></dt><dd><p>Stop waiting if file exists.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168901904"></a><h3 id="udevadm control command">udevadm control <em class="replaceable"><code>command</code></em><a class="headerlink" title="Permalink to this headline" href="#udevadm%20control%20command">¶</a></h3><p>Modify the internal state of the running udev daemon.</p><div class="variablelist"><dl class="variablelist"><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--exit</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Signal and wait for systemd-udevd to exit.</p></dd><dt id="-l"><span class="term"><code class="option">-l</code>, </span><span class="term"><code class="option">--log-priority=<em class="replaceable"><code>value</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-l">¶</a></dt><dd><p>Set the internal log level of systemd-udevd. Valid values are the numerical
+            return immediately.</p></dd><dt id="-E"><span class="term"><code class="option">-E</code>, </span><span class="term"><code class="option">--exit-if-exists=<em class="replaceable"><code>FILE</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-E">¶</a></dt><dd><p>Stop waiting if file exists.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214195949520"></a><h3 id="udevadm control command">udevadm control <em class="replaceable"><code>command</code></em><a class="headerlink" title="Permalink to this headline" href="#udevadm%20control%20command">¶</a></h3><p>Modify the internal state of the running udev daemon.</p><div class="variablelist"><dl class="variablelist"><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--exit</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Signal and wait for systemd-udevd to exit.</p></dd><dt id="-l"><span class="term"><code class="option">-l</code>, </span><span class="term"><code class="option">--log-priority=<em class="replaceable"><code>value</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-l">¶</a></dt><dd><p>Set the internal log level of systemd-udevd. Valid values are the numerical
             syslog priorities or their textual representations: <code class="option">err</code>,
             <code class="option">info</code> and <code class="option">debug</code>.</p></dd><dt id="-s"><span class="term"><code class="option">-s</code>, </span><span class="term"><code class="option">--stop-exec-queue</code></span><a class="headerlink" title="Permalink to this term" href="#-s">¶</a></dt><dd><p>Signal systemd-udevd to stop executing new events. Incoming events
             will be queued.</p></dd><dt id="-S"><span class="term"><code class="option">-S</code>, </span><span class="term"><code class="option">--start-exec-queue</code></span><a class="headerlink" title="Permalink to this term" href="#-S">¶</a></dt><dd><p>Signal systemd-udevd to enable the execution of events.</p></dd><dt id="-R"><span class="term"><code class="option">-R</code>, </span><span class="term"><code class="option">--reload</code></span><a class="headerlink" title="Permalink to this term" href="#-R">¶</a></dt><dd><p>Signal systemd-udevd to reload the rules files and other databases like the kernel
             module index. Reloading rules and databases does not apply any changes to already
             existing devices; the new configuration will only be applied to new events.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--property=<em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>value</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Set a global property for all events.</p></dd><dt id="-m"><span class="term"><code class="option">-m</code>, </span><span class="term"><code class="option">--children-max=</code><em class="replaceable"><code>value</code></em></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p>Set the maximum number of events, systemd-udevd will handle at the
-            same time.</p></dd><dt id="--timeout=seconds"><span class="term"><code class="option">--timeout=</code><em class="replaceable"><code>seconds</code></em></span><a class="headerlink" title="Permalink to this term" href="#--timeout=seconds">¶</a></dt><dd><p>The maximum number of seconds to wait for a reply from systemd-udevd.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168877936"></a><h3 id="udevadm monitor [options]">udevadm monitor [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20monitor%20%5Boptions%5D">¶</a></h3><p>Listens to the kernel uevents and events sent out by a udev rule
+            same time.</p></dd><dt id="--timeout=seconds"><span class="term"><code class="option">--timeout=</code><em class="replaceable"><code>seconds</code></em></span><a class="headerlink" title="Permalink to this term" href="#--timeout=seconds">¶</a></dt><dd><p>The maximum number of seconds to wait for a reply from systemd-udevd.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214195925552"></a><h3 id="udevadm monitor [options]">udevadm monitor [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20monitor%20%5Boptions%5D">¶</a></h3><p>Listens to the kernel uevents and events sent out by a udev rule
       and prints the devpath of the event to the console. It can be used to analyze the
       event timing, by comparing the timestamps of the kernel uevent and the udev event.
-      </p><div class="variablelist"><dl class="variablelist"><dt id="-k"><span class="term"><code class="option">-k</code>, </span><span class="term"><code class="option">--kernel</code></span><a class="headerlink" title="Permalink to this term" href="#-k">¶</a></dt><dd><p>Print the kernel uevents.</p></dd><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--udev</code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Print the udev event after the rule processing.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--property</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Also print the properties of the event.</p></dd><dt id="-s"><span class="term"><code class="option">-s</code>, </span><span class="term"><code class="option">--subsystem-match=<em class="replaceable"><code>string[/string]</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-s">¶</a></dt><dd><p>Filter events by subsystem[/devtype]. Only udev events with a matching subsystem value will pass.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--tag-match=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Filter events by property. Only udev events with a given tag attached will pass.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168862224"></a><h3 id="udevadm hwdb [options]">udevadm hwdb [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20hwdb%20%5Boptions%5D">¶</a></h3><p>Maintain the hardware database index in <code class="filename">/etc/udev/hwdb.bin</code>.</p><div class="variablelist"><dl class="variablelist"><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--update</code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Compile the hardware database information located in /usr/lib/udev/hwdb.d/,
+      </p><div class="variablelist"><dl class="variablelist"><dt id="-k"><span class="term"><code class="option">-k</code>, </span><span class="term"><code class="option">--kernel</code></span><a class="headerlink" title="Permalink to this term" href="#-k">¶</a></dt><dd><p>Print the kernel uevents.</p></dd><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--udev</code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Print the udev event after the rule processing.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--property</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Also print the properties of the event.</p></dd><dt id="-s"><span class="term"><code class="option">-s</code>, </span><span class="term"><code class="option">--subsystem-match=<em class="replaceable"><code>string[/string]</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-s">¶</a></dt><dd><p>Filter events by subsystem[/devtype]. Only udev events with a matching subsystem value will pass.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--tag-match=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Filter events by property. Only udev events with a given tag attached will pass.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214195909840"></a><h3 id="udevadm hwdb [options]">udevadm hwdb [<span class="optional">options</span>]<a class="headerlink" title="Permalink to this headline" href="#udevadm%20hwdb%20%5Boptions%5D">¶</a></h3><p>Maintain the hardware database index in <code class="filename">/etc/udev/hwdb.bin</code>.</p><div class="variablelist"><dl class="variablelist"><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--update</code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Compile the hardware database information located in /usr/lib/udev/hwdb.d/,
             /etc/udev/hwdb.d/ and store it in <code class="filename">/etc/udev/hwdb.bin</code>. This should be done after
             any update to the source files; it will not be called automatically. The running
             udev daemon will detect a new database on its own and does not need to be
-            notified about it.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--test=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Query the database with a modalias string, and print the
-            retrieved properties.</p></dd><dt id="-r"><span class="term"><code class="option">-r</code>, </span><span class="term"><code class="option">--root=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p>Alternative root path in the file system for reading and writing files.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168849504"></a><h3 id="udevadm test [options] devpath">udevadm test [<span class="optional">options</span>] <em class="replaceable"><code>devpath</code></em><a class="headerlink" title="Permalink to this headline" href="#udevadm%20test%20%5Boptions%5D%20devpath">¶</a></h3><p>Simulate a udev event run for the given device, and print debug output.</p><div class="variablelist"><dl class="variablelist"><dt id="-a"><span class="term"><code class="option">-a</code>, </span><span class="term"><code class="option">--action=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p>The action string.</p></dd><dt id="-N"><span class="term"><code class="option">-N</code>, </span><span class="term"><code class="option">--resolve-names=<code class="constant">early</code>|<code class="constant">late</code>|<code class="constant">never</code></code></span><a class="headerlink" title="Permalink to this term" href="#-N">¶</a></dt><dd><p>Specify when udevadm should resolve names of users
+            notified about it.</p></dd><dt id="--usr"><span class="term"><code class="option">--usr</code></span><a class="headerlink" title="Permalink to this term" href="#--usr">¶</a></dt><dd><p>Put the compiled database into <code class="filename">/usr/lib/udev/hwdb.bin</code> instead.
+            Use this if you want to ship a pre-compiled database in immutable system images, or
+            don't use <code class="filename">/etc/udev/hwdb.d</code> and want to avoid large binary files in
+            <code class="filename">/etc</code>.</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--test=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Query the database with a modalias string, and print the
+            retrieved properties.</p></dd><dt id="-r"><span class="term"><code class="option">-r</code>, </span><span class="term"><code class="option">--root=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p>Alternative root path in the file system for reading and writing files.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214195893440"></a><h3 id="udevadm test [options] devpath">udevadm test [<span class="optional">options</span>] <em class="replaceable"><code>devpath</code></em><a class="headerlink" title="Permalink to this headline" href="#udevadm%20test%20%5Boptions%5D%20devpath">¶</a></h3><p>Simulate a udev event run for the given device, and print debug output.</p><div class="variablelist"><dl class="variablelist"><dt id="-a"><span class="term"><code class="option">-a</code>, </span><span class="term"><code class="option">--action=<em class="replaceable"><code>string</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p>The action string.</p></dd><dt id="-N"><span class="term"><code class="option">-N</code>, </span><span class="term"><code class="option">--resolve-names=<code class="constant">early</code>|<code class="constant">late</code>|<code class="constant">never</code></code></span><a class="headerlink" title="Permalink to this term" href="#-N">¶</a></dt><dd><p>Specify when udevadm should resolve names of users
             and groups.  When set to <code class="constant">early</code> (the
             default), names will be resolved when the rules are
             parsed. When set to <code class="constant">late</code>, names will
             be resolved for every event. When set to
             <code class="constant">never</code>, names will never be resolved
-            and all devices will be owned by root.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214168838000"></a><h3 id="udevadm test-builtin [options] COMMAND DEVPATH">udevadm test-builtin [<span class="optional">options</span>] <em class="replaceable"><code>COMMAND</code></em> <em class="replaceable"><code>DEVPATH</code></em><a class="headerlink" title="Permalink to this headline" href="#udevadm%20test-builtin%20%5Boptions%5D%20COMMAND%20DEVPATH">¶</a></h3><p>Run a built-in command <em class="replaceable"><code>COMMAND</code></em>
+            and all devices will be owned by root.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div><div class="refsect2"><a name="idm214195881936"></a><h3 id="udevadm test-builtin [options] COMMAND DEVPATH">udevadm test-builtin [<span class="optional">options</span>] <em class="replaceable"><code>COMMAND</code></em> <em class="replaceable"><code>DEVPATH</code></em><a class="headerlink" title="Permalink to this headline" href="#udevadm%20test-builtin%20%5Boptions%5D%20COMMAND%20DEVPATH">¶</a></h3><p>Run a built-in command <em class="replaceable"><code>COMMAND</code></em>
       for device <em class="replaceable"><code>DEVPATH</code></em>, and print debug
-      output.</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div></div><div class="refsect1"><a name="idm214168832496"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
+      output.</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Print help text.</p></dd></dl></div></div></div><div class="refsect1"><a name="idm214195876432"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p><a href="udev.html"><span class="citerefentry"><span class="refentrytitle">udev</span>(7)</span></a>,
     <a href="systemd-udevd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd.service</span>(8)</span></a></p></div></div></body></html>
index fbfa85a80475272741e94929f67faf2b11e4ee32..b85d9a9249733aa7e6b709b8ac99de0836396097 100644 (file)
@@ -20,7 +20,6 @@
   <refmeta>
     <refentrytitle>udevadm</refentrytitle>
     <manvolnum>8</manvolnum>
-    <refmiscinfo class="version"></refmiscinfo>
   </refmeta>
 
   <refnamediv>
             notified about it.</para>
           </listitem>
         </varlistentry>
+        <varlistentry>
+          <term><option>--usr</option></term>
+          <listitem>
+            <para>Put the compiled database into <filename>/usr/lib/udev/hwdb.bin</filename> instead.
+            Use this if you want to ship a pre-compiled database in immutable system images, or
+            don't use <filename>/etc/udev/hwdb.d</filename> and want to avoid large binary files in
+            <filename>/etc</filename>.</para>
+          </listitem>
+        </varlistentry>
         <varlistentry>
           <term><option>-t</option></term>
           <term><option>--test=<replaceable>string</replaceable></option></term>
index 05a25fe81521c5756d28f3616b8f1147280da9f3..b4bf8c1dd0fc318eb4683c2bc0a2e70080257567 100644 (file)
@@ -1,5 +1,5 @@
 '\" t
-.TH "VCONSOLE\&.CONF" "5" "" "systemd 215" "vconsole.conf"
+.TH "VCONSOLE\&.CONF" "5" "" "systemd 217" "vconsole.conf"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index b0095a736c01c76f310fbd43cd4f8095e5688bbd..8d627c9e337f4d748a1676855003f4c666dd0eae 100644 (file)
@@ -19,7 +19,7 @@
   <a href="systemd.directives.html">Directives </a>·
   <a href="../python-systemd/index.html">Python </a>·
   <a href="../libudev/index.html">libudev </a>·
-  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="vconsole.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>vconsole.conf — Configuration file for the virtual console</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/vconsole.conf</code></p></div><div class="refsect1"><a name="idm214188601936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/vconsole.conf</code> file
+  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="vconsole.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>vconsole.conf — Configuration file for the virtual console</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/vconsole.conf</code></p></div><div class="refsect1"><a name="idm214187994000"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>The <code class="filename">/etc/vconsole.conf</code> file
                 configures the virtual console, i.e. keyboard mapping
                 and console font. It is applied at boot by
                 <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a>.</p><p>The basic file format of the
@@ -39,7 +39,7 @@
                 to override the console settings at boot.</p><p>Depending on the operating system other
                 configuration files might be checked for configuration
                 of the virtual console as well, however only as
-                fallback.</p></div><div class="refsect1"><a name="idm214188594400"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="KEYMAP="><span class="term"><code class="varname">KEYMAP=</code>, </span><span class="term"><code class="varname">KEYMAP_TOGGLE=</code></span><a class="headerlink" title="Permalink to this term" href="#KEYMAP=">¶</a></dt><dd><p>Configures the key
+                fallback.</p></div><div class="refsect1"><a name="idm214187986400"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="KEYMAP="><span class="term"><code class="varname">KEYMAP=</code>, </span><span class="term"><code class="varname">KEYMAP_TOGGLE=</code></span><a class="headerlink" title="Permalink to this term" href="#KEYMAP=">¶</a></dt><dd><p>Configures the key
                                 mapping table for the
                                 keyboard. <code class="varname">KEYMAP=</code>
                                 defaults to "<code class="literal">us</code>" if
@@ -49,8 +49,8 @@
                                 keymap and is by default
                                 unset.</p></dd><dt id="FONT="><span class="term"><code class="varname">FONT=</code>, </span><span class="term"><code class="varname">FONT_MAP=</code>, </span><span class="term"><code class="varname">FONT_UNIMAP=</code></span><a class="headerlink" title="Permalink to this term" href="#FONT=">¶</a></dt><dd><p>Configures the console
                                 font, the console map and the unicode
-                                font map.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192540192"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214192539520"></a><p class="title"><b>Example 1. German keyboard and console</b></p><div class="example-contents"><p><code class="filename">/etc/vconsole.conf</code>:</p><pre class="programlisting">KEYMAP=de-latin1
-FONT=latarcyrheb-sun16</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214192536928"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
+                                font map.</p></dd></dl></div></div><div class="refsect1"><a name="idm214191932160"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example">¶</a></h2><div class="example"><a name="idm214191931488"></a><p class="title"><b>Example 1. German keyboard and console</b></p><div class="example-contents"><p><code class="filename">/etc/vconsole.conf</code>:</p><pre class="programlisting">KEYMAP=de-latin1
+FONT=latarcyrheb-sun16</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm214191928896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                           <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                           <a href="systemd-vconsole-setup.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-vconsole-setup.service</span>(8)</span></a>,
                           <a href="loadkeys.html"><span class="citerefentry"><span class="refentrytitle">loadkeys</span>(1)</span></a>,
index 53215f633bb9fdca81d72aabadc07c769926dc25..79538f9b29bddd8c9f32b973b4c3f8693bf80b2f 100644 (file)
@@ -1,3 +1,3 @@
 [Link]
-NamePolicy=database onboard slot path
+NamePolicy=kernel database onboard slot path
 MACAddressPolicy=persistent
index 2cb0f30b69f475b9227ca7f67798b78e7e7df72c..f214ece481a2e466a38d92421010480baa90d6d8 100644 (file)
@@ -4,3 +4,4 @@ fr
 it
 pl
 ru
+uk
index b552029b82cc8720d7dc4267c2bcb1f8a98c34ce..51254ec5333f2394a9b099ab9cae34f23b569e9a 100644 (file)
@@ -17,6 +17,5 @@ src/hostname/hostnamed.c
 src/locale/localed.c
 src/core/org.freedesktop.systemd1.policy.in
 src/timedate/timedated.c
-units/systemd-readahead-done.service.in
 units/user@.service.in
 units/debug-shell.service.in
index ed8a68657d01f98a749cc3ba5f904b8aa864d77e..7240cc57afd2ff6e3bad06d030a12f5e2e4a548a 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2013-11-14 17:49+0100\n"
-"PO-Revision-Date: 2013-11-14 17:57+0100\n"
+"PO-Revision-Date: 2014-04-29 09:17+0300\n"
 "Last-Translator: Sylvain Plantefève <sylvain.plantefeve@gmail.com>\n"
 "Language-Team: French\n"
 "Language: fr\n"
@@ -395,3 +395,29 @@ msgid "Authentication is required to access the system and service manager."
 msgstr ""
 "Authentification requise pour accéder au gestionnaire du système et des "
 "services."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5
+msgid "Manage system services or units"
+msgstr "Gérer les services système ou les unités"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:6
+msgid "Authentication is required to manage system services or units."
+msgstr ""
+"Authentification requise pour gérer les services système ou les unités."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7
+msgid "Manage system service or unit files"
+msgstr "Gérer le service système ou ses fichiers unités"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8
+msgid "Authentication is required to manage system service or unit files."
+msgstr ""
+"Authentification requise pour gérer le service système ou ses fichiers unités."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:9
+msgid "Reload the systemd state"
+msgstr "Recharger l'état de systemd"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:10
+msgid "Authentication is required to reload the systemd state."
+msgstr "Authentification requise pour recharger l'état de systemd"
index 6a95d2fd745be18bc98e94cdfa522b6b95afd198..0407fe086103c12a3bf14b4b4e42c608becd2596 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,13 +1,13 @@
 # translation of pl.po to Polish
-# Piotr Drąg <piotrdrag@gmail.com>, 2011, 2013.
+# Piotr Drąg <piotrdrag@gmail.com>, 2011, 2013, 2014.
 # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>, 2011.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-12 19:29+0100\n"
-"PO-Revision-Date: 2013-01-12 19:30+0100\n"
+"POT-Creation-Date: 2014-08-24 18:10+0200\n"
+"PO-Revision-Date: 2014-08-24 18:15+0200\n"
 "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
 "Language-Team: Polish <trans-pl@lists.fedoraproject.org>\n"
 "Language: pl\n"
@@ -389,3 +389,31 @@ msgid "Authentication is required to access the system and service manager."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby uzyskać dostęp do menedżera systemu i "
 "usług."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5
+msgid "Manage system services or units"
+msgstr "Zarządzanie usługami lub jednostkami systemu"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:6
+msgid "Authentication is required to manage system services or units."
+msgstr ""
+"Wymagane jest uwierzytelnienie, aby zarządzać usługami lub jednostkami "
+"systemu."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7
+msgid "Manage system service or unit files"
+msgstr "Zarządzanie plikami usług lub jednostek systemu"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8
+msgid "Authentication is required to manage system service or unit files."
+msgstr ""
+"Wymagane jest uwierzytelnienie, aby zarządzać plikami usług lub jednostek "
+"systemu."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:9
+msgid "Reload the systemd state"
+msgstr "Ponowne wczytanie stanu systemd"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:10
+msgid "Authentication is required to reload the systemd state."
+msgstr "Wymagane jest uwierzytelnienie, aby ponownie wczytać stan systemd."
index 1ad4efb2e365eb15e60f4631cdac16a11c6cce7d..de283f7ff698900acefe7a6056c9ea05f70da77b 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,13 +1,13 @@
 # translation of ru.po to Rissian
 # Julia Dronova <juliette.tux@gmail.com>, 2013.
-# Sergey Ptashnick <0comffdiz@inbox.ru>, 2013.
+# Sergey Ptashnick <0comffdiz@inbox.ru>, 2013-2014.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: 0comffdiz@inbox.ru\n"
 "POT-Creation-Date: 2013-03-24 19:22+0300\n"
-"PO-Revision-Date: 2013-11-18 02:18+0400\n"
+"PO-Revision-Date: 2014-08-29 19:29+0400\n"
 "Last-Translator: Sergey Ptashnick <0comffdiz@inbox.ru>\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
@@ -293,3 +293,27 @@ msgstr "Привилегированный доступ к системному
 #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4
 msgid "Authentication is required to access the system and service manager."
 msgstr "Для привилегированного доступа к системному менеджеру необходимо пройти аутентификацию."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5
+msgid "Manage system services or units"
+msgstr "Управление системными службами и юнитами"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:6
+msgid "Authentication is required to manage system services or units."
+msgstr "Для управления системными службами и юнитами, необходимо пройти аутентификацию."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7
+msgid "Manage system service or unit files"
+msgstr "Управление файлами конфигурации системных служб и юнитов"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8
+msgid "Authentication is required to manage system service or unit files."
+msgstr "Для управления файлами конфигурации системных служб и юнитов, необходимо пройти аутентификацию."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:9
+msgid "Reload the systemd state"
+msgstr "Перечитать конфигурацию systemd"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:10
+msgid "Authentication is required to reload the systemd state."
+msgstr "Чтобы заставить systemd перечитать конфигурацию, необходимо пройти аутентификацию."
diff --git a/po/uk.po b/po/uk.po
new file mode 100644 (file)
index 0000000..7a5212a
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,377 @@
+# Ukrainian translation for systemd.
+# Copyright (C) 2014 systemd's COPYRIGHT HOLDER
+# This file is distributed under the same license as the systemd package.
+# Eugene Melnik <jeka7js@gmail.com>, 2014.
+# Daniel Korostil <ted.korostiled@gmail.com>, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: systemd master\n"
+"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=sys"
+"temd&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2014-06-06 22:16+0000\n"
+"PO-Revision-Date: 2014-07-16 19:13+0300\n"
+"Last-Translator: Daniel Korostil <ted.korostiled@gmail.com>\n"
+"Language-Team: linux.org.ua\n"
+"Language: uk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Virtaal 0.7.1\n"
+
+#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:1
+msgid "Set host name"
+msgstr "Встановити назву вузла"
+
+#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:2
+msgid "Authentication is required to set the local host name."
+msgstr "Засвідчення потрібне, щоб встановити назву локального вузла."
+
+#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:3
+msgid "Set static host name"
+msgstr "Встановити статичну назву вузла"
+
+#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:4
+msgid ""
+"Authentication is required to set the statically configured local host name, "
+"as well as the pretty host name."
+msgstr ""
+"Засвідчення потрібне, щоб вказати статично налаштовану назву локального "
+"вузла, так само й форматовану."
+
+#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:5
+msgid "Set machine information"
+msgstr "Встановити інформацію про машину"
+
+#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:6
+msgid "Authentication is required to set local machine information."
+msgstr "Засвідчення потрібно, щоб вказати локальну інформацію про машини."
+
+#: ../src/locale/org.freedesktop.locale1.policy.in.h:1
+msgid "Set system locale"
+msgstr "Вказати системну локаль"
+
+#: ../src/locale/org.freedesktop.locale1.policy.in.h:2
+msgid "Authentication is required to set the system locale."
+msgstr "Засвідчення потрібно, щоб встановити системну локаль."
+
+#: ../src/locale/org.freedesktop.locale1.policy.in.h:3
+msgid "Set system keyboard settings"
+msgstr "Вказати налаштування системної клавіатури"
+
+#: ../src/locale/org.freedesktop.locale1.policy.in.h:4
+msgid "Authentication is required to set the system keyboard settings."
+msgstr "Засвідчення потрібно, щоб вказати налаштування системної клавіатури."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:1
+msgid "Allow applications to inhibit system shutdown"
+msgstr "Дозволити програмам перешкоджати вимкненню системи"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:2
+msgid ""
+"Authentication is required to allow an application to inhibit system "
+"shutdown."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам перешкоджати вимкненню системи."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:3
+msgid "Allow applications to delay system shutdown"
+msgstr "Дозволити програмам затримувати вимкнення системи"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:4
+msgid ""
+"Authentication is required to allow an application to delay system shutdown."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам затримувати вимкнення системи."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:5
+msgid "Allow applications to inhibit system sleep"
+msgstr "Дозволити програмам перешкоджати засинанню системи"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:6
+msgid ""
+"Authentication is required to allow an application to inhibit system sleep."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам перешкоджати засинанню системи."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:7
+msgid "Allow applications to delay system sleep"
+msgstr "Дозволити програмами затримувати засинання системи"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:8
+msgid ""
+"Authentication is required to allow an application to delay system sleep."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам затримувати засинання системи."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:9
+msgid "Allow applications to inhibit automatic system suspend"
+msgstr "Дозволити програмам перешкоджати автоматичному призупиненню системи"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:10
+msgid ""
+"Authentication is required to allow an application to inhibit automatic "
+"system suspend."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам перешкоджати автоматичному "
+"призупиненню системи."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:11
+msgid "Allow applications to inhibit system handling of the power key"
+msgstr "Дозволити програмам перешкоджати обробленню системою клавіші живлення"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:12
+msgid ""
+"Authentication is required to allow an application to inhibit system "
+"handling of the power key."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам перешкоджати обробленню "
+"системою клавіші живлення."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:13
+msgid "Allow applications to inhibit system handling of the suspend key"
+msgstr ""
+"Дозволити програмам перешкоджати обробленню системою клавіші призупинення"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:14
+msgid ""
+"Authentication is required to allow an application to inhibit system "
+"handling of the suspend key."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам перешкоджати обробленню "
+"системою клавіші призупинення."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:15
+msgid "Allow applications to inhibit system handling of the hibernate key"
+msgstr "Дозволити програмам перешкоджати обробленню системою клавіші присипання"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:16
+msgid ""
+"Authentication is required to allow an application to inhibit system "
+"handling of the hibernate key."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам перешкоджати обробленню "
+"системою клавіші присипання."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:17
+msgid "Allow applications to inhibit system handling of the lid switch"
+msgstr ""
+"Дозволити програмам перешкоджати обробленню системою клавіші перемикання "
+"кришки"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:18
+msgid ""
+"Authentication is required to allow an application to inhibit system "
+"handling of the lid switch."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити програмам перешкоджати обробленню "
+"системою клавіші перемикання кришки."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:19
+msgid "Allow non-logged-in users to run programs"
+msgstr "Дозволити незареєстрованим користувачам запускати програми"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:20
+msgid ""
+"Authentication is required to allow a non-logged-in user to run programs."
+msgstr ""
+"Засвідчення потрібно, щоб дозволити незареєстрованим користувачам запускати "
+"програми."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:21
+msgid "Allow attaching devices to seats"
+msgstr "Дозволити під'єднання пристроїв до місць"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:22
+msgid "Authentication is required for attaching a device to a seat."
+msgstr "Засвідчення потрібно, щоб під'єднувати пристрої до місць."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:23
+msgid "Flush device to seat attachments"
+msgstr "Очисний пристрій для під'єднань до місця"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:24
+msgid ""
+"Authentication is required for resetting how devices are attached to seats."
+msgstr "Засвідчення потрібно, щоб перезапустити спосіб під'єднання до місць."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:25
+msgid "Power off the system"
+msgstr "Вимкнути систему"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:26
+msgid "Authentication is required for powering off the system."
+msgstr "Засвідчення потрібно, щоб вимкнути систему."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:27
+msgid "Power off the system while other users are logged in"
+msgstr "Вимикнути систему, коли інші користувачі ще в ній"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:28
+msgid ""
+"Authentication is required for powering off the system while other users are "
+"logged in."
+msgstr ""
+"Засвідчення потрібно, щоб вимкнути систему, коли інші користувачі в ній."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:29
+msgid "Power off the system while an application asked to inhibit it"
+msgstr "Вимкнути систему, коли програми намагаються першкодити цьому"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:30
+msgid ""
+"Authentication is required for powering off the system while an application "
+"asked to inhibit it."
+msgstr ""
+"Засвідчення потрібно, щоб вимкнути систему, коли програми намагаються "
+"першкодити цьому."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:31
+msgid "Reboot the system"
+msgstr "Перезавантажити систему"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:32
+msgid "Authentication is required for rebooting the system."
+msgstr "Для перезавантаження системи необхідна ідентифікація."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:33
+msgid "Reboot the system while other users are logged in"
+msgstr "Перезавантажити, якщо інщі користувачі в системі"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:34
+msgid ""
+"Authentication is required for rebooting the system while other users are "
+"logged in."
+msgstr ""
+"Засвідчення потрібно, щоб перезапустити систему, коли інші користувачі в "
+"ній."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:35
+msgid "Reboot the system while an application asked to inhibit it"
+msgstr "Перезапустити систему, коли програми намагаються першкодити цьому"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:36
+msgid ""
+"Authentication is required for rebooting the system while an application "
+"asked to inhibit it."
+msgstr ""
+"Засвідчення потрібно, щоб перезапустити систему, коли програми намагаються "
+"першкодити цьому."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:37
+msgid "Suspend the system"
+msgstr "Призупинити систему"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:38
+msgid "Authentication is required for suspending the system."
+msgstr "Засвідчення потрібно, щоб призупинити систему."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:39
+msgid "Suspend the system while other users are logged in"
+msgstr "Призупинити систему, коли інші користувачі в ній"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:40
+msgid ""
+"Authentication is required for suspending the system while other users are "
+"logged in."
+msgstr ""
+"Засвідчення потрібно, щоб призупинити систему, коли інші користувачі в ній."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:41
+msgid "Suspend the system while an application asked to inhibit it"
+msgstr "Призупинити систему, коли програми намагаються першкодити цьому"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:42
+msgid ""
+"Authentication is required for suspending the system while an application "
+"asked to inhibit it."
+msgstr ""
+"Засвідчення потрібно, щоб призупнити систему, коли програми намагаються "
+"першкодити цьому."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:43
+msgid "Hibernate the system"
+msgstr "Приспати систему"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:44
+msgid "Authentication is required for hibernating the system."
+msgstr "Засвідчення потрібно, щоб приспати систему."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:45
+msgid "Hibernate the system while other users are logged in"
+msgstr "Приспати систему, коли інші користувачі в ній"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:46
+msgid ""
+"Authentication is required for hibernating the system while other users are "
+"logged in."
+msgstr ""
+"Засвідчення потрібно, щоб присипання систему, коли інші користувачі в ній."
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:47
+msgid "Hibernate the system while an application asked to inhibit it"
+msgstr "Приспати систему, коли програми намагаються першкодити цьому"
+
+#: ../src/login/org.freedesktop.login1.policy.in.h:48
+msgid ""
+"Authentication is required for hibernating the system while an application "
+"asked to inhibit it."
+msgstr ""
+"Засвідчення потрібно, щоб приспати систему, коли програми намагаються "
+"першкодити цьому."
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1
+msgid "Set system time"
+msgstr "Вказати системний час"
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:2
+msgid "Authentication is required to set the system time."
+msgstr "Засвідчення потрібно, щоб вказати системний час."
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:3
+msgid "Set system timezone"
+msgstr "Вказати системний часовий пояс"
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:4
+msgid "Authentication is required to set the system timezone."
+msgstr "Засвідчення потрібно, щоб вказати системний часовий пояс."
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:5
+msgid "Set RTC to local timezone or UTC"
+msgstr "Вкажіть RTC для локального часового поясу або UTC"
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:6
+msgid ""
+"Authentication is required to control whether the RTC stores the local or "
+"UTC time."
+msgstr "Засвідчення потрібно, щоб контролювати, чи RTC зберігає час, чи UTC."
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:7
+msgid "Turn network time synchronization on or off"
+msgstr "Увімкнути або вимкнути синхронізування через мережу"
+
+#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:8
+msgid ""
+"Authentication is required to control whether network time synchronization "
+"shall be enabled."
+msgstr ""
+"Засвідчення потрібно, щоб контролювати, чи синхронізування часу через мережу "
+"запущено."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:1
+msgid "Send passphrase back to system"
+msgstr "Надіслати пароль назад у систему"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:2
+msgid ""
+"Authentication is required to send the entered passphrase back to the system."
+msgstr "Засвідчення потрібно, щоб надіслати введений пароль назад у систему."
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3
+msgid "Privileged system and service manager access"
+msgstr "Привілейований доступ до менеджера системи і служб"
+
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4
+msgid "Authentication is required to access the system and service manager."
+msgstr "Засвідчення потрібно, щоб доступитись до менеджера системи і служб."
diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
deleted file mode 100644 (file)
index f0ae684..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# do not edit this file, it will be overwritten on update
-
-SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
index f390fcb0dd62d1a9e452786e92791bf93266eaa9..6e411a91f0ec9766c8351348825ca331863b3b5f 100644 (file)
@@ -4,8 +4,6 @@ SUBSYSTEM!="net", GOTO="net_setup_link_end"
 
 IMPORT{builtin}="path_id"
 
-ACTION=="move", IMPORT{db}="ID_NET_DRIVER"
-
 ACTION!="add", GOTO="net_setup_link_end"
 
 IMPORT{builtin}="net_setup_link"
index db72373c1654276f834cdd821f95ce8f03cf3298..e30d9a8f1bbdefd13735e201e2290af0f1ce0c2b 100644 (file)
@@ -23,7 +23,7 @@ SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state",
 SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
 
 # Ignore loop devices that don't have any file attached
-SUBSYSTEM=="block", KERNEL=="loop[0-9]*", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"
+SUBSYSTEM=="block", KERNEL=="loop[0-9]*", ENV{DEVTYPE}=="disk", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"
 
 # Ignore nbd devices in the "add" event, with "change" the nbd is ready
 ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0"
@@ -43,7 +43,7 @@ SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsys
 SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k"
 
 SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target"
-ENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
+ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
 SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target"
 
 SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
@@ -52,7 +52,7 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:
 
 # Apply sysctl variables to network devices (and only to those) as they appear.
 
-ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
+ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name"
 
 # Pull in backlight save/restore for all backlight devices and
 # keyboard backlights
index 9c75da9e7f8b6f699f0d465d1563e9e10e514650..a5e34600c806a07b42fe573e2e6bd7e4343998f0 100644 (file)
@@ -38,7 +38,8 @@ _hostnamectl() {
         local -A VERBS=(
                 [STANDALONE]='status'
                      [ICONS]='set-icon-name'
-                      [NAME]='set-hostname'
+                      [NAME]='set-hostname set-deployment'
+                   [CHASSIS]='set-chassis'
         )
 
         for ((i=0; i < COMP_CWORD; i++)); do
@@ -50,6 +51,8 @@ _hostnamectl() {
 
         if [[ -z $verb ]]; then
                 comps=${VERBS[*]}
+        elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
+                comps='desktop laptop server tablet handset watch vm container'
         elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
                 comps=''
         fi
index e4b2f4ac84e82f823f50736196e36f8116dfdb5b..14dcd223b377d235bdd0ba7d3579d83b14b8336d 100644 (file)
@@ -35,6 +35,8 @@ __journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
                   _UDEV_{SYSNAME,DEVNODE,DEVLINK}
                   __CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP)
 
+__syslog_priorities=(emerg alert crit err warning notice info debug)
+
 _journalctl() {
         local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
         local -A OPTS=(
@@ -44,8 +46,8 @@ _journalctl() {
                               --no-tail -q --quiet --setup-keys --this-boot --verify
                               --version --list-catalog --update-catalog --list-boots'
                        [ARG]='-b --boot --this-boot -D --directory --file -F --field
-                              -o --output -u --unit --user-unit'
-                [ARGUNKNOWN]='-c --cursor --interval -n --lines -p --priority --since --until
+                              -o --output -u --unit --user-unit -p --priority'
+                [ARGUNKNOWN]='-c --cursor --interval -n --lines --since --until
                               --verify-key'
         )
 
@@ -68,6 +70,9 @@ _journalctl() {
                         --field|-F)
                                 comps=${__journal_fields[*]}
                         ;;
+                        --priority|-p)
+                                comps=${__syslog_priorities[*]}
+                        ;;
                         --unit|-u)
                                 comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null)
                         ;;
diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl
deleted file mode 100644 (file)
index e1c8420..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-# systemctl(1) completion                                 -*- shell-script -*-
-#
-# This file is part of systemd.
-#
-# Copyright 2010 Ran Benita
-#
-# 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
-# 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/>.
-
-__systemctl() {
-        local mode=$1; shift 1
-        systemctl $mode --full --no-legend "$@"
-}
-
-__systemd_properties() {
-        local mode=$1
-        { __systemctl -a $mode show;
-         systemd --dump-configuration-items; } |
-        while IFS='=' read -r key value; do
-            [[ $value ]] && echo "$key"
-        done
-}
-
-__contains_word () {
-        local w word=$1; shift
-        for w in "$@"; do
-                [[ $w = "$word" ]] && return
-        done
-}
-
-__filter_units_by_property () {
-        local mode=$1 property=$2 value=$3 ; shift 3
-        local units=("$@")
-        local props
-        IFS=$'\n' read -rd '' -a props < \
-            <(__systemctl $mode show --property "$property" -- "${units[@]}")
-        for ((i=0; $i < ${#units[*]}; i++)); do
-                if [[ "${props[i]}" = "$property=$value" ]]; then
-                        echo " ${units[i]}"
-                fi
-        done
-}
-
-__get_all_units      () { __systemctl $1 list-units --all \
-        | { while read -r a b; do echo " $a"; done; }; }
-__get_active_units   () { __systemctl $1 list-units       \
-        | { while read -r a b; do echo " $a"; done; }; }
-__get_startable_units () { __systemctl $1 list-units --all -t service,timer,socket,mount,automount,path,snapshot,swap \
-        | { while read -r a b c d; do [[ $c == "inactive" || $c == "failed" ]] && echo " $a"; done; }; }
-__get_failed_units   () { __systemctl $1 list-units       \
-        | { while read -r a b c d; do [[ $c == "failed"   ]] && echo " $a"; done; }; }
-__get_enabled_units  () { __systemctl $1 list-unit-files  \
-        | { while read -r a b c  ; do [[ $b == "enabled"  ]] && echo " $a"; done; }; }
-__get_disabled_units () { __systemctl $1 list-unit-files  \
-        | { while read -r a b c  ; do [[ $b == "disabled" ]] && echo " $a"; done; }; }
-__get_masked_units   () { __systemctl $1 list-unit-files  \
-        | { while read -r a b c  ; do [[ $b == "masked"   ]] && echo " $a"; done; }; }
-
-_systemctl () {
-        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
-        local i verb comps mode
-
-        local -A OPTS=(
-               [STANDALONE]='--all -a --reverse --after --before --defaults --fail --ignore-dependencies --failed --force -f --full -l --global
-                             --help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall
-                             --quiet -q --privileged -P --system --user --version --runtime --recursive -r'
-                      [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --root'
-        )
-
-        if __contains_word "--user" ${COMP_WORDS[*]}; then
-            mode=--user
-        else
-            mode=--system
-        fi
-
-        if __contains_word "$prev" ${OPTS[ARG]}; then
-                case $prev in
-                        --signal|-s)
-                                comps=$(compgen -A signal)
-                        ;;
-                        --type|-t)
-                                comps='automount device mount path service snapshot socket swap target timer'
-                        ;;
-                        --state)
-                                comps='loaded not-found stub
-                                       active inactive
-                                       dead elapsed exited listening mounted plugged running waiting'
-                        ;;
-                        --kill-who)
-                                comps='all control main'
-                        ;;
-                        --root)
-                                comps=$(compgen -A directory -- "$cur" )
-                                compopt -o filenames
-                        ;;
-                        --host|-H)
-                                comps=$(compgen -A hostname)
-                        ;;
-                        --property|-p)
-                                comps=$(__systemd_properties $mode)
-                        ;;
-                esac
-                COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
-                return 0
-        fi
-
-        if [[ "$cur" = -* ]]; then
-                COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
-                return 0
-        fi
-
-        local -A VERBS=(
-                [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies'
-            [ENABLED_UNITS]='disable'
-           [DISABLED_UNITS]='enable'
-        [REENABLABLE_UNITS]='reenable'
-             [FAILED_UNITS]='reset-failed'
-          [STARTABLE_UNITS]='start'
-          [STOPPABLE_UNITS]='stop condstop kill try-restart condrestart'
-         [ISOLATABLE_UNITS]='isolate'
-         [RELOADABLE_UNITS]='reload condreload reload-or-try-restart force-reload'
-        [RESTARTABLE_UNITS]='restart reload-or-restart'
-             [MASKED_UNITS]='unmask'
-                     [JOBS]='cancel'
-                [SNAPSHOTS]='delete'
-                     [ENVS]='set-environment unset-environment'
-               [STANDALONE]='daemon-reexec daemon-reload default
-                             emergency exit halt hibernate hybrid-sleep kexec list-jobs
-                             list-sockets list-timers list-units list-unit-files poweroff
-                             reboot rescue show-environment suspend get-default'
-                     [NAME]='snapshot'
-                     [FILE]='link'
-                  [TARGETS]='set-default'
-        )
-
-        for ((i=0; i < COMP_CWORD; i++)); do
-                if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
-                 ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
-                        verb=${COMP_WORDS[i]}
-                        break
-                fi
-        done
-
-        if [[ -z $verb ]]; then
-                comps="${VERBS[*]}"
-
-        elif __contains_word "$verb" ${VERBS[ALL_UNITS]}; then
-                comps=$( __get_all_units $mode )
-
-        elif __contains_word "$verb" ${VERBS[ENABLED_UNITS]}; then
-                comps=$( __get_enabled_units $mode )
-
-        elif __contains_word "$verb" ${VERBS[DISABLED_UNITS]}; then
-                comps=$( __get_disabled_units $mode )
-
-        elif __contains_word "$verb" ${VERBS[REENABLABLE_UNITS]}; then
-                comps=$( __get_disabled_units $mode;
-                         __get_enabled_units $mode )
-
-        elif __contains_word "$verb" ${VERBS[STARTABLE_UNITS]}; then
-                comps=$( __filter_units_by_property $mode CanStart yes \
-                      $( __get_startable_units $mode))
-
-        elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then
-                comps=$( __filter_units_by_property $mode CanStart yes \
-                      $( __get_all_units $mode \
-                        | while read -r line; do \
-                                [[ "$line" =~ \.(device|snapshot|socket|timer)$ ]] || echo " $line"; \
-                        done ))
-
-        elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then
-                comps=$( __filter_units_by_property $mode CanStop yes \
-                      $( __get_active_units $mode ) )
-
-        elif __contains_word "$verb" ${VERBS[RELOADABLE_UNITS]}; then
-                comps=$( __filter_units_by_property $mode CanReload yes \
-                      $( __get_active_units $mode ) )
-
-        elif __contains_word "$verb" ${VERBS[ISOLATABLE_UNITS]}; then
-                comps=$( __filter_units_by_property $mode AllowIsolate yes \
-                      $( __get_all_units $mode ) )
-
-        elif __contains_word "$verb" ${VERBS[FAILED_UNITS]}; then
-                comps=$( __get_failed_units $mode )
-
-        elif __contains_word "$verb" ${VERBS[MASKED_UNITS]}; then
-                comps=$( __get_masked_units $mode )
-
-        elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[NAME]}; then
-                comps=''
-
-        elif __contains_word "$verb" ${VERBS[JOBS]}; then
-                comps=$( __systemctl $mode list-jobs | { while read -r a b; do echo " $a"; done; } )
-
-        elif __contains_word "$verb" ${VERBS[SNAPSHOTS]}; then
-                comps=$( __systemctl $mode list-units --type snapshot --full --all \
-                        | { while read -r a b; do echo " $a"; done; } )
-
-        elif __contains_word "$verb" ${VERBS[ENVS]}; then
-                comps=$( __systemctl $mode show-environment \
-                    | while read -r line; do echo " ${line%%=*}=";done )
-                compopt -o nospace
-
-        elif __contains_word "$verb" ${VERBS[FILE]}; then
-                comps=$( compgen -A file -- "$cur" )
-                compopt -o filenames
-        elif __contains_word "$verb" ${VERBS[TARGETS]}; then
-                comps=$( __systemctl $mode list-unit-files --type target --full --all \
-                        | { while read -r a b; do echo " $a"; done; } )
-        fi
-
-        COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
-        return 0
-}
-
-complete -F _systemctl systemctl
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
new file mode 100644 (file)
index 0000000..1c44a8d
--- /dev/null
@@ -0,0 +1,260 @@
+# systemctl(1) completion                                 -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010 Ran Benita
+#
+# 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
+# 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/>.
+
+__systemctl() {
+        local mode=$1; shift 1
+        systemctl $mode --full --no-legend "$@"
+}
+
+__systemd_properties() {
+        local mode=$1
+        { __systemctl $mode show --all;
+         @rootlibexecdir@/systemd --dump-configuration-items; } |
+        while IFS='=' read -r key value; do
+            [[ $value ]] && echo "$key"
+        done
+}
+
+__contains_word () {
+        local w word=$1; shift
+        for w in "$@"; do
+                [[ $w = "$word" ]] && return
+        done
+}
+
+__filter_units_by_property () {
+        local mode=$1 property=$2 value=$3 ; shift 3
+        local units=("$@")
+        local props
+        IFS=$'\n' read -rd '' -a props < \
+            <(__systemctl $mode show --property "$property" -- "${units[@]}")
+        for ((i=0; $i < ${#units[*]}; i++)); do
+                if [[ "${props[i]}" = "$property=$value" ]]; then
+                        echo " ${units[i]}"
+                fi
+        done
+}
+
+__get_all_units      () { { __systemctl $1 list-unit-files; __systemctl $1 list-units --all; } \
+        | { while read -r a b; do echo " $a"; done; }; }
+__get_template_names () { __systemctl $1 list-unit-files \
+        | { while read -r a b; do [[ $a =~ @\. ]] && echo " ${a%%@.*}@"; done; }; }
+
+__get_active_units   () { __systemctl $1 list-units       \
+        | { while read -r a b; do echo " $a"; done; }; }
+__get_startable_units () {
+        # find inactive or failed units, filter out masked and not-found
+        __systemctl $1 list-units --state inactive,failed -- $( __get_all_units ) | \
+                { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
+__get_restartable_units () {
+        # find !masked, filter out masked and not-found
+        __systemctl $1 list-units --state active,inactive,failed -- $( __get_all_units ) | \
+                { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; }
+__get_failed_units   () { __systemctl $1 list-units       \
+        | { while read -r a b c d; do [[ $c == "failed"   ]] && echo " $a"; done; }; }
+__get_enabled_units  () { __systemctl $1 list-unit-files  \
+        | { while read -r a b c  ; do [[ $b == "enabled"  ]] && echo " $a"; done; }; }
+__get_disabled_units () { __systemctl $1 list-unit-files  \
+        | { while read -r a b c  ; do [[ $b == "disabled" ]] && echo " $a"; done; }; }
+__get_masked_units   () { __systemctl $1 list-unit-files  \
+        | { while read -r a b c  ; do [[ $b == "masked"   ]] && echo " $a"; done; }; }
+__get_all_unit_files () { { __systemctl $1 list-unit-files; } | { while read -r a b; do echo " $a"; done; }; }
+
+_systemctl () {
+        local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+        local i verb comps mode
+
+        local -A OPTS=(
+               [STANDALONE]='--all -a --reverse --after --before --defaults --fail --ignore-dependencies --failed --force -f --full -l --global
+                             --help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall
+                             --quiet -q --privileged -P --system --user --version --runtime --recursive -r'
+                      [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --root'
+        )
+
+        if __contains_word "--user" ${COMP_WORDS[*]}; then
+            mode=--user
+        else
+            mode=--system
+        fi
+
+        if __contains_word "$prev" ${OPTS[ARG]}; then
+                case $prev in
+                        --signal|-s)
+                                comps=$(compgen -A signal)
+                        ;;
+                        --type|-t)
+                                comps='automount busname device mount path service snapshot socket swap target timer'
+                        ;;
+                        --state)
+                                comps='loaded not-found stub
+                                       active inactive
+                                       dead elapsed exited listening mounted plugged running waiting'
+                        ;;
+                        --kill-who)
+                                comps='all control main'
+                        ;;
+                        --root)
+                                comps=$(compgen -A directory -- "$cur" )
+                                compopt -o filenames
+                        ;;
+                        --host|-H)
+                                comps=$(compgen -A hostname)
+                        ;;
+                        --property|-p)
+                                comps=$(__systemd_properties $mode)
+                        ;;
+                esac
+                COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
+                return 0
+        fi
+
+        if [[ "$cur" = -* ]]; then
+                COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
+                return 0
+        fi
+
+        local -A VERBS=(
+                [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies'
+            [ENABLED_UNITS]='disable'
+           [DISABLED_UNITS]='enable'
+        [REENABLABLE_UNITS]='reenable'
+             [FAILED_UNITS]='reset-failed'
+          [STARTABLE_UNITS]='start'
+          [STOPPABLE_UNITS]='stop condstop kill try-restart condrestart'
+         [ISOLATABLE_UNITS]='isolate'
+         [RELOADABLE_UNITS]='reload condreload reload-or-try-restart force-reload'
+        [RESTARTABLE_UNITS]='restart reload-or-restart'
+         [TARGET_AND_UNITS]='add-wants add-requires'
+             [MASKED_UNITS]='unmask'
+                     [JOBS]='cancel'
+                [SNAPSHOTS]='delete'
+                     [ENVS]='set-environment unset-environment'
+               [STANDALONE]='daemon-reexec daemon-reload default
+                             emergency exit halt hibernate hybrid-sleep kexec list-jobs
+                             list-sockets list-timers list-units list-unit-files poweroff
+                             reboot rescue show-environment suspend get-default
+                             is-system-running'
+                     [NAME]='snapshot'
+                     [FILE]='link'
+                  [TARGETS]='set-default'
+        )
+
+        for ((i=0; i < COMP_CWORD; i++)); do
+                if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} &&
+                 ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
+                        verb=${COMP_WORDS[i]}
+                        break
+                fi
+        done
+
+        if [[ -z $verb ]]; then
+                comps="${VERBS[*]}"
+
+        elif __contains_word "$verb" ${VERBS[ALL_UNITS]}; then
+                comps=$( __get_all_units $mode )
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[ENABLED_UNITS]}; then
+                comps=$( __get_enabled_units $mode )
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[DISABLED_UNITS]}; then
+                comps=$( __get_disabled_units $mode;
+                        __get_template_names $mode)
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[REENABLABLE_UNITS]}; then
+                comps=$( __get_disabled_units $mode;
+                         __get_enabled_units $mode;
+                         __get_template_names $mode)
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[STARTABLE_UNITS]}; then
+                comps=$( __filter_units_by_property $mode CanStart yes \
+                        $( __get_startable_units $mode);
+                        __get_template_names $mode)
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then
+                comps=$( __filter_units_by_property $mode CanStart yes \
+                        $( __get_restartable_units $mode); \
+                        __get_template_names $mode)
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then
+                comps=$( __filter_units_by_property $mode CanStop yes \
+                      $( __get_active_units $mode ) )
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[RELOADABLE_UNITS]}; then
+                comps=$( __filter_units_by_property $mode CanReload yes \
+                      $( __get_active_units $mode ) )
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[ISOLATABLE_UNITS]}; then
+                comps=$( __filter_units_by_property $mode AllowIsolate yes \
+                      $( __get_all_units $mode ) )
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[FAILED_UNITS]}; then
+                comps=$( __get_failed_units $mode )
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[MASKED_UNITS]}; then
+                comps=$( __get_masked_units $mode )
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[TARGET_AND_UNITS]}; then
+                if __contains_word "$prev" ${VERBS[TARGET_AND_UNITS]} \
+                || __contains_word "$prev" ${OPTS[STANDALONE]}; then
+                        comps=$( __systemctl $mode list-unit-files --type target --all \
+                        | { while read -r a b; do echo " $a"; done; } )
+                else
+                        comps=$( __get_all_unit_files $mode )
+                fi
+                compopt -o filenames
+
+        elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[NAME]}; then
+                comps=''
+
+        elif __contains_word "$verb" ${VERBS[JOBS]}; then
+                comps=$( __systemctl $mode list-jobs | { while read -r a b; do echo " $a"; done; } )
+
+        elif __contains_word "$verb" ${VERBS[SNAPSHOTS]}; then
+                comps=$( __systemctl $mode list-units --type snapshot --full --all \
+                        | { while read -r a b; do echo " $a"; done; } )
+
+        elif __contains_word "$verb" ${VERBS[ENVS]}; then
+                comps=$( __systemctl $mode show-environment \
+                    | while read -r line; do echo " ${line%%=*}=";done )
+                compopt -o nospace
+
+        elif __contains_word "$verb" ${VERBS[FILE]}; then
+                comps=$( compgen -A file -- "$cur" )
+                compopt -o filenames
+        elif __contains_word "$verb" ${VERBS[TARGETS]}; then
+                comps=$( __systemctl $mode list-unit-files --type target --full --all \
+                        | { while read -r a b; do echo " $a"; done; } )
+        fi
+
+        COMPREPLY=( $(compgen -o filenames -W '$comps' -- "$cur") )
+        return 0
+}
+
+complete -F _systemctl systemctl
index 5575bebfc45c1148fedb62bc12676a4d3b6db19e..77d1b542a238efd9669ece79d1b163170544b7d2 100644 (file)
@@ -44,6 +44,7 @@ _systemd_analyze() {
                 [CRITICAL_CHAIN]='critical-chain'
                 [DOT]='dot'
                 [LOG_LEVEL]='set-log-level'
+                [VERIFY]='verify'
         )
 
         _init_completion || return
@@ -99,6 +100,14 @@ _systemd_analyze() {
                         comps='debug info notice warning err crit alert emerg'
                 fi
 
+        elif __contains_word "$verb" ${VERBS[VERIFY]}; then
+                if [[ $cur = -* ]]; then
+                        comps='--help --version --system --user --no-man'
+                else
+                        comps=$( compgen -A file -- "$cur" )
+                        compopt -o filenames
+                fi
+
         fi
 
         COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
index 7effa0489ee8dabf29d3ca0d8f50f639b02ac03c..e02f6de30edb9512041123de41ea2eb7685b029c 100644 (file)
@@ -1,5 +1,38 @@
 #compdef hostnamectl
 
+_hostnamectl_set-hostname() {
+    if (( CURRENT <= 3 )); then
+        _message "new hostname"
+    else
+        _message "no more options"
+    fi
+}
+
+_hostnamectl_set-icon-name() {
+    if (( CURRENT <= 3 )); then
+        _message "new icon name"
+    else
+        _message "no more options"
+    fi
+}
+
+_hostnamectl_set-chassis() {
+    if (( CURRENT <= 3 )); then
+        _chassis=( desktop laptop server tablet handset watch vm container )
+        _describe chassis _chassis
+    else
+        _message "no more options"
+    fi
+}
+
+_hostnamectl_set-deployment() {
+    if (( CURRENT <= 3 )); then
+        _message "new environment"
+    else
+        _message "no more options"
+    fi
+}
+
 _hostnamectl_command() {
     local -a _hostnamectl_cmds
     _hostnamectl_cmds=(
@@ -7,6 +40,7 @@ _hostnamectl_command() {
         "set-hostname:Set system hostname"
         "set-icon-name:Set icon name for host"
         "set-chassis:Set chassis type for host"
+        "set-deployment:Set deployment environment"
     )
     if (( CURRENT == 1 )); then
         _describe -t commands 'hostnamectl commands' _hostnamectl_cmds || compadd "$@"
@@ -14,8 +48,11 @@ _hostnamectl_command() {
         local curcontext="$curcontext"
         cmd="${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}"
         if (( $#cmd )); then
-            [[ $cmd == status ]] && msg="no options" || msg="options for $cmd"
-            _message "$msg"
+            if [[ $cmd == status ]]; then
+                _message "no options"
+            else
+                _hostnamectl_$cmd
+            fi
         else
             _message "unknown hostnamectl command: $words[1]"
         fi
index 0d16a26a6f47a0e2aca7a66e0feb2f735a06872d..a469bbc9a70cf52447c41d80f6fa3ac1489dc274 100644 (file)
@@ -41,11 +41,11 @@ _journal_fields() {
 
 _journal_boots() {
   local -a _bootid _previousboots
-  _bootid=( ${(fao)"$(_call_program bootid "$service -F _BOOT_ID")"}  )
+  _bootid=( ${(f)"$(_call_program bootid "$service -F _BOOT_ID")"}  )
   _previousboots=( -{1..${#_bootid}} )
   _alternative : \
-    "offsets:boot offsets:(${_previousboots[1,-2]})" \
-    "bootid:boot ids:(${_bootid[@]})"
+    "offsets:boot offsets:compadd -a '_previousboots[1,-2]'" \
+    "bootid:boot ids:compadd -a _bootid"
 }
 
 _arguments -s \
@@ -63,7 +63,7 @@ _arguments -s \
     {-x,--catalog}'[Show explanatory texts with each log line]' \
     {-q,--quiet}"[Don't show privilege warning]" \
     {-m,--merge}'[Show entries from all available journals]' \
-    {-b+,--boot=}'[Show data only from the specified boot or offset]:boot id or offset:_journal_boots' \
+    {-b+,--boot=}'[Show data only from the specified boot or offset]::boot id or offset:_journal_boots' \
     '--list-boots[List boots ordered by time]' \
     {-k,--dmesg}'[Show only kernel messages from the current boot]' \
     {-u+,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
index 87432da1dc97af5bd7909f176019ae4ded4879b0..d8af4d186374a100c7384e361bdf62c6f31cf381 100644 (file)
@@ -22,8 +22,8 @@ _localectl_set-locale() {
 
 _localectl_set-keymap() {
     local -a _keymaps
-    _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
     if (( CURRENT <= 3 )); then
+        _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
         _describe keymaps _keymaps
     else
         _message "no more options"
@@ -77,7 +77,7 @@ _localectl_command() {
         if (( $+functions[_localectl_$cmd] )); then
             _localectl_$cmd
         else
-            _message "no more options"
+            _message "unknown localectl command: $words[1]"
         fi
     fi
 }
diff --git a/shell-completion/zsh/_sd_outputmodes b/shell-completion/zsh/_sd_outputmodes
new file mode 100644 (file)
index 0000000..dae8a5c
--- /dev/null
@@ -0,0 +1,5 @@
+#autoload
+
+local -a _output_opts
+_output_opts=(short short-monotonic verbose export json json-pretty json-see cat)
+_describe -t output 'output mode' _output_opts || compadd "$@"
diff --git a/shell-completion/zsh/_sd_unit_files b/shell-completion/zsh/_sd_unit_files
new file mode 100644 (file)
index 0000000..4778a04
--- /dev/null
@@ -0,0 +1,9 @@
+#autoload
+
+_sd_unit_files() {
+    local files expl
+    files=( '*:files:->files' )
+
+    _description files expl 'unit file'
+    _files "$expl[@]" -g '*.(automount|busname|device|mount|path|service|snapshot|socket|swap|target|timer)'
+}
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
deleted file mode 100644 (file)
index b6cf664..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-#compdef systemctl
-
-(( $+functions[_systemctl_command] )) || _systemctl_command()
-{
-  local -a _systemctl_cmds
-  _systemctl_cmds=(
-    "list-sockets:List sockets"
-    "list-timers:List timers"
-    "list-units:List units"
-    "start:Start (activate) one or more units"
-    "stop:Stop (deactivate) one or more units"
-    "reload:Reload one or more units"
-    "restart:Start or restart one or more units"
-    "condrestart:Restart one or more units if active"
-    "try-restart:Restart one or more units if active"
-    "reload-or-restart:Reload one or more units if possible, otherwise start or restart"
-    "force-reload:Reload one or more units if possible, otherwise restart if active"
-    "hibernate:Hibernate the system"
-    "hybrid-sleep:Hibernate and suspend the system"
-    "reload-or-try-restart:Reload one or more units if possible, otherwise restart if active"
-    "isolate:Start one unit and stop all others"
-    "kill:Send signal to processes of a unit"
-    "is-active:Check whether units are active"
-    "is-failed:Check whether units are failed"
-    "status:Show runtime status of one or more units"
-    "show:Show properties of one or more units/jobs or the manager"
-    "cat:Show the source unit files and drop-ins"
-    "reset-failed:Reset failed state for all, one, or more units"
-    "list-unit-files:List installed unit files"
-    "enable:Enable one or more unit files"
-    "disable:Disable one or more unit files"
-    "reenable:Reenable one or more unit files"
-    "preset:Enable/disable one or more unit files based on preset configuration"
-    "help:Show documentation for specified units"
-    "list-dependencies:Show unit dependency tree"
-    "mask:Mask one or more units"
-    "unmask:Unmask one or more units"
-    "link:Link one or more units files into the search path"
-    "is-enabled:Check whether unit files are enabled"
-    "list-jobs:List jobs"
-    "cancel:Cancel all, one, or more jobs"
-    "snapshot:Create a snapshot"
-    "delete:Remove one or more snapshots"
-    "show-environment:Dump environment"
-    "set-environment:Set one or more environment variables"
-    "unset-environment:Unset one or more environment variables"
-    "daemon-reload:Reload systemd manager configuration"
-    "daemon-reexec:Reexecute systemd manager"
-    "default:Enter system default mode"
-    "rescue:Enter system rescue mode"
-    "emergency:Enter system emergency mode"
-    "halt:Shut down and halt the system"
-    "suspend:Suspend the system"
-    "poweroff:Shut down and power-off the system"
-    "reboot:Shut down and reboot the system"
-    "kexec:Shut down and reboot the system with kexec"
-    "exit:Ask for user instance termination"
-  )
-
-  if (( CURRENT == 1 )); then
-    _describe -t commands 'systemctl command' _systemctl_cmds || compadd "$@"
-  else
-    local curcontext="$curcontext"
-
-    cmd="${${_systemctl_cmds[(r)$words[1]:*]%%:*}}"
-    # Deal with any aliases
-    case $cmd in
-      condrestart) cmd="try-restart";;
-      force-reload) cmd="reload-or-try-restart";;
-    esac
-
-    if (( $#cmd )); then
-      curcontext="${curcontext%:*:*}:systemctl-${cmd}:"
-
-      local update_policy
-      zstyle -s ":completion:${curcontext}:" cache-policy update_policy
-      if [[ -z "$update_policy" ]]; then
-        zstyle ":completion:${curcontext}:" cache-policy _systemctl_caching_policy
-      fi
-
-      _call_function ret _systemctl_$cmd || _message 'no more arguments'
-    else
-      _message "unknown systemctl command: $words[1]"
-    fi
-    return ret
-  fi
-}
-
-__systemctl()
-{
-  local -a _modes
-  _modes=("--user" "--system")
-  systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
-}
-
-
-# Fills the unit list
-_systemctl_all_units()
-{
-  if ( [[ ${+_sys_all_units} -eq 0 ]] || _cache_invalid SYS_ALL_UNITS ) &&
-    ! _retrieve_cache SYS_ALL_UNITS;
-  then
-    _sys_all_units=( $(__systemctl list-units --all | { while read a b; do echo " $a"; done; }) )
-    _store_cache SYS_ALL_UNITS _sys_all_units
-  fi
-}
-
-# Fills the unit list including all file units
-_systemctl_really_all_units()
-{
-  local -a all_unit_files;
-  local -a really_all_units;
-  if ( [[ ${+_sys_really_all_units} -eq 0 ]] || _cache_invalid SYS_REALLY_ALL_UNITS ) &&
-    ! _retrieve_cache SYS_REALLY_ALL_UNITS;
-  then
-    all_unit_files=( $(__systemctl list-unit-files | { while read a b; do echo " $a"; done; }) )
-    _systemctl_all_units
-    really_all_units=($_sys_all_units $all_unit_files)
-    _sys_really_all_units=(${(u)really_all_units})
-    _store_cache SYS_REALLY_ALL_UNITS _sys_really_all_units
-  fi
-}
-
-_filter_units_by_property() {
-  local property=$1 value=$2 ; shift ; shift
-  local -a units ; units=($*)
-  local prop unit
-  for ((i=1; $i <= ${#units[*]}; i++)); do
-    # FIXME: "Failed to issue method call: Unknown unit" errors are ignored for
-    # now (related to DBUS_ERROR_UNKNOWN_OBJECT). in the future, we need to
-    # revert to calling 'systemctl show' once for all units, which is way
-    # faster
-    unit=${units[i]}
-    prop=${(f)"$(_call_program units "$service show --no-pager --property="$property" ${unit} 2>/dev/null")"}
-    if [[ "${prop}" = "$property=$value" ]]; then
-      echo " ${unit}"
-    fi
-  done
-}
-
-_systemctl_active_units()  {_sys_active_units=(  $(__systemctl list-units          | { while read a b; do echo " $a"; done; }) )}
-_systemctl_inactive_units(){_sys_inactive_units=($(__systemctl list-units --all    | { while read a b c d; do [[ $c == "inactive" || $c == "failed" ]] && echo " $a"; done; }) )}
-_systemctl_failed_units()  {_sys_failed_units=(  $(__systemctl list-units --failed | { while read a b; do echo " $a"; done; }) )}
-_systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files     | { while read a b; do [[ $b == "enabled" ]] && echo " $a"; done; }) )}
-_systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files     | { while read a b; do [[ $b == "disabled" ]] && echo " $a"; done; }) )}
-_systemctl_masked_units()  {_sys_masked_units=(  $(__systemctl list-unit-files     | { while read a b; do [[ $b == "masked" ]] && echo " $a"; done; }) )}
-
-# Completion functions for ALL_UNITS
-for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies ; do
-  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
-  {
-    _systemctl_really_all_units
-    compadd "$@" -a - _sys_really_all_units
-  }
-done
-
-# Completion functions for ENABLED_UNITS
-for fun in disable reenable ; do
-  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
-  {
-    _systemctl_enabled_units
-    _systemctl_disabled_units
-    compadd "$@" -a - _sys_enabled_units _sys_disabled_units
-  }
-done
-
-# Completion functions for DISABLED_UNITS
-(( $+functions[_systemctl_enable] )) || _systemctl_enable()
-{
-  _systemctl_disabled_units
-  compadd "$@" -a - _sys_disabled_units
-}
-
-# Completion functions for FAILED_UNITS
-(( $+functions[_systemctl_reset-failed] )) || _systemctl_reset-failed()
-{
-  _systemctl_failed_units
-  compadd "$@" -a - _sys_failed_units || _message "no failed unit found"
-}
-
-# Completion functions for STARTABLE_UNITS
-(( $+functions[_systemctl_start] )) || _systemctl_start()
-{
-  _systemctl_inactive_units
-  compadd "$@" -a - _sys_inactive_units
-}
-
-# Completion functions for STOPPABLE_UNITS
-for fun in stop kill try-restart condrestart ; do
-  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
-  {
-    _systemctl_active_units
-    compadd "$@" - $( _filter_units_by_property CanStop yes \
-      ${_sys_active_units[*]} )
-  }
-done
-
-# Completion functions for ISOLATABLE_UNITS
-(( $+functions[_systemctl_isolate] )) || _systemctl_isolate()
-{
-  _systemctl_all_units
-  compadd "$@" - $( _filter_units_by_property AllowIsolate yes \
-    ${_sys_all_units[*]} )
-}
-
-# Completion functions for RELOADABLE_UNITS
-for fun in reload reload-or-try-restart force-reload ; do
-  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
-  {
-    _systemctl_active_units
-    compadd "$@" - $( _filter_units_by_property CanReload yes \
-      ${_sys_active_units[*]} )
-  }
-done
-
-# Completion functions for RESTARTABLE_UNITS
-for fun in restart reload-or-restart ; do
-  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
-  {
-    _systemctl_all_units
-    compadd "$@" - $( _filter_units_by_property CanStart yes \
-      ${_sys_all_units[*]} | while read line; do \
-      [[ "$line" =~ \.device$ ]] || echo " $line"; \
-      done )
-  }
-done
-
-# Completion functions for MASKED_UNITS
-(( $+functions[_systemctl_unmask] )) || _systemctl_unmask()
-{
-  _systemctl_masked_units
-  compadd "$@" -a - _sys_masked_units || _message "no masked unit found"
-}
-
-# Completion functions for JOBS
-(( $+functions[_systemctl_cancel] )) || _systemctl_cancel()
-{
-  compadd "$@" - $(__systemctl list-jobs \
-    | cut -d' ' -f1  2>/dev/null ) || _message "no job found"
-}
-
-# Completion functions for SNAPSHOTS
-(( $+functions[_systemctl_delete] )) || _systemctl_delete()
-{
-  compadd "$@" - $(__systemctl list-units --type snapshot --all \
-    | cut -d' ' -f1  2>/dev/null ) || _message "no snapshot found"
-}
-
-# Completion functions for ENVS
-for fun in set-environment unset-environment ; do
-  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
-  {
-    local fun=$0 ; fun=${fun##_systemctl_}
-    local suf
-    if [[ "${fun}" = "set-environment" ]]; then
-      suf='-S='
-    fi
-
-    compadd "$@" ${suf} - $(systemctl show-environment \
-      | while read line; do echo " ${line%%\=}";done )
-  }
-done
-
-(( $+functions[_systemctl_link] )) || _systemctl_link() { _files }
-
-# no systemctl completion for:
-#    [STANDALONE]='daemon-reexec daemon-reload default
-#                  emergency exit halt kexec list-jobs list-units
-#                  list-unit-files poweroff reboot rescue show-environment'
-#         [NAME]='snapshot'
-
-_systemctl_caching_policy()
-{
-  local _sysunits
-  local -a oldcache
-
-  # rebuild if cache is more than a day old
-  oldcache=( "$1"(mh+1) )
-  (( $#oldcache )) && return 0
-
-  _sysunits=($(__systemctl --all | cut -d' ' -f1))
-
-  if (( $#_sysunits )); then
-    for unit in $_sysunits; do
-      [[ "$unit" -nt "$1" ]] && return 0
-    done
-  fi
-
-  return 1
-}
-
-_unit_states() {
-    local -a _states
-    _states=(loaded failed active inactive not-found listening running waiting plugged mounted exited dead masked)
-    _values -s , "${_states[@]}"
-}
-
-_unit_types() {
-    local -a _types
-    _types=(automount device mount path service snapshot socket swap target timer)
-    _values -s , "${_types[@]}"
-}
-
-_arguments -s \
-    {-h,--help}'[Show help]' \
-    '--version[Show package version]' \
-    {-t+,--type=}'[List only units of a particular type]:unit type:_unit_types' \
-    '--state=[Display units in the specifyied state]:unit state:_unit_states' \
-    \*{-p+,--property=}'[Show only properties by specific name]:unit property' \
-    {-a,--all}'[Show all units/properties, including dead/empty ones]' \
-    '--reverse[Show reverse dependencies]' \
-    '--after[Show units ordered after]' \
-    '--before[Show units ordered before]' \
-    '--failed[Show only failed units]' \
-    {-l,--full}"[Don't ellipsize unit names on output]" \
-    '--fail[When queueing a new job, fail if conflicting jobs are pending]' \
-    '--show-types[When showing sockets, show socket type]' \
-    '--irreversible[Mark transactions as irreversible]' \
-    '--ignore-dependencies[When queueing a new job, ignore all its dependencies]' \
-    {-i,--ignore-inhibitors}'[When executing a job, ignore jobs dependencies]' \
-    {-q,--quiet}'[Suppress output]' \
-    '--no-block[Do not wait until operation finished]' \
-    '--no-legend[Do not print a legend, i.e. the column headers and the footer with hints]' \
-    '--no-pager[Do not pipe output into a pager]' \
-    '--system[Connect to system manager]' \
-    '--user[Connect to user service manager]' \
-    "--no-wall[Don't send wall message before halt/power-off/reboot]" \
-    '--global[Enable/disable unit files globally]' \
-    "--no-reload[When enabling/disabling unit files, don't reload daemon configuration]" \
-    '--no-ask-password[Do not ask for system passwords]' \
-    '--kill-who=[Who to send signal to]:killwho:(main control all)' \
-    {-s+,--signal=}'[Which signal to send]:signal:_signals' \
-    {-f,--force}'[When enabling unit files, override existing symlinks. When shutting down, execute action immediately]' \
-    '--root=[Enable unit files in the specified root directory]:directory:_directories' \
-    '--runtime[Enable unit files only temporarily until next reboot]' \
-    {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
-    {-P,--privileged}'[Acquire privileges before execution]' \
-    {-n+,--lines=}'[Journal entries to show]:number of entries' \
-    {-o+,--output=}'[Change journal output mode]:modes:_sd_outputmodes' \
-    '--plain[When used with list-dependencies, print output as a list]' \
-    '*::systemctl command:_systemctl_command'
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
new file mode 100644 (file)
index 0000000..44981fe
--- /dev/null
@@ -0,0 +1,374 @@
+#compdef systemctl
+
+(( $+functions[_systemctl_command] )) || _systemctl_command()
+{
+  local -a _systemctl_cmds
+  _systemctl_cmds=(
+    "list-sockets:List sockets"
+    "list-timers:List timers"
+    "list-units:List units"
+    "start:Start (activate) one or more units"
+    "stop:Stop (deactivate) one or more units"
+    "reload:Reload one or more units"
+    "restart:Start or restart one or more units"
+    "condrestart:Restart one or more units if active"
+    "try-restart:Restart one or more units if active"
+    "reload-or-restart:Reload one or more units if possible, otherwise start or restart"
+    "force-reload:Reload one or more units if possible, otherwise restart if active"
+    "hibernate:Hibernate the system"
+    "hybrid-sleep:Hibernate and suspend the system"
+    "reload-or-try-restart:Reload one or more units if possible, otherwise restart if active"
+    "isolate:Start one unit and stop all others"
+    "kill:Send signal to processes of a unit"
+    "is-active:Check whether units are active"
+    "is-failed:Check whether units are failed"
+    "status:Show runtime status of one or more units"
+    "show:Show properties of one or more units/jobs or the manager"
+    "cat:Show the source unit files and drop-ins"
+    "reset-failed:Reset failed state for all, one, or more units"
+    "list-unit-files:List installed unit files"
+    "enable:Enable one or more unit files"
+    "disable:Disable one or more unit files"
+    "reenable:Reenable one or more unit files"
+    "preset:Enable/disable one or more unit files based on preset configuration"
+    "set-default:Set the default target"
+    "get-default:Query the default target"
+    "is-system-running:Query overall status of the system"
+    "help:Show documentation for specified units"
+    "list-dependencies:Show unit dependency tree"
+    "mask:Mask one or more units"
+    "unmask:Unmask one or more units"
+    "link:Link one or more units files into the search path"
+    "is-enabled:Check whether unit files are enabled"
+    "list-jobs:List jobs"
+    "cancel:Cancel all, one, or more jobs"
+    "snapshot:Create a snapshot"
+    "delete:Remove one or more snapshots"
+    "show-environment:Dump environment"
+    "set-environment:Set one or more environment variables"
+    "unset-environment:Unset one or more environment variables"
+    "daemon-reload:Reload systemd manager configuration"
+    "daemon-reexec:Reexecute systemd manager"
+    "default:Enter system default mode"
+    "rescue:Enter system rescue mode"
+    "emergency:Enter system emergency mode"
+    "halt:Shut down and halt the system"
+    "suspend:Suspend the system"
+    "poweroff:Shut down and power-off the system"
+    "reboot:Shut down and reboot the system"
+    "kexec:Shut down and reboot the system with kexec"
+    "exit:Ask for user instance termination"
+  )
+
+  if (( CURRENT == 1 )); then
+    _describe -t commands 'systemctl command' _systemctl_cmds || compadd "$@"
+  else
+    local curcontext="$curcontext"
+
+    cmd="${${_systemctl_cmds[(r)$words[1]:*]%%:*}}"
+    # Deal with any aliases
+    case $cmd in
+      condrestart) cmd="try-restart";;
+      force-reload) cmd="reload-or-try-restart";;
+    esac
+
+    if (( $#cmd )); then
+      curcontext="${curcontext%:*:*}:systemctl-${cmd}:"
+
+      local update_policy
+      zstyle -s ":completion:${curcontext}:" cache-policy update_policy
+      if [[ -z "$update_policy" ]]; then
+        zstyle ":completion:${curcontext}:" cache-policy _systemctl_caching_policy
+      fi
+
+      _call_function ret _systemctl_$cmd || _message 'no more arguments'
+    else
+      _message "unknown systemctl command: $words[1]"
+    fi
+    return ret
+  fi
+}
+
+__systemctl()
+{
+  local -a _modes
+  _modes=("--user" "--system")
+  systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
+}
+
+
+# Fills the unit list
+_systemctl_all_units()
+{
+  if ( [[ ${+_sys_all_units} -eq 0 ]] || _cache_invalid SYS_ALL_UNITS ) &&
+    ! _retrieve_cache SYS_ALL_UNITS;
+  then
+    _sys_all_units=( $(__systemctl list-units --all | { while read -r a b; do echo -E - " $a"; done; }) )
+    _store_cache SYS_ALL_UNITS _sys_all_units
+  fi
+}
+
+# Fills the unit list including all file units
+_systemctl_really_all_units()
+{
+  local -a all_unit_files;
+  local -a really_all_units;
+  if ( [[ ${+_sys_really_all_units} -eq 0 ]] || _cache_invalid SYS_REALLY_ALL_UNITS ) &&
+    ! _retrieve_cache SYS_REALLY_ALL_UNITS;
+  then
+    all_unit_files=( $(__systemctl list-unit-files | { while read -r a b; do echo -E - " $a"; done; }) )
+    _systemctl_all_units
+    really_all_units=($_sys_all_units $all_unit_files)
+    _sys_really_all_units=(${(u)really_all_units})
+    _store_cache SYS_REALLY_ALL_UNITS _sys_really_all_units
+  fi
+}
+
+_filter_units_by_property() {
+  local property=$1 value=$2 ; shift ; shift
+  local -a units ; units=($*)
+  local prop unit
+  for ((i=1; $i <= ${#units[*]}; i++)); do
+    # FIXME: "Failed to issue method call: Unknown unit" errors are ignored for
+    # now (related to DBUS_ERROR_UNKNOWN_OBJECT). in the future, we need to
+    # revert to calling 'systemctl show' once for all units, which is way
+    # faster
+    unit=${units[i]}
+    prop=${(f)"$(_call_program units "$service show --no-pager --property="$property" ${unit} 2>/dev/null")"}
+    if [[ "${prop}" = "$property=$value" ]]; then
+      echo " ${unit}"
+    fi
+  done
+}
+
+_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do echo -E - " $a"; done; } }
+_systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do  [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } }
+
+
+_systemctl_active_units()  {_sys_active_units=(  $(__systemctl list-units          | { while read -r a b; do echo -E - " $a"; done; }) )}
+_systemctl_startable_units(){_sys_startable_units=($(__systemctl list-units --state inactive,failed -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
+_systemctl_restartable_units(){_sys_restartable_units=($(__systemctl list-units --state inactive,failed,active -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )}
+_systemctl_failed_units()  {_sys_failed_units=(  $(__systemctl list-units --failed | { while read -r a b; do echo -E - " $a"; done; }) )}
+_systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files     | { while read -r a b; do [[ $b == "enabled" ]] && echo -E - " $a"; done; }) )}
+_systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files     | { while read -r a b; do [[ $b == "disabled" ]] && echo -E - " $a"; done; }) )}
+_systemctl_masked_units()  {_sys_masked_units=(  $(__systemctl list-unit-files     | { while read -r a b; do [[ $b == "masked" ]] && echo -E - " $a"; done; }) )}
+
+# Completion functions for ALL_UNITS
+for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies ; do
+  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
+  {
+    _systemctl_really_all_units
+    compadd "$@" -a - _sys_really_all_units
+  }
+done
+
+# Completion functions for ENABLED_UNITS
+(( $+functions[_systemctl_disable] )) || _systemctl_disable()
+{
+    _systemctl_enabled_units
+    compadd "$@" -a - _sys_enabled_units
+}
+
+(( $+functions[_systemctl_reenable] )) || _systemctl_reenable()
+{
+    _systemctl_enabled_units
+    _systemctl_disabled_units
+    compadd "$@" -a - _sys_enabled_units _sys_disabled_units $(_systemctl_get_template_names)
+}
+
+# Completion functions for DISABLED_UNITS
+(( $+functions[_systemctl_enable] )) || _systemctl_enable()
+{
+  _systemctl_disabled_units
+  compadd "$@" -a - _sys_disabled_units $(_systemctl_get_template_names)
+}
+
+# Completion functions for FAILED_UNITS
+(( $+functions[_systemctl_reset-failed] )) || _systemctl_reset-failed()
+{
+  _systemctl_failed_units
+  compadd "$@" -a - _sys_failed_units || _message "no failed unit found"
+}
+
+# Completion functions for STARTABLE_UNITS
+(( $+functions[_systemctl_start] )) || _systemctl_start()
+{
+   _systemctl_startable_units
+   compadd "$@" - $( _filter_units_by_property CanStart yes \
+      ${_sys_startable_units[*]} )
+}
+
+# Completion functions for STOPPABLE_UNITS
+for fun in stop kill try-restart condrestart ; do
+  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
+  {
+    _systemctl_active_units
+    compadd "$@" - $( _filter_units_by_property CanStop yes \
+      ${_sys_active_units[*]} )
+  }
+done
+
+# Completion functions for ISOLATABLE_UNITS
+(( $+functions[_systemctl_isolate] )) || _systemctl_isolate()
+{
+  _systemctl_all_units
+  compadd "$@" - $( _filter_units_by_property AllowIsolate yes \
+    ${_sys_all_units[*]} )
+}
+
+# Completion functions for RELOADABLE_UNITS
+for fun in reload reload-or-try-restart force-reload ; do
+  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
+  {
+    _systemctl_active_units
+    compadd "$@" - $( _filter_units_by_property CanReload yes \
+      ${_sys_active_units[*]} )
+  }
+done
+
+# Completion functions for RESTARTABLE_UNITS
+for fun in restart reload-or-restart ; do
+  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
+  {
+    _systemctl_restartable_units
+    compadd "$@" - $( _filter_units_by_property CanStart yes \
+      ${_sys_restartable_units[*]} )
+  }
+done
+
+# Completion functions for MASKED_UNITS
+(( $+functions[_systemctl_unmask] )) || _systemctl_unmask()
+{
+  _systemctl_masked_units
+  compadd "$@" -a - _sys_masked_units || _message "no masked units found"
+}
+
+# Completion functions for JOBS
+(( $+functions[_systemctl_cancel] )) || _systemctl_cancel()
+{
+  compadd "$@" - $(__systemctl list-jobs \
+    | cut -d' ' -f1  2>/dev/null ) || _message "no jobs found"
+}
+
+# Completion functions for SNAPSHOTS
+(( $+functions[_systemctl_delete] )) || _systemctl_delete()
+{
+  compadd "$@" - $(__systemctl list-units --type snapshot --all \
+    | cut -d' ' -f1  2>/dev/null ) || _message "no snapshots found"
+}
+
+# Completion functions for TARGETS
+(( $+functions[_systemctl_set-default] )) || _systemctl_set-default()
+{
+  compadd "$@" - $(__systemctl list-unit-files --type target --all \
+    | cut -d' ' -f1  2>/dev/null ) || _message "no targets found"
+}
+
+# Completion functions for ENVS
+for fun in set-environment unset-environment ; do
+  (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
+  {
+    local fun=$0 ; fun=${fun##_systemctl_}
+    local suf
+    if [[ "${fun}" = "set-environment" ]]; then
+      suf='-S='
+    fi
+
+    compadd "$@" ${suf} - $(systemctl show-environment \
+      | while read line; do echo " ${line%%\=}";done )
+  }
+done
+
+(( $+functions[_systemctl_link] )) || _systemctl_link() {
+   _sd_unit_files
+}
+
+# no systemctl completion for:
+#    [STANDALONE]='daemon-reexec daemon-reload default
+#                  emergency exit halt kexec list-jobs list-units
+#                  list-unit-files poweroff reboot rescue show-environment'
+#         [NAME]='snapshot'
+
+_systemctl_caching_policy()
+{
+  local _sysunits
+  local -a oldcache
+
+  # rebuild if cache is more than a day old
+  oldcache=( "$1"(mh+1) )
+  (( $#oldcache )) && return 0
+
+  _sysunits=($(__systemctl --all | cut -d' ' -f1))
+
+  if (( $#_sysunits )); then
+    for unit in $_sysunits; do
+      [[ "$unit" -nt "$1" ]] && return 0
+    done
+  fi
+
+  return 1
+}
+
+_unit_states() {
+    local -a _states
+    _states=(loaded failed active inactive not-found listening running waiting plugged mounted exited dead masked)
+    _values -s , "${_states[@]}"
+}
+
+_unit_types() {
+    local -a _types
+    _types=(automount busname device mount path service snapshot socket swap target timer)
+    _values -s , "${_types[@]}"
+}
+
+_unit_properties() {
+  if ( [[ ${+_sys_all_properties} -eq 0 ]] || _cache_invalid SYS_ALL_PROPERTIES ) &&
+    ! _retrieve_cache SYS_ALL_PROPERTIES;
+  then
+    _sys_all_properties=( $( {__systemctl show --all;
+       @rootlibexecdir@/systemd --dump-configuration-items; } | {
+       while IFS='=' read -r a b; do [ -n "$b" ] && echo "$a"; done
+    }) )
+    _store_cache SYS_ALL_PROPRTIES _sys_all_properties
+  fi
+  _values -s , "${_sys_all_properties[@]}"
+}
+
+_arguments -s \
+    {-h,--help}'[Show help]' \
+    '--version[Show package version]' \
+    {-t+,--type=}'[List only units of a particular type]:unit type:_unit_types' \
+    '--state=[Display units in the specifyied state]:unit state:_unit_states' \
+    {-p+,--property=}'[Show only properties by specific name]:unit property:_unit_properties' \
+    {-a,--all}'[Show all units/properties, including dead/empty ones]' \
+    '--reverse[Show reverse dependencies]' \
+    '--after[Show units ordered after]' \
+    '--before[Show units ordered before]' \
+    '--failed[Show only failed units]' \
+    {-l,--full}"[Don't ellipsize unit names on output]" \
+    '--fail[When queueing a new job, fail if conflicting jobs are pending]' \
+    '--show-types[When showing sockets, show socket type]' \
+    '--irreversible[Mark transactions as irreversible]' \
+    '--ignore-dependencies[When queueing a new job, ignore all its dependencies]' \
+    {-i,--ignore-inhibitors}'[When executing a job, ignore jobs dependencies]' \
+    {-q,--quiet}'[Suppress output]' \
+    '--no-block[Do not wait until operation finished]' \
+    '--no-legend[Do not print a legend, i.e. the column headers and the footer with hints]' \
+    '--no-pager[Do not pipe output into a pager]' \
+    '--system[Connect to system manager]' \
+    '--user[Connect to user service manager]' \
+    "--no-wall[Don't send wall message before halt/power-off/reboot]" \
+    '--global[Enable/disable unit files globally]' \
+    "--no-reload[When enabling/disabling unit files, don't reload daemon configuration]" \
+    '--no-ask-password[Do not ask for system passwords]' \
+    '--kill-who=[Who to send signal to]:killwho:(main control all)' \
+    {-s+,--signal=}'[Which signal to send]:signal:_signals' \
+    {-f,--force}'[When enabling unit files, override existing symlinks. When shutting down, execute action immediately]' \
+    '--root=[Enable unit files in the specified root directory]:directory:_directories' \
+    '--runtime[Enable unit files only temporarily until next reboot]' \
+    {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
+    {-P,--privileged}'[Acquire privileges before execution]' \
+    {-n+,--lines=}'[Journal entries to show]:number of entries' \
+    {-o+,--output=}'[Change journal output mode]:modes:_sd_outputmodes' \
+    '--plain[When used with list-dependencies, print output as a list]' \
+    '*::systemctl command:_systemctl_command'
index 06f03bd1e7fa9500acd65df1d1f1357412240e35..58b1c7b4e56b6e65069140f74bb75a23b2432df0 100644 (file)
@@ -63,8 +63,7 @@ case "$service" in
             '--ready[Inform the init system about service start-up completion.]' \
             '--pid=[Inform the init system about the main PID of the daemon]' \
             '--status=[Send a free-form status string for the daemon to the init systemd]' \
-            '--booted[Returns 0 if the system was booted up with systemd]' \
-            '--readahead=[Controls disk read-ahead operations]:arguments:(cancel done noreply)'
+            '--booted[Returns 0 if the system was booted up with systemd]'
     ;;
     systemd-tty-ask-password-agent)
         _arguments \
index 2eda5fe8a94936d8dfa7a633492364841618d68c..c101ad0fae62293fa1a116dd9f00d700c8f996e2 100644 (file)
@@ -6,6 +6,10 @@ _systemd_analyze_set-log-level() {
     _describe -t level 'logging level' _levels || compadd "$@"
 }
 
+_systemd_analyze_verify() {
+    _sd_unit_files
+}
+
 _systemd_analyze_command(){
     local -a _systemd_analyze_cmds
     # Descriptions taken from systemd-analyze --help.
@@ -17,6 +21,7 @@ _systemd_analyze_command(){
         'dot:Dump dependency graph (in dot(1) format)'
         'dump:Dump server status'
         'set-log-level:Set systemd log threshold'
+        'verify:Check unit files for correctness'
     )
 
     if (( CURRENT == 1 )); then
@@ -38,7 +43,12 @@ _systemd_analyze_command(){
 
 _arguments \
     {-h,--help}'[Show help text.]' \
-    '--user[Shows performance data of user sessions instead of the system manager.]' \
+    '--system[Operate on system systemd instance.]' \
+    '--user[Operate on user systemd instance.]' \
+    '--no-pager[Do not user pager.]' \
+    '--no-man[Do not check man pages.]' \
     '--order[When generating graph for dot, show only order]' \
     '--require[When generating graph for dot, show only requirement]' \
+    {-H+,--host=}'[Operate on remote host]:userathost:_sd_hosts_or_user_at_host' \
+    {-M+,--machine=}'[Operate on local container]:machine' \
     '*::systemd-analyze commands:_systemd_analyze_command'
index 8c582739976a2e4116b99cb1721c95083575db1c..0a1df37f353d8e9e72bbcc85f8335de4faac04bb 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/wait.h>
 #include <getopt.h>
 
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-daemon.h"
 
 #include "socket-util.h"
 #include "build.h"
@@ -242,7 +242,7 @@ static int launch1(const char* child, char** argv, char **env, int fd) {
 
 static int do_accept(const char* name, char **argv, char **envp, int fd) {
         _cleanup_free_ char *local = NULL, *peer = NULL;
-        int fd2;
+        _cleanup_close_ int fd2 = -1;
 
         fd2 = accept(fd, NULL, NULL);
         if (fd2 < 0) {
@@ -279,7 +279,7 @@ static int install_chld_handler(void) {
         return r;
 }
 
-static int help(void) {
+static void help(void) {
         printf("%s [OPTIONS...]\n\n"
                "Listen on sockets and launch child on connection.\n\n"
                "Options:\n"
@@ -290,10 +290,7 @@ static int help(void) {
                "  --version                Print version string and exit\n"
                "\n"
                "Note: file descriptors from sd_listen_fds() will be passed through.\n"
-               , program_invocation_short_name
-               );
-
-        return 0;
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -319,7 +316,8 @@ static int parse_argv(int argc, char *argv[]) {
         while ((c = getopt_long(argc, argv, "+hl:aE:", options, NULL)) >= 0)
                 switch(c) {
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -354,7 +352,7 @@ static int parse_argv(int argc, char *argv[]) {
                 }
 
         if (optind == argc) {
-                log_error("Usage: %s [OPTION...] PROGRAM [OPTION...]",
+                log_error("%s: command to execute is missing.",
                           program_invocation_short_name);
                 return -EINVAL;
         }
diff --git a/src/analyze/analyze-verify.c b/src/analyze/analyze-verify.c
new file mode 100644 (file)
index 0000000..5b16b6c
--- /dev/null
@@ -0,0 +1,280 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include <stdlib.h>
+#include <getopt.h>
+
+#include "manager.h"
+#include "bus-util.h"
+#include "log.h"
+#include "strv.h"
+#include "build.h"
+#include "pager.h"
+#include "analyze-verify.h"
+
+static int generate_path(char **var, char **filenames) {
+        char **filename;
+
+        _cleanup_strv_free_ char **ans = NULL;
+        int r;
+
+        STRV_FOREACH(filename, filenames) {
+                char *t;
+
+                t = dirname_malloc(*filename);
+                if (!t)
+                        return -ENOMEM;
+
+                r = strv_consume(&ans, t);
+                if (r < 0)
+                        return r;
+        }
+
+        assert_se(strv_uniq(ans));
+
+        r = strv_extend(&ans, "");
+        if (r < 0)
+                return r;
+
+        *var = strv_join(ans, ":");
+        if (!*var)
+                return -ENOMEM;
+
+        return 0;
+}
+
+static int verify_socket(Unit *u) {
+        int r;
+
+        assert(u);
+
+        if (u->type != UNIT_SOCKET)
+                return 0;
+
+        /* Cannot run this without the service being around */
+
+        /* This makes sure instance is created if necessary. */
+        r = socket_instantiate_service(SOCKET(u));
+        if (r < 0) {
+                log_error_unit(u->id, "Socket %s cannot be started, failed to create instance.",
+                               u->id);
+                return r;
+        }
+
+        /* This checks both type of sockets */
+        if (UNIT_ISSET(SOCKET(u)->service)) {
+                Service *service;
+
+                service = SERVICE(UNIT_DEREF(SOCKET(u)->service));
+                log_debug_unit(u->id, "%s uses %s", u->id, UNIT(service)->id);
+
+                if (UNIT(service)->load_state != UNIT_LOADED) {
+                        log_error_unit(u->id, "Service %s not loaded, %s cannot be started.",
+                                       UNIT(service)->id, u->id);
+                        return -ENOENT;
+                }
+        }
+
+        return 0;
+}
+
+static int verify_executable(Unit *u, ExecCommand *exec) {
+        if (exec == NULL)
+                return 0;
+
+        if (access(exec->path, X_OK) < 0) {
+                log_error_unit(u->id, "%s: command %s is not executable: %m",
+                               u->id, exec->path);
+                return -errno;
+        }
+
+        return 0;
+}
+
+static int verify_executables(Unit *u) {
+        ExecCommand *exec;
+        int r = 0, k;
+        unsigned i;
+
+        assert(u);
+
+        exec =  u->type == UNIT_SOCKET ? SOCKET(u)->control_command :
+                u->type == UNIT_MOUNT ? MOUNT(u)->control_command :
+                u->type == UNIT_SWAP ? SWAP(u)->control_command : NULL;
+        k = verify_executable(u, exec);
+        if (k < 0 && r == 0)
+                r = k;
+
+        if (u->type == UNIT_SERVICE)
+                for (i = 0; i < ELEMENTSOF(SERVICE(u)->exec_command); i++) {
+                        k = verify_executable(u, SERVICE(u)->exec_command[i]);
+                        if (k < 0 && r == 0)
+                                r = k;
+                }
+
+        if (u->type == UNIT_SOCKET)
+                for (i = 0; i < ELEMENTSOF(SOCKET(u)->exec_command); i++) {
+                        k = verify_executable(u, SOCKET(u)->exec_command[i]);
+                        if (k < 0 && r == 0)
+                                r = k;
+                }
+
+        return r;
+}
+
+static int verify_documentation(Unit *u, bool check_man) {
+        char **p;
+        int r = 0, k;
+
+        STRV_FOREACH(p, u->documentation) {
+                log_debug_unit(u->id, "%s: found documentation item %s.", u->id, *p);
+                if (check_man && startswith(*p, "man:")) {
+                        k = show_man_page(*p + 4, true);
+                        if (k != 0) {
+                                if (k < 0)
+                                        log_error_unit(u->id, "%s: can't show %s: %s",
+                                                       u->id, *p, strerror(-r));
+                                else {
+                                        log_error_unit(u->id, "%s: man %s command failed with code %d",
+                                                       u->id, *p + 4, k);
+                                        k = -ENOEXEC;
+                                }
+                                if (r == 0)
+                                        r = k;
+                        }
+                }
+        }
+
+        /* Check remote URLs? */
+
+        return r;
+}
+
+static int verify_unit(Unit *u, bool check_man) {
+        _cleanup_bus_error_free_ sd_bus_error err = SD_BUS_ERROR_NULL;
+        Job *j;
+        int r, k;
+
+        assert(u);
+
+        if (log_get_max_level() >= LOG_DEBUG)
+                unit_dump(u, stdout, "\t");
+
+        log_debug_unit(u->id, "Creating %s/start job", u->id);
+        r = manager_add_job(u->manager, JOB_START, u, JOB_REPLACE, false, &err, &j);
+        if (sd_bus_error_is_set(&err))
+                log_error_unit(u->id, "Error: %s: %s",
+                               err.name, err.message);
+        if (r < 0)
+                log_error_unit(u->id, "Failed to create %s/start: %s",
+                               u->id, strerror(-r));
+
+        k = verify_socket(u);
+        if (k < 0 && r == 0)
+                r = k;
+
+        k = verify_executables(u);
+        if (k < 0 && r == 0)
+                r = k;
+
+        k = verify_documentation(u, check_man);
+        if (k < 0 && r == 0)
+                r = k;
+
+        return r;
+}
+
+int verify_units(char **filenames, SystemdRunningAs running_as, bool check_man) {
+        _cleanup_bus_error_free_ sd_bus_error err = SD_BUS_ERROR_NULL;
+        Manager *m = NULL;
+        FILE *serial = NULL;
+        FDSet *fdset = NULL;
+
+        _cleanup_free_ char *var = NULL;
+
+        char **filename;
+        int r = 0, k;
+
+        Unit *units[strv_length(filenames)];
+        int i, count = 0;
+
+        if (strv_isempty(filenames))
+                return 0;
+
+        /* set the path */
+        r = generate_path(&var, filenames);
+        if (r < 0) {
+                log_error("Failed to generate unit load path: %s", strerror(-r));
+                return r;
+        }
+
+        assert_se(set_unit_path(var) >= 0);
+
+        r = manager_new(running_as, true, &m);
+        if (r < 0) {
+                log_error("Failed to initalize manager: %s", strerror(-r));
+                return r;
+        }
+
+        log_debug("Starting manager...");
+
+        r = manager_startup(m, serial, fdset);
+        if (r < 0) {
+                log_error("Failed to start manager: %s", strerror(-r));
+                goto finish;
+        }
+
+        manager_clear_jobs(m);
+
+        log_debug("Loading remaining units from the command line...");
+
+        STRV_FOREACH(filename, filenames) {
+                char fname[UNIT_NAME_MAX + 2 + 1] = "./";
+
+                log_debug("Handling %s...", *filename);
+
+                /* manager_load_unit does not like pure basenames, so prepend
+                 * the local directory, but only for valid names. manager_load_unit
+                 * will print the error for other ones. */
+                if (!strchr(*filename, '/') && strlen(*filename) <= UNIT_NAME_MAX) {
+                        strncat(fname + 2, *filename, UNIT_NAME_MAX);
+                        k = manager_load_unit(m, NULL, fname, &err, &units[count]);
+                } else
+                        k = manager_load_unit(m, NULL, *filename, &err, &units[count]);
+                if (k < 0) {
+                        log_error("Failed to load %s: %s", *filename, strerror(-k));
+                        if (r == 0)
+                                r = k;
+                } else
+                        count ++;
+        }
+
+        for (i = 0; i < count; i++) {
+                k = verify_unit(units[i], check_man);
+                if (k < 0 && r == 0)
+                        r = k;
+        }
+
+finish:
+        manager_free(m);
+
+        return r;
+}
diff --git a/src/analyze/analyze-verify.h b/src/analyze/analyze-verify.h
new file mode 100644 (file)
index 0000000..5c86d98
--- /dev/null
@@ -0,0 +1,26 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include <stdbool.h>
+
+#include "path-lookup.h"
+
+int verify_units(char **filenames, SystemdRunningAs running_as, bool check_man);
index 0a4190ceb4e7d995023b76400ebd0c73c04ca42a..5e55988063585b2a93662baedeb4082d149941eb 100644 (file)
@@ -41,6 +41,7 @@
 #include "special.h"
 #include "hashmap.h"
 #include "pager.h"
+#include "analyze-verify.h"
 
 #define SCALE_X (0.1 / 1000.0)   /* pixels per us */
 #define SCALE_Y (20.0)
@@ -74,6 +75,7 @@ static bool arg_no_pager = false;
 static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
 static char *arg_host = NULL;
 static bool arg_user = false;
+static bool arg_man = true;
 
 struct boot_times {
         usec_t firmware_time;
@@ -275,7 +277,8 @@ static int acquire_time_data(sd_bus *bus, struct unit_times **out) {
         return c;
 
 fail:
-        free_unit_times(unit_times, (unsigned) c);
+        if (unit_times)
+                free_unit_times(unit_times, (unsigned) c);
         return r;
 }
 
@@ -845,7 +848,8 @@ static int list_dependencies(sd_bus *bus, const char *name) {
         char ts[FORMAT_TIMESPAN_MAX];
         struct unit_times *times;
         int r;
-        const char *path, *id;
+        const char *id;
+        _cleanup_free_ char *path = NULL;
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
         struct boot_times *boot;
@@ -903,7 +907,7 @@ static int analyze_critical_chain(sd_bus *bus, char *names[]) {
         if (n <= 0)
                 return n;
 
-        h = hashmap_new(string_hash_func, string_compare_func);
+        h = hashmap_new(&string_hash_ops);
         if (!h)
                 return -ENOMEM;
 
@@ -1178,17 +1182,17 @@ static int set_log_level(sd_bus *bus, char **args) {
         return 0;
 }
 
-static int help(void) {
+static void help(void) {
 
         pager_open_if_enabled();
 
         printf("%s [OPTIONS...] {COMMAND} ...\n\n"
-               "Process systemd profiling information.\n\n"
+               "Profile systemd, show unit dependencies, check unit files.\n\n"
                "  -h --help               Show this help\n"
                "     --version            Show package version\n"
                "     --no-pager           Do not pipe output into a pager\n"
-               "     --system             Connect to system manager\n"
-               "     --user               Connect to user manager\n"
+               "     --system             Operate on system systemd instance\n"
+               "     --user               Operate on user systemd instance\n"
                "  -H --host=[USER@]HOST   Operate on remote host\n"
                "  -M --machine=CONTAINER  Operate on local container\n"
                "     --order              When generating a dependency graph, show only order\n"
@@ -1199,7 +1203,8 @@ static int help(void) {
                "     --fuzz=TIMESPAN      When printing the tree of the critical chain, print also\n"
                "                          services, which finished TIMESPAN earlier, than the\n"
                "                          latest in the branch. The unit of TIMESPAN is seconds\n"
-               "                          unless specified with a different unit, i.e. 50ms\n\n"
+               "                          unless specified with a different unit, i.e. 50ms\n"
+               "     --man[=BOOL]         Do [not] check for existence of man pages\n\n"
                "Commands:\n"
                "  time                    Print time spent in the kernel before reaching userspace\n"
                "  blame                   Print list of running units ordered by time to init\n"
@@ -1207,14 +1212,13 @@ static int help(void) {
                "  plot                    Output SVG graphic showing service initialization\n"
                "  dot                     Output dependency graph in dot(1) format\n"
                "  set-log-level LEVEL     Set logging threshold for systemd\n"
-               "  dump                    Output state serialization of service manager\n",
-               program_invocation_short_name);
+               "  dump                    Output state serialization of service manager\n"
+               "  verify FILE...          Check unit files for correctness\n"
+               , program_invocation_short_name);
 
         /* When updating this list, including descriptions, apply
-         * changes to shell-completion/bash/systemd and
-         * shell-completion/systemd-zsh-completion.zsh too. */
-
-        return 0;
+         * changes to shell-completion/bash/systemd-analyze and
+         * shell-completion/zsh/_systemd-analyze too. */
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -1227,7 +1231,8 @@ static int parse_argv(int argc, char *argv[]) {
                 ARG_DOT_FROM_PATTERN,
                 ARG_DOT_TO_PATTERN,
                 ARG_FUZZ,
-                ARG_NO_PAGER
+                ARG_NO_PAGER,
+                ARG_MAN,
         };
 
         static const struct option options[] = {
@@ -1241,6 +1246,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "to-pattern",   required_argument, NULL, ARG_DOT_TO_PATTERN   },
                 { "fuzz",         required_argument, NULL, ARG_FUZZ             },
                 { "no-pager",     no_argument,       NULL, ARG_NO_PAGER         },
+                { "man",          optional_argument, NULL, ARG_MAN              },
                 { "host",         required_argument, NULL, 'H'                  },
                 { "machine",      required_argument, NULL, 'M'                  },
                 {}
@@ -1251,12 +1257,12 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0) {
-
+        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0)
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -1311,19 +1317,31 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_host = optarg;
                         break;
 
+                case ARG_MAN:
+                        if (optarg) {
+                                r = parse_boolean(optarg);
+                                if (r < 0) {
+                                        log_error("Failed to parse --man= argument.");
+                                        return -EINVAL;
+                                }
+
+                                arg_man = !!r;
+                        } else
+                                arg_man = true;
+
+                        break;
+
                 case '?':
                         return -EINVAL;
 
                 default:
-                        assert_not_reached("Unhandled option");
+                        assert_not_reached("Unhandled option code.");
                 }
-        }
 
-        return 1;
+        return 1; /* work to do */
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");
@@ -1335,28 +1353,36 @@ int main(int argc, char *argv[]) {
         if (r <= 0)
                 goto finish;
 
-        r = bus_open_transport_systemd(arg_transport, arg_host, arg_user, &bus);
-        if (r < 0) {
-                log_error("Failed to create bus connection: %s", strerror(-r));
-                goto finish;
-        }
+        if (streq_ptr(argv[optind], "verify"))
+                r = verify_units(argv+optind+1,
+                                 arg_user ? SYSTEMD_USER : SYSTEMD_SYSTEM,
+                                 arg_man);
+        else {
+                _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+
+                r = bus_open_transport_systemd(arg_transport, arg_host, arg_user, &bus);
+                if (r < 0) {
+                        log_error("Failed to create bus connection: %s", strerror(-r));
+                        goto finish;
+                }
 
-        if (!argv[optind] || streq(argv[optind], "time"))
-                r = analyze_time(bus);
-        else if (streq(argv[optind], "blame"))
-                r = analyze_blame(bus);
-        else if (streq(argv[optind], "critical-chain"))
-                r = analyze_critical_chain(bus, argv+optind+1);
-        else if (streq(argv[optind], "plot"))
-                r = analyze_plot(bus);
-        else if (streq(argv[optind], "dot"))
-                r = dot(bus, argv+optind+1);
-        else if (streq(argv[optind], "dump"))
-                r = dump(bus, argv+optind+1);
-        else if (streq(argv[optind], "set-log-level"))
-                r = set_log_level(bus, argv+optind+1);
-        else
-                log_error("Unknown operation '%s'.", argv[optind]);
+                if (!argv[optind] || streq(argv[optind], "time"))
+                        r = analyze_time(bus);
+                else if (streq(argv[optind], "blame"))
+                        r = analyze_blame(bus);
+                else if (streq(argv[optind], "critical-chain"))
+                        r = analyze_critical_chain(bus, argv+optind+1);
+                else if (streq(argv[optind], "plot"))
+                        r = analyze_plot(bus);
+                else if (streq(argv[optind], "dot"))
+                        r = dot(bus, argv+optind+1);
+                else if (streq(argv[optind], "dump"))
+                        r = dump(bus, argv+optind+1);
+                else if (streq(argv[optind], "set-log-level"))
+                        r = set_log_level(bus, argv+optind+1);
+                else
+                        log_error("Unknown operation '%s'.", argv[optind]);
+        }
 
 finish:
         pager_close();
index 4d5690c2c0520c669b2edee134d70c2c155b9bc3..1ce8776d8a0766ae2721e9c97a6b7f3419c3c1cb 100644 (file)
 static const char *arg_icon = NULL;
 static const char *arg_id = NULL;
 static const char *arg_message = NULL;
+static bool arg_echo = false;
 static bool arg_use_tty = true;
 static usec_t arg_timeout = DEFAULT_TIMEOUT_USEC;
 static bool arg_accept_cached = false;
 static bool arg_multiple = false;
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] MESSAGE\n\n"
                "Query the user for a system passphrase, via the TTY or an UI agent.\n\n"
                "  -h --help          Show this help\n"
                "     --icon=NAME     Icon name\n"
                "     --timeout=SEC   Timeout in sec\n"
+               "     --echo          Do not mask input (useful for usernames)\n"
                "     --no-tty        Ask question via agent even on TTY\n"
                "     --accept-cached Accept cached passwords\n"
                "     --multiple      List multiple passwords if available\n"
-               "     --id=ID         Query identifier (e.g. cryptsetup:/dev/sda5)\n",
-               program_invocation_short_name);
-
-        return 0;
+               "     --id=ID         Query identifier (e.g. cryptsetup:/dev/sda5)\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -71,6 +70,7 @@ static int parse_argv(int argc, char *argv[]) {
         enum {
                 ARG_ICON = 0x100,
                 ARG_TIMEOUT,
+                ARG_ECHO,
                 ARG_NO_TTY,
                 ARG_ACCEPT_CACHED,
                 ARG_MULTIPLE,
@@ -81,6 +81,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "help",          no_argument,       NULL, 'h'               },
                 { "icon",          required_argument, NULL, ARG_ICON          },
                 { "timeout",       required_argument, NULL, ARG_TIMEOUT       },
+                { "echo",          no_argument,       NULL, ARG_ECHO          },
                 { "no-tty",        no_argument,       NULL, ARG_NO_TTY        },
                 { "accept-cached", no_argument,       NULL, ARG_ACCEPT_CACHED },
                 { "multiple",      no_argument,       NULL, ARG_MULTIPLE      },
@@ -93,12 +94,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_ICON:
                         arg_icon = optarg;
@@ -111,6 +113,10 @@ static int parse_argv(int argc, char *argv[]) {
                         }
                         break;
 
+                case ARG_ECHO:
+                        arg_echo = true;
+                        break;
+
                 case ARG_NO_TTY:
                         arg_use_tty = false;
                         break;
@@ -133,10 +139,9 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
-        if (optind != argc-1) {
-                help();
+        if (optind != argc - 1) {
+                log_error("%s: required argument missing.", program_invocation_short_name);
                 return -EINVAL;
         }
 
@@ -151,7 +156,8 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
-        if ((r = parse_argv(argc, argv)) <= 0)
+        r = parse_argv(argc, argv);
+        if (r <= 0)
                 goto finish;
 
         if (arg_timeout > 0)
@@ -162,7 +168,7 @@ int main(int argc, char *argv[]) {
         if (arg_use_tty && isatty(STDIN_FILENO)) {
                 char *password = NULL;
 
-                if ((r = ask_password_tty(arg_message, timeout, NULL, &password)) >= 0) {
+                if ((r = ask_password_tty(arg_message, timeout, arg_echo, NULL, &password)) >= 0) {
                         puts(password);
                         free(password);
                 }
@@ -170,7 +176,7 @@ int main(int argc, char *argv[]) {
         } else {
                 char **l;
 
-                if ((r = ask_password_agent(arg_message, arg_icon, arg_id, timeout, arg_accept_cached, &l)) >= 0) {
+                if ((r = ask_password_agent(arg_message, arg_icon, arg_id, timeout, arg_echo, arg_accept_cached, &l)) >= 0) {
                         char **p;
 
                         STRV_FOREACH(p, l) {
index 4d94ebf58a7e30b6b5ed7ad345a5235336f52b8e..0a2bac6f1665427207370f67e95b23913ec994d1 100644 (file)
@@ -372,9 +372,12 @@ int main(int argc, char *argv[]) {
          * device probing should be complete), so that the validity
          * check at boot time doesn't have to be reliable. */
 
-        if (streq(argv[1], "load") && shall_restore_state()) {
+        if (streq(argv[1], "load")) {
                 _cleanup_free_ char *value = NULL;
 
+                if (!shall_restore_state())
+                        return EXIT_SUCCESS;
+
                 if (!validate_device(udev, device))
                         return EXIT_SUCCESS;
 
index 9fc5d4e4a45bb7b0738c9a76baa9d4900f33955f..c1c152239bed496e8c37d353e8bc7d3b2c1182b1 100644 (file)
@@ -122,15 +122,12 @@ static int apply_file(const char *path, bool ignore_enoent) {
         return r;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n"
                "Registers binary formats.\n\n"
                "  -h --help             Show this help\n"
-               "     --version          Show package version\n",
-               program_invocation_short_name);
-
-        return 0;
+               "     --version          Show package version\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -150,12 +147,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -168,7 +166,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
index 359e273fd9f6d9731aca147d4f0ba7b3f0d09e59..51b51c4254cf34ecd13fe933b47270ade7f1661b 100644 (file)
 #include "util.h"
 #include "utf8.h"
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] COMMAND ...\n\n"
                "Query or change firmware and boot manager settings.\n\n"
                "  -h --help              Show this help\n"
                "     --version           Show package version\n"
                "Commands:\n"
-               "  status                 Show current boot settings\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  status                 Show current boot settings\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -51,8 +48,8 @@ static int parse_argv(int argc, char *argv[]) {
         };
 
         static const struct option options[] = {
-                { "help",                no_argument,       NULL, 'h'                     },
-                { "version",             no_argument,       NULL, ARG_VERSION             },
+                { "help",        no_argument, NULL, 'h'          },
+                { "version",     no_argument, NULL, ARG_VERSION  },
                 {}
         };
 
@@ -61,12 +58,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -79,7 +77,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -268,21 +265,17 @@ static int bootctl_main(int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        int r, retval = EXIT_FAILURE;
+        int r;
 
         log_parse_environment();
         log_open();
 
         r = parse_argv(argc, argv);
-        if (r < 0)
-                goto finish;
-        else if (r == 0) {
-                retval = EXIT_SUCCESS;
+        if (r <= 0)
                 goto finish;
-        }
 
         r = bootctl_main(argc, argv);
-        retval = r < 0 ? EXIT_FAILURE : r;
-finish:
-        return retval;
+
+ finish:
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index 01a5bf18ef7342187535e418db1a485c893dfda7..813e38deeb0afc34f1827aa8a2092692bf8c34b0 100644 (file)
@@ -48,7 +48,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdbool.h>
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "util.h"
 #include "fileio.h"
@@ -124,17 +124,11 @@ static void parse_conf(void) {
                 { "Bootchart", "ControlGroup",     config_parse_bool,   0, &arg_show_cgroup },
                 { NULL, NULL, NULL, 0, NULL }
         };
-        _cleanup_fclose_ FILE *f;
-        int r;
 
-        f = fopen(BOOTCHART_CONF, "re");
-        if (!f)
-                return;
-
-        r = config_parse(NULL, BOOTCHART_CONF, f,
-                         NULL, config_item_table_lookup, (void*) items, true, false, NULL);
-        if (r < 0)
-                log_warning("Failed to parse configuration file: %s", strerror(-r));
+        config_parse(NULL, BOOTCHART_CONF, NULL,
+                     NULL,
+                     config_item_table_lookup, items,
+                     true, false, true, NULL);
 
         if (init != NULL)
                 strscpy(arg_init_path, sizeof(arg_init_path), init);
@@ -169,29 +163,31 @@ static void help(void) {
                 DEFAULT_INIT);
 }
 
-static int parse_args(int argc, char *argv[]) {
-        static struct option options[] = {
-                {"rel",       no_argument,        NULL,  'r'},
-                {"freq",      required_argument,  NULL,  'f'},
-                {"samples",   required_argument,  NULL,  'n'},
-                {"pss",       no_argument,        NULL,  'p'},
-                {"output",    required_argument,  NULL,  'o'},
-                {"init",      required_argument,  NULL,  'i'},
-                {"no-filter", no_argument,        NULL,  'F'},
-                {"cmdline",   no_argument,        NULL,  'C'},
-                {"control-group", no_argument,    NULL,  'c'},
-                {"help",      no_argument,        NULL,  'h'},
-                {"scale-x",   required_argument,  NULL,  'x'},
-                {"scale-y",   required_argument,  NULL,  'y'},
-                {"entropy",   no_argument,        NULL,  'e'},
-                {NULL, 0, NULL, 0}
+static int parse_argv(int argc, char *argv[]) {
+        static const struct option options[] = {
+                {"rel",           no_argument,        NULL,  'r'},
+                {"freq",          required_argument,  NULL,  'f'},
+                {"samples",       required_argument,  NULL,  'n'},
+                {"pss",           no_argument,        NULL,  'p'},
+                {"output",        required_argument,  NULL,  'o'},
+                {"init",          required_argument,  NULL,  'i'},
+                {"no-filter",     no_argument,        NULL,  'F'},
+                {"cmdline",       no_argument,        NULL,  'C'},
+                {"control-group", no_argument,        NULL,  'c'},
+                {"help",          no_argument,        NULL,  'h'},
+                {"scale-x",       required_argument,  NULL,  'x'},
+                {"scale-y",       required_argument,  NULL,  'y'},
+                {"entropy",       no_argument,        NULL,  'e'},
+                {}
         };
-        int c;
+        int c, r;
 
-        while ((c = getopt_long(argc, argv, "erpf:n:o:i:FCchx:y:", options, NULL)) >= 0) {
-                int r;
+        if (getpid() == 1)
+                opterr = 0;
 
+        while ((c = getopt_long(argc, argv, "erpf:n:o:i:FCchx:y:", options, NULL)) >= 0)
                 switch (c) {
+
                 case 'r':
                         arg_relative = true;
                         break;
@@ -244,18 +240,22 @@ static int parse_args(int argc, char *argv[]) {
                         break;
                 case 'h':
                         help();
-                        exit (EXIT_SUCCESS);
+                        return 0;
+                case '?':
+                        if (getpid() != 1)
+                                return -EINVAL;
+                        else
+                                return 0;
                 default:
-                        break;
+                        assert_not_reached("Unhandled option code.");
                 }
-        }
 
-        if (arg_hz <= 0.0) {
-                fprintf(stderr, "Error: Frequency needs to be > 0\n");
+        if (arg_hz <= 0) {
+                log_error("Frequency needs to be > 0");
                 return -EINVAL;
         }
 
-        return 0;
+        return 1;
 }
 
 static void do_journal_append(char *file) {
@@ -316,12 +316,13 @@ int main(int argc, char *argv[]) {
         time_t t = 0;
         int r;
         struct rlimit rlim;
+        bool has_procfs = false;
 
         parse_conf();
 
-        r = parse_args(argc, argv);
-        if (r < 0)
-                return EXIT_FAILURE;
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 
         /*
          * If the kernel executed us through init=/usr/lib/systemd/systemd-bootchart, then
@@ -355,6 +356,16 @@ int main(int argc, char *argv[]) {
 
         log_uptime();
 
+        if (graph_start < 0.0) {
+                fprintf(stderr,
+                        "Failed to setup graph start time.\n\nThe system uptime "
+                        "probably includes time that the system was suspended. "
+                        "Use --rel to bypass this issue.\n");
+                exit (EXIT_FAILURE);
+        }
+
+        has_procfs = access("/proc/vmstat", F_OK) == 0;
+
         LIST_HEAD_INIT(head);
 
         /* main program loop */
@@ -369,8 +380,8 @@ int main(int argc, char *argv[]) {
 
                 sampledata = new0(struct list_sample_data, 1);
                 if (sampledata == NULL) {
-                        log_error("Failed to allocate memory for a node: %m");
-                        return -1;
+                        log_oom();
+                        return EXIT_FAILURE;
                 }
 
                 sampledata->sampletime = gettime_ns();
@@ -378,7 +389,9 @@ int main(int argc, char *argv[]) {
 
                 if (!of && (access(arg_output_path, R_OK|W_OK|X_OK) == 0)) {
                         t = time(NULL);
-                        strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t));
+                        r = strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t));
+                        assert_se(r > 0);
+
                         snprintf(output_file, PATH_MAX, "%s/bootchart-%s.svg", arg_output_path, datestr);
                         of = fopen(output_file, "we");
                 }
@@ -391,11 +404,11 @@ int main(int argc, char *argv[]) {
                                 parse_env_file("/usr/lib/os-release", NEWLINE, "PRETTY_NAME", &build, NULL);
                 }
 
-                /* wait for /proc to become available, discarding samples */
-                if (graph_start <= 0.0)
-                        log_uptime();
-                else
+                if (has_procfs)
                         log_sample(samples, &sampledata);
+                else
+                        /* wait for /proc to become available, discarding samples */
+                        has_procfs = access("/proc/vmstat", F_OK) == 0;
 
                 sample_stop = gettime_ns();
 
@@ -446,7 +459,9 @@ int main(int argc, char *argv[]) {
 
         if (!of) {
                 t = time(NULL);
-                strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t));
+                r = strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t));
+                assert_se(r > 0);
+
                 snprintf(output_file, PATH_MAX, "%s/bootchart-%s.svg", arg_output_path, datestr);
                 of = fopen(output_file, "we");
         }
@@ -456,7 +471,7 @@ int main(int argc, char *argv[]) {
                 exit (EXIT_FAILURE);
         }
 
-        svg_do(build);
+        svg_do(strna(build));
 
         fprintf(stderr, "systemd-bootchart wrote %s\n", output_file);
 
index e0719838d5089a6e369ae546715335fc4b4c91c2..9ea1b27de4b1666614170b91d55a8f212bb4ca11 100644 (file)
@@ -34,6 +34,7 @@
 #include <time.h>
 
 #include "util.h"
+#include "time-util.h"
 #include "strxcpyx.h"
 #include "store.h"
 #include "bootchart.h"
@@ -54,30 +55,25 @@ double gettime_ns(void) {
 
         clock_gettime(CLOCK_MONOTONIC, &n);
 
-        return (n.tv_sec + (n.tv_nsec / 1000000000.0));
+        return (n.tv_sec + (n.tv_nsec / (double) NSEC_PER_SEC));
 }
 
-void log_uptime(void) {
-        _cleanup_fclose_ FILE *f = NULL;
-        char str[32];
-        double uptime;
-
-        f = fopen("/proc/uptime", "re");
-
-        if (!f)
-                return;
-        if (!fscanf(f, "%s %*s", str))
-                return;
-
-        uptime = strtod(str, NULL);
+static double gettime_up(void) {
+        struct timespec n;
 
-        log_start = gettime_ns();
+        clock_gettime(CLOCK_BOOTTIME, &n);
+        return (n.tv_sec + (n.tv_nsec / (double) NSEC_PER_SEC));
+}
 
-        /* start graph at kernel boot time */
+void log_uptime(void) {
         if (arg_relative)
-                graph_start = log_start;
-        else
+                graph_start = log_start = gettime_ns();
+        else {
+                double uptime = gettime_up();
+
+                log_start = gettime_ns();
                 graph_start = log_start - uptime;
+        }
 }
 
 static char *bufgetline(char *buf) {
@@ -196,12 +192,14 @@ vmstat_next:
 
         m = buf;
         while (m) {
+                int r;
+
                 if (sscanf(m, "%s %*s %*s %*s %*s %*s %*s %s %s", key, rt, wt) < 3)
                         goto schedstat_next;
 
                 if (strstr(key, "cpu")) {
-                        c = atoi((const char*)(key+3));
-                        if (c > MAXCPUS)
+                        r = safe_atoi((const char*)(key+3), &c);
+                        if (r < 0 || c > MAXCPUS -1)
                                 /* Oops, we only have room for MAXCPUS data */
                                 break;
                         sampledata->runtime[c] = atoll(rt);
@@ -255,6 +253,7 @@ schedstat_next:
                         _cleanup_fclose_ FILE *st = NULL;
                         char t[32];
                         struct ps_struct *parent;
+                        int r;
 
                         ps->next_ps = new0(struct ps_struct, 1);
                         if (!ps->next_ps) {
@@ -314,7 +313,11 @@ schedstat_next:
                         if (!sscanf(m, "%*s %*s %s", t))
                                 continue;
 
-                        ps->starttime = strtod(t, NULL) / 1000.0;
+                        r = safe_atod(t, &ps->starttime);
+                        if (r < 0)
+                                continue;
+
+                        ps->starttime /= 1000.0;
 
                         if (arg_show_cgroup)
                                 /* if this fails, that's OK */
@@ -398,7 +401,7 @@ schedstat_next:
                         continue;
 
                 ps->sample->next = new0(struct ps_sched_struct, 1);
-                if (!ps->sample) {
+                if (!ps->sample->next) {
                         log_oom();
                         exit(EXIT_FAILURE);
                 }
index bf6636cab1d8c26b0c2f9d12a2baac7869faf863..faf377e506e942f729a2b174c72c709bb9923710 100644 (file)
@@ -162,7 +162,7 @@ static void svg_title(const char *build) {
         char *c;
         FILE *f;
         time_t t;
-        int fd;
+        int fd, r;
         struct utsname uts;
 
         /* grab /proc/cmdline */
@@ -196,7 +196,8 @@ static void svg_title(const char *build) {
 
         /* date */
         t = time(NULL);
-        strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", localtime(&t));
+        r = strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", localtime(&t));
+        assert_se(r > 0);
 
         /* CPU type */
         fd = openat(procfd, "cpuinfo", O_RDONLY);
@@ -881,21 +882,21 @@ static struct ps_struct *get_next_ps(struct ps_struct *ps) {
         return NULL;
 }
 
-static int ps_filter(struct ps_struct *ps) {
+static bool ps_filter(struct ps_struct *ps) {
         if (!arg_filter)
-                return 0;
+                return false;
 
         /* can't draw data when there is only 1 sample (need start + stop) */
         if (ps->first == ps->last)
-                return -1;
+                return true;
 
         /* don't filter kthreadd */
         if (ps->pid == 2)
-                return 0;
+                return false;
 
         /* drop stuff that doesn't use any real CPU time */
         if (ps->total <= 0.001)
-                return -1;
+                return true;
 
         return 0;
 }
index 3f1d7557c178a53493ad4f3755612cd433ec97b7..625f5ddaeee6648bd207d2026772afa26b55ff5b 100644 (file)
@@ -24,6 +24,7 @@
 #include "strv.h"
 #include "conf-files.h"
 #include "bus-internal.h"
+#include "bus-message.h"
 #include "bus-policy.h"
 
 static void policy_item_free(PolicyItem *i) {
@@ -39,6 +40,14 @@ static void policy_item_free(PolicyItem *i) {
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(PolicyItem*, policy_item_free);
 
+static void item_append(PolicyItem *i, PolicyItem **list) {
+
+        PolicyItem *tail;
+
+        LIST_FIND_TAIL(items, *list, tail);
+        LIST_INSERT_AFTER(items, *list, tail, i);
+}
+
 static int file_load(Policy *p, const char *path) {
 
         _cleanup_free_ char *c = NULL, *policy_user = NULL, *policy_group = NULL;
@@ -330,15 +339,15 @@ static int file_load(Policy *p, const char *path) {
                                 }
 
                                 if (policy_category == POLICY_CATEGORY_DEFAULT)
-                                        LIST_PREPEND(items, p->default_items, i);
+                                        item_append(i, &p->default_items);
                                 else if (policy_category == POLICY_CATEGORY_MANDATORY)
-                                        LIST_PREPEND(items, p->default_items, i);
+                                        item_append(i, &p->mandatory_items);
                                 else if (policy_category == POLICY_CATEGORY_USER) {
                                         const char *u = policy_user;
 
                                         assert_cc(sizeof(uid_t) == sizeof(uint32_t));
 
-                                        r = hashmap_ensure_allocated(&p->user_items, trivial_hash_func, trivial_compare_func);
+                                        r = hashmap_ensure_allocated(&p->user_items, NULL);
                                         if (r < 0)
                                                 return log_oom();
 
@@ -355,7 +364,8 @@ static int file_load(Policy *p, const char *path) {
                                                 PolicyItem *first;
 
                                                 first = hashmap_get(p->user_items, UINT32_TO_PTR(i->uid));
-                                                LIST_PREPEND(items, first, i);
+                                                item_append(i, &first);
+                                                i->uid_valid = true;
 
                                                 r = hashmap_replace(p->user_items, UINT32_TO_PTR(i->uid), first);
                                                 if (r < 0) {
@@ -369,7 +379,7 @@ static int file_load(Policy *p, const char *path) {
 
                                         assert_cc(sizeof(gid_t) == sizeof(uint32_t));
 
-                                        r = hashmap_ensure_allocated(&p->group_items, trivial_hash_func, trivial_compare_func);
+                                        r = hashmap_ensure_allocated(&p->group_items, NULL);
                                         if (r < 0)
                                                 return log_oom();
 
@@ -386,7 +396,8 @@ static int file_load(Policy *p, const char *path) {
                                                 PolicyItem *first;
 
                                                 first = hashmap_get(p->group_items, UINT32_TO_PTR(i->gid));
-                                                LIST_PREPEND(items, first, i);
+                                                item_append(i, &first);
+                                                i->gid_valid = true;
 
                                                 r = hashmap_replace(p->group_items, UINT32_TO_PTR(i->gid), first);
                                                 if (r < 0) {
@@ -515,8 +526,36 @@ static int file_load(Policy *p, const char *path) {
                                         return -EINVAL;
                                 }
 
+                                switch (i->class) {
+                                case POLICY_ITEM_USER:
+                                        if (!streq(name, "*")) {
+                                                const char *u = name;
+
+                                                r = get_user_creds(&u, &i->uid, NULL, NULL, NULL);
+                                                if (r < 0)
+                                                        log_error("Failed to resolve user %s: %s", name, strerror(-r));
+                                                else
+                                                        i->uid_valid = true;
+                                        }
+                                        break;
+                                case POLICY_ITEM_GROUP:
+                                        if (!streq(name, "*")) {
+                                                const char *g = name;
+
+                                                r = get_group_creds(&g, &i->gid);
+                                                if (r < 0)
+                                                        log_error("Failed to resolve group %s: %s", name, strerror(-r));
+                                                else
+                                                        i->gid_valid = true;
+                                        }
+                                        break;
+                                default:
+                                        break;
+                                }
+
                                 i->name = name;
                                 name = NULL;
+
                                 state = STATE_ALLOW_DENY;
                         } else {
                                 log_error("Unexpected token (14) in %s:%u.", path, line);
@@ -553,6 +592,225 @@ static int file_load(Policy *p, const char *path) {
         }
 }
 
+enum {
+        ALLOW,
+        DUNNO,
+        DENY,
+};
+
+struct policy_check_filter {
+        int class;
+        const struct ucred *ucred;
+        int message_type;
+        const char *name;
+        const char *interface;
+        const char *path;
+        const char *member;
+};
+
+static int is_permissive(PolicyItem *i) {
+
+        assert(i);
+
+        return (i->type == POLICY_ITEM_ALLOW) ? ALLOW : DENY;
+}
+
+static int check_policy_item(PolicyItem *i, const struct policy_check_filter *filter) {
+
+        assert(i);
+        assert(filter);
+
+        switch (i->class) {
+        case POLICY_ITEM_SEND:
+        case POLICY_ITEM_RECV:
+
+                if (i->name && !streq_ptr(i->name, filter->name))
+                        break;
+
+                if ((i->message_type != _POLICY_ITEM_CLASS_UNSET) && (i->message_type != filter->message_type))
+                        break;
+
+                if (i->path && !streq_ptr(i->path, filter->path))
+                        break;
+
+                if (i->member && !streq_ptr(i->member, filter->member))
+                        break;
+
+                if (i->interface && !streq_ptr(i->interface, filter->interface))
+                        break;
+
+                return is_permissive(i);
+
+        case POLICY_ITEM_OWN:
+                assert(filter->name);
+
+                if (streq(i->name, "*") || streq(i->name, filter->name))
+                        return is_permissive(i);
+                break;
+
+        case POLICY_ITEM_OWN_PREFIX:
+                assert(filter->name);
+
+                if (streq(i->name, "*") || startswith(i->name, filter->name))
+                        return is_permissive(i);
+                break;
+
+        case POLICY_ITEM_USER:
+                assert(filter->ucred);
+
+                if ((streq_ptr(i->name, "*") || (i->uid_valid && i->uid == filter->ucred->uid)))
+                        return is_permissive(i);
+                break;
+
+        case POLICY_ITEM_GROUP:
+                assert(filter->ucred);
+
+                if ((streq_ptr(i->name, "*") || (i->gid_valid && i->gid == filter->ucred->gid)))
+                        return is_permissive(i);
+                break;
+
+        case POLICY_ITEM_IGNORE:
+        default:
+                break;
+        }
+
+        return DUNNO;
+}
+
+static int check_policy_items(PolicyItem *items, const struct policy_check_filter *filter) {
+
+        PolicyItem *i;
+        int r, ret = DUNNO;
+
+        assert(filter);
+
+        /* Check all policies in a set - a broader one might be followed by a more specific one,
+         * and the order of rules in policy definitions matters */
+        LIST_FOREACH(items, i, items) {
+                if (i->class != filter->class)
+                        continue;
+
+                r = check_policy_item(i, filter);
+                if (r != DUNNO)
+                        ret = r;
+        }
+
+        return ret;
+}
+
+static int policy_check(Policy *p, const struct policy_check_filter *filter) {
+
+        PolicyItem *items;
+        int r;
+
+        assert(p);
+        assert(filter);
+
+        /*
+         * The policy check is implemented by the following logic:
+         *
+         * 1. Check mandatory items. If the message matches any of these, it is decisive.
+         * 2. See if the passed ucred match against the user/group hashmaps. A matching entry is also decisive.
+         * 3. Consult the defaults if non of the above matched with a more specific rule.
+         * 4. If the message isn't caught be the defaults either, reject it.
+         */
+
+        r = check_policy_items(p->mandatory_items, filter);
+        if (r != DUNNO)
+                return r;
+
+        if (filter->ucred) {
+                items = hashmap_get(p->user_items, UINT32_TO_PTR(filter->ucred->uid));
+                if (items) {
+                        r = check_policy_items(items, filter);
+                        if (r != DUNNO)
+                                return r;
+                }
+
+                items = hashmap_get(p->group_items, UINT32_TO_PTR(filter->ucred->gid));
+                if (items) {
+                        r = check_policy_items(items, filter);
+                        if (r != DUNNO)
+                                return r;
+                }
+        }
+
+        return check_policy_items(p->default_items, filter);
+}
+
+bool policy_check_own(Policy *p, const struct ucred *ucred, const char *name) {
+
+        struct policy_check_filter filter = {
+                .class = POLICY_ITEM_OWN,
+                .ucred = ucred,
+                .name  = name,
+        };
+
+        return policy_check(p, &filter) == ALLOW;
+}
+
+bool policy_check_hello(Policy *p, const struct ucred *ucred) {
+
+        struct policy_check_filter filter = {
+                .ucred  = ucred,
+        };
+        int user, group;
+
+        filter.class = POLICY_ITEM_USER;
+        user = policy_check(p, &filter);
+        if (user == DENY)
+                return false;
+
+        filter.class = POLICY_ITEM_GROUP;
+        group = policy_check(p, &filter);
+        if (group == DENY)
+                return false;
+
+        return !(user == DUNNO && group == DUNNO);
+}
+
+bool policy_check_recv(Policy *p,
+                       const struct ucred *ucred,
+                       int message_type,
+                       const char *name,
+                       const char *path,
+                       const char *interface,
+                       const char *member) {
+
+        struct policy_check_filter filter = {
+                .class        = POLICY_ITEM_RECV,
+                .ucred        = ucred,
+                .message_type = message_type,
+                .name         = name,
+                .interface    = interface,
+                .path         = path,
+                .member       = member,
+        };
+
+        return policy_check(p, &filter) == ALLOW;
+}
+
+bool policy_check_send(Policy *p,
+                       const struct ucred *ucred,
+                       int message_type,
+                       const char *name,
+                       const char *path,
+                       const char *interface,
+                       const char *member) {
+
+        struct policy_check_filter filter = {
+                .class        = POLICY_ITEM_SEND,
+                .ucred        = ucred,
+                .message_type = message_type,
+                .name         = name,
+                .interface    = interface,
+                .path         = path,
+                .member       = member,
+        };
+
+        return policy_check(p, &filter) == ALLOW;
+}
+
 int policy_load(Policy *p, char **files) {
         char **i;
         int r;
@@ -620,64 +878,64 @@ void policy_free(Policy *p) {
         p->user_items = p->group_items = NULL;
 }
 
-static void dump_items(PolicyItem *i, const char *prefix) {
+static void dump_items(PolicyItem *items, const char *prefix) {
+
+        PolicyItem *i;
 
-        if (!i)
+        if (!items)
                 return;
 
         if (!prefix)
                 prefix = "";
 
-        printf("%sType: %s\n"
-               "%sClass: %s\n",
-               prefix, policy_item_type_to_string(i->type),
-               prefix, policy_item_class_to_string(i->class));
+        LIST_FOREACH(items, i, items) {
 
-        if (i->interface)
-                printf("%sInterface: %s\n",
-                       prefix, i->interface);
+                printf("%sType: %s\n"
+                       "%sClass: %s\n",
+                       prefix, policy_item_type_to_string(i->type),
+                       prefix, policy_item_class_to_string(i->class));
 
-        if (i->member)
-                printf("%sMember: %s\n",
-                       prefix, i->member);
+                if (i->interface)
+                        printf("%sInterface: %s\n",
+                               prefix, i->interface);
 
-        if (i->error)
-                printf("%sError: %s\n",
-                       prefix, i->error);
+                if (i->member)
+                        printf("%sMember: %s\n",
+                               prefix, i->member);
 
-        if (i->path)
-                printf("%sPath: %s\n",
-                       prefix, i->path);
+                if (i->error)
+                        printf("%sError: %s\n",
+                               prefix, i->error);
 
-        if (i->name)
-                printf("%sName: %s\n",
-                       prefix, i->name);
+                if (i->path)
+                        printf("%sPath: %s\n",
+                               prefix, i->path);
 
-        if (i->message_type != 0)
-                printf("%sMessage Type: %s\n",
-                       prefix, bus_message_type_to_string(i->message_type));
+                if (i->name)
+                        printf("%sName: %s\n",
+                               prefix, i->name);
 
-        if (i->uid_valid) {
-                _cleanup_free_ char *user;
+                if (i->message_type != 0)
+                        printf("%sMessage Type: %s\n",
+                               prefix, bus_message_type_to_string(i->message_type));
 
-                user = uid_to_name(i->uid);
+                if (i->uid_valid) {
+                        _cleanup_free_ char *user;
 
-                printf("%sUser: %s\n",
-                       prefix, strna(user));
-        }
+                        user = uid_to_name(i->uid);
 
-        if (i->gid_valid) {
-                _cleanup_free_ char *group;
+                        printf("%sUser: %s (%d)\n",
+                               prefix, strna(user), i->uid);
+                }
 
-                group = gid_to_name(i->gid);
+                if (i->gid_valid) {
+                        _cleanup_free_ char *group;
 
-                printf("%sGroup: %s\n",
-                       prefix, strna(group));
-        }
+                        group = gid_to_name(i->gid);
 
-        if (i->items_next) {
-                printf("%s%s\n", prefix, draw_special_char(DRAW_DASH));
-                dump_items(i->items_next, prefix);
+                        printf("%sGroup: %s (%d)\n",
+                               prefix, strna(group), i->gid);
+                }
         }
 }
 
@@ -692,7 +950,7 @@ static void dump_hashmap_items(Hashmap *h) {
         }
 }
 
-noreturn void policy_dump(Policy *p) {
+void policy_dump(Policy *p) {
 
         printf("%s Default Items:\n", draw_special_char(DRAW_ARROW));
         dump_items(p->default_items, "\t");
@@ -705,8 +963,6 @@ noreturn void policy_dump(Policy *p) {
 
         printf("%s Mandatory Items:\n", draw_special_char(DRAW_ARROW));
         dump_items(p->mandatory_items, "\t");
-
-        exit(0);
 }
 
 static const char* const policy_item_type_table[_POLICY_ITEM_TYPE_MAX] = {
@@ -724,5 +980,6 @@ static const char* const policy_item_class_table[_POLICY_ITEM_CLASS_MAX] = {
         [POLICY_ITEM_OWN_PREFIX] = "own-prefix",
         [POLICY_ITEM_USER] = "user",
         [POLICY_ITEM_GROUP] = "group",
+        [POLICY_ITEM_IGNORE] = "ignore",
 };
 DEFINE_STRING_TABLE_LOOKUP(policy_item_class, PolicyItemClass);
index a6ff5c37f60f6f2dd0fd814bbb83c96c0b17ea0a..64fe1ffac5cf9befe51cfba20c8d48ca5166cd89 100644 (file)
@@ -76,6 +76,23 @@ typedef struct Policy {
 int policy_load(Policy *p, char **files);
 void policy_free(Policy *p);
 
+bool policy_check_own(Policy *p, const struct ucred *ucred, const char *name);
+bool policy_check_hello(Policy *p, const struct ucred *ucred);
+bool policy_check_recv(Policy *p,
+                       const struct ucred *ucred,
+                       int message_type,
+                       const char *name,
+                       const char *path,
+                       const char *interface,
+                       const char *member);
+bool policy_check_send(Policy *p,
+                       const struct ucred *ucred,
+                       int message_type,
+                       const char *name,
+                       const char *path,
+                       const char *interface,
+                       const char *member);
+
 void policy_dump(Policy *p);
 
 const char* policy_item_type_to_string(PolicyItemType t) _const_;
index 79dbdcf363a024b9057fdbe76b644cb7bbaf6976..8c1b6a5ad6281bfce44e27a271f332c529c6789f 100644 (file)
@@ -40,7 +40,6 @@
 #include "bus-internal.h"
 #include "bus-message.h"
 #include "bus-util.h"
-#include "bus-internal.h"
 #include "build.h"
 #include "strv.h"
 #include "def.h"
@@ -93,7 +92,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
@@ -156,7 +155,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         /* If the first command line argument is only "x" characters
          * we'll write who we are talking to into it, so that "ps" is
@@ -188,7 +186,7 @@ static int rename_service(sd_bus *a, sd_bus *b) {
         assert(a);
         assert(b);
 
-        r = sd_bus_get_peer_creds(b, SD_BUS_CREDS_UID|SD_BUS_CREDS_PID|SD_BUS_CREDS_CMDLINE|SD_BUS_CREDS_COMM, &creds);
+        r = sd_bus_get_owner_creds(b, SD_BUS_CREDS_UID|SD_BUS_CREDS_PID|SD_BUS_CREDS_CMDLINE|SD_BUS_CREDS_COMM, &creds);
         if (r < 0)
                 return r;
 
@@ -240,7 +238,7 @@ static int rename_service(sd_bus *a, sd_bus *b) {
                   pid, p,
                   uid, name,
                   a->unique_name);
-                ;
+
         return 0;
 }
 
@@ -374,6 +372,8 @@ static int synthetic_reply_method_error(sd_bus_message *call, const sd_bus_error
         _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
         int r;
 
+        assert(call);
+
         if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
                 return 0;
 
@@ -388,6 +388,8 @@ static int synthetic_reply_method_errno(sd_bus_message *call, int error, const s
 
         _cleanup_bus_error_free_ sd_bus_error berror = SD_BUS_ERROR_NULL;
 
+        assert(call);
+
         if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
                 return 0;
 
@@ -403,6 +405,8 @@ static int synthetic_reply_method_return(sd_bus_message *call, const char *types
         _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
         int r;
 
+        assert(call);
+
         if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
                 return 0;
 
@@ -427,6 +431,8 @@ static int synthetic_reply_return_strv(sd_bus_message *call, char **l) {
         _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
         int r;
 
+        assert(call);
+
         r = sd_bus_message_new_method_return(call, &m);
         if (r < 0)
                 return synthetic_reply_method_errno(call, r, NULL);
@@ -448,7 +454,7 @@ static int get_creds_by_name(sd_bus *bus, const char *name, uint64_t mask, sd_bu
 
         assert_return(service_name_is_valid(name), -EINVAL);
 
-        r = sd_bus_get_owner(bus, name, mask, &c);
+        r = sd_bus_get_name_creds(bus, name, mask, &c);
         if (r == -ESRCH || r == -ENXIO)
                 return sd_bus_error_setf(error, SD_BUS_ERROR_NAME_HAS_NO_OWNER, "Name %s is currently not owned by anyone.", name);
         if (r < 0)
@@ -638,28 +644,31 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "GetConnectionSELinuxSecurityContext")) {
                 _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
 
-                r = get_creds_by_message(a, m, SD_BUS_CREDS_SELINUX_CONTEXT, &creds, NULL);
+                r = get_creds_by_message(a, m, SD_BUS_CREDS_SELINUX_CONTEXT, &creds, &error);
                 if (r < 0)
-                        return synthetic_reply_method_errno(m, r, NULL);
+                        return synthetic_reply_method_errno(m, r, &error);
 
                 return synthetic_reply_method_return(m, "y", creds->label, strlen(creds->label));
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "GetConnectionUnixProcessID")) {
                 _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
 
-                r = get_creds_by_message(a, m, SD_BUS_CREDS_PID, &creds, NULL);
+                r = get_creds_by_message(a, m, SD_BUS_CREDS_PID, &creds, &error);
                 if (r < 0)
-                        return synthetic_reply_method_errno(m, r, NULL);
+                        return synthetic_reply_method_errno(m, r, &error);
 
                 return synthetic_reply_method_return(m, "u", (uint32_t) creds->pid);
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "GetConnectionUnixUser")) {
                 _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
 
-                r = get_creds_by_message(a, m, SD_BUS_CREDS_UID, &creds, NULL);
+                r = get_creds_by_message(a, m, SD_BUS_CREDS_UID, &creds, &error);
                 if (r < 0)
-                        return synthetic_reply_method_errno(m, r, NULL);
+                        return synthetic_reply_method_errno(m, r, &error);
 
                 return synthetic_reply_method_return(m, "u", (uint32_t) creds->uid);
 
@@ -724,8 +733,10 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListQueuedOwners")) {
                 struct kdbus_cmd_name_list cmd = {};
                 struct kdbus_name_list *name_list;
-                struct kdbus_cmd_name *name;
+                struct kdbus_cmd_free cmd_free;
+                struct kdbus_name_info *name;
                 _cleanup_strv_free_ char **owners = NULL;
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
                 char *arg0;
                 int err = 0;
 
@@ -733,9 +744,17 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
-                if (service_name_is_valid(arg0) < 0)
+                if (!service_name_is_valid(arg0))
                         return synthetic_reply_method_errno(m, -EINVAL, NULL);
 
+                r = sd_bus_get_name_creds(a, arg0, 0, NULL);
+                if (r == -ESRCH || r == -ENXIO) {
+                        sd_bus_error_setf(&error, SD_BUS_ERROR_NAME_HAS_NO_OWNER, "Could not get owners of name '%s': no such name.", arg0);
+                        return synthetic_reply_method_errno(m, r, &error);
+                }
+                if (r < 0)
+                        return synthetic_reply_method_errno(m, r, NULL);
+
                 cmd.flags = KDBUS_NAME_LIST_QUEUED;
                 r = ioctl(a->input_fd, KDBUS_CMD_NAME_LIST, &cmd);
                 if (r < 0)
@@ -744,12 +763,15 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
                 name_list = (struct kdbus_name_list *) ((uint8_t *) a->kdbus_buffer + cmd.offset);
 
                 KDBUS_ITEM_FOREACH(name, name_list, names) {
+                        const char *entry_name = NULL;
+                        struct kdbus_item *item;
                         char *n;
 
-                        if (name->size <= sizeof(*name))
-                                continue;
+                        KDBUS_ITEM_FOREACH(item, name, items)
+                                if (item->type == KDBUS_ITEM_NAME)
+                                        entry_name = item->str;
 
-                        if (!streq(name->name, arg0))
+                        if (!streq_ptr(entry_name, arg0))
                                 continue;
 
                         if (asprintf(&n, ":1.%llu", (unsigned long long) name->owner_id) < 0) {
@@ -764,11 +786,14 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
                         }
                 }
 
-                r = ioctl(a->input_fd, KDBUS_CMD_FREE, &cmd.offset);
+                cmd_free.flags = 0;
+                cmd_free.offset = cmd.offset;
+
+                r = ioctl(a->input_fd, KDBUS_CMD_FREE, &cmd_free);
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
-                if (err > 0)
+                if (err < 0)
                         return synthetic_reply_method_errno(m, err, NULL);
 
                 return synthetic_reply_return_strv(m, owners);
@@ -780,13 +805,13 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
-                if (service_name_is_valid(name) < 0)
+                if (!service_name_is_valid(name))
                         return synthetic_reply_method_errno(m, -EINVAL, NULL);
 
                 if (streq(name, "org.freedesktop.DBus"))
                         return synthetic_reply_method_return(m, "b", true);
 
-                r = sd_bus_get_owner(a, name, 0, NULL);
+                r = sd_bus_get_name_creds(a, name, 0, NULL);
                 if (r < 0 && r != -ESRCH && r != -ENXIO)
                         return synthetic_reply_method_errno(m, r, NULL);
 
@@ -799,7 +824,7 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
-                if (service_name_is_valid(name) < 0)
+                if (!service_name_is_valid(name))
                         return synthetic_reply_method_errno(m, -EINVAL, NULL);
 
                 r = sd_bus_release_name(a, name);
@@ -823,18 +848,26 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "RequestName")) {
                 const char *name;
-                uint32_t flags;
+                uint32_t flags, param;
 
                 r = sd_bus_message_read(m, "su", &name, &flags);
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
-                if (service_name_is_valid(name) < 0)
+                if (!service_name_is_valid(name))
                         return synthetic_reply_method_errno(m, -EINVAL, NULL);
                 if ((flags & ~(BUS_NAME_ALLOW_REPLACEMENT|BUS_NAME_REPLACE_EXISTING|BUS_NAME_DO_NOT_QUEUE)) != 0)
                         return synthetic_reply_method_errno(m, -EINVAL, NULL);
 
-                r = sd_bus_request_name(a, name, flags);
+                param = 0;
+                if (flags & BUS_NAME_ALLOW_REPLACEMENT)
+                        param |= SD_BUS_NAME_ALLOW_REPLACEMENT;
+                if (flags & BUS_NAME_REPLACE_EXISTING)
+                        param |= SD_BUS_NAME_REPLACE_EXISTING;
+                if (!(flags & BUS_NAME_DO_NOT_QUEUE))
+                        param |= SD_BUS_NAME_QUEUE;
+
+                r = sd_bus_request_name(a, name, param);
                 if (r < 0) {
                         if (r == -EEXIST)
                                 return synthetic_reply_method_return(m, "u", BUS_NAME_EXISTS);
@@ -857,12 +890,12 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) {
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
-                if (service_name_is_valid(name) < 0)
+                if (!service_name_is_valid(name))
                         return synthetic_reply_method_errno(m, -EINVAL, NULL);
                 if (flags != 0)
                         return synthetic_reply_method_errno(m, -EINVAL, NULL);
 
-                r = sd_bus_get_owner(a, name, 0, NULL);
+                r = sd_bus_get_name_creds(a, name, 0, NULL);
                 if (r >= 0 || streq(name, "org.freedesktop.DBus"))
                         return synthetic_reply_method_return(m, "u", BUS_START_REPLY_ALREADY_RUNNING);
                 if (r != -ESRCH)
@@ -1091,7 +1124,7 @@ static int patch_sender(sd_bus *a, sd_bus_message *m) {
 
 int main(int argc, char *argv[]) {
 
-        _cleanup_bus_unref_ sd_bus *a = NULL, *b = NULL;
+        _cleanup_bus_close_unref_ sd_bus *a = NULL, *b = NULL;
         sd_id128_t server_id;
         int r, in_fd, out_fd;
         bool got_hello = false;
@@ -1133,8 +1166,8 @@ int main(int argc, char *argv[]) {
                 sd_is_socket(out_fd, AF_UNIX, 0, 0) > 0;
 
         if (is_unix) {
-                getpeercred(in_fd, &ucred);
-                getpeersec(in_fd, &peersec);
+                (void) getpeercred(in_fd, &ucred);
+                (void) getpeersec(in_fd, &peersec);
         }
 
         if (arg_drop_privileges) {
@@ -1397,7 +1430,7 @@ int main(int argc, char *argv[]) {
                                 else {
                                         k = sd_bus_send(a, m, NULL);
                                         if (k < 0) {
-                                                if (r == -ECONNRESET)
+                                                if (k == -ECONNRESET)
                                                         r = 0;
                                                 else {
                                                         r = k;
@@ -1475,10 +1508,9 @@ int main(int argc, char *argv[]) {
         }
 
 finish:
-        sd_bus_flush(a);
-        sd_bus_flush(b);
-        sd_bus_close(a);
-        sd_bus_close(b);
+        sd_notify(false,
+                  "STOPPING=1\n"
+                  "STATUS=Shutting down.");
 
         policy_free(&policy);
         strv_free(arg_configuration);
diff --git a/src/bus-proxyd/test-bus-policy.c b/src/bus-proxyd/test-bus-policy.c
new file mode 100644 (file)
index 0000000..c9a027e
--- /dev/null
@@ -0,0 +1,135 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Daniel Mack
+
+  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/>.
+***/
+
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/poll.h>
+#include <stddef.h>
+#include <getopt.h>
+
+#include "log.h"
+#include "util.h"
+#include "sd-bus.h"
+#include "bus-internal.h"
+#include "bus-message.h"
+#include "bus-util.h"
+#include "build.h"
+#include "strv.h"
+#include "def.h"
+#include "capability.h"
+
+#include <bus-proxyd/bus-policy.h>
+
+static int test_policy_load(Policy *p, const char *name)
+{
+        _cleanup_free_ char *path = NULL;
+        int r = 0;
+
+        path = strjoin(TEST_DIR, "/bus-policy/", name, NULL);
+        assert_se(path);
+
+        if (access(path, R_OK) == 0)
+                policy_load(p, STRV_MAKE(path));
+        else
+                r = -ENOENT;
+
+        return r;
+}
+
+int main(int argc, char *argv[]) {
+
+        Policy p = {};
+        struct ucred ucred = {};
+
+        /* Ownership tests */
+        assert_se(test_policy_load(&p, "ownerships.conf") == 0);
+
+        ucred.uid = 0;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test1") == true);
+        ucred.uid = 1;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test1") == true);
+
+        ucred.uid = 0;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test2") == true);
+        ucred.uid = 1;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test2") == false);
+
+        ucred.uid = 0;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test3") == false);
+        ucred.uid = 1;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test3") == false);
+
+        ucred.uid = 0;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test4") == false);
+        ucred.uid = 1;
+        assert_se(policy_check_own(&p, &ucred, "org.test.test4") == true);
+
+        policy_free(&p);
+
+        /* Signaltest */
+        assert_se(test_policy_load(&p, "signals.conf") == 0);
+
+        ucred.uid = 0;
+        assert_se(policy_check_send(&p, &ucred, SD_BUS_MESSAGE_SIGNAL, "bli.bla.blubb", NULL, "/an/object/path", NULL) == true);
+
+        ucred.uid = 1;
+        assert_se(policy_check_send(&p, &ucred, SD_BUS_MESSAGE_SIGNAL, "bli.bla.blubb", NULL, "/an/object/path", NULL) == false);
+
+        policy_free(&p);
+
+        /* Method calls */
+        assert_se(test_policy_load(&p, "methods.conf") == 0);
+        policy_dump(&p);
+
+        ucred.uid = 0;
+
+        assert_se(policy_check_send(&p, &ucred, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test1", "/an/object/path", "bli.bla.blubb", "Member") == false);
+        assert_se(policy_check_send(&p, &ucred, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test1", "/an/object/path", "bli.bla.blubb", "Member") == false);
+        assert_se(policy_check_send(&p, &ucred, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test1", "/an/object/path", "org.test.int1", "Member") == true);
+        assert_se(policy_check_send(&p, &ucred, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test1", "/an/object/path", "org.test.int2", "Member") == true);
+
+        assert_se(policy_check_recv(&p, &ucred, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test3", "/an/object/path", "org.test.int3", "Member111") == true);
+
+        policy_free(&p);
+
+        /* User and groups */
+        assert_se(test_policy_load(&p, "hello.conf") == 0);
+        policy_dump(&p);
+
+        ucred.uid = 0;
+        assert_se(policy_check_hello(&p, &ucred) == true);
+
+        ucred.uid = 1;
+        assert_se(policy_check_hello(&p, &ucred) == false);
+
+        ucred.uid = 0;
+        ucred.gid = 1;
+        assert_se(policy_check_hello(&p, &ucred) == false);
+
+        policy_free(&p);
+
+        return EXIT_SUCCESS;
+}
index 052ac8ffca3395943fa18f79f80252478cf08149..7070503d68c1f3c6aeb92fe354806181aefcda97 100644 (file)
@@ -46,8 +46,7 @@ static bool arg_all = false;
 static int arg_full = -1;
 static char* arg_machine = NULL;
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [CGROUP...]\n\n"
                "Recursively show control group contents.\n\n"
                "  -h --help           Show this help\n"
@@ -56,10 +55,8 @@ static int help(void) {
                "  -a --all            Show all groups, including empty\n"
                "  -l --full           Do not ellipsize output\n"
                "  -k                  Include kernel threads in output\n"
-               "  -M --machine        Show container\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  -M --machine        Show container\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -84,12 +81,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 1);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hkalM:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hkalM:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -122,7 +120,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -131,7 +128,7 @@ int main(int argc, char *argv[]) {
         int r = 0, retval = EXIT_FAILURE;
         int output_flags;
         _cleanup_free_ char *root = NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
 
         log_parse_environment();
         log_open();
index d1d843bda71e46bd117f937890e28aa91206fc14..e581fbc9b6afb64cd2cf6c4fc2a103369b6cfa1e 100644 (file)
@@ -26,7 +26,7 @@
 #include "bus-util.h"
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         if (argc != 2) {
@@ -62,7 +62,5 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        sd_bus_flush(bus);
-
         return EXIT_SUCCESS;
 }
index fd0023b0a84ef7f57c7bb5d81a8040422627b91c..932a7ba7c6c360c8bf5d1c2ad8842d7f47e0c21b 100644 (file)
@@ -126,7 +126,9 @@ static int process(const char *controller, const char *path, Hashmap *a, Hashmap
                                 return r;
                         }
                 } else {
-                        assert_se(hashmap_move_one(a, b, path) == 0);
+                        r = hashmap_move_one(a, b, path);
+                        if (r < 0)
+                                return r;
                         g->cpu_valid = g->memory_valid = g->io_valid = g->n_tasks_valid = false;
                 }
         }
@@ -548,8 +550,7 @@ static int display(Hashmap *a) {
         return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...]\n\n"
                "Show top control groups by their resource usage.\n\n"
                "  -h --help           Show this help\n"
@@ -563,10 +564,8 @@ static int help(void) {
                "  -d --delay=DELAY    Delay between updates\n"
                "  -n --iterations=N   Run for N iterations before exiting\n"
                "  -b --batch          Run in batch mode, accepting no input\n"
-               "     --depth=DEPTH    Maximum traversal depth (default: %u)\n",
-               program_invocation_short_name, arg_depth);
-
-        return 0;
+               "     --depth=DEPTH    Maximum traversal depth (default: %u)\n"
+               , program_invocation_short_name, arg_depth);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -594,12 +593,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 1);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hptcmin:bd:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hptcmin:bd:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -674,7 +674,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind < argc) {
                 log_error("Too many arguments.");
@@ -698,8 +697,8 @@ int main(int argc, char *argv[]) {
         if (r <= 0)
                 goto finish;
 
-        a = hashmap_new(string_hash_func, string_compare_func);
-        b = hashmap_new(string_hash_func, string_compare_func);
+        a = hashmap_new(&string_hash_ops);
+        b = hashmap_new(&string_hash_ops);
         if (!a || !b) {
                 r = log_oom();
                 goto finish;
diff --git a/src/console/consoled-display.c b/src/console/consoled-display.c
new file mode 100644 (file)
index 0000000..a30a2f1
--- /dev/null
@@ -0,0 +1,82 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include "consoled.h"
+#include "grdev.h"
+#include "list.h"
+#include "macro.h"
+#include "util.h"
+
+int display_new(Display **out, Session *s, grdev_display *display) {
+        _cleanup_(display_freep) Display *d = NULL;
+
+        assert(out);
+        assert(s);
+        assert(display);
+
+        d = new0(Display, 1);
+        if (!d)
+                return -ENOMEM;
+
+        d->session = s;
+        d->grdev = display;
+        d->width = grdev_display_get_width(display);
+        d->height = grdev_display_get_height(display);
+        LIST_PREPEND(displays_by_session, d->session->display_list, d);
+
+        grdev_display_enable(display);
+
+        *out = d;
+        d = NULL;
+        return 0;
+}
+
+Display *display_free(Display *d) {
+        if (!d)
+                return NULL;
+
+        LIST_REMOVE(displays_by_session, d->session->display_list, d);
+        free(d);
+
+        return NULL;
+}
+
+void display_refresh(Display *d) {
+        assert(d);
+
+        d->width = grdev_display_get_width(d->grdev);
+        d->height = grdev_display_get_height(d->grdev);
+}
+
+void display_render(Display *d, Workspace *w) {
+        const grdev_display_target *target;
+
+        assert(d);
+        assert(w);
+
+        GRDEV_DISPLAY_FOREACH_TARGET(d->grdev, target) {
+                if (workspace_draw(w, target))
+                        grdev_display_flip_target(d->grdev, target);
+        }
+}
diff --git a/src/console/consoled-manager.c b/src/console/consoled-manager.c
new file mode 100644 (file)
index 0000000..1b856f2
--- /dev/null
@@ -0,0 +1,288 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <libudev.h>
+#include <stdlib.h>
+#include <string.h>
+#include "consoled.h"
+#include "grdev.h"
+#include "idev.h"
+#include "log.h"
+#include "sd-bus.h"
+#include "sd-daemon.h"
+#include "sd-event.h"
+#include "sd-login.h"
+#include "sysview.h"
+#include "unifont.h"
+#include "util.h"
+
+int manager_new(Manager **out) {
+        _cleanup_(manager_freep) Manager *m = NULL;
+        int r;
+
+        assert(out);
+
+        m = new0(Manager, 1);
+        if (!m)
+                return -ENOMEM;
+
+        r = sd_event_default(&m->event);
+        if (r < 0)
+                return r;
+
+        r = sd_event_set_watchdog(m->event, true);
+        if (r < 0)
+                return r;
+
+        r = sigprocmask_many(SIG_BLOCK, SIGTERM, SIGQUIT, SIGINT, SIGWINCH, SIGCHLD, -1);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(m->event, NULL, SIGQUIT, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_open_system(&m->sysbus);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_attach_event(m->sysbus, m->event, SD_EVENT_PRIORITY_NORMAL);
+        if (r < 0)
+                return r;
+
+        r = unifont_new(&m->uf);
+        if (r < 0)
+                return r;
+
+        r = sysview_context_new(&m->sysview,
+                                SYSVIEW_CONTEXT_SCAN_LOGIND |
+                                SYSVIEW_CONTEXT_SCAN_EVDEV |
+                                SYSVIEW_CONTEXT_SCAN_DRM,
+                                m->event,
+                                m->sysbus,
+                                NULL);
+        if (r < 0)
+                return r;
+
+        r = grdev_context_new(&m->grdev, m->event, m->sysbus);
+        if (r < 0)
+                return r;
+
+        r = idev_context_new(&m->idev, m->event, m->sysbus);
+        if (r < 0)
+                return r;
+
+        *out = m;
+        m = NULL;
+        return 0;
+}
+
+Manager *manager_free(Manager *m) {
+        if (!m)
+                return NULL;
+
+        assert(!m->workspace_list);
+
+        m->idev = idev_context_unref(m->idev);
+        m->grdev = grdev_context_unref(m->grdev);
+        m->sysview = sysview_context_free(m->sysview);
+        m->uf = unifont_unref(m->uf);
+        m->sysbus = sd_bus_unref(m->sysbus);
+        m->event = sd_event_unref(m->event);
+        free(m);
+
+        return NULL;
+}
+
+static int manager_sysview_session_filter(Manager *m, sysview_event *event) {
+        const char *sid = event->session_filter.id;
+        _cleanup_free_ char *desktop = NULL;
+        int r;
+
+        assert(sid);
+
+        r = sd_session_get_desktop(sid, &desktop);
+        if (r < 0)
+                return 0;
+
+        return streq(desktop, "systemd-console");
+}
+
+static int manager_sysview_session_add(Manager *m, sysview_event *event) {
+        sysview_session *session = event->session_add.session;
+        Session *s;
+        int r;
+
+        r = sysview_session_take_control(session);
+        if (r < 0) {
+                log_error("Cannot request session control on '%s': %s",
+                          sysview_session_get_name(session), strerror(-r));
+                return r;
+        }
+
+        r = session_new(&s, m, session);
+        if (r < 0) {
+                log_error("Cannot create session on '%s': %s",
+                          sysview_session_get_name(session), strerror(-r));
+                sysview_session_release_control(session);
+                return r;
+        }
+
+        sysview_session_set_userdata(session, s);
+
+        return 0;
+}
+
+static int manager_sysview_session_remove(Manager *m, sysview_event *event) {
+        sysview_session *session = event->session_remove.session;
+        Session *s;
+
+        s = sysview_session_get_userdata(session);
+        if (!s)
+                return 0;
+
+        session_free(s);
+
+        return 0;
+}
+
+static int manager_sysview_session_attach(Manager *m, sysview_event *event) {
+        sysview_session *session = event->session_attach.session;
+        sysview_device *device = event->session_attach.device;
+        Session *s;
+
+        s = sysview_session_get_userdata(session);
+        if (!s)
+                return 0;
+
+        session_add_device(s, device);
+
+        return 0;
+}
+
+static int manager_sysview_session_detach(Manager *m, sysview_event *event) {
+        sysview_session *session = event->session_detach.session;
+        sysview_device *device = event->session_detach.device;
+        Session *s;
+
+        s = sysview_session_get_userdata(session);
+        if (!s)
+                return 0;
+
+        session_remove_device(s, device);
+
+        return 0;
+}
+
+static int manager_sysview_session_refresh(Manager *m, sysview_event *event) {
+        sysview_session *session = event->session_refresh.session;
+        sysview_device *device = event->session_refresh.device;
+        struct udev_device *ud = event->session_refresh.ud;
+        Session *s;
+
+        s = sysview_session_get_userdata(session);
+        if (!s)
+                return 0;
+
+        session_refresh_device(s, device, ud);
+
+        return 0;
+}
+
+static int manager_sysview_session_control(Manager *m, sysview_event *event) {
+        sysview_session *session = event->session_control.session;
+        int error = event->session_control.error;
+        Session *s;
+
+        s = sysview_session_get_userdata(session);
+        if (!s)
+                return 0;
+
+        if (error < 0) {
+                log_error("Cannot take session control on '%s': %s",
+                          sysview_session_get_name(session), strerror(-error));
+                session_free(s);
+                sysview_session_set_userdata(session, NULL);
+                return -error;
+        }
+
+        return 0;
+}
+
+static int manager_sysview_fn(sysview_context *sysview, void *userdata, sysview_event *event) {
+        Manager *m = userdata;
+        int r;
+
+        assert(m);
+
+        switch (event->type) {
+        case SYSVIEW_EVENT_SESSION_FILTER:
+                r = manager_sysview_session_filter(m, event);
+                break;
+        case SYSVIEW_EVENT_SESSION_ADD:
+                r = manager_sysview_session_add(m, event);
+                break;
+        case SYSVIEW_EVENT_SESSION_REMOVE:
+                r = manager_sysview_session_remove(m, event);
+                break;
+        case SYSVIEW_EVENT_SESSION_ATTACH:
+                r = manager_sysview_session_attach(m, event);
+                break;
+        case SYSVIEW_EVENT_SESSION_DETACH:
+                r = manager_sysview_session_detach(m, event);
+                break;
+        case SYSVIEW_EVENT_SESSION_REFRESH:
+                r = manager_sysview_session_refresh(m, event);
+                break;
+        case SYSVIEW_EVENT_SESSION_CONTROL:
+                r = manager_sysview_session_control(m, event);
+                break;
+        default:
+                r = 0;
+                break;
+        }
+
+        return r;
+}
+
+int manager_run(Manager *m) {
+        int r;
+
+        assert(m);
+
+        r = sysview_context_start(m->sysview, manager_sysview_fn, m);
+        if (r < 0)
+                return r;
+
+        r = sd_event_loop(m->event);
+
+        sysview_context_stop(m->sysview);
+        return r;
+}
diff --git a/src/console/consoled-session.c b/src/console/consoled-session.c
new file mode 100644 (file)
index 0000000..8bacaca
--- /dev/null
@@ -0,0 +1,283 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdlib.h>
+#include "consoled.h"
+#include "grdev.h"
+#include "hashmap.h"
+#include "idev.h"
+#include "list.h"
+#include "macro.h"
+#include "sd-bus.h"
+#include "sd-event.h"
+#include "sysview.h"
+#include "util.h"
+
+static bool session_feed_keyboard(Session *s, idev_data *data) {
+        idev_data_keyboard *kdata = &data->keyboard;
+
+        if (!data->resync && kdata->value == 1 && kdata->n_syms == 1) {
+                uint32_t nr;
+                sysview_seat *seat;
+
+                /* handle VT-switch requests */
+                nr = 0;
+
+                switch (kdata->keysyms[0]) {
+                case XKB_KEY_F1 ... XKB_KEY_F12:
+                        if (IDEV_KBDMATCH(kdata,
+                                          IDEV_KBDMOD_CTRL | IDEV_KBDMOD_ALT,
+                                          kdata->keysyms[0]))
+                                nr = kdata->keysyms[0] - XKB_KEY_F1 + 1;
+                        break;
+                case XKB_KEY_XF86Switch_VT_1 ... XKB_KEY_XF86Switch_VT_12:
+                        nr = kdata->keysyms[0] - XKB_KEY_XF86Switch_VT_1 + 1;
+                        break;
+                }
+
+                if (nr != 0) {
+                        seat = sysview_session_get_seat(s->sysview);
+                        sysview_seat_switch_to(seat, nr);
+                        return true;
+                }
+        }
+
+        return false;
+}
+
+static bool session_feed(Session *s, idev_data *data) {
+        switch (data->type) {
+        case IDEV_DATA_KEYBOARD:
+                return session_feed_keyboard(s, data);
+        default:
+                return false;
+        }
+}
+
+static int session_idev_fn(idev_session *idev, void *userdata, idev_event *event) {
+        Session *s = userdata;
+
+        switch (event->type) {
+        case IDEV_EVENT_DEVICE_ADD:
+                idev_device_enable(event->device_add.device);
+                break;
+        case IDEV_EVENT_DEVICE_REMOVE:
+                idev_device_disable(event->device_remove.device);
+                break;
+        case IDEV_EVENT_DEVICE_DATA:
+                if (!session_feed(s, &event->device_data.data))
+                        workspace_feed(s->active_ws, &event->device_data.data);
+                break;
+        }
+
+        return 0;
+}
+
+static void session_grdev_fn(grdev_session *grdev, void *userdata, grdev_event *event) {
+        grdev_display *display;
+        Session *s = userdata;
+        Display *d;
+        int r;
+
+        switch (event->type) {
+        case GRDEV_EVENT_DISPLAY_ADD:
+                display = event->display_add.display;
+
+                r = display_new(&d, s, display);
+                if (r < 0) {
+                        log_error("Cannot create display '%s' on '%s': %s",
+                                  grdev_display_get_name(display), sysview_session_get_name(s->sysview), strerror(-r));
+                        break;
+                }
+
+                grdev_display_set_userdata(display, d);
+                workspace_refresh(s->active_ws);
+                break;
+        case GRDEV_EVENT_DISPLAY_REMOVE:
+                display = event->display_remove.display;
+                d = grdev_display_get_userdata(display);
+                if (!d)
+                        break;
+
+                display_free(d);
+                workspace_refresh(s->active_ws);
+                break;
+        case GRDEV_EVENT_DISPLAY_CHANGE:
+                display = event->display_remove.display;
+                d = grdev_display_get_userdata(display);
+                if (!d)
+                        break;
+
+                display_refresh(d);
+                workspace_refresh(s->active_ws);
+                break;
+        case GRDEV_EVENT_DISPLAY_FRAME:
+                display = event->display_remove.display;
+                d = grdev_display_get_userdata(display);
+                if (!d)
+                        break;
+
+                session_dirty(s);
+                break;
+        }
+}
+
+static int session_redraw_fn(sd_event_source *src, void *userdata) {
+        Session *s = userdata;
+        Display *d;
+
+        LIST_FOREACH(displays_by_session, d, s->display_list)
+                display_render(d, s->active_ws);
+
+        grdev_session_commit(s->grdev);
+
+        return 0;
+}
+
+int session_new(Session **out, Manager *m, sysview_session *session) {
+        _cleanup_(session_freep) Session *s = NULL;
+        int r;
+
+        assert(out);
+        assert(m);
+        assert(session);
+
+        s = new0(Session, 1);
+        if (!s)
+                return -ENOMEM;
+
+        s->manager = m;
+        s->sysview = session;
+
+        r = grdev_session_new(&s->grdev,
+                              m->grdev,
+                              GRDEV_SESSION_MANAGED,
+                              sysview_session_get_name(session),
+                              session_grdev_fn,
+                              s);
+        if (r < 0)
+                return r;
+
+        r = idev_session_new(&s->idev,
+                             m->idev,
+                             IDEV_SESSION_MANAGED,
+                             sysview_session_get_name(session),
+                             session_idev_fn,
+                             s);
+        if (r < 0)
+                return r;
+
+        r = workspace_new(&s->my_ws, m);
+        if (r < 0)
+                return r;
+
+        s->active_ws = workspace_attach(s->my_ws, s);
+
+        r = sd_event_add_defer(m->event, &s->redraw_src, session_redraw_fn, s);
+        if (r < 0)
+                return r;
+
+        grdev_session_enable(s->grdev);
+        idev_session_enable(s->idev);
+
+        *out = s;
+        s = NULL;
+        return 0;
+}
+
+Session *session_free(Session *s) {
+        if (!s)
+                return NULL;
+
+        assert(!s->display_list);
+
+        sd_event_source_unref(s->redraw_src);
+
+        workspace_detach(s->active_ws, s);
+        workspace_unref(s->my_ws);
+
+        idev_session_free(s->idev);
+        grdev_session_free(s->grdev);
+        free(s);
+
+        return NULL;
+}
+
+void session_dirty(Session *s) {
+        int r;
+
+        assert(s);
+
+        r = sd_event_source_set_enabled(s->redraw_src, SD_EVENT_ONESHOT);
+        if (r < 0)
+                log_error("Cannot enable redraw-source: %s", strerror(-r));
+}
+
+void session_add_device(Session *s, sysview_device *device) {
+        unsigned int type;
+
+        assert(s);
+        assert(device);
+
+        type = sysview_device_get_type(device);
+        switch (type) {
+        case SYSVIEW_DEVICE_DRM:
+                grdev_session_add_drm(s->grdev, sysview_device_get_ud(device));
+                break;
+        case SYSVIEW_DEVICE_EVDEV:
+                idev_session_add_evdev(s->idev, sysview_device_get_ud(device));
+                break;
+        }
+}
+
+void session_remove_device(Session *s, sysview_device *device) {
+        unsigned int type;
+
+        assert(s);
+        assert(device);
+
+        type = sysview_device_get_type(device);
+        switch (type) {
+        case SYSVIEW_DEVICE_DRM:
+                grdev_session_remove_drm(s->grdev, sysview_device_get_ud(device));
+                break;
+        case SYSVIEW_DEVICE_EVDEV:
+                idev_session_remove_evdev(s->idev, sysview_device_get_ud(device));
+                break;
+        }
+}
+
+void session_refresh_device(Session *s, sysview_device *device, struct udev_device *ud) {
+        unsigned int type;
+
+        assert(s);
+        assert(device);
+
+        type = sysview_device_get_type(device);
+        switch (type) {
+        case SYSVIEW_DEVICE_DRM:
+                grdev_session_hotplug_drm(s->grdev, sysview_device_get_ud(device));
+                break;
+        }
+}
diff --git a/src/console/consoled-terminal.c b/src/console/consoled-terminal.c
new file mode 100644 (file)
index 0000000..d091579
--- /dev/null
@@ -0,0 +1,360 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include "consoled.h"
+#include "list.h"
+#include "macro.h"
+#include "util.h"
+
+static int terminal_write_fn(term_screen *screen, void *userdata, const void *buf, size_t size) {
+        Terminal *t = userdata;
+        int r;
+
+        if (t->pty) {
+                r = pty_write(t->pty, buf, size);
+                if (r < 0)
+                        return log_oom();
+        }
+
+        return 0;
+}
+
+static int terminal_pty_fn(Pty *pty, void *userdata, unsigned int event, const void *ptr, size_t size) {
+        Terminal *t = userdata;
+        int r;
+
+        switch (event) {
+        case PTY_CHILD:
+                log_debug("PTY child exited");
+                t->pty = pty_unref(t->pty);
+                break;
+        case PTY_DATA:
+                r = term_screen_feed_text(t->screen, ptr, size);
+                if (r < 0)
+                        log_error("Cannot update screen state: %s", strerror(-r));
+
+                workspace_dirty(t->workspace);
+                break;
+        }
+
+        return 0;
+}
+
+int terminal_new(Terminal **out, Workspace *w) {
+        _cleanup_(terminal_freep) Terminal *t = NULL;
+        int r;
+
+        assert(w);
+
+        t = new0(Terminal, 1);
+        if (!t)
+                return -ENOMEM;
+
+        t->workspace = w;
+        LIST_PREPEND(terminals_by_workspace, w->terminal_list, t);
+
+        r = term_parser_new(&t->parser, true);
+        if (r < 0)
+                return r;
+
+        r = term_screen_new(&t->screen, terminal_write_fn, t, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = term_screen_set_answerback(t->screen, "systemd-console");
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = t;
+        t = NULL;
+        return 0;
+}
+
+Terminal *terminal_free(Terminal *t) {
+        if (!t)
+                return NULL;
+
+        assert(t->workspace);
+
+        if (t->pty) {
+                (void)pty_signal(t->pty, SIGHUP);
+                pty_close(t->pty);
+                pty_unref(t->pty);
+        }
+        term_screen_unref(t->screen);
+        term_parser_free(t->parser);
+        LIST_REMOVE(terminals_by_workspace, t->workspace->terminal_list, t);
+        free(t);
+
+        return NULL;
+}
+
+void terminal_resize(Terminal *t) {
+        uint32_t width, height, fw, fh;
+        int r;
+
+        assert(t);
+
+        width = t->workspace->width;
+        height = t->workspace->height;
+        fw = unifont_get_width(t->workspace->manager->uf);
+        fh = unifont_get_height(t->workspace->manager->uf);
+
+        width = (fw > 0) ? width / fw : 0;
+        height = (fh > 0) ? height / fh : 0;
+
+        if (t->pty) {
+                r = pty_resize(t->pty, width, height);
+                if (r < 0)
+                        log_error("Cannot resize pty: %s", strerror(-r));
+        }
+
+        r = term_screen_resize(t->screen, width, height);
+        if (r < 0)
+                log_error("Cannot resize screen: %s", strerror(-r));
+}
+
+void terminal_run(Terminal *t) {
+        pid_t pid;
+
+        assert(t);
+
+        if (t->pty)
+                return;
+
+        pid = pty_fork(&t->pty,
+                       t->workspace->manager->event,
+                       terminal_pty_fn,
+                       t,
+                       term_screen_get_width(t->screen),
+                       term_screen_get_height(t->screen));
+        if (pid < 0) {
+                log_error("Cannot fork PTY: %s", strerror(-pid));
+                return;
+        } else if (pid == 0) {
+                /* child */
+
+                char **argv = (char*[]){
+                        (char*)getenv("SHELL") ? : (char*)_PATH_BSHELL,
+                        NULL
+                };
+
+                setenv("TERM", "xterm-256color", 1);
+                setenv("COLORTERM", "systemd-console", 1);
+
+                execve(argv[0], argv, environ);
+                log_error("Cannot exec %s (%d): %m", argv[0], -errno);
+                _exit(1);
+        }
+}
+
+static void terminal_feed_keyboard(Terminal *t, idev_data *data) {
+        idev_data_keyboard *kdata = &data->keyboard;
+        int r;
+
+        if (!data->resync && (kdata->value == 1 || kdata->value == 2)) {
+                assert_cc(TERM_KBDMOD_CNT == (int)IDEV_KBDMOD_CNT);
+                assert_cc(TERM_KBDMOD_IDX_SHIFT == (int)IDEV_KBDMOD_IDX_SHIFT &&
+                          TERM_KBDMOD_IDX_CTRL == (int)IDEV_KBDMOD_IDX_CTRL &&
+                          TERM_KBDMOD_IDX_ALT == (int)IDEV_KBDMOD_IDX_ALT &&
+                          TERM_KBDMOD_IDX_LINUX == (int)IDEV_KBDMOD_IDX_LINUX &&
+                          TERM_KBDMOD_IDX_CAPS == (int)IDEV_KBDMOD_IDX_CAPS);
+
+                r = term_screen_feed_keyboard(t->screen,
+                                              kdata->keysyms,
+                                              kdata->n_syms,
+                                              kdata->ascii,
+                                              kdata->codepoints,
+                                              kdata->mods);
+                if (r < 0)
+                        log_error("Cannot feed keyboard data to screen: %s",
+                                  strerror(-r));
+        }
+}
+
+void terminal_feed(Terminal *t, idev_data *data) {
+        switch (data->type) {
+        case IDEV_DATA_KEYBOARD:
+                terminal_feed_keyboard(t, data);
+                break;
+        }
+}
+
+static void terminal_fill(uint8_t *dst,
+                          uint32_t width,
+                          uint32_t height,
+                          uint32_t stride,
+                          uint32_t value) {
+        uint32_t i, j, *px;
+
+        for (j = 0; j < height; ++j) {
+                px = (uint32_t*)dst;
+
+                for (i = 0; i < width; ++i)
+                        *px++ = value;
+
+                dst += stride;
+        }
+}
+
+static void terminal_blend(uint8_t *dst,
+                           uint32_t width,
+                           uint32_t height,
+                           uint32_t dst_stride,
+                           const uint8_t *src,
+                           uint32_t src_stride,
+                           uint32_t fg,
+                           uint32_t bg) {
+        uint32_t i, j, *px;
+
+        for (j = 0; j < height; ++j) {
+                px = (uint32_t*)dst;
+
+                for (i = 0; i < width; ++i) {
+                        if (!src || src[i / 8] & (1 << (7 - i % 8)))
+                                *px = fg;
+                        else
+                                *px = bg;
+
+                        ++px;
+                }
+
+                src += src_stride;
+                dst += dst_stride;
+        }
+}
+
+typedef struct {
+        const grdev_display_target *target;
+        unifont *uf;
+        uint32_t cell_width;
+        uint32_t cell_height;
+        bool dirty;
+} TerminalDrawContext;
+
+static int terminal_draw_cell(term_screen *screen,
+                              void *userdata,
+                              unsigned int x,
+                              unsigned int y,
+                              const term_attr *attr,
+                              const uint32_t *ch,
+                              size_t n_ch,
+                              unsigned int ch_width) {
+        TerminalDrawContext *ctx = userdata;
+        const grdev_display_target *target = ctx->target;
+        grdev_fb *fb = target->back;
+        uint32_t xpos, ypos, width, height;
+        uint32_t fg, bg;
+        unifont_glyph g;
+        uint8_t *dst;
+        int r;
+
+        if (n_ch > 0) {
+                r = unifont_lookup(ctx->uf, &g, *ch);
+                if (r < 0)
+                        r = unifont_lookup(ctx->uf, &g, 0xfffd);
+                if (r < 0)
+                        unifont_fallback(&g);
+        }
+
+        xpos = x * ctx->cell_width;
+        ypos = y * ctx->cell_height;
+
+        if (xpos >= fb->width || ypos >= fb->height)
+                return 0;
+
+        width = MIN(fb->width - xpos, ctx->cell_width * ch_width);
+        height = MIN(fb->height - ypos, ctx->cell_height);
+
+        term_attr_to_argb32(attr, &fg, &bg, NULL);
+
+        ctx->dirty = true;
+
+        dst = fb->maps[0];
+        dst += fb->strides[0] * ypos + sizeof(uint32_t) * xpos;
+
+        if (n_ch < 1) {
+                terminal_fill(dst,
+                              width,
+                              height,
+                              fb->strides[0],
+                              bg);
+        } else {
+                if (width > g.width)
+                        terminal_fill(dst + sizeof(uint32_t) * g.width,
+                                      width - g.width,
+                                      height,
+                                      fb->strides[0],
+                                      bg);
+                if (height > g.height)
+                        terminal_fill(dst + fb->strides[0] * g.height,
+                                      width,
+                                      height - g.height,
+                                      fb->strides[0],
+                                      bg);
+
+                terminal_blend(dst,
+                               width,
+                               height,
+                               fb->strides[0],
+                               g.data,
+                               g.stride,
+                               fg,
+                               bg);
+        }
+
+        return 0;
+}
+
+bool terminal_draw(Terminal *t, const grdev_display_target *target) {
+        TerminalDrawContext ctx = { };
+        uint64_t age;
+
+        assert(t);
+        assert(target);
+
+        /* start up terminal on first frame */
+        terminal_run(t);
+
+        ctx.target = target;
+        ctx.uf = t->workspace->manager->uf;
+        ctx.cell_width = unifont_get_width(ctx.uf);
+        ctx.cell_height = unifont_get_height(ctx.uf);
+        ctx.dirty = false;
+
+        if (target->front) {
+                /* if the frontbuffer is new enough, no reason to redraw */
+                age = term_screen_get_age(t->screen);
+                if (age != 0 && age <= target->front->data.u64)
+                        return false;
+        } else {
+                /* force flip if no frontbuffer is set, yet */
+                ctx.dirty = true;
+        }
+
+        term_screen_draw(t->screen, terminal_draw_cell, &ctx, &target->back->data.u64);
+
+        return ctx.dirty;
+}
diff --git a/src/console/consoled-workspace.c b/src/console/consoled-workspace.c
new file mode 100644 (file)
index 0000000..56344ef
--- /dev/null
@@ -0,0 +1,168 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include "consoled.h"
+#include "grdev.h"
+#include "idev.h"
+#include "list.h"
+#include "macro.h"
+#include "util.h"
+
+int workspace_new(Workspace **out, Manager *m) {
+        _cleanup_(workspace_unrefp) Workspace *w = NULL;
+        int r;
+
+        assert(out);
+
+        w = new0(Workspace, 1);
+        if (!w)
+                return -ENOMEM;
+
+        w->ref = 1;
+        w->manager = m;
+        LIST_PREPEND(workspaces_by_manager, m->workspace_list, w);
+
+        r = terminal_new(&w->current, w);
+        if (r < 0)
+                return r;
+
+        *out = w;
+        w = NULL;
+        return 0;
+}
+
+static void workspace_cleanup(Workspace *w) {
+        Terminal *t;
+
+        assert(w);
+        assert(w->ref == 0);
+        assert(w->manager);
+        assert(!w->session_list);
+
+        w->current = NULL;
+        while ((t = w->terminal_list))
+                terminal_free(t);
+
+        LIST_REMOVE(workspaces_by_manager, w->manager->workspace_list, w);
+        free(w);
+}
+
+Workspace *workspace_ref(Workspace *w) {
+        assert(w);
+
+        ++w->ref;
+        return w;
+}
+
+Workspace *workspace_unref(Workspace *w) {
+        if (!w)
+                return NULL;
+
+        assert(w->ref > 0);
+
+        if (--w->ref == 0)
+                workspace_cleanup(w);
+
+        return NULL;
+}
+
+Workspace *workspace_attach(Workspace *w, Session *s) {
+        assert(w);
+        assert(s);
+
+        LIST_PREPEND(sessions_by_workspace, w->session_list, s);
+        workspace_refresh(w);
+        return workspace_ref(w);
+}
+
+Workspace *workspace_detach(Workspace *w, Session *s) {
+        assert(w);
+        assert(s);
+        assert(s->active_ws == w);
+
+        LIST_REMOVE(sessions_by_workspace, w->session_list, s);
+        workspace_refresh(w);
+        return workspace_unref(w);
+}
+
+void workspace_refresh(Workspace *w) {
+        uint32_t width, height;
+        Terminal *t;
+        Session *s;
+        Display *d;
+
+        assert(w);
+
+        width = 0;
+        height = 0;
+
+        /* find out minimum dimension of all attached displays */
+        LIST_FOREACH(sessions_by_workspace, s, w->session_list) {
+                LIST_FOREACH(displays_by_session, d, s->display_list) {
+                        assert(d->width > 0 && d->height > 0);
+
+                        if (width == 0 || d->width < width)
+                                width = d->width;
+                        if (height == 0 || d->height < height)
+                                height = d->height;
+                }
+        }
+
+        /* either both are zero, or none is zero */
+        assert(!(!width ^ !height));
+
+        /* update terminal-sizes if dimensions changed */
+        if (w->width != width || w->height != height) {
+                w->width = width;
+                w->height = height;
+
+                LIST_FOREACH(terminals_by_workspace, t, w->terminal_list)
+                        terminal_resize(t);
+
+                workspace_dirty(w);
+        }
+}
+
+void workspace_dirty(Workspace *w) {
+        Session *s;
+
+        assert(w);
+
+        LIST_FOREACH(sessions_by_workspace, s, w->session_list)
+                session_dirty(s);
+}
+
+void workspace_feed(Workspace *w, idev_data *data) {
+        assert(w);
+        assert(data);
+
+        terminal_feed(w->current, data);
+}
+
+bool workspace_draw(Workspace *w, const grdev_display_target *target) {
+        assert(w);
+        assert(target);
+
+        return terminal_draw(w->current, target);
+}
diff --git a/src/console/consoled.c b/src/console/consoled.c
new file mode 100644 (file)
index 0000000..b0c9eda
--- /dev/null
@@ -0,0 +1,67 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include "consoled.h"
+#include "log.h"
+#include "sd-daemon.h"
+#include "util.h"
+
+int main(int argc, char *argv[]) {
+        _cleanup_(manager_freep) Manager *m = NULL;
+        int r;
+
+        log_set_target(LOG_TARGET_AUTO);
+        log_parse_environment();
+        log_open();
+
+        umask(0022);
+
+        if (argc != 1) {
+                log_error("This program takes no arguments.");
+                r = -EINVAL;
+                goto out;
+        }
+
+        r = manager_new(&m);
+        if (r < 0) {
+                log_error("Could not create manager: %s", strerror(-r));
+                goto out;
+        }
+
+        sd_notify(false,
+                  "READY=1\n"
+                  "STATUS=Processing requests...");
+
+        r = manager_run(m);
+        if (r < 0) {
+                log_error("Cannot run manager: %s", strerror(-r));
+                goto out;
+        }
+
+out:
+        sd_notify(false,
+                  "STATUS=Shutting down...");
+
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/src/console/consoled.h b/src/console/consoled.h
new file mode 100644 (file)
index 0000000..f8a3df4
--- /dev/null
@@ -0,0 +1,170 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdlib.h>
+#include "grdev.h"
+#include "hashmap.h"
+#include "idev.h"
+#include "list.h"
+#include "macro.h"
+#include "pty.h"
+#include "sd-bus.h"
+#include "sd-event.h"
+#include "sysview.h"
+#include "term.h"
+#include "unifont.h"
+#include "util.h"
+
+typedef struct Manager Manager;
+typedef struct Session Session;
+typedef struct Display Display;
+typedef struct Workspace Workspace;
+typedef struct Terminal Terminal;
+
+/*
+ * Terminals
+ */
+
+struct Terminal {
+        Workspace *workspace;
+        LIST_FIELDS(Terminal, terminals_by_workspace);
+
+        term_utf8 utf8;
+        term_parser *parser;
+        term_screen *screen;
+        Pty *pty;
+};
+
+int terminal_new(Terminal **out, Workspace *w);
+Terminal *terminal_free(Terminal *t);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Terminal*, terminal_free);
+
+void terminal_resize(Terminal *t);
+void terminal_run(Terminal *t);
+void terminal_feed(Terminal *t, idev_data *data);
+bool terminal_draw(Terminal *t, const grdev_display_target *target);
+
+/*
+ * Workspaces
+ */
+
+struct Workspace {
+        unsigned long ref;
+        Manager *manager;
+        LIST_FIELDS(Workspace, workspaces_by_manager);
+
+        LIST_HEAD(Terminal, terminal_list);
+        Terminal *current;
+
+        LIST_HEAD(Session, session_list);
+        uint32_t width;
+        uint32_t height;
+};
+
+int workspace_new(Workspace **out, Manager *m);
+Workspace *workspace_ref(Workspace *w);
+Workspace *workspace_unref(Workspace *w);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Workspace*, workspace_unref);
+
+Workspace *workspace_attach(Workspace *w, Session *s);
+Workspace *workspace_detach(Workspace *w, Session *s);
+void workspace_refresh(Workspace *w);
+
+void workspace_dirty(Workspace *w);
+void workspace_feed(Workspace *w, idev_data *data);
+bool workspace_draw(Workspace *w, const grdev_display_target *target);
+
+/*
+ * Displays
+ */
+
+struct Display {
+        Session *session;
+        LIST_FIELDS(Display, displays_by_session);
+        grdev_display *grdev;
+        uint32_t width;
+        uint32_t height;
+};
+
+int display_new(Display **out, Session *s, grdev_display *grdev);
+Display *display_free(Display *d);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Display*, display_free);
+
+void display_refresh(Display *d);
+void display_render(Display *d, Workspace *w);
+
+/*
+ * Sessions
+ */
+
+struct Session {
+        Manager *manager;
+        sysview_session *sysview;
+        grdev_session *grdev;
+        idev_session *idev;
+
+        LIST_FIELDS(Session, sessions_by_workspace);
+        Workspace *my_ws;
+        Workspace *active_ws;
+
+        LIST_HEAD(Display, display_list);
+        sd_event_source *redraw_src;
+};
+
+int session_new(Session **out, Manager *m, sysview_session *session);
+Session *session_free(Session *s);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Session*, session_free);
+
+void session_dirty(Session *s);
+
+void session_add_device(Session *s, sysview_device *device);
+void session_remove_device(Session *s, sysview_device *device);
+void session_refresh_device(Session *s, sysview_device *device, struct udev_device *ud);
+
+/*
+ * Managers
+ */
+
+struct Manager {
+        sd_event *event;
+        sd_bus *sysbus;
+        unifont *uf;
+        sysview_context *sysview;
+        grdev_context *grdev;
+        idev_context *idev;
+        LIST_HEAD(Workspace, workspace_list);
+};
+
+int manager_new(Manager **out);
+Manager *manager_free(Manager *m);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
+
+int manager_run(Manager *m);
index 73a8ce17e4a7052e1e29c38cfdcb08696b7ac064..f72aca29579aea9bf61f5a9a3d25df329c88e536 100644 (file)
@@ -685,7 +685,7 @@ static int automount_deserialize_item(Unit *u, const char *key, const char *valu
                         log_debug_unit(u->id, "Failed to parse token value %s", value);
                 else {
                         if (!a->tokens)
-                                if (!(a->tokens = set_new(trivial_hash_func, trivial_compare_func)))
+                                if (!(a->tokens = set_new(NULL)))
                                         return -ENOMEM;
 
                         r = set_put(a->tokens, UINT_TO_PTR(token));
@@ -762,7 +762,7 @@ static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, vo
                 } else
                         log_debug_unit(UNIT(a)->id, "Got direct mount request on %s", a->where);
 
-                r = set_ensure_allocated(&a->tokens, trivial_hash_func, trivial_compare_func);
+                r = set_ensure_allocated(&a->tokens, NULL);
                 if (r < 0) {
                         log_error_unit(UNIT(a)->id, "Failed to allocate token set.");
                         goto fail;
index f6faf06ae80bff30193086fc6dcfef1baee8ef1b..d5e55506cf3657571067b6de36b2edeac0cbdbec 100644 (file)
 #define _IMA_FEATURE_ "-IMA"
 #endif
 
+#ifdef HAVE_SMACK
+#define _SMACK_FEATURE_ "+SMACK"
+#else
+#define _SMACK_FEATURE_ "-SMACK"
+#endif
+
 #ifdef HAVE_SYSV_COMPAT
 #define _SYSVINIT_FEATURE_ "+SYSVINIT"
 #else
 #define _SYSVINIT_FEATURE_ "-SYSVINIT"
 #endif
 
+#ifdef HAVE_UTMP
+#define _UTMP_FEATURE_ "+UTMP"
+#else
+#define _UTMP_FEATURE_ "-UTMP"
+#endif
+
 #ifdef HAVE_LIBCRYPTSETUP
 #define _LIBCRYPTSETUP_FEATURE_ "+LIBCRYPTSETUP"
 #else
 #define _GCRYPT_FEATURE_ "-GCRYPT"
 #endif
 
+#ifdef HAVE_GNUTLS
+#define _GNUTLS_FEATURE_ "+GNUTLS"
+#else
+#define _GNUTLS_FEATURE_ "-GNUTLS"
+#endif
+
 #ifdef HAVE_ACL
 #define _ACL_FEATURE_ "+ACL"
 #else
 #define _XZ_FEATURE_ "-XZ"
 #endif
 
+#ifdef HAVE_LZ4
+#define _LZ4_FEATURE_ "+LZ4"
+#else
+#define _LZ4_FEATURE_ "-LZ4"
+#endif
+
 #ifdef HAVE_SECCOMP
 #define _SECCOMP_FEATURE_ "+SECCOMP"
 #else
 #define _SECCOMP_FEATURE_ "-SECCOMP"
 #endif
 
-#define SYSTEMD_FEATURES _PAM_FEATURE_ " " _AUDIT_FEATURE_ " " _SELINUX_FEATURE_ " " _IMA_FEATURE_ " " _SYSVINIT_FEATURE_ " " _LIBCRYPTSETUP_FEATURE_ " " _GCRYPT_FEATURE_ " " _ACL_FEATURE_ " " _XZ_FEATURE_ " " _SECCOMP_FEATURE_ " " _APPARMOR_FEATURE_
+#ifdef HAVE_BLKID
+#define _BLKID_FEATURE_ "+BLKID"
+#else
+#define _BLKID_FEATURE_ "-BLKID"
+#endif
+
+#ifdef HAVE_ELFUTILS
+#define _ELFUTILS_FEATURE_ "+ELFUTILS"
+#else
+#define _ELFUTILS_FEATURE_ "-ELFUTILS"
+#endif
+
+#ifdef HAVE_KMOD
+#define _KMOD_FEATURE_ "+KMOD"
+#else
+#define _KMOD_FEATURE_ "-KMOD"
+#endif
+
+#ifdef HAVE_LIBIDN
+#define _IDN_FEATURE_ "+IDN"
+#else
+#define _IDN_FEATURE_ "-IDN"
+#endif
+
+#define SYSTEMD_FEATURES                                                \
+        _PAM_FEATURE_ " "                                               \
+        _AUDIT_FEATURE_ " "                                             \
+        _SELINUX_FEATURE_ " "                                           \
+        _IMA_FEATURE_ " "                                               \
+        _APPARMOR_FEATURE_ " "                                          \
+        _SMACK_FEATURE_ " "                                             \
+        _SYSVINIT_FEATURE_ " "                                          \
+        _UTMP_FEATURE_ " "                                              \
+        _LIBCRYPTSETUP_FEATURE_ " "                                     \
+        _GCRYPT_FEATURE_ " "                                            \
+        _GNUTLS_FEATURE_ " "                                            \
+        _ACL_FEATURE_ " "                                               \
+        _XZ_FEATURE_ " "                                                \
+        _LZ4_FEATURE_ " "                                               \
+        _SECCOMP_FEATURE_ " "                                           \
+        _BLKID_FEATURE_ " "                                             \
+        _ELFUTILS_FEATURE_ " "                                          \
+        _KMOD_FEATURE_ " "                                              \
+        _IDN_FEATURE_ " "
diff --git a/src/core/bus-common.c b/src/core/bus-common.c
new file mode 100644 (file)
index 0000000..4a61cb9
--- /dev/null
@@ -0,0 +1,35 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Daniel Mack
+
+  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/>.
+***/
+
+#include "special.h"
+#include "bus-kernel.h"
+#include "bus-internal.h"
+#include "bus-util.h"
+#include "service.h"
+#include "bus-common.h"
+
+static const char* const bus_policy_access_table[_BUS_POLICY_ACCESS_MAX] = {
+        [BUS_POLICY_ACCESS_SEE] = "see",
+        [BUS_POLICY_ACCESS_TALK] = "talk",
+        [BUS_POLICY_ACCESS_OWN] = "own",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(bus_policy_access, BusPolicyAccess);
diff --git a/src/core/bus-common.h b/src/core/bus-common.h
new file mode 100644 (file)
index 0000000..209f870
--- /dev/null
@@ -0,0 +1,35 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+#include "macro.h"
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Daniel Mack
+
+  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/>.
+***/
+
+typedef enum BusPolicyAccess {
+        BUS_POLICY_ACCESS_SEE,
+        BUS_POLICY_ACCESS_TALK,
+        BUS_POLICY_ACCESS_OWN,
+        _BUS_POLICY_ACCESS_MAX,
+        _BUS_POLICY_ACCESS_INVALID = -1
+} BusPolicyAccess;
+
+const char* bus_policy_access_to_string(BusPolicyAccess i) _const_;
+BusPolicyAccess bus_policy_access_from_string(const char *s) _pure_;
diff --git a/src/core/bus-endpoint.c b/src/core/bus-endpoint.c
new file mode 100644 (file)
index 0000000..aac540d
--- /dev/null
@@ -0,0 +1,90 @@
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Daniel Mack
+
+  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/>.
+***/
+
+#include <stdlib.h>
+
+#include "bus-endpoint.h"
+
+int bus_endpoint_new(BusEndpoint **ep)
+{
+        assert(ep);
+
+        *ep = new0(BusEndpoint, 1);
+        if (!*ep)
+                return -ENOMEM;
+
+        return 0;
+}
+
+int bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access)
+{
+        _cleanup_free_ BusEndpointPolicy *po = NULL;
+        _cleanup_free_ char *key = NULL;
+        int r;
+
+        assert(ep);
+        assert(name);
+        assert(access > _BUS_POLICY_ACCESS_INVALID && access < _BUS_POLICY_ACCESS_MAX);
+
+        /* check if we already have this name in the policy list. If we do, see if the new access level
+         * is higher than the exising one, and upgrade the entry in that case. Otherwise, do nothing.
+         */
+
+        if (ep->policy_hash) {
+                po = hashmap_get(ep->policy_hash, name);
+                if (po) {
+                        if (po->access < access)
+                                po->access = access;
+
+                        return 0;
+                }
+        } else {
+                ep->policy_hash = hashmap_new(&string_hash_ops);
+                if (!ep->policy_hash)
+                        return -ENOMEM;
+        }
+
+        po = new0(BusEndpointPolicy, 1);
+        if (!po)
+                return -ENOMEM;
+
+        key = strdup(name);
+        if (!key)
+                return -ENOMEM;
+
+        po->name = key;
+        po->access = access;
+
+        r = hashmap_put(ep->policy_hash, key, po);
+        if (r < 0)
+                return r;
+
+        po = NULL;
+        key = NULL;
+        return 0;
+}
+
+void bus_endpoint_free(BusEndpoint *endpoint)
+{
+        if (!endpoint)
+                return;
+
+        hashmap_free_free_free(endpoint->policy_hash);
+        free(endpoint);
+}
diff --git a/src/core/bus-endpoint.h b/src/core/bus-endpoint.h
new file mode 100644 (file)
index 0000000..2c5415f
--- /dev/null
@@ -0,0 +1,42 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Daniel Mack
+
+  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/>.
+***/
+
+typedef struct BusEndpoint BusEndpoint;
+typedef struct BusEndpointPolicy BusEndpointPolicy;
+
+#include "bus-common.h"
+#include "hashmap.h"
+
+struct BusEndpointPolicy {
+        char *name;
+        BusPolicyAccess access;
+};
+
+struct BusEndpoint {
+        Hashmap *policy_hash;
+};
+
+int bus_endpoint_new(BusEndpoint **ep);
+void bus_endpoint_free(BusEndpoint *endpoint);
+
+int bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access);
index d2c926b471b4061965283e00f4af075c19e98a85..68cb6ca7b7f2e0d7b62ce378caf1f1edc70ee588 100644 (file)
@@ -290,14 +290,19 @@ static int busname_watch_fd(BusName *n) {
 }
 
 static int busname_open_fd(BusName *n) {
+        _cleanup_free_ char *path = NULL;
+        const char *mode;
+
         assert(n);
 
         if (n->starter_fd >= 0)
                 return 0;
 
-        n->starter_fd = bus_kernel_open_bus_fd(UNIT(n)->manager->running_as == SYSTEMD_SYSTEM ? "system" : "user");
+        mode = UNIT(n)->manager->running_as == SYSTEMD_SYSTEM ? "system" : "user";
+        n->starter_fd = bus_kernel_open_bus_fd(mode, &path);
         if (n->starter_fd < 0) {
-                log_warning_unit(UNIT(n)->id, "Failed to create starter fd: %s", strerror(-n->starter_fd));
+                log_warning_unit(UNIT(n)->id, "Failed to open %s: %s",
+                                 path ?: "kdbus", strerror(-n->starter_fd));
                 return n->starter_fd;
         }
 
@@ -441,7 +446,7 @@ static void busname_enter_signal(BusName *n, BusNameState state, BusNameResult f
 
         r = unit_kill_context(UNIT(n),
                               &kill_context,
-                              state != BUSNAME_SIGTERM,
+                              state != BUSNAME_SIGTERM ? KILL_KILL : KILL_TERMINATE,
                               -1,
                               n->control_pid,
                               false);
@@ -763,7 +768,7 @@ static void busname_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                 f = BUSNAME_FAILURE_EXIT_CODE;
         else if (code == CLD_KILLED)
                 f = BUSNAME_FAILURE_SIGNAL;
-        else if (code == CLD_KILLED)
+        else if (code == CLD_DUMPED)
                 f = BUSNAME_FAILURE_CORE_DUMP;
         else
                 assert_not_reached("Unknown sigchld code");
@@ -906,14 +911,6 @@ static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = {
 
 DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult);
 
-static const char* const busname_policy_access_table[_BUSNAME_POLICY_ACCESS_MAX] = {
-        [BUSNAME_POLICY_ACCESS_SEE] = "see",
-        [BUSNAME_POLICY_ACCESS_TALK] = "talk",
-        [BUSNAME_POLICY_ACCESS_OWN] = "own",
-};
-
-DEFINE_STRING_TABLE_LOOKUP(busname_policy_access, BusNamePolicyAccess);
-
 const UnitVTable busname_vtable = {
         .object_size = sizeof(BusName),
 
index 65d57f710a7745dbd3583623f3828e947abd6ce0..c9b653d82e6081389e801fa5b0afc3090cde7404 100644 (file)
@@ -25,6 +25,7 @@ typedef struct BusName BusName;
 typedef struct BusNamePolicy BusNamePolicy;
 
 #include "unit.h"
+#include "bus-common.h"
 
 typedef enum BusNameState {
         BUSNAME_DEAD,
@@ -58,17 +59,9 @@ typedef enum BusNamePolicyType {
         _BUSNAME_POLICY_TYPE_INVALID = -1
 } BusNamePolicyType;
 
-typedef enum BusNamePolicyAccess {
-        BUSNAME_POLICY_ACCESS_SEE,
-        BUSNAME_POLICY_ACCESS_TALK,
-        BUSNAME_POLICY_ACCESS_OWN,
-        _BUSNAME_POLICY_ACCESS_MAX,
-        _BUSNAME_POLICY_ACCESS_INVALID = -1
-} BusNamePolicyAccess;
-
 struct BusNamePolicy {
         BusNamePolicyType type;
-        BusNamePolicyAccess access;
+        BusPolicyAccess access;
 
         char *name;
 
@@ -97,7 +90,7 @@ struct BusName {
         pid_t control_pid;
 
         LIST_HEAD(BusNamePolicy, policy);
-        BusNamePolicyAccess policy_world;
+        BusPolicyAccess policy_world;
 };
 
 extern const UnitVTable busname_vtable;
@@ -107,6 +100,3 @@ BusNameState busname_state_from_string(const char *s) _pure_;
 
 const char* busname_result_to_string(BusNameResult i) _const_;
 BusNameResult busname_result_from_string(const char *s) _pure_;
-
-const char* busname_policy_access_to_string(BusNamePolicyAccess i) _const_;
-BusNamePolicyAccess busname_policy_access_from_string(const char *s) _pure_;
index cd6796383bf22bfbc62e640e8eca6ceda5a7e4ea..e604c3cbc694e7254a56fb5fb5389345502f2101 100644 (file)
@@ -41,7 +41,7 @@ void cgroup_context_init(CGroupContext *c) {
         c->blockio_weight = (unsigned long) -1;
         c->startup_blockio_weight = (unsigned long) -1;
 
-        c->cpu_quota_per_sec_usec = (usec_t) -1;
+        c->cpu_quota_per_sec_usec = USEC_INFINITY;
 }
 
 void cgroup_context_free_device_allow(CGroupContext *c, CGroupDeviceAllow *a) {
@@ -111,7 +111,7 @@ void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) {
                 prefix, yes_no(c->memory_accounting),
                 prefix, c->cpu_shares,
                 prefix, c->startup_cpu_shares,
-                prefix, strna(format_timespan(u, sizeof(u), c->cpu_quota_per_sec_usec, 1)),
+                prefix, format_timespan(u, sizeof(u), c->cpu_quota_per_sec_usec, 1),
                 prefix, c->blockio_weight,
                 prefix, c->startup_blockio_weight,
                 prefix, c->memory_limit,
@@ -200,7 +200,7 @@ static int whitelist_device(const char *path, const char *node, const char *acc)
 
         r = cg_set_attribute("devices", path, "devices.allow", buf);
         if (r < 0)
-                log_warning("Failed to set devices.allow on %s: %s", path, strerror(-r));
+                log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set devices.allow on %s: %s", path, strerror(-r));
 
         return r;
 }
@@ -272,7 +272,7 @@ static int whitelist_major(const char *path, const char *name, char type, const
 
                 r = cg_set_attribute("devices", path, "devices.allow", buf);
                 if (r < 0)
-                        log_warning("Failed to set devices.allow on %s: %s", path, strerror(-r));
+                        log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set devices.allow on %s: %s", path, strerror(-r));
         }
 
         return 0;
@@ -300,24 +300,24 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
                 char buf[MAX(DECIMAL_STR_MAX(unsigned long), DECIMAL_STR_MAX(usec_t)) + 1];
 
                 sprintf(buf, "%lu\n",
-                        state == MANAGER_STARTING && c->startup_cpu_shares != (unsigned long) -1 ? c->startup_cpu_shares :
+                        IN_SET(state, MANAGER_STARTING, MANAGER_INITIALIZING) && c->startup_cpu_shares != (unsigned long) -1 ? c->startup_cpu_shares :
                         c->cpu_shares != (unsigned long) -1 ? c->cpu_shares : 1024);
                 r = cg_set_attribute("cpu", path, "cpu.shares", buf);
                 if (r < 0)
-                        log_warning("Failed to set cpu.shares on %s: %s", path, strerror(-r));
+                        log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set cpu.shares on %s: %s", path, strerror(-r));
 
                 sprintf(buf, USEC_FMT "\n", CGROUP_CPU_QUOTA_PERIOD_USEC);
                 r = cg_set_attribute("cpu", path, "cpu.cfs_period_us", buf);
                 if (r < 0)
-                        log_warning("Failed to set cpu.cfs_period_us on %s: %s", path, strerror(-r));
+                        log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set cpu.cfs_period_us on %s: %s", path, strerror(-r));
 
-                if (c->cpu_quota_per_sec_usec != (usec_t) -1) {
+                if (c->cpu_quota_per_sec_usec != USEC_INFINITY) {
                         sprintf(buf, USEC_FMT "\n", c->cpu_quota_per_sec_usec * CGROUP_CPU_QUOTA_PERIOD_USEC / USEC_PER_SEC);
                         r = cg_set_attribute("cpu", path, "cpu.cfs_quota_us", buf);
                 } else
                         r = cg_set_attribute("cpu", path, "cpu.cfs_quota_us", "-1");
                 if (r < 0)
-                        log_warning("Failed to set cpu.cfs_quota_us on %s: %s", path, strerror(-r));
+                        log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set cpu.cfs_quota_us on %s: %s", path, strerror(-r));
         }
 
         if (mask & CGROUP_BLKIO) {
@@ -328,11 +328,11 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
                 CGroupBlockIODeviceBandwidth *b;
 
                 if (!is_root) {
-                        sprintf(buf, "%lu\n", state == MANAGER_STARTING && c->startup_blockio_weight != (unsigned long) -1 ? c->startup_blockio_weight :
+                        sprintf(buf, "%lu\n", IN_SET(state, MANAGER_STARTING, MANAGER_INITIALIZING) && c->startup_blockio_weight != (unsigned long) -1 ? c->startup_blockio_weight :
                                 c->blockio_weight != (unsigned long) -1 ? c->blockio_weight : 1000);
                         r = cg_set_attribute("blkio", path, "blkio.weight", buf);
                         if (r < 0)
-                                log_warning("Failed to set blkio.weight on %s: %s", path, strerror(-r));
+                                log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set blkio.weight on %s: %s", path, strerror(-r));
 
                         /* FIXME: no way to reset this list */
                         LIST_FOREACH(device_weights, w, c->blockio_device_weights) {
@@ -345,7 +345,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
                                 sprintf(buf, "%u:%u %lu", major(dev), minor(dev), w->weight);
                                 r = cg_set_attribute("blkio", path, "blkio.weight_device", buf);
                                 if (r < 0)
-                                        log_error("Failed to set blkio.weight_device on %s: %s", path, strerror(-r));
+                                        log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set blkio.weight_device on %s: %s", path, strerror(-r));
                         }
                 }
 
@@ -363,7 +363,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
                         sprintf(buf, "%u:%u %" PRIu64 "\n", major(dev), minor(dev), b->bandwidth);
                         r = cg_set_attribute("blkio", path, a, buf);
                         if (r < 0)
-                                log_error("Failed to set %s on %s: %s", a, path, strerror(-r));
+                                log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set %s on %s: %s", a, path, strerror(-r));
                 }
         }
 
@@ -377,7 +377,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
                         r = cg_set_attribute("memory", path, "memory.limit_in_bytes", "-1");
 
                 if (r < 0)
-                        log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
+                        log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
         }
 
         if ((mask & CGROUP_DEVICE) && !is_root) {
@@ -388,7 +388,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
                 else
                         r = cg_set_attribute("devices", path, "devices.allow", "a");
                 if (r < 0)
-                        log_warning("Failed to reset devices.list on %s: %s", path, strerror(-r));
+                        log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, "Failed to reset devices.list on %s: %s", path, strerror(-r));
 
                 if (c->device_policy == CGROUP_CLOSED ||
                     (c->device_policy == CGROUP_AUTO && c->device_allow)) {
@@ -447,7 +447,7 @@ CGroupControllerMask cgroup_context_get_mask(CGroupContext *c) {
         if (c->cpu_accounting ||
             c->cpu_shares != (unsigned long) -1 ||
             c->startup_cpu_shares != (unsigned long) -1 ||
-            c->cpu_quota_per_sec_usec != (usec_t) -1)
+            c->cpu_quota_per_sec_usec != USEC_INFINITY)
                 mask |= CGROUP_CPUACCT | CGROUP_CPU;
 
         if (c->blockio_accounting ||
@@ -832,7 +832,6 @@ pid_t unit_search_main_pid(Unit *u) {
 
 int manager_setup_cgroup(Manager *m) {
         _cleanup_free_ char *path = NULL;
-        char *e;
         int r;
 
         assert(m);
@@ -851,6 +850,8 @@ int manager_setup_cgroup(Manager *m) {
          * off. This is to support live upgrades from older systemd
          * versions where PID 1 was moved there. */
         if (m->running_as == SYSTEMD_SYSTEM) {
+                char *e;
+
                 e = endswith(m->cgroup_root, "/" SPECIAL_SYSTEM_SLICE);
                 if (!e)
                         e = endswith(m->cgroup_root, "/system");
@@ -872,40 +873,42 @@ int manager_setup_cgroup(Manager *m) {
         }
 
         log_debug("Using cgroup controller " SYSTEMD_CGROUP_CONTROLLER ". File system hierarchy is at %s.", path);
+        if (!m->test_run) {
 
-        /* 3. Install agent */
-        if (m->running_as == SYSTEMD_SYSTEM) {
-                r = cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUP_AGENT_PATH);
-                if (r < 0)
-                        log_warning("Failed to install release agent, ignoring: %s", strerror(-r));
-                else if (r > 0)
-                        log_debug("Installed release agent.");
-                else
-                        log_debug("Release agent already installed.");
-        }
+                /* 3. Install agent */
+                if (m->running_as == SYSTEMD_SYSTEM) {
+                        r = cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUP_AGENT_PATH);
+                        if (r < 0)
+                                log_warning("Failed to install release agent, ignoring: %s", strerror(-r));
+                        else if (r > 0)
+                                log_debug("Installed release agent.");
+                        else
+                                log_debug("Release agent already installed.");
+                }
 
-        /* 4. Make sure we are in the root cgroup */
-        r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, 0);
-        if (r < 0) {
-                log_error("Failed to create root cgroup hierarchy: %s", strerror(-r));
-                return r;
-        }
+                /* 4. Make sure we are in the root cgroup */
+                r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, 0);
+                if (r < 0) {
+                        log_error("Failed to create root cgroup hierarchy: %s", strerror(-r));
+                        return r;
+                }
 
-        /* 5. And pin it, so that it cannot be unmounted */
-        safe_close(m->pin_cgroupfs_fd);
+                /* 5. And pin it, so that it cannot be unmounted */
+                safe_close(m->pin_cgroupfs_fd);
 
-        m->pin_cgroupfs_fd = open(path, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY|O_NONBLOCK);
-        if (m->pin_cgroupfs_fd < 0) {
-                log_error("Failed to open pin file: %m");
-                return -errno;
+                m->pin_cgroupfs_fd = open(path, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY|O_NONBLOCK);
+                if (m->pin_cgroupfs_fd < 0) {
+                        log_error("Failed to open pin file: %m");
+                        return -errno;
+                }
+
+                /* 6.  Always enable hierarchial support if it exists... */
+                cg_set_attribute("memory", "/", "memory.use_hierarchy", "1");
         }
 
-        /* 6. Figure out which controllers are supported */
+        /* 7. Figure out which controllers are supported */
         m->cgroup_supported = cg_mask_supported();
 
-        /* 7.  Always enable hierarchial support if it exists... */
-        cg_set_attribute("memory", "/", "memory.use_hierarchy", "1");
-
         return 0;
 }
 
index 410fb36797808757f39bcf71fca52af994a6629f..ec78169fc309355b2cf5ce4677e12e733e07daf1 100644 (file)
@@ -45,13 +45,13 @@ static bool condition_test_security(Condition *c) {
         assert(c->type == CONDITION_SECURITY);
 
         if (streq(c->parameter, "selinux"))
-                return use_selinux() == !c->negate;
+                return mac_selinux_use() == !c->negate;
+        if (streq(c->parameter, "smack"))
+                return mac_smack_use() == !c->negate;
         if (streq(c->parameter, "apparmor"))
-                return use_apparmor() == !c->negate;
+                return mac_apparmor_use() == !c->negate;
         if (streq(c->parameter, "ima"))
                 return use_ima() == !c->negate;
-        if (streq(c->parameter, "smack"))
-                return use_smack() == !c->negate;
 
         return c->negate;
 }
@@ -120,6 +120,20 @@ static bool condition_test_needs_update(Condition *c) {
                 (usr.st_mtim.tv_sec == other.st_mtim.tv_sec && usr.st_mtim.tv_nsec > other.st_mtim.tv_nsec)) == !c->negate;
 }
 
+static bool condition_test_first_boot(Condition *c) {
+        int r;
+
+        assert(c);
+        assert(c->parameter);
+        assert(c->type == CONDITION_FIRST_BOOT);
+
+        r = parse_boolean(c->parameter);
+        if (r < 0)
+                return c->negate;
+
+        return ((access("/run/systemd/first-boot", F_OK) >= 0) == !!r) == !c->negate;
+}
+
 static bool condition_test(Condition *c) {
         assert(c);
 
@@ -202,6 +216,9 @@ static bool condition_test(Condition *c) {
         case CONDITION_NEEDS_UPDATE:
                 return condition_test_needs_update(c);
 
+        case CONDITION_FIRST_BOOT:
+                return condition_test_first_boot(c);
+
         case CONDITION_NULL:
                 return !c->negate;
 
index eb7c2b9d27751e70b37be17927fe22aef388b49d..900566c29b03c808d0f1993da3239d90cbd9819a 100644 (file)
@@ -133,24 +133,6 @@ static int property_get_device_allow(
         return sd_bus_message_close_container(reply);
 }
 
-static int property_get_cpu_quota_per_sec_usec(
-                sd_bus *bus,
-                const char *path,
-                const char *interface,
-                const char *property,
-                sd_bus_message *reply,
-                void *userdata,
-                sd_bus_error *error) {
-
-        CGroupContext *c = userdata;
-
-        assert(bus);
-        assert(reply);
-        assert(c);
-
-        return sd_bus_message_append(reply, "t", c->cpu_quota_per_sec_usec);
-}
-
 static int property_get_ulong_as_u64(
                 sd_bus *bus,
                 const char *path,
@@ -174,7 +156,7 @@ const sd_bus_vtable bus_cgroup_vtable[] = {
         SD_BUS_PROPERTY("CPUAccounting", "b", bus_property_get_bool, offsetof(CGroupContext, cpu_accounting), 0),
         SD_BUS_PROPERTY("CPUShares", "t", property_get_ulong_as_u64, offsetof(CGroupContext, cpu_shares), 0),
         SD_BUS_PROPERTY("StartupCPUShares", "t", property_get_ulong_as_u64, offsetof(CGroupContext, startup_cpu_shares), 0),
-        SD_BUS_PROPERTY("CPUQuotaPerSecUSec", "t", property_get_cpu_quota_per_sec_usec, 0, 0),
+        SD_BUS_PROPERTY("CPUQuotaPerSecUSec", "t", bus_property_get_usec, offsetof(CGroupContext, cpu_quota_per_sec_usec), 0),
         SD_BUS_PROPERTY("BlockIOAccounting", "b", bus_property_get_bool, offsetof(CGroupContext, blockio_accounting), 0),
         SD_BUS_PROPERTY("BlockIOWeight", "t", property_get_ulong_as_u64, offsetof(CGroupContext, blockio_weight), 0),
         SD_BUS_PROPERTY("StartupBlockIOWeight", "t", property_get_ulong_as_u64, offsetof(CGroupContext, startup_blockio_weight), 0),
index ecbadd765b5bdebb45d38057322881c8502021be..9276da4cdc3e2c627ff46b3a661891ec275c30f1 100644 (file)
@@ -300,7 +300,7 @@ static int property_get_timer_slack_nsec(
         assert(reply);
         assert(c);
 
-        if (c->timer_slack_nsec != (nsec_t) -1)
+        if (c->timer_slack_nsec != NSEC_INFINITY)
                 u = (uint64_t) c->timer_slack_nsec;
         else
                 u = (uint64_t) prctl(PR_GET_TIMERSLACK);
index 8e4ffc977d20752387f2c3175e476e45496f0346..09f5739315bb7bc138342bdc2bb16385c20b7aa0 100644 (file)
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, job_type, JobType);
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_state, job_state, JobState);
 
+static int verify_sys_admin_or_owner_sync(sd_bus_message *message, Job *j, sd_bus_error *error) {
+        int r;
+
+        if (sd_bus_track_contains(j->clients, sd_bus_message_get_sender(message)))
+                return 0; /* One of the job owners is calling us */
+
+        r = sd_bus_query_sender_privilege(message, CAP_SYS_ADMIN);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Access denied to perform action");
+
+        /* Root has called us */
+        return 0;
+}
+
 static int property_get_unit(
                 sd_bus *bus,
                 const char *path,
@@ -52,7 +68,7 @@ static int property_get_unit(
         return sd_bus_message_append(reply, "(so)", j->unit->id, p);
 }
 
-static int method_cancel(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+int bus_job_method_cancel(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
         Job *j = userdata;
         int r;
 
@@ -60,7 +76,11 @@ static int method_cancel(sd_bus *bus, sd_bus_message *message, void *userdata, s
         assert(message);
         assert(j);
 
-        r = selinux_unit_access_check(j->unit, message, "stop", error);
+        r = verify_sys_admin_or_owner_sync(message, j, error);
+        if (r < 0)
+                return r;
+
+        r = mac_selinux_unit_access_check(j->unit, message, "stop", error);
         if (r < 0)
                 return r;
 
@@ -71,7 +91,7 @@ static int method_cancel(sd_bus *bus, sd_bus_message *message, void *userdata, s
 
 const sd_bus_vtable bus_job_vtable[] = {
         SD_BUS_VTABLE_START(0),
-        SD_BUS_METHOD("Cancel", NULL, NULL, method_cancel, 0),
+        SD_BUS_METHOD("Cancel", NULL, NULL, bus_job_method_cancel, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_PROPERTY("Id", "u", NULL, offsetof(Job, id), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Unit", "(so)", property_get_unit, 0, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("JobType", "s", property_get_type, offsetof(Job, type), SD_BUS_VTABLE_PROPERTY_CONST),
@@ -132,7 +152,7 @@ void bus_job_send_change_signal(Job *j) {
                 j->in_dbus_queue = false;
         }
 
-        r = bus_foreach_bus(j->manager, j->subscribed, j->sent_dbus_new_signal ? send_changed_signal : send_new_signal, j);
+        r = bus_foreach_bus(j->manager, j->clients, j->sent_dbus_new_signal ? send_changed_signal : send_new_signal, j);
         if (r < 0)
                 log_debug("Failed to send job change signal for %u: %s", j->id, strerror(-r));
 
@@ -176,7 +196,7 @@ void bus_job_send_removed_signal(Job *j) {
         if (!j->sent_dbus_new_signal)
                 bus_job_send_change_signal(j);
 
-        r = bus_foreach_bus(j->manager, j->subscribed, send_removed_signal, j);
+        r = bus_foreach_bus(j->manager, j->clients, send_removed_signal, j);
         if (r < 0)
                 log_debug("Failed to send job remove signal for %u: %s", j->id, strerror(-r));
 }
index d1d0f6ddf0127b8f461e9086c5c59b24c00a0731..6c2fc0789cb0da2abed32c7b1831e04b19987701 100644 (file)
@@ -26,5 +26,7 @@
 
 extern const sd_bus_vtable bus_job_vtable[];
 
+int bus_job_method_cancel(sd_bus *bus, sd_bus_message *message, void *job, sd_bus_error *error);
+
 void bus_job_send_change_signal(Job *j);
 void bus_job_send_removed_signal(Job *j);
index ffef0c7d05813b5c058eba116a3a92953c9df06f..c54abd3b4e820af1ba0bd085c365f6f798558a8d 100644 (file)
@@ -34,6 +34,7 @@
 #include "architecture.h"
 #include "env-util.h"
 #include "dbus.h"
+#include "dbus-job.h"
 #include "dbus-manager.h"
 #include "dbus-unit.h"
 #include "dbus-snapshot.h"
@@ -352,6 +353,8 @@ static int method_get_unit(sd_bus *bus, sd_bus_message *message, void *userdata,
         assert(message);
         assert(m);
 
+        /* Anyone can call this method */
+
         r = sd_bus_message_read(message, "s", &name);
         if (r < 0)
                 return r;
@@ -360,7 +363,7 @@ static int method_get_unit(sd_bus *bus, sd_bus_message *message, void *userdata,
         if (!u)
                 return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT, "Unit %s not loaded.", name);
 
-        r = selinux_unit_access_check(u, message, "status", error);
+        r = mac_selinux_unit_access_check(u, message, "status", error);
         if (r < 0)
                 return r;
 
@@ -384,6 +387,8 @@ static int method_get_unit_by_pid(sd_bus *bus, sd_bus_message *message, void *us
 
         assert_cc(sizeof(pid_t) == sizeof(uint32_t));
 
+        /* Anyone can call this method */
+
         r = sd_bus_message_read(message, "u", &pid);
         if (r < 0)
                 return r;
@@ -404,7 +409,7 @@ static int method_get_unit_by_pid(sd_bus *bus, sd_bus_message *message, void *us
         if (!u)
                 return sd_bus_error_setf(error, BUS_ERROR_NO_UNIT_FOR_PID, "PID %u does not belong to any loaded unit.", pid);
 
-        r = selinux_unit_access_check(u, message, "status", error);
+        r = mac_selinux_unit_access_check(u, message, "status", error);
         if (r < 0)
                 return r;
 
@@ -426,6 +431,8 @@ static int method_load_unit(sd_bus *bus, sd_bus_message *message, void *userdata
         assert(message);
         assert(m);
 
+        /* Anyone can call this method */
+
         r = sd_bus_message_read(message, "s", &name);
         if (r < 0)
                 return r;
@@ -434,7 +441,7 @@ static int method_load_unit(sd_bus *bus, sd_bus_message *message, void *userdata
         if (r < 0)
                 return r;
 
-        r = selinux_unit_access_check(u, message, "status", error);
+        r = mac_selinux_unit_access_check(u, message, "status", error);
         if (r < 0)
                 return r;
 
@@ -454,6 +461,12 @@ static int method_start_unit_generic(sd_bus *bus, sd_bus_message *message, Manag
         assert(message);
         assert(m);
 
+        r = bus_verify_manage_unit_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "s", &name);
         if (r < 0)
                 return r;
@@ -503,6 +516,12 @@ static int method_start_unit_replace(sd_bus *bus, sd_bus_message *message, void
         assert(message);
         assert(m);
 
+        r = bus_verify_manage_unit_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "s", &old_name);
         if (r < 0)
                 return r;
@@ -524,6 +543,13 @@ static int method_kill_unit(sd_bus *bus, sd_bus_message *message, void *userdata
         assert(message);
         assert(m);
 
+        /* Like bus_verify_manage_unit_async(), but uses CAP_SYS_KILL */
+        r = bus_verify_manage_unit_async_for_kill(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "s", &name);
         if (r < 0)
                 return r;
@@ -545,6 +571,12 @@ static int method_reset_failed_unit(sd_bus *bus, sd_bus_message *message, void *
         assert(message);
         assert(m);
 
+        r = bus_verify_manage_unit_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "s", &name);
         if (r < 0)
                 return r;
@@ -566,6 +598,12 @@ static int method_set_unit_properties(sd_bus *bus, sd_bus_message *message, void
         assert(message);
         assert(m);
 
+        r = bus_verify_manage_unit_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "s", &name);
         if (r < 0)
                 return r;
@@ -589,6 +627,12 @@ static int method_start_transient_unit(sd_bus *bus, sd_bus_message *message, voi
         assert(message);
         assert(m);
 
+        r = bus_verify_manage_unit_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "ss", &name, &smode);
         if (r < 0)
                 return r;
@@ -604,7 +648,7 @@ static int method_start_transient_unit(sd_bus *bus, sd_bus_message *message, voi
         if (mode < 0)
                 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Job mode %s is invalid.", smode);
 
-        r = selinux_access_check(message, "start", error);
+        r = mac_selinux_access_check(message, "start", error);
         if (r < 0)
                 return r;
 
@@ -648,6 +692,8 @@ static int method_get_job(sd_bus *bus, sd_bus_message *message, void *userdata,
         assert(message);
         assert(m);
 
+        /* Anyone can call this method */
+
         r = sd_bus_message_read(message, "u", &id);
         if (r < 0)
                 return r;
@@ -656,7 +702,7 @@ static int method_get_job(sd_bus *bus, sd_bus_message *message, void *userdata,
         if (!j)
                 return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_JOB, "Job %u does not exist.", (unsigned) id);
 
-        r = selinux_unit_access_check(j->unit, message, "status", error);
+        r = mac_selinux_unit_access_check(j->unit, message, "status", error);
         if (r < 0)
                 return r;
 
@@ -685,13 +731,7 @@ static int method_cancel_job(sd_bus *bus, sd_bus_message *message, void *userdat
         if (!j)
                 return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_JOB, "Job %u does not exist.", (unsigned) id);
 
-        r = selinux_unit_access_check(j->unit, message, "stop", error);
-        if (r < 0)
-                return r;
-
-        job_finish_and_invalidate(j, JOB_CANCELED, true);
-
-        return sd_bus_reply_method_return(message, NULL);
+        return bus_job_method_cancel(bus, message, j, error);
 }
 
 static int method_clear_jobs(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
@@ -702,7 +742,7 @@ static int method_clear_jobs(sd_bus *bus, sd_bus_message *message, void *userdat
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reboot", error);
+        r = mac_selinux_access_check(message, "reboot", error);
         if (r < 0)
                 return r;
 
@@ -719,7 +759,7 @@ static int method_reset_failed(sd_bus *bus, sd_bus_message *message, void *userd
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reload", error);
+        r = mac_selinux_access_check(message, "reload", error);
         if (r < 0)
                 return r;
 
@@ -740,7 +780,9 @@ static int list_units_filtered(sd_bus *bus, sd_bus_message *message, void *userd
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -826,7 +868,9 @@ static int method_list_jobs(sd_bus *bus, sd_bus_message *message, void *userdata
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -876,7 +920,9 @@ static int method_subscribe(sd_bus *bus, sd_bus_message *message, void *userdata
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -909,7 +955,9 @@ static int method_unsubscribe(sd_bus *bus, sd_bus_message *message, void *userda
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -935,7 +983,9 @@ static int method_dump(sd_bus *bus, sd_bus_message *message, void *userdata, sd_
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -966,7 +1016,7 @@ static int method_create_snapshot(sd_bus *bus, sd_bus_message *message, void *us
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "start", error);
+        r = mac_selinux_access_check(message, "start", error);
         if (r < 0)
                 return r;
 
@@ -998,7 +1048,7 @@ static int method_remove_snapshot(sd_bus *bus, sd_bus_message *message, void *us
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "stop", error);
+        r = mac_selinux_access_check(message, "stop", error);
         if (r < 0)
                 return r;
 
@@ -1024,7 +1074,13 @@ static int method_reload(sd_bus *bus, sd_bus_message *message, void *userdata, s
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reload", error);
+        r = bus_verify_reload_daemon_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
+        r = mac_selinux_access_check(message, "reload", error);
         if (r < 0)
                 return r;
 
@@ -1052,7 +1108,13 @@ static int method_reexecute(sd_bus *bus, sd_bus_message *message, void *userdata
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reload", error);
+        r = bus_verify_reload_daemon_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
+        r = mac_selinux_access_check(message, "reload", error);
         if (r < 0)
                 return r;
 
@@ -1071,7 +1133,7 @@ static int method_exit(sd_bus *bus, sd_bus_message *message, void *userdata, sd_
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "halt", error);
+        r = mac_selinux_access_check(message, "halt", error);
         if (r < 0)
                 return r;
 
@@ -1091,7 +1153,7 @@ static int method_reboot(sd_bus *bus, sd_bus_message *message, void *userdata, s
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reboot", error);
+        r = mac_selinux_access_check(message, "reboot", error);
         if (r < 0)
                 return r;
 
@@ -1112,7 +1174,7 @@ static int method_poweroff(sd_bus *bus, sd_bus_message *message, void *userdata,
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "halt", error);
+        r = mac_selinux_access_check(message, "halt", error);
         if (r < 0)
                 return r;
 
@@ -1132,7 +1194,7 @@ static int method_halt(sd_bus *bus, sd_bus_message *message, void *userdata, sd_
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "halt", error);
+        r = mac_selinux_access_check(message, "halt", error);
         if (r < 0)
                 return r;
 
@@ -1152,7 +1214,7 @@ static int method_kexec(sd_bus *bus, sd_bus_message *message, void *userdata, sd
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reboot", error);
+        r = mac_selinux_access_check(message, "reboot", error);
         if (r < 0)
                 return r;
 
@@ -1174,12 +1236,12 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reboot", error);
+        r = mac_selinux_access_check(message, "reboot", error);
         if (r < 0)
                 return r;
 
         if (m->running_as != SYSTEMD_SYSTEM)
-                return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "KExec is only supported for system managers.");
+                return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "Root switching is only supported by system manager.");
 
         r = sd_bus_message_read(message, "ss", &root, &init);
         if (r < 0)
@@ -1190,7 +1252,7 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
 
         /* Safety check */
         if (isempty(init)) {
-                if (! path_is_os_tree(root))
+                if (!path_is_os_tree(root))
                         return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Specified switch root path %s does not seem to be an OS tree. os-release file is missing.", root);
         } else {
                 _cleanup_free_ char *p = NULL;
@@ -1238,7 +1300,7 @@ static int method_set_environment(sd_bus *bus, sd_bus_message *message, void *us
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reload", error);
+        r = mac_selinux_access_check(message, "reload", error);
         if (r < 0)
                 return r;
 
@@ -1264,7 +1326,7 @@ static int method_unset_environment(sd_bus *bus, sd_bus_message *message, void *
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reload", error);
+        r = mac_selinux_access_check(message, "reload", error);
         if (r < 0)
                 return r;
 
@@ -1291,22 +1353,22 @@ static int method_unset_and_set_environment(sd_bus *bus, sd_bus_message *message
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "reload", error);
+        r = mac_selinux_access_check(message, "reload", error);
         if (r < 0)
                 return r;
 
-        r = sd_bus_message_read_strv(message, &plus);
+        r = sd_bus_message_read_strv(message, &minus);
         if (r < 0)
                 return r;
 
-        r = sd_bus_message_read_strv(message, &minus);
+        r = sd_bus_message_read_strv(message, &plus);
         if (r < 0)
                 return r;
 
-        if (!strv_env_is_valid(plus))
-                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid environment assignments");
         if (!strv_env_name_or_assignment_is_valid(minus))
                 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid environment variable names or assignments");
+        if (!strv_env_is_valid(plus))
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid environment assignments");
 
         r = manager_environment_add(m, minus, plus);
         if (r < 0)
@@ -1327,7 +1389,9 @@ static int method_list_unit_files(sd_bus *bus, sd_bus_message *message, void *us
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -1335,7 +1399,7 @@ static int method_list_unit_files(sd_bus *bus, sd_bus_message *message, void *us
         if (r < 0)
                 return r;
 
-        h = hashmap_new(string_hash_func, string_compare_func);
+        h = hashmap_new(&string_hash_ops);
         if (!h)
                 return -ENOMEM;
 
@@ -1378,7 +1442,9 @@ static int method_get_unit_file_state(sd_bus *bus, sd_bus_message *message, void
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -1405,7 +1471,9 @@ static int method_get_default_target(sd_bus *bus, sd_bus_message *message, void
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "status", error);
+        /* Anyone can call this method */
+
+        r = mac_selinux_access_check(message, "status", error);
         if (r < 0)
                 return r;
 
@@ -1494,9 +1562,6 @@ static int method_enable_unit_files_generic(
                 sd_bus_error *error) {
 
         _cleanup_strv_free_ char **l = NULL;
-#ifdef HAVE_SELINUX
-        char **i;
-#endif
         UnitFileChange *changes = NULL;
         unsigned n_changes = 0;
         UnitFileScope scope;
@@ -1506,6 +1571,12 @@ static int method_enable_unit_files_generic(
         assert(message);
         assert(m);
 
+        r = bus_verify_manage_unit_files_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read_strv(message, &l);
         if (r < 0)
                 return r;
@@ -1514,18 +1585,9 @@ static int method_enable_unit_files_generic(
         if (r < 0)
                 return r;
 
-#ifdef HAVE_SELINUX
-        STRV_FOREACH(i, l) {
-                Unit *u;
-
-                u = manager_get_unit(m, *i);
-                if (u) {
-                        r = selinux_unit_access_check(u, message, verb, error);
-                        if (r < 0)
-                                return r;
-                }
-        }
-#endif
+        r = mac_selinux_unit_access_check_strv(l, message, m, verb, error);
+        if (r < 0)
+                return r;
 
         scope = m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER;
 
@@ -1563,9 +1625,6 @@ static int method_mask_unit_files(sd_bus *bus, sd_bus_message *message, void *us
 static int method_preset_unit_files_with_mode(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
 
         _cleanup_strv_free_ char **l = NULL;
-#ifdef HAVE_SELINUX
-        char **i;
-#endif
         UnitFileChange *changes = NULL;
         unsigned n_changes = 0;
         Manager *m = userdata;
@@ -1578,6 +1637,12 @@ static int method_preset_unit_files_with_mode(sd_bus *bus, sd_bus_message *messa
         assert(message);
         assert(m);
 
+        r = bus_verify_manage_unit_files_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read_strv(message, &l);
         if (r < 0)
                 return r;
@@ -1594,18 +1659,9 @@ static int method_preset_unit_files_with_mode(sd_bus *bus, sd_bus_message *messa
                         return -EINVAL;
         }
 
-#ifdef HAVE_SELINUX
-        STRV_FOREACH(i, l) {
-                Unit *u;
-
-                u = manager_get_unit(m, *i);
-                if (u) {
-                        r = selinux_unit_access_check(u, message, "enable", error);
-                        if (r < 0)
-                                return r;
-                }
-        }
-#endif
+        r = mac_selinux_unit_access_check_strv(l, message, m, "enable", error);
+        if (r < 0)
+                return r;
 
         scope = m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER;
 
@@ -1634,7 +1690,13 @@ static int method_disable_unit_files_generic(
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, verb, error);
+        r = bus_verify_manage_unit_files_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
+        r = mac_selinux_access_check(message, verb, error);
         if (r < 0)
                 return r;
 
@@ -1675,7 +1737,13 @@ static int method_set_default_target(sd_bus *bus, sd_bus_message *message, void
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "enable", error);
+        r = bus_verify_manage_unit_files_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
+        r = mac_selinux_access_check(message, "enable", error);
         if (r < 0)
                 return r;
 
@@ -1705,7 +1773,13 @@ static int method_preset_all_unit_files(sd_bus *bus, sd_bus_message *message, vo
         assert(message);
         assert(m);
 
-        r = selinux_access_check(message, "enable", error);
+        r = bus_verify_manage_unit_files_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
+        r = mac_selinux_access_check(message, "enable", error);
         if (r < 0)
                 return r;
 
@@ -1730,6 +1804,52 @@ static int method_preset_all_unit_files(sd_bus *bus, sd_bus_message *message, vo
         return reply_unit_file_changes_and_free(m, bus, message, -1, changes, n_changes);
 }
 
+static int method_add_dependency_unit_files(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        _cleanup_strv_free_ char **l = NULL;
+        Manager *m = userdata;
+        UnitFileChange *changes = NULL;
+        unsigned n_changes = 0;
+        UnitFileScope scope;
+        int runtime, force, r;
+        char *target;
+        char *type;
+        UnitDependency dep;
+
+        assert(bus);
+        assert(message);
+        assert(m);
+
+        r = bus_verify_manage_unit_files_async(m, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
+        r = sd_bus_message_read_strv(message, &l);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_read(message, "ssbb", &target, &type, &runtime, &force);
+        if (r < 0)
+                return r;
+
+        dep = unit_dependency_from_string(type);
+        if (dep < 0)
+                return -EINVAL;
+
+        r = mac_selinux_unit_access_check_strv(l, message, m, "enable", error);
+        if (r < 0)
+                return r;
+
+        scope = m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER;
+
+        r = unit_file_add_dependency(scope, runtime, NULL, l, target, dep, force, &changes, &n_changes);
+        if (r < 0)
+                return r;
+
+        return reply_unit_file_changes_and_free(m, bus, message, -1, changes, n_changes);
+}
+
 const sd_bus_vtable bus_manager_vtable[] = {
         SD_BUS_VTABLE_START(0),
 
@@ -1772,20 +1892,20 @@ const sd_bus_vtable bus_manager_vtable[] = {
         SD_BUS_METHOD("GetUnit", "s", "o", method_get_unit, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("GetUnitByPID", "u", "o", method_get_unit_by_pid, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("LoadUnit", "s", "o", method_load_unit, SD_BUS_VTABLE_UNPRIVILEGED),
-        SD_BUS_METHOD("StartUnit", "ss", "o", method_start_unit, 0),
-        SD_BUS_METHOD("StartUnitReplace", "sss", "o", method_start_unit_replace, 0),
-        SD_BUS_METHOD("StopUnit", "ss", "o", method_stop_unit, 0),
-        SD_BUS_METHOD("ReloadUnit", "ss", "o", method_reload_unit, 0),
-        SD_BUS_METHOD("RestartUnit", "ss", "o", method_restart_unit, 0),
-        SD_BUS_METHOD("TryRestartUnit", "ss", "o", method_try_restart_unit, 0),
-        SD_BUS_METHOD("ReloadOrRestartUnit", "ss", "o", method_reload_or_restart_unit, 0),
-        SD_BUS_METHOD("ReloadOrTryRestartUnit", "ss", "o", method_reload_or_try_restart_unit, 0),
-        SD_BUS_METHOD("KillUnit", "ssi", NULL, method_kill_unit, SD_BUS_VTABLE_CAPABILITY(CAP_KILL)),
-        SD_BUS_METHOD("ResetFailedUnit", "s", NULL, method_reset_failed_unit, 0),
-        SD_BUS_METHOD("SetUnitProperties", "sba(sv)", NULL, method_set_unit_properties, 0),
-        SD_BUS_METHOD("StartTransientUnit", "ssa(sv)a(sa(sv))", "o", method_start_transient_unit, 0),
+        SD_BUS_METHOD("StartUnit", "ss", "o", method_start_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("StartUnitReplace", "sss", "o", method_start_unit_replace, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("StopUnit", "ss", "o", method_stop_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("ReloadUnit", "ss", "o", method_reload_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("RestartUnit", "ss", "o", method_restart_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("TryRestartUnit", "ss", "o", method_try_restart_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("ReloadOrRestartUnit", "ss", "o", method_reload_or_restart_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("ReloadOrTryRestartUnit", "ss", "o", method_reload_or_try_restart_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("KillUnit", "ssi", NULL, method_kill_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("ResetFailedUnit", "s", NULL, method_reset_failed_unit, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("SetUnitProperties", "sba(sv)", NULL, method_set_unit_properties, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("StartTransientUnit", "ssa(sv)a(sa(sv))", "o", method_start_transient_unit, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("GetJob", "u", "o", method_get_job, SD_BUS_VTABLE_UNPRIVILEGED),
-        SD_BUS_METHOD("CancelJob", "u", NULL, method_cancel_job, 0),
+        SD_BUS_METHOD("CancelJob", "u", NULL, method_cancel_job, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("ClearJobs", NULL, NULL, method_clear_jobs, 0),
         SD_BUS_METHOD("ResetFailed", NULL, NULL, method_reset_failed, 0),
         SD_BUS_METHOD("ListUnits", NULL, "a(ssssssouso)", method_list_units, SD_BUS_VTABLE_UNPRIVILEGED),
@@ -1796,8 +1916,8 @@ const sd_bus_vtable bus_manager_vtable[] = {
         SD_BUS_METHOD("Dump", NULL, "s", method_dump, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CreateSnapshot", "sb", "o", method_create_snapshot, 0),
         SD_BUS_METHOD("RemoveSnapshot", "s", NULL, method_remove_snapshot, 0),
-        SD_BUS_METHOD("Reload", NULL, NULL, method_reload, 0),
-        SD_BUS_METHOD("Reexecute", NULL, NULL, method_reexecute, 0),
+        SD_BUS_METHOD("Reload", NULL, NULL, method_reload, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("Reexecute", NULL, NULL, method_reexecute, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("Exit", NULL, NULL, method_exit, 0),
         SD_BUS_METHOD("Reboot", NULL, NULL, method_reboot, SD_BUS_VTABLE_CAPABILITY(CAP_SYS_BOOT)),
         SD_BUS_METHOD("PowerOff", NULL, NULL, method_poweroff, SD_BUS_VTABLE_CAPABILITY(CAP_SYS_BOOT)),
@@ -1809,17 +1929,18 @@ const sd_bus_vtable bus_manager_vtable[] = {
         SD_BUS_METHOD("UnsetAndSetEnvironment", "asas", NULL, method_unset_and_set_environment, 0),
         SD_BUS_METHOD("ListUnitFiles", NULL, "a(ss)", method_list_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("GetUnitFileState", "s", "s", method_get_unit_file_state, SD_BUS_VTABLE_UNPRIVILEGED),
-        SD_BUS_METHOD("EnableUnitFiles", "asbb", "ba(sss)", method_enable_unit_files, 0),
-        SD_BUS_METHOD("DisableUnitFiles", "asb", "a(sss)", method_disable_unit_files, 0),
-        SD_BUS_METHOD("ReenableUnitFiles", "asbb", "ba(sss)", method_reenable_unit_files, 0),
-        SD_BUS_METHOD("LinkUnitFiles", "asbb", "a(sss)", method_link_unit_files, 0),
-        SD_BUS_METHOD("PresetUnitFiles", "asbb", "ba(sss)", method_preset_unit_files, 0),
-        SD_BUS_METHOD("PresetUnitFilesWithMode", "assbb", "ba(sss)", method_preset_unit_files_with_mode, 0),
-        SD_BUS_METHOD("MaskUnitFiles", "asbb", "a(sss)", method_mask_unit_files, 0),
-        SD_BUS_METHOD("UnmaskUnitFiles", "asb", "a(sss)", method_unmask_unit_files, 0),
-        SD_BUS_METHOD("SetDefaultTarget", "sb", "a(sss)", method_set_default_target, 0),
+        SD_BUS_METHOD("EnableUnitFiles", "asbb", "ba(sss)", method_enable_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("DisableUnitFiles", "asb", "a(sss)", method_disable_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("ReenableUnitFiles", "asbb", "ba(sss)", method_reenable_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("LinkUnitFiles", "asbb", "a(sss)", method_link_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("PresetUnitFiles", "asbb", "ba(sss)", method_preset_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("PresetUnitFilesWithMode", "assbb", "ba(sss)", method_preset_unit_files_with_mode, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("MaskUnitFiles", "asbb", "a(sss)", method_mask_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("UnmaskUnitFiles", "asb", "a(sss)", method_unmask_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("SetDefaultTarget", "sb", "a(sss)", method_set_default_target, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("GetDefaultTarget", NULL, "s", method_get_default_target, SD_BUS_VTABLE_UNPRIVILEGED),
-        SD_BUS_METHOD("PresetAllUnitFiles", "sbb", "a(sss)", method_preset_all_unit_files, 0),
+        SD_BUS_METHOD("PresetAllUnitFiles", "sbb", "a(sss)", method_preset_all_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("AddDependencyUnitFiles", "asssbb", "a(sss)", method_add_dependency_unit_files, SD_BUS_VTABLE_UNPRIVILEGED),
 
         SD_BUS_SIGNAL("UnitNew", "so", 0),
         SD_BUS_SIGNAL("UnitRemoved", "so", 0),
index fbb4ff5646cdc31174836d140d1f1f29cea8f57e..a762223c81d73c4d145cdc974c5280d06ed293ac 100644 (file)
@@ -25,6 +25,7 @@
 #include "dbus-cgroup.h"
 #include "dbus-kill.h"
 #include "dbus-scope.h"
+#include "dbus.h"
 #include "bus-util.h"
 #include "bus-internal.h"
 #include "bus-errors.h"
@@ -37,6 +38,12 @@ static int bus_scope_abandon(sd_bus *bus, sd_bus_message *message, void *userdat
         assert(message);
         assert(s);
 
+        r = bus_verify_manage_unit_async(UNIT(s)->manager, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = scope_abandon(s);
         if (sd_bus_error_is_set(error))
                 return r;
index 093289fdf676bd061344daaeea11f3065fb0f446..5a881e8249c63ca8589d9523880ff067e372951b 100644 (file)
@@ -60,6 +60,7 @@ const sd_bus_vtable bus_service_vtable[] = {
         SD_BUS_PROPERTY("ControlPID", "u", bus_property_get_pid, offsetof(Service, control_pid), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("BusName", "s", NULL, offsetof(Service, bus_name), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("StatusText", "s", NULL, offsetof(Service, status_text), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+        SD_BUS_PROPERTY("StatusErrno", "i", NULL, offsetof(Service, status_errno), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Service, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         BUS_EXEC_STATUS_VTABLE("ExecMain", offsetof(Service, main_exec_status), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         BUS_EXEC_COMMAND_LIST_VTABLE("ExecStartPre", offsetof(Service, exec_command[SERVICE_EXEC_START_PRE]), SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION),
index 2a5ef448ced3955c569160b241f58bb7cd82f9f7..06a58e429ec4ae11398f7131453af121308bd569 100644 (file)
@@ -33,7 +33,7 @@ int bus_snapshot_method_remove(sd_bus *bus, sd_bus_message *message, void *userd
         assert(message);
         assert(s);
 
-        r = selinux_unit_access_check(UNIT(s), message, "stop", error);
+        r = mac_selinux_unit_access_check(UNIT(s), message, "stop", error);
         if (r < 0)
                 return r;
 
index ad135a1ac20a892e4d425a8b4c020aa03713a616..50b16744274febfac1328a97d8e5f57f555bd2b9 100644 (file)
@@ -97,6 +97,11 @@ const sd_bus_vtable bus_socket_vtable[] = {
         SD_BUS_PROPERTY("DirectoryMode", "u", bus_property_get_mode, offsetof(Socket, directory_mode), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Accept", "b", bus_property_get_bool, offsetof(Socket, accept), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("KeepAlive", "b", bus_property_get_bool, offsetof(Socket, keep_alive), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("KeepAliveTimeUSec", "t", bus_property_get_usec, offsetof(Socket, keep_alive_time), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("KeepAliveIntervalUSec", "t", bus_property_get_usec, offsetof(Socket, keep_alive_interval), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("KeepAliveProbes", "u", bus_property_get_unsigned, offsetof(Socket, keep_alive_cnt), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("DeferAcceptUSec" , "t", bus_property_get_usec, offsetof(Socket, defer_accept), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("NoDelay", "b", bus_property_get_bool, offsetof(Socket, no_delay), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Priority", "i", bus_property_get_int, offsetof(Socket, priority), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("ReceiveBuffer", "t", bus_property_get_size, offsetof(Socket, receive_buffer), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("SendBuffer", "t", bus_property_get_size, offsetof(Socket, send_buffer), SD_BUS_VTABLE_PROPERTY_CONST),
index 93eae53c29ef0c268aaba50951fad3d60968158a..1e7f66d0537c12d7490b03d03414fc4dd537252f 100644 (file)
@@ -55,12 +55,35 @@ static int property_get_priority(
         return sd_bus_message_append(reply, "i", p);
 }
 
+static int property_get_options(
+                sd_bus *bus,
+                const char *path,
+                const char *interface,
+                const char *property,
+                sd_bus_message *reply,
+                void *userdata,
+                sd_bus_error *error) {
+
+        Swap *s = SWAP(userdata);
+        const char *options = NULL;
+
+        assert(bus);
+        assert(reply);
+        assert(s);
+
+        if (s->from_fragment)
+                options = s->parameters_fragment.options;
+
+        return sd_bus_message_append(reply, "s", options);
+}
+
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, swap_result, SwapResult);
 
 const sd_bus_vtable bus_swap_vtable[] = {
         SD_BUS_VTABLE_START(0),
         SD_BUS_PROPERTY("What", "s", NULL, offsetof(Swap, what), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Priority", "i", property_get_priority, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+        SD_BUS_PROPERTY("Options", "s", property_get_options, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("TimeoutUSec", "t", bus_property_get_usec, offsetof(Swap, timeout_usec), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("ControlPID", "u", bus_property_get_pid, offsetof(Swap, control_pid), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Swap, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
index 8f23fe76ce6a807a0844f4517ad8f6fcfa12fe6b..9b13c6ed1be6055fbafb8a69968511956c3d6d53 100644 (file)
@@ -33,6 +33,7 @@
 
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_load_state, unit_load_state, UnitLoadState);
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_job_mode, job_mode, JobMode);
+static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_failure_action, failure_action, FailureAction);
 
 static int property_get_names(
                 sd_bus *bus,
@@ -421,6 +422,12 @@ int bus_unit_method_kill(sd_bus *bus, sd_bus_message *message, void *userdata, s
         assert(message);
         assert(u);
 
+        r = bus_verify_manage_unit_async_for_kill(u->manager, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "si", &swho, &signo);
         if (r < 0)
                 return r;
@@ -436,7 +443,7 @@ int bus_unit_method_kill(sd_bus *bus, sd_bus_message *message, void *userdata, s
         if (signo <= 0 || signo >= _NSIG)
                 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Signal number out of range.");
 
-        r = selinux_unit_access_check(u, message, "stop", error);
+        r = mac_selinux_unit_access_check(u, message, "stop", error);
         if (r < 0)
                 return r;
 
@@ -455,7 +462,13 @@ int bus_unit_method_reset_failed(sd_bus *bus, sd_bus_message *message, void *use
         assert(message);
         assert(u);
 
-        r = selinux_unit_access_check(u, message, "reload", error);
+        r = bus_verify_manage_unit_async(u->manager, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
+        r = mac_selinux_unit_access_check(u, message, "reload", error);
         if (r < 0)
                 return r;
 
@@ -472,11 +485,17 @@ int bus_unit_method_set_properties(sd_bus *bus, sd_bus_message *message, void *u
         assert(message);
         assert(u);
 
+        r = bus_verify_manage_unit_async(u->manager, message, error);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
         r = sd_bus_message_read(message, "b", &runtime);
         if (r < 0)
                 return r;
 
-        r = selinux_unit_access_check(u, message, "start", error);
+        r = mac_selinux_unit_access_check(u, message, "start", error);
         if (r < 0)
                 return r;
 
@@ -544,6 +563,8 @@ const sd_bus_vtable bus_unit_vtable[] = {
         SD_BUS_PROPERTY("IgnoreOnSnapshot", "b", bus_property_get_bool, offsetof(Unit, ignore_on_snapshot), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("NeedDaemonReload", "b", property_get_need_daemon_reload, 0, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("JobTimeoutUSec", "t", bus_property_get_usec, offsetof(Unit, job_timeout), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("JobTimeoutAction", "s", property_get_failure_action, offsetof(Unit, job_timeout_action), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("JobTimeoutRebootArgument", "s", NULL, offsetof(Unit, job_timeout_reboot_arg), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("ConditionResult", "b", bus_property_get_bool, offsetof(Unit, condition_result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         BUS_PROPERTY_DUAL_TIMESTAMP("ConditionTimestamp", offsetof(Unit, condition_timestamp), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Conditions", "a(sbbsi)", property_get_conditions, 0, 0),
@@ -736,7 +757,7 @@ int bus_unit_queue_job(
                         type = JOB_RELOAD;
         }
 
-        r = selinux_unit_access_check(
+        r = mac_selinux_unit_access_check(
                         u, message,
                         (type == JOB_START || type == JOB_RESTART || type == JOB_TRY_RESTART) ? "start" :
                         type == JOB_STOP ? "stop" : "reload", error);
@@ -758,13 +779,13 @@ int bus_unit_queue_job(
                 return r;
 
         if (bus == u->manager->api_bus) {
-                if (!j->subscribed) {
-                        r = sd_bus_track_new(bus, &j->subscribed, NULL, NULL);
+                if (!j->clients) {
+                        r = sd_bus_track_new(bus, &j->clients, NULL, NULL);
                         if (r < 0)
                                 return r;
                 }
 
-                r = sd_bus_track_add_sender(j->subscribed, message);
+                r = sd_bus_track_add_sender(j->clients, message);
                 if (r < 0)
                         return r;
         }
index fb8e4963e1c004d1c3f1456bee0eef4bd1b4a5c1..185057b624e31d1ac2fea781fc145a6d3ae0806f 100644 (file)
@@ -211,7 +211,7 @@ failed:
 }
 
 #ifdef HAVE_SELINUX
-static int selinux_filter(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int mac_selinux_filter(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
         Manager *m = userdata;
         const char *verb, *path;
         Unit *u = NULL;
@@ -239,7 +239,7 @@ static int selinux_filter(sd_bus *bus, sd_bus_message *message, void *userdata,
 
         if (object_path_startswith("/org/freedesktop/systemd1", path)) {
 
-                r = selinux_access_check(message, verb, error);
+                r = mac_selinux_access_check(message, verb, error);
                 if (r < 0)
                         return r;
 
@@ -270,7 +270,7 @@ static int selinux_filter(sd_bus *bus, sd_bus_message *message, void *userdata,
         if (!u)
                 return 0;
 
-        r = selinux_unit_access_check(u, message, verb, error);
+        r = mac_selinux_unit_access_check(u, message, verb, error);
         if (r < 0)
                 return r;
 
@@ -536,7 +536,7 @@ static int bus_setup_api_vtables(Manager *m, sd_bus *bus) {
         assert(bus);
 
 #ifdef HAVE_SELINUX
-        r = sd_bus_add_filter(bus, NULL, selinux_filter, m);
+        r = sd_bus_add_filter(bus, NULL, mac_selinux_filter, m);
         if (r < 0) {
                 log_error("Failed to add SELinux access filter: %s", strerror(-r));
                 return r;
@@ -659,7 +659,7 @@ static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void
                 return 0;
         }
 
-        r = set_ensure_allocated(&m->private_buses, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&m->private_buses, NULL);
         if (r < 0) {
                 log_oom();
                 return 0;
@@ -1048,8 +1048,8 @@ static void destroy_bus(Manager *m, sd_bus **bus) {
                 m->subscribed = sd_bus_track_unref(m->subscribed);
 
         HASHMAP_FOREACH(j, m->jobs, i)
-                if (j->subscribed && sd_bus_track_get_bus(j->subscribed) == *bus)
-                        j->subscribed = sd_bus_track_unref(j->subscribed);
+                if (j->clients && sd_bus_track_get_bus(j->clients) == *bus)
+                        j->clients = sd_bus_track_unref(j->clients);
 
         /* Get rid of queued message on this bus */
         if (m->queued_message_bus == *bus) {
@@ -1092,6 +1092,8 @@ void bus_done(Manager *m) {
                 m->private_listen_event_source = sd_event_source_unref(m->private_listen_event_source);
 
         m->private_listen_fd = safe_close(m->private_listen_fd);
+
+        bus_verify_polkit_async_registry_free(m->polkit_registry);
 }
 
 int bus_fdset_add_all(Manager *m, FDSet *fds) {
@@ -1215,3 +1217,20 @@ int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l) {
 
         return r;
 }
+
+int bus_verify_manage_unit_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+        return bus_verify_polkit_async(call, CAP_SYS_ADMIN, "org.freedesktop.systemd1.manage-units", false, &m->polkit_registry, error);
+}
+
+/* Same as bus_verify_manage_unit_async(), but checks for CAP_KILL instead of CAP_SYS_ADMIN */
+int bus_verify_manage_unit_async_for_kill(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+        return bus_verify_polkit_async(call, CAP_KILL, "org.freedesktop.systemd1.manage-units", false, &m->polkit_registry, error);
+}
+
+int bus_verify_manage_unit_files_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+        return bus_verify_polkit_async(call, CAP_SYS_ADMIN, "org.freedesktop.systemd1.manage-unit-files", false, &m->polkit_registry, error);
+}
+
+int bus_verify_reload_daemon_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+        return bus_verify_polkit_async(call, CAP_SYS_ADMIN, "org.freedesktop.systemd1.reload-daemon", false, &m->polkit_registry, error);
+}
index bfb236ec8e7da68b79259b92b56a68c63d276c34..d04f5326c64b60e10c2269e13e6a35d2abf2c5e1 100644 (file)
@@ -35,3 +35,8 @@ int bus_track_deserialize_item(char ***l, const char *line);
 int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l);
 
 int bus_foreach_bus(Manager *m, sd_bus_track *subscribed2, int (*send_message)(sd_bus *bus, void *userdata), void *userdata);
+
+int bus_verify_manage_unit_async(Manager *m, sd_bus_message *call, sd_bus_error *error);
+int bus_verify_manage_unit_async_for_kill(Manager *m, sd_bus_message *call, sd_bus_error *error);
+int bus_verify_manage_unit_files_async(Manager *m, sd_bus_message *call, sd_bus_error *error);
+int bus_verify_reload_daemon_async(Manager *m, sd_bus_message *call, sd_bus_error *error);
index 444286e02b2a7bfc14bd3a5b3c6bab6f10f1955b..11c426108151f9a81b132d9cea76c29ccb7b4d97 100644 (file)
@@ -220,25 +220,24 @@ static int device_make_description(Unit *u, struct udev_device *dev, const char
 
 static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
         const char *wants;
-        char *state, *w;
+        const char *word, *state;
         size_t l;
         int r;
+        const char *property;
 
         assert(u);
         assert(dev);
 
-        wants = udev_device_get_property_value(
-                        dev,
-                        u->manager->running_as == SYSTEMD_USER ? "SYSTEMD_USER_WANTS" : "SYSTEMD_WANTS");
-
+        property = u->manager->running_as == SYSTEMD_USER ? "SYSTEMD_USER_WANTS" : "SYSTEMD_WANTS";
+        wants = udev_device_get_property_value(dev, property);
         if (!wants)
                 return 0;
 
-        FOREACH_WORD_QUOTED(w, l, wants, state) {
+        FOREACH_WORD_QUOTED(word, l, wants, state) {
                 _cleanup_free_ char *n = NULL;
                 char e[l+1];
 
-                memcpy(e, w, l);
+                memcpy(e, word, l);
                 e[l] = 0;
 
                 n = unit_name_mangle(e, MANGLE_NOGLOB);
@@ -249,6 +248,9 @@ static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
                 if (r < 0)
                         return r;
         }
+        if (!isempty(state))
+                log_warning_unit(u->id, "Property %s on %s has trailing garbage, ignoring.",
+                                 property, strna(udev_device_get_syspath(dev)));
 
         return 0;
 }
@@ -302,7 +304,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
                         goto fail;
                 }
 
-                r = hashmap_ensure_allocated(&m->devices_by_sysfs, string_hash_func, string_compare_func);
+                r = hashmap_ensure_allocated(&m->devices_by_sysfs, &string_hash_ops);
                 if (r < 0)
                         goto fail;
 
@@ -393,13 +395,13 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
          * aliases */
         alias = udev_device_get_property_value(dev, "SYSTEMD_ALIAS");
         if (alias) {
-                char *state, *w;
+                const char *word, *state;
                 size_t l;
 
-                FOREACH_WORD_QUOTED(w, l, alias, state) {
+                FOREACH_WORD_QUOTED(word, l, alias, state) {
                         char e[l+1];
 
-                        memcpy(e, w, l);
+                        memcpy(e, word, l);
                         e[l] = 0;
 
                         if (path_is_absolute(e))
@@ -407,6 +409,8 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
                         else
                                 log_warning("SYSTEMD_ALIAS for %s is not an absolute path, ignoring: %s", sysfs, e);
                 }
+                if (!isempty(state))
+                        log_warning("SYSTEMD_ALIAS for %s has trailing garbage, ignoring.", sysfs);
         }
 
         return 0;
@@ -513,7 +517,7 @@ static int device_following_set(Unit *u, Set **_set) {
                 return 0;
         }
 
-        set = set_new(NULL, NULL);
+        set = set_new(NULL);
         if (!set)
                 return -ENOMEM;
 
index 88d094e8cc49e4efef22c3113d0b60298c1eee6f..c41aec222de06e3e4eacbbe6aa96aebc8616b309 100644 (file)
@@ -83,6 +83,8 @@
 #include "af-list.h"
 #include "mkdir.h"
 #include "apparmor-util.h"
+#include "bus-kernel.h"
+#include "label.h"
 
 #ifdef HAVE_SECCOMP
 #include "seccomp-util.h"
@@ -333,7 +335,7 @@ static int setup_input(const ExecContext *context, int socket_fd, bool apply_tty
                                       i == EXEC_INPUT_TTY_FAIL,
                                       i == EXEC_INPUT_TTY_FORCE,
                                       false,
-                                      (usec_t) -1);
+                                      USEC_INFINITY);
                 if (fd < 0)
                         return fd;
 
@@ -571,7 +573,7 @@ static int ask_for_confirmation(char *response, char **argv) {
         if (!line)
                 return -ENOMEM;
 
-        r = ask(response, "yns", "Execute %s? [Yes, No, Skip] ", line);
+        r = ask_char(response, "yns", "Execute %s? [Yes, No, Skip] ", line);
 
         restore_confirm_stdio(&saved_stdin, &saved_stdout);
 
@@ -938,7 +940,7 @@ static void rename_process_from_path(const char *path) {
 
 #ifdef HAVE_SECCOMP
 
-static int apply_seccomp(ExecContext *c) {
+static int apply_seccomp(const ExecContext *c) {
         uint32_t negative_action, action;
         scmp_filter_ctx *seccomp;
         Iterator i;
@@ -987,7 +989,7 @@ finish:
         return r;
 }
 
-static int apply_address_families(ExecContext *c) {
+static int apply_address_families(const ExecContext *c) {
         scmp_filter_ctx *seccomp;
         Iterator i;
         int r;
@@ -1138,7 +1140,7 @@ static void do_idle_pipe_dance(int idle_pipe[4]) {
 }
 
 static int build_environment(
-                ExecContext *c,
+                const ExecContext *c,
                 unsigned n_fds,
                 usec_t watchdog_usec,
                 const char *home,
@@ -1223,572 +1225,605 @@ static int build_environment(
         return 0;
 }
 
-int exec_spawn(ExecCommand *command,
-               char **argv,
-               ExecContext *context,
-               int fds[], unsigned n_fds,
-               char **environment,
-               bool apply_permissions,
-               bool apply_chroot,
-               bool apply_tty_stdin,
-               bool confirm_spawn,
-               CGroupControllerMask cgroup_supported,
-               const char *cgroup_path,
-               const char *runtime_prefix,
-               const char *unit_id,
-               usec_t watchdog_usec,
-               int idle_pipe[4],
-               ExecRuntime *runtime,
-               pid_t *ret) {
-
-        _cleanup_strv_free_ char **files_env = NULL;
-        int socket_fd;
-        char *line;
-        pid_t pid;
-        int r;
+static int exec_child(ExecCommand *command,
+                      const ExecContext *context,
+                      const ExecParameters *params,
+                      ExecRuntime *runtime,
+                      char **argv,
+                      int socket_fd,
+                      int *fds, unsigned n_fds,
+                      char **files_env,
+                      int *error) {
+
+        _cleanup_strv_free_ char **our_env = NULL, **pam_env = NULL, **final_env = NULL, **final_argv = NULL;
+        const char *username = NULL, *home = NULL, *shell = NULL;
+        unsigned n_dont_close = 0;
+        int dont_close[n_fds + 4];
+        uid_t uid = (uid_t) -1;
+        gid_t gid = (gid_t) -1;
+        int i, err;
 
         assert(command);
         assert(context);
-        assert(ret);
-        assert(fds || n_fds <= 0);
+        assert(params);
+        assert(error);
 
-        if (context->std_input == EXEC_INPUT_SOCKET ||
-            context->std_output == EXEC_OUTPUT_SOCKET ||
-            context->std_error == EXEC_OUTPUT_SOCKET) {
+        rename_process_from_path(command->path);
 
-                if (n_fds != 1)
-                        return -EINVAL;
+        /* We reset exactly these signals, since they are the
+         * only ones we set to SIG_IGN in the main daemon. All
+         * others we leave untouched because we set them to
+         * SIG_DFL or a valid handler initially, both of which
+         * will be demoted to SIG_DFL. */
+        default_signals(SIGNALS_CRASH_HANDLER,
+                        SIGNALS_IGNORE, -1);
 
-                socket_fd = fds[0];
+        if (context->ignore_sigpipe)
+                ignore_signals(SIGPIPE, -1);
 
-                fds = NULL;
-                n_fds = 0;
-        } else
-                socket_fd = -1;
-
-        r = exec_context_load_environment(context, &files_env);
-        if (r < 0) {
-                log_struct_unit(LOG_ERR,
-                           unit_id,
-                           "MESSAGE=Failed to load environment files: %s", strerror(-r),
-                           "ERRNO=%d", -r,
-                           NULL);
-                return r;
+        err = reset_signal_mask();
+        if (err < 0) {
+                *error = EXIT_SIGNAL_MASK;
+                return err;
         }
 
-        if (!argv)
-                argv = command->argv;
+        if (params->idle_pipe)
+                do_idle_pipe_dance(params->idle_pipe);
 
-        line = exec_command_line(argv);
-        if (!line)
-                return log_oom();
+        /* Close sockets very early to make sure we don't
+         * block init reexecution because it cannot bind its
+         * sockets */
+        log_forget_fds();
 
-        log_struct_unit(LOG_DEBUG,
-                        unit_id,
-                        "EXECUTABLE=%s", command->path,
-                        "MESSAGE=About to execute: %s", line,
-                        NULL);
-        free(line);
+        if (socket_fd >= 0)
+                dont_close[n_dont_close++] = socket_fd;
+        if (n_fds > 0) {
+                memcpy(dont_close + n_dont_close, fds, sizeof(int) * n_fds);
+                n_dont_close += n_fds;
+        }
+        if (params->bus_endpoint_fd >= 0)
+                dont_close[n_dont_close++] = params->bus_endpoint_fd;
+        if (runtime) {
+                if (runtime->netns_storage_socket[0] >= 0)
+                        dont_close[n_dont_close++] = runtime->netns_storage_socket[0];
+                if (runtime->netns_storage_socket[1] >= 0)
+                        dont_close[n_dont_close++] = runtime->netns_storage_socket[1];
+        }
 
-        pid = fork();
-        if (pid < 0)
-                return -errno;
+        err = close_all_fds(dont_close, n_dont_close);
+        if (err < 0) {
+                *error = EXIT_FDS;
+                return err;
+        }
 
-        if (pid == 0) {
-                _cleanup_strv_free_ char **our_env = NULL, **pam_env = NULL, **final_env = NULL, **final_argv = NULL;
-                const char *username = NULL, *home = NULL, *shell = NULL;
-                unsigned n_dont_close = 0;
-                int dont_close[n_fds + 3];
-                uid_t uid = (uid_t) -1;
-                gid_t gid = (gid_t) -1;
-                sigset_t ss;
-                int i, err;
-
-                /* child */
-
-                rename_process_from_path(command->path);
-
-                /* We reset exactly these signals, since they are the
-                 * only ones we set to SIG_IGN in the main daemon. All
-                 * others we leave untouched because we set them to
-                 * SIG_DFL or a valid handler initially, both of which
-                 * will be demoted to SIG_DFL. */
-                default_signals(SIGNALS_CRASH_HANDLER,
-                                SIGNALS_IGNORE, -1);
-
-                if (context->ignore_sigpipe)
-                        ignore_signals(SIGPIPE, -1);
-
-                assert_se(sigemptyset(&ss) == 0);
-                if (sigprocmask(SIG_SETMASK, &ss, NULL) < 0) {
-                        err = -errno;
-                        r = EXIT_SIGNAL_MASK;
-                        goto fail_child;
+        if (!context->same_pgrp)
+                if (setsid() < 0) {
+                        *error = EXIT_SETSID;
+                        return -errno;
                 }
 
-                if (idle_pipe)
-                        do_idle_pipe_dance(idle_pipe);
+        exec_context_tty_reset(context);
+
+        if (params->confirm_spawn) {
+                char response;
+
+                err = ask_for_confirmation(&response, argv);
+                if (err == -ETIMEDOUT)
+                        write_confirm_message("Confirmation question timed out, assuming positive response.\n");
+                else if (err < 0)
+                        write_confirm_message("Couldn't ask confirmation question, assuming positive response: %s\n", strerror(-err));
+                else if (response == 's') {
+                        write_confirm_message("Skipping execution.\n");
+                        *error = EXIT_CONFIRM;
+                        return -ECANCELED;
+                } else if (response == 'n') {
+                        write_confirm_message("Failing execution.\n");
+                        *error = 0;
+                        return 0;
+                }
+        }
 
-                /* Close sockets very early to make sure we don't
-                 * block init reexecution because it cannot bind its
-                 * sockets */
-                log_forget_fds();
+        /* If a socket is connected to STDIN/STDOUT/STDERR, we
+         * must sure to drop O_NONBLOCK */
+        if (socket_fd >= 0)
+                fd_nonblock(socket_fd, false);
 
-                if (socket_fd >= 0)
-                        dont_close[n_dont_close++] = socket_fd;
-                if (n_fds > 0) {
-                        memcpy(dont_close + n_dont_close, fds, sizeof(int) * n_fds);
-                        n_dont_close += n_fds;
-                }
-                if (runtime) {
-                        if (runtime->netns_storage_socket[0] >= 0)
-                                dont_close[n_dont_close++] = runtime->netns_storage_socket[0];
-                        if (runtime->netns_storage_socket[1] >= 0)
-                                dont_close[n_dont_close++] = runtime->netns_storage_socket[1];
-                }
+        err = setup_input(context, socket_fd, params->apply_tty_stdin);
+        if (err < 0) {
+                *error = EXIT_STDIN;
+                return err;
+        }
+
+        err = setup_output(context, STDOUT_FILENO, socket_fd, basename(command->path), params->unit_id, params->apply_tty_stdin);
+        if (err < 0) {
+                *error = EXIT_STDOUT;
+                return err;
+        }
 
-                err = close_all_fds(dont_close, n_dont_close);
+        err = setup_output(context, STDERR_FILENO, socket_fd, basename(command->path), params->unit_id, params->apply_tty_stdin);
+        if (err < 0) {
+                *error = EXIT_STDERR;
+                return err;
+        }
+
+        if (params->cgroup_path) {
+                err = cg_attach_everywhere(params->cgroup_supported, params->cgroup_path, 0);
                 if (err < 0) {
-                        r = EXIT_FDS;
-                        goto fail_child;
+                        *error = EXIT_CGROUP;
+                        return err;
                 }
+        }
 
-                if (!context->same_pgrp)
-                        if (setsid() < 0) {
-                                err = -errno;
-                                r = EXIT_SETSID;
-                                goto fail_child;
-                        }
+        if (context->oom_score_adjust_set) {
+                char t[16];
 
-                exec_context_tty_reset(context);
+                snprintf(t, sizeof(t), "%i", context->oom_score_adjust);
+                char_array_0(t);
 
-                if (confirm_spawn) {
-                        char response;
-
-                        err = ask_for_confirmation(&response, argv);
-                        if (err == -ETIMEDOUT)
-                                write_confirm_message("Confirmation question timed out, assuming positive response.\n");
-                        else if (err < 0)
-                                write_confirm_message("Couldn't ask confirmation question, assuming positive response: %s\n", strerror(-err));
-                        else if (response == 's') {
-                                write_confirm_message("Skipping execution.\n");
-                                err = -ECANCELED;
-                                r = EXIT_CONFIRM;
-                                goto fail_child;
-                        } else if (response == 'n') {
-                                write_confirm_message("Failing execution.\n");
-                                err = r = 0;
-                                goto fail_child;
-                        }
+                if (write_string_file("/proc/self/oom_score_adj", t) < 0) {
+                        *error = EXIT_OOM_ADJUST;
+                        return -errno;
+                }
+        }
+
+        if (context->nice_set)
+                if (setpriority(PRIO_PROCESS, 0, context->nice) < 0) {
+                        *error = EXIT_NICE;
+                        return -errno;
                 }
 
-                /* If a socket is connected to STDIN/STDOUT/STDERR, we
-                 * must sure to drop O_NONBLOCK */
-                if (socket_fd >= 0)
-                        fd_nonblock(socket_fd, false);
+        if (context->cpu_sched_set) {
+                struct sched_param param = {
+                        .sched_priority = context->cpu_sched_priority,
+                };
 
-                err = setup_input(context, socket_fd, apply_tty_stdin);
+                err = sched_setscheduler(0,
+                                         context->cpu_sched_policy |
+                                         (context->cpu_sched_reset_on_fork ?
+                                          SCHED_RESET_ON_FORK : 0),
+                                         &param);
                 if (err < 0) {
-                        r = EXIT_STDIN;
-                        goto fail_child;
+                        *error = EXIT_SETSCHEDULER;
+                        return -errno;
                 }
+        }
 
-                err = setup_output(context, STDOUT_FILENO, socket_fd, basename(command->path), unit_id, apply_tty_stdin);
-                if (err < 0) {
-                        r = EXIT_STDOUT;
-                        goto fail_child;
+        if (context->cpuset)
+                if (sched_setaffinity(0, CPU_ALLOC_SIZE(context->cpuset_ncpus), context->cpuset) < 0) {
+                        *error = EXIT_CPUAFFINITY;
+                        return -errno;
                 }
 
-                err = setup_output(context, STDERR_FILENO, socket_fd, basename(command->path), unit_id, apply_tty_stdin);
-                if (err < 0) {
-                        r = EXIT_STDERR;
-                        goto fail_child;
+        if (context->ioprio_set)
+                if (ioprio_set(IOPRIO_WHO_PROCESS, 0, context->ioprio) < 0) {
+                        *error = EXIT_IOPRIO;
+                        return -errno;
                 }
 
-                if (cgroup_path) {
-                        err = cg_attach_everywhere(cgroup_supported, cgroup_path, 0);
-                        if (err < 0) {
-                                r = EXIT_CGROUP;
-                                goto fail_child;
-                        }
+        if (context->timer_slack_nsec != NSEC_INFINITY)
+                if (prctl(PR_SET_TIMERSLACK, context->timer_slack_nsec) < 0) {
+                        *error = EXIT_TIMERSLACK;
+                        return -errno;
                 }
 
-                if (context->oom_score_adjust_set) {
-                        char t[16];
+        if (context->personality != 0xffffffffUL)
+                if (personality(context->personality) < 0) {
+                        *error = EXIT_PERSONALITY;
+                        return -errno;
+                }
 
-                        snprintf(t, sizeof(t), "%i", context->oom_score_adjust);
-                        char_array_0(t);
+        if (context->utmp_id)
+                utmp_put_init_process(context->utmp_id, getpid(), getsid(0), context->tty_path);
 
-                        if (write_string_file("/proc/self/oom_score_adj", t) < 0) {
-                                err = -errno;
-                                r = EXIT_OOM_ADJUST;
-                                goto fail_child;
-                        }
+        if (context->user) {
+                username = context->user;
+                err = get_user_creds(&username, &uid, &gid, &home, &shell);
+                if (err < 0) {
+                        *error = EXIT_USER;
+                        return err;
                 }
 
-                if (context->nice_set)
-                        if (setpriority(PRIO_PROCESS, 0, context->nice) < 0) {
-                                err = -errno;
-                                r = EXIT_NICE;
-                                goto fail_child;
+                if (is_terminal_input(context->std_input)) {
+                        err = chown_terminal(STDIN_FILENO, uid);
+                        if (err < 0) {
+                                *error = EXIT_STDIN;
+                                return err;
                         }
+                }
+        }
 
-                if (context->cpu_sched_set) {
-                        struct sched_param param = {
-                                .sched_priority = context->cpu_sched_priority,
-                        };
+#ifdef ENABLE_KDBUS
+        if (params->bus_endpoint_fd >= 0 && context->bus_endpoint) {
+                uid_t ep_uid = (uid == (uid_t) -1) ? 0 : uid;
 
-                        r = sched_setscheduler(0,
-                                               context->cpu_sched_policy |
-                                               (context->cpu_sched_reset_on_fork ?
-                                                SCHED_RESET_ON_FORK : 0),
-                                               &param);
-                        if (r < 0) {
-                                err = -errno;
-                                r = EXIT_SETSCHEDULER;
-                                goto fail_child;
-                        }
+                err = bus_kernel_set_endpoint_policy(params->bus_endpoint_fd, ep_uid, context->bus_endpoint);
+                if (err < 0) {
+                        *error = EXIT_BUS_ENDPOINT;
+                        return err;
                 }
+        }
+#endif
 
-                if (context->cpuset)
-                        if (sched_setaffinity(0, CPU_ALLOC_SIZE(context->cpuset_ncpus), context->cpuset) < 0) {
-                                err = -errno;
-                                r = EXIT_CPUAFFINITY;
-                                goto fail_child;
-                        }
+#ifdef HAVE_PAM
+        if (params->cgroup_path && context->user && context->pam_name) {
+                err = cg_set_task_access(SYSTEMD_CGROUP_CONTROLLER, params->cgroup_path, 0644, uid, gid);
+                if (err < 0) {
+                        *error = EXIT_CGROUP;
+                        return err;
+                }
 
-                if (context->ioprio_set)
-                        if (ioprio_set(IOPRIO_WHO_PROCESS, 0, context->ioprio) < 0) {
-                                err = -errno;
-                                r = EXIT_IOPRIO;
-                                goto fail_child;
-                        }
 
-                if (context->timer_slack_nsec != (nsec_t) -1)
-                        if (prctl(PR_SET_TIMERSLACK, context->timer_slack_nsec) < 0) {
-                                err = -errno;
-                                r = EXIT_TIMERSLACK;
-                                goto fail_child;
-                        }
+                err = cg_set_group_access(SYSTEMD_CGROUP_CONTROLLER, params->cgroup_path, 0755, uid, gid);
+                if (err < 0) {
+                        *error = EXIT_CGROUP;
+                        return err;
+                }
+        }
+#endif
 
-                if (context->personality != 0xffffffffUL)
-                        if (personality(context->personality) < 0) {
-                                err = -errno;
-                                r = EXIT_PERSONALITY;
-                                goto fail_child;
-                        }
+        if (!strv_isempty(context->runtime_directory) && params->runtime_prefix) {
+                char **rt;
 
-                if (context->utmp_id)
-                        utmp_put_init_process(context->utmp_id, getpid(), getsid(0), context->tty_path);
+                STRV_FOREACH(rt, context->runtime_directory) {
+                        _cleanup_free_ char *p;
 
-                if (context->user) {
-                        username = context->user;
-                        err = get_user_creds(&username, &uid, &gid, &home, &shell);
-                        if (err < 0) {
-                                r = EXIT_USER;
-                                goto fail_child;
+                        p = strjoin(params->runtime_prefix, "/", *rt, NULL);
+                        if (!p) {
+                                *error = EXIT_RUNTIME_DIRECTORY;
+                                return -ENOMEM;
                         }
 
-                        if (is_terminal_input(context->std_input)) {
-                                err = chown_terminal(STDIN_FILENO, uid);
-                                if (err < 0) {
-                                        r = EXIT_STDIN;
-                                        goto fail_child;
-                                }
+                        err = mkdir_safe(p, context->runtime_directory_mode, uid, gid);
+                        if (err < 0) {
+                                *error = EXIT_RUNTIME_DIRECTORY;
+                                return err;
                         }
                 }
+        }
 
-#ifdef HAVE_PAM
-                if (cgroup_path && context->user && context->pam_name) {
-                        err = cg_set_task_access(SYSTEMD_CGROUP_CONTROLLER, cgroup_path, 0644, uid, gid);
-                        if (err < 0) {
-                                r = EXIT_CGROUP;
-                                goto fail_child;
-                        }
+        if (params->apply_permissions) {
+                err = enforce_groups(context, username, gid);
+                if (err < 0) {
+                        *error = EXIT_GROUP;
+                        return err;
+                }
+        }
 
+        umask(context->umask);
 
-                        err = cg_set_group_access(SYSTEMD_CGROUP_CONTROLLER, cgroup_path, 0755, uid, gid);
-                        if (err < 0) {
-                                r = EXIT_CGROUP;
-                                goto fail_child;
-                        }
+#ifdef HAVE_PAM
+        if (params->apply_permissions && context->pam_name && username) {
+                err = setup_pam(context->pam_name, username, uid, context->tty_path, &pam_env, fds, n_fds);
+                if (err < 0) {
+                        *error = EXIT_PAM;
+                        return err;
                 }
+        }
 #endif
 
-                if (!strv_isempty(context->runtime_directory) && runtime_prefix) {
-                        char **rt;
+        if (context->private_network && runtime && runtime->netns_storage_socket[0] >= 0) {
+                err = setup_netns(runtime->netns_storage_socket);
+                if (err < 0) {
+                        *error = EXIT_NETWORK;
+                        return err;
+                }
+        }
 
-                        STRV_FOREACH(rt, context->runtime_directory) {
-                                _cleanup_free_ char *p;
+        if (!strv_isempty(context->read_write_dirs) ||
+            !strv_isempty(context->read_only_dirs) ||
+            !strv_isempty(context->inaccessible_dirs) ||
+            context->mount_flags != 0 ||
+            (context->private_tmp && runtime && (runtime->tmp_dir || runtime->var_tmp_dir)) ||
+            params->bus_endpoint_path ||
+            context->private_devices ||
+            context->protect_system != PROTECT_SYSTEM_NO ||
+            context->protect_home != PROTECT_HOME_NO) {
+
+                char *tmp = NULL, *var = NULL;
+
+                /* The runtime struct only contains the parent
+                 * of the private /tmp, which is
+                 * non-accessible to world users. Inside of it
+                 * there's a /tmp that is sticky, and that's
+                 * the one we want to use here. */
+
+                if (context->private_tmp && runtime) {
+                        if (runtime->tmp_dir)
+                                tmp = strappenda(runtime->tmp_dir, "/tmp");
+                        if (runtime->var_tmp_dir)
+                                var = strappenda(runtime->var_tmp_dir, "/tmp");
+                }
 
-                                p = strjoin(runtime_prefix, "/", *rt, NULL);
-                                if (!p) {
-                                        r = EXIT_RUNTIME_DIRECTORY;
-                                        err = -ENOMEM;
-                                        goto fail_child;
-                                }
+                err = setup_namespace(
+                                context->read_write_dirs,
+                                context->read_only_dirs,
+                                context->inaccessible_dirs,
+                                tmp,
+                                var,
+                                params->bus_endpoint_path,
+                                context->private_devices,
+                                context->protect_home,
+                                context->protect_system,
+                                context->mount_flags);
+
+                if (err == -EPERM)
+                        log_warning_unit(params->unit_id, "Failed to set up file system namespace due to lack of privileges. Execution sandbox will not be in effect: %s", strerror(-err));
+                else if (err < 0) {
+                        *error = EXIT_NAMESPACE;
+                        return err;
+                }
+        }
 
-                                err = mkdir_safe(p, context->runtime_directory_mode, uid, gid);
-                                if (err < 0) {
-                                        r = EXIT_RUNTIME_DIRECTORY;
-                                        goto fail_child;
-                                }
+        if (params->apply_chroot) {
+                if (context->root_directory)
+                        if (chroot(context->root_directory) < 0) {
+                                *error = EXIT_CHROOT;
+                                return -errno;
                         }
+
+                if (chdir(context->working_directory ? context->working_directory : "/") < 0) {
+                        *error = EXIT_CHDIR;
+                        return -errno;
                 }
+        } else {
+                _cleanup_free_ char *d = NULL;
 
-                if (apply_permissions) {
-                        err = enforce_groups(context, username, gid);
-                        if (err < 0) {
-                                r = EXIT_GROUP;
-                                goto fail_child;
-                        }
+                if (asprintf(&d, "%s/%s",
+                             context->root_directory ? context->root_directory : "",
+                             context->working_directory ? context->working_directory : "") < 0) {
+                        *error = EXIT_MEMORY;
+                        return -ENOMEM;
                 }
 
-                umask(context->umask);
+                if (chdir(d) < 0) {
+                        *error = EXIT_CHDIR;
+                        return -errno;
+                }
+        }
 
-#ifdef HAVE_PAM
-                if (apply_permissions && context->pam_name && username) {
-                        err = setup_pam(context->pam_name, username, uid, context->tty_path, &pam_env, fds, n_fds);
-                        if (err < 0) {
-                                r = EXIT_PAM;
-                                goto fail_child;
+        /* We repeat the fd closing here, to make sure that
+         * nothing is leaked from the PAM modules. Note that
+         * we are more aggressive this time since socket_fd
+         * and the netns fds we don't need anymore. The custom
+         * endpoint fd was needed to upload the policy and can
+         * now be closed as well. */
+        err = close_all_fds(fds, n_fds);
+        if (err >= 0)
+                err = shift_fds(fds, n_fds);
+        if (err >= 0)
+                err = flags_fds(fds, n_fds, context->non_blocking);
+        if (err < 0) {
+                *error = EXIT_FDS;
+                return err;
+        }
+
+        if (params->apply_permissions) {
+
+                for (i = 0; i < _RLIMIT_MAX; i++) {
+                        if (!context->rlimit[i])
+                                continue;
+
+                        if (setrlimit_closest(i, context->rlimit[i]) < 0) {
+                                *error = EXIT_LIMITS;
+                                return -errno;
                         }
                 }
-#endif
-                if (context->private_network && runtime && runtime->netns_storage_socket[0] >= 0) {
-                        err = setup_netns(runtime->netns_storage_socket);
+
+                if (context->capability_bounding_set_drop) {
+                        err = capability_bounding_set_drop(context->capability_bounding_set_drop, false);
                         if (err < 0) {
-                                r = EXIT_NETWORK;
-                                goto fail_child;
+                                *error = EXIT_CAPABILITIES;
+                                return err;
                         }
                 }
 
-                if (!strv_isempty(context->read_write_dirs) ||
-                    !strv_isempty(context->read_only_dirs) ||
-                    !strv_isempty(context->inaccessible_dirs) ||
-                    context->mount_flags != 0 ||
-                    (context->private_tmp && runtime && (runtime->tmp_dir || runtime->var_tmp_dir)) ||
-                    context->private_devices ||
-                    context->protect_system != PROTECT_SYSTEM_NO ||
-                    context->protect_home != PROTECT_HOME_NO) {
-
-                        char *tmp = NULL, *var = NULL;
-
-                        /* The runtime struct only contains the parent
-                         * of the private /tmp, which is
-                         * non-accessible to world users. Inside of it
-                         * there's a /tmp that is sticky, and that's
-                         * the one we want to use here. */
-
-                        if (context->private_tmp && runtime) {
-                                if (runtime->tmp_dir)
-                                        tmp = strappenda(runtime->tmp_dir, "/tmp");
-                                if (runtime->var_tmp_dir)
-                                        var = strappenda(runtime->var_tmp_dir, "/tmp");
-                        }
-
-                        err = setup_namespace(
-                                        context->read_write_dirs,
-                                        context->read_only_dirs,
-                                        context->inaccessible_dirs,
-                                        tmp,
-                                        var,
-                                        context->private_devices,
-                                        context->protect_home,
-                                        context->protect_system,
-                                        context->mount_flags);
+                if (context->user) {
+                        err = enforce_user(context, uid);
                         if (err < 0) {
-                                r = EXIT_NAMESPACE;
-                                goto fail_child;
+                                *error = EXIT_USER;
+                                return err;
                         }
                 }
 
-                if (apply_chroot) {
-                        if (context->root_directory)
-                                if (chroot(context->root_directory) < 0) {
-                                        err = -errno;
-                                        r = EXIT_CHROOT;
-                                        goto fail_child;
-                                }
+                /* PR_GET_SECUREBITS is not privileged, while
+                 * PR_SET_SECUREBITS is. So to suppress
+                 * potential EPERMs we'll try not to call
+                 * PR_SET_SECUREBITS unless necessary. */
+                if (prctl(PR_GET_SECUREBITS) != context->secure_bits)
+                        if (prctl(PR_SET_SECUREBITS, context->secure_bits) < 0) {
+                                *error = EXIT_SECUREBITS;
+                                return -errno;
+                        }
 
-                        if (chdir(context->working_directory ? context->working_directory : "/") < 0) {
-                                err = -errno;
-                                r = EXIT_CHDIR;
-                                goto fail_child;
+                if (context->capabilities)
+                        if (cap_set_proc(context->capabilities) < 0) {
+                                *error = EXIT_CAPABILITIES;
+                                return -errno;
                         }
-                } else {
-                        _cleanup_free_ char *d = NULL;
-
-                        if (asprintf(&d, "%s/%s",
-                                     context->root_directory ? context->root_directory : "",
-                                     context->working_directory ? context->working_directory : "") < 0) {
-                                err = -ENOMEM;
-                                r = EXIT_MEMORY;
-                                goto fail_child;
+
+                if (context->no_new_privileges)
+                        if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) {
+                                *error = EXIT_NO_NEW_PRIVILEGES;
+                                return -errno;
                         }
 
-                        if (chdir(d) < 0) {
-                                err = -errno;
-                                r = EXIT_CHDIR;
-                                goto fail_child;
+#ifdef HAVE_SECCOMP
+                if (context->address_families_whitelist ||
+                    !set_isempty(context->address_families)) {
+                        err = apply_address_families(context);
+                        if (err < 0) {
+                                *error = EXIT_ADDRESS_FAMILIES;
+                                return err;
                         }
                 }
 
-                /* We repeat the fd closing here, to make sure that
-                 * nothing is leaked from the PAM modules */
-                err = close_all_fds(fds, n_fds);
-                if (err >= 0)
-                        err = shift_fds(fds, n_fds);
-                if (err >= 0)
-                        err = flags_fds(fds, n_fds, context->non_blocking);
-                if (err < 0) {
-                        r = EXIT_FDS;
-                        goto fail_child;
+                if (context->syscall_whitelist ||
+                    !set_isempty(context->syscall_filter) ||
+                    !set_isempty(context->syscall_archs)) {
+                        err = apply_seccomp(context);
+                        if (err < 0) {
+                                *error = EXIT_SECCOMP;
+                                return err;
+                        }
                 }
+#endif
 
-                if (apply_permissions) {
-
-                        for (i = 0; i < _RLIMIT_MAX; i++) {
-                                if (!context->rlimit[i])
-                                        continue;
-
-                                if (setrlimit_closest(i, context->rlimit[i]) < 0) {
-                                        err = -errno;
-                                        r = EXIT_LIMITS;
-                                        goto fail_child;
+#ifdef HAVE_SELINUX
+                if (mac_selinux_use()) {
+                        if (context->selinux_context) {
+                                err = setexeccon(context->selinux_context);
+                                if (err < 0 && !context->selinux_context_ignore) {
+                                        *error = EXIT_SELINUX_CONTEXT;
+                                        return err;
                                 }
                         }
 
-                        if (context->capability_bounding_set_drop) {
-                                err = capability_bounding_set_drop(context->capability_bounding_set_drop, false);
+                        if (params->selinux_context_net && socket_fd >= 0) {
+                                _cleanup_free_ char *label = NULL;
+
+                                err = mac_selinux_get_child_mls_label(socket_fd, command->path, &label);
                                 if (err < 0) {
-                                        r = EXIT_CAPABILITIES;
-                                        goto fail_child;
+                                        *error = EXIT_SELINUX_CONTEXT;
+                                        return err;
                                 }
-                        }
 
-                        if (context->user) {
-                                err = enforce_user(context, uid);
+                                err = setexeccon(label);
                                 if (err < 0) {
-                                        r = EXIT_USER;
-                                        goto fail_child;
+                                        *error = EXIT_SELINUX_CONTEXT;
+                                        return err;
                                 }
                         }
+                }
+#endif
 
-                        /* PR_GET_SECUREBITS is not privileged, while
-                         * PR_SET_SECUREBITS is. So to suppress
-                         * potential EPERMs we'll try not to call
-                         * PR_SET_SECUREBITS unless necessary. */
-                        if (prctl(PR_GET_SECUREBITS) != context->secure_bits)
-                                if (prctl(PR_SET_SECUREBITS, context->secure_bits) < 0) {
-                                        err = -errno;
-                                        r = EXIT_SECUREBITS;
-                                        goto fail_child;
-                                }
+#ifdef HAVE_APPARMOR
+                if (context->apparmor_profile && mac_apparmor_use()) {
+                        err = aa_change_onexec(context->apparmor_profile);
+                        if (err < 0 && !context->apparmor_profile_ignore) {
+                                *error = EXIT_APPARMOR_PROFILE;
+                                return -errno;
+                        }
+                }
+#endif
+        }
 
-                        if (context->capabilities)
-                                if (cap_set_proc(context->capabilities) < 0) {
-                                        err = -errno;
-                                        r = EXIT_CAPABILITIES;
-                                        goto fail_child;
-                                }
+        err = build_environment(context, n_fds, params->watchdog_usec, home, username, shell, &our_env);
+        if (err < 0) {
+                *error = EXIT_MEMORY;
+                return err;
+        }
 
-                        if (context->no_new_privileges)
-                                if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) {
-                                        err = -errno;
-                                        r = EXIT_NO_NEW_PRIVILEGES;
-                                        goto fail_child;
-                                }
+        final_env = strv_env_merge(5,
+                                   params->environment,
+                                   our_env,
+                                   context->environment,
+                                   files_env,
+                                   pam_env,
+                                   NULL);
+        if (!final_env) {
+                *error = EXIT_MEMORY;
+                return -ENOMEM;
+        }
 
-#ifdef HAVE_SECCOMP
-                        if (context->address_families_whitelist ||
-                            !set_isempty(context->address_families)) {
-                                err = apply_address_families(context);
-                                if (err < 0) {
-                                        r = EXIT_ADDRESS_FAMILIES;
-                                        goto fail_child;
-                                }
-                        }
+        final_argv = replace_env_argv(argv, final_env);
+        if (!final_argv) {
+                *error = EXIT_MEMORY;
+                return -ENOMEM;
+        }
 
-                        if (context->syscall_whitelist ||
-                            !set_isempty(context->syscall_filter) ||
-                            !set_isempty(context->syscall_archs)) {
-                                err = apply_seccomp(context);
-                                if (err < 0) {
-                                        r = EXIT_SECCOMP;
-                                        goto fail_child;
-                                }
-                        }
-#endif
+        final_env = strv_env_clean(final_env);
 
-#ifdef HAVE_SELINUX
-                        if (context->selinux_context && use_selinux()) {
-                                err = setexeccon(context->selinux_context);
-                                if (err < 0 && !context->selinux_context_ignore) {
-                                        r = EXIT_SELINUX_CONTEXT;
-                                        goto fail_child;
-                                }
-                        }
-#endif
+        if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+                _cleanup_free_ char *line;
 
-#ifdef HAVE_APPARMOR
-                        if (context->apparmor_profile && use_apparmor()) {
-                                err = aa_change_onexec(context->apparmor_profile);
-                                if (err < 0 && !context->apparmor_profile_ignore) {
-                                        r = EXIT_APPARMOR_PROFILE;
-                                        goto fail_child;
-                                }
-                        }
-#endif
+                line = exec_command_line(final_argv);
+                if (line) {
+                        log_open();
+                        log_struct_unit(LOG_DEBUG,
+                                        params->unit_id,
+                                        "EXECUTABLE=%s", command->path,
+                                        "MESSAGE=Executing: %s", line,
+                                        NULL);
+                        log_close();
                 }
+        }
+        execve(command->path, final_argv, final_env);
+        *error = EXIT_EXEC;
+        return -errno;
+}
 
-                err = build_environment(context, n_fds, watchdog_usec, home, username, shell, &our_env);
-                if (r < 0) {
-                        r = EXIT_MEMORY;
-                        goto fail_child;
-                }
+int exec_spawn(ExecCommand *command,
+               const ExecContext *context,
+               const ExecParameters *params,
+               ExecRuntime *runtime,
+               pid_t *ret) {
 
-                final_env = strv_env_merge(5,
-                                           environment,
-                                           our_env,
-                                           context->environment,
-                                           files_env,
-                                           pam_env,
-                                           NULL);
-                if (!final_env) {
-                        err = -ENOMEM;
-                        r = EXIT_MEMORY;
-                        goto fail_child;
-                }
+        _cleanup_strv_free_ char **files_env = NULL;
+        int *fds = NULL; unsigned n_fds = 0;
+        char *line, **argv;
+        int socket_fd;
+        pid_t pid;
+        int err;
 
-                final_argv = replace_env_argv(argv, final_env);
-                if (!final_argv) {
-                        err = -ENOMEM;
-                        r = EXIT_MEMORY;
-                        goto fail_child;
-                }
+        assert(command);
+        assert(context);
+        assert(ret);
+        assert(params);
+        assert(params->fds || params->n_fds <= 0);
 
-                final_env = strv_env_clean(final_env);
-
-                if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
-                        line = exec_command_line(final_argv);
-                        if (line) {
-                                log_open();
-                                log_struct_unit(LOG_DEBUG,
-                                                unit_id,
-                                                "EXECUTABLE=%s", command->path,
-                                                "MESSAGE=Executing: %s", line,
-                                                NULL);
-                                log_close();
-                                free(line);
-                                line = NULL;
-                        }
-                }
-                execve(command->path, final_argv, final_env);
-                err = -errno;
-                r = EXIT_EXEC;
+        if (context->std_input == EXEC_INPUT_SOCKET ||
+            context->std_output == EXEC_OUTPUT_SOCKET ||
+            context->std_error == EXEC_OUTPUT_SOCKET) {
 
-        fail_child:
+                if (params->n_fds != 1)
+                        return -EINVAL;
+
+                socket_fd = params->fds[0];
+        } else {
+                socket_fd = -1;
+                fds = params->fds;
+                n_fds = params->n_fds;
+        }
+
+        err = exec_context_load_environment(context, params->unit_id, &files_env);
+        if (err < 0) {
+                log_struct_unit(LOG_ERR,
+                           params->unit_id,
+                           "MESSAGE=Failed to load environment files: %s", strerror(-err),
+                           "ERRNO=%d", -err,
+                           NULL);
+                return err;
+        }
+
+        argv = params->argv ?: command->argv;
+
+        line = exec_command_line(argv);
+        if (!line)
+                return log_oom();
+
+        log_struct_unit(LOG_DEBUG,
+                        params->unit_id,
+                        "EXECUTABLE=%s", command->path,
+                        "MESSAGE=About to execute: %s", line,
+                        NULL);
+        free(line);
+
+        pid = fork();
+        if (pid < 0)
+                return -errno;
+
+        if (pid == 0) {
+                int r;
+
+                err = exec_child(command,
+                                 context,
+                                 params,
+                                 runtime,
+                                 argv,
+                                 socket_fd,
+                                 fds, n_fds,
+                                 files_env,
+                                 &r);
                 if (r != 0) {
                         log_open();
                         log_struct(LOG_ERR, MESSAGE_ID(SD_MESSAGE_SPAWN_FAILED),
@@ -1805,7 +1840,7 @@ int exec_spawn(ExecCommand *command,
         }
 
         log_struct_unit(LOG_DEBUG,
-                        unit_id,
+                        params->unit_id,
                         "MESSAGE=Forked %s as "PID_FMT,
                         command->path, pid,
                         NULL);
@@ -1815,8 +1850,8 @@ int exec_spawn(ExecCommand *command,
          * outside of the cgroup) and in the parent (so that we can be
          * sure that when we kill the cgroup the process will be
          * killed too). */
-        if (cgroup_path)
-                cg_attach(SYSTEMD_CGROUP_CONTROLLER, cgroup_path, pid);
+        if (params->cgroup_path)
+                cg_attach(SYSTEMD_CGROUP_CONTROLLER, params->cgroup_path, pid);
 
         exec_status_start(&command->exec_status, pid);
 
@@ -1833,7 +1868,7 @@ void exec_context_init(ExecContext *c) {
         c->syslog_priority = LOG_DAEMON|LOG_INFO;
         c->syslog_level_prefix = true;
         c->ignore_sigpipe = true;
-        c->timer_slack_nsec = (nsec_t) -1;
+        c->timer_slack_nsec = NSEC_INFINITY;
         c->personality = 0xffffffffUL;
         c->runtime_directory_mode = 0755;
 }
@@ -1914,6 +1949,9 @@ void exec_context_done(ExecContext *c) {
 
         strv_free(c->runtime_directory);
         c->runtime_directory = NULL;
+
+        bus_endpoint_free(c->bus_endpoint);
+        c->bus_endpoint = NULL;
 }
 
 int exec_context_destroy_runtime_directory(ExecContext *c, const char *runtime_prefix) {
@@ -1976,7 +2014,7 @@ void exec_command_free_array(ExecCommand **c, unsigned n) {
         }
 }
 
-int exec_context_load_environment(const ExecContext *c, char ***l) {
+int exec_context_load_environment(const ExecContext *c, const char *unit_id, char ***l) {
         char **i, **r = NULL;
 
         assert(c);
@@ -2033,7 +2071,7 @@ int exec_context_load_environment(const ExecContext *c, char ***l) {
                         }
                         /* Log invalid environment variables with filename */
                         if (p)
-                                p = strv_env_clean_log(p, pglob.gl_pathv[n]);
+                                p = strv_env_clean_log(p, unit_id, pglob.gl_pathv[n]);
 
                         if (r == NULL)
                                 r = p;
@@ -2177,7 +2215,7 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
                 fputs("\n", f);
         }
 
-        if (c->timer_slack_nsec != (nsec_t) -1)
+        if (c->timer_slack_nsec != NSEC_INFINITY)
                 fprintf(f, "%sTimerSlackNSec: "NSEC_FMT "\n", prefix, c->timer_slack_nsec);
 
         fprintf(f,
@@ -2398,12 +2436,11 @@ void exec_status_dump(ExecStatus *s, FILE *f, const char *prefix) {
         assert(s);
         assert(f);
 
-        if (!prefix)
-                prefix = "";
-
         if (s->pid <= 0)
                 return;
 
+        prefix = strempty(prefix);
+
         fprintf(f,
                 "%sPID: "PID_FMT"\n",
                 prefix, s->pid);
@@ -2463,21 +2500,16 @@ char *exec_command_line(char **argv) {
 }
 
 void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix) {
-        _cleanup_free_ char *p2 = NULL;
-        const char *prefix2;
-
         _cleanup_free_ char *cmd = NULL;
+        const char *prefix2;
 
         assert(c);
         assert(f);
 
-        if (!prefix)
-                prefix = "";
-        p2 = strappend(prefix, "\t");
-        prefix2 = p2 ? p2 : prefix;
+        prefix = strempty(prefix);
+        prefix2 = strappenda(prefix, "\t");
 
         cmd = exec_command_line(c->argv);
-
         fprintf(f,
                 "%sCommand Line: %s\n",
                 prefix, cmd ? cmd : strerror(ENOMEM));
@@ -2488,8 +2520,7 @@ void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix) {
 void exec_command_dump_list(ExecCommand *c, FILE *f, const char *prefix) {
         assert(f);
 
-        if (!prefix)
-                prefix = "";
+        prefix = strempty(prefix);
 
         LIST_FOREACH(command, c, c)
                 exec_command_dump(c, f, prefix);
@@ -2538,6 +2569,29 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
         return 0;
 }
 
+int exec_command_append(ExecCommand *c, const char *path, ...) {
+        _cleanup_strv_free_ char **l = NULL;
+        va_list ap;
+        int r;
+
+        assert(c);
+        assert(path);
+
+        va_start(ap, path);
+        l = strv_new_ap(path, ap);
+        va_end(ap);
+
+        if (!l)
+                return -ENOMEM;
+
+        r = strv_extend_strv(&c->argv, l);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+
 static int exec_runtime_allocate(ExecRuntime **rt) {
 
         if (*rt)
index 9d05d3a9dec95c7c0985408a07fc202dd264c3f8..c45dde53a6452af5641199ba94000b05038ccc19 100644 (file)
@@ -25,6 +25,7 @@ typedef struct ExecStatus ExecStatus;
 typedef struct ExecCommand ExecCommand;
 typedef struct ExecContext ExecContext;
 typedef struct ExecRuntime ExecRuntime;
+typedef struct ExecParameters ExecParameters;
 
 #include <linux/types.h>
 #include <sys/time.h>
@@ -40,6 +41,7 @@ typedef struct ExecRuntime ExecRuntime;
 #include "fdset.h"
 #include "missing.h"
 #include "namespace.h"
+#include "bus-endpoint.h"
 
 typedef enum ExecInput {
         EXEC_INPUT_NULL,
@@ -187,25 +189,35 @@ struct ExecContext {
         bool ioprio_set:1;
         bool cpu_sched_set:1;
         bool no_new_privileges_set:1;
+
+        /* custom dbus enpoint */
+        BusEndpoint *bus_endpoint;
 };
 
 #include "cgroup.h"
 
+struct ExecParameters {
+        char **argv;
+        int *fds; unsigned n_fds;
+        char **environment;
+        bool apply_permissions;
+        bool apply_chroot;
+        bool apply_tty_stdin;
+        bool confirm_spawn;
+        bool selinux_context_net;
+        CGroupControllerMask cgroup_supported;
+        const char *cgroup_path;
+        const char *runtime_prefix;
+        const char *unit_id;
+        usec_t watchdog_usec;
+        int *idle_pipe;
+        char *bus_endpoint_path;
+        int bus_endpoint_fd;
+};
+
 int exec_spawn(ExecCommand *command,
-               char **argv,
-               ExecContext *context,
-               int fds[], unsigned n_fds,
-               char **environment,
-               bool apply_permissions,
-               bool apply_chroot,
-               bool apply_tty_stdin,
-               bool confirm_spawn,
-               CGroupControllerMask cgroup_mask,
-               const char *cgroup_path,
-               const char *runtime_prefix,
-               const char *unit_id,
-               usec_t watchdog_usec,
-               int pipe_fd[2],
+               const ExecContext *context,
+               const ExecParameters *exec_params,
                ExecRuntime *runtime,
                pid_t *ret);
 
@@ -221,6 +233,7 @@ void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix);
 void exec_command_dump_list(ExecCommand *c, FILE *f, const char *prefix);
 void exec_command_append_list(ExecCommand **l, ExecCommand *e);
 int exec_command_set(ExecCommand *c, const char *path, ...);
+int exec_command_append(ExecCommand *c, const char *path, ...);
 
 void exec_context_init(ExecContext *c);
 void exec_context_done(ExecContext *c);
@@ -228,7 +241,7 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix);
 
 int exec_context_destroy_runtime_directory(ExecContext *c, const char *runtime_root);
 
-int exec_context_load_environment(const ExecContext *c, char ***l);
+int exec_context_load_environment(const ExecContext *c, const char *unit_id, char ***l);
 
 bool exec_context_may_touch_console(ExecContext *c);
 
diff --git a/src/core/failure-action.c b/src/core/failure-action.c
new file mode 100644 (file)
index 0000000..ce522a4
--- /dev/null
@@ -0,0 +1,140 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+  Copyright 2012 Michael Olbrich
+
+  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/>.
+***/
+
+#include <sys/reboot.h>
+#include <linux/reboot.h>
+#include <sys/syscall.h>
+
+#include "bus-util.h"
+#include "bus-error.h"
+#include "special.h"
+#include "failure-action.h"
+
+static void log_and_status(Manager *m, const char *message) {
+        log_warning("%s", message);
+        manager_status_printf(m, STATUS_TYPE_EMERGENCY,
+                              ANSI_HIGHLIGHT_RED_ON " !!  " ANSI_HIGHLIGHT_OFF,
+                              "%s", message);
+}
+
+int failure_action(
+                Manager *m,
+                FailureAction action,
+                const char *reboot_arg) {
+
+        int r;
+
+        assert(m);
+        assert(action >= 0);
+        assert(action < _FAILURE_ACTION_MAX);
+
+        if (action == FAILURE_ACTION_NONE)
+                return -ECANCELED;
+
+        if (m->running_as == SYSTEMD_USER) {
+                /* Downgrade all options to simply exiting if we run
+                 * in user mode */
+
+                log_warning("Exiting as result of failure.");
+                m->exit_code = MANAGER_EXIT;
+                return -ECANCELED;
+        }
+
+        switch (action) {
+
+        case FAILURE_ACTION_REBOOT: {
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+
+                log_and_status(m, "Rebooting as result of failure.");
+
+                update_reboot_param_file(reboot_arg);
+                r = manager_add_job_by_name(m, JOB_START, SPECIAL_REBOOT_TARGET, JOB_REPLACE, true, &error, NULL);
+                if (r < 0)
+                        log_error("Failed to reboot: %s.", bus_error_message(&error, r));
+
+                break;
+        }
+
+        case FAILURE_ACTION_REBOOT_FORCE:
+                log_and_status(m, "Forcibly rebooting as result of failure.");
+
+                update_reboot_param_file(reboot_arg);
+                m->exit_code = MANAGER_REBOOT;
+                break;
+
+        case FAILURE_ACTION_REBOOT_IMMEDIATE:
+                log_and_status(m, "Rebooting immediately as result of failure.");
+
+                sync();
+
+                if (reboot_arg) {
+                        log_info("Rebooting with argument '%s'.", reboot_arg);
+                        syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, reboot_arg);
+                }
+
+                log_info("Rebooting.");
+                reboot(RB_AUTOBOOT);
+                break;
+
+        case FAILURE_ACTION_POWEROFF: {
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+
+                log_and_status(m, "Powering off as result of failure.");
+
+                r = manager_add_job_by_name(m, JOB_START, SPECIAL_POWEROFF_TARGET, JOB_REPLACE, true, &error, NULL);
+                if (r < 0)
+                        log_error("Failed to poweroff: %s.", bus_error_message(&error, r));
+
+                break;
+        }
+
+        case FAILURE_ACTION_POWEROFF_FORCE:
+                log_and_status(m, "Forcibly powering off as result of failure.");
+                m->exit_code = MANAGER_POWEROFF;
+                break;
+
+        case FAILURE_ACTION_POWEROFF_IMMEDIATE:
+                log_and_status(m, "Powering off immediately as result of failure.");
+
+                sync();
+
+                log_info("Powering off.");
+                reboot(RB_POWER_OFF);
+                break;
+
+        default:
+                assert_not_reached("Unknown failure action");
+        }
+
+        return -ECANCELED;
+}
+
+static const char* const failure_action_table[_FAILURE_ACTION_MAX] = {
+        [FAILURE_ACTION_NONE] = "none",
+        [FAILURE_ACTION_REBOOT] = "reboot",
+        [FAILURE_ACTION_REBOOT_FORCE] = "reboot-force",
+        [FAILURE_ACTION_REBOOT_IMMEDIATE] = "reboot-immediate",
+        [FAILURE_ACTION_POWEROFF] = "poweroff",
+        [FAILURE_ACTION_POWEROFF_FORCE] = "poweroff-force",
+        [FAILURE_ACTION_POWEROFF_IMMEDIATE] = "poweroff-immediate"
+};
+DEFINE_STRING_TABLE_LOOKUP(failure_action, FailureAction);
diff --git a/src/core/failure-action.h b/src/core/failure-action.h
new file mode 100644 (file)
index 0000000..1af4dd9
--- /dev/null
@@ -0,0 +1,43 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+  Copyright 2012 Michael Olbrich
+
+  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/>.
+***/
+
+typedef enum FailureAction {
+        FAILURE_ACTION_NONE,
+        FAILURE_ACTION_REBOOT,
+        FAILURE_ACTION_REBOOT_FORCE,
+        FAILURE_ACTION_REBOOT_IMMEDIATE,
+        FAILURE_ACTION_POWEROFF,
+        FAILURE_ACTION_POWEROFF_FORCE,
+        FAILURE_ACTION_POWEROFF_IMMEDIATE,
+        _FAILURE_ACTION_MAX,
+        _FAILURE_ACTION_INVALID = -1
+} FailureAction;
+
+#include "macro.h"
+#include "manager.h"
+
+int failure_action(Manager *m, FailureAction action, const char *reboot_arg);
+
+const char* failure_action_to_string(FailureAction i) _const_;
+FailureAction failure_action_from_string(const char *s) _pure_;
index 8aa1cff1d30f23ad1a42826a487a7e8540a11beb..57baa7927504197d881a024ede7304cfad18ad3a 100644 (file)
@@ -82,7 +82,7 @@ int hostname_setup(void) {
                 hn = "localhost";
         }
 
-        if (sethostname(hn, strlen(hn)) < 0) {
+        if (sethostname_idempotent(hn) < 0) {
                 log_warning("Failed to set hostname to <%s>: %m", hn);
                 return -errno;
         }
index dc4f44150c3c6fbc091092762ad36ef74ac07436..eaa4bb17fc1d42787613e9cb4269baeee77d209c 100644 (file)
@@ -90,8 +90,8 @@ void job_free(Job *j) {
 
         sd_event_source_unref(j->timer_event_source);
 
-        sd_bus_track_unref(j->subscribed);
-        strv_free(j->deserialized_subscribed);
+        sd_bus_track_unref(j->clients);
+        strv_free(j->deserialized_clients);
 
         free(j);
 }
@@ -632,11 +632,18 @@ static void job_print_status_message(Unit *u, JobType t, JobResult result) {
                                 unit_status_printf(u, ANSI_GREEN_ON "  OK  " ANSI_HIGHLIGHT_OFF, format);
                         break;
 
-                case JOB_FAILED:
+                case JOB_FAILED: {
+                        bool quotes;
+
+                        quotes = chars_intersect(u->id, SHELL_NEED_QUOTES);
+
                         manager_flip_auto_status(u->manager, true);
                         unit_status_printf(u, ANSI_HIGHLIGHT_RED_ON "FAILED" ANSI_HIGHLIGHT_OFF, format);
-                        manager_status_printf(u->manager, false, NULL, "See 'systemctl status %s' for details.", u->id);
+                        manager_status_printf(u->manager, STATUS_TYPE_NORMAL, NULL,
+                                              "See \"systemctl status %s%s%s\" for details.",
+                                              quotes ? "'" : "", u->id, quotes ? "'" : "");
                         break;
+                }
 
                 case JOB_DEPENDENCY:
                         manager_flip_auto_status(u->manager, true);
@@ -851,14 +858,18 @@ finish:
 
 static int job_dispatch_timer(sd_event_source *s, uint64_t monotonic, void *userdata) {
         Job *j = userdata;
+        Unit *u;
 
         assert(j);
         assert(s == j->timer_event_source);
 
-        log_warning_unit(j->unit->id, "Job %s/%s timed out.",
-                         j->unit->id, job_type_to_string(j->type));
+        log_warning_unit(j->unit->id, "Job %s/%s timed out.", j->unit->id, job_type_to_string(j->type));
 
+        u = j->unit;
         job_finish_and_invalidate(j, JOB_TIMEOUT, true);
+
+        failure_action(u->manager, u->job_timeout_action, u->job_timeout_reboot_arg);
+
         return 0;
 }
 
@@ -937,7 +948,7 @@ int job_serialize(Job *j, FILE *f, FDSet *fds) {
         if (j->begin_usec > 0)
                 fprintf(f, "job-begin="USEC_FMT"\n", j->begin_usec);
 
-        bus_track_serialize(j->subscribed, f);
+        bus_track_serialize(j->clients, f);
 
         /* End marker */
         fputc('\n', f);
@@ -1043,7 +1054,7 @@ int job_deserialize(Job *j, FILE *f, FDSet *fds) {
 
                 } else if (streq(l, "subscribed")) {
 
-                        if (strv_extend(&j->deserialized_subscribed, v) < 0)
+                        if (strv_extend(&j->deserialized_clients, v) < 0)
                                 return log_oom();
                 }
         }
@@ -1056,7 +1067,7 @@ int job_coldplug(Job *j) {
 
         /* After deserialization is complete and the bus connection
          * set up again, let's start watching our subscribers again */
-        r = bus_track_coldplug(j->manager, &j->subscribed, &j->deserialized_subscribed);
+        r = bus_track_coldplug(j->manager, &j->clients, &j->deserialized_clients);
         if (r < 0)
                 return r;
 
index 30d41d9edd8e1a85255d4ab8b62e6622754832df..1e7c61b04f30f54aff0c79549877ae06136509a7 100644 (file)
@@ -145,9 +145,15 @@ struct Job {
         sd_event_source *timer_event_source;
         usec_t begin_usec;
 
-        /* There can be more than one client, because of job merging. */
-        sd_bus_track *subscribed;
-        char **deserialized_subscribed;
+        /*
+         * This tracks where to send signals, and also which clients
+         * are allowed to call DBus methods on the job (other than
+         * root).
+         *
+         * There can be more than one client, because of job merging.
+         */
+        sd_bus_track *clients;
+        char **deserialized_clients;
 
         JobResult result;
 
index 291e1f90eeb192be472f2faf876a04c4e0521093..a6ff50a5a4a56fdcdcbbedac17ecfc3d23d2f6c7 100644 (file)
@@ -205,7 +205,7 @@ void broadcast_signal(int sig, bool wait_for_exit, bool send_sighup) {
         _cleanup_set_free_ Set *pids = NULL;
 
         if (wait_for_exit)
-                pids = set_new(trivial_hash_func, trivial_compare_func);
+                pids = set_new(NULL);
 
         assert_se(sigemptyset(&mask) == 0);
         assert_se(sigaddset(&mask, SIGCHLD) == 0);
index 6ff592be8b1cf944e9177ceae96a62b7c6ab1b52..ffc68b4d737fdaa269e1e5f7ea05ea25184b7b95 100644 (file)
@@ -181,13 +181,14 @@ int unit_load_dropin(Unit *u) {
         }
 
         u->dropin_paths = unit_find_dropin_paths(u);
-        if (! u->dropin_paths)
+        if (!u->dropin_paths)
                 return 0;
 
         STRV_FOREACH(f, u->dropin_paths) {
                 config_parse(u->id, *f, NULL,
-                             UNIT_VTABLE(u)->sections, config_item_perf_lookup,
-                             (void*) load_fragment_gperf_lookup, false, false, u);
+                             UNIT_VTABLE(u)->sections,
+                             config_item_perf_lookup, load_fragment_gperf_lookup,
+                             false, false, false, u);
         }
 
         u->dropin_mtime = now(CLOCK_REALTIME);
index a7c4469a4623a945639ce9a613feb73c45ae1b60..ca0139479b1c8dd8bea681dd64cadb50f41de194 100644 (file)
@@ -152,6 +152,8 @@ Unit.OnFailureIsolate,           config_parse_job_mode_isolate,      0,
 Unit.IgnoreOnIsolate,            config_parse_bool,                  0,                             offsetof(Unit, ignore_on_isolate)
 Unit.IgnoreOnSnapshot,           config_parse_bool,                  0,                             offsetof(Unit, ignore_on_snapshot)
 Unit.JobTimeoutSec,              config_parse_sec,                   0,                             offsetof(Unit, job_timeout)
+Unit.JobTimeoutAction,           config_parse_failure_action,        0,                             offsetof(Unit, job_timeout_action)
+Unit.JobTimeoutRebootArgument,   config_parse_string,                0,                             offsetof(Unit, job_timeout_reboot_arg)
 Unit.ConditionPathExists,        config_parse_unit_condition_path,   CONDITION_PATH_EXISTS,         0
 Unit.ConditionPathExistsGlob,    config_parse_unit_condition_path,   CONDITION_PATH_EXISTS_GLOB,    0
 Unit.ConditionPathIsDirectory,   config_parse_unit_condition_path,   CONDITION_PATH_IS_DIRECTORY,   0
@@ -162,6 +164,7 @@ Unit.ConditionDirectoryNotEmpty, config_parse_unit_condition_path,   CONDITION_D
 Unit.ConditionFileNotEmpty,      config_parse_unit_condition_path,   CONDITION_FILE_NOT_EMPTY,      0
 Unit.ConditionFileIsExecutable,  config_parse_unit_condition_path,   CONDITION_FILE_IS_EXECUTABLE,  0
 Unit.ConditionNeedsUpdate,       config_parse_unit_condition_path,   CONDITION_NEEDS_UPDATE,        0
+Unit.ConditionFirstBoot,         config_parse_unit_condition_string, CONDITION_FIRST_BOOT,          0
 Unit.ConditionKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, 0
 Unit.ConditionArchitecture,      config_parse_unit_condition_string, CONDITION_ARCHITECTURE,        0
 Unit.ConditionVirtualization,    config_parse_unit_condition_string, CONDITION_VIRTUALIZATION,      0
@@ -204,6 +207,9 @@ Service.NonBlocking,             config_parse_bool,                  0,
 Service.BusName,                 config_parse_unit_string_printf,    0,                             offsetof(Service, bus_name)
 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,           0,                             0')
 EXEC_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
@@ -230,6 +236,11 @@ Socket.DirectoryMode,            config_parse_mode,                  0,
 Socket.Accept,                   config_parse_bool,                  0,                             offsetof(Socket, accept)
 Socket.MaxConnections,           config_parse_unsigned,              0,                             offsetof(Socket, max_connections)
 Socket.KeepAlive,                config_parse_bool,                  0,                             offsetof(Socket, keep_alive)
+Socket.KeepAliveTimeSec,         config_parse_sec,                   0,                             offsetof(Socket, keep_alive_time)
+Socket.KeepAliveIntervalSec,     config_parse_sec,                   0,                             offsetof(Socket, keep_alive_interval)
+Socket.KeepAliveProbes,          config_parse_unsigned,              0,                             offsetof(Socket, keep_alive_cnt)
+Socket.DeferAcceptSec,           config_parse_sec,                   0,                             offsetof(Socket, defer_accept)
+Socket.NoDelay,                  config_parse_bool,                  0,                             offsetof(Socket, no_delay)
 Socket.Priority,                 config_parse_int,                   0,                             offsetof(Socket, priority)
 Socket.ReceiveBuffer,            config_parse_iec_size,              0,                             offsetof(Socket, receive_buffer)
 Socket.SendBuffer,               config_parse_iec_size,              0,                             offsetof(Socket, send_buffer)
@@ -256,6 +267,9 @@ Socket.SmackLabelIPOut,          config_parse_string,                0,
 `Socket.SmackLabel,              config_parse_warn_compat,           0,                             0
 Socket.SmackLabelIPIn,           config_parse_warn_compat,           0,                             0
 Socket.SmackLabelIPOut,          config_parse_warn_compat,           0,                             0')
+m4_ifdef(`HAVE_SELINUX',
+`Socket.SELinuxContextFromNet,   config_parse_bool,                  0,                             offsetof(Socket, selinux_context_from_net)',
+`Socket.SELinuxContextFromNet,   config_parse_warn_compat,           0,                             0')
 EXEC_CONTEXT_CONFIG_ITEMS(Socket)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Socket)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Socket)m4_dnl
@@ -285,6 +299,7 @@ Automount.DirectoryMode,         config_parse_mode,                  0,
 m4_dnl
 Swap.What,                       config_parse_path,                  0,                             offsetof(Swap, parameters_fragment.what)
 Swap.Priority,                   config_parse_int,                   0,                             offsetof(Swap, parameters_fragment.priority)
+Swap.Options,                    config_parse_string,                0,                             offsetof(Swap, parameters_fragment.options)
 Swap.TimeoutSec,                 config_parse_sec,                   0,                             offsetof(Swap, timeout_usec)
 EXEC_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
index b6894d22ae9f7e60675ad1094ce02c17b3abd609..e193a67dcd202150904b448761d5f18644f854e9 100644 (file)
@@ -84,7 +84,7 @@ int config_parse_warn_compat(
 }
 #endif
 
-int config_parse_unit_deps(const charunit,
+int config_parse_unit_deps(const char *unit,
                            const char *filename,
                            unsigned line,
                            const char *section,
@@ -97,18 +97,18 @@ int config_parse_unit_deps(const char* unit,
 
         UnitDependency d = ltype;
         Unit *u = userdata;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
 
         assert(filename);
         assert(lvalue);
         assert(rvalue);
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *t = NULL, *k = NULL;
                 int r;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
@@ -124,6 +124,8 @@ int config_parse_unit_deps(const char* unit,
                         log_syntax(unit, LOG_ERR, filename, line, -r,
                                    "Failed to add dependency on %s, ignoring: %s", k, strerror(-r));
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid syntax, ignoring.");
 
         return 0;
 }
@@ -227,7 +229,8 @@ int config_parse_unit_path_strv_printf(
                 void *data,
                 void *userdata) {
 
-        char *w, *state, ***x = data;
+        char ***x = data;
+        const char *word, *state;
         Unit *u = userdata;
         size_t l;
         int r;
@@ -237,11 +240,11 @@ int config_parse_unit_path_strv_printf(
         assert(rvalue);
         assert(u);
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *k = NULL;
                 char t[l+1];
 
-                memcpy(t, w, l);
+                memcpy(t, word, l);
                 t[l] = 0;
 
                 r = unit_full_printf(u, t, &k);
@@ -268,6 +271,8 @@ int config_parse_unit_path_strv_printf(
 
                 k = NULL;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid syntax, ignoring.");
 
         return 0;
 }
@@ -283,7 +288,8 @@ int config_parse_socket_listen(const char *unit,
                                void *data,
                                void *userdata) {
 
-        SocketPort *p, *tail;
+        _cleanup_free_ SocketPort *p = NULL;
+        SocketPort *tail;
         Socket *s;
         int r;
 
@@ -310,10 +316,9 @@ int config_parse_socket_listen(const char *unit,
                 r = unit_full_printf(UNIT(s), rvalue, &p->path);
                 if (r < 0) {
                         p->path = strdup(rvalue);
-                        if (!p->path) {
-                                free(p);
+                        if (!p->path)
                                 return log_oom();
-                        else
+                        else
                                 log_syntax(unit, LOG_ERR, filename, line, -r,
                                            "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
                 }
@@ -329,11 +334,10 @@ int config_parse_socket_listen(const char *unit,
                         log_syntax(unit, LOG_ERR, filename, line, -r,
                                    "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
 
-                r = socket_address_parse_netlink(&p->address, k ? k : rvalue);
+                r = socket_address_parse_netlink(&p->address, k ?: rvalue);
                 if (r < 0) {
                         log_syntax(unit, LOG_ERR, filename, line, -r,
                                    "Failed to parse address value, ignoring: %s", rvalue);
-                        free(p);
                         return 0;
                 }
 
@@ -350,7 +354,6 @@ int config_parse_socket_listen(const char *unit,
                 if (r < 0) {
                         log_syntax(unit, LOG_ERR, filename, line, -r,
                                    "Failed to parse address value, ignoring: %s", rvalue);
-                        free(p);
                         return 0;
                 }
 
@@ -366,7 +369,6 @@ int config_parse_socket_listen(const char *unit,
                 if (socket_address_family(&p->address) != AF_LOCAL && p->address.type == SOCK_SEQPACKET) {
                         log_syntax(unit, LOG_ERR, filename, line, ENOTSUP,
                                    "Address family not supported, ignoring: %s", rvalue);
-                        free(p);
                         return 0;
                 }
         }
@@ -379,6 +381,7 @@ int config_parse_socket_listen(const char *unit,
                 LIST_INSERT_AFTER(port, s->ports, tail, p);
         } else
                 LIST_PREPEND(port, s->ports, p);
+        p = NULL;
 
         return 0;
 }
@@ -533,9 +536,8 @@ int config_parse_exec(const char *unit,
          * overriding of argv[0]. */
         for (;;) {
                 int i;
-                char *w;
+                const char *word, *state;
                 size_t l;
-                char *state;
                 bool honour_argv0 = false, ignore = false;
 
                 path = NULL;
@@ -566,28 +568,34 @@ int config_parse_exec(const char *unit,
                 }
 
                 k = 0;
-                FOREACH_WORD_QUOTED(w, l, rvalue, state) {
-                        if (strneq(w, ";", MAX(l, 1U)))
-                                break;
+                FOREACH_WORD_QUOTED(word, l, rvalue, state) {
+                        if (strneq(word, ";", MAX(l, 1U)))
+                                goto found;
 
                         k++;
                 }
+                if (!isempty(state)) {
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Trailing garbage, ignoring.");
+                        return 0;
+                }
 
+        found:
                 n = new(char*, k + !honour_argv0);
                 if (!n)
                         return log_oom();
 
                 k = 0;
-                FOREACH_WORD_QUOTED(w, l, rvalue, state) {
-                        if (strneq(w, ";", MAX(l, 1U)))
+                FOREACH_WORD_QUOTED(word, l, rvalue, state) {
+                        if (strneq(word, ";", MAX(l, 1U)))
                                 break;
-                        else if (strneq(w, "\\;", MAX(l, 1U)))
-                                w ++;
+                        else if (strneq(word, "\\;", MAX(l, 1U)))
+                                word ++;
 
-                        if (honour_argv0 && w == rvalue) {
+                        if (honour_argv0 && word == rvalue) {
                                 assert(!path);
 
-                                path = strndup(w, l);
+                                path = strndup(word, l);
                                 if (!path) {
                                         r = log_oom();
                                         goto fail;
@@ -602,7 +610,7 @@ int config_parse_exec(const char *unit,
                         } else {
                                 char *c;
 
-                                c = n[k++] = cunescape_length(w, l);
+                                c = n[k++] = cunescape_length(word, l);
                                 if (!c) {
                                         r = log_oom();
                                         goto fail;
@@ -854,9 +862,8 @@ int config_parse_exec_cpu_affinity(const char *unit,
                                    void *userdata) {
 
         ExecContext *c = data;
-        char *w;
+        const char *word, *state;
         size_t l;
-        char *state;
 
         assert(filename);
         assert(lvalue);
@@ -871,12 +878,12 @@ int config_parse_exec_cpu_affinity(const char *unit,
                 return 0;
         }
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *t = NULL;
                 int r;
                 unsigned cpu;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
@@ -896,6 +903,9 @@ int config_parse_exec_cpu_affinity(const char *unit,
 
                 CPU_SET_S(cpu, CPU_ALLOC_SIZE(c->cpuset_ncpus), c->cpuset);
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_WARNING, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -945,9 +955,8 @@ int config_parse_exec_secure_bits(const char *unit,
                                   void *userdata) {
 
         ExecContext *c = data;
-        char *w;
         size_t l;
-        char *state;
+        const char *word, *state;
 
         assert(filename);
         assert(lvalue);
@@ -960,18 +969,18 @@ int config_parse_exec_secure_bits(const char *unit,
                 return 0;
         }
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
-                if (first_word(w, "keep-caps"))
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
+                if (first_word(word, "keep-caps"))
                         c->secure_bits |= 1<<SECURE_KEEP_CAPS;
-                else if (first_word(w, "keep-caps-locked"))
+                else if (first_word(word, "keep-caps-locked"))
                         c->secure_bits |= 1<<SECURE_KEEP_CAPS_LOCKED;
-                else if (first_word(w, "no-setuid-fixup"))
+                else if (first_word(word, "no-setuid-fixup"))
                         c->secure_bits |= 1<<SECURE_NO_SETUID_FIXUP;
-                else if (first_word(w, "no-setuid-fixup-locked"))
+                else if (first_word(word, "no-setuid-fixup-locked"))
                         c->secure_bits |= 1<<SECURE_NO_SETUID_FIXUP_LOCKED;
-                else if (first_word(w, "noroot"))
+                else if (first_word(word, "noroot"))
                         c->secure_bits |= 1<<SECURE_NOROOT;
-                else if (first_word(w, "noroot-locked"))
+                else if (first_word(word, "noroot-locked"))
                         c->secure_bits |= 1<<SECURE_NOROOT_LOCKED;
                 else {
                         log_syntax(unit, LOG_ERR, filename, line, EINVAL,
@@ -979,6 +988,9 @@ int config_parse_exec_secure_bits(const char *unit,
                         return 0;
                 }
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid syntax, garbage at the end, ignoring.");
 
         return 0;
 }
@@ -995,9 +1007,8 @@ int config_parse_bounding_set(const char *unit,
                               void *userdata) {
 
         uint64_t *capability_bounding_set_drop = data;
-        char *w;
+        const char *word, *state;
         size_t l;
-        char *state;
         bool invert = false;
         uint64_t sum = 0;
 
@@ -1016,12 +1027,12 @@ int config_parse_bounding_set(const char *unit,
          * non-inverted everywhere to have a fully normalized
          * interface. */
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *t = NULL;
                 int r;
                 cap_value_t cap;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
@@ -1034,6 +1045,9 @@ int config_parse_bounding_set(const char *unit,
 
                 sum |= ((uint64_t) 1ULL) << (uint64_t) cap;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         if (invert)
                 *capability_bounding_set_drop |= sum;
@@ -1163,9 +1177,8 @@ int config_parse_exec_mount_flags(const char *unit,
                                   void *userdata) {
 
         ExecContext *c = data;
-        char *w;
+        const char *word, *state;
         size_t l;
-        char *state;
         unsigned long flags = 0;
 
         assert(filename);
@@ -1173,10 +1186,10 @@ int config_parse_exec_mount_flags(const char *unit,
         assert(rvalue);
         assert(data);
 
-        FOREACH_WORD_SEPARATOR(w, l, rvalue, ", ", state) {
+        FOREACH_WORD_SEPARATOR(word, l, rvalue, ", ", state) {
                 _cleanup_free_ char *t;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
@@ -1184,13 +1197,17 @@ int config_parse_exec_mount_flags(const char *unit,
                         flags = MS_SHARED;
                 else if (streq(t, "slave"))
                         flags = MS_SLAVE;
-                else if (streq(w, "private"))
+                else if (streq(word, "private"))
                         flags = MS_PRIVATE;
                 else {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse mount flag %s, ignoring: %s", t, rvalue);
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Failed to parse mount flag %s, ignoring: %s", t, rvalue);
                         return 0;
                 }
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         c->mount_flags = flags;
         return 0;
@@ -1234,7 +1251,8 @@ int config_parse_exec_selinux_context(
 
         r = unit_name_printf(u, rvalue, &k);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", strerror(-r));
+                log_syntax(unit, LOG_ERR, filename, line, -r,
+                           "Failed to resolve specifiers, ignoring: %s", strerror(-r));
                 return 0;
         }
 
@@ -1283,7 +1301,8 @@ int config_parse_exec_apparmor_profile(
 
         r = unit_name_printf(u, rvalue, &k);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", strerror(-r));
+                log_syntax(unit, LOG_ERR, filename, line, -r,
+                           "Failed to resolve specifiers, ignoring: %s", strerror(-r));
                 return 0;
         }
 
@@ -1346,8 +1365,10 @@ int config_parse_timer(const char *unit,
         }
 
         v = new0(TimerValue, 1);
-        if (!v)
+        if (!v) {
+                calendar_spec_free(c);
                 return log_oom();
+        }
 
         v->base = b;
         v->value = u;
@@ -1505,18 +1526,21 @@ int config_parse_socket_service(const char *unit,
 
         r = unit_name_printf(UNIT(s), rvalue, &p);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, -r,
+                           "Failed to resolve specifiers, ignoring: %s", rvalue);
                 return 0;
         }
 
         if (!endswith(p, ".service")) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Unit must be of type service, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Unit must be of type service, ignoring: %s", rvalue);
                 return 0;
         }
 
         r = manager_load_unit(UNIT(s)->manager, p, NULL, &error, &x);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
+                log_syntax(unit, LOG_ERR, filename, line, -r,
+                           "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
                 return 0;
         }
 
@@ -1538,7 +1562,7 @@ int config_parse_service_sockets(const char *unit,
 
         Service *s = data;
         int r;
-        char *state, *w;
+        const char *word, *state;
         size_t l;
 
         assert(filename);
@@ -1546,10 +1570,10 @@ int config_parse_service_sockets(const char *unit,
         assert(rvalue);
         assert(data);
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *t = NULL, *k = NULL;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
@@ -1574,6 +1598,9 @@ int config_parse_service_sockets(const char *unit,
                 if (r < 0)
                         return r;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -1636,18 +1663,21 @@ int config_parse_busname_service(
 
         r = unit_name_printf(UNIT(n), rvalue, &p);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, -r,
+                           "Failed to resolve specifiers, ignoring: %s", rvalue);
                 return 0;
         }
 
         if (!endswith(p, ".service")) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Unit must be of type service, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Unit must be of type service, ignoring: %s", rvalue);
                 return 0;
         }
 
         r = manager_load_unit(UNIT(n)->manager, p, NULL, &error, &x);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
+                log_syntax(unit, LOG_ERR, filename, line, -r,
+                           "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
                 return 0;
         }
 
@@ -1656,7 +1686,7 @@ int config_parse_busname_service(
         return 0;
 }
 
-DEFINE_CONFIG_PARSE_ENUM(config_parse_bus_policy_world, busname_policy_access, BusNamePolicyAccess, "Failed to parse bus name policy access");
+DEFINE_CONFIG_PARSE_ENUM(config_parse_bus_policy_world, bus_policy_access, BusPolicyAccess, "Failed to parse bus name policy access");
 
 int config_parse_bus_policy(
                 const char *unit,
@@ -1697,7 +1727,8 @@ int config_parse_bus_policy(
 
         access_str = strpbrk(id_str, WHITESPACE);
         if (!access_str) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid busname policy value '%s'", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid busname policy value '%s'", rvalue);
                 return 0;
         }
 
@@ -1705,9 +1736,10 @@ int config_parse_bus_policy(
         access_str++;
         access_str += strspn(access_str, WHITESPACE);
 
-        p->access = busname_policy_access_from_string(access_str);
+        p->access = bus_policy_access_from_string(access_str);
         if (p->access < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid busname policy access type '%s'", access_str);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid busname policy access type '%s'", access_str);
                 return 0;
         }
 
@@ -1720,6 +1752,62 @@ int config_parse_bus_policy(
         return 0;
 }
 
+int config_parse_bus_endpoint_policy(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        _cleanup_free_ char *name = NULL;
+        BusPolicyAccess access;
+        ExecContext *c = data;
+        char *access_str;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        name = strdup(rvalue);
+        if (!name)
+                return log_oom();
+
+        access_str = strpbrk(name, WHITESPACE);
+        if (!access_str) {
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid endpoint policy value '%s'", rvalue);
+                return 0;
+        }
+
+        *access_str = '\0';
+        access_str++;
+        access_str += strspn(access_str, WHITESPACE);
+
+        access = bus_policy_access_from_string(access_str);
+        if (access <= _BUS_POLICY_ACCESS_INVALID ||
+            access >= _BUS_POLICY_ACCESS_MAX) {
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid endpoint policy access type '%s'", access_str);
+                return 0;
+        }
+
+        if (!c->bus_endpoint) {
+                r = bus_endpoint_new(&c->bus_endpoint);
+
+                if (r < 0)
+                        return r;
+        }
+
+        return bus_endpoint_add_policy(c->bus_endpoint, name, access);
+}
+
 int config_parse_unit_env_file(const char *unit,
                                const char *filename,
                                unsigned line,
@@ -1751,7 +1839,7 @@ int config_parse_unit_env_file(const char *unit,
 
         r = unit_full_printf(u, rvalue, &n);
         if (r < 0)
-                log_syntax(unit, LOG_ERR, filename, line, r,
+                log_syntax(unit, LOG_ERR, filename, line, -r,
                            "Failed to resolve specifiers, ignoring: %s", rvalue);
 
         s = n ?: rvalue;
@@ -1780,7 +1868,8 @@ int config_parse_environ(const char *unit,
                          void *userdata) {
 
         Unit *u = userdata;
-        char*** env = data, *w, *state;
+        char*** env = data;
+        const char *word, *state;
         size_t l;
         _cleanup_free_ char *k = NULL;
         int r;
@@ -1809,11 +1898,11 @@ int config_parse_environ(const char *unit,
         if (!k)
                 return log_oom();
 
-        FOREACH_WORD_QUOTED(w, l, k, state) {
+        FOREACH_WORD_QUOTED(word, l, k, state) {
                 _cleanup_free_ char *n;
                 char **x;
 
-                n = cunescape_length(w, l);
+                n = cunescape_length(word, l);
                 if (!n)
                         return log_oom();
 
@@ -1830,6 +1919,9 @@ int config_parse_environ(const char *unit,
                 strv_free(*env);
                 *env = x;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -2052,20 +2144,19 @@ int config_parse_unit_requires_mounts_for(
                 void *userdata) {
 
         Unit *u = userdata;
-        char *state;
+        const char *word, *state;
         size_t l;
-        char *w;
 
         assert(filename);
         assert(lvalue);
         assert(rvalue);
         assert(data);
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 int r;
                 _cleanup_free_ char *n;
 
-                n = strndup(w, l);
+                n = strndup(word, l);
                 if (!n)
                         return log_oom();
 
@@ -2076,11 +2167,14 @@ int config_parse_unit_requires_mounts_for(
 
                 r = unit_require_mounts_for(u, n);
                 if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, r,
+                        log_syntax(unit, LOG_ERR, filename, line, -r,
                                    "Failed to add required mount for, ignoring: %s", rvalue);
                         continue;
                 }
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -2156,7 +2250,7 @@ int config_parse_syscall_filter(
         ExecContext *c = data;
         Unit *u = userdata;
         bool invert = false;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -2179,7 +2273,7 @@ int config_parse_syscall_filter(
         }
 
         if (!c->syscall_filter) {
-                c->syscall_filter = set_new(trivial_hash_func, trivial_compare_func);
+                c->syscall_filter = set_new(NULL);
                 if (!c->syscall_filter)
                         return log_oom();
 
@@ -2209,17 +2303,18 @@ int config_parse_syscall_filter(
                 }
         }
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *t = NULL;
                 int id;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
                 id = seccomp_syscall_resolve_name(t);
                 if (id < 0)  {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse system call, ignoring: %s", t);
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Failed to parse system call, ignoring: %s", t);
                         continue;
                 }
 
@@ -2235,6 +2330,9 @@ int config_parse_syscall_filter(
                 } else
                         set_remove(c->syscall_filter, INT_TO_PTR(id + 1));
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         /* Turn on NNP, but only if it wasn't configured explicitly
          * before, and only if we are in user mode. */
@@ -2257,7 +2355,7 @@ int config_parse_syscall_archs(
                 void *userdata) {
 
         Set **archs = data;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -2267,21 +2365,22 @@ int config_parse_syscall_archs(
                 return 0;
         }
 
-        r = set_ensure_allocated(archs, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(archs, NULL);
         if (r < 0)
                 return log_oom();
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *t = NULL;
                 uint32_t a;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
                 r = seccomp_arch_from_string(t, &a);
                 if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse system call architecture, ignoring: %s", t);
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Failed to parse system call architecture, ignoring: %s", t);
                         continue;
                 }
 
@@ -2291,6 +2390,9 @@ int config_parse_syscall_archs(
                 if (r < 0)
                         return log_oom();
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -2322,7 +2424,8 @@ int config_parse_syscall_errno(
 
         e = errno_from_name(rvalue);
         if (e < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse error number, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Failed to parse error number, ignoring: %s", rvalue);
                 return 0;
         }
 
@@ -2345,7 +2448,7 @@ int config_parse_address_families(
         ExecContext *c = data;
         Unit *u = userdata;
         bool invert = false;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -2368,24 +2471,25 @@ int config_parse_address_families(
         }
 
         if (!c->address_families) {
-                c->address_families = set_new(trivial_hash_func, trivial_compare_func);
+                c->address_families = set_new(NULL);
                 if (!c->address_families)
                         return log_oom();
 
                 c->address_families_whitelist = !invert;
         }
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *t = NULL;
                 int af;
 
-                t = strndup(w, l);
+                t = strndup(word, l);
                 if (!t)
                         return log_oom();
 
                 af = af_from_name(t);
                 if (af <= 0)  {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse address family, ignoring: %s", t);
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Failed to parse address family, ignoring: %s", t);
                         continue;
                 }
 
@@ -2401,6 +2505,9 @@ int config_parse_address_families(
                 } else
                         set_remove(c->address_families, INT_TO_PTR(af));
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -2482,7 +2589,8 @@ int config_parse_cpu_shares(
 
         r = safe_atolu(rvalue, &lu);
         if (r < 0 || lu <= 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "CPU shares '%s' invalid. Ignoring.", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "CPU shares '%s' invalid. Ignoring.", rvalue);
                 return 0;
         }
 
@@ -2510,18 +2618,20 @@ int config_parse_cpu_quota(
         assert(rvalue);
 
         if (isempty(rvalue)) {
-                c->cpu_quota_per_sec_usec = (usec_t) -1;
+                c->cpu_quota_per_sec_usec = USEC_INFINITY;
                 return 0;
         }
 
         if (!endswith(rvalue, "%")) {
 
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "CPU quota '%s' not ending in '%%'. Ignoring.", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "CPU quota '%s' not ending in '%%'. Ignoring.", rvalue);
                 return 0;
         }
 
         if (sscanf(rvalue, "%lf%%", &percent) != 1 || percent <= 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "CPU quota '%s' invalid. Ignoring.", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "CPU quota '%s' invalid. Ignoring.", rvalue);
                 return 0;
         }
 
@@ -2555,7 +2665,8 @@ int config_parse_memory_limit(
 
         r = parse_size(rvalue, 1024, &bytes);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Memory limit '%s' invalid. Ignoring.", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Memory limit '%s' invalid. Ignoring.", rvalue);
                 return 0;
         }
 
@@ -2596,7 +2707,8 @@ int config_parse_device_allow(
         if (!startswith(path, "/dev/") &&
             !startswith(path, "block-") &&
             !startswith(path, "char-")) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid device node path '%s'. Ignoring.", path);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid device node path '%s'. Ignoring.", path);
                 return 0;
         }
 
@@ -2605,7 +2717,8 @@ int config_parse_device_allow(
                 m = "rwm";
 
         if (!in_charset(m, "rwm")) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid device rights '%s'. Ignoring.", m);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid device rights '%s'. Ignoring.", m);
                 return 0;
         }
 
@@ -2649,7 +2762,8 @@ int config_parse_blockio_weight(
 
         r = safe_atolu(rvalue, &lu);
         if (r < 0 || lu < 10 || lu > 1000) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Block IO weight '%s' invalid. Ignoring.", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Block IO weight '%s' invalid. Ignoring.", rvalue);
                 return 0;
         }
 
@@ -2691,7 +2805,8 @@ int config_parse_blockio_device_weight(
         n = strcspn(rvalue, WHITESPACE);
         weight = rvalue + n;
         if (!*weight) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Expected block device and device weight. Ignoring.");
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Expected block device and device weight. Ignoring.");
                 return 0;
         }
 
@@ -2700,14 +2815,16 @@ int config_parse_blockio_device_weight(
                 return log_oom();
 
         if (!path_startswith(path, "/dev")) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Invalid device node path '%s'. Ignoring.", path);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Invalid device node path '%s'. Ignoring.", path);
                 return 0;
         }
 
         weight += strspn(weight, WHITESPACE);
         r = safe_atolu(weight, &lu);
         if (r < 0 || lu < 10 || lu > 1000) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Block IO weight '%s' invalid. Ignoring.", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Block IO weight '%s' invalid. Ignoring.", rvalue);
                 return 0;
         }
 
@@ -2783,7 +2900,8 @@ int config_parse_blockio_bandwidth(
 
         r = parse_size(bandwidth, 1000, &bytes);
         if (r < 0 || bytes <= 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Block IO Bandwidth '%s' invalid. Ignoring.", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Block IO Bandwidth '%s' invalid. Ignoring.", rvalue);
                 return 0;
         }
 
@@ -2824,7 +2942,8 @@ int config_parse_job_mode_isolate(
 
         r = parse_boolean(rvalue);
         if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse boolean, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Failed to parse boolean, ignoring: %s", rvalue);
                 return 0;
         }
 
@@ -2874,7 +2993,8 @@ int config_parse_runtime_directory(
                 void *data,
                 void *userdata) {
 
-        char***rt = data, *w, *state;
+        char***rt = data;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -2890,15 +3010,16 @@ int config_parse_runtime_directory(
                 return 0;
         }
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *n;
 
-                n = strndup(w, l);
+                n = strndup(word, l);
                 if (!n)
                         return log_oom();
 
                 if (!filename_is_safe(n)) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Runtime directory is not valid, ignoring assignment: %s", rvalue);
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Runtime directory is not valid, ignoring assignment: %s", rvalue);
                         continue;
                 }
 
@@ -2908,6 +3029,9 @@ int config_parse_runtime_directory(
 
                 n = NULL;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -2924,9 +3048,8 @@ int config_parse_set_status(
                 void *data,
                 void *userdata) {
 
-        char *w;
         size_t l;
-        char *state;
+        const char *word, *state;
         int r;
         ExitStatusSet *status_set = data;
 
@@ -2941,11 +3064,11 @@ int config_parse_set_status(
                 return 0;
         }
 
-        FOREACH_WORD(w, l, rvalue, state) {
+        FOREACH_WORD(word, l, rvalue, state) {
                 _cleanup_free_ char *temp;
                 int val;
 
-                temp = strndup(w, l);
+                temp = strndup(word, l);
                 if (!temp)
                         return log_oom();
 
@@ -2953,36 +3076,33 @@ int config_parse_set_status(
                 if (r < 0) {
                         val = signal_from_string_try_harder(temp);
 
-                        if (val > 0) {
-                                r = set_ensure_allocated(&status_set->signal, NULL, NULL);
-                                if (r < 0)
-                                        return log_oom();
-
-                                r = set_put(status_set->signal, INT_TO_PTR(val));
-                                if (r < 0) {
-                                        log_syntax(unit, LOG_ERR, filename, line, -r, "Unable to store: %s", w);
-                                        return r;
-                                }
-                        } else {
-                                log_syntax(unit, LOG_ERR, filename, line, -val, "Failed to parse value, ignoring: %s", w);
+                        if (val <= 0) {
+                                log_syntax(unit, LOG_ERR, filename, line, -val,
+                                           "Failed to parse value, ignoring: %s", word);
                                 return 0;
                         }
                 } else {
-                        if (val < 0 || val > 255)
-                                log_syntax(unit, LOG_ERR, filename, line, ERANGE, "Value %d is outside range 0-255, ignoring", val);
-                        else {
-                                r = set_ensure_allocated(&status_set->status, NULL, NULL);
-                                if (r < 0)
-                                        return log_oom();
-
-                                r = set_put(status_set->status, INT_TO_PTR(val));
-                                if (r < 0) {
-                                        log_syntax(unit, LOG_ERR, filename, line, -r, "Unable to store: %s", w);
-                                        return r;
-                                }
+                        if (val < 0 || val > 255) {
+                                log_syntax(unit, LOG_ERR, filename, line, ERANGE,
+                                           "Value %d is outside range 0-255, ignoring", val);
+                                continue;
                         }
                 }
+
+                r = set_ensure_allocated(&status_set->status, NULL);
+                if (r < 0)
+                        return log_oom();
+
+                r = set_put(status_set->status, INT_TO_PTR(val));
+                if (r < 0) {
+                        log_syntax(unit, LOG_ERR, filename, line, -r,
+                                   "Unable to store: %s", word);
+                        return r;
+                }
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -2999,7 +3119,8 @@ int config_parse_namespace_path_strv(
                 void *data,
                 void *userdata) {
 
-        char*** sv = data, *w, *state;
+        char*** sv = data;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -3015,11 +3136,11 @@ int config_parse_namespace_path_strv(
                 return 0;
         }
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *n;
                 int offset;
 
-                n = strndup(w, l);
+                n = strndup(word, l);
                 if (!n)
                         return log_oom();
 
@@ -3030,7 +3151,8 @@ int config_parse_namespace_path_strv(
 
                 offset = n[0] == '-';
                 if (!path_is_absolute(n + offset)) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Not an absolute path, ignoring: %s", rvalue);
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Not an absolute path, ignoring: %s", rvalue);
                         continue;
                 }
 
@@ -3042,6 +3164,9 @@ int config_parse_namespace_path_strv(
 
                 n = NULL;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -3068,7 +3193,8 @@ int config_parse_no_new_privileges(
 
         k = parse_boolean(rvalue);
         if (k < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, -k, "Failed to parse boolean value, ignoring: %s", rvalue);
+                log_syntax(unit, LOG_ERR, filename, line, -k,
+                           "Failed to parse boolean value, ignoring: %s", rvalue);
                 return 0;
         }
 
@@ -3111,7 +3237,8 @@ int config_parse_protect_home(
 
                 h = protect_home_from_string(rvalue);
                 if (h < 0){
-                        log_syntax(unit, LOG_ERR, filename, line, -h, "Failed to parse protect home value, ignoring: %s", rvalue);
+                        log_syntax(unit, LOG_ERR, filename, line, -h,
+                                   "Failed to parse protect home value, ignoring: %s", rvalue);
                         return 0;
                 }
 
@@ -3154,7 +3281,8 @@ int config_parse_protect_system(
 
                 s = protect_system_from_string(rvalue);
                 if (s < 0){
-                        log_syntax(unit, LOG_ERR, filename, line, -s, "Failed to parse protect system value, ignoring: %s", rvalue);
+                        log_syntax(unit, LOG_ERR, filename, line, -s,
+                                   "Failed to parse protect system value, ignoring: %s", rvalue);
                         return 0;
                 }
 
@@ -3292,7 +3420,7 @@ static int load_from_path(Unit *u, const char *path) {
         assert(u);
         assert(path);
 
-        symlink_names = set_new(string_hash_func, string_compare_func);
+        symlink_names = set_new(&string_hash_ops);
         if (!symlink_names)
                 return -ENOMEM;
 
@@ -3368,9 +3496,10 @@ static int load_from_path(Unit *u, const char *path) {
                 u->load_state = UNIT_LOADED;
 
                 /* Now, parse the file contents */
-                r = config_parse(u->id, filename, f, UNIT_VTABLE(u)->sections,
-                                 config_item_perf_lookup,
-                                 (void*) load_fragment_gperf_lookup, false, true, u);
+                r = config_parse(u->id, filename, f,
+                                 UNIT_VTABLE(u)->sections,
+                                 config_item_perf_lookup, load_fragment_gperf_lookup,
+                                 false, true, false, u);
                 if (r < 0)
                         return r;
         }
index 9a1d7c5aaca31d295bc4cd641abc18340d5a4999..65100c9bd7e27d2754431cf3b8837ee872378108 100644 (file)
@@ -67,6 +67,7 @@ int config_parse_service_sockets(const char *unit, const char *filename, unsigne
 int config_parse_busname_service(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_bus_policy(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_bus_policy_world(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_bus_endpoint_policy(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_unit_env_file(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_ip_tos(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 int config_parse_unit_condition_path(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
index 7a4103504f643e5f99b78dc2e1c8e66cd62e3a9a..5177dbfd0862fe34119eca15c633b849ad7ce50e 100644 (file)
 #include "fileio.h"
 #include "strv.h"
 #include "env-util.h"
-
-enum {
-        /* We don't list LC_ALL here on purpose. People should be
-         * using LANG instead. */
-
-        VARIABLE_LANG,
-        VARIABLE_LANGUAGE,
-        VARIABLE_LC_CTYPE,
-        VARIABLE_LC_NUMERIC,
-        VARIABLE_LC_TIME,
-        VARIABLE_LC_COLLATE,
-        VARIABLE_LC_MONETARY,
-        VARIABLE_LC_MESSAGES,
-        VARIABLE_LC_PAPER,
-        VARIABLE_LC_NAME,
-        VARIABLE_LC_ADDRESS,
-        VARIABLE_LC_TELEPHONE,
-        VARIABLE_LC_MEASUREMENT,
-        VARIABLE_LC_IDENTIFICATION,
-        _VARIABLE_MAX
-};
-
-static const char * const variable_names[_VARIABLE_MAX] = {
-        [VARIABLE_LANG] = "LANG",
-        [VARIABLE_LANGUAGE] = "LANGUAGE",
-        [VARIABLE_LC_CTYPE] = "LC_CTYPE",
-        [VARIABLE_LC_NUMERIC] = "LC_NUMERIC",
-        [VARIABLE_LC_TIME] = "LC_TIME",
-        [VARIABLE_LC_COLLATE] = "LC_COLLATE",
-        [VARIABLE_LC_MONETARY] = "LC_MONETARY",
-        [VARIABLE_LC_MESSAGES] = "LC_MESSAGES",
-        [VARIABLE_LC_PAPER] = "LC_PAPER",
-        [VARIABLE_LC_NAME] = "LC_NAME",
-        [VARIABLE_LC_ADDRESS] = "LC_ADDRESS",
-        [VARIABLE_LC_TELEPHONE] = "LC_TELEPHONE",
-        [VARIABLE_LC_MEASUREMENT] = "LC_MEASUREMENT",
-        [VARIABLE_LC_IDENTIFICATION] = "LC_IDENTIFICATION"
-};
+#include "locale-util.h"
 
 int locale_setup(char ***environment) {
         char **add;
-        char *variables[_VARIABLE_MAX] = {};
+        char *variables[_VARIABLE_LC_MAX] = {};
         int r = 0, i;
 
         if (detect_container(NULL) <= 0) {
@@ -121,13 +84,13 @@ int locale_setup(char ***environment) {
         }
 
         add = NULL;
-        for (i = 0; i < _VARIABLE_MAX; i++) {
+        for (i = 0; i < _VARIABLE_LC_MAX; i++) {
                 char *s;
 
                 if (!variables[i])
                         continue;
 
-                s = strjoin(variable_names[i], "=", variables[i], NULL);
+                s = strjoin(locale_variable_to_string(i), "=", variables[i], NULL);
                 if (!s) {
                         r = -ENOMEM;
                         goto finish;
@@ -157,7 +120,7 @@ int locale_setup(char ***environment) {
 finish:
         strv_free(add);
 
-        for (i = 0; i < _VARIABLE_MAX; i++)
+        for (i = 0; i < _VARIABLE_LC_MAX; i++)
                 free(variables[i]);
 
         return r;
index d0156f2b48b3a8dbd2be043e7b5aff8fc31cf634..6ac1fffd75f9c74c2ec38fd5f1526f1530b64e30 100644 (file)
@@ -19,7 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <errno.h>
 #include <sys/socket.h>
 #include <net/if.h>
 #include <asm/types.h>
 #include "sd-rtnl.h"
 #include "rtnl-util.h"
 
-static int pipe_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
-        int *counter = userdata;
-        int r;
-
-        (*counter) --;
-
-        r = sd_rtnl_message_get_errno(m);
-
-        return r == -EEXIST ? 0 : r;
-}
-
-static int add_addresses(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_address, int *counter) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *ipv4 = NULL, *ipv6 = NULL;
-        int r;
-
-        r = sd_rtnl_message_new_addr(rtnl, &ipv4, RTM_NEWADDR, if_loopback, AF_INET);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_addr_set_prefixlen(ipv4, 8);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_addr_set_flags(ipv4, IFA_F_PERMANENT);
-        if (r < 0)
-                return r;
+/* this is hardcoded in the kernel, so don't look it up */
+#define LOOPBACK_IFINDEX 1
 
-        r = sd_rtnl_message_addr_set_scope(ipv4, RT_SCOPE_HOST);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_append_in_addr(ipv4, IFA_LOCAL, ipv4_address);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_call_async(rtnl, ipv4, &pipe_handler, counter, 0, NULL);
-        if (r < 0)
-                return r;
-
-        (*counter) ++;
-
-        if (!socket_ipv6_is_supported())
-                return 0;
-
-        r = sd_rtnl_message_new_addr(rtnl, &ipv6, RTM_NEWADDR, if_loopback, AF_INET6);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_addr_set_prefixlen(ipv6, 128);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_addr_set_flags(ipv6, IFA_F_PERMANENT);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_addr_set_scope(ipv6, RT_SCOPE_HOST);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_append_in6_addr(ipv6, IFA_LOCAL, &in6addr_loopback);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_call_async(rtnl, ipv6, &pipe_handler, counter, 0, NULL);
-        if (r < 0)
-                return r;
-
-        (*counter) ++;
-
-        return 0;
-}
-
-static int start_interface(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_address, int *counter) {
+static int start_loopback(sd_rtnl *rtnl) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
-        r = sd_rtnl_message_new_link(rtnl, &req, RTM_SETLINK, if_loopback);
+        r = sd_rtnl_message_new_link(rtnl, &req, RTM_SETLINK, LOOPBACK_IFINDEX);
         if (r < 0)
                 return r;
 
@@ -120,12 +49,10 @@ static int start_interface(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_
         if (r < 0)
                 return r;
 
-        r = sd_rtnl_call_async(rtnl, req, &pipe_handler, counter, 0, NULL);
+        r = sd_rtnl_call(rtnl, req, 0, NULL);
         if (r < 0)
                 return r;
 
-        (*counter) ++;
-
         return 0;
 }
 
@@ -157,49 +84,25 @@ static int check_loopback(void) {
 
 int loopback_setup(void) {
         _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
-        int r, if_loopback, counter = 0;
-        bool eperm = false;
-        struct in_addr ipv4_address;
-
-        errno = 0;
-        if_loopback = (int) if_nametoindex("lo");
-        if (if_loopback <= 0)
-                return errno ? -errno : -ENODEV;
-
-        ipv4_address.s_addr = htonl(INADDR_LOOPBACK);
+        int r;
 
         r = sd_rtnl_open(&rtnl, 0);
         if (r < 0)
                 return r;
 
-        r = add_addresses(rtnl, if_loopback, &ipv4_address, &counter);
-        if (r < 0)
-                return r;
-
-        r = start_interface(rtnl, if_loopback, &ipv4_address, &counter);
-        if (r < 0)
-                return r;
-
-        while (counter > 0) {
-                r = sd_rtnl_wait(rtnl, 0);
-                if (r < 0)
-                        return r;
-
-                r = sd_rtnl_process(rtnl, 0);
-                if (r < 0) {
-                        if (r == -EPERM)
-                                eperm = true;
-                        else {
-                                log_warning("Failed to configure loopback device: %s", strerror(-r));
-                                return r;
-                        }
+        r = start_loopback(rtnl);
+        if (r == -EPERM) {
+                if (check_loopback() < 0) {
+                        log_warning("Failed to configure loopback device: %s",
+                                    strerror(EPERM));
+                        return -EPERM;
                 }
+        } else if (r < 0) {
+                log_warning("Failed to configure loopback device: %s",
+                            strerror(-r));
+                return r;
         }
 
-        if (eperm && check_loopback() < 0) {
-                log_warning("Failed to configure loopback device: %s", strerror(EPERM));
-                return -EPERM;
-        }
 
         return 0;
 }
index f154800484f823fe1628b7a27826b3ab937ffb5c..efb074fcbda14d9ce8d78b084ee4f082196ea58d 100644 (file)
@@ -27,7 +27,7 @@
 #include <fcntl.h>
 #include <sys/mount.h>
 
-#include <systemd/sd-id128.h>
+#include "systemd/sd-id128.h"
 
 #include "machine-id-setup.h"
 #include "macro.h"
@@ -64,15 +64,16 @@ static int generate(char id[34], const char *root) {
         int fd, r;
         unsigned char *p;
         sd_id128_t buf;
-        char *q;
+        char  *q;
         ssize_t k;
-        const char *vm_id;
-        _cleanup_free_ char *dbus_machine_id = NULL;
+        const char *vm_id, *dbus_machine_id;
 
         assert(id);
 
-        if (asprintf(&dbus_machine_id, "%s/var/lib/dbus/machine-id", root) < 0)
-                return log_oom();
+        if (isempty(root))
+                dbus_machine_id = "/var/lib/dbus/machine-id";
+        else
+                dbus_machine_id = strappenda(root, "/var/lib/dbus/machine-id");
 
         /* First, try reading the D-Bus machine id, unless it is a symlink */
         fd = open(dbus_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
@@ -93,46 +94,48 @@ static int generate(char id[34], const char *root) {
                 }
         }
 
-        /* If that didn't work, see if we are running in a container,
-         * and a machine ID was passed in via $container_uuid the way
-         * libvirt/LXC does it */
-        r = detect_container(NULL);
-        if (r > 0) {
-                _cleanup_free_ char *e = NULL;
-
-                r = getenv_for_pid(1, "container_uuid", &e);
+        if (isempty(root)) {
+                /* If that didn't work, see if we are running in a container,
+                 * and a machine ID was passed in via $container_uuid the way
+                 * libvirt/LXC does it */
+                r = detect_container(NULL);
                 if (r > 0) {
-                        if (strlen(e) >= 36) {
-                                r = shorten_uuid(id, e);
-                                if (r >= 0) {
-                                        log_info("Initializing machine ID from container UUID.");
-                                        return 0;
-                                }
-                        }
-                }
-
-        } else {
-                /* If we are not running in a container, see if we are
-                 * running in qemu/kvm and a machine ID was passed in
-                 * via -uuid on the qemu/kvm command line */
+                        _cleanup_free_ char *e = NULL;
 
-                r = detect_vm(&vm_id);
-                if (r > 0 && streq(vm_id, "kvm")) {
-                        char uuid[37];
-
-                        fd = open("/sys/class/dmi/id/product_uuid", O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
-                        if (fd >= 0) {
-                                k = loop_read(fd, uuid, 36, false);
-                                safe_close(fd);
-
-                                if (k >= 36) {
-                                        r = shorten_uuid(id, uuid);
+                        r = getenv_for_pid(1, "container_uuid", &e);
+                        if (r > 0) {
+                                if (strlen(e) >= 36) {
+                                        r = shorten_uuid(id, e);
                                         if (r >= 0) {
-                                                log_info("Initializing machine ID from KVM UUID.");
+                                                log_info("Initializing machine ID from container UUID.");
                                                 return 0;
                                         }
                                 }
                         }
+
+                } else {
+                        /* If we are not running in a container, see if we are
+                         * running in qemu/kvm and a machine ID was passed in
+                         * via -uuid on the qemu/kvm command line */
+
+                        r = detect_vm(&vm_id);
+                        if (r > 0 && streq(vm_id, "kvm")) {
+                                char uuid[37];
+
+                                fd = open("/sys/class/dmi/id/product_uuid", O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
+                                if (fd >= 0) {
+                                        k = loop_read(fd, uuid, 36, false);
+                                        safe_close(fd);
+
+                                        if (k >= 36) {
+                                                r = shorten_uuid(id, uuid);
+                                                if (r >= 0) {
+                                                        log_info("Initializing machine ID from KVM UUID.");
+                                                        return 0;
+                                                }
+                                        }
+                                }
+                        }
                 }
         }
 
index 0d5f8949ab52f955adcc265d2d5a7714ce2899fb..bea6ef1da3cbdf93f351cfafced28a020e0c07c5 100644 (file)
@@ -43,6 +43,8 @@ if [ $1 -eq 1 ] ; then \
 fi \
 %{nil}
 
+%systemd_user_post() %systemd_post --user --global %{?*}
+
 %systemd_preun() \
 if [ $1 -eq 0 ] ; then \
         # Package removal, not upgrade \
@@ -51,10 +53,19 @@ if [ $1 -eq 0 ] ; then \
 fi \
 %{nil}
 
+%systemd_user_preun() \
+if [ $1 -eq 0 ] ; then \
+        # Package removal, not upgrade \
+        systemctl --no-reload --user --global disable %{?*} > /dev/null 2>&1 || : \
+fi \
+%{nil}
+
 %systemd_postun() \
 systemctl daemon-reload >/dev/null 2>&1 || : \
 %{nil}
 
+%systemd_user_postun() %{nil}
+
 %systemd_postun_with_restart() \
 systemctl daemon-reload >/dev/null 2>&1 || : \
 if [ $1 -ge 1 ] ; then \
@@ -63,6 +74,8 @@ if [ $1 -ge 1 ] ; then \
 fi \
 %{nil}
 
+%systemd_user_postun_with_restart() %{nil}
+
 %udev_hwdb_update() \
 udevadm hwdb --update >/dev/null 2>&1 || : \
 %{nil}
@@ -83,6 +96,10 @@ systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \
 systemd-sysusers %{?*} >/dev/null 2>&1 || : \
 %{nil}
 
+%sysusers_create_inline() \
+echo %{?*} | systemd-sysusers - >/dev/null 2>&1 || : \
+%{nil}
+
 %sysctl_apply() \
 @rootlibexecdir@/systemd-sysctl %{?*} >/dev/null 2>&1 || : \
 %{nil}
index 38835fc62008a724a4799a396226e51de6d62309..d48604e6739330f80a23d83822d16a864cc1c615 100644 (file)
@@ -50,6 +50,7 @@
 #include "conf-parser.h"
 #include "missing.h"
 #include "label.h"
+#include "pager.h"
 #include "build.h"
 #include "strv.h"
 #include "def.h"
@@ -94,6 +95,7 @@ static int arg_crash_chvt = -1;
 static bool arg_confirm_spawn = false;
 static ShowStatus arg_show_status = _SHOW_STATUS_UNSET;
 static bool arg_switched_root = false;
+static int arg_no_pager = -1;
 static char ***arg_join_controllers = NULL;
 static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL;
 static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
@@ -107,7 +109,7 @@ static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE;
 static char **arg_default_environment = NULL;
 static struct rlimit *arg_default_rlimit[_RLIMIT_MAX] = {};
 static uint64_t arg_capability_bounding_set_drop = 0;
-static nsec_t arg_timer_slack_nsec = (nsec_t) -1;
+static nsec_t arg_timer_slack_nsec = NSEC_INFINITY;
 static usec_t arg_default_timer_accuracy_usec = 1 * USEC_PER_MINUTE;
 static Set* arg_syscall_archs = NULL;
 static FILE* arg_serialization = NULL;
@@ -117,6 +119,14 @@ static bool arg_default_memory_accounting = false;
 
 static void nop_handler(int sig) {}
 
+static void pager_open_if_enabled(void) {
+
+        if (arg_no_pager <= 0)
+                return;
+
+        pager_open(false);
+}
+
 noreturn static void crash(int sig) {
 
         if (getpid() != 1)
@@ -218,31 +228,25 @@ static void install_crash_handler(void) {
         sigaction_many(&sa, SIGNALS_CRASH_HANDLER, -1);
 }
 
-static int console_setup(bool do_reset) {
-        int tty_fd, r;
-
-        /* If we are init, we connect stdin/stdout/stderr to /dev/null
-         * and make sure we don't have a controlling tty. */
-
-        release_terminal();
-
-        if (!do_reset)
-                return 0;
+static int console_setup(void) {
+        _cleanup_close_ int tty_fd = -1;
+        int r;
 
         tty_fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
         if (tty_fd < 0) {
                 log_error("Failed to open /dev/console: %s", strerror(-tty_fd));
-                return -tty_fd;
+                return tty_fd;
         }
 
-        /* We don't want to force text mode.
-         * plymouth may be showing pictures already from initrd. */
+        /* We don't want to force text mode.  plymouth may be showing
+         * pictures already from initrd. */
         r = reset_terminal_fd(tty_fd, false);
-        if (r < 0)
+        if (r < 0) {
                 log_error("Failed to reset /dev/console: %s", strerror(-r));
+                return r;
+        }
 
-        safe_close(tty_fd);
-        return r;
+        return 0;
 }
 
 static int set_default_unit(const char *u) {
@@ -265,6 +269,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
         static const char * const rlmap[] = {
                 "emergency", SPECIAL_EMERGENCY_TARGET,
                 "-b",        SPECIAL_EMERGENCY_TARGET,
+                "rescue",    SPECIAL_RESCUE_TARGET,
                 "single",    SPECIAL_RESCUE_TARGET,
                 "-s",        SPECIAL_RESCUE_TARGET,
                 "s",         SPECIAL_RESCUE_TARGET,
@@ -289,26 +294,6 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
                 if (in_initrd())
                         return set_default_unit(value);
 
-        } else if (streq(key, "systemd.log_target") && value) {
-
-                if (log_set_target_from_string(value) < 0)
-                        log_warning("Failed to parse log target %s. Ignoring.", value);
-
-        } else if (streq(key, "systemd.log_level") && value) {
-
-                if (log_set_max_level_from_string(value) < 0)
-                        log_warning("Failed to parse log level %s. Ignoring.", value);
-
-        } else if (streq(key, "systemd.log_color") && value) {
-
-                if (log_show_color_from_string(value) < 0)
-                        log_warning("Failed to parse log color setting %s. Ignoring.", value);
-
-        } else if (streq(key, "systemd.log_location") && value) {
-
-                if (log_show_location_from_string(value) < 0)
-                        log_warning("Failed to parse log location setting %s. Ignoring.", value);
-
         } else if (streq(key, "systemd.dump_core") && value) {
 
                 r = parse_boolean(value);
@@ -384,7 +369,8 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
 
         } else if (streq(key, "debug") && !value) {
 
-                log_set_max_level(LOG_DEBUG);
+                /* Note that log_parse_environment() handles 'debug'
+                 * too, and sets the log level to LOG_DEBUG. */
 
                 if (detect_container(NULL) > 0)
                         log_set_target(LOG_TARGET_CONSOLE);
@@ -445,9 +431,8 @@ static int config_parse_cpu_affinity2(
                 void *data,
                 void *userdata) {
 
-        char *w;
+        const char *word, *state;
         size_t l;
-        char *state;
         cpu_set_t *c = NULL;
         unsigned ncpus = 0;
 
@@ -455,12 +440,12 @@ static int config_parse_cpu_affinity2(
         assert(lvalue);
         assert(rvalue);
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 char *t;
                 int r;
                 unsigned cpu;
 
-                if (!(t = strndup(w, l)))
+                if (!(t = strndup(word, l)))
                         return log_oom();
 
                 r = safe_atou(t, &cpu);
@@ -479,6 +464,9 @@ static int config_parse_cpu_affinity2(
 
                 CPU_SET_S(cpu, CPU_ALLOC_SIZE(ncpus), c);
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         if (c) {
                 if (sched_setaffinity(0, CPU_ALLOC_SIZE(ncpus), c) < 0)
@@ -549,7 +537,7 @@ static int config_parse_join_controllers(const char *unit,
                                          void *userdata) {
 
         unsigned n = 0;
-        char *state, *w;
+        const char *word, *state;
         size_t length;
 
         assert(filename);
@@ -558,10 +546,10 @@ static int config_parse_join_controllers(const char *unit,
 
         free_join_controllers();
 
-        FOREACH_WORD_QUOTED(w, length, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, length, rvalue, state) {
                 char *s, **l;
 
-                s = strndup(w, length);
+                s = strndup(word, length);
                 if (!s)
                         return log_oom();
 
@@ -627,6 +615,9 @@ static int config_parse_join_controllers(const char *unit,
                         arg_join_controllers = t;
                 }
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -682,23 +673,13 @@ static int parse_config_file(void) {
                 {}
         };
 
-        _cleanup_fclose_ FILE *f;
         const char *fn;
-        int r;
 
         fn = arg_running_as == SYSTEMD_SYSTEM ? PKGSYSCONFDIR "/system.conf" : PKGSYSCONFDIR "/user.conf";
-        f = fopen(fn, "re");
-        if (!f) {
-                if (errno == ENOENT)
-                        return 0;
-
-                log_warning("Failed to open configuration file '%s': %m", fn);
-                return 0;
-        }
-
-        r = config_parse(NULL, fn, f, "Manager\0", config_item_table_lookup, (void*) items, false, false, NULL);
-        if (r < 0)
-                log_warning("Failed to parse configuration file: %s", strerror(-r));
+        config_parse(NULL, fn, NULL,
+                     "Manager\0",
+                     config_item_table_lookup, items,
+                     false, false, true, NULL);
 
         return 0;
 }
@@ -714,6 +695,7 @@ static int parse_argv(int argc, char *argv[]) {
                 ARG_SYSTEM,
                 ARG_USER,
                 ARG_TEST,
+                ARG_NO_PAGER,
                 ARG_VERSION,
                 ARG_DUMP_CONFIGURATION_ITEMS,
                 ARG_DUMP_CORE,
@@ -735,6 +717,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "system",                   no_argument,       NULL, ARG_SYSTEM                   },
                 { "user",                     no_argument,       NULL, ARG_USER                     },
                 { "test",                     no_argument,       NULL, ARG_TEST                     },
+                { "no-pager",                 no_argument,       NULL, ARG_NO_PAGER                 },
                 { "help",                     no_argument,       NULL, 'h'                          },
                 { "version",                  no_argument,       NULL, ARG_VERSION                  },
                 { "dump-configuration-items", no_argument,       NULL, ARG_DUMP_CONFIGURATION_ITEMS },
@@ -842,6 +825,12 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_TEST:
                         arg_action = ACTION_TEST;
+                        if (arg_no_pager < 0)
+                                arg_no_pager = true;
+                        break;
+
+                case ARG_NO_PAGER:
+                        arg_no_pager = true;
                         break;
 
                 case ARG_VERSION:
@@ -922,6 +911,8 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case 'h':
                         arg_action = ACTION_HELP;
+                        if (arg_no_pager < 0)
+                                arg_no_pager = true;
                         break;
 
                 case 'D':
@@ -937,13 +928,13 @@ static int parse_argv(int argc, char *argv[]) {
                          * parse_proc_cmdline_word() or ignore. */
 
                 case '?':
-                default:
-                        if (getpid() != 1) {
-                                log_error("Unknown option code %c", c);
+                        if (getpid() != 1)
                                 return -EINVAL;
-                        }
+                        else
+                                return 0;
 
-                        break;
+                default:
+                        assert_not_reached("Unhandled option code.");
                 }
 
         if (optind < argc && getpid() != 1) {
@@ -954,37 +945,6 @@ static int parse_argv(int argc, char *argv[]) {
                 return -EINVAL;
         }
 
-        if (detect_container(NULL) > 0) {
-                char **a;
-
-                /* All /proc/cmdline arguments the kernel didn't
-                 * understand it passed to us. We're not really
-                 * interested in that usually since /proc/cmdline is
-                 * more interesting and complete. With one exception:
-                 * if we are run in a container /proc/cmdline is not
-                 * relevant for the container, hence we rely on argv[]
-                 * instead. */
-
-                for (a = argv; a < argv + argc; a++) {
-                        _cleanup_free_ char *w;
-                        char *value;
-
-                        w = strdup(*a);
-                        if (!w)
-                                return log_oom();
-
-                        value = strchr(w, '=');
-                        if (value)
-                                *(value++) = 0;
-
-                        r = parse_proc_cmdline_item(w, value);
-                        if (r < 0) {
-                                log_error("Failed on cmdline argument %s: %s", *a, strerror(-r));
-                                return r;
-                        }
-                }
-        }
-
         return 0;
 }
 
@@ -994,6 +954,7 @@ static int help(void) {
                "Starts up and maintains the system or user services.\n\n"
                "  -h --help                      Show this help\n"
                "     --test                      Determine startup sequence, dump it and exit\n"
+               "     --no-pager                  Do not pipe output into a pager\n"
                "     --dump-configuration-items  Dump understood unit configuration items\n"
                "     --unit=UNIT                 Set default unit\n"
                "     --system                    Run a system instance, even if PID != 1\n"
@@ -1002,7 +963,7 @@ static int help(void) {
                "     --crash-shell[=0|1]         Run shell on crash\n"
                "     --confirm-spawn[=0|1]       Ask for confirmation when spawning processes\n"
                "     --show-status[=0|1]         Show status updates on the console during bootup\n"
-               "     --log-target=TARGET         Set log target (console, journal, syslog, kmsg, journal-or-kmsg, syslog-or-kmsg, null)\n"
+               "     --log-target=TARGET         Set log target (console, journal, kmsg, journal-or-kmsg, null)\n"
                "     --log-level=LEVEL           Set log level (debug, info, notice, warning, err, crit, alert, emerg)\n"
                "     --log-color[=0|1]           Highlight important log messages\n"
                "     --log-location[=0|1]        Include code location in log messages\n"
@@ -1312,6 +1273,7 @@ int main(int argc, char *argv[]) {
         saved_argc = argc;
 
         log_show_color(isatty(STDERR_FILENO) > 0);
+        log_set_upgrade_syslog_to_journal(true);
 
         /* Disable the umask logic */
         if (getpid() == 1)
@@ -1331,23 +1293,30 @@ int main(int argc, char *argv[]) {
                 if (!skip_setup) {
                         mount_setup_early();
                         dual_timestamp_get(&security_start_timestamp);
-                        if (selinux_setup(&loaded_policy) < 0)
+                        if (mac_selinux_setup(&loaded_policy) < 0)
                                 goto finish;
                         if (ima_setup() < 0)
                                 goto finish;
-                        if (smack_setup(&loaded_policy) < 0)
+                        if (mac_smack_setup(&loaded_policy) < 0)
                                 goto finish;
                         dual_timestamp_get(&security_finish_timestamp);
                 }
 
-                if (label_init(NULL) < 0)
+                if (mac_selinux_init(NULL) < 0)
                         goto finish;
 
                 if (!skip_setup) {
                         if (clock_is_localtime() > 0) {
                                 int min;
 
-                                /* The first-time call to settimeofday() does a time warp in the kernel */
+                                /*
+                                 * The very first call of settimeofday() also does a time warp in the kernel.
+                                 *
+                                 * In the rtc-in-local time mode, we set the kernel's timezone, and rely on
+                                 * external tools to take care of maintaining the RTC and do all adjustments.
+                                 * This matches the behavior of Windows, which leaves the RTC alone if the
+                                 * registry tells that the RTC runs in UTC.
+                                 */
                                 r = clock_set_timezone(&min);
                                 if (r < 0)
                                         log_error("Failed to apply local time delta, ignoring: %s", strerror(-r));
@@ -1355,19 +1324,19 @@ int main(int argc, char *argv[]) {
                                         log_info("RTC configured in localtime, applying delta of %i minutes to system time.", min);
                         } else if (!in_initrd()) {
                                 /*
-                                 * Do dummy first-time call to seal the kernel's time warp magic
+                                 * Do a dummy very first call to seal the kernel's time warp magic.
                                  *
                                  * Do not call this this from inside the initrd. The initrd might not
                                  * carry /etc/adjtime with LOCAL, but the real system could be set up
                                  * that way. In such case, we need to delay the time-warp or the sealing
                                  * until we reach the real system.
+                                 *
+                                 * Do no set the kernel's timezone. The concept of local time cannot
+                                 * be supported reliably, the time will jump or be incorrect at every daylight
+                                 * saving time change. All kernel local time concepts will be treated
+                                 * as UTC that way.
                                  */
-                                clock_reset_timezone();
-
-                                /* Tell the kernel our timezone */
-                                r = clock_set_timezone(NULL);
-                                if (r < 0)
-                                        log_error("Failed to set the kernel's timezone, ignoring: %s", strerror(-r));
+                                clock_reset_timewarp();
                         }
                 }
 
@@ -1437,6 +1406,8 @@ int main(int argc, char *argv[]) {
                 if (parse_proc_cmdline(parse_proc_cmdline_item) < 0)
                         goto finish;
 
+        /* Note that this also parses bits from the kernel command
+         * line, including "debug". */
         log_parse_environment();
 
         if (parse_argv(argc, argv) < 0)
@@ -1462,6 +1433,11 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
+        if (arg_action == ACTION_TEST)
+                skip_setup = true;
+
+        pager_open_if_enabled();
+
         if (arg_action == ACTION_HELP) {
                 retval = help();
                 goto finish;
@@ -1508,8 +1484,16 @@ int main(int argc, char *argv[]) {
 
         /* Reset the console, but only if this is really init and we
          * are freshly booted */
-        if (arg_running_as == SYSTEMD_SYSTEM && arg_action == ACTION_RUN)
-                console_setup(getpid() == 1 && !skip_setup);
+        if (arg_running_as == SYSTEMD_SYSTEM && arg_action == ACTION_RUN) {
+
+                /* If we are init, we connect stdin/stdout/stderr to
+                 * /dev/null and make sure we don't have a controlling
+                 * tty. */
+                release_terminal();
+
+                if (getpid() == 1 && !skip_setup)
+                        console_setup();
+        }
 
         /* Open the logging devices, if possible and necessary */
         log_open();
@@ -1530,7 +1514,8 @@ int main(int argc, char *argv[]) {
         if (arg_running_as == SYSTEMD_SYSTEM) {
                 const char *virtualization = NULL;
 
-                log_info(PACKAGE_STRING " running in system mode. (" SYSTEMD_FEATURES ")");
+                log_info(PACKAGE_STRING " running in %ssystem mode. (" SYSTEMD_FEATURES ")",
+                         arg_action == ACTION_TEST ? "test " : "" );
 
                 detect_virtualization(&virtualization);
                 if (virtualization)
@@ -1543,14 +1528,23 @@ int main(int argc, char *argv[]) {
                 if (in_initrd())
                         log_info("Running in initial RAM disk.");
 
-                empty_etc = dir_is_empty("/etc") > 0;
+                /* Let's check whether /etc is already populated. We
+                 * don't actually really check for that, but use
+                 * /etc/machine-id as flag file. This allows container
+                 * managers and installers to provision a couple of
+                 * files already. If the container manager wants to
+                 * provision the machine ID itself it should pass
+                 * $container_uuid to PID 1.*/
+
+                empty_etc = access("/etc/machine-id", F_OK) < 0;
                 if (empty_etc)
                         log_info("Running with unpopulated /etc.");
         } else {
                 _cleanup_free_ char *t;
 
                 t = uid_to_name(getuid());
-                log_debug(PACKAGE_STRING " running in user mode for user "UID_FMT"/%s. (" SYSTEMD_FEATURES ")", getuid(), strna(t));
+                log_debug(PACKAGE_STRING " running in %suser mode for user "UID_FMT"/%s. (" SYSTEMD_FEATURES ")",
+                          arg_action == ACTION_TEST ? " test" : "", getuid(), t);
         }
 
         if (arg_running_as == SYSTEMD_SYSTEM && !skip_setup) {
@@ -1571,7 +1565,7 @@ int main(int argc, char *argv[]) {
         if (arg_running_as == SYSTEMD_SYSTEM && arg_runtime_watchdog > 0)
                 watchdog_set_timeout(&arg_runtime_watchdog);
 
-        if (arg_timer_slack_nsec != (nsec_t) -1)
+        if (arg_timer_slack_nsec != NSEC_INFINITY)
                 if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0)
                         log_error("Failed to adjust timer slack: %m");
 
@@ -1615,7 +1609,7 @@ int main(int argc, char *argv[]) {
                 }
         }
 
-        r = manager_new(arg_running_as, &m);
+        r = manager_new(arg_running_as, arg_action == ACTION_TEST, &m);
         if (r < 0) {
                 log_error("Failed to allocate manager object: %s", strerror(-r));
                 goto finish;
@@ -1635,6 +1629,7 @@ int main(int argc, char *argv[]) {
         m->default_memory_accounting = arg_default_memory_accounting;
         m->runtime_watchdog = arg_runtime_watchdog;
         m->shutdown_watchdog = arg_shutdown_watchdog;
+
         m->userspace_timestamp = userspace_timestamp;
         m->kernel_timestamp = kernel_timestamp;
         m->initrd_timestamp = initrd_timestamp;
@@ -1644,6 +1639,7 @@ int main(int argc, char *argv[]) {
         manager_set_default_rlimits(m, arg_default_rlimit);
         manager_environment_add(m, NULL, arg_default_environment);
         manager_set_show_status(m, arg_show_status);
+        manager_set_first_boot(m, empty_etc);
 
         /* Remember whether we should queue the default job */
         queue_default_job = !arg_serialization || arg_switched_root;
@@ -1721,7 +1717,7 @@ int main(int argc, char *argv[]) {
                 after_startup = now(CLOCK_MONOTONIC);
                 log_full(arg_action == ACTION_TEST ? LOG_INFO : LOG_DEBUG,
                          "Loaded units and determined initial transaction in %s.",
-                         format_timespan(timespan, sizeof(timespan), after_startup - before_startup, 0));
+                         format_timespan(timespan, sizeof(timespan), after_startup - before_startup, 100 * USEC_PER_MSEC));
 
                 if (arg_action == ACTION_TEST) {
                         printf("-> By jobs:\n");
@@ -1799,6 +1795,8 @@ int main(int argc, char *argv[]) {
         }
 
 finish:
+        pager_close();
+
         if (m) {
                 manager_free(m);
                 m = NULL;
@@ -1820,12 +1818,11 @@ finish:
         set_free(arg_syscall_archs);
         arg_syscall_archs = NULL;
 
-        label_finish();
+        mac_selinux_finish();
 
         if (reexecute) {
                 const char **args;
                 unsigned i, args_size;
-                sigset_t ss;
 
                 /* Close and disarm the watchdog, so that the new
                  * instance can reinitialize it, but doesn't get
@@ -1845,10 +1842,10 @@ finish:
                          * deserializing. */
                         broadcast_signal(SIGTERM, false, true);
 
-                        /* And switch root */
-                        r = switch_root(switch_root_dir);
+                        /* And switch root with MS_MOVE, because we remove the old directory afterwards and detach it. */
+                        r = switch_root(switch_root_dir, "/mnt", true, MS_MOVE);
                         if (r < 0)
-                                log_error("Failed to switch root, ignoring: %s", strerror(-r));
+                                log_error("Failed to switch root, trying to continue: %s", strerror(-r));
                 }
 
                 args_size = MAX(6, argc+1);
@@ -1909,12 +1906,10 @@ finish:
                 args[i++] = NULL;
                 assert(i <= args_size);
 
-                /* reenable any blocked signals, especially important
+                /* Reenable any blocked signals, especially important
                  * if we switch from initial ramdisk to init=... */
                 reset_all_signal_handlers();
-
-                assert_se(sigemptyset(&ss) == 0);
-                assert_se(sigprocmask(SIG_SETMASK, &ss, NULL) == 0);
+                reset_signal_mask();
 
                 if (switch_root_init) {
                         args[0] = switch_root_init;
index 0cb2044325beb0f28448415e64432e357c5295f2..d427d88d4e5a111495ab719da3c56d2800f8e7ea 100644 (file)
@@ -25,6 +25,8 @@
 #include <signal.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#include <sys/inotify.h>
+#include <sys/epoll.h>
 #include <sys/poll.h>
 #include <sys/reboot.h>
 #include <sys/ioctl.h>
@@ -75,6 +77,7 @@
 #include "dbus-job.h"
 #include "dbus-manager.h"
 #include "bus-kernel.h"
+#include "time-util.h"
 
 /* As soon as 5s passed since a unit was added to our GC queue, make sure to run a gc sweep */
 #define GC_QUEUE_USEC_MAX (10*USEC_PER_SEC)
@@ -84,8 +87,6 @@
 #define JOBS_IN_PROGRESS_PERIOD_USEC (USEC_PER_SEC / 3)
 #define JOBS_IN_PROGRESS_PERIOD_DIVISOR 3
 
-#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
-
 static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata);
 static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata);
 static int manager_dispatch_time_change_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata);
@@ -193,7 +194,7 @@ static void manager_print_jobs_in_progress(Manager *m) {
         if (job_get_timeout(j, &x) > 0)
                 format_timespan(limit, sizeof(limit), x - j->begin_usec, 1*USEC_PER_SEC);
 
-        manager_status_printf(m, true, cylon,
+        manager_status_printf(m, STATUS_TYPE_EPHEMERAL, cylon,
                               "%sA %s job is running for %s (%s / %s)",
                               strempty(job_of_n),
                               job_type_to_string(j->type),
@@ -202,6 +203,96 @@ static void manager_print_jobs_in_progress(Manager *m) {
 
 }
 
+static int have_ask_password(void) {
+        _cleanup_closedir_ DIR *dir;
+
+        dir = opendir("/run/systemd/ask-password");
+        if (!dir) {
+                if (errno == ENOENT)
+                        return false;
+                else
+                        return -errno;
+        }
+
+        for (;;) {
+                struct dirent *de;
+
+                errno = 0;
+                de = readdir(dir);
+                if (!de && errno != 0)
+                        return -errno;
+                if (!de)
+                        return false;
+
+                if (startswith(de->d_name, "ask."))
+                        return true;
+        }
+}
+
+static int manager_dispatch_ask_password_fd(sd_event_source *source,
+                                            int fd, uint32_t revents, void *userdata) {
+        Manager *m = userdata;
+
+        assert(m);
+
+        flush_fd(fd);
+
+        m->have_ask_password = have_ask_password();
+        if (m->have_ask_password < 0)
+                /* Log error but continue. Negative have_ask_password
+                 * is treated as unknown status. */
+                log_error("Failed to list /run/systemd/ask-password: %s", strerror(m->have_ask_password));
+
+        return 0;
+}
+
+static void manager_close_ask_password(Manager *m) {
+        assert(m);
+
+        m->ask_password_inotify_fd = safe_close(m->ask_password_inotify_fd);
+        m->ask_password_event_source = sd_event_source_unref(m->ask_password_event_source);
+        m->have_ask_password = -EINVAL;
+}
+
+static int manager_check_ask_password(Manager *m) {
+        int r;
+
+        assert(m);
+
+        if (!m->ask_password_event_source) {
+                assert(m->ask_password_inotify_fd < 0);
+
+                mkdir_p_label("/run/systemd/ask-password", 0755);
+
+                m->ask_password_inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
+                if (m->ask_password_inotify_fd < 0) {
+                        log_error("inotify_init1() failed: %m");
+                        return -errno;
+                }
+
+                if (inotify_add_watch(m->ask_password_inotify_fd, "/run/systemd/ask-password", IN_CREATE|IN_DELETE|IN_MOVE) < 0) {
+                        log_error("Failed to add watch on /run/systemd/ask-password: %m");
+                        manager_close_ask_password(m);
+                        return -errno;
+                }
+
+                r = sd_event_add_io(m->event, &m->ask_password_event_source,
+                                    m->ask_password_inotify_fd, EPOLLIN,
+                                    manager_dispatch_ask_password_fd, m);
+                if (r < 0) {
+                        log_error("Failed to add event source for /run/systemd/ask-password: %m");
+                        manager_close_ask_password(m);
+                        return -errno;
+                }
+
+                /* Queries might have been added meanwhile... */
+                manager_dispatch_ask_password_fd(m->ask_password_event_source,
+                                                 m->ask_password_inotify_fd, EPOLLIN, m);
+        }
+
+        return m->have_ask_password;
+}
+
 static int manager_watch_idle_pipe(Manager *m) {
         int r;
 
@@ -241,6 +332,9 @@ static int manager_setup_time_change(Manager *m) {
         assert(m);
         assert_cc(sizeof(time_t) == sizeof(TIME_T_MAX));
 
+        if (m->test_run)
+                return 0;
+
         /* Uses TFD_TIMER_CANCEL_ON_SET to get notifications whenever
          * CLOCK_REALTIME makes a jump relative to CLOCK_MONOTONIC */
 
@@ -302,11 +396,17 @@ static int manager_setup_signals(Manager *m) {
 
         assert(m);
 
-        /* We are not interested in SIGSTOP and friends. */
+        if (m->test_run)
+                return 0;
+
         assert_se(sigaction(SIGCHLD, &sa, NULL) == 0);
 
-        assert_se(sigemptyset(&mask) == 0);
+        /* We make liberal use of realtime signals here. On
+         * Linux/glibc we have 30 of them (with the exception of Linux
+         * on hppa, see below), between SIGRTMIN+0 ... SIGRTMIN+30
+         * (aka SIGRTMAX). */
 
+        assert_se(sigemptyset(&mask) == 0);
         sigset_add_many(&mask,
                         SIGCHLD,     /* Child died */
                         SIGTERM,     /* Reexecute daemon */
@@ -316,6 +416,7 @@ static int manager_setup_signals(Manager *m) {
                         SIGINT,      /* Kernel sends us this on control-alt-del */
                         SIGWINCH,    /* Kernel sends us this on kbrequest (alt-arrowup) */
                         SIGPWR,      /* Some kernel drivers and upsd send us this on power failure */
+
                         SIGRTMIN+0,  /* systemd: start default.target */
                         SIGRTMIN+1,  /* systemd: isolate rescue.target */
                         SIGRTMIN+2,  /* systemd: isolate emergency.target */
@@ -323,19 +424,40 @@ static int manager_setup_signals(Manager *m) {
                         SIGRTMIN+4,  /* systemd: start poweroff.target */
                         SIGRTMIN+5,  /* systemd: start reboot.target */
                         SIGRTMIN+6,  /* systemd: start kexec.target */
+
+                        /* ... space for more special targets ... */
+
                         SIGRTMIN+13, /* systemd: Immediate halt */
                         SIGRTMIN+14, /* systemd: Immediate poweroff */
                         SIGRTMIN+15, /* systemd: Immediate reboot */
                         SIGRTMIN+16, /* systemd: Immediate kexec */
+
+                        /* ... space for more immediate system state changes ... */
+
                         SIGRTMIN+20, /* systemd: enable status messages */
                         SIGRTMIN+21, /* systemd: disable status messages */
                         SIGRTMIN+22, /* systemd: set log level to LOG_DEBUG */
                         SIGRTMIN+23, /* systemd: set log level to LOG_INFO */
                         SIGRTMIN+24, /* systemd: Immediate exit (--user only) */
+
+                        /* .. one free signal here ... */
+
+#if !defined(__hppa64__) && !defined(__hppa__)
+                        /* Apparently Linux on hppa has fewer RT
+                         * signals (SIGRTMAX is SIGRTMIN+25 there),
+                         * hence let's not try to make use of them
+                         * here. Since these commands are accessible
+                         * by different means and only really a safety
+                         * net, the missing functionality on hppa
+                         * shouldn't matter. */
+
                         SIGRTMIN+26, /* systemd: set log target to journal-or-kmsg */
                         SIGRTMIN+27, /* systemd: set log target to console */
                         SIGRTMIN+28, /* systemd: set log target to kmsg */
-                        SIGRTMIN+29, /* systemd: set log target to syslog-or-kmsg */
+                        SIGRTMIN+29, /* systemd: set log target to syslog-or-kmsg (obsolete)*/
+
+                        /* ... one free signal here SIGRTMIN+30 ... */
+#endif
                         -1);
         assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
 
@@ -348,7 +470,7 @@ static int manager_setup_signals(Manager *m) {
                 return r;
 
         /* Process signals a bit earlier than the rest of things, but
-         * later that notify_fd processing, so that the notify
+         * later than notify_fd processing, so that the notify
          * processing can still figure out to which process/service a
          * message belongs, before we reap the process. */
         r = sd_event_source_set_priority(m->signal_event_source, -5);
@@ -409,7 +531,7 @@ static int manager_default_environment(Manager *m) {
         return 0;
 }
 
-int manager_new(SystemdRunningAs running_as, Manager **_m) {
+int manager_new(SystemdRunningAs running_as, bool test_run, Manager **_m) {
         Manager *m;
         int r;
 
@@ -435,31 +557,36 @@ int manager_new(SystemdRunningAs running_as, Manager **_m) {
         m->pin_cgroupfs_fd = m->notify_fd = m->signal_fd = m->time_change_fd = m->dev_autofs_fd = m->private_listen_fd = m->kdbus_fd = -1;
         m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */
 
+        m->ask_password_inotify_fd = -1;
+        m->have_ask_password = -EINVAL; /* we don't know */
+
+        m->test_run = test_run;
+
         r = manager_default_environment(m);
         if (r < 0)
                 goto fail;
 
-        r = hashmap_ensure_allocated(&m->units, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&m->units, &string_hash_ops);
         if (r < 0)
                 goto fail;
 
-        r = hashmap_ensure_allocated(&m->jobs, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&m->jobs, NULL);
         if (r < 0)
                 goto fail;
 
-        r = hashmap_ensure_allocated(&m->cgroup_unit, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&m->cgroup_unit, &string_hash_ops);
         if (r < 0)
                 goto fail;
 
-        r = hashmap_ensure_allocated(&m->watch_bus, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&m->watch_bus, &string_hash_ops);
         if (r < 0)
                 goto fail;
 
-        r = set_ensure_allocated(&m->startup_units, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&m->startup_units, NULL);
         if (r < 0)
                 goto fail;
 
-        r = set_ensure_allocated(&m->failed_units, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&m->failed_units, NULL);
         if (r < 0)
                 goto fail;
 
@@ -514,15 +641,15 @@ fail:
 static int manager_setup_notify(Manager *m) {
         int r;
 
+        if (m->test_run)
+                return 0;
+
         if (m->notify_fd < 0) {
                 _cleanup_close_ int fd = -1;
-                union {
-                        struct sockaddr sa;
-                        struct sockaddr_un un;
-                } sa = {
+                union sockaddr_union sa =  {
                         .sa.sa_family = AF_UNIX,
                 };
-                int one = 1;
+                static const int one = 1;
 
                 /* First free all secondary fields */
                 free(m->notify_socket);
@@ -554,8 +681,22 @@ static int manager_setup_notify(Manager *m) {
                 strncpy(sa.un.sun_path, m->notify_socket, sizeof(sa.un.sun_path)-1);
                 r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path));
                 if (r < 0) {
-                        log_error("bind() failed: %m");
-                        return -errno;
+                        log_error("bind(%s) failed: %m", sa.un.sun_path);
+                        if (errno == EADDRINUSE) {
+                                log_notice("Removing %s socket and trying again.", m->notify_socket);
+                                r = unlink(m->notify_socket);
+                                if (r < 0) {
+                                        log_error("Failed to remove %s: %m", m->notify_socket);
+                                        return -EADDRINUSE;
+                                }
+
+                                r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path));
+                                if (r < 0) {
+                                        log_error("bind(%s) failed: %m", sa.un.sun_path);
+                                        return -errno;
+                                }
+                        } else
+                                return -errno;
                 }
 
                 r = setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one));
@@ -592,12 +733,10 @@ static int manager_setup_notify(Manager *m) {
 static int manager_setup_kdbus(Manager *m) {
 #ifdef ENABLE_KDBUS
         _cleanup_free_ char *p = NULL;
-#endif
 
-#ifdef ENABLE_KDBUS
         assert(m);
 
-        if (m->kdbus_fd >= 0)
+        if (m->test_run || m->kdbus_fd >= 0)
                 return 0;
 
         m->kdbus_fd = bus_kernel_create_bus(m->running_as == SYSTEMD_SYSTEM ? "system" : "user", m->running_as == SYSTEMD_SYSTEM, &p);
@@ -624,6 +763,9 @@ static int manager_connect_bus(Manager *m, bool reexecuting) {
 
         assert(m);
 
+        if (m->test_run)
+                return 0;
+
         try_bus_connect =
                 m->kdbus_fd >= 0 ||
                 reexecuting ||
@@ -812,6 +954,8 @@ void manager_free(Manager *m) {
         safe_close(m->time_change_fd);
         safe_close(m->kdbus_fd);
 
+        manager_close_ask_password(m);
+
         manager_close_idle_pipe(m);
 
         udev_unref(m->udev);
@@ -882,14 +1026,14 @@ static int manager_coldplug(Manager *m) {
 
 static void manager_build_unit_path_cache(Manager *m) {
         char **i;
-        _cleanup_free_ DIR *d = NULL;
+        _cleanup_closedir_ DIR *d = NULL;
         int r;
 
         assert(m);
 
         set_free_free(m->unit_path_cache);
 
-        m->unit_path_cache = set_new(string_hash_func, string_compare_func);
+        m->unit_path_cache = set_new(&string_hash_ops);
         if (!m->unit_path_cache) {
                 log_error("Failed to allocate unit path cache.");
                 return;
@@ -993,11 +1137,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
         dual_timestamp_get(&m->units_load_finish_timestamp);
 
         /* Second, deserialize if there is something to deserialize */
-        if (serialization) {
-                q = manager_deserialize(m, serialization, fds);
-                if (q < 0)
-                        r = q;
-        }
+        if (serialization)
+                r = manager_deserialize(m, serialization, fds);
 
         /* Any fds left? Find some unit which wants them. This is
          * useful to allow container managers to pass some file
@@ -1005,13 +1146,15 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
          * socket-based activation of entire containers. */
         if (fdset_size(fds) > 0) {
                 q = manager_distribute_fds(m, fds);
-                if (q < 0)
+                if (q < 0 && r == 0)
                         r = q;
         }
 
         /* We might have deserialized the notify fd, but if we didn't
          * then let's create the bus now */
-        manager_setup_notify(m);
+        q = manager_setup_notify(m);
+        if (q < 0 && r == 0)
+                r = q;
 
         /* We might have deserialized the kdbus control fd, but if we
          * didn't, then let's create the bus now. */
@@ -1021,7 +1164,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
 
         /* Third, fire things up! */
         q = manager_coldplug(m);
-        if (q < 0)
+        if (q < 0 && r == 0)
                 r = q;
 
         if (serialization) {
@@ -1390,7 +1533,7 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
                         .msg_controllen = sizeof(control),
                 };
                 struct ucred *ucred;
-                Unit *u;
+                Unit *u1, *u2, *u3;
 
                 n = recvmsg(m->notify_fd, &msghdr, MSG_DONTWAIT);
                 if (n <= 0) {
@@ -1416,21 +1559,23 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
                 assert((size_t) n < sizeof(buf));
                 buf[n] = 0;
 
-                u = manager_get_unit_by_pid(m, ucred->pid);
-                if (u) {
-                        manager_invoke_notify_message(m, u, ucred->pid, buf, n);
+                /* Notify every unit that might be interested, but try
+                 * to avoid notifying the same one multiple times. */
+                u1 = manager_get_unit_by_pid(m, ucred->pid);
+                if (u1) {
+                        manager_invoke_notify_message(m, u1, ucred->pid, buf, n);
                         found = true;
                 }
 
-                u = hashmap_get(m->watch_pids1, LONG_TO_PTR(ucred->pid));
-                if (u) {
-                        manager_invoke_notify_message(m, u, ucred->pid, buf, n);
+                u2 = hashmap_get(m->watch_pids1, LONG_TO_PTR(ucred->pid));
+                if (u2 && u2 != u1) {
+                        manager_invoke_notify_message(m, u2, ucred->pid, buf, n);
                         found = true;
                 }
 
-                u = hashmap_get(m->watch_pids2, LONG_TO_PTR(ucred->pid));
-                if (u) {
-                        manager_invoke_notify_message(m, u, ucred->pid, buf, n);
+                u3 = hashmap_get(m->watch_pids2, LONG_TO_PTR(ucred->pid));
+                if (u3 && u3 != u2 && u3 != u1) {
+                        manager_invoke_notify_message(m, u3, ucred->pid, buf, n);
                         found = true;
                 }
 
@@ -1477,7 +1622,7 @@ static int manager_dispatch_sigchld(Manager *m) {
 
                 if (si.si_code == CLD_EXITED || si.si_code == CLD_KILLED || si.si_code == CLD_DUMPED) {
                         _cleanup_free_ char *name = NULL;
-                        Unit *u;
+                        Unit *u1, *u2, *u3;
 
                         get_process_comm(si.si_pid, &name);
 
@@ -1491,15 +1636,15 @@ static int manager_dispatch_sigchld(Manager *m) {
 
                         /* And now figure out the unit this belongs
                          * to, it might be multiple... */
-                        u = manager_get_unit_by_pid(m, si.si_pid);
-                        if (u)
-                                invoke_sigchld_event(m, u, &si);
-                        u = hashmap_get(m->watch_pids1, LONG_TO_PTR(si.si_pid));
-                        if (u)
-                                invoke_sigchld_event(m, u, &si);
-                        u = hashmap_get(m->watch_pids2, LONG_TO_PTR(si.si_pid));
-                        if (u)
-                                invoke_sigchld_event(m, u, &si);
+                        u1 = manager_get_unit_by_pid(m, si.si_pid);
+                        if (u1)
+                                invoke_sigchld_event(m, u1, &si);
+                        u2 = hashmap_get(m->watch_pids1, LONG_TO_PTR(si.si_pid));
+                        if (u2 && u2 != u1)
+                                invoke_sigchld_event(m, u2, &si);
+                        u3 = hashmap_get(m->watch_pids2, LONG_TO_PTR(si.si_pid));
+                        if (u3 && u3 != u2 && u3 != u1)
+                                invoke_sigchld_event(m, u3, &si);
                 }
 
                 /* And now, we actually reap the zombie. */
@@ -1720,6 +1865,7 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
                                 break;
 
                         case 26:
+                        case 29: /* compatibility: used to be mapped to LOG_TARGET_SYSLOG_OR_KMSG */
                                 log_set_target(LOG_TARGET_JOURNAL_OR_KMSG);
                                 log_notice("Setting log target to journal-or-kmsg.");
                                 break;
@@ -1734,11 +1880,6 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
                                 log_notice("Setting log target to kmsg.");
                                 break;
 
-                        case 29:
-                                log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
-                                log_notice("Setting log target to syslog-or-kmsg.");
-                                break;
-
                         default:
                                 log_warning("Got unhandled signal <%s>.", signal_to_string(sfsi.ssi_signo));
                         }
@@ -1864,7 +2005,7 @@ int manager_loop(Manager *m) {
                         if (wait_usec <= 0)
                                 wait_usec = 1;
                 } else
-                        wait_usec = (usec_t) -1;
+                        wait_usec = USEC_INFINITY;
 
                 r = sd_event_run(m->event, wait_usec);
                 if (r < 0) {
@@ -1966,10 +2107,7 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) {
 }
 
 void manager_send_unit_plymouth(Manager *m, Unit *u) {
-        union sockaddr_union sa = {
-                .un.sun_family = AF_UNIX,
-                .un.sun_path = "\0/org/freedesktop/plymouthd",
-        };
+        union sockaddr_union sa = PLYMOUTH_SOCKET;
 
         int n = 0;
         _cleanup_free_ char *message = NULL;
@@ -2191,7 +2329,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
                         uint32_t id;
 
                         if (safe_atou32(l+15, &id) < 0)
-                                log_debug("Failed to parse current job id value %s", l+15);
+                                log_warning("Failed to parse current job id value %s", l+15);
                         else
                                 m->current_job_id = MAX(m->current_job_id, id);
 
@@ -2199,7 +2337,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
                         uint32_t n;
 
                         if (safe_atou32(l+17, &n) < 0)
-                                log_debug("Failed to parse installed jobs counter %s", l+17);
+                                log_warning("Failed to parse installed jobs counter %s", l+17);
                         else
                                 m->n_installed_jobs += n;
 
@@ -2207,7 +2345,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
                         uint32_t n;
 
                         if (safe_atou32(l+14, &n) < 0)
-                                log_debug("Failed to parse failed jobs counter %s", l+14);
+                                log_warning("Failed to parse failed jobs counter %s", l+14);
                         else
                                 m->n_failed_jobs += n;
 
@@ -2216,7 +2354,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
 
                         b = parse_boolean(l+10);
                         if (b < 0)
-                                log_debug("Failed to parse taint /usr flag %s", l+10);
+                                log_warning("Failed to parse taint /usr flag %s", l+10);
                         else
                                 m->taint_usr = m->taint_usr || b;
 
@@ -2267,7 +2405,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
                         int fd;
 
                         if (safe_atoi(l + 10, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
-                                log_debug("Failed to parse notify fd: %s", l + 10);
+                                log_warning("Failed to parse notify fd: %s", l + 10);
                         else {
                                 m->notify_event_source = sd_event_source_unref(m->notify_event_source);
                                 safe_close(m->notify_fd);
@@ -2290,14 +2428,14 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
                         int fd;
 
                         if (safe_atoi(l + 9, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
-                                log_debug("Failed to parse kdbus fd: %s", l + 9);
+                                log_warning("Failed to parse kdbus fd: %s", l + 9);
                         else {
                                 safe_close(m->kdbus_fd);
                                 m->kdbus_fd = fdset_remove(fds, fd);
                         }
 
                 } else if (bus_track_deserialize_item(&m->deserialized_subscribed, l) == 0)
-                        log_debug("Unknown serialization item '%s'", l);
+                        log_warning("Unknown serialization item '%s'", l);
         }
 
         for (;;) {
@@ -2459,10 +2597,8 @@ void manager_check_finished(Manager *m) {
 
         if (hashmap_size(m->jobs) > 0) {
 
-                if (m->jobs_in_progress_event_source) {
-                        sd_event_source_set_time(m->jobs_in_progress_event_source,
-                                                 now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
-                }
+                if (m->jobs_in_progress_event_source)
+                        sd_event_source_set_time(m->jobs_in_progress_event_source, now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC);
 
                 return;
         }
@@ -2476,6 +2612,12 @@ void manager_check_finished(Manager *m) {
         /* Turn off confirm spawn now */
         m->confirm_spawn = false;
 
+        /* No need to update ask password status when we're going non-interactive */
+        manager_close_ask_password(m);
+
+        /* This is no longer the first boot */
+        manager_set_first_boot(m, false);
+
         if (dual_timestamp_is_set(&m->finish_timestamp))
                 return;
 
@@ -2498,53 +2640,52 @@ void manager_check_finished(Manager *m) {
                         kernel_usec = m->initrd_timestamp.monotonic - m->kernel_timestamp.monotonic;
                         initrd_usec = m->userspace_timestamp.monotonic - m->initrd_timestamp.monotonic;
 
-                        if (!log_on_console())
-                                log_struct(LOG_INFO,
-                                           MESSAGE_ID(SD_MESSAGE_STARTUP_FINISHED),
-                                           "KERNEL_USEC="USEC_FMT, kernel_usec,
-                                           "INITRD_USEC="USEC_FMT, initrd_usec,
-                                           "USERSPACE_USEC="USEC_FMT, userspace_usec,
-                                           "MESSAGE=Startup finished in %s (kernel) + %s (initrd) + %s (userspace) = %s.",
-                                           format_timespan(kernel, sizeof(kernel), kernel_usec, USEC_PER_MSEC),
-                                           format_timespan(initrd, sizeof(initrd), initrd_usec, USEC_PER_MSEC),
-                                           format_timespan(userspace, sizeof(userspace), userspace_usec, USEC_PER_MSEC),
-                                           format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC),
-                                           NULL);
+                        log_struct(LOG_INFO,
+                                   MESSAGE_ID(SD_MESSAGE_STARTUP_FINISHED),
+                                   "KERNEL_USEC="USEC_FMT, kernel_usec,
+                                   "INITRD_USEC="USEC_FMT, initrd_usec,
+                                   "USERSPACE_USEC="USEC_FMT, userspace_usec,
+                                   "MESSAGE=Startup finished in %s (kernel) + %s (initrd) + %s (userspace) = %s.",
+                                   format_timespan(kernel, sizeof(kernel), kernel_usec, USEC_PER_MSEC),
+                                   format_timespan(initrd, sizeof(initrd), initrd_usec, USEC_PER_MSEC),
+                                   format_timespan(userspace, sizeof(userspace), userspace_usec, USEC_PER_MSEC),
+                                   format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC),
+                                   NULL);
                 } else {
                         kernel_usec = m->userspace_timestamp.monotonic - m->kernel_timestamp.monotonic;
                         initrd_usec = 0;
 
-                        if (!log_on_console())
-                                log_struct(LOG_INFO,
-                                           MESSAGE_ID(SD_MESSAGE_STARTUP_FINISHED),
-                                           "KERNEL_USEC="USEC_FMT, kernel_usec,
-                                           "USERSPACE_USEC="USEC_FMT, userspace_usec,
-                                           "MESSAGE=Startup finished in %s (kernel) + %s (userspace) = %s.",
-                                           format_timespan(kernel, sizeof(kernel), kernel_usec, USEC_PER_MSEC),
-                                           format_timespan(userspace, sizeof(userspace), userspace_usec, USEC_PER_MSEC),
-                                           format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC),
-                                           NULL);
-                }
-        } else {
-                firmware_usec = loader_usec = initrd_usec = kernel_usec = 0;
-                total_usec = userspace_usec = m->finish_timestamp.monotonic - m->userspace_timestamp.monotonic;
-
-                if (!log_on_console())
                         log_struct(LOG_INFO,
                                    MESSAGE_ID(SD_MESSAGE_STARTUP_FINISHED),
+                                   "KERNEL_USEC="USEC_FMT, kernel_usec,
                                    "USERSPACE_USEC="USEC_FMT, userspace_usec,
-                                   "MESSAGE=Startup finished in %s.",
+                                   "MESSAGE=Startup finished in %s (kernel) + %s (userspace) = %s.",
+                                   format_timespan(kernel, sizeof(kernel), kernel_usec, USEC_PER_MSEC),
+                                   format_timespan(userspace, sizeof(userspace), userspace_usec, USEC_PER_MSEC),
                                    format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC),
                                    NULL);
+                }
+        } else {
+                firmware_usec = loader_usec = initrd_usec = kernel_usec = 0;
+                total_usec = userspace_usec = m->finish_timestamp.monotonic - m->userspace_timestamp.monotonic;
+
+                log_struct(LOG_INFO,
+                           MESSAGE_ID(SD_MESSAGE_STARTUP_FINISHED),
+                           "USERSPACE_USEC="USEC_FMT, userspace_usec,
+                           "MESSAGE=Startup finished in %s.",
+                           format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC),
+                           NULL);
         }
 
         SET_FOREACH(u, m->startup_units, i)
-                cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
+                if (u->cgroup_path)
+                        cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
 
         bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);
 
         sd_notifyf(false,
-                   "READY=1\nSTATUS=Startup finished in %s.",
+                   "READY=1\n"
+                   "STATUS=Startup finished in %s.",
                    format_timespan(sum, sizeof(sum), total_usec, USEC_PER_MSEC));
 }
 
@@ -2632,6 +2773,9 @@ void manager_run_generators(Manager *m) {
 
         assert(m);
 
+        if (m->test_run)
+                return;
+
         generator_path = m->running_as == SYSTEMD_SYSTEM ? SYSTEM_GENERATOR_PATH : USER_GENERATOR_PATH;
         d = opendir(generator_path);
         if (!d) {
@@ -2708,8 +2852,10 @@ int manager_environment_add(Manager *m, char **minus, char **plus) {
 
         if (!strv_isempty(plus)) {
                 b = strv_env_merge(2, l, plus);
-                if (!b)
+                if (!b) {
+                        strv_free(a);
                         return -ENOMEM;
+                }
 
                 l = b;
         }
@@ -2785,7 +2931,7 @@ void manager_set_show_status(Manager *m, ShowStatus mode) {
                 unlink("/run/systemd/show-status");
 }
 
-static bool manager_get_show_status(Manager *m) {
+static bool manager_get_show_status(Manager *m, StatusType type) {
         assert(m);
 
         if (m->running_as != SYSTEMD_SYSTEM)
@@ -2794,7 +2940,11 @@ static bool manager_get_show_status(Manager *m) {
         if (m->no_console_output)
                 return false;
 
-        if (!IN_SET(manager_state(m), MANAGER_STARTING, MANAGER_STOPPING))
+        if (!IN_SET(manager_state(m), MANAGER_INITIALIZING, MANAGER_STARTING, MANAGER_STOPPING))
+                return false;
+
+        /* If we cannot find out the status properly, just proceed. */
+        if (type != STATUS_TYPE_EMERGENCY && manager_check_ask_password(m) > 0)
                 return false;
 
         if (m->show_status > 0)
@@ -2802,23 +2952,36 @@ static bool manager_get_show_status(Manager *m) {
 
         /* If Plymouth is running make sure we show the status, so
          * that there's something nice to see when people press Esc */
-
         return plymouth_running();
 }
 
-void manager_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...) {
+void manager_set_first_boot(Manager *m, bool b) {
+        assert(m);
+
+        if (m->running_as != SYSTEMD_SYSTEM)
+                return;
+
+        m->first_boot = b;
+
+        if (m->first_boot)
+                touch("/run/systemd/first-boot");
+        else
+                unlink("/run/systemd/first-boot");
+}
+
+void manager_status_printf(Manager *m, StatusType type, const char *status, const char *format, ...) {
         va_list ap;
 
-        if (!manager_get_show_status(m))
+        if (!manager_get_show_status(m, type))
                 return;
 
         /* XXX We should totally drop the check for ephemeral here
          * and thus effectively make 'Type=idle' pointless. */
-        if (ephemeral && m->n_on_console > 0)
+        if (type == STATUS_TYPE_EPHEMERAL && m->n_on_console > 0)
                 return;
 
         va_start(ap, format);
-        status_vprintf(status, true, ephemeral, format, ap);
+        status_vprintf(status, true, type == STATUS_TYPE_EPHEMERAL, format, ap);
         va_end(ap);
 }
 
@@ -2871,8 +3034,14 @@ ManagerState manager_state(Manager *m) {
         assert(m);
 
         /* Did we ever finish booting? If not then we are still starting up */
-        if (!dual_timestamp_is_set(&m->finish_timestamp))
+        if (!dual_timestamp_is_set(&m->finish_timestamp)) {
+
+                u = manager_get_unit(m, SPECIAL_BASIC_TARGET);
+                if (!u || !UNIT_IS_ACTIVE_OR_RELOADING(unit_active_state(u)))
+                        return MANAGER_INITIALIZING;
+
                 return MANAGER_STARTING;
+        }
 
         /* Is the special shutdown target queued? If so, we are in shutdown state */
         u = manager_get_unit(m, SPECIAL_SHUTDOWN_TARGET);
@@ -2898,6 +3067,7 @@ ManagerState manager_state(Manager *m) {
 }
 
 static const char *const manager_state_table[_MANAGER_STATE_MAX] = {
+        [MANAGER_INITIALIZING] = "initializing",
         [MANAGER_STARTING] = "starting",
         [MANAGER_RUNNING] = "running",
         [MANAGER_DEGRADED] = "degraded",
index f2c1b0d227699e06fa3fa4b5156a39ded3f3c4af..ab7254849c39306efed0113817259eadd71a56e5 100644 (file)
@@ -36,6 +36,7 @@
 typedef struct Manager Manager;
 
 typedef enum ManagerState {
+        MANAGER_INITIALIZING,
         MANAGER_STARTING,
         MANAGER_RUNNING,
         MANAGER_DEGRADED,
@@ -59,6 +60,12 @@ typedef enum ManagerExitCode {
         _MANAGER_EXIT_CODE_INVALID = -1
 } ManagerExitCode;
 
+typedef enum StatusType {
+        STATUS_TYPE_EPHEMERAL,
+        STATUS_TYPE_NORMAL,
+        STATUS_TYPE_EMERGENCY,
+} StatusType;
+
 #include "unit.h"
 #include "job.h"
 #include "hashmap.h"
@@ -69,6 +76,7 @@ typedef enum ManagerExitCode {
 #include "unit-name.h"
 #include "exit-status.h"
 #include "show-status.h"
+#include "failure-action.h"
 
 struct Manager {
         /* Note that the set of units we know of is allowed to be
@@ -152,6 +160,7 @@ struct Manager {
         dual_timestamp initrd_timestamp;
         dual_timestamp userspace_timestamp;
         dual_timestamp finish_timestamp;
+
         dual_timestamp security_start_timestamp;
         dual_timestamp security_finish_timestamp;
         dual_timestamp generators_start_timestamp;
@@ -228,6 +237,9 @@ struct Manager {
         bool dispatching_dbus_queue:1;
 
         bool taint_usr:1;
+        bool first_boot:1;
+
+        bool test_run:1;
 
         ShowStatus show_status;
         bool confirm_spawn;
@@ -259,6 +271,11 @@ struct Manager {
         unsigned n_on_console;
         unsigned jobs_in_progress_iteration;
 
+        /* Do we have any outstanding password prompts? */
+        int have_ask_password;
+        int ask_password_inotify_fd;
+        sd_event_source *ask_password_event_source;
+
         /* Type=idle pipes */
         int idle_pipe[4];
         sd_event_source *idle_pipe_event_source;
@@ -273,9 +290,12 @@ struct Manager {
 
         /* Reference to the kdbus bus control fd */
         int kdbus_fd;
+
+        /* Used for processing polkit authorization responses */
+        Hashmap *polkit_registry;
 };
 
-int manager_new(SystemdRunningAs running_as, Manager **m);
+int manager_new(SystemdRunningAs running_as, bool test_run, Manager **m);
 void manager_free(Manager *m);
 
 int manager_enumerate(Manager *m);
@@ -333,7 +353,9 @@ void manager_undo_generators(Manager *m);
 void manager_recheck_journal(Manager *m);
 
 void manager_set_show_status(Manager *m, ShowStatus mode);
-void manager_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...) _printf_(4,5);
+void manager_set_first_boot(Manager *m, bool b);
+
+void manager_status_printf(Manager *m, StatusType type, const char *status, const char *format, ...) _printf_(4,5);
 void manager_flip_auto_status(Manager *m, bool enable);
 
 Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path);
index 206f89a30f189b40a0272892a026d443403abe3c..cda25ede13bcaf8775486a74f3486690979d8c3d 100644 (file)
@@ -63,8 +63,13 @@ typedef struct MountPoint {
 
 /* The first three entries we might need before SELinux is up. The
  * fourth (securityfs) is needed by IMA to load a custom policy. The
- * other ones we can delay until SELinux and IMA are loaded. */
+ * other ones we can delay until SELinux and IMA are loaded. When
+ * SMACK is enabled we need smackfs, too, so it's a fifth one. */
+#ifdef HAVE_SMACK
 #define N_EARLY_MOUNT 5
+#else
+#define N_EARLY_MOUNT 4
+#endif
 
 static const MountPoint mount_table[] = {
         { "sysfs",      "/sys",                      "sysfs",      NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
@@ -77,9 +82,9 @@ static const MountPoint mount_table[] = {
           NULL,       MNT_NONE },
 #ifdef HAVE_SMACK
         { "smackfs",    "/sys/fs/smackfs",           "smackfs",    "smackfsdef=*", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
-          use_smack,  MNT_FATAL },
+          mac_smack_use, MNT_FATAL },
         { "tmpfs",      "/dev/shm",                  "tmpfs",      "mode=1777,smackfsroot=*", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
-          use_smack,  MNT_FATAL },
+          mac_smack_use, MNT_FATAL },
 #endif
         { "tmpfs",      "/dev/shm",                  "tmpfs",      "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
           NULL,       MNT_FATAL|MNT_IN_CONTAINER },
@@ -87,7 +92,7 @@ static const MountPoint mount_table[] = {
           NULL,       MNT_IN_CONTAINER },
 #ifdef HAVE_SMACK
         { "tmpfs",      "/run",                      "tmpfs",      "mode=755,smackfsroot=*", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
-          use_smack,  MNT_FATAL },
+          mac_smack_use, MNT_FATAL },
 #endif
         { "tmpfs",      "/run",                      "tmpfs",      "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
           NULL,       MNT_FATAL|MNT_IN_CONTAINER },
@@ -230,7 +235,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
                 return 0;
         }
 
-        controllers = set_new(string_hash_func, string_compare_func);
+        controllers = set_new(&string_hash_ops);
         if (!controllers)
                 return log_oom();
 
@@ -346,6 +351,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
         return 0;
 }
 
+#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
 static int nftw_cb(
                 const char *fpath,
                 const struct stat *sb,
@@ -367,6 +373,7 @@ static int nftw_cb(
 
         return FTW_CONTINUE;
 };
+#endif
 
 int mount_setup(bool loaded_policy) {
         int r;
@@ -379,6 +386,7 @@ int mount_setup(bool loaded_policy) {
                         return r;
         }
 
+#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
         /* Nodes in devtmpfs and /run need to be manually updated for
          * the appropriate labels, after mounting. The other virtual
          * API file systems like /sys and /proc do not need that, they
@@ -397,6 +405,7 @@ int mount_setup(bool loaded_policy) {
                 log_info("Relabelled /dev and /run in %s.",
                          format_timespan(timespan, sizeof(timespan), after_relabel - before_relabel, 0));
         }
+#endif
 
         /* Create a few default symlinks, which are normally created
          * by udevd, but some scripts might need them before we start
index 102bbef91b83c1331c9d46db71f1136e27ef92e2..01243c381abf892694ed9949b759ec82f3a0a105 100644 (file)
@@ -380,7 +380,8 @@ static int mount_add_default_dependencies(Mount *m) {
         if (!p)
                 return 0;
 
-        if (path_equal(m->where, "/"))
+        if (path_equal(m->where, "/") ||
+            path_equal(m->where, "/usr"))
                 return 0;
 
         if (mount_is_network(p)) {
@@ -690,6 +691,11 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
 static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) {
         pid_t pid;
         int r;
+        ExecParameters exec_params = {
+                .apply_permissions = true,
+                .apply_chroot      = true,
+                .apply_tty_stdin   = true,
+        };
 
         assert(m);
         assert(c);
@@ -705,21 +711,16 @@ static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) {
         if (r < 0)
                 goto fail;
 
+        exec_params.environment = UNIT(m)->manager->environment;
+        exec_params.confirm_spawn = UNIT(m)->manager->confirm_spawn;
+        exec_params.cgroup_supported = UNIT(m)->manager->cgroup_supported;
+        exec_params.cgroup_path = UNIT(m)->cgroup_path;
+        exec_params.runtime_prefix = manager_get_runtime_prefix(UNIT(m)->manager);
+        exec_params.unit_id = UNIT(m)->id;
+
         r = exec_spawn(c,
-                       NULL,
                        &m->exec_context,
-                       NULL, 0,
-                       UNIT(m)->manager->environment,
-                       true,
-                       true,
-                       true,
-                       UNIT(m)->manager->confirm_spawn,
-                       UNIT(m)->manager->cgroup_supported,
-                       UNIT(m)->cgroup_path,
-                       manager_get_runtime_prefix(UNIT(m)->manager),
-                       UNIT(m)->id,
-                       0,
-                       NULL,
+                       &exec_params,
                        m->exec_runtime,
                        &pid);
         if (r < 0)
@@ -774,7 +775,8 @@ static void mount_enter_signal(Mount *m, MountState state, MountResult f) {
         r = unit_kill_context(
                         UNIT(m),
                         &m->kill_context,
-                        state != MOUNT_MOUNTING_SIGTERM && state != MOUNT_UNMOUNTING_SIGTERM && state != MOUNT_REMOUNTING_SIGTERM,
+                        (state != MOUNT_MOUNTING_SIGTERM && state != MOUNT_UNMOUNTING_SIGTERM && state != MOUNT_REMOUNTING_SIGTERM) ?
+                        KILL_KILL : KILL_TERMINATE,
                         -1,
                         m->control_pid,
                         false);
@@ -826,6 +828,23 @@ void warn_if_dir_nonempty(const char *unit, const char* where) {
                    NULL);
 }
 
+static int fail_if_symlink(const char *unit, const char* where) {
+        assert(where);
+
+        if (is_symlink(where) > 0) {
+                log_struct_unit(LOG_WARNING,
+                                unit,
+                                "MESSAGE=%s: Mount on symlink %s not allowed.",
+                                unit, where,
+                                "WHERE=%s", where,
+                                MESSAGE_ID(SD_MESSAGE_OVERMOUNTING),
+                                NULL);
+
+                return -ELOOP;
+        }
+        return 0;
+}
+
 static void mount_enter_unmounting(Mount *m) {
         int r;
 
@@ -876,6 +895,10 @@ static void mount_enter_mounting(Mount *m) {
         if (p && mount_is_bind(p))
                 mkdir_p_label(p->what, m->directory_mode);
 
+        r = fail_if_symlink(m->meta.id, m->where);
+        if (r < 0)
+                goto fail;
+
         if (m->from_fragment)
                 r = exec_command_set(
                                 m->control_command,
index 5466b7baec2a8cdd96c40ab5619c49b6f8c98e74..4bc288de1d5065e6a51a45b351a2469743d03f77 100644 (file)
@@ -51,6 +51,7 @@ typedef enum MountMode {
         PRIVATE_TMP,
         PRIVATE_VAR_TMP,
         PRIVATE_DEV,
+        PRIVATE_BUS_ENDPOINT,
         READWRITE
 } MountMode;
 
@@ -124,8 +125,7 @@ static void drop_duplicates(BindMount *m, unsigned *n) {
                 if (previous && path_equal(f->path, previous->path))
                         continue;
 
-                t->path = f->path;
-                t->mode = f->mode;
+                *t = *f;
 
                 previous = t;
 
@@ -225,9 +225,9 @@ static int mount_dev(BindMount *m) {
                         goto fail;
                 }
 
-                label_context_set(d, st.st_mode);
+                mac_selinux_create_file_prepare(d, st.st_mode);
                 r = mknod(dn, st.st_mode, st.st_rdev);
-                label_context_clear();
+                mac_selinux_create_file_clear();
 
                 if (r < 0) {
                         r = -errno;
@@ -263,11 +263,83 @@ fail:
         if (devmqueue)
                 umount(devmqueue);
 
-        if (dev) {
-                umount(dev);
-                rmdir(dev);
+        umount(dev);
+        rmdir(dev);
+        rmdir(temporary_mount);
+
+        return r;
+}
+
+static int mount_kdbus(BindMount *m) {
+
+        char temporary_mount[] = "/tmp/kdbus-dev-XXXXXX";
+        _cleanup_free_ char *basepath = NULL;
+        _cleanup_umask_ mode_t u;
+        char *busnode = NULL, *root;
+        struct stat st;
+        int r;
+
+        assert(m);
+
+        u = umask(0000);
+
+        if (!mkdtemp(temporary_mount)) {
+                log_error("Failed create temp dir: %m");
+                return -errno;
+        }
+
+        root = strappenda(temporary_mount, "/kdbus");
+        mkdir(root, 0755);
+        if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=777") < 0) {
+                r = -errno;
+                goto fail;
         }
 
+        /* create a new /dev/null dev node copy so we have some fodder to
+         * bind-mount the custom endpoint over. */
+        if (stat("/dev/null", &st) < 0) {
+                log_error("Failed to stat /dev/null: %m");
+                r = -errno;
+                goto fail;
+        }
+
+        busnode = strappenda(root, "/bus");
+        if (mknod(busnode, (st.st_mode & ~07777) | 0600, st.st_rdev) < 0) {
+                log_error("mknod() for %s failed: %m", busnode);
+                r = -errno;
+                goto fail;
+        }
+
+        r = mount(m->path, busnode, "bind", MS_BIND, NULL);
+        if (r < 0) {
+                log_error("bind mount of %s failed: %m", m->path);
+                r = -errno;
+                goto fail;
+        }
+
+        basepath = dirname_malloc(m->path);
+        if (!basepath) {
+                r = -ENOMEM;
+                goto fail;
+        }
+
+        if (mount(root, basepath, NULL, MS_MOVE, NULL) < 0) {
+                log_error("bind mount of %s failed: %m", basepath);
+                r = -errno;
+                goto fail;
+        }
+
+        rmdir(temporary_mount);
+        return 0;
+
+fail:
+        if (busnode) {
+                umount(busnode);
+                unlink(busnode);
+        }
+
+        umount(root);
+        rmdir(root);
         rmdir(temporary_mount);
 
         return r;
@@ -312,6 +384,9 @@ static int apply_mount(
         case PRIVATE_DEV:
                 return mount_dev(m);
 
+        case PRIVATE_BUS_ENDPOINT:
+                return mount_kdbus(m);
+
         default:
                 assert_not_reached("Unknown mode");
         }
@@ -349,8 +424,9 @@ int setup_namespace(
                 char** read_write_dirs,
                 char** read_only_dirs,
                 char** inaccessible_dirs,
-                char* tmp_dir,
-                char* var_tmp_dir,
+                const char* tmp_dir,
+                const char* var_tmp_dir,
+                const char* bus_endpoint_path,
                 bool private_dev,
                 ProtectHome protect_home,
                 ProtectSystem protect_system,
@@ -366,7 +442,7 @@ int setup_namespace(
         if (unshare(CLONE_NEWNS) < 0)
                 return -errno;
 
-        n = !!tmp_dir + !!var_tmp_dir +
+        n = !!tmp_dir + !!var_tmp_dir + !!bus_endpoint_path +
                 strv_length(read_write_dirs) +
                 strv_length(read_only_dirs) +
                 strv_length(inaccessible_dirs) +
@@ -407,6 +483,12 @@ int setup_namespace(
                         m++;
                 }
 
+                if (bus_endpoint_path) {
+                        m->path = bus_endpoint_path;
+                        m->mode = PRIVATE_BUS_ENDPOINT;
+                        m++;
+                }
+
                 if (protect_home != PROTECT_HOME_NO) {
                         r = append_mounts(&m, STRV_MAKE("-/home", "-/run/user", "-/root"), protect_home == PROTECT_HOME_READ_ONLY ? READONLY : INACCESSIBLE);
                         if (r < 0)
index 9343fe326420ee19e84fb2d5872551d03fddf5a8..1f9d0676b437aecad26d547185a328cdc2f7321a 100644 (file)
@@ -44,8 +44,9 @@ typedef enum ProtectSystem {
 int setup_namespace(char **read_write_dirs,
                     char **read_only_dirs,
                     char **inaccessible_dirs,
-                    char *tmp_dir,
-                    char *var_tmp_dir,
+                    const char *tmp_dir,
+                    const char *var_tmp_dir,
+                    const char *endpoint_path,
                     bool private_dev,
                     ProtectHome protect_home,
                     ProtectSystem protect_system,
index 9dfca81cb1f88aed0178f85804114ce8475e055e..6a7a37ee924f57d11fa92739ad84c98580cb6888 100644 (file)
@@ -28,6 +28,8 @@
         <policy context="default">
                 <deny send_destination="org.freedesktop.systemd1"/>
 
+                <!-- Completely open to anyone -->
+
                 <allow send_destination="org.freedesktop.systemd1"
                        send_interface="org.freedesktop.DBus.Introspectable"/>
 
                        send_interface="org.freedesktop.systemd1.Manager"
                        send_member="GetDefaultTarget"/>
 
+                <!-- Managed via polkit or other criteria -->
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="StartUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="StartUnitReplace"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="StopUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="ReloadUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="RestartUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="TryRestartUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="ReloadOrRestartUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="ReloadOrTryRestartUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="KillUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="ResetFailedUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="SetUnitProperties"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="StartTransientUnit"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="CancelJob"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="Reload"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="Reexecute"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="EnableUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="DisableUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="ReenableUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="LinkUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="PresetUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="PresetUnitFilesWithMode"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="MaskUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="UnmaskUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="SetDefaultTarget"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="PresetAllUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Manager"
+                       send_member="AddDependencyUnitFiles"/>
+
+                <allow send_destination="org.freedesktop.systemd1"
+                       send_interface="org.freedesktop.systemd1.Job"
+                       send_member="Cancel"/>
+
                 <allow receive_sender="org.freedesktop.systemd1"/>
         </policy>
 
diff --git a/src/core/org.freedesktop.systemd1.policy b/src/core/org.freedesktop.systemd1.policy
deleted file mode 100644 (file)
index f585c52..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
-        "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
-        <vendor>The systemd Project</vendor>
-        <vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
-
-        <action id="org.freedesktop.systemd1.reply-password">
-                <description>Send passphrase back to system</description>
-                <description xml:lang="de">Passphrase zurück an das System senden</description>
-                <description xml:lang="el">Αποστολή του συνθηματικού πίσω στο σύστημα</description>
-                <description xml:lang="fr">Renvoyer la phrase secrète au système</description>
-                <description xml:lang="it">Inviare la frase segreta (passphrase) al sistema</description>
-                <description xml:lang="pl">Wysłanie hasła z powrotem do systemu</description>
-                <description xml:lang="ru">Отправить пароль системе</description>
-                <message>Authentication is required to send the entered passphrase back to the system.</message>
-                <message xml:lang="de">Legitimierung ist zum Senden des eingegebenen Kennworts zurück an das System notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για αποστολή του εισερχόμενου συνθηματικού πίσω στο σύστημα.</message>
-                <message xml:lang="fr">Authentification requise pour renvoyer la phrase secrète au système.</message>
-                <message xml:lang="it">Autenticazione richiesta per inviare la frase segreta (passphrase) al sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby wysłać podane hasło z powrotem do systemu.</message>
-                <message xml:lang="ru">Чтобы отправить пароль системе, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>no</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.exec.path">/usr/lib/systemd/systemd-reply-password</annotate>
-        </action>
-
-        <action id="org.freedesktop.systemd1.bus-access">
-                <description>Privileged system and service manager access</description>
-                <description xml:lang="de">Privilegierter Zugriff auf die System- und Dienstverwaltung</description>
-                <description xml:lang="el">Προνομιούχος πρόσβαση διαχειριστή συστήματος και υπηρεσίας</description>
-                <description xml:lang="fr">Accès privilégié au gestionnaire du système et des services</description>
-                <description xml:lang="it">Accesso privilegiato per la gestione del sistema e dei servizi</description>
-                <description xml:lang="pl">Uprawniony dostęp do menedżera systemu i usług</description>
-                <description xml:lang="ru">Привилегированный доступ к системному менеджеру</description>
-                <message>Authentication is required to access the system and service manager.</message>
-                <message xml:lang="de">Legitimierung ist notwendig für den Zugriff auf die System- und Dienstverwaltung.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να προσπελάσετε τον διαχειριστή συστήματος και υπηρεσιών.</message>
-                <message xml:lang="fr">Authentification requise pour accéder au gestionnaire du système et des services.</message>
-                <message xml:lang="it">Autenticazione richiesta per la gestione del sistema e dei servizi.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby uzyskać dostęp do menedżera systemu i usług.</message>
-                <message xml:lang="ru">Для привилегированного доступа к системному менеджеру необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>no</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/systemd-stdio-bridge</annotate>
-        </action>
-
-</policyconfig>
\ No newline at end of file
index 51bdafac45dbe80e601231be8b3710f55b34e3ba..fd771b4b2607b56fdc9e9b2cdb4ac4b01011fc66 100644 (file)
                 <annotate key="org.freedesktop.policykit.exec.path">@rootlibexecdir@/systemd-reply-password</annotate>
         </action>
 
-        <action id="org.freedesktop.systemd1.bus-access">
-                <_description>Privileged system and service manager access</_description>
-                <_message>Authentication is required to access the system and service manager.</_message>
+        <action id="org.freedesktop.systemd1.manage-units">
+                <_description>Manage system services or units</_description>
+                <_message>Authentication is required to manage system services or units.</_message>
                 <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>no</allow_inactive>
+                        <allow_any>auth_admin</allow_any>
+                        <allow_inactive>auth_admin</allow_inactive>
+                        <allow_active>auth_admin_keep</allow_active>
+                </defaults>
+        </action>
+
+        <action id="org.freedesktop.systemd1.manage-unit-files">
+                <_description>Manage system service or unit files</_description>
+                <_message>Authentication is required to manage system service or unit files.</_message>
+                <defaults>
+                        <allow_any>auth_admin</allow_any>
+                        <allow_inactive>auth_admin</allow_inactive>
+                        <allow_active>auth_admin_keep</allow_active>
+                </defaults>
+        </action>
+
+        <action id="org.freedesktop.systemd1.reload-daemon">
+                <_description>Reload the systemd state</_description>
+                <_message>Authentication is required to reload the systemd state.</_message>
+                <defaults>
+                        <allow_any>auth_admin</allow_any>
+                        <allow_inactive>auth_admin</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
-                <annotate key="org.freedesktop.policykit.exec.path">@bindir@/systemd-stdio-bridge</annotate>
         </action>
 
 </policyconfig>
index 20e454d96f4c1ba04a463c7ac92d920303e12948..f54c77f6c3980804ececcf23a1286221adf37a7c 100644 (file)
@@ -99,7 +99,8 @@ int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) {
                                 break;
                         }
 
-                        log_warning("Failed to add watch on %s: %m", s->path);
+                        log_warning("Failed to add watch on %s: %s", s->path,
+                                    errno == ENOSPC ? "too many watches" : strerror(-r));
                         r = -errno;
                         if (cut)
                                 *cut = tmp;
index e8f9e8dd738ab56faaf5cfa3b678684f21af9c38..0f7c1f97ce79463a225b44e351a689dc67483c8a 100644 (file)
@@ -243,7 +243,7 @@ static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) {
                 r = unit_kill_context(
                                 UNIT(s),
                                 &s->kill_context,
-                                state != SCOPE_STOP_SIGTERM,
+                                state != SCOPE_STOP_SIGTERM ? KILL_KILL : KILL_TERMINATE,
                                 -1, -1, false);
                 if (r < 0)
                         goto fail;
index cdbfb83a1a1c4a5648530935a7907855d45bd7a1..a4694b33f36e5a7321388981493730779e44b965 100644 (file)
@@ -53,7 +53,7 @@ struct audit_info {
 
 /*
    Any time an access gets denied this callback will be called
-   with the aduit data.  We then need to just copy the audit data into the msgbuf.
+   with the audit data.  We then need to just copy the audit data into the msgbuf.
 */
 static int audit_callback(
                 void *auditdata,
@@ -64,14 +64,20 @@ static int audit_callback(
         const struct audit_info *audit = auditdata;
         uid_t uid = 0, login_uid = 0;
         gid_t gid = 0;
+        char login_uid_buf[DECIMAL_STR_MAX(uid_t)] = "n/a";
+        char uid_buf[DECIMAL_STR_MAX(uid_t)] = "n/a";
+        char gid_buf[DECIMAL_STR_MAX(gid_t)] = "n/a";
 
-        sd_bus_creds_get_audit_login_uid(audit->creds, &login_uid);
-        sd_bus_creds_get_uid(audit->creds, &uid);
-        sd_bus_creds_get_gid(audit->creds, &gid);
+        if (sd_bus_creds_get_audit_login_uid(audit->creds, &login_uid) >= 0)
+                snprintf(login_uid_buf, sizeof(login_uid_buf), UID_FMT, login_uid);
+        if (sd_bus_creds_get_uid(audit->creds, &uid) >= 0)
+                snprintf(uid_buf, sizeof(uid_buf), UID_FMT, uid);
+        if (sd_bus_creds_get_gid(audit->creds, &gid) >= 0)
+                snprintf(gid_buf, sizeof(gid_buf), GID_FMT, gid);
 
         snprintf(msgbuf, msgbufsize,
-                 "auid=%d uid=%d gid=%d%s%s%s%s%s%s",
-                 login_uid, uid, gid,
+                 "auid=%s uid=%s gid=%s%s%s%s%s%s%s",
+                 login_uid_buf, uid_buf, gid_buf,
                  audit->path ? " path=\"" : "", strempty(audit->path), audit->path ? "\"" : "",
                  audit->cmdline ? " cmdline=\"" : "", strempty(audit->cmdline), audit->cmdline ? "\"" : "");
 
@@ -136,13 +142,13 @@ static int access_init(void) {
         return r;
 }
 
-static int selinux_access_init(sd_bus_error *error) {
+static int mac_selinux_access_init(sd_bus_error *error) {
         int r;
 
         if (initialized)
                 return 0;
 
-        if (!use_selinux())
+        if (!mac_selinux_use())
                 return 0;
 
         r = access_init();
@@ -152,14 +158,17 @@ static int selinux_access_init(sd_bus_error *error) {
         initialized = true;
         return 0;
 }
+#endif
 
-void selinux_access_free(void) {
+void mac_selinux_access_free(void) {
 
+#ifdef HAVE_SELINUX
         if (!initialized)
                 return;
 
         avc_destroy();
         initialized = false;
+#endif
 }
 
 /*
@@ -168,12 +177,13 @@ void selinux_access_free(void) {
    If the machine is in permissive mode it will return ok.  Audit messages will
    still be generated if the access would be denied in enforcing mode.
 */
-int selinux_generic_access_check(
+int mac_selinux_generic_access_check(
                 sd_bus_message *message,
                 const char *path,
                 const char *permission,
                 sd_bus_error *error) {
 
+#ifdef HAVE_SELINUX
         _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
         const char *tclass = NULL, *scon = NULL;
         struct audit_info audit_info = {};
@@ -186,10 +196,10 @@ int selinux_generic_access_check(
         assert(permission);
         assert(error);
 
-        if (!use_selinux())
+        if (!mac_selinux_use())
                 return 0;
 
-        r = selinux_access_init(error);
+        r = mac_selinux_access_init(error);
         if (r < 0)
                 return r;
 
@@ -248,20 +258,29 @@ finish:
         }
 
         return r;
-}
-
 #else
-
-int selinux_generic_access_check(
-                sd_bus_message *message,
-                const char *path,
-                const char *permission,
-                sd_bus_error *error) {
-
         return 0;
+#endif
 }
 
-void selinux_access_free(void) {
-}
+int mac_selinux_unit_access_check_strv(char **units,
+                                sd_bus_message *message,
+                                Manager *m,
+                                const char *permission,
+                                sd_bus_error *error) {
+#ifdef HAVE_SELINUX
+        char **i;
+        Unit *u;
+        int r;
 
+        STRV_FOREACH(i, units) {
+                u = manager_get_unit(m, *i);
+                if (u) {
+                        r = mac_selinux_unit_access_check(u, message, permission, error);
+                        if (r < 0)
+                                return r;
+                }
+        }
 #endif
+        return 0;
+}
index 27d9e145916a33001828100edc44b468ac0f4343..bccf0d2913a4f3ad4574e3a9e1e428f3b65de728 100644 (file)
 #include "sd-bus.h"
 #include "bus-error.h"
 #include "bus-util.h"
+#include "manager.h"
 
-void selinux_access_free(void);
+void mac_selinux_access_free(void);
 
-int selinux_generic_access_check(sd_bus_message *message, const char *path, const char *permission, sd_bus_error *error);
+int mac_selinux_generic_access_check(sd_bus_message *message, const char *path, const char *permission, sd_bus_error *error);
+
+int mac_selinux_unit_access_check_strv(char **units, sd_bus_message *message, Manager *m, const char *permission, sd_bus_error *error);
 
 #ifdef HAVE_SELINUX
 
-#define selinux_access_check(message, permission, error) \
-        selinux_generic_access_check((message), NULL, (permission), (error))
+#define mac_selinux_access_check(message, permission, error) \
+        mac_selinux_generic_access_check((message), NULL, (permission), (error))
 
-#define selinux_unit_access_check(unit, message, permission, error) \
+#define mac_selinux_unit_access_check(unit, message, permission, error) \
         ({                                                              \
                 Unit *_unit = (unit);                                   \
-                selinux_generic_access_check((message), _unit->fragment_path ?: _unit->fragment_path, (permission), (error)); \
+                mac_selinux_generic_access_check((message), _unit->fragment_path ?: _unit->fragment_path, (permission), (error)); \
         })
 
 #else
 
-#define selinux_access_check(message, permission, error) 0
-#define selinux_unit_access_check(unit, message, permission, error) 0
+#define mac_selinux_access_check(message, permission, error) 0
+#define mac_selinux_unit_access_check(unit, message, permission, error) 0
 
 #endif
index b419a2710a071293251bc54fbb9b64112b3aea27..25e22b6c777431f84370453935a8c5bc8ebc1f2a 100644 (file)
@@ -43,7 +43,7 @@ static int null_log(int type, const char *fmt, ...) {
 }
 #endif
 
-int selinux_setup(bool *loaded_policy) {
+int mac_selinux_setup(bool *loaded_policy) {
 
 #ifdef HAVE_SELINUX
         int enforce = 0;
@@ -84,10 +84,10 @@ int selinux_setup(bool *loaded_policy) {
                 char timespan[FORMAT_TIMESPAN_MAX];
                 char *label;
 
-                retest_selinux();
+                mac_selinux_retest();
 
                 /* Transition to the new context */
-                r = label_get_create_label_from_exe(SYSTEMD_BINARY_PATH, &label);
+                r = mac_selinux_get_create_label_from_exe(SYSTEMD_BINARY_PATH, &label);
                 if (r < 0 || label == NULL) {
                         log_open();
                         log_error("Failed to compute init label, ignoring.");
@@ -98,7 +98,7 @@ int selinux_setup(bool *loaded_policy) {
                         if (r < 0)
                                 log_error("Failed to transition into init label '%s', ignoring.", label);
 
-                        label_free(label);
+                        mac_selinux_free(label);
                 }
 
                 after_load = now(CLOCK_MONOTONIC);
index 39e2bc25bbdd9592e63e3f6b19542fa29ac18a0d..9ac2276576e9507e0ae7d1919ee1b507ce506d99 100644 (file)
@@ -23,4 +23,4 @@
 
 #include <stdbool.h>
 
-int selinux_setup(bool *loaded_policy);
+int mac_selinux_setup(bool *loaded_policy);
index 0b19767d9e725029327ed5ed1115c0775802aabc..f27e63eb9a1cd8eeb3d14371895431812fed0874 100644 (file)
@@ -23,9 +23,6 @@
 #include <signal.h>
 #include <dirent.h>
 #include <unistd.h>
-#include <sys/reboot.h>
-#include <linux/reboot.h>
-#include <sys/syscall.h>
 
 #include "async.h"
 #include "manager.h"
@@ -48,6 +45,7 @@
 #include "fileio.h"
 #include "bus-error.h"
 #include "bus-util.h"
+#include "bus-kernel.h"
 
 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
         [SERVICE_DEAD] = UNIT_INACTIVE,
@@ -58,6 +56,7 @@ static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
         [SERVICE_EXITED] = UNIT_ACTIVE,
         [SERVICE_RELOAD] = UNIT_RELOADING,
         [SERVICE_STOP] = UNIT_DEACTIVATING,
+        [SERVICE_STOP_SIGABRT] = UNIT_DEACTIVATING,
         [SERVICE_STOP_SIGTERM] = UNIT_DEACTIVATING,
         [SERVICE_STOP_SIGKILL] = UNIT_DEACTIVATING,
         [SERVICE_STOP_POST] = UNIT_DEACTIVATING,
@@ -78,6 +77,7 @@ static const UnitActiveState state_translation_table_idle[_SERVICE_STATE_MAX] =
         [SERVICE_EXITED] = UNIT_ACTIVE,
         [SERVICE_RELOAD] = UNIT_RELOADING,
         [SERVICE_STOP] = UNIT_DEACTIVATING,
+        [SERVICE_STOP_SIGABRT] = UNIT_DEACTIVATING,
         [SERVICE_STOP_SIGTERM] = UNIT_DEACTIVATING,
         [SERVICE_STOP_SIGKILL] = UNIT_DEACTIVATING,
         [SERVICE_STOP_POST] = UNIT_DEACTIVATING,
@@ -92,6 +92,7 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
 static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void *userdata);
 
 static void service_enter_signal(Service *s, ServiceState state, ServiceResult f);
+static void service_enter_reload_by_notify(Service *s);
 
 static void service_init(Unit *u) {
         Service *s = SERVICE(u);
@@ -104,6 +105,7 @@ static void service_init(Unit *u) {
         s->restart_usec = u->manager->default_restart_usec;
         s->type = _SERVICE_TYPE_INVALID;
         s->socket_fd = -1;
+        s->bus_endpoint_fd = -1;
         s->guess_main_pid = true;
 
         RATELIMIT_INIT(s->start_limit, u->manager->default_start_limit_interval, u->manager->default_start_limit_burst);
@@ -135,8 +137,7 @@ static void service_unwatch_pid_file(Service *s) {
         if (!s->pid_file_pathspec)
                 return;
 
-        log_debug_unit(UNIT(s)->id, "Stopping watch for %s's PID file %s",
-                       UNIT(s)->id, s->pid_file_pathspec->path);
+        log_debug_unit(UNIT(s)->id, "Stopping watch for %s's PID file %s", UNIT(s)->id, s->pid_file_pathspec->path);
         path_spec_unwatch(s->pid_file_pathspec);
         path_spec_done(s->pid_file_pathspec);
         free(s->pid_file_pathspec);
@@ -166,10 +167,7 @@ static int service_set_main_pid(Service *s, pid_t pid) {
         s->main_pid_known = true;
 
         if (get_parent_of_pid(pid, &ppid) >= 0 && ppid != getpid()) {
-                log_warning_unit(UNIT(s)->id,
-                                 "%s: Supervising process "PID_FMT" which is not our child. We'll most likely not notice when it exits.",
-                                 UNIT(s)->id, pid);
-
+                log_warning_unit(UNIT(s)->id, "%s: Supervising process "PID_FMT" which is not our child. We'll most likely not notice when it exits.", UNIT(s)->id, pid);
                 s->main_pid_alien = true;
         } else
                 s->main_pid_alien = false;
@@ -180,9 +178,6 @@ static int service_set_main_pid(Service *s, pid_t pid) {
 static void service_close_socket_fd(Service *s) {
         assert(s);
 
-        if (s->socket_fd < 0)
-                return;
-
         s->socket_fd = asynchronous_close(s->socket_fd);
 }
 
@@ -282,6 +277,7 @@ static void service_done(Unit *u) {
                 s->bus_name = NULL;
         }
 
+        s->bus_endpoint_fd = safe_close(s->bus_endpoint_fd);
         service_close_socket_fd(s);
         service_connection_unref(s);
 
@@ -319,14 +315,23 @@ static int service_verify(Service *s) {
         if (UNIT(s)->load_state != UNIT_LOADED)
                 return 0;
 
-        if (!s->exec_command[SERVICE_EXEC_START]) {
-                log_error_unit(UNIT(s)->id, "%s lacks ExecStart setting. Refusing.", UNIT(s)->id);
+        if (!s->exec_command[SERVICE_EXEC_START] && !s->exec_command[SERVICE_EXEC_STOP]) {
+                log_error_unit(UNIT(s)->id, "%s lacks both ExecStart= and ExecStop= setting. Refusing.", UNIT(s)->id);
                 return -EINVAL;
         }
 
-        if (s->type != SERVICE_ONESHOT &&
-            s->exec_command[SERVICE_EXEC_START]->command_next) {
-                log_error_unit(UNIT(s)->id, "%s has more than one ExecStart setting, which is only allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
+        if (s->type != SERVICE_ONESHOT && !s->exec_command[SERVICE_EXEC_START]) {
+                log_error_unit(UNIT(s)->id, "%s has no ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
+                return -EINVAL;
+        }
+
+        if (!s->remain_after_exit && !s->exec_command[SERVICE_EXEC_START]) {
+                log_error_unit(UNIT(s)->id, "%s has no ExecStart= setting, which is only allowed for RemainAfterExit=yes services. Refusing.", UNIT(s)->id);
+                return -EINVAL;
+        }
+
+        if (s->type != SERVICE_ONESHOT && s->exec_command[SERVICE_EXEC_START]->command_next) {
+                log_error_unit(UNIT(s)->id, "%s has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
                 return -EINVAL;
         }
 
@@ -365,14 +370,12 @@ static int service_add_default_dependencies(Service *s) {
          * majority of services. */
 
         /* First, pull in base system */
-        r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES,
-                                              SPECIAL_BASIC_TARGET, NULL, true);
+        r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_BASIC_TARGET, NULL, true);
         if (r < 0)
                 return r;
 
         /* Second, activate normal shutdown */
-        r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS,
-                                              SPECIAL_SHUTDOWN_TARGET, NULL, true);
+        r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
         return r;
 }
 
@@ -395,8 +398,8 @@ static void service_fix_output(Service *s) {
 }
 
 static int service_load(Unit *u) {
-        int r;
         Service *s = SERVICE(u);
+        int r;
 
         assert(s);
 
@@ -418,8 +421,15 @@ static int service_load(Unit *u) {
                 if (r < 0)
                         return r;
 
-                if (s->type == _SERVICE_TYPE_INVALID)
-                        s->type = s->bus_name ? SERVICE_DBUS : SERVICE_SIMPLE;
+                if (s->type == _SERVICE_TYPE_INVALID) {
+                        /* Figure out a type automatically */
+                        if (s->bus_name)
+                                s->type = SERVICE_DBUS;
+                        else if (s->exec_command[SERVICE_EXEC_START])
+                                s->type = SERVICE_SIMPLE;
+                        else
+                                s->type = SERVICE_ONESHOT;
+                }
 
                 /* Oneshot services have disabled start timeout by default */
                 if (s->type == SERVICE_ONESHOT && !s->start_timeout_defined)
@@ -463,16 +473,14 @@ static int service_load(Unit *u) {
 }
 
 static void service_dump(Unit *u, FILE *f, const char *prefix) {
-
         ServiceExecCommand c;
         Service *s = SERVICE(u);
         const char *prefix2;
-        _cleanup_free_ char *p2 = NULL;
 
         assert(s);
 
-        p2 = strappend(prefix, "\t");
-        prefix2 = p2 ? p2 : prefix;
+        prefix = strempty(prefix);
+        prefix2 = strappenda(prefix, "\t");
 
         fprintf(f,
                 "%sService State: %s\n"
@@ -484,7 +492,8 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
                 "%sGuessMainPID: %s\n"
                 "%sType: %s\n"
                 "%sRestart: %s\n"
-                "%sNotifyAccess: %s\n",
+                "%sNotifyAccess: %s\n"
+                "%sNotifyState: %s\n",
                 prefix, service_state_to_string(s->state),
                 prefix, service_result_to_string(s->result),
                 prefix, service_result_to_string(s->reload_result),
@@ -494,7 +503,8 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, yes_no(s->guess_main_pid),
                 prefix, service_type_to_string(s->type),
                 prefix, service_restart_to_string(s->restart),
-                prefix, notify_access_to_string(s->notify_access));
+                prefix, notify_access_to_string(s->notify_access),
+                prefix, notify_state_to_string(s->notify_state));
 
         if (s->control_pid > 0)
                 fprintf(f,
@@ -561,25 +571,20 @@ static int service_load_pid_file(Service *s, bool may_warn) {
         r = read_one_line_file(s->pid_file, &k);
         if (r < 0) {
                 if (may_warn)
-                        log_info_unit(UNIT(s)->id,
-                                      "PID file %s not readable (yet?) after %s.",
-                                      s->pid_file, service_state_to_string(s->state));
+                        log_info_unit(UNIT(s)->id, "PID file %s not readable (yet?) after %s.", s->pid_file, service_state_to_string(s->state));
                 return r;
         }
 
         r = parse_pid(k, &pid);
         if (r < 0) {
                 if (may_warn)
-                        log_info_unit(UNIT(s)->id,
-                                      "Failed to read PID from file %s: %s",
-                                      s->pid_file, strerror(-r));
+                        log_info_unit(UNIT(s)->id, "Failed to read PID from file %s: %s", s->pid_file, strerror(-r));
                 return r;
         }
 
         if (!pid_is_alive(pid)) {
                 if (may_warn)
                         log_info_unit(UNIT(s)->id, "PID "PID_FMT" read from file %s does not exist or is a zombie.", pid, s->pid_file);
-
                 return -ESRCH;
         }
 
@@ -587,14 +592,12 @@ static int service_load_pid_file(Service *s, bool may_warn) {
                 if (pid == s->main_pid)
                         return 0;
 
-                log_debug_unit(UNIT(s)->id,
-                               "Main PID changing: "PID_FMT" -> "PID_FMT,
-                               s->main_pid, pid);
+                log_debug_unit(UNIT(s)->id, "Main PID changing: "PID_FMT" -> "PID_FMT, s->main_pid, pid);
+
                 service_unwatch_main_pid(s);
                 s->main_pid_known = false;
         } else
-                log_debug_unit(UNIT(s)->id,
-                               "Main PID loaded: "PID_FMT, pid);
+                log_debug_unit(UNIT(s)->id, "Main PID loaded: "PID_FMT, pid);
 
         r = service_set_main_pid(s, pid);
         if (r < 0)
@@ -603,9 +606,7 @@ static int service_load_pid_file(Service *s, bool may_warn) {
         r = unit_watch_pid(UNIT(s), pid);
         if (r < 0) {
                 /* FIXME: we need to do something here */
-                log_warning_unit(UNIT(s)->id,
-                                 "Failed to watch PID "PID_FMT" from service %s",
-                                 pid, UNIT(s)->id);
+                log_warning_unit(UNIT(s)->id, "Failed to watch PID "PID_FMT" from service %s", pid, UNIT(s)->id);
                 return r;
         }
 
@@ -632,19 +633,19 @@ static int service_search_main_pid(Service *s) {
         if (pid <= 0)
                 return -ENOENT;
 
-        log_debug_unit(UNIT(s)->id,
-                       "Main PID guessed: "PID_FMT, pid);
+        log_debug_unit(UNIT(s)->id, "Main PID guessed: "PID_FMT, pid);
         r = service_set_main_pid(s, pid);
         if (r < 0)
                 return r;
 
         r = unit_watch_pid(UNIT(s), pid);
-        if (r < 0)
+        if (r < 0) {
                 /* FIXME: we need to do something here */
-                log_warning_unit(UNIT(s)->id,
-                                 "Failed to watch PID "PID_FMT" from service %s",
-                                 pid, UNIT(s)->id);
-        return r;
+                log_warning_unit(UNIT(s)->id, "Failed to watch PID "PID_FMT" from service %s", pid, UNIT(s)->id);
+                return r;
+        }
+
+        return 0;
 }
 
 static void service_set_state(Service *s, ServiceState state) {
@@ -664,7 +665,7 @@ static void service_set_state(Service *s, ServiceState state) {
                     SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
                     SERVICE_RELOAD,
                     SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
-                    SERVICE_STOP_POST,
+                    SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
                     SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL,
                     SERVICE_AUTO_RESTART))
                 s->timer_event_source = sd_event_source_unref(s->timer_event_source);
@@ -673,7 +674,7 @@ static void service_set_state(Service *s, ServiceState state) {
                     SERVICE_START, SERVICE_START_POST,
                     SERVICE_RUNNING, SERVICE_RELOAD,
                     SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
-                    SERVICE_STOP_POST,
+                    SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
                     SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
                 service_unwatch_main_pid(s);
                 s->main_command = NULL;
@@ -683,7 +684,7 @@ static void service_set_state(Service *s, ServiceState state) {
                     SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
                     SERVICE_RELOAD,
                     SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
-                    SERVICE_STOP_POST,
+                    SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
                     SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
                 service_unwatch_control_pid(s);
                 s->control_command = NULL;
@@ -697,7 +698,7 @@ static void service_set_state(Service *s, ServiceState state) {
                     SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
                     SERVICE_RUNNING, SERVICE_RELOAD,
                     SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL, SERVICE_STOP_POST,
-                    SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL) &&
+                    SERVICE_STOP_SIGABRT, SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL) &&
             !(state == SERVICE_DEAD && UNIT(s)->job)) {
                 service_close_socket_fd(s);
                 service_connection_unref(s);
@@ -714,9 +715,13 @@ static void service_set_state(Service *s, ServiceState state) {
         /* For remain_after_exit services, let's see if we can "release" the
          * hold on the console, since unit_notify() only does that in case of
          * change of state */
-        if (state == SERVICE_EXITED && s->remain_after_exit &&
+        if (state == SERVICE_EXITED &&
+            s->remain_after_exit &&
             UNIT(s)->manager->n_on_console > 0) {
-                ExecContext *ec = unit_get_exec_context(UNIT(s));
+
+                ExecContext *ec;
+
+                ec = unit_get_exec_context(UNIT(s));
                 if (ec && exec_context_may_touch_console(ec)) {
                         Manager *m = UNIT(s)->manager;
 
@@ -747,7 +752,7 @@ static int service_coldplug(Unit *u) {
                            SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
                            SERVICE_RELOAD,
                            SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
-                           SERVICE_STOP_POST,
+                           SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
                            SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
 
                         usec_t k;
@@ -776,7 +781,7 @@ static int service_coldplug(Unit *u) {
                             SERVICE_START, SERVICE_START_POST,
                             SERVICE_RUNNING, SERVICE_RELOAD,
                             SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
-                            SERVICE_STOP_POST,
+                            SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
                             SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL))) {
                         r = unit_watch_pid(UNIT(s), s->main_pid);
                         if (r < 0)
@@ -788,7 +793,7 @@ static int service_coldplug(Unit *u) {
                            SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST,
                            SERVICE_RELOAD,
                            SERVICE_STOP, SERVICE_STOP_SIGTERM, SERVICE_STOP_SIGKILL,
-                           SERVICE_STOP_POST,
+                           SERVICE_STOP_SIGABRT, SERVICE_STOP_POST,
                            SERVICE_FINAL_SIGTERM, SERVICE_FINAL_SIGKILL)) {
                         r = unit_watch_pid(UNIT(s), s->control_pid);
                         if (r < 0)
@@ -875,12 +880,11 @@ fail:
 static int service_spawn(
                 Service *s,
                 ExecCommand *c,
-                bool timeout,
+                usec_t timeout,
                 bool pass_fds,
                 bool apply_permissions,
                 bool apply_chroot,
                 bool apply_tty_stdin,
-                bool set_notify_socket,
                 bool is_control,
                 pid_t *_pid) {
 
@@ -889,9 +893,17 @@ static int service_spawn(
         int *fds = NULL;
         _cleanup_free_ int *fdsbuf = NULL;
         unsigned n_fds = 0, n_env = 0;
+        _cleanup_free_ char *bus_endpoint_path = NULL;
         _cleanup_strv_free_ char
                 **argv = NULL, **final_env = NULL, **our_env = NULL;
         const char *path;
+        ExecParameters exec_params = {
+                .apply_permissions = apply_permissions,
+                .apply_chroot      = apply_chroot,
+                .apply_tty_stdin   = apply_tty_stdin,
+                .bus_endpoint_fd   = -1,
+                .selinux_context_net = s->socket_fd_selinux_context_net
+        };
 
         assert(s);
         assert(c);
@@ -920,8 +932,8 @@ static int service_spawn(
                 }
         }
 
-        if (timeout && s->timeout_start_usec > 0) {
-                r = service_arm_timer(s, s->timeout_start_usec);
+        if (timeout > 0) {
+                r = service_arm_timer(s, timeout);
                 if (r < 0)
                         goto fail;
         } else
@@ -937,7 +949,7 @@ static int service_spawn(
                 goto fail;
         }
 
-        if (set_notify_socket)
+        if (is_control ? s->notify_access == NOTIFY_ALL : s->notify_access != NOTIFY_NONE)
                 if (asprintf(our_env + n_env++, "NOTIFY_SOCKET=%s", UNIT(s)->manager->notify_socket) < 0) {
                         r = -ENOMEM;
                         goto fail;
@@ -967,21 +979,37 @@ 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 == SYSTEMD_SYSTEM ? "system" : "user",
+                                               UNIT(s)->id, &bus_endpoint_path);
+                if (r < 0)
+                        goto fail;
+
+                /* Pass the fd to the exec_params so that the child process can upload the policy.
+                 * Keep a reference to the fd in the service, so the endpoint is kept alive as long
+                 * as the service is running. */
+                exec_params.bus_endpoint_fd = s->bus_endpoint_fd = r;
+        }
+#endif
+
+        exec_params.argv = argv;
+        exec_params.fds = fds;
+        exec_params.n_fds = n_fds;
+        exec_params.environment = final_env;
+        exec_params.confirm_spawn = UNIT(s)->manager->confirm_spawn;
+        exec_params.cgroup_supported = UNIT(s)->manager->cgroup_supported;
+        exec_params.cgroup_path = path;
+        exec_params.runtime_prefix = manager_get_runtime_prefix(UNIT(s)->manager);
+        exec_params.unit_id = UNIT(s)->id;
+        exec_params.watchdog_usec = s->watchdog_usec;
+        exec_params.bus_endpoint_path = bus_endpoint_path;
+        if (s->type == SERVICE_IDLE)
+                exec_params.idle_pipe = UNIT(s)->manager->idle_pipe;
+
         r = exec_spawn(c,
-                       argv,
                        &s->exec_context,
-                       fds, n_fds,
-                       final_env,
-                       apply_permissions,
-                       apply_chroot,
-                       apply_tty_stdin,
-                       UNIT(s)->manager->confirm_spawn,
-                       UNIT(s)->manager->cgroup_supported,
-                       path,
-                       manager_get_runtime_prefix(UNIT(s)->manager),
-                       UNIT(s)->id,
-                       s->watchdog_usec,
-                       s->type == SERVICE_IDLE ? UNIT(s)->manager->idle_pipe : NULL,
+                       &exec_params,
                        s->exec_runtime,
                        &pid);
         if (r < 0)
@@ -1049,8 +1077,6 @@ static int cgroup_good(Service *s) {
         return !r;
 }
 
-static int service_execute_action(Service *s, FailureAction action, const char *reason, bool log_action_none);
-
 static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart) {
         int r;
         assert(s);
@@ -1060,8 +1086,10 @@ static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart)
 
         service_set_state(s, s->result != SERVICE_SUCCESS ? SERVICE_FAILED : SERVICE_DEAD);
 
-        if (s->result != SERVICE_SUCCESS)
-                service_execute_action(s, s->failure_action, "failed", false);
+        if (s->result != SERVICE_SUCCESS) {
+                log_warning_unit(UNIT(s)->id, "%s failed.", UNIT(s)->id);
+                failure_action(UNIT(s)->manager, s->failure_action, s->reboot_arg);
+        }
 
         if (allow_restart &&
             !s->forbid_restart &&
@@ -1101,9 +1129,7 @@ static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart)
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run install restart timer: %s",
-                         UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run install restart timer: %s", UNIT(s)->id, strerror(-r));
         service_enter_dead(s, SERVICE_FAILURE_RESOURCES, false);
 }
 
@@ -1123,12 +1149,11 @@ static void service_enter_stop_post(Service *s, ServiceResult f) {
 
                 r = service_spawn(s,
                                   s->control_command,
-                                  true,
+                                  s->timeout_stop_usec,
                                   false,
                                   !s->permissions_start_only,
                                   !s->root_directory_start_only,
                                   true,
-                                  false,
                                   true,
                                   &s->control_pid);
                 if (r < 0)
@@ -1141,9 +1166,7 @@ static void service_enter_stop_post(Service *s, ServiceResult f) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run 'stop-post' task: %s",
-                         UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run 'stop-post' task: %s", UNIT(s)->id, strerror(-r));
         service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_RESOURCES);
 }
 
@@ -1160,7 +1183,8 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
         r = unit_kill_context(
                         UNIT(s),
                         &s->kill_context,
-                        state != SERVICE_STOP_SIGTERM && state != SERVICE_FINAL_SIGTERM,
+                        (state != SERVICE_STOP_SIGTERM && state != SERVICE_FINAL_SIGTERM && state != SERVICE_STOP_SIGABRT) ?
+                        KILL_KILL : (state == SERVICE_STOP_SIGABRT ? KILL_ABORT : KILL_TERMINATE),
                         s->main_pid,
                         s->control_pid,
                         s->main_pid_alien);
@@ -1176,7 +1200,7 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
                 }
 
                 service_set_state(s, state);
-        } else if (state == SERVICE_STOP_SIGTERM)
+        } else if (state == SERVICE_STOP_SIGTERM || state == SERVICE_STOP_SIGABRT)
                 service_enter_signal(s, SERVICE_STOP_SIGKILL, SERVICE_SUCCESS);
         else if (state == SERVICE_STOP_SIGKILL)
                 service_enter_stop_post(s, SERVICE_SUCCESS);
@@ -1188,15 +1212,27 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to kill processes: %s", UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to kill processes: %s", UNIT(s)->id, strerror(-r));
 
-        if (state == SERVICE_STOP_SIGTERM || state == SERVICE_STOP_SIGKILL)
+        if (state == SERVICE_STOP_SIGTERM || state == SERVICE_STOP_SIGKILL ||
+            state == SERVICE_STOP_SIGABRT)
                 service_enter_stop_post(s, SERVICE_FAILURE_RESOURCES);
         else
                 service_enter_dead(s, SERVICE_FAILURE_RESOURCES, true);
 }
 
+static void service_enter_stop_by_notify(Service *s) {
+        assert(s);
+
+        unit_watch_all_pids(UNIT(s));
+
+        if (s->timeout_stop_usec > 0)
+                service_arm_timer(s, s->timeout_stop_usec);
+
+        /* The service told us it's stopping, so it's as if we SIGTERM'd it. */
+        service_set_state(s, SERVICE_STOP_SIGTERM);
+}
+
 static void service_enter_stop(Service *s, ServiceResult f) {
         int r;
 
@@ -1214,12 +1250,11 @@ static void service_enter_stop(Service *s, ServiceResult f) {
 
                 r = service_spawn(s,
                                   s->control_command,
-                                  true,
+                                  s->timeout_stop_usec,
                                   false,
                                   !s->permissions_start_only,
                                   !s->root_directory_start_only,
                                   false,
-                                  false,
                                   true,
                                   &s->control_pid);
                 if (r < 0)
@@ -1232,8 +1267,7 @@ static void service_enter_stop(Service *s, ServiceResult f) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run 'stop' task: %s", UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run 'stop' task: %s", UNIT(s)->id, strerror(-r));
         service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_RESOURCES);
 }
 
@@ -1248,9 +1282,18 @@ static void service_enter_running(Service *s, ServiceResult f) {
         cgroup_ok = cgroup_good(s);
 
         if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&
-            (s->bus_name_good || s->type != SERVICE_DBUS))
-                service_set_state(s, SERVICE_RUNNING);
-        else if (s->remain_after_exit)
+            (s->bus_name_good || s->type != SERVICE_DBUS)) {
+
+                /* If there are any queued up sd_notify()
+                 * notifications, process them now */
+                if (s->notify_state == NOTIFY_RELOADING)
+                        service_enter_reload_by_notify(s);
+                else if (s->notify_state == NOTIFY_STOPPING)
+                        service_enter_stop_by_notify(s);
+                else
+                        service_set_state(s, SERVICE_RUNNING);
+
+        } else if (s->remain_after_exit)
                 service_set_state(s, SERVICE_EXITED);
         else
                 service_enter_stop(s, SERVICE_SUCCESS);
@@ -1269,12 +1312,11 @@ static void service_enter_start_post(Service *s) {
 
                 r = service_spawn(s,
                                   s->control_command,
-                                  true,
+                                  s->timeout_start_usec,
                                   false,
                                   !s->permissions_start_only,
                                   !s->root_directory_start_only,
                                   false,
-                                  false,
                                   true,
                                   &s->control_pid);
                 if (r < 0)
@@ -1287,8 +1329,7 @@ static void service_enter_start_post(Service *s) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run 'start-post' task: %s", UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run 'start-post' task: %s", UNIT(s)->id, strerror(-r));
         service_enter_stop(s, SERVICE_FAILURE_RESOURCES);
 }
 
@@ -1309,9 +1350,6 @@ static void service_enter_start(Service *s) {
 
         assert(s);
 
-        assert(s->exec_command[SERVICE_EXEC_START]);
-        assert(!s->exec_command[SERVICE_EXEC_START]->command_next || s->type == SERVICE_ONESHOT);
-
         service_unwatch_control_pid(s);
         service_unwatch_main_pid(s);
 
@@ -1332,15 +1370,19 @@ static void service_enter_start(Service *s) {
                 c = s->main_command = s->exec_command[SERVICE_EXEC_START];
         }
 
+        if (!c) {
+                assert(s->type == SERVICE_ONESHOT);
+                service_enter_start_post(s);
+                return;
+        }
+
         r = service_spawn(s,
                           c,
-                          s->type == SERVICE_FORKING || s->type == SERVICE_DBUS ||
-                            s->type == SERVICE_NOTIFY || s->type == SERVICE_ONESHOT,
+                          IN_SET(s->type, SERVICE_FORKING, SERVICE_DBUS, SERVICE_NOTIFY, SERVICE_ONESHOT) ? s->timeout_start_usec : 0,
                           true,
                           true,
                           true,
                           true,
-                          s->notify_access != NOTIFY_NONE,
                           false,
                           &pid);
         if (r < 0)
@@ -1380,8 +1422,7 @@ static void service_enter_start(Service *s) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run 'start' task: %s", UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run 'start' task: %s", UNIT(s)->id, strerror(-r));
         service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_RESOURCES);
 }
 
@@ -1402,12 +1443,11 @@ static void service_enter_start_pre(Service *s) {
 
                 r = service_spawn(s,
                                   s->control_command,
-                                  true,
+                                  s->timeout_start_usec,
                                   false,
                                   !s->permissions_start_only,
                                   !s->root_directory_start_only,
                                   true,
-                                  false,
                                   true,
                                   &s->control_pid);
                 if (r < 0)
@@ -1457,12 +1497,19 @@ static void service_enter_restart(Service *s) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to schedule restart job: %s",
-                         UNIT(s)->id, bus_error_message(&error, -r));
+        log_warning_unit(UNIT(s)->id, "%s failed to schedule restart job: %s", UNIT(s)->id, bus_error_message(&error, -r));
         service_enter_dead(s, SERVICE_FAILURE_RESOURCES, false);
 }
 
+static void service_enter_reload_by_notify(Service *s) {
+        assert(s);
+
+        if (s->timeout_start_usec > 0)
+                service_arm_timer(s, s->timeout_start_usec);
+
+        service_set_state(s, SERVICE_RELOAD);
+}
+
 static void service_enter_reload(Service *s) {
         int r;
 
@@ -1476,12 +1523,11 @@ static void service_enter_reload(Service *s) {
 
                 r = service_spawn(s,
                                   s->control_command,
-                                  true,
+                                  s->timeout_start_usec,
                                   false,
                                   !s->permissions_start_only,
                                   !s->root_directory_start_only,
                                   false,
-                                  false,
                                   true,
                                   &s->control_pid);
                 if (r < 0)
@@ -1494,9 +1540,7 @@ static void service_enter_reload(Service *s) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run 'reload' task: %s",
-                         UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run 'reload' task: %s", UNIT(s)->id, strerror(-r));
         s->reload_result = SERVICE_FAILURE_RESOURCES;
         service_enter_running(s, SERVICE_SUCCESS);
 }
@@ -1515,13 +1559,12 @@ static void service_run_next_control(Service *s) {
 
         r = service_spawn(s,
                           s->control_command,
-                          true,
+                          IN_SET(s->state, SERVICE_START_PRE, SERVICE_START, SERVICE_START_POST, SERVICE_RUNNING, SERVICE_RELOAD) ? s->timeout_start_usec : s->timeout_stop_usec,
                           false,
                           !s->permissions_start_only,
                           !s->root_directory_start_only,
                           s->control_command_id == SERVICE_EXEC_START_PRE ||
                           s->control_command_id == SERVICE_EXEC_STOP_POST,
-                          false,
                           true,
                           &s->control_pid);
         if (r < 0)
@@ -1530,9 +1573,7 @@ static void service_run_next_control(Service *s) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run next control task: %s",
-                         UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run next control task: %s", UNIT(s)->id, strerror(-r));
 
         if (s->state == SERVICE_START_PRE)
                 service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_RESOURCES);
@@ -1561,12 +1602,11 @@ static void service_run_next_main(Service *s) {
 
         r = service_spawn(s,
                           s->main_command,
+                          s->timeout_start_usec,
                           true,
                           true,
                           true,
                           true,
-                          true,
-                          s->notify_access != NOTIFY_NONE,
                           false,
                           &pid);
         if (r < 0)
@@ -1577,79 +1617,19 @@ static void service_run_next_main(Service *s) {
         return;
 
 fail:
-        log_warning_unit(UNIT(s)->id,
-                         "%s failed to run next main task: %s", UNIT(s)->id, strerror(-r));
+        log_warning_unit(UNIT(s)->id, "%s failed to run next main task: %s", UNIT(s)->id, strerror(-r));
         service_enter_stop(s, SERVICE_FAILURE_RESOURCES);
 }
 
-static int service_execute_action(Service *s, FailureAction action, const char *reason, bool log_action_none) {
-        assert(s);
-
-        if (action == SERVICE_FAILURE_ACTION_REBOOT ||
-            action == SERVICE_FAILURE_ACTION_REBOOT_FORCE)
-                update_reboot_param_file(s->reboot_arg);
-
-        switch (action) {
-
-        case SERVICE_FAILURE_ACTION_NONE:
-                if (log_action_none)
-                        log_warning_unit(UNIT(s)->id,
-                                         "%s %s, refusing to start.", UNIT(s)->id, reason);
-                break;
-
-        case SERVICE_FAILURE_ACTION_REBOOT: {
-                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-                int r;
-
-                log_warning_unit(UNIT(s)->id,
-                                 "%s %s, rebooting.", UNIT(s)->id, reason);
-
-                r = manager_add_job_by_name(UNIT(s)->manager, JOB_START,
-                                            SPECIAL_REBOOT_TARGET, JOB_REPLACE,
-                                            true, &error, NULL);
-                if (r < 0)
-                        log_error_unit(UNIT(s)->id,
-                                       "Failed to reboot: %s.", bus_error_message(&error, r));
-
-                break;
-        }
-
-        case SERVICE_FAILURE_ACTION_REBOOT_FORCE:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s %s, forcibly rebooting.", UNIT(s)->id, reason);
-                UNIT(s)->manager->exit_code = MANAGER_REBOOT;
-                break;
-
-        case SERVICE_FAILURE_ACTION_REBOOT_IMMEDIATE:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s %s, rebooting immediately.", UNIT(s)->id, reason);
-                sync();
-                if (s->reboot_arg) {
-                        log_info("Rebooting with argument '%s'.", s->reboot_arg);
-                        syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
-                                LINUX_REBOOT_CMD_RESTART2, s->reboot_arg);
-                }
-
-                log_info("Rebooting.");
-                reboot(RB_AUTOBOOT);
-                break;
-
-        default:
-                log_error_unit(UNIT(s)->id,
-                               "failure action=%i", action);
-                assert_not_reached("Unknown FailureAction.");
-        }
-
-        return -ECANCELED;
-}
-
 static int service_start_limit_test(Service *s) {
         assert(s);
 
         if (ratelimit_test(&s->start_limit))
                 return 0;
 
-        return service_execute_action(s, s->start_limit_action, "start request repeated too quickly", true);
+        log_warning_unit(UNIT(s)->id, "start request repeated too quickly for %s", UNIT(s)->id);
+
+        return failure_action(UNIT(s)->manager, s->start_limit_action, s->reboot_arg);
 }
 
 static int service_start(Unit *u) {
@@ -1661,6 +1641,7 @@ static int service_start(Unit *u) {
         /* We cannot fulfill this request right now, try again later
          * please! */
         if (s->state == SERVICE_STOP ||
+            s->state == SERVICE_STOP_SIGABRT ||
             s->state == SERVICE_STOP_SIGTERM ||
             s->state == SERVICE_STOP_SIGKILL ||
             s->state == SERVICE_STOP_POST ||
@@ -1699,6 +1680,12 @@ static int service_start(Unit *u) {
         s->main_pid_alien = false;
         s->forbid_restart = false;
 
+        free(s->status_text);
+        s->status_text = NULL;
+        s->status_errno = 0;
+
+        s->notify_state = NOTIFY_UNKNOWN;
+
         service_enter_start_pre(s);
         return 0;
 }
@@ -1713,6 +1700,7 @@ static int service_stop(Unit *u) {
 
         /* Already on it */
         if (s->state == SERVICE_STOP ||
+            s->state == SERVICE_STOP_SIGABRT ||
             s->state == SERVICE_STOP_SIGTERM ||
             s->state == SERVICE_STOP_SIGKILL ||
             s->state == SERVICE_STOP_POST ||
@@ -1801,6 +1789,15 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
                 unit_serialize_item_format(u, f, "socket-fd", "%i", copy);
         }
 
+        if (s->bus_endpoint_fd >= 0) {
+                int copy;
+
+                if ((copy = fdset_put_dup(fds, s->bus_endpoint_fd)) < 0)
+                        return copy;
+
+                unit_serialize_item_format(u, f, "endpoint-fd", "%i", copy);
+        }
+
         if (s->main_exec_status.pid > 0) {
                 unit_serialize_item_format(u, f, "main-exec-status-pid", PID_FMT,
                                            s->main_exec_status.pid);
@@ -1910,10 +1907,18 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
                 if (safe_atoi(value, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
                         log_debug_unit(u->id, "Failed to parse socket-fd value %s", value);
                 else {
-
                         asynchronous_close(s->socket_fd);
                         s->socket_fd = fdset_remove(fds, fd);
                 }
+        } else if (streq(key, "endpoint-fd")) {
+                int fd;
+
+                if (safe_atoi(value, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
+                        log_debug_unit(u->id, "Failed to parse endpoint-fd value %s", value);
+                else {
+                        safe_close(s->bus_endpoint_fd);
+                        s->bus_endpoint_fd = fdset_remove(fds, fd);
+                }
         } else if (streq(key, "main-exec-status-pid")) {
                 pid_t pid;
 
@@ -1991,7 +1996,7 @@ _pure_ static bool service_check_snapshot(Unit *u) {
 
         assert(s);
 
-        return (s->socket_fd < 0);
+        return s->socket_fd < 0;
 }
 
 static int service_retry_pid_file(Service *s) {
@@ -2013,24 +2018,19 @@ static int service_retry_pid_file(Service *s) {
 static int service_watch_pid_file(Service *s) {
         int r;
 
-        log_debug_unit(UNIT(s)->id,
-                       "Setting watch for %s's PID file %s",
-                       UNIT(s)->id, s->pid_file_pathspec->path);
+        log_debug_unit(UNIT(s)->id, "Setting watch for %s's PID file %s", UNIT(s)->id, s->pid_file_pathspec->path);
+
         r = path_spec_watch(s->pid_file_pathspec, service_dispatch_io);
         if (r < 0)
                 goto fail;
 
         /* the pidfile might have appeared just before we set the watch */
-        log_debug_unit(UNIT(s)->id,
-                       "Trying to read %s's PID file %s in case it changed",
-                       UNIT(s)->id, s->pid_file_pathspec->path);
+        log_debug_unit(UNIT(s)->id, "Trying to read %s's PID file %s in case it changed", UNIT(s)->id, s->pid_file_pathspec->path);
         service_retry_pid_file(s);
 
         return 0;
 fail:
-        log_error_unit(UNIT(s)->id,
-                       "Failed to set a watch for %s's PID file %s: %s",
-                       UNIT(s)->id, s->pid_file_pathspec->path, strerror(-r));
+        log_error_unit(UNIT(s)->id, "Failed to set a watch for %s's PID file %s: %s", UNIT(s)->id, s->pid_file_pathspec->path, strerror(-r));
         service_unwatch_pid_file(s);
         return r;
 }
@@ -2117,8 +2117,8 @@ static void service_notify_cgroup_empty_event(Unit *u) {
                 /* If we were hoping for the daemon to write its PID file,
                  * we can give up now. */
                 if (s->pid_file_pathspec) {
-                        log_warning_unit(u->id,
-                                         "%s never wrote its PID file. Failing.", UNIT(s)->id);
+                        log_warning_unit(u->id, "%s never wrote its PID file. Failing.", UNIT(s)->id);
+
                         service_unwatch_pid_file(s);
                         if (s->state == SERVICE_START)
                                 service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_RESOURCES);
@@ -2132,6 +2132,7 @@ static void service_notify_cgroup_empty_event(Unit *u) {
                 service_enter_running(s, SERVICE_SUCCESS);
                 break;
 
+        case SERVICE_STOP_SIGABRT:
         case SERVICE_STOP_SIGTERM:
         case SERVICE_STOP_SIGKILL:
 
@@ -2224,9 +2225,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                         /* There is another command to *
                          * execute, so let's do that. */
 
-                        log_debug_unit(u->id,
-                                       "%s running next main command for state %s",
-                                       u->id, service_state_to_string(s->state));
+                        log_debug_unit(u->id, "%s running next main command for state %s", u->id, service_state_to_string(s->state));
                         service_run_next_main(s);
 
                 } else {
@@ -2260,6 +2259,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                                 service_enter_running(s, f);
                                 break;
 
+                        case SERVICE_STOP_SIGABRT:
                         case SERVICE_STOP_SIGTERM:
                         case SERVICE_STOP_SIGKILL:
 
@@ -2286,8 +2286,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                 s->control_pid = 0;
 
                 if (s->control_command) {
-                        exec_status_exit(&s->control_command->exec_status,
-                                         &s->exec_context, pid, code, status);
+                        exec_status_exit(&s->control_command->exec_status, &s->exec_context, pid, code, status);
 
                         if (s->control_command->ignore)
                                 f = SERVICE_SUCCESS;
@@ -2312,9 +2311,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                         /* There is another command to *
                          * execute, so let's do that. */
 
-                        log_debug_unit(u->id,
-                                       "%s running next control command for state %s",
-                                       u->id, service_state_to_string(s->state));
+                        log_debug_unit(u->id, "%s running next control command for state %s", u->id, service_state_to_string(s->state));
                         service_run_next_control(s);
 
                 } else {
@@ -2324,9 +2321,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                         s->control_command = NULL;
                         s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID;
 
-                        log_debug_unit(u->id,
-                                       "%s got final SIGCHLD for state %s",
-                                       u->id, service_state_to_string(s->state));
+                        log_debug_unit(u->id, "%s got final SIGCHLD for state %s", u->id, service_state_to_string(s->state));
 
                         switch (s->state) {
 
@@ -2405,6 +2400,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                                 service_enter_signal(s, SERVICE_STOP_SIGTERM, f);
                                 break;
 
+                        case SERVICE_STOP_SIGABRT:
                         case SERVICE_STOP_SIGTERM:
                         case SERVICE_STOP_SIGKILL:
                                 if (main_pid_good(s) <= 0)
@@ -2454,40 +2450,38 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
 
         case SERVICE_START_PRE:
         case SERVICE_START:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s %s operation timed out. Terminating.",
-                                 UNIT(s)->id,
-                                 s->state == SERVICE_START ? "start" : "start-pre");
+                log_warning_unit(UNIT(s)->id, "%s %s operation timed out. Terminating.", UNIT(s)->id, s->state == SERVICE_START ? "start" : "start-pre");
                 service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_TIMEOUT);
                 break;
 
         case SERVICE_START_POST:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s start-post operation timed out. Stopping.", UNIT(s)->id);
+                log_warning_unit(UNIT(s)->id, "%s start-post operation timed out. Stopping.", UNIT(s)->id);
                 service_enter_stop(s, SERVICE_FAILURE_TIMEOUT);
                 break;
 
         case SERVICE_RELOAD:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s reload operation timed out. Stopping.", UNIT(s)->id);
+                log_warning_unit(UNIT(s)->id, "%s reload operation timed out. Stopping.", UNIT(s)->id);
                 s->reload_result = SERVICE_FAILURE_TIMEOUT;
                 service_enter_running(s, SERVICE_SUCCESS);
                 break;
 
         case SERVICE_STOP:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s stopping timed out. Terminating.", UNIT(s)->id);
+                log_warning_unit(UNIT(s)->id, "%s stopping timed out. Terminating.", UNIT(s)->id);
                 service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_TIMEOUT);
                 break;
 
+        case SERVICE_STOP_SIGABRT:
+                log_warning_unit(UNIT(s)->id,
+                                 "%s stop-sigabrt timed out. Terminating.", UNIT(s)->id);
+                service_enter_signal(s, SERVICE_STOP_SIGTERM, s->result);
+                break;
+
         case SERVICE_STOP_SIGTERM:
                 if (s->kill_context.send_sigkill) {
-                        log_warning_unit(UNIT(s)->id,
-                                         "%s stop-sigterm timed out. Killing.", UNIT(s)->id);
+                        log_warning_unit(UNIT(s)->id, "%s stop-sigterm timed out. Killing.", UNIT(s)->id);
                         service_enter_signal(s, SERVICE_STOP_SIGKILL, SERVICE_FAILURE_TIMEOUT);
                 } else {
-                        log_warning_unit(UNIT(s)->id,
-                                         "%s stop-sigterm timed out. Skipping SIGKILL.", UNIT(s)->id);
+                        log_warning_unit(UNIT(s)->id, "%s stop-sigterm timed out. Skipping SIGKILL.", UNIT(s)->id);
                         service_enter_stop_post(s, SERVICE_FAILURE_TIMEOUT);
                 }
 
@@ -2498,34 +2492,28 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
                  * Must be something we cannot kill, so let's just be
                  * weirded out and continue */
 
-                log_warning_unit(UNIT(s)->id,
-                                 "%s still around after SIGKILL. Ignoring.", UNIT(s)->id);
+                log_warning_unit(UNIT(s)->id, "%s still around after SIGKILL. Ignoring.", UNIT(s)->id);
                 service_enter_stop_post(s, SERVICE_FAILURE_TIMEOUT);
                 break;
 
         case SERVICE_STOP_POST:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s stop-post timed out. Terminating.", UNIT(s)->id);
+                log_warning_unit(UNIT(s)->id, "%s stop-post timed out. Terminating.", UNIT(s)->id);
                 service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_TIMEOUT);
                 break;
 
         case SERVICE_FINAL_SIGTERM:
                 if (s->kill_context.send_sigkill) {
-                        log_warning_unit(UNIT(s)->id,
-                                         "%s stop-final-sigterm timed out. Killing.", UNIT(s)->id);
+                        log_warning_unit(UNIT(s)->id, "%s stop-final-sigterm timed out. Killing.", UNIT(s)->id);
                         service_enter_signal(s, SERVICE_FINAL_SIGKILL, SERVICE_FAILURE_TIMEOUT);
                 } else {
-                        log_warning_unit(UNIT(s)->id,
-                                         "%s stop-final-sigterm timed out. Skipping SIGKILL. Entering failed mode.",
-                                         UNIT(s)->id);
+                        log_warning_unit(UNIT(s)->id, "%s stop-final-sigterm timed out. Skipping SIGKILL. Entering failed mode.", UNIT(s)->id);
                         service_enter_dead(s, SERVICE_FAILURE_TIMEOUT, false);
                 }
 
                 break;
 
         case SERVICE_FINAL_SIGKILL:
-                log_warning_unit(UNIT(s)->id,
-                                 "%s still around after final SIGKILL. Entering failed mode.", UNIT(s)->id);
+                log_warning_unit(UNIT(s)->id, "%s still around after final SIGKILL. Entering failed mode.", UNIT(s)->id);
                 service_enter_dead(s, SERVICE_FAILURE_TIMEOUT, true);
                 break;
 
@@ -2547,35 +2535,37 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
 
 static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void *userdata) {
         Service *s = SERVICE(userdata);
+        char t[FORMAT_TIMESPAN_MAX];
 
         assert(s);
         assert(source == s->watchdog_event_source);
 
-        log_error_unit(UNIT(s)->id, "%s watchdog timeout!", UNIT(s)->id);
-        service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_WATCHDOG);
+        log_error_unit(UNIT(s)->id, "%s watchdog timeout (limit %s)!", UNIT(s)->id,
+                       format_timespan(t, sizeof(t), s->watchdog_usec, 1));
+
+        service_enter_signal(s, SERVICE_STOP_SIGABRT, SERVICE_FAILURE_WATCHDOG);
 
         return 0;
 }
 
 static void service_notify_message(Unit *u, pid_t pid, char **tags) {
         Service *s = SERVICE(u);
-        const char *e;
+        _cleanup_free_ char *cc = NULL;
         bool notify_dbus = false;
+        const char *e;
 
         assert(u);
 
-        log_debug_unit(u->id, "%s: Got notification message from PID "PID_FMT" (%s...)",
-                       u->id, pid, tags && *tags ? tags[0] : "(empty)");
+        cc = strv_join(tags, ", ");
+        log_debug_unit(u->id, "%s: Got notification message from PID "PID_FMT" (%s)",
+                       u->id, pid, isempty(cc) ? "n/a" : cc);
 
         if (s->notify_access == NOTIFY_NONE) {
-                log_warning_unit(u->id,
-                                 "%s: Got notification message from PID "PID_FMT", but reception is disabled.",
-                                 u->id, pid);
+                log_warning_unit(u->id, "%s: Got notification message from PID "PID_FMT", but reception is disabled.", u->id, pid);
                 return;
         }
 
         if (s->notify_access == NOTIFY_MAIN && pid != s->main_pid) {
-
                 if (s->main_pid != 0)
                         log_warning_unit(u->id, "%s: Got notification message from PID "PID_FMT", but reception only permitted for main PID "PID_FMT, u->id, pid, s->main_pid);
                 else
@@ -2584,57 +2574,104 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) {
         }
 
         /* Interpret MAINPID= */
-        if ((e = strv_find_prefix(tags, "MAINPID=")) &&
-            (s->state == SERVICE_START ||
-             s->state == SERVICE_START_POST ||
-             s->state == SERVICE_RUNNING ||
-             s->state == SERVICE_RELOAD)) {
-
-                if (parse_pid(e + 8, &pid) < 0)
-                        log_warning_unit(u->id, "Failed to parse notification message %s", e);
+        e = strv_find_startswith(tags, "MAINPID=");
+        if (e && IN_SET(s->state, SERVICE_START, SERVICE_START_POST, SERVICE_RUNNING, SERVICE_RELOAD)) {
+                if (parse_pid(e, &pid) < 0)
+                        log_warning_unit(u->id, "Failed to parse MAINPID= field in notification message: %s", e);
                 else {
-                        log_debug_unit(u->id, "%s: got %s", u->id, e);
+                        log_debug_unit(u->id, "%s: got MAINPID=%s", u->id, e);
+
                         service_set_main_pid(s, pid);
                         unit_watch_pid(UNIT(s), pid);
                         notify_dbus = true;
                 }
         }
 
+        /* Interpret RELOADING= */
+        if (strv_find(tags, "RELOADING=1")) {
+
+                log_debug_unit(u->id, "%s: got RELOADING=1", u->id);
+                s->notify_state = NOTIFY_RELOADING;
+
+                if (s->state == SERVICE_RUNNING)
+                        service_enter_reload_by_notify(s);
+
+                notify_dbus = true;
+        }
+
         /* Interpret READY= */
-        if (s->type == SERVICE_NOTIFY && s->state == SERVICE_START && strv_find(tags, "READY=1")) {
+        if (strv_find(tags, "READY=1")) {
+
                 log_debug_unit(u->id, "%s: got READY=1", u->id);
-                service_enter_start_post(s);
+                s->notify_state = NOTIFY_READY;
+
+                /* Type=notify services inform us about completed
+                 * initialization with READY=1 */
+                if (s->type == SERVICE_NOTIFY && s->state == SERVICE_START)
+                        service_enter_start_post(s);
+
+                /* Sending READY=1 while we are reloading informs us
+                 * that the reloading is complete */
+                if (s->state == SERVICE_RELOAD && s->control_pid == 0)
+                        service_enter_running(s, SERVICE_SUCCESS);
+
+                notify_dbus = true;
+        }
+
+        /* Interpret STOPPING= */
+        if (strv_find(tags, "STOPPING=1")) {
+
+                log_debug_unit(u->id, "%s: got STOPPING=1", u->id);
+                s->notify_state = NOTIFY_STOPPING;
+
+                if (s->state == SERVICE_RUNNING)
+                        service_enter_stop_by_notify(s);
+
                 notify_dbus = true;
         }
 
         /* Interpret STATUS= */
-        e = strv_find_prefix(tags, "STATUS=");
+        e = strv_find_startswith(tags, "STATUS=");
         if (e) {
-                char *t;
+                _cleanup_free_ char *t = NULL;
 
-                if (e[7]) {
-                        if (!utf8_is_valid(e+7)) {
+                if (!isempty(e)) {
+                        if (!utf8_is_valid(e))
                                 log_warning_unit(u->id, "Status message in notification is not UTF-8 clean.");
-                                return;
-                        }
-
-                        log_debug_unit(u->id, "%s: got %s", u->id, e);
+                        else {
+                                log_debug_unit(u->id, "%s: got STATUS=%s", u->id, e);
 
-                        t = strdup(e+7);
-                        if (!t) {
-                                log_oom();
-                                return;
+                                t = strdup(e);
+                                if (!t)
+                                        log_oom();
                         }
-
-                } else
-                        t = NULL;
+                }
 
                 if (!streq_ptr(s->status_text, t)) {
+
                         free(s->status_text);
                         s->status_text = t;
+                        t = NULL;
+
                         notify_dbus = true;
-                } else
-                        free(t);
+                }
+        }
+
+        /* Interpret ERRNO= */
+        e = strv_find_startswith(tags, "ERRNO=");
+        if (e) {
+                int status_errno;
+
+                if (safe_atoi(e, &status_errno) < 0 || status_errno < 0)
+                        log_warning_unit(u->id, "Failed to parse ERRNO= field in notification message: %s", e);
+                else {
+                        log_debug_unit(u->id, "%s: got ERRNO=%s", u->id, e);
+
+                        if (s->status_errno != status_errno) {
+                                s->status_errno = status_errno;
+                                notify_dbus = true;
+                        }
+                }
         }
 
         /* Interpret WATCHDOG= */
@@ -2678,17 +2715,11 @@ static void service_bus_name_owner_change(
         assert(old_owner || new_owner);
 
         if (old_owner && new_owner)
-                log_debug_unit(u->id,
-                               "%s's D-Bus name %s changed owner from %s to %s",
-                               u->id, name, old_owner, new_owner);
+                log_debug_unit(u->id, "%s's D-Bus name %s changed owner from %s to %s", u->id, name, old_owner, new_owner);
         else if (old_owner)
-                log_debug_unit(u->id,
-                               "%s's D-Bus name %s no longer registered by %s",
-                               u->id, name, old_owner);
+                log_debug_unit(u->id, "%s's D-Bus name %s no longer registered by %s", u->id, name, old_owner);
         else
-                log_debug_unit(u->id,
-                               "%s's D-Bus name %s now registered by %s",
-                               u->id, name, new_owner);
+                log_debug_unit(u->id, "%s's D-Bus name %s now registered by %s", u->id, name, new_owner);
 
         s->bus_name_good = !!new_owner;
 
@@ -2713,7 +2744,7 @@ static void service_bus_name_owner_change(
 
                 /* Try to acquire PID from bus service */
 
-                r = sd_bus_get_owner(u->manager->api_bus, name, SD_BUS_CREDS_PID, &creds);
+                r = sd_bus_get_name_creds(u->manager->api_bus, name, SD_BUS_CREDS_PID, &creds);
                 if (r >= 0)
                         r = sd_bus_creds_get_pid(creds, &pid);
                 if (r >= 0) {
@@ -2725,7 +2756,7 @@ static void service_bus_name_owner_change(
         }
 }
 
-int service_set_socket_fd(Service *s, int fd, Socket *sock) {
+int service_set_socket_fd(Service *s, int fd, Socket *sock, bool selinux_context_net) {
         _cleanup_free_ char *peer = NULL;
         int r;
 
@@ -2763,6 +2794,7 @@ int service_set_socket_fd(Service *s, int fd, Socket *sock) {
         }
 
         s->socket_fd = fd;
+        s->socket_fd_selinux_context_net = selinux_context_net;
 
         unit_ref_set(&s->accept_socket, UNIT(sock));
 
@@ -2798,6 +2830,7 @@ static const char* const service_state_table[_SERVICE_STATE_MAX] = {
         [SERVICE_EXITED] = "exited",
         [SERVICE_RELOAD] = "reload",
         [SERVICE_STOP] = "stop",
+        [SERVICE_STOP_SIGABRT] = "stop-sigabrt",
         [SERVICE_STOP_SIGTERM] = "stop-sigterm",
         [SERVICE_STOP_SIGKILL] = "stop-sigkill",
         [SERVICE_STOP_POST] = "stop-post",
@@ -2851,6 +2884,15 @@ static const char* const notify_access_table[_NOTIFY_ACCESS_MAX] = {
 
 DEFINE_STRING_TABLE_LOOKUP(notify_access, NotifyAccess);
 
+static const char* const notify_state_table[_NOTIFY_STATE_MAX] = {
+        [NOTIFY_UNKNOWN] = "unknown",
+        [NOTIFY_READY] = "ready",
+        [NOTIFY_RELOADING] = "reloading",
+        [NOTIFY_STOPPING] = "stopping",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(notify_state, NotifyState);
+
 static const char* const service_result_table[_SERVICE_RESULT_MAX] = {
         [SERVICE_SUCCESS] = "success",
         [SERVICE_FAILURE_RESOURCES] = "resources",
@@ -2864,14 +2906,6 @@ static const char* const service_result_table[_SERVICE_RESULT_MAX] = {
 
 DEFINE_STRING_TABLE_LOOKUP(service_result, ServiceResult);
 
-static const char* const failure_action_table[_SERVICE_FAILURE_ACTION_MAX] = {
-        [SERVICE_FAILURE_ACTION_NONE] = "none",
-        [SERVICE_FAILURE_ACTION_REBOOT] = "reboot",
-        [SERVICE_FAILURE_ACTION_REBOOT_FORCE] = "reboot-force",
-        [SERVICE_FAILURE_ACTION_REBOOT_IMMEDIATE] = "reboot-immediate"
-};
-DEFINE_STRING_TABLE_LOOKUP(failure_action, FailureAction);
-
 const UnitVTable service_vtable = {
         .object_size = sizeof(Service),
         .exec_context_offset = offsetof(Service, exec_context),
index 7406d90f59e88cf6ea7b4bc2f3a7db1c18c7f0ab..54fbe46fa443ded2c0a8120cbb97769d28b57c58 100644 (file)
@@ -28,6 +28,7 @@ typedef struct Service Service;
 #include "ratelimit.h"
 #include "kill.h"
 #include "exit-status.h"
+#include "failure-action.h"
 
 typedef enum ServiceState {
         SERVICE_DEAD,
@@ -38,6 +39,7 @@ typedef enum ServiceState {
         SERVICE_EXITED,            /* Nothing is running anymore, but RemainAfterExit is true hence this is OK */
         SERVICE_RELOAD,
         SERVICE_STOP,              /* No STOP_PRE state, instead just register multiple STOP executables */
+        SERVICE_STOP_SIGABRT,      /* Watchdog timeout */
         SERVICE_STOP_SIGTERM,
         SERVICE_STOP_SIGKILL,
         SERVICE_STOP_POST,
@@ -91,6 +93,15 @@ typedef enum NotifyAccess {
         _NOTIFY_ACCESS_INVALID = -1
 } NotifyAccess;
 
+typedef enum NotifyState {
+        NOTIFY_UNKNOWN,
+        NOTIFY_READY,
+        NOTIFY_RELOADING,
+        NOTIFY_STOPPING,
+        _NOTIFY_STATE_MAX,
+        _NOTIFY_STATE_INVALID = -1
+} NotifyState;
+
 typedef enum ServiceResult {
         SERVICE_SUCCESS,
         SERVICE_FAILURE_RESOURCES,
@@ -104,15 +115,6 @@ typedef enum ServiceResult {
         _SERVICE_RESULT_INVALID = -1
 } ServiceResult;
 
-typedef enum FailureAction {
-        SERVICE_FAILURE_ACTION_NONE,
-        SERVICE_FAILURE_ACTION_REBOOT,
-        SERVICE_FAILURE_ACTION_REBOOT_FORCE,
-        SERVICE_FAILURE_ACTION_REBOOT_IMMEDIATE,
-        _SERVICE_FAILURE_ACTION_MAX,
-        _SERVICE_FAILURE_ACTION_INVALID = -1
-} FailureAction;
-
 struct Service {
         Unit meta;
 
@@ -160,6 +162,9 @@ struct Service {
 
         pid_t main_pid, control_pid;
         int socket_fd;
+        bool socket_fd_selinux_context_net;
+
+        int bus_endpoint_fd;
 
         bool permissions_start_only;
         bool root_directory_start_only;
@@ -182,11 +187,11 @@ struct Service {
         char *bus_name;
 
         char *status_text;
-
-        FailureAction failure_action;
+        int status_errno;
 
         RateLimit start_limit;
         FailureAction start_limit_action;
+        FailureAction failure_action;
         char *reboot_arg;
 
         UnitRef accept_socket;
@@ -195,13 +200,14 @@ struct Service {
         PathSpec *pid_file_pathspec;
 
         NotifyAccess notify_access;
+        NotifyState notify_state;
 };
 
 extern const UnitVTable service_vtable;
 
 struct Socket;
 
-int service_set_socket_fd(Service *s, int fd, struct Socket *socket);
+int service_set_socket_fd(Service *s, int fd, struct Socket *socket, bool selinux_context_net);
 
 const char* service_state_to_string(ServiceState i) _const_;
 ServiceState service_state_from_string(const char *s) _pure_;
@@ -218,8 +224,8 @@ ServiceExecCommand service_exec_command_from_string(const char *s) _pure_;
 const char* notify_access_to_string(NotifyAccess i) _const_;
 NotifyAccess notify_access_from_string(const char *s) _pure_;
 
+const char* notify_state_to_string(NotifyState i) _const_;
+NotifyState notify_state_from_string(const char *s) _pure_;
+
 const char* service_result_to_string(ServiceResult i) _const_;
 ServiceResult service_result_from_string(const char *s) _pure_;
-
-const char* failure_action_to_string(FailureAction i) _const_;
-FailureAction failure_action_from_string(const char *s) _pure_;
index fde3ce9c27b92239dd93fbcacff88a311dd79770..20cf526ba2716b34fe1a2fc9bde05a396b160502 100644 (file)
@@ -48,6 +48,7 @@
 #include "killall.h"
 #include "cgroup-util.h"
 #include "def.h"
+#include "switch-root.h"
 
 #define FINALIZE_ATTEMPTS 50
 
@@ -74,9 +75,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 1);
         assert(argv);
 
-        opterr = 0;
-
-        while ((c = getopt_long(argc, argv, ":", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0)
                 switch (c) {
 
                 case ARG_LOG_LEVEL:
@@ -115,11 +114,6 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case '?':
-                        log_error("Unknown option %s.", argv[optind-1]);
-                        return -EINVAL;
-
-                case ':':
-                        log_error("Missing argument to %s.", argv[optind-1]);
                         return -EINVAL;
 
                 default:
@@ -138,16 +132,7 @@ static int parse_argv(int argc, char *argv[]) {
         return 0;
 }
 
-static int prepare_new_root(void) {
-        static const char dirs[] =
-                "/run/initramfs/oldroot\0"
-                "/run/initramfs/proc\0"
-                "/run/initramfs/sys\0"
-                "/run/initramfs/dev\0"
-                "/run/initramfs/run\0";
-
-        const char *dir;
-
+static int switch_root_initramfs(void) {
         if (mount("/run/initramfs", "/run/initramfs", NULL, MS_BIND, NULL) < 0) {
                 log_error("Failed to mount bind /run/initramfs on /run/initramfs: %m");
                 return -errno;
@@ -158,66 +143,13 @@ static int prepare_new_root(void) {
                 return -errno;
         }
 
-        NULSTR_FOREACH(dir, dirs)
-                if (mkdir_p_label(dir, 0755) < 0 && errno != EEXIST) {
-                        log_error("Failed to mkdir %s: %m", dir);
-                        return -errno;
-                }
-
-        if (mount("/sys", "/run/initramfs/sys", NULL, MS_BIND, NULL) < 0) {
-                log_error("Failed to mount bind /sys on /run/initramfs/sys: %m");
-                return -errno;
-        }
-
-        if (mount("/proc", "/run/initramfs/proc", NULL, MS_BIND, NULL) < 0) {
-                log_error("Failed to mount bind /proc on /run/initramfs/proc: %m");
-                return -errno;
-        }
-
-        if (mount("/dev", "/run/initramfs/dev", NULL, MS_BIND, NULL) < 0) {
-                log_error("Failed to mount bind /dev on /run/initramfs/dev: %m");
-                return -errno;
-        }
-
-        if (mount("/run", "/run/initramfs/run", NULL, MS_BIND, NULL) < 0) {
-                log_error("Failed to mount bind /run on /run/initramfs/run: %m");
-                return -errno;
-        }
-
-        return 0;
+        /* switch_root with MS_BIND, because there might still be processes lurking around, which have open file desriptors.
+         * /run/initramfs/shutdown will take care of these.
+         * Also do not detach the old root, because /run/initramfs/shutdown needs to access it.
+         */
+        return switch_root("/run/initramfs", "/oldroot", false, MS_BIND);
 }
 
-static int pivot_to_new_root(void) {
-
-        if (chdir("/run/initramfs") < 0) {
-                log_error("Failed to change directory to /run/initramfs: %m");
-                return -errno;
-        }
-
-        /* Work-around for a kernel bug: for some reason the kernel
-         * refuses switching root if any file systems are mounted
-         * MS_SHARED. Hence remount them MS_PRIVATE here as a
-         * work-around.
-         *
-         * https://bugzilla.redhat.com/show_bug.cgi?id=847418 */
-        if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0)
-                log_warning("Failed to make \"/\" private mount: %m");
-
-        if (pivot_root(".", "oldroot") < 0) {
-                log_error("pivot failed: %m");
-                /* only chroot if pivot root succeeded */
-                return -errno;
-        }
-
-        chroot(".");
-
-        setsid();
-        make_console_stdio();
-
-        log_info("Successfully changed into root pivot.");
-
-        return 0;
-}
 
 int main(int argc, char *argv[]) {
         bool need_umount, need_swapoff, need_loop_detach, need_dm_detach;
@@ -275,7 +207,7 @@ int main(int argc, char *argv[]) {
 
         in_container = detect_container(NULL) > 0;
 
-        need_umount = true;
+        need_umount = !in_container;
         need_swapoff = !in_container;
         need_loop_detach = !in_container;
         need_dm_detach = !in_container;
@@ -379,16 +311,21 @@ int main(int argc, char *argv[]) {
 
         if (!in_container && !in_initrd() &&
             access("/run/initramfs/shutdown", X_OK) == 0) {
+                r = switch_root_initramfs();
+                if (r >= 0) {
+                        argv[0] = (char*) "/shutdown";
 
-                if (prepare_new_root() >= 0 &&
-                    pivot_to_new_root() >= 0) {
-                        arguments[0] = (char*) "/shutdown";
+                        setsid();
+                        make_console_stdio();
 
-                        log_info("Returning to initrd...");
+                        log_info("Successfully changed into root pivot.\n"
+                                 "Returning to initrd...");
 
-                        execv("/shutdown", arguments);
+                        execv("/shutdown", argv);
                         log_error("Failed to execute shutdown binary: %m");
-                }
+                } else
+                        log_error("Failed to switch root to \"/run/initramfs\": %s", strerror(-r));
+
         }
 
         if (need_umount || need_swapoff || need_loop_detach || need_dm_detach)
@@ -442,8 +379,7 @@ int main(int argc, char *argv[]) {
 
                         if (read_one_line_file(REBOOT_PARAM_FILE, &param) >= 0) {
                                 log_info("Rebooting with argument '%s'.", param);
-                                syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
-                                        LINUX_REBOOT_CMD_RESTART2, param);
+                                syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, param);
                         }
                 }
 
index 5f6dabf82a228fbcacb6194a7b132ba43404ae49..d0fd1809f9a54aa879c3ccfb7c5ed9ae85b34e2e 100644 (file)
@@ -116,7 +116,7 @@ static int write_rules(const char* dstpath, const char* srcdir) {
 
 #endif
 
-int smack_setup(bool *loaded_policy) {
+int mac_smack_setup(bool *loaded_policy) {
 
 #ifdef HAVE_SMACK
 
@@ -158,7 +158,7 @@ int smack_setup(bool *loaded_policy) {
                 return 0;
         case 0:
                 log_info("Successfully loaded Smack/CIPSO policies.");
-                return 0;
+                break;
         default:
                 log_warning("Failed to load Smack/CIPSO access rules: %s, ignoring.",
                             strerror(abs(r)));
index 892709669b826e45944763a18fbb45a52a27b455..1cab7718ffd6c796dd9e81d63876bee0f046e865 100644 (file)
@@ -23,4 +23,4 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-int smack_setup(bool *loaded_policy);
+int mac_smack_setup(bool *loaded_policy);
index c58a7f03ee9336260a7b2a884cb5547edf9d0a2e..6ba8338d8b26ef00d905b779c45bf77e960e5483 100644 (file)
@@ -180,9 +180,8 @@ static int socket_arm_timer(Socket *s) {
                         socket_dispatch_timer, s);
 }
 
-static int socket_instantiate_service(Socket *s) {
-        _cleanup_free_ char *prefix = NULL;
-        _cleanup_free_ char *name = NULL;
+int socket_instantiate_service(Socket *s) {
+        _cleanup_free_ char *prefix = NULL, *name = NULL;
         int r;
         Unit *u;
 
@@ -193,11 +192,9 @@ static int socket_instantiate_service(Socket *s) {
          * here. For Accept=no this is mostly a NOP since the service
          * is figured out at load time anyway. */
 
-        if (UNIT_DEREF(s->service))
+        if (UNIT_DEREF(s->service) || !s->accept)
                 return 0;
 
-        assert(s->accept);
-
         prefix = unit_name_to_prefix(UNIT(s)->id);
         if (!prefix)
                 return -ENOMEM;
@@ -465,6 +462,7 @@ _const_ static const char* listen_lookup(int family, int type) {
 }
 
 static void socket_dump(Unit *u, FILE *f, const char *prefix) {
+        char time_string[FORMAT_TIMESPAN_MAX];
         SocketExecCommand c;
         Socket *s = SOCKET(u);
         SocketPort *p;
@@ -473,6 +471,7 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
         assert(s);
         assert(f);
 
+        prefix = strempty(prefix);
         prefix2 = strappenda(prefix, "\t");
 
         fprintf(f,
@@ -483,13 +482,15 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
                 "%sSocketMode: %04o\n"
                 "%sDirectoryMode: %04o\n"
                 "%sKeepAlive: %s\n"
+                "%sNoDelay: %s\n"
                 "%sFreeBind: %s\n"
                 "%sTransparent: %s\n"
                 "%sBroadcast: %s\n"
                 "%sPassCredentials: %s\n"
                 "%sPassSecurity: %s\n"
                 "%sTCPCongestion: %s\n"
-                "%sRemoveOnStop: %s\n",
+                "%sRemoveOnStop: %s\n"
+                "%sSELinuxContextFromNet: %s\n",
                 prefix, socket_state_to_string(s->state),
                 prefix, socket_result_to_string(s->result),
                 prefix, socket_address_bind_ipv6_only_to_string(s->bind_ipv6_only),
@@ -497,13 +498,15 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, s->socket_mode,
                 prefix, s->directory_mode,
                 prefix, yes_no(s->keep_alive),
+                prefix, yes_no(s->no_delay),
                 prefix, yes_no(s->free_bind),
                 prefix, yes_no(s->transparent),
                 prefix, yes_no(s->broadcast),
                 prefix, yes_no(s->pass_cred),
                 prefix, yes_no(s->pass_sec),
                 prefix, strna(s->tcp_congestion),
-                prefix, yes_no(s->remove_on_stop));
+                prefix, yes_no(s->remove_on_stop),
+                prefix, yes_no(s->selinux_context_from_net));
 
         if (s->control_pid > 0)
                 fprintf(f,
@@ -596,6 +599,26 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
                         prefix, strna(s->user),
                         prefix, strna(s->group));
 
+        if (s->keep_alive_time > 0)
+                fprintf(f,
+                        "%sKeepAliveTimeSec: %s\n",
+                        prefix, format_timespan(time_string, FORMAT_TIMESPAN_MAX, s->keep_alive_time, USEC_PER_SEC));
+
+        if (s->keep_alive_interval)
+                fprintf(f,
+                        "%sKeepAliveIntervalSec: %s\n",
+                        prefix, format_timespan(time_string, FORMAT_TIMESPAN_MAX, s->keep_alive_interval, USEC_PER_SEC));
+
+        if (s->keep_alive_cnt)
+                fprintf(f,
+                        "%sKeepAliveProbes: %u\n",
+                        prefix, s->keep_alive_cnt);
+
+        if (s->defer_accept)
+                fprintf(f,
+                        "%sDeferAcceptSec: %s\n",
+                        prefix, format_timespan(time_string, FORMAT_TIMESPAN_MAX, s->defer_accept, USEC_PER_SEC));
+
         LIST_FOREACH(port, p, s->ports) {
 
                 if (p->type == SOCKET_SOCKET) {
@@ -784,6 +807,8 @@ static void socket_close_fds(Socket *s) {
 }
 
 static void socket_apply_socket_options(Socket *s, int fd) {
+        int r;
+
         assert(s);
         assert(fd >= 0);
 
@@ -793,6 +818,36 @@ static void socket_apply_socket_options(Socket *s, int fd) {
                         log_warning_unit(UNIT(s)->id, "SO_KEEPALIVE failed: %m");
         }
 
+        if (s->keep_alive_time) {
+                int value = s->keep_alive_time / USEC_PER_SEC;
+                if (setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &value, sizeof(value)) < 0)
+                        log_warning_unit(UNIT(s)->id, "TCP_KEEPIDLE failed: %m");
+        }
+
+        if (s->keep_alive_interval) {
+                int value =  s->keep_alive_interval / USEC_PER_SEC;
+                if (setsockopt(fd, SOL_TCP, TCP_KEEPINTVL, &value, sizeof(value)) < 0)
+                        log_warning_unit(UNIT(s)->id, "TCP_KEEPINTVL failed: %m");
+        }
+
+        if (s->keep_alive_cnt) {
+                int value = s->keep_alive_cnt;
+                if (setsockopt(fd, SOL_SOCKET, TCP_KEEPCNT, &value, sizeof(value)) < 0)
+                        log_warning_unit(UNIT(s)->id, "TCP_KEEPCNT failed: %m");
+        }
+
+        if (s->defer_accept) {
+                int value = s->defer_accept / USEC_PER_SEC;
+                if (setsockopt(fd, SOL_TCP, TCP_DEFER_ACCEPT, &value, sizeof(value)) < 0)
+                        log_warning_unit(UNIT(s)->id, "TCP_DEFER_ACCEPT failed: %m");
+        }
+
+        if (s->no_delay) {
+                int b = s->no_delay;
+                if (setsockopt(fd, SOL_TCP, TCP_NODELAY, &b, sizeof(b)) < 0)
+                        log_warning_unit(UNIT(s)->id, "TCP_NODELAY failed: %m");
+        }
+
         if (s->broadcast) {
                 int one = 1;
                 if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) < 0)
@@ -841,7 +896,7 @@ static void socket_apply_socket_options(Socket *s, int fd) {
                         log_warning_unit(UNIT(s)->id, "IP_TOS failed: %m");
 
         if (s->ip_ttl >= 0) {
-                int r, x;
+                int x;
 
                 r = setsockopt(fd, IPPROTO_IP, IP_TTL, &s->ip_ttl, sizeof(s->ip_ttl));
 
@@ -867,27 +922,34 @@ static void socket_apply_socket_options(Socket *s, int fd) {
                         log_warning_unit(UNIT(s)->id, "SO_REUSEPORT failed: %m");
         }
 
-        if (s->smack_ip_in)
-                if (smack_label_ip_in_fd(fd, s->smack_ip_in) < 0)
-                        log_error_unit(UNIT(s)->id, "smack_label_ip_in_fd: %m");
+        if (s->smack_ip_in) {
+                r = mac_smack_apply_ip_in_fd(fd, s->smack_ip_in);
+                if (r < 0)
+                        log_error_unit(UNIT(s)->id, "mac_smack_apply_ip_in_fd: %s", strerror(-r));
+        }
 
-        if (s->smack_ip_out)
-                if (smack_label_ip_out_fd(fd, s->smack_ip_out) < 0)
-                        log_error_unit(UNIT(s)->id, "smack_label_ip_out_fd: %m");
+        if (s->smack_ip_out) {
+                r = mac_smack_apply_ip_out_fd(fd, s->smack_ip_out);
+                if (r < 0)
+                        log_error_unit(UNIT(s)->id, "mac_smack_apply_ip_out_fd: %s", strerror(-r));
+        }
 }
 
 static void socket_apply_fifo_options(Socket *s, int fd) {
+        int r;
+
         assert(s);
         assert(fd >= 0);
 
         if (s->pipe_size > 0)
                 if (fcntl(fd, F_SETPIPE_SZ, s->pipe_size) < 0)
-                        log_warning_unit(UNIT(s)->id,
-                                         "F_SETPIPE_SZ: %m");
+                        log_warning_unit(UNIT(s)->id, "F_SETPIPE_SZ: %m");
 
-        if (s->smack)
-                if (smack_label_fd(fd, s->smack) < 0)
-                        log_error_unit(UNIT(s)->id, "smack_label_fd: %m");
+        if (s->smack) {
+                r = mac_smack_apply_fd(fd, s->smack);
+                if (r < 0)
+                        log_error_unit(UNIT(s)->id, "mac_smack_apply_fd: %s", strerror(-r));
+        }
 }
 
 static int fifo_address_create(
@@ -905,7 +967,7 @@ static int fifo_address_create(
 
         mkdir_parents_label(path, directory_mode);
 
-        r = label_context_set(path, S_IFIFO);
+        r = mac_selinux_create_file_prepare(path, S_IFIFO);
         if (r < 0)
                 goto fail;
 
@@ -928,7 +990,7 @@ static int fifo_address_create(
                 goto fail;
         }
 
-        label_context_clear();
+        mac_selinux_create_file_clear();
 
         if (fstat(fd, &st) < 0) {
                 r = -errno;
@@ -948,7 +1010,7 @@ static int fifo_address_create(
         return 0;
 
 fail:
-        label_context_clear();
+        mac_selinux_create_file_clear();
         safe_close(fd);
 
         return r;
@@ -1058,7 +1120,7 @@ static int socket_symlink(Socket *s) {
                 return 0;
 
         STRV_FOREACH(i, s->symlinks)
-                symlink(p, *i);
+                symlink_label(p, *i);
 
         return 0;
 }
@@ -1079,16 +1141,31 @@ static int socket_open_fds(Socket *s) {
                 if (p->type == SOCKET_SOCKET) {
 
                         if (!know_label) {
-
-                                r = socket_instantiate_service(s);
-                                if (r < 0)
-                                        return r;
-
-                                if (UNIT_ISSET(s->service) &&
-                                    SERVICE(UNIT_DEREF(s->service))->exec_command[SERVICE_EXEC_START]) {
-                                        r = label_get_create_label_from_exe(SERVICE(UNIT_DEREF(s->service))->exec_command[SERVICE_EXEC_START]->path, &label);
-                                        if (r < 0 && r != -EPERM)
-                                                return r;
+                                /* Figure out label, if we don't it know
+                                 * yet. We do it once, for the first
+                                 * socket where we need this and
+                                 * remember it for the rest. */
+
+                                if (s->selinux_context_from_net) {
+                                        /* Get it from the network label */
+
+                                        r = mac_selinux_get_our_label(&label);
+                                        if (r < 0 && r != -EOPNOTSUPP)
+                                                goto rollback;
+
+                                } else {
+                                        /* Get it from the executable we are about to start */
+
+                                        r = socket_instantiate_service(s);
+                                        if (r < 0)
+                                                goto rollback;
+
+                                        if (UNIT_ISSET(s->service) &&
+                                            SERVICE(UNIT_DEREF(s->service))->exec_command[SERVICE_EXEC_START]) {
+                                                r = mac_selinux_get_create_label_from_exe(SERVICE(UNIT_DEREF(s->service))->exec_command[SERVICE_EXEC_START]->path, &label);
+                                                if (r < 0 && r != -EPERM && r != -EOPNOTSUPP)
+                                                        goto rollback;
+                                        }
                                 }
 
                                 know_label = true;
@@ -1147,12 +1224,13 @@ static int socket_open_fds(Socket *s) {
                         assert_not_reached("Unknown port type");
         }
 
-        label_free(label);
+        mac_selinux_free(label);
         return 0;
 
 rollback:
         socket_close_fds(s);
-        label_free(label);
+        mac_selinux_free(label);
+
         return r;
 }
 
@@ -1307,6 +1385,11 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
         _cleanup_free_ char **argv = NULL;
         pid_t pid;
         int r;
+        ExecParameters exec_params = {
+                .apply_permissions = true,
+                .apply_chroot      = true,
+                .apply_tty_stdin   = true,
+        };
 
         assert(s);
         assert(c);
@@ -1326,21 +1409,17 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
         if (r < 0)
                 goto fail;
 
+        exec_params.argv = argv;
+        exec_params.environment = UNIT(s)->manager->environment;
+        exec_params.confirm_spawn = UNIT(s)->manager->confirm_spawn;
+        exec_params.cgroup_supported = UNIT(s)->manager->cgroup_supported;
+        exec_params.cgroup_path = UNIT(s)->cgroup_path;
+        exec_params.runtime_prefix = manager_get_runtime_prefix(UNIT(s)->manager);
+        exec_params.unit_id = UNIT(s)->id;
+
         r = exec_spawn(c,
-                       argv,
                        &s->exec_context,
-                       NULL, 0,
-                       UNIT(s)->manager->environment,
-                       true,
-                       true,
-                       true,
-                       UNIT(s)->manager->confirm_spawn,
-                       UNIT(s)->manager->cgroup_supported,
-                       UNIT(s)->cgroup_path,
-                       manager_get_runtime_prefix(UNIT(s)->manager),
-                       UNIT(s)->id,
-                       0,
-                       NULL,
+                       &exec_params,
                        s->exec_runtime,
                        &pid);
         if (r < 0)
@@ -1499,7 +1578,8 @@ static void socket_enter_signal(Socket *s, SocketState state, SocketResult f) {
         r = unit_kill_context(
                         UNIT(s),
                         &s->kill_context,
-                        state != SOCKET_STOP_PRE_SIGTERM && state != SOCKET_FINAL_SIGTERM,
+                        (state != SOCKET_STOP_PRE_SIGTERM && state != SOCKET_FINAL_SIGTERM) ?
+                        KILL_KILL : KILL_TERMINATE,
                         -1,
                         s->control_pid,
                         false);
@@ -1769,7 +1849,7 @@ static void socket_enter_running(Socket *s, int cfd) {
 
                 unit_choose_id(UNIT(service), name);
 
-                r = service_set_socket_fd(service, cfd, s);
+                r = service_set_socket_fd(service, cfd, s, s->selinux_context_from_net);
                 if (r < 0)
                         goto fail;
 
index 39e00deea46339f38f578b1665bcea2ce72a3fe8..a2e08998c0a730b2248d966c0157ec6bbaca5539 100644 (file)
@@ -101,7 +101,11 @@ struct Socket {
         unsigned max_connections;
 
         unsigned backlog;
+        unsigned keep_alive_cnt;
         usec_t timeout_usec;
+        usec_t keep_alive_time;
+        usec_t keep_alive_interval;
+        usec_t defer_accept;
 
         ExecCommand* exec_command[_SOCKET_EXEC_COMMAND_MAX];
         ExecContext exec_context;
@@ -134,6 +138,7 @@ struct Socket {
 
         /* Socket options */
         bool keep_alive;
+        bool no_delay;
         bool free_bind;
         bool transparent;
         bool broadcast;
@@ -160,6 +165,8 @@ struct Socket {
         char *smack_ip_in;
         char *smack_ip_out;
 
+        bool selinux_context_from_net;
+
         char *user, *group;
 };
 
@@ -183,3 +190,5 @@ const char* socket_result_to_string(SocketResult i) _const_;
 SocketResult socket_result_from_string(const char *s) _pure_;
 
 const char* socket_port_type_to_string(SocketPort *p) _pure_;
+
+int socket_instantiate_service(Socket *s);
index 9f353af430be489b9624b52d998760125259be4b..1add722bf13db58cf4869f63380cebd90c493bf8 100644 (file)
@@ -77,7 +77,7 @@ static int swap_set_devnode(Swap *s, const char *devnode) {
 
         assert(s);
 
-        r = hashmap_ensure_allocated(&UNIT(s)->manager->swaps_by_devnode, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&UNIT(s)->manager->swaps_by_devnode, &string_hash_ops);
         if (r < 0)
                 return r;
 
@@ -152,6 +152,9 @@ static void swap_done(Unit *u) {
         free(s->parameters_fragment.what);
         s->parameters_fragment.what = NULL;
 
+        free(s->parameters_fragment.options);
+        s->parameters_fragment.options = NULL;
+
         s->exec_runtime = exec_runtime_unref(s->exec_runtime);
         exec_command_done_array(s->exec_command, _SWAP_EXEC_COMMAND_MAX);
         s->control_command = NULL;
@@ -188,20 +191,16 @@ static int swap_arm_timer(Swap *s) {
 }
 
 static int swap_add_device_links(Swap *s) {
-        SwapParameters *p;
-
         assert(s);
 
         if (!s->what)
                 return 0;
 
-        if (s->from_fragment)
-                p = &s->parameters_fragment;
-        else
+        if (!s->from_fragment)
                 return 0;
 
         if (is_device_path(s->what))
-                return unit_add_node_link(UNIT(s), s->what, !p->noauto && UNIT(s)->manager->running_as == SYSTEMD_SYSTEM);
+                return unit_add_node_link(UNIT(s), s->what, UNIT(s)->manager->running_as == SYSTEMD_SYSTEM);
         else
                 /* File based swap devices need to be ordered after
                  * systemd-remount-fs.service, since they might need a
@@ -210,7 +209,6 @@ static int swap_add_device_links(Swap *s) {
 }
 
 static int swap_add_default_dependencies(Swap *s) {
-        bool nofail = false, noauto = false;
         int r;
 
         assert(s);
@@ -225,23 +223,15 @@ static int swap_add_default_dependencies(Swap *s) {
         if (r < 0)
                 return r;
 
-        if (s->from_fragment) {
-                SwapParameters *p = &s->parameters_fragment;
-
-                nofail = p->nofail;
-                noauto = p->noauto;
-        }
-
-        if (!noauto) {
-                if (nofail)
-                        r = unit_add_dependency_by_name_inverse(UNIT(s), UNIT_WANTS, SPECIAL_SWAP_TARGET, NULL, true);
-                else
-                        r = unit_add_two_dependencies_by_name_inverse(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SWAP_TARGET, NULL, true);
-                if (r < 0)
-                        return r;
-        }
+        if (!s->from_fragment)
+                /* The swap unit can either be for an alternative device name, in which
+                 * case we don't need to add the dependency on swap.target because this unit
+                 * is following a different unit which will have this dependency added,
+                 * or it can be derived from /proc/swaps, in which case it was started
+                 * manually, and should not become a dependency of swap.target. */
+                return 0;
 
-        return 0;
+        return unit_add_two_dependencies_by_name_inverse(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SWAP_TARGET, NULL, true);
 }
 
 static int swap_verify(Swap *s) {
@@ -366,8 +356,6 @@ static int swap_add_one(
                 const char *what,
                 const char *what_proc_swaps,
                 int priority,
-                bool noauto,
-                bool nofail,
                 bool set_flags) {
 
         _cleanup_free_ char *e = NULL;
@@ -430,8 +418,6 @@ static int swap_add_one(
         SWAP(u)->from_proc_swaps = true;
 
         p->priority = priority;
-        p->noauto = noauto;
-        p->nofail = nofail;
 
         unit_add_to_dbus_queue(u);
 
@@ -455,7 +441,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
 
         assert(m);
 
-        r = swap_add_one(m, device, device, prio, false, false, set_flags);
+        r = swap_add_one(m, device, device, prio, set_flags);
         if (r < 0)
                 return r;
 
@@ -471,7 +457,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
         /* Add the main device node */
         dn = udev_device_get_devnode(d);
         if (dn && !streq(dn, device))
-                swap_add_one(m, dn, device, prio, false, false, set_flags);
+                swap_add_one(m, dn, device, prio, set_flags);
 
         /* Add additional units for all symlinks */
         first = udev_device_get_devlinks_list_entry(d);
@@ -492,7 +478,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
                             st.st_rdev != udev_device_get_devnum(d))
                                 continue;
 
-                swap_add_one(m, p, device, prio, false, false, set_flags);
+                swap_add_one(m, p, device, prio, set_flags);
         }
 
         return r;
@@ -601,11 +587,9 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) {
         if (p)
                 fprintf(f,
                         "%sPriority: %i\n"
-                        "%sNoAuto: %s\n"
-                        "%sNoFail: %s\n",
+                        "%sOptions: %s\n",
                         prefix, p->priority,
-                        prefix, yes_no(p->noauto),
-                        prefix, yes_no(p->nofail));
+                        prefix, strempty(p->options));
 
         if (s->control_pid > 0)
                 fprintf(f,
@@ -619,6 +603,11 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) {
 static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) {
         pid_t pid;
         int r;
+        ExecParameters exec_params = {
+                .apply_permissions = true,
+                .apply_chroot      = true,
+                .apply_tty_stdin   = true,
+        };
 
         assert(s);
         assert(c);
@@ -634,21 +623,16 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) {
         if (r < 0)
                 goto fail;
 
+        exec_params.environment = UNIT(s)->manager->environment;
+        exec_params.confirm_spawn = UNIT(s)->manager->confirm_spawn;
+        exec_params.cgroup_supported = UNIT(s)->manager->cgroup_supported;
+        exec_params.cgroup_path = UNIT(s)->cgroup_path;
+        exec_params.runtime_prefix = manager_get_runtime_prefix(UNIT(s)->manager);
+        exec_params.unit_id = UNIT(s)->id;
+
         r = exec_spawn(c,
-                       NULL,
                        &s->exec_context,
-                       NULL, 0,
-                       UNIT(s)->manager->environment,
-                       true,
-                       true,
-                       true,
-                       UNIT(s)->manager->confirm_spawn,
-                       UNIT(s)->manager->cgroup_supported,
-                       UNIT(s)->cgroup_path,
-                       manager_get_runtime_prefix(UNIT(s)->manager),
-                       UNIT(s)->id,
-                       0,
-                       NULL,
+                       &exec_params,
                        s->exec_runtime,
                        &pid);
         if (r < 0)
@@ -703,7 +687,8 @@ static void swap_enter_signal(Swap *s, SwapState state, SwapResult f) {
         r = unit_kill_context(
                         UNIT(s),
                         &s->kill_context,
-                        state != SWAP_ACTIVATING_SIGTERM && state != SWAP_DEACTIVATING_SIGTERM,
+                        (state != SWAP_ACTIVATING_SIGTERM && state != SWAP_DEACTIVATING_SIGTERM) ?
+                        KILL_KILL : KILL_TERMINATE,
                         -1,
                         s->control_pid,
                         false);
@@ -732,38 +717,115 @@ fail:
         swap_enter_dead(s, SWAP_FAILURE_RESOURCES);
 }
 
+static int mount_find_pri(const char *options, int *ret) {
+        const char *opt;
+        char *end;
+        unsigned long r;
+
+        assert(ret);
+
+        if (!options)
+                return 0;
+
+        opt = mount_test_option(options, "pri");
+        if (!opt)
+                return 0;
+
+        opt += strlen("pri");
+        if (*opt != '=')
+                return -EINVAL;
+
+        errno = 0;
+        r = strtoul(opt + 1, &end, 10);
+        if (errno > 0)
+                return -errno;
+
+        if (end == opt + 1 || (*end != ',' && *end != 0))
+                return -EINVAL;
+
+        *ret = (int) r;
+        return 1;
+}
+
+static int mount_find_discard(const char *options, char **ret) {
+        const char *opt;
+        char *ans;
+        size_t len;
+
+        assert(ret);
+
+        if (!options)
+                return 0;
+
+        opt = mount_test_option(options, "discard");
+        if (!opt)
+                return 0;
+
+        opt += strlen("discard");
+        if (*opt == ',' || *opt == '\0')
+                ans = strdup("all");
+        else {
+                if (*opt != '=')
+                        return -EINVAL;
+
+                len = strcspn(opt + 1, ",");
+                if (len == 0)
+                        return -EINVAL;
+
+                ans = strndup(opt + 1, len);
+        }
+
+        if (!ans)
+                return -ENOMEM;
+
+        *ret = ans;
+        return 1;
+}
+
 static void swap_enter_activating(Swap *s) {
-        int r, priority;
+        _cleanup_free_ char *discard = NULL;
+        int r, priority = -1;
 
         assert(s);
 
         s->control_command_id = SWAP_EXEC_ACTIVATE;
         s->control_command = s->exec_command + SWAP_EXEC_ACTIVATE;
 
-        if (s->from_fragment)
+        if (s->from_fragment) {
+                mount_find_discard(s->parameters_fragment.options, &discard);
+
                 priority = s->parameters_fragment.priority;
-        else
-                priority = -1;
+                if (priority < 0)
+                        mount_find_pri(s->parameters_fragment.options, &priority);
+        }
+
+        r = exec_command_set(s->control_command, "/sbin/swapon", NULL);
+        if (r < 0)
+                goto fail;
 
         if (priority >= 0) {
                 char p[DECIMAL_STR_MAX(int)];
 
                 sprintf(p, "%i", priority);
+                r = exec_command_append(s->control_command, "-p", p, NULL);
+                if (r < 0)
+                        goto fail;
+        }
 
-                r = exec_command_set(
-                                s->control_command,
-                                "/sbin/swapon",
-                                "-p",
-                                p,
-                                s->what,
-                                NULL);
-        } else
-                r = exec_command_set(
-                                s->control_command,
-                                "/sbin/swapon",
-                                s->what,
-                                NULL);
+        if (discard && !streq(discard, "none")) {
+                const char *discard_arg;
+
+                if (streq(discard, "all"))
+                        discard_arg = "--discard";
+                else
+                        discard_arg = strappenda("--discard=", discard);
 
+                r = exec_command_append(s->control_command, discard_arg, NULL);
+                if (r < 0)
+                        goto fail;
+        }
+
+        r = exec_command_append(s->control_command, s->what, NULL);
         if (r < 0)
                 goto fail;
 
@@ -1193,11 +1255,25 @@ static Unit *swap_following(Unit *u) {
 
         assert(s);
 
-        if (streq_ptr(s->what, s->devnode))
+        /* If the user configured the swap through /etc/fstab or
+         * a device unit, follow that. */
+
+        if (s->from_fragment)
                 return NULL;
 
-        /* Make everybody follow the unit that's named after the swap
-         * device in the kernel */
+        LIST_FOREACH_AFTER(same_devnode, other, s)
+                if (other->from_fragment)
+                        return UNIT(other);
+
+        LIST_FOREACH_BEFORE(same_devnode, other, s)
+                if (other->from_fragment)
+                        return UNIT(other);
+
+        /* Otherwise make everybody follow the unit that's named after
+         * the swap device in the kernel */
+
+        if (streq_ptr(s->what, s->devnode))
+                return NULL;
 
         LIST_FOREACH_AFTER(same_devnode, other, s)
                 if (streq_ptr(other->what, other->devnode))
@@ -1210,6 +1286,7 @@ static Unit *swap_following(Unit *u) {
                 first = other;
         }
 
+        /* Fall back to the first on the list */
         return UNIT(first);
 }
 
@@ -1226,7 +1303,7 @@ static int swap_following_set(Unit *u, Set **_set) {
                 return 0;
         }
 
-        set = set_new(NULL, NULL);
+        set = set_new(NULL);
         if (!set)
                 return -ENOMEM;
 
index f2ae49b1dec7c3b40ab55c9f0890686dfd426de7..73e64d87a44ced16565fdd5dea48cb2b8df643df 100644 (file)
@@ -63,9 +63,8 @@ typedef enum SwapResult {
 
 typedef struct SwapParameters {
         char *what;
+        char *options;
         int priority;
-        bool noauto:1;
-        bool nofail:1;
 } SwapParameters;
 
 struct Swap {
diff --git a/src/core/switch-root.c b/src/core/switch-root.c
deleted file mode 100644 (file)
index f82243f..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Harald Hoyer, Lennart Poettering
-
-  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/>.
-***/
-
-#include <sys/stat.h>
-#include <stdbool.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/mount.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include "util.h"
-#include "path-util.h"
-#include "switch-root.h"
-#include "mkdir.h"
-#include "base-filesystem.h"
-#include "missing.h"
-
-int switch_root(const char *new_root) {
-
-        /*  Don't try to unmount/move the old "/", there's no way to do it. */
-        static const char move_mounts[] =
-                "/dev\0"
-                "/proc\0"
-                "/sys\0"
-                "/run\0";
-
-        _cleanup_close_ int old_root_fd = -1;
-        struct stat new_root_stat;
-        bool old_root_remove;
-        const char *i, *temporary_old_root;
-        int r;
-
-        if (path_equal(new_root, "/"))
-                return 0;
-
-        /* When using pivot_root() we assume that /mnt exists as place
-         * we can temporarily move the old root to. As we immediately
-         * unmount it from there it doesn't matter much which
-         * directory we choose for this, but it should be more likely
-         * than not that /mnt exists and is suitable as mount point
-         * and is on the same fs as the old root dir */
-        temporary_old_root = strappenda(new_root, "/mnt");
-        mkdir_p(temporary_old_root, 0755);
-
-        old_root_remove = in_initrd();
-
-        if (stat(new_root, &new_root_stat) < 0) {
-                log_error("Failed to stat directory %s: %m", new_root);
-                return -errno;
-        }
-
-        /* Work-around for a kernel bug: for some reason the kernel
-         * refuses switching root if any file systems are mounted
-         * MS_SHARED. Hence remount them MS_PRIVATE here as a
-         * work-around.
-         *
-         * https://bugzilla.redhat.com/show_bug.cgi?id=847418 */
-        if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0)
-                log_warning("Failed to make \"/\" private mount: %m");
-
-        NULSTR_FOREACH(i, move_mounts) {
-                char new_mount[PATH_MAX];
-                struct stat sb;
-
-                snprintf(new_mount, sizeof(new_mount), "%s%s", new_root, i);
-                char_array_0(new_mount);
-
-                mkdir_parents(new_mount, 0755);
-
-                if ((stat(new_mount, &sb) < 0) ||
-                    sb.st_dev != new_root_stat.st_dev) {
-
-                        /* Mount point seems to be mounted already or
-                         * stat failed. Unmount the old mount
-                         * point. */
-                        if (umount2(i, MNT_DETACH) < 0)
-                                log_warning("Failed to unmount %s: %m", i);
-                        continue;
-                }
-
-                if (mount(i, new_mount, NULL, MS_MOVE, NULL) < 0) {
-                        log_error("Failed to move mount %s to %s, forcing unmount: %m", i, new_mount);
-
-                        if (umount2(i, MNT_FORCE) < 0)
-                                log_warning("Failed to unmount %s: %m", i);
-                }
-        }
-
-        r = base_filesystem_create(new_root);
-        if (r < 0) {
-                log_error("Failed to create the base filesystem: %s", strerror(-r));
-                return r;
-        }
-
-        if (chdir(new_root) < 0) {
-                log_error("Failed to change directory to %s: %m", new_root);
-                return -errno;
-        }
-
-        if (old_root_remove) {
-                old_root_fd = open("/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY|O_DIRECTORY);
-                if (old_root_fd < 0)
-                        log_warning("Failed to open root directory: %m");
-        }
-
-        /* We first try a pivot_root() so that we can umount the old
-         * root dir. In many cases (i.e. where rootfs is /), that's
-         * not possible however, and hence we simply overmount root */
-        if (pivot_root(new_root, temporary_old_root) >= 0) {
-
-                /* Immediately get rid of the old root. Since we are
-                 * running off it we need to do this lazily. */
-                if (umount2(temporary_old_root, MNT_DETACH) < 0) {
-                        log_error("Failed to umount old root dir %s: %m", temporary_old_root);
-                        return -errno;
-                }
-
-        } else if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0) {
-                log_error("Failed to mount moving %s to /: %m", new_root);
-                return -errno;
-        }
-
-        if (chroot(".") < 0) {
-                log_error("Failed to change root: %m");
-                return -errno;
-        }
-
-        if (chdir("/") < 0) {
-                log_error("Failed to change directory: %m");
-                return -errno;
-        }
-
-        if (old_root_fd >= 0) {
-                struct stat rb;
-
-                if (fstat(old_root_fd, &rb) < 0)
-                        log_warning("Failed to stat old root directory, leaving: %m");
-                else {
-                        rm_rf_children(old_root_fd, false, false, &rb);
-                        old_root_fd = -1;
-                }
-        }
-
-        return 0;
-}
diff --git a/src/core/switch-root.h b/src/core/switch-root.h
deleted file mode 100644 (file)
index ab493b5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#pragma once
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Harald Hoyer, Lennart Poettering
-
-  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/>.
-***/
-
-int switch_root(const char *switch_root);
index e69dfbd1e4f561d457bce3edc818172e5ad3102e..a3713e2140d68fba370bf478b6af6899198544e3 100644 (file)
@@ -46,8 +46,8 @@ static void timer_init(Unit *u) {
         assert(u);
         assert(u->load_state == UNIT_STUB);
 
-        t->next_elapse_monotonic_or_boottime = (usec_t) -1;
-        t->next_elapse_realtime = (usec_t) -1;
+        t->next_elapse_monotonic_or_boottime = USEC_INFINITY;
+        t->next_elapse_realtime = USEC_INFINITY;
         t->accuracy_usec = u->manager->default_timer_accuracy_usec;
 }
 
@@ -95,6 +95,7 @@ static int timer_verify(Timer *t) {
 
 static int timer_add_default_dependencies(Timer *t) {
         int r;
+        TimerValue *v;
 
         assert(t);
 
@@ -106,6 +107,15 @@ static int timer_add_default_dependencies(Timer *t) {
                 r = unit_add_two_dependencies_by_name(UNIT(t), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true);
                 if (r < 0)
                         return r;
+
+                LIST_FOREACH(value, v, t->values) {
+                        if (v->base == TIMER_CALENDAR) {
+                                r = unit_add_dependency_by_name(UNIT(t), UNIT_AFTER, SPECIAL_TIME_SYNC_TARGET, NULL, true);
+                                if (r < 0)
+                                        return r;
+                                break;
+                        }
+                }
         }
 
         return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
@@ -232,7 +242,7 @@ static void timer_dump(Unit *u, FILE *f, const char *prefix) {
                                 "%s%s: %s\n",
                                 prefix,
                                 timer_base_to_string(v->base),
-                                strna(format_timespan(timespan1, sizeof(timespan1), v->value, 0)));
+                                format_timespan(timespan1, sizeof(timespan1), v->value, 0));
                 }
         }
 }
index 805d40ae6a13c6004695717d641a8967902f87fc..dbb4133fe38f853f893a3c90b72082002414e7d8 100644 (file)
@@ -870,7 +870,7 @@ int transaction_add_job_and_dependencies(
         }
 
         if (type != JOB_STOP && unit->load_state == UNIT_ERROR) {
-                if (unit->load_error == -ENOENT)
+                if (unit->load_error == -ENOENT || unit->manager->test_run)
                         sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED,
                                           "Unit %s failed to load: %s.",
                                           unit->id,
@@ -1143,7 +1143,7 @@ Transaction *transaction_new(bool irreversible) {
         if (!tr)
                 return NULL;
 
-        tr->jobs = hashmap_new(trivial_hash_func, trivial_compare_func);
+        tr->jobs = hashmap_new(NULL);
         if (!tr->jobs) {
                 free(tr);
                 return NULL;
index 5bd30f0bf74a7a4e37b07a0797d1d0514f40ac0e..62599d0813bd2478ace3c0a95f51cbff374f9a7d 100644 (file)
@@ -182,7 +182,7 @@ static int specifier_user_name(char specifier, void *data, void *userdata, char
         char *printed = NULL;
         Unit *u = userdata;
         ExecContext *c;
-        int r;
+        int r = 0;
 
         assert(u);
 
@@ -208,7 +208,7 @@ static int specifier_user_name(char specifier, void *data, void *userdata, char
                                 if (r < 0)
                                         return -ENODATA;
 
-                                asprintf(&printed, UID_FMT, uid);
+                                r = asprintf(&printed, UID_FMT, uid);
                         }
                 }
 
@@ -231,10 +231,10 @@ static int specifier_user_name(char specifier, void *data, void *userdata, char
                 if (specifier == 'u')
                         printed = strdup(username);
                 else
-                        asprintf(&printed, UID_FMT, uid);
+                        r = asprintf(&printed, UID_FMT, uid);
         }
 
-        if (!printed)
+        if (r < 0 || !printed)
                 return -ENOMEM;
 
         *ret = printed;
index 0e4ebfde9bc37bdfd8a7bd6df1ebb30ce25ebcf3..84f210a312f1d40658965c6b2349c0cb86685eb5 100644 (file)
@@ -69,6 +69,8 @@ const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
         [UNIT_SCOPE] = &scope_vtable
 };
 
+static int maybe_warn_about_dependency(const char *id, const char *other, UnitDependency dependency);
+
 Unit *unit_new(Manager *m, size_t size) {
         Unit *u;
 
@@ -79,7 +81,7 @@ Unit *unit_new(Manager *m, size_t size) {
         if (!u)
                 return NULL;
 
-        u->names = set_new(string_hash_func, string_compare_func);
+        u->names = set_new(&string_hash_ops);
         if (!u->names) {
                 free(u);
                 return NULL;
@@ -518,6 +520,8 @@ void unit_free(Unit *u) {
         strv_free(u->dropin_paths);
         free(u->instance);
 
+        free(u->job_timeout_reboot_arg);
+
         set_free_free(u->names);
 
         unit_unwatch_all_pids(u);
@@ -551,29 +555,38 @@ const char* unit_sub_state_to_string(Unit *u) {
         return UNIT_VTABLE(u)->sub_state_to_string(u);
 }
 
-static void complete_move(Set **s, Set **other) {
+static int complete_move(Set **s, Set **other) {
+        int r;
+
         assert(s);
         assert(other);
 
         if (!*other)
-                return;
+                return 0;
 
-        if (*s)
-                set_move(*s, *other);
-        else {
+        if (*s) {
+                r = set_move(*s, *other);
+                if (r < 0)
+                        return r;
+        } else {
                 *s = *other;
                 *other = NULL;
         }
+
+        return 0;
 }
 
-static void merge_names(Unit *u, Unit *other) {
+static int merge_names(Unit *u, Unit *other) {
         char *t;
         Iterator i;
+        int r;
 
         assert(u);
         assert(other);
 
-        complete_move(&u->names, &other->names);
+        r = complete_move(&u->names, &other->names);
+        if (r < 0)
+                return r;
 
         set_free_free(other->names);
         other->names = NULL;
@@ -581,9 +594,32 @@ static void merge_names(Unit *u, Unit *other) {
 
         SET_FOREACH(t, u->names, i)
                 assert_se(hashmap_replace(u->manager->units, t, u) == 0);
+
+        return 0;
+}
+
+static int reserve_dependencies(Unit *u, Unit *other, UnitDependency d) {
+        unsigned n_reserve;
+
+        assert(u);
+        assert(other);
+        assert(d < _UNIT_DEPENDENCY_MAX);
+
+        /*
+         * If u does not have this dependency set allocated, there is no need
+         * to reserve anything. In that case other's set will be transfered
+         * as a whole to u by complete_move().
+         */
+        if (!u->dependencies[d])
+                return 0;
+
+        /* merge_dependencies() will skip a u-on-u dependency */
+        n_reserve = set_size(other->dependencies[d]) - !!set_get(other->dependencies[d], u);
+
+        return set_reserve(u->dependencies[d], n_reserve);
 }
 
-static void merge_dependencies(Unit *u, Unit *other, UnitDependency d) {
+static void merge_dependencies(Unit *u, Unit *other, const char *other_id, UnitDependency d) {
         Iterator i;
         Unit *back;
         int r;
@@ -597,15 +633,27 @@ static void merge_dependencies(Unit *u, Unit *other, UnitDependency d) {
                 UnitDependency k;
 
                 for (k = 0; k < _UNIT_DEPENDENCY_MAX; k++) {
-                        r = set_remove_and_put(back->dependencies[k], other, u);
-                        if (r == -EEXIST)
-                                set_remove(back->dependencies[k], other);
-                        else
-                                assert(r >= 0 || r == -ENOENT);
+                        /* Do not add dependencies between u and itself */
+                        if (back == u) {
+                                if (set_remove(back->dependencies[k], other))
+                                        maybe_warn_about_dependency(u->id, other_id, k);
+                        } else {
+                                r = set_remove_and_put(back->dependencies[k], other, u);
+                                if (r == -EEXIST)
+                                        set_remove(back->dependencies[k], other);
+                                else
+                                        assert(r >= 0 || r == -ENOENT);
+                        }
                 }
         }
 
-        complete_move(&u->dependencies[d], &other->dependencies[d]);
+        /* Also do not move dependencies on u to itself */
+        back = set_remove(other->dependencies[d], u);
+        if (back)
+                maybe_warn_about_dependency(u->id, other_id, d);
+
+        /* The move cannot fail. The caller must have performed a reservation. */
+        assert_se(complete_move(&u->dependencies[d], &other->dependencies[d]) == 0);
 
         set_free(other->dependencies[d]);
         other->dependencies[d] = NULL;
@@ -613,6 +661,8 @@ static void merge_dependencies(Unit *u, Unit *other, UnitDependency d) {
 
 int unit_merge(Unit *u, Unit *other) {
         UnitDependency d;
+        const char *other_id = NULL;
+        int r;
 
         assert(u);
         assert(other);
@@ -643,8 +693,24 @@ int unit_merge(Unit *u, Unit *other) {
         if (!UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(other)))
                 return -EEXIST;
 
+        if (other->id)
+                other_id = strdupa(other->id);
+
+        /* Make reservations to ensure merge_dependencies() won't fail */
+        for (d = 0; d < _UNIT_DEPENDENCY_MAX; d++) {
+                r = reserve_dependencies(u, other, d);
+                /*
+                 * We don't rollback reservations if we fail. We don't have
+                 * a way to undo reservations. A reservation is not a leak.
+                 */
+                if (r < 0)
+                        return r;
+        }
+
         /* Merge names */
-        merge_names(u, other);
+        r = merge_names(u, other);
+        if (r < 0)
+                return r;
 
         /* Redirect all references */
         while (other->refs)
@@ -652,7 +718,7 @@ int unit_merge(Unit *u, Unit *other) {
 
         /* Merge dependencies */
         for (d = 0; d < _UNIT_DEPENDENCY_MAX; d++)
-                merge_dependencies(u, other, d);
+                merge_dependencies(u, other, other_id, d);
 
         other->load_state = UNIT_MERGED;
         other->merged_into = u;
@@ -774,7 +840,6 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
         char *t, **j;
         UnitDependency d;
         Iterator i;
-        _cleanup_free_ char *p2 = NULL;
         const char *prefix2;
         char
                 timestamp1[FORMAT_TIMESTAMP_MAX],
@@ -789,10 +854,8 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
         assert(u);
         assert(u->type >= 0);
 
-        if (!prefix)
-                prefix = "";
-        p2 = strappend(prefix, "\t");
-        prefix2 = p2 ? p2 : prefix;
+        prefix = strempty(prefix);
+        prefix2 = strappenda(prefix, "\t");
 
         fprintf(f,
                 "%s-> Unit %s:\n"
@@ -860,6 +923,12 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
         if (u->job_timeout > 0)
                 fprintf(f, "%s\tJob Timeout: %s\n", prefix, format_timespan(timespan, sizeof(timespan), u->job_timeout, 0));
 
+        if (u->job_timeout_action != FAILURE_ACTION_NONE)
+                fprintf(f, "%s\tJob Timeout Action: %s\n", prefix, failure_action_to_string(u->job_timeout_action));
+
+        if (u->job_timeout_reboot_arg)
+                fprintf(f, "%s\tJob Timeout Reboot Argument: %s\n", prefix, u->job_timeout_reboot_arg);
+
         condition_dump_list(u->conditions, f, prefix);
 
         if (dual_timestamp_is_set(&u->condition_timestamp))
@@ -1031,6 +1100,9 @@ static int unit_add_slice_dependencies(Unit *u) {
         if (UNIT_ISSET(u->slice))
                 return unit_add_two_dependencies(u, UNIT_AFTER, UNIT_WANTS, UNIT_DEREF(u->slice), true);
 
+        if (streq(u->id, SPECIAL_ROOT_SLICE))
+                return 0;
+
         return unit_add_two_dependencies_by_name(u, UNIT_AFTER, UNIT_WANTS, SPECIAL_ROOT_SLICE, NULL, true);
 }
 
@@ -1451,12 +1523,44 @@ static void unit_check_unneeded(Unit *u) {
                 if (unit_active_or_pending(other))
                         return;
 
-        log_info_unit(u->id, "Service %s is not needed anymore. Stopping.", u->id);
+        log_info_unit(u->id, "Unit %s is not needed anymore. Stopping.", u->id);
 
         /* Ok, nobody needs us anymore. Sniff. Then let's commit suicide */
         manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
 }
 
+static void unit_check_binds_to(Unit *u) {
+        bool stop = false;
+        Unit *other;
+        Iterator i;
+
+        assert(u);
+
+        if (u->job)
+                return;
+
+        if (unit_active_state(u) != UNIT_ACTIVE)
+                return;
+
+        SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i) {
+                if (other->job)
+                        continue;
+
+                if (!UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(other)))
+                        continue;
+
+                stop = true;
+        }
+
+        if (!stop)
+                return;
+
+        log_info_unit(u->id, "Unit %s is bound to inactive service. Stopping, too.", u->id);
+
+        /* A unit we need to run is gone. Sniff. Let's stop this. */
+        manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
+}
+
 static void retroactively_start_dependencies(Unit *u) {
         Iterator i;
         Unit *other;
@@ -1599,9 +1703,9 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
         }
 
         /* Keep track of failed units */
-        if (ns == UNIT_FAILED && os != UNIT_FAILED)
+        if (ns == UNIT_FAILED)
                 set_put(u->manager->failed_units, u);
-        else if (os == UNIT_FAILED && ns != UNIT_FAILED)
+        else
                 set_remove(u->manager->failed_units, u);
 
         /* Make sure the cgroup is always removed when we become inactive */
@@ -1768,11 +1872,19 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
         manager_recheck_journal(m);
         unit_trigger_notify(u);
 
-        /* Maybe we finished startup and are now ready for being
-         * stopped because unneeded? */
-        if (u->manager->n_reloading <= 0)
+        if (u->manager->n_reloading <= 0) {
+                /* Maybe we finished startup and are now ready for
+                 * being stopped because unneeded? */
                 unit_check_unneeded(u);
 
+                /* Maybe we finished startup, but something we needed
+                 * has vanished? Let's die then. (This happens when
+                 * something BindsTo= to a Type=oneshot unit, as these
+                 * units go directly from starting to inactive,
+                 * without ever entering started.) */
+                unit_check_binds_to(u);
+        }
+
         unit_add_to_dbus_queue(u);
         unit_add_to_gc_queue(u);
 }
@@ -1786,17 +1898,17 @@ int unit_watch_pid(Unit *u, pid_t pid) {
         /* Watch a specific PID. We only support one or two units
          * watching each PID for now, not more. */
 
-        r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&u->pids, NULL);
         if (r < 0)
                 return r;
 
-        r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&u->manager->watch_pids1, NULL);
         if (r < 0)
                 return r;
 
         r = hashmap_put(u->manager->watch_pids1, LONG_TO_PTR(pid), u);
         if (r == -EEXIST) {
-                r = hashmap_ensure_allocated(&u->manager->watch_pids2, trivial_hash_func, trivial_compare_func);
+                r = hashmap_ensure_allocated(&u->manager->watch_pids2, NULL);
                 if (r < 0)
                         return r;
 
@@ -1937,6 +2049,53 @@ bool unit_job_is_applicable(Unit *u, JobType j) {
         }
 }
 
+static int maybe_warn_about_dependency(const char *id, const char *other, UnitDependency dependency) {
+        assert(id);
+
+        switch (dependency) {
+        case UNIT_REQUIRES:
+        case UNIT_REQUIRES_OVERRIDABLE:
+        case UNIT_WANTS:
+        case UNIT_REQUISITE:
+        case UNIT_REQUISITE_OVERRIDABLE:
+        case UNIT_BINDS_TO:
+        case UNIT_PART_OF:
+        case UNIT_REQUIRED_BY:
+        case UNIT_REQUIRED_BY_OVERRIDABLE:
+        case UNIT_WANTED_BY:
+        case UNIT_BOUND_BY:
+        case UNIT_CONSISTS_OF:
+        case UNIT_REFERENCES:
+        case UNIT_REFERENCED_BY:
+        case UNIT_PROPAGATES_RELOAD_TO:
+        case UNIT_RELOAD_PROPAGATED_FROM:
+        case UNIT_JOINS_NAMESPACE_OF:
+                return 0;
+
+        case UNIT_CONFLICTS:
+        case UNIT_CONFLICTED_BY:
+        case UNIT_BEFORE:
+        case UNIT_AFTER:
+        case UNIT_ON_FAILURE:
+        case UNIT_TRIGGERS:
+        case UNIT_TRIGGERED_BY:
+                if (streq_ptr(id, other))
+                        log_warning_unit(id, "Dependency %s=%s dropped from unit %s",
+                                         unit_dependency_to_string(dependency), id, other);
+                else
+                        log_warning_unit(id, "Dependency %s=%s dropped from unit %s merged into %s",
+                                         unit_dependency_to_string(dependency), id,
+                                         strna(other), id);
+                return -EINVAL;
+
+        case _UNIT_DEPENDENCY_MAX:
+        case _UNIT_DEPENDENCY_INVALID:
+                break;
+        }
+
+        assert_not_reached("Invalid dependency type");
+}
+
 int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_reference) {
 
         static const UnitDependency inverse_table[_UNIT_DEPENDENCY_MAX] = {
@@ -1966,6 +2125,7 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen
                 [UNIT_JOINS_NAMESPACE_OF] = UNIT_JOINS_NAMESPACE_OF,
         };
         int r, q = 0, v = 0, w = 0;
+        Unit *orig_u = u, *orig_other = other;
 
         assert(u);
         assert(d >= 0 && d < _UNIT_DEPENDENCY_MAX);
@@ -1976,25 +2136,27 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen
 
         /* We won't allow dependencies on ourselves. We will not
          * consider them an error however. */
-        if (u == other)
+        if (u == other) {
+                maybe_warn_about_dependency(orig_u->id, orig_other->id, d);
                 return 0;
+        }
 
-        r = set_ensure_allocated(&u->dependencies[d], trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&u->dependencies[d], NULL);
         if (r < 0)
                 return r;
 
         if (inverse_table[d] != _UNIT_DEPENDENCY_INVALID) {
-                r = set_ensure_allocated(&other->dependencies[inverse_table[d]], trivial_hash_func, trivial_compare_func);
+                r = set_ensure_allocated(&other->dependencies[inverse_table[d]], NULL);
                 if (r < 0)
                         return r;
         }
 
         if (add_reference) {
-                r = set_ensure_allocated(&u->dependencies[UNIT_REFERENCES], trivial_hash_func, trivial_compare_func);
+                r = set_ensure_allocated(&u->dependencies[UNIT_REFERENCES], NULL);
                 if (r < 0)
                         return r;
 
-                r = set_ensure_allocated(&other->dependencies[UNIT_REFERENCED_BY], trivial_hash_func, trivial_compare_func);
+                r = set_ensure_allocated(&other->dependencies[UNIT_REFERENCED_BY], NULL);
                 if (r < 0)
                         return r;
         }
@@ -2044,10 +2206,12 @@ int unit_add_two_dependencies(Unit *u, UnitDependency d, UnitDependency e, Unit
 
         assert(u);
 
-        if ((r = unit_add_dependency(u, d, other, add_reference)) < 0)
+        r = unit_add_dependency(u, d, other, add_reference);
+        if (r < 0)
                 return r;
 
-        if ((r = unit_add_dependency(u, e, other, add_reference)) < 0)
+        r = unit_add_dependency(u, e, other, add_reference);
+        if (r < 0)
                 return r;
 
         return 0;
@@ -2107,22 +2271,22 @@ int unit_add_dependency_by_name(Unit *u, UnitDependency d, const char *name, con
 }
 
 int unit_add_two_dependencies_by_name(Unit *u, UnitDependency d, UnitDependency e, const char *name, const char *path, bool add_reference) {
+        _cleanup_free_ char *s = NULL;
         Unit *other;
         int r;
-        _cleanup_free_ char *s = NULL;
 
         assert(u);
         assert(name || path);
 
-        if (!(name = resolve_template(u, name, path, &s)))
+        name = resolve_template(u, name, path, &s);
+        if (!name)
                 return -ENOMEM;
 
-        if ((r = manager_load_unit(u->manager, name, path, NULL, &other)) < 0)
+        r = manager_load_unit(u->manager, name, path, NULL, &other);
+        if (r < 0)
                 return r;
 
-        r = unit_add_two_dependencies(u, d, e, other, add_reference);
-
-        return r;
+        return unit_add_two_dependencies(u, d, e, other, add_reference);
 }
 
 int unit_add_dependency_by_name_inverse(Unit *u, UnitDependency d, const char *name, const char *path, bool add_reference) {
@@ -2133,15 +2297,15 @@ int unit_add_dependency_by_name_inverse(Unit *u, UnitDependency d, const char *n
         assert(u);
         assert(name || path);
 
-        if (!(name = resolve_template(u, name, path, &s)))
+        name = resolve_template(u, name, path, &s);
+        if (!name)
                 return -ENOMEM;
 
-        if ((r = manager_load_unit(u->manager, name, path, NULL, &other)) < 0)
+        r = manager_load_unit(u->manager, name, path, NULL, &other);
+        if (r < 0)
                 return r;
 
-        r = unit_add_dependency(other, d, u, add_reference);
-
-        return r;
+        return unit_add_dependency(other, d, u, add_reference);
 }
 
 int unit_add_two_dependencies_by_name_inverse(Unit *u, UnitDependency d, UnitDependency e, const char *name, const char *path, bool add_reference) {
@@ -2152,24 +2316,24 @@ int unit_add_two_dependencies_by_name_inverse(Unit *u, UnitDependency d, UnitDep
         assert(u);
         assert(name || path);
 
-        if (!(name = resolve_template(u, name, path, &s)))
+        name = resolve_template(u, name, path, &s);
+        if (!name)
                 return -ENOMEM;
 
-        if ((r = manager_load_unit(u->manager, name, path, NULL, &other)) < 0)
+        r = manager_load_unit(u->manager, name, path, NULL, &other);
+        if (r < 0)
                 return r;
 
-        if ((r = unit_add_two_dependencies(other, d, e, u, add_reference)) < 0)
+        r = unit_add_two_dependencies(other, d, e, u, add_reference);
+        if (r < 0)
                 return r;
 
         return r;
 }
 
 int set_unit_path(const char *p) {
-        _cleanup_free_ char *c = NULL;
-
         /* This is mostly for debug purposes */
-        c = path_make_absolute_cwd(p);
-        if (setenv("SYSTEMD_UNIT_PATH", c, 0) < 0)
+        if (setenv("SYSTEMD_UNIT_PATH", p, 0) < 0)
                 return -errno;
 
         return 0;
@@ -2604,7 +2768,8 @@ int unit_coldplug(Unit *u) {
 
 void unit_status_printf(Unit *u, const char *status, const char *unit_status_msg_format) {
         DISABLE_WARNING_FORMAT_NONLITERAL;
-        manager_status_printf(u->manager, false, status, unit_status_msg_format, unit_description(u));
+        manager_status_printf(u->manager, STATUS_TYPE_NORMAL,
+                              status, unit_status_msg_format, unit_description(u));
         REENABLE_WARNING;
 }
 
@@ -2738,7 +2903,7 @@ static Set *unit_pid_set(pid_t main_pid, pid_t control_pid) {
         Set *pid_set;
         int r;
 
-        pid_set = set_new(trivial_hash_func, trivial_compare_func);
+        pid_set = set_new(NULL);
         if (!pid_set)
                 return NULL;
 
@@ -2971,7 +3136,11 @@ static int unit_drop_in_dir(Unit *u, UnitSetPropertiesMode mode, bool transient,
         if (u->manager->running_as == SYSTEMD_USER) {
                 int r;
 
-                r = user_config_home(dir);
+                if (mode == UNIT_PERSISTENT && !transient)
+                        r = user_config_home(dir);
+                else
+                        r = user_runtime_dir(dir);
+
                 if (r == 0)
                         return -ENOENT;
                 return r;
@@ -3119,7 +3288,7 @@ int unit_make_transient(Unit *u) {
         if (u->manager->running_as == SYSTEMD_USER) {
                 _cleanup_free_ char *c = NULL;
 
-                r = user_config_home(&c);
+                r = user_runtime_dir(&c);
                 if (r < 0)
                         return r;
                 if (r == 0)
@@ -3144,7 +3313,7 @@ int unit_make_transient(Unit *u) {
 int unit_kill_context(
                 Unit *u,
                 KillContext *c,
-                bool sigkill,
+                KillOperation k,
                 pid_t main_pid,
                 pid_t control_pid,
                 bool main_pid_alien) {
@@ -3157,7 +3326,19 @@ int unit_kill_context(
         if (c->kill_mode == KILL_NONE)
                 return 0;
 
-        sig = sigkill ? SIGKILL : c->kill_signal;
+        switch (k) {
+        case KILL_KILL:
+                sig = SIGKILL;
+                break;
+        case KILL_ABORT:
+                sig = SIGABRT;
+                break;
+        case KILL_TERMINATE:
+                sig = c->kill_signal;
+                break;
+        default:
+                assert_not_reached("KillOperation unknown");
+        }
 
         if (main_pid > 0) {
                 r = kill_and_sigcont(main_pid, sig);
@@ -3171,7 +3352,7 @@ int unit_kill_context(
                         if (!main_pid_alien)
                                 wait_for_exit = true;
 
-                        if (c->send_sighup && !sigkill)
+                        if (c->send_sighup && k != KILL_KILL)
                                 kill(main_pid, SIGHUP);
                 }
         }
@@ -3187,12 +3368,12 @@ int unit_kill_context(
                 } else {
                         wait_for_exit = true;
 
-                        if (c->send_sighup && !sigkill)
+                        if (c->send_sighup && k != KILL_KILL)
                                 kill(control_pid, SIGHUP);
                 }
         }
 
-        if ((c->kill_mode == KILL_CONTROL_GROUP || (c->kill_mode == KILL_MIXED && sigkill)) && u->cgroup_path) {
+        if ((c->kill_mode == KILL_CONTROL_GROUP || (c->kill_mode == KILL_MIXED && k == KILL_KILL)) && u->cgroup_path) {
                 _cleanup_set_free_ Set *pid_set = NULL;
 
                 /* Exclude the main/control pids from being killed via the cgroup */
@@ -3216,7 +3397,7 @@ int unit_kill_context(
 
                         /* wait_for_exit = true; */
 
-                        if (c->send_sighup && !sigkill) {
+                        if (c->send_sighup && k != KILL_KILL) {
                                 set_free(pid_set);
 
                                 pid_set = unit_pid_set(main_pid, control_pid);
@@ -3276,7 +3457,7 @@ int unit_require_mounts_for(Unit *u, const char *path) {
                         char *q;
 
                         if (!u->manager->units_requiring_mounts_for) {
-                                u->manager->units_requiring_mounts_for = hashmap_new(string_hash_func, string_compare_func);
+                                u->manager->units_requiring_mounts_for = hashmap_new(&string_hash_ops);
                                 if (!u->manager->units_requiring_mounts_for)
                                         return -ENOMEM;
                         }
@@ -3285,7 +3466,7 @@ int unit_require_mounts_for(Unit *u, const char *path) {
                         if (!q)
                                 return -ENOMEM;
 
-                        x = set_new(NULL, NULL);
+                        x = set_new(NULL);
                         if (!x) {
                                 free(q);
                                 return -ENOMEM;
@@ -3316,7 +3497,7 @@ int unit_setup_exec_runtime(Unit *u) {
         offset = UNIT_VTABLE(u)->exec_runtime_offset;
         assert(offset > 0);
 
-        /* Check if ther already is an ExecRuntime for this unit? */
+        /* Check if there already is an ExecRuntime for this unit? */
         rt = (ExecRuntime**) ((uint8_t*) u + offset);
         if (*rt)
                 return 0;
@@ -3344,32 +3525,3 @@ static const char* const unit_active_state_table[_UNIT_ACTIVE_STATE_MAX] = {
 };
 
 DEFINE_STRING_TABLE_LOOKUP(unit_active_state, UnitActiveState);
-
-static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = {
-        [UNIT_REQUIRES] = "Requires",
-        [UNIT_REQUIRES_OVERRIDABLE] = "RequiresOverridable",
-        [UNIT_REQUISITE] = "Requisite",
-        [UNIT_REQUISITE_OVERRIDABLE] = "RequisiteOverridable",
-        [UNIT_WANTS] = "Wants",
-        [UNIT_BINDS_TO] = "BindsTo",
-        [UNIT_PART_OF] = "PartOf",
-        [UNIT_REQUIRED_BY] = "RequiredBy",
-        [UNIT_REQUIRED_BY_OVERRIDABLE] = "RequiredByOverridable",
-        [UNIT_WANTED_BY] = "WantedBy",
-        [UNIT_BOUND_BY] = "BoundBy",
-        [UNIT_CONSISTS_OF] = "ConsistsOf",
-        [UNIT_CONFLICTS] = "Conflicts",
-        [UNIT_CONFLICTED_BY] = "ConflictedBy",
-        [UNIT_BEFORE] = "Before",
-        [UNIT_AFTER] = "After",
-        [UNIT_ON_FAILURE] = "OnFailure",
-        [UNIT_TRIGGERS] = "Triggers",
-        [UNIT_TRIGGERED_BY] = "TriggeredBy",
-        [UNIT_PROPAGATES_RELOAD_TO] = "PropagatesReloadTo",
-        [UNIT_RELOAD_PROPAGATED_FROM] = "ReloadPropagatedFrom",
-        [UNIT_JOINS_NAMESPACE_OF] = "JoinsNamespaceOf",
-        [UNIT_REFERENCES] = "References",
-        [UNIT_REFERENCED_BY] = "ReferencedBy",
-};
-
-DEFINE_STRING_TABLE_LOOKUP(unit_dependency, UnitDependency);
index 3e61067f84d0152d94fc2a3b24a61df4caa8bd5f..081ab18f10289fd2b74dc2e9dc97e8ed959ddfcb 100644 (file)
@@ -28,7 +28,6 @@
 typedef struct Unit Unit;
 typedef struct UnitVTable UnitVTable;
 typedef enum UnitActiveState UnitActiveState;
-typedef enum UnitDependency UnitDependency;
 typedef struct UnitRef UnitRef;
 typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
 
@@ -42,6 +41,7 @@ typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
 #include "condition.h"
 #include "install.h"
 #include "unit-name.h"
+#include "failure-action.h"
 
 enum UnitActiveState {
         UNIT_ACTIVE,
@@ -54,6 +54,12 @@ enum UnitActiveState {
         _UNIT_ACTIVE_STATE_INVALID = -1
 };
 
+typedef enum KillOperation {
+        KILL_TERMINATE,
+        KILL_KILL,
+        KILL_ABORT,
+} KillOperation;
+
 static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) {
         return t == UNIT_ACTIVE || t == UNIT_RELOADING;
 }
@@ -70,53 +76,6 @@ static inline bool UNIT_IS_INACTIVE_OR_FAILED(UnitActiveState t) {
         return t == UNIT_INACTIVE || t == UNIT_FAILED;
 }
 
-enum UnitDependency {
-        /* Positive dependencies */
-        UNIT_REQUIRES,
-        UNIT_REQUIRES_OVERRIDABLE,
-        UNIT_REQUISITE,
-        UNIT_REQUISITE_OVERRIDABLE,
-        UNIT_WANTS,
-        UNIT_BINDS_TO,
-        UNIT_PART_OF,
-
-        /* Inverse of the above */
-        UNIT_REQUIRED_BY,             /* inverse of 'requires' and 'requisite' is 'required_by' */
-        UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable' and 'requisite_overridable' is 'soft_required_by' */
-        UNIT_WANTED_BY,               /* inverse of 'wants' */
-        UNIT_BOUND_BY,                /* inverse of 'binds_to' */
-        UNIT_CONSISTS_OF,             /* inverse of 'part_of' */
-
-        /* Negative dependencies */
-        UNIT_CONFLICTS,               /* inverse of 'conflicts' is 'conflicted_by' */
-        UNIT_CONFLICTED_BY,
-
-        /* Order */
-        UNIT_BEFORE,                  /* inverse of 'before' is 'after' and vice versa */
-        UNIT_AFTER,
-
-        /* On Failure */
-        UNIT_ON_FAILURE,
-
-        /* Triggers (i.e. a socket triggers a service) */
-        UNIT_TRIGGERS,
-        UNIT_TRIGGERED_BY,
-
-        /* Propagate reloads */
-        UNIT_PROPAGATES_RELOAD_TO,
-        UNIT_RELOAD_PROPAGATED_FROM,
-
-        /* Joins namespace of */
-        UNIT_JOINS_NAMESPACE_OF,
-
-        /* Reference information for GC logic */
-        UNIT_REFERENCES,              /* Inverse of 'references' is 'referenced_by' */
-        UNIT_REFERENCED_BY,
-
-        _UNIT_DEPENDENCY_MAX,
-        _UNIT_DEPENDENCY_INVALID = -1
-};
-
 #include "manager.h"
 #include "job.h"
 
@@ -160,7 +119,10 @@ struct Unit {
         /* JOB_NOP jobs are special and can be installed without disturbing the real job. */
         Job *nop_job;
 
+        /* Job timeout and action to take */
         usec_t job_timeout;
+        FailureAction job_timeout_action;
+        char *job_timeout_reboot_arg;
 
         /* References to this */
         LIST_HEAD(UnitRef, refs);
@@ -175,12 +137,6 @@ struct Unit {
         dual_timestamp active_exit_timestamp;
         dual_timestamp inactive_enter_timestamp;
 
-        /* Counterparts in the cgroup filesystem */
-        char *cgroup_path;
-        CGroupControllerMask cgroup_realized_mask;
-        CGroupControllerMask cgroup_subtree_mask;
-        CGroupControllerMask cgroup_members_mask;
-
         UnitRef slice;
 
         /* Per type list */
@@ -224,6 +180,15 @@ struct Unit {
         /* Cached unit file state */
         UnitFileState unit_file_state;
 
+        /* Counterparts in the cgroup filesystem */
+        char *cgroup_path;
+        CGroupControllerMask cgroup_realized_mask;
+        CGroupControllerMask cgroup_subtree_mask;
+        CGroupControllerMask cgroup_members_mask;
+
+        /* How to start OnFailure units */
+        JobMode on_failure_job_mode;
+
         /* Garbage collect us we nobody wants or requires us anymore */
         bool stop_when_unneeded;
 
@@ -239,9 +204,6 @@ struct Unit {
         /* Allow isolation requests */
         bool allow_isolate;
 
-        /* How to start OnFailure units */
-        JobMode on_failure_job_mode;
-
         /* Ignore this unit when isolating */
         bool ignore_on_isolate;
 
@@ -620,7 +582,7 @@ int unit_write_drop_in_private_format(Unit *u, UnitSetPropertiesMode mode, const
 
 int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name);
 
-int unit_kill_context(Unit *u, KillContext *c, bool sigkill, pid_t main_pid, pid_t control_pid, bool main_pid_alien);
+int unit_kill_context(Unit *u, KillContext *c, KillOperation k, pid_t main_pid, pid_t control_pid, bool main_pid_alien);
 
 int unit_make_transient(Unit *u);
 
@@ -629,9 +591,6 @@ int unit_require_mounts_for(Unit *u, const char *path);
 const char *unit_active_state_to_string(UnitActiveState i) _const_;
 UnitActiveState unit_active_state_from_string(const char *s) _pure_;
 
-const char *unit_dependency_to_string(UnitDependency i) _const_;
-UnitDependency unit_dependency_from_string(const char *s) _pure_;
-
 /* Macros which append UNIT= or USER_UNIT= to the message */
 
 #define log_full_unit(level, unit, ...) log_meta_object(level, __FILE__, __LINE__, __func__, getpid() == 1 ? "UNIT=" : "USER_UNIT=", unit, __VA_ARGS__)
index 3233e15f4e943d4788e560f01e425789560f3fcc..05ceff443fe1dc80529dd6452230e77de472a28d 100644 (file)
@@ -131,7 +131,7 @@ static int create_disk(
                 "Conflicts=umount.target\n"
                 "BindsTo=dev-mapper-%i.device\n"
                 "IgnoreOnIsolate=true\n"
-                "After=systemd-readahead-collect.service systemd-readahead-replay.service cryptsetup-pre.target\n",
+                "After=cryptsetup-pre.target\n",
                 f);
 
         if (!nofail)
@@ -246,7 +246,12 @@ static int create_disk(
         }
 
         if (!noauto && !nofail) {
-                r = write_drop_in(arg_dest, name, 90, "device-timeout",
+                _cleanup_free_ char *dmname;
+                dmname = strjoin("dev-mapper-", e, ".device", NULL);
+                if (!dmname)
+                        return log_oom();
+
+                r = write_drop_in(arg_dest, dmname, 90, "device-timeout",
                                   "# Automatically generated by systemd-cryptsetup-generator \n\n"
                                   "[Unit]\nJobTimeoutSec=0");
                 if (r < 0) {
@@ -387,7 +392,7 @@ int main(int argc, char *argv[]) {
                                 if (k == 2 && streq(proc_uuid, device + 5)) {
                                         free(options);
                                         options = strdup(p);
-                                        if (!proc_options) {
+                                        if (!options) {
                                                 log_oom();
                                                 goto cleanup;
                                         }
index a67d85e623c685a0ac96e7d0df3d7c8b39b2713e..94570eb82d07ac9b836907d86b8cadfb34305176 100644 (file)
@@ -175,16 +175,16 @@ static int parse_one_option(const char *option) {
 }
 
 static int parse_options(const char *options) {
-        char *state, *w;
+        const char *word, *state;
         size_t l;
         int r;
 
         assert(options);
 
-        FOREACH_WORD_SEPARATOR(w, l, options, ",", state) {
+        FOREACH_WORD_SEPARATOR(word, l, options, ",", state) {
                 _cleanup_free_ char *o;
 
-                o = strndup(w, l);
+                o = strndup(word, l);
                 if (!o)
                         return -ENOMEM;
                 r = parse_one_option(o);
@@ -549,13 +549,18 @@ int main(int argc, char *argv[]) {
                         description = NULL;
                 }
 
+                k = 0;
                 if (mount_point && description)
-                        asprintf(&name_buffer, "%s (%s) on %s", description, argv[2], mount_point);
+                        k = asprintf(&name_buffer, "%s (%s) on %s", description, argv[2], mount_point);
                 else if (mount_point)
-                        asprintf(&name_buffer, "%s on %s", argv[2], mount_point);
+                        k = asprintf(&name_buffer, "%s on %s", argv[2], mount_point);
                 else if (description)
-                        asprintf(&name_buffer, "%s (%s)", description, argv[2]);
+                        k = asprintf(&name_buffer, "%s (%s)", description, argv[2]);
 
+                if (k < 0) {
+                        log_oom();
+                        goto finish;
+                }
                 name = name_buffer ? name_buffer : argv[2];
 
                 k = crypt_init(&cd, argv[3]);
index 95962c73c1f8d8cd3af8a0abb23a6d4a93283713..3c4522b5893cde3ee1d5338047b4e78d0831c498 100644 (file)
@@ -40,6 +40,7 @@ static int create_dbus_files(
 
         _cleanup_free_ char *b = NULL, *s = NULL, *lnk = NULL;
         _cleanup_fclose_ FILE *f = NULL;
+        int r;
 
         assert(path);
         assert(name);
@@ -100,12 +101,15 @@ static int create_dbus_files(
                         }
                 }
 
-                fflush(f);
-                if (ferror(f)) {
-                        log_error("Failed to write %s: %m", a);
-                        return -errno;
+                r = fflush_and_check(f);
+                if (r < 0) {
+                        log_error("Failed to write %s: %s", a, strerror(-r));
+                        return r;
                 }
 
+                fclose(f);
+                f = NULL;
+
                 service = s;
         }
 
@@ -134,10 +138,10 @@ static int create_dbus_files(
                 name,
                 service);
 
-        fflush(f);
-        if (ferror(f)) {
-                log_error("Failed to write %s: %m", b);
-                return -errno;
+        r = fflush_and_check(f);
+        if (r < 0) {
+                log_error("Failed to write %s: %s", b, strerror(-r));
+                return r;
         }
 
         lnk = strjoin(arg_dest_late, "/" SPECIAL_BUSNAMES_TARGET ".wants/", name, ".busname", NULL);
@@ -156,34 +160,24 @@ static int create_dbus_files(
 static int add_dbus(const char *path, const char *fname, const char *type) {
         _cleanup_free_ char *name = NULL, *exec = NULL, *user = NULL, *service = NULL;
 
-        ConfigTableItem table[] = {
+        const ConfigTableItem table[] = {
                 { "D-BUS Service", "Name", config_parse_string, 0, &name },
                 { "D-BUS Service", "Exec", config_parse_string, 0, &exec },
                 { "D-BUS Service", "User", config_parse_string, 0, &user },
                 { "D-BUS Service", "SystemdService", config_parse_string, 0, &service },
         };
 
-        _cleanup_fclose_ FILE *f = NULL;
-        _cleanup_free_ char *p = NULL;
+        char *p;
         int r;
 
         assert(path);
         assert(fname);
 
-        p = strjoin(path, "/", fname, NULL);
-        if (!p)
-                return log_oom();
-
-        f = fopen(p, "re");
-        if (!f) {
-                if (errno == -ENOENT)
-                        return 0;
-
-                log_error("Failed to read %s: %m", p);
-                return -errno;
-        }
-
-        r = config_parse(NULL, p, f, "D-BUS Service\0", config_item_table_lookup, table, true, false, NULL);
+        p = strappenda(path, "/", fname);
+        r = config_parse(NULL, p, NULL,
+                         "D-BUS Service\0",
+                         config_item_table_lookup, table,
+                         true, false, true, NULL);
         if (r < 0)
                 return r;
 
index 96a9fa5ee14e0378ab643c8b29790f29cfddeaf7..25c4a0bcfc28a220721d676b36fa0ed83751681a 100644 (file)
@@ -194,8 +194,7 @@ static int found_override(const char *top, const char *bottom) {
                 _exit(1);
         }
 
-        wait_for_terminate(pid, NULL);
-
+        wait_for_terminate_and_warn("diff", pid);
         putchar('\n');
 
         return k;
@@ -268,7 +267,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
 
                 h = hashmap_get(drops, unit);
                 if (!h) {
-                        h = hashmap_new(string_hash_func, string_compare_func);
+                        h = hashmap_new(&string_hash_ops);
                         if (!h)
                                 return -ENOMEM;
                         hashmap_put(drops, unit, h);
@@ -372,9 +371,9 @@ static int process_suffix(const char *suffix, const char *onlyprefix) {
 
         dropins = nulstr_contains(have_dropins, suffix);
 
-        top = hashmap_new(string_hash_func, string_compare_func);
-        bottom = hashmap_new(string_hash_func, string_compare_func);
-        drops = hashmap_new(string_hash_func, string_compare_func);
+        top = hashmap_new(&string_hash_ops);
+        bottom = hashmap_new(&string_hash_ops);
+        drops = hashmap_new(&string_hash_ops);
         if (!top || !bottom || !drops) {
                 r = -ENOMEM;
                 goto finish;
@@ -473,38 +472,35 @@ static int process_suffix_chop(const char *arg) {
         return -EINVAL;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [SUFFIX...]\n\n"
                "Find overridden configuration files.\n\n"
                "  -h --help           Show this help\n"
                "     --version        Show package version\n"
                "     --no-pager       Do not pipe output into a pager\n"
                "     --diff[=1|0]     Show a diff when overridden files differ\n"
-               "  -t --type=LIST...   Only display a selected set of override types\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  -t --type=LIST...   Only display a selected set of override types\n"
+               , program_invocation_short_name);
 }
 
 static int parse_flags(const char *flag_str, int flags) {
-        char *w, *state;
+        const char *word, *state;
         size_t l;
 
-        FOREACH_WORD(w, l, flag_str, state) {
-                if (strneq("masked", w, l))
+        FOREACH_WORD(word, l, flag_str, state) {
+                if (strneq("masked", word, l))
                         flags |= SHOW_MASKED;
-                else if (strneq ("equivalent", w, l))
+                else if (strneq ("equivalent", word, l))
                         flags |= SHOW_EQUIVALENT;
-                else if (strneq("redirected", w, l))
+                else if (strneq("redirected", word, l))
                         flags |= SHOW_REDIRECTED;
-                else if (strneq("overridden", w, l))
+                else if (strneq("overridden", word, l))
                         flags |= SHOW_OVERRIDDEN;
-                else if (strneq("unchanged", w, l))
+                else if (strneq("unchanged", word, l))
                         flags |= SHOW_UNCHANGED;
-                else if (strneq("extended", w, l))
+                else if (strneq("extended", word, l))
                         flags |= SHOW_EXTENDED;
-                else if (strneq("default", w, l))
+                else if (strneq("default", word, l))
                         flags |= SHOW_DEFAULTS;
                 else
                         return -EINVAL;
@@ -534,7 +530,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 1);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "ht:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "ht:", options, NULL)) >= 0)
 
                 switch (c) {
 
@@ -585,7 +581,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
index 8cf8dcfabc08b6262fc111deb2b5af71457e8d41..ff5bee56f91c5f4e7f62920dfdc81d0ad4c413c5 100644 (file)
@@ -36,18 +36,15 @@ static enum {
         ONLY_CONTAINER
 } arg_mode = ANY_VIRTUALIZATION;
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...]\n\n"
                "Detect execution in a virtualized environment.\n\n"
                "  -h --help             Show this help\n"
                "     --version          Show package version\n"
                "  -c --container        Only detect whether we are run in a container\n"
                "  -v --vm               Only detect whether we are run in a VM\n"
-               "  -q --quiet            Don't output anything, just set return value\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  -q --quiet            Don't output anything, just set return value\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -70,12 +67,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hqcv", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hqcv", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -100,10 +98,10 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind < argc) {
-                help();
+                log_error("%s takes no arguments.",
+                          program_invocation_short_name);
                 return -EINVAL;
         }
 
diff --git a/src/escape/escape.c b/src/escape/escape.c
new file mode 100644 (file)
index 0000000..f2a0721
--- /dev/null
@@ -0,0 +1,236 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Michael Biebl
+
+  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/>.
+***/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <getopt.h>
+
+#include "log.h"
+#include "unit-name.h"
+#include "build.h"
+#include "strv.h"
+
+static enum {
+        ACTION_ESCAPE,
+        ACTION_UNESCAPE,
+        ACTION_MANGLE
+} arg_action = ACTION_ESCAPE;
+static const char *arg_suffix = NULL;
+static const char *arg_template = NULL;
+static bool arg_path = false;
+
+static void help(void) {
+        printf("%s [OPTIONS...] [NAME...]\n\n"
+               "Show system and user paths.\n\n"
+               "  -h --help               Show this help\n"
+               "     --version            Show package version\n"
+               "     --suffix=SUFFIX      Unit suffix to append to escaped strings\n"
+               "     --template=TEMPLATE  Insert strings as instance into template\n"
+               "  -u --unescape           Unescape strings\n"
+               "  -m --mangle             Mangle strings\n"
+               "  -p --path               When escaping/unescaping assume the string is a path\n"
+               , program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_SUFFIX,
+                ARG_TEMPLATE
+        };
+
+        static const struct option options[] = {
+                { "help",      no_argument,       NULL, 'h'           },
+                { "version",   no_argument,       NULL, ARG_VERSION   },
+                { "suffix",    required_argument, NULL, ARG_SUFFIX    },
+                { "template",  required_argument, NULL, ARG_TEMPLATE  },
+                { "unescape",  no_argument,       NULL, 'u'           },
+                { "mangle",    no_argument,       NULL, 'm'           },
+                { "path",      no_argument,       NULL, 'p'           },
+                {}
+        };
+
+        int c;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "hump", options, NULL)) >= 0)
+
+                switch (c) {
+
+                case 'h':
+                        help();
+                        return 0;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0;
+
+                case ARG_SUFFIX:
+
+                        if (unit_type_from_string(optarg) < 0) {
+                                log_error("Invalid unit suffix type %s.", optarg);
+                                return -EINVAL;
+                        }
+
+                        arg_suffix = optarg;
+                        break;
+
+                case ARG_TEMPLATE:
+
+                        if (!unit_name_is_valid(optarg, true) || !unit_name_is_template(optarg)) {
+                                log_error("Template name %s is not valid.", optarg);
+                                return -EINVAL;
+                        }
+
+                        arg_template = optarg;
+                        break;
+
+                case 'u':
+                        arg_action = ACTION_UNESCAPE;
+                        break;
+
+                case 'm':
+                        arg_action = ACTION_MANGLE;
+                        break;
+
+                case 'p':
+                        arg_path = true;
+                        break;
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option");
+                }
+
+        if (optind >= argc) {
+                log_error("Not enough arguments.");
+                return -EINVAL;
+        }
+
+        if (arg_template && arg_suffix) {
+                log_error("--suffix= and --template= may not be combined.");
+                return -EINVAL;
+        }
+
+        if ((arg_template || arg_suffix) && arg_action != ACTION_ESCAPE) {
+                log_error("--suffix= and --template= are not compatible with --unescape or --mangle.");
+                return -EINVAL;
+        }
+
+        if (arg_path && !IN_SET(arg_action, ACTION_ESCAPE, ACTION_UNESCAPE)) {
+                log_error("--path may not be combined with --mangle.");
+                return -EINVAL;
+        }
+
+        return 1;
+}
+
+int main(int argc, char *argv[]) {
+        char **i;
+        int r;
+
+        log_parse_environment();
+        log_open();
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto finish;
+
+        STRV_FOREACH(i, argv + optind) {
+                _cleanup_free_ char *e = NULL;
+
+                switch (arg_action) {
+
+                case ACTION_ESCAPE:
+                        if (arg_path)
+                                e = unit_name_path_escape(*i);
+                        else
+                                e = unit_name_escape(*i);
+
+                        if (!e) {
+                                r = log_oom();
+                                goto finish;
+                        }
+
+                        if (arg_template) {
+                                char *x;
+
+                                x = unit_name_replace_instance(arg_template, e);
+                                if (!x) {
+                                        r = log_oom();
+                                        goto finish;
+                                }
+
+                                free(e);
+                                e = x;
+                        } else if (arg_suffix) {
+                                char *x;
+
+                                x = strjoin(e, ".", arg_suffix, NULL);
+                                if (!x) {
+                                        r = log_oom();
+                                        goto finish;
+                                }
+
+                                free(e);
+                                e = x;
+                        }
+
+                        break;
+
+                case ACTION_UNESCAPE:
+                        if (arg_path)
+                                e = unit_name_path_unescape(*i);
+                        else
+                                e = unit_name_unescape(*i);
+
+                        if (!e) {
+                                r = log_oom();
+                                goto finish;
+                        }
+                        break;
+
+                case ACTION_MANGLE:
+                        e = unit_name_mangle(*i, MANGLE_NOGLOB);
+                        if (!e) {
+                                r = log_oom();
+                                goto finish;
+                        }
+                        break;
+                }
+
+                if (i != argv+optind)
+                        fputc(' ', stdout);
+
+                fputs(e, stdout);
+        }
+
+        fputc('\n', stdout);
+
+finish:
+        return r <= 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
new file mode 100644 (file)
index 0000000..93273d9
--- /dev/null
@@ -0,0 +1,933 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <shadow.h>
+
+#include "strv.h"
+#include "fileio.h"
+#include "copy.h"
+#include "build.h"
+#include "mkdir.h"
+#include "time-util.h"
+#include "path-util.h"
+#include "locale-util.h"
+#include "ask-password-api.h"
+
+static char *arg_root = NULL;
+static char *arg_locale = NULL;  /* $LANG */
+static char *arg_locale_messages = NULL; /* $LC_MESSAGES */
+static char *arg_timezone = NULL;
+static char *arg_hostname = NULL;
+static sd_id128_t arg_machine_id = {};
+static char *arg_root_password = NULL;
+static bool arg_prompt_locale = false;
+static bool arg_prompt_timezone = false;
+static bool arg_prompt_hostname = false;
+static bool arg_prompt_root_password = false;
+static bool arg_copy_locale = false;
+static bool arg_copy_timezone = false;
+static bool arg_copy_root_password = false;
+
+#define prefix_roota(p) (arg_root ? (const char*) strappenda(arg_root, p) : (const char*) p)
+
+static void clear_string(char *x) {
+
+        if (!x)
+                return;
+
+        /* A delicious drop of snake-oil! */
+        memset(x, 'x', strlen(x));
+}
+
+static bool press_any_key(void) {
+        char k = 0;
+        bool need_nl = true;
+
+        printf("-- Press any key to proceed --");
+        fflush(stdout);
+
+        (void) read_one_char(stdin, &k, USEC_INFINITY, &need_nl);
+
+        if (need_nl)
+                putchar('\n');
+
+        return k != 'q';
+}
+
+static void print_welcome(void) {
+        _cleanup_free_ char *pretty_name = NULL;
+        const char *os_release = NULL;
+        static bool done = false;
+        int r;
+
+        if (done)
+                return;
+
+        os_release = prefix_roota("/etc/os-release");
+        r = parse_env_file(os_release, NEWLINE,
+                           "PRETTY_NAME", &pretty_name,
+                           NULL);
+        if (r == -ENOENT) {
+
+                os_release = prefix_roota("/usr/lib/os-release");
+                r = parse_env_file(os_release, NEWLINE,
+                                   "PRETTY_NAME", &pretty_name,
+                                   NULL);
+        }
+
+        if (r < 0 && r != -ENOENT)
+                log_warning("Failed to read os-release file: %s", strerror(-r));
+
+        printf("\nWelcome to your new installation of %s!\nPlease configure a few basic system settings:\n\n",
+               isempty(pretty_name) ? "Linux" : pretty_name);
+
+        press_any_key();
+
+        done = true;
+}
+
+static int show_menu(char **x, unsigned n_columns, unsigned width, unsigned percentage) {
+        unsigned n, per_column, i, j;
+        unsigned break_lines, break_modulo;
+
+        assert(n_columns > 0);
+
+        n = strv_length(x);
+        per_column = (n + n_columns - 1) / n_columns;
+
+        break_lines = lines();
+        if (break_lines > 2)
+                break_lines--;
+
+        /* The first page gets two extra lines, since we want to show
+         * a title */
+        break_modulo = break_lines;
+        if (break_modulo > 3)
+                break_modulo -= 3;
+
+        for (i = 0; i < per_column; i++) {
+
+                for (j = 0; j < n_columns; j ++) {
+                        _cleanup_free_ char *e = NULL;
+
+                        if (j * per_column + i >= n)
+                                break;
+
+                        e = ellipsize(x[j * per_column + i], width, percentage);
+                        if (!e)
+                                return log_oom();
+
+                        printf("%4u) %-*s", j * per_column + i + 1, width, e);
+                }
+
+                putchar('\n');
+
+                /* on the first screen we reserve 2 extra lines for the title */
+                if (i % break_lines == break_modulo) {
+                        if (!press_any_key())
+                                return 0;
+                }
+        }
+
+        return 0;
+}
+
+static int prompt_loop(const char *text, char **l, bool (*is_valid)(const char *name), char **ret) {
+        int r;
+
+        assert(text);
+        assert(is_valid);
+        assert(ret);
+
+        for (;;) {
+                _cleanup_free_ char *p = NULL;
+                unsigned u;
+
+                r = ask_string(&p, "%s %s (empty to skip): ", draw_special_char(DRAW_TRIANGULAR_BULLET), text);
+                if (r < 0) {
+                        log_error("Failed to query user: %s", strerror(-r));
+                        return r;
+                }
+
+                if (isempty(p)) {
+                        log_warning("No data entered, skipping.");
+                        return 0;
+                }
+
+                r = safe_atou(p, &u);
+                if (r >= 0) {
+                        char *c;
+
+                        if (u <= 0 || u > strv_length(l)) {
+                                log_error("Specified entry number out of range.");
+                                continue;
+                        }
+
+                        log_info("Selected '%s'.", l[u-1]);
+
+                        c = strdup(l[u-1]);
+                        if (!c)
+                                return log_oom();
+
+                        free(*ret);
+                        *ret = c;
+                        return 0;
+                }
+
+                if (!is_valid(p)) {
+                        log_error("Entered data invalid.");
+                        continue;
+                }
+
+                free(*ret);
+                *ret = p;
+                p = 0;
+                return 0;
+        }
+}
+
+static int prompt_locale(void) {
+        _cleanup_strv_free_ char **locales = NULL;
+        int r;
+
+        if (arg_locale || arg_locale_messages)
+                return 0;
+
+        if (!arg_prompt_locale)
+                return 0;
+
+        r = get_locales(&locales);
+        if (r < 0) {
+                log_error("Cannot query locales list: %s", strerror(-r));
+                return r;
+        }
+
+        print_welcome();
+
+        printf("\nAvailable Locales:\n\n");
+        r = show_menu(locales, 3, 22, 60);
+        if (r < 0)
+                return r;
+
+        putchar('\n');
+
+        r = prompt_loop("Please enter system locale name or number", locales, locale_is_valid, &arg_locale);
+        if (r < 0)
+                return r;
+
+        if (isempty(arg_locale))
+                return 0;
+
+        r = prompt_loop("Please enter system message locale name or number", locales, locale_is_valid, &arg_locale_messages);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int process_locale(void) {
+        const char *etc_localeconf;
+        char* locales[3];
+        unsigned i = 0;
+        int r;
+
+        etc_localeconf = prefix_roota("/etc/locale.conf");
+        if (faccessat(AT_FDCWD, etc_localeconf, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                return 0;
+
+        if (arg_copy_locale && arg_root) {
+
+                mkdir_parents(etc_localeconf, 0755);
+                r = copy_file("/etc/locale.conf", etc_localeconf, 0, 0644);
+                if (r != -ENOENT) {
+                        if (r < 0) {
+                                log_error("Failed to copy %s: %s", etc_localeconf, strerror(-r));
+                                return r;
+                        }
+
+                        log_info("%s copied.", etc_localeconf);
+                        return 0;
+                }
+        }
+
+        r = prompt_locale();
+        if (r < 0)
+                return r;
+
+        if (!isempty(arg_locale))
+                locales[i++] = strappenda("LANG=", arg_locale);
+        if (!isempty(arg_locale_messages) && !streq(arg_locale_messages, arg_locale))
+                locales[i++] = strappenda("LC_MESSAGES=", arg_locale_messages);
+
+        if (i == 0)
+                return 0;
+
+        locales[i] = NULL;
+
+        mkdir_parents(etc_localeconf, 0755);
+        r = write_env_file(etc_localeconf, locales);
+        if (r < 0) {
+                log_error("Failed to write %s: %s", etc_localeconf, strerror(-r));
+                return r;
+        }
+
+        log_info("%s written.", etc_localeconf);
+        return 0;
+}
+
+static int prompt_timezone(void) {
+        _cleanup_strv_free_ char **zones = NULL;
+        int r;
+
+        if (arg_timezone)
+                return 0;
+
+        if (!arg_prompt_timezone)
+                return 0;
+
+        r = get_timezones(&zones);
+        if (r < 0) {
+                log_error("Cannot query timezone list: %s", strerror(-r));
+                return r;
+        }
+
+        print_welcome();
+
+        printf("\nAvailable Time Zones:\n\n");
+        r = show_menu(zones, 3, 22, 30);
+        if (r < 0)
+                return r;
+
+        putchar('\n');
+
+        r = prompt_loop("Please enter timezone name or number", zones, timezone_is_valid, &arg_timezone);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int process_timezone(void) {
+        const char *etc_localtime, *e;
+        int r;
+
+        etc_localtime = prefix_roota("/etc/localtime");
+        if (faccessat(AT_FDCWD, etc_localtime, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                return 0;
+
+        if (arg_copy_timezone && arg_root) {
+                _cleanup_free_ char *p = NULL;
+
+                r = readlink_malloc("/etc/localtime", &p);
+                if (r != -ENOENT) {
+                        if (r < 0) {
+                                log_error("Failed to read host timezone: %s", strerror(-r));
+                                return r;
+                        }
+
+                        mkdir_parents(etc_localtime, 0755);
+                        if (symlink(p, etc_localtime) < 0) {
+                                log_error("Failed to create %s symlink: %m", etc_localtime);
+                                return -errno;
+                        }
+
+                        log_info("%s copied.", etc_localtime);
+                        return 0;
+                }
+        }
+
+        r = prompt_timezone();
+        if (r < 0)
+                return r;
+
+        if (isempty(arg_timezone))
+                return 0;
+
+        e = strappenda("../usr/share/zoneinfo/", arg_timezone);
+
+        mkdir_parents(etc_localtime, 0755);
+        if (symlink(e, etc_localtime) < 0) {
+                log_error("Failed to create %s symlink: %m", etc_localtime);
+                return -errno;
+        }
+
+        log_info("%s written", etc_localtime);
+        return 0;
+}
+
+static int prompt_hostname(void) {
+        int r;
+
+        if (arg_hostname)
+                return 0;
+
+        if (!arg_prompt_hostname)
+                return 0;
+
+        print_welcome();
+        putchar('\n');
+
+        for (;;) {
+                _cleanup_free_ char *h = NULL;
+
+                r = ask_string(&h, "%s Please enter hostname for new system (empty to skip): ", draw_special_char(DRAW_TRIANGULAR_BULLET));
+                if (r < 0) {
+                        log_error("Failed to query hostname: %s", strerror(-r));
+                        return r;
+                }
+
+                if (isempty(h)) {
+                        log_warning("No hostname entered, skipping.");
+                        break;
+                }
+
+                if (!hostname_is_valid(h)) {
+                        log_error("Specified hostname invalid.");
+                        continue;
+                }
+
+                arg_hostname = h;
+                h = NULL;
+                break;
+        }
+
+        return 0;
+}
+
+static int process_hostname(void) {
+        const char *etc_hostname;
+        int r;
+
+        etc_hostname = prefix_roota("/etc/hostname");
+        if (faccessat(AT_FDCWD, etc_hostname, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                return 0;
+
+        r = prompt_hostname();
+        if (r < 0)
+                return r;
+
+        if (isempty(arg_hostname))
+                return 0;
+
+        mkdir_parents(etc_hostname, 0755);
+        r = write_string_file(etc_hostname, arg_hostname);
+        if (r < 0) {
+                log_error("Failed to write %s: %s", etc_hostname, strerror(-r));
+                return r;
+        }
+
+        log_info("%s written.", etc_hostname);
+        return 0;
+}
+
+static int process_machine_id(void) {
+        const char *etc_machine_id;
+        char id[SD_ID128_STRING_MAX];
+        int r;
+
+        etc_machine_id = prefix_roota("/etc/machine-id");
+        if (faccessat(AT_FDCWD, etc_machine_id, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                return 0;
+
+        if (sd_id128_equal(arg_machine_id, SD_ID128_NULL))
+                return 0;
+
+        mkdir_parents(etc_machine_id, 0755);
+        r = write_string_file(etc_machine_id, sd_id128_to_string(arg_machine_id, id));
+        if (r < 0) {
+                log_error("Failed to write machine id: %s", strerror(-r));
+                return r;
+        }
+
+        log_info("%s written.", etc_machine_id);
+        return 0;
+}
+
+static int prompt_root_password(void) {
+        const char *msg1, *msg2, *etc_shadow;
+        int r;
+
+        if (arg_root_password)
+                return 0;
+
+        if (!arg_prompt_root_password)
+                return 0;
+
+        etc_shadow = prefix_roota("/etc/shadow");
+        if (faccessat(AT_FDCWD, etc_shadow, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                return 0;
+
+        print_welcome();
+        putchar('\n');
+
+        msg1 = strappenda(draw_special_char(DRAW_TRIANGULAR_BULLET), " Please enter a new root password (empty to skip): ");
+        msg2 = strappenda(draw_special_char(DRAW_TRIANGULAR_BULLET), " Please enter new root password again: ");
+
+        for (;;) {
+                _cleanup_free_ char *a = NULL, *b = NULL;
+
+                r = ask_password_tty(msg1, 0, false, NULL, &a);
+                if (r < 0) {
+                        log_error("Failed to query root password: %s", strerror(-r));
+                        return r;
+                }
+
+                if (isempty(a)) {
+                        log_warning("No password entered, skipping.");
+                        break;
+                }
+
+                r = ask_password_tty(msg2, 0, false, NULL, &b);
+                if (r < 0) {
+                        log_error("Failed to query root password: %s", strerror(-r));
+                        clear_string(a);
+                        return r;
+                }
+
+                if (!streq(a, b)) {
+                        log_error("Entered passwords did not match, please try again.");
+                        clear_string(a);
+                        clear_string(b);
+                        continue;
+                }
+
+                clear_string(b);
+                arg_root_password = a;
+                a = NULL;
+                break;
+        }
+
+        return 0;
+}
+
+static int write_root_shadow(const char *path, const struct spwd *p) {
+        _cleanup_fclose_ FILE *f = NULL;
+        assert(path);
+        assert(p);
+
+        RUN_WITH_UMASK(0777)
+                f = fopen(path, "wex");
+        if (!f)
+                return -errno;
+
+        errno = 0;
+        if (putspent(p, f) != 0)
+                return errno ? -errno : -EIO;
+
+        return fflush_and_check(f);
+}
+
+static int process_root_password(void) {
+
+        static const char table[] =
+                "abcdefghijklmnopqrstuvwxyz"
+                "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                "0123456789"
+                "./";
+
+        struct spwd item = {
+                .sp_namp = (char*) "root",
+                .sp_min = 0,
+                .sp_max = 99999,
+                .sp_warn = 7,
+                .sp_inact = -1,
+                .sp_expire = -1,
+                .sp_flag = (unsigned long) -1, /* this appears to be what everybody does ... */
+        };
+
+        _cleanup_close_ int lock = -1;
+        char salt[3+16+1+1];
+        uint8_t raw[16];
+        unsigned i;
+        char *j;
+
+        const char *etc_shadow;
+        int r;
+
+        etc_shadow = prefix_roota("/etc/shadow");
+        if (faccessat(AT_FDCWD, etc_shadow, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                return 0;
+
+        mkdir_parents(etc_shadow, 0755);
+
+        lock = take_password_lock(arg_root);
+        if (lock < 0)
+                return lock;
+
+        if (arg_copy_root_password && arg_root) {
+                struct spwd *p;
+
+                errno = 0;
+                p = getspnam("root");
+                if (p || errno != ENOENT) {
+                        if (!p) {
+                                if (!errno)
+                                        errno = EIO;
+
+                                log_error("Failed to find shadow entry for root: %m");
+                                return -errno;
+                        }
+
+                        r = write_root_shadow(etc_shadow, p);
+                        if (r < 0) {
+                                log_error("Failed to write %s: %s", etc_shadow, strerror(-r));
+                                return r;
+                        }
+
+                        log_info("%s copied.", etc_shadow);
+                        return 0;
+                }
+        }
+
+        r = prompt_root_password();
+        if (r < 0)
+                return r;
+
+        if (!arg_root_password)
+                return 0;
+
+        r = dev_urandom(raw, 16);
+        if (r < 0) {
+                log_error("Failed to get salt: %s", strerror(-r));
+                return r;
+        }
+
+        /* We only bother with SHA512 hashed passwords, the rest is legacy, and we don't do legacy. */
+        assert_cc(sizeof(table) == 64 + 1);
+        j = stpcpy(salt, "$6$");
+        for (i = 0; i < 16; i++)
+                j[i] = table[raw[i] & 63];
+        j[i++] = '$';
+        j[i] = 0;
+
+        errno = 0;
+        item.sp_pwdp = crypt(arg_root_password, salt);
+        if (!item.sp_pwdp) {
+                if (!errno)
+                        errno = -EINVAL;
+
+                log_error("Failed to encrypt password: %m");
+                return -errno;
+        }
+
+        item.sp_lstchg = (long) (now(CLOCK_REALTIME) / USEC_PER_DAY);
+
+        r = write_root_shadow(etc_shadow, &item);
+        if (r < 0) {
+                log_error("Failed to write %s: %s", etc_shadow, strerror(-r));
+                return r;
+        }
+
+        log_info("%s written.", etc_shadow);
+        return 0;
+}
+
+static void help(void) {
+        printf("%s [OPTIONS...]\n\n"
+               "Configures basic settings of the system.\n\n"
+               "  -h --help                    Show this help\n"
+               "     --version                 Show package version\n"
+               "     --root=PATH               Operate on an alternate filesystem root\n"
+               "     --locale=LOCALE           Set primary locale (LANG=)\n"
+               "     --locale-messages=LOCALE  Set message locale (LC_MESSAGES=)\n"
+               "     --timezone=TIMEZONE       Set timezone\n"
+               "     --hostname=NAME           Set host name\n"
+               "     --machine-ID=ID           Set machine ID\n"
+               "     --root-password=PASSWORD  Set root password\n"
+               "     --root-password-file=FILE Set root password from file\n"
+               "     --prompt-locale           Prompt the user for locale settings\n"
+               "     --prompt-timezone         Prompt the user for timezone\n"
+               "     --prompt-hostname         Prompt the user for hostname\n"
+               "     --prompt-root-password    Prompt the user for root password\n"
+               "     --prompt                  Prompt for locale, timezone, hostname, root password\n"
+               "     --copy-locale             Copy locale from host\n"
+               "     --copy-timezone           Copy timezone from host\n"
+               "     --copy-root-password      Copy root password from host\n"
+               "     --copy                    Copy locale, timezone, root password\n"
+               "     --setup-machine-id        Generate a new random machine ID\n"
+               , program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_ROOT,
+                ARG_LOCALE,
+                ARG_LOCALE_MESSAGES,
+                ARG_TIMEZONE,
+                ARG_HOSTNAME,
+                ARG_MACHINE_ID,
+                ARG_ROOT_PASSWORD,
+                ARG_ROOT_PASSWORD_FILE,
+                ARG_PROMPT,
+                ARG_PROMPT_LOCALE,
+                ARG_PROMPT_TIMEZONE,
+                ARG_PROMPT_HOSTNAME,
+                ARG_PROMPT_ROOT_PASSWORD,
+                ARG_COPY,
+                ARG_COPY_LOCALE,
+                ARG_COPY_TIMEZONE,
+                ARG_COPY_ROOT_PASSWORD,
+                ARG_SETUP_MACHINE_ID,
+        };
+
+        static const struct option options[] = {
+                { "help",                 no_argument,       NULL, 'h'                      },
+                { "version",              no_argument,       NULL, ARG_VERSION              },
+                { "root",                 required_argument, NULL, ARG_ROOT                 },
+                { "locale",               required_argument, NULL, ARG_LOCALE               },
+                { "locale-messages",      required_argument, NULL, ARG_LOCALE_MESSAGES      },
+                { "timezone",             required_argument, NULL, ARG_TIMEZONE             },
+                { "hostname",             required_argument, NULL, ARG_HOSTNAME             },
+                { "machine-id",           required_argument, NULL, ARG_MACHINE_ID           },
+                { "root-password",        required_argument, NULL, ARG_ROOT_PASSWORD        },
+                { "root-password-file",   required_argument, NULL, ARG_ROOT_PASSWORD_FILE   },
+                { "prompt",               no_argument,       NULL, ARG_PROMPT               },
+                { "prompt-locale",        no_argument,       NULL, ARG_PROMPT_LOCALE        },
+                { "prompt-timezone",      no_argument,       NULL, ARG_PROMPT_TIMEZONE      },
+                { "prompt-hostname",      no_argument,       NULL, ARG_PROMPT_HOSTNAME      },
+                { "prompt-root-password", no_argument,       NULL, ARG_PROMPT_ROOT_PASSWORD },
+                { "copy",                 no_argument,       NULL, ARG_COPY                 },
+                { "copy-locale",          no_argument,       NULL, ARG_COPY_LOCALE          },
+                { "copy-timezone",        no_argument,       NULL, ARG_COPY_TIMEZONE        },
+                { "copy-root-password",   no_argument,       NULL, ARG_COPY_ROOT_PASSWORD   },
+                { "setup-machine-id",     no_argument,       NULL, ARG_SETUP_MACHINE_ID     },
+                {}
+        };
+
+        int r, c;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
+
+                switch (c) {
+
+                case 'h':
+                        help();
+                        return 0;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0;
+
+                case ARG_ROOT:
+                        free(arg_root);
+                        arg_root = path_make_absolute_cwd(optarg);
+                        if (!arg_root)
+                                return log_oom();
+
+                        path_kill_slashes(arg_root);
+
+                        if (path_equal(arg_root, "/")) {
+                                free(arg_root);
+                                arg_root = NULL;
+                        }
+
+                        break;
+
+                case ARG_LOCALE:
+                        if (!locale_is_valid(optarg)) {
+                                log_error("Locale %s is not valid.", optarg);
+                                return -EINVAL;
+                        }
+
+                        free(arg_locale);
+                        arg_locale = strdup(optarg);
+                        if (!arg_locale)
+                                return log_oom();
+
+                        break;
+
+                case ARG_LOCALE_MESSAGES:
+                        if (!locale_is_valid(optarg)) {
+                                log_error("Locale %s is not valid.", optarg);
+                                return -EINVAL;
+                        }
+
+                        free(arg_locale_messages);
+                        arg_locale_messages = strdup(optarg);
+                        if (!arg_locale_messages)
+                                return log_oom();
+
+                        break;
+
+                case ARG_TIMEZONE:
+                        if (!timezone_is_valid(optarg)) {
+                                log_error("Timezone %s is not valid.", optarg);
+                                return -EINVAL;
+                        }
+
+                        free(arg_timezone);
+                        arg_timezone = strdup(optarg);
+                        if (!arg_timezone)
+                                return log_oom();
+
+                        break;
+
+                case ARG_ROOT_PASSWORD:
+                        free(arg_root_password);
+                        arg_root_password = strdup(optarg);
+                        if (!arg_root_password)
+                                return log_oom();
+
+                        break;
+
+                case ARG_ROOT_PASSWORD_FILE:
+                        free(arg_root_password);
+                        arg_root_password  = NULL;
+
+                        r = read_one_line_file(optarg, &arg_root_password);
+                        if (r < 0) {
+                                log_error("Failed to read %s: %s", optarg, strerror(-r));
+                                return r;
+                        }
+
+                        break;
+
+                case ARG_HOSTNAME:
+                        if (!hostname_is_valid(optarg)) {
+                                log_error("Host name %s is not valid.", optarg);
+                                return -EINVAL;
+                        }
+
+                        free(arg_hostname);
+                        arg_hostname = strdup(optarg);
+                        if (!arg_hostname)
+                                return log_oom();
+
+                        break;
+
+                case ARG_MACHINE_ID:
+                        if (sd_id128_from_string(optarg, &arg_machine_id) < 0) {
+                                log_error("Failed to parse machine id %s.", optarg);
+                                return -EINVAL;
+                        }
+
+                        break;
+
+                case ARG_PROMPT:
+                        arg_prompt_locale = arg_prompt_timezone = arg_prompt_hostname = arg_prompt_root_password = true;
+                        break;
+
+                case ARG_PROMPT_LOCALE:
+                        arg_prompt_locale = true;
+                        break;
+
+                case ARG_PROMPT_TIMEZONE:
+                        arg_prompt_timezone = true;
+                        break;
+
+                case ARG_PROMPT_HOSTNAME:
+                        arg_prompt_hostname = true;
+                        break;
+
+                case ARG_PROMPT_ROOT_PASSWORD:
+                        arg_prompt_root_password = true;
+                        break;
+
+                case ARG_COPY:
+                        arg_copy_locale = arg_copy_timezone = arg_copy_root_password = true;
+                        break;
+
+                case ARG_COPY_LOCALE:
+                        arg_copy_locale = true;
+                        break;
+
+                case ARG_COPY_TIMEZONE:
+                        arg_copy_timezone = true;
+                        break;
+
+                case ARG_COPY_ROOT_PASSWORD:
+                        arg_copy_root_password = true;
+                        break;
+
+                case ARG_SETUP_MACHINE_ID:
+
+                        r = sd_id128_randomize(&arg_machine_id);
+                        if (r < 0) {
+                                log_error("Failed to generate randomized machine ID: %s", strerror(-r));
+                                return r;
+                        }
+
+                        break;
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option");
+                }
+
+        return 1;
+}
+
+int main(int argc, char *argv[]) {
+        int r;
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto finish;
+
+        log_set_target(LOG_TARGET_AUTO);
+        log_parse_environment();
+        log_open();
+
+        umask(0022);
+
+        r = process_locale();
+        if (r < 0)
+                goto finish;
+
+        r = process_timezone();
+        if (r < 0)
+                goto finish;
+
+        r = process_hostname();
+        if (r < 0)
+                goto finish;
+
+        r = process_machine_id();
+        if (r < 0)
+                goto finish;
+
+        r = process_root_password();
+        if (r < 0)
+                goto finish;
+
+finish:
+        free(arg_root);
+        free(arg_locale);
+        free(arg_locale_messages);
+        free(arg_timezone);
+        free(arg_hostname);
+        clear_string(arg_root_password);
+        free(arg_root_password);
+
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+}
index e8596d90f805df3d35218dc9735cf484016c8f4c..70a591883e70cc161165077fba3674e12c5960eb 100644 (file)
@@ -47,7 +47,7 @@ static const char *arg_repair = "-a";
 
 static void start_target(const char *target) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         assert(target);
@@ -320,16 +320,11 @@ int main(int argc, char *argv[]) {
         cmdline[i++] = "-T";
 
         /*
-         * Disable locking which conflict with udev's event
-         * ownershipi, until util-linux moves the flock
-         * synchronization file which prevents multiple fsck running
-         * on the same rotationg media, from the disk device
-         * node to a privately owned regular file.
-         *
-         * https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
-         *
-         * cmdline[i++] = "-l";
+         * Since util-linux v2.25 fsck uses /run/fsck/<diskname>.lock files.
+         * The previous versions use flock for the device and conflict with
+         * udevd, see https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
          */
+        cmdline[i++] = "-l";
 
         if (!root_directory)
                 cmdline[i++] = "-M";
index 1256a1ce53dfeddecf1d30efb33aed89908b2fcd..e257c121e5e8c96557df53f3dc9c0cd05c762566 100644 (file)
@@ -43,27 +43,31 @@ static char *arg_root_what = NULL;
 static char *arg_root_fstype = NULL;
 static char *arg_root_options = NULL;
 static int arg_root_rw = -1;
-
+static char *arg_usr_what = NULL;
+static char *arg_usr_fstype = NULL;
+static char *arg_usr_options = NULL;
 
 static int mount_find_pri(struct mntent *me, int *ret) {
-        char *end, *pri;
+        char *end, *opt;
         unsigned long r;
 
         assert(me);
         assert(ret);
 
-        pri = hasmntopt(me, "pri");
-        if (!pri)
+        opt = hasmntopt(me, "pri");
+        if (!opt)
                 return 0;
 
-        pri += 4;
+        opt += strlen("pri");
+        if (*opt != '=')
+                return -EINVAL;
 
         errno = 0;
-        r = strtoul(pri, &end, 10);
+        r = strtoul(opt + 1, &end, 10);
         if (errno > 0)
                 return -errno;
 
-        if (end == pri || (*end != ',' && *end != 0))
+        if (end == opt + 1 || (*end != ',' && *end != 0))
                 return -EINVAL;
 
         *ret = (int) r;
@@ -73,6 +77,7 @@ static int mount_find_pri(struct mntent *me, int *ret) {
 static int add_swap(const char *what, struct mntent *me) {
         _cleanup_free_ char *name = NULL, *unit = NULL, *lnk = NULL;
         _cleanup_fclose_ FILE *f = NULL;
+
         bool noauto;
         int r, pri = -1;
 
@@ -87,7 +92,7 @@ static int add_swap(const char *what, struct mntent *me) {
         r = mount_find_pri(me, &pri);
         if (r < 0) {
                 log_error("Failed to parse priority");
-                return pri;
+                return r;
         }
 
         noauto = !!hasmntopt(me, "noauto");
@@ -118,15 +123,18 @@ static int add_swap(const char *what, struct mntent *me) {
                 "What=%s\n",
                 what);
 
+        /* Note that we currently pass the priority field twice, once
+         * in Priority=, and once in Options= */
         if (pri >= 0)
-                fprintf(f,
-                        "Priority=%i\n",
-                        pri);
+                fprintf(f, "Priority=%i\n", pri);
 
-        fflush(f);
-        if (ferror(f)) {
-                log_error("Failed to write unit file %s: %m", unit);
-                return -errno;
+        if (!isempty(me->mnt_opts) && !streq(me->mnt_opts, "defaults"))
+                fprintf(f, "Options=%s\n", me->mnt_opts);
+
+        r = fflush_and_check(f);
+        if (r < 0) {
+                log_error("Failed to write unit file %s: %s", unit, strerror(-r));
+                return r;
         }
 
         /* use what as where, to have a nicer error message */
@@ -432,7 +440,7 @@ static int add_root_mount(void) {
         else if (arg_root_rw >= 0 ||
                  (!mount_test_option(arg_root_options, "ro") &&
                   !mount_test_option(arg_root_options, "rw")))
-                opts = strappenda3(arg_root_options, ",", arg_root_rw > 0 ? "rw" : "ro");
+                opts = strappenda(arg_root_options, ",", arg_root_rw > 0 ? "rw" : "ro");
         else
                 opts = arg_root_options;
 
@@ -449,12 +457,64 @@ static int add_root_mount(void) {
                          "/proc/cmdline");
 }
 
+static int add_usr_mount(void) {
+        _cleanup_free_ char *what = NULL;
+        const char *opts;
+
+        if (!arg_usr_what && !arg_usr_fstype && !arg_usr_options)
+                return 0;
+
+        if (arg_root_what && !arg_usr_what) {
+                arg_usr_what = strdup(arg_root_what);
+
+                if (!arg_usr_what)
+                        return log_oom();
+        }
+
+        if (arg_root_fstype && !arg_usr_fstype) {
+                arg_usr_fstype = strdup(arg_root_fstype);
+
+                if (!arg_usr_fstype)
+                        return log_oom();
+        }
+
+        if (arg_root_options && !arg_usr_options) {
+                arg_usr_options = strdup(arg_root_options);
+
+                if (!arg_usr_options)
+                        return log_oom();
+        }
+
+        if (!arg_usr_what || !arg_usr_options)
+                return 0;
+
+        what = fstab_node_to_udev_node(arg_usr_what);
+        if (!path_is_absolute(what)) {
+                log_debug("Skipping entry what=%s where=/sysroot/usr type=%s", what, strna(arg_usr_fstype));
+                return -1;
+        }
+
+        opts = arg_usr_options;
+
+        log_debug("Found entry what=%s where=/sysroot/usr type=%s", what, strna(arg_usr_fstype));
+        return add_mount(what,
+                         "/sysroot/usr",
+                         arg_usr_fstype,
+                         opts,
+                         1,
+                         false,
+                         false,
+                         false,
+                         SPECIAL_INITRD_ROOT_FS_TARGET,
+                         "/proc/cmdline");
+}
+
 static int parse_proc_cmdline_item(const char *key, const char *value) {
         int r;
 
-        /* root= and roofstype= may occur more than once, the last
-         * instance should take precedence.  In the case of multiple
-         * rootflags= the arguments should be concatenated */
+        /* root=, usr=, usrfstype= and roofstype= may occur more than once, the last
+         * instance should take precedence.  In the case of multiple rootflags=
+         * or usrflags= the arguments should be concatenated */
 
         if (STR_IN_SET(key, "fstab", "rd.fstab") && value) {
 
@@ -466,16 +526,12 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
 
         } else if (streq(key, "root") && value) {
 
-                free(arg_root_what);
-                arg_root_what = strdup(value);
-                if (!arg_root_what)
+                if (free_and_strdup(&arg_root_what, value) < 0)
                         return log_oom();
 
         } else if (streq(key, "rootfstype") && value) {
 
-                free(arg_root_fstype);
-                arg_root_fstype = strdup(value);
-                if (!arg_root_fstype)
+                if (free_and_strdup(&arg_root_fstype, value) < 0)
                         return log_oom();
 
         } else if (streq(key, "rootflags") && value) {
@@ -490,6 +546,28 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
                 free(arg_root_options);
                 arg_root_options = o;
 
+        } else if (streq(key, "mount.usr") && value) {
+
+                if (free_and_strdup(&arg_usr_what, value) < 0)
+                        return log_oom();
+
+        } else if (streq(key, "mount.usrfstype") && value) {
+
+                if (free_and_strdup(&arg_usr_fstype, value) < 0)
+                        return log_oom();
+
+        } else if (streq(key, "mount.usrflags") && value) {
+                char *o;
+
+                o = arg_usr_options ?
+                        strjoin(arg_usr_options, ",", value, NULL) :
+                        strdup(value);
+                if (!o)
+                        return log_oom();
+
+                free(arg_usr_options);
+                arg_usr_options = o;
+
         } else if (streq(key, "rw") && !value)
                 arg_root_rw = true;
         else if (streq(key, "ro") && !value)
@@ -518,9 +596,12 @@ int main(int argc, char *argv[]) {
         if (parse_proc_cmdline(parse_proc_cmdline_item) < 0)
                 return EXIT_FAILURE;
 
-        /* Always honour root= in the kernel command line if we are in an initrd */
-        if (in_initrd())
+        /* Always honour root= and usr= in the kernel command line if we are in an initrd */
+        if (in_initrd()) {
                 r = add_root_mount();
+                if (r == 0)
+                        r = add_usr_mount();
+        }
 
         /* Honour /etc/fstab only when that's enabled */
         if (arg_fstab_enabled) {
@@ -543,5 +624,7 @@ int main(int argc, char *argv[]) {
                 }
         }
 
+        free(arg_root_what);
+
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index 7d4b546f72751af2508832c445f091387ddedf8b..06ca9b9662cb44cf5be1dfc6a62ac071a41f448a 100644 (file)
@@ -42,7 +42,7 @@ static int add_symlink(const char *fservice, const char *tservice) {
         assert(tservice);
 
         from = strappenda(SYSTEM_DATA_UNIT_PATH "/", fservice);
-        to = strappenda3(arg_dest, "/getty.target.wants/", tservice);
+        to = strappenda(arg_dest, "/getty.target.wants/", tservice);
 
         mkdir_parents_label(to, 0755);
 
@@ -154,14 +154,14 @@ int main(int argc, char *argv[]) {
 
                 r = getenv_for_pid(1, "container_ttys", &container_ttys);
                 if (r > 0) {
-                        char *w, *state;
+                        const char *word, *state;
                         size_t l;
 
-                        FOREACH_WORD(w, l, container_ttys, state) {
+                        FOREACH_WORD(word, l, container_ttys, state) {
                                 const char *t;
                                 char tty[l + 1];
 
-                                memcpy(tty, w, l);
+                                memcpy(tty, word, l);
                                 tty[l] = 0;
 
                                 /* First strip off /dev/ if it is specified */
@@ -184,15 +184,15 @@ int main(int argc, char *argv[]) {
         }
 
         if (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) {
-                char *w, *state;
+                const char *word, *state;
                 size_t l;
 
                 /* Automatically add in a serial getty on all active
                  * kernel consoles */
-                FOREACH_WORD(w, l, active, state) {
+                FOREACH_WORD(word, l, active, state) {
                         _cleanup_free_ char *tty = NULL;
 
-                        tty = strndup(w, l);
+                        tty = strndup(word, l);
                         if (!tty) {
                                 log_oom();
                                 return EXIT_FAILURE;
index 7dcbbfe497a52b66f0bf23de38222813b63de115..539e2e64b53b59568ee70c1de8d15223506e598c 100644 (file)
@@ -124,7 +124,7 @@ static int add_cryptsetup(const char *id, const char *what, bool rw, char **devi
                 return log_oom();
 
         p = strjoin(arg_dest, "/", n, NULL);
-        if (!n)
+        if (!p)
                 return log_oom();
 
         f = fopen(p, "wxe");
@@ -144,7 +144,6 @@ static int add_cryptsetup(const char *id, const char *what, bool rw, char **devi
                 "Before=umount.target cryptsetup.target\n"
                 "After=%s\n"
                 "IgnoreOnIsolate=true\n"
-                "After=systemd-readahead-collect.service systemd-readahead-replay.service\n\n"
                 "[Service]\n"
                 "Type=oneshot\n"
                 "RemainAfterExit=yes\n"
diff --git a/src/hibernate-resume/hibernate-resume-generator.c b/src/hibernate-resume/hibernate-resume-generator.c
new file mode 100644 (file)
index 0000000..f407216
--- /dev/null
@@ -0,0 +1,95 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Ivan Shapovalov
+
+  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/>.
+***/
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "log.h"
+#include "util.h"
+#include "special.h"
+#include "mkdir.h"
+#include "unit-name.h"
+
+static const char *arg_dest = "/tmp";
+static char *arg_resume_dev = NULL;
+
+static int parse_proc_cmdline_item(const char *key, const char *value) {
+        if (streq(key, "resume") && value) {
+                free(arg_resume_dev);
+                arg_resume_dev = fstab_node_to_udev_node(value);
+                if (!arg_resume_dev)
+                        return log_oom();
+        }
+
+        return 0;
+}
+
+static int process_resume(void) {
+        _cleanup_free_ char *name = NULL, *lnk = NULL;
+
+        name = unit_name_from_path_instance("systemd-hibernate-resume", arg_resume_dev, ".service");
+        if (!name)
+                return log_oom();
+
+        lnk = strjoin(arg_dest, "/" SPECIAL_SYSINIT_TARGET ".wants/", name, NULL);
+        if (!lnk)
+                return log_oom();
+
+        mkdir_parents_label(lnk, 0755);
+        if (symlink(SYSTEM_DATA_UNIT_PATH "/systemd-hibernate-resume@.service", lnk) < 0) {
+                log_error("Failed to create symlink %s: %m", lnk);
+                return -errno;
+        }
+
+        return 0;
+}
+
+int main(int argc, char *argv[]) {
+        int r = 0;
+
+        if (argc > 1 && argc != 4) {
+                log_error("This program takes three or no arguments.");
+                return EXIT_FAILURE;
+        }
+
+        if (argc > 1)
+                arg_dest = argv[1];
+
+        log_set_target(LOG_TARGET_SAFE);
+        log_parse_environment();
+        log_open();
+
+        umask(0022);
+
+        /* Don't even consider resuming outside of initramfs. */
+        if (!in_initrd())
+                return EXIT_SUCCESS;
+
+        if (parse_proc_cmdline(parse_proc_cmdline_item) < 0)
+                return EXIT_FAILURE;
+
+        if (arg_resume_dev != NULL)
+                r = process_resume();
+
+        free(arg_resume_dev);
+
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
new file mode 100644 (file)
index 0000000..b234a0b
--- /dev/null
@@ -0,0 +1,85 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Ivan Shapovalov
+
+  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/>.
+***/
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "log.h"
+#include "util.h"
+#include "fileio.h"
+
+int main(int argc, char *argv[]) {
+        struct stat st;
+        const char *device;
+        _cleanup_free_ char *major_minor = NULL;
+        int r;
+
+        if (argc != 2) {
+                log_error("This program expects one argument.");
+                return EXIT_FAILURE;
+        }
+
+        log_set_target(LOG_TARGET_AUTO);
+        log_parse_environment();
+        log_open();
+
+        umask(0022);
+
+        /* Refuse to run unless we are in an initrd() */
+        if (!in_initrd())
+                return EXIT_SUCCESS;
+
+        device = argv[1];
+
+        if (stat(device, &st) < 0) {
+                log_error("Failed to stat '%s': %m", device);
+                return EXIT_FAILURE;
+        }
+
+        if (!S_ISBLK(st.st_mode)) {
+                log_error("Resume device '%s' is not a block device.", device);
+                return EXIT_FAILURE;
+        }
+
+        if (asprintf(&major_minor, "%d:%d", major(st.st_rdev), minor(st.st_rdev)) < 0) {
+                log_oom();
+                return EXIT_FAILURE;
+        }
+
+        r = write_string_file("/sys/power/resume", major_minor);
+        if (r < 0) {
+                log_error("Failed to write '%s' to /sys/power/resume: %s", major_minor, strerror(-r));
+                return EXIT_FAILURE;
+        }
+
+        /*
+         * The write above shall not return.
+         *
+         * However, failed resume is a normal condition (may mean that there is
+         * no hibernation image).
+         */
+
+        log_info("Could not resume from '%s' (%s).", device, major_minor);
+        return EXIT_SUCCESS;
+}
index 267cd7401103b357816b9de4398ff2e0786b244c..e48736920f126a6c4b048be48df03be97d38f482 100644 (file)
@@ -67,6 +67,8 @@ typedef struct StatusInfo {
         char *pretty_hostname;
         char *icon_name;
         char *chassis;
+        char *deployment;
+        char *location;
         char *kernel_name;
         char *kernel_release;
         char *os_pretty_name;
@@ -91,10 +93,19 @@ static void print_status_info(StatusInfo *i) {
             !streq_ptr(i->hostname, i->static_hostname))
                 printf("Transient hostname: %s\n", i->hostname);
 
-        printf("         Icon name: %s\n"
-               "           Chassis: %s\n",
-               strna(i->icon_name),
-               strna(i->chassis));
+        if (!isempty(i->icon_name))
+                printf("         Icon name: %s\n",
+                       strna(i->icon_name));
+
+        if (!isempty(i->chassis))
+                printf("           Chassis: %s\n",
+                       strna(i->chassis));
+
+        if (!isempty(i->deployment))
+                printf("        Deployment: %s\n", i->deployment);
+
+        if (!isempty(i->location))
+                printf("          Location: %s\n", i->location);
 
         r = sd_id128_get_machine(&mid);
         if (r >= 0)
@@ -152,21 +163,23 @@ static int show_all_names(sd_bus *bus) {
         StatusInfo info = {};
 
         static const struct bus_properties_map hostname_map[]  = {
-                { "Hostname",       "s", NULL, offsetof(StatusInfo, hostname) },
-                { "StaticHostname", "s", NULL, offsetof(StatusInfo, static_hostname) },
-                { "PrettyHostname", "s", NULL, offsetof(StatusInfo, pretty_hostname) },
-                { "IconName",       "s", NULL, offsetof(StatusInfo, icon_name) },
-                { "Chassis",        "s", NULL, offsetof(StatusInfo, chassis) },
-                { "KernelName",     "s", NULL, offsetof(StatusInfo, kernel_name) },
-                { "KernelRelease",     "s", NULL, offsetof(StatusInfo, kernel_release) },
-                { "OperatingSystemPrettyName",     "s", NULL, offsetof(StatusInfo, os_pretty_name) },
-                { "OperatingSystemCPEName",        "s", NULL, offsetof(StatusInfo, os_cpe_name) },
+                { "Hostname",                  "s", NULL, offsetof(StatusInfo, hostname)        },
+                { "StaticHostname",            "s", NULL, offsetof(StatusInfo, static_hostname) },
+                { "PrettyHostname",            "s", NULL, offsetof(StatusInfo, pretty_hostname) },
+                { "IconName",                  "s", NULL, offsetof(StatusInfo, icon_name)       },
+                { "Chassis",                   "s", NULL, offsetof(StatusInfo, chassis)         },
+                { "Deployment",                "s", NULL, offsetof(StatusInfo, deployment)      },
+                { "Location",                  "s", NULL, offsetof(StatusInfo, location)        },
+                { "KernelName",                "s", NULL, offsetof(StatusInfo, kernel_name)     },
+                { "KernelRelease",             "s", NULL, offsetof(StatusInfo, kernel_release)  },
+                { "OperatingSystemPrettyName", "s", NULL, offsetof(StatusInfo, os_pretty_name)  },
+                { "OperatingSystemCPEName",    "s", NULL, offsetof(StatusInfo, os_cpe_name)     },
                 {}
         };
 
         static const struct bus_properties_map manager_map[] = {
-                { "Virtualization", "s", NULL, offsetof(StatusInfo, virtualization) },
-                { "Architecture",   "s", NULL, offsetof(StatusInfo, architecture) },
+                { "Virtualization",            "s", NULL, offsetof(StatusInfo, virtualization)  },
+                { "Architecture",              "s", NULL, offsetof(StatusInfo, architecture)    },
                 {}
         };
 
@@ -194,6 +207,8 @@ fail:
         free(info.pretty_hostname);
         free(info.icon_name);
         free(info.chassis);
+        free(info.deployment);
+        free(info.location);
         free(info.kernel_name);
         free(info.kernel_release);
         free(info.os_pretty_name);
@@ -309,8 +324,21 @@ static int set_chassis(sd_bus *bus, char **args, unsigned n) {
         return set_simple_string(bus, "SetChassis", args[1]);
 }
 
-static int help(void) {
+static int set_deployment(sd_bus *bus, char **args, unsigned n) {
+        assert(args);
+        assert(n == 2);
 
+        return set_simple_string(bus, "SetDeployment", args[1]);
+}
+
+static int set_location(sd_bus *bus, char **args, unsigned n) {
+        assert(args);
+        assert(n == 2);
+
+        return set_simple_string(bus, "SetLocation", args[1]);
+}
+
+static void help(void) {
         printf("%s [OPTIONS...] COMMAND ...\n\n"
                "Query or change system hostname.\n\n"
                "  -h --help              Show this help\n"
@@ -325,10 +353,10 @@ static int help(void) {
                "  status                 Show current hostname settings\n"
                "  set-hostname NAME      Set system hostname\n"
                "  set-icon-name NAME     Set icon name for host\n"
-               "  set-chassis NAME       Set chassis type for host\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  set-chassis NAME       Set chassis type for host\n"
+               "  set-deployment NAME    Set deployment environment for host\n"
+               "  set-location NAME      Set location for host\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -358,12 +386,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -402,7 +431,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -419,10 +447,12 @@ static int hostnamectl_main(sd_bus *bus, int argc, char *argv[]) {
                 const int argc;
                 int (* const dispatch)(sd_bus *bus, char **args, unsigned n);
         } verbs[] = {
-                { "status",        LESS,  1, show_status   },
-                { "set-hostname",  EQUAL, 2, set_hostname  },
-                { "set-icon-name", EQUAL, 2, set_icon_name },
-                { "set-chassis",   EQUAL, 2, set_chassis   },
+                { "status",           LESS,  1, show_status    },
+                { "set-hostname",     EQUAL, 2, set_hostname   },
+                { "set-icon-name",    EQUAL, 2, set_icon_name  },
+                { "set-chassis",      EQUAL, 2, set_chassis    },
+                { "set-deployment",   EQUAL, 2, set_deployment },
+                { "set-location",     EQUAL, 2, set_location   },
         };
 
         int left;
@@ -486,7 +516,7 @@ static int hostnamectl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");
index 14629dd3a9d53a36107fb92f562f97bba422a531..a449610bb86c2593c3d0408ebab2dc82990b2293 100644 (file)
@@ -22,8 +22,8 @@
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
-#include <dlfcn.h>
 #include <sys/utsname.h>
+#include <sys/capability.h>
 
 #include "util.h"
 #include "strv.h"
 #include "bus-util.h"
 #include "event-util.h"
 
+#define VALID_DEPLOYMENT_CHARS (DIGITS LETTERS "-.:")
+
 enum {
         PROP_HOSTNAME,
         PROP_STATIC_HOSTNAME,
         PROP_PRETTY_HOSTNAME,
         PROP_ICON_NAME,
         PROP_CHASSIS,
+        PROP_DEPLOYMENT,
+        PROP_LOCATION,
         PROP_KERNEL_NAME,
         PROP_KERNEL_RELEASE,
         PROP_KERNEL_VERSION,
@@ -65,11 +69,11 @@ static void context_reset(Context *c) {
         }
 }
 
-static void context_free(Context *c, sd_bus *bus) {
+static void context_free(Context *c) {
         assert(c);
 
         context_reset(c);
-        bus_verify_polkit_async_registry_free(bus, c->polkit_registry);
+        bus_verify_polkit_async_registry_free(c->polkit_registry);
 }
 
 static int context_read_data(Context *c) {
@@ -100,6 +104,8 @@ static int context_read_data(Context *c) {
                            "PRETTY_HOSTNAME", &c->data[PROP_PRETTY_HOSTNAME],
                            "ICON_NAME", &c->data[PROP_ICON_NAME],
                            "CHASSIS", &c->data[PROP_CHASSIS],
+                           "DEPLOYMENT", &c->data[PROP_DEPLOYMENT],
+                           "LOCATION", &c->data[PROP_LOCATION],
                            NULL);
         if (r < 0 && r != -ENOENT)
                 return r;
@@ -121,20 +127,7 @@ static int context_read_data(Context *c) {
         return 0;
 }
 
-static bool check_nss(void) {
-        void *dl;
-
-        dl = dlopen("libnss_myhostname.so.2", RTLD_LAZY);
-        if (dl) {
-                dlclose(dl);
-                return true;
-        }
-
-        return false;
-}
-
 static bool valid_chassis(const char *chassis) {
-
         assert(chassis);
 
         return nulstr_contains(
@@ -144,10 +137,17 @@ static bool valid_chassis(const char *chassis) {
                         "laptop\0"
                         "server\0"
                         "tablet\0"
-                        "handset\0",
+                        "handset\0"
+                        "watch\0",
                         chassis);
 }
 
+static bool valid_deployment(const char *deployment) {
+        assert(deployment);
+
+        return in_charset(deployment, VALID_DEPLOYMENT_CHARS);
+}
+
 static const char* fallback_chassis(void) {
         int r;
         char *type;
@@ -257,6 +257,7 @@ static char* context_fallback_icon_name(Context *c) {
         return strdup("computer");
 }
 
+
 static bool hostname_is_useful(const char *hn) {
         return !isempty(hn) && !is_localhost(hn);
 }
@@ -286,7 +287,7 @@ static int context_update_kernel_hostname(Context *c) {
         else
                 hn = "localhost";
 
-        if (sethostname(hn, strlen(hn)) < 0)
+        if (sethostname_idempotent(hn) < 0)
                 return -errno;
 
         return 0;
@@ -311,7 +312,9 @@ static int context_write_data_machine_info(Context *c) {
         static const char * const name[_PROP_MAX] = {
                 [PROP_PRETTY_HOSTNAME] = "PRETTY_HOSTNAME",
                 [PROP_ICON_NAME] = "ICON_NAME",
-                [PROP_CHASSIS] = "CHASSIS"
+                [PROP_CHASSIS] = "CHASSIS",
+                [PROP_DEPLOYMENT] = "DEPLOYMENT",
+                [PROP_LOCATION] = "LOCATION",
         };
 
         _cleanup_strv_free_ char **l = NULL;
@@ -323,8 +326,9 @@ static int context_write_data_machine_info(Context *c) {
         if (r < 0 && r != -ENOENT)
                 return r;
 
-        for (p = PROP_PRETTY_HOSTNAME; p <= PROP_CHASSIS; p++) {
-                char *t, **u;
+        for (p = PROP_PRETTY_HOSTNAME; p <= PROP_LOCATION; p++) {
+                _cleanup_free_ char *t = NULL;
+                char **u;
 
                 assert(name[p]);
 
@@ -333,12 +337,11 @@ static int context_write_data_machine_info(Context *c) {
                         continue;
                 }
 
-                if (asprintf(&t, "%s=%s", name[p], strempty(c->data[p])) < 0)
+                t = strjoin(name[p], "=", c->data[p], NULL);
+                if (!t)
                         return -ENOMEM;
 
                 u = strv_env_set(l, t);
-                free(t);
-
                 if (!u)
                         return -ENOMEM;
 
@@ -347,7 +350,6 @@ static int context_write_data_machine_info(Context *c) {
         }
 
         if (strv_isempty(l)) {
-
                 if (unlink("/etc/machine-info") < 0)
                         return errno == ENOENT ? 0 : -errno;
 
@@ -424,7 +426,7 @@ static int method_set_hostname(sd_bus *bus, sd_bus_message *m, void *userdata, s
         if (streq_ptr(name, c->data[PROP_HOSTNAME]))
                 return sd_bus_reply_method_return(m, NULL);
 
-        r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.hostname1.set-hostname", interactive, error, method_set_hostname, c);
+        r = bus_verify_polkit_async(m, CAP_SYS_ADMIN, "org.freedesktop.hostname1.set-hostname", interactive, &c->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -466,7 +468,7 @@ static int method_set_static_hostname(sd_bus *bus, sd_bus_message *m, void *user
         if (streq_ptr(name, c->data[PROP_STATIC_HOSTNAME]))
                 return sd_bus_reply_method_return(m, NULL);
 
-        r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.hostname1.set-static-hostname", interactive, error, method_set_static_hostname, c);
+        r = bus_verify_polkit_async(m, CAP_SYS_ADMIN, "org.freedesktop.hostname1.set-static-hostname", interactive, &c->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -531,9 +533,10 @@ static int set_machine_info(Context *c, sd_bus *bus, sd_bus_message *m, int prop
          * same time as the static one, use the same policy action for
          * both... */
 
-        r = bus_verify_polkit_async(bus, &c->polkit_registry, m, prop == PROP_PRETTY_HOSTNAME ?
-                          "org.freedesktop.hostname1.set-static-hostname" :
-                          "org.freedesktop.hostname1.set-machine-info", interactive, error, cb, c);
+        r = bus_verify_polkit_async(m, CAP_SYS_ADMIN,
+                                    prop == PROP_PRETTY_HOSTNAME ?
+                                    "org.freedesktop.hostname1.set-static-hostname" :
+                                    "org.freedesktop.hostname1.set-machine-info", interactive, &c->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -550,11 +553,14 @@ static int set_machine_info(Context *c, sd_bus *bus, sd_bus_message *m, int prop
 
                 if (prop == PROP_ICON_NAME && !filename_is_safe(name))
                         return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid icon name '%s'", name);
-                if (prop == PROP_PRETTY_HOSTNAME &&
-                    (string_has_cc(name) || chars_intersect(name, "\t")))
+                if (prop == PROP_PRETTY_HOSTNAME && string_has_cc(name, NULL))
                         return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid pretty host name '%s'", name);
                 if (prop == PROP_CHASSIS && !valid_chassis(name))
                         return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid chassis '%s'", name);
+                if (prop == PROP_DEPLOYMENT && !valid_deployment(name))
+                        return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid deployment '%s'", name);
+                if (prop == PROP_LOCATION && string_has_cc(name, NULL))
+                        return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid location '%s'", name);
 
                 h = strdup(name);
                 if (!h)
@@ -572,11 +578,15 @@ static int set_machine_info(Context *c, sd_bus *bus, sd_bus_message *m, int prop
 
         log_info("Changed %s to '%s'",
                  prop == PROP_PRETTY_HOSTNAME ? "pretty host name" :
+                 prop == PROP_DEPLOYMENT ? "deployment" :
+                 prop == PROP_LOCATION ? "location" :
                  prop == PROP_CHASSIS ? "chassis" : "icon name", strna(c->data[prop]));
 
         sd_bus_emit_properties_changed(bus, "/org/freedesktop/hostname1", "org.freedesktop.hostname1",
                                        prop == PROP_PRETTY_HOSTNAME ? "PrettyHostname" :
-                                       prop == PROP_CHASSIS ? "Chassis" : "IconName", NULL);
+                                       prop == PROP_DEPLOYMENT ? "Deployment" :
+                                       prop == PROP_LOCATION ? "Location" :
+                                       prop == PROP_CHASSIS ? "Chassis" : "IconName" , NULL);
 
         return sd_bus_reply_method_return(m, NULL);
 }
@@ -593,13 +603,23 @@ static int method_set_chassis(sd_bus *bus, sd_bus_message *m, void *userdata, sd
         return set_machine_info(userdata, bus, m, PROP_CHASSIS, method_set_chassis, error);
 }
 
+static int method_set_deployment(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) {
+        return set_machine_info(userdata, bus, m, PROP_DEPLOYMENT, method_set_deployment, error);
+}
+
+static int method_set_location(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *error) {
+        return set_machine_info(userdata, bus, m, PROP_LOCATION, method_set_location, error);
+}
+
 static const sd_bus_vtable hostname_vtable[] = {
         SD_BUS_VTABLE_START(0),
-        SD_BUS_PROPERTY("Hostname", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_HOSTNAME, 0),
+        SD_BUS_PROPERTY("Hostname", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_HOSTNAME, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("StaticHostname", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_STATIC_HOSTNAME, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("PrettyHostname", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_PRETTY_HOSTNAME, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("IconName", "s", property_get_icon_name, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Chassis", "s", property_get_chassis, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+        SD_BUS_PROPERTY("Deployment", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_DEPLOYMENT, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
+        SD_BUS_PROPERTY("Location", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_LOCATION, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("KernelName", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_KERNEL_NAME, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("KernelRelease", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_KERNEL_RELEASE, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("KernelVersion", "s", NULL, offsetof(Context, data) + sizeof(char*) * PROP_KERNEL_VERSION, SD_BUS_VTABLE_PROPERTY_CONST),
@@ -610,11 +630,13 @@ static const sd_bus_vtable hostname_vtable[] = {
         SD_BUS_METHOD("SetPrettyHostname", "sb", NULL, method_set_pretty_hostname, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("SetIconName", "sb", NULL, method_set_icon_name, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("SetChassis", "sb", NULL, method_set_chassis, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("SetDeployment", "sb", NULL, method_set_deployment, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("SetLocation", "sb", NULL, method_set_location, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_VTABLE_END,
 };
 
 static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         assert(c);
@@ -653,9 +675,8 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
 
 int main(int argc, char *argv[]) {
         Context context = {};
-
         _cleanup_event_unref_ sd_event *event = NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         log_set_target(LOG_TARGET_AUTO);
@@ -663,7 +684,7 @@ int main(int argc, char *argv[]) {
         log_open();
 
         umask(0022);
-        label_init("/etc");
+        mac_selinux_init("/etc");
 
         if (argc != 1) {
                 log_error("This program takes no arguments.");
@@ -671,9 +692,6 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
-        if (!check_nss())
-                log_warning("Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!");
-
         if (argc != 1) {
                 log_error("This program takes no arguments.");
                 r = -EINVAL;
@@ -705,7 +723,7 @@ int main(int argc, char *argv[]) {
         }
 
 finish:
-        context_free(&context, bus);
+        context_free(&context);
 
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
diff --git a/src/hostname/org.freedesktop.hostname1.policy b/src/hostname/org.freedesktop.hostname1.policy
deleted file mode 100644 (file)
index a44b8b6..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
-        "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
-        <vendor>The systemd Project</vendor>
-        <vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
-
-        <action id="org.freedesktop.hostname1.set-hostname">
-                <description>Set host name</description>
-                <description xml:lang="de">Rechnername festlegen</description>
-                <description xml:lang="el">Ορισμός ονόματος οικοδεσπότη</description>
-                <description xml:lang="fr">Définir le nom d'hôte</description>
-                <description xml:lang="it">Configura il nome host</description>
-                <description xml:lang="pl">Ustawienie nazwy komputera</description>
-                <description xml:lang="ru">Настроить имя компьютера</description>
-                <message>Authentication is required to set the local host name.</message>
-                <message xml:lang="de">Legitimierung ist zum Festlegen des lokalen Rechnernamens notwendig</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ορίσετε τοπικά όνομα οικοδεσπότη.</message>
-                <message xml:lang="fr">Authentification requise pour définir le nom d'hôte local.</message>
-                <message xml:lang="it">Autenticazione richiesta per configurare il nome host locale.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ustawić nazwę lokalnego komputera.</message>
-                <message xml:lang="ru">Чтобы настроить имя компьютера, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.hostname1.set-static-hostname">
-                <description>Set static host name</description>
-                <description xml:lang="de">Statischen Rechnernamen festlegen</description>
-                <description xml:lang="el">Ορισμός στατικού ονόματος οικοδεσπότη</description>
-                <description xml:lang="fr">Définir le nom d'hôte statique</description>
-                <description xml:lang="it">Configura il nome host statico</description>
-                <description xml:lang="pl">Ustawienie statycznej nazwy komputera</description>
-                <description xml:lang="ru">Настроить статическое имя компьютера</description>
-                <message>Authentication is required to set the statically configured local host name, as well as the pretty host name.</message>
-                <message xml:lang="de">Authentifizierung ist erforderlich, um den statisch geänderten, lokalen Rechnernamen, sowie den beschönigten Rechnernamen festzulegen.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ορίσετε το στατικά ρυθμισμένο όνομα τοπικού οικοδεσπότη, καθώς και το pretty όνομα οικοδεσπότη.</message>
-                <message xml:lang="fr">Authentification requise pour définir le nom d'hôte local de manière statique, tout comme le nom d'hôte familier.</message>
-                <message xml:lang="it">Autenticazione richiesta per configurare staticamente il nome host locale e il nome host descrittivo.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ustawić statycznie skonfigurowaną nazwę lokalnego komputera, a także jego ładną nazwę.</message>
-                <message xml:lang="ru">Чтобы настроить статическое имя компьютера, а также его «красивое» имя, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.hostname1.set-hostname org.freedesktop.hostname1.set-machine-info</annotate>
-        </action>
-
-        <action id="org.freedesktop.hostname1.set-machine-info">
-                <description>Set machine information</description>
-                <description xml:lang="de">Maschinen-Information festlegen</description>
-                <description xml:lang="el">Ορισμός πληροφοριών μηχανής</description>
-                <description xml:lang="fr">Définir les informations sur la machine</description>
-                <description xml:lang="it">Configura le informazioni sulla macchina</description>
-                <description xml:lang="pl">Ustawienie informacji o komputerze</description>
-                <description xml:lang="ru">Настроить информацию о компьютере</description>
-                <message>Authentication is required to set local machine information.</message>
-                <message xml:lang="de">Legitimierung ist zum Festlegen der lokalen Maschinen-Information erforderlich.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ορίσετε πληροφορίες τοπικής μηχανής.</message>
-                <message xml:lang="fr">Authentification requise pour définir les informations sur la machine locale.</message>
-                <message xml:lang="it">Autenticazione richiesta per configurare le informazioni sulla macchina locale.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ustawić informacje o lokalnym komputerze.</message>
-                <message xml:lang="ru">Чтобы настроить информацию о компьютере, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-</policyconfig>
\ No newline at end of file
index f3f6f7304073f44cc9660f35d9d6fef4c9de977d..f1c2b8dfb4ad8652d9829ccb065b6d694797c383 100644 (file)
@@ -218,7 +218,7 @@ static int fifo_process(Fifo *f) {
                         return 0;
 
                 log_warning("Failed to read from fifo: %m");
-                return -1;
+                return -errno;
         }
 
         f->bytes_read += l;
@@ -431,6 +431,7 @@ int main(int argc, char *argv[]) {
 
 fail:
         sd_notify(false,
+                  "STOPPING=1\n"
                   "STATUS=Shutting down...");
 
         server_done(&server);
diff --git a/src/journal-remote/browse.html b/src/journal-remote/browse.html
new file mode 100644 (file)
index 0000000..3594f70
--- /dev/null
@@ -0,0 +1,544 @@
+<!DOCTYPE html>
+<html>
+<head>
+        <title>Journal</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+        <style type="text/css">
+                div#divlogs, div#diventry {
+                        font-family: monospace;
+                        font-size: 7pt;
+                        background-color: #ffffff;
+                        padding: 1em;
+                        margin: 2em 0em;
+                        border-radius: 10px 10px 10px 10px;
+                        border: 1px solid threedshadow;
+                        white-space: nowrap;
+                        overflow-x: scroll;
+                }
+                div#diventry {
+                        display: none;
+                }
+                div#divlogs {
+                        display: block;
+                }
+                body {
+                        background-color: #ededed;
+                        color: #313739;
+                        font: message-box;
+                        margin: 3em;
+                }
+                td.timestamp {
+                        text-align: right;
+                        border-right: 1px dotted lightgrey;
+                        padding-right: 5px;
+                }
+                td.process {
+                        border-right: 1px dotted lightgrey;
+                        padding-left: 5px;
+                        padding-right: 5px;
+                }
+                td.message {
+                        padding-left: 5px;
+                }
+                td.message > a:link, td.message > a:visited {
+                        text-decoration: none;
+                        color: #313739;
+                }
+                td.message-error {
+                        padding-left: 5px;
+                        color: red;
+                        font-weight: bold;
+                }
+                td.message-error > a:link, td.message-error > a:visited {
+                        text-decoration: none;
+                        color: red;
+                }
+                td.message-highlight {
+                        padding-left: 5px;
+                        font-weight: bold;
+                }
+                td.message-highlight > a:link, td.message-highlight > a:visited {
+                        text-decoration: none;
+                        color: #313739;
+                }
+                td > a:hover, td > a:active {
+                        text-decoration: underline;
+                        color: #c13739;
+                }
+                table#tablelogs, table#tableentry {
+                        border-collapse: collapse;
+                }
+                td.field {
+                        text-align: right;
+                        border-right: 1px dotted lightgrey;
+                        padding-right: 5px;
+                }
+                td.data {
+                        padding-left: 5px;
+                }
+                div#keynav {
+                        text-align: center;
+                        font-size: 7pt;
+                        color: #818789;
+                        padding-top: 2em;
+                }
+                span.key {
+                        font-weight: bold;
+                        color: #313739;
+                }
+                div#buttonnav {
+                        text-align: center;
+                }
+                button {
+                        font-size: 18pt;
+                        font-weight: bold;
+                        width: 2em;
+                        height: 2em;
+                }
+                div#filternav {
+                        text-align: center;
+                }
+                select {
+                        width: 50em;
+                }
+        </style>
+</head>
+
+<body>
+        <!-- TODO:
+                - live display
+                - show red lines for reboots -->
+
+        <h1 id="title"></h1>
+
+        <div id="os"></div>
+        <div id="virtualization"></div>
+        <div id="cutoff"></div>
+        <div id="machine"></div>
+        <div id="usage"></div>
+        <div id="showing"></div>
+
+        <div id="filternav">
+                <select id="filter" onchange="onFilterChange(this);" onfocus="onFilterFocus(this);">
+                        <option>No filter</option>
+                </select>
+                &nbsp;&nbsp;&nbsp;&nbsp;
+                <input id="boot" type="checkbox" onchange="onBootChange(this);">Only current boot</input>
+        </div>
+
+        <div id="divlogs"><table id="tablelogs"></table></div>
+        <a name="entry"></a>
+        <div id="diventry"><table id="tableentry"></table></div>
+
+        <div id="buttonnav">
+                <button id="head" onclick="entriesLoadHead();" title="First Page">&#8676;</button>
+                <button id="previous" type="button" onclick="entriesLoadPrevious();" title="Previous Page"/>&#8592;</button>
+                <button id="next" type="button" onclick="entriesLoadNext();" title="Next Page"/>&#8594;</button>
+                <button id="tail" type="button" onclick="entriesLoadTail();" title="Last Page"/>&#8677;</button>
+                &nbsp;&nbsp;&nbsp;&nbsp;
+                <button id="more" type="button" onclick="entriesMore();" title="More Entries"/>+</button>
+                <button id="less" type="button" onclick="entriesLess();" title="Fewer Entries"/>-</button>
+        </div>
+
+        <div id="keynav">
+                <span class="key">g</span>: First Page &nbsp;&nbsp;&nbsp;&nbsp;
+                <span class="key">&#8592;, k, BACKSPACE</span>: Previous Page &nbsp;&nbsp;&nbsp;&nbsp;
+                <span class="key">&#8594;, j, SPACE</span>: Next Page &nbsp;&nbsp;&nbsp;&nbsp;
+                <span class="key">G</span>: Last Page &nbsp;&nbsp;&nbsp;&nbsp;
+                <span class="key">+</span>: More entries &nbsp;&nbsp;&nbsp;&nbsp;
+                <span class="key">-</span>: Fewer entries
+        </div>
+
+        <script type="text/javascript">
+                var first_cursor = null;
+                var last_cursor = null;
+
+                function getNEntries() {
+                        var n;
+                        n = localStorage["n_entries"];
+                        if (n == null)
+                                return 50;
+                        n = parseInt(n);
+                        if (n < 10)
+                                return 10;
+                        if (n > 1000)
+                                return 1000;
+                        return n;
+                }
+
+                function showNEntries(n) {
+                        var showing = document.getElementById("showing");
+                        showing.innerHTML = "Showing <b>" + n.toString() + "</b> entries.";
+                }
+
+                function setNEntries(n) {
+                        if (n < 10)
+                                return 10;
+                        if (n > 1000)
+                                return 1000;
+                        localStorage["n_entries"] = n.toString();
+                        showNEntries(n);
+                }
+
+                function machineLoad() {
+                        var request = new XMLHttpRequest();
+                        request.open("GET", "/machine");
+                        request.onreadystatechange = machineOnResult;
+                        request.setRequestHeader("Accept", "application/json");
+                        request.send(null);
+                }
+
+                function formatBytes(u) {
+                        if (u >= 1024*1024*1024*1024)
+                                return (u/1024/1024/1024/1024).toFixed(1) + " TiB";
+                        else if (u >= 1024*1024*1024)
+                                return (u/1024/1024/1024).toFixed(1) + " GiB";
+                        else if (u >= 1024*1024)
+                                return (u/1024/1024).toFixed(1) + " MiB";
+                        else if (u >= 1024)
+                                return (u/1024).toFixed(1) + " KiB";
+                        else
+                                return u.toString() + " B";
+                }
+
+                function escapeHTML(s) {
+                        return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+                }
+
+                function machineOnResult(event) {
+                        if ((event.currentTarget.readyState != 4) ||
+                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
+                                return;
+
+                        var d = JSON.parse(event.currentTarget.responseText);
+
+                        var title = document.getElementById("title");
+                        title.innerHTML = 'Journal of ' + escapeHTML(d.hostname);
+                        document.title = 'Journal of ' + escapeHTML(d.hostname);
+
+                        var machine = document.getElementById("machine");
+                        machine.innerHTML = 'Machine ID is <b>' + d.machine_id + '</b>, current boot ID is <b>' + d.boot_id + '</b>.';
+
+                        var cutoff = document.getElementById("cutoff");
+                        var from = new Date(parseInt(d.cutoff_from_realtime) / 1000);
+                        var to = new Date(parseInt(d.cutoff_to_realtime) / 1000);
+                        cutoff.innerHTML = 'Journal begins at <b>' + from.toLocaleString() + '</b> and ends at <b>' + to.toLocaleString() + '</b>.';
+
+                        var usage = document.getElementById("usage");
+                        usage.innerHTML = 'Disk usage is <b>' + formatBytes(parseInt(d.usage)) + '</b>.';
+
+                        var os = document.getElementById("os");
+                        os.innerHTML = 'Operating system is <b>' + escapeHTML(d.os_pretty_name) + '</b>.';
+
+                        var virtualization = document.getElementById("virtualization");
+                        virtualization.innerHTML = d.virtualization == "bare" ? "Running on <b>bare metal</b>." : "Running on virtualization <b>" + escapeHTML(d.virtualization) + "</b>.";
+                }
+
+                function entriesLoad(range) {
+
+                        if (range == null)
+                                range = localStorage["cursor"] + ":0";
+                        if (range == null)
+                                range = "";
+
+                        var url = "/entries";
+
+                        if (localStorage["filter"] != "" && localStorage["filter"] != null) {
+                                url += "?_SYSTEMD_UNIT=" + escape(localStorage["filter"]);
+
+                                if (localStorage["boot"] == "1")
+                                        url += "&boot";
+                        } else {
+                                if (localStorage["boot"] == "1")
+                                        url += "?boot";
+                        }
+
+                        var request = new XMLHttpRequest();
+                        request.open("GET", url);
+                        request.onreadystatechange = entriesOnResult;
+                        request.setRequestHeader("Accept", "application/json");
+                        request.setRequestHeader("Range", "entries=" + range + ":" + getNEntries().toString());
+                        request.send(null);
+                }
+
+                function entriesLoadNext() {
+                        if (last_cursor == null)
+                                entriesLoad("");
+                        else
+                                entriesLoad(last_cursor + ":1");
+                }
+
+                function entriesLoadPrevious() {
+                        if (first_cursor == null)
+                                entriesLoad("");
+                        else
+                                entriesLoad(first_cursor + ":-" + getNEntries().toString());
+                }
+
+                function entriesLoadHead() {
+                        entriesLoad("");
+                }
+
+                function entriesLoadTail() {
+                        entriesLoad(":-" + getNEntries().toString());
+                }
+
+                function entriesOnResult(event) {
+
+                        if ((event.currentTarget.readyState != 4) ||
+                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
+                                return;
+
+                        var logs = document.getElementById("tablelogs");
+
+                        var lc = null;
+                        var fc = null;
+
+                        var i, l = event.currentTarget.responseText.split('\n');
+
+                        if (l.length <= 1) {
+                                logs.innerHTML = '<tbody><tr><td colspan="3"><i>No further entries...</i></td></tr></tbody>';
+                                return;
+                        }
+
+                        var buf = '';
+
+                        for (i in l) {
+
+                                if (l[i] == '')
+                                        continue;
+
+                                var d = JSON.parse(l[i]);
+                                if (d.MESSAGE == undefined || d.__CURSOR == undefined)
+                                        continue;
+
+                                if (fc == null)
+                                        fc = d.__CURSOR;
+                                lc = d.__CURSOR;
+
+                                var priority;
+                                if (d.PRIORITY != undefined)
+                                        priority = parseInt(d.PRIORITY);
+                                else
+                                        priority = 6;
+
+                                if (priority <= 3)
+                                        clazz = "message-error";
+                                else if (priority <= 5)
+                                        clazz = "message-highlight";
+                                else
+                                        clazz = "message";
+
+                                buf += '<tr><td class="timestamp">';
+
+                                if (d.__REALTIME_TIMESTAMP != undefined) {
+                                        var timestamp = new Date(parseInt(d.__REALTIME_TIMESTAMP) / 1000);
+                                        buf += timestamp.toLocaleString();
+                                }
+
+                                buf += '</td><td class="process">';
+
+                                if (d.SYSLOG_IDENTIFIER != undefined)
+                                        buf += escapeHTML(d.SYSLOG_IDENTIFIER);
+                                else if (d._COMM != undefined)
+                                        buf += escapeHTML(d._COMM);
+
+                                if (d._PID != undefined)
+                                        buf += "[" + escapeHTML(d._PID) + "]";
+                                else if (d.SYSLOG_PID != undefined)
+                                        buf += "[" + escapeHTML(d.SYSLOG_PID) + "]";
+
+                                buf += '</td><td class="' + clazz + '"><a href="#entry" onclick="onMessageClick(\'' + d.__CURSOR + '\');">';
+
+                                if (d.MESSAGE == null)
+                                        buf += "[blob data]";
+                                else if (d.MESSAGE instanceof Array)
+                                        buf += "[" + formatBytes(d.MESSAGE.length) + " blob data]";
+                                else
+                                        buf += escapeHTML(d.MESSAGE);
+
+                                buf += '</a></td></tr>';
+                        }
+
+                        logs.innerHTML = '<tbody>' + buf + '</tbody>';
+
+                        if (fc != null) {
+                                first_cursor = fc;
+                                localStorage["cursor"] = fc;
+                        }
+                        if (lc != null)
+                                last_cursor = lc;
+                }
+
+                function entriesMore() {
+                        setNEntries(getNEntries() + 10);
+                        entriesLoad(first_cursor);
+                }
+
+                function entriesLess() {
+                        setNEntries(getNEntries() - 10);
+                        entriesLoad(first_cursor);
+                }
+
+                function onResultMessageClick(event) {
+                        if ((event.currentTarget.readyState != 4) ||
+                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
+                                return;
+
+                        var d = JSON.parse(event.currentTarget.responseText);
+
+                        document.getElementById("diventry").style.display = "block";
+                        entry = document.getElementById("tableentry");
+
+                        var buf = "";
+                        for (var key in d){
+                                var data = d[key];
+
+                                if (data == null)
+                                        data = "[blob data]";
+                                else if (data instanceof Array)
+                                        data = "[" + formatBytes(data.length) + " blob data]";
+                                else
+                                        data = escapeHTML(data);
+
+                                buf += '<tr><td class="field">' + key + '</td><td class="data">' + data + '</td></tr>';
+                        }
+                        entry.innerHTML = '<tbody>' + buf + '</tbody>';
+                }
+
+                function onMessageClick(t) {
+                        var request = new XMLHttpRequest();
+                        request.open("GET", "/entries?discrete");
+                        request.onreadystatechange = onResultMessageClick;
+                        request.setRequestHeader("Accept", "application/json");
+                        request.setRequestHeader("Range", "entries=" + t + ":0:1");
+                        request.send(null);
+                }
+
+                function onKeyUp(event) {
+                        switch (event.keyCode) {
+                                case 8:
+                                case 37:
+                                case 75:
+                                        entriesLoadPrevious();
+                                        break;
+                                case 32:
+                                case 39:
+                                case 74:
+                                        entriesLoadNext();
+                                        break;
+
+                                case 71:
+                                        if (event.shiftKey)
+                                                entriesLoadTail();
+                                        else
+                                                entriesLoadHead();
+                                        break;
+                                case 171:
+                                        entriesMore();
+                                        break;
+                                case 173:
+                                        entriesLess();
+                                        break;
+                        }
+                }
+
+                function onMouseWheel(event) {
+                        if (event.detail < 0 || event.wheelDelta > 0)
+                                entriesLoadPrevious();
+                        else
+                                entriesLoadNext();
+                }
+
+                function onResultFilterFocus(event) {
+                        if ((event.currentTarget.readyState != 4) ||
+                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
+                                return;
+
+                        f = document.getElementById("filter");
+
+                        var l = event.currentTarget.responseText.split('\n');
+                        var buf = '<option>No filter</option>';
+                        var j = -1;
+
+                        for (i in l) {
+
+                                if (l[i] == '')
+                                      continue;
+
+                                var d = JSON.parse(l[i]);
+                                if (d._SYSTEMD_UNIT == undefined)
+                                      continue;
+
+                                buf += '<option value="' + escape(d._SYSTEMD_UNIT) + '">' + escapeHTML(d._SYSTEMD_UNIT) + '</option>';
+
+                                if (d._SYSTEMD_UNIT == localStorage["filter"])
+                                        j = i;
+                        }
+
+                        if (j < 0) {
+                                if (localStorage["filter"] != null && localStorage["filter"] != "") {
+                                          buf += '<option value="' + escape(localStorage["filter"]) + '">' + escapeHTML(localStorage["filter"]) + '</option>';
+                                          j = i + 1;
+                                } else
+                                          j = 0;
+                        }
+
+                        f.innerHTML = buf;
+                        f.selectedIndex = j;
+                }
+
+                function onFilterFocus(w) {
+                        var request = new XMLHttpRequest();
+                        request.open("GET", "/fields/_SYSTEMD_UNIT");
+                        request.onreadystatechange = onResultFilterFocus;
+                        request.setRequestHeader("Accept", "application/json");
+                        request.send(null);
+                }
+
+                function onFilterChange(w) {
+                        if (w.selectedIndex <= 0)
+                                localStorage["filter"] = "";
+                        else
+                                localStorage["filter"] = unescape(w.options[w.selectedIndex].value);
+
+                        entriesLoadHead();
+                }
+
+                function onBootChange(w) {
+                        localStorage["boot"] = w.checked ? "1" : "0";
+                        entriesLoadHead();
+                }
+
+                function initFilter() {
+                        f = document.getElementById("filter");
+
+                        var buf = '<option>No filter</option>';
+
+                        var filter = localStorage["filter"];
+                        if (filter != null && filter != "") {
+                                buf += '<option value="' + escape(filter) + '">' + escapeHTML(filter) + '</option>';
+                                j = 1;
+                        } else
+                                j = 0;
+
+                        f.innerHTML = buf;
+                        f.selectedIndex = j;
+                }
+
+                function installHandlers() {
+                        document.onkeyup = onKeyUp;
+
+                        logs = document.getElementById("divlogs");
+                        logs.addEventListener("mousewheel", onMouseWheel, false);
+                        logs.addEventListener("DOMMouseScroll", onMouseWheel, false);
+                }
+
+                machineLoad();
+                entriesLoad(null);
+                showNEntries(getNEntries());
+                initFilter();
+                installHandlers();
+        </script>
+</body>
+</html>
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
new file mode 100644 (file)
index 0000000..db81fe3
--- /dev/null
@@ -0,0 +1,1052 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2012 Lennart Poettering
+
+  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/>.
+***/
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <getopt.h>
+
+#include <microhttpd.h>
+
+#ifdef HAVE_GNUTLS
+#include <gnutls/gnutls.h>
+#endif
+
+#include "log.h"
+#include "util.h"
+#include "sd-journal.h"
+#include "sd-daemon.h"
+#include "sd-bus.h"
+#include "bus-util.h"
+#include "logs-show.h"
+#include "microhttpd-util.h"
+#include "build.h"
+#include "fileio.h"
+
+static char *key_pem = NULL;
+static char *cert_pem = NULL;
+static char *trust_pem = NULL;
+
+typedef struct RequestMeta {
+        sd_journal *journal;
+
+        OutputMode mode;
+
+        char *cursor;
+        int64_t n_skip;
+        uint64_t n_entries;
+        bool n_entries_set;
+
+        FILE *tmp;
+        uint64_t delta, size;
+
+        int argument_parse_error;
+
+        bool follow;
+        bool discrete;
+
+        uint64_t n_fields;
+        bool n_fields_set;
+} RequestMeta;
+
+static const char* const mime_types[_OUTPUT_MODE_MAX] = {
+        [OUTPUT_SHORT] = "text/plain",
+        [OUTPUT_JSON] = "application/json",
+        [OUTPUT_JSON_SSE] = "text/event-stream",
+        [OUTPUT_EXPORT] = "application/vnd.fdo.journal",
+};
+
+static RequestMeta *request_meta(void **connection_cls) {
+        RequestMeta *m;
+
+        assert(connection_cls);
+        if (*connection_cls)
+                return *connection_cls;
+
+        m = new0(RequestMeta, 1);
+        if (!m)
+                return NULL;
+
+        *connection_cls = m;
+        return m;
+}
+
+static void request_meta_free(
+                void *cls,
+                struct MHD_Connection *connection,
+                void **connection_cls,
+                enum MHD_RequestTerminationCode toe) {
+
+        RequestMeta *m = *connection_cls;
+
+        if (!m)
+                return;
+
+        if (m->journal)
+                sd_journal_close(m->journal);
+
+        if (m->tmp)
+                fclose(m->tmp);
+
+        free(m->cursor);
+        free(m);
+}
+
+static int open_journal(RequestMeta *m) {
+        assert(m);
+
+        if (m->journal)
+                return 0;
+
+        return sd_journal_open(&m->journal, SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM);
+}
+
+static ssize_t request_reader_entries(
+                void *cls,
+                uint64_t pos,
+                char *buf,
+                size_t max) {
+
+        RequestMeta *m = cls;
+        int r;
+        size_t n, k;
+
+        assert(m);
+        assert(buf);
+        assert(max > 0);
+        assert(pos >= m->delta);
+
+        pos -= m->delta;
+
+        while (pos >= m->size) {
+                off_t sz;
+
+                /* End of this entry, so let's serialize the next
+                 * one */
+
+                if (m->n_entries_set &&
+                    m->n_entries <= 0)
+                        return MHD_CONTENT_READER_END_OF_STREAM;
+
+                if (m->n_skip < 0)
+                        r = sd_journal_previous_skip(m->journal, (uint64_t) -m->n_skip + 1);
+                else if (m->n_skip > 0)
+                        r = sd_journal_next_skip(m->journal, (uint64_t) m->n_skip + 1);
+                else
+                        r = sd_journal_next(m->journal);
+
+                if (r < 0) {
+                        log_error("Failed to advance journal pointer: %s", strerror(-r));
+                        return MHD_CONTENT_READER_END_WITH_ERROR;
+                } else if (r == 0) {
+
+                        if (m->follow) {
+                                r = sd_journal_wait(m->journal, (uint64_t) -1);
+                                if (r < 0) {
+                                        log_error("Couldn't wait for journal event: %s", strerror(-r));
+                                        return MHD_CONTENT_READER_END_WITH_ERROR;
+                                }
+
+                                continue;
+                        }
+
+                        return MHD_CONTENT_READER_END_OF_STREAM;
+                }
+
+                if (m->discrete) {
+                        assert(m->cursor);
+
+                        r = sd_journal_test_cursor(m->journal, m->cursor);
+                        if (r < 0) {
+                                log_error("Failed to test cursor: %s", strerror(-r));
+                                return MHD_CONTENT_READER_END_WITH_ERROR;
+                        }
+
+                        if (r == 0)
+                                return MHD_CONTENT_READER_END_OF_STREAM;
+                }
+
+                pos -= m->size;
+                m->delta += m->size;
+
+                if (m->n_entries_set)
+                        m->n_entries -= 1;
+
+                m->n_skip = 0;
+
+                if (m->tmp)
+                        rewind(m->tmp);
+                else {
+                        m->tmp = tmpfile();
+                        if (!m->tmp) {
+                                log_error("Failed to create temporary file: %m");
+                                return MHD_CONTENT_READER_END_WITH_ERROR;
+                        }
+                }
+
+                r = output_journal(m->tmp, m->journal, m->mode, 0, OUTPUT_FULL_WIDTH, NULL);
+                if (r < 0) {
+                        log_error("Failed to serialize item: %s", strerror(-r));
+                        return MHD_CONTENT_READER_END_WITH_ERROR;
+                }
+
+                sz = ftello(m->tmp);
+                if (sz == (off_t) -1) {
+                        log_error("Failed to retrieve file position: %m");
+                        return MHD_CONTENT_READER_END_WITH_ERROR;
+                }
+
+                m->size = (uint64_t) sz;
+        }
+
+        if (fseeko(m->tmp, pos, SEEK_SET) < 0) {
+                log_error("Failed to seek to position: %m");
+                return MHD_CONTENT_READER_END_WITH_ERROR;
+        }
+
+        n = m->size - pos;
+        if (n > max)
+                n = max;
+
+        errno = 0;
+        k = fread(buf, 1, n, m->tmp);
+        if (k != n) {
+                log_error("Failed to read from file: %s", errno ? strerror(errno) : "Premature EOF");
+                return MHD_CONTENT_READER_END_WITH_ERROR;
+        }
+
+        return (ssize_t) k;
+}
+
+static int request_parse_accept(
+                RequestMeta *m,
+                struct MHD_Connection *connection) {
+
+        const char *header;
+
+        assert(m);
+        assert(connection);
+
+        header = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Accept");
+        if (!header)
+                return 0;
+
+        if (streq(header, mime_types[OUTPUT_JSON]))
+                m->mode = OUTPUT_JSON;
+        else if (streq(header, mime_types[OUTPUT_JSON_SSE]))
+                m->mode = OUTPUT_JSON_SSE;
+        else if (streq(header, mime_types[OUTPUT_EXPORT]))
+                m->mode = OUTPUT_EXPORT;
+        else
+                m->mode = OUTPUT_SHORT;
+
+        return 0;
+}
+
+static int request_parse_range(
+                RequestMeta *m,
+                struct MHD_Connection *connection) {
+
+        const char *range, *colon, *colon2;
+        int r;
+
+        assert(m);
+        assert(connection);
+
+        range = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Range");
+        if (!range)
+                return 0;
+
+        if (!startswith(range, "entries="))
+                return 0;
+
+        range += 8;
+        range += strspn(range, WHITESPACE);
+
+        colon = strchr(range, ':');
+        if (!colon)
+                m->cursor = strdup(range);
+        else {
+                const char *p;
+
+                colon2 = strchr(colon + 1, ':');
+                if (colon2) {
+                        _cleanup_free_ char *t;
+
+                        t = strndup(colon + 1, colon2 - colon - 1);
+                        if (!t)
+                                return -ENOMEM;
+
+                        r = safe_atoi64(t, &m->n_skip);
+                        if (r < 0)
+                                return r;
+                }
+
+                p = (colon2 ? colon2 : colon) + 1;
+                if (*p) {
+                        r = safe_atou64(p, &m->n_entries);
+                        if (r < 0)
+                                return r;
+
+                        if (m->n_entries <= 0)
+                                return -EINVAL;
+
+                        m->n_entries_set = true;
+                }
+
+                m->cursor = strndup(range, colon - range);
+        }
+
+        if (!m->cursor)
+                return -ENOMEM;
+
+        m->cursor[strcspn(m->cursor, WHITESPACE)] = 0;
+        if (isempty(m->cursor)) {
+                free(m->cursor);
+                m->cursor = NULL;
+        }
+
+        return 0;
+}
+
+static int request_parse_arguments_iterator(
+                void *cls,
+                enum MHD_ValueKind kind,
+                const char *key,
+                const char *value) {
+
+        RequestMeta *m = cls;
+        _cleanup_free_ char *p = NULL;
+        int r;
+
+        assert(m);
+
+        if (isempty(key)) {
+                m->argument_parse_error = -EINVAL;
+                return MHD_NO;
+        }
+
+        if (streq(key, "follow")) {
+                if (isempty(value)) {
+                        m->follow = true;
+                        return MHD_YES;
+                }
+
+                r = parse_boolean(value);
+                if (r < 0) {
+                        m->argument_parse_error = r;
+                        return MHD_NO;
+                }
+
+                m->follow = r;
+                return MHD_YES;
+        }
+
+        if (streq(key, "discrete")) {
+                if (isempty(value)) {
+                        m->discrete = true;
+                        return MHD_YES;
+                }
+
+                r = parse_boolean(value);
+                if (r < 0) {
+                        m->argument_parse_error = r;
+                        return MHD_NO;
+                }
+
+                m->discrete = r;
+                return MHD_YES;
+        }
+
+        if (streq(key, "boot")) {
+                if (isempty(value))
+                        r = true;
+                else {
+                        r = parse_boolean(value);
+                        if (r < 0) {
+                                m->argument_parse_error = r;
+                                return MHD_NO;
+                        }
+                }
+
+                if (r) {
+                        char match[9 + 32 + 1] = "_BOOT_ID=";
+                        sd_id128_t bid;
+
+                        r = sd_id128_get_boot(&bid);
+                        if (r < 0) {
+                                log_error("Failed to get boot ID: %s", strerror(-r));
+                                return MHD_NO;
+                        }
+
+                        sd_id128_to_string(bid, match + 9);
+                        r = sd_journal_add_match(m->journal, match, sizeof(match)-1);
+                        if (r < 0) {
+                                m->argument_parse_error = r;
+                                return MHD_NO;
+                        }
+                }
+
+                return MHD_YES;
+        }
+
+        p = strjoin(key, "=", strempty(value), NULL);
+        if (!p) {
+                m->argument_parse_error = log_oom();
+                return MHD_NO;
+        }
+
+        r = sd_journal_add_match(m->journal, p, 0);
+        if (r < 0) {
+                m->argument_parse_error = r;
+                return MHD_NO;
+        }
+
+        return MHD_YES;
+}
+
+static int request_parse_arguments(
+                RequestMeta *m,
+                struct MHD_Connection *connection) {
+
+        assert(m);
+        assert(connection);
+
+        m->argument_parse_error = 0;
+        MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND, request_parse_arguments_iterator, m);
+
+        return m->argument_parse_error;
+}
+
+static int request_handler_entries(
+                struct MHD_Connection *connection,
+                void *connection_cls) {
+
+        struct MHD_Response *response;
+        RequestMeta *m = connection_cls;
+        int r;
+
+        assert(connection);
+        assert(m);
+
+        r = open_journal(m);
+        if (r < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to open journal: %s\n", strerror(-r));
+
+        if (request_parse_accept(m, connection) < 0)
+                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse Accept header.\n");
+
+        if (request_parse_range(m, connection) < 0)
+                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse Range header.\n");
+
+        if (request_parse_arguments(m, connection) < 0)
+                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse URL arguments.\n");
+
+        if (m->discrete) {
+                if (!m->cursor)
+                        return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Discrete seeks require a cursor specification.\n");
+
+                m->n_entries = 1;
+                m->n_entries_set = true;
+        }
+
+        if (m->cursor)
+                r = sd_journal_seek_cursor(m->journal, m->cursor);
+        else if (m->n_skip >= 0)
+                r = sd_journal_seek_head(m->journal);
+        else if (m->n_skip < 0)
+                r = sd_journal_seek_tail(m->journal);
+        if (r < 0)
+                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to seek in journal.\n");
+
+        response = MHD_create_response_from_callback(MHD_SIZE_UNKNOWN, 4*1024, request_reader_entries, m, NULL);
+        if (!response)
+                return respond_oom(connection);
+
+        MHD_add_response_header(response, "Content-Type", mime_types[m->mode]);
+
+        r = MHD_queue_response(connection, MHD_HTTP_OK, response);
+        MHD_destroy_response(response);
+
+        return r;
+}
+
+static int output_field(FILE *f, OutputMode m, const char *d, size_t l) {
+        const char *eq;
+        size_t j;
+
+        eq = memchr(d, '=', l);
+        if (!eq)
+                return -EINVAL;
+
+        j = l - (eq - d + 1);
+
+        if (m == OUTPUT_JSON) {
+                fprintf(f, "{ \"%.*s\" : ", (int) (eq - d), d);
+                json_escape(f, eq+1, j, OUTPUT_FULL_WIDTH);
+                fputs(" }\n", f);
+        } else {
+                fwrite(eq+1, 1, j, f);
+                fputc('\n', f);
+        }
+
+        return 0;
+}
+
+static ssize_t request_reader_fields(
+                void *cls,
+                uint64_t pos,
+                char *buf,
+                size_t max) {
+
+        RequestMeta *m = cls;
+        int r;
+        size_t n, k;
+
+        assert(m);
+        assert(buf);
+        assert(max > 0);
+        assert(pos >= m->delta);
+
+        pos -= m->delta;
+
+        while (pos >= m->size) {
+                off_t sz;
+                const void *d;
+                size_t l;
+
+                /* End of this field, so let's serialize the next
+                 * one */
+
+                if (m->n_fields_set &&
+                    m->n_fields <= 0)
+                        return MHD_CONTENT_READER_END_OF_STREAM;
+
+                r = sd_journal_enumerate_unique(m->journal, &d, &l);
+                if (r < 0) {
+                        log_error("Failed to advance field index: %s", strerror(-r));
+                        return MHD_CONTENT_READER_END_WITH_ERROR;
+                } else if (r == 0)
+                        return MHD_CONTENT_READER_END_OF_STREAM;
+
+                pos -= m->size;
+                m->delta += m->size;
+
+                if (m->n_fields_set)
+                        m->n_fields -= 1;
+
+                if (m->tmp)
+                        rewind(m->tmp);
+                else {
+                        m->tmp = tmpfile();
+                        if (!m->tmp) {
+                                log_error("Failed to create temporary file: %m");
+                                return MHD_CONTENT_READER_END_WITH_ERROR;
+                        }
+                }
+
+                r = output_field(m->tmp, m->mode, d, l);
+                if (r < 0) {
+                        log_error("Failed to serialize item: %s", strerror(-r));
+                        return MHD_CONTENT_READER_END_WITH_ERROR;
+                }
+
+                sz = ftello(m->tmp);
+                if (sz == (off_t) -1) {
+                        log_error("Failed to retrieve file position: %m");
+                        return MHD_CONTENT_READER_END_WITH_ERROR;
+                }
+
+                m->size = (uint64_t) sz;
+        }
+
+        if (fseeko(m->tmp, pos, SEEK_SET) < 0) {
+                log_error("Failed to seek to position: %m");
+                return MHD_CONTENT_READER_END_WITH_ERROR;
+        }
+
+        n = m->size - pos;
+        if (n > max)
+                n = max;
+
+        errno = 0;
+        k = fread(buf, 1, n, m->tmp);
+        if (k != n) {
+                log_error("Failed to read from file: %s", errno ? strerror(errno) : "Premature EOF");
+                return MHD_CONTENT_READER_END_WITH_ERROR;
+        }
+
+        return (ssize_t) k;
+}
+
+static int request_handler_fields(
+                struct MHD_Connection *connection,
+                const char *field,
+                void *connection_cls) {
+
+        struct MHD_Response *response;
+        RequestMeta *m = connection_cls;
+        int r;
+
+        assert(connection);
+        assert(m);
+
+        r = open_journal(m);
+        if (r < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to open journal: %s\n", strerror(-r));
+
+        if (request_parse_accept(m, connection) < 0)
+                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse Accept header.\n");
+
+        r = sd_journal_query_unique(m->journal, field);
+        if (r < 0)
+                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to query unique fields.\n");
+
+        response = MHD_create_response_from_callback(MHD_SIZE_UNKNOWN, 4*1024, request_reader_fields, m, NULL);
+        if (!response)
+                return respond_oom(connection);
+
+        MHD_add_response_header(response, "Content-Type", mime_types[m->mode == OUTPUT_JSON ? OUTPUT_JSON : OUTPUT_SHORT]);
+
+        r = MHD_queue_response(connection, MHD_HTTP_OK, response);
+        MHD_destroy_response(response);
+
+        return r;
+}
+
+static int request_handler_redirect(
+                struct MHD_Connection *connection,
+                const char *target) {
+
+        char *page;
+        struct MHD_Response *response;
+        int ret;
+
+        assert(connection);
+        assert(target);
+
+        if (asprintf(&page, "<html><body>Please continue to the <a href=\"%s\">journal browser</a>.</body></html>", target) < 0)
+                return respond_oom(connection);
+
+        response = MHD_create_response_from_buffer(strlen(page), page, MHD_RESPMEM_MUST_FREE);
+        if (!response) {
+                free(page);
+                return respond_oom(connection);
+        }
+
+        MHD_add_response_header(response, "Content-Type", "text/html");
+        MHD_add_response_header(response, "Location", target);
+
+        ret = MHD_queue_response(connection, MHD_HTTP_MOVED_PERMANENTLY, response);
+        MHD_destroy_response(response);
+
+        return ret;
+}
+
+static int request_handler_file(
+                struct MHD_Connection *connection,
+                const char *path,
+                const char *mime_type) {
+
+        struct MHD_Response *response;
+        int ret;
+        _cleanup_close_ int fd = -1;
+        struct stat st;
+
+        assert(connection);
+        assert(path);
+        assert(mime_type);
+
+        fd = open(path, O_RDONLY|O_CLOEXEC);
+        if (fd < 0)
+                return mhd_respondf(connection, MHD_HTTP_NOT_FOUND, "Failed to open file %s: %m\n", path);
+
+        if (fstat(fd, &st) < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to stat file: %m\n");
+
+        response = MHD_create_response_from_fd_at_offset(st.st_size, fd, 0);
+        if (!response)
+                return respond_oom(connection);
+
+        fd = -1;
+
+        MHD_add_response_header(response, "Content-Type", mime_type);
+
+        ret = MHD_queue_response(connection, MHD_HTTP_OK, response);
+        MHD_destroy_response(response);
+
+        return ret;
+}
+
+static int get_virtualization(char **v) {
+        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        char *b = NULL;
+        int r;
+
+        r = sd_bus_default_system(&bus);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_get_property_string(
+                        bus,
+                        "org.freedesktop.systemd1",
+                        "/org/freedesktop/systemd1",
+                        "org.freedesktop.systemd1.Manager",
+                        "Virtualization",
+                        NULL,
+                        &b);
+        if (r < 0)
+                return r;
+
+        if (isempty(b)) {
+                free(b);
+                *v = NULL;
+                return 0;
+        }
+
+        *v = b;
+        return 1;
+}
+
+static int request_handler_machine(
+                struct MHD_Connection *connection,
+                void *connection_cls) {
+
+        struct MHD_Response *response;
+        RequestMeta *m = connection_cls;
+        int r;
+        _cleanup_free_ char* hostname = NULL, *os_name = NULL;
+        uint64_t cutoff_from = 0, cutoff_to = 0, usage;
+        char *json;
+        sd_id128_t mid, bid;
+        _cleanup_free_ char *v = NULL;
+
+        assert(connection);
+        assert(m);
+
+        r = open_journal(m);
+        if (r < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to open journal: %s\n", strerror(-r));
+
+        r = sd_id128_get_machine(&mid);
+        if (r < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine machine ID: %s\n", strerror(-r));
+
+        r = sd_id128_get_boot(&bid);
+        if (r < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine boot ID: %s\n", strerror(-r));
+
+        hostname = gethostname_malloc();
+        if (!hostname)
+                return respond_oom(connection);
+
+        r = sd_journal_get_usage(m->journal, &usage);
+        if (r < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine disk usage: %s\n", strerror(-r));
+
+        r = sd_journal_get_cutoff_realtime_usec(m->journal, &cutoff_from, &cutoff_to);
+        if (r < 0)
+                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine disk usage: %s\n", strerror(-r));
+
+        if (parse_env_file("/etc/os-release", NEWLINE, "PRETTY_NAME", &os_name, NULL) == -ENOENT)
+                parse_env_file("/usr/lib/os-release", NEWLINE, "PRETTY_NAME", &os_name, NULL);
+
+        get_virtualization(&v);
+
+        r = asprintf(&json,
+                     "{ \"machine_id\" : \"" SD_ID128_FORMAT_STR "\","
+                     "\"boot_id\" : \"" SD_ID128_FORMAT_STR "\","
+                     "\"hostname\" : \"%s\","
+                     "\"os_pretty_name\" : \"%s\","
+                     "\"virtualization\" : \"%s\","
+                     "\"usage\" : \"%"PRIu64"\","
+                     "\"cutoff_from_realtime\" : \"%"PRIu64"\","
+                     "\"cutoff_to_realtime\" : \"%"PRIu64"\" }\n",
+                     SD_ID128_FORMAT_VAL(mid),
+                     SD_ID128_FORMAT_VAL(bid),
+                     hostname_cleanup(hostname, false),
+                     os_name ? os_name : "Linux",
+                     v ? v : "bare",
+                     usage,
+                     cutoff_from,
+                     cutoff_to);
+
+        if (r < 0)
+                return respond_oom(connection);
+
+        response = MHD_create_response_from_buffer(strlen(json), json, MHD_RESPMEM_MUST_FREE);
+        if (!response) {
+                free(json);
+                return respond_oom(connection);
+        }
+
+        MHD_add_response_header(response, "Content-Type", "application/json");
+        r = MHD_queue_response(connection, MHD_HTTP_OK, response);
+        MHD_destroy_response(response);
+
+        return r;
+}
+
+static int request_handler(
+                void *cls,
+                struct MHD_Connection *connection,
+                const char *url,
+                const char *method,
+                const char *version,
+                const char *upload_data,
+                size_t *upload_data_size,
+                void **connection_cls) {
+        int r, code;
+
+        assert(connection);
+        assert(connection_cls);
+        assert(url);
+        assert(method);
+
+        if (!streq(method, "GET"))
+                return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
+                                   "Unsupported method.\n");
+
+
+        if (!*connection_cls) {
+                if (!request_meta(connection_cls))
+                        return respond_oom(connection);
+                return MHD_YES;
+        }
+
+        if (trust_pem) {
+                r = check_permissions(connection, &code, NULL);
+                if (r < 0)
+                        return code;
+        }
+
+        if (streq(url, "/"))
+                return request_handler_redirect(connection, "/browse");
+
+        if (streq(url, "/entries"))
+                return request_handler_entries(connection, *connection_cls);
+
+        if (startswith(url, "/fields/"))
+                return request_handler_fields(connection, url + 8, *connection_cls);
+
+        if (streq(url, "/browse"))
+                return request_handler_file(connection, DOCUMENT_ROOT "/browse.html", "text/html");
+
+        if (streq(url, "/machine"))
+                return request_handler_machine(connection, *connection_cls);
+
+        return mhd_respond(connection, MHD_HTTP_NOT_FOUND, "Not found.\n");
+}
+
+static void help(void) {
+        printf("%s [OPTIONS...] ...\n\n"
+               "HTTP server for journal events.\n\n"
+               "  -h --help           Show this help\n"
+               "     --version        Show package version\n"
+               "     --cert=CERT.PEM  Server certificate in PEM format\n"
+               "     --key=KEY.PEM    Server key in PEM format\n"
+               "     --trust=CERT.PEM Certificat authority certificate in PEM format\n",
+               program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_KEY,
+                ARG_CERT,
+                ARG_TRUST,
+        };
+
+        int r, c;
+
+        static const struct option options[] = {
+                { "help",    no_argument,       NULL, 'h'         },
+                { "version", no_argument,       NULL, ARG_VERSION },
+                { "key",     required_argument, NULL, ARG_KEY     },
+                { "cert",    required_argument, NULL, ARG_CERT    },
+                { "trust",   required_argument, NULL, ARG_TRUST   },
+                {}
+        };
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
+
+                switch(c) {
+
+                case 'h':
+                        help();
+                        return 0;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0;
+
+                case ARG_KEY:
+                        if (key_pem) {
+                                log_error("Key file specified twice");
+                                return -EINVAL;
+                        }
+                        r = read_full_file(optarg, &key_pem, NULL);
+                        if (r < 0) {
+                                log_error("Failed to read key file: %s", strerror(-r));
+                                return r;
+                        }
+                        assert(key_pem);
+                        break;
+
+                case ARG_CERT:
+                        if (cert_pem) {
+                                log_error("Certificate file specified twice");
+                                return -EINVAL;
+                        }
+                        r = read_full_file(optarg, &cert_pem, NULL);
+                        if (r < 0) {
+                                log_error("Failed to read certificate file: %s", strerror(-r));
+                                return r;
+                        }
+                        assert(cert_pem);
+                        break;
+
+                case ARG_TRUST:
+#ifdef HAVE_GNUTLS
+                        if (trust_pem) {
+                                log_error("CA certificate file specified twice");
+                                return -EINVAL;
+                        }
+                        r = read_full_file(optarg, &trust_pem, NULL);
+                        if (r < 0) {
+                                log_error("Failed to read CA certificate file: %s", strerror(-r));
+                                return r;
+                        }
+                        assert(trust_pem);
+                        break;
+#else
+                        log_error("Option --trust is not available.");
+#endif
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option");
+                }
+
+        if (optind < argc) {
+                log_error("This program does not take arguments.");
+                return -EINVAL;
+        }
+
+        if (!!key_pem != !!cert_pem) {
+                log_error("Certificate and key files must be specified together");
+                return -EINVAL;
+        }
+
+        if (trust_pem && !key_pem) {
+                log_error("CA certificate can only be used with certificate file");
+                return -EINVAL;
+        }
+
+        return 1;
+}
+
+int main(int argc, char *argv[]) {
+        struct MHD_Daemon *d = NULL;
+        int r, n;
+
+        log_set_target(LOG_TARGET_AUTO);
+        log_parse_environment();
+        log_open();
+
+        r = parse_argv(argc, argv);
+        if (r < 0)
+                return EXIT_FAILURE;
+        if (r == 0)
+                return EXIT_SUCCESS;
+
+#ifdef HAVE_GNUTLS
+        gnutls_global_set_log_function(log_func_gnutls);
+        log_reset_gnutls_level();
+#endif
+
+        n = sd_listen_fds(1);
+        if (n < 0) {
+                log_error("Failed to determine passed sockets: %s", strerror(-n));
+                goto finish;
+        } else if (n > 1) {
+                log_error("Can't listen on more than one socket.");
+                goto finish;
+        } else {
+                struct MHD_OptionItem opts[] = {
+                        { MHD_OPTION_NOTIFY_COMPLETED,
+                          (intptr_t) request_meta_free, NULL },
+                        { MHD_OPTION_EXTERNAL_LOGGER,
+                          (intptr_t) microhttpd_logger, NULL },
+                        { MHD_OPTION_END, 0, NULL },
+                        { MHD_OPTION_END, 0, NULL },
+                        { MHD_OPTION_END, 0, NULL },
+                        { MHD_OPTION_END, 0, NULL },
+                        { MHD_OPTION_END, 0, NULL }};
+                int opts_pos = 2;
+                int flags = MHD_USE_THREAD_PER_CONNECTION|MHD_USE_POLL|MHD_USE_DEBUG;
+
+                if (n > 0)
+                        opts[opts_pos++] = (struct MHD_OptionItem)
+                                {MHD_OPTION_LISTEN_SOCKET, SD_LISTEN_FDS_START};
+                if (key_pem) {
+                        assert(cert_pem);
+                        opts[opts_pos++] = (struct MHD_OptionItem)
+                                {MHD_OPTION_HTTPS_MEM_KEY, 0, key_pem};
+                        opts[opts_pos++] = (struct MHD_OptionItem)
+                                {MHD_OPTION_HTTPS_MEM_CERT, 0, cert_pem};
+                        flags |= MHD_USE_SSL;
+                }
+                if (trust_pem) {
+                        assert(flags & MHD_USE_SSL);
+                        opts[opts_pos++] = (struct MHD_OptionItem)
+                                {MHD_OPTION_HTTPS_MEM_TRUST, 0, trust_pem};
+                }
+
+                d = MHD_start_daemon(flags, 19531,
+                                     NULL, NULL,
+                                     request_handler, NULL,
+                                     MHD_OPTION_ARRAY, opts,
+                                     MHD_OPTION_END);
+        }
+
+        if (!d) {
+                log_error("Failed to start daemon!");
+                goto finish;
+        }
+
+        pause();
+
+        r = EXIT_SUCCESS;
+
+finish:
+        if (d)
+                MHD_stop_daemon(d);
+
+        return r;
+}
diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
new file mode 100644 (file)
index 0000000..7dd8878
--- /dev/null
@@ -0,0 +1,493 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include "journal-remote-parse.h"
+#include "journald-native.h"
+
+#define LINE_CHUNK 8*1024u
+
+void source_free(RemoteSource *source) {
+        if (!source)
+                return;
+
+        if (source->fd >= 0 && !source->passive_fd) {
+                log_debug("Closing fd:%d (%s)", source->fd, source->name);
+                safe_close(source->fd);
+        }
+
+        free(source->name);
+        free(source->buf);
+        iovw_free_contents(&source->iovw);
+
+        log_debug("Writer ref count %u", source->writer->n_ref);
+        writer_unref(source->writer);
+
+        sd_event_source_unref(source->event);
+
+        free(source);
+}
+
+/**
+ * Initialize zero-filled source with given values. On success, takes
+ * ownerhship of fd and writer, otherwise does not touch them.
+ */
+RemoteSource* source_new(int fd, bool passive_fd, char *name, Writer *writer) {
+
+        RemoteSource *source;
+
+        log_debug("Creating source for %sfd:%d (%s)",
+                  passive_fd ? "passive " : "", fd, name);
+
+        assert(fd >= 0);
+
+        source = new0(RemoteSource, 1);
+        if (!source)
+                return NULL;
+
+        source->fd = fd;
+        source->passive_fd = passive_fd;
+        source->name = name;
+        source->writer = writer;
+
+        return source;
+}
+
+static char* realloc_buffer(RemoteSource *source, size_t size) {
+        char *b, *old = source->buf;
+
+        b = GREEDY_REALLOC(source->buf, source->size, size);
+        if (!b)
+                return NULL;
+
+        iovw_rebase(&source->iovw, old, source->buf);
+
+        return b;
+}
+
+static int get_line(RemoteSource *source, char **line, size_t *size) {
+        ssize_t n;
+        char *c = NULL;
+
+        assert(source);
+        assert(source->state == STATE_LINE);
+        assert(source->offset <= source->filled);
+        assert(source->filled <= source->size);
+        assert(source->buf == NULL || source->size > 0);
+        assert(source->fd >= 0);
+
+        while (true) {
+                if (source->buf) {
+                        size_t start = MAX(source->scanned, source->offset);
+
+                        c = memchr(source->buf + start, '\n',
+                                   source->filled - start);
+                        if (c != NULL)
+                                break;
+                }
+
+                source->scanned = source->filled;
+                if (source->scanned >= DATA_SIZE_MAX) {
+                        log_error("Entry is bigger than %u bytes.", DATA_SIZE_MAX);
+                        return -E2BIG;
+                }
+
+                if (source->passive_fd)
+                        /* we have to wait for some data to come to us */
+                        return -EWOULDBLOCK;
+
+                if (source->size - source->filled < LINE_CHUNK &&
+                    !realloc_buffer(source,
+                                    MIN(source->filled + LINE_CHUNK, ENTRY_SIZE_MAX)))
+                                return log_oom();
+
+                assert(source->size - source->filled >= LINE_CHUNK ||
+                       source->size == ENTRY_SIZE_MAX);
+
+                n = read(source->fd, source->buf + source->filled,
+                         source->size - source->filled);
+                if (n < 0) {
+                        if (errno != EAGAIN && errno != EWOULDBLOCK)
+                                log_error("read(%d, ..., %zd): %m", source->fd,
+                                          source->size - source->filled);
+                        return -errno;
+                } else if (n == 0)
+                        return 0;
+
+                source->filled += n;
+        }
+
+        *line = source->buf + source->offset;
+        *size = c + 1 - source->buf - source->offset;
+        source->offset += *size;
+
+        return 1;
+}
+
+int push_data(RemoteSource *source, const char *data, size_t size) {
+        assert(source);
+        assert(source->state != STATE_EOF);
+
+        if (!realloc_buffer(source, source->filled + size)) {
+                log_error("Failed to store received data of size %zu "
+                          "(in addition to existing %zu bytes with %zu filled): %s",
+                          size, source->size, source->filled, strerror(ENOMEM));
+                return -ENOMEM;
+        }
+
+        memcpy(source->buf + source->filled, data, size);
+        source->filled += size;
+
+        return 0;
+}
+
+static int fill_fixed_size(RemoteSource *source, void **data, size_t size) {
+
+        assert(source);
+        assert(source->state == STATE_DATA_START ||
+               source->state == STATE_DATA ||
+               source->state == STATE_DATA_FINISH);
+        assert(size <= DATA_SIZE_MAX);
+        assert(source->offset <= source->filled);
+        assert(source->filled <= source->size);
+        assert(source->buf != NULL || source->size == 0);
+        assert(source->buf == NULL || source->size > 0);
+        assert(source->fd >= 0);
+        assert(data);
+
+        while (source->filled - source->offset < size) {
+                int n;
+
+                if (source->passive_fd)
+                        /* we have to wait for some data to come to us */
+                        return -EWOULDBLOCK;
+
+                if (!realloc_buffer(source, source->offset + size))
+                        return log_oom();
+
+                n = read(source->fd, source->buf + source->filled,
+                         source->size - source->filled);
+                if (n < 0) {
+                        if (errno != EAGAIN && errno != EWOULDBLOCK)
+                                log_error("read(%d, ..., %zd): %m", source->fd,
+                                          source->size - source->filled);
+                        return -errno;
+                } else if (n == 0)
+                        return 0;
+
+                source->filled += n;
+        }
+
+        *data = source->buf + source->offset;
+        source->offset += size;
+
+        return 1;
+}
+
+static int get_data_size(RemoteSource *source) {
+        int r;
+        void *data;
+
+        assert(source);
+        assert(source->state == STATE_DATA_START);
+        assert(source->data_size == 0);
+
+        r = fill_fixed_size(source, &data, sizeof(uint64_t));
+        if (r <= 0)
+                return r;
+
+        source->data_size = le64toh( *(uint64_t *) data );
+        if (source->data_size > DATA_SIZE_MAX) {
+                log_error("Stream declares field with size %zu > DATA_SIZE_MAX = %u",
+                          source->data_size, DATA_SIZE_MAX);
+                return -EINVAL;
+        }
+        if (source->data_size == 0)
+                log_warning("Binary field with zero length");
+
+        return 1;
+}
+
+static int get_data_data(RemoteSource *source, void **data) {
+        int r;
+
+        assert(source);
+        assert(data);
+        assert(source->state == STATE_DATA);
+
+        r = fill_fixed_size(source, data, source->data_size);
+        if (r <= 0)
+                return r;
+
+        return 1;
+}
+
+static int get_data_newline(RemoteSource *source) {
+        int r;
+        char *data;
+
+        assert(source);
+        assert(source->state == STATE_DATA_FINISH);
+
+        r = fill_fixed_size(source, (void**) &data, 1);
+        if (r <= 0)
+                return r;
+
+        assert(data);
+        if (*data != '\n') {
+                log_error("expected newline, got '%c'", *data);
+                return -EINVAL;
+        }
+
+        return 1;
+}
+
+static int process_dunder(RemoteSource *source, char *line, size_t n) {
+        const char *timestamp;
+        int r;
+
+        assert(line);
+        assert(n > 0);
+        assert(line[n-1] == '\n');
+
+        /* XXX: is it worth to support timestamps in extended format?
+         * We don't produce them, but who knows... */
+
+        timestamp = startswith(line, "__CURSOR=");
+        if (timestamp)
+                /* ignore __CURSOR */
+                return 1;
+
+        timestamp = startswith(line, "__REALTIME_TIMESTAMP=");
+        if (timestamp) {
+                long long unsigned x;
+                line[n-1] = '\0';
+                r = safe_atollu(timestamp, &x);
+                if (r < 0)
+                        log_warning("Failed to parse __REALTIME_TIMESTAMP: '%s'", timestamp);
+                else
+                        source->ts.realtime = x;
+                return r < 0 ? r : 1;
+        }
+
+        timestamp = startswith(line, "__MONOTONIC_TIMESTAMP=");
+        if (timestamp) {
+                long long unsigned x;
+                line[n-1] = '\0';
+                r = safe_atollu(timestamp, &x);
+                if (r < 0)
+                        log_warning("Failed to parse __MONOTONIC_TIMESTAMP: '%s'", timestamp);
+                else
+                        source->ts.monotonic = x;
+                return r < 0 ? r : 1;
+        }
+
+        timestamp = startswith(line, "__");
+        if (timestamp) {
+                log_notice("Unknown dunder line %s", line);
+                return 1;
+        }
+
+        /* no dunder */
+        return 0;
+}
+
+int process_data(RemoteSource *source) {
+        int r;
+
+        switch(source->state) {
+        case STATE_LINE: {
+                char *line, *sep;
+                size_t n;
+
+                assert(source->data_size == 0);
+
+                r = get_line(source, &line, &n);
+                if (r < 0)
+                        return r;
+                if (r == 0) {
+                        source->state = STATE_EOF;
+                        return r;
+                }
+                assert(n > 0);
+                assert(line[n-1] == '\n');
+
+                if (n == 1) {
+                        log_trace("Received empty line, event is ready");
+                        return 1;
+                }
+
+                r = process_dunder(source, line, n);
+                if (r != 0)
+                        return r < 0 ? r : 0;
+
+                /* MESSAGE=xxx\n
+                   or
+                   COREDUMP\n
+                   LLLLLLLL0011223344...\n
+                */
+                sep = memchr(line, '=', n);
+                if (sep)
+                        /* chomp newline */
+                        n--;
+                else
+                        /* replace \n with = */
+                        line[n-1] = '=';
+                log_trace("Received: %.*s", (int) n, line);
+
+                r = iovw_put(&source->iovw, line, n);
+                if (r < 0) {
+                        log_error("Failed to put line in iovect");
+                        return r;
+                }
+
+                if (!sep)
+                        source->state = STATE_DATA_START;
+                return 0; /* continue */
+        }
+
+        case STATE_DATA_START:
+                assert(source->data_size == 0);
+
+                r = get_data_size(source);
+                // log_debug("get_data_size() -> %d", r);
+                if (r < 0)
+                        return r;
+                if (r == 0) {
+                        source->state = STATE_EOF;
+                        return 0;
+                }
+
+                source->state = source->data_size > 0 ?
+                        STATE_DATA : STATE_DATA_FINISH;
+
+                return 0; /* continue */
+
+        case STATE_DATA: {
+                void *data;
+
+                assert(source->data_size > 0);
+
+                r = get_data_data(source, &data);
+                // log_debug("get_data_data() -> %d", r);
+                if (r < 0)
+                        return r;
+                if (r == 0) {
+                        source->state = STATE_EOF;
+                        return 0;
+                }
+
+                assert(data);
+
+                r = iovw_put(&source->iovw, data, source->data_size);
+                if (r < 0) {
+                        log_error("failed to put binary buffer in iovect");
+                        return r;
+                }
+
+                source->state = STATE_DATA_FINISH;
+
+                return 0; /* continue */
+        }
+
+        case STATE_DATA_FINISH:
+                r = get_data_newline(source);
+                // log_debug("get_data_newline() -> %d", r);
+                if (r < 0)
+                        return r;
+                if (r == 0) {
+                        source->state = STATE_EOF;
+                        return 0;
+                }
+
+                source->data_size = 0;
+                source->state = STATE_LINE;
+
+                return 0; /* continue */
+        default:
+                assert_not_reached("wtf?");
+        }
+}
+
+int process_source(RemoteSource *source, bool compress, bool seal) {
+        size_t remain, target;
+        int r;
+
+        assert(source);
+        assert(source->writer);
+
+        r = process_data(source);
+        if (r <= 0)
+                return r;
+
+        /* We have a full event */
+        log_trace("Received a full event from source@%p fd:%d (%s)",
+                  source, source->fd, source->name);
+
+        if (!source->iovw.count) {
+                log_warning("Entry with no payload, skipping");
+                goto freeing;
+        }
+
+        assert(source->iovw.iovec);
+        assert(source->iovw.count);
+
+        r = writer_write(source->writer, &source->iovw, &source->ts, compress, seal);
+        if (r < 0)
+                log_error("Failed to write entry of %zu bytes: %s",
+                          iovw_size(&source->iovw), strerror(-r));
+        else
+                r = 1;
+
+ freeing:
+        iovw_free_contents(&source->iovw);
+
+        /* possibly reset buffer position */
+        remain = source->filled - source->offset;
+
+        if (remain == 0) /* no brainer */
+                source->offset = source->scanned = source->filled = 0;
+        else if (source->offset > source->size - source->filled &&
+                 source->offset > remain) {
+                memcpy(source->buf, source->buf + source->offset, remain);
+                source->offset = source->scanned = 0;
+                source->filled = remain;
+        }
+
+        target = source->size;
+        while (target > 16 * LINE_CHUNK && remain < target / 2)
+                target /= 2;
+        if (target < source->size) {
+                char *tmp;
+
+                tmp = realloc(source->buf, target);
+                if (!tmp)
+                        log_warning("Failed to reallocate buffer to (smaller) size %zu",
+                                    target);
+                else {
+                        log_debug("Reallocated buffer from %zu to %zu bytes",
+                                  source->size, target);
+                        source->buf = tmp;
+                        source->size = target;
+                }
+        }
+
+        return r;
+}
diff --git a/src/journal-remote/journal-remote-parse.h b/src/journal-remote/journal-remote-parse.h
new file mode 100644 (file)
index 0000000..8499f4e
--- /dev/null
@@ -0,0 +1,68 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#pragma once
+
+#include "sd-event.h"
+#include "journal-remote-write.h"
+
+typedef enum {
+        STATE_LINE = 0,    /* waiting to read, or reading line */
+        STATE_DATA_START,  /* reading binary data header */
+        STATE_DATA,        /* reading binary data */
+        STATE_DATA_FINISH, /* expecting newline */
+        STATE_EOF,         /* done */
+} source_state;
+
+typedef struct RemoteSource {
+        char *name;
+        int fd;
+        bool passive_fd;
+
+        char *buf;
+        size_t size;       /* total size of the buffer */
+        size_t offset;     /* offset to the beginning of live data in the buffer */
+        size_t scanned;    /* number of bytes since the beginning of data without a newline */
+        size_t filled;     /* total number of bytes in the buffer */
+        size_t data_size;  /* size of the binary data chunk being processed */
+
+        struct iovec_wrapper iovw;
+
+        source_state state;
+        dual_timestamp ts;
+
+        Writer *writer;
+
+        sd_event_source *event;
+} RemoteSource;
+
+RemoteSource* source_new(int fd, bool passive_fd, char *name, Writer *writer);
+
+static inline size_t source_non_empty(RemoteSource *source) {
+        assert(source);
+
+        return source->filled;
+}
+
+void source_free(RemoteSource *source);
+int process_data(RemoteSource *source);
+int push_data(RemoteSource *source, const char *data, size_t size);
+int process_source(RemoteSource *source, bool compress, bool seal);
diff --git a/src/journal-remote/journal-remote-write.c b/src/journal-remote/journal-remote-write.c
new file mode 100644 (file)
index 0000000..0139f85
--- /dev/null
@@ -0,0 +1,172 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2012 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include "journal-remote.h"
+
+int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len) {
+        if (!GREEDY_REALLOC(iovw->iovec, iovw->size_bytes, iovw->count + 1))
+                return log_oom();
+
+        iovw->iovec[iovw->count++] = (struct iovec) {data, len};
+        return 0;
+}
+
+void iovw_free_contents(struct iovec_wrapper *iovw) {
+        free(iovw->iovec);
+        iovw->iovec = NULL;
+        iovw->size_bytes = iovw->count = 0;
+}
+
+size_t iovw_size(struct iovec_wrapper *iovw) {
+        size_t n = 0, i;
+
+        for (i = 0; i < iovw->count; i++)
+                n += iovw->iovec[i].iov_len;
+
+        return n;
+}
+
+void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new) {
+        size_t i;
+
+        for (i = 0; i < iovw->count; i++)
+                iovw->iovec[i].iov_base = (char*) iovw->iovec[i].iov_base - old + new;
+}
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+static int do_rotate(JournalFile **f, bool compress, bool seal) {
+        int r = journal_file_rotate(f, compress, seal);
+        if (r < 0) {
+                if (*f)
+                        log_error("Failed to rotate %s: %s", (*f)->path,
+                                  strerror(-r));
+                else
+                        log_error("Failed to create rotated journal: %s",
+                                  strerror(-r));
+        }
+
+        return r;
+}
+
+Writer* writer_new(RemoteServer *server) {
+        Writer *w;
+
+        w = new0(Writer, 1);
+        if (!w)
+                return NULL;
+
+        memset(&w->metrics, 0xFF, sizeof(w->metrics));
+
+        w->mmap = mmap_cache_new();
+        if (!w->mmap) {
+                free(w);
+                return NULL;
+        }
+
+        w->n_ref = 1;
+        w->server = server;
+
+        return w;
+}
+
+Writer* writer_free(Writer *w) {
+        if (!w)
+                return NULL;
+
+        if (w->journal) {
+                log_debug("Closing journal file %s.", w->journal->path);
+                journal_file_close(w->journal);
+        }
+
+        if (w->server && w->hashmap_key)
+                hashmap_remove(w->server->writers, w->hashmap_key);
+
+        free(w->hashmap_key);
+
+        if (w->mmap)
+                mmap_cache_unref(w->mmap);
+
+        free(w);
+
+        return NULL;
+}
+
+Writer* writer_unref(Writer *w) {
+        if (w && (-- w->n_ref <= 0))
+                writer_free(w);
+
+        return NULL;
+}
+
+Writer* writer_ref(Writer *w) {
+        if (w)
+                assert_se(++ w->n_ref >= 2);
+
+        return w;
+}
+
+int writer_write(Writer *w,
+                 struct iovec_wrapper *iovw,
+                 dual_timestamp *ts,
+                 bool compress,
+                 bool seal) {
+        int r;
+
+        assert(w);
+        assert(iovw);
+        assert(iovw->count > 0);
+
+        if (journal_file_rotate_suggested(w->journal, 0)) {
+                log_info("%s: Journal header limits reached or header out-of-date, rotating",
+                         w->journal->path);
+                r = do_rotate(&w->journal, compress, seal);
+                if (r < 0)
+                        return r;
+        }
+
+        r = journal_file_append_entry(w->journal, ts, iovw->iovec, iovw->count,
+                                      &w->seqnum, NULL, NULL);
+        if (r >= 0) {
+                if (w->server)
+                        w->server->event_count += 1;
+                return 1;
+        }
+
+        log_debug("%s: Write failed, rotating: %s", w->journal->path, strerror(-r));
+        r = do_rotate(&w->journal, compress, seal);
+        if (r < 0)
+                return r;
+        else
+                log_info("%s: Successfully rotated journal", w->journal->path);
+
+        log_debug("Retrying write.");
+        r = journal_file_append_entry(w->journal, ts, iovw->iovec, iovw->count,
+                                      &w->seqnum, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        if (w->server)
+                w->server->event_count += 1;
+        return 1;
+}
diff --git a/src/journal-remote/journal-remote-write.h b/src/journal-remote/journal-remote-write.h
new file mode 100644 (file)
index 0000000..aa381c6
--- /dev/null
@@ -0,0 +1,74 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#pragma once
+
+#include <stdlib.h>
+
+#include "journal-file.h"
+
+typedef struct RemoteServer RemoteServer;
+
+struct iovec_wrapper {
+        struct iovec *iovec;
+        size_t size_bytes;
+        size_t count;
+};
+
+int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len);
+void iovw_free_contents(struct iovec_wrapper *iovw);
+size_t iovw_size(struct iovec_wrapper *iovw);
+void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new);
+
+typedef struct Writer {
+        JournalFile *journal;
+        JournalMetrics metrics;
+
+        MMapCache *mmap;
+        RemoteServer *server;
+        char *hashmap_key;
+
+        uint64_t seqnum;
+
+        int n_ref;
+} Writer;
+
+Writer* writer_new(RemoteServer* server);
+Writer* writer_free(Writer *w);
+
+Writer* writer_ref(Writer *w);
+Writer* writer_unref(Writer *w);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Writer*, writer_unref);
+#define _cleanup_writer_unref_ _cleanup_(writer_unrefp)
+
+int writer_write(Writer *s,
+                 struct iovec_wrapper *iovw,
+                 dual_timestamp *ts,
+                 bool compress,
+                 bool seal);
+
+typedef enum JournalWriteSplitMode {
+        JOURNAL_WRITE_SPLIT_NONE,
+        JOURNAL_WRITE_SPLIT_HOST,
+        _JOURNAL_WRITE_SPLIT_MAX,
+        _JOURNAL_WRITE_SPLIT_INVALID = -1
+} JournalWriteSplitMode;
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
new file mode 100644 (file)
index 0000000..dc7120b
--- /dev/null
@@ -0,0 +1,1589 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2012 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/prctl.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <getopt.h>
+
+#include "sd-daemon.h"
+#include "journal-file.h"
+#include "journald-native.h"
+#include "socket-util.h"
+#include "mkdir.h"
+#include "build.h"
+#include "macro.h"
+#include "strv.h"
+#include "fileio.h"
+#include "conf-parser.h"
+#include "siphash24.h"
+
+#ifdef HAVE_GNUTLS
+#include <gnutls/gnutls.h>
+#endif
+
+#include "journal-remote.h"
+#include "journal-remote-write.h"
+
+#define REMOTE_JOURNAL_PATH "/var/log/journal/remote"
+
+#define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
+#define CERT_FILE     CERTIFICATE_ROOT "/certs/journal-remote.pem"
+#define TRUST_FILE    CERTIFICATE_ROOT "/ca/trusted.pem"
+
+static char* arg_url = NULL;
+static char* arg_getter = NULL;
+static char* arg_listen_raw = NULL;
+static char* arg_listen_http = NULL;
+static char* arg_listen_https = NULL;
+static char** arg_files = NULL;
+static int arg_compress = true;
+static int arg_seal = false;
+static int http_socket = -1, https_socket = -1;
+static char** arg_gnutls_log = NULL;
+
+static JournalWriteSplitMode arg_split_mode = JOURNAL_WRITE_SPLIT_HOST;
+static char* arg_output = NULL;
+
+static char *arg_key = NULL;
+static char *arg_cert = NULL;
+static char *arg_trust = NULL;
+static bool arg_trust_all = false;
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+static int spawn_child(const char* child, char** argv) {
+        int fd[2];
+        pid_t parent_pid, child_pid;
+        int r;
+
+        if (pipe(fd) < 0) {
+                log_error("Failed to create pager pipe: %m");
+                return -errno;
+        }
+
+        parent_pid = getpid();
+
+        child_pid = fork();
+        if (child_pid < 0) {
+                r = -errno;
+                log_error("Failed to fork: %m");
+                safe_close_pair(fd);
+                return r;
+        }
+
+        /* In the child */
+        if (child_pid == 0) {
+                r = dup2(fd[1], STDOUT_FILENO);
+                if (r < 0) {
+                        log_error("Failed to dup pipe to stdout: %m");
+                        _exit(EXIT_FAILURE);
+                }
+
+                safe_close_pair(fd);
+
+                /* Make sure the child goes away when the parent dies */
+                if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)
+                        _exit(EXIT_FAILURE);
+
+                /* Check whether our parent died before we were able
+                 * to set the death signal */
+                if (getppid() != parent_pid)
+                        _exit(EXIT_SUCCESS);
+
+                execvp(child, argv);
+                log_error("Failed to exec child %s: %m", child);
+                _exit(EXIT_FAILURE);
+        }
+
+        r = close(fd[1]);
+        if (r < 0)
+                log_warning("Failed to close write end of pipe: %m");
+
+        return fd[0];
+}
+
+static int spawn_curl(const char* url) {
+        char **argv = STRV_MAKE("curl",
+                                "-HAccept: application/vnd.fdo.journal",
+                                "--silent",
+                                "--show-error",
+                                url);
+        int r;
+
+        r = spawn_child("curl", argv);
+        if (r < 0)
+                log_error("Failed to spawn curl: %m");
+        return r;
+}
+
+static int spawn_getter(const char *getter, const char *url) {
+        int r;
+        _cleanup_strv_free_ char **words = NULL;
+
+        assert(getter);
+        r = strv_split_quoted(&words, getter);
+        if (r < 0) {
+                log_error("Failed to split getter option: %s", strerror(-r));
+                return r;
+        }
+
+        r = strv_extend(&words, url);
+        if (r < 0) {
+                log_error("Failed to create command line: %s", strerror(-r));
+                return r;
+        }
+
+        r = spawn_child(words[0], words);
+        if (r < 0)
+                log_error("Failed to spawn getter %s: %m", getter);
+
+        return r;
+}
+
+#define filename_escape(s) xescape((s), "/ ")
+
+static int open_output(Writer *w, const char* host) {
+        _cleanup_free_ char *_output = NULL;
+        const char *output;
+        int r;
+
+        switch (arg_split_mode) {
+        case JOURNAL_WRITE_SPLIT_NONE:
+                output = arg_output ?: REMOTE_JOURNAL_PATH "/remote.journal";
+                break;
+
+        case JOURNAL_WRITE_SPLIT_HOST: {
+                _cleanup_free_ char *name;
+
+                assert(host);
+
+                name = filename_escape(host);
+                if (!name)
+                        return log_oom();
+
+                r = asprintf(&_output, "%s/remote-%s.journal",
+                             arg_output ?: REMOTE_JOURNAL_PATH,
+                             name);
+                if (r < 0)
+                        return log_oom();
+
+                output = _output;
+                break;
+        }
+
+        default:
+                assert_not_reached("what?");
+        }
+
+        r = journal_file_open_reliably(output,
+                                       O_RDWR|O_CREAT, 0640,
+                                       arg_compress, arg_seal,
+                                       &w->metrics,
+                                       w->mmap,
+                                       NULL, &w->journal);
+        if (r < 0)
+                log_error("Failed to open output journal %s: %s",
+                          output, strerror(-r));
+        else
+                log_info("Opened output file %s", w->journal->path);
+        return r;
+}
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+static int init_writer_hashmap(RemoteServer *s) {
+        static const struct hash_ops *hash_ops[] = {
+                [JOURNAL_WRITE_SPLIT_NONE] = NULL,
+                [JOURNAL_WRITE_SPLIT_HOST] = &string_hash_ops,
+        };
+
+        assert(arg_split_mode >= 0 && arg_split_mode < (int) ELEMENTSOF(hash_ops));
+
+        s->writers = hashmap_new(hash_ops[arg_split_mode]);
+        if (!s->writers)
+                return log_oom();
+
+        return 0;
+}
+
+static int get_writer(RemoteServer *s, const char *host,
+                      Writer **writer) {
+        const void *key;
+        _cleanup_writer_unref_ Writer *w = NULL;
+        int r;
+
+        switch(arg_split_mode) {
+        case JOURNAL_WRITE_SPLIT_NONE:
+                key = "one and only";
+                break;
+
+        case JOURNAL_WRITE_SPLIT_HOST:
+                assert(host);
+                key = host;
+                break;
+
+        default:
+                assert_not_reached("what split mode?");
+        }
+
+        w = hashmap_get(s->writers, key);
+        if (w)
+                writer_ref(w);
+        else {
+                w = writer_new(s);
+                if (!w)
+                        return log_oom();
+
+                if (arg_split_mode == JOURNAL_WRITE_SPLIT_HOST) {
+                        w->hashmap_key = strdup(key);
+                        if (!w->hashmap_key)
+                                return log_oom();
+                }
+
+                r = open_output(w, host);
+                if (r < 0)
+                        return r;
+
+                r = hashmap_put(s->writers, w->hashmap_key ?: key, w);
+                if (r < 0)
+                        return r;
+        }
+
+        *writer = w;
+        w = NULL;
+        return 0;
+}
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+/* This should go away as soon as µhttpd allows state to be passed around. */
+static RemoteServer *server;
+
+static int dispatch_raw_source_event(sd_event_source *event,
+                                     int fd,
+                                     uint32_t revents,
+                                     void *userdata);
+static int dispatch_blocking_source_event(sd_event_source *event,
+                                          void *userdata);
+static int dispatch_raw_connection_event(sd_event_source *event,
+                                         int fd,
+                                         uint32_t revents,
+                                         void *userdata);
+static int dispatch_http_event(sd_event_source *event,
+                               int fd,
+                               uint32_t revents,
+                               void *userdata);
+
+static int get_source_for_fd(RemoteServer *s,
+                             int fd, char *name, RemoteSource **source) {
+        Writer *writer;
+        int r;
+
+        /* This takes ownership of name, but only on success. */
+
+        assert(fd >= 0);
+        assert(source);
+
+        if (!GREEDY_REALLOC0(s->sources, s->sources_size, fd + 1))
+                return log_oom();
+
+        r = get_writer(s, name, &writer);
+        if (r < 0) {
+                log_warning("Failed to get writer for source %s: %s",
+                            name, strerror(-r));
+                return r;
+        }
+
+        if (s->sources[fd] == NULL) {
+                s->sources[fd] = source_new(fd, false, name, writer);
+                if (!s->sources[fd]) {
+                        writer_unref(writer);
+                        return log_oom();
+                }
+
+                s->active++;
+        }
+
+        *source = s->sources[fd];
+        return 0;
+}
+
+static int remove_source(RemoteServer *s, int fd) {
+        RemoteSource *source;
+
+        assert(s);
+        assert(fd >= 0 && fd < (ssize_t) s->sources_size);
+
+        source = s->sources[fd];
+        if (source) {
+                /* this closes fd too */
+                source_free(source);
+                s->sources[fd] = NULL;
+                s->active--;
+        }
+
+        return 0;
+}
+
+static int add_source(RemoteServer *s, int fd, char* name, bool own_name) {
+
+        RemoteSource *source;
+        int r;
+
+        /* This takes ownership of name, even on failure, if own_name is true. */
+
+        assert(s);
+        assert(fd >= 0);
+        assert(name);
+
+        if (!own_name) {
+                name = strdup(name);
+                if (!name)
+                        return log_oom();
+        }
+
+        r = get_source_for_fd(s, fd, name, &source);
+        if (r < 0) {
+                log_error("Failed to create source for fd:%d (%s): %s",
+                          fd, name, strerror(-r));
+                free(name);
+                return r;
+        }
+
+        r = sd_event_add_io(s->events, &source->event,
+                            fd, EPOLLIN|EPOLLRDHUP|EPOLLPRI,
+                            dispatch_raw_source_event, s);
+        if (r == -EPERM) {
+                log_debug("Falling back to sd_event_add_defer for fd:%d (%s)", fd, name);
+                r = sd_event_add_defer(s->events, &source->event,
+                                       dispatch_blocking_source_event, source);
+                if (r == 0)
+                        sd_event_source_set_enabled(source->event, SD_EVENT_ON);
+        }
+        if (r < 0) {
+                log_error("Failed to register event source for fd:%d: %s",
+                          fd, strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_source_set_name(source->event, name);
+        if (r < 0) {
+                log_error("Failed to set source name for fd:%d: %s", fd, strerror(-r));
+                goto error;
+        }
+
+        return 1; /* work to do */
+
+ error:
+        remove_source(s, fd);
+        return r;
+}
+
+static int add_raw_socket(RemoteServer *s, int fd) {
+        int r;
+        _cleanup_close_ int fd_ = fd;
+        char name[strlen("raw-socket-") + DECIMAL_STR_MAX(int)];
+
+        assert(fd >= 0);
+
+        r = sd_event_add_io(s->events, &s->listen_event,
+                            fd, EPOLLIN,
+                            dispatch_raw_connection_event, s);
+        if (r < 0)
+                return r;
+
+        snprintf(name, sizeof(name), "raw-socket-%d", fd);
+
+        r = sd_event_source_set_name(s->listen_event, name);
+        if (r < 0)
+                return r;
+
+        fd_ = -1;
+        s->active ++;
+        return 0;
+}
+
+static int setup_raw_socket(RemoteServer *s, const char *address) {
+        int fd;
+
+        fd = make_socket_fd(LOG_INFO, address, SOCK_STREAM | SOCK_CLOEXEC);
+        if (fd < 0)
+                return fd;
+
+        return add_raw_socket(s, fd);
+}
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+static int request_meta(void **connection_cls, int fd, char *hostname) {
+        RemoteSource *source;
+        Writer *writer;
+        int r;
+
+        assert(connection_cls);
+        if (*connection_cls)
+                return 0;
+
+        r = get_writer(server, hostname, &writer);
+        if (r < 0) {
+                log_warning("Failed to get writer for source %s: %s",
+                            hostname, strerror(-r));
+                return r;
+        }
+
+        source = source_new(fd, true, hostname, writer);
+        if (!source) {
+                writer_unref(writer);
+                return log_oom();
+        }
+
+        log_debug("Added RemoteSource as connection metadata %p", source);
+
+        *connection_cls = source;
+        return 0;
+}
+
+static void request_meta_free(void *cls,
+                              struct MHD_Connection *connection,
+                              void **connection_cls,
+                              enum MHD_RequestTerminationCode toe) {
+        RemoteSource *s;
+
+        assert(connection_cls);
+        s = *connection_cls;
+
+        if (s) {
+                log_debug("Cleaning up connection metadata %p", s);
+                source_free(s);
+                *connection_cls = NULL;
+        }
+}
+
+static int process_http_upload(
+                struct MHD_Connection *connection,
+                const char *upload_data,
+                size_t *upload_data_size,
+                RemoteSource *source) {
+
+        bool finished = false;
+        size_t remaining;
+        int r;
+
+        assert(source);
+
+        log_trace("%s: connection %p, %zu bytes",
+                  __func__, connection, *upload_data_size);
+
+        if (*upload_data_size) {
+                log_trace("Received %zu bytes", *upload_data_size);
+
+                r = push_data(source, upload_data, *upload_data_size);
+                if (r < 0)
+                        return mhd_respond_oom(connection);
+
+                *upload_data_size = 0;
+        } else
+                finished = true;
+
+        while (true) {
+                r = process_source(source, arg_compress, arg_seal);
+                if (r == -EAGAIN || r == -EWOULDBLOCK)
+                        break;
+                else if (r < 0) {
+                        log_warning("Failed to process data for connection %p", connection);
+                        if (r == -E2BIG)
+                                return mhd_respondf(connection,
+                                                    MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+                                                    "Entry is too large, maximum is %u bytes.\n",
+                                                    DATA_SIZE_MAX);
+                        else
+                                return mhd_respondf(connection,
+                                                    MHD_HTTP_UNPROCESSABLE_ENTITY,
+                                                    "Processing failed: %s.", strerror(-r));
+                }
+        }
+
+        if (!finished)
+                return MHD_YES;
+
+        /* The upload is finished */
+
+        remaining = source_non_empty(source);
+        if (remaining > 0) {
+                log_warning("Premature EOFbyte. %zu bytes lost.", remaining);
+                return mhd_respondf(connection, MHD_HTTP_EXPECTATION_FAILED,
+                                    "Premature EOF. %zu bytes of trailing data not processed.",
+                                    remaining);
+        }
+
+        return mhd_respond(connection, MHD_HTTP_ACCEPTED, "OK.\n");
+};
+
+static int request_handler(
+                void *cls,
+                struct MHD_Connection *connection,
+                const char *url,
+                const char *method,
+                const char *version,
+                const char *upload_data,
+                size_t *upload_data_size,
+                void **connection_cls) {
+
+        const char *header;
+        int r, code, fd;
+        _cleanup_free_ char *hostname = NULL;
+
+        assert(connection);
+        assert(connection_cls);
+        assert(url);
+        assert(method);
+
+        log_trace("Handling a connection %s %s %s", method, url, version);
+
+        if (*connection_cls)
+                return process_http_upload(connection,
+                                           upload_data, upload_data_size,
+                                           *connection_cls);
+
+        if (!streq(method, "POST"))
+                return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
+                                   "Unsupported method.\n");
+
+        if (!streq(url, "/upload"))
+                return mhd_respond(connection, MHD_HTTP_NOT_FOUND,
+                                   "Not found.\n");
+
+        header = MHD_lookup_connection_value(connection,
+                                             MHD_HEADER_KIND, "Content-Type");
+        if (!header || !streq(header, "application/vnd.fdo.journal"))
+                return mhd_respond(connection, MHD_HTTP_UNSUPPORTED_MEDIA_TYPE,
+                                   "Content-Type: application/vnd.fdo.journal"
+                                   " is required.\n");
+
+        {
+                const union MHD_ConnectionInfo *ci;
+
+                ci = MHD_get_connection_info(connection,
+                                             MHD_CONNECTION_INFO_CONNECTION_FD);
+                if (!ci) {
+                        log_error("MHD_get_connection_info failed: cannot get remote fd");
+                        return mhd_respond(connection, MHD_HTTP_INTERNAL_SERVER_ERROR,
+                                           "Cannot check remote address");
+                }
+
+                fd = ci->connect_fd;
+                assert(fd >= 0);
+        }
+
+        if (server->check_trust) {
+                r = check_permissions(connection, &code, &hostname);
+                if (r < 0)
+                        return code;
+        } else {
+                r = getnameinfo_pretty(fd, &hostname);
+                if (r < 0) {
+                        return mhd_respond(connection, MHD_HTTP_INTERNAL_SERVER_ERROR,
+                                           "Cannot check remote hostname");
+                }
+        }
+
+        assert(hostname);
+
+        r = request_meta(connection_cls, fd, hostname);
+        if (r == -ENOMEM)
+                return respond_oom(connection);
+        else if (r < 0)
+                return mhd_respond(connection, MHD_HTTP_INTERNAL_SERVER_ERROR,
+                                   strerror(-r));
+
+        hostname = NULL;
+        return MHD_YES;
+}
+
+static int setup_microhttpd_server(RemoteServer *s,
+                                   int fd,
+                                   const char *key,
+                                   const char *cert,
+                                   const char *trust) {
+        struct MHD_OptionItem opts[] = {
+                { MHD_OPTION_NOTIFY_COMPLETED, (intptr_t) request_meta_free},
+                { MHD_OPTION_EXTERNAL_LOGGER, (intptr_t) microhttpd_logger},
+                { MHD_OPTION_LISTEN_SOCKET, fd},
+                { MHD_OPTION_END},
+                { MHD_OPTION_END},
+                { MHD_OPTION_END},
+                { MHD_OPTION_END}};
+        int opts_pos = 3;
+        int flags =
+                MHD_USE_DEBUG |
+                MHD_USE_PEDANTIC_CHECKS |
+                MHD_USE_EPOLL_LINUX_ONLY |
+                MHD_USE_DUAL_STACK;
+
+        const union MHD_DaemonInfo *info;
+        int r, epoll_fd;
+        MHDDaemonWrapper *d;
+
+        assert(fd >= 0);
+
+        r = fd_nonblock(fd, true);
+        if (r < 0) {
+                log_error("Failed to make fd:%d nonblocking: %s", fd, strerror(-r));
+                return r;
+        }
+
+        if (key) {
+                assert(cert);
+
+                opts[opts_pos++] = (struct MHD_OptionItem)
+                        {MHD_OPTION_HTTPS_MEM_KEY, 0, (char*) key};
+                opts[opts_pos++] = (struct MHD_OptionItem)
+                        {MHD_OPTION_HTTPS_MEM_CERT, 0, (char*) cert};
+
+                flags |= MHD_USE_SSL;
+
+                if (trust)
+                        opts[opts_pos++] = (struct MHD_OptionItem)
+                                {MHD_OPTION_HTTPS_MEM_TRUST, 0, (char*) trust};
+        }
+
+        d = new(MHDDaemonWrapper, 1);
+        if (!d)
+                return log_oom();
+
+        d->fd = (uint64_t) fd;
+
+        d->daemon = MHD_start_daemon(flags, 0,
+                                     NULL, NULL,
+                                     request_handler, NULL,
+                                     MHD_OPTION_ARRAY, opts,
+                                     MHD_OPTION_END);
+        if (!d->daemon) {
+                log_error("Failed to start µhttp daemon");
+                r = -EINVAL;
+                goto error;
+        }
+
+        log_debug("Started MHD %s daemon on fd:%d (wrapper @ %p)",
+                  key ? "HTTPS" : "HTTP", fd, d);
+
+
+        info = MHD_get_daemon_info(d->daemon, MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY);
+        if (!info) {
+                log_error("µhttp returned NULL daemon info");
+                r = -ENOTSUP;
+                goto error;
+        }
+
+        epoll_fd = info->listen_fd;
+        if (epoll_fd < 0) {
+                log_error("µhttp epoll fd is invalid");
+                r = -EUCLEAN;
+                goto error;
+        }
+
+        r = sd_event_add_io(s->events, &d->event,
+                            epoll_fd, EPOLLIN,
+                            dispatch_http_event, d);
+        if (r < 0) {
+                log_error("Failed to add event callback: %s", strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_source_set_name(d->event, "epoll-fd");
+        if (r < 0) {
+                log_error("Failed to set source name: %s", strerror(-r));
+                goto error;
+        }
+
+        r = hashmap_ensure_allocated(&s->daemons, &uint64_hash_ops);
+        if (r < 0) {
+                log_oom();
+                goto error;
+        }
+
+        r = hashmap_put(s->daemons, &d->fd, d);
+        if (r < 0) {
+                log_error("Failed to add daemon to hashmap: %s", strerror(-r));
+                goto error;
+        }
+
+        s->active ++;
+        return 0;
+
+error:
+        MHD_stop_daemon(d->daemon);
+        free(d->daemon);
+        free(d);
+        return r;
+}
+
+static int setup_microhttpd_socket(RemoteServer *s,
+                                   const char *address,
+                                   const char *key,
+                                   const char *cert,
+                                   const char *trust) {
+        int fd;
+
+        fd = make_socket_fd(LOG_INFO, address, SOCK_STREAM | SOCK_CLOEXEC);
+        if (fd < 0)
+                return fd;
+
+        return setup_microhttpd_server(s, fd, key, cert, trust);
+}
+
+static int dispatch_http_event(sd_event_source *event,
+                               int fd,
+                               uint32_t revents,
+                               void *userdata) {
+        MHDDaemonWrapper *d = userdata;
+        int r;
+
+        assert(d);
+
+        r = MHD_run(d->daemon);
+        if (r == MHD_NO) {
+                log_error("MHD_run failed!");
+                // XXX: unregister daemon
+                return -EINVAL;
+        }
+
+        return 1; /* work to do */
+}
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+static int setup_signals(RemoteServer *s) {
+        sigset_t mask;
+        int r;
+
+        assert(s);
+
+        assert_se(sigemptyset(&mask) == 0);
+        sigset_add_many(&mask, SIGINT, SIGTERM, -1);
+        assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
+
+        r = sd_event_add_signal(s->events, &s->sigterm_event, SIGTERM, NULL, s);
+        if (r < 0)
+                return r;
+
+        r = sd_event_source_set_name(s->sigterm_event, "sigterm");
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(s->events, &s->sigint_event, SIGINT, NULL, s);
+        if (r < 0)
+                return r;
+
+        r = sd_event_source_set_name(s->sigint_event, "sigint");
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int negative_fd(const char *spec) {
+        /* Return a non-positive number as its inverse, -EINVAL otherwise. */
+
+        int fd, r;
+
+        r = safe_atoi(spec, &fd);
+        if (r < 0)
+                return r;
+
+        if (fd > 0)
+                return -EINVAL;
+        else
+                return -fd;
+}
+
+static int remoteserver_init(RemoteServer *s,
+                             const char* key,
+                             const char* cert,
+                             const char* trust) {
+        int r, n, fd;
+        char **file;
+
+        assert(s);
+
+        if ((arg_listen_raw || arg_listen_http) && trust) {
+                log_error("Option --trust makes all non-HTTPS connections untrusted.");
+                return -EINVAL;
+        }
+
+        r = sd_event_default(&s->events);
+        if (r < 0) {
+                log_error("Failed to allocate event loop: %s", strerror(-r));
+                return r;
+        }
+
+        setup_signals(s);
+
+        assert(server == NULL);
+        server = s;
+
+        r = init_writer_hashmap(s);
+        if (r < 0)
+                return r;
+
+        n = sd_listen_fds(true);
+        if (n < 0) {
+                log_error("Failed to read listening file descriptors from environment: %s",
+                          strerror(-n));
+                return n;
+        } else
+                log_info("Received %d descriptors", n);
+
+        if (MAX(http_socket, https_socket) >= SD_LISTEN_FDS_START + n) {
+                log_error("Received fewer sockets than expected");
+                return -EBADFD;
+        }
+
+        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd++) {
+                if (sd_is_socket(fd, AF_UNSPEC, 0, true)) {
+                        log_info("Received a listening socket (fd:%d)", fd);
+
+                        if (fd == http_socket)
+                                r = setup_microhttpd_server(s, fd, NULL, NULL, NULL);
+                        else if (fd == https_socket)
+                                r = setup_microhttpd_server(s, fd, key, cert, trust);
+                        else
+                                r = add_raw_socket(s, fd);
+                } else if (sd_is_socket(fd, AF_UNSPEC, 0, false)) {
+                        char *hostname;
+
+                        r = getnameinfo_pretty(fd, &hostname);
+                        if (r < 0) {
+                                log_error("Failed to retrieve remote name: %s", strerror(-r));
+                                return r;
+                        }
+
+                        log_info("Received a connection socket (fd:%d) from %s", fd, hostname);
+
+                        r = add_source(s, fd, hostname, true);
+                } else {
+                        log_error("Unknown socket passed on fd:%d", fd);
+
+                        return -EINVAL;
+                }
+
+                if(r < 0) {
+                        log_error("Failed to register socket (fd:%d): %s",
+                                  fd, strerror(-r));
+                        return r;
+                }
+        }
+
+        if (arg_url) {
+                const char *url, *hostname;
+
+                url = strappenda(arg_url, "/entries");
+
+                if (arg_getter) {
+                        log_info("Spawning getter %s...", url);
+                        fd = spawn_getter(arg_getter, url);
+                } else {
+                        log_info("Spawning curl %s...", url);
+                        fd = spawn_curl(url);
+                }
+                if (fd < 0)
+                        return fd;
+
+                hostname =
+                        startswith(arg_url, "https://") ?:
+                        startswith(arg_url, "http://") ?:
+                        arg_url;
+
+                r = add_source(s, fd, (char*) hostname, false);
+                if (r < 0)
+                        return r;
+        }
+
+        if (arg_listen_raw) {
+                log_info("Listening on a socket...");
+                r = setup_raw_socket(s, arg_listen_raw);
+                if (r < 0)
+                        return r;
+        }
+
+        if (arg_listen_http) {
+                r = setup_microhttpd_socket(s, arg_listen_http, NULL, NULL, NULL);
+                if (r < 0)
+                        return r;
+        }
+
+        if (arg_listen_https) {
+                r = setup_microhttpd_socket(s, arg_listen_https, key, cert, trust);
+                if (r < 0)
+                        return r;
+        }
+
+        STRV_FOREACH(file, arg_files) {
+                const char *output_name;
+
+                if (streq(*file, "-")) {
+                        log_info("Using standard input as source.");
+
+                        fd = STDIN_FILENO;
+                        output_name = "stdin";
+                } else {
+                        log_info("Reading file %s...", *file);
+
+                        fd = open(*file, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NONBLOCK);
+                        if (fd < 0) {
+                                log_error("Failed to open %s: %m", *file);
+                                return -errno;
+                        }
+                        output_name = *file;
+                }
+
+                r = add_source(s, fd, (char*) output_name, false);
+                if (r < 0)
+                        return r;
+        }
+
+        if (s->active == 0) {
+                log_error("Zarro sources specified");
+                return -EINVAL;
+        }
+
+        if (arg_split_mode == JOURNAL_WRITE_SPLIT_NONE) {
+                /* In this case we know what the writer will be
+                   called, so we can create it and verify that we can
+                   create output as expected. */
+                r = get_writer(s, NULL, &s->_single_writer);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+static void server_destroy(RemoteServer *s) {
+        size_t i;
+        MHDDaemonWrapper *d;
+
+        while ((d = hashmap_steal_first(s->daemons))) {
+                MHD_stop_daemon(d->daemon);
+                sd_event_source_unref(d->event);
+                free(d);
+        }
+
+        hashmap_free(s->daemons);
+
+        assert(s->sources_size == 0 || s->sources);
+        for (i = 0; i < s->sources_size; i++)
+                remove_source(s, i);
+        free(s->sources);
+
+        writer_unref(s->_single_writer);
+        hashmap_free(s->writers);
+
+        sd_event_source_unref(s->sigterm_event);
+        sd_event_source_unref(s->sigint_event);
+        sd_event_source_unref(s->listen_event);
+        sd_event_unref(s->events);
+
+        /* fds that we're listening on remain open... */
+}
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+static int dispatch_raw_source_event(sd_event_source *event,
+                                     int fd,
+                                     uint32_t revents,
+                                     void *userdata) {
+
+        RemoteServer *s = userdata;
+        RemoteSource *source;
+        int r;
+
+        assert(fd >= 0 && fd < (ssize_t) s->sources_size);
+        source = s->sources[fd];
+        assert(source->fd == fd);
+
+        r = process_source(source, arg_compress, arg_seal);
+        if (source->state == STATE_EOF) {
+                size_t remaining;
+
+                log_info("EOF reached with source fd:%d (%s)",
+                         source->fd, source->name);
+
+                remaining = source_non_empty(source);
+                if (remaining > 0)
+                        log_warning("Premature EOF. %zu bytes lost.", remaining);
+                remove_source(s, source->fd);
+                log_info("%zd active sources remaining", s->active);
+                return 0;
+        } else if (r == -E2BIG) {
+                log_error("Entry too big, skipped");
+                return 1;
+        } else if (r == -EAGAIN) {
+                return 0;
+        } else if (r < 0) {
+                log_info("Closing connection: %s", strerror(-r));
+                remove_source(server, fd);
+                return 0;
+        } else
+                return 1;
+}
+
+static int dispatch_blocking_source_event(sd_event_source *event,
+                                          void *userdata) {
+        RemoteSource *source = userdata;
+
+        return dispatch_raw_source_event(event, source->fd, EPOLLIN, server);
+}
+
+static int accept_connection(const char* type, int fd,
+                             SocketAddress *addr, char **hostname) {
+        int fd2, r;
+
+        log_debug("Accepting new %s connection on fd:%d", type, fd);
+        fd2 = accept4(fd, &addr->sockaddr.sa, &addr->size, SOCK_NONBLOCK|SOCK_CLOEXEC);
+        if (fd2 < 0) {
+                log_error("accept() on fd:%d failed: %m", fd);
+                return -errno;
+        }
+
+        switch(socket_address_family(addr)) {
+        case AF_INET:
+        case AF_INET6: {
+                _cleanup_free_ char *a = NULL;
+                char *b;
+
+                r = socket_address_print(addr, &a);
+                if (r < 0) {
+                        log_error("socket_address_print(): %s", strerror(-r));
+                        close(fd2);
+                        return r;
+                }
+
+                r = socknameinfo_pretty(&addr->sockaddr, addr->size, &b);
+                if (r < 0) {
+                        close(fd2);
+                        return r;
+                }
+
+                log_info("Accepted %s %s connection from %s",
+                         type,
+                         socket_address_family(addr) == AF_INET ? "IP" : "IPv6",
+                         a);
+
+                *hostname = b;
+
+                return fd2;
+        };
+        default:
+                log_error("Rejected %s connection with unsupported family %d",
+                          type, socket_address_family(addr));
+                close(fd2);
+
+                return -EINVAL;
+        }
+}
+
+static int dispatch_raw_connection_event(sd_event_source *event,
+                                         int fd,
+                                         uint32_t revents,
+                                         void *userdata) {
+        RemoteServer *s = userdata;
+        int fd2;
+        SocketAddress addr = {
+                .size = sizeof(union sockaddr_union),
+                .type = SOCK_STREAM,
+        };
+        char *hostname;
+
+        fd2 = accept_connection("raw", fd, &addr, &hostname);
+        if (fd2 < 0)
+                return fd2;
+
+        return add_source(s, fd2, hostname, true);
+}
+
+/**********************************************************************
+ **********************************************************************
+ **********************************************************************/
+
+static const char* const journal_write_split_mode_table[_JOURNAL_WRITE_SPLIT_MAX] = {
+        [JOURNAL_WRITE_SPLIT_NONE] = "none",
+        [JOURNAL_WRITE_SPLIT_HOST] = "host",
+};
+
+DEFINE_PRIVATE_STRING_TABLE_LOOKUP(journal_write_split_mode, JournalWriteSplitMode);
+static DEFINE_CONFIG_PARSE_ENUM(config_parse_write_split_mode,
+                                journal_write_split_mode,
+                                JournalWriteSplitMode,
+                                "Failed to parse split mode setting");
+
+static int parse_config(void) {
+        const ConfigTableItem items[] = {
+                { "Remote",  "SplitMode",              config_parse_write_split_mode, 0, &arg_split_mode },
+                { "Remote",  "ServerKeyFile",          config_parse_path,             0, &arg_key        },
+                { "Remote",  "ServerCertificateFile",  config_parse_path,             0, &arg_cert       },
+                { "Remote",  "TrustedCertificateFile", config_parse_path,             0, &arg_trust      },
+                {}};
+
+        return config_parse(NULL, PKGSYSCONFDIR "/journal-remote.conf", NULL,
+                            "Remote\0",
+                            config_item_table_lookup, items,
+                            false, false, true, NULL);
+}
+
+static void help(void) {
+        printf("%s [OPTIONS...] {FILE|-}...\n\n"
+               "Write external journal events to journal file(s).\n\n"
+               "  -h --help                 Show this help\n"
+               "     --version              Show package version\n"
+               "     --url=URL              Read events from systemd-journal-gatewayd at URL\n"
+               "     --getter=COMMAND       Read events from the output of COMMAND\n"
+               "     --listen-raw=ADDR      Listen for connections at ADDR\n"
+               "     --listen-http=ADDR     Listen for HTTP connections at ADDR\n"
+               "     --listen-https=ADDR    Listen for HTTPS connections at ADDR\n"
+               "  -o --output=FILE|DIR      Write output to FILE or DIR/external-*.journal\n"
+               "     --compress[=BOOL]      XZ-compress the output journal (default: yes)\n"
+               "     --seal[=BOOL]          Use event sealing (default: no)\n"
+               "     --key=FILENAME         SSL key in PEM format (default:\n"
+               "                            \"" PRIV_KEY_FILE "\")\n"
+               "     --cert=FILENAME        SSL certificate in PEM format (default:\n"
+               "                            \"" CERT_FILE "\")\n"
+               "     --trust=FILENAME|all   SSL CA certificate or disable checking (default:\n"
+               "                            \"" TRUST_FILE "\")\n"
+               "     --gnutls-log=CATEGORY...\n"
+               "                            Specify a list of gnutls logging categories\n"
+               "     --split-mode=none|host How many output files to create\n"
+               "\n"
+               "Note: file descriptors from sd_listen_fds() will be consumed, too.\n"
+               , program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_URL,
+                ARG_LISTEN_RAW,
+                ARG_LISTEN_HTTP,
+                ARG_LISTEN_HTTPS,
+                ARG_GETTER,
+                ARG_SPLIT_MODE,
+                ARG_COMPRESS,
+                ARG_SEAL,
+                ARG_KEY,
+                ARG_CERT,
+                ARG_TRUST,
+                ARG_GNUTLS_LOG,
+        };
+
+        static const struct option options[] = {
+                { "help",         no_argument,       NULL, 'h'              },
+                { "version",      no_argument,       NULL, ARG_VERSION      },
+                { "url",          required_argument, NULL, ARG_URL          },
+                { "getter",       required_argument, NULL, ARG_GETTER       },
+                { "listen-raw",   required_argument, NULL, ARG_LISTEN_RAW   },
+                { "listen-http",  required_argument, NULL, ARG_LISTEN_HTTP  },
+                { "listen-https", required_argument, NULL, ARG_LISTEN_HTTPS },
+                { "output",       required_argument, NULL, 'o'              },
+                { "split-mode",   required_argument, NULL, ARG_SPLIT_MODE   },
+                { "compress",     optional_argument, NULL, ARG_COMPRESS     },
+                { "seal",         optional_argument, NULL, ARG_SEAL         },
+                { "key",          required_argument, NULL, ARG_KEY          },
+                { "cert",         required_argument, NULL, ARG_CERT         },
+                { "trust",        required_argument, NULL, ARG_TRUST        },
+                { "gnutls-log",   required_argument, NULL, ARG_GNUTLS_LOG   },
+                {}
+        };
+
+        int c, r;
+        bool type_a, type_b;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "ho:", options, NULL)) >= 0)
+                switch(c) {
+                case 'h':
+                        help();
+                        return 0 /* done */;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0 /* done */;
+
+                case ARG_URL:
+                        if (arg_url) {
+                                log_error("cannot currently set more than one --url");
+                                return -EINVAL;
+                        }
+
+                        arg_url = optarg;
+                        break;
+
+                case ARG_GETTER:
+                        if (arg_getter) {
+                                log_error("cannot currently use --getter more than once");
+                                return -EINVAL;
+                        }
+
+                        arg_getter = optarg;
+                        break;
+
+                case ARG_LISTEN_RAW:
+                        if (arg_listen_raw) {
+                                log_error("cannot currently use --listen-raw more than once");
+                                return -EINVAL;
+                        }
+
+                        arg_listen_raw = optarg;
+                        break;
+
+                case ARG_LISTEN_HTTP:
+                        if (arg_listen_http || http_socket >= 0) {
+                                log_error("cannot currently use --listen-http more than once");
+                                return -EINVAL;
+                        }
+
+                        r = negative_fd(optarg);
+                        if (r >= 0)
+                                http_socket = r;
+                        else
+                                arg_listen_http = optarg;
+                        break;
+
+                case ARG_LISTEN_HTTPS:
+                        if (arg_listen_https || https_socket >= 0) {
+                                log_error("cannot currently use --listen-https more than once");
+                                return -EINVAL;
+                        }
+
+                        r = negative_fd(optarg);
+                        if (r >= 0)
+                                https_socket = r;
+                        else
+                                arg_listen_https = optarg;
+
+                        break;
+
+                case ARG_KEY:
+                        if (arg_key) {
+                                log_error("Key file specified twice");
+                                return -EINVAL;
+                        }
+
+                        arg_key = strdup(optarg);
+                        if (!arg_key)
+                                return log_oom();
+
+                        break;
+
+                case ARG_CERT:
+                        if (arg_cert) {
+                                log_error("Certificate file specified twice");
+                                return -EINVAL;
+                        }
+
+                        arg_cert = strdup(optarg);
+                        if (!arg_cert)
+                                return log_oom();
+
+                        break;
+
+                case ARG_TRUST:
+                        if (arg_trust || arg_trust_all) {
+                                log_error("Confusing trusted CA configuration");
+                                return -EINVAL;
+                        }
+
+                        if (streq(optarg, "all"))
+                                arg_trust_all = true;
+                        else {
+#ifdef HAVE_GNUTLS
+                                arg_trust = strdup(optarg);
+                                if (!arg_trust)
+                                        return log_oom();
+#else
+                                log_error("Option --trust is not available.");
+                                return -EINVAL;
+#endif
+                        }
+
+                        break;
+
+                case 'o':
+                        if (arg_output) {
+                                log_error("cannot use --output/-o more than once");
+                                return -EINVAL;
+                        }
+
+                        arg_output = optarg;
+                        break;
+
+                case ARG_SPLIT_MODE:
+                        arg_split_mode = journal_write_split_mode_from_string(optarg);
+                        if (arg_split_mode == _JOURNAL_WRITE_SPLIT_INVALID) {
+                                log_error("Invalid split mode: %s", optarg);
+                                return -EINVAL;
+                        }
+                        break;
+
+                case ARG_COMPRESS:
+                        if (optarg) {
+                                r = parse_boolean(optarg);
+                                if (r < 0) {
+                                        log_error("Failed to parse --compress= parameter.");
+                                        return -EINVAL;
+                                }
+
+                                arg_compress = !!r;
+                        } else
+                                arg_compress = true;
+
+                        break;
+
+                case ARG_SEAL:
+                        if (optarg) {
+                                r = parse_boolean(optarg);
+                                if (r < 0) {
+                                        log_error("Failed to parse --seal= parameter.");
+                                        return -EINVAL;
+                                }
+
+                                arg_seal = !!r;
+                        } else
+                                arg_seal = true;
+
+                        break;
+
+                case ARG_GNUTLS_LOG: {
+#ifdef HAVE_GNUTLS
+                        const char *word, *state;
+                        size_t size;
+
+                        FOREACH_WORD_SEPARATOR(word, size, optarg, ",", state) {
+                                char *cat;
+
+                                cat = strndup(word, size);
+                                if (!cat)
+                                        return log_oom();
+
+                                if (strv_consume(&arg_gnutls_log, cat) < 0)
+                                        return log_oom();
+                        }
+                        break;
+#else
+                        log_error("Option --gnutls-log is not available.");
+                        return -EINVAL;
+#endif
+                }
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unknown option code.");
+                }
+
+        if (optind < argc)
+                arg_files = argv + optind;
+
+        type_a = arg_getter || !strv_isempty(arg_files);
+        type_b = arg_url
+                || arg_listen_raw
+                || arg_listen_http || arg_listen_https
+                || sd_listen_fds(false) > 0;
+        if (type_a && type_b) {
+                log_error("Cannot use file input or --getter with "
+                          "--arg-listen-... or socket activation.");
+                return -EINVAL;
+        }
+        if (type_a) {
+                if (!arg_output) {
+                        log_error("Option --output must be specified with file input or --getter.");
+                        return -EINVAL;
+                }
+
+                arg_split_mode = JOURNAL_WRITE_SPLIT_NONE;
+        }
+
+        if (arg_split_mode == JOURNAL_WRITE_SPLIT_NONE
+            && arg_output && is_dir(arg_output, true) > 0) {
+                log_error("For SplitMode=none, output must be a file.");
+                return -EINVAL;
+        }
+
+        if (arg_split_mode == JOURNAL_WRITE_SPLIT_HOST
+            && arg_output && is_dir(arg_output, true) <= 0) {
+                log_error("For SplitMode=host, output must be a directory.");
+                return -EINVAL;
+        }
+
+        log_debug("Full config: SplitMode=%s Key=%s Cert=%s Trust=%s",
+                  journal_write_split_mode_to_string(arg_split_mode),
+                  strna(arg_key),
+                  strna(arg_cert),
+                  strna(arg_trust));
+
+        return 1 /* work to do */;
+}
+
+static int load_certificates(char **key, char **cert, char **trust) {
+        int r;
+
+        r = read_full_file(arg_key ?: PRIV_KEY_FILE, key, NULL);
+        if (r < 0) {
+                log_error("Failed to read key from file '%s': %s",
+                          arg_key ?: PRIV_KEY_FILE, strerror(-r));
+                return r;
+        }
+
+        r = read_full_file(arg_cert ?: CERT_FILE, cert, NULL);
+        if (r < 0) {
+                log_error("Failed to read certificate from file '%s': %s",
+                          arg_cert ?: CERT_FILE, strerror(-r));
+                return r;
+        }
+
+        if (arg_trust_all)
+                log_info("Certificate checking disabled.");
+        else {
+                r = read_full_file(arg_trust ?: TRUST_FILE, trust, NULL);
+                if (r < 0) {
+                        log_error("Failed to read CA certificate file '%s': %s",
+                                  arg_trust ?: TRUST_FILE, strerror(-r));
+                        return r;
+                }
+        }
+
+        return 0;
+}
+
+static int setup_gnutls_logger(char **categories) {
+        if (!arg_listen_http && !arg_listen_https)
+                return 0;
+
+#ifdef HAVE_GNUTLS
+        {
+                char **cat;
+                int r;
+
+                gnutls_global_set_log_function(log_func_gnutls);
+
+                if (categories)
+                        STRV_FOREACH(cat, categories) {
+                                r = log_enable_gnutls_category(*cat);
+                                if (r < 0)
+                                        return r;
+                        }
+                else
+                        log_reset_gnutls_level();
+        }
+#endif
+
+        return 0;
+}
+
+int main(int argc, char **argv) {
+        RemoteServer s = {};
+        int r;
+        _cleanup_free_ char *key = NULL, *cert = NULL, *trust = NULL;
+
+        log_show_color(true);
+        log_parse_environment();
+
+        r = parse_config();
+        if (r < 0)
+                return EXIT_FAILURE;
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+
+        r = setup_gnutls_logger(arg_gnutls_log);
+        if (r < 0)
+                return EXIT_FAILURE;
+
+        if (arg_listen_https || https_socket >= 0)
+                if (load_certificates(&key, &cert, &trust) < 0)
+                        return EXIT_FAILURE;
+
+        if (remoteserver_init(&s, key, cert, trust) < 0)
+                return EXIT_FAILURE;
+
+        r = sd_event_set_watchdog(s.events, true);
+        if (r < 0)
+                log_error("Failed to enable watchdog: %s", strerror(-r));
+        else
+                log_debug("Watchdog is %s.", r > 0 ? "enabled" : "disabled");
+
+        log_debug("%s running as pid "PID_FMT,
+                  program_invocation_short_name, getpid());
+        sd_notify(false,
+                  "READY=1\n"
+                  "STATUS=Processing requests...");
+
+        while (s.active) {
+                r = sd_event_get_state(s.events);
+                if (r < 0)
+                        break;
+                if (r == SD_EVENT_FINISHED)
+                        break;
+
+                r = sd_event_run(s.events, -1);
+                if (r < 0) {
+                        log_error("Failed to run event loop: %s", strerror(-r));
+                        break;
+                }
+        }
+
+        sd_notifyf(false,
+                   "STOPPING=1\n"
+                   "STATUS=Shutting down after writing %" PRIu64 " entries...", s.event_count);
+        log_info("Finishing after writing %" PRIu64 " entries", s.event_count);
+
+        server_destroy(&s);
+
+        free(arg_key);
+        free(arg_cert);
+        free(arg_trust);
+
+        return r >= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/journal-remote/journal-remote.conf.in b/src/journal-remote/journal-remote.conf.in
new file mode 100644 (file)
index 0000000..3e32f34
--- /dev/null
@@ -0,0 +1,5 @@
+[Remote]
+# SplitMode=host
+# ServerKeyFile=@CERTIFICATEROOT@/private/journal-remote.pem
+# ServerCertificateFile=@CERTIFICATEROOT@/certs/journal-remote.pem
+# TrustedCertificateFile=@CERTIFICATEROOT@/ca/trusted.pem
diff --git a/src/journal-remote/journal-remote.h b/src/journal-remote/journal-remote.h
new file mode 100644 (file)
index 0000000..1cf22f6
--- /dev/null
@@ -0,0 +1,56 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#pragma once
+
+#include <inttypes.h>
+
+#include "sd-event.h"
+#include "hashmap.h"
+#include "microhttpd-util.h"
+
+#include "journal-remote-parse.h"
+#include "journal-remote-write.h"
+
+typedef struct MHDDaemonWrapper MHDDaemonWrapper;
+
+struct MHDDaemonWrapper {
+        uint64_t fd;
+        struct MHD_Daemon *daemon;
+
+        sd_event_source *event;
+};
+
+struct RemoteServer {
+        RemoteSource **sources;
+        size_t sources_size;
+        size_t active;
+
+        sd_event *events;
+        sd_event_source *sigterm_event, *sigint_event, *listen_event;
+
+        Hashmap *writers;
+        Writer *_single_writer;
+        uint64_t event_count;
+
+        bool check_trust;
+        Hashmap *daemons;
+};
diff --git a/src/journal-remote/journal-upload-journal.c b/src/journal-remote/journal-upload-journal.c
new file mode 100644 (file)
index 0000000..1cd52db
--- /dev/null
@@ -0,0 +1,402 @@
+#include <stdbool.h>
+
+#include <curl/curl.h>
+
+#include "util.h"
+#include "log.h"
+#include "utf8.h"
+#include "journal-upload.h"
+
+/**
+ * Write up to size bytes to buf. Return negative on error, and number of
+ * bytes written otherwise. The last case is a kind of an error too.
+ */
+static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
+        int r;
+        size_t pos = 0;
+
+        assert(size <= SSIZE_MAX);
+
+        while (true) {
+
+                switch(u->entry_state) {
+                case ENTRY_CURSOR: {
+                        free(u->current_cursor);
+                        u->current_cursor = NULL;
+
+                        r = sd_journal_get_cursor(u->journal, &u->current_cursor);
+                        if (r < 0) {
+                                log_error("Failed to get cursor: %s", strerror(-r));
+                                return r;
+                        }
+
+                        r = snprintf(buf + pos, size - pos,
+                                     "__CURSOR=%s\n", u->current_cursor);
+                        if (pos + r > size)
+                                /* not enough space */
+                                return pos;
+
+                        u->entry_state ++;
+
+                        if (pos + r == size) {
+                                /* exactly one character short, but we don't need it */
+                                buf[size - 1] = '\n';
+                                return size;
+                        }
+
+                        pos += r;
+                }       /* fall through */
+
+                case ENTRY_REALTIME: {
+                        usec_t realtime;
+
+                        r = sd_journal_get_realtime_usec(u->journal, &realtime);
+                        if (r < 0) {
+                                log_error("Failed to get realtime timestamp: %s", strerror(-r));
+                                return r;
+                        }
+
+                        r = snprintf(buf + pos, size - pos,
+                                     "__REALTIME_TIMESTAMP="USEC_FMT"\n", realtime);
+                        if (r + pos > size)
+                                /* not enough space */
+                                return pos;
+
+                        u->entry_state ++;
+
+                        if (r + pos == size) {
+                                /* exactly one character short, but we don't need it */
+                                buf[size - 1] = '\n';
+                                return size;
+                        }
+
+                        pos += r;
+                }       /* fall through */
+
+                case ENTRY_MONOTONIC: {
+                        usec_t monotonic;
+                        sd_id128_t boot_id;
+
+                        r = sd_journal_get_monotonic_usec(u->journal, &monotonic, &boot_id);
+                        if (r < 0) {
+                                log_error("Failed to get monotonic timestamp: %s", strerror(-r));
+                                return r;
+                        }
+
+                        r = snprintf(buf + pos, size - pos,
+                                     "__MONOTONIC_TIMESTAMP="USEC_FMT"\n", monotonic);
+                        if (r + pos > size)
+                                /* not enough space */
+                                return pos;
+
+                        u->entry_state ++;
+
+                        if (r + pos == size) {
+                                /* exactly one character short, but we don't need it */
+                                buf[size - 1] = '\n';
+                                return size;
+                        }
+
+                        pos += r;
+                }       /* fall through */
+
+                case ENTRY_BOOT_ID: {
+                        sd_id128_t boot_id;
+                        char sid[33];
+
+                        r = sd_journal_get_monotonic_usec(u->journal, NULL, &boot_id);
+                        if (r < 0) {
+                                log_error("Failed to get monotonic timestamp: %s", strerror(-r));
+                                return r;
+                        }
+
+                        r = snprintf(buf + pos, size - pos,
+                                     "_BOOT_ID=%s\n", sd_id128_to_string(boot_id, sid));
+                        if (r + pos> size)
+                                /* not enough space */
+                                return pos;
+
+                        u->entry_state ++;
+
+                        if (r + pos == size) {
+                                /* exactly one character short, but we don't need it */
+                                buf[size - 1] = '\n';
+                                return size;
+                        }
+
+                        pos += r;
+                }       /* fall through */
+
+                case ENTRY_NEW_FIELD: {
+                        u->field_pos = 0;
+
+                        r = sd_journal_enumerate_data(u->journal,
+                                                      &u->field_data,
+                                                      &u->field_length);
+                        if (r < 0) {
+                                log_error("Failed to move to next field in entry: %s",
+                                          strerror(-r));
+                                return r;
+                        } else if (r == 0) {
+                                u->entry_state = ENTRY_OUTRO;
+                                continue;
+                        }
+
+                        if (!utf8_is_printable_newline(u->field_data,
+                                                       u->field_length, false)) {
+                                u->entry_state = ENTRY_BINARY_FIELD_START;
+                                continue;
+                        }
+
+                        u->entry_state ++;
+                }       /* fall through */
+
+                case ENTRY_TEXT_FIELD:
+                case ENTRY_BINARY_FIELD: {
+                        bool done;
+                        size_t tocopy;
+
+                        done = size - pos > u->field_length - u->field_pos;
+                        if (done)
+                                tocopy = u->field_length - u->field_pos;
+                        else
+                                tocopy = size - pos;
+
+                        memcpy(buf + pos,
+                               (char*) u->field_data + u->field_pos,
+                               tocopy);
+
+                        if (done) {
+                                buf[pos + tocopy] = '\n';
+                                pos += tocopy + 1;
+                                u->entry_state = ENTRY_NEW_FIELD;
+                                continue;
+                        } else {
+                                u->field_pos += tocopy;
+                                return size;
+                        }
+                }
+
+                case ENTRY_BINARY_FIELD_START: {
+                        const char *c;
+                        size_t len;
+
+                        c = memchr(u->field_data, '=', u->field_length);
+                        if (!c || c == u->field_data) {
+                                log_error("Invalid field.");
+                                return -EINVAL;
+                        }
+
+                        len = c - (const char*)u->field_data;
+
+                        /* need space for label + '\n' */
+                        if (size - pos < len + 1)
+                                return pos;
+
+                        memcpy(buf + pos, u->field_data, len);
+                        buf[pos + len] = '\n';
+                        pos += len + 1;
+
+                        u->field_pos = len + 1;
+                        u->entry_state ++;
+                }       /* fall through */
+
+                case ENTRY_BINARY_FIELD_SIZE: {
+                        uint64_t le64;
+
+                        /* need space for uint64_t */
+                        if (size - pos < 8)
+                                return pos;
+
+                        le64 = htole64(u->field_length - u->field_pos);
+                        memcpy(buf + pos, &le64, 8);
+                        pos += 8;
+
+                        u->entry_state ++;
+                        continue;
+                }
+
+                case ENTRY_OUTRO:
+                        /* need space for '\n' */
+                        if (size - pos < 1)
+                                return pos;
+
+                        buf[pos++] = '\n';
+                        u->entry_state ++;
+                        u->entries_sent ++;
+
+                        return pos;
+
+                default:
+                        assert_not_reached("WTF?");
+                }
+        }
+        assert_not_reached("WTF?");
+}
+
+static size_t journal_input_callback(void *buf, size_t size, size_t nmemb, void *userp) {
+        Uploader *u = userp;
+        int r;
+        sd_journal *j;
+        size_t filled = 0;
+        ssize_t w;
+
+        assert(u);
+        assert(nmemb <= SSIZE_MAX / size);
+
+        j = u->journal;
+
+        while (j && filled < size * nmemb) {
+                if (u->entry_state == ENTRY_DONE) {
+                        r = sd_journal_next(j);
+                        if (r < 0) {
+                                log_error("Failed to move to next entry in journal: %s",
+                                          strerror(-r));
+                                return CURL_READFUNC_ABORT;
+                        } else if (r == 0) {
+                                if (u->input_event)
+                                        log_debug("No more entries, waiting for journal.");
+                                else {
+                                        log_info("No more entries, closing journal.");
+                                        close_journal_input(u);
+                                }
+
+                                u->uploading = false;
+
+                                break;
+                        }
+
+                        u->entry_state = ENTRY_CURSOR;
+                }
+
+                w = write_entry((char*)buf + filled, size * nmemb - filled, u);
+                if (w < 0)
+                        return CURL_READFUNC_ABORT;
+                filled += w;
+
+                if (filled == 0) {
+                        log_error("Buffer space is too small to write entry.");
+                        return CURL_READFUNC_ABORT;
+                } else if (u->entry_state != ENTRY_DONE)
+                        /* This means that all available space was used up */
+                        break;
+
+                log_debug("Entry %zu (%s) has been uploaded.",
+                          u->entries_sent, u->current_cursor);
+        }
+
+        return filled;
+}
+
+void close_journal_input(Uploader *u) {
+        assert(u);
+
+        if (u->journal) {
+                log_debug("Closing journal input.");
+
+                sd_journal_close(u->journal);
+                u->journal = NULL;
+        }
+        u->timeout = 0;
+}
+
+static int process_journal_input(Uploader *u, int skip) {
+        int r;
+
+        r = sd_journal_next_skip(u->journal, skip);
+        if (r < 0) {
+                log_error("Failed to skip to next entry: %s", strerror(-r));
+                return r;
+        } else if (r < skip)
+                return 0;
+
+        /* have data */
+        u->entry_state = ENTRY_CURSOR;
+        return start_upload(u, journal_input_callback, u);
+}
+
+int check_journal_input(Uploader *u) {
+        if (u->input_event) {
+                int r;
+
+                r = sd_journal_process(u->journal);
+                if (r < 0) {
+                        log_error("Failed to process journal: %s", strerror(-r));
+                        close_journal_input(u);
+                        return r;
+                }
+
+                if (r == SD_JOURNAL_NOP)
+                        return 0;
+        }
+
+        return process_journal_input(u, 1);
+}
+
+static int dispatch_journal_input(sd_event_source *event,
+                                  int fd,
+                                  uint32_t revents,
+                                  void *userp) {
+        Uploader *u = userp;
+
+        assert(u);
+
+        if (u->uploading) {
+                log_warning("dispatch_journal_input called when uploading, ignoring.");
+                return 0;
+        }
+
+        log_debug("Detected journal input, checking for new data.");
+        return check_journal_input(u);
+}
+
+int open_journal_for_upload(Uploader *u,
+                            sd_journal *j,
+                            const char *cursor,
+                            bool after_cursor,
+                            bool follow) {
+        int fd, r, events;
+
+        u->journal = j;
+
+        sd_journal_set_data_threshold(j, 0);
+
+        if (follow) {
+                fd = sd_journal_get_fd(j);
+                if (fd < 0) {
+                        log_error("sd_journal_get_fd failed: %s", strerror(-fd));
+                        return fd;
+                }
+
+                events = sd_journal_get_events(j);
+
+                r = sd_journal_reliable_fd(j);
+                assert(r >= 0);
+                if (r > 0)
+                        u->timeout = -1;
+                else
+                        u->timeout = JOURNAL_UPLOAD_POLL_TIMEOUT;
+
+                r = sd_event_add_io(u->events, &u->input_event,
+                                    fd, events, dispatch_journal_input, u);
+                if (r < 0) {
+                        log_error("Failed to register input event: %s", strerror(-r));
+                        return r;
+                }
+
+                log_debug("Listening for journal events on fd:%d, timeout %d",
+                          fd, u->timeout == (uint64_t) -1 ? -1 : (int) u->timeout);
+        } else
+                log_debug("Not listening for journal events.");
+
+        if (cursor) {
+                r = sd_journal_seek_cursor(j, cursor);
+                if (r < 0) {
+                        log_error("Failed to seek to cursor %s: %s",
+                                  cursor, strerror(-r));
+                        return r;
+                }
+        }
+
+        return process_journal_input(u, 1 + !!after_cursor);
+}
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
new file mode 100644 (file)
index 0000000..9f13ffd
--- /dev/null
@@ -0,0 +1,886 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include <stdio.h>
+#include <curl/curl.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <getopt.h>
+
+#include "sd-daemon.h"
+
+#include "log.h"
+#include "util.h"
+#include "build.h"
+#include "fileio.h"
+#include "mkdir.h"
+#include "conf-parser.h"
+#include "journal-upload.h"
+
+#define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-upload.pem"
+#define CERT_FILE     CERTIFICATE_ROOT "/certs/journal-upload.pem"
+#define TRUST_FILE    CERTIFICATE_ROOT "/ca/trusted.pem"
+#define DEFAULT_PORT  19532
+
+static const char* arg_url;
+
+static void close_fd_input(Uploader *u);
+
+static const char *arg_key = NULL;
+static const char *arg_cert = NULL;
+static const char *arg_trust = NULL;
+
+static const char *arg_directory = NULL;
+static char **arg_file = NULL;
+static const char *arg_cursor = NULL;
+static bool arg_after_cursor = false;
+static int arg_journal_type = 0;
+static const char *arg_machine = NULL;
+static bool arg_merge = false;
+static int arg_follow = -1;
+static const char *arg_save_state = NULL;
+
+#define SERVER_ANSWER_KEEP 2048
+
+#define STATE_FILE "/var/lib/systemd/journal-upload/state"
+
+#define easy_setopt(curl, opt, value, level, cmd)                       \
+        do {                                                            \
+                code = curl_easy_setopt(curl, opt, value);              \
+                if (code) {                                             \
+                        log_full(level,                                 \
+                                 "curl_easy_setopt " #opt " failed: %s", \
+                                  curl_easy_strerror(code));            \
+                        cmd;                                            \
+                }                                                       \
+        } while(0)
+
+static size_t output_callback(char *buf,
+                              size_t size,
+                              size_t nmemb,
+                              void *userp) {
+        Uploader *u = userp;
+
+        assert(u);
+
+        log_debug("The server answers (%zu bytes): %.*s",
+                  size*nmemb, (int)(size*nmemb), buf);
+
+        if (nmemb && !u->answer) {
+                u->answer = strndup(buf, size*nmemb);
+                if (!u->answer)
+                        log_warning("Failed to store server answer (%zu bytes): %s",
+                                    size*nmemb, strerror(ENOMEM));
+        }
+
+        return size * nmemb;
+}
+
+static int check_cursor_updating(Uploader *u) {
+        _cleanup_free_ char *temp_path = NULL;
+        _cleanup_fclose_ FILE *f = NULL;
+        int r;
+
+        if (!u->state_file)
+                return 0;
+
+        r = mkdir_parents(u->state_file, 0755);
+        if (r < 0) {
+                log_error("Cannot create parent directory of state file %s: %s",
+                          u->state_file, strerror(-r));
+                return r;
+        }
+
+        r = fopen_temporary(u->state_file, &f, &temp_path);
+        if (r < 0) {
+                log_error("Cannot save state to %s: %s",
+                          u->state_file, strerror(-r));
+                return r;
+        }
+        unlink(temp_path);
+
+        return 0;
+}
+
+static int update_cursor_state(Uploader *u) {
+        _cleanup_free_ char *temp_path = NULL;
+        _cleanup_fclose_ FILE *f = NULL;
+        int r;
+
+        if (!u->state_file || !u->last_cursor)
+                return 0;
+
+        r = fopen_temporary(u->state_file, &f, &temp_path);
+        if (r < 0)
+                goto finish;
+
+        fprintf(f,
+                "# This is private data. Do not parse.\n"
+                "LAST_CURSOR=%s\n",
+                u->last_cursor);
+
+        fflush(f);
+
+        if (ferror(f) || rename(temp_path, u->state_file) < 0) {
+                r = -errno;
+                unlink(u->state_file);
+                unlink(temp_path);
+        }
+
+finish:
+        if (r < 0)
+                log_error("Failed to save state %s: %s", u->state_file, strerror(-r));
+
+        return r;
+}
+
+static int load_cursor_state(Uploader *u) {
+        int r;
+
+        if (!u->state_file)
+                return 0;
+
+        r = parse_env_file(u->state_file, NEWLINE,
+                           "LAST_CURSOR",  &u->last_cursor,
+                           NULL);
+
+        if (r == -ENOENT)
+                log_debug("State file %s is not present.", u->state_file);
+        else if (r < 0) {
+                log_error("Failed to read state file %s: %s",
+                          u->state_file, strerror(-r));
+                return r;
+        } else
+                log_debug("Last cursor was %s", u->last_cursor);
+
+        return 0;
+}
+
+
+
+int start_upload(Uploader *u,
+                 size_t (*input_callback)(void *ptr,
+                                          size_t size,
+                                          size_t nmemb,
+                                          void *userdata),
+                 void *data) {
+        CURLcode code;
+
+        assert(u);
+        assert(input_callback);
+
+        if (!u->header) {
+                struct curl_slist *h;
+
+                h = curl_slist_append(NULL, "Content-Type: application/vnd.fdo.journal");
+                if (!h)
+                        return log_oom();
+
+                h = curl_slist_append(h, "Transfer-Encoding: chunked");
+                if (!h) {
+                        curl_slist_free_all(h);
+                        return log_oom();
+                }
+
+                h = curl_slist_append(h, "Accept: text/plain");
+                if (!h) {
+                        curl_slist_free_all(h);
+                        return log_oom();
+                }
+
+                u->header = h;
+        }
+
+        if (!u->easy) {
+                CURL *curl;
+
+                curl = curl_easy_init();
+                if (!curl) {
+                        log_error("Call to curl_easy_init failed.");
+                        return -ENOSR;
+                }
+
+                /* tell it to POST to the URL */
+                easy_setopt(curl, CURLOPT_POST, 1L,
+                            LOG_ERR, return -EXFULL);
+
+                easy_setopt(curl, CURLOPT_ERRORBUFFER, u->error,
+                            LOG_ERR, return -EXFULL);
+
+                /* set where to write to */
+                easy_setopt(curl, CURLOPT_WRITEFUNCTION, output_callback,
+                            LOG_ERR, return -EXFULL);
+
+                easy_setopt(curl, CURLOPT_WRITEDATA, data,
+                            LOG_ERR, return -EXFULL);
+
+                /* set where to read from */
+                easy_setopt(curl, CURLOPT_READFUNCTION, input_callback,
+                            LOG_ERR, return -EXFULL);
+
+                easy_setopt(curl, CURLOPT_READDATA, data,
+                            LOG_ERR, return -EXFULL);
+
+                /* use our special own mime type and chunked transfer */
+                easy_setopt(curl, CURLOPT_HTTPHEADER, u->header,
+                            LOG_ERR, return -EXFULL);
+
+                /* enable verbose for easier tracing */
+                easy_setopt(curl, CURLOPT_VERBOSE, 1L, LOG_WARNING, );
+
+                easy_setopt(curl, CURLOPT_USERAGENT,
+                            "systemd-journal-upload " PACKAGE_STRING,
+                            LOG_WARNING, );
+
+                if (arg_key || startswith(u->url, "https://")) {
+                        easy_setopt(curl, CURLOPT_SSLKEY, arg_key ?: PRIV_KEY_FILE,
+                                    LOG_ERR, return -EXFULL);
+                        easy_setopt(curl, CURLOPT_SSLCERT, arg_cert ?: CERT_FILE,
+                                    LOG_ERR, return -EXFULL);
+                }
+
+                if (streq_ptr(arg_trust, "all"))
+                        easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0,
+                                    LOG_ERR, return -EUCLEAN);
+                else if (arg_trust || startswith(u->url, "https://"))
+                        easy_setopt(curl, CURLOPT_CAINFO, arg_trust ?: TRUST_FILE,
+                                    LOG_ERR, return -EXFULL);
+
+                if (arg_key || arg_trust)
+                        easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1,
+                                    LOG_WARNING, );
+
+                u->easy = curl;
+        } else {
+                /* truncate the potential old error message */
+                u->error[0] = '\0';
+
+                free(u->answer);
+                u->answer = 0;
+        }
+
+        /* upload to this place */
+        code = curl_easy_setopt(u->easy, CURLOPT_URL, u->url);
+        if (code) {
+                log_error("curl_easy_setopt CURLOPT_URL failed: %s",
+                          curl_easy_strerror(code));
+                return -EXFULL;
+        }
+
+        u->uploading = true;
+
+        return 0;
+}
+
+static size_t fd_input_callback(void *buf, size_t size, size_t nmemb, void *userp) {
+        Uploader *u = userp;
+
+        ssize_t r;
+
+        assert(u);
+        assert(nmemb <= SSIZE_MAX / size);
+
+        if (u->input < 0)
+                return 0;
+
+        r = read(u->input, buf, size * nmemb);
+        log_debug("%s: allowed %zu, read %zu", __func__, size*nmemb, r);
+
+        if (r > 0)
+                return r;
+
+        u->uploading = false;
+        if (r == 0) {
+                log_debug("Reached EOF");
+                close_fd_input(u);
+                return 0;
+        } else {
+                log_error("Aborting transfer after read error on input: %m.");
+                return CURL_READFUNC_ABORT;
+        }
+}
+
+static void close_fd_input(Uploader *u) {
+        assert(u);
+
+        if (u->input >= 0)
+                close_nointr(u->input);
+        u->input = -1;
+        u->timeout = 0;
+}
+
+static int dispatch_fd_input(sd_event_source *event,
+                             int fd,
+                             uint32_t revents,
+                             void *userp) {
+        Uploader *u = userp;
+
+        assert(u);
+        assert(fd >= 0);
+
+        if (revents & EPOLLHUP) {
+                log_debug("Received HUP");
+                close_fd_input(u);
+                return 0;
+        }
+
+        if (!(revents & EPOLLIN)) {
+                log_warning("Unexpected poll event %"PRIu32".", revents);
+                return -EINVAL;
+        }
+
+        if (u->uploading) {
+                log_warning("dispatch_fd_input called when uploading, ignoring.");
+                return 0;
+        }
+
+        return start_upload(u, fd_input_callback, u);
+}
+
+static int open_file_for_upload(Uploader *u, const char *filename) {
+        int fd, r = 0;
+
+        if (streq(filename, "-"))
+                fd = STDIN_FILENO;
+        else {
+                fd = open(filename, O_RDONLY|O_CLOEXEC|O_NOCTTY);
+                if (fd < 0) {
+                        log_error("Failed to open %s: %m", filename);
+                        return -errno;
+                }
+        }
+
+        u->input = fd;
+
+        if (arg_follow) {
+                r = sd_event_add_io(u->events, &u->input_event,
+                                    fd, EPOLLIN, dispatch_fd_input, u);
+                if (r < 0) {
+                        if (r != -EPERM || arg_follow > 0) {
+                                log_error("Failed to register input event: %s", strerror(-r));
+                                return r;
+                        }
+
+                        /* Normal files should just be consumed without polling. */
+                        r = start_upload(u, fd_input_callback, u);
+                }
+        }
+
+        return r;
+}
+
+static int dispatch_sigterm(sd_event_source *event,
+                            const struct signalfd_siginfo *si,
+                            void *userdata) {
+        Uploader *u = userdata;
+
+        assert(u);
+
+        log_received_signal(LOG_INFO, si);
+
+        close_fd_input(u);
+        close_journal_input(u);
+
+        sd_event_exit(u->events, 0);
+        return 0;
+}
+
+static int setup_signals(Uploader *u) {
+        sigset_t mask;
+        int r;
+
+        assert(u);
+
+        assert_se(sigemptyset(&mask) == 0);
+        sigset_add_many(&mask, SIGINT, SIGTERM, -1);
+        assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
+
+        r = sd_event_add_signal(u->events, &u->sigterm_event, SIGTERM, dispatch_sigterm, u);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(u->events, &u->sigint_event, SIGINT, dispatch_sigterm, u);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int setup_uploader(Uploader *u, const char *url, const char *state_file) {
+        int r;
+        const char *host, *proto = "";
+
+        assert(u);
+        assert(url);
+
+        memzero(u, sizeof(Uploader));
+        u->input = -1;
+
+        if (!(host = startswith(url, "http://")) && !(host = startswith(url, "https://"))) {
+                host = url;
+                proto = "https://";
+        }
+
+        if (strchr(host, ':'))
+                u->url = strjoin(proto, url, "/upload", NULL);
+        else {
+                char *t;
+                size_t x;
+
+                t = strdupa(url);
+                x = strlen(t);
+                while (x > 0 && t[x - 1] == '/')
+                        t[x - 1] = '\0';
+
+                u->url = strjoin(proto, t, ":" STRINGIFY(DEFAULT_PORT), "/upload", NULL);
+        }
+        if (!u->url)
+                return log_oom();
+
+        u->state_file = state_file;
+
+        r = sd_event_default(&u->events);
+        if (r < 0) {
+                log_error("sd_event_default failed: %s", strerror(-r));
+                return r;
+        }
+
+        r = setup_signals(u);
+        if (r < 0) {
+                log_error("Failed to set up signals: %s", strerror(-r));
+                return r;
+        }
+
+        return load_cursor_state(u);
+}
+
+static void destroy_uploader(Uploader *u) {
+        assert(u);
+
+        curl_easy_cleanup(u->easy);
+        curl_slist_free_all(u->header);
+        free(u->answer);
+
+        free(u->last_cursor);
+        free(u->current_cursor);
+
+        free(u->url);
+
+        u->input_event = sd_event_source_unref(u->input_event);
+
+        close_fd_input(u);
+        close_journal_input(u);
+
+        sd_event_source_unref(u->sigterm_event);
+        sd_event_source_unref(u->sigint_event);
+        sd_event_unref(u->events);
+}
+
+static int perform_upload(Uploader *u) {
+        CURLcode code;
+        long status;
+
+        assert(u);
+
+        code = curl_easy_perform(u->easy);
+        if (code) {
+                if (u->error[0])
+                        log_error("Upload to %s failed: %.*s",
+                                  u->url, (int) sizeof(u->error), u->error);
+                else
+                        log_error("Upload to %s failed: %s",
+                                  u->url, curl_easy_strerror(code));
+                return -EIO;
+        }
+
+        code = curl_easy_getinfo(u->easy, CURLINFO_RESPONSE_CODE, &status);
+        if (code) {
+                log_error("Failed to retrieve response code: %s",
+                          curl_easy_strerror(code));
+                return -EUCLEAN;
+        }
+
+        if (status >= 300) {
+                log_error("Upload to %s failed with code %lu: %s",
+                          u->url, status, strna(u->answer));
+                return -EIO;
+        } else if (status < 200) {
+                log_error("Upload to %s finished with unexpected code %lu: %s",
+                          u->url, status, strna(u->answer));
+                return -EIO;
+        } else
+                log_debug("Upload finished successfully with code %lu: %s",
+                          status, strna(u->answer));
+
+        free(u->last_cursor);
+        u->last_cursor = u->current_cursor;
+        u->current_cursor = NULL;
+
+        return update_cursor_state(u);
+}
+
+static int parse_config(void) {
+        const ConfigTableItem items[] = {
+                { "Upload",  "URL",                    config_parse_string, 0, &arg_url    },
+                { "Upload",  "ServerKeyFile",          config_parse_path,   0, &arg_key    },
+                { "Upload",  "ServerCertificateFile",  config_parse_path,   0, &arg_cert   },
+                { "Upload",  "TrustedCertificateFile", config_parse_path,   0, &arg_trust  },
+                {}};
+
+        return config_parse(NULL, PKGSYSCONFDIR "/journal-upload.conf", NULL,
+                            "Upload\0",
+                            config_item_table_lookup, items,
+                            false, false, true, NULL);
+}
+
+static void help(void) {
+        printf("%s -u URL {FILE|-}...\n\n"
+               "Upload journal events to a remote server.\n\n"
+               "  -h --help                 Show this help\n"
+               "     --version              Show package version\n"
+               "  -u --url=URL              Upload to this address (default port "
+                                            STRINGIFY(DEFAULT_PORT) ")\n"
+               "     --key=FILENAME         Specify key in PEM format (default:\n"
+               "                            \"" PRIV_KEY_FILE "\")\n"
+               "     --cert=FILENAME        Specify certificate in PEM format (default:\n"
+               "                            \"" CERT_FILE "\")\n"
+               "     --trust=FILENAME|all   Specify CA certificate or disable checking (default:\n"
+               "                            \"" TRUST_FILE "\")\n"
+               "     --system               Use the system journal\n"
+               "     --user                 Use the user journal for the current user\n"
+               "  -m --merge                Use  all available journals\n"
+               "  -M --machine=CONTAINER    Operate on local container\n"
+               "  -D --directory=PATH       Use journal files from directory\n"
+               "     --file=PATH            Use this journal file\n"
+               "     --cursor=CURSOR        Start at the specified cursor\n"
+               "     --after-cursor=CURSOR  Start after the specified cursor\n"
+               "     --follow[=BOOL]        Do [not] wait for input\n"
+               "     --save-state[=FILE]    Save uploaded cursors (default \n"
+               "                            " STATE_FILE ")\n"
+               "  -h --help                 Show this help and exit\n"
+               "     --version              Print version string and exit\n"
+               , program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_KEY,
+                ARG_CERT,
+                ARG_TRUST,
+                ARG_USER,
+                ARG_SYSTEM,
+                ARG_FILE,
+                ARG_CURSOR,
+                ARG_AFTER_CURSOR,
+                ARG_FOLLOW,
+                ARG_SAVE_STATE,
+        };
+
+        static const struct option options[] = {
+                { "help",         no_argument,       NULL, 'h'                },
+                { "version",      no_argument,       NULL, ARG_VERSION        },
+                { "url",          required_argument, NULL, 'u'                },
+                { "key",          required_argument, NULL, ARG_KEY            },
+                { "cert",         required_argument, NULL, ARG_CERT           },
+                { "trust",        required_argument, NULL, ARG_TRUST          },
+                { "system",       no_argument,       NULL, ARG_SYSTEM         },
+                { "user",         no_argument,       NULL, ARG_USER           },
+                { "merge",        no_argument,       NULL, 'm'                },
+                { "machine",      required_argument, NULL, 'M'                },
+                { "directory",    required_argument, NULL, 'D'                },
+                { "file",         required_argument, NULL, ARG_FILE           },
+                { "cursor",       required_argument, NULL, ARG_CURSOR         },
+                { "after-cursor", required_argument, NULL, ARG_AFTER_CURSOR   },
+                { "follow",       optional_argument, NULL, ARG_FOLLOW         },
+                { "save-state",   optional_argument, NULL, ARG_SAVE_STATE     },
+                {}
+        };
+
+        int c, r;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        opterr = 0;
+
+        while ((c = getopt_long(argc, argv, "hu:mM:D:", options, NULL)) >= 0)
+                switch(c) {
+                case 'h':
+                        help();
+                        return 0 /* done */;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0 /* done */;
+
+                case 'u':
+                        if (arg_url) {
+                                log_error("cannot use more than one --url");
+                                return -EINVAL;
+                        }
+
+                        arg_url = optarg;
+                        break;
+
+                case ARG_KEY:
+                        if (arg_key) {
+                                log_error("cannot use more than one --key");
+                                return -EINVAL;
+                        }
+
+                        arg_key = optarg;
+                        break;
+
+                case ARG_CERT:
+                        if (arg_cert) {
+                                log_error("cannot use more than one --cert");
+                                return -EINVAL;
+                        }
+
+                        arg_cert = optarg;
+                        break;
+
+                case ARG_TRUST:
+                        if (arg_trust) {
+                                log_error("cannot use more than one --trust");
+                                return -EINVAL;
+                        }
+
+                        arg_trust = optarg;
+                        break;
+
+                case ARG_SYSTEM:
+                        arg_journal_type |= SD_JOURNAL_SYSTEM;
+                        break;
+
+                case ARG_USER:
+                        arg_journal_type |= SD_JOURNAL_CURRENT_USER;
+                        break;
+
+                case 'm':
+                        arg_merge = true;
+                        break;
+
+                case 'M':
+                        if (arg_machine) {
+                                log_error("cannot use more than one --machine/-M");
+                                return -EINVAL;
+                        }
+
+                        arg_machine = optarg;
+                        break;
+
+                case 'D':
+                        if (arg_directory) {
+                                log_error("cannot use more than one --directory/-D");
+                                return -EINVAL;
+                        }
+
+                        arg_directory = optarg;
+                        break;
+
+                case ARG_FILE:
+                        r = glob_extend(&arg_file, optarg);
+                        if (r < 0) {
+                                log_error("Failed to add paths: %s", strerror(-r));
+                                return r;
+                        };
+                        break;
+
+                case ARG_CURSOR:
+                        if (arg_cursor) {
+                                log_error("cannot use more than one --cursor/--after-cursor");
+                                return -EINVAL;
+                        }
+
+                        arg_cursor = optarg;
+                        break;
+
+                case ARG_AFTER_CURSOR:
+                        if (arg_cursor) {
+                                log_error("cannot use more than one --cursor/--after-cursor");
+                                return -EINVAL;
+                        }
+
+                        arg_cursor = optarg;
+                        arg_after_cursor = true;
+                        break;
+
+                case ARG_FOLLOW:
+                        if (optarg) {
+                                r = parse_boolean(optarg);
+                                if (r < 0) {
+                                        log_error("Failed to parse --follow= parameter.");
+                                        return -EINVAL;
+                                }
+
+                                arg_follow = !!r;
+                        } else
+                                arg_follow = true;
+
+                        break;
+
+                case ARG_SAVE_STATE:
+                        arg_save_state = optarg ?: STATE_FILE;
+                        break;
+
+                case '?':
+                        log_error("Unknown option %s.", argv[optind-1]);
+                        return -EINVAL;
+
+                case ':':
+                        log_error("Missing argument to %s.", argv[optind-1]);
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option code.");
+                }
+
+        if (!arg_url) {
+                log_error("Required --url/-u option missing.");
+                return -EINVAL;
+        }
+
+        if (!!arg_key != !!arg_cert) {
+                log_error("Options --key and --cert must be used together.");
+                return -EINVAL;
+        }
+
+        if (optind < argc && (arg_directory || arg_file || arg_machine || arg_journal_type)) {
+                log_error("Input arguments make no sense with journal input.");
+                return -EINVAL;
+        }
+
+        return 1;
+}
+
+static int open_journal(sd_journal **j) {
+        int r;
+
+        if (arg_directory)
+                r = sd_journal_open_directory(j, arg_directory, arg_journal_type);
+        else if (arg_file)
+                r = sd_journal_open_files(j, (const char**) arg_file, 0);
+        else if (arg_machine)
+                r = sd_journal_open_container(j, arg_machine, 0);
+        else
+                r = sd_journal_open(j, !arg_merge*SD_JOURNAL_LOCAL_ONLY + arg_journal_type);
+        if (r < 0)
+                log_error("Failed to open %s: %s",
+                          arg_directory ? arg_directory : arg_file ? "files" : "journal",
+                          strerror(-r));
+        return r;
+}
+
+int main(int argc, char **argv) {
+        Uploader u;
+        int r;
+        bool use_journal;
+
+        log_show_color(true);
+        log_parse_environment();
+
+        r = parse_config();
+        if (r < 0)
+                goto finish;
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto finish;
+
+        r = setup_uploader(&u, arg_url, arg_save_state);
+        if (r < 0)
+                goto cleanup;
+
+        sd_event_set_watchdog(u.events, true);
+
+        r = check_cursor_updating(&u);
+        if (r < 0)
+                goto cleanup;
+
+        log_debug("%s running as pid "PID_FMT,
+                  program_invocation_short_name, getpid());
+
+        use_journal = optind >= argc;
+        if (use_journal) {
+                sd_journal *j;
+                r = open_journal(&j);
+                if (r < 0)
+                        goto finish;
+                r = open_journal_for_upload(&u, j,
+                                            arg_cursor ?: u.last_cursor,
+                                            arg_cursor ? arg_after_cursor : true,
+                                            !!arg_follow);
+                if (r < 0)
+                        goto finish;
+        }
+
+        sd_notify(false,
+                  "READY=1\n"
+                  "STATUS=Processing input...");
+
+        while (true) {
+                r = sd_event_get_state(u.events);
+                if (r < 0)
+                        break;
+                if (r == SD_EVENT_FINISHED)
+                        break;
+
+                if (use_journal) {
+                        if (!u.journal)
+                                break;
+
+                        r = check_journal_input(&u);
+                } else if (u.input < 0 && !use_journal) {
+                        if (optind >= argc)
+                                break;
+
+                        log_debug("Using %s as input.", argv[optind]);
+                        r = open_file_for_upload(&u, argv[optind++]);
+                }
+                if (r < 0)
+                        goto cleanup;
+
+                if (u.uploading) {
+                        r = perform_upload(&u);
+                        if (r < 0)
+                                break;
+                }
+
+                r = sd_event_run(u.events, u.timeout);
+                if (r < 0) {
+                        log_error("Failed to run event loop: %s", strerror(-r));
+                        break;
+                }
+        }
+
+cleanup:
+        sd_notify(false,
+                  "STOPPING=1\n"
+                  "STATUS=Shutting down...");
+
+        destroy_uploader(&u);
+
+finish:
+        return r >= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/journal-remote/journal-upload.conf.in b/src/journal-remote/journal-upload.conf.in
new file mode 100644 (file)
index 0000000..c567068
--- /dev/null
@@ -0,0 +1,5 @@
+[Upload]
+# URL=
+# ServerKeyFile=@CERTIFICATEROOT@/private/journal-upload.pem
+# ServerCertificateFile=@CERTIFICATEROOT@/certs/journal-upload.pem
+# TrustedCertificateFile=@CERTIFICATEROOT@/ca/trusted.pem
diff --git a/src/journal-remote/journal-upload.h b/src/journal-remote/journal-upload.h
new file mode 100644 (file)
index 0000000..3b46fa8
--- /dev/null
@@ -0,0 +1,68 @@
+#pragma once
+
+#include <inttypes.h>
+
+#include "sd-journal.h"
+#include "sd-event.h"
+
+typedef enum {
+        ENTRY_CURSOR = 0,           /* Nothing actually written yet. */
+        ENTRY_REALTIME,
+        ENTRY_MONOTONIC,
+        ENTRY_BOOT_ID,
+        ENTRY_NEW_FIELD,            /* In between fields. */
+        ENTRY_TEXT_FIELD,           /* In the middle of a text field. */
+        ENTRY_BINARY_FIELD_START,   /* Writing the name of a binary field. */
+        ENTRY_BINARY_FIELD_SIZE,    /* Writing the size of a binary field. */
+        ENTRY_BINARY_FIELD,         /* In the middle of a binary field. */
+        ENTRY_OUTRO,                /* Writing '\n' */
+        ENTRY_DONE,                 /* Need to move to a new field. */
+} entry_state;
+
+typedef struct Uploader {
+        sd_event *events;
+        sd_event_source *sigint_event, *sigterm_event;
+
+        char *url;
+        CURL *easy;
+        bool uploading;
+        char error[CURL_ERROR_SIZE];
+        struct curl_slist *header;
+        char *answer;
+
+        sd_event_source *input_event;
+        uint64_t timeout;
+
+        /* fd stuff */
+        int input;
+
+        /* journal stuff */
+        sd_journal* journal;
+
+        entry_state entry_state;
+        const void *field_data;
+        size_t field_pos, field_length;
+
+        /* general metrics */
+        const char *state_file;
+
+        size_t entries_sent;
+        char *last_cursor, *current_cursor;
+} Uploader;
+
+#define JOURNAL_UPLOAD_POLL_TIMEOUT (10 * USEC_PER_SEC)
+
+int start_upload(Uploader *u,
+                 size_t (*input_callback)(void *ptr,
+                                          size_t size,
+                                          size_t nmemb,
+                                          void *userdata),
+                 void *data);
+
+int open_journal_for_upload(Uploader *u,
+                            sd_journal *j,
+                            const char *cursor,
+                            bool after_cursor,
+                            bool follow);
+void close_journal_input(Uploader *u);
+int check_journal_input(Uploader *u);
diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c
new file mode 100644 (file)
index 0000000..55c45f4
--- /dev/null
@@ -0,0 +1,303 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2012 Lennart Poettering
+  Copyright 2012 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "microhttpd-util.h"
+#include "log.h"
+#include "macro.h"
+#include "util.h"
+#include "strv.h"
+
+#ifdef HAVE_GNUTLS
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+#endif
+
+void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
+        char *f;
+
+        f = strappenda("microhttpd: ", fmt);
+
+        DISABLE_WARNING_FORMAT_NONLITERAL;
+        log_metav(LOG_INFO, NULL, 0, NULL, f, ap);
+        REENABLE_WARNING;
+}
+
+
+static int mhd_respond_internal(struct MHD_Connection *connection,
+                                enum MHD_RequestTerminationCode code,
+                                char *buffer,
+                                size_t size,
+                                enum MHD_ResponseMemoryMode mode) {
+        struct MHD_Response *response;
+        int r;
+
+        assert(connection);
+
+        response = MHD_create_response_from_buffer(size, buffer, mode);
+        if (!response)
+                return MHD_NO;
+
+        log_debug("Queing response %u: %s", code, buffer);
+        MHD_add_response_header(response, "Content-Type", "text/plain");
+        r = MHD_queue_response(connection, code, response);
+        MHD_destroy_response(response);
+
+        return r;
+}
+
+int mhd_respond(struct MHD_Connection *connection,
+                enum MHD_RequestTerminationCode code,
+                const char *message) {
+
+        return mhd_respond_internal(connection, code,
+                                    (char*) message, strlen(message),
+                                    MHD_RESPMEM_PERSISTENT);
+}
+
+int mhd_respond_oom(struct MHD_Connection *connection) {
+        return mhd_respond(connection, MHD_HTTP_SERVICE_UNAVAILABLE,  "Out of memory.\n");
+}
+
+int mhd_respondf(struct MHD_Connection *connection,
+                 enum MHD_RequestTerminationCode code,
+                 const char *format, ...) {
+
+        char *m;
+        int r;
+        va_list ap;
+
+        assert(connection);
+        assert(format);
+
+        va_start(ap, format);
+        r = vasprintf(&m, format, ap);
+        va_end(ap);
+
+        if (r < 0)
+                return respond_oom(connection);
+
+        return mhd_respond_internal(connection, code, m, r, MHD_RESPMEM_MUST_FREE);
+}
+
+#ifdef HAVE_GNUTLS
+
+static struct {
+        const char *const names[4];
+        int level;
+        bool enabled;
+} gnutls_log_map[] = {
+        { {"0"},                  LOG_DEBUG },
+        { {"1", "audit"},         LOG_WARNING, true}, /* gnutls session audit */
+        { {"2", "assert"},        LOG_DEBUG },        /* gnutls assert log */
+        { {"3", "hsk", "ext"},    LOG_DEBUG },        /* gnutls handshake log */
+        { {"4", "rec"},           LOG_DEBUG },        /* gnutls record log */
+        { {"5", "dtls"},          LOG_DEBUG },        /* gnutls DTLS log */
+        { {"6", "buf"},           LOG_DEBUG },
+        { {"7", "write", "read"}, LOG_DEBUG },
+        { {"8"},                  LOG_DEBUG },
+        { {"9", "enc", "int"},    LOG_DEBUG },
+};
+
+void log_func_gnutls(int level, const char *message) {
+        assert_se(message);
+
+        if (0 <= level && level < (int) ELEMENTSOF(gnutls_log_map)) {
+                if (gnutls_log_map[level].enabled)
+                        log_meta(gnutls_log_map[level].level, NULL, 0, NULL,
+                                 "gnutls %d/%s: %s", level, gnutls_log_map[level].names[1], message);
+        } else {
+                log_debug("Received GNUTLS message with unknown level %d.", level);
+                log_meta(LOG_DEBUG, NULL, 0, NULL, "gnutls: %s", message);
+        }
+}
+
+int log_enable_gnutls_category(const char *cat) {
+        unsigned i;
+
+        if (streq(cat, "all")) {
+                for (i = 0; i < ELEMENTSOF(gnutls_log_map); i++)
+                        gnutls_log_map[i].enabled = true;
+                log_reset_gnutls_level();
+                return 0;
+        } else
+                for (i = 0; i < ELEMENTSOF(gnutls_log_map); i++)
+                        if (strv_contains((char**)gnutls_log_map[i].names, cat)) {
+                                gnutls_log_map[i].enabled = true;
+                                log_reset_gnutls_level();
+                                return 0;
+                        }
+        log_error("No such log category: %s", cat);
+        return -EINVAL;
+}
+
+void log_reset_gnutls_level(void) {
+        int i;
+
+        for (i = ELEMENTSOF(gnutls_log_map) - 1; i >= 0; i--)
+                if (gnutls_log_map[i].enabled) {
+                        log_debug("Setting gnutls log level to %d", i);
+                        gnutls_global_set_log_level(i);
+                        break;
+                }
+}
+
+static int verify_cert_authorized(gnutls_session_t session) {
+        unsigned status;
+        gnutls_certificate_type_t type;
+        gnutls_datum_t out;
+        int r;
+
+        r = gnutls_certificate_verify_peers2(session, &status);
+        if (r < 0) {
+                log_error("gnutls_certificate_verify_peers2 failed: %s", strerror(-r));
+                return r;
+        }
+
+        type = gnutls_certificate_type_get(session);
+        r = gnutls_certificate_verification_status_print(status, type, &out, 0);
+        if (r < 0) {
+                log_error("gnutls_certificate_verification_status_print failed: %s", strerror(-r));
+                return r;
+        }
+
+        log_info("Certificate status: %s", out.data);
+
+        return status == 0 ? 0 : -EPERM;
+}
+
+static int get_client_cert(gnutls_session_t session, gnutls_x509_crt_t *client_cert) {
+        const gnutls_datum_t *pcert;
+        unsigned listsize;
+        gnutls_x509_crt_t cert;
+        int r;
+
+        assert(session);
+        assert(client_cert);
+
+        pcert = gnutls_certificate_get_peers(session, &listsize);
+        if (!pcert || !listsize) {
+                log_error("Failed to retrieve certificate chain");
+                return -EINVAL;
+        }
+
+        r = gnutls_x509_crt_init(&cert);
+        if (r < 0) {
+                log_error("Failed to initialize client certificate");
+                return r;
+        }
+
+        /* Note that by passing values between 0 and listsize here, you
+           can get access to the CA's certs */
+        r = gnutls_x509_crt_import(cert, &pcert[0], GNUTLS_X509_FMT_DER);
+        if (r < 0) {
+                log_error("Failed to import client certificate");
+                gnutls_x509_crt_deinit(cert);
+                return r;
+        }
+
+        *client_cert = cert;
+        return 0;
+}
+
+static int get_auth_dn(gnutls_x509_crt_t client_cert, char **buf) {
+        size_t len = 0;
+        int r;
+
+        assert(buf);
+        assert(*buf == NULL);
+
+        r = gnutls_x509_crt_get_dn(client_cert, NULL, &len);
+        if (r != GNUTLS_E_SHORT_MEMORY_BUFFER) {
+                log_error("gnutls_x509_crt_get_dn failed");
+                return r;
+        }
+
+        *buf = malloc(len);
+        if (!*buf)
+                return log_oom();
+
+        gnutls_x509_crt_get_dn(client_cert, *buf, &len);
+        return 0;
+}
+
+int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) {
+        const union MHD_ConnectionInfo *ci;
+        gnutls_session_t session;
+        gnutls_x509_crt_t client_cert;
+        _cleanup_free_ char *buf = NULL;
+        int r;
+
+        assert(connection);
+        assert(code);
+
+        *code = 0;
+
+        ci = MHD_get_connection_info(connection,
+                                     MHD_CONNECTION_INFO_GNUTLS_SESSION);
+        if (!ci) {
+                log_error("MHD_get_connection_info failed: session is unencrypted");
+                *code = mhd_respond(connection, MHD_HTTP_FORBIDDEN,
+                                    "Encrypted connection is required");
+                return -EPERM;
+        }
+        session = ci->tls_session;
+        assert(session);
+
+        r = get_client_cert(session, &client_cert);
+        if (r < 0) {
+                *code = mhd_respond(connection, MHD_HTTP_UNAUTHORIZED,
+                                    "Authorization through certificate is required");
+                return -EPERM;
+        }
+
+        r = get_auth_dn(client_cert, &buf);
+        if (r < 0) {
+                *code = mhd_respond(connection, MHD_HTTP_UNAUTHORIZED,
+                                    "Failed to determine distinguished name from certificate");
+                return -EPERM;
+        }
+
+        log_info("Connection from %s", buf);
+
+        if (hostname) {
+                *hostname = buf;
+                buf = NULL;
+        }
+
+        r = verify_cert_authorized(session);
+        if (r < 0) {
+                log_warning("Client is not authorized");
+                *code = mhd_respond(connection, MHD_HTTP_UNAUTHORIZED,
+                                    "Client certificate not signed by recognized authority");
+        }
+        return r;
+}
+
+#else
+int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) {
+        return -EPERM;
+}
+#endif
diff --git a/src/journal-remote/microhttpd-util.h b/src/journal-remote/microhttpd-util.h
new file mode 100644 (file)
index 0000000..c43d7f7
--- /dev/null
@@ -0,0 +1,55 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2012 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#pragma once
+
+#include <stdarg.h>
+#include <microhttpd.h>
+
+#include "macro.h"
+
+void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0);
+
+/* respond_oom() must be usable with return, hence this form. */
+#define respond_oom(connection) log_oom(), mhd_respond_oom(connection)
+
+int mhd_respondf(struct MHD_Connection *connection,
+                 unsigned code,
+                 const char *format, ...) _printf_(3,4);
+
+int mhd_respond(struct MHD_Connection *connection,
+                unsigned code,
+                const char *message);
+
+int mhd_respond_oom(struct MHD_Connection *connection);
+
+int check_permissions(struct MHD_Connection *connection, int *code, char **hostname);
+
+#ifdef HAVE_GNUTLS
+void log_func_gnutls(int level, const char *message);
+int log_enable_gnutls_category(const char *cat);
+void log_reset_gnutls_level(void);
+
+/* This is additionally filtered by our internal log level, so it
+ * should be set fairly high to capture all potentially interesting
+ * events without overwhelming detail.
+ */
+#endif
diff --git a/src/journal/browse.html b/src/journal/browse.html
deleted file mode 100644 (file)
index 3594f70..0000000
+++ /dev/null
@@ -1,544 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-        <title>Journal</title>
-        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-        <style type="text/css">
-                div#divlogs, div#diventry {
-                        font-family: monospace;
-                        font-size: 7pt;
-                        background-color: #ffffff;
-                        padding: 1em;
-                        margin: 2em 0em;
-                        border-radius: 10px 10px 10px 10px;
-                        border: 1px solid threedshadow;
-                        white-space: nowrap;
-                        overflow-x: scroll;
-                }
-                div#diventry {
-                        display: none;
-                }
-                div#divlogs {
-                        display: block;
-                }
-                body {
-                        background-color: #ededed;
-                        color: #313739;
-                        font: message-box;
-                        margin: 3em;
-                }
-                td.timestamp {
-                        text-align: right;
-                        border-right: 1px dotted lightgrey;
-                        padding-right: 5px;
-                }
-                td.process {
-                        border-right: 1px dotted lightgrey;
-                        padding-left: 5px;
-                        padding-right: 5px;
-                }
-                td.message {
-                        padding-left: 5px;
-                }
-                td.message > a:link, td.message > a:visited {
-                        text-decoration: none;
-                        color: #313739;
-                }
-                td.message-error {
-                        padding-left: 5px;
-                        color: red;
-                        font-weight: bold;
-                }
-                td.message-error > a:link, td.message-error > a:visited {
-                        text-decoration: none;
-                        color: red;
-                }
-                td.message-highlight {
-                        padding-left: 5px;
-                        font-weight: bold;
-                }
-                td.message-highlight > a:link, td.message-highlight > a:visited {
-                        text-decoration: none;
-                        color: #313739;
-                }
-                td > a:hover, td > a:active {
-                        text-decoration: underline;
-                        color: #c13739;
-                }
-                table#tablelogs, table#tableentry {
-                        border-collapse: collapse;
-                }
-                td.field {
-                        text-align: right;
-                        border-right: 1px dotted lightgrey;
-                        padding-right: 5px;
-                }
-                td.data {
-                        padding-left: 5px;
-                }
-                div#keynav {
-                        text-align: center;
-                        font-size: 7pt;
-                        color: #818789;
-                        padding-top: 2em;
-                }
-                span.key {
-                        font-weight: bold;
-                        color: #313739;
-                }
-                div#buttonnav {
-                        text-align: center;
-                }
-                button {
-                        font-size: 18pt;
-                        font-weight: bold;
-                        width: 2em;
-                        height: 2em;
-                }
-                div#filternav {
-                        text-align: center;
-                }
-                select {
-                        width: 50em;
-                }
-        </style>
-</head>
-
-<body>
-        <!-- TODO:
-                - live display
-                - show red lines for reboots -->
-
-        <h1 id="title"></h1>
-
-        <div id="os"></div>
-        <div id="virtualization"></div>
-        <div id="cutoff"></div>
-        <div id="machine"></div>
-        <div id="usage"></div>
-        <div id="showing"></div>
-
-        <div id="filternav">
-                <select id="filter" onchange="onFilterChange(this);" onfocus="onFilterFocus(this);">
-                        <option>No filter</option>
-                </select>
-                &nbsp;&nbsp;&nbsp;&nbsp;
-                <input id="boot" type="checkbox" onchange="onBootChange(this);">Only current boot</input>
-        </div>
-
-        <div id="divlogs"><table id="tablelogs"></table></div>
-        <a name="entry"></a>
-        <div id="diventry"><table id="tableentry"></table></div>
-
-        <div id="buttonnav">
-                <button id="head" onclick="entriesLoadHead();" title="First Page">&#8676;</button>
-                <button id="previous" type="button" onclick="entriesLoadPrevious();" title="Previous Page"/>&#8592;</button>
-                <button id="next" type="button" onclick="entriesLoadNext();" title="Next Page"/>&#8594;</button>
-                <button id="tail" type="button" onclick="entriesLoadTail();" title="Last Page"/>&#8677;</button>
-                &nbsp;&nbsp;&nbsp;&nbsp;
-                <button id="more" type="button" onclick="entriesMore();" title="More Entries"/>+</button>
-                <button id="less" type="button" onclick="entriesLess();" title="Fewer Entries"/>-</button>
-        </div>
-
-        <div id="keynav">
-                <span class="key">g</span>: First Page &nbsp;&nbsp;&nbsp;&nbsp;
-                <span class="key">&#8592;, k, BACKSPACE</span>: Previous Page &nbsp;&nbsp;&nbsp;&nbsp;
-                <span class="key">&#8594;, j, SPACE</span>: Next Page &nbsp;&nbsp;&nbsp;&nbsp;
-                <span class="key">G</span>: Last Page &nbsp;&nbsp;&nbsp;&nbsp;
-                <span class="key">+</span>: More entries &nbsp;&nbsp;&nbsp;&nbsp;
-                <span class="key">-</span>: Fewer entries
-        </div>
-
-        <script type="text/javascript">
-                var first_cursor = null;
-                var last_cursor = null;
-
-                function getNEntries() {
-                        var n;
-                        n = localStorage["n_entries"];
-                        if (n == null)
-                                return 50;
-                        n = parseInt(n);
-                        if (n < 10)
-                                return 10;
-                        if (n > 1000)
-                                return 1000;
-                        return n;
-                }
-
-                function showNEntries(n) {
-                        var showing = document.getElementById("showing");
-                        showing.innerHTML = "Showing <b>" + n.toString() + "</b> entries.";
-                }
-
-                function setNEntries(n) {
-                        if (n < 10)
-                                return 10;
-                        if (n > 1000)
-                                return 1000;
-                        localStorage["n_entries"] = n.toString();
-                        showNEntries(n);
-                }
-
-                function machineLoad() {
-                        var request = new XMLHttpRequest();
-                        request.open("GET", "/machine");
-                        request.onreadystatechange = machineOnResult;
-                        request.setRequestHeader("Accept", "application/json");
-                        request.send(null);
-                }
-
-                function formatBytes(u) {
-                        if (u >= 1024*1024*1024*1024)
-                                return (u/1024/1024/1024/1024).toFixed(1) + " TiB";
-                        else if (u >= 1024*1024*1024)
-                                return (u/1024/1024/1024).toFixed(1) + " GiB";
-                        else if (u >= 1024*1024)
-                                return (u/1024/1024).toFixed(1) + " MiB";
-                        else if (u >= 1024)
-                                return (u/1024).toFixed(1) + " KiB";
-                        else
-                                return u.toString() + " B";
-                }
-
-                function escapeHTML(s) {
-                        return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
-                }
-
-                function machineOnResult(event) {
-                        if ((event.currentTarget.readyState != 4) ||
-                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
-                                return;
-
-                        var d = JSON.parse(event.currentTarget.responseText);
-
-                        var title = document.getElementById("title");
-                        title.innerHTML = 'Journal of ' + escapeHTML(d.hostname);
-                        document.title = 'Journal of ' + escapeHTML(d.hostname);
-
-                        var machine = document.getElementById("machine");
-                        machine.innerHTML = 'Machine ID is <b>' + d.machine_id + '</b>, current boot ID is <b>' + d.boot_id + '</b>.';
-
-                        var cutoff = document.getElementById("cutoff");
-                        var from = new Date(parseInt(d.cutoff_from_realtime) / 1000);
-                        var to = new Date(parseInt(d.cutoff_to_realtime) / 1000);
-                        cutoff.innerHTML = 'Journal begins at <b>' + from.toLocaleString() + '</b> and ends at <b>' + to.toLocaleString() + '</b>.';
-
-                        var usage = document.getElementById("usage");
-                        usage.innerHTML = 'Disk usage is <b>' + formatBytes(parseInt(d.usage)) + '</b>.';
-
-                        var os = document.getElementById("os");
-                        os.innerHTML = 'Operating system is <b>' + escapeHTML(d.os_pretty_name) + '</b>.';
-
-                        var virtualization = document.getElementById("virtualization");
-                        virtualization.innerHTML = d.virtualization == "bare" ? "Running on <b>bare metal</b>." : "Running on virtualization <b>" + escapeHTML(d.virtualization) + "</b>.";
-                }
-
-                function entriesLoad(range) {
-
-                        if (range == null)
-                                range = localStorage["cursor"] + ":0";
-                        if (range == null)
-                                range = "";
-
-                        var url = "/entries";
-
-                        if (localStorage["filter"] != "" && localStorage["filter"] != null) {
-                                url += "?_SYSTEMD_UNIT=" + escape(localStorage["filter"]);
-
-                                if (localStorage["boot"] == "1")
-                                        url += "&boot";
-                        } else {
-                                if (localStorage["boot"] == "1")
-                                        url += "?boot";
-                        }
-
-                        var request = new XMLHttpRequest();
-                        request.open("GET", url);
-                        request.onreadystatechange = entriesOnResult;
-                        request.setRequestHeader("Accept", "application/json");
-                        request.setRequestHeader("Range", "entries=" + range + ":" + getNEntries().toString());
-                        request.send(null);
-                }
-
-                function entriesLoadNext() {
-                        if (last_cursor == null)
-                                entriesLoad("");
-                        else
-                                entriesLoad(last_cursor + ":1");
-                }
-
-                function entriesLoadPrevious() {
-                        if (first_cursor == null)
-                                entriesLoad("");
-                        else
-                                entriesLoad(first_cursor + ":-" + getNEntries().toString());
-                }
-
-                function entriesLoadHead() {
-                        entriesLoad("");
-                }
-
-                function entriesLoadTail() {
-                        entriesLoad(":-" + getNEntries().toString());
-                }
-
-                function entriesOnResult(event) {
-
-                        if ((event.currentTarget.readyState != 4) ||
-                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
-                                return;
-
-                        var logs = document.getElementById("tablelogs");
-
-                        var lc = null;
-                        var fc = null;
-
-                        var i, l = event.currentTarget.responseText.split('\n');
-
-                        if (l.length <= 1) {
-                                logs.innerHTML = '<tbody><tr><td colspan="3"><i>No further entries...</i></td></tr></tbody>';
-                                return;
-                        }
-
-                        var buf = '';
-
-                        for (i in l) {
-
-                                if (l[i] == '')
-                                        continue;
-
-                                var d = JSON.parse(l[i]);
-                                if (d.MESSAGE == undefined || d.__CURSOR == undefined)
-                                        continue;
-
-                                if (fc == null)
-                                        fc = d.__CURSOR;
-                                lc = d.__CURSOR;
-
-                                var priority;
-                                if (d.PRIORITY != undefined)
-                                        priority = parseInt(d.PRIORITY);
-                                else
-                                        priority = 6;
-
-                                if (priority <= 3)
-                                        clazz = "message-error";
-                                else if (priority <= 5)
-                                        clazz = "message-highlight";
-                                else
-                                        clazz = "message";
-
-                                buf += '<tr><td class="timestamp">';
-
-                                if (d.__REALTIME_TIMESTAMP != undefined) {
-                                        var timestamp = new Date(parseInt(d.__REALTIME_TIMESTAMP) / 1000);
-                                        buf += timestamp.toLocaleString();
-                                }
-
-                                buf += '</td><td class="process">';
-
-                                if (d.SYSLOG_IDENTIFIER != undefined)
-                                        buf += escapeHTML(d.SYSLOG_IDENTIFIER);
-                                else if (d._COMM != undefined)
-                                        buf += escapeHTML(d._COMM);
-
-                                if (d._PID != undefined)
-                                        buf += "[" + escapeHTML(d._PID) + "]";
-                                else if (d.SYSLOG_PID != undefined)
-                                        buf += "[" + escapeHTML(d.SYSLOG_PID) + "]";
-
-                                buf += '</td><td class="' + clazz + '"><a href="#entry" onclick="onMessageClick(\'' + d.__CURSOR + '\');">';
-
-                                if (d.MESSAGE == null)
-                                        buf += "[blob data]";
-                                else if (d.MESSAGE instanceof Array)
-                                        buf += "[" + formatBytes(d.MESSAGE.length) + " blob data]";
-                                else
-                                        buf += escapeHTML(d.MESSAGE);
-
-                                buf += '</a></td></tr>';
-                        }
-
-                        logs.innerHTML = '<tbody>' + buf + '</tbody>';
-
-                        if (fc != null) {
-                                first_cursor = fc;
-                                localStorage["cursor"] = fc;
-                        }
-                        if (lc != null)
-                                last_cursor = lc;
-                }
-
-                function entriesMore() {
-                        setNEntries(getNEntries() + 10);
-                        entriesLoad(first_cursor);
-                }
-
-                function entriesLess() {
-                        setNEntries(getNEntries() - 10);
-                        entriesLoad(first_cursor);
-                }
-
-                function onResultMessageClick(event) {
-                        if ((event.currentTarget.readyState != 4) ||
-                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
-                                return;
-
-                        var d = JSON.parse(event.currentTarget.responseText);
-
-                        document.getElementById("diventry").style.display = "block";
-                        entry = document.getElementById("tableentry");
-
-                        var buf = "";
-                        for (var key in d){
-                                var data = d[key];
-
-                                if (data == null)
-                                        data = "[blob data]";
-                                else if (data instanceof Array)
-                                        data = "[" + formatBytes(data.length) + " blob data]";
-                                else
-                                        data = escapeHTML(data);
-
-                                buf += '<tr><td class="field">' + key + '</td><td class="data">' + data + '</td></tr>';
-                        }
-                        entry.innerHTML = '<tbody>' + buf + '</tbody>';
-                }
-
-                function onMessageClick(t) {
-                        var request = new XMLHttpRequest();
-                        request.open("GET", "/entries?discrete");
-                        request.onreadystatechange = onResultMessageClick;
-                        request.setRequestHeader("Accept", "application/json");
-                        request.setRequestHeader("Range", "entries=" + t + ":0:1");
-                        request.send(null);
-                }
-
-                function onKeyUp(event) {
-                        switch (event.keyCode) {
-                                case 8:
-                                case 37:
-                                case 75:
-                                        entriesLoadPrevious();
-                                        break;
-                                case 32:
-                                case 39:
-                                case 74:
-                                        entriesLoadNext();
-                                        break;
-
-                                case 71:
-                                        if (event.shiftKey)
-                                                entriesLoadTail();
-                                        else
-                                                entriesLoadHead();
-                                        break;
-                                case 171:
-                                        entriesMore();
-                                        break;
-                                case 173:
-                                        entriesLess();
-                                        break;
-                        }
-                }
-
-                function onMouseWheel(event) {
-                        if (event.detail < 0 || event.wheelDelta > 0)
-                                entriesLoadPrevious();
-                        else
-                                entriesLoadNext();
-                }
-
-                function onResultFilterFocus(event) {
-                        if ((event.currentTarget.readyState != 4) ||
-                                (event.currentTarget.status != 200 && event.currentTarget.status != 0))
-                                return;
-
-                        f = document.getElementById("filter");
-
-                        var l = event.currentTarget.responseText.split('\n');
-                        var buf = '<option>No filter</option>';
-                        var j = -1;
-
-                        for (i in l) {
-
-                                if (l[i] == '')
-                                      continue;
-
-                                var d = JSON.parse(l[i]);
-                                if (d._SYSTEMD_UNIT == undefined)
-                                      continue;
-
-                                buf += '<option value="' + escape(d._SYSTEMD_UNIT) + '">' + escapeHTML(d._SYSTEMD_UNIT) + '</option>';
-
-                                if (d._SYSTEMD_UNIT == localStorage["filter"])
-                                        j = i;
-                        }
-
-                        if (j < 0) {
-                                if (localStorage["filter"] != null && localStorage["filter"] != "") {
-                                          buf += '<option value="' + escape(localStorage["filter"]) + '">' + escapeHTML(localStorage["filter"]) + '</option>';
-                                          j = i + 1;
-                                } else
-                                          j = 0;
-                        }
-
-                        f.innerHTML = buf;
-                        f.selectedIndex = j;
-                }
-
-                function onFilterFocus(w) {
-                        var request = new XMLHttpRequest();
-                        request.open("GET", "/fields/_SYSTEMD_UNIT");
-                        request.onreadystatechange = onResultFilterFocus;
-                        request.setRequestHeader("Accept", "application/json");
-                        request.send(null);
-                }
-
-                function onFilterChange(w) {
-                        if (w.selectedIndex <= 0)
-                                localStorage["filter"] = "";
-                        else
-                                localStorage["filter"] = unescape(w.options[w.selectedIndex].value);
-
-                        entriesLoadHead();
-                }
-
-                function onBootChange(w) {
-                        localStorage["boot"] = w.checked ? "1" : "0";
-                        entriesLoadHead();
-                }
-
-                function initFilter() {
-                        f = document.getElementById("filter");
-
-                        var buf = '<option>No filter</option>';
-
-                        var filter = localStorage["filter"];
-                        if (filter != null && filter != "") {
-                                buf += '<option value="' + escape(filter) + '">' + escapeHTML(filter) + '</option>';
-                                j = 1;
-                        } else
-                                j = 0;
-
-                        f.innerHTML = buf;
-                        f.selectedIndex = j;
-                }
-
-                function installHandlers() {
-                        document.onkeyup = onKeyUp;
-
-                        logs = document.getElementById("divlogs");
-                        logs.addEventListener("mousewheel", onMouseWheel, false);
-                        logs.addEventListener("DOMMouseScroll", onMouseWheel, false);
-                }
-
-                machineLoad();
-                entriesLoad(null);
-                showNEntries(getNEntries());
-                initFilter();
-                installHandlers();
-        </script>
-</body>
-</html>
index 60625cb6ddd311d84ec0f51a404d58e2a4c9f007..627c0624a5064b26260b904b1f26572418e1ebfa 100644 (file)
@@ -27,7 +27,7 @@
 #include <errno.h>
 #include <fcntl.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "util.h"
 #include "build.h"
@@ -36,18 +36,15 @@ static char *arg_identifier = NULL;
 static int arg_priority = LOG_INFO;
 static bool arg_level_prefix = true;
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] {COMMAND} ...\n\n"
                "Execute process with stdout/stderr connected to the journal.\n\n"
                "  -h --help               Show this help\n"
                "     --version            Show package version\n"
                "  -t --identifier=STRING  Set syslog identifier\n"
                "  -p --priority=PRIORITY  Set priority value (0..7)\n"
-               "     --level-prefix=BOOL  Control whether level prefix shall be parsed\n",
-               program_invocation_short_name);
-
-        return 0;
+               "     --level-prefix=BOOL  Control whether level prefix shall be parsed\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -71,12 +68,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+ht:p:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "+ht:p:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -120,7 +118,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
index f03357dedf9bc87ca84a28873d7e330282eae981..41d450b1544d6fbf2e8e140e016b2b42c2625cc2 100644 (file)
@@ -64,7 +64,7 @@ typedef struct CatalogItem {
         le64_t offset;
 } CatalogItem;
 
-unsigned long catalog_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
+static unsigned long catalog_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
         const CatalogItem *i = p;
         uint64_t u;
         size_t l, sz;
@@ -81,7 +81,7 @@ unsigned long catalog_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_S
         return (unsigned long) u;
 }
 
-int catalog_compare_func(const void *a, const void *b) {
+static int catalog_compare_func(const void *a, const void *b) {
         const CatalogItem *i = a, *j = b;
         unsigned k;
 
@@ -95,6 +95,11 @@ int catalog_compare_func(const void *a, const void *b) {
         return strcmp(i->language, j->language);
 }
 
+const struct hash_ops catalog_hash_ops = {
+        .hash = catalog_hash_func,
+        .compare = catalog_compare_func
+};
+
 static int finish_item(
                 Hashmap *h,
                 struct strbuf *sb,
@@ -407,7 +412,7 @@ int catalog_update(const char* database, const char* root, const char* const* di
         unsigned n;
         long r;
 
-        h = hashmap_new(catalog_hash_func, catalog_compare_func);
+        h = hashmap_new(&catalog_hash_ops);
         sb = strbuf_new();
 
         if (!h || !sb) {
index fdde67aeedd87462ee4311bdcdd1afbea02c387f..a72ecf6de7d04a630d8805976989041b5585bbbf 100644 (file)
 #include "strbuf.h"
 
 int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path);
-unsigned long catalog_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]);
-int catalog_compare_func(const void *a, const void *b) _pure_;
 int catalog_update(const char* database, const char* root, const char* const* dirs);
 int catalog_get(const char* database, sd_id128_t id, char **data);
 int catalog_list(FILE *f, const char* database, bool oneline);
 int catalog_list_items(FILE *f, const char* database, bool oneline, char **items);
 int catalog_file_lang(const char *filename, char **lang);
 extern const char * const catalog_file_dirs[];
+extern const struct hash_ops catalog_hash_ops;
index 1fc62ead2a9b68ca9c4489d840d66a8dff7c0406..c4c715be2f5ad9d254efc3be27418dee65ae1056 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <lzma.h>
+
+#ifdef HAVE_XZ
+#  include <lzma.h>
+#endif
+
+#ifdef HAVE_LZ4
+#  include <lz4.h>
+#endif
 
 #include "compress.h"
 #include "macro.h"
 #include "util.h"
-
-bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size) {
+#include "sparse-endian.h"
+#include "journal-def.h"
+
+#define ALIGN_8(l) ALIGN_TO(l, sizeof(size_t))
+
+static const char* const object_compressed_table[_OBJECT_COMPRESSED_MAX] = {
+        [OBJECT_COMPRESSED_XZ] = "XZ",
+        [OBJECT_COMPRESSED_LZ4] = "LZ4",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(object_compressed, int);
+
+int compress_blob_xz(const void *src, uint64_t src_size, void *dst, size_t *dst_size) {
+#ifdef HAVE_XZ
+        static const lzma_options_lzma opt = {
+                1u << 20u, NULL, 0, LZMA_LC_DEFAULT, LZMA_LP_DEFAULT,
+                LZMA_PB_DEFAULT, LZMA_MODE_FAST, 128, LZMA_MF_HC3, 4};
+        static const lzma_filter filters[2] = {
+                {LZMA_FILTER_LZMA2, (lzma_options_lzma*) &opt},
+                {LZMA_VLI_UNKNOWN, NULL}
+        };
         lzma_ret ret;
         size_t out_pos = 0;
 
@@ -38,29 +64,60 @@ bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_
         assert(dst);
         assert(dst_size);
 
-        /* Returns false if we couldn't compress the data or the
+        /* Returns < 0 if we couldn't compress the data or the
          * compressed result is longer than the original */
 
-        ret = lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL,
-                                      src, src_size, dst, &out_pos, src_size);
-        if (ret != LZMA_OK)
-                return false;
+        if (src_size < 80)
+                return -ENOBUFS;
 
-        /* Is it actually shorter? */
-        if (out_pos == src_size)
-                return false;
+        ret = lzma_stream_buffer_encode((lzma_filter*) filters, LZMA_CHECK_NONE, NULL,
+                                        src, src_size, dst, &out_pos, src_size - 1);
+        if (ret != LZMA_OK)
+                return -ENOBUFS;
 
         *dst_size = out_pos;
-        return true;
+        return 0;
+#else
+        return -EPROTONOSUPPORT;
+#endif
+}
+
+int compress_blob_lz4(const void *src, uint64_t src_size, void *dst, size_t *dst_size) {
+#ifdef HAVE_LZ4
+        int r;
+
+        assert(src);
+        assert(src_size > 0);
+        assert(dst);
+        assert(dst_size);
+
+        /* Returns < 0 if we couldn't compress the data or the
+         * compressed result is longer than the original */
+
+        if (src_size < 9)
+                return -ENOBUFS;
+
+        r = LZ4_compress_limitedOutput(src, dst + 8, src_size, src_size - 8 - 1);
+        if (r <= 0)
+                return -ENOBUFS;
+
+        *(le64_t*) dst = htole64(src_size);
+        *dst_size = r + 8;
+
+        return 0;
+#else
+        return -EPROTONOSUPPORT;
+#endif
 }
 
-bool uncompress_blob(const void *src, uint64_t src_size,
-                     void **dst, uint64_t *dst_alloc_size, uint64_t* dst_size, uint64_t dst_max) {
 
-        lzma_stream s = LZMA_STREAM_INIT;
+int decompress_blob_xz(const void *src, uint64_t src_size,
+                       void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max) {
+
+#ifdef HAVE_XZ
+        _cleanup_(lzma_end) lzma_stream s = LZMA_STREAM_INIT;
         lzma_ret ret;
-        uint64_t space;
-        bool b = false;
+        size_t space;
 
         assert(src);
         assert(src_size > 0);
@@ -71,72 +128,113 @@ bool uncompress_blob(const void *src, uint64_t src_size,
 
         ret = lzma_stream_decoder(&s, UINT64_MAX, 0);
         if (ret != LZMA_OK)
-                return false;
-
-        if (*dst_alloc_size <= src_size) {
-                void *p;
+                return -ENOMEM;
 
-                p = realloc(*dst, src_size*2);
-                if (!p)
-                        return false;
-
-                *dst = p;
-                *dst_alloc_size = src_size*2;
-        }
+        space = MIN(src_size * 2, dst_max ?: (size_t) -1);
+        if (!greedy_realloc(dst, dst_alloc_size, space, 1))
+                return -ENOMEM;
 
         s.next_in = src;
         s.avail_in = src_size;
 
         s.next_out = *dst;
-        space = dst_max > 0 ? MIN(*dst_alloc_size, dst_max) : *dst_alloc_size;
         s.avail_out = space;
 
         for (;;) {
-                void *p;
+                size_t used;
 
                 ret = lzma_code(&s, LZMA_FINISH);
 
                 if (ret == LZMA_STREAM_END)
                         break;
-
-                if (ret != LZMA_OK)
-                        goto fail;
+                else if (ret != LZMA_OK)
+                        return -ENOMEM;
 
                 if (dst_max > 0 && (space - s.avail_out) >= dst_max)
                         break;
+                else if (dst_max > 0 && space == dst_max)
+                        return -ENOBUFS;
 
-                p = realloc(*dst, space*2);
-                if (!p)
-                        goto fail;
-
-                s.next_out = (uint8_t*) p + ((uint8_t*) s.next_out - (uint8_t*) *dst);
-                s.avail_out += space;
+                used = space - s.avail_out;
+                space = MIN(2 * space, dst_max ?: (size_t) -1);
+                if (!greedy_realloc(dst, dst_alloc_size, space, 1))
+                        return -ENOMEM;
 
-                space *= 2;
-
-                *dst = p;
-                *dst_alloc_size = space;
+                s.avail_out = space - used;
+                s.next_out = *dst + used;
         }
 
         *dst_size = space - s.avail_out;
-        b = true;
+        return 0;
+#else
+        return -EPROTONOSUPPORT;
+#endif
+}
+
+int decompress_blob_lz4(const void *src, uint64_t src_size,
+                        void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max) {
+
+#ifdef HAVE_LZ4
+        char* out;
+        int r, size; /* LZ4 uses int for size */
+
+        assert(src);
+        assert(src_size > 0);
+        assert(dst);
+        assert(dst_alloc_size);
+        assert(dst_size);
+        assert(*dst_alloc_size == 0 || *dst);
 
-fail:
-        lzma_end(&s);
+        if (src_size <= 8)
+                return -EBADMSG;
+
+        size = le64toh( *(le64_t*)src );
+        if (size < 0 || (le64_t) size != *(le64_t*)src)
+                return -EFBIG;
+        if ((size_t) size > *dst_alloc_size) {
+                out = realloc(*dst, size);
+                if (!out)
+                        return -ENOMEM;
+                *dst = out;
+                *dst_alloc_size = size;
+        } else
+                out = *dst;
+
+        r = LZ4_decompress_safe(src + 8, out, src_size - 8, size);
+        if (r < 0 || r != size)
+                return -EBADMSG;
+
+        *dst_size = size;
+        return 0;
+#else
+        return -EPROTONOSUPPORT;
+#endif
+}
 
-        return b;
+int decompress_blob(int compression,
+                    const void *src, uint64_t src_size,
+                    void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max) {
+        if (compression == OBJECT_COMPRESSED_XZ)
+                return decompress_blob_xz(src, src_size,
+                                          dst, dst_alloc_size, dst_size, dst_max);
+        else if (compression == OBJECT_COMPRESSED_LZ4)
+                return decompress_blob_lz4(src, src_size,
+                                           dst, dst_alloc_size, dst_size, dst_max);
+        else
+                return -EBADMSG;
 }
 
-bool uncompress_startswith(const void *src, uint64_t src_size,
-                           void **buffer, uint64_t *buffer_size,
-                           const void *prefix, uint64_t prefix_len,
-                           uint8_t extra) {
 
-        lzma_stream s = LZMA_STREAM_INIT;
+int decompress_startswith_xz(const void *src, uint64_t src_size,
+                             void **buffer, size_t *buffer_size,
+                             const void *prefix, size_t prefix_len,
+                             uint8_t extra) {
+
+#ifdef HAVE_XZ
+        _cleanup_(lzma_end) lzma_stream s = LZMA_STREAM_INIT;
         lzma_ret ret;
-        bool b = false;
 
-        /* Checks whether the uncompressed blob starts with the
+        /* Checks whether the decompressed blob starts with the
          * mentioned prefix. The byte extra needs to follow the
          * prefix */
 
@@ -149,18 +247,10 @@ bool uncompress_startswith(const void *src, uint64_t src_size,
 
         ret = lzma_stream_decoder(&s, UINT64_MAX, 0);
         if (ret != LZMA_OK)
-                return false;
-
-        if (*buffer_size <= prefix_len) {
-                void *p;
+                return -EBADMSG;
 
-                p = realloc(*buffer, prefix_len*2);
-                if (!p)
-                        return false;
-
-                *buffer = p;
-                *buffer_size = prefix_len*2;
-        }
+        if (!(greedy_realloc(buffer, buffer_size, ALIGN_8(prefix_len + 1), 1)))
+                return -ENOMEM;
 
         s.next_in = src;
         s.avail_in = src_size;
@@ -169,41 +259,92 @@ bool uncompress_startswith(const void *src, uint64_t src_size,
         s.avail_out = *buffer_size;
 
         for (;;) {
-                void *p;
-
                 ret = lzma_code(&s, LZMA_FINISH);
 
                 if (ret != LZMA_STREAM_END && ret != LZMA_OK)
-                        goto fail;
+                        return -EBADMSG;
 
-                if ((*buffer_size - s.avail_out > prefix_len) &&
-                    memcmp(*buffer, prefix, prefix_len) == 0 &&
-                    ((const uint8_t*) *buffer)[prefix_len] == extra)
-                        break;
+                if (*buffer_size - s.avail_out >= prefix_len + 1)
+                        return memcmp(*buffer, prefix, prefix_len) == 0 &&
+                                ((const uint8_t*) *buffer)[prefix_len] == extra;
 
                 if (ret == LZMA_STREAM_END)
-                        goto fail;
+                        return 0;
 
-                p = realloc(*buffer, *buffer_size*2);
-                if (!p)
-                        goto fail;
-
-                s.next_out = (uint8_t*) p + ((uint8_t*) s.next_out - (uint8_t*) *buffer);
                 s.avail_out += *buffer_size;
 
-                *buffer = p;
-                *buffer_size *= 2;
+                if (!(greedy_realloc(buffer, buffer_size, *buffer_size * 2, 1)))
+                        return -ENOMEM;
+
+                s.next_out = *buffer + *buffer_size - s.avail_out;
         }
 
-        b = true;
+#else
+        return -EPROTONOSUPPORT;
+#endif
+}
+
+int decompress_startswith_lz4(const void *src, uint64_t src_size,
+                              void **buffer, size_t *buffer_size,
+                              const void *prefix, size_t prefix_len,
+                              uint8_t extra) {
+#ifdef HAVE_LZ4
+        /* Checks whether the decompressed blob starts with the
+         * mentioned prefix. The byte extra needs to follow the
+         * prefix */
+
+        int r;
+
+        assert(src);
+        assert(src_size > 0);
+        assert(buffer);
+        assert(buffer_size);
+        assert(prefix);
+        assert(*buffer_size == 0 || *buffer);
+
+        if (src_size <= 8)
+                return -EBADMSG;
 
-fail:
-        lzma_end(&s);
+        if (!(greedy_realloc(buffer, buffer_size, ALIGN_8(prefix_len + 1), 1)))
+                return -ENOMEM;
 
-        return b;
+        r = LZ4_decompress_safe_partial(src + 8, *buffer, src_size - 8,
+                                        prefix_len + 1, *buffer_size);
+
+        if (r < 0)
+                return -EBADMSG;
+        if ((unsigned) r >= prefix_len + 1)
+                return memcmp(*buffer, prefix, prefix_len) == 0 &&
+                        ((const uint8_t*) *buffer)[prefix_len] == extra;
+        else
+                return 0;
+
+#else
+        return -EPROTONOSUPPORT;
+#endif
+}
+
+int decompress_startswith(int compression,
+                          const void *src, uint64_t src_size,
+                          void **buffer, size_t *buffer_size,
+                          const void *prefix, size_t prefix_len,
+                          uint8_t extra) {
+        if (compression == OBJECT_COMPRESSED_XZ)
+                return decompress_startswith_xz(src, src_size,
+                                                buffer, buffer_size,
+                                                prefix, prefix_len,
+                                                extra);
+        else if (compression == OBJECT_COMPRESSED_LZ4)
+                return decompress_startswith_lz4(src, src_size,
+                                                 buffer, buffer_size,
+                                                 prefix, prefix_len,
+                                                 extra);
+        else
+                return -EBADMSG;
 }
 
-int compress_stream(int fdf, int fdt, uint32_t preset, off_t max_bytes) {
+int compress_stream_xz(int fdf, int fdt, off_t max_bytes) {
+#ifdef HAVE_XZ
         _cleanup_(lzma_end) lzma_stream s = LZMA_STREAM_INIT;
         lzma_ret ret;
 
@@ -213,7 +354,7 @@ int compress_stream(int fdf, int fdt, uint32_t preset, off_t max_bytes) {
         assert(fdf >= 0);
         assert(fdt >= 0);
 
-        ret = lzma_easy_encoder(&s, preset, LZMA_CHECK_CRC64);
+        ret = lzma_easy_encoder(&s, LZMA_PRESET_DEFAULT, LZMA_CHECK_CRC64);
         if (ret != LZMA_OK) {
                 log_error("Failed to initialize XZ encoder: code %d", ret);
                 return -EINVAL;
@@ -267,7 +408,7 @@ int compress_stream(int fdf, int fdt, uint32_t preset, off_t max_bytes) {
                                 return errno ? -errno : -EIO;
 
                         if (ret == LZMA_STREAM_END) {
-                                log_debug("Compression finished (%zu -> %zu bytes, %.1f%%)",
+                                log_debug("XZ compression finished (%"PRIu64" -> %"PRIu64" bytes, %.1f%%)",
                                           s.total_in, s.total_out,
                                           (double) s.total_out / s.total_in * 100);
 
@@ -275,9 +416,96 @@ int compress_stream(int fdf, int fdt, uint32_t preset, off_t max_bytes) {
                         }
                 }
         }
+#else
+        return -EPROTONOSUPPORT;
+#endif
+}
+
+#define LZ4_BUFSIZE (512*1024)
+
+int compress_stream_lz4(int fdf, int fdt, off_t max_bytes) {
+
+#ifdef HAVE_LZ4
+
+        _cleanup_free_ char *buf1 = NULL, *buf2 = NULL, *out = NULL;
+        char *buf;
+        LZ4_stream_t lz4_data = {};
+        le32_t header;
+        size_t total_in = 0, total_out = sizeof(header);
+        ssize_t n;
+
+        assert(fdf >= 0);
+        assert(fdt >= 0);
+
+        buf1 = malloc(LZ4_BUFSIZE);
+        buf2 = malloc(LZ4_BUFSIZE);
+        out = malloc(LZ4_COMPRESSBOUND(LZ4_BUFSIZE));
+        if (!buf1 || !buf2 || !out)
+                return log_oom();
+
+        buf = buf1;
+        for (;;) {
+                size_t m;
+                int r;
+
+                m = LZ4_BUFSIZE;
+                if (max_bytes != -1 && m > (size_t) max_bytes - total_in)
+                        m = max_bytes - total_in;
+
+                n = read(fdf, buf, m);
+                if (n < 0)
+                        return -errno;
+                if (n == 0)
+                        break;
+
+                total_in += n;
+
+                r = LZ4_compress_continue(&lz4_data, buf, out, n);
+                if (r == 0) {
+                        log_error("LZ4 compression failed.");
+                        return -EBADMSG;
+                }
+
+                header = htole32(r);
+                errno = 0;
+
+                n = write(fdt, &header, sizeof(header));
+                if (n < 0)
+                        return -errno;
+                if (n != sizeof(header))
+                        return errno ? -errno : -EIO;
+
+                n = loop_write(fdt, out, r, false);
+                if (n < 0)
+                        return n;
+                if (n != r)
+                        return errno ? -errno : -EIO;
+
+                total_out += sizeof(header) + r;
+
+                buf = buf == buf1 ? buf2 : buf1;
+        }
+
+        header = htole32(0);
+        n = write(fdt, &header, sizeof(header));
+        if (n < 0)
+                return -errno;
+        if (n != sizeof(header))
+                return errno ? -errno : -EIO;
+
+        log_debug("LZ4 compression finished (%zu -> %zu bytes, %.1f%%)",
+                  total_in, total_out,
+                  (double) total_out / total_in * 100);
+
+        return 0;
+#else
+        return -EPROTONOSUPPORT;
+#endif
 }
 
-int decompress_stream(int fdf, int fdt, off_t max_bytes) {
+int decompress_stream_xz(int fdf, int fdt, off_t max_bytes) {
+
+#ifdef HAVE_XZ
         _cleanup_(lzma_end) lzma_stream s = LZMA_STREAM_INIT;
         lzma_ret ret;
 
@@ -290,7 +518,7 @@ int decompress_stream(int fdf, int fdt, off_t max_bytes) {
         ret = lzma_stream_decoder(&s, UINT64_MAX, 0);
         if (ret != LZMA_OK) {
                 log_error("Failed to initialize XZ decoder: code %d", ret);
-                return -EINVAL;
+                return -ENOMEM;
         }
 
         for (;;) {
@@ -326,7 +554,7 @@ int decompress_stream(int fdf, int fdt, off_t max_bytes) {
 
                         if (max_bytes != -1) {
                                 if (max_bytes < n)
-                                        return -E2BIG;
+                                        return -EFBIG;
 
                                 max_bytes -= n;
                         }
@@ -339,7 +567,7 @@ int decompress_stream(int fdf, int fdt, off_t max_bytes) {
                                 return errno ? -errno : -EIO;
 
                         if (ret == LZMA_STREAM_END) {
-                                log_debug("Decompression finished (%zu -> %zu bytes, %.1f%%)",
+                                log_debug("XZ decompression finished (%"PRIu64" -> %"PRIu64" bytes, %.1f%%)",
                                           s.total_in, s.total_out,
                                           (double) s.total_out / s.total_in * 100);
 
@@ -347,4 +575,101 @@ int decompress_stream(int fdf, int fdt, off_t max_bytes) {
                         }
                 }
         }
+#else
+        log_error("Cannot decompress file. Compiled without XZ support.");
+        return -EPROTONOSUPPORT;
+#endif
+}
+
+int decompress_stream_lz4(int fdf, int fdt, off_t max_bytes) {
+
+#ifdef HAVE_LZ4
+        _cleanup_free_ char *buf = NULL, *out = NULL;
+        size_t buf_size = 0;
+        LZ4_streamDecode_t lz4_data = {};
+        le32_t header;
+        size_t total_in = sizeof(header), total_out = 0;
+
+        assert(fdf >= 0);
+        assert(fdt >= 0);
+
+        out = malloc(4*LZ4_BUFSIZE);
+        if (!out)
+                return log_oom();
+
+        for (;;) {
+                ssize_t n, m;
+                int r;
+
+                n = read(fdf, &header, sizeof(header));
+                if (n < 0)
+                        return -errno;
+                if (n != sizeof(header))
+                        return errno ? -errno : -EIO;
+
+                m = le32toh(header);
+                if (m == 0)
+                        break;
+
+                /* We refuse to use a bigger decompression buffer than
+                 * the one used for compression by 4 times. This means
+                 * that compression buffer size can be enlarged 4
+                 * times. This can be changed, but old binaries might
+                 * not accept buffers compressed by newer binaries then.
+                 */
+                if (m > LZ4_COMPRESSBOUND(LZ4_BUFSIZE * 4)) {
+                        log_error("Compressed stream block too big: %zd bytes", m);
+                        return -EBADMSG;
+                }
+
+                total_in += sizeof(header) + m;
+
+                if (!GREEDY_REALLOC(buf, buf_size, m))
+                        return log_oom();
+
+                errno = 0;
+                n = loop_read(fdf, buf, m, false);
+                if (n < 0)
+                        return n;
+                if (n != m)
+                        return errno ? -errno : -EIO;
+
+                r = LZ4_decompress_safe_continue(&lz4_data, buf, out, m, 4*LZ4_BUFSIZE);
+                if (r <= 0)
+                        log_error("LZ4 decompression failed.");
+
+                total_out += r;
+
+                if (max_bytes != -1 && total_out > (size_t) max_bytes) {
+                        log_debug("Decompressed stream longer than %zd bytes", max_bytes);
+                        return -EFBIG;
+                }
+
+                errno = 0;
+                n = loop_write(fdt, out, r, false);
+                if (n < 0)
+                        return n;
+                if (n != r)
+                        return errno ? -errno : -EIO;
+        }
+
+        log_debug("LZ4 decompression finished (%zu -> %zu bytes, %.1f%%)",
+                  total_in, total_out,
+                  (double) total_out / total_in * 100);
+
+        return 0;
+#else
+        log_error("Cannot decompress file. Compiled without LZ4 support.");
+        return -EPROTONOSUPPORT;
+#endif
+}
+
+int decompress_stream(const char *filename, int fdf, int fdt, off_t max_bytes) {
+
+        if (endswith(filename, ".lz4"))
+                return decompress_stream_lz4(fdf, fdt, max_bytes);
+        else if (endswith(filename, ".xz"))
+                return decompress_stream_xz(fdf, fdt, max_bytes);
+        else
+                return -EPROTONOSUPPORT;
 }
index f25fe86abd56423c175bdd7832e9ac2583fd03c1..136dda6d390c3411701e92d5bd8aecc450e86134 100644 (file)
 #include <stdbool.h>
 #include <unistd.h>
 
-bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size);
+#include "journal-def.h"
 
-bool uncompress_blob(const void *src, uint64_t src_size,
-                     void **dst, uint64_t *dst_alloc_size, uint64_t* dst_size, uint64_t dst_max);
+const char* object_compressed_to_string(int compression);
+int object_compressed_from_string(const char *compression);
 
-bool uncompress_startswith(const void *src, uint64_t src_size,
-                           void **buffer, uint64_t *buffer_size,
-                           const void *prefix, uint64_t prefix_len,
-                           uint8_t extra);
+int compress_blob_xz(const void *src, uint64_t src_size, void *dst, size_t *dst_size);
+int compress_blob_lz4(const void *src, uint64_t src_size, void *dst, size_t *dst_size);
 
-int compress_stream(int fdf, int fdt, uint32_t preset, off_t max_size);
-int decompress_stream(int fdf, int fdt, off_t max_size);
+static inline int compress_blob(const void *src, uint64_t src_size, void *dst, size_t *dst_size) {
+        int r;
+#ifdef HAVE_LZ4
+        r = compress_blob_lz4(src, src_size, dst, dst_size);
+        if (r == 0)
+                return OBJECT_COMPRESSED_LZ4;
+#else
+        r = compress_blob_xz(src, src_size, dst, dst_size);
+        if (r == 0)
+                return OBJECT_COMPRESSED_XZ;
+#endif
+        return r;
+}
+
+int decompress_blob_xz(const void *src, uint64_t src_size,
+                       void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
+int decompress_blob_lz4(const void *src, uint64_t src_size,
+                        void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
+int decompress_blob(int compression,
+                    const void *src, uint64_t src_size,
+                    void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
+
+int decompress_startswith_xz(const void *src, uint64_t src_size,
+                             void **buffer, size_t *buffer_size,
+                             const void *prefix, size_t prefix_len,
+                             uint8_t extra);
+int decompress_startswith_lz4(const void *src, uint64_t src_size,
+                              void **buffer, size_t *buffer_size,
+                              const void *prefix, size_t prefix_len,
+                              uint8_t extra);
+int decompress_startswith(int compression,
+                          const void *src, uint64_t src_size,
+                          void **buffer, size_t *buffer_size,
+                          const void *prefix, size_t prefix_len,
+                          uint8_t extra);
+
+int compress_stream_xz(int fdf, int fdt, off_t max_bytes);
+int compress_stream_lz4(int fdf, int fdt, off_t max_bytes);
+
+int decompress_stream_xz(int fdf, int fdt, off_t max_size);
+int decompress_stream_lz4(int fdf, int fdt, off_t max_size);
+
+#ifdef HAVE_LZ4
+#  define compress_stream compress_stream_lz4
+#  define COMPRESSED_EXT ".lz4"
+#else
+#  define compress_stream compress_stream_xz
+#  define COMPRESSED_EXT ".xz"
+#endif
+
+int decompress_stream(const char *filename, int fdf, int fdt, off_t max_bytes);
index 125bb3a4b899e32acf24ca8b57089ed7657afa6c..fec901e8e44f2dddf845eb86c9bf398033bffa0a 100644 (file)
@@ -194,7 +194,7 @@ int coredump_vacuum(int exclude_fd, off_t keep_free, off_t max_use) {
                             exclude_st.st_ino == st.st_ino)
                                 continue;
 
-                        r = hashmap_ensure_allocated(&h, NULL, NULL);
+                        r = hashmap_ensure_allocated(&h, NULL);
                         if (r < 0)
                                 return log_oom();
 
index 78e89d33cfe898bda0123f027e4f6533ccb5db60..88d720f6517c8c82e4b73cecfbe4771f570bf95d 100644 (file)
 #include <sys/types.h>
 #include <sys/xattr.h>
 
-#include <systemd/sd-journal.h>
-#include <systemd/sd-login.h>
+#ifdef HAVE_ELFUTILS
+#  include <dwarf.h>
+#  include <elfutils/libdwfl.h>
+#endif
+
+#include "systemd/sd-journal.h"
+#include "systemd/sd-login.h"
 
 #include "log.h"
 #include "util.h"
 #  include "acl-util.h"
 #endif
 
-#ifdef HAVE_XZ
-#  include <lzma.h>
-#else
-#  define LZMA_PRESET_DEFAULT 0
-#endif
-
 /* The maximum size up to which we process coredumps */
 #define PROCESS_SIZE_MAX ((off_t) (2LLU*1024LLU*1024LLU*1024LLU))
 
@@ -67,8 +66,8 @@
 #define JOURNAL_SIZE_MAX ((size_t) (767LU*1024LU*1024LU))
 
 /* Make sure to not make this larger than the maximum journal entry
- * size. See ENTRY_SIZE_MAX in journald-native.c. */
-assert_cc(JOURNAL_SIZE_MAX <= ENTRY_SIZE_MAX);
+ * size. See DATA_SIZE_MAX in journald-native.c. */
+assert_cc(JOURNAL_SIZE_MAX <= DATA_SIZE_MAX);
 
 enum {
         INFO_PID,
@@ -120,16 +119,10 @@ static int parse_config(void) {
                 {}
         };
 
-        return config_parse(
-                        NULL,
-                        "/etc/systemd/coredump.conf",
-                        NULL,
-                        "Coredump\0",
-                        config_item_table_lookup,
-                        (void*) items,
-                        false,
-                        false,
-                        NULL);
+        return config_parse(NULL, "/etc/systemd/coredump.conf", NULL,
+                            "Coredump\0",
+                            config_item_table_lookup, items,
+                            false, false, true, NULL);
 }
 
 static int fix_acl(int fd, uid_t uid) {
@@ -357,7 +350,7 @@ static int save_external_coredump(
                 goto fail;
         }
 
-#ifdef HAVE_XZ
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
         /* If we will remove the coredump anyway, do not compress. */
         if (maybe_remove_external_coredump(NULL, st.st_size) == 0
             && arg_compress) {
@@ -365,15 +358,15 @@ static int save_external_coredump(
                 _cleanup_free_ char *fn_compressed = NULL, *tmp_compressed = NULL;
                 _cleanup_close_ int fd_compressed = -1;
 
-                fn_compressed = strappend(fn, ".xz");
+                fn_compressed = strappend(fn, COMPRESSED_EXT);
                 if (!fn_compressed) {
-                        r = log_oom();
+                        log_oom();
                         goto uncompressed;
                 }
 
                 tmp_compressed = tempfn_random(fn_compressed);
                 if (!tmp_compressed) {
-                        r = log_oom();
+                        log_oom();
                         goto uncompressed;
                 }
 
@@ -383,7 +376,7 @@ static int save_external_coredump(
                         goto uncompressed;
                 }
 
-                r = compress_stream(fd, fd_compressed, LZMA_PRESET_DEFAULT, -1);
+                r = compress_stream(fd, fd_compressed, -1);
                 if (r < 0) {
                         log_error("Failed to compress %s: %s", tmp_compressed, strerror(-r));
                         goto fail_compressed;
@@ -408,9 +401,9 @@ static int save_external_coredump(
         fail_compressed:
                 unlink_noerrno(tmp_compressed);
         }
-#endif
 
 uncompressed:
+#endif
         r = fix_permissions(fd, tmp, fn, info, uid);
         if (r < 0)
                 goto fail;
@@ -603,9 +596,9 @@ int main(int argc, char* argv[]) {
         }
 
         if (sd_pid_get_owner_uid(pid, &owner_uid) >= 0) {
-                asprintf(&core_owner_uid, "COREDUMP_OWNER_UID=" UID_FMT, owner_uid);
-
-                if (core_owner_uid)
+                r = asprintf(&core_owner_uid,
+                             "COREDUMP_OWNER_UID=" UID_FMT, owner_uid);
+                if (r > 0)
                         IOVEC_SET_STRING(iovec[j++], core_owner_uid);
         }
 
@@ -680,9 +673,9 @@ int main(int argc, char* argv[]) {
 
         /* Now, let's drop privileges to become the user who owns the
          * segfaulted process and allocate the coredump memory under
-         * his uid. This also ensures that the credentials journald
-         * will see are the ones of the coredumping user, thus making
-         * sure the user himself gets access to the core dump. */
+         * the user's uid. This also ensures that the credentials
+         * journald will see are the ones of the coredumping user,
+         * thus making sure the user gets access to the core dump. */
         if (setresgid(gid, gid, gid) < 0 ||
             setresuid(uid, uid, uid) < 0) {
                 log_error("Failed to drop privileges: %m");
@@ -698,6 +691,8 @@ int main(int argc, char* argv[]) {
                 r = coredump_make_stack_trace(coredump_fd, exe, &stacktrace);
                 if (r >= 0)
                         core_message = strjoin("MESSAGE=Process ", info[INFO_PID], " (", comm, ") of user ", info[INFO_UID], " dumped core.\n\n", stacktrace, NULL);
+                else if (r == -EINVAL)
+                        log_warning("Failed to generate stack trace: %s", dwfl_errmsg(dwfl_errno()));
                 else
                         log_warning("Failed to generate stack trace: %s", strerror(-r));
         }
index 2158d7377194eedb6cd961eda53a88d25538dc91..d4756fe67dcd8761ce79791dc287262a6472277c 100644 (file)
@@ -26,7 +26,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "build.h"
 #include "set.h"
@@ -58,7 +58,7 @@ static Set *new_matches(void) {
         char *tmp;
         int r;
 
-        set = set_new(trivial_hash_func, trivial_compare_func);
+        set = set_new(NULL);
         if (!set) {
                 log_oom();
                 return NULL;
@@ -81,29 +81,6 @@ static Set *new_matches(void) {
         return set;
 }
 
-static int help(void) {
-
-        printf("%s [OPTIONS...]\n\n"
-               "List or retrieve coredumps from the journal.\n\n"
-               "Flags:\n"
-               "  -h --help          Show this help\n"
-               "     --version       Print version string\n"
-               "     --no-pager      Do not pipe output into a pager\n"
-               "     --no-legend     Do not print the column headers.\n"
-               "  -1                 Show information about most recent entry only\n"
-               "  -F --field=FIELD   List all values a certain field takes\n"
-               "  -o --output=FILE   Write output to FILE\n\n"
-
-               "Commands:\n"
-               "  list [MATCHES...]  List available coredumps (default)\n"
-               "  info [MATCHES...]  Show detailed information about one or more coredumps\n"
-               "  dump [MATCHES...]  Print first matching coredump to stdout\n"
-               "  gdb [MATCHES...]   Start gdb for the first matching coredump\n"
-               , program_invocation_short_name);
-
-        return 0;
-}
-
 static int add_match(Set *set, const char *match) {
         int r = -ENOMEM;
         unsigned pid;
@@ -131,11 +108,9 @@ static int add_match(Set *set, const char *match) {
                 goto fail;
 
         log_debug("Adding pattern: %s", pattern);
-        r = set_put(set, pattern);
+        r = set_consume(set, pattern);
         if (r < 0) {
-                log_error("Failed to add pattern '%s': %s",
-                          pattern, strerror(-r));
-                free(pattern);
+                log_error("Failed to add pattern: %s", strerror(-r));
                 goto fail;
         }
 
@@ -145,6 +120,26 @@ fail:
         return r;
 }
 
+static void help(void) {
+        printf("%s [OPTIONS...]\n\n"
+               "List or retrieve coredumps from the journal.\n\n"
+               "Flags:\n"
+               "  -h --help          Show this help\n"
+               "     --version       Print version string\n"
+               "     --no-pager      Do not pipe output into a pager\n"
+               "     --no-legend     Do not print the column headers.\n"
+               "  -1                 Show information about most recent entry only\n"
+               "  -F --field=FIELD   List all values a certain field takes\n"
+               "  -o --output=FILE   Write output to FILE\n\n"
+
+               "Commands:\n"
+               "  list [MATCHES...]  List available coredumps (default)\n"
+               "  info [MATCHES...]  Show detailed information about one or more coredumps\n"
+               "  dump [MATCHES...]  Print first matching coredump to stdout\n"
+               "  gdb [MATCHES...]   Start gdb for the first matching coredump\n"
+               , program_invocation_short_name);
+}
+
 static int parse_argv(int argc, char *argv[], Set *matches) {
         enum {
                 ARG_VERSION = 0x100,
@@ -172,7 +167,8 @@ static int parse_argv(int argc, char *argv[], Set *matches) {
 
                 case 'h':
                         arg_action = ACTION_NONE;
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         arg_action = ACTION_NONE;
@@ -595,12 +591,13 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
                 retrieve(data, len, "COREDUMP_FILENAME", &filename);
 
         if (filename && access(filename, R_OK) < 0) {
-                log_debug("File %s is not readable: %m", filename);
+                log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
+                         "File %s is not readable: %m", filename);
                 free(filename);
                 filename = NULL;
         }
 
-        if (filename && !endswith(filename, ".xz")) {
+        if (filename && !endswith(filename, ".xz") && !endswith(filename, ".lz4")) {
                 if (path) {
                         *path = filename;
                         filename = NULL;
@@ -646,7 +643,7 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
                                 goto error;
                         }
                 } else if (filename) {
-#ifdef HAVE_XZ
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
                         _cleanup_close_ int fdf;
 
                         fdf = open(filename, O_RDONLY | O_CLOEXEC);
@@ -656,19 +653,19 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
                                 goto error;
                         }
 
-                        r = decompress_stream(fdf, fd, -1);
+                        r = decompress_stream(filename, fdf, fd, -1);
                         if (r < 0) {
                                 log_error("Failed to decompress %s: %s", filename, strerror(-r));
                                 goto error;
                         }
 #else
-                        log_error("Cannot decompress file. Compiled without XZ support.");
+                        log_error("Cannot decompress file. Compiled without compression support.");
                         r = -ENOTSUP;
                         goto error;
 #endif
                 } else {
                         if (r == -ENOENT)
-                                log_error("Coredump neither in journal file nor stored externally on disk.");
+                                log_error("Cannot retrieve coredump from journal nor disk.");
                         else
                                 log_error("Failed to retrieve COREDUMP field: %s", strerror(-r));
                         goto error;
index 7e407a416cb1ca1674202c1162cddcc745d91d46..e55fa196f28294ea978cdfb4c0d37af6a00416f0 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "sparse-endian.h"
 
-#include <systemd/sd-id128.h>
+#include "systemd/sd-id128.h"
 
 #include "macro.h"
 
@@ -66,9 +66,13 @@ enum {
 
 /* Object flags */
 enum {
-        OBJECT_COMPRESSED = 1
+        OBJECT_COMPRESSED_XZ = 1 << 0,
+        OBJECT_COMPRESSED_LZ4 = 1 << 1,
+        _OBJECT_COMPRESSED_MAX
 };
 
+#define OBJECT_COMPRESSION_MASK (OBJECT_COMPRESSED_XZ | OBJECT_COMPRESSED_LZ4)
+
 struct ObjectHeader {
         uint8_t type;
         uint8_t flags;
@@ -155,13 +159,33 @@ enum {
 
 /* Header flags */
 enum {
-        HEADER_INCOMPATIBLE_COMPRESSED = 1
+        HEADER_INCOMPATIBLE_COMPRESSED_XZ = 1 << 0,
+        HEADER_INCOMPATIBLE_COMPRESSED_LZ4 = 1 << 1,
 };
 
+#define HEADER_INCOMPATIBLE_ANY (HEADER_INCOMPATIBLE_COMPRESSED_XZ|HEADER_INCOMPATIBLE_COMPRESSED_LZ4)
+
+#if defined(HAVE_XZ) && defined(HAVE_LZ4)
+#  define HEADER_INCOMPATIBLE_SUPPORTED HEADER_INCOMPATIBLE_ANY
+#elif defined(HAVE_XZ)
+#  define HEADER_INCOMPATIBLE_SUPPORTED HEADER_INCOMPATIBLE_COMPRESSED_XZ
+#elif defined(HAVE_LZ4)
+#  define HEADER_INCOMPATIBLE_SUPPORTED HEADER_INCOMPATIBLE_COMPRESSED_LZ4
+#else
+#  define HEADER_INCOMPATIBLE_SUPPORTED 0
+#endif
+
 enum {
         HEADER_COMPATIBLE_SEALED = 1
 };
 
+#define HEADER_COMPATIBLE_ANY HEADER_COMPATIBLE_SEALED
+#ifdef HAVE_GCRYPT
+#  define HEADER_COMPATIBLE_SUPPORTED HEADER_COMPATIBLE_SEALED
+#else
+#  define HEADER_COMPATIBLE_SUPPORTED 0
+#endif
+
 #define HEADER_SIGNATURE ((char[]) { 'L', 'P', 'K', 'S', 'H', 'H', 'R', 'H' })
 
 struct Header {
index b3b1ffc3c07138be9e809ebe1f8fa43e88a832c6..8a2c0fcac52d7efd3ec666e9b89aa2ae2fec81c4 100644 (file)
@@ -136,9 +136,9 @@ void journal_file_close(JournalFile *f) {
         if (f->mmap)
                 mmap_cache_unref(f->mmap);
 
-        hashmap_free_free(f->chain_cache);
+        ordered_hashmap_free_free(f->chain_cache);
 
-#ifdef HAVE_XZ
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
         free(f->compress_buffer);
 #endif
 
@@ -158,21 +158,21 @@ void journal_file_close(JournalFile *f) {
 }
 
 static int journal_file_init_header(JournalFile *f, JournalFile *template) {
-        Header h;
+        Header h = {};
         ssize_t k;
         int r;
 
         assert(f);
 
-        zero(h);
         memcpy(h.signature, HEADER_SIGNATURE, 8);
         h.header_size = htole64(ALIGN64(sizeof(h)));
 
-        h.incompatible_flags =
-                htole32(f->compress ? HEADER_INCOMPATIBLE_COMPRESSED : 0);
+        h.incompatible_flags |= htole32(
+                f->compress_xz * HEADER_INCOMPATIBLE_COMPRESSED_XZ |
+                f->compress_lz4 * HEADER_INCOMPATIBLE_COMPRESSED_LZ4);
 
-        h.compatible_flags =
-                htole32(f->seal ? HEADER_COMPATIBLE_SEALED : 0);
+        h.compatible_flags = htole32(
+                f->seal * HEADER_COMPATIBLE_SEALED);
 
         r = sd_id128_randomize(&h.file_id);
         if (r < 0)
@@ -222,6 +222,8 @@ static int journal_file_refresh_header(JournalFile *f) {
 }
 
 static int journal_file_verify_header(JournalFile *f) {
+        uint32_t flags;
+
         assert(f);
 
         if (memcmp(f->header->signature, HEADER_SIGNATURE, 8))
@@ -229,24 +231,30 @@ static int journal_file_verify_header(JournalFile *f) {
 
         /* In both read and write mode we refuse to open files with
          * incompatible flags we don't know */
-#ifdef HAVE_XZ
-        if ((le32toh(f->header->incompatible_flags) & ~HEADER_INCOMPATIBLE_COMPRESSED) != 0)
-                return -EPROTONOSUPPORT;
-#else
-        if (f->header->incompatible_flags != 0)
+        flags = le32toh(f->header->incompatible_flags);
+        if (flags & ~HEADER_INCOMPATIBLE_SUPPORTED) {
+                if (flags & ~HEADER_INCOMPATIBLE_ANY)
+                        log_debug("Journal file %s has unknown incompatible flags %"PRIx32,
+                                  f->path, flags & ~HEADER_INCOMPATIBLE_ANY);
+                flags = (flags & HEADER_INCOMPATIBLE_ANY) & ~HEADER_INCOMPATIBLE_SUPPORTED;
+                if (flags)
+                        log_debug("Journal file %s uses incompatible flags %"PRIx32
+                                  " disabled at compilation time.", f->path, flags);
                 return -EPROTONOSUPPORT;
-#endif
+        }
 
         /* When open for writing we refuse to open files with
          * compatible flags, too */
-        if (f->writable) {
-#ifdef HAVE_GCRYPT
-                if ((le32toh(f->header->compatible_flags) & ~HEADER_COMPATIBLE_SEALED) != 0)
-                        return -EPROTONOSUPPORT;
-#else
-                if (f->header->compatible_flags != 0)
-                        return -EPROTONOSUPPORT;
-#endif
+        flags = le32toh(f->header->compatible_flags);
+        if (f->writable && (flags & ~HEADER_COMPATIBLE_SUPPORTED)) {
+                if (flags & ~HEADER_COMPATIBLE_ANY)
+                        log_debug("Journal file %s has unknown compatible flags %"PRIx32,
+                                  f->path, flags & ~HEADER_COMPATIBLE_ANY);
+                flags = (flags & HEADER_COMPATIBLE_ANY) & ~HEADER_COMPATIBLE_SUPPORTED;
+                if (flags)
+                        log_debug("Journal file %s uses compatible flags %"PRIx32
+                                  " disabled at compilation time.", f->path, flags);
+                return -EPROTONOSUPPORT;
         }
 
         if (f->header->state >= _STATE_MAX)
@@ -271,12 +279,6 @@ static int journal_file_verify_header(JournalFile *f) {
             !VALID64(le64toh(f->header->entry_array_offset)))
                 return -ENODATA;
 
-        if (le64toh(f->header->data_hash_table_offset) < le64toh(f->header->header_size) ||
-            le64toh(f->header->field_hash_table_offset) < le64toh(f->header->header_size) ||
-            le64toh(f->header->tail_object_offset) < le64toh(f->header->header_size) ||
-            le64toh(f->header->entry_array_offset) < le64toh(f->header->header_size))
-                return -ENODATA;
-
         if (f->writable) {
                 uint8_t state;
                 sd_id128_t machine_id;
@@ -302,7 +304,8 @@ static int journal_file_verify_header(JournalFile *f) {
                 }
         }
 
-        f->compress = JOURNAL_HEADER_COMPRESSED(f->header);
+        f->compress_xz = JOURNAL_HEADER_COMPRESSED_XZ(f->header);
+        f->compress_lz4 = JOURNAL_HEADER_COMPRESSED_LZ4(f->header);
 
         f->seal = JOURNAL_HEADER_SEALED(f->header);
 
@@ -388,7 +391,7 @@ static int journal_file_move_to(JournalFile *f, int context, bool keep_always, u
                         return -EADDRNOTAVAIL;
         }
 
-        return mmap_cache_get(f->mmap, f->fd, f->prot, context, keep_always, offset, size, &f->last_stat, ret);
+        return mmap_cache_get(f->mmap, f->fd, f->prot, context, keep_always, offset, size, &f->last_stat, ret, NULL);
 }
 
 static uint64_t minimum_header_size(Object *o) {
@@ -422,7 +425,6 @@ int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Objec
         if (!VALID64(offset))
                 return -EFAULT;
 
-
         r = journal_file_move_to(f, type_to_context(type), false, offset, sizeof(ObjectHeader), &t);
         if (r < 0)
                 return r;
@@ -809,9 +811,10 @@ int journal_file_find_data_object_with_hash(
                 if (le64toh(o->data.hash) != hash)
                         goto next;
 
-                if (o->object.flags & OBJECT_COMPRESSED) {
-#ifdef HAVE_XZ
-                        uint64_t l, rsize;
+                if (o->object.flags & OBJECT_COMPRESSION_MASK) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
+                        uint64_t l;
+                        size_t rsize;
 
                         l = le64toh(o->object.size);
                         if (l <= offsetof(Object, data.payload))
@@ -819,8 +822,10 @@ int journal_file_find_data_object_with_hash(
 
                         l -= offsetof(Object, data.payload);
 
-                        if (!uncompress_blob(o->data.payload, l, &f->compress_buffer, &f->compress_buffer_size, &rsize, 0))
-                                return -EBADMSG;
+                        r = decompress_blob(o->object.flags & OBJECT_COMPRESSION_MASK,
+                                            o->data.payload, l, &f->compress_buffer, &f->compress_buffer_size, &rsize, 0);
+                        if (r < 0)
+                                return r;
 
                         if (rsize == size &&
                             memcmp(f->compress_buffer, data, size) == 0) {
@@ -836,7 +841,6 @@ int journal_file_find_data_object_with_hash(
 #else
                         return -EPROTONOSUPPORT;
 #endif
-
                 } else if (le64toh(o->object.size) == osize &&
                            memcmp(o->data.payload, data, size) == 0) {
 
@@ -943,8 +947,7 @@ static int journal_file_append_data(
         uint64_t hash, p;
         uint64_t osize;
         Object *o;
-        int r;
-        bool compressed = false;
+        int r, compression = 0;
         const void *eq;
 
         assert(f);
@@ -973,23 +976,24 @@ static int journal_file_append_data(
 
         o->data.hash = htole64(hash);
 
-#ifdef HAVE_XZ
-        if (f->compress &&
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
+        if (f->compress_xz &&
             size >= COMPRESSION_SIZE_THRESHOLD) {
-                uint64_t rsize;
+                size_t rsize;
 
-                compressed = compress_blob(data, size, o->data.payload, &rsize);
+                compression = compress_blob(data, size, o->data.payload, &rsize);
 
-                if (compressed) {
+                if (compression) {
                         o->object.size = htole64(offsetof(Object, data.payload) + rsize);
-                        o->object.flags |= OBJECT_COMPRESSED;
+                        o->object.flags |= compression;
 
-                        log_debug("Compressed data object %"PRIu64" -> %"PRIu64, size, rsize);
+                        log_debug("Compressed data object %"PRIu64" -> %zu using %s",
+                                  size, rsize, object_compressed_to_string(compression));
                 }
         }
 #endif
 
-        if (!compressed && size > 0)
+        if (!compression && size > 0)
                 memcpy(o->data.payload, data, size);
 
         r = journal_file_link_data(f, o, p, hash);
@@ -1362,7 +1366,7 @@ typedef struct ChainCacheItem {
 } ChainCacheItem;
 
 static void chain_cache_put(
-                Hashmap *h,
+                OrderedHashmap *h,
                 ChainCacheItem *ci,
                 uint64_t first,
                 uint64_t array,
@@ -1376,9 +1380,10 @@ static void chain_cache_put(
                 if (array == first)
                         return;
 
-                if (hashmap_size(h) >= CHAIN_CACHE_MAX)
-                        ci = hashmap_steal_first(h);
-                else {
+                if (ordered_hashmap_size(h) >= CHAIN_CACHE_MAX) {
+                        ci = ordered_hashmap_steal_first(h);
+                        assert(ci);
+                } else {
                         ci = new(ChainCacheItem, 1);
                         if (!ci)
                                 return;
@@ -1386,7 +1391,7 @@ static void chain_cache_put(
 
                 ci->first = first;
 
-                if (hashmap_put(h, &ci->first, ci) < 0) {
+                if (ordered_hashmap_put(h, &ci->first, ci) < 0) {
                         free(ci);
                         return;
                 }
@@ -1415,7 +1420,7 @@ static int generic_array_get(
         a = first;
 
         /* Try the chain cache first */
-        ci = hashmap_get(f->chain_cache, &first);
+        ci = ordered_hashmap_get(f->chain_cache, &first);
         if (ci && i > ci->total) {
                 a = ci->array;
                 i -= ci->total;
@@ -1518,7 +1523,7 @@ static int generic_array_bisect(
         /* Start with the first array in the chain */
         a = first;
 
-        ci = hashmap_get(f->chain_cache, &first);
+        ci = ordered_hashmap_get(f->chain_cache, &first);
         if (ci && n > ci->total) {
                 /* Ah, we have iterated this bisection array chain
                  * previously! Let's see if we can skip ahead in the
@@ -2332,8 +2337,9 @@ void journal_file_dump(JournalFile *f) {
                         break;
                 }
 
-                if (o->object.flags & OBJECT_COMPRESSED)
-                        printf("Flags: COMPRESSED\n");
+                if (o->object.flags & OBJECT_COMPRESSION_MASK)
+                        printf("Flags: %s\n",
+                               object_compressed_to_string(o->object.flags & OBJECT_COMPRESSION_MASK));
 
                 if (p == le64toh(f->header->tail_object_offset))
                         p = 0;
@@ -2370,7 +2376,7 @@ void journal_file_print_header(JournalFile *f) {
                "Sequential Number ID: %s\n"
                "State: %s\n"
                "Compatible Flags:%s%s\n"
-               "Incompatible Flags:%s%s\n"
+               "Incompatible Flags:%s%s%s\n"
                "Header size: %"PRIu64"\n"
                "Arena size: %"PRIu64"\n"
                "Data Hash Table Size: %"PRIu64"\n"
@@ -2392,9 +2398,10 @@ void journal_file_print_header(JournalFile *f) {
                f->header->state == STATE_ONLINE ? "ONLINE" :
                f->header->state == STATE_ARCHIVED ? "ARCHIVED" : "UNKNOWN",
                JOURNAL_HEADER_SEALED(f->header) ? " SEALED" : "",
-               (le32toh(f->header->compatible_flags) & ~HEADER_COMPATIBLE_SEALED) ? " ???" : "",
-               JOURNAL_HEADER_COMPRESSED(f->header) ? " COMPRESSED" : "",
-               (le32toh(f->header->incompatible_flags) & ~HEADER_INCOMPATIBLE_COMPRESSED) ? " ???" : "",
+               (le32toh(f->header->compatible_flags) & ~HEADER_COMPATIBLE_ANY) ? " ???" : "",
+               JOURNAL_HEADER_COMPRESSED_XZ(f->header) ? " COMPRESSED-XZ" : "",
+               JOURNAL_HEADER_COMPRESSED_LZ4(f->header) ? " COMPRESSED-LZ4" : "",
+               (le32toh(f->header->incompatible_flags) & ~HEADER_INCOMPATIBLE_ANY) ? " ???" : "",
                le64toh(f->header->header_size),
                le64toh(f->header->arena_size),
                le64toh(f->header->data_hash_table_size) / sizeof(HashItem),
@@ -2467,8 +2474,10 @@ int journal_file_open(
         f->flags = flags;
         f->prot = prot_from_flags(flags);
         f->writable = (flags & O_ACCMODE) != O_RDONLY;
-#ifdef HAVE_XZ
-        f->compress = compress;
+#if defined(HAVE_LZ4)
+        f->compress_lz4 = compress;
+#elif defined(HAVE_XZ)
+        f->compress_xz = compress;
 #endif
 #ifdef HAVE_GCRYPT
         f->seal = seal;
@@ -2490,7 +2499,7 @@ int journal_file_open(
                 goto fail;
         }
 
-        f->chain_cache = hashmap_new(uint64_hash_func, uint64_compare_func);
+        f->chain_cache = ordered_hashmap_new(&uint64_hash_ops);
         if (!f->chain_cache) {
                 r = -ENOMEM;
                 goto fail;
@@ -2760,12 +2769,14 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
                 if ((uint64_t) t != l)
                         return -E2BIG;
 
-                if (o->object.flags & OBJECT_COMPRESSED) {
-#ifdef HAVE_XZ
-                        uint64_t rsize;
+                if (o->object.flags & OBJECT_COMPRESSION_MASK) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
+                        size_t rsize;
 
-                        if (!uncompress_blob(o->data.payload, l, &from->compress_buffer, &from->compress_buffer_size, &rsize, 0))
-                                return -EBADMSG;
+                        r = decompress_blob(o->object.flags & OBJECT_COMPRESSION_MASK,
+                                            o->data.payload, l, &from->compress_buffer, &from->compress_buffer_size, &rsize, 0);
+                        if (r < 0)
+                                return r;
 
                         data = from->compress_buffer;
                         l = rsize;
index 50dbe29cc16d422f7a22f4943599d876b7e77b02..211e121d5c6e8997dd6aaddfdb1a3414656f78aa 100644 (file)
@@ -27,7 +27,7 @@
 #include <gcrypt.h>
 #endif
 
-#include <systemd/sd-id128.h>
+#include "systemd/sd-id128.h"
 
 #include "sparse-endian.h"
 #include "journal-def.h"
@@ -56,7 +56,8 @@ typedef struct JournalFile {
         int flags;
         int prot;
         bool writable:1;
-        bool compress:1;
+        bool compress_xz:1;
+        bool compress_lz4:1;
         bool seal:1;
 
         bool tail_entry_monotonic_valid:1;
@@ -75,11 +76,11 @@ typedef struct JournalFile {
         JournalMetrics metrics;
         MMapCache *mmap;
 
-        Hashmap *chain_cache;
+        OrderedHashmap *chain_cache;
 
-#ifdef HAVE_XZ
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
         void *compress_buffer;
-        uint64_t compress_buffer_size;
+        size_t compress_buffer_size;
 #endif
 
 #ifdef HAVE_GCRYPT
@@ -153,8 +154,11 @@ static inline bool VALID_EPOCH(uint64_t u) {
 #define JOURNAL_HEADER_SEALED(h) \
         (!!(le32toh((h)->compatible_flags) & HEADER_COMPATIBLE_SEALED))
 
-#define JOURNAL_HEADER_COMPRESSED(h) \
-        (!!(le32toh((h)->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESSED))
+#define JOURNAL_HEADER_COMPRESSED_XZ(h) \
+        (!!(le32toh((h)->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESSED_XZ))
+
+#define JOURNAL_HEADER_COMPRESSED_LZ4(h) \
+        (!!(le32toh((h)->incompatible_flags) & HEADER_INCOMPATIBLE_COMPRESSED_LZ4))
 
 int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Object **ret);
 
@@ -208,16 +212,14 @@ static unsigned type_to_context(int type) {
         return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0;
 }
 
-static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset) {
+static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset, void **release_cookie) {
         unsigned context = type_to_context(o->object.type);
+        uint64_t s = le64toh(o->object.size);
 
         return mmap_cache_get(f->mmap, f->fd, f->prot, context, true,
-                              offset, o->object.size, &f->last_stat, NULL);
+                              offset, s, &f->last_stat, NULL, release_cookie);
 }
 
-static inline int journal_file_object_release(JournalFile *f, Object *o, uint64_t offset) {
-        unsigned context = type_to_context(o->object.type);
-
-        return mmap_cache_release(f->mmap, f->fd, f->prot, context,
-                                  offset, o->object.size);
+static inline int journal_file_object_release(JournalFile *f, void *release_cookie) {
+        return mmap_cache_release(f->mmap, f->fd, release_cookie);
 }
diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c
deleted file mode 100644 (file)
index c682666..0000000
+++ /dev/null
@@ -1,1054 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Lennart Poettering
-
-  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/>.
-***/
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <getopt.h>
-
-#include <microhttpd.h>
-
-#ifdef HAVE_GNUTLS
-#include <gnutls/gnutls.h>
-#endif
-
-#include "log.h"
-#include "util.h"
-#include "sd-journal.h"
-#include "sd-daemon.h"
-#include "sd-bus.h"
-#include "bus-util.h"
-#include "logs-show.h"
-#include "microhttpd-util.h"
-#include "build.h"
-#include "fileio.h"
-
-static char *key_pem = NULL;
-static char *cert_pem = NULL;
-static char *trust_pem = NULL;
-
-typedef struct RequestMeta {
-        sd_journal *journal;
-
-        OutputMode mode;
-
-        char *cursor;
-        int64_t n_skip;
-        uint64_t n_entries;
-        bool n_entries_set;
-
-        FILE *tmp;
-        uint64_t delta, size;
-
-        int argument_parse_error;
-
-        bool follow;
-        bool discrete;
-
-        uint64_t n_fields;
-        bool n_fields_set;
-} RequestMeta;
-
-static const char* const mime_types[_OUTPUT_MODE_MAX] = {
-        [OUTPUT_SHORT] = "text/plain",
-        [OUTPUT_JSON] = "application/json",
-        [OUTPUT_JSON_SSE] = "text/event-stream",
-        [OUTPUT_EXPORT] = "application/vnd.fdo.journal",
-};
-
-static RequestMeta *request_meta(void **connection_cls) {
-        RequestMeta *m;
-
-        assert(connection_cls);
-        if (*connection_cls)
-                return *connection_cls;
-
-        m = new0(RequestMeta, 1);
-        if (!m)
-                return NULL;
-
-        *connection_cls = m;
-        return m;
-}
-
-static void request_meta_free(
-                void *cls,
-                struct MHD_Connection *connection,
-                void **connection_cls,
-                enum MHD_RequestTerminationCode toe) {
-
-        RequestMeta *m = *connection_cls;
-
-        if (!m)
-                return;
-
-        if (m->journal)
-                sd_journal_close(m->journal);
-
-        if (m->tmp)
-                fclose(m->tmp);
-
-        free(m->cursor);
-        free(m);
-}
-
-static int open_journal(RequestMeta *m) {
-        assert(m);
-
-        if (m->journal)
-                return 0;
-
-        return sd_journal_open(&m->journal, SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM);
-}
-
-static ssize_t request_reader_entries(
-                void *cls,
-                uint64_t pos,
-                char *buf,
-                size_t max) {
-
-        RequestMeta *m = cls;
-        int r;
-        size_t n, k;
-
-        assert(m);
-        assert(buf);
-        assert(max > 0);
-        assert(pos >= m->delta);
-
-        pos -= m->delta;
-
-        while (pos >= m->size) {
-                off_t sz;
-
-                /* End of this entry, so let's serialize the next
-                 * one */
-
-                if (m->n_entries_set &&
-                    m->n_entries <= 0)
-                        return MHD_CONTENT_READER_END_OF_STREAM;
-
-                if (m->n_skip < 0)
-                        r = sd_journal_previous_skip(m->journal, (uint64_t) -m->n_skip + 1);
-                else if (m->n_skip > 0)
-                        r = sd_journal_next_skip(m->journal, (uint64_t) m->n_skip + 1);
-                else
-                        r = sd_journal_next(m->journal);
-
-                if (r < 0) {
-                        log_error("Failed to advance journal pointer: %s", strerror(-r));
-                        return MHD_CONTENT_READER_END_WITH_ERROR;
-                } else if (r == 0) {
-
-                        if (m->follow) {
-                                r = sd_journal_wait(m->journal, (uint64_t) -1);
-                                if (r < 0) {
-                                        log_error("Couldn't wait for journal event: %s", strerror(-r));
-                                        return MHD_CONTENT_READER_END_WITH_ERROR;
-                                }
-
-                                continue;
-                        }
-
-                        return MHD_CONTENT_READER_END_OF_STREAM;
-                }
-
-                if (m->discrete) {
-                        assert(m->cursor);
-
-                        r = sd_journal_test_cursor(m->journal, m->cursor);
-                        if (r < 0) {
-                                log_error("Failed to test cursor: %s", strerror(-r));
-                                return MHD_CONTENT_READER_END_WITH_ERROR;
-                        }
-
-                        if (r == 0)
-                                return MHD_CONTENT_READER_END_OF_STREAM;
-                }
-
-                pos -= m->size;
-                m->delta += m->size;
-
-                if (m->n_entries_set)
-                        m->n_entries -= 1;
-
-                m->n_skip = 0;
-
-                if (m->tmp)
-                        rewind(m->tmp);
-                else {
-                        m->tmp = tmpfile();
-                        if (!m->tmp) {
-                                log_error("Failed to create temporary file: %m");
-                                return MHD_CONTENT_READER_END_WITH_ERROR;
-                        }
-                }
-
-                r = output_journal(m->tmp, m->journal, m->mode, 0, OUTPUT_FULL_WIDTH, NULL);
-                if (r < 0) {
-                        log_error("Failed to serialize item: %s", strerror(-r));
-                        return MHD_CONTENT_READER_END_WITH_ERROR;
-                }
-
-                sz = ftello(m->tmp);
-                if (sz == (off_t) -1) {
-                        log_error("Failed to retrieve file position: %m");
-                        return MHD_CONTENT_READER_END_WITH_ERROR;
-                }
-
-                m->size = (uint64_t) sz;
-        }
-
-        if (fseeko(m->tmp, pos, SEEK_SET) < 0) {
-                log_error("Failed to seek to position: %m");
-                return MHD_CONTENT_READER_END_WITH_ERROR;
-        }
-
-        n = m->size - pos;
-        if (n > max)
-                n = max;
-
-        errno = 0;
-        k = fread(buf, 1, n, m->tmp);
-        if (k != n) {
-                log_error("Failed to read from file: %s", errno ? strerror(errno) : "Premature EOF");
-                return MHD_CONTENT_READER_END_WITH_ERROR;
-        }
-
-        return (ssize_t) k;
-}
-
-static int request_parse_accept(
-                RequestMeta *m,
-                struct MHD_Connection *connection) {
-
-        const char *header;
-
-        assert(m);
-        assert(connection);
-
-        header = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Accept");
-        if (!header)
-                return 0;
-
-        if (streq(header, mime_types[OUTPUT_JSON]))
-                m->mode = OUTPUT_JSON;
-        else if (streq(header, mime_types[OUTPUT_JSON_SSE]))
-                m->mode = OUTPUT_JSON_SSE;
-        else if (streq(header, mime_types[OUTPUT_EXPORT]))
-                m->mode = OUTPUT_EXPORT;
-        else
-                m->mode = OUTPUT_SHORT;
-
-        return 0;
-}
-
-static int request_parse_range(
-                RequestMeta *m,
-                struct MHD_Connection *connection) {
-
-        const char *range, *colon, *colon2;
-        int r;
-
-        assert(m);
-        assert(connection);
-
-        range = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, "Range");
-        if (!range)
-                return 0;
-
-        if (!startswith(range, "entries="))
-                return 0;
-
-        range += 8;
-        range += strspn(range, WHITESPACE);
-
-        colon = strchr(range, ':');
-        if (!colon)
-                m->cursor = strdup(range);
-        else {
-                const char *p;
-
-                colon2 = strchr(colon + 1, ':');
-                if (colon2) {
-                        _cleanup_free_ char *t;
-
-                        t = strndup(colon + 1, colon2 - colon - 1);
-                        if (!t)
-                                return -ENOMEM;
-
-                        r = safe_atoi64(t, &m->n_skip);
-                        if (r < 0)
-                                return r;
-                }
-
-                p = (colon2 ? colon2 : colon) + 1;
-                if (*p) {
-                        r = safe_atou64(p, &m->n_entries);
-                        if (r < 0)
-                                return r;
-
-                        if (m->n_entries <= 0)
-                                return -EINVAL;
-
-                        m->n_entries_set = true;
-                }
-
-                m->cursor = strndup(range, colon - range);
-        }
-
-        if (!m->cursor)
-                return -ENOMEM;
-
-        m->cursor[strcspn(m->cursor, WHITESPACE)] = 0;
-        if (isempty(m->cursor)) {
-                free(m->cursor);
-                m->cursor = NULL;
-        }
-
-        return 0;
-}
-
-static int request_parse_arguments_iterator(
-                void *cls,
-                enum MHD_ValueKind kind,
-                const char *key,
-                const char *value) {
-
-        RequestMeta *m = cls;
-        _cleanup_free_ char *p = NULL;
-        int r;
-
-        assert(m);
-
-        if (isempty(key)) {
-                m->argument_parse_error = -EINVAL;
-                return MHD_NO;
-        }
-
-        if (streq(key, "follow")) {
-                if (isempty(value)) {
-                        m->follow = true;
-                        return MHD_YES;
-                }
-
-                r = parse_boolean(value);
-                if (r < 0) {
-                        m->argument_parse_error = r;
-                        return MHD_NO;
-                }
-
-                m->follow = r;
-                return MHD_YES;
-        }
-
-        if (streq(key, "discrete")) {
-                if (isempty(value)) {
-                        m->discrete = true;
-                        return MHD_YES;
-                }
-
-                r = parse_boolean(value);
-                if (r < 0) {
-                        m->argument_parse_error = r;
-                        return MHD_NO;
-                }
-
-                m->discrete = r;
-                return MHD_YES;
-        }
-
-        if (streq(key, "boot")) {
-                if (isempty(value))
-                        r = true;
-                else {
-                        r = parse_boolean(value);
-                        if (r < 0) {
-                                m->argument_parse_error = r;
-                                return MHD_NO;
-                        }
-                }
-
-                if (r) {
-                        char match[9 + 32 + 1] = "_BOOT_ID=";
-                        sd_id128_t bid;
-
-                        r = sd_id128_get_boot(&bid);
-                        if (r < 0) {
-                                log_error("Failed to get boot ID: %s", strerror(-r));
-                                return MHD_NO;
-                        }
-
-                        sd_id128_to_string(bid, match + 9);
-                        r = sd_journal_add_match(m->journal, match, sizeof(match)-1);
-                        if (r < 0) {
-                                m->argument_parse_error = r;
-                                return MHD_NO;
-                        }
-                }
-
-                return MHD_YES;
-        }
-
-        p = strjoin(key, "=", strempty(value), NULL);
-        if (!p) {
-                m->argument_parse_error = log_oom();
-                return MHD_NO;
-        }
-
-        r = sd_journal_add_match(m->journal, p, 0);
-        if (r < 0) {
-                m->argument_parse_error = r;
-                return MHD_NO;
-        }
-
-        return MHD_YES;
-}
-
-static int request_parse_arguments(
-                RequestMeta *m,
-                struct MHD_Connection *connection) {
-
-        assert(m);
-        assert(connection);
-
-        m->argument_parse_error = 0;
-        MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND, request_parse_arguments_iterator, m);
-
-        return m->argument_parse_error;
-}
-
-static int request_handler_entries(
-                struct MHD_Connection *connection,
-                void *connection_cls) {
-
-        struct MHD_Response *response;
-        RequestMeta *m = connection_cls;
-        int r;
-
-        assert(connection);
-        assert(m);
-
-        r = open_journal(m);
-        if (r < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to open journal: %s\n", strerror(-r));
-
-        if (request_parse_accept(m, connection) < 0)
-                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse Accept header.\n");
-
-        if (request_parse_range(m, connection) < 0)
-                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse Range header.\n");
-
-        if (request_parse_arguments(m, connection) < 0)
-                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse URL arguments.\n");
-
-        if (m->discrete) {
-                if (!m->cursor)
-                        return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Discrete seeks require a cursor specification.\n");
-
-                m->n_entries = 1;
-                m->n_entries_set = true;
-        }
-
-        if (m->cursor)
-                r = sd_journal_seek_cursor(m->journal, m->cursor);
-        else if (m->n_skip >= 0)
-                r = sd_journal_seek_head(m->journal);
-        else if (m->n_skip < 0)
-                r = sd_journal_seek_tail(m->journal);
-        if (r < 0)
-                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to seek in journal.\n");
-
-        response = MHD_create_response_from_callback(MHD_SIZE_UNKNOWN, 4*1024, request_reader_entries, m, NULL);
-        if (!response)
-                return respond_oom(connection);
-
-        MHD_add_response_header(response, "Content-Type", mime_types[m->mode]);
-
-        r = MHD_queue_response(connection, MHD_HTTP_OK, response);
-        MHD_destroy_response(response);
-
-        return r;
-}
-
-static int output_field(FILE *f, OutputMode m, const char *d, size_t l) {
-        const char *eq;
-        size_t j;
-
-        eq = memchr(d, '=', l);
-        if (!eq)
-                return -EINVAL;
-
-        j = l - (eq - d + 1);
-
-        if (m == OUTPUT_JSON) {
-                fprintf(f, "{ \"%.*s\" : ", (int) (eq - d), d);
-                json_escape(f, eq+1, j, OUTPUT_FULL_WIDTH);
-                fputs(" }\n", f);
-        } else {
-                fwrite(eq+1, 1, j, f);
-                fputc('\n', f);
-        }
-
-        return 0;
-}
-
-static ssize_t request_reader_fields(
-                void *cls,
-                uint64_t pos,
-                char *buf,
-                size_t max) {
-
-        RequestMeta *m = cls;
-        int r;
-        size_t n, k;
-
-        assert(m);
-        assert(buf);
-        assert(max > 0);
-        assert(pos >= m->delta);
-
-        pos -= m->delta;
-
-        while (pos >= m->size) {
-                off_t sz;
-                const void *d;
-                size_t l;
-
-                /* End of this field, so let's serialize the next
-                 * one */
-
-                if (m->n_fields_set &&
-                    m->n_fields <= 0)
-                        return MHD_CONTENT_READER_END_OF_STREAM;
-
-                r = sd_journal_enumerate_unique(m->journal, &d, &l);
-                if (r < 0) {
-                        log_error("Failed to advance field index: %s", strerror(-r));
-                        return MHD_CONTENT_READER_END_WITH_ERROR;
-                } else if (r == 0)
-                        return MHD_CONTENT_READER_END_OF_STREAM;
-
-                pos -= m->size;
-                m->delta += m->size;
-
-                if (m->n_fields_set)
-                        m->n_fields -= 1;
-
-                if (m->tmp)
-                        rewind(m->tmp);
-                else {
-                        m->tmp = tmpfile();
-                        if (!m->tmp) {
-                                log_error("Failed to create temporary file: %m");
-                                return MHD_CONTENT_READER_END_WITH_ERROR;
-                        }
-                }
-
-                r = output_field(m->tmp, m->mode, d, l);
-                if (r < 0) {
-                        log_error("Failed to serialize item: %s", strerror(-r));
-                        return MHD_CONTENT_READER_END_WITH_ERROR;
-                }
-
-                sz = ftello(m->tmp);
-                if (sz == (off_t) -1) {
-                        log_error("Failed to retrieve file position: %m");
-                        return MHD_CONTENT_READER_END_WITH_ERROR;
-                }
-
-                m->size = (uint64_t) sz;
-        }
-
-        if (fseeko(m->tmp, pos, SEEK_SET) < 0) {
-                log_error("Failed to seek to position: %m");
-                return MHD_CONTENT_READER_END_WITH_ERROR;
-        }
-
-        n = m->size - pos;
-        if (n > max)
-                n = max;
-
-        errno = 0;
-        k = fread(buf, 1, n, m->tmp);
-        if (k != n) {
-                log_error("Failed to read from file: %s", errno ? strerror(errno) : "Premature EOF");
-                return MHD_CONTENT_READER_END_WITH_ERROR;
-        }
-
-        return (ssize_t) k;
-}
-
-static int request_handler_fields(
-                struct MHD_Connection *connection,
-                const char *field,
-                void *connection_cls) {
-
-        struct MHD_Response *response;
-        RequestMeta *m = connection_cls;
-        int r;
-
-        assert(connection);
-        assert(m);
-
-        r = open_journal(m);
-        if (r < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to open journal: %s\n", strerror(-r));
-
-        if (request_parse_accept(m, connection) < 0)
-                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to parse Accept header.\n");
-
-        r = sd_journal_query_unique(m->journal, field);
-        if (r < 0)
-                return mhd_respond(connection, MHD_HTTP_BAD_REQUEST, "Failed to query unique fields.\n");
-
-        response = MHD_create_response_from_callback(MHD_SIZE_UNKNOWN, 4*1024, request_reader_fields, m, NULL);
-        if (!response)
-                return respond_oom(connection);
-
-        MHD_add_response_header(response, "Content-Type", mime_types[m->mode == OUTPUT_JSON ? OUTPUT_JSON : OUTPUT_SHORT]);
-
-        r = MHD_queue_response(connection, MHD_HTTP_OK, response);
-        MHD_destroy_response(response);
-
-        return r;
-}
-
-static int request_handler_redirect(
-                struct MHD_Connection *connection,
-                const char *target) {
-
-        char *page;
-        struct MHD_Response *response;
-        int ret;
-
-        assert(connection);
-        assert(target);
-
-        if (asprintf(&page, "<html><body>Please continue to the <a href=\"%s\">journal browser</a>.</body></html>", target) < 0)
-                return respond_oom(connection);
-
-        response = MHD_create_response_from_buffer(strlen(page), page, MHD_RESPMEM_MUST_FREE);
-        if (!response) {
-                free(page);
-                return respond_oom(connection);
-        }
-
-        MHD_add_response_header(response, "Content-Type", "text/html");
-        MHD_add_response_header(response, "Location", target);
-
-        ret = MHD_queue_response(connection, MHD_HTTP_MOVED_PERMANENTLY, response);
-        MHD_destroy_response(response);
-
-        return ret;
-}
-
-static int request_handler_file(
-                struct MHD_Connection *connection,
-                const char *path,
-                const char *mime_type) {
-
-        struct MHD_Response *response;
-        int ret;
-        _cleanup_close_ int fd = -1;
-        struct stat st;
-
-        assert(connection);
-        assert(path);
-        assert(mime_type);
-
-        fd = open(path, O_RDONLY|O_CLOEXEC);
-        if (fd < 0)
-                return mhd_respondf(connection, MHD_HTTP_NOT_FOUND, "Failed to open file %s: %m\n", path);
-
-        if (fstat(fd, &st) < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to stat file: %m\n");
-
-        response = MHD_create_response_from_fd_at_offset(st.st_size, fd, 0);
-        if (!response)
-                return respond_oom(connection);
-
-        fd = -1;
-
-        MHD_add_response_header(response, "Content-Type", mime_type);
-
-        ret = MHD_queue_response(connection, MHD_HTTP_OK, response);
-        MHD_destroy_response(response);
-
-        return ret;
-}
-
-static int get_virtualization(char **v) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
-        char *b = NULL;
-        int r;
-
-        r = sd_bus_default_system(&bus);
-        if (r < 0)
-                return r;
-
-        r = sd_bus_get_property_string(
-                        bus,
-                        "org.freedesktop.systemd1",
-                        "/org/freedesktop/systemd1",
-                        "org.freedesktop.systemd1.Manager",
-                        "Virtualization",
-                        NULL,
-                        &b);
-        if (r < 0)
-                return r;
-
-        if (isempty(b)) {
-                free(b);
-                *v = NULL;
-                return 0;
-        }
-
-        *v = b;
-        return 1;
-}
-
-static int request_handler_machine(
-                struct MHD_Connection *connection,
-                void *connection_cls) {
-
-        struct MHD_Response *response;
-        RequestMeta *m = connection_cls;
-        int r;
-        _cleanup_free_ char* hostname = NULL, *os_name = NULL;
-        uint64_t cutoff_from = 0, cutoff_to = 0, usage;
-        char *json;
-        sd_id128_t mid, bid;
-        _cleanup_free_ char *v = NULL;
-
-        assert(connection);
-        assert(m);
-
-        r = open_journal(m);
-        if (r < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to open journal: %s\n", strerror(-r));
-
-        r = sd_id128_get_machine(&mid);
-        if (r < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine machine ID: %s\n", strerror(-r));
-
-        r = sd_id128_get_boot(&bid);
-        if (r < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine boot ID: %s\n", strerror(-r));
-
-        hostname = gethostname_malloc();
-        if (!hostname)
-                return respond_oom(connection);
-
-        r = sd_journal_get_usage(m->journal, &usage);
-        if (r < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine disk usage: %s\n", strerror(-r));
-
-        r = sd_journal_get_cutoff_realtime_usec(m->journal, &cutoff_from, &cutoff_to);
-        if (r < 0)
-                return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine disk usage: %s\n", strerror(-r));
-
-        if (parse_env_file("/etc/os-release", NEWLINE, "PRETTY_NAME", &os_name, NULL) == -ENOENT)
-                parse_env_file("/usr/lib/os-release", NEWLINE, "PRETTY_NAME", &os_name, NULL);
-
-        get_virtualization(&v);
-
-        r = asprintf(&json,
-                     "{ \"machine_id\" : \"" SD_ID128_FORMAT_STR "\","
-                     "\"boot_id\" : \"" SD_ID128_FORMAT_STR "\","
-                     "\"hostname\" : \"%s\","
-                     "\"os_pretty_name\" : \"%s\","
-                     "\"virtualization\" : \"%s\","
-                     "\"usage\" : \"%"PRIu64"\","
-                     "\"cutoff_from_realtime\" : \"%"PRIu64"\","
-                     "\"cutoff_to_realtime\" : \"%"PRIu64"\" }\n",
-                     SD_ID128_FORMAT_VAL(mid),
-                     SD_ID128_FORMAT_VAL(bid),
-                     hostname_cleanup(hostname, false),
-                     os_name ? os_name : "Linux",
-                     v ? v : "bare",
-                     usage,
-                     cutoff_from,
-                     cutoff_to);
-
-        if (r < 0)
-                return respond_oom(connection);
-
-        response = MHD_create_response_from_buffer(strlen(json), json, MHD_RESPMEM_MUST_FREE);
-        if (!response) {
-                free(json);
-                return respond_oom(connection);
-        }
-
-        MHD_add_response_header(response, "Content-Type", "application/json");
-        r = MHD_queue_response(connection, MHD_HTTP_OK, response);
-        MHD_destroy_response(response);
-
-        return r;
-}
-
-static int request_handler(
-                void *cls,
-                struct MHD_Connection *connection,
-                const char *url,
-                const char *method,
-                const char *version,
-                const char *upload_data,
-                size_t *upload_data_size,
-                void **connection_cls) {
-        int r, code;
-
-        assert(connection);
-        assert(connection_cls);
-        assert(url);
-        assert(method);
-
-        if (!streq(method, "GET"))
-                return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
-                                   "Unsupported method.\n");
-
-
-        if (!*connection_cls) {
-                if (!request_meta(connection_cls))
-                        return respond_oom(connection);
-                return MHD_YES;
-        }
-
-        if (trust_pem) {
-                r = check_permissions(connection, &code);
-                if (r < 0)
-                        return code;
-        }
-
-        if (streq(url, "/"))
-                return request_handler_redirect(connection, "/browse");
-
-        if (streq(url, "/entries"))
-                return request_handler_entries(connection, *connection_cls);
-
-        if (startswith(url, "/fields/"))
-                return request_handler_fields(connection, url + 8, *connection_cls);
-
-        if (streq(url, "/browse"))
-                return request_handler_file(connection, DOCUMENT_ROOT "/browse.html", "text/html");
-
-        if (streq(url, "/machine"))
-                return request_handler_machine(connection, *connection_cls);
-
-        return mhd_respond(connection, MHD_HTTP_NOT_FOUND, "Not found.\n");
-}
-
-static int help(void) {
-
-        printf("%s [OPTIONS...] ...\n\n"
-               "HTTP server for journal events.\n\n"
-               "  -h --help           Show this help\n"
-               "     --version        Show package version\n"
-               "     --cert=CERT.PEM  Server certificate in PEM format\n"
-               "     --key=KEY.PEM    Server key in PEM format\n"
-               "     --trust=CERT.PEM Certificat authority certificate in PEM format\n",
-               program_invocation_short_name);
-
-        return 0;
-}
-
-static int parse_argv(int argc, char *argv[]) {
-        enum {
-                ARG_VERSION = 0x100,
-                ARG_KEY,
-                ARG_CERT,
-                ARG_TRUST,
-        };
-
-        int r, c;
-
-        static const struct option options[] = {
-                { "help",    no_argument,       NULL, 'h'         },
-                { "version", no_argument,       NULL, ARG_VERSION },
-                { "key",     required_argument, NULL, ARG_KEY     },
-                { "cert",    required_argument, NULL, ARG_CERT    },
-                { "trust",   required_argument, NULL, ARG_TRUST   },
-                {}
-        };
-
-        assert(argc >= 0);
-        assert(argv);
-
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
-
-                switch(c) {
-
-                case 'h':
-                        return help();
-
-                case ARG_VERSION:
-                        puts(PACKAGE_STRING);
-                        puts(SYSTEMD_FEATURES);
-                        return 0;
-
-                case ARG_KEY:
-                        if (key_pem) {
-                                log_error("Key file specified twice");
-                                return -EINVAL;
-                        }
-                        r = read_full_file(optarg, &key_pem, NULL);
-                        if (r < 0) {
-                                log_error("Failed to read key file: %s", strerror(-r));
-                                return r;
-                        }
-                        assert(key_pem);
-                        break;
-
-                case ARG_CERT:
-                        if (cert_pem) {
-                                log_error("Certificate file specified twice");
-                                return -EINVAL;
-                        }
-                        r = read_full_file(optarg, &cert_pem, NULL);
-                        if (r < 0) {
-                                log_error("Failed to read certificate file: %s", strerror(-r));
-                                return r;
-                        }
-                        assert(cert_pem);
-                        break;
-
-                case ARG_TRUST:
-#ifdef HAVE_GNUTLS
-                        if (trust_pem) {
-                                log_error("CA certificate file specified twice");
-                                return -EINVAL;
-                        }
-                        r = read_full_file(optarg, &trust_pem, NULL);
-                        if (r < 0) {
-                                log_error("Failed to read CA certificate file: %s", strerror(-r));
-                                return r;
-                        }
-                        assert(trust_pem);
-                        break;
-#else
-                        log_error("Option --trust is not available.");
-#endif
-
-                case '?':
-                        return -EINVAL;
-
-                default:
-                        assert_not_reached("Unhandled option");
-                }
-
-        if (optind < argc) {
-                log_error("This program does not take arguments.");
-                return -EINVAL;
-        }
-
-        if (!!key_pem != !!cert_pem) {
-                log_error("Certificate and key files must be specified together");
-                return -EINVAL;
-        }
-
-        if (trust_pem && !key_pem) {
-                log_error("CA certificate can only be used with certificate file");
-                return -EINVAL;
-        }
-
-        return 1;
-}
-
-int main(int argc, char *argv[]) {
-        struct MHD_Daemon *d = NULL;
-        int r, n;
-
-        log_set_target(LOG_TARGET_AUTO);
-        log_parse_environment();
-        log_open();
-
-        r = parse_argv(argc, argv);
-        if (r < 0)
-                return EXIT_FAILURE;
-        if (r == 0)
-                return EXIT_SUCCESS;
-
-#ifdef HAVE_GNUTLS
-        gnutls_global_set_log_function(log_func_gnutls);
-        gnutls_global_set_log_level(GNUTLS_LOG_LEVEL);
-#endif
-
-        n = sd_listen_fds(1);
-        if (n < 0) {
-                log_error("Failed to determine passed sockets: %s", strerror(-n));
-                goto finish;
-        } else if (n > 1) {
-                log_error("Can't listen on more than one socket.");
-                goto finish;
-        } else {
-                struct MHD_OptionItem opts[] = {
-                        { MHD_OPTION_NOTIFY_COMPLETED,
-                          (intptr_t) request_meta_free, NULL },
-                        { MHD_OPTION_EXTERNAL_LOGGER,
-                          (intptr_t) microhttpd_logger, NULL },
-                        { MHD_OPTION_END, 0, NULL },
-                        { MHD_OPTION_END, 0, NULL },
-                        { MHD_OPTION_END, 0, NULL },
-                        { MHD_OPTION_END, 0, NULL },
-                        { MHD_OPTION_END, 0, NULL }};
-                int opts_pos = 2;
-                int flags = MHD_USE_THREAD_PER_CONNECTION|MHD_USE_POLL|MHD_USE_DEBUG;
-
-                if (n > 0)
-                        opts[opts_pos++] = (struct MHD_OptionItem)
-                                {MHD_OPTION_LISTEN_SOCKET, SD_LISTEN_FDS_START};
-                if (key_pem) {
-                        assert(cert_pem);
-                        opts[opts_pos++] = (struct MHD_OptionItem)
-                                {MHD_OPTION_HTTPS_MEM_KEY, 0, key_pem};
-                        opts[opts_pos++] = (struct MHD_OptionItem)
-                                {MHD_OPTION_HTTPS_MEM_CERT, 0, cert_pem};
-                        flags |= MHD_USE_SSL;
-                }
-                if (trust_pem) {
-                        assert(flags & MHD_USE_SSL);
-                        opts[opts_pos++] = (struct MHD_OptionItem)
-                                {MHD_OPTION_HTTPS_MEM_TRUST, 0, trust_pem};
-                }
-
-                d = MHD_start_daemon(flags, 19531,
-                                     NULL, NULL,
-                                     request_handler, NULL,
-                                     MHD_OPTION_ARRAY, opts,
-                                     MHD_OPTION_END);
-        }
-
-        if (!d) {
-                log_error("Failed to start daemon!");
-                goto finish;
-        }
-
-        pause();
-
-        r = EXIT_SUCCESS;
-
-finish:
-        if (d)
-                MHD_stop_daemon(d);
-
-        return r;
-}
index 2c401e3083d0fde852b7bb482f31060d4951bf94..70847db0bfd25e74cd4e3b94d71fef8a52886f21 100644 (file)
@@ -25,7 +25,7 @@
 #include <inttypes.h>
 #include <stdbool.h>
 
-#include <systemd/sd-id128.h>
+#include "systemd/sd-id128.h"
 
 #include "journal-def.h"
 #include "list.h"
@@ -100,7 +100,7 @@ struct sd_journal {
         char *path;
         char *prefix;
 
-        Hashmap *files;
+        OrderedHashmap *files;
         MMapCache *mmap;
 
         Location current_location;
@@ -124,6 +124,10 @@ struct sd_journal {
 
         bool on_network;
         bool no_new_files;
+        bool unique_file_lost; /* File we were iterating over got
+                                  removed, and there were no more
+                                  files, so sd_j_enumerate_unique
+                                  will return a value equal to 0. */
 
         size_t data_threshold;
 
index da6244c160cf35a12dc9f418903ada7c0fefeed4..c527e6555353c018fb57191853ea6b3f795590a7 100644 (file)
@@ -25,6 +25,6 @@
 #include <sys/types.h>
 #include <stdio.h>
 
-#include <systemd/sd-id128.h>
+#include "systemd/sd-id128.h"
 
 int print_qr_code(FILE *f, const void *seed, size_t seed_size, uint64_t start, uint64_t interval, const char *hn, sd_id128_t machine);
diff --git a/src/journal/journal-remote-parse.c b/src/journal/journal-remote-parse.c
deleted file mode 100644 (file)
index dbdf02a..0000000
+++ /dev/null
@@ -1,439 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#include "journal-remote-parse.h"
-#include "journald-native.h"
-
-#define LINE_CHUNK 1024u
-
-void source_free(RemoteSource *source) {
-        if (!source)
-                return;
-
-        if (source->fd >= 0) {
-                log_debug("Closing fd:%d (%s)", source->fd, source->name);
-                close(source->fd);
-        }
-        free(source->name);
-        free(source->buf);
-        iovw_free_contents(&source->iovw);
-        free(source);
-}
-
-static int get_line(RemoteSource *source, char **line, size_t *size) {
-        ssize_t n, remain;
-        char *c = NULL;
-        char *newbuf = NULL;
-        size_t newsize = 0;
-
-        assert(source);
-        assert(source->state == STATE_LINE);
-        assert(source->filled <= source->size);
-        assert(source->buf == NULL || source->size > 0);
-
-        if (source->buf)
-                c = memchr(source->buf, '\n', source->filled);
-
-        if (c != NULL)
-                goto docopy;
-
- resize:
-        if (source->fd < 0)
-                /* we have to wait for some data to come to us */
-                return -EWOULDBLOCK;
-
-        if (source->size - source->filled < LINE_CHUNK) {
-                // XXX: add check for maximum line length
-
-                if (!GREEDY_REALLOC(source->buf, source->size,
-                                    source->filled + LINE_CHUNK))
-                        return log_oom();
-        }
-        assert(source->size - source->filled >= LINE_CHUNK);
-
-        n = read(source->fd, source->buf + source->filled,
-                 source->size - source->filled);
-        if (n < 0) {
-                if (errno != EAGAIN && errno != EWOULDBLOCK)
-                        log_error("read(%d, ..., %zd): %m", source->fd,
-                                  source->size - source->filled);
-                return -errno;
-        } else if (n == 0)
-                return 0;
-
-        c = memchr(source->buf + source->filled, '\n', n);
-        source->filled += n;
-
-        if (c == NULL)
-                goto resize;
-
- docopy:
-        *line = source->buf;
-        *size = c + 1 - source->buf;
-
-        /* Check if something remains */
-        remain = source->buf + source->filled - c - 1;
-        assert(remain >= 0);
-        if (remain) {
-                newsize = MAX(remain, LINE_CHUNK);
-                newbuf = malloc(newsize);
-                if (!newbuf)
-                        return log_oom();
-                memcpy(newbuf, c + 1, remain);
-        }
-        source->buf = newbuf;
-        source->size = newsize;
-        source->filled = remain;
-
-        return 1;
-}
-
-int push_data(RemoteSource *source, const char *data, size_t size) {
-        assert(source);
-        assert(source->state != STATE_EOF);
-
-        if (!GREEDY_REALLOC(source->buf, source->size,
-                            source->filled + size))
-                return log_oom();
-
-        memcpy(source->buf + source->filled, data, size);
-        source->filled += size;
-
-        return 0;
-}
-
-static int fill_fixed_size(RemoteSource *source, void **data, size_t size) {
-        int n;
-        char *newbuf = NULL;
-        size_t newsize = 0, remain;
-
-        assert(source);
-        assert(source->state == STATE_DATA_START ||
-               source->state == STATE_DATA ||
-               source->state == STATE_DATA_FINISH);
-        assert(size <= DATA_SIZE_MAX);
-        assert(source->filled <= source->size);
-        assert(source->buf != NULL || source->size == 0);
-        assert(source->buf == NULL || source->size > 0);
-        assert(data);
-
-        while(source->filled < size) {
-                if (source->fd < 0)
-                        /* we have to wait for some data to come to us */
-                        return -EWOULDBLOCK;
-
-                if (!GREEDY_REALLOC(source->buf, source->size, size))
-                        return log_oom();
-
-                n = read(source->fd, source->buf + source->filled,
-                         source->size - source->filled);
-                if (n < 0) {
-                        if (errno != EAGAIN && errno != EWOULDBLOCK)
-                                log_error("read(%d, ..., %zd): %m", source->fd,
-                                          source->size - source->filled);
-                        return -errno;
-                } else if (n == 0)
-                        return 0;
-
-                source->filled += n;
-        }
-
-        *data = source->buf;
-
-        /* Check if something remains */
-        assert(size <= source->filled);
-        remain = source->filled - size;
-        if (remain) {
-                newsize = MAX(remain, LINE_CHUNK);
-                newbuf = malloc(newsize);
-                if (!newbuf)
-                        return log_oom();
-                memcpy(newbuf, source->buf + size, remain);
-        }
-        source->buf = newbuf;
-        source->size = newsize;
-        source->filled = remain;
-
-        return 1;
-}
-
-static int get_data_size(RemoteSource *source) {
-        int r;
-        _cleanup_free_ void *data = NULL;
-
-        assert(source);
-        assert(source->state == STATE_DATA_START);
-        assert(source->data_size == 0);
-
-        r = fill_fixed_size(source, &data, sizeof(uint64_t));
-        if (r <= 0)
-                return r;
-
-        source->data_size = le64toh( *(uint64_t *) data );
-        if (source->data_size > DATA_SIZE_MAX) {
-                log_error("Stream declares field with size %zu > %u == DATA_SIZE_MAX",
-                          source->data_size, DATA_SIZE_MAX);
-                return -EINVAL;
-        }
-        if (source->data_size == 0)
-                log_warning("Binary field with zero length");
-
-        return 1;
-}
-
-static int get_data_data(RemoteSource *source, void **data) {
-        int r;
-
-        assert(source);
-        assert(data);
-        assert(source->state == STATE_DATA);
-
-        r = fill_fixed_size(source, data, source->data_size);
-        if (r <= 0)
-                return r;
-
-        return 1;
-}
-
-static int get_data_newline(RemoteSource *source) {
-        int r;
-        _cleanup_free_ char *data = NULL;
-
-        assert(source);
-        assert(source->state == STATE_DATA_FINISH);
-
-        r = fill_fixed_size(source, (void**) &data, 1);
-        if (r <= 0)
-                return r;
-
-        assert(data);
-        if (*data != '\n') {
-                log_error("expected newline, got '%c'", *data);
-                return -EINVAL;
-        }
-
-        return 1;
-}
-
-static int process_dunder(RemoteSource *source, char *line, size_t n) {
-        const char *timestamp;
-        int r;
-
-        assert(line);
-        assert(n > 0);
-        assert(line[n-1] == '\n');
-
-        /* XXX: is it worth to support timestamps in extended format?
-         * We don't produce them, but who knows... */
-
-        timestamp = startswith(line, "__CURSOR=");
-        if (timestamp)
-                /* ignore __CURSOR */
-                return 1;
-
-        timestamp = startswith(line, "__REALTIME_TIMESTAMP=");
-        if (timestamp) {
-                long long unsigned x;
-                line[n-1] = '\0';
-                r = safe_atollu(timestamp, &x);
-                if (r < 0)
-                        log_warning("Failed to parse __REALTIME_TIMESTAMP: '%s'", timestamp);
-                else
-                        source->ts.realtime = x;
-                return r < 0 ? r : 1;
-        }
-
-        timestamp = startswith(line, "__MONOTONIC_TIMESTAMP=");
-        if (timestamp) {
-                long long unsigned x;
-                line[n-1] = '\0';
-                r = safe_atollu(timestamp, &x);
-                if (r < 0)
-                        log_warning("Failed to parse __MONOTONIC_TIMESTAMP: '%s'", timestamp);
-                else
-                        source->ts.monotonic = x;
-                return r < 0 ? r : 1;
-        }
-
-        timestamp = startswith(line, "__");
-        if (timestamp) {
-                log_notice("Unknown dunder line %s", line);
-                return 1;
-        }
-
-        /* no dunder */
-        return 0;
-}
-
-int process_data(RemoteSource *source) {
-        int r;
-
-        switch(source->state) {
-        case STATE_LINE: {
-                char *line, *sep;
-                size_t n;
-
-                assert(source->data_size == 0);
-
-                r = get_line(source, &line, &n);
-                if (r < 0)
-                        return r;
-                if (r == 0) {
-                        source->state = STATE_EOF;
-                        return r;
-                }
-                assert(n > 0);
-                assert(line[n-1] == '\n');
-
-                if (n == 1) {
-                        log_debug("Received empty line, event is ready");
-                        free(line);
-                        return 1;
-                }
-
-                r = process_dunder(source, line, n);
-                if (r != 0) {
-                        free(line);
-                        return r < 0 ? r : 0;
-                }
-
-                /* MESSAGE=xxx\n
-                   or
-                   COREDUMP\n
-                   LLLLLLLL0011223344...\n
-                */
-                sep = memchr(line, '=', n);
-                if (sep)
-                        /* chomp newline */
-                        n--;
-                else
-                        /* replace \n with = */
-                        line[n-1] = '=';
-                log_debug("Received: %.*s", (int) n, line);
-
-                r = iovw_put(&source->iovw, line, n);
-                if (r < 0) {
-                        log_error("Failed to put line in iovect");
-                        free(line);
-                        return r;
-                }
-
-                if (!sep)
-                        source->state = STATE_DATA_START;
-                return 0; /* continue */
-        }
-
-        case STATE_DATA_START:
-                assert(source->data_size == 0);
-
-                r = get_data_size(source);
-                log_debug("get_data_size() -> %d", r);
-                if (r < 0)
-                        return r;
-                if (r == 0) {
-                        source->state = STATE_EOF;
-                        return 0;
-                }
-
-                source->state = source->data_size > 0 ?
-                        STATE_DATA : STATE_DATA_FINISH;
-
-                return 0; /* continue */
-
-        case STATE_DATA: {
-                void *data;
-
-                assert(source->data_size > 0);
-
-                r = get_data_data(source, &data);
-                log_debug("get_data_data() -> %d", r);
-                if (r < 0)
-                        return r;
-                if (r == 0) {
-                        source->state = STATE_EOF;
-                        return 0;
-                }
-
-                assert(data);
-
-                r = iovw_put(&source->iovw, data, source->data_size);
-                if (r < 0) {
-                        log_error("failed to put binary buffer in iovect");
-                        return r;
-                }
-
-                source->state = STATE_DATA_FINISH;
-
-                return 0; /* continue */
-        }
-
-        case STATE_DATA_FINISH:
-                r = get_data_newline(source);
-                log_debug("get_data_newline() -> %d", r);
-                if (r < 0)
-                        return r;
-                if (r == 0) {
-                        source->state = STATE_EOF;
-                        return 0;
-                }
-
-                source->data_size = 0;
-                source->state = STATE_LINE;
-
-                return 0; /* continue */
-        default:
-                assert_not_reached("wtf?");
-        }
-}
-
-int process_source(RemoteSource *source, Writer *writer, bool compress, bool seal) {
-        int r;
-
-        assert(source);
-        assert(writer);
-
-        r = process_data(source);
-        if (r <= 0)
-                return r;
-
-        /* We have a full event */
-        log_info("Received a full event from source@%p fd:%d (%s)",
-                 source, source->fd, source->name);
-
-        if (!source->iovw.count) {
-                log_warning("Entry with no payload, skipping");
-                goto freeing;
-        }
-
-        assert(source->iovw.iovec);
-        assert(source->iovw.count);
-
-        r = writer_write(writer, &source->iovw, &source->ts, compress, seal);
-        if (r < 0)
-                log_error("Failed to write entry of %zu bytes: %s",
-                          iovw_size(&source->iovw), strerror(-r));
-        else
-                r = 1;
-
- freeing:
-        iovw_free_contents(&source->iovw);
-        return r;
-}
diff --git a/src/journal/journal-remote-parse.h b/src/journal/journal-remote-parse.h
deleted file mode 100644 (file)
index c1506d1..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#pragma once
-
-#include "sd-event.h"
-#include "journal-remote-write.h"
-
-typedef enum {
-        STATE_LINE = 0,    /* waiting to read, or reading line */
-        STATE_DATA_START,  /* reading binary data header */
-        STATE_DATA,        /* reading binary data */
-        STATE_DATA_FINISH, /* expecting newline */
-        STATE_EOF,         /* done */
-} source_state;
-
-typedef struct RemoteSource {
-        char* name;
-        int fd;
-
-        char *buf;
-        size_t size;
-        size_t filled;
-        size_t data_size;
-
-        struct iovec_wrapper iovw;
-
-        source_state state;
-        dual_timestamp ts;
-
-        sd_event_source *event;
-} RemoteSource;
-
-static inline int source_non_empty(RemoteSource *source) {
-        assert(source);
-
-        return source->filled > 0;
-}
-
-void source_free(RemoteSource *source);
-int process_data(RemoteSource *source);
-int push_data(RemoteSource *source, const char *data, size_t size);
-int process_source(RemoteSource *source, Writer *writer, bool compress, bool seal);
diff --git a/src/journal/journal-remote-write.c b/src/journal/journal-remote-write.c
deleted file mode 100644 (file)
index 4d142bd..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#include "journal-remote-write.h"
-
-int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len) {
-        if (!GREEDY_REALLOC(iovw->iovec, iovw->size_bytes, iovw->count + 1))
-                return log_oom();
-
-        iovw->iovec[iovw->count++] = (struct iovec) {data, len};
-        return 0;
-}
-
-void iovw_free_contents(struct iovec_wrapper *iovw) {
-        for (size_t j = 0; j < iovw->count; j++)
-                free(iovw->iovec[j].iov_base);
-        free(iovw->iovec);
-        iovw->iovec = NULL;
-        iovw->size_bytes = iovw->count = 0;
-}
-
-size_t iovw_size(struct iovec_wrapper *iovw) {
-        size_t n = 0, i;
-
-        for(i = 0; i < iovw->count; i++)
-                n += iovw->iovec[i].iov_len;
-
-        return n;
-}
-
-/**********************************************************************
- **********************************************************************
- **********************************************************************/
-
-static int do_rotate(JournalFile **f, bool compress, bool seal) {
-        int r = journal_file_rotate(f, compress, seal);
-        if (r < 0) {
-                if (*f)
-                        log_error("Failed to rotate %s: %s", (*f)->path,
-                                  strerror(-r));
-                else
-                        log_error("Failed to create rotated journal: %s",
-                                  strerror(-r));
-        }
-
-        return r;
-}
-
-int writer_init(Writer *s) {
-        assert(s);
-
-        s->journal = NULL;
-
-        memset(&s->metrics, 0xFF, sizeof(s->metrics));
-
-        s->mmap = mmap_cache_new();
-        if (!s->mmap)
-                return log_oom();
-
-        s->seqnum = 0;
-
-        return 0;
-}
-
-int writer_close(Writer *s) {
-        if (s->journal)
-                journal_file_close(s->journal);
-        if (s->mmap)
-                mmap_cache_unref(s->mmap);
-        return 0;
-}
-
-int writer_write(Writer *s,
-                 struct iovec_wrapper *iovw,
-                 dual_timestamp *ts,
-                 bool compress,
-                 bool seal) {
-        int r;
-
-        assert(s);
-        assert(iovw);
-        assert(iovw->count > 0);
-
-        if (journal_file_rotate_suggested(s->journal, 0)) {
-                log_info("%s: Journal header limits reached or header out-of-date, rotating",
-                         s->journal->path);
-                r = do_rotate(&s->journal, compress, seal);
-                if (r < 0)
-                        return r;
-        }
-
-        r = journal_file_append_entry(s->journal, ts, iovw->iovec, iovw->count,
-                                      &s->seqnum, NULL, NULL);
-        if (r >= 0)
-                return 1;
-
-        log_info("%s: Write failed, rotating", s->journal->path);
-        r = do_rotate(&s->journal, compress, seal);
-        if (r < 0)
-                return r;
-
-        log_debug("Retrying write.");
-        r = journal_file_append_entry(s->journal, ts, iovw->iovec, iovw->count,
-                                      &s->seqnum, NULL, NULL);
-        return r < 0 ? r : 1;
-}
diff --git a/src/journal/journal-remote-write.h b/src/journal/journal-remote-write.h
deleted file mode 100644 (file)
index 8798216..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#pragma once
-
-#include <stdlib.h>
-
-#include "journal-file.h"
-
-struct iovec_wrapper {
-        struct iovec *iovec;
-        size_t size_bytes;
-        size_t count;
-};
-
-int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len);
-void iovw_free_contents(struct iovec_wrapper *iovw);
-size_t iovw_size(struct iovec_wrapper *iovw);
-
-typedef struct Writer {
-        JournalFile *journal;
-        JournalMetrics metrics;
-        MMapCache *mmap;
-        uint64_t seqnum;
-} Writer;
-
-int writer_init(Writer *s);
-int writer_close(Writer *s);
-int writer_write(Writer *s,
-                 struct iovec_wrapper *iovw,
-                 dual_timestamp *ts,
-                 bool compress,
-                 bool seal);
diff --git a/src/journal/journal-remote.c b/src/journal/journal-remote.c
deleted file mode 100644 (file)
index a31dc2c..0000000
+++ /dev/null
@@ -1,1239 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/prctl.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <getopt.h>
-
-#include "sd-daemon.h"
-#include "sd-event.h"
-#include "journal-file.h"
-#include "journald-native.h"
-#include "socket-util.h"
-#include "mkdir.h"
-#include "build.h"
-#include "macro.h"
-#include "strv.h"
-#include "fileio.h"
-#include "microhttpd-util.h"
-
-#ifdef HAVE_GNUTLS
-#include <gnutls/gnutls.h>
-#endif
-
-#include "journal-remote-parse.h"
-#include "journal-remote-write.h"
-
-#define REMOTE_JOURNAL_PATH "/var/log/journal/" SD_ID128_FORMAT_STR "/remote-%s.journal"
-
-static char* arg_output = NULL;
-static char* arg_url = NULL;
-static char* arg_getter = NULL;
-static char* arg_listen_raw = NULL;
-static char* arg_listen_http = NULL;
-static char* arg_listen_https = NULL;
-static char** arg_files = NULL;
-static int arg_compress = true;
-static int arg_seal = false;
-static int http_socket = -1, https_socket = -1;
-
-static char *key_pem = NULL;
-static char *cert_pem = NULL;
-static char *trust_pem = NULL;
-
-/**********************************************************************
- **********************************************************************
- **********************************************************************/
-
-static int spawn_child(const char* child, char** argv) {
-        int fd[2];
-        pid_t parent_pid, child_pid;
-        int r;
-
-        if (pipe(fd) < 0) {
-                log_error("Failed to create pager pipe: %m");
-                return -errno;
-        }
-
-        parent_pid = getpid();
-
-        child_pid = fork();
-        if (child_pid < 0) {
-                r = -errno;
-                log_error("Failed to fork: %m");
-                safe_close_pair(fd);
-                return r;
-        }
-
-        /* In the child */
-        if (child_pid == 0) {
-                r = dup2(fd[1], STDOUT_FILENO);
-                if (r < 0) {
-                        log_error("Failed to dup pipe to stdout: %m");
-                        _exit(EXIT_FAILURE);
-                }
-
-                safe_close_pair(fd);
-
-                /* Make sure the child goes away when the parent dies */
-                if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)
-                        _exit(EXIT_FAILURE);
-
-                /* Check whether our parent died before we were able
-                 * to set the death signal */
-                if (getppid() != parent_pid)
-                        _exit(EXIT_SUCCESS);
-
-                execvp(child, argv);
-                log_error("Failed to exec child %s: %m", child);
-                _exit(EXIT_FAILURE);
-        }
-
-        r = close(fd[1]);
-        if (r < 0)
-                log_warning("Failed to close write end of pipe: %m");
-
-        return fd[0];
-}
-
-static int spawn_curl(char* url) {
-        char **argv = STRV_MAKE("curl",
-                                "-HAccept: application/vnd.fdo.journal",
-                                "--silent",
-                                "--show-error",
-                                url);
-        int r;
-
-        r = spawn_child("curl", argv);
-        if (r < 0)
-                log_error("Failed to spawn curl: %m");
-        return r;
-}
-
-static int spawn_getter(char *getter, char *url) {
-        int r;
-        _cleanup_strv_free_ char **words = NULL;
-
-        assert(getter);
-        words = strv_split_quoted(getter);
-        if (!words)
-                return log_oom();
-
-        r = spawn_child(words[0], words);
-        if (r < 0)
-                log_error("Failed to spawn getter %s: %m", getter);
-
-        return r;
-}
-
-static int open_output(Writer *s, const char* url) {
-        _cleanup_free_ char *name, *output = NULL;
-        char *c;
-        int r;
-
-        assert(url);
-        name = strdup(url);
-        if (!name)
-                return log_oom();
-
-        for(c = name; *c; c++) {
-                if (*c == '/' || *c == ':' || *c == ' ')
-                        *c = '~';
-                else if (*c == '?') {
-                        *c = '\0';
-                        break;
-                }
-        }
-
-        if (!arg_output) {
-                sd_id128_t machine;
-                r = sd_id128_get_machine(&machine);
-                if (r < 0) {
-                        log_error("failed to determine machine ID128: %s", strerror(-r));
-                        return r;
-                }
-
-                r = asprintf(&output, REMOTE_JOURNAL_PATH,
-                             SD_ID128_FORMAT_VAL(machine), name);
-                if (r < 0)
-                        return log_oom();
-        } else {
-                r = is_dir(arg_output, true);
-                if (r > 0) {
-                        r = asprintf(&output,
-                                     "%s/remote-%s.journal", arg_output, name);
-                        if (r < 0)
-                                return log_oom();
-                } else {
-                        output = strdup(arg_output);
-                        if (!output)
-                                return log_oom();
-                }
-        }
-
-        r = journal_file_open_reliably(output,
-                                       O_RDWR|O_CREAT, 0640,
-                                       arg_compress, arg_seal,
-                                       &s->metrics,
-                                       s->mmap,
-                                       NULL, &s->journal);
-        if (r < 0)
-                log_error("Failed to open output journal %s: %s",
-                          arg_output, strerror(-r));
-        else
-                log_info("Opened output file %s", s->journal->path);
-        return r;
-}
-
-/**********************************************************************
- **********************************************************************
- **********************************************************************/
-
-typedef struct MHDDaemonWrapper {
-        uint64_t fd;
-        struct MHD_Daemon *daemon;
-
-        sd_event_source *event;
-} MHDDaemonWrapper;
-
-typedef struct RemoteServer {
-        RemoteSource **sources;
-        size_t sources_size;
-        size_t active;
-
-        sd_event *events;
-        sd_event_source *sigterm_event, *sigint_event, *listen_event;
-
-        Writer writer;
-
-        Hashmap *daemons;
-} RemoteServer;
-
-/* This should go away as soon as µhttpd allows state to be passed around. */
-static RemoteServer *server;
-
-static int dispatch_raw_source_event(sd_event_source *event,
-                                     int fd,
-                                     uint32_t revents,
-                                     void *userdata);
-static int dispatch_raw_connection_event(sd_event_source *event,
-                                         int fd,
-                                         uint32_t revents,
-                                         void *userdata);
-static int dispatch_http_event(sd_event_source *event,
-                               int fd,
-                               uint32_t revents,
-                               void *userdata);
-
-static int get_source_for_fd(RemoteServer *s, int fd, RemoteSource **source) {
-        assert(fd >= 0);
-        assert(source);
-
-        if (!GREEDY_REALLOC0(s->sources, s->sources_size, fd + 1))
-                return log_oom();
-
-        if (s->sources[fd] == NULL) {
-                s->sources[fd] = new0(RemoteSource, 1);
-                if (!s->sources[fd])
-                        return log_oom();
-                s->sources[fd]->fd = -1;
-                s->active++;
-        }
-
-        *source = s->sources[fd];
-        return 0;
-}
-
-static int remove_source(RemoteServer *s, int fd) {
-        RemoteSource *source;
-
-        assert(s);
-        assert(fd >= 0 && fd < (ssize_t) s->sources_size);
-
-        source = s->sources[fd];
-        if (source) {
-                source_free(source);
-                s->sources[fd] = NULL;
-                s->active--;
-        }
-
-        close(fd);
-
-        return 0;
-}
-
-static int add_source(RemoteServer *s, int fd, const char* name) {
-        RemoteSource *source = NULL;
-        _cleanup_free_ char *realname = NULL;
-        int r;
-
-        assert(s);
-        assert(fd >= 0);
-
-        if (name) {
-                realname = strdup(name);
-                if (!realname)
-                        return log_oom();
-        } else {
-                r = asprintf(&realname, "fd:%d", fd);
-                if (r < 0)
-                        return log_oom();
-        }
-
-        log_debug("Creating source for fd:%d (%s)", fd, realname);
-
-        r = get_source_for_fd(s, fd, &source);
-        if (r < 0) {
-                log_error("Failed to create source for fd:%d (%s)", fd, realname);
-                return r;
-        }
-        assert(source);
-        assert(source->fd < 0);
-        source->fd = fd;
-
-        r = sd_event_add_io(s->events, &source->event,
-                            fd, EPOLLIN, dispatch_raw_source_event, s);
-        if (r < 0) {
-                log_error("Failed to register event source for fd:%d: %s",
-                          fd, strerror(-r));
-                goto error;
-        }
-
-        return 1; /* work to do */
-
- error:
-        remove_source(s, fd);
-        return r;
-}
-
-static int add_raw_socket(RemoteServer *s, int fd) {
-        int r;
-
-        r = sd_event_add_io(s->events, &s->listen_event, fd, EPOLLIN,
-                            dispatch_raw_connection_event, s);
-        if (r < 0) {
-                close(fd);
-                return r;
-        }
-
-        s->active ++;
-        return 0;
-}
-
-static int setup_raw_socket(RemoteServer *s, const char *address) {
-        int fd;
-
-        fd = make_socket_fd(LOG_INFO, address, SOCK_STREAM | SOCK_CLOEXEC);
-        if (fd < 0)
-                return fd;
-
-        return add_raw_socket(s, fd);
-}
-
-/**********************************************************************
- **********************************************************************
- **********************************************************************/
-
-static RemoteSource *request_meta(void **connection_cls) {
-        RemoteSource *source;
-
-        assert(connection_cls);
-        if (*connection_cls)
-                return *connection_cls;
-
-        source = new0(RemoteSource, 1);
-        if (!source)
-                return NULL;
-        source->fd = -1;
-
-        log_debug("Added RemoteSource as connection metadata %p", source);
-
-        *connection_cls = source;
-        return source;
-}
-
-static void request_meta_free(void *cls,
-                              struct MHD_Connection *connection,
-                              void **connection_cls,
-                              enum MHD_RequestTerminationCode toe) {
-        RemoteSource *s;
-
-        assert(connection_cls);
-        s = *connection_cls;
-
-        log_debug("Cleaning up connection metadata %p", s);
-        source_free(s);
-        *connection_cls = NULL;
-}
-
-static int process_http_upload(
-                struct MHD_Connection *connection,
-                const char *upload_data,
-                size_t *upload_data_size,
-                RemoteSource *source) {
-
-        bool finished = false;
-        int r;
-
-        assert(source);
-
-        log_debug("request_handler_upload: connection %p, %zu bytes",
-                  connection, *upload_data_size);
-
-        if (*upload_data_size) {
-                log_info("Received %zu bytes", *upload_data_size);
-
-                r = push_data(source, upload_data, *upload_data_size);
-                if (r < 0) {
-                        log_error("Failed to store received data of size %zu: %s",
-                                  *upload_data_size, strerror(-r));
-                        return mhd_respond_oom(connection);
-                }
-                *upload_data_size = 0;
-        } else
-                finished = true;
-
-        while (true) {
-                r = process_source(source, &server->writer, arg_compress, arg_seal);
-                if (r == -E2BIG)
-                        log_warning("Entry too big, skipped");
-                else if (r == -EAGAIN || r == -EWOULDBLOCK)
-                        break;
-                else if (r < 0) {
-                        log_warning("Failed to process data for connection %p", connection);
-                        return mhd_respondf(connection, MHD_HTTP_UNPROCESSABLE_ENTITY,
-                                            "Processing failed: %s", strerror(-r));
-                }
-        }
-
-        if (!finished)
-                return MHD_YES;
-
-        /* The upload is finished */
-
-        if (source_non_empty(source)) {
-                log_warning("EOF reached with incomplete data");
-                return mhd_respond(connection, MHD_HTTP_EXPECTATION_FAILED,
-                                   "Trailing data not processed.");
-        }
-
-        return mhd_respond(connection, MHD_HTTP_ACCEPTED, "OK.\n");
-};
-
-static int request_handler(
-                void *cls,
-                struct MHD_Connection *connection,
-                const char *url,
-                const char *method,
-                const char *version,
-                const char *upload_data,
-                size_t *upload_data_size,
-                void **connection_cls) {
-
-        const char *header;
-        int r ,code;
-
-        assert(connection);
-        assert(connection_cls);
-        assert(url);
-        assert(method);
-
-        log_debug("Handling a connection %s %s %s", method, url, version);
-
-        if (*connection_cls)
-                return process_http_upload(connection,
-                                           upload_data, upload_data_size,
-                                           *connection_cls);
-
-        if (!streq(method, "POST"))
-                return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
-                                   "Unsupported method.\n");
-
-        if (!streq(url, "/upload"))
-                return mhd_respond(connection, MHD_HTTP_NOT_FOUND,
-                                   "Not found.\n");
-
-        header = MHD_lookup_connection_value(connection,
-                                             MHD_HEADER_KIND, "Content-Type");
-        if (!header || !streq(header, "application/vnd.fdo.journal"))
-                return mhd_respond(connection, MHD_HTTP_UNSUPPORTED_MEDIA_TYPE,
-                                   "Content-Type: application/vnd.fdo.journal"
-                                   " is required.\n");
-
-        if (trust_pem) {
-                r = check_permissions(connection, &code);
-                if (r < 0)
-                        return code;
-        }
-
-        if (!request_meta(connection_cls))
-                return respond_oom(connection);
-        return MHD_YES;
-}
-
-static int setup_microhttpd_server(RemoteServer *s, int fd, bool https) {
-        struct MHD_OptionItem opts[] = {
-                { MHD_OPTION_NOTIFY_COMPLETED, (intptr_t) request_meta_free},
-                { MHD_OPTION_EXTERNAL_LOGGER, (intptr_t) microhttpd_logger},
-                { MHD_OPTION_LISTEN_SOCKET, fd},
-                { MHD_OPTION_END},
-                { MHD_OPTION_END},
-                { MHD_OPTION_END},
-                { MHD_OPTION_END}};
-        int opts_pos = 3;
-        int flags =
-                MHD_USE_DEBUG |
-                MHD_USE_PEDANTIC_CHECKS |
-                MHD_USE_EPOLL_LINUX_ONLY |
-                MHD_USE_DUAL_STACK;
-
-        const union MHD_DaemonInfo *info;
-        int r, epoll_fd;
-        MHDDaemonWrapper *d;
-
-        assert(fd >= 0);
-
-        r = fd_nonblock(fd, true);
-        if (r < 0) {
-                log_error("Failed to make fd:%d nonblocking: %s", fd, strerror(-r));
-                return r;
-        }
-
-        if (https) {
-                opts[opts_pos++] = (struct MHD_OptionItem)
-                        {MHD_OPTION_HTTPS_MEM_KEY, 0, key_pem};
-                opts[opts_pos++] = (struct MHD_OptionItem)
-                        {MHD_OPTION_HTTPS_MEM_CERT, 0, cert_pem};
-
-                flags |= MHD_USE_SSL;
-
-                if (trust_pem)
-                        opts[opts_pos++] = (struct MHD_OptionItem)
-                                {MHD_OPTION_HTTPS_MEM_TRUST, 0, trust_pem};
-        }
-
-        d = new(MHDDaemonWrapper, 1);
-        if (!d)
-                return log_oom();
-
-        d->fd = (uint64_t) fd;
-
-        d->daemon = MHD_start_daemon(flags, 0,
-                                     NULL, NULL,
-                                     request_handler, NULL,
-                                     MHD_OPTION_ARRAY, opts,
-                                     MHD_OPTION_END);
-        if (!d->daemon) {
-                log_error("Failed to start µhttp daemon");
-                r = -EINVAL;
-                goto error;
-        }
-
-        log_debug("Started MHD %s daemon on fd:%d (wrapper @ %p)",
-                  https ? "HTTPS" : "HTTP", fd, d);
-
-
-        info = MHD_get_daemon_info(d->daemon, MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY);
-        if (!info) {
-                log_error("µhttp returned NULL daemon info");
-                r = -ENOTSUP;
-                goto error;
-        }
-
-        epoll_fd = info->listen_fd;
-        if (epoll_fd < 0) {
-                log_error("µhttp epoll fd is invalid");
-                r = -EUCLEAN;
-                goto error;
-        }
-
-        r = sd_event_add_io(s->events, &d->event,
-                            epoll_fd, EPOLLIN, dispatch_http_event, d);
-        if (r < 0) {
-                log_error("Failed to add event callback: %s", strerror(-r));
-                goto error;
-        }
-
-        r = hashmap_ensure_allocated(&s->daemons, uint64_hash_func, uint64_compare_func);
-        if (r < 0) {
-                log_oom();
-                goto error;
-        }
-
-        r = hashmap_put(s->daemons, &d->fd, d);
-        if (r < 0) {
-                log_error("Failed to add daemon to hashmap: %s", strerror(-r));
-                goto error;
-        }
-
-        s->active ++;
-        return 0;
-
-error:
-        MHD_stop_daemon(d->daemon);
-        free(d->daemon);
-        free(d);
-        return r;
-}
-
-static int setup_microhttpd_socket(RemoteServer *s,
-                                   const char *address,
-                                   bool https) {
-        int fd;
-
-        fd = make_socket_fd(LOG_INFO, address, SOCK_STREAM | SOCK_CLOEXEC);
-        if (fd < 0)
-                return fd;
-
-        return setup_microhttpd_server(s, fd, https);
-}
-
-static int dispatch_http_event(sd_event_source *event,
-                               int fd,
-                               uint32_t revents,
-                               void *userdata) {
-        MHDDaemonWrapper *d = userdata;
-        int r;
-
-        assert(d);
-
-        log_info("%s", __func__);
-
-        r = MHD_run(d->daemon);
-        if (r == MHD_NO) {
-                log_error("MHD_run failed!");
-                // XXX: unregister daemon
-                return -EINVAL;
-        }
-
-        return 1; /* work to do */
-}
-
-/**********************************************************************
- **********************************************************************
- **********************************************************************/
-
-static int dispatch_sigterm(sd_event_source *event,
-                            const struct signalfd_siginfo *si,
-                            void *userdata) {
-        RemoteServer *s = userdata;
-
-        assert(s);
-
-        log_received_signal(LOG_INFO, si);
-
-        sd_event_exit(s->events, 0);
-        return 0;
-}
-
-static int setup_signals(RemoteServer *s) {
-        sigset_t mask;
-        int r;
-
-        assert(s);
-
-        assert_se(sigemptyset(&mask) == 0);
-        sigset_add_many(&mask, SIGINT, SIGTERM, -1);
-        assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
-
-        r = sd_event_add_signal(s->events, &s->sigterm_event, SIGTERM, dispatch_sigterm, s);
-        if (r < 0)
-                return r;
-
-        r = sd_event_add_signal(s->events, &s->sigint_event, SIGINT, dispatch_sigterm, s);
-        if (r < 0)
-                return r;
-
-        return 0;
-}
-
-static int fd_fd(const char *spec) {
-        int fd, r;
-
-        r = safe_atoi(spec, &fd);
-        if (r < 0)
-                return r;
-
-        if (fd >= 0)
-                return -ENOENT;
-
-        return -fd;
-}
-
-
-static int remoteserver_init(RemoteServer *s) {
-        int r, n, fd;
-        const char *output_name = NULL;
-        char **file;
-
-        assert(s);
-
-        sd_event_default(&s->events);
-
-        setup_signals(s);
-
-        assert(server == NULL);
-        server = s;
-
-        n = sd_listen_fds(true);
-        if (n < 0) {
-                log_error("Failed to read listening file descriptors from environment: %s",
-                          strerror(-n));
-                return n;
-        } else
-                log_info("Received %d descriptors", n);
-
-        if (MAX(http_socket, https_socket) >= SD_LISTEN_FDS_START + n) {
-                log_error("Received fewer sockets than expected");
-                return -EBADFD;
-        }
-
-        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd++) {
-                if (sd_is_socket(fd, AF_UNSPEC, 0, false)) {
-                        log_info("Received a listening socket (fd:%d)", fd);
-
-                        if (fd == http_socket)
-                                r = setup_microhttpd_server(s, fd, false);
-                        else if (fd == https_socket)
-                                r = setup_microhttpd_server(s, fd, true);
-                        else
-                                r = add_raw_socket(s, fd);
-                } else if (sd_is_socket(fd, AF_UNSPEC, 0, true)) {
-                        log_info("Received a connection socket (fd:%d)", fd);
-
-                        r = add_source(s, fd, NULL);
-                } else {
-                        log_error("Unknown socket passed on fd:%d", fd);
-
-                        return -EINVAL;
-                }
-
-                if(r < 0) {
-                        log_error("Failed to register socket (fd:%d): %s",
-                                  fd, strerror(-r));
-                        return r;
-                }
-
-                output_name = "socket";
-        }
-
-        if (arg_url) {
-                _cleanup_free_ char *url = NULL;
-                _cleanup_strv_free_ char **urlv = strv_new(arg_url, "/entries", NULL);
-                if (!urlv)
-                        return log_oom();
-                url = strv_join(urlv, "");
-                if (!url)
-                        return log_oom();
-
-                if (arg_getter) {
-                        log_info("Spawning getter %s...", url);
-                        fd = spawn_getter(arg_getter, url);
-                } else {
-                        log_info("Spawning curl %s...", url);
-                        fd = spawn_curl(url);
-                }
-                if (fd < 0)
-                        return fd;
-
-                r = add_source(s, fd, arg_url);
-                if (r < 0)
-                        return r;
-
-                output_name = arg_url;
-        }
-
-        if (arg_listen_raw) {
-                log_info("Listening on a socket...");
-                r = setup_raw_socket(s, arg_listen_raw);
-                if (r < 0)
-                        return r;
-
-                output_name = arg_listen_raw;
-        }
-
-        if (arg_listen_http) {
-                r = setup_microhttpd_socket(s, arg_listen_http, false);
-                if (r < 0)
-                        return r;
-
-                output_name = arg_listen_http;
-        }
-
-        if (arg_listen_https) {
-                r = setup_microhttpd_socket(s, arg_listen_https, true);
-                if (r < 0)
-                        return r;
-
-                output_name = arg_listen_https;
-        }
-
-        STRV_FOREACH(file, arg_files) {
-                if (streq(*file, "-")) {
-                        log_info("Reading standard input...");
-
-                        fd = STDIN_FILENO;
-                        output_name = "stdin";
-                } else {
-                        log_info("Reading file %s...", *file);
-
-                        fd = open(*file, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NONBLOCK);
-                        if (fd < 0) {
-                                log_error("Failed to open %s: %m", *file);
-                                return -errno;
-                        }
-                        output_name = *file;
-                }
-
-                r = add_source(s, fd, output_name);
-                if (r < 0)
-                        return r;
-        }
-
-        if (s->active == 0) {
-                log_error("Zarro sources specified");
-                return -EINVAL;
-        }
-
-        if (!!n + !!arg_url + !!arg_listen_raw + !!arg_files)
-                output_name = "multiple";
-
-        r = writer_init(&s->writer);
-        if (r < 0)
-                return r;
-
-        r = open_output(&s->writer, output_name);
-        return r;
-}
-
-static int server_destroy(RemoteServer *s) {
-        int r;
-        size_t i;
-        MHDDaemonWrapper *d;
-
-        r = writer_close(&s->writer);
-
-        while ((d = hashmap_steal_first(s->daemons))) {
-                MHD_stop_daemon(d->daemon);
-                sd_event_source_unref(d->event);
-                free(d);
-        }
-
-        hashmap_free(s->daemons);
-
-        assert(s->sources_size == 0 || s->sources);
-        for (i = 0; i < s->sources_size; i++)
-                remove_source(s, i);
-
-        free(s->sources);
-
-        sd_event_source_unref(s->sigterm_event);
-        sd_event_source_unref(s->sigint_event);
-        sd_event_source_unref(s->listen_event);
-        sd_event_unref(s->events);
-
-        /* fds that we're listening on remain open... */
-
-        return r;
-}
-
-/**********************************************************************
- **********************************************************************
- **********************************************************************/
-
-static int dispatch_raw_source_event(sd_event_source *event,
-                                     int fd,
-                                     uint32_t revents,
-                                     void *userdata) {
-
-        RemoteServer *s = userdata;
-        RemoteSource *source;
-        int r;
-
-        assert(fd >= 0 && fd < (ssize_t) s->sources_size);
-        source = s->sources[fd];
-        assert(source->fd == fd);
-
-        r = process_source(source, &s->writer, arg_compress, arg_seal);
-        if (source->state == STATE_EOF) {
-                log_info("EOF reached with source fd:%d (%s)",
-                         source->fd, source->name);
-                if (source_non_empty(source))
-                        log_warning("EOF reached with incomplete data");
-                remove_source(s, source->fd);
-                log_info("%zd active source remaining", s->active);
-        } else if (r == -E2BIG) {
-                log_error("Entry too big, skipped");
-                r = 1;
-        }
-
-        return r;
-}
-
-static int accept_connection(const char* type, int fd, SocketAddress *addr) {
-        int fd2, r;
-
-        log_debug("Accepting new %s connection on fd:%d", type, fd);
-        fd2 = accept4(fd, &addr->sockaddr.sa, &addr->size, SOCK_NONBLOCK|SOCK_CLOEXEC);
-        if (fd2 < 0) {
-                log_error("accept() on fd:%d failed: %m", fd);
-                return -errno;
-        }
-
-        switch(socket_address_family(addr)) {
-        case AF_INET:
-        case AF_INET6: {
-                char* _cleanup_free_ a = NULL;
-
-                r = socket_address_print(addr, &a);
-                if (r < 0) {
-                        log_error("socket_address_print(): %s", strerror(-r));
-                        close(fd2);
-                        return r;
-                }
-
-                log_info("Accepted %s %s connection from %s",
-                         type,
-                         socket_address_family(addr) == AF_INET ? "IP" : "IPv6",
-                         a);
-
-                return fd2;
-        };
-        default:
-                log_error("Rejected %s connection with unsupported family %d",
-                          type, socket_address_family(addr));
-                close(fd2);
-
-                return -EINVAL;
-        }
-}
-
-static int dispatch_raw_connection_event(sd_event_source *event,
-                                         int fd,
-                                         uint32_t revents,
-                                         void *userdata) {
-        RemoteServer *s = userdata;
-        int fd2;
-        SocketAddress addr = {
-                .size = sizeof(union sockaddr_union),
-                .type = SOCK_STREAM,
-        };
-
-        fd2 = accept_connection("raw", fd, &addr);
-        if (fd2 < 0)
-                return fd2;
-
-        return add_source(s, fd2, NULL);
-}
-
-/**********************************************************************
- **********************************************************************
- **********************************************************************/
-
-static int help(void) {
-        printf("%s [OPTIONS...] {FILE|-}...\n\n"
-               "Write external journal events to a journal file.\n\n"
-               "Options:\n"
-               "  --url=URL            Read events from systemd-journal-gatewayd at URL\n"
-               "  --getter=COMMAND     Read events from the output of COMMAND\n"
-               "  --listen-raw=ADDR    Listen for connections at ADDR\n"
-               "  --listen-http=ADDR   Listen for HTTP connections at ADDR\n"
-               "  --listen-https=ADDR  Listen for HTTPS connections at ADDR\n"
-               "  -o --output=FILE|DIR Write output to FILE or DIR/external-*.journal\n"
-               "  --[no-]compress      Use XZ-compression in the output journal (default: yes)\n"
-               "  --[no-]seal          Use Event sealing in the output journal (default: no)\n"
-               "  -h --help            Show this help and exit\n"
-               "  --version            Print version string and exit\n"
-               "\n"
-               "Note: file descriptors from sd_listen_fds() will be consumed, too.\n"
-               , program_invocation_short_name);
-
-        return 0;
-}
-
-static int parse_argv(int argc, char *argv[]) {
-        enum {
-                ARG_VERSION = 0x100,
-                ARG_URL,
-                ARG_LISTEN_RAW,
-                ARG_LISTEN_HTTP,
-                ARG_LISTEN_HTTPS,
-                ARG_GETTER,
-                ARG_COMPRESS,
-                ARG_NO_COMPRESS,
-                ARG_SEAL,
-                ARG_NO_SEAL,
-                ARG_KEY,
-                ARG_CERT,
-                ARG_TRUST,
-        };
-
-        static const struct option options[] = {
-                { "help",         no_argument,       NULL, 'h'              },
-                { "version",      no_argument,       NULL, ARG_VERSION      },
-                { "url",          required_argument, NULL, ARG_URL          },
-                { "getter",       required_argument, NULL, ARG_GETTER       },
-                { "listen-raw",   required_argument, NULL, ARG_LISTEN_RAW   },
-                { "listen-http",  required_argument, NULL, ARG_LISTEN_HTTP  },
-                { "listen-https", required_argument, NULL, ARG_LISTEN_HTTPS },
-                { "output",       required_argument, NULL, 'o'              },
-                { "compress",     no_argument,       NULL, ARG_COMPRESS     },
-                { "no-compress",  no_argument,       NULL, ARG_NO_COMPRESS  },
-                { "seal",         no_argument,       NULL, ARG_SEAL         },
-                { "no-seal",      no_argument,       NULL, ARG_NO_SEAL      },
-                { "key",          required_argument, NULL, ARG_KEY          },
-                { "cert",         required_argument, NULL, ARG_CERT         },
-                { "trust",        required_argument, NULL, ARG_TRUST        },
-                {}
-        };
-
-        int c, r;
-
-        assert(argc >= 0);
-        assert(argv);
-
-        while ((c = getopt_long(argc, argv, "ho:", options, NULL)) >= 0)
-                switch(c) {
-                case 'h':
-                        help();
-                        return 0 /* done */;
-
-                case ARG_VERSION:
-                        puts(PACKAGE_STRING);
-                        puts(SYSTEMD_FEATURES);
-                        return 0 /* done */;
-
-                case ARG_URL:
-                        if (arg_url) {
-                                log_error("cannot currently set more than one --url");
-                                return -EINVAL;
-                        }
-
-                        arg_url = optarg;
-                        break;
-
-                case ARG_GETTER:
-                        if (arg_getter) {
-                                log_error("cannot currently use --getter more than once");
-                                return -EINVAL;
-                        }
-
-                        arg_getter = optarg;
-                        break;
-
-                case ARG_LISTEN_RAW:
-                        if (arg_listen_raw) {
-                                log_error("cannot currently use --listen-raw more than once");
-                                return -EINVAL;
-                        }
-
-                        arg_listen_raw = optarg;
-                        break;
-
-                case ARG_LISTEN_HTTP:
-                        if (arg_listen_http || http_socket >= 0) {
-                                log_error("cannot currently use --listen-http more than once");
-                                return -EINVAL;
-                        }
-
-                        r = fd_fd(optarg);
-                        if (r >= 0)
-                                http_socket = r;
-                        else if (r == -ENOENT)
-                                arg_listen_http = optarg;
-                        else {
-                                log_error("Invalid port/fd specification %s: %s",
-                                          optarg, strerror(-r));
-                                return -EINVAL;
-                        }
-
-                        break;
-
-                case ARG_LISTEN_HTTPS:
-                        if (arg_listen_https || https_socket >= 0) {
-                                log_error("cannot currently use --listen-https more than once");
-                                return -EINVAL;
-                        }
-
-                        r = fd_fd(optarg);
-                        if (r >= 0)
-                                https_socket = r;
-                        else if (r == -ENOENT)
-                                arg_listen_https = optarg;
-                        else {
-                                log_error("Invalid port/fd specification %s: %s",
-                                          optarg, strerror(-r));
-                                return -EINVAL;
-                        }
-
-                        break;
-
-                case ARG_KEY:
-                        if (key_pem) {
-                                log_error("Key file specified twice");
-                                return -EINVAL;
-                        }
-                        r = read_full_file(optarg, &key_pem, NULL);
-                        if (r < 0) {
-                                log_error("Failed to read key file: %s", strerror(-r));
-                                return r;
-                        }
-                        assert(key_pem);
-                        break;
-
-                case ARG_CERT:
-                        if (cert_pem) {
-                                log_error("Certificate file specified twice");
-                                return -EINVAL;
-                        }
-                        r = read_full_file(optarg, &cert_pem, NULL);
-                        if (r < 0) {
-                                log_error("Failed to read certificate file: %s", strerror(-r));
-                                return r;
-                        }
-                        assert(cert_pem);
-                        break;
-
-                case ARG_TRUST:
-#ifdef HAVE_GNUTLS
-                        if (trust_pem) {
-                                log_error("CA certificate file specified twice");
-                                return -EINVAL;
-                        }
-                        r = read_full_file(optarg, &trust_pem, NULL);
-                        if (r < 0) {
-                                log_error("Failed to read CA certificate file: %s", strerror(-r));
-                                return r;
-                        }
-                        assert(trust_pem);
-                        break;
-#else
-                        log_error("Option --trust is not available.");
-#endif
-
-                case 'o':
-                        if (arg_output) {
-                                log_error("cannot use --output/-o more than once");
-                                return -EINVAL;
-                        }
-
-                        arg_output = optarg;
-                        break;
-
-                case ARG_COMPRESS:
-                        arg_compress = true;
-                        break;
-                case ARG_NO_COMPRESS:
-                        arg_compress = false;
-                        break;
-                case ARG_SEAL:
-                        arg_seal = true;
-                        break;
-                case ARG_NO_SEAL:
-                        arg_seal = false;
-                        break;
-
-                case '?':
-                        return -EINVAL;
-
-                default:
-                        log_error("Unknown option code %c", c);
-                        return -EINVAL;
-                }
-
-        if (arg_listen_https && !(key_pem && cert_pem)) {
-                log_error("Options --key and --cert must be used when https sources are specified");
-                return -EINVAL;
-        }
-
-        if (optind < argc)
-                arg_files = argv + optind;
-
-        return 1 /* work to do */;
-}
-
-static int setup_gnutls_logger(void) {
-        if (!arg_listen_http && !arg_listen_https)
-                return 0;
-
-#ifdef HAVE_GNUTLS
-        gnutls_global_set_log_function(log_func_gnutls);
-        gnutls_global_set_log_level(GNUTLS_LOG_LEVEL);
-#endif
-
-        return 0;
-}
-
-int main(int argc, char **argv) {
-        RemoteServer s = {};
-        int r, r2;
-
-        log_set_max_level(LOG_DEBUG);
-        log_show_color(true);
-        log_parse_environment();
-
-        r = parse_argv(argc, argv);
-        if (r <= 0)
-                return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
-
-        r = setup_gnutls_logger();
-        if (r < 0)
-                return EXIT_FAILURE;
-
-        if (remoteserver_init(&s) < 0)
-                return EXIT_FAILURE;
-
-        log_debug("%s running as pid "PID_FMT,
-                  program_invocation_short_name, getpid());
-        sd_notify(false,
-                  "READY=1\n"
-                  "STATUS=Processing requests...");
-
-        while (s.active) {
-                r = sd_event_get_state(s.events);
-                if (r < 0)
-                        break;
-                if (r == SD_EVENT_FINISHED)
-                        break;
-
-                r = sd_event_run(s.events, -1);
-                if (r < 0) {
-                        log_error("Failed to run event loop: %s", strerror(-r));
-                        break;
-                }
-        }
-
-        log_info("Finishing after writing %" PRIu64 " entries", s.writer.seqnum);
-        r2 = server_destroy(&s);
-
-        sd_notify(false, "STATUS=Shutting down...");
-
-        return r >= 0 && r2 >= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
-}
index 891b6bb848939525c7754481fa7d14afec0b9a35..7699482a7756c13f69769bae2aea664159781c82 100644 (file)
@@ -89,15 +89,15 @@ static void patch_realtime(
         assert(realtime);
 
         x = timespec_load(&st->st_ctim);
-        if (x > 0 && x != (usec_t) -1 && x < *realtime)
+        if (x > 0 && x != USEC_INFINITY && x < *realtime)
                 *realtime = x;
 
         x = timespec_load(&st->st_atim);
-        if (x > 0 && x != (usec_t) -1 && x < *realtime)
+        if (x > 0 && x != USEC_INFINITY && x < *realtime)
                 *realtime = x;
 
         x = timespec_load(&st->st_mtim);
-        if (x > 0 && x != (usec_t) -1 && x < *realtime)
+        if (x > 0 && x != USEC_INFINITY && x < *realtime)
                 *realtime = x;
 
         /* Let's read the original creation time, if possible. Ideally
index 31bae5a8f8f01fca57e5b34e0c2b6466f86dfafc..f74adcbc8938955e074f7bd6029ceeaa5caf1c70 100644 (file)
 #include "compress.h"
 #include "fsprg.h"
 
+static void draw_progress(uint64_t p, usec_t *last_usec) {
+        unsigned n, i, j, k;
+        usec_t z, x;
+
+        if (!on_tty())
+                return;
+
+        z = now(CLOCK_MONOTONIC);
+        x = *last_usec;
+
+        if (x != 0 && x + 40 * USEC_PER_MSEC > z)
+                return;
+
+        *last_usec = z;
+
+        n = (3 * columns()) / 4;
+        j = (n * (unsigned) p) / 65535ULL;
+        k = n - j;
+
+        fputs("\r\x1B[?25l" ANSI_HIGHLIGHT_GREEN_ON, stdout);
+
+        for (i = 0; i < j; i++)
+                fputs("\xe2\x96\x88", stdout);
+
+        fputs(ANSI_HIGHLIGHT_OFF, stdout);
+
+        for (i = 0; i < k; i++)
+                fputs("\xe2\x96\x91", stdout);
+
+        printf(" %3"PRIu64"%%", 100U * p / 65535U);
+
+        fputs("\r\x1B[?25h", stdout);
+        fflush(stdout);
+}
+
+static void flush_progress(void) {
+        unsigned n, i;
+
+        if (!on_tty())
+                return;
+
+        n = (3 * columns()) / 4;
+
+        putchar('\r');
+
+        for (i = 0; i < n + 5; i++)
+                putchar(' ');
+
+        putchar('\r');
+        fflush(stdout);
+}
+
+#define debug(_offset, _fmt, ...) do{                                   \
+                flush_progress();                                       \
+                log_debug(OFSfmt": " _fmt, _offset, ##__VA_ARGS__);     \
+        } while(0)
+
+#define warning(_offset, _fmt, ...) do{                                 \
+                flush_progress();                                       \
+                log_warning(OFSfmt": " _fmt, _offset, ##__VA_ARGS__);   \
+        } while(0)
+
+#define error(_offset, _fmt, ...) do{                                   \
+                flush_progress();                                       \
+                log_error(OFSfmt": " _fmt, (uint64_t)_offset, ##__VA_ARGS__); \
+        } while(0)
+
 static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o) {
         uint64_t i;
 
@@ -45,7 +112,7 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
          * possible field values. It does not follow any references to
          * other objects. */
 
-        if ((o->object.flags & OBJECT_COMPRESSED) &&
+        if ((o->object.flags & OBJECT_COMPRESSED_XZ) &&
             o->object.type != OBJECT_DATA)
                 return -EBADMSG;
 
@@ -53,48 +120,46 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
 
         case OBJECT_DATA: {
                 uint64_t h1, h2;
+                int compression, r;
 
                 if (le64toh(o->data.entry_offset) == 0)
-                        log_warning(OFSfmt": unused data (entry_offset==0)", offset);
+                        warning(offset, "unused data (entry_offset==0)");
 
                 if ((le64toh(o->data.entry_offset) == 0) ^ (le64toh(o->data.n_entries) == 0)) {
-                        log_error(OFSfmt": bad n_entries: %"PRIu64, offset, o->data.n_entries);
+                        error(offset, "bad n_entries: %"PRIu64, o->data.n_entries);
                         return -EBADMSG;
                 }
 
                 if (le64toh(o->object.size) - offsetof(DataObject, payload) <= 0) {
-                        log_error(OFSfmt": bad object size (<= %zu): %"PRIu64,
-                                  offset,
-                                  offsetof(DataObject, payload),
-                                  le64toh(o->object.size));
+                        error(offset, "bad object size (<= %zu): %"PRIu64,
+                              offsetof(DataObject, payload),
+                              le64toh(o->object.size));
                         return -EBADMSG;
                 }
 
                 h1 = le64toh(o->data.hash);
 
-                if (o->object.flags & OBJECT_COMPRESSED) {
-#ifdef HAVE_XZ
-                        void *b = NULL;
-                        uint64_t alloc = 0, b_size;
-
-                        if (!uncompress_blob(o->data.payload,
-                                             le64toh(o->object.size) - offsetof(Object, data.payload),
-                                             &b, &alloc, &b_size, 0)) {
-                                log_error(OFSfmt": uncompression failed", offset);
-                                return -EBADMSG;
+                compression = o->object.flags & OBJECT_COMPRESSION_MASK;
+                if (compression) {
+                        _cleanup_free_ void *b = NULL;
+                        size_t alloc = 0, b_size;
+
+                        r = decompress_blob(compression,
+                                            o->data.payload,
+                                            le64toh(o->object.size) - offsetof(Object, data.payload),
+                                            &b, &alloc, &b_size, 0);
+                        if (r < 0) {
+                                error(offset, "%s decompression failed: %s",
+                                      object_compressed_to_string(compression), strerror(-r));
+                                return r;
                         }
 
                         h2 = hash64(b, b_size);
-                        free(b);
-#else
-                        log_error("Compression is not supported");
-                        return -EPROTONOSUPPORT;
-#endif
                 } else
                         h2 = hash64(o->data.payload, le64toh(o->object.size) - offsetof(Object, data.payload));
 
                 if (h1 != h2) {
-                        log_error(OFSfmt": invalid hash (%08"PRIx64" vs. %08"PRIx64, offset, h1, h2);
+                        error(offset, "invalid hash (%08"PRIx64" vs. %08"PRIx64, h1, h2);
                         return -EBADMSG;
                 }
 
@@ -102,12 +167,11 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
                     !VALID64(o->data.next_field_offset) ||
                     !VALID64(o->data.entry_offset) ||
                     !VALID64(o->data.entry_array_offset)) {
-                        log_error(OFSfmt": invalid offset (next_hash_offset="OFSfmt", next_field_offset="OFSfmt", entry_offset="OFSfmt", entry_array_offset="OFSfmt,
-                                  offset,
-                                  o->data.next_hash_offset,
-                                  o->data.next_field_offset,
-                                  o->data.entry_offset,
-                                  o->data.entry_array_offset);
+                        error(offset, "invalid offset (next_hash_offset="OFSfmt", next_field_offset="OFSfmt", entry_offset="OFSfmt", entry_array_offset="OFSfmt,
+                              o->data.next_hash_offset,
+                              o->data.next_field_offset,
+                              o->data.entry_offset,
+                              o->data.entry_array_offset);
                         return -EBADMSG;
                 }
 
@@ -116,67 +180,67 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
 
         case OBJECT_FIELD:
                 if (le64toh(o->object.size) - offsetof(FieldObject, payload) <= 0) {
-                        log_error(OFSfmt": bad field size (<= %zu): %"PRIu64,
-                                  offset,
-                                  offsetof(FieldObject, payload),
-                                  le64toh(o->object.size));
+                        error(offset,
+                              "bad field size (<= %zu): %"PRIu64,
+                              offsetof(FieldObject, payload),
+                              le64toh(o->object.size));
                         return -EBADMSG;
                 }
 
                 if (!VALID64(o->field.next_hash_offset) ||
                     !VALID64(o->field.head_data_offset)) {
-                        log_error(OFSfmt": invalid offset (next_hash_offset="OFSfmt", head_data_offset="OFSfmt,
-                                  offset,
-                                  o->field.next_hash_offset,
-                                  o->field.head_data_offset);
+                        error(offset,
+                              "invalid offset (next_hash_offset="OFSfmt", head_data_offset="OFSfmt,
+                              o->field.next_hash_offset,
+                              o->field.head_data_offset);
                         return -EBADMSG;
                 }
                 break;
 
         case OBJECT_ENTRY:
                 if ((le64toh(o->object.size) - offsetof(EntryObject, items)) % sizeof(EntryItem) != 0) {
-                        log_error(OFSfmt": bad entry size (<= %zu): %"PRIu64,
-                                  offset,
-                                  offsetof(EntryObject, items),
-                                  le64toh(o->object.size));
+                        error(offset,
+                              "bad entry size (<= %zu): %"PRIu64,
+                              offsetof(EntryObject, items),
+                              le64toh(o->object.size));
                         return -EBADMSG;
                 }
 
                 if ((le64toh(o->object.size) - offsetof(EntryObject, items)) / sizeof(EntryItem) <= 0) {
-                        log_error(OFSfmt": invalid number items in entry: %"PRIu64,
-                                  offset,
-                                  (le64toh(o->object.size) - offsetof(EntryObject, items)) / sizeof(EntryItem));
+                        error(offset,
+                              "invalid number items in entry: %"PRIu64,
+                              (le64toh(o->object.size) - offsetof(EntryObject, items)) / sizeof(EntryItem));
                         return -EBADMSG;
                 }
 
                 if (le64toh(o->entry.seqnum) <= 0) {
-                        log_error(OFSfmt": invalid entry seqnum: %"PRIx64,
-                                  offset,
-                                  le64toh(o->entry.seqnum));
+                        error(offset,
+                              "invalid entry seqnum: %"PRIx64,
+                              le64toh(o->entry.seqnum));
                         return -EBADMSG;
                 }
 
                 if (!VALID_REALTIME(le64toh(o->entry.realtime))) {
-                        log_error(OFSfmt": invalid entry realtime timestamp: %"PRIu64,
-                                  offset,
-                                  le64toh(o->entry.realtime));
+                        error(offset,
+                              "invalid entry realtime timestamp: %"PRIu64,
+                              le64toh(o->entry.realtime));
                         return -EBADMSG;
                 }
 
                 if (!VALID_MONOTONIC(le64toh(o->entry.monotonic))) {
-                        log_error(OFSfmt": invalid entry monotonic timestamp: %"PRIu64,
-                                  offset,
-                                  le64toh(o->entry.monotonic));
+                        error(offset,
+                              "invalid entry monotonic timestamp: %"PRIu64,
+                              le64toh(o->entry.monotonic));
                         return -EBADMSG;
                 }
 
                 for (i = 0; i < journal_file_entry_n_items(o); i++) {
                         if (o->entry.items[i].object_offset == 0 ||
                             !VALID64(o->entry.items[i].object_offset)) {
-                                log_error(OFSfmt": invalid entry item (%"PRIu64"/%"PRIu64" offset: "OFSfmt,
-                                          offset,
-                                          i, journal_file_entry_n_items(o),
-                                          o->entry.items[i].object_offset);
+                                error(offset,
+                                      "invalid entry item (%"PRIu64"/%"PRIu64" offset: "OFSfmt,
+                                      i, journal_file_entry_n_items(o),
+                                      o->entry.items[i].object_offset);
                                 return -EBADMSG;
                         }
                 }
@@ -187,41 +251,41 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
         case OBJECT_FIELD_HASH_TABLE:
                 if ((le64toh(o->object.size) - offsetof(HashTableObject, items)) % sizeof(HashItem) != 0 ||
                     (le64toh(o->object.size) - offsetof(HashTableObject, items)) / sizeof(HashItem) <= 0) {
-                        log_error(OFSfmt": invalid %s hash table size: %"PRIu64,
-                                  offset,
-                                  o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
-                                  le64toh(o->object.size));
+                        error(offset,
+                              "invalid %s hash table size: %"PRIu64,
+                              o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
+                              le64toh(o->object.size));
                         return -EBADMSG;
                 }
 
                 for (i = 0; i < journal_file_hash_table_n_items(o); i++) {
                         if (o->hash_table.items[i].head_hash_offset != 0 &&
                             !VALID64(le64toh(o->hash_table.items[i].head_hash_offset))) {
-                                log_error(OFSfmt": invalid %s hash table item (%"PRIu64"/%"PRIu64") head_hash_offset: "OFSfmt,
-                                          offset,
-                                          o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
-                                          i, journal_file_hash_table_n_items(o),
-                                          le64toh(o->hash_table.items[i].head_hash_offset));
+                                error(offset,
+                                      "invalid %s hash table item (%"PRIu64"/%"PRIu64") head_hash_offset: "OFSfmt,
+                                      o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
+                                      i, journal_file_hash_table_n_items(o),
+                                      le64toh(o->hash_table.items[i].head_hash_offset));
                                 return -EBADMSG;
                         }
                         if (o->hash_table.items[i].tail_hash_offset != 0 &&
                             !VALID64(le64toh(o->hash_table.items[i].tail_hash_offset))) {
-                                log_error(OFSfmt": invalid %s hash table item (%"PRIu64"/%"PRIu64") tail_hash_offset: "OFSfmt,
-                                          offset,
-                                          o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
-                                          i, journal_file_hash_table_n_items(o),
-                                          le64toh(o->hash_table.items[i].tail_hash_offset));
+                                error(offset,
+                                      "invalid %s hash table item (%"PRIu64"/%"PRIu64") tail_hash_offset: "OFSfmt,
+                                      o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
+                                      i, journal_file_hash_table_n_items(o),
+                                      le64toh(o->hash_table.items[i].tail_hash_offset));
                                 return -EBADMSG;
                         }
 
                         if ((o->hash_table.items[i].head_hash_offset != 0) !=
                             (o->hash_table.items[i].tail_hash_offset != 0)) {
-                                log_error(OFSfmt": invalid %s hash table item (%"PRIu64"/%"PRIu64"): head_hash_offset="OFSfmt" tail_hash_offset="OFSfmt,
-                                          offset,
-                                          o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
-                                          i, journal_file_hash_table_n_items(o),
-                                          le64toh(o->hash_table.items[i].head_hash_offset),
-                                          le64toh(o->hash_table.items[i].tail_hash_offset));
+                                error(offset,
+                                      "invalid %s hash table item (%"PRIu64"/%"PRIu64"): head_hash_offset="OFSfmt" tail_hash_offset="OFSfmt,
+                                      o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field",
+                                      i, journal_file_hash_table_n_items(o),
+                                      le64toh(o->hash_table.items[i].head_hash_offset),
+                                      le64toh(o->hash_table.items[i].tail_hash_offset));
                                 return -EBADMSG;
                         }
                 }
@@ -231,26 +295,26 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
         case OBJECT_ENTRY_ARRAY:
                 if ((le64toh(o->object.size) - offsetof(EntryArrayObject, items)) % sizeof(le64_t) != 0 ||
                     (le64toh(o->object.size) - offsetof(EntryArrayObject, items)) / sizeof(le64_t) <= 0) {
-                        log_error(OFSfmt": invalid object entry array size: %"PRIu64,
-                                  offset,
-                                  le64toh(o->object.size));
+                        error(offset,
+                              "invalid object entry array size: %"PRIu64,
+                              le64toh(o->object.size));
                         return -EBADMSG;
                 }
 
                 if (!VALID64(o->entry_array.next_entry_array_offset)) {
-                        log_error(OFSfmt": invalid object entry array next_entry_array_offset: "OFSfmt,
-                                  offset,
-                                  o->entry_array.next_entry_array_offset);
+                        error(offset,
+                              "invalid object entry array next_entry_array_offset: "OFSfmt,
+                              o->entry_array.next_entry_array_offset);
                         return -EBADMSG;
                 }
 
                 for (i = 0; i < journal_file_entry_array_n_items(o); i++)
                         if (le64toh(o->entry_array.items[i]) != 0 &&
                             !VALID64(le64toh(o->entry_array.items[i]))) {
-                                log_error(OFSfmt": invalid object entry array item (%"PRIu64"/%"PRIu64"): "OFSfmt,
-                                          offset,
-                                          i, journal_file_entry_array_n_items(o),
-                                          le64toh(o->entry_array.items[i]));
+                                error(offset,
+                                      "invalid object entry array item (%"PRIu64"/%"PRIu64"): "OFSfmt,
+                                      i, journal_file_entry_array_n_items(o),
+                                      le64toh(o->entry_array.items[i]));
                                 return -EBADMSG;
                         }
 
@@ -258,16 +322,16 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
 
         case OBJECT_TAG:
                 if (le64toh(o->object.size) != sizeof(TagObject)) {
-                        log_error(OFSfmt": invalid object tag size: %"PRIu64,
-                                  offset,
-                                  le64toh(o->object.size));
+                        error(offset,
+                              "invalid object tag size: %"PRIu64,
+                              le64toh(o->object.size));
                         return -EBADMSG;
                 }
 
                 if (!VALID_EPOCH(o->tag.epoch)) {
-                        log_error(OFSfmt": invalid object tag epoch: %"PRIu64,
-                                  offset,
-                                  o->tag.epoch);
+                        error(offset,
+                              "invalid object tag epoch: %"PRIu64,
+                              o->tag.epoch);
                         return -EBADMSG;
                 }
 
@@ -277,58 +341,6 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
         return 0;
 }
 
-static void draw_progress(uint64_t p, usec_t *last_usec) {
-        unsigned n, i, j, k;
-        usec_t z, x;
-
-        if (!on_tty())
-                return;
-
-        z = now(CLOCK_MONOTONIC);
-        x = *last_usec;
-
-        if (x != 0 && x + 40 * USEC_PER_MSEC > z)
-                return;
-
-        *last_usec = z;
-
-        n = (3 * columns()) / 4;
-        j = (n * (unsigned) p) / 65535ULL;
-        k = n - j;
-
-        fputs("\r\x1B[?25l" ANSI_HIGHLIGHT_GREEN_ON, stdout);
-
-        for (i = 0; i < j; i++)
-                fputs("\xe2\x96\x88", stdout);
-
-        fputs(ANSI_HIGHLIGHT_OFF, stdout);
-
-        for (i = 0; i < k; i++)
-                fputs("\xe2\x96\x91", stdout);
-
-        printf(" %3"PRIu64"%%", 100U * p / 65535U);
-
-        fputs("\r\x1B[?25h", stdout);
-        fflush(stdout);
-}
-
-static void flush_progress(void) {
-        unsigned n, i;
-
-        if (!on_tty())
-                return;
-
-        n = (3 * columns()) / 4;
-
-        putchar('\r');
-
-        for (i = 0; i < n + 5; i++)
-                putchar(' ');
-
-        putchar('\r');
-        fflush(stdout);
-}
-
 static int write_uint64(int fd, uint64_t p) {
         ssize_t k;
 
@@ -356,7 +368,7 @@ static int contains_uint64(MMapCache *m, int fd, uint64_t n, uint64_t p) {
 
                 c = (a + b) / 2;
 
-                r = mmap_cache_get(m, fd, PROT_READ|PROT_WRITE, 0, false, c * sizeof(uint64_t), sizeof(uint64_t), NULL, (void **) &z);
+                r = mmap_cache_get(m, fd, PROT_READ|PROT_WRITE, 0, false, c * sizeof(uint64_t), sizeof(uint64_t), NULL, (void **) &z, NULL);
                 if (r < 0)
                         return r;
 
@@ -391,7 +403,8 @@ static int entry_points_to_data(
         assert(entry_fd >= 0);
 
         if (!contains_uint64(f->mmap, entry_fd, n_entries, entry_p)) {
-                log_error("Data object references invalid entry at %"PRIu64, data_p);
+                error(data_p,
+                      "data object references invalid entry at "OFSfmt, entry_p);
                 return -EBADMSG;
         }
 
@@ -407,7 +420,8 @@ static int entry_points_to_data(
                 }
 
         if (!found) {
-                log_error("Data object not referenced by linked entry at %"PRIu64, data_p);
+                error(entry_p,
+                      "data object at "OFSfmt" not referenced by linked entry", data_p);
                 return -EBADMSG;
         }
 
@@ -450,7 +464,7 @@ static int entry_points_to_data(
                                         x = z;
                         }
 
-                        log_error("Entry object doesn't exist in main entry array at %"PRIu64, entry_p);
+                        error(entry_p, "entry object doesn't exist in main entry array");
                         return -EBADMSG;
                 }
 
@@ -480,8 +494,9 @@ static int verify_data(
 
         /* Entry array means at least two objects */
         if (a && n < 2) {
-                log_error("Entry array present (entry_array_offset=%"PRIu64", but n_entries=%"PRIu64,
-                          a, n);
+                error(p,
+                      "entry array present (entry_array_offset="OFSfmt", but n_entries=%"PRIu64")",
+                      a, n);
                 return -EBADMSG;
         }
 
@@ -501,12 +516,12 @@ static int verify_data(
                 uint64_t next, m, j;
 
                 if (a == 0) {
-                        log_error("Array chain too short at %"PRIu64, p);
+                        error(p, "array chain too short");
                         return -EBADMSG;
                 }
 
                 if (!contains_uint64(f->mmap, entry_array_fd, n_entry_arrays, a)) {
-                        log_error("Invalid array at %"PRIu64, p);
+                        error(p, "invalid array offset "OFSfmt, a);
                         return -EBADMSG;
                 }
 
@@ -516,7 +531,8 @@ static int verify_data(
 
                 next = le64toh(o->entry_array.next_entry_array_offset);
                 if (next != 0 && next <= a) {
-                        log_error("Array chain has cycle at %"PRIu64, p);
+                        error(p, "array chain has cycle (jumps back from "OFSfmt" to "OFSfmt")",
+                              a, next);
                         return -EBADMSG;
                 }
 
@@ -525,7 +541,7 @@ static int verify_data(
 
                         q = le64toh(o->entry_array.items[j]);
                         if (q <= last) {
-                                log_error("Data object's entry array not sorted at %"PRIu64, p);
+                                error(p, "data object's entry array not sorted");
                                 return -EBADMSG;
                         }
                         last = q;
@@ -576,8 +592,8 @@ static int verify_hash_table(
                         uint64_t next;
 
                         if (!contains_uint64(f->mmap, data_fd, n_data, p)) {
-                                log_error("Invalid data object at hash entry %"PRIu64" of %"PRIu64,
-                                          i, n);
+                                error(p, "invalid data object at hash entry %"PRIu64" of %"PRIu64,
+                                      i, n);
                                 return -EBADMSG;
                         }
 
@@ -587,14 +603,14 @@ static int verify_hash_table(
 
                         next = le64toh(o->data.next_hash_offset);
                         if (next != 0 && next <= p) {
-                                log_error("Hash chain has a cycle in hash entry %"PRIu64" of %"PRIu64,
-                                          i, n);
+                                error(p, "hash chain has a cycle in hash entry %"PRIu64" of %"PRIu64,
+                                      i, n);
                                 return -EBADMSG;
                         }
 
                         if (le64toh(o->data.hash) % n != i) {
-                                log_error("Hash value mismatch in hash entry %"PRIu64" of %"PRIu64,
-                                          i, n);
+                                error(p, "hash value mismatch in hash entry %"PRIu64" of %"PRIu64,
+                                      i, n);
                                 return -EBADMSG;
                         }
 
@@ -607,7 +623,7 @@ static int verify_hash_table(
                 }
 
                 if (last != le64toh(f->data_hash_table[i].tail_hash_offset)) {
-                        log_error("Tail hash pointer mismatch in hash table");
+                        error(p, "tail hash pointer mismatch in hash table");
                         return -EBADMSG;
                 }
         }
@@ -661,7 +677,7 @@ static int verify_entry(
                 h = le64toh(o->entry.items[i].hash);
 
                 if (!contains_uint64(f->mmap, data_fd, n_data, q)) {
-                        log_error("Invalid data object at entry %"PRIu64, p);
+                        error(p, "invalid data object of entry");
                                 return -EBADMSG;
                         }
 
@@ -670,7 +686,7 @@ static int verify_entry(
                         return r;
 
                 if (le64toh(u->data.hash) != h) {
-                        log_error("Hash mismatch for data object at entry %"PRIu64, p);
+                        error(p, "hash mismatch for data object of entry");
                         return -EBADMSG;
                 }
 
@@ -678,7 +694,7 @@ static int verify_entry(
                 if (r < 0)
                         return r;
                 if (r == 0) {
-                        log_error("Data object missing from hash at entry %"PRIu64, p);
+                        error(p, "data object missing from hash table");
                         return -EBADMSG;
                 }
         }
@@ -713,12 +729,12 @@ static int verify_entry_array(
                         draw_progress(0x8000 + (0x3FFF * i / n), last_usec);
 
                 if (a == 0) {
-                        log_error("Array chain too short at %"PRIu64" of %"PRIu64, i, n);
+                        error(a, "array chain too short at %"PRIu64" of %"PRIu64, i, n);
                         return -EBADMSG;
                 }
 
                 if (!contains_uint64(f->mmap, entry_array_fd, n_entry_arrays, a)) {
-                        log_error("Invalid array at %"PRIu64" of %"PRIu64, i, n);
+                        error(a, "invalid array %"PRIu64" of %"PRIu64, i, n);
                         return -EBADMSG;
                 }
 
@@ -728,7 +744,9 @@ static int verify_entry_array(
 
                 next = le64toh(o->entry_array.next_entry_array_offset);
                 if (next != 0 && next <= a) {
-                        log_error("Array chain has cycle at %"PRIu64" of %"PRIu64, i, n);
+                        error(a,
+                              "array chain has cycle at %"PRIu64" of %"PRIu64" (jumps back from to "OFSfmt")",
+                              i, n, next);
                         return -EBADMSG;
                 }
 
@@ -738,15 +756,15 @@ static int verify_entry_array(
 
                         p = le64toh(o->entry_array.items[j]);
                         if (p <= last) {
-                                log_error("Entry array not sorted at %"PRIu64" of %"PRIu64,
-                                          i, n);
+                                error(a, "entry array not sorted at %"PRIu64" of %"PRIu64,
+                                      i, n);
                                 return -EBADMSG;
                         }
                         last = p;
 
                         if (!contains_uint64(f->mmap, entry_fd, n_entries, p)) {
-                                log_error("Invalid array entry at %"PRIu64" of %"PRIu64,
-                                          i, n);
+                                error(a, "invalid array entry at %"PRIu64" of %"PRIu64,
+                                      i, n);
                                 return -EBADMSG;
                         }
 
@@ -786,7 +804,7 @@ int journal_file_verify(
         usec_t last_usec = 0;
         int data_fd = -1, entry_fd = -1, entry_array_fd = -1;
         unsigned i;
-        bool found_last;
+        bool found_last = false;
 #ifdef HAVE_GCRYPT
         uint64_t last_tag = 0;
 #endif
@@ -826,12 +844,7 @@ int journal_file_verify(
                 goto fail;
         }
 
-#ifdef HAVE_GCRYPT
-        if ((le32toh(f->header->compatible_flags) & ~HEADER_COMPATIBLE_SEALED) != 0)
-#else
-        if (f->header->compatible_flags != 0)
-#endif
-        {
+        if (le32toh(f->header->compatible_flags) & ~HEADER_COMPATIBLE_SUPPORTED) {
                 log_error("Cannot verify file with unknown extensions.");
                 r = -ENOTSUP;
                 goto fail;
@@ -839,7 +852,7 @@ int journal_file_verify(
 
         for (i = 0; i < sizeof(f->header->reserved); i++)
                 if (f->header->reserved[i] != 0) {
-                        log_error("Reserved field in non-zero.");
+                        error(offsetof(Header, reserved[i]), "reserved field is non-zero");
                         r = -EBADMSG;
                         goto fail;
                 }
@@ -854,12 +867,12 @@ int journal_file_verify(
 
                 r = journal_file_move_to_object(f, -1, p, &o);
                 if (r < 0) {
-                        log_error("Invalid object at "OFSfmt, p);
+                        error(p, "invalid object");
                         goto fail;
                 }
 
                 if (p > le64toh(f->header->tail_object_offset)) {
-                        log_error("Invalid tail object pointer");
+                        error(offsetof(Header, tail_object_offset), "invalid tail object pointer");
                         r = -EBADMSG;
                         goto fail;
                 }
@@ -871,12 +884,25 @@ int journal_file_verify(
 
                 r = journal_file_object_verify(f, p, o);
                 if (r < 0) {
-                        log_error("Invalid object contents at "OFSfmt": %s", p, strerror(-r));
+                        error(p, "invalid object contents: %s", strerror(-r));
+                        goto fail;
+                }
+
+                if ((o->object.flags & OBJECT_COMPRESSED_XZ) &&
+                    (o->object.flags & OBJECT_COMPRESSED_LZ4)) {
+                        error(p, "objected with double compression");
+                        r = -EINVAL;
+                        goto fail;
+                }
+
+                if ((o->object.flags & OBJECT_COMPRESSED_XZ) && !JOURNAL_HEADER_COMPRESSED_XZ(f->header)) {
+                        error(p, "XZ compressed object in file without XZ compression");
+                        r = -EBADMSG;
                         goto fail;
                 }
 
-                if ((o->object.flags & OBJECT_COMPRESSED) && !JOURNAL_HEADER_COMPRESSED(f->header)) {
-                        log_error("Compressed object in file without compression at "OFSfmt, p);
+                if ((o->object.flags & OBJECT_COMPRESSED_LZ4) && !JOURNAL_HEADER_COMPRESSED_LZ4(f->header)) {
+                        error(p, "LZ4 compressed object in file without LZ4 compression");
                         r = -EBADMSG;
                         goto fail;
                 }
@@ -897,7 +923,7 @@ int journal_file_verify(
 
                 case OBJECT_ENTRY:
                         if (JOURNAL_HEADER_SEALED(f->header) && n_tags <= 0) {
-                                log_error("First entry before first tag at "OFSfmt, p);
+                                error(p, "first entry before first tag");
                                 r = -EBADMSG;
                                 goto fail;
                         }
@@ -907,21 +933,21 @@ int journal_file_verify(
                                 goto fail;
 
                         if (le64toh(o->entry.realtime) < last_tag_realtime) {
-                                log_error("Older entry after newer tag at "OFSfmt, p);
+                                error(p, "older entry after newer tag");
                                 r = -EBADMSG;
                                 goto fail;
                         }
 
                         if (!entry_seqnum_set &&
                             le64toh(o->entry.seqnum) != le64toh(f->header->head_entry_seqnum)) {
-                                log_error("Head entry sequence number incorrect at "OFSfmt, p);
+                                error(p, "head entry sequence number incorrect");
                                 r = -EBADMSG;
                                 goto fail;
                         }
 
                         if (entry_seqnum_set &&
                             entry_seqnum >= le64toh(o->entry.seqnum)) {
-                                log_error("Entry sequence number out of synchronization at "OFSfmt, p);
+                                error(p, "entry sequence number out of synchronization");
                                 r = -EBADMSG;
                                 goto fail;
                         }
@@ -932,7 +958,7 @@ int journal_file_verify(
                         if (entry_monotonic_set &&
                             sd_id128_equal(entry_boot_id, o->entry.boot_id) &&
                             entry_monotonic > le64toh(o->entry.monotonic)) {
-                                log_error("Entry timestamp out of synchronization at "OFSfmt, p);
+                                error(p, "entry timestamp out of synchronization");
                                 r = -EBADMSG;
                                 goto fail;
                         }
@@ -943,7 +969,7 @@ int journal_file_verify(
 
                         if (!entry_realtime_set &&
                             le64toh(o->entry.realtime) != le64toh(f->header->head_entry_realtime)) {
-                                log_error("Head entry realtime timestamp incorrect");
+                                error(p, "head entry realtime timestamp incorrect");
                                 r = -EBADMSG;
                                 goto fail;
                         }
@@ -956,14 +982,14 @@ int journal_file_verify(
 
                 case OBJECT_DATA_HASH_TABLE:
                         if (n_data_hash_tables > 1) {
-                                log_error("More than one data hash table at "OFSfmt, p);
+                                error(p, "more than one data hash table");
                                 r = -EBADMSG;
                                 goto fail;
                         }
 
                         if (le64toh(f->header->data_hash_table_offset) != p + offsetof(HashTableObject, items) ||
                             le64toh(f->header->data_hash_table_size) != le64toh(o->object.size) - offsetof(HashTableObject, items)) {
-                                log_error("Header fields for data hash table invalid");
+                                error(p, "header fields for data hash table invalid");
                                 r = -EBADMSG;
                                 goto fail;
                         }
@@ -973,14 +999,14 @@ int journal_file_verify(
 
                 case OBJECT_FIELD_HASH_TABLE:
                         if (n_field_hash_tables > 1) {
-                                log_error("More than one field hash table at "OFSfmt, p);
+                                error(p, "more than one field hash table");
                                 r = -EBADMSG;
                                 goto fail;
                         }
 
                         if (le64toh(f->header->field_hash_table_offset) != p + offsetof(HashTableObject, items) ||
                             le64toh(f->header->field_hash_table_size) != le64toh(o->object.size) - offsetof(HashTableObject, items)) {
-                                log_error("Header fields for field hash table invalid");
+                                error(p, "header fields for field hash table invalid");
                                 r = -EBADMSG;
                                 goto fail;
                         }
@@ -995,7 +1021,7 @@ int journal_file_verify(
 
                         if (p == le64toh(f->header->entry_array_offset)) {
                                 if (found_main_entry_array) {
-                                        log_error("More than one main entry array at "OFSfmt, p);
+                                        error(p, "more than one main entry array");
                                         r = -EBADMSG;
                                         goto fail;
                                 }
@@ -1008,19 +1034,19 @@ int journal_file_verify(
 
                 case OBJECT_TAG:
                         if (!JOURNAL_HEADER_SEALED(f->header)) {
-                                log_error("Tag object in file without sealing at "OFSfmt, p);
+                                error(p, "tag object in file without sealing");
                                 r = -EBADMSG;
                                 goto fail;
                         }
 
                         if (le64toh(o->tag.seqnum) != n_tags + 1) {
-                                log_error("Tag sequence number out of synchronization at "OFSfmt, p);
+                                error(p, "tag sequence number out of synchronization");
                                 r = -EBADMSG;
                                 goto fail;
                         }
 
                         if (le64toh(o->tag.epoch) < last_epoch) {
-                                log_error("Epoch sequence out of synchronization at "OFSfmt, p);
+                                error(p, "epoch sequence out of synchronization");
                                 r = -EBADMSG;
                                 goto fail;
                         }
@@ -1029,11 +1055,11 @@ int journal_file_verify(
                         if (f->seal) {
                                 uint64_t q, rt;
 
-                                log_debug("Checking tag %"PRIu64"...", le64toh(o->tag.seqnum));
+                                debug(p, "checking tag %"PRIu64"...", le64toh(o->tag.seqnum));
 
                                 rt = f->fss_start_usec + o->tag.epoch * f->fss_interval_usec;
                                 if (entry_realtime_set && entry_realtime >= rt + f->fss_interval_usec) {
-                                        log_error("Tag/entry realtime timestamp out of synchronization at "OFSfmt, p);
+                                        error(p, "tag/entry realtime timestamp out of synchronization");
                                         r = -EBADMSG;
                                         goto fail;
                                 }
@@ -1076,7 +1102,7 @@ int journal_file_verify(
                                         goto fail;
 
                                 if (memcmp(o->tag.tag, gcry_md_read(f->hmac, 0), TAG_LENGTH) != 0) {
-                                        log_error("Tag failed verification at "OFSfmt, p);
+                                        error(p, "tag failed verification");
                                         r = -EBADMSG;
                                         goto fail;
                                 }
@@ -1105,72 +1131,72 @@ int journal_file_verify(
         }
 
         if (!found_last) {
-                log_error("Tail object pointer dead");
+                error(le64toh(f->header->tail_object_offset), "tail object pointer dead");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (n_objects != le64toh(f->header->n_objects)) {
-                log_error("Object number mismatch");
+                error(offsetof(Header, n_objects), "object number mismatch");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (n_entries != le64toh(f->header->n_entries)) {
-                log_error("Entry number mismatch");
+                error(offsetof(Header, n_entries), "entry number mismatch");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (JOURNAL_HEADER_CONTAINS(f->header, n_data) &&
             n_data != le64toh(f->header->n_data)) {
-                log_error("Data number mismatch");
+                error(offsetof(Header, n_data), "data number mismatch");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (JOURNAL_HEADER_CONTAINS(f->header, n_fields) &&
             n_fields != le64toh(f->header->n_fields)) {
-                log_error("Field number mismatch");
+                error(offsetof(Header, n_fields), "field number mismatch");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (JOURNAL_HEADER_CONTAINS(f->header, n_tags) &&
             n_tags != le64toh(f->header->n_tags)) {
-                log_error("Tag number mismatch");
+                error(offsetof(Header, n_tags), "tag number mismatch");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (JOURNAL_HEADER_CONTAINS(f->header, n_entry_arrays) &&
             n_entry_arrays != le64toh(f->header->n_entry_arrays)) {
-                log_error("Entry array number mismatch");
+                error(offsetof(Header, n_entry_arrays), "entry array number mismatch");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (n_data_hash_tables != 1) {
-                log_error("Missing data hash table");
+                error(0, "missing data hash table");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (n_field_hash_tables != 1) {
-                log_error("Missing field hash table");
+                error(0, "missing field hash table");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (!found_main_entry_array) {
-                log_error("Missing entry array");
+                error(0, "missing entry array");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (entry_seqnum_set &&
             entry_seqnum != le64toh(f->header->tail_entry_seqnum)) {
-                log_error("Invalid tail seqnum");
+                error(offsetof(Header, tail_entry_seqnum), "invalid tail seqnum");
                 r = -EBADMSG;
                 goto fail;
         }
@@ -1178,13 +1204,13 @@ int journal_file_verify(
         if (entry_monotonic_set &&
             (!sd_id128_equal(entry_boot_id, f->header->boot_id) ||
              entry_monotonic != le64toh(f->header->tail_entry_monotonic))) {
-                log_error("Invalid tail monotonic timestamp");
+                error(0, "invalid tail monotonic timestamp");
                 r = -EBADMSG;
                 goto fail;
         }
 
         if (entry_realtime_set && entry_realtime != le64toh(f->header->tail_entry_realtime)) {
-                log_error("Invalid tail realtime timestamp");
+                error(0, "invalid tail realtime timestamp");
                 r = -EBADMSG;
                 goto fail;
         }
index 86453e65c8f9b8c8e362339fba115be1ec50f5b0..f50faf42adf180e1e35fa67d68daa62787bb789a 100644 (file)
 #include <time.h>
 #include <getopt.h>
 #include <signal.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
+#include <sys/inotify.h>
 #include <linux/fs.h>
 
 #ifdef HAVE_ACL
@@ -40,7 +42,8 @@
 #include "acl-util.h"
 #endif
 
-#include <systemd/sd-journal.h>
+#include "sd-journal.h"
+#include "sd-bus.h"
 
 #include "log.h"
 #include "logs-show.h"
 #include "fsprg.h"
 #include "unit-name.h"
 #include "catalog.h"
+#include "mkdir.h"
+#include "bus-util.h"
+#include "bus-error.h"
 
 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
 
+enum {
+        /* Special values for arg_lines */
+        ARG_LINES_DEFAULT = -2,
+        ARG_LINES_ALL = -1,
+};
+
 static OutputMode arg_output = OUTPUT_SHORT;
+static bool arg_utc = false;
 static bool arg_pager_end = false;
 static bool arg_follow = false;
 static bool arg_full = true;
 static bool arg_all = false;
 static bool arg_no_pager = false;
-static int arg_lines = -1;
+static int arg_lines = ARG_LINES_DEFAULT;
 static bool arg_no_tail = false;
 static bool arg_quiet = false;
 static bool arg_merge = false;
@@ -89,6 +102,7 @@ static bool arg_force = false;
 #endif
 static usec_t arg_since, arg_until;
 static bool arg_since_set = false, arg_until_set = false;
+static char **arg_syslog_identifier = NULL;
 static char **arg_system_units = NULL;
 static char **arg_user_units = NULL;
 static const char *arg_field = NULL;
@@ -109,6 +123,7 @@ static enum {
         ACTION_DUMP_CATALOG,
         ACTION_UPDATE_CATALOG,
         ACTION_LIST_BOOTS,
+        ACTION_FLUSH,
 } arg_action = ACTION_SHOW;
 
 typedef struct boot_id_t {
@@ -125,6 +140,14 @@ static void pager_open_if_enabled(void) {
         pager_open(arg_pager_end);
 }
 
+static char *format_timestamp_maybe_utc(char *buf, size_t l, usec_t t) {
+
+        if (arg_utc)
+                return format_timestamp_utc(buf, l, t);
+
+        return format_timestamp(buf, l, t);
+}
+
 static int parse_boot_descriptor(const char *x, sd_id128_t *boot_id, int *offset) {
         sd_id128_t id = SD_ID128_NULL;
         int off = 0, r;
@@ -160,18 +183,18 @@ static int parse_boot_descriptor(const char *x, sd_id128_t *boot_id, int *offset
         return 0;
 }
 
-static int help(void) {
+static void help(void) {
 
         pager_open_if_enabled();
 
         printf("%s [OPTIONS...] [MATCHES...]\n\n"
                "Query the journal.\n\n"
                "Flags:\n"
-               "     --system              Show only the system journal\n"
-               "     --user                Show only the user journal for the current user\n"
+               "     --system              Show the system journal\n"
+               "     --user                Show the user journal for the current user\n"
                "  -M --machine=CONTAINER   Operate on local container\n"
                "     --since=DATE          Start showing entries on or newer than the specified date\n"
-               "     --until=DATE          Stop showing entries on or older than the specified date\n"
+               "     --until=DATE          Stop showing entries on or newer than the specified date\n"
                "  -c --cursor=CURSOR       Start showing entries from the specified cursor\n"
                "     --after-cursor=CURSOR Start showing entries from after the specified cursor\n"
                "     --show-cursor         Print the cursor after all the entries\n"
@@ -180,6 +203,7 @@ static int help(void) {
                "  -k --dmesg               Show kernel message log from the current boot\n"
                "  -u --unit=UNIT           Show data only from the specified unit\n"
                "     --user-unit=UNIT      Show data only from the specified user session unit\n"
+               "  -t --identifier=STRING   Show only messages with the specified syslog identifier\n"
                "  -p --priority=RANGE      Show only messages within the specified priority range\n"
                "  -e --pager-end           Immediately jump to end of the journal in the pager\n"
                "  -f --follow              Follow the journal\n"
@@ -189,6 +213,7 @@ static int help(void) {
                "  -o --output=STRING       Change journal output mode (short, short-iso,\n"
                "                                   short-precise, short-monotonic, verbose,\n"
                "                                   export, json, json-pretty, json-sse, cat)\n"
+               "     --utc                 Express time in Coordinated Universal Time (UTC)\n"
                "  -x --catalog             Add message explanations where available\n"
                "     --no-full             Ellipsize fields\n"
                "  -a --all                 Show all fields, including long and unprintable\n"
@@ -213,13 +238,12 @@ static int help(void) {
                "     --list-catalog        Show message IDs of all entries in the message catalog\n"
                "     --dump-catalog        Show entries in the message catalog\n"
                "     --update-catalog      Update the message catalog database\n"
+               "     --flush               Flush all journal data from /run into /var\n"
 #ifdef HAVE_GCRYPT
                "     --setup-keys          Generate a new FSS key pair\n"
                "     --verify              Verify journal file consistency\n"
 #endif
                , program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -250,6 +274,8 @@ static int parse_argv(int argc, char *argv[]) {
                 ARG_DUMP_CATALOG,
                 ARG_UPDATE_CATALOG,
                 ARG_FORCE,
+                ARG_UTC,
+                ARG_FLUSH,
         };
 
         static const struct option options[] = {
@@ -278,6 +304,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "file",           required_argument, NULL, ARG_FILE           },
                 { "root",           required_argument, NULL, ARG_ROOT           },
                 { "header",         no_argument,       NULL, ARG_HEADER         },
+                { "identifier",     required_argument, NULL, 't'                },
                 { "priority",       required_argument, NULL, 'p'                },
                 { "setup-keys",     no_argument,       NULL, ARG_SETUP_KEYS     },
                 { "interval",       required_argument, NULL, ARG_INTERVAL       },
@@ -298,6 +325,8 @@ static int parse_argv(int argc, char *argv[]) {
                 { "update-catalog", no_argument,       NULL, ARG_UPDATE_CATALOG },
                 { "reverse",        no_argument,       NULL, 'r'                },
                 { "machine",        required_argument, NULL, 'M'                },
+                { "utc",            no_argument,       NULL, ARG_UTC            },
+                { "flush",          no_argument,       NULL, ARG_FLUSH          },
                 {}
         };
 
@@ -306,12 +335,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hefo:aln::qmb::kD:p:c:u:F:xrM:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hefo:aln::qmb::kD:p:c:t:u:F:xrM:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -325,7 +355,7 @@ static int parse_argv(int argc, char *argv[]) {
                 case 'e':
                         arg_pager_end = true;
 
-                        if (arg_lines < 0)
+                        if (arg_lines == ARG_LINES_DEFAULT)
                                 arg_lines = 1000;
 
                         break;
@@ -364,29 +394,33 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case 'n':
                         if (optarg) {
-                                r = safe_atoi(optarg, &arg_lines);
-                                if (r < 0 || arg_lines < 0) {
-                                        log_error("Failed to parse lines '%s'", optarg);
-                                        return -EINVAL;
+                                if (streq(optarg, "all"))
+                                        arg_lines = ARG_LINES_ALL;
+                                else {
+                                        r = safe_atoi(optarg, &arg_lines);
+                                        if (r < 0 || arg_lines < 0) {
+                                                log_error("Failed to parse lines '%s'", optarg);
+                                                return -EINVAL;
+                                        }
                                 }
                         } else {
-                                int n;
+                                arg_lines = 10;
 
                                 /* Hmm, no argument? Maybe the next
                                  * word on the command line is
                                  * supposed to be the argument? Let's
                                  * see if there is one, and is
-                                 * parsable as a positive
-                                 * integer... */
-
-                                if (optind < argc &&
-                                    safe_atoi(argv[optind], &n) >= 0 &&
-                                    n >= 0) {
-
-                                        arg_lines = n;
-                                        optind++;
-                                } else
-                                        arg_lines = 10;
+                                 * parsable. */
+                                if (optind < argc) {
+                                        int n;
+                                        if (streq(argv[optind], "all")) {
+                                                arg_lines = ARG_LINES_ALL;
+                                                optind++;
+                                        } else if (safe_atoi(argv[optind], &n) >= 0 && n >= 0) {
+                                                arg_lines = n;
+                                                optind++;
+                                        }
+                                }
                         }
 
                         break;
@@ -591,6 +625,12 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_until_set = true;
                         break;
 
+                case 't':
+                        r = strv_extend(&arg_syslog_identifier, optarg);
+                        if (r < 0)
+                                return log_oom();
+                        break;
+
                 case 'u':
                         r = strv_extend(&arg_system_units, optarg);
                         if (r < 0)
@@ -627,15 +667,22 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_reverse = true;
                         break;
 
+                case ARG_UTC:
+                        arg_utc = true;
+                        break;
+
+                case ARG_FLUSH:
+                        arg_action = ACTION_FLUSH;
+                        break;
+
                 case '?':
                         return -EINVAL;
 
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
-        if (arg_follow && !arg_no_tail && arg_lines < 0)
+        if (arg_follow && !arg_no_tail && arg_lines == ARG_LINES_DEFAULT)
                 arg_lines = 10;
 
         if (!!arg_directory + !!arg_file + !!arg_machine > 1) {
@@ -699,15 +746,20 @@ static int generate_new_id128(void) {
 
 static int add_matches(sd_journal *j, char **args) {
         char **i;
+        bool have_term = false;
 
         assert(j);
 
         STRV_FOREACH(i, args) {
                 int r;
 
-                if (streq(*i, "+"))
+                if (streq(*i, "+")) {
+                        if (!have_term)
+                                break;
                         r = sd_journal_add_disjunction(j);
-                else if (path_is_absolute(*i)) {
+                        have_term = false;
+
+                } else if (path_is_absolute(*i)) {
                         _cleanup_free_ char *p, *t = NULL, *t2 = NULL;
                         const char *path;
                         _cleanup_free_ char *interpreter = NULL;
@@ -741,11 +793,17 @@ static int add_matches(sd_journal *j, char **args) {
                                         }
                                 } else
                                         t = strappend("_EXE=", path);
-                        } else if (S_ISCHR(st.st_mode))
-                                asprintf(&t, "_KERNEL_DEVICE=c%u:%u", major(st.st_rdev), minor(st.st_rdev));
-                        else if (S_ISBLK(st.st_mode))
-                                asprintf(&t, "_KERNEL_DEVICE=b%u:%u", major(st.st_rdev), minor(st.st_rdev));
-                        else {
+                        } else if (S_ISCHR(st.st_mode)) {
+                                if (asprintf(&t, "_KERNEL_DEVICE=c%u:%u",
+                                             major(st.st_rdev),
+                                             minor(st.st_rdev)) < 0)
+                                        return -ENOMEM;
+                        } else if (S_ISBLK(st.st_mode)) {
+                                if (asprintf(&t, "_KERNEL_DEVICE=b%u:%u",
+                                             major(st.st_rdev),
+                                             minor(st.st_rdev)) < 0)
+                                        return -ENOMEM;
+                        } else {
                                 log_error("File is neither a device node, nor regular file, nor executable: %s", *i);
                                 return -EINVAL;
                         }
@@ -756,8 +814,12 @@ static int add_matches(sd_journal *j, char **args) {
                         r = sd_journal_add_match(j, t, 0);
                         if (t2)
                                 r = sd_journal_add_match(j, t2, 0);
-                } else
+                        have_term = true;
+
+                } else {
                         r = sd_journal_add_match(j, *i, 0);
+                        have_term = true;
+                }
 
                 if (r < 0) {
                         log_error("Failed to add match '%s': %s", *i, strerror(-r));
@@ -765,6 +827,11 @@ static int add_matches(sd_journal *j, char **args) {
                 }
         }
 
+        if (!strv_isempty(args) && !have_term) {
+                log_error("\"+\" can only be used between terms");
+                return -EINVAL;
+        }
+
         return 0;
 }
 
@@ -777,27 +844,32 @@ static int boot_id_cmp(const void *a, const void *b) {
         return _a < _b ? -1 : (_a > _b ? 1 : 0);
 }
 
-static int list_boots(sd_journal *j) {
+static int get_boots(sd_journal *j,
+                     boot_id_t **boots,
+                     unsigned int *count,
+                     boot_id_t *query_ref_boot) {
         int r;
         const void *data;
-        unsigned int count = 0;
-        int w, i;
         size_t length, allocated = 0;
-        boot_id_t *id;
-        _cleanup_free_ boot_id_t *all_ids = NULL;
+
+        assert(j);
+        assert(boots);
+        assert(count);
 
         r = sd_journal_query_unique(j, "_BOOT_ID");
         if (r < 0)
                 return r;
 
+        *count = 0;
         SD_JOURNAL_FOREACH_UNIQUE(j, data, length) {
-                if (length < strlen("_BOOT_ID="))
-                        continue;
+                boot_id_t *id;
+
+                assert(startswith(data, "_BOOT_ID="));
 
-                if (!GREEDY_REALLOC(all_ids, allocated, count + 1))
+                if (!GREEDY_REALLOC(*boots, allocated, *count + 1))
                         return log_oom();
 
-                id = &all_ids[count];
+                id = *boots + *count;
 
                 r = sd_id128_from_string(((const char *)data) + strlen("_BOOT_ID="), &id->id);
                 if (r < 0)
@@ -821,26 +893,48 @@ static int list_boots(sd_journal *j) {
                 if (r < 0)
                         return r;
 
-                r = sd_journal_seek_tail(j);
-                if (r < 0)
-                        return r;
+                if (query_ref_boot) {
+                        id->last = 0;
+                        if (sd_id128_equal(id->id, query_ref_boot->id))
+                                *query_ref_boot = *id;
+                } else {
+                        r = sd_journal_seek_tail(j);
+                        if (r < 0)
+                                return r;
 
-                r = sd_journal_previous(j);
-                if (r < 0)
-                        return r;
-                else if (r == 0)
-                        goto flush;
+                        r = sd_journal_previous(j);
+                        if (r < 0)
+                                return r;
+                        else if (r == 0)
+                                goto flush;
 
-                r = sd_journal_get_realtime_usec(j, &id->last);
-                if (r < 0)
-                        return r;
+                        r = sd_journal_get_realtime_usec(j, &id->last);
+                        if (r < 0)
+                                return r;
+                }
 
-                count++;
+                (*count)++;
         flush:
                 sd_journal_flush_matches(j);
         }
 
-        qsort_safe(all_ids, count, sizeof(boot_id_t), boot_id_cmp);
+        qsort_safe(*boots, *count, sizeof(boot_id_t), boot_id_cmp);
+        return 0;
+}
+
+static int list_boots(sd_journal *j) {
+        int r, w, i;
+        unsigned int count;
+        boot_id_t *id;
+        _cleanup_free_ boot_id_t *all_ids = NULL;
+
+        assert(j);
+
+        r = get_boots(j, &all_ids, &count, NULL);
+        if (r < 0)
+                return r;
+
+        pager_open_if_enabled();
 
         /* numbers are one less, but we need an extra char for the sign */
         w = DECIMAL_STR_WIDTH(count - 1) + 1;
@@ -851,83 +945,41 @@ static int list_boots(sd_journal *j) {
                 printf("% *i " SD_ID128_FORMAT_STR " %s—%s\n",
                        w, i - count + 1,
                        SD_ID128_FORMAT_VAL(id->id),
-                       format_timestamp(a, sizeof(a), id->first),
-                       format_timestamp(b, sizeof(b), id->last));
+                       format_timestamp_maybe_utc(a, sizeof(a), id->first),
+                       format_timestamp_maybe_utc(b, sizeof(b), id->last));
         }
 
         return 0;
 }
 
-static int get_relative_boot_id(sd_journal *j, sd_id128_t *boot_id, int relative) {
+static int get_boot_id_by_offset(sd_journal *j, sd_id128_t *boot_id, int offset) {
         int r;
-        const void *data;
-        unsigned int count = 0;
-        size_t length, allocated = 0;
-        boot_id_t ref_boot_id = {SD_ID128_NULL}, *id;
+        unsigned int count;
+        boot_id_t ref_boot_id = {}, *id;
         _cleanup_free_ boot_id_t *all_ids = NULL;
 
         assert(j);
         assert(boot_id);
 
-        r = sd_journal_query_unique(j, "_BOOT_ID");
+        ref_boot_id.id = *boot_id;
+        r = get_boots(j, &all_ids, &count, &ref_boot_id);
         if (r < 0)
                 return r;
 
-        SD_JOURNAL_FOREACH_UNIQUE(j, data, length) {
-                if (length < strlen("_BOOT_ID="))
-                        continue;
-
-                if (!GREEDY_REALLOC(all_ids, allocated, count + 1))
-                        return log_oom();
-
-                id = &all_ids[count];
-
-                r = sd_id128_from_string(((const char *)data) + strlen("_BOOT_ID="), &id->id);
-                if (r < 0)
-                        continue;
-
-                r = sd_journal_add_match(j, data, length);
-                if (r < 0)
-                        return r;
-
-                r = sd_journal_seek_head(j);
-                if (r < 0)
-                        return r;
-
-                r = sd_journal_next(j);
-                if (r < 0)
-                        return r;
-                else if (r == 0)
-                        goto flush;
-
-                r = sd_journal_get_realtime_usec(j, &id->first);
-                if (r < 0)
-                        return r;
-
-                if (sd_id128_equal(id->id, *boot_id))
-                        ref_boot_id = *id;
-
-                count++;
-        flush:
-                sd_journal_flush_matches(j);
-        }
-
-        qsort_safe(all_ids, count, sizeof(boot_id_t), boot_id_cmp);
-
         if (sd_id128_equal(*boot_id, SD_ID128_NULL)) {
-                if (relative > (int) count || relative <= -(int)count)
+                if (offset > (int) count || offset <= -(int)count)
                         return -EADDRNOTAVAIL;
 
-                *boot_id = all_ids[(relative <= 0)*count + relative - 1].id;
+                *boot_id = all_ids[(offset <= 0)*count + offset - 1].id;
         } else {
                 id = bsearch(&ref_boot_id, all_ids, count, sizeof(boot_id_t), boot_id_cmp);
 
                 if (!id ||
-                    relative <= 0 ? (id - all_ids) + relative < 0 :
-                                    (id - all_ids) + relative >= (int) count)
+                    offset <= 0 ? (id - all_ids) + offset < 0 :
+                                    (id - all_ids) + offset >= (int) count)
                         return -EADDRNOTAVAIL;
 
-                *boot_id = (id + relative)->id;
+                *boot_id = (id + offset)->id;
         }
 
         return 0;
@@ -945,7 +997,7 @@ static int add_boot(sd_journal *j) {
         if (arg_boot_offset == 0 && sd_id128_equal(arg_boot_id, SD_ID128_NULL))
                 return add_match_this_boot(j, arg_machine);
 
-        r = get_relative_boot_id(j, &arg_boot_id, arg_boot_offset);
+        r = get_boot_id_by_offset(j, &arg_boot_id, arg_boot_offset);
         if (r < 0) {
                 if (sd_id128_equal(arg_boot_id, SD_ID128_NULL))
                         log_error("Failed to look up boot %+i: %s", arg_boot_offset, strerror(-r));
@@ -998,7 +1050,7 @@ static int get_possible_units(sd_journal *j,
         const char *field;
         int r;
 
-        found = set_new(string_hash_func, string_compare_func);
+        found = set_new(&string_hash_ops);
         if (!found)
                 return log_oom();
 
@@ -1194,6 +1246,32 @@ static int add_priorities(sd_journal *j) {
         return 0;
 }
 
+
+static int add_syslog_identifier(sd_journal *j) {
+        int r;
+        char **i;
+
+        assert(j);
+
+        STRV_FOREACH(i, arg_syslog_identifier) {
+                char *u;
+
+                u = strappenda("SYSLOG_IDENTIFIER=", *i);
+                r = sd_journal_add_match(j, u, 0);
+                if (r < 0)
+                        return r;
+                r = sd_journal_add_disjunction(j);
+                if (r < 0)
+                        return r;
+        }
+
+        r = sd_journal_add_conjunction(j);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
 static int setup_keys(void) {
 #ifdef HAVE_GCRYPT
         size_t mpk_size, seed_size, state_size, i;
@@ -1414,7 +1492,7 @@ static int verify(sd_journal *j) {
 
         log_show_color(true);
 
-        HASHMAP_FOREACH(f, j->files, i) {
+        ORDERED_HASHMAP_FOREACH(f, j->files, i) {
                 int k;
                 usec_t first, validated, last;
 
@@ -1437,8 +1515,8 @@ static int verify(sd_journal *j) {
                         if (arg_verify_key && JOURNAL_HEADER_SEALED(f->header)) {
                                 if (validated > 0) {
                                         log_info("=> Validated from %s to %s, final %s entries not sealed.",
-                                                 format_timestamp(a, sizeof(a), first),
-                                                 format_timestamp(b, sizeof(b), validated),
+                                                 format_timestamp_maybe_utc(a, sizeof(a), first),
+                                                 format_timestamp_maybe_utc(b, sizeof(b), validated),
                                                  format_timespan(c, sizeof(c), last > validated ? last - validated : 0, 0));
                                 } else if (last > 0)
                                         log_info("=> No sealing yet, %s of entries not sealed.",
@@ -1509,7 +1587,7 @@ static int access_check(sd_journal *j) {
         assert(j);
 
         if (set_isempty(j->errors)) {
-                if (hashmap_isempty(j->files))
+                if (ordered_hashmap_isempty(j->files))
                         log_notice("No journal files were found.");
                 return 0;
         }
@@ -1541,7 +1619,7 @@ static int access_check(sd_journal *j) {
                 }
 #endif
 
-                if (hashmap_isempty(j->files)) {
+                if (ordered_hashmap_isempty(j->files)) {
                         log_error("No journal files were opened due to insufficient permissions.");
                         r = -EACCES;
                 }
@@ -1561,6 +1639,77 @@ static int access_check(sd_journal *j) {
         return r;
 }
 
+static int flush_to_var(void) {
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        _cleanup_close_ int watch_fd = -1;
+        int r;
+
+        /* Quick exit */
+        if (access("/run/systemd/journal/flushed", F_OK) >= 0)
+                return 0;
+
+        /* OK, let's actually do the full logic, send SIGUSR1 to the
+         * daemon and set up inotify to wait for the flushed file to appear */
+        r = bus_open_system_systemd(&bus);
+        if (r < 0) {
+                log_error("Failed to get D-Bus connection: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_bus_call_method(
+                        bus,
+                        "org.freedesktop.systemd1",
+                        "/org/freedesktop/systemd1",
+                        "org.freedesktop.systemd1.Manager",
+                        "KillUnit",
+                        &error,
+                        NULL,
+                        "ssi", "systemd-journald.service", "main", SIGUSR1);
+        if (r < 0) {
+                log_error("Failed to kill journal service: %s", bus_error_message(&error, r));
+                return r;
+        }
+
+        mkdir_p("/run/systemd/journal", 0755);
+
+        watch_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
+        if (watch_fd < 0) {
+                log_error("Failed to create inotify watch: %m");
+                return -errno;
+        }
+
+        r = inotify_add_watch(watch_fd, "/run/systemd/journal", IN_CREATE|IN_DONT_FOLLOW|IN_ONLYDIR);
+        if (r < 0) {
+                log_error("Failed to watch journal directory: %m");
+                return -errno;
+        }
+
+        for (;;) {
+                if (access("/run/systemd/journal/flushed", F_OK) >= 0)
+                        break;
+
+                if (errno != ENOENT) {
+                        log_error("Failed to check for existance of /run/systemd/journal/flushed: %m");
+                        return -errno;
+                }
+
+                r = fd_wait_for_event(watch_fd, POLLIN, USEC_INFINITY);
+                if (r < 0) {
+                        log_error("Failed to wait for event: %s", strerror(-r));
+                        return r;
+                }
+
+                r = flush_fd(watch_fd);
+                if (r < 0) {
+                        log_error("Failed to flush inotify events: %s", strerror(-r));
+                        return r;
+                }
+        }
+
+        return 0;
+}
+
 int main(int argc, char *argv[]) {
         int r;
         _cleanup_journal_close_ sd_journal *j = NULL;
@@ -1585,6 +1734,11 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
+        if (arg_action == ACTION_FLUSH) {
+                r = flush_to_var();
+                goto finish;
+        }
+
         if (arg_action == ACTION_SETUP_KEYS) {
                 r = setup_keys();
                 goto finish;
@@ -1594,16 +1748,12 @@ int main(int argc, char *argv[]) {
             arg_action == ACTION_LIST_CATALOG ||
             arg_action == ACTION_DUMP_CATALOG) {
 
-                const char* database = CATALOG_DATABASE;
-                _cleanup_free_ char *copy = NULL;
-                if (arg_root) {
-                        copy = strjoin(arg_root, "/", CATALOG_DATABASE, NULL);
-                        if (!copy) {
-                                r = log_oom();
-                                goto finish;
-                        }
-                        path_kill_slashes(copy);
-                        database = copy;
+                _cleanup_free_ char *database;
+
+                database = path_join(arg_root, CATALOG_DATABASE, NULL);
+                if (!database) {
+                        r = log_oom();
+                        goto finish;
                 }
 
                 if (arg_action == ACTION_UPDATE_CATALOG) {
@@ -1691,6 +1841,12 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
+        r = add_syslog_identifier(j);
+        if (r < 0) {
+                log_error("Failed to add filter for syslog identifiers: %s", strerror(-r));
+                return EXIT_FAILURE;
+        }
+
         r = add_priorities(j);
         if (r < 0) {
                 log_error("Failed to add filter for priorities: %s", strerror(-r));
@@ -1752,7 +1908,7 @@ int main(int argc, char *argv[]) {
         }
 
         if (arg_cursor || arg_after_cursor) {
-                r = sd_journal_seek_cursor(j, arg_cursor ? arg_cursor : arg_after_cursor);
+                r = sd_journal_seek_cursor(j, arg_cursor ?: arg_after_cursor);
                 if (r < 0) {
                         log_error("Failed to seek to cursor: %s", strerror(-r));
                         return EXIT_FAILURE;
@@ -1831,11 +1987,11 @@ int main(int argc, char *argv[]) {
                 if (r > 0) {
                         if (arg_follow)
                                 printf("-- Logs begin at %s. --\n",
-                                       format_timestamp(start_buf, sizeof(start_buf), start));
+                                       format_timestamp_maybe_utc(start_buf, sizeof(start_buf), start));
                         else
                                 printf("-- Logs begin at %s, end at %s. --\n",
-                                       format_timestamp(start_buf, sizeof(start_buf), start),
-                                       format_timestamp(end_buf, sizeof(end_buf), end));
+                                       format_timestamp_maybe_utc(start_buf, sizeof(start_buf), start),
+                                       format_timestamp_maybe_utc(end_buf, sizeof(end_buf), end));
                 }
         }
 
@@ -1880,7 +2036,7 @@ int main(int argc, char *argv[]) {
                                         goto finish;
                         }
 
-                        if (!arg_merge) {
+                        if (!arg_merge && !arg_quiet) {
                                 sd_id128_t boot_id;
 
                                 r = sd_journal_get_monotonic_usec(j, NULL, &boot_id);
@@ -1899,7 +2055,8 @@ int main(int argc, char *argv[]) {
                                 arg_all * OUTPUT_SHOW_ALL |
                                 arg_full * OUTPUT_FULL_WIDTH |
                                 on_tty() * OUTPUT_COLOR |
-                                arg_catalog * OUTPUT_CATALOG;
+                                arg_catalog * OUTPUT_CATALOG |
+                                arg_utc * OUTPUT_UTC;
 
                         r = output_journal(stdout, j, arg_output, 0, flags, &ellipsized);
                         need_seek = true;
index 12992e7d78b5f36e4e1ba1576fe672501e2249f5..fb8ea08e31b56dd25b30ac0d684da22299e70dd7 100644 (file)
@@ -25,7 +25,7 @@
 #include <sys/mman.h>
 #include <sys/socket.h>
 
-#include <systemd/sd-messages.h>
+#include "systemd/sd-messages.h"
 #include <libudev.h>
 
 #include "journald-server.h"
@@ -152,7 +152,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
                 /* Did we lose any? */
                 if (serial > *s->kernel_seqnum)
                         server_driver_message(s, SD_MESSAGE_JOURNAL_MISSED, "Missed %"PRIu64" kernel messages",
-                                              serial - *s->kernel_seqnum - 1);
+                                              serial - *s->kernel_seqnum);
 
                 /* Make sure we never read this one again. Note that
                  * we always store the next message serial we expect
@@ -274,6 +274,9 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
         if (asprintf(&syslog_priority, "PRIORITY=%i", priority & LOG_PRIMASK) >= 0)
                 IOVEC_SET_STRING(iovec[n++], syslog_priority);
 
+        if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0)
+                IOVEC_SET_STRING(iovec[n++], syslog_facility);
+
         if ((priority & LOG_FACMASK) == LOG_KERN)
                 IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel");
         else {
@@ -295,9 +298,6 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
                         if (syslog_pid)
                                 IOVEC_SET_STRING(iovec[n++], syslog_pid);
                 }
-
-                if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0)
-                        IOVEC_SET_STRING(iovec[n++], syslog_facility);
         }
 
         message = cunescape_length_with_prefix(p, pl, "MESSAGE=");
index c54f6475d330dc70c18eefc02cd635e70a0b1696..a6352022dd8b55422b2707fb2b618f1ab26b7cef 100644 (file)
@@ -82,7 +82,7 @@ void server_process_native_message(
         struct iovec *iovec = NULL;
         unsigned n = 0, j, tn = (unsigned) -1;
         const char *p;
-        size_t remaining, m = 0;
+        size_t remaining, m = 0, entry_size = 0;
         int priority = LOG_INFO;
         char *identifier = NULL, *message = NULL;
         pid_t object_pid = 0;
@@ -106,9 +106,16 @@ void server_process_native_message(
 
                 if (e == p) {
                         /* Entry separator */
+
+                        if (entry_size + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
+                                log_debug("Entry is too big with %u properties and %zu bytes, ignoring.", n, entry_size);
+                                continue;
+                        }
+
                         server_dispatch_message(s, iovec, n, m, ucred, tv, label, label_len, NULL, priority, object_pid);
                         n = 0;
                         priority = LOG_INFO;
+                        entry_size = 0;
 
                         p++;
                         remaining--;
@@ -126,8 +133,7 @@ void server_process_native_message(
                 /* A property follows */
 
                 /* n received properties, +1 for _TRANSPORT */
-                if (!GREEDY_REALLOC(iovec, m, n + 1 + N_IOVEC_META_FIELDS +
-                                              !!object_pid * N_IOVEC_OBJECT_FIELDS)) {
+                if (!GREEDY_REALLOC(iovec, m, n + 1 + N_IOVEC_META_FIELDS + !!object_pid * N_IOVEC_OBJECT_FIELDS)) {
                         log_oom();
                         break;
                 }
@@ -145,6 +151,7 @@ void server_process_native_message(
                                  * field */
                                 iovec[n].iov_base = (char*) p;
                                 iovec[n].iov_len = l;
+                                entry_size += iovec[n].iov_len;
                                 n++;
 
                                 /* We need to determine the priority
@@ -214,7 +221,7 @@ void server_process_native_message(
                         l = le64toh(l_le);
 
                         if (l > DATA_SIZE_MAX) {
-                                log_debug("Received binary data block too large, ignoring.");
+                                log_debug("Received binary data block of %"PRIu64" bytes is too large, ignoring.", l);
                                 break;
                         }
 
@@ -237,6 +244,7 @@ void server_process_native_message(
                         if (valid_user_field(p, e - p, false)) {
                                 iovec[n].iov_base = k;
                                 iovec[n].iov_len = (e - p) + 1 + l;
+                                entry_size += iovec[n].iov_len;
                                 n++;
                         } else
                                 free(k);
@@ -251,6 +259,13 @@ void server_process_native_message(
 
         tn = n++;
         IOVEC_SET_STRING(iovec[tn], "_TRANSPORT=journal");
+        entry_size += strlen("_TRANSPORT=journal");
+
+        if (entry_size + n + 1 > ENTRY_SIZE_MAX) { /* data + separators + trailer */
+                log_debug("Entry is too big with %u properties and %zu bytes, ignoring.",
+                          n, entry_size);
+                goto finish;
+        }
 
         if (message) {
                 if (s->forward_to_syslog)
@@ -366,12 +381,15 @@ void server_process_native_file(
 }
 
 int server_open_native_socket(Server*s) {
-        union sockaddr_union sa;
         int one, r;
 
         assert(s);
 
         if (s->native_fd < 0) {
+                union sockaddr_union sa = {
+                        .un.sun_family = AF_UNIX,
+                        .un.sun_path = "/run/systemd/journal/socket",
+                };
 
                 s->native_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
                 if (s->native_fd < 0) {
@@ -379,15 +397,11 @@ int server_open_native_socket(Server*s) {
                         return -errno;
                 }
 
-                zero(sa);
-                sa.un.sun_family = AF_UNIX;
-                strncpy(sa.un.sun_path, "/run/systemd/journal/socket", sizeof(sa.un.sun_path));
-
                 unlink(sa.un.sun_path);
 
                 r = bind(s->native_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
                 if (r < 0) {
-                        log_error("bind() failed: %m");
+                        log_error("bind(%s) failed: %m", sa.un.sun_path);
                         return -errno;
                 }
 
@@ -403,7 +417,7 @@ int server_open_native_socket(Server*s) {
         }
 
 #ifdef HAVE_SELINUX
-        if (use_selinux()) {
+        if (mac_selinux_use()) {
                 one = 1;
                 r = setsockopt(s->native_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
                 if (r < 0)
index bf02fee576e243686c7256b4eefeed84d14fe9e1..e82a5b87d5a51e3fc757803ed826873cc07e9f8b 100644 (file)
@@ -25,8 +25,8 @@
 
 /* Make sure not to make this smaller than the maximum coredump
  * size. See COREDUMP_MAX in coredump.c */
-#define ENTRY_SIZE_MAX (1024*1024*768)
-#define DATA_SIZE_MAX (1024*1024*768)
+#define ENTRY_SIZE_MAX (1024*1024*770u)
+#define DATA_SIZE_MAX (1024*1024*768u)
 
 bool valid_user_field(const char *p, size_t l, bool allow_protected);
 
index 58410a2465cdae9cdcdcc8d4f1b1ff7632d5f831..12735c4b81d3e34e3311c0ab4d5e377ba43d9ccd 100644 (file)
@@ -266,7 +266,7 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
         if (r < 0)
                 return s->system_journal;
 
-        f = hashmap_get(s->user_journals, UINT32_TO_PTR(uid));
+        f = ordered_hashmap_get(s->user_journals, UINT32_TO_PTR(uid));
         if (f)
                 return f;
 
@@ -274,9 +274,9 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
                      SD_ID128_FORMAT_VAL(machine), uid) < 0)
                 return s->system_journal;
 
-        while (hashmap_size(s->user_journals) >= USER_JOURNALS_MAX) {
+        while (ordered_hashmap_size(s->user_journals) >= USER_JOURNALS_MAX) {
                 /* Too many open? Then let's close one */
-                f = hashmap_steal_first(s->user_journals);
+                f = ordered_hashmap_steal_first(s->user_journals);
                 assert(f);
                 journal_file_close(f);
         }
@@ -287,7 +287,7 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
 
         server_fix_perms(s, f, uid);
 
-        r = hashmap_put(s->user_journals, UINT32_TO_PTR(uid), f);
+        r = ordered_hashmap_put(s->user_journals, UINT32_TO_PTR(uid), f);
         if (r < 0) {
                 journal_file_close(f);
                 return s->system_journal;
@@ -328,13 +328,13 @@ void server_rotate(Server *s) {
         do_rotate(s, &s->runtime_journal, "runtime", false, 0);
         do_rotate(s, &s->system_journal, "system", s->seal, 0);
 
-        HASHMAP_FOREACH_KEY(f, k, s->user_journals, i) {
+        ORDERED_HASHMAP_FOREACH_KEY(f, k, s->user_journals, i) {
                 r = do_rotate(s, &f, "user", s->seal, PTR_TO_UINT32(k));
                 if (r >= 0)
-                        hashmap_replace(s->user_journals, k, f);
+                        ordered_hashmap_replace(s->user_journals, k, f);
                 else if (!f)
                         /* Old file has been closed and deallocated */
-                        hashmap_remove(s->user_journals, k);
+                        ordered_hashmap_remove(s->user_journals, k);
         }
 }
 
@@ -350,7 +350,7 @@ void server_sync(Server *s) {
                         log_error("Failed to sync system journal: %s", strerror(-r));
         }
 
-        HASHMAP_FOREACH_KEY(f, k, s->user_journals, i) {
+        ORDERED_HASHMAP_FOREACH_KEY(f, k, s->user_journals, i) {
                 r = journal_file_set_offline(f);
                 if (r < 0)
                         log_error("Failed to sync user journal: %s", strerror(-r));
@@ -680,7 +680,7 @@ static void dispatch_message_real(
                 }
 
 #ifdef HAVE_SELINUX
-                if (use_selinux()) {
+                if (mac_selinux_use()) {
                         if (label) {
                                 x = alloca(strlen("_SELINUX_CONTEXT=") + label_len + 1);
 
@@ -919,7 +919,7 @@ finish:
 }
 
 
-static int system_journal_open(Server *s) {
+static int system_journal_open(Server *s, bool flush_requested) {
         int r;
         char *fn;
         sd_id128_t machine;
@@ -935,7 +935,8 @@ static int system_journal_open(Server *s) {
 
         if (!s->system_journal &&
             (s->storage == STORAGE_PERSISTENT || s->storage == STORAGE_AUTO) &&
-            access("/run/systemd/journal/flushed", F_OK) >= 0) {
+            (flush_requested
+             || access("/run/systemd/journal/flushed", F_OK) >= 0)) {
 
                 /* If in auto mode: first try to create the machine
                  * path, but not the prefix.
@@ -1029,7 +1030,7 @@ int server_flush_to_var(Server *s) {
         if (!s->runtime_journal)
                 return 0;
 
-        system_journal_open(s);
+        system_journal_open(s, true);
 
         if (!s->system_journal)
                 return 0;
@@ -1221,9 +1222,11 @@ static int dispatch_sigusr1(sd_event_source *es, const struct signalfd_siginfo *
 
         log_info("Received request to flush runtime journal from PID %"PRIu32, si->ssi_pid);
 
-        touch("/run/systemd/journal/flushed");
         server_flush_to_var(s);
         server_sync(s);
+        server_vacuum(s);
+
+        touch("/run/systemd/journal/flushed");
 
         return 0;
 }
@@ -1282,7 +1285,7 @@ static int setup_signals(Server *s) {
 
 static int server_parse_proc_cmdline(Server *s) {
         _cleanup_free_ char *line = NULL;
-        char *w, *state;
+        const char *w, *state;
         size_t l;
         int r;
 
@@ -1326,32 +1329,18 @@ static int server_parse_proc_cmdline(Server *s) {
                 } else if (startswith(word, "systemd.journald"))
                         log_warning("Invalid systemd.journald parameter. Ignoring.");
         }
+        /* do not warn about state here, since probably systemd already did */
 
         return 0;
 }
 
 static int server_parse_config_file(Server *s) {
-        static const char fn[] = "/etc/systemd/journald.conf";
-        _cleanup_fclose_ FILE *f = NULL;
-        int r;
-
         assert(s);
 
-        f = fopen(fn, "re");
-        if (!f) {
-                if (errno == ENOENT)
-                        return 0;
-
-                log_warning("Failed to open configuration file %s: %m", fn);
-                return -errno;
-        }
-
-        r = config_parse(NULL, fn, f, "Journal\0", config_item_perf_lookup,
-                         (void*) journald_gperf_lookup, false, false, s);
-        if (r < 0)
-                log_warning("Failed to parse configuration file: %s", strerror(-r));
-
-        return r;
+        return config_parse(NULL, "/etc/systemd/journald.conf", NULL,
+                            "Journal\0",
+                            config_item_perf_lookup, journald_gperf_lookup,
+                            false, false, true, s);
 }
 
 static int server_dispatch_sync(sd_event_source *es, usec_t t, void *userdata) {
@@ -1473,7 +1462,6 @@ int server_init(Server *s) {
         s->rate_limit_interval = DEFAULT_RATE_LIMIT_INTERVAL;
         s->rate_limit_burst = DEFAULT_RATE_LIMIT_BURST;
 
-        s->forward_to_syslog = true;
         s->forward_to_wall = true;
 
         s->max_file_usec = DEFAULT_MAX_FILE_USEC;
@@ -1490,15 +1478,14 @@ int server_init(Server *s) {
         server_parse_config_file(s);
         server_parse_proc_cmdline(s);
         if (!!s->rate_limit_interval ^ !!s->rate_limit_burst) {
-                log_debug("Setting both rate limit interval and burst from %llu,%u to 0,0",
-                          (long long unsigned) s->rate_limit_interval,
-                          s->rate_limit_burst);
+                log_debug("Setting both rate limit interval and burst from "USEC_FMT",%u to 0,0",
+                          s->rate_limit_interval, s->rate_limit_burst);
                 s->rate_limit_interval = s->rate_limit_burst = 0;
         }
 
         mkdir_p("/run/systemd/journal", 0755);
 
-        s->user_journals = hashmap_new(trivial_hash_func, trivial_compare_func);
+        s->user_journals = ordered_hashmap_new(NULL);
         if (!s->user_journals)
                 return log_oom();
 
@@ -1600,7 +1587,7 @@ int server_init(Server *s) {
         server_cache_boot_id(s);
         server_cache_machine_id(s);
 
-        r = system_journal_open(s);
+        r = system_journal_open(s, false);
         if (r < 0)
                 return r;
 
@@ -1618,7 +1605,7 @@ void server_maybe_append_tags(Server *s) {
         if (s->system_journal)
                 journal_file_maybe_append_tag(s->system_journal, n);
 
-        HASHMAP_FOREACH(f, s->user_journals, i)
+        ORDERED_HASHMAP_FOREACH(f, s->user_journals, i)
                 journal_file_maybe_append_tag(f, n);
 #endif
 }
@@ -1636,10 +1623,10 @@ void server_done(Server *s) {
         if (s->runtime_journal)
                 journal_file_close(s->runtime_journal);
 
-        while ((f = hashmap_steal_first(s->user_journals)))
+        while ((f = ordered_hashmap_steal_first(s->user_journals)))
                 journal_file_close(f);
 
-        hashmap_free(s->user_journals);
+        ordered_hashmap_free(s->user_journals);
 
         sd_event_source_unref(s->syslog_event_source);
         sd_event_source_unref(s->native_event_source);
index 42a2235ba91573d5c43d131cb48ba942609b0858..6888187df9b6c5291e809a50f53658f575169052 100644 (file)
@@ -76,7 +76,7 @@ typedef struct Server {
 
         JournalFile *runtime_journal;
         JournalFile *system_journal;
-        Hashmap *user_journals;
+        OrderedHashmap *user_journals;
 
         uint64_t seqnum;
 
index 89da150a605bacdb87e79a29a28eb787bc02dbcf..76580f8263a161f4c323bfc2e2b4b5d574a62cc9 100644 (file)
@@ -395,7 +395,7 @@ static int stdout_stream_new(sd_event_source *es, int listen_fd, uint32_t revent
         }
 
 #ifdef HAVE_SELINUX
-        if (use_selinux()) {
+        if (mac_selinux_use()) {
                 if (getpeercon(fd, &stream->security_context) < 0 && errno != ENOPROTOOPT)
                         log_error("Failed to determine peer security context: %m");
         }
@@ -450,14 +450,14 @@ int server_open_stdout_socket(Server *s) {
 
                 r = bind(s->stdout_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
                 if (r < 0) {
-                        log_error("bind() failed: %m");
+                        log_error("bind(%s) failed: %m", sa.un.sun_path);
                         return -errno;
                 }
 
                 chmod(sa.un.sun_path, 0666);
 
                 if (listen(s->stdout_fd, SOMAXCONN) < 0) {
-                        log_error("listen() failed: %m");
+                        log_error("listen(%s) failed: %m", sa.un.sun_path);
                         return -errno;
                 }
         } else
index b826e23c016b1be84e6ca6c1277c41496d70a6dd..79c07fffa1d1b646e31583dec467a6310bba7fae 100644 (file)
 
 static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned n_iovec, struct ucred *ucred, struct timeval *tv) {
 
-        union sockaddr_union sa = {
+        static const union sockaddr_union sa = {
                 .un.sun_family = AF_UNIX,
                 .un.sun_path = "/run/systemd/journal/syslog",
         };
         struct msghdr msghdr = {
                 .msg_iov = (struct iovec *) iovec,
                 .msg_iovlen = n_iovec,
-                .msg_name = &sa,
+                .msg_name = (struct sockaddr*) &sa.sa,
                 .msg_namelen = offsetof(union sockaddr_union, un.sun_path)
                                + strlen("/run/systemd/journal/syslog"),
         };
@@ -426,7 +426,7 @@ int server_open_syslog_socket(Server *s) {
         assert(s);
 
         if (s->syslog_fd < 0) {
-                union sockaddr_union sa = {
+                static const union sockaddr_union sa = {
                         .un.sun_family = AF_UNIX,
                         .un.sun_path = "/run/systemd/journal/dev-log",
                 };
@@ -441,7 +441,7 @@ int server_open_syslog_socket(Server *s) {
 
                 r = bind(s->syslog_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
                 if (r < 0) {
-                        log_error("bind() failed: %m");
+                        log_error("bind(%s) failed: %m", sa.un.sun_path);
                         return -errno;
                 }
 
@@ -457,7 +457,7 @@ int server_open_syslog_socket(Server *s) {
         }
 
 #ifdef HAVE_SELINUX
-        if (use_selinux()) {
+        if (mac_selinux_use()) {
                 one = 1;
                 r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
                 if (r < 0)
index 886ac92a79c9b0882a1c4bb2e1166660e3b99b4c..de40827d6aac109f524576e6cc42e1ba7b28193f 100644 (file)
@@ -24,9 +24,9 @@
 #include <errno.h>
 #include <unistd.h>
 
-#include <systemd/sd-journal.h>
-#include <systemd/sd-messages.h>
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-journal.h"
+#include "systemd/sd-messages.h"
+#include "systemd/sd-daemon.h"
 
 #include "journal-authenticate.h"
 #include "journald-server.h"
@@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
                   "STATUS=Processing requests...");
 
         for (;;) {
-                usec_t t = (usec_t) -1, n;
+                usec_t t = USEC_INFINITY, n;
 
                 r = sd_event_get_state(server.event);
                 if (r < 0)
@@ -116,7 +116,9 @@ int main(int argc, char *argv[]) {
         server_driver_message(&server, SD_MESSAGE_JOURNAL_STOP, "Journal stopped");
 
 finish:
-        sd_notify(false, "STATUS=Shutting down...");
+        sd_notify(false,
+                  "STOPPING=1\n"
+                  "STATUS=Shutting down...");
 
         server_done(&server);
 
index cded4a9d475e1d72e70b2b0e129568f80a52d02e..2073f1bf2183a634b021b4ae33b521b702fc7724 100644 (file)
@@ -23,7 +23,7 @@
 #RuntimeMaxFileSize=
 #MaxRetentionSec=
 #MaxFileSec=1month
-#ForwardToSyslog=yes
+#ForwardToSyslog=no
 #ForwardToKMsg=no
 #ForwardToConsole=no
 #ForwardToWall=yes
diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c
deleted file mode 100644 (file)
index 007cb5d..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Lennart Poettering
-  Copyright 2012 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "microhttpd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "util.h"
-
-#ifdef HAVE_GNUTLS
-#include <gnutls/gnutls.h>
-#include <gnutls/x509.h>
-#endif
-
-void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
-        char *f;
-
-        f = strappenda("microhttpd: ", fmt);
-
-        DISABLE_WARNING_FORMAT_NONLITERAL;
-        log_metav(LOG_INFO, NULL, 0, NULL, f, ap);
-        REENABLE_WARNING;
-}
-
-
-static int mhd_respond_internal(struct MHD_Connection *connection,
-                                enum MHD_RequestTerminationCode code,
-                                char *buffer,
-                                size_t size,
-                                enum MHD_ResponseMemoryMode mode) {
-        struct MHD_Response *response;
-        int r;
-
-        assert(connection);
-
-        response = MHD_create_response_from_buffer(size, buffer, mode);
-        if (!response)
-                return MHD_NO;
-
-        log_debug("Queing response %u: %s", code, buffer);
-        MHD_add_response_header(response, "Content-Type", "text/plain");
-        r = MHD_queue_response(connection, code, response);
-        MHD_destroy_response(response);
-
-        return r;
-}
-
-int mhd_respond(struct MHD_Connection *connection,
-                enum MHD_RequestTerminationCode code,
-                const char *message) {
-
-        return mhd_respond_internal(connection, code,
-                                    (char*) message, strlen(message),
-                                    MHD_RESPMEM_PERSISTENT);
-}
-
-int mhd_respond_oom(struct MHD_Connection *connection) {
-        return mhd_respond(connection, MHD_HTTP_SERVICE_UNAVAILABLE,  "Out of memory.\n");
-}
-
-int mhd_respondf(struct MHD_Connection *connection,
-                 enum MHD_RequestTerminationCode code,
-                 const char *format, ...) {
-
-        char *m;
-        int r;
-        va_list ap;
-
-        assert(connection);
-        assert(format);
-
-        va_start(ap, format);
-        r = vasprintf(&m, format, ap);
-        va_end(ap);
-
-        if (r < 0)
-                return respond_oom(connection);
-
-        return mhd_respond_internal(connection, code, m, r, MHD_RESPMEM_MUST_FREE);
-}
-
-#ifdef HAVE_GNUTLS
-
-static int log_level_map[] = {
-        LOG_DEBUG,
-        LOG_WARNING, /* gnutls session audit */
-        LOG_DEBUG,   /* gnutls debug log */
-        LOG_WARNING, /* gnutls assert log */
-        LOG_INFO,    /* gnutls handshake log */
-        LOG_DEBUG,   /* gnutls record log */
-        LOG_DEBUG,   /* gnutls dtls log */
-        LOG_DEBUG,
-        LOG_DEBUG,
-        LOG_DEBUG,
-        LOG_DEBUG,   /* gnutls hard log */
-        LOG_DEBUG,   /* gnutls read log */
-        LOG_DEBUG,   /* gnutls write log */
-        LOG_DEBUG,   /* gnutls io log */
-        LOG_DEBUG,   /* gnutls buffers log */
-};
-
-void log_func_gnutls(int level, const char *message) {
-        int ourlevel;
-
-        assert_se(message);
-
-        if (0 <= level && level < (int) ELEMENTSOF(log_level_map))
-                ourlevel = log_level_map[level];
-        else
-                ourlevel = LOG_DEBUG;
-
-        log_meta(ourlevel, NULL, 0, NULL, "gnutls: %s", message);
-}
-
-static int verify_cert_authorized(gnutls_session_t session) {
-        unsigned status;
-        gnutls_certificate_type_t type;
-        gnutls_datum_t out;
-        int r;
-
-        r = gnutls_certificate_verify_peers2(session, &status);
-        if (r < 0) {
-                log_error("gnutls_certificate_verify_peers2 failed: %s", strerror(-r));
-                return r;
-        }
-
-        type = gnutls_certificate_type_get(session);
-        r = gnutls_certificate_verification_status_print(status, type, &out, 0);
-        if (r < 0) {
-                log_error("gnutls_certificate_verification_status_print failed: %s", strerror(-r));
-                return r;
-        }
-
-        log_info("Certificate status: %s", out.data);
-
-        return status == 0 ? 0 : -EPERM;
-}
-
-static int get_client_cert(gnutls_session_t session, gnutls_x509_crt_t *client_cert) {
-        const gnutls_datum_t *pcert;
-        unsigned listsize;
-        gnutls_x509_crt_t cert;
-        int r;
-
-        assert(session);
-        assert(client_cert);
-
-        pcert = gnutls_certificate_get_peers(session, &listsize);
-        if (!pcert || !listsize) {
-                log_error("Failed to retrieve certificate chain");
-                return -EINVAL;
-        }
-
-        r = gnutls_x509_crt_init(&cert);
-        if (r < 0) {
-                log_error("Failed to initialize client certificate");
-                return r;
-        }
-
-        /* Note that by passing values between 0 and listsize here, you
-           can get access to the CA's certs */
-        r = gnutls_x509_crt_import(cert, &pcert[0], GNUTLS_X509_FMT_DER);
-        if (r < 0) {
-                log_error("Failed to import client certificate");
-                gnutls_x509_crt_deinit(cert);
-                return r;
-        }
-
-        *client_cert = cert;
-        return 0;
-}
-
-static int get_auth_dn(gnutls_x509_crt_t client_cert, char **buf) {
-        size_t len = 0;
-        int r;
-
-        assert(buf);
-        assert(*buf == NULL);
-
-        r = gnutls_x509_crt_get_dn(client_cert, NULL, &len);
-        if (r != GNUTLS_E_SHORT_MEMORY_BUFFER) {
-                log_error("gnutls_x509_crt_get_dn failed");
-                return r;
-        }
-
-        *buf = malloc(len);
-        if (!*buf)
-                return log_oom();
-
-        gnutls_x509_crt_get_dn(client_cert, *buf, &len);
-        return 0;
-}
-
-int check_permissions(struct MHD_Connection *connection, int *code) {
-        const union MHD_ConnectionInfo *ci;
-        gnutls_session_t session;
-        gnutls_x509_crt_t client_cert;
-        _cleanup_free_ char *buf = NULL;
-        int r;
-
-        assert(connection);
-        assert(code);
-
-        *code = 0;
-
-        ci = MHD_get_connection_info(connection,
-                                     MHD_CONNECTION_INFO_GNUTLS_SESSION);
-        if (!ci) {
-                log_error("MHD_get_connection_info failed: session is unencrypted");
-                *code = mhd_respond(connection, MHD_HTTP_FORBIDDEN,
-                                    "Encrypted connection is required");
-                return -EPERM;
-        }
-        session = ci->tls_session;
-        assert(session);
-
-        r = get_client_cert(session, &client_cert);
-        if (r < 0) {
-                *code = mhd_respond(connection, MHD_HTTP_UNAUTHORIZED,
-                                    "Authorization through certificate is required");
-                return -EPERM;
-        }
-
-        r = get_auth_dn(client_cert, &buf);
-        if (r < 0) {
-                *code = mhd_respond(connection, MHD_HTTP_UNAUTHORIZED,
-                                    "Failed to determine distinguished name from certificate");
-                return -EPERM;
-        }
-
-        log_info("Connection from %s", buf);
-
-        r = verify_cert_authorized(session);
-        if (r < 0) {
-                log_warning("Client is not authorized");
-                *code = mhd_respond(connection, MHD_HTTP_UNAUTHORIZED,
-                                    "Client certificate not signed by recognized authority");
-        }
-        return r;
-}
-
-#else
-int check_permissions(struct MHD_Connection *connection, int *code) {
-        return -EPERM;
-}
-#endif
diff --git a/src/journal/microhttpd-util.h b/src/journal/microhttpd-util.h
deleted file mode 100644 (file)
index df4d003..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#pragma once
-
-#include <stdarg.h>
-#include <microhttpd.h>
-
-#include "macro.h"
-
-void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0);
-
-/* respond_oom() must be usable with return, hence this form. */
-#define respond_oom(connection) log_oom(), mhd_respond_oom(connection)
-
-int mhd_respondf(struct MHD_Connection *connection,
-                 unsigned code,
-                 const char *format, ...) _printf_(3,4);
-
-int mhd_respond(struct MHD_Connection *connection,
-                unsigned code,
-                const char *message);
-
-int mhd_respond_oom(struct MHD_Connection *connection);
-
-int check_permissions(struct MHD_Connection *connection, int *code);
-
-#ifdef HAVE_GNUTLS
-void log_func_gnutls(int level, const char *message);
-
-/* This is additionally filtered by our internal log level, so it
- * should be set fairly high to capture all potentially interesting
- * events without overwhelming detail.
- */
-#define GNUTLS_LOG_LEVEL 6
-#endif
index 7dbbb5ef381b4c6b617441c4a6dae2c74aae9ca3..b7db6f1da5c2c7ffbc10c00215e783891304fb24 100644 (file)
@@ -227,7 +227,7 @@ static Context *context_add(MMapCache *m, unsigned id) {
         if (c)
                 return c;
 
-        r = hashmap_ensure_allocated(&m->contexts, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&m->contexts, NULL);
         if (r < 0)
                 return NULL;
 
@@ -281,7 +281,7 @@ static FileDescriptor* fd_add(MMapCache *m, int fd) {
         if (f)
                 return f;
 
-        r = hashmap_ensure_allocated(&m->fds, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&m->fds, NULL);
         if (r < 0)
                 return NULL;
 
@@ -352,7 +352,8 @@ static int try_context(
                 bool keep_always,
                 uint64_t offset,
                 size_t size,
-                void **ret) {
+                void **ret,
+                void **release_cookie) {
 
         Context *c;
 
@@ -381,6 +382,8 @@ static int try_context(
 
         if (ret)
                 *ret = (uint8_t*) c->window->ptr + (offset - c->window->offset);
+        if (keep_always && release_cookie)
+                *release_cookie = c->window;
         return 1;
 }
 
@@ -392,7 +395,8 @@ static int find_mmap(
                 bool keep_always,
                 uint64_t offset,
                 size_t size,
-                void **ret) {
+                void **ret,
+                void **release_cookie) {
 
         FileDescriptor *f;
         Window *w;
@@ -425,6 +429,8 @@ static int find_mmap(
 
         if (ret)
                 *ret = (uint8_t*) w->ptr + (offset - w->offset);
+        if (keep_always && release_cookie)
+                *release_cookie = c->window;
         return 1;
 }
 
@@ -437,7 +443,8 @@ static int add_mmap(
                 uint64_t offset,
                 size_t size,
                 struct stat *st,
-                void **ret) {
+                void **ret,
+                void **release_cookie) {
 
         uint64_t woffset, wsize;
         Context *c;
@@ -496,15 +503,15 @@ static int add_mmap(
 
         c = context_add(m, context);
         if (!c)
-                return -ENOMEM;
+                goto outofmem;
 
         f = fd_add(m, fd);
         if (!f)
-                return -ENOMEM;
+                goto outofmem;
 
         w = window_add(m);
         if (!w)
-                return -ENOMEM;
+                goto outofmem;
 
         w->keep_always = keep_always;
         w->ptr = d;
@@ -521,7 +528,13 @@ static int add_mmap(
 
         if (ret)
                 *ret = (uint8_t*) w->ptr + (offset - w->offset);
+        if (keep_always && release_cookie)
+                *release_cookie = c->window;
         return 1;
+
+outofmem:
+        munmap(d, wsize);
+        return -ENOMEM;
 }
 
 int mmap_cache_get(
@@ -533,7 +546,8 @@ int mmap_cache_get(
                 uint64_t offset,
                 size_t size,
                 struct stat *st,
-                void **ret) {
+                void **ret,
+                void **release_cookie) {
 
         int r;
 
@@ -543,14 +557,14 @@ int mmap_cache_get(
         assert(size > 0);
 
         /* Check whether the current context is the right one already */
-        r = try_context(m, fd, prot, context, keep_always, offset, size, ret);
+        r = try_context(m, fd, prot, context, keep_always, offset, size, ret, release_cookie);
         if (r != 0) {
                 m->n_hit ++;
                 return r;
         }
 
         /* Search for a matching mmap */
-        r = find_mmap(m, fd, prot, context, keep_always, offset, size, ret);
+        r = find_mmap(m, fd, prot, context, keep_always, offset, size, ret, release_cookie);
         if (r != 0) {
                 m->n_hit ++;
                 return r;
@@ -559,16 +573,13 @@ int mmap_cache_get(
         m->n_missed++;
 
         /* Create a new mmap */
-        return add_mmap(m, fd, prot, context, keep_always, offset, size, st, ret);
+        return add_mmap(m, fd, prot, context, keep_always, offset, size, st, ret, release_cookie);
 }
 
 int mmap_cache_release(
                 MMapCache *m,
                 int fd,
-                int prot,
-                unsigned context,
-                uint64_t offset,
-                size_t size) {
+                void *release_cookie) {
 
         FileDescriptor *f;
         Window *w;
@@ -576,7 +587,6 @@ int mmap_cache_release(
         assert(m);
         assert(m->n_ref > 0);
         assert(fd >= 0);
-        assert(size > 0);
 
         f = hashmap_get(m->fds, INT_TO_PTR(fd + 1));
         if (!f)
@@ -585,7 +595,7 @@ int mmap_cache_release(
         assert(f->fd == fd);
 
         LIST_FOREACH(by_fd, w, f->windows)
-                if (window_matches(w, fd, prot, offset, size))
+                if (w == release_cookie)
                         break;
 
         if (!w)
index 647555a73e5e50767e3d543b38d4dd08b9bc9c6a..76e5316248d71baa9c8496cbecd14e5370be6e69 100644 (file)
@@ -40,14 +40,12 @@ int mmap_cache_get(
         uint64_t offset,
         size_t size,
         struct stat *st,
-        void **ret);
+        void **ret,
+        void **release_cookie);
 int mmap_cache_release(
         MMapCache *m,
         int fd,
-        int prot,
-        unsigned context,
-        uint64_t offset,
-        size_t size);
+        void *release_cookie);
 void mmap_cache_close_fd(MMapCache *m, int fd);
 void mmap_cache_close_context(MMapCache *m, unsigned context);
 
index ca805f83fe41fb18ac831bc915db0c2624fd0edb..cf21c4d899891e28b03697b22b13736a462147f9 100644 (file)
@@ -70,7 +70,7 @@ static int set_put_error(sd_journal *j, int r) {
         if (r >= 0)
                 return r;
 
-        k = set_ensure_allocated(&j->errors, trivial_hash_func, trivial_compare_func);
+        k = set_ensure_allocated(&j->errors, NULL);
         if (k < 0)
                 return k;
 
@@ -86,7 +86,7 @@ static void detach_location(sd_journal *j) {
         j->current_file = NULL;
         j->current_field = 0;
 
-        HASHMAP_FOREACH(f, j->files, i)
+        ORDERED_HASHMAP_FOREACH(f, j->files, i)
                 f->current_offset = 0;
 }
 
@@ -849,10 +849,8 @@ static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direc
                         int k;
 
                         k = compare_with_location(f, c, &j->current_location);
-                        if (direction == DIRECTION_DOWN)
-                                found = k > 0;
-                        else
-                                found = k < 0;
+
+                        found = direction == DIRECTION_DOWN ? k > 0 : k < 0;
                 } else
                         found = true;
 
@@ -881,7 +879,7 @@ static int real_journal_next(sd_journal *j, direction_t direction) {
         assert_return(j, -EINVAL);
         assert_return(!journal_pid_changed(j), -ECHILD);
 
-        HASHMAP_FOREACH(f, j->files, i) {
+        ORDERED_HASHMAP_FOREACH(f, j->files, i) {
                 bool found;
 
                 r = next_beyond_location(j, f, direction, &o, &p);
@@ -997,7 +995,7 @@ _public_ int sd_journal_get_cursor(sd_journal *j, char **cursor) {
 }
 
 _public_ int sd_journal_seek_cursor(sd_journal *j, const char *cursor) {
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         unsigned long long seqnum, monotonic, realtime, xor_hash;
         bool
@@ -1013,18 +1011,18 @@ _public_ int sd_journal_seek_cursor(sd_journal *j, const char *cursor) {
         assert_return(!journal_pid_changed(j), -ECHILD);
         assert_return(!isempty(cursor), -EINVAL);
 
-        FOREACH_WORD_SEPARATOR(w, l, cursor, ";", state) {
+        FOREACH_WORD_SEPARATOR(word, l, cursor, ";", state) {
                 char *item;
                 int k = 0;
 
-                if (l < 2 || w[1] != '=')
+                if (l < 2 || word[1] != '=')
                         return -EINVAL;
 
-                item = strndup(w, l);
+                item = strndup(word, l);
                 if (!item)
                         return -ENOMEM;
 
-                switch (w[0]) {
+                switch (word[0]) {
 
                 case 's':
                         seqnum_id_set = true;
@@ -1103,7 +1101,7 @@ _public_ int sd_journal_seek_cursor(sd_journal *j, const char *cursor) {
 
 _public_ int sd_journal_test_cursor(sd_journal *j, const char *cursor) {
         int r;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         Object *o;
 
@@ -1118,20 +1116,20 @@ _public_ int sd_journal_test_cursor(sd_journal *j, const char *cursor) {
         if (r < 0)
                 return r;
 
-        FOREACH_WORD_SEPARATOR(w, l, cursor, ";", state) {
+        FOREACH_WORD_SEPARATOR(word, l, cursor, ";", state) {
                 _cleanup_free_ char *item = NULL;
                 sd_id128_t id;
                 unsigned long long ll;
                 int k = 0;
 
-                if (l < 2 || w[1] != '=')
+                if (l < 2 || word[1] != '=')
                         return -EINVAL;
 
-                item = strndup(w, l);
+                item = strndup(word, l);
                 if (!item)
                         return -ENOMEM;
 
-                switch (w[0]) {
+                switch (word[0]) {
 
                 case 's':
                         k = sd_id128_from_string(item+2, &id);
@@ -1290,10 +1288,10 @@ static int add_any_file(sd_journal *j, const char *path) {
         assert(j);
         assert(path);
 
-        if (hashmap_get(j->files, path))
+        if (ordered_hashmap_get(j->files, path))
                 return 0;
 
-        if (hashmap_size(j->files) >= JOURNAL_FILES_MAX) {
+        if (ordered_hashmap_size(j->files) >= JOURNAL_FILES_MAX) {
                 log_warning("Too many open journal files, not adding %s.", path);
                 return set_put_error(j, -ETOOMANYREFS);
         }
@@ -1304,7 +1302,7 @@ static int add_any_file(sd_journal *j, const char *path) {
 
         /* journal_file_dump(f); */
 
-        r = hashmap_put(j->files, f->path, f);
+        r = ordered_hashmap_put(j->files, f->path, f);
         if (r < 0) {
                 journal_file_close(f);
                 return r;
@@ -1353,7 +1351,7 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename)
         if (!path)
                 return -ENOMEM;
 
-        f = hashmap_get(j->files, path);
+        f = ordered_hashmap_get(j->files, path);
         if (!f)
                 return 0;
 
@@ -1365,7 +1363,7 @@ static void remove_file_real(sd_journal *j, JournalFile *f) {
         assert(j);
         assert(f);
 
-        hashmap_remove(j->files, f->path);
+        ordered_hashmap_remove(j->files, f->path);
 
         log_debug("File %s removed.", f->path);
 
@@ -1375,8 +1373,11 @@ static void remove_file_real(sd_journal *j, JournalFile *f) {
         }
 
         if (j->unique_file == f) {
-                j->unique_file = NULL;
+                /* Jump to the next unique_file or NULL if that one was last */
+                j->unique_file = ordered_hashmap_next(j->files, j->unique_file->path);
                 j->unique_offset = 0;
+                if (!j->unique_file)
+                        j->unique_file_lost = true;
         }
 
         journal_file_close(f);
@@ -1633,7 +1634,7 @@ static int add_current_paths(sd_journal *j) {
          * "root" directories. We don't expect errors here, so we
          * treat them as fatal. */
 
-        HASHMAP_FOREACH(f, j->files, i) {
+        ORDERED_HASHMAP_FOREACH(f, j->files, i) {
                 _cleanup_free_ char *dir;
                 int r;
 
@@ -1662,7 +1663,7 @@ static int allocate_inotify(sd_journal *j) {
         }
 
         if (!j->directories_by_wd) {
-                j->directories_by_wd = hashmap_new(trivial_hash_func, trivial_compare_func);
+                j->directories_by_wd = hashmap_new(NULL);
                 if (!j->directories_by_wd)
                         return -ENOMEM;
         }
@@ -1688,8 +1689,8 @@ static sd_journal *journal_new(int flags, const char *path) {
                         goto fail;
         }
 
-        j->files = hashmap_new(string_hash_func, string_compare_func);
-        j->directories_by_path = hashmap_new(string_hash_func, string_compare_func);
+        j->files = ordered_hashmap_new(&string_hash_ops);
+        j->directories_by_path = hashmap_new(&string_hash_ops);
         j->mmap = mmap_cache_new();
         if (!j->files || !j->directories_by_path || !j->mmap)
                 goto fail;
@@ -1734,7 +1735,7 @@ _public_ int sd_journal_open_container(sd_journal **ret, const char *machine, in
         assert_return(machine, -EINVAL);
         assert_return(ret, -EINVAL);
         assert_return((flags & ~(SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM)) == 0, -EINVAL);
-        assert_return(filename_is_safe(machine), -EINVAL);
+        assert_return(machine_name_is_valid(machine), -EINVAL);
 
         p = strappenda("/run/systemd/machines/", machine);
         r = parse_env_file(p, NEWLINE, "ROOT", &root, "CLASS", &class, NULL);
@@ -1834,10 +1835,10 @@ _public_ void sd_journal_close(sd_journal *j) {
 
         sd_journal_flush_matches(j);
 
-        while ((f = hashmap_steal_first(j->files)))
+        while ((f = ordered_hashmap_steal_first(j->files)))
                 journal_file_close(f);
 
-        hashmap_free(j->files);
+        ordered_hashmap_free(j->files);
 
         while ((d = hashmap_first(j->directories_by_path)))
                 remove_directory(j, d);
@@ -1983,6 +1984,7 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **
                 uint64_t p, l;
                 le64_t le_hash;
                 size_t t;
+                int compression;
 
                 p = le64toh(o->entry.items[i].object_offset);
                 le_hash = o->entry.items[i].hash;
@@ -1995,19 +1997,22 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **
 
                 l = le64toh(o->object.size) - offsetof(Object, data.payload);
 
-                if (o->object.flags & OBJECT_COMPRESSED) {
-
-#ifdef HAVE_XZ
-                        if (uncompress_startswith(o->data.payload, l,
+                compression = o->object.flags & OBJECT_COMPRESSION_MASK;
+                if (compression) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
+                        if (decompress_startswith(compression,
+                                                  o->data.payload, l,
                                                   &f->compress_buffer, &f->compress_buffer_size,
                                                   field, field_length, '=')) {
 
-                                uint64_t rsize;
+                                size_t rsize;
 
-                                if (!uncompress_blob(o->data.payload, l,
-                                                     &f->compress_buffer, &f->compress_buffer_size, &rsize,
-                                                     j->data_threshold))
-                                        return -EBADMSG;
+                                r = decompress_blob(compression,
+                                                    o->data.payload, l,
+                                                    &f->compress_buffer, &f->compress_buffer_size, &rsize,
+                                                    j->data_threshold);
+                                if (r < 0)
+                                        return r;
 
                                 *data = f->compress_buffer;
                                 *size = (size_t) rsize;
@@ -2017,7 +2022,6 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **
 #else
                         return -EPROTONOSUPPORT;
 #endif
-
                 } else if (l >= field_length+1 &&
                            memcmp(o->data.payload, field, field_length) == 0 &&
                            o->data.payload[field_length] == '=') {
@@ -2044,6 +2048,7 @@ _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **
 static int return_data(sd_journal *j, JournalFile *f, Object *o, const void **data, size_t *size) {
         size_t t;
         uint64_t l;
+        int compression;
 
         l = le64toh(o->object.size) - offsetof(Object, data.payload);
         t = (size_t) l;
@@ -2052,12 +2057,17 @@ static int return_data(sd_journal *j, JournalFile *f, Object *o, const void **da
         if ((uint64_t) t != l)
                 return -E2BIG;
 
-        if (o->object.flags & OBJECT_COMPRESSED) {
-#ifdef HAVE_XZ
-                uint64_t rsize;
+        compression = o->object.flags & OBJECT_COMPRESSION_MASK;
+        if (compression) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
+                size_t rsize;
+                int r;
 
-                if (!uncompress_blob(o->data.payload, l, &f->compress_buffer, &f->compress_buffer_size, &rsize, j->data_threshold))
-                        return -EBADMSG;
+                r = decompress_blob(compression,
+                                    o->data.payload, l, &f->compress_buffer,
+                                    &f->compress_buffer_size, &rsize, j->data_threshold);
+                if (r < 0)
+                        return r;
 
                 *data = f->compress_buffer;
                 *size = (size_t) rsize;
@@ -2358,7 +2368,7 @@ _public_ int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from,
         assert_return(from || to, -EINVAL);
         assert_return(from != to, -EINVAL);
 
-        HASHMAP_FOREACH(f, j->files, i) {
+        ORDERED_HASHMAP_FOREACH(f, j->files, i) {
                 usec_t fr, t;
 
                 r = journal_file_get_cutoff_realtime_usec(f, &fr, &t);
@@ -2390,7 +2400,7 @@ _public_ int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from,
 _public_ int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, sd_id128_t boot_id, uint64_t *from, uint64_t *to) {
         Iterator i;
         JournalFile *f;
-        bool first = true;
+        bool found = false;
         int r;
 
         assert_return(j, -EINVAL);
@@ -2398,7 +2408,7 @@ _public_ int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, sd_id128_t boot
         assert_return(from || to, -EINVAL);
         assert_return(from != to, -EINVAL);
 
-        HASHMAP_FOREACH(f, j->files, i) {
+        ORDERED_HASHMAP_FOREACH(f, j->files, i) {
                 usec_t fr, t;
 
                 r = journal_file_get_cutoff_monotonic_usec(f, boot_id, &fr, &t);
@@ -2409,21 +2419,21 @@ _public_ int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, sd_id128_t boot
                 if (r == 0)
                         continue;
 
-                if (first) {
+                if (found) {
                         if (from)
-                                *from = fr;
+                                *from = MIN(fr, *from);
                         if (to)
-                                *to = t;
-                        first = false;
+                                *to = MAX(t, *to);
                 } else {
                         if (from)
-                                *from = MIN(fr, *from);
+                                *from = fr;
                         if (to)
-                                *to = MAX(t, *to);
+                                *to = t;
+                        found = true;
                 }
         }
 
-        return first ? 0 : 1;
+        return found;
 }
 
 void journal_print_header(sd_journal *j) {
@@ -2433,7 +2443,7 @@ void journal_print_header(sd_journal *j) {
 
         assert(j);
 
-        HASHMAP_FOREACH(f, j->files, i) {
+        ORDERED_HASHMAP_FOREACH(f, j->files, i) {
                 if (newline)
                         putchar('\n');
                 else
@@ -2452,7 +2462,7 @@ _public_ int sd_journal_get_usage(sd_journal *j, uint64_t *bytes) {
         assert_return(!journal_pid_changed(j), -ECHILD);
         assert_return(bytes, -EINVAL);
 
-        HASHMAP_FOREACH(f, j->files, i) {
+        ORDERED_HASHMAP_FOREACH(f, j->files, i) {
                 struct stat st;
 
                 if (fstat(f->fd, &st) < 0)
@@ -2481,6 +2491,7 @@ _public_ int sd_journal_query_unique(sd_journal *j, const char *field) {
         j->unique_field = f;
         j->unique_file = NULL;
         j->unique_offset = 0;
+        j->unique_file_lost = false;
 
         return 0;
 }
@@ -2497,9 +2508,13 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
         k = strlen(j->unique_field);
 
         if (!j->unique_file) {
-                j->unique_file = hashmap_first(j->files);
+                if (j->unique_file_lost)
+                        return 0;
+
+                j->unique_file = ordered_hashmap_first(j->files);
                 if (!j->unique_file)
                         return 0;
+
                 j->unique_offset = 0;
         }
 
@@ -2511,6 +2526,7 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
                 size_t ol;
                 bool found;
                 int r;
+                void *release_cookie;
 
                 /* Proceed to next data object in the field's linked list */
                 if (j->unique_offset == 0) {
@@ -2529,13 +2545,10 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
 
                 /* We reached the end of the list? Then start again, with the next file */
                 if (j->unique_offset == 0) {
-                        JournalFile *n;
-
-                        n = hashmap_next(j->files, j->unique_file->path);
-                        if (!n)
+                        j->unique_file = ordered_hashmap_next(j->files, j->unique_file->path);
+                        if (!j->unique_file)
                                 return 0;
 
-                        j->unique_file = n;
                         continue;
                 }
 
@@ -2548,13 +2561,13 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
 
                 /* Let's do the type check by hand, since we used 0 context above. */
                 if (o->object.type != OBJECT_DATA) {
-                        log_error("%s:offset " OFSfmt ": object has type %d, expected %d",
+                        log_debug("%s:offset " OFSfmt ": object has type %d, expected %d",
                                   j->unique_file->path, j->unique_offset,
                                   o->object.type, OBJECT_DATA);
                         return -EBADMSG;
                 }
 
-                r = journal_file_object_keep(j->unique_file, o, j->unique_offset);
+                r = journal_file_object_keep(j->unique_file, o, j->unique_offset, &release_cookie);
                 if (r < 0)
                         return r;
 
@@ -2562,11 +2575,26 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
                 if (r < 0)
                         return r;
 
+                /* Check if we have at least the field name and "=". */
+                if (ol <= k) {
+                        log_debug("%s:offset " OFSfmt ": object has size %zu, expected at least %zu",
+                                  j->unique_file->path, j->unique_offset,
+                                  ol, k + 1);
+                        return -EBADMSG;
+                }
+
+                if (memcmp(odata, j->unique_field, k) || ((const char*) odata)[k] != '=') {
+                        log_debug("%s:offset " OFSfmt ": object does not start with \"%s=\"",
+                                  j->unique_file->path, j->unique_offset,
+                                  j->unique_field);
+                        return -EBADMSG;
+                }
+
                 /* OK, now let's see if we already returned this data
                  * object by checking if it exists in the earlier
                  * traversed files. */
                 found = false;
-                HASHMAP_FOREACH(of, j->files, i) {
+                ORDERED_HASHMAP_FOREACH(of, j->files, i) {
                         Object *oo;
                         uint64_t op;
 
@@ -2587,13 +2615,13 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
                                 found = true;
                 }
 
-                if (found)
-                        continue;
-
-                r = journal_file_object_release(j->unique_file, o, j->unique_offset);
+                r = journal_file_object_release(j->unique_file, release_cookie);
                 if (r < 0)
                         return r;
 
+                if (found)
+                        continue;
+
                 r = return_data(j, j->unique_file, o, data, l);
                 if (r < 0)
                         return r;
@@ -2608,6 +2636,7 @@ _public_ void sd_journal_restart_unique(sd_journal *j) {
 
         j->unique_file = NULL;
         j->unique_offset = 0;
+        j->unique_file_lost = false;
 }
 
 _public_ int sd_journal_reliable_fd(sd_journal *j) {
index 967ab6756b323c1b887c801558bbf65ed32b3fa0..5fe2f6a2697e6bb65ba264b2c274e297a013293a 100644 (file)
@@ -62,7 +62,7 @@ static void test_catalog_importing(void) {
         Hashmap *h;
         struct strbuf *sb;
 
-        assert_se(h = hashmap_new(catalog_hash_func, catalog_compare_func));
+        assert_se(h = hashmap_new(&catalog_hash_ops));
         assert_se(sb = strbuf_new());
 
 #define BUF "xxx"
diff --git a/src/journal/test-compress-benchmark.c b/src/journal/test-compress-benchmark.c
new file mode 100644 (file)
index 0000000..b3bc3ec
--- /dev/null
@@ -0,0 +1,113 @@
+/***
+  This file is part of systemd
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include "compress.h"
+#include "util.h"
+#include "macro.h"
+
+typedef int (compress_t)(const void *src, uint64_t src_size, void *dst, size_t *dst_size);
+typedef int (decompress_t)(const void *src, uint64_t src_size,
+                           void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
+
+#define MAX_SIZE (1024*1024LU)
+
+static char* make_buf(size_t count) {
+        char *buf;
+        size_t i;
+
+        buf = malloc(count);
+        assert(buf);
+
+        for (i = 0; i < count; i++)
+                buf[i] = 'a' + i % ('z' - 'a' + 1);
+
+        return buf;
+}
+
+static void test_compress_decompress(const char* label,
+                                     compress_t compress, decompress_t decompress) {
+        usec_t n, n2 = 0;
+        float dt;
+
+        _cleanup_free_ char *text, *buf;
+        _cleanup_free_ void *buf2 = NULL;
+        size_t buf2_allocated = 0;
+        size_t skipped = 0, compressed = 0, total = 0;
+
+        text = make_buf(MAX_SIZE);
+        buf = calloc(MAX_SIZE + 1, 1);
+        assert(text && buf);
+
+        n = now(CLOCK_MONOTONIC);
+
+        for (size_t i = 1; i <= MAX_SIZE; i += (i < 2048 ? 1 : 217)) {
+                size_t j = 0, k = 0;
+                int r;
+
+                r = compress(text, i, buf, &j);
+                /* assume compression must be successful except for small inputs */
+                assert(r == 0 || (i < 2048 && r == -ENOBUFS));
+                /* check for overwrites */
+                assert(buf[i] == 0);
+                if (r != 0) {
+                        skipped += i;
+                        continue;
+                }
+
+                assert(j > 0);
+                if (j >= i)
+                        log_error("%s \"compressed\" %zu -> %zu", label, i, j);
+
+                r = decompress(buf, j, &buf2, &buf2_allocated, &k, 0);
+                assert(r == 0);
+                assert(buf2_allocated >= k);
+                assert(k == i);
+
+                assert(memcmp(text, buf2, i) == 0);
+
+                total += i;
+                compressed += j;
+
+                n2 = now(CLOCK_MONOTONIC);
+                if (n2 - n > 60 * USEC_PER_SEC)
+                        break;
+        }
+
+        dt = (n2-n) / 1e6;
+
+        log_info("%s: compressed & decompressed %zu bytes in %.2fs (%.2fMiB/s), "
+                 "mean compresion %.2f%%, skipped %zu bytes",
+                 label, total, dt,
+                 total / 1024. / 1024 / dt,
+                 100 - compressed * 100. / total,
+                 skipped);
+}
+
+int main(int argc, char *argv[]) {
+
+        log_set_max_level(LOG_DEBUG);
+
+#ifdef HAVE_XZ
+        test_compress_decompress("XZ", compress_blob_xz, decompress_blob_xz);
+#endif
+#ifdef HAVE_LZ4
+        test_compress_decompress("LZ4", compress_blob_lz4, decompress_blob_lz4);
+#endif
+        return 0;
+}
index 0806145d4bdc352dd2a44c8b618ea44b7f023ffc..78b3203befe52964f22ebb3d5bef77f0e4d61ec6 100644 (file)
 #include "util.h"
 #include "macro.h"
 
-static void test_compress_uncompress(void) {
-        char text[] = "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
-                      "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
+#ifdef HAVE_XZ
+# define XZ_OK 0
+#else
+# define XZ_OK -EPROTONOSUPPORT
+#endif
+
+#ifdef HAVE_LZ4
+# define LZ4_OK 0
+#else
+# define LZ4_OK -EPROTONOSUPPORT
+#endif
+
+typedef int (compress_blob_t)(const void *src, uint64_t src_size,
+                              void *dst, size_t *dst_size);
+typedef int (decompress_blob_t)(const void *src, uint64_t src_size,
+                                void **dst, size_t *dst_alloc_size,
+                                size_t* dst_size, size_t dst_max);
+typedef int (decompress_sw_t)(const void *src, uint64_t src_size,
+                              void **buffer, size_t *buffer_size,
+                              const void *prefix, size_t prefix_len,
+                              uint8_t extra);
+
+typedef int (compress_stream_t)(int fdf, int fdt, off_t max_bytes);
+typedef int (decompress_stream_t)(int fdf, int fdt, off_t max_size);
+
+static void test_compress_decompress(int compression,
+                                     compress_blob_t compress,
+                                     decompress_blob_t decompress,
+                                     const char *data,
+                                     size_t data_len,
+                                     bool may_fail) {
         char compressed[512];
-        uint64_t csize = 512;
-        uint64_t usize = 0;
-        _cleanup_free_ char *uncompressed = NULL;
-
-        assert_se(compress_blob(text, sizeof(text), compressed, &csize));
-        assert_se(uncompress_blob(compressed,
-                                  csize,
-                                  (void **) &uncompressed,
-                                  &usize, &csize, 0));
-        assert_se(uncompressed);
-        assert_se(streq(uncompressed, text));
-        assert_se(!uncompress_blob("garbage",
-                                   7,
-                                   (void **) &uncompressed,
-                                   &usize, &csize, 0));
+        size_t csize = 512;
+        size_t usize = 0;
+        _cleanup_free_ char *decompressed = NULL;
+        int r;
+
+        log_info("/* testing %s %s blob compression/decompression */",
+                 object_compressed_to_string(compression), data);
+
+        r = compress(data, data_len, compressed, &csize);
+        if (r == -ENOBUFS) {
+                log_info("compression failed: %s", strerror(-r));
+                assert(may_fail);
+        } else {
+                assert(r == 0);
+                r = decompress(compressed, csize,
+                               (void **) &decompressed, &usize, &csize, 0);
+                assert(r == 0);
+                assert_se(decompressed);
+                assert_se(memcmp(decompressed, data, data_len) == 0);
+        }
+
+        r = decompress("garbage", 7,
+                       (void **) &decompressed, &usize, &csize, 0);
+        assert(r < 0);
+
+        /* make sure to have the minimal lz4 compressed size */
+        r = decompress("00000000\1g", 9,
+                       (void **) &decompressed, &usize, &csize, 0);
+        assert(r < 0);
+
+        r = decompress("\100000000g", 9,
+                       (void **) &decompressed, &usize, &csize, 0);
+        assert(r < 0);
+
+        memzero(decompressed, usize);
 }
 
-static void test_uncompress_startswith(void) {
-        char text[] = "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
-                      "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
+static void test_decompress_startswith(int compression,
+                                       compress_blob_t compress,
+                                       decompress_sw_t decompress_sw,
+                                       const char *data,
+                                       size_t data_len,
+                                       bool may_fail) {
+
         char compressed[512];
-        uint64_t csize = 512;
-        uint64_t usize = 0;
-        _cleanup_free_ char *uncompressed = NULL;
-
-        assert_se(compress_blob(text, sizeof(text), compressed, &csize));
-        assert_se(uncompress_startswith(compressed,
-                                        csize,
-                                        (void **) &uncompressed,
-                                        &usize,
-                                        "foofoofoofoo", 12, ' '));
-        assert_se(!uncompress_startswith(compressed,
-                                         csize,
-                                        (void **) &uncompressed,
-                                        &usize,
-                                        "foofoofoofoo", 12, 'w'));
-        assert_se(!uncompress_startswith(compressed,
-                                         csize,
-                                        (void **) &uncompressed,
-                                        &usize,
-                                        "barbarbar", 9, ' '));
+        size_t csize = 512;
+        size_t usize = 0;
+        _cleanup_free_ char *decompressed = NULL;
+        int r;
+
+        log_info("/* testing decompress_startswith with %s on %s text*/",
+                 object_compressed_to_string(compression), data);
+
+        r = compress(data, data_len, compressed, &csize);
+        if (r == -ENOBUFS) {
+                log_info("compression failed: %s", strerror(-r));
+                assert(may_fail);
+                return;
+        }
+        assert(r == 0);
+
+        assert_se(decompress_sw(compressed,
+                                csize,
+                                (void **) &decompressed,
+                                &usize,
+                                data, strlen(data), '\0') > 0);
+        assert_se(decompress_sw(compressed,
+                                csize,
+                                (void **) &decompressed,
+                                &usize,
+                                data, strlen(data), 'w') == 0);
+        assert_se(decompress_sw(compressed,
+                                csize,
+                                (void **) &decompressed,
+                                &usize,
+                                "barbarbar", 9, ' ') == 0);
+        assert_se(decompress_sw(compressed,
+                                csize,
+                                (void **) &decompressed,
+                                &usize,
+                                data, strlen(data), '\0') > 0);
 }
 
-static void test_compress_stream(const char *srcfile) {
+static void test_compress_stream(int compression,
+                                 const char* cat,
+                                 compress_stream_t compress,
+                                 decompress_stream_t decompress,
+                                 const char *srcfile) {
+
         _cleanup_close_ int src = -1, dst = -1, dst2 = -1;
         char pattern[] = "/tmp/systemd-test.xz.XXXXXX",
              pattern2[] = "/tmp/systemd-test.xz.XXXXXX";
         int r;
-        _cleanup_free_ char *cmd, *cmd2;
+        _cleanup_free_ char *cmd = NULL, *cmd2;
         struct stat st = {};
 
+        log_debug("/* testing %s compression */",
+                  object_compressed_to_string(compression));
+
         log_debug("/* create source from %s */", srcfile);
 
         assert_se((src = open(srcfile, O_RDONLY|O_CLOEXEC)) >= 0);
@@ -84,11 +160,12 @@ static void test_compress_stream(const char *srcfile) {
 
         assert_se((dst = mkostemp_safe(pattern, O_RDWR|O_CLOEXEC)) >= 0);
 
-        r = compress_stream(src, dst, 1, -1);
-        assert(r == 0);
+        assert_se(compress(src, dst, -1) == 0);
 
-        assert_se(asprintf(&cmd, "xzcat %s | diff %s -", pattern, srcfile) > 0);
-        assert_se(system(cmd) == 0);
+        if (cat) {
+                assert_se(asprintf(&cmd, "%s %s | diff %s -", cat, pattern, srcfile) > 0);
+                assert_se(system(cmd) == 0);
+        }
 
         log_debug("/* test decompression */");
 
@@ -97,7 +174,7 @@ static void test_compress_stream(const char *srcfile) {
         assert_se(stat(srcfile, &st) == 0);
 
         assert_se(lseek(dst, 0, SEEK_SET) == 0);
-        r = decompress_stream(dst, dst2, st.st_size);
+        r = decompress(dst, dst2, st.st_size);
         assert(r == 0);
 
         assert_se(asprintf(&cmd2, "diff %s %s", srcfile, pattern2) > 0);
@@ -106,25 +183,64 @@ static void test_compress_stream(const char *srcfile) {
         log_debug("/* test faulty decompression */");
 
         assert_se(lseek(dst, 1, SEEK_SET) == 1);
-        r = decompress_stream(dst, dst2, st.st_size);
+        r = decompress(dst, dst2, st.st_size);
         assert(r == -EBADMSG);
 
         assert_se(lseek(dst, 0, SEEK_SET) == 0);
         assert_se(lseek(dst2, 0, SEEK_SET) == 0);
-        r = decompress_stream(dst, dst2, st.st_size - 1);
-        assert(r == -E2BIG);
+        r = decompress(dst, dst2, st.st_size - 1);
+        assert(r == -EFBIG);
 
         assert_se(unlink(pattern) == 0);
         assert_se(unlink(pattern2) == 0);
 }
 
 int main(int argc, char *argv[]) {
+        const char text[] =
+                "text\0foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
+                "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
+
+        char data[512] = "random\0";
 
         log_set_max_level(LOG_DEBUG);
 
-        test_compress_uncompress();
-        test_uncompress_startswith();
-        test_compress_stream(argv[0]);
+        random_bytes(data + 7, sizeof(data) - 7);
+
+#ifdef HAVE_XZ
+        test_compress_decompress(OBJECT_COMPRESSED_XZ, compress_blob_xz, decompress_blob_xz,
+                                 text, sizeof(text), false);
+        test_compress_decompress(OBJECT_COMPRESSED_XZ, compress_blob_xz, decompress_blob_xz,
+                                 data, sizeof(data), true);
+        test_decompress_startswith(OBJECT_COMPRESSED_XZ,
+                                   compress_blob_xz, decompress_startswith_xz,
+                                   text, sizeof(text), false);
+        test_decompress_startswith(OBJECT_COMPRESSED_XZ,
+                                   compress_blob_xz, decompress_startswith_xz,
+                                   data, sizeof(data), true);
+        test_compress_stream(OBJECT_COMPRESSED_XZ, "xzcat",
+                             compress_stream_xz, decompress_stream_xz, argv[0]);
+#else
+        log_info("/* XZ test skipped */");
+#endif
+
+#ifdef HAVE_LZ4
+        test_compress_decompress(OBJECT_COMPRESSED_LZ4, compress_blob_lz4, decompress_blob_lz4,
+                                 text, sizeof(text), false);
+        test_compress_decompress(OBJECT_COMPRESSED_LZ4, compress_blob_lz4, decompress_blob_lz4,
+                                 data, sizeof(data), true);
+        test_decompress_startswith(OBJECT_COMPRESSED_LZ4,
+                                   compress_blob_lz4, decompress_startswith_lz4,
+                                   text, sizeof(text), false);
+        test_decompress_startswith(OBJECT_COMPRESSED_LZ4,
+                                   compress_blob_lz4, decompress_startswith_lz4,
+                                   data, sizeof(data), true);
+
+        /* Produced stream is not compatible with lz4 binary, skip lz4cat check. */
+        test_compress_stream(OBJECT_COMPRESSED_LZ4, NULL,
+                             compress_stream_lz4, decompress_stream_lz4, argv[0]);
+#else
+        log_info("/* LZ4 test skipped */");
+#endif
 
         return 0;
 }
index 58f260d6c204a73ca3b5a8253d412c19f5f66ce9..11fb150fe83744abaa435f9c6b30877408f46d4c 100644 (file)
@@ -19,7 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "log.h"
 #include "util.h"
@@ -31,8 +31,12 @@ int main(int argc, char *argv[]) {
 
         log_set_max_level(LOG_DEBUG);
 
-        if (argc >= 2)
-                safe_atoi(argv[1], &I);
+        if (argc >= 2) {
+                r = safe_atoi(argv[1], &I);
+                if (r < 0)
+                        log_info("Could not parse loop count argument. Using default.");
+        }
+
         log_info("Running %d loops", I);
 
         assert_se(mkdtemp(t));
index 5c9604472e7f4dad54a6c73e6760548027e08b78..6c5995e0c14a5355fa79e7a879222a1173c67438 100644 (file)
@@ -23,7 +23,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "journal-file.h"
 #include "journal-internal.h"
index 37bffc188399d0289f401ee20a32554703ee59f7..a3187053c9c62993a82972ddd80f6fc33dc3b0a0 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <stdio.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "journal-internal.h"
 #include "util.h"
index 3e986ed99a4d5b00112a6bf8d0d5fc8a090c9873..81ca47ed8deb58927cc29fecc385f150c3c6ac61 100644 (file)
@@ -19,7 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -72,7 +72,7 @@ int main(int argc, char *argv[]) {
                         "N_CPUS=%li", sysconf(_SC_NPROCESSORS_ONLN),
                         NULL);
 
-        sleep(10);
+        sleep(1);
 
         return 0;
 }
index 8e1d08d59608e41c8721962974c7331206ca465a..8ccd8134457f6aee91bdda5f9b904364d678548a 100644 (file)
@@ -22,7 +22,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "journal-file.h"
 #include "journal-internal.h"
index 85b4cf71acf5915da2d8b22963faad4c9a0f7c21..6025d04ba4c18a7d53037824ec839b91c28a3aef 100644 (file)
@@ -22,7 +22,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "log.h"
 #include "journal-file.h"
index b7bb260fcfdce9516c4ce010b763861c240d5e34..778e884c3ff032927498c4b215221b75e3538500 100644 (file)
@@ -49,23 +49,23 @@ int main(int argc, char *argv[]) {
         assert(z >= 0);
         unlink(pz);
 
-        r = mmap_cache_get(m, x, PROT_READ, 0, false, 1, 2, NULL, &p);
+        r = mmap_cache_get(m, x, PROT_READ, 0, false, 1, 2, NULL, &p, NULL);
         assert(r >= 0);
 
-        r = mmap_cache_get(m, x, PROT_READ, 0, false, 2, 2, NULL, &q);
+        r = mmap_cache_get(m, x, PROT_READ, 0, false, 2, 2, NULL, &q, NULL);
         assert(r >= 0);
 
         assert((uint8_t*) p + 1 == (uint8_t*) q);
 
-        r = mmap_cache_get(m, x, PROT_READ, 1, false, 3, 2, NULL, &q);
+        r = mmap_cache_get(m, x, PROT_READ, 1, false, 3, 2, NULL, &q, NULL);
         assert(r >= 0);
 
         assert((uint8_t*) p + 2 == (uint8_t*) q);
 
-        r = mmap_cache_get(m, x, PROT_READ, 0, false, 16ULL*1024ULL*1024ULL, 2, NULL, &p);
+        r = mmap_cache_get(m, x, PROT_READ, 0, false, 16ULL*1024ULL*1024ULL, 2, NULL, &p, NULL);
         assert(r >= 0);
 
-        r = mmap_cache_get(m, x, PROT_READ, 1, false, 16ULL*1024ULL*1024ULL+1, 2, NULL, &q);
+        r = mmap_cache_get(m, x, PROT_READ, 1, false, 16ULL*1024ULL*1024ULL+1, 2, NULL, &q, NULL);
         assert(r >= 0);
 
         assert((uint8_t*) p + 1 == (uint8_t*) q);
index c17b8a98d51bfcab2ad240bd704e6db1d3f19ebe..6f032b5a4b7b47e26c5537755472a730210ec8c6 100644 (file)
@@ -47,11 +47,10 @@ if [[ -f /etc/kernel/cmdline ]]; then
 fi
 
 if ! [[ ${BOOT_OPTIONS[*]} ]]; then
-    readarray -t line < /proc/cmdline
-    for i in ${line[*]}; do
-        if [[ "${i#initrd=*}" == "$i" ]]; then
-            BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
-        fi
+    read -ar line < /proc/cmdline
+    for i in "${line[@]}"; do
+        [[ "${i#initrd=*}" != "$i" ]] && continue
+        BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
     done
 fi
 
index 6f6f1218d956ed8e574342b321a8cd272f817c67..d358a49307e997400817c7ec4ed2addf19c35b06 100644 (file)
 
 #include <stdint.h>
 #include <linux/if_packet.h>
+#include <net/if_arp.h>
+#include <net/ethernet.h>
 
 #include "socket-util.h"
 
 #include "sd-dhcp-client.h"
 #include "dhcp-protocol.h"
 
-int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t xid);
+int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
+                                 uint32_t xid, const uint8_t *mac_addr,
+                                 size_t mac_addr_len, uint16_t arp_type);
 int dhcp_network_bind_udp_socket(be32_t address, uint16_t port);
 int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link,
                                  const void *packet, size_t len);
@@ -46,8 +50,9 @@ typedef int (*dhcp_option_cb_t)(uint8_t code, uint8_t len,
 int dhcp_option_parse(DHCPMessage *message, size_t len,
                       dhcp_option_cb_t cb, void *user_data);
 
-int dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid, uint8_t type,
-                      size_t optlen, size_t *optoffset);
+int dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid,
+                      uint8_t type, uint16_t arp_type, size_t optlen,
+                      size_t *optoffset);
 
 uint16_t dhcp_packet_checksum(uint8_t *buf, size_t len);
 
index 9d579177a433f709faecfd8dc26435262ff31ad9..29e9993f6662b92cad51faf67953737b8ba9cb29 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/socket.h>
 #include <string.h>
 #include <linux/if_packet.h>
+#include <linux/if_infiniband.h>
 #include <net/ethernet.h>
 #include <net/if_arp.h>
 #include <stdio.h>
 
 #include "dhcp-internal.h"
 
-int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
-                                 uint32_t xid) {
+static int _bind_raw_socket(int ifindex, union sockaddr_union *link,
+                            uint32_t xid, const uint8_t *mac_addr,
+                            size_t mac_addr_len,
+                            const uint8_t *bcast_addr,
+                            const struct ether_addr *eth_mac,
+                            uint16_t arp_type, uint8_t dhcp_hlen) {
         struct sock_filter filter[] = {
-            BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0),                                 /* A <- packet length */
-            BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(DHCPPacket), 1, 0),         /* packet >= DHCPPacket ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, ip.protocol)), /* A <- IP protocol */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 1, 0),                /* IP protocol == UDP ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(DHCPPacket, ip.frag_off)), /* A <- Flags + Fragment offset */
-            BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0x1fff),                           /* A <- A & 0x1fff */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0),                          /* A == 0 ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(DHCPPacket, udp.dest)),    /* A <- UDP destination port */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, DHCP_PORT_CLIENT, 1, 0),           /* UDP destination port == DHCP client port ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, dhcp.op)),     /* A <- DHCP op */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, BOOTREPLY, 1, 0),                  /* op == BOOTREPLY ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, dhcp.htype)),  /* A <- DHCP header type */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPHRD_ETHER, 1, 0),               /* header type == ARPHRD_ETHER ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, dhcp.hlen)),   /* A <- mac address length */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHER_ADDR_LEN, 1, 0),             /* address length == ETHER_ADDR_LEN ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.xid)),    /* A <- client identifier */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, xid, 1, 0),                        /* client identifier == xid ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            /* TODO: match chaddr */
-            BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.magic)),  /* A <- DHCP magic cookie */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, DHCP_MAGIC_COOKIE, 1, 0),          /* cookie == DHCP magic cookie ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            BPF_STMT(BPF_RET + BPF_K, 65535),                                      /* return all */
+                BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0),                                 /* A <- packet length */
+                BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(DHCPPacket), 1, 0),         /* packet >= DHCPPacket ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, ip.protocol)), /* A <- IP protocol */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 1, 0),                /* IP protocol == UDP ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, ip.frag_off)), /* A <- Flags */
+                BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0x20),                             /* A <- A & 0x20 (More Fragments bit) */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0),                          /* A == 0 ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(DHCPPacket, ip.frag_off)), /* A <- Flags + Fragment offset */
+                BPF_STMT(BPF_ALU + BPF_AND + BPF_K, 0x1fff),                           /* A <- A & 0x1fff (Fragment offset) */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0),                          /* A == 0 ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(DHCPPacket, udp.dest)),    /* A <- UDP destination port */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, DHCP_PORT_CLIENT, 1, 0),           /* UDP destination port == DHCP client port ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, dhcp.op)),     /* A <- DHCP op */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, BOOTREPLY, 1, 0),                  /* op == BOOTREPLY ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, dhcp.htype)),  /* A <- DHCP header type */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, arp_type, 1, 0),                   /* header type == arp_type ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, dhcp.hlen)),   /* A <- mac address length */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, dhcp_hlen, 1, 0),                  /* address length == dhcp_hlen ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.xid)),    /* A <- client identifier */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, xid, 1, 0),                        /* client identifier == xid ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_IMM, htobe32(*((unsigned int *) eth_mac))),                     /* A <- 4 bytes of client's MAC */
+                BPF_STMT(BPF_MISC + BPF_TAX, 0),                                                       /* X <- A */
+                BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.chaddr)),                 /* A <- 4 bytes of MAC from dhcp.chaddr */
+                BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0),                                                /* A xor X */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0),                                          /* A == 0 ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_IMM, htobe16(*((unsigned short *) (((char *) eth_mac) + 4)))),   /* A <- remainder of client's MAC */
+                BPF_STMT(BPF_MISC + BPF_TAX, 0),                                                       /* X <- A */
+                BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(DHCPPacket, dhcp.chaddr) + 4),             /* A <- remainder of MAC from dhcp.chaddr */
+                BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0),                                                /* A xor X */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0),                                          /* A == 0 ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                                          /* ignore */
+                BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.magic)),  /* A <- DHCP magic cookie */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, DHCP_MAGIC_COOKIE, 1, 0),          /* cookie == DHCP magic cookie ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
+                BPF_STMT(BPF_RET + BPF_K, 65535),                                      /* return all */
         };
         struct sock_fprog fprog = {
-            .len = ELEMENTSOF(filter),
-            .filter = filter
+                .len = ELEMENTSOF(filter),
+                .filter = filter
         };
         _cleanup_close_ int s = -1;
         int r, on = 1;
 
-        assert(index > 0);
+        assert(ifindex > 0);
         assert(link);
 
         s = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
         if (s < 0)
                 return -errno;
 
-        r = setsockopt (s, SOL_PACKET, PACKET_AUXDATA, &on, sizeof(on));
+        r = setsockopt(s, SOL_PACKET, PACKET_AUXDATA, &on, sizeof(on));
         if (r < 0)
                 return -errno;
 
@@ -90,9 +110,10 @@ int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
 
         link->ll.sll_family = AF_PACKET;
         link->ll.sll_protocol = htons(ETH_P_IP);
-        link->ll.sll_ifindex =  index;
-        link->ll.sll_halen = ETH_ALEN;
-        memset(link->ll.sll_addr, 0xff, ETH_ALEN);
+        link->ll.sll_ifindex = ifindex;
+        link->ll.sll_hatype = htons(arp_type);
+        link->ll.sll_halen = mac_addr_len;
+        memcpy(link->ll.sll_addr, bcast_addr, mac_addr_len);
 
         r = bind(s, &link->sa, sizeof(link->ll));
         if (r < 0)
@@ -104,6 +125,37 @@ int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
         return r;
 }
 
+int dhcp_network_bind_raw_socket(int ifindex, union sockaddr_union *link,
+                                 uint32_t xid, const uint8_t *mac_addr,
+                                 size_t mac_addr_len, uint16_t arp_type) {
+        static const uint8_t eth_bcast[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+        /* Default broadcast address for IPoIB */
+        static const uint8_t ib_bcast[] = {
+                0x00, 0xff, 0xff, 0xff, 0xff, 0x12, 0x40, 0x1b,
+                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                0xff, 0xff, 0xff, 0xff
+          };
+        struct ether_addr eth_mac = { { 0, 0, 0, 0, 0, 0 } };
+        const uint8_t *bcast_addr = NULL;
+        uint8_t dhcp_hlen = 0;
+
+        assert_return(mac_addr_len > 0, -EINVAL);
+
+        if (arp_type == ARPHRD_ETHER) {
+                assert_return(mac_addr_len == ETH_ALEN, -EINVAL);
+                memcpy(&eth_mac, mac_addr, ETH_ALEN);
+                bcast_addr = eth_bcast;
+                dhcp_hlen = ETH_ALEN;
+        } else if (arp_type == ARPHRD_INFINIBAND) {
+                assert_return(mac_addr_len == INFINIBAND_ALEN, -EINVAL);
+                bcast_addr = ib_bcast;
+        } else
+                return -EINVAL;
+
+        return _bind_raw_socket(ifindex, link, xid, mac_addr, mac_addr_len,
+                                bcast_addr, &eth_mac, arp_type, dhcp_hlen);
+}
+
 int dhcp_network_bind_udp_socket(be32_t address, uint16_t port) {
         union sockaddr_union src = {
                 .in.sin_family = AF_INET,
@@ -111,7 +163,7 @@ int dhcp_network_bind_udp_socket(be32_t address, uint16_t port) {
                 .in.sin_addr.s_addr = address,
         };
         _cleanup_close_ int s = -1;
-        int r, tos = IPTOS_CLASS_CS6;
+        int r, on = 1, tos = IPTOS_CLASS_CS6;
 
         s = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
         if (s < 0)
@@ -121,13 +173,11 @@ int dhcp_network_bind_udp_socket(be32_t address, uint16_t port) {
         if (r < 0)
                 return -errno;
 
-        if (address == INADDR_ANY) {
-                int on = 1;
-
-                r = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
-                if (r < 0)
-                        return -errno;
+        r = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
+        if (r < 0)
+                return -errno;
 
+        if (address == INADDR_ANY) {
                 r = setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
                 if (r < 0)
                         return -errno;
@@ -135,6 +185,10 @@ int dhcp_network_bind_udp_socket(be32_t address, uint16_t port) {
                 r = setsockopt(s, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
                 if (r < 0)
                         return -errno;
+        } else {
+                r = setsockopt(s, IPPROTO_IP, IP_FREEBIND, &on, sizeof(on));
+                if (r < 0)
+                        return -errno;
         }
 
         r = bind(s, &src.sa, sizeof(src.in));
index 9f850fdebbf79835d9a5e751bfe3b8d4ceb6167f..7581daeeeb355ae4c53b46fca85e77b2dd837abd 100644 (file)
 #define DHCP_CLIENT_MIN_OPTIONS_SIZE            312
 
 int dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid,
-                      uint8_t type, size_t optlen, size_t *optoffset) {
+                      uint8_t type, uint16_t arp_type, size_t optlen,
+                      size_t *optoffset) {
         size_t offset = 0;
         int r;
 
         assert(op == BOOTREQUEST || op == BOOTREPLY);
+        assert(arp_type == ARPHRD_ETHER || arp_type == ARPHRD_INFINIBAND);
 
         message->op = op;
-        message->htype = ARPHRD_ETHER;
-        message->hlen = ETHER_ADDR_LEN;
+        message->htype = arp_type;
+        message->hlen = (arp_type == ARPHRD_ETHER) ? ETHER_ADDR_LEN : 0;
         message->xid = htobe32(xid);
         message->magic = htobe32(DHCP_MAGIC_COOKIE);
 
index 8cbd98e4ecef9c2a2f13ef5edc75a6cbf5aec4f8..abca9422c5c1281d3f4f53b1326c7c786c88a287 100644 (file)
@@ -60,7 +60,8 @@ typedef struct DHCPPacket DHCPPacket;
 #define DHCP_IP_SIZE            (int32_t)(sizeof(struct iphdr))
 #define DHCP_IP_UDP_SIZE        (int32_t)(sizeof(struct udphdr) + DHCP_IP_SIZE)
 #define DHCP_MESSAGE_SIZE       (int32_t)(sizeof(DHCPMessage))
-#define DHCP_MIN_OPTIONS_SIZE   308 /* spec says 312, but that includes the magic cookie */
+#define DHCP_DEFAULT_MIN_SIZE   576 /* the minimum internet hosts must be able to receive */
+#define DHCP_MIN_OPTIONS_SIZE   DHCP_DEFAULT_MIN_SIZE - DHCP_IP_UDP_SIZE - DHCP_MESSAGE_SIZE
 #define DHCP_MAGIC_COOKIE       (uint32_t)(0x63825363)
 
 enum {
@@ -95,6 +96,8 @@ enum {
         DHCP_ACK                                = 5,
         DHCP_NAK                                = 6,
         DHCP_RELEASE                            = 7,
+        DHCP_INFORM                             = 8,
+        DHCP_FORCERENEW                         = 9,
 };
 
 enum {
@@ -131,6 +134,7 @@ enum {
         DHCP_OPTION_MAXIMUM_MESSAGE_SIZE        = 57,
         DHCP_OPTION_RENEWAL_T1_TIME             = 58,
         DHCP_OPTION_REBINDING_T2_TIME           = 59,
+        DHCP_OPTION_VENDOR_CLASS_IDENTIFIER     = 60,
         DHCP_OPTION_CLIENT_IDENTIFIER           = 61,
         DHCP_OPTION_CLASSLESS_STATIC_ROUTE      = 121,
         DHCP_OPTION_END                         = 255,
index 7fe7253fdb083caac113bf5d4c474f7c71f49070..480da22c016764e56639fc596f7ce2358da7099f 100644 (file)
@@ -39,6 +39,8 @@ typedef struct DHCPLease {
         DHCPClientId client_id;
 
         be32_t address;
+        be32_t gateway;
+        uint8_t chaddr[16];
         usec_t expiration;
 } DHCPLease;
 
@@ -53,6 +55,7 @@ struct sd_dhcp_server {
 
         int index;
         be32_t address;
+        be32_t netmask;
         be32_t pool_start;
         size_t pool_size;
         size_t next_offer;
index 94e3a5d4087ebe08a4e3a7f345408a12cf25e10c..6cc0aa8a8d0c24c945d276a165a3e3d6b2c821d6 100644 (file)
@@ -38,7 +38,7 @@ struct DHCP6Address {
                 struct in6_addr address;
                 be32_t lifetime_preferred;
                 be32_t lifetime_valid;
-        } _packed_;
+        } iaaddr _packed_;
 };
 
 struct DHCP6IA {
index e9b382c17070c1266d213e11fe084703b3c68fcd..e6a31778f47a7c3e68ddf1b3f5e74d3bb9e1ad12 100644 (file)
@@ -32,7 +32,6 @@
 #define DHCP6_OPTION_HDR_LEN                    4
 #define DHCP6_OPTION_IA_NA_LEN                  12
 #define DHCP6_OPTION_IA_TA_LEN                  4
-#define DHCP6_OPTION_IAADDR_LEN                 24
 
 static int option_append_hdr(uint8_t **buf, size_t *buflen, uint16_t optcode,
                              size_t optlen) {
@@ -111,16 +110,16 @@ int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, DHCP6IA *ia) {
 
         LIST_FOREACH(addresses, addr, ia->addresses) {
                 r = option_append_hdr(buf, buflen, DHCP6_OPTION_IAADDR,
-                                      DHCP6_OPTION_IAADDR_LEN);
+                                      sizeof(addr->iaaddr));
                 if (r < 0)
                         return r;
 
-                memcpy(*buf, &addr->address, DHCP6_OPTION_IAADDR_LEN);
+                memcpy(*buf, &addr->iaaddr, sizeof(addr->iaaddr));
 
-                *buf += DHCP6_OPTION_IAADDR_LEN;
-                *buflen -= DHCP6_OPTION_IAADDR_LEN;
+                *buf += sizeof(addr->iaaddr);
+                *buflen -= sizeof(addr->iaaddr);
 
-                ia_addrlen += DHCP6_OPTION_HDR_LEN + DHCP6_OPTION_IAADDR_LEN;
+                ia_addrlen += DHCP6_OPTION_HDR_LEN + sizeof(addr->iaaddr);
         }
 
         r = option_append_hdr(&ia_hdr, &ia_buflen, ia->type, len + ia_addrlen);
@@ -192,7 +191,7 @@ int dhcp6_option_parse_ia(uint8_t **buf, size_t *buflen, uint16_t iatype,
         case DHCP6_OPTION_IA_NA:
 
                 if (*buflen < DHCP6_OPTION_IA_NA_LEN + DHCP6_OPTION_HDR_LEN +
-                    DHCP6_OPTION_IAADDR_LEN) {
+                    sizeof(addr->iaaddr)) {
                         r = -ENOBUFS;
                         goto error;
                 }
@@ -214,7 +213,7 @@ int dhcp6_option_parse_ia(uint8_t **buf, size_t *buflen, uint16_t iatype,
 
         case DHCP6_OPTION_IA_TA:
                 if (*buflen < DHCP6_OPTION_IA_TA_LEN + DHCP6_OPTION_HDR_LEN +
-                    DHCP6_OPTION_IAADDR_LEN) {
+                    sizeof(addr->iaaddr)) {
                         r = -ENOBUFS;
                         goto error;
                 }
@@ -250,10 +249,10 @@ int dhcp6_option_parse_ia(uint8_t **buf, size_t *buflen, uint16_t iatype,
 
                         LIST_INIT(addresses, addr);
 
-                        memcpy(&addr->address, *buf, DHCP6_OPTION_IAADDR_LEN);
+                        memcpy(&addr->iaaddr, *buf, sizeof(addr->iaaddr));
 
-                        lt_valid = be32toh(addr->lifetime_valid);
-                        lt_pref = be32toh(addr->lifetime_valid);
+                        lt_valid = be32toh(addr->iaaddr.lifetime_valid);
+                        lt_pref = be32toh(addr->iaaddr.lifetime_valid);
 
                         if (!lt_valid || lt_pref > lt_valid) {
                                 log_dhcp6_client(client, "IA preferred %ds > valid %ds",
index e9ae598b7ad311613dc25fa8a3ade305a0ba29db..eaa671711f2e4a9d71f7052efbf14f7df80f17e0 100644 (file)
@@ -71,7 +71,6 @@ enum {
 
 enum DHCP6State {
         DHCP6_STATE_STOPPED                     = 0,
-        DHCP6_STATE_RS                          = 1,
         DHCP6_STATE_SOLICITATION                = 2,
         DHCP6_STATE_REQUEST                     = 3,
         DHCP6_STATE_BOUND                       = 4,
index 0852f42c3a8291cb11b88af894b7fce3099dba04..93ffed408f3e0ec35444d1f8152ca3f5cef67b1f 100644 (file)
@@ -37,32 +37,33 @@ int arp_network_send_raw_socket(int fd, const union sockaddr_union *link,
         return 0;
 }
 
-int arp_network_bind_raw_socket(int index, union sockaddr_union *link) {
-        struct sock_filter filter[] = {
-            BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0),                                         /* A <- packet length */
-            BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ether_arp), 1, 0),           /* packet >= arp packet ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
-            BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_hrd)), /* A <- header */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPHRD_ETHER, 1, 0),                       /* header == ethernet ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
-            BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_pro)), /* A <- protocol */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0),                       /* protocol == IP ? */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
-            BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_op)),  /* A <- operation */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REQUEST, 0, 1),                      /* protocol == request ? */
-            BPF_STMT(BPF_RET + BPF_K, 65535),                                              /* return all */
-            BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 0, 1),                        /* protocol == reply ? */
-            BPF_STMT(BPF_RET + BPF_K, 65535),                                              /* return all */
-            BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
+int arp_network_bind_raw_socket(int ifindex, union sockaddr_union *link) {
+
+        static const struct sock_filter filter[] = {
+                BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0),                                         /* A <- packet length */
+                BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ether_arp), 1, 0),           /* packet >= arp packet ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
+                BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_hrd)), /* A <- header */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPHRD_ETHER, 1, 0),                       /* header == ethernet ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
+                BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_pro)), /* A <- protocol */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0),                       /* protocol == IP ? */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
+                BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_op)),  /* A <- operation */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REQUEST, 0, 1),                      /* protocol == request ? */
+                BPF_STMT(BPF_RET + BPF_K, 65535),                                              /* return all */
+                BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 0, 1),                        /* protocol == reply ? */
+                BPF_STMT(BPF_RET + BPF_K, 65535),                                              /* return all */
+                BPF_STMT(BPF_RET + BPF_K, 0),                                                  /* ignore */
         };
         struct sock_fprog fprog = {
-            .len = ELEMENTSOF(filter),
-            .filter = filter
+                .len = ELEMENTSOF(filter),
+                .filter = (struct sock_filter*) filter
         };
         _cleanup_close_ int s = -1;
         int r;
 
-        assert(index > 0);
+        assert(ifindex > 0);
         assert(link);
 
         s = socket(PF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
@@ -75,7 +76,7 @@ int arp_network_bind_raw_socket(int index, union sockaddr_union *link) {
 
         link->ll.sll_family = AF_PACKET;
         link->ll.sll_protocol = htons(ETH_P_ARP);
-        link->ll.sll_ifindex = index;
+        link->ll.sll_ifindex = ifindex;
         link->ll.sll_halen = ETH_ALEN;
         memset(link->ll.sll_addr, 0xff, ETH_ALEN);
 
index 7a7a4eac9d505cb0605b6c9f64e16cbfe8a10a0c..372f3ed371e0279413ba7f963b066ec06b2efc68 100644 (file)
 #include "strv.h"
 #include "siphash24.h"
 #include "libudev-private.h"
-#include "network-internal.h"
 #include "dhcp-lease-internal.h"
 #include "log.h"
 #include "utf8.h"
 #include "util.h"
 #include "conf-parser.h"
 #include "condition.h"
+#include "network-internal.h"
 
 const char *net_get_name(struct udev_device *device) {
-        const char *name = NULL, *field = NULL;
+        const char *name, *field;
 
         assert(device);
 
         /* fetch some persistent data unique (on this machine) to this device */
-        FOREACH_STRING(field, "ID_NET_NAME_ONBOARD", "ID_NET_NAME_SLOT",
-                       "ID_NET_NAME_PATH", "ID_NET_NAME_MAC") {
+        FOREACH_STRING(field, "ID_NET_NAME_ONBOARD", "ID_NET_NAME_SLOT", "ID_NET_NAME_PATH", "ID_NET_NAME_MAC") {
                 name = udev_device_get_property_value(device, field);
                 if (name)
-                        break;
+                        return name;
         }
 
-        return name;
+        return NULL;
 }
 
 #define HASH_KEY SD_ID128_MAKE(d3,1e,48,fa,90,fe,4b,4c,9d,af,d5,d7,a1,b1,2e,8a)
@@ -133,12 +132,6 @@ bool net_match_config(const struct ether_addr *match_mac,
         return 1;
 }
 
-unsigned net_netmask_to_prefixlen(const struct in_addr *addr) {
-        assert(addr);
-
-        return 32 - u32ctz(be32toh(addr->s_addr));
-}
-
 int config_parse_net_condition(const char *unit,
                                const char *filename,
                                unsigned line,
@@ -206,7 +199,6 @@ int config_parse_ifname(const char *unit,
         if (!ascii_is_valid(n) || strlen(n) >= IFNAMSIZ) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
                            "Interface name is not ASCII clean or is too long, ignoring assignment: %s", rvalue);
-                free(n);
                 return 0;
         }
 
@@ -304,66 +296,25 @@ int config_parse_hwaddr(const char *unit,
         return 0;
 }
 
-int net_parse_inaddr(const char *address, unsigned char *family, void *dst) {
-        int r;
-
-        assert(address);
-        assert(family);
-        assert(dst);
-
-        /* IPv4 */
-        r = inet_pton(AF_INET, address, dst);
-        if (r > 0) {
-                /* succsefully parsed IPv4 address */
-                if (*family == AF_UNSPEC)
-                        *family = AF_INET;
-                else if (*family != AF_INET)
-                        return -EINVAL;
-        } else  if (r < 0)
-                return -errno;
-        else {
-                /* not an IPv4 address, so let's try IPv6 */
-                r = inet_pton(AF_INET6, address, dst);
-                if (r > 0) {
-                        /* successfully parsed IPv6 address */
-                        if (*family == AF_UNSPEC)
-                                *family = AF_INET6;
-                        else if (*family != AF_INET6)
-                                return -EINVAL;
-                } else if (r < 0)
-                        return -errno;
-                else
-                        return -EINVAL;
-        }
-
-        return 0;
-}
-
-void serialize_in_addrs(FILE *f, const char *key, struct in_addr *addresses, size_t size) {
+void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size) {
         unsigned i;
 
         assert(f);
-        assert(key);
         assert(addresses);
         assert(size);
 
-        fprintf(f, "%s=", key);
-
         for (i = 0; i < size; i++)
                 fprintf(f, "%s%s", inet_ntoa(addresses[i]),
                         (i < (size - 1)) ? " ": "");
-
-        fputs("\n", f);
 }
 
-int deserialize_in_addrs(struct in_addr **ret, size_t *ret_size, const char *string) {
+int deserialize_in_addrs(struct in_addr **ret, const char *string) {
         _cleanup_free_ struct in_addr *addresses = NULL;
-        size_t size = 0;
-        char *word, *state;
+        int size = 0;
+        const char *word, *state;
         size_t len;
 
         assert(ret);
-        assert(ret_size);
         assert(string);
 
         FOREACH_WORD(word, len, string, state) {
@@ -388,21 +339,19 @@ int deserialize_in_addrs(struct in_addr **ret, size_t *ret_size, const char *str
                 size ++;
         }
 
-        *ret_size = size;
         *ret = addresses;
         addresses = NULL;
 
-        return 0;
+        return size;
 }
 
-int deserialize_in6_addrs(struct in6_addr **ret, size_t *ret_size, const char *string) {
+int deserialize_in6_addrs(struct in6_addr **ret, const char *string) {
         _cleanup_free_ struct in6_addr *addresses = NULL;
-        size_t size = 0;
-        char *word, *state;
+        int size = 0;
+        const char *word, *state;
         size_t len;
 
         assert(ret);
-        assert(ret_size);
         assert(string);
 
         FOREACH_WORD(word, len, string, state) {
@@ -427,11 +376,10 @@ int deserialize_in6_addrs(struct in6_addr **ret, size_t *ret_size, const char *s
                 size++;
         }
 
-        *ret_size = size;
         *ret = addresses;
         addresses = NULL;
 
-        return 0;
+        return size;
 }
 
 void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route *routes, size_t size) {
@@ -455,7 +403,7 @@ void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route *route
 int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t *ret_allocated, const char *string) {
         _cleanup_free_ struct sd_dhcp_route *routes = NULL;
         size_t size = 0, allocated = 0;
-        char *word, *state;
+        const char *word, *state;
         size_t len;
 
         assert(ret);
index 4bde14641e368ef88376a62e3eab898b8f9cd277..49387d03cf379bee8ca138940b6fde69df59cfa5 100644 (file)
@@ -1,5 +1,7 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
+#pragma once
+
 /***
  This file is part of systemd.
 
@@ -19,8 +21,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#pragma once
-
 #include <netinet/ether.h>
 #include <netinet/in.h>
 #include <stdbool.h>
@@ -44,8 +44,6 @@ bool net_match_config(const struct ether_addr *match_mac,
                       const char *dev_type,
                       const char *dev_name);
 
-unsigned net_netmask_to_prefixlen(const struct in_addr *netmask);
-
 int config_parse_net_condition(const char *unit, const char *filename, unsigned line,
                                const char *section, unsigned section_line, const char *lvalue,
                                int ltype, const char *rvalue, void *data, void *userdata);
@@ -62,15 +60,12 @@ int config_parse_ifalias(const char *unit, const char *filename, unsigned line,
                          const char *section, unsigned section_line, const char *lvalue,
                          int ltype, const char *rvalue, void *data, void *userdata);
 
-int net_parse_inaddr(const char *address, unsigned char *family, void *dst);
-
 int net_get_unique_predictable_data(struct udev_device *device, uint8_t result[8]);
 const char *net_get_name(struct udev_device *device);
 
-void serialize_in_addrs(FILE *f, const char *key, struct in_addr *addresses, size_t size);
-int deserialize_in_addrs(struct in_addr **addresses, size_t *size, const char *string);
-int deserialize_in6_addrs(struct in6_addr **addresses, size_t *size, const char *string);
-
+void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size);
+int deserialize_in_addrs(struct in_addr **addresses, const char *string);
+int deserialize_in6_addrs(struct in6_addr **addresses, const char *string);
 
 /* don't include "dhcp-lease-internal.h" as it causes conflicts between netinet/ip.h and linux/ip.h */
 struct sd_dhcp_route;
index d8a9d20e4c9ed9cda262d8dbaf132c5fd92fddbe..0eba4c379d890c44b574575a09440bcac8e75ed9 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <net/ethernet.h>
 #include <net/if_arp.h>
+#include <linux/if_infiniband.h>
 #include <netinet/ether.h>
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -37,6 +38,8 @@
 #include "dhcp-lease-internal.h"
 #include "sd-dhcp-client.h"
 
+#define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
+
 struct sd_dhcp_client {
         RefCount n_ref;
 
@@ -48,6 +51,7 @@ struct sd_dhcp_client {
         int fd;
         union sockaddr_union link;
         sd_event_source *receive_message;
+        bool request_broadcast;
         uint8_t *req_opts;
         size_t req_opts_allocated;
         size_t req_opts_size;
@@ -56,7 +60,12 @@ struct sd_dhcp_client {
                 uint8_t type;
                 struct ether_addr mac_addr;
         } _packed_ client_id;
+        uint8_t mac_addr[MAX_MAC_ADDR_LEN];
+        size_t mac_addr_len;
+        uint16_t arp_type;
         char *hostname;
+        char *vendor_class_identifier;
+        uint32_t mtu;
         uint32_t xid;
         usec_t start_time;
         uint16_t secs;
@@ -95,6 +104,14 @@ int sd_dhcp_client_set_callback(sd_dhcp_client *client, sd_dhcp_client_cb_t cb,
         return 0;
 }
 
+int sd_dhcp_client_set_request_broadcast(sd_dhcp_client *client, int broadcast) {
+        assert_return(client, -EINVAL);
+
+        client->request_broadcast = !!broadcast;
+
+        return 0;
+}
+
 int sd_dhcp_client_set_request_option(sd_dhcp_client *client, uint8_t option) {
         size_t i;
 
@@ -152,15 +169,25 @@ int sd_dhcp_client_set_index(sd_dhcp_client *client, int interface_index) {
         return 0;
 }
 
-int sd_dhcp_client_set_mac(sd_dhcp_client *client,
-                           const struct ether_addr *addr) {
+int sd_dhcp_client_set_mac(sd_dhcp_client *client, const uint8_t *addr,
+                           size_t addr_len, uint16_t arp_type) {
         DHCP_CLIENT_DONT_DESTROY(client);
         bool need_restart = false;
 
         assert_return(client, -EINVAL);
         assert_return(addr, -EINVAL);
+        assert_return(addr_len > 0 && addr_len <= MAX_MAC_ADDR_LEN, -EINVAL);
+        assert_return(arp_type > 0, -EINVAL);
 
-        if (memcmp(&client->client_id.mac_addr, addr, ETH_ALEN) == 0)
+        if (arp_type == ARPHRD_ETHER)
+                assert_return(addr_len == ETH_ALEN, -EINVAL);
+        else if (arp_type == ARPHRD_INFINIBAND)
+                assert_return(addr_len == INFINIBAND_ALEN, -EINVAL);
+        else
+                return -EINVAL;
+
+        if (client->mac_addr_len == addr_len &&
+            memcmp(&client->mac_addr, addr, addr_len) == 0)
                 return 0;
 
         if (!IN_SET(client->state, DHCP_STATE_INIT, DHCP_STATE_STOPPED)) {
@@ -170,6 +197,10 @@ int sd_dhcp_client_set_mac(sd_dhcp_client *client,
                 client_stop(client, DHCP_EVENT_STOP);
         }
 
+        memcpy(&client->mac_addr, addr, addr_len);
+        client->mac_addr_len = addr_len;
+        client->arp_type = arp_type;
+
         memcpy(&client->client_id.mac_addr, addr, ETH_ALEN);
         client->client_id.type = 0x01;
 
@@ -200,6 +231,32 @@ int sd_dhcp_client_set_hostname(sd_dhcp_client *client,
         return 0;
 }
 
+int sd_dhcp_client_set_vendor_class_identifier(sd_dhcp_client *client,
+                                               const char *vci) {
+        char *new_vci = NULL;
+
+        assert_return(client, -EINVAL);
+
+        new_vci = strdup(vci);
+        if (!new_vci)
+                return -ENOMEM;
+
+        free(client->vendor_class_identifier);
+
+        client->vendor_class_identifier = new_vci;
+
+        return 0;
+}
+
+int sd_dhcp_client_set_mtu(sd_dhcp_client *client, uint32_t mtu) {
+        assert_return(client, -EINVAL);
+        assert_return(mtu >= DHCP_DEFAULT_MIN_SIZE, -ERANGE);
+
+        client->mtu = mtu;
+
+        return 0;
+}
+
 int sd_dhcp_client_get_lease(sd_dhcp_client *client, sd_dhcp_lease **ret) {
         assert_return(client, -EINVAL);
         assert_return(ret, -EINVAL);
@@ -249,19 +306,10 @@ static void client_stop(sd_dhcp_client *client, int error) {
 
         if (error < 0)
                 log_dhcp_client(client, "STOPPED: %s", strerror(-error));
-        else {
-                switch(error) {
-                case DHCP_EVENT_STOP:
-                        log_dhcp_client(client, "STOPPED");
-                        break;
-                case DHCP_EVENT_NO_LEASE:
-                        log_dhcp_client(client, "STOPPED: No lease");
-                        break;
-                default:
-                        log_dhcp_client(client, "STOPPED: Unknown reason");
-                        break;
-                }
-        }
+        else if (error == DHCP_EVENT_STOP)
+                log_dhcp_client(client, "STOPPED");
+        else
+                log_dhcp_client(client, "STOPPED: Unknown event");
 
         client_notify(client, error);
 
@@ -290,7 +338,7 @@ static int client_message_init(sd_dhcp_client *client, DHCPPacket **ret,
                 return -ENOMEM;
 
         r = dhcp_message_init(&packet->dhcp, BOOTREQUEST, client->xid, type,
-                              optlen, &optoffset);
+                              client->arp_type, optlen, &optoffset);
         if (r < 0)
                 return r;
 
@@ -304,14 +352,22 @@ static int client_message_init(sd_dhcp_client *client, DHCPPacket **ret,
            BROADCAST bit in the 'flags' field to 1 in any DHCPDISCOVER or
            DHCPREQUEST messages that client sends.  The BROADCAST bit will
            provide a hint to the DHCP server and BOOTP relay agent to broadcast
-           any messages to the client on the client's subnet. */
-        packet->dhcp.flags = htobe16(0x8000);
+           any messages to the client on the client's subnet.
+
+           Note: some interfaces needs this to be enabled, but some networks
+           needs this to be disabled as broadcasts are filteretd, so this
+           needs to be configurable */
+        if (client->request_broadcast || client->arp_type != ARPHRD_ETHER)
+                packet->dhcp.flags = htobe16(0x8000);
 
         /* RFC2132 section 4.1.1:
            The client MUST include its hardware address in the ’chaddr’ field, if
-           necessary for delivery of DHCP reply messages.
+           necessary for delivery of DHCP reply messages.  Non-Ethernet
+           interfaces will leave 'chaddr' empty and use the client identifier
+           instead (eg, RFC 4390 section 2.1).
          */
-        memcpy(&packet->dhcp.chaddr, &client->client_id.mac_addr, ETH_ALEN);
+        if (client->arp_type == ARPHRD_ETHER)
+                memcpy(&packet->dhcp.chaddr, &client->mac_addr, ETH_ALEN);
 
         /* Some DHCP servers will refuse to issue an DHCP lease if the Client
            Identifier option is not set */
@@ -343,9 +399,23 @@ static int client_message_init(sd_dhcp_client *client, DHCPPacket **ret,
            Note (from ConnMan): Some DHCP servers will send bigger DHCP packets
            than the defined default size unless the Maximum Messge Size option
            is explicitely set
+
+           RFC3442 "Requirements to Avoid Sizing Constraints":
+           Because a full routing table can be quite large, the standard 576
+           octet maximum size for a DHCP message may be too short to contain
+           some legitimate Classless Static Route options.  Because of this,
+           clients implementing the Classless Static Route option SHOULD send a
+           Maximum DHCP Message Size [4] option if the DHCP client's TCP/IP
+           stack is capable of receiving larger IP datagrams.  In this case, the
+           client SHOULD set the value of this option to at least the MTU of the
+           interface that the client is configuring.  The client MAY set the
+           value of this option higher, up to the size of the largest UDP packet
+           it is prepared to accept.  (Note that the value specified in the
+           Maximum DHCP Message Size option is the total maximum packet size,
+           including IP and UDP headers.)
          */
         max_size = htobe16(size);
-        r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0,
+        r = dhcp_option_append(&packet->dhcp, client->mtu, &optoffset, 0,
                                DHCP_OPTION_MAXIMUM_MESSAGE_SIZE,
                                2, &max_size);
         if (r < 0)
@@ -380,7 +450,7 @@ static int client_send_discover(sd_dhcp_client *client) {
 
         /* See RFC2131 section 4.4.1 */
 
-        r = sd_event_now(client->event, CLOCK_MONOTONIC, &time_now);
+        r = sd_event_now(client->event, clock_boottime_or_monotonic(), &time_now);
         if (r < 0)
                 return r;
         assert(time_now >= client->start_time);
@@ -419,6 +489,15 @@ static int client_send_discover(sd_dhcp_client *client) {
                         return r;
         }
 
+        if (client->vendor_class_identifier) {
+                r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0,
+                                       DHCP_OPTION_VENDOR_CLASS_IDENTIFIER,
+                                       strlen(client->vendor_class_identifier),
+                                       client->vendor_class_identifier);
+                if (r < 0)
+                        return r;
+        }
+
         r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0,
                                DHCP_OPTION_END, 0, NULL);
         if (r < 0)
@@ -571,7 +650,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
         assert(client);
         assert(client->event);
 
-        r = sd_event_now(client->event, CLOCK_MONOTONIC, &time_now);
+        r = sd_event_now(client->event, clock_boottime_or_monotonic(), &time_now);
         if (r < 0)
                 goto error;
 
@@ -633,7 +712,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
 
         r = sd_event_add_time(client->event,
                               &client->timeout_resend,
-                              CLOCK_MONOTONIC,
+                              clock_boottime_or_monotonic(),
                               next_timeout, 10 * USEC_PER_MSEC,
                               client_timeout_resend, client);
         if (r < 0)
@@ -644,6 +723,11 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
         if (r < 0)
                 goto error;
 
+        r = sd_event_source_set_name(client->timeout_resend,
+                                     "dhcp4-resend-timer");
+        if (r < 0)
+                goto error;
+
         switch (client->state) {
         case DHCP_STATE_INIT:
                 r = client_send_discover(client);
@@ -699,8 +783,8 @@ error:
         return 0;
 }
 
-static int client_initialize_events(sd_dhcp_client *client,
-                                    sd_event_io_handler_t io_callback) {
+static int client_initialize_io_events(sd_dhcp_client *client,
+                                       sd_event_io_handler_t io_callback) {
         int r;
 
         assert(client);
@@ -717,11 +801,29 @@ static int client_initialize_events(sd_dhcp_client *client,
         if (r < 0)
                 goto error;
 
+        r = sd_event_source_set_name(client->receive_message,
+                                     "dhcp4-receive-message");
+        if (r < 0)
+                goto error;
+
+error:
+        if (r < 0)
+                client_stop(client, r);
+
+        return 0;
+}
+
+static int client_initialize_time_events(sd_dhcp_client *client) {
+        int r;
+
+        assert(client);
+        assert(client->event);
+
         client->timeout_resend = sd_event_source_unref(client->timeout_resend);
 
         r = sd_event_add_time(client->event,
                               &client->timeout_resend,
-                              CLOCK_MONOTONIC,
+                              clock_boottime_or_monotonic(),
                               0, 0,
                               client_timeout_resend, client);
         if (r < 0)
@@ -730,6 +832,11 @@ static int client_initialize_events(sd_dhcp_client *client,
         r = sd_event_source_set_priority(client->timeout_resend,
                                          client->event_priority);
 
+        r = sd_event_source_set_name(client->timeout_resend,
+                                     "dhcp4-resend-timer");
+        if (r < 0)
+                goto error;
+
 error:
         if (r < 0)
                 client_stop(client, r);
@@ -738,6 +845,14 @@ error:
 
 }
 
+static int client_initialize_events(sd_dhcp_client *client,
+                                    sd_event_io_handler_t io_callback) {
+        client_initialize_io_events(client, io_callback);
+        client_initialize_time_events(client);
+
+        return 0;
+}
+
 static int client_start(sd_dhcp_client *client) {
         int r;
 
@@ -751,7 +866,9 @@ static int client_start(sd_dhcp_client *client) {
 
         client->xid = random_u32();
 
-        r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid);
+        r = dhcp_network_bind_raw_socket(client->index, &client->link,
+                                         client->xid, client->mac_addr,
+                                         client->mac_addr_len, client->arp_type);
         if (r < 0) {
                 client_stop(client, r);
                 return r;
@@ -759,7 +876,7 @@ static int client_start(sd_dhcp_client *client) {
         client->fd = r;
 
         if (client->state == DHCP_STATE_INIT) {
-                client->start_time = now(CLOCK_MONOTONIC);
+                client->start_time = now(clock_boottime_or_monotonic());
                 client->secs = 0;
         }
 
@@ -795,7 +912,9 @@ static int client_timeout_t2(sd_event_source *s, uint64_t usec, void *userdata)
         client->state = DHCP_STATE_REBINDING;
         client->attempt = 1;
 
-        r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid);
+        r = dhcp_network_bind_raw_socket(client->index, &client->link,
+                                         client->xid, client->mac_addr,
+                                         client->mac_addr_len, client->arp_type);
         if (r < 0) {
                 client_stop(client, r);
                 return 0;
@@ -809,21 +928,11 @@ static int client_timeout_t1(sd_event_source *s, uint64_t usec,
                              void *userdata) {
         sd_dhcp_client *client = userdata;
         DHCP_CLIENT_DONT_DESTROY(client);
-        int r;
 
         client->state = DHCP_STATE_RENEWING;
         client->attempt = 1;
 
-        r = dhcp_network_bind_udp_socket(client->lease->address,
-                                         DHCP_PORT_CLIENT);
-        if (r < 0) {
-                log_dhcp_client(client, "could not bind UDP socket");
-                return 0;
-        }
-
-        client->fd = r;
-
-        return client_initialize_events(client, client_receive_message_udp);
+        return client_initialize_time_events(client);
 }
 
 static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer,
@@ -837,7 +946,7 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer,
 
         r = dhcp_option_parse(offer, len, dhcp_lease_parse_options, lease);
         if (r != DHCP_OFFER) {
-                log_dhcp_client(client, "receieved message was not an OFFER, ignoring");
+                log_dhcp_client(client, "received message was not an OFFER, ignoring");
                 return -ENOMSG;
         }
 
@@ -848,7 +957,7 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer,
         if (lease->address == INADDR_ANY ||
             lease->server_address == INADDR_ANY ||
             lease->lifetime == 0) {
-                log_dhcp_client(client, "receieved lease lacks address, server "
+                log_dhcp_client(client, "received lease lacks address, server "
                                 "address or lease lifetime, ignoring");
                 return -ENOMSG;
         }
@@ -856,7 +965,7 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer,
         if (lease->subnet_mask == INADDR_ANY) {
                 r = dhcp_lease_set_default_subnet_mask(lease);
                 if (r < 0) {
-                        log_dhcp_client(client, "receieved lease lacks subnet "
+                        log_dhcp_client(client, "received lease lacks subnet "
                                         "mask, and a fallback one can not be "
                                         "generated, ignoring");
                         return -ENOMSG;
@@ -872,6 +981,19 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer,
         return 0;
 }
 
+static int client_handle_forcerenew(sd_dhcp_client *client, DHCPMessage *force,
+                                    size_t len) {
+        int r;
+
+        r = dhcp_option_parse(force, len, NULL, NULL);
+        if (r != DHCP_FORCERENEW)
+                return -ENOMSG;
+
+        log_dhcp_client(client, "FORCERENEW");
+
+        return 0;
+}
+
 static int client_handle_ack(sd_dhcp_client *client, DHCPMessage *ack,
                              size_t len) {
         _cleanup_dhcp_lease_unref_ sd_dhcp_lease *lease = NULL;
@@ -884,11 +1006,11 @@ static int client_handle_ack(sd_dhcp_client *client, DHCPMessage *ack,
         r = dhcp_option_parse(ack, len, dhcp_lease_parse_options, lease);
         if (r == DHCP_NAK) {
                 log_dhcp_client(client, "NAK");
-                return DHCP_EVENT_NO_LEASE;
+                return -EADDRNOTAVAIL;
         }
 
         if (r != DHCP_ACK) {
-                log_dhcp_client(client, "receieved message was not an ACK, ignoring");
+                log_dhcp_client(client, "received message was not an ACK, ignoring");
                 return -ENOMSG;
         }
 
@@ -899,7 +1021,7 @@ static int client_handle_ack(sd_dhcp_client *client, DHCPMessage *ack,
         if (lease->address == INADDR_ANY ||
             lease->server_address == INADDR_ANY ||
             lease->lifetime == 0) {
-                log_dhcp_client(client, "receieved lease lacks address, server "
+                log_dhcp_client(client, "received lease lacks address, server "
                                 "address or lease lifetime, ignoring");
                 return -ENOMSG;
         }
@@ -907,7 +1029,7 @@ static int client_handle_ack(sd_dhcp_client *client, DHCPMessage *ack,
         if (lease->subnet_mask == INADDR_ANY) {
                 r = dhcp_lease_set_default_subnet_mask(lease);
                 if (r < 0) {
-                        log_dhcp_client(client, "receieved lease lacks subnet "
+                        log_dhcp_client(client, "received lease lacks subnet "
                                         "mask, and a fallback one can not be "
                                         "generated, ignoring");
                         return -ENOMSG;
@@ -965,7 +1087,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
         if (client->lease->lifetime == 0xffffffff)
                 return 0;
 
-        r = sd_event_now(client->event, CLOCK_MONOTONIC, &time_now);
+        r = sd_event_now(client->event, clock_boottime_or_monotonic(), &time_now);
         if (r < 0)
                 return r;
         assert(client->request_sent <= time_now);
@@ -1016,7 +1138,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
 
         /* arm lifetime timeout */
         r = sd_event_add_time(client->event, &client->timeout_expire,
-                              CLOCK_MONOTONIC,
+                              clock_boottime_or_monotonic(),
                               lifetime_timeout, 10 * USEC_PER_MSEC,
                               client_timeout_expire, client);
         if (r < 0)
@@ -1027,6 +1149,11 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
         if (r < 0)
                 return r;
 
+        r = sd_event_source_set_name(client->timeout_expire,
+                                     "dhcp4-lifetime");
+        if (r < 0)
+                return r;
+
         log_dhcp_client(client, "lease expires in %s",
                         format_timespan(time_string, FORMAT_TIMESPAN_MAX,
                         lifetime_timeout - time_now, 0));
@@ -1038,7 +1165,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
         /* arm T2 timeout */
         r = sd_event_add_time(client->event,
                               &client->timeout_t2,
-                              CLOCK_MONOTONIC,
+                              clock_boottime_or_monotonic(),
                               t2_timeout,
                               10 * USEC_PER_MSEC,
                               client_timeout_t2, client);
@@ -1050,6 +1177,11 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
         if (r < 0)
                 return r;
 
+        r = sd_event_source_set_name(client->timeout_t2,
+                                     "dhcp4-t2-timeout");
+        if (r < 0)
+                return r;
+
         log_dhcp_client(client, "T2 expires in %s",
                         format_timespan(time_string, FORMAT_TIMESPAN_MAX,
                         t2_timeout - time_now, 0));
@@ -1061,7 +1193,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
         /* arm T1 timeout */
         r = sd_event_add_time(client->event,
                               &client->timeout_t1,
-                              CLOCK_MONOTONIC,
+                              clock_boottime_or_monotonic(),
                               t1_timeout, 10 * USEC_PER_MSEC,
                               client_timeout_t1, client);
         if (r < 0)
@@ -1072,6 +1204,11 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
         if (r < 0)
                 return r;
 
+        r = sd_event_source_set_name(client->timeout_t1,
+                                     "dhcp4-t1-timer");
+        if (r < 0)
+                return r;
+
         log_dhcp_client(client, "T1 expires in %s",
                         format_timespan(time_string, FORMAT_TIMESPAN_MAX,
                         t1_timeout - time_now, 0));
@@ -1088,35 +1225,6 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
         assert(client->event);
         assert(message);
 
-        if (be32toh(message->magic) != DHCP_MAGIC_COOKIE) {
-                log_dhcp_client(client, "not a DHCP message: ignoring");
-                return 0;
-        }
-
-        if (message->op != BOOTREPLY) {
-                log_dhcp_client(client, "not a BOOTREPLY message: ignoring");
-                return 0;
-        }
-
-        if (be32toh(message->xid) != client->xid) {
-                log_dhcp_client(client, "received xid (%u) does not match "
-                                "expected (%u): ignoring",
-                                be32toh(message->xid), client->xid);
-                return 0;
-        }
-
-        if (message->htype != ARPHRD_ETHER || message->hlen != ETHER_ADDR_LEN) {
-                log_dhcp_client(client, "not an ethernet packet");
-                return 0;
-        }
-
-        if (memcmp(&message->chaddr[0], &client->client_id.mac_addr,
-                   ETH_ALEN)) {
-                log_dhcp_client(client, "received chaddr does not match "
-                                "expected: ignoring");
-                return 0;
-        }
-
         switch (client->state) {
         case DHCP_STATE_SELECTING:
 
@@ -1131,7 +1239,7 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
 
                         r = sd_event_add_time(client->event,
                                               &client->timeout_resend,
-                                              CLOCK_MONOTONIC,
+                                              clock_boottime_or_monotonic(),
                                               0, 0,
                                               client_timeout_resend, client);
                         if (r < 0)
@@ -1141,6 +1249,11 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
                                                          client->event_priority);
                         if (r < 0)
                                 goto error;
+
+                        r = sd_event_source_set_name(client->timeout_resend,
+                                                     "dhcp4-resend-timer");
+                        if (r < 0)
+                                goto error;
                 } else if (r == -ENOMSG)
                         /* invalid message, let's ignore it */
                         return 0;
@@ -1153,25 +1266,7 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
         case DHCP_STATE_REBINDING:
 
                 r = client_handle_ack(client, message, len);
-                if (r == DHCP_EVENT_NO_LEASE) {
-
-                        client->timeout_resend =
-                                sd_event_source_unref(client->timeout_resend);
-
-                        if (client->state == DHCP_STATE_REBOOTING) {
-                                r = client_initialize(client);
-                                if (r < 0)
-                                        goto error;
-
-                                r = client_start(client);
-                                if (r < 0)
-                                        goto error;
-
-                                log_dhcp_client(client, "REBOOTED");
-                        }
-
-                        goto error;
-                } else if (r >= 0) {
+                if (r >= 0) {
                         client->timeout_resend =
                                 sd_event_source_unref(client->timeout_resend);
 
@@ -1190,15 +1285,51 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
                         if (r < 0)
                                 goto error;
 
+                        r = dhcp_network_bind_udp_socket(client->lease->address,
+                                                         DHCP_PORT_CLIENT);
+                        if (r < 0) {
+                                log_dhcp_client(client, "could not bind UDP socket");
+                                goto error;
+                        }
+
+                        client->fd = r;
+
+                        client_initialize_io_events(client, client_receive_message_udp);
+
                         if (notify_event) {
                                 client_notify(client, notify_event);
                                 if (client->state == DHCP_STATE_STOPPED)
                                         return 0;
                         }
 
-                        client->receive_message =
-                                sd_event_source_unref(client->receive_message);
-                        client->fd = asynchronous_close(client->fd);
+                } else if (r == -EADDRNOTAVAIL) {
+                        /* got a NAK, let's restart the client */
+                        client->timeout_resend =
+                                sd_event_source_unref(client->timeout_resend);
+
+                        r = client_initialize(client);
+                        if (r < 0)
+                                goto error;
+
+                        r = client_start(client);
+                        if (r < 0)
+                                goto error;
+
+                        log_dhcp_client(client, "REBOOTED");
+
+                        return 0;
+                } else if (r == -ENOMSG)
+                        /* invalid message, let's ignore it */
+                        return 0;
+
+                break;
+
+        case DHCP_STATE_BOUND:
+                r = client_handle_forcerenew(client, message, len);
+                if (r >= 0) {
+                        r = client_timeout_t1(NULL, 0, client);
+                        if (r < 0)
+                                goto error;
                 } else if (r == -ENOMSG)
                         /* invalid message, let's ignore it */
                         return 0;
@@ -1207,7 +1338,6 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
 
         case DHCP_STATE_INIT:
         case DHCP_STATE_INIT_REBOOT:
-        case DHCP_STATE_BOUND:
 
                 break;
 
@@ -1217,7 +1347,7 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
         }
 
 error:
-        if (r < 0 || r == DHCP_EVENT_NO_LEASE)
+        if (r < 0)
                 client_stop(client, r);
 
         return r;
@@ -1228,6 +1358,9 @@ static int client_receive_message_udp(sd_event_source *s, int fd,
         sd_dhcp_client *client = userdata;
         _cleanup_free_ DHCPMessage *message = NULL;
         int buflen = 0, len, r;
+        const struct ether_addr zero_mac = { { 0, 0, 0, 0, 0, 0 } };
+        const struct ether_addr *expected_chaddr = NULL;
+        uint8_t expected_hlen = 0;
 
         assert(s);
         assert(client);
@@ -1249,8 +1382,55 @@ static int client_receive_message_udp(sd_event_source *s, int fd,
                 log_dhcp_client(client, "could not receive message from UDP "
                                 "socket: %m");
                 return 0;
-        } else if ((size_t)len < sizeof(DHCPMessage))
+        } else if ((size_t)len < sizeof(DHCPMessage)) {
+                log_dhcp_client(client, "too small to be a DHCP message: ignoring");
+                return 0;
+        }
+
+        if (be32toh(message->magic) != DHCP_MAGIC_COOKIE) {
+                log_dhcp_client(client, "not a DHCP message: ignoring");
+                return 0;
+        }
+
+        if (message->op != BOOTREPLY) {
+                log_dhcp_client(client, "not a BOOTREPLY message: ignoring");
+                return 0;
+        }
+
+        if (message->htype != client->arp_type) {
+                log_dhcp_client(client, "packet type does not match client type");
+                return 0;
+        }
+
+        if (client->arp_type == ARPHRD_ETHER) {
+                expected_hlen = ETH_ALEN;
+                expected_chaddr = (const struct ether_addr *) &client->mac_addr;
+        } else {
+               /* Non-ethernet links expect zero chaddr */
+               expected_hlen = 0;
+               expected_chaddr = &zero_mac;
+        }
+
+        if (message->hlen != expected_hlen) {
+                log_dhcp_client(client, "unexpected packet hlen %d", message->hlen);
+                return 0;
+        }
+
+        if (memcmp(&message->chaddr[0], expected_chaddr, ETH_ALEN)) {
+                log_dhcp_client(client, "received chaddr does not match "
+                                "expected: ignoring");
+                return 0;
+        }
+
+        if (client->state != DHCP_STATE_BOUND &&
+            be32toh(message->xid) != client->xid) {
+                /* in BOUND state, we may receive FORCERENEW with xid set by server,
+                   so ignore the xid in this case */
+                log_dhcp_client(client, "received xid (%u) does not match "
+                                "expected (%u): ignoring",
+                                be32toh(message->xid), client->xid);
                 return 0;
+        }
 
         return client_handle_message(client, message, len);
 }
@@ -1331,9 +1511,7 @@ int sd_dhcp_client_start(sd_dhcp_client *client) {
 
         r = client_start(client);
         if (r >= 0)
-                log_dhcp_client(client, "STARTED on ifindex %u with address %s",
-                                client->index,
-                                ether_ntoa(&client->client_id.mac_addr));
+                log_dhcp_client(client, "STARTED on ifindex %u", client->index);
 
         return r;
 }
@@ -1406,6 +1584,7 @@ sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client) {
 
                 free(client->req_opts);
                 free(client->hostname);
+                free(client->vendor_class_identifier);
                 free(client);
         }
 
@@ -1426,6 +1605,7 @@ int sd_dhcp_client_new(sd_dhcp_client **ret) {
         client->index = -1;
         client->fd = -1;
         client->attempt = 1;
+        client->mtu = DHCP_DEFAULT_MIN_SIZE;
 
         client->req_opts_size = ELEMENTSOF(default_req_opts);
 
index 20a95f6de62b443bbe985a61b26c95dd6f34c616..4fb01c07299b2cab631134ca79a13e64cda9a65c 100644 (file)
@@ -30,6 +30,7 @@
 #include "list.h"
 #include "mkdir.h"
 #include "fileio.h"
+#include "in-addr-util.h"
 
 #include "dhcp-protocol.h"
 #include "dhcp-internal.h"
@@ -68,28 +69,26 @@ int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu) {
         return 0;
 }
 
-int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size) {
+int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr) {
         assert_return(lease, -EINVAL);
         assert_return(addr, -EINVAL);
-        assert_return(addr_size, -EINVAL);
 
         if (lease->dns_size) {
-                *addr_size = lease->dns_size;
                 *addr = lease->dns;
+                return lease->dns_size;
         } else
                 return -ENOENT;
 
         return 0;
 }
 
-int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size) {
+int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr) {
         assert_return(lease, -EINVAL);
         assert_return(addr, -EINVAL);
-        assert_return(addr_size, -EINVAL);
 
         if (lease->ntp_size) {
-                *addr_size = lease->ntp_size;
                 *addr = lease->ntp;
+                return lease->ntp_size;
         } else
                 return -ENOENT;
 
@@ -171,16 +170,14 @@ int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr) {
         return 0;
 }
 
-int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, struct sd_dhcp_route **routes,
-        size_t *routes_size) {
+int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, struct sd_dhcp_route **routes) {
 
         assert_return(lease, -EINVAL);
         assert_return(routes, -EINVAL);
-        assert_return(routes_size, -EINVAL);
 
         if (lease->static_route_size) {
                 *routes = lease->static_route;
-                *routes_size = lease->static_route_size;
+                return lease->static_route_size;
         } else
                 return -ENOENT;
 
@@ -517,19 +514,39 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option,
                 break;
 
         case DHCP_OPTION_DOMAIN_NAME:
-                r = lease_parse_string(option, len, &lease->domainname);
+        {
+                _cleanup_free_ char *domainname = NULL;
+
+                r = lease_parse_string(option, len, &domainname);
                 if (r < 0)
                         return r;
 
-                break;
+                if (!hostname_is_valid(domainname) || is_localhost(domainname))
+                        break;
 
+                free(lease->domainname);
+                lease->domainname = domainname;
+                domainname = NULL;
+
+                break;
+        }
         case DHCP_OPTION_HOST_NAME:
-                r = lease_parse_string(option, len, &lease->hostname);
+        {
+                _cleanup_free_ char *hostname = NULL;
+
+                r = lease_parse_string(option, len, &hostname);
                 if (r < 0)
                         return r;
 
-                break;
+                if (!hostname_is_valid(hostname) || is_localhost(hostname))
+                        break;
+
+                free(lease->hostname);
+                lease->hostname = hostname;
+                hostname = NULL;
 
+                break;
+        }
         case DHCP_OPTION_ROOT_PATH:
                 r = lease_parse_string(option, len, &lease->root_path);
                 if (r < 0)
@@ -587,12 +604,10 @@ int dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) {
         _cleanup_free_ char *temp_path = NULL;
         _cleanup_fclose_ FILE *f = NULL;
         struct in_addr address;
-        struct in_addr *addresses;
-        size_t addresses_size;
+        const struct in_addr *addresses;
         const char *string;
         uint16_t mtu;
         struct sd_dhcp_route *routes;
-        size_t routes_size;
         int r;
 
         assert(lease);
@@ -635,13 +650,17 @@ int dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) {
         if (r >= 0)
                 fprintf(f, "MTU=%" PRIu16 "\n", mtu);
 
-        r = sd_dhcp_lease_get_dns(lease, &addresses, &addresses_size);
+        fputs("DNS=", f);
+        r = sd_dhcp_lease_get_dns(lease, &addresses);
         if (r >= 0)
-                serialize_in_addrs(f, "DNS", addresses, addresses_size);
+                serialize_in_addrs(f, addresses, r);
+        fputs("\n", f);
 
-        r = sd_dhcp_lease_get_ntp(lease, &addresses, &addresses_size);
+        fputs("NTP=", f);
+        r = sd_dhcp_lease_get_ntp(lease, &addresses);
         if (r >= 0)
-                serialize_in_addrs(f, "NTP", addresses, addresses_size);
+                serialize_in_addrs(f, addresses, r);
+        fputs("\n", f);
 
         r = sd_dhcp_lease_get_domainname(lease, &string);
         if (r >= 0)
@@ -655,9 +674,9 @@ int dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) {
         if (r >= 0)
                 fprintf(f, "ROOT_PATH=%s\n", string);
 
-        r = sd_dhcp_lease_get_routes(lease, &routes, &routes_size);
+        r = sd_dhcp_lease_get_routes(lease, &routes);
         if (r >= 0)
-                serialize_dhcp_routes(f, "ROUTES", routes, routes_size);
+                serialize_dhcp_routes(f, "ROUTES", routes, r);
 
         r = 0;
 
@@ -750,15 +769,19 @@ int dhcp_lease_load(const char *lease_file, sd_dhcp_lease **ret) {
         }
 
         if (dns) {
-                r = deserialize_in_addrs(&lease->dns, &lease->dns_size, dns);
+                r = deserialize_in_addrs(&lease->dns, dns);
                 if (r < 0)
                         return r;
+
+                lease->dns_size = r;
         }
 
         if (ntp) {
-                r = deserialize_in_addrs(&lease->ntp, &lease->ntp_size, dns);
+                r = deserialize_in_addrs(&lease->ntp, ntp);
                 if (r < 0)
                         return r;
+
+                lease->ntp_size = r;
         }
 
         if (mtu) {
@@ -781,27 +804,20 @@ int dhcp_lease_load(const char *lease_file, sd_dhcp_lease **ret) {
 }
 
 int dhcp_lease_set_default_subnet_mask(sd_dhcp_lease *lease) {
-        uint32_t address;
+        struct in_addr address;
+        struct in_addr mask;
+        int r;
 
         assert(lease);
-        assert(lease->address != INADDR_ANY);
 
-        address = be32toh(lease->address);
+        address.s_addr = lease->address;
 
         /* fall back to the default subnet masks based on address class */
+        r = in_addr_default_subnet_mask(&address, &mask);
+        if (r < 0)
+                return r;
 
-        if ((address >> 31) == 0x0)
-                /* class A, leading bits: 0 */
-                lease->subnet_mask = htobe32(0xff000000);
-        else if ((address >> 30) == 0x2)
-                /* class B, leading bits 10 */
-                lease->subnet_mask = htobe32(0xffff0000);
-        else if ((address >> 29) == 0x6)
-                /* class C, leading bits 110 */
-                lease->subnet_mask = htobe32(0xffffff00);
-        else
-                /* class D or E, no default mask. give up */
-                return -ERANGE;
+        lease->subnet_mask = mask.s_addr;
 
         return 0;
 }
index 5c32fdfffa9053c3d239cfd6ed506c5acd3ce271..24fedd2375a2cbc3f08a15d44105a15c29d13b86 100644 (file)
@@ -31,7 +31,8 @@
 
 #define DHCP_DEFAULT_LEASE_TIME         3600 /* one hour */
 
-int sd_dhcp_server_set_lease_pool(sd_dhcp_server *server, struct in_addr *address,
+int sd_dhcp_server_set_lease_pool(sd_dhcp_server *server,
+                                  struct in_addr *address,
                                   size_t size) {
         assert_return(server, -EINVAL);
         assert_return(address, -EINVAL);
@@ -51,13 +52,17 @@ int sd_dhcp_server_set_lease_pool(sd_dhcp_server *server, struct in_addr *addres
         return 0;
 }
 
-int sd_dhcp_server_set_address(sd_dhcp_server *server, struct in_addr *address) {
+int sd_dhcp_server_set_address(sd_dhcp_server *server, struct in_addr *address,
+                               unsigned char prefixlen) {
         assert_return(server, -EINVAL);
         assert_return(address, -EINVAL);
         assert_return(address->s_addr, -EINVAL);
+        assert_return(prefixlen <= 32, -ERANGE);
         assert_return(server->address == htobe32(INADDR_ANY), -EBUSY);
+        assert_return(server->netmask == htobe32(INADDR_ANY), -EBUSY);
 
         server->address = address->s_addr;
+        server->netmask = htobe32(0xfffffffflu << (32 - prefixlen));
 
         return 0;
 }
@@ -75,7 +80,8 @@ sd_dhcp_server *sd_dhcp_server_ref(sd_dhcp_server *server) {
         return server;
 }
 
-unsigned long client_id_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
+unsigned long client_id_hash_func(const void *p,
+                                  const uint8_t hash_key[HASH_KEY_SIZE]) {
         uint64_t u;
         const DHCPClientId *id = p;
 
@@ -103,6 +109,11 @@ int client_id_compare_func(const void *_a, const void *_b) {
         return memcmp(a->data, b->data, a->length);
 }
 
+static const struct hash_ops client_id_hash_ops = {
+        .hash = client_id_hash_func,
+        .compare = client_id_compare_func
+};
+
 static void dhcp_lease_free(DHCPLease *lease) {
         if (!lease)
                 return;
@@ -150,8 +161,9 @@ int sd_dhcp_server_new(sd_dhcp_server **ret, int ifindex) {
         server->fd_raw = -1;
         server->fd = -1;
         server->address = htobe32(INADDR_ANY);
+        server->netmask = htobe32(INADDR_ANY);
         server->index = ifindex;
-        server->leases_by_client_id = hashmap_new(client_id_hash_func, client_id_compare_func);
+        server->leases_by_client_id = hashmap_new(&client_id_hash_ops);
 
         *ret = server;
         server = NULL;
@@ -159,7 +171,8 @@ int sd_dhcp_server_new(sd_dhcp_server **ret, int ifindex) {
         return 0;
 }
 
-int sd_dhcp_server_attach_event(sd_dhcp_server *server, sd_event *event, int priority) {
+int sd_dhcp_server_attach_event(sd_dhcp_server *server, sd_event *event,
+                                int priority) {
         int r;
 
         assert_return(server, -EINVAL);
@@ -206,8 +219,8 @@ int sd_dhcp_server_stop(sd_dhcp_server *server) {
         return 0;
 }
 
-static int dhcp_server_send_unicast_raw(sd_dhcp_server *server, DHCPPacket *packet,
-                                        size_t len) {
+static int dhcp_server_send_unicast_raw(sd_dhcp_server *server,
+                                        DHCPPacket *packet, size_t len) {
         union sockaddr_union link = {
                 .ll.sll_family = AF_PACKET,
                 .ll.sll_protocol = htons(ETH_P_IP),
@@ -225,7 +238,8 @@ static int dhcp_server_send_unicast_raw(sd_dhcp_server *server, DHCPPacket *pack
         memcpy(&link.ll.sll_addr, &packet->dhcp.chaddr, ETH_ALEN);
 
         dhcp_packet_append_ip_headers(packet, server->address, DHCP_PORT_SERVER,
-                                      packet->dhcp.yiaddr, DHCP_PORT_CLIENT, len);
+                                      packet->dhcp.yiaddr,
+                                      DHCP_PORT_CLIENT, len);
 
         r = dhcp_network_send_raw_socket(server->fd_raw, &link, packet, len);
         if (r < 0)
@@ -350,19 +364,22 @@ int dhcp_server_send_packet(sd_dhcp_server *server,
                 return dhcp_server_send_udp(server, destination, &packet->dhcp,
                                             sizeof(DHCPMessage) + optoffset);
         else if (requested_broadcast(req) || type == DHCP_NAK)
-                return dhcp_server_send_udp(server, INADDR_BROADCAST, &packet->dhcp,
+                return dhcp_server_send_udp(server, INADDR_BROADCAST,
+                                            &packet->dhcp,
                                             sizeof(DHCPMessage) + optoffset);
         else
-                /* we cannot send UDP packet to specific MAC address when the address is
-                   not yet configured, so must fall back to raw packets */
+                /* we cannot send UDP packet to specific MAC address when the
+                   address is not yet configured, so must fall back to raw
+                   packets */
                 return dhcp_server_send_unicast_raw(server, packet,
                                                     sizeof(DHCPPacket) + optoffset);
 }
 
 static int server_message_init(sd_dhcp_server *server, DHCPPacket **ret,
-                               uint8_t type, size_t *_optoffset, DHCPRequest *req) {
+                               uint8_t type, size_t *_optoffset,
+                               DHCPRequest *req) {
         _cleanup_free_ DHCPPacket *packet = NULL;
-        size_t optoffset;
+        size_t optoffset = 0;
         int r;
 
         assert(server);
@@ -374,8 +391,9 @@ static int server_message_init(sd_dhcp_server *server, DHCPPacket **ret,
         if (!packet)
                 return -ENOMEM;
 
-        r = dhcp_message_init(&packet->dhcp, BOOTREPLY, be32toh(req->message->xid),
-                              type, req->max_optlen, &optoffset);
+        r = dhcp_message_init(&packet->dhcp, BOOTREPLY,
+                              be32toh(req->message->xid), type, ARPHRD_ETHER,
+                              req->max_optlen, &optoffset);
         if (r < 0)
                 return r;
 
@@ -390,7 +408,8 @@ static int server_message_init(sd_dhcp_server *server, DHCPPacket **ret,
         return 0;
 }
 
-static int server_send_offer(sd_dhcp_server *server, DHCPRequest *req, be32_t address) {
+static int server_send_offer(sd_dhcp_server *server, DHCPRequest *req,
+                             be32_t address) {
         _cleanup_free_ DHCPPacket *packet = NULL;
         size_t offset;
         be32_t lease_time;
@@ -404,7 +423,18 @@ static int server_send_offer(sd_dhcp_server *server, DHCPRequest *req, be32_t ad
 
         lease_time = htobe32(req->lifetime);
         r = dhcp_option_append(&packet->dhcp, req->max_optlen, &offset, 0,
-                               DHCP_OPTION_IP_ADDRESS_LEASE_TIME, 4, &lease_time);
+                               DHCP_OPTION_IP_ADDRESS_LEASE_TIME, 4,
+                               &lease_time);
+        if (r < 0)
+                return r;
+
+        r = dhcp_option_append(&packet->dhcp, req->max_optlen, &offset, 0,
+                               DHCP_OPTION_SUBNET_MASK, 4, &server->netmask);
+        if (r < 0)
+                return r;
+
+        r = dhcp_option_append(&packet->dhcp, req->max_optlen, &offset, 0,
+                               DHCP_OPTION_ROUTER, 4, &server->address);
         if (r < 0)
                 return r;
 
@@ -415,7 +445,8 @@ static int server_send_offer(sd_dhcp_server *server, DHCPRequest *req, be32_t ad
         return 0;
 }
 
-static int server_send_ack(sd_dhcp_server *server, DHCPRequest *req, be32_t address) {
+static int server_send_ack(sd_dhcp_server *server, DHCPRequest *req,
+                           be32_t address) {
         _cleanup_free_ DHCPPacket *packet = NULL;
         size_t offset;
         be32_t lease_time;
@@ -429,7 +460,18 @@ static int server_send_ack(sd_dhcp_server *server, DHCPRequest *req, be32_t addr
 
         lease_time = htobe32(req->lifetime);
         r = dhcp_option_append(&packet->dhcp, req->max_optlen, &offset, 0,
-                               DHCP_OPTION_IP_ADDRESS_LEASE_TIME, 4, &lease_time);
+                               DHCP_OPTION_IP_ADDRESS_LEASE_TIME, 4,
+                               &lease_time);
+        if (r < 0)
+                return r;
+
+        r = dhcp_option_append(&packet->dhcp, req->max_optlen, &offset, 0,
+                               DHCP_OPTION_SUBNET_MASK, 4, &server->netmask);
+        if (r < 0)
+                return r;
+
+        r = dhcp_option_append(&packet->dhcp, req->max_optlen, &offset, 0,
+                               DHCP_OPTION_ROUTER, 4, &server->address);
         if (r < 0)
                 return r;
 
@@ -456,6 +498,41 @@ static int server_send_nak(sd_dhcp_server *server, DHCPRequest *req) {
         return 0;
 }
 
+static int server_send_forcerenew(sd_dhcp_server *server, be32_t address,
+                                  be32_t gateway, uint8_t chaddr[]) {
+        _cleanup_free_ DHCPPacket *packet = NULL;
+        size_t optoffset = 0;
+        int r;
+
+        assert(server);
+        assert(address != INADDR_ANY);
+        assert(chaddr);
+
+        packet = malloc0(sizeof(DHCPPacket) + DHCP_MIN_OPTIONS_SIZE);
+        if (!packet)
+                return -ENOMEM;
+
+        r = dhcp_message_init(&packet->dhcp, BOOTREPLY, 0,
+                              DHCP_FORCERENEW, ARPHRD_ETHER,
+                              DHCP_MIN_OPTIONS_SIZE, &optoffset);
+        if (r < 0)
+                return r;
+
+        r = dhcp_option_append(&packet->dhcp, DHCP_MIN_OPTIONS_SIZE,
+                               &optoffset, 0, DHCP_OPTION_END, 0, NULL);
+        if (r < 0)
+                return r;
+
+        memcpy(&packet->dhcp.chaddr, chaddr, ETH_ALEN);
+
+        r = dhcp_server_send_udp(server, address, &packet->dhcp,
+                                 sizeof(DHCPMessage) + optoffset);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
 static int parse_request(uint8_t code, uint8_t len, const uint8_t *option,
                          void *user_data) {
         DHCPRequest *req = user_data;
@@ -520,7 +597,8 @@ static int ensure_sane_request(DHCPRequest *req, DHCPMessage *message) {
 
         req->message = message;
 
-        /* set client id based on mac address if client did not send an explicit one */
+        /* set client id based on mac address if client did not send an explicit
+           one */
         if (!req->client_id.data) {
                 uint8_t *data;
 
@@ -584,7 +662,8 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message,
                 /* this only fails on critical errors */
                 return r;
 
-        existing_lease = hashmap_get(server->leases_by_client_id, &req->client_id);
+        existing_lease = hashmap_get(server->leases_by_client_id,
+                                     &req->client_id);
 
         switch(type) {
         case DHCP_DISCOVER:
@@ -709,12 +788,17 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message,
                                         return -ENOMEM;
                                 }
                                 lease->client_id.length = req->client_id.length;
+                                memcpy(&lease->chaddr, &req->message->chaddr,
+                                       ETH_ALEN);
+                                lease->gateway = req->message->giaddr;
                         } else
                                 lease = existing_lease;
 
-                        r = sd_event_now(server->event, CLOCK_MONOTONIC, &time_now);
+                        r = sd_event_now(server->event,
+                                         clock_boottime_or_monotonic(),
+                                         &time_now);
                         if (r < 0)
-                                time_now = now(CLOCK_MONOTONIC);
+                                time_now = now(clock_boottime_or_monotonic());
                         lease->expiration = req->lifetime * USEC_PER_SEC + time_now;
 
                         r = server_send_ack(server, req, address);
@@ -732,7 +816,8 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message,
                                                 be32toh(req->message->xid));
 
                                 server->bound_leases[pool_offset] = lease;
-                                hashmap_put(server->leases_by_client_id, &lease->client_id, lease);
+                                hashmap_put(server->leases_by_client_id,
+                                            &lease->client_id, lease);
 
                                 return DHCP_ACK;
                         }
@@ -824,7 +909,8 @@ static int server_receive_message(sd_event_source *s, int fd,
                     cmsg->cmsg_len == CMSG_LEN(sizeof(struct in_pktinfo))) {
                         struct in_pktinfo *info = (struct in_pktinfo*)CMSG_DATA(cmsg);
 
-                        /* TODO figure out if this can be done as a filter on the socket, like for IPv6 */
+                        /* TODO figure out if this can be done as a filter on
+                         * the socket, like for IPv6 */
                         if (server->index != info->ipi_ifindex)
                                 return 0;
 
@@ -879,3 +965,28 @@ int sd_dhcp_server_start(sd_dhcp_server *server) {
 
         return 0;
 }
+
+int sd_dhcp_server_forcerenew(sd_dhcp_server *server) {
+        unsigned i;
+        int r = 0;
+
+        assert_return(server, -EINVAL);
+        assert(server->bound_leases);
+
+        for (i = 0; i < server->pool_size; i++) {
+                DHCPLease *lease = server->bound_leases[i];
+
+                if (!lease)
+                        continue;
+
+                r = server_send_forcerenew(server, lease->address,
+                                           lease->gateway,
+                                           lease->chaddr);
+                if (r < 0)
+                        return r;
+                else
+                        log_dhcp_server(server, "FORCERENEW");
+        }
+
+        return r;
+}
index 8fdbbfe3201e62d4da0b4f37fc8884feb4f39798..fa4f9b5dc2c79572cd094d076dcdf1970c08a672 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include <linux/if_infiniband.h>
 
 #include "udev.h"
 #include "udev-util.h"
 #define SYSTEMD_PEN 43793
 #define HASH_KEY SD_ID128_MAKE(80,11,8c,c2,fe,4a,03,ee,3e,d6,0c,6f,36,39,14,09)
 
+/* RFC 3315 section 9.1:
+ *      A DUID can be no more than 128 octets long (not including the type code).
+ */
+#define MAX_DUID_LEN 128
+
+#define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
+
 struct sd_dhcp6_client {
         RefCount n_ref;
 
@@ -46,9 +54,12 @@ struct sd_dhcp6_client {
         sd_event *event;
         int event_priority;
         int index;
-        struct ether_addr mac_addr;
+        uint8_t mac_addr[MAX_MAC_ADDR_LEN];
+        size_t mac_addr_len;
+        uint16_t arp_type;
         DHCP6IA ia_na;
         be32_t transaction_id;
+        usec_t transaction_start;
         struct sd_dhcp6_lease *lease;
         int fd;
         be16_t *req_opts;
@@ -61,12 +72,33 @@ struct sd_dhcp6_client {
         sd_event_source *timeout_resend_expire;
         sd_dhcp6_client_cb_t cb;
         void *userdata;
-
-        struct duid_en {
-                uint16_t type; /* DHCP6_DUID_EN */
-                uint32_t pen;
-                uint8_t id[8];
-        } _packed_ duid;
+        union {
+                struct {
+                        uint16_t type; /* DHCP6_DUID_LLT */
+                        uint16_t htype;
+                        uint32_t time;
+                        uint8_t haddr[0];
+                } _packed_ llt;
+                struct {
+                        uint16_t type; /* DHCP6_DUID_EN */
+                        uint32_t pen;
+                        uint8_t id[8];
+                } _packed_ en;
+                struct {
+                        uint16_t type; /* DHCP6_DUID_LL */
+                        uint16_t htype;
+                        uint8_t haddr[0];
+                } _packed_ ll;
+                struct {
+                        uint16_t type; /* DHCP6_DUID_UUID */
+                        sd_id128_t uuid;
+                } _packed_ uuid;
+                struct {
+                        uint16_t type;
+                        uint8_t data[MAX_DUID_LEN];
+                } _packed_ raw;
+        } duid;
+        size_t duid_len;
 };
 
 static const uint16_t default_req_opts[] = {
@@ -133,15 +165,64 @@ int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index)
         return 0;
 }
 
-int sd_dhcp6_client_set_mac(sd_dhcp6_client *client,
-                            const struct ether_addr *mac_addr)
+int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr,
+                            size_t addr_len, uint16_t arp_type)
 {
         assert_return(client, -EINVAL);
-
-        if (mac_addr)
-                memcpy(&client->mac_addr, mac_addr, sizeof(client->mac_addr));
+        assert_return(addr, -EINVAL);
+        assert_return(addr_len > 0 && addr_len <= MAX_MAC_ADDR_LEN, -EINVAL);
+        assert_return(arp_type > 0, -EINVAL);
+
+        if (arp_type == ARPHRD_ETHER)
+                assert_return(addr_len == ETH_ALEN, -EINVAL);
+        else if (arp_type == ARPHRD_INFINIBAND)
+                assert_return(addr_len == INFINIBAND_ALEN, -EINVAL);
         else
-                memset(&client->mac_addr, 0x00, sizeof(client->mac_addr));
+                return -EINVAL;
+
+        if (client->mac_addr_len == addr_len &&
+            memcmp(&client->mac_addr, addr, addr_len) == 0)
+                return 0;
+
+        memcpy(&client->mac_addr, addr, addr_len);
+        client->mac_addr_len = addr_len;
+        client->arp_type = arp_type;
+
+        return 0;
+}
+
+int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *duid,
+                             size_t duid_len)
+{
+        assert_return(client, -EINVAL);
+        assert_return(duid, -EINVAL);
+        assert_return(duid_len > 0 && duid_len <= MAX_DUID_LEN, -EINVAL);
+
+        switch (type) {
+        case DHCP6_DUID_LLT:
+                if (duid_len <= sizeof(client->duid.llt))
+                        return -EINVAL;
+                break;
+        case DHCP6_DUID_EN:
+                if (duid_len != sizeof(client->duid.en))
+                        return -EINVAL;
+                break;
+        case DHCP6_DUID_LL:
+                if (duid_len <= sizeof(client->duid.ll))
+                        return -EINVAL;
+                break;
+        case DHCP6_DUID_UUID:
+                if (duid_len != sizeof(client->duid.uuid))
+                        return -EINVAL;
+                break;
+        default:
+                /* accept unknown type in order to be forward compatible */
+                break;
+        }
+
+        client->duid.raw.type = htobe16(type);
+        memcpy(&client->duid.raw.data, duid, duid_len);
+        client->duid_len = duid_len;
 
         return 0;
 }
@@ -203,6 +284,7 @@ static int client_reset(sd_dhcp6_client *client) {
         client->fd = safe_close(client->fd);
 
         client->transaction_id = 0;
+        client->transaction_start = 0;
 
         client->ia_na.timeout_t1 =
                 sd_event_source_unref(client->ia_na.timeout_t1);
@@ -230,13 +312,15 @@ static void client_stop(sd_dhcp6_client *client, int error) {
         client_reset(client);
 }
 
-static int client_send_message(sd_dhcp6_client *client) {
+static int client_send_message(sd_dhcp6_client *client, usec_t time_now) {
         _cleanup_free_ DHCP6Message *message = NULL;
         struct in6_addr all_servers =
                 IN6ADDR_ALL_DHCP6_RELAY_AGENTS_AND_SERVERS_INIT;
         size_t len, optlen = 512;
         uint8_t *opt;
         int r;
+        usec_t elapsed_usec;
+        be16_t elapsed_time;
 
         len = sizeof(DHCP6Message) + optlen;
 
@@ -293,7 +377,6 @@ static int client_send_message(sd_dhcp6_client *client) {
                 break;
 
         case DHCP6_STATE_STOPPED:
-        case DHCP6_STATE_RS:
         case DHCP6_STATE_BOUND:
                 return -EINVAL;
         }
@@ -305,7 +388,18 @@ static int client_send_message(sd_dhcp6_client *client) {
                 return r;
 
         r = dhcp6_option_append(&opt, &optlen, DHCP6_OPTION_CLIENTID,
-                                sizeof(client->duid), &client->duid);
+                                client->duid_len, &client->duid);
+        if (r < 0)
+                return r;
+
+        elapsed_usec = time_now - client->transaction_start;
+        if (elapsed_usec < 0xffff * USEC_PER_MSEC * 10)
+                elapsed_time = htobe16(elapsed_usec / USEC_PER_MSEC / 10);
+        else
+                elapsed_time = 0xffff;
+
+        r = dhcp6_option_append(&opt, &optlen, DHCP6_OPTION_ELAPSED_TIME,
+                                sizeof(elapsed_time), &elapsed_time);
         if (r < 0)
                 return r;
 
@@ -387,7 +481,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
                                  void *userdata) {
         int r = 0;
         sd_dhcp6_client *client = userdata;
-        usec_t time_now, init_retransmit_time, max_retransmit_time;
+        usec_t time_now, init_retransmit_time = 0, max_retransmit_time = 0;
         usec_t max_retransmit_duration = 0;
         uint8_t max_retransmit_count = 0;
         char time_string[FORMAT_TIMESPAN_MAX];
@@ -446,7 +540,6 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
                 break;
 
         case DHCP6_STATE_STOPPED:
-        case DHCP6_STATE_RS:
         case DHCP6_STATE_BOUND:
                 return 0;
         }
@@ -457,15 +550,14 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
                 return 0;
         }
 
-        r = client_send_message(client);
-        if (r >= 0)
-                client->retransmit_count++;
-
-
-        r = sd_event_now(client->event, CLOCK_MONOTONIC, &time_now);
+        r = sd_event_now(client->event, clock_boottime_or_monotonic(), &time_now);
         if (r < 0)
                 goto error;
 
+        r = client_send_message(client, time_now);
+        if (r >= 0)
+                client->retransmit_count++;
+
         if (!client->retransmit_time) {
                 client->retransmit_time =
                         client_timeout_compute_random(init_retransmit_time);
@@ -486,7 +578,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
                                          client->retransmit_time, 0));
 
         r = sd_event_add_time(client->event, &client->timeout_resend,
-                              CLOCK_MONOTONIC,
+                              clock_boottime_or_monotonic(),
                               time_now + client->retransmit_time,
                               10 * USEC_PER_MSEC, client_timeout_resend,
                               client);
@@ -498,6 +590,11 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
         if (r < 0)
                 goto error;
 
+        r = sd_event_source_set_name(client->timeout_resend,
+                                     "dhcp6-resend-timer");
+        if (r < 0)
+                goto error;
+
         if (max_retransmit_duration && !client->timeout_resend_expire) {
 
                 log_dhcp6_client(client, "Max retransmission duration %"PRIu64" secs",
@@ -505,7 +602,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
 
                 r = sd_event_add_time(client->event,
                                       &client->timeout_resend_expire,
-                                      CLOCK_MONOTONIC,
+                                      clock_boottime_or_monotonic(),
                                       time_now + max_retransmit_duration,
                                       USEC_PER_SEC,
                                       client_timeout_resend_expire, client);
@@ -516,6 +613,11 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
                                                  client->event_priority);
                 if (r < 0)
                         goto error;
+
+                r = sd_event_source_set_name(client->timeout_resend_expire,
+                                             "dhcp6-resend-expire-timer");
+                if (r < 0)
+                        goto error;
         }
 
 error:
@@ -562,8 +664,8 @@ static int client_ensure_iaid(sd_dhcp6_client *client) {
                 siphash24((uint8_t*)&id, name, strlen(name), HASH_KEY.bytes);
         else
                 /* fall back to mac address if no predictable name available */
-                siphash24((uint8_t*)&id, &client->mac_addr, ETH_ALEN,
-                          HASH_KEY.bytes);
+                siphash24((uint8_t*)&id, &client->mac_addr,
+                          client->mac_addr_len, HASH_KEY.bytes);
 
         /* fold into 32 bits */
         client->ia_na.id = (id & 0xffffffff) ^ (id >> 32);
@@ -575,12 +677,15 @@ static int client_parse_message(sd_dhcp6_client *client,
                                 DHCP6Message *message, size_t len,
                                 sd_dhcp6_lease *lease) {
         int r;
-        uint8_t *optval, *option = (uint8_t *)(message + 1), *id = NULL;
+        uint8_t *optval, *option, *id = NULL;
         uint16_t optcode, status;
         size_t optlen, id_len;
         bool clientid = false;
         be32_t iaid_lease;
 
+        option = (uint8_t *)message + sizeof(DHCP6Message);
+        len -= sizeof(DHCP6Message);
+
         while ((r = dhcp6_option_parse(&option, &len, &optcode, &optlen,
                                        &optval)) >= 0) {
                 switch (optcode) {
@@ -591,7 +696,7 @@ static int client_parse_message(sd_dhcp6_client *client,
                                 return -EINVAL;
                         }
 
-                        if (optlen != sizeof(client->duid) ||
+                        if (optlen != client->duid_len ||
                             memcmp(&client->duid, optval, optlen) != 0) {
                                 log_dhcp6_client(client, "%s DUID does not match",
                                                  dhcp6_message_type_to_string(message->type));
@@ -708,7 +813,8 @@ static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply,
                         return 0;
         }
 
-        dhcp6_lease_clear_timers(&client->lease->ia);
+        if (client->lease)
+                dhcp6_lease_clear_timers(&client->lease->ia);
 
         client->lease = sd_dhcp6_lease_unref(client->lease);
         client->lease = lease;
@@ -842,7 +948,6 @@ static int client_receive_message(sd_event_source *s, int fd, uint32_t revents,
                 break;
 
         case DHCP6_STATE_STOPPED:
-        case DHCP6_STATE_RS:
                 return 0;
         }
 
@@ -871,9 +976,17 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
         client->retransmit_time = 0;
         client->retransmit_count = 0;
 
+        if (client->state == DHCP6_STATE_STOPPED) {
+                time_now = now(clock_boottime_or_monotonic());
+        } else {
+                r = sd_event_now(client->event, clock_boottime_or_monotonic(),
+                                 &time_now);
+                if (r < 0)
+                        return r;
+        }
+
         switch (state) {
         case DHCP6_STATE_STOPPED:
-        case DHCP6_STATE_RS:
         case DHCP6_STATE_SOLICITATION:
 
                 r = client_ensure_iaid(client);
@@ -897,6 +1010,11 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
                 if (r < 0)
                         return r;
 
+                r = sd_event_source_set_name(client->receive_message,
+                                             "dhcp6-receive-message");
+                if (r < 0)
+                        return r;
+
                 client->state = DHCP6_STATE_SOLICITATION;
 
                 break;
@@ -911,10 +1029,6 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
 
         case DHCP6_STATE_BOUND:
 
-                r = sd_event_now(client->event, CLOCK_MONOTONIC, &time_now);
-                if (r < 0)
-                        return r;
-
                 if (client->lease->ia.lifetime_t1 == 0xffffffff ||
                     client->lease->ia.lifetime_t2 == 0xffffffff) {
 
@@ -934,7 +1048,7 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
 
                 r = sd_event_add_time(client->event,
                                       &client->lease->ia.timeout_t1,
-                                      CLOCK_MONOTONIC, time_now + timeout,
+                                      clock_boottime_or_monotonic(), time_now + timeout,
                                       10 * USEC_PER_SEC, client_timeout_t1,
                                       client);
                 if (r < 0)
@@ -945,6 +1059,11 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
                 if (r < 0)
                         return r;
 
+                r = sd_event_source_set_name(client->lease->ia.timeout_t1,
+                                             "dhcp6-t1-timeout");
+                if (r < 0)
+                        return r;
+
                 timeout = client_timeout_compute_random(be32toh(client->lease->ia.lifetime_t2) * USEC_PER_SEC);
 
                 log_dhcp6_client(client, "T2 expires in %s",
@@ -954,7 +1073,7 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
 
                 r = sd_event_add_time(client->event,
                                       &client->lease->ia.timeout_t2,
-                                      CLOCK_MONOTONIC, time_now + timeout,
+                                      clock_boottime_or_monotonic(), time_now + timeout,
                                       10 * USEC_PER_SEC, client_timeout_t2,
                                       client);
                 if (r < 0)
@@ -965,15 +1084,21 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
                 if (r < 0)
                         return r;
 
+                r = sd_event_source_set_name(client->lease->ia.timeout_t2,
+                                             "dhcp6-t2-timeout");
+                if (r < 0)
+                        return r;
+
                 client->state = state;
 
                 return 0;
         }
 
         client->transaction_id = random_u32() & htobe32(0x00ffffff);
+        client->transaction_start = time_now;
 
         r = sd_event_add_time(client->event, &client->timeout_resend,
-                              CLOCK_MONOTONIC, 0, 0, client_timeout_resend,
+                              clock_boottime_or_monotonic(), 0, 0, client_timeout_resend,
                               client);
         if (r < 0)
                 return r;
@@ -983,6 +1108,11 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state)
         if (r < 0)
                 return r;
 
+        r = sd_event_source_set_name(client->timeout_resend,
+                                     "dhcp6-resend-timeout");
+        if (r < 0)
+                return r;
+
         return 0;
 }
 
@@ -1088,8 +1218,9 @@ int sd_dhcp6_client_new(sd_dhcp6_client **ret)
         client->fd = -1;
 
         /* initialize DUID */
-        client->duid.type = htobe16(DHCP6_DUID_EN);
-        client->duid.pen = htobe32(SYSTEMD_PEN);
+        client->duid.en.type = htobe16(DHCP6_DUID_EN);
+        client->duid.en.pen = htobe32(SYSTEMD_PEN);
+        client->duid_len = sizeof(client->duid.en);
 
         r = sd_id128_get_machine(&machine_id);
         if (r < 0)
@@ -1097,8 +1228,7 @@ int sd_dhcp6_client_new(sd_dhcp6_client **ret)
 
         /* a bit of snake-oil perhaps, but no need to expose the machine-id
            directly */
-        siphash24(client->duid.id, &machine_id, sizeof(machine_id),
-                  HASH_KEY.bytes);
+        siphash24(client->duid.en.id, &machine_id, sizeof(machine_id), HASH_KEY.bytes);
 
         client->req_opts_len = ELEMENTSOF(default_req_opts);
 
index b9d0503642517708637dd857704db74c55cb8e8f..e2715ea659d370168fbb92c1b0a5be32d280c8bc 100644 (file)
@@ -41,7 +41,7 @@ int dhcp6_lease_ia_rebind_expire(const DHCP6IA *ia, uint32_t *expire) {
         assert_return(expire, -EINVAL);
 
         LIST_FOREACH(addresses, addr, ia->addresses) {
-                t = be32toh(addr->lifetime_valid);
+                t = be32toh(addr->iaaddr.lifetime_valid);
                 if (valid < t)
                         valid = t;
         }
@@ -156,9 +156,11 @@ int sd_dhcp6_lease_get_next_address(sd_dhcp6_lease *lease,
         if (!lease->addr_iter)
                 return -ENOMSG;
 
-        memcpy(addr, &lease->addr_iter->address, sizeof(struct in6_addr));
-        *lifetime_preferred = be32toh(lease->addr_iter->lifetime_preferred);
-        *lifetime_valid = be32toh(lease->addr_iter->lifetime_valid);
+        memcpy(addr, &lease->addr_iter->iaaddr.address,
+                sizeof(struct in6_addr));
+        *lifetime_preferred =
+                be32toh(lease->addr_iter->iaaddr.lifetime_preferred);
+        *lifetime_valid = be32toh(lease->addr_iter->iaaddr.lifetime_valid);
 
         lease->addr_iter = lease->addr_iter->addresses_next;
 
index 80915c34d6bcb66c3915b25fe41bea70ed98f4af..bbb4531ddb5e58a317bb294332950fe5569ff461 100644 (file)
@@ -212,7 +212,7 @@ static int icmp6_router_advertisment_recv(sd_event_source *s, int fd,
         if (ra.nd_ra_flags_reserved & ND_RA_FLAG_MANAGED)
                 event = ICMP6_EVENT_ROUTER_ADVERTISMENT_MANAGED;
 
-        log_icmp6_nd(nd, "Received Router Advertisment flags %s/%s",
+        log_icmp6_nd(nd, "Received Router Advertisement flags %s/%s",
                      (ra.nd_ra_flags_reserved & ND_RA_FLAG_MANAGED)? "MANAGED":
                      "none",
                      (ra.nd_ra_flags_reserved & ND_RA_FLAG_OTHER)? "OTHER":
@@ -255,7 +255,7 @@ static int icmp6_router_solicitation_timeout(sd_event_source *s, uint64_t usec,
 
                 nd->nd_sent++;
 
-                r = sd_event_now(nd->event, CLOCK_MONOTONIC, &time_now);
+                r = sd_event_now(nd->event, clock_boottime_or_monotonic(), &time_now);
                 if (r < 0) {
                         icmp6_nd_notify(nd, r);
                         return 0;
@@ -263,7 +263,7 @@ static int icmp6_router_solicitation_timeout(sd_event_source *s, uint64_t usec,
 
                 next_timeout = time_now + ICMP6_ROUTER_SOLICITATION_INTERVAL;
 
-                r = sd_event_add_time(nd->event, &nd->timeout, CLOCK_MONOTONIC,
+                r = sd_event_add_time(nd->event, &nd->timeout, clock_boottime_or_monotonic(),
                                       next_timeout, 0,
                                       icmp6_router_solicitation_timeout, nd);
                 if (r < 0) {
@@ -277,6 +277,12 @@ static int icmp6_router_solicitation_timeout(sd_event_source *s, uint64_t usec,
                         icmp6_nd_notify(nd, r);
                         return 0;
                 }
+
+                r = sd_event_source_set_name(nd->timeout, "icmp6-timeout");
+                if (r < 0) {
+                        icmp6_nd_notify(nd, r);
+                        return 0;
+                }
         }
 
         return 0;
@@ -322,13 +328,20 @@ int sd_icmp6_router_solicitation_start(sd_icmp6_nd *nd) {
         if (r < 0)
                 goto error;
 
-        r = sd_event_add_time(nd->event, &nd->timeout, CLOCK_MONOTONIC,
+        r = sd_event_source_set_name(nd->recv, "icmp6-receive-message");
+        if (r < 0)
+                goto error;
+
+        r = sd_event_add_time(nd->event, &nd->timeout, clock_boottime_or_monotonic(),
                               0, 0, icmp6_router_solicitation_timeout, nd);
         if (r < 0)
                 goto error;
 
         r = sd_event_source_set_priority(nd->timeout, nd->event_priority);
+        if (r < 0)
+                goto error;
 
+        r = sd_event_source_set_name(nd->timeout, "icmp6-timeout");
 error:
         if (r < 0)
                 icmp6_nd_init(nd);
index fd39c12eb22df0c028fc1721001627e9a67ea697..8b243319b6bf4f0db36b26d1616704b65ca0c9c0 100644 (file)
@@ -186,8 +186,8 @@ static void ipv4ll_set_next_wakeup(sd_ipv4ll *ll, int sec, int random_sec) {
         if (random_sec)
                 next_timeout += random_u32() % (random_sec * USEC_PER_SEC);
 
-        if (sd_event_now(ll->event, CLOCK_MONOTONIC, &time_now) < 0)
-                time_now = now(CLOCK_MONOTONIC);
+        if (sd_event_now(ll->event, clock_boottime_or_monotonic(), &time_now) < 0)
+                time_now = now(clock_boottime_or_monotonic());
 
         ll->next_wakeup = time_now + next_timeout;
         ll->next_wakeup_valid = 1;
@@ -289,7 +289,7 @@ static void ipv4ll_run_state_machine(sd_ipv4ll *ll, IPv4LLTrigger trigger, void
 
                         if (ipv4ll_arp_conflict(ll, in_packet)) {
 
-                                r = sd_event_now(ll->event, CLOCK_MONOTONIC, &time_now);
+                                r = sd_event_now(ll->event, clock_boottime_or_monotonic(), &time_now);
                                 if (r < 0)
                                         goto out;
 
@@ -344,7 +344,7 @@ static void ipv4ll_run_state_machine(sd_ipv4ll *ll, IPv4LLTrigger trigger, void
 
         if (ll->next_wakeup_valid) {
                 ll->timer = sd_event_source_unref(ll->timer);
-                r = sd_event_add_time(ll->event, &ll->timer, CLOCK_MONOTONIC,
+                r = sd_event_add_time(ll->event, &ll->timer, clock_boottime_or_monotonic(),
                                       ll->next_wakeup, 0, ipv4ll_timer, ll);
                 if (r < 0)
                         goto out;
@@ -352,6 +352,10 @@ static void ipv4ll_run_state_machine(sd_ipv4ll *ll, IPv4LLTrigger trigger, void
                 r = sd_event_source_set_priority(ll->timer, ll->event_priority);
                 if (r < 0)
                         goto out;
+
+                r = sd_event_source_set_name(ll->timer, "ipv4ll-timer");
+                if (r < 0)
+                        goto out;
         }
 
 out:
@@ -560,17 +564,24 @@ int sd_ipv4ll_start (sd_ipv4ll *ll) {
         if (r < 0)
                 goto out;
 
+        r = sd_event_source_set_name(ll->receive_message, "ipv4ll-receive-message");
+        if (r < 0)
+                goto out;
+
         r = sd_event_add_time(ll->event,
                               &ll->timer,
-                              CLOCK_MONOTONIC,
-                              now(CLOCK_MONOTONIC), 0,
+                              clock_boottime_or_monotonic(),
+                              now(clock_boottime_or_monotonic()), 0,
                               ipv4ll_timer, ll);
 
         if (r < 0)
                 goto out;
 
         r = sd_event_source_set_priority(ll->timer, ll->event_priority);
+        if (r < 0)
+                goto out;
 
+        r = sd_event_source_set_name(ll->timer, "ipv4ll-timer");
 out:
         if (r < 0)
                 ipv4ll_stop(ll, IPV4LL_EVENT_STOP);
index 450b6d4d3c9bfc199b4297e5d768574009ee7cd6..0515440e4e97cf0d65e70050c4273a88890b39b5 100644 (file)
@@ -196,7 +196,9 @@ int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link,
         return 575;
 }
 
-int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t id)
+int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
+                                 uint32_t id, const uint8_t *addr,
+                                 size_t addr_len, uint16_t arp_type)
 {
         if (socketpair(AF_UNIX, SOCK_STREAM, 0, test_fd) < 0)
                 return -errno;
@@ -244,7 +246,10 @@ static void test_discover_message(sd_event *e)
         assert_se(r >= 0);
 
         assert_se(sd_dhcp_client_set_index(client, 42) >= 0);
-        assert_se(sd_dhcp_client_set_mac(client, &mac_addr) >= 0);
+        assert_se(sd_dhcp_client_set_mac(client,
+                                         (const uint8_t *) &mac_addr,
+                                         sizeof (mac_addr),
+                                         ARPHRD_ETHER) >= 0);
 
         assert_se(sd_dhcp_client_set_request_option(client, 248) >= 0);
 
@@ -447,7 +452,7 @@ static int test_addr_acq_recv_discover(size_t size, DHCPMessage *discover) {
 }
 
 static void test_addr_acq(sd_event *e) {
-        usec_t time_now = now(CLOCK_MONOTONIC);
+        usec_t time_now = now(clock_boottime_or_monotonic());
         sd_dhcp_client *client;
         int res, r;
 
@@ -462,7 +467,10 @@ static void test_addr_acq(sd_event *e) {
         assert_se(r >= 0);
 
         assert_se(sd_dhcp_client_set_index(client, 42) >= 0);
-        assert_se(sd_dhcp_client_set_mac(client, &mac_addr) >= 0);
+        assert_se(sd_dhcp_client_set_mac(client,
+                                         (const uint8_t *) &mac_addr,
+                                         sizeof (mac_addr),
+                                         ARPHRD_ETHER) >= 0);
 
         assert_se(sd_dhcp_client_set_callback(client, test_addr_acq_acquired, e)
                 >= 0);
@@ -470,19 +478,19 @@ static void test_addr_acq(sd_event *e) {
         callback_recv = test_addr_acq_recv_discover;
 
         assert_se(sd_event_add_time(e, &test_hangcheck,
-                                    CLOCK_MONOTONIC,
+                                    clock_boottime_or_monotonic(),
                                     time_now + 2 * USEC_PER_SEC, 0,
                                     test_dhcp_hangcheck, NULL) >= 0);
 
         res = sd_dhcp_client_start(client);
         assert_se(res == 0 || res == -EINPROGRESS);
 
-        sd_event_loop(e);
+        assert_se(sd_event_loop(e) >= 0);
 
         test_hangcheck = sd_event_source_unref(test_hangcheck);
 
-        sd_dhcp_client_set_callback(client, NULL, NULL);
-        sd_dhcp_client_stop(client);
+        assert_se(sd_dhcp_client_set_callback(client, NULL, NULL) >= 0);
+        assert_se(sd_dhcp_client_stop(client) >= 0);
         sd_dhcp_client_unref(client);
 
         test_fd[1] = safe_close(test_fd[1]);
index 92c58e0d58e5edebbbe418a474845c5ea2eda3da..eac3844f96b8ad620c0f116b4cc46bbca3598707 100644 (file)
@@ -92,7 +92,7 @@ static void test_message_init(void)
         message = malloc0(len);
 
         assert_se(dhcp_message_init(message, BOOTREQUEST, 0x12345678,
-                  DHCP_DISCOVER, optlen, &optoffset) >= 0);
+                  DHCP_DISCOVER, ARPHRD_ETHER, optlen, &optoffset) >= 0);
 
         assert_se(message->xid == htobe32(0x12345678));
         assert_se(message->op == BOOTREQUEST);
@@ -100,9 +100,9 @@ static void test_message_init(void)
         magic = (uint8_t*)&message->magic;
 
         assert_se(magic[0] == 99);
-        assert_se(magic[1] = 130);
-        assert_se(magic[2] = 83);
-        assert_se(magic[3] = 99);
+        assert_se(magic[1] == 130);
+        assert_se(magic[2] == 83);
+        assert_se(magic[3] == 99);
 
         assert_se(dhcp_option_parse(message, len, NULL, NULL) >= 0);
 }
@@ -115,6 +115,7 @@ static DHCPMessage *create_message(uint8_t *options, uint16_t optlen,
         size_t len = sizeof(DHCPMessage) + optlen;
 
         message = malloc0(len);
+        assert_se(message);
 
         if (options && optlen)
                 memcpy(&message->options, options, optlen);
index a9bdb9ab8b933bb6f1b5f5cdeded581580f1e0d7..3e68f310f3248ac59b0f555c559e0858319f4ab7 100644 (file)
@@ -56,9 +56,10 @@ static int test_basic(sd_event *event) {
         assert_se(!sd_dhcp_server_unref(server));
 
         assert_se(sd_dhcp_server_start(server) == -EUNATCH);
-        assert_se(sd_dhcp_server_set_address(server, &address_any) == -EINVAL);
-        assert_se(sd_dhcp_server_set_address(server, &address_lo) >= 0);
-        assert_se(sd_dhcp_server_set_address(server, &address_lo) == -EBUSY);
+        assert_se(sd_dhcp_server_set_address(server, &address_any, 28) == -EINVAL);
+        assert_se(sd_dhcp_server_set_address(server, &address_lo, 38) == -ERANGE);
+        assert_se(sd_dhcp_server_set_address(server, &address_lo, 8) >= 0);
+        assert_se(sd_dhcp_server_set_address(server, &address_lo, 8) == -EBUSY);
 
         assert_se(sd_dhcp_server_set_lease_pool(server, &address_any, 1) == -EINVAL);
         assert_se(sd_dhcp_server_set_lease_pool(server, &address_lo, 0) == -EINVAL);
@@ -120,7 +121,7 @@ static void test_message_handler(void) {
         };
 
         assert_se(sd_dhcp_server_new(&server, 1) >= 0);
-        assert_se(sd_dhcp_server_set_address(server, &address_lo) >= 0);
+        assert_se(sd_dhcp_server_set_address(server, &address_lo, 8) >= 0);
         assert_se(sd_dhcp_server_attach_event(server, NULL, 0) >= 0);
         assert_se(sd_dhcp_server_start(server) >= 0);
 
index 5bb410dab3f5bfc9316aea36862eeeee667743e4..26b28a20e848b53b387815dd7e0ce33ab8f49015 100644 (file)
@@ -66,7 +66,9 @@ static int test_client_basic(sd_event *e) {
         assert_se(sd_dhcp6_client_set_index(client, -1) == 0);
         assert_se(sd_dhcp6_client_set_index(client, 42) >= 0);
 
-        assert_se(sd_dhcp6_client_set_mac(client, &mac_addr) >= 0);
+        assert_se(sd_dhcp6_client_set_mac(client, (const uint8_t *) &mac_addr,
+                                          sizeof (mac_addr),
+                                          ARPHRD_ETHER) >= 0);
 
         assert_se(sd_dhcp6_client_set_request_option(client, DHCP6_OPTION_CLIENTID) == -EINVAL);
         assert_se(sd_dhcp6_client_set_request_option(client, DHCP6_OPTION_DNS_SERVERS) == -EEXIST);
@@ -205,9 +207,9 @@ static uint8_t msg_reply[173] = {
 static int test_advertise_option(sd_event *e) {
         _cleanup_dhcp6_lease_free_ sd_dhcp6_lease *lease = NULL;
         DHCP6Message *advertise = (DHCP6Message *)msg_advertise;
-        uint8_t *optval, *opt = &msg_advertise[sizeof(DHCP6Message)];
+        uint8_t *optval, *opt = msg_advertise + sizeof(DHCP6Message);
         uint16_t optcode;
-        size_t optlen, len = sizeof(msg_advertise);
+        size_t optlen, len = sizeof(msg_advertise) - sizeof(DHCP6Message);
         be32_t val;
         uint8_t preference = 255;
         struct in6_addr addr;
@@ -269,6 +271,11 @@ static int test_advertise_option(sd_event *e) {
                                                              *optval) >= 0);
                         break;
 
+                case DHCP6_OPTION_ELAPSED_TIME:
+                        assert_se(optlen == 2);
+
+                        break;
+
                 default:
                         break;
                 }
@@ -361,7 +368,8 @@ static int test_client_verify_request(DHCP6Message *request, uint8_t *option,
         uint8_t *optval;
         uint16_t optcode;
         size_t optlen;
-        bool found_clientid = false, found_iana = false, found_serverid = false;
+        bool found_clientid = false, found_iana = false, found_serverid = false,
+                found_elapsed_time = false;
         int r;
         struct in6_addr addr;
         be32_t val;
@@ -409,12 +417,21 @@ static int test_client_verify_request(DHCP6Message *request, uint8_t *option,
                         assert_se(optlen == 14);
                         assert_se(!memcmp(&msg_advertise[179], optval, optlen));
 
+                        break;
+
+                case DHCP6_OPTION_ELAPSED_TIME:
+                        assert_se(!found_elapsed_time);
+                        found_elapsed_time = true;
+
+                        assert_se(optlen == 2);
+
                         break;
                 }
         }
 
         assert_se(r == -ENOMSG);
-        assert_se(found_clientid && found_iana && found_serverid);
+        assert_se(found_clientid && found_iana && found_serverid &&
+                  found_elapsed_time);
 
         assert_se(sd_dhcp6_lease_get_first_address(lease, &addr, &lt_pref,
                                                    &lt_valid) >= 0);
@@ -452,7 +469,8 @@ static int test_client_verify_solicit(DHCP6Message *solicit, uint8_t *option,
         uint8_t *optval;
         uint16_t optcode;
         size_t optlen;
-        bool found_clientid = false, found_iana = false;
+        bool found_clientid = false, found_iana = false,
+                found_elapsed_time = false;
         int r;
 
         assert_se(solicit->type == DHCP6_SOLICIT);
@@ -477,12 +495,20 @@ static int test_client_verify_solicit(DHCP6Message *solicit, uint8_t *option,
 
                         memcpy(&test_iaid, optval, sizeof(test_iaid));
 
+                        break;
+
+                case DHCP6_OPTION_ELAPSED_TIME:
+                        assert_se(!found_elapsed_time);
+                        found_elapsed_time = true;
+
+                        assert_se(optlen == 2);
+
                         break;
                 }
         }
 
         assert_se(r == -ENOMSG);
-        assert_se(found_clientid && found_iana);
+        assert_se(found_clientid && found_iana && found_elapsed_time);
 
         return 0;
 }
@@ -537,7 +563,7 @@ static void test_client_solicit_cb(sd_dhcp6_client *client, int event,
 
 static int test_client_solicit(sd_event *e) {
         sd_dhcp6_client *client;
-        usec_t time_now = now(CLOCK_MONOTONIC);
+        usec_t time_now = now(clock_boottime_or_monotonic());
 
         if (verbose)
                 printf("* %s\n", __FUNCTION__);
@@ -548,12 +574,14 @@ static int test_client_solicit(sd_event *e) {
         assert_se(sd_dhcp6_client_attach_event(client, e, 0) >= 0);
 
         assert_se(sd_dhcp6_client_set_index(client, test_index) == 0);
-        assert_se(sd_dhcp6_client_set_mac(client, &mac_addr) >= 0);
+        assert_se(sd_dhcp6_client_set_mac(client, (const uint8_t *) &mac_addr,
+                                          sizeof (mac_addr),
+                                          ARPHRD_ETHER) >= 0);
 
         assert_se(sd_dhcp6_client_set_callback(client,
                                                test_client_solicit_cb, e) >= 0);
 
-        assert_se(sd_event_add_time(e, &hangcheck, CLOCK_MONOTONIC,
+        assert_se(sd_event_add_time(e, &hangcheck, clock_boottime_or_monotonic(),
                                     time_now + 2 * USEC_PER_SEC, 0,
                                     test_hangcheck, NULL) >= 0);
 
index b81211f6bcb7a6b5ec4c34b8466953361f16ef2a..afa85626598b61cd0840bd9e3fae0bd81527a80c 100644 (file)
@@ -108,7 +108,7 @@ static void test_rs_done(sd_icmp6_nd *nd, int event, void *userdata) {
 }
 
 static void test_rs(sd_event *e) {
-        usec_t time_now = now(CLOCK_MONOTONIC);
+        usec_t time_now = now(clock_boottime_or_monotonic());
         sd_icmp6_nd *nd;
 
         if (verbose)
@@ -123,7 +123,7 @@ static void test_rs(sd_event *e) {
         assert(sd_icmp6_nd_set_mac(nd, &mac_addr) >= 0);
         assert(sd_icmp6_nd_set_callback(nd, test_rs_done, e) >= 0);
 
-        assert(sd_event_add_time(e, &test_hangcheck, CLOCK_MONOTONIC,
+        assert(sd_event_add_time(e, &test_hangcheck, clock_boottime_or_monotonic(),
                                  time_now + 2 *USEC_PER_SEC, 0,
                                  test_rs_hangcheck, NULL) >= 0);
 
diff --git a/src/libsystemd-terminal/evcat.c b/src/libsystemd-terminal/evcat.c
new file mode 100644 (file)
index 0000000..9e8a262
--- /dev/null
@@ -0,0 +1,510 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Event Catenation
+ * The evcat tool catenates input events of all requested devices and prints
+ * them to standard-output. It's only meant for debugging of input-related
+ * problems.
+ */
+
+#include <assert.h>
+#include <errno.h>
+#include <getopt.h>
+#include <libevdev/libevdev.h>
+#include <linux/kd.h>
+#include <linux/vt.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-login.h>
+#include <termios.h>
+#include <unistd.h>
+#include <xkbcommon/xkbcommon.h>
+#include "build.h"
+#include "bus-util.h"
+#include "event-util.h"
+#include "idev.h"
+#include "macro.h"
+#include "sysview.h"
+#include "term-internal.h"
+#include "util.h"
+
+typedef struct Evcat Evcat;
+
+struct Evcat {
+        char *session;
+        char *seat;
+        sd_event *event;
+        sd_bus *bus;
+        sysview_context *sysview;
+        idev_context *idev;
+        idev_session *idev_session;
+
+        bool managed : 1;
+};
+
+static Evcat *evcat_free(Evcat *e) {
+        if (!e)
+                return NULL;
+
+        e->idev_session = idev_session_free(e->idev_session);
+        e->idev = idev_context_unref(e->idev);
+        e->sysview = sysview_context_free(e->sysview);
+        e->bus = sd_bus_unref(e->bus);
+        e->event = sd_event_unref(e->event);
+        free(e->seat);
+        free(e->session);
+        free(e);
+
+        tcflush(0, TCIOFLUSH);
+
+        return NULL;
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Evcat*, evcat_free);
+
+static bool is_managed(const char *session) {
+        unsigned int vtnr;
+        struct stat st;
+        long mode;
+        int r;
+
+        /* Using logind's Controller API is highly fragile if there is already
+         * a session controller running. If it is registered as controller
+         * itself, TakeControl will simply fail. But if its a legacy controller
+         * that does not use logind's controller API, we must never register
+         * our own controller. Otherwise, we really mess up the VT. Therefore,
+         * only run in managed mode if there's no-one else. */
+
+        if (geteuid() == 0)
+                return false;
+
+        if (!isatty(1))
+                return false;
+
+        if (!session)
+                return false;
+
+        r = sd_session_get_vt(session, &vtnr);
+        if (r < 0 || vtnr < 1 || vtnr > 63)
+                return false;
+
+        mode = 0;
+        r = ioctl(1, KDGETMODE, &mode);
+        if (r < 0 || mode != KD_TEXT)
+                return false;
+
+        r = fstat(1, &st);
+        if (r < 0 || minor(st.st_rdev) != vtnr)
+                return false;
+
+        return true;
+}
+
+static int evcat_new(Evcat **out) {
+        _cleanup_(evcat_freep) Evcat *e = NULL;
+        int r;
+
+        assert(out);
+
+        e = new0(Evcat, 1);
+        if (!e)
+                return log_oom();
+
+        r = sd_pid_get_session(getpid(), &e->session);
+        if (r < 0) {
+                log_error("Cannot retrieve logind session: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_session_get_seat(e->session, &e->seat);
+        if (r < 0) {
+                log_error("Cannot retrieve seat of logind session: %s", strerror(-r));
+                return r;
+        }
+
+        e->managed = is_managed(e->session);
+
+        r = sd_event_default(&e->event);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_open_system(&e->bus);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_attach_event(e->bus, e->event, SD_EVENT_PRIORITY_NORMAL);
+        if (r < 0)
+                return r;
+
+        r = sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, -1);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(e->event, NULL, SIGTERM, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(e->event, NULL, SIGINT, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sysview_context_new(&e->sysview,
+                                SYSVIEW_CONTEXT_SCAN_LOGIND |
+                                SYSVIEW_CONTEXT_SCAN_EVDEV,
+                                e->event,
+                                e->bus,
+                                NULL);
+        if (r < 0)
+                return r;
+
+        r = idev_context_new(&e->idev, e->event, e->bus);
+        if (r < 0)
+                return r;
+
+        *out = e;
+        e = NULL;
+        return 0;
+}
+
+static void kdata_print(idev_data *data) {
+        idev_data_keyboard *k = &data->keyboard;
+        char buf[128];
+        uint32_t i, c;
+        int cwidth;
+
+        /* Key-press state: UP/DOWN/REPEAT */
+        printf(" %-6s", k->value == 0 ? "UP" :
+                        k->value == 1 ? "DOWN" :
+                        "REPEAT");
+
+        /* Resync state */
+        printf(" | %-6s", data->resync ? "RESYNC" : "");
+
+        /* Keycode that triggered the event */
+        printf(" | %5u", (unsigned)k->keycode);
+
+        /* Well-known name of the keycode */
+        printf(" | %-20s", libevdev_event_code_get_name(EV_KEY, k->keycode) ? : "<unknown>");
+
+        /* Well-known modifiers */
+        printf(" | %-5s", (k->mods & IDEV_KBDMOD_SHIFT) ? "SHIFT" : "");
+        printf(" %-4s", (k->mods & IDEV_KBDMOD_CTRL) ? "CTRL" : "");
+        printf(" %-3s", (k->mods & IDEV_KBDMOD_ALT) ? "ALT" : "");
+        printf(" %-5s", (k->mods & IDEV_KBDMOD_LINUX) ? "LINUX" : "");
+        printf(" %-4s", (k->mods & IDEV_KBDMOD_CAPS) ? "CAPS" : "");
+
+        /* Consumed modifiers */
+        printf(" | %-5s", (k->consumed_mods & IDEV_KBDMOD_SHIFT) ? "SHIFT" : "");
+        printf(" %-4s", (k->consumed_mods & IDEV_KBDMOD_CTRL) ? "CTRL" : "");
+        printf(" %-3s", (k->consumed_mods & IDEV_KBDMOD_ALT) ? "ALT" : "");
+        printf(" %-5s", (k->consumed_mods & IDEV_KBDMOD_LINUX) ? "LINUX" : "");
+        printf(" %-4s", (k->consumed_mods & IDEV_KBDMOD_CAPS) ? "CAPS" : "");
+
+        /* Resolved symbols */
+        printf(" |");
+        for (i = 0; i < k->n_syms; ++i) {
+                buf[0] = 0;
+                xkb_keysym_get_name(k->keysyms[i], buf, sizeof(buf));
+
+                if (is_locale_utf8()) {
+                        c = k->codepoints[i];
+                        if (c < 0x110000 && c > 0x20 && (c < 0x7f || c > 0x9f)) {
+                                /* "%4lc" doesn't work well, so hard-code it */
+                                cwidth = mk_wcwidth(c);
+                                while (cwidth++ < 2)
+                                        printf(" ");
+
+                                printf(" '%lc':", (wchar_t)c);
+                        } else {
+                                printf("      ");
+                        }
+                }
+
+                printf(" XKB_KEY_%-30s", buf);
+        }
+
+        printf("\n");
+}
+
+static bool kdata_is_exit(idev_data *data) {
+        idev_data_keyboard *k = &data->keyboard;
+
+        if (k->value != 1)
+                return false;
+        if (k->n_syms != 1)
+                return false;
+
+        return k->codepoints[0] == 'q';
+}
+
+static int evcat_idev_fn(idev_session *session, void *userdata, idev_event *ev) {
+        Evcat *e = userdata;
+
+        switch (ev->type) {
+        case IDEV_EVENT_DEVICE_ADD:
+                idev_device_enable(ev->device_add.device);
+                break;
+        case IDEV_EVENT_DEVICE_REMOVE:
+                idev_device_disable(ev->device_remove.device);
+                break;
+        case IDEV_EVENT_DEVICE_DATA:
+                switch (ev->device_data.data.type) {
+                case IDEV_DATA_KEYBOARD:
+                        if (kdata_is_exit(&ev->device_data.data))
+                                sd_event_exit(e->event, 0);
+                        else
+                                kdata_print(&ev->device_data.data);
+
+                        break;
+                }
+
+                break;
+        }
+
+        return 0;
+}
+
+static int evcat_sysview_fn(sysview_context *c, void *userdata, sysview_event *ev) {
+        unsigned int flags, type;
+        Evcat *e = userdata;
+        sysview_device *d;
+        const char *name;
+        int r;
+
+        switch (ev->type) {
+        case SYSVIEW_EVENT_SESSION_FILTER:
+                if (streq_ptr(e->session, ev->session_filter.id))
+                        return 1;
+
+                break;
+        case SYSVIEW_EVENT_SESSION_ADD:
+                assert(!e->idev_session);
+
+                name = sysview_session_get_name(ev->session_add.session);
+                flags = 0;
+
+                if (e->managed)
+                        flags |= IDEV_SESSION_MANAGED;
+
+                r = idev_session_new(&e->idev_session,
+                                     e->idev,
+                                     flags,
+                                     name,
+                                     evcat_idev_fn,
+                                     e);
+                if (r < 0) {
+                        log_error("Cannot create idev session: %s", strerror(-r));
+                        return r;
+                }
+
+                if (e->managed) {
+                        r = sysview_session_take_control(ev->session_add.session);
+                        if (r < 0) {
+                                log_error("Cannot request session control: %s", strerror(-r));
+                                return r;
+                        }
+                }
+
+                idev_session_enable(e->idev_session);
+
+                break;
+        case SYSVIEW_EVENT_SESSION_REMOVE:
+                idev_session_disable(e->idev_session);
+                e->idev_session = idev_session_free(e->idev_session);
+                if (sd_event_get_exit_code(e->event, &r) == -ENODATA)
+                        sd_event_exit(e->event, 0);
+                break;
+        case SYSVIEW_EVENT_SESSION_ATTACH:
+                d = ev->session_attach.device;
+                type = sysview_device_get_type(d);
+                if (type == SYSVIEW_DEVICE_EVDEV) {
+                        r = idev_session_add_evdev(e->idev_session, sysview_device_get_ud(d));
+                        if (r < 0) {
+                                log_error("Cannot add evdev device to idev: %s", strerror(-r));
+                                return r;
+                        }
+                }
+
+                break;
+        case SYSVIEW_EVENT_SESSION_DETACH:
+                d = ev->session_detach.device;
+                type = sysview_device_get_type(d);
+                if (type == SYSVIEW_DEVICE_EVDEV) {
+                        r = idev_session_remove_evdev(e->idev_session, sysview_device_get_ud(d));
+                        if (r < 0) {
+                                log_error("Cannot remove evdev device from idev: %s", strerror(-r));
+                                return r;
+                        }
+                }
+
+                break;
+        case SYSVIEW_EVENT_SESSION_CONTROL:
+                r = ev->session_control.error;
+                if (r < 0) {
+                        log_error("Cannot acquire session control: %s", strerror(-r));
+                        return r;
+                }
+
+                r = ioctl(1, KDSKBMODE, K_UNICODE);
+                if (r < 0) {
+                        log_error("Cannot set K_UNICODE on stdout: %m");
+                        return -errno;
+                }
+
+                r = ioctl(1, KDSETMODE, KD_TEXT);
+                if (r < 0) {
+                        log_error("Cannot set KD_TEXT on stdout: %m");
+                        return -errno;
+                }
+
+                printf("\n");
+
+                break;
+        }
+
+        return 0;
+}
+
+static int evcat_run(Evcat *e) {
+        struct termios in_attr, saved_attr;
+        int r;
+
+        assert(e);
+
+        if (!e->managed && geteuid() > 0)
+                log_warning("You run in unmanaged mode without being root. This is likely to produce no output..");
+
+        printf("evcat - Read and catenate events from selected input devices\n"
+               "        Running on seat '%s' in user-session '%s'\n"
+               "        Exit by pressing ^C or 'q'\n\n",
+               e->seat ? : "seat0", e->session ? : "<none>");
+
+        r = sysview_context_start(e->sysview, evcat_sysview_fn, e);
+        if (r < 0)
+                goto out;
+
+        r = tcgetattr(0, &in_attr);
+        if (r < 0) {
+                r = -errno;
+                goto out;
+        }
+
+        saved_attr = in_attr;
+        in_attr.c_lflag &= ~ECHO;
+
+        r = tcsetattr(0, TCSANOW, &in_attr);
+        if (r < 0) {
+                r = -errno;
+                goto out;
+        }
+
+        r = sd_event_loop(e->event);
+        tcsetattr(0, TCSANOW, &saved_attr);
+        printf("exiting..\n");
+
+out:
+        sysview_context_stop(e->sysview);
+        return r;
+}
+
+static int help(void) {
+        printf("%s [OPTIONS...]\n\n"
+               "Read and catenate events from selected input devices.\n\n"
+               "  -h --help               Show this help\n"
+               "     --version            Show package version\n"
+               , program_invocation_short_name);
+
+        return 0;
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+        };
+        static const struct option options[] = {
+                { "help",       no_argument,    NULL, 'h'               },
+                { "version",    no_argument,    NULL, ARG_VERSION       },
+                {},
+        };
+        int c;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
+                switch (c) {
+                case 'h':
+                        help();
+                        return 0;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0;
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option");
+                }
+
+        if (argc > optind) {
+                log_error("Too many arguments");
+                return -EINVAL;
+        }
+
+        return 1;
+}
+
+int main(int argc, char *argv[]) {
+        _cleanup_(evcat_freep) Evcat *e = NULL;
+        int r;
+
+        log_set_target(LOG_TARGET_AUTO);
+        log_parse_environment();
+        log_open();
+
+        setlocale(LC_ALL, "");
+        if (!is_locale_utf8())
+                log_warning("Locale is not set to UTF-8. Codepoints will not be printed!");
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto finish;
+
+        r = evcat_new(&e);
+        if (r < 0)
+                goto finish;
+
+        r = evcat_run(e);
+
+finish:
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/src/libsystemd-terminal/grdev-drm.c b/src/libsystemd-terminal/grdev-drm.c
new file mode 100644 (file)
index 0000000..dba6db2
--- /dev/null
@@ -0,0 +1,3082 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <unistd.h>
+
+/* Yuck! DRM headers need system headers included first.. but we have to
+ * include it before shared/missing.h to avoid redefining ioctl bits */
+#include <drm.h>
+#include <drm_fourcc.h>
+#include <drm_mode.h>
+
+#include "bus-util.h"
+#include "hashmap.h"
+#include "grdev.h"
+#include "grdev-internal.h"
+#include "macro.h"
+#include "udev-util.h"
+#include "util.h"
+
+#define GRDRM_MAX_TRIES (16)
+
+typedef struct grdrm_object grdrm_object;
+typedef struct grdrm_plane grdrm_plane;
+typedef struct grdrm_connector grdrm_connector;
+typedef struct grdrm_encoder grdrm_encoder;
+typedef struct grdrm_crtc grdrm_crtc;
+
+typedef struct grdrm_fb grdrm_fb;
+typedef struct grdrm_pipe grdrm_pipe;
+typedef struct grdrm_card grdrm_card;
+typedef struct unmanaged_card unmanaged_card;
+typedef struct managed_card managed_card;
+
+/*
+ * Objects
+ */
+
+enum {
+        GRDRM_TYPE_CRTC,
+        GRDRM_TYPE_ENCODER,
+        GRDRM_TYPE_CONNECTOR,
+        GRDRM_TYPE_PLANE,
+        GRDRM_TYPE_CNT
+};
+
+struct grdrm_object {
+        grdrm_card *card;
+        uint32_t id;
+        uint32_t index;
+        unsigned int type;
+        void (*free_fn) (grdrm_object *object);
+
+        bool present : 1;
+        bool assigned : 1;
+};
+
+struct grdrm_plane {
+        grdrm_object object;
+
+        struct {
+                uint32_t used_crtc;
+                uint32_t used_fb;
+                uint32_t gamma_size;
+
+                uint32_t n_crtcs;
+                uint32_t max_crtcs;
+                uint32_t *crtcs;
+                uint32_t n_formats;
+                uint32_t max_formats;
+                uint32_t *formats;
+        } kern;
+};
+
+struct grdrm_connector {
+        grdrm_object object;
+
+        struct {
+                uint32_t type;
+                uint32_t type_id;
+                uint32_t used_encoder;
+                uint32_t connection;
+                uint32_t mm_width;
+                uint32_t mm_height;
+                uint32_t subpixel;
+
+                uint32_t n_encoders;
+                uint32_t max_encoders;
+                uint32_t *encoders;
+                uint32_t n_modes;
+                uint32_t max_modes;
+                struct drm_mode_modeinfo *modes;
+                uint32_t n_props;
+                uint32_t max_props;
+                uint32_t *prop_ids;
+                uint64_t *prop_values;
+        } kern;
+};
+
+struct grdrm_encoder {
+        grdrm_object object;
+
+        struct {
+                uint32_t type;
+                uint32_t used_crtc;
+
+                uint32_t n_crtcs;
+                uint32_t max_crtcs;
+                uint32_t *crtcs;
+                uint32_t n_clones;
+                uint32_t max_clones;
+                uint32_t *clones;
+        } kern;
+};
+
+struct grdrm_crtc {
+        grdrm_object object;
+
+        struct {
+                uint32_t used_fb;
+                uint32_t fb_offset_x;
+                uint32_t fb_offset_y;
+                uint32_t gamma_size;
+
+                uint32_t n_used_connectors;
+                uint32_t max_used_connectors;
+                uint32_t *used_connectors;
+
+                bool mode_set;
+                struct drm_mode_modeinfo mode;
+        } kern;
+
+        struct {
+                bool set;
+                uint32_t fb;
+                uint32_t fb_x;
+                uint32_t fb_y;
+                uint32_t gamma;
+
+                uint32_t n_connectors;
+                uint32_t *connectors;
+
+                bool mode_set;
+                struct drm_mode_modeinfo mode;
+        } old;
+
+        struct {
+                struct drm_mode_modeinfo mode;
+                uint32_t n_connectors;
+                uint32_t max_connectors;
+                uint32_t *connectors;
+        } set;
+
+        grdrm_pipe *pipe;
+
+        bool applied : 1;
+};
+
+#define GRDRM_OBJECT_INIT(_card, _id, _index, _type, _free_fn) ((grdrm_object){ \
+                .card = (_card), \
+                .id = (_id), \
+                .index = (_index), \
+                .type = (_type), \
+                .free_fn = (_free_fn), \
+        })
+
+grdrm_object *grdrm_find_object(grdrm_card *card, uint32_t id);
+int grdrm_object_add(grdrm_object *object);
+grdrm_object *grdrm_object_free(grdrm_object *object);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdrm_object*, grdrm_object_free);
+
+int grdrm_plane_new(grdrm_plane **out, grdrm_card *card, uint32_t id, uint32_t index);
+int grdrm_connector_new(grdrm_connector **out, grdrm_card *card, uint32_t id, uint32_t index);
+int grdrm_encoder_new(grdrm_encoder **out, grdrm_card *card, uint32_t id, uint32_t index);
+int grdrm_crtc_new(grdrm_crtc **out, grdrm_card *card, uint32_t id, uint32_t index);
+
+#define plane_from_object(_obj) container_of((_obj), grdrm_plane, object)
+#define connector_from_object(_obj) container_of((_obj), grdrm_connector, object)
+#define encoder_from_object(_obj) container_of((_obj), grdrm_encoder, object)
+#define crtc_from_object(_obj) container_of((_obj), grdrm_crtc, object)
+
+/*
+ * Framebuffers
+ */
+
+struct grdrm_fb {
+        grdev_fb base;
+        grdrm_card *card;
+        uint32_t id;
+        uint32_t handles[4];
+        uint32_t offsets[4];
+        uint32_t sizes[4];
+        uint32_t flipid;
+};
+
+static int grdrm_fb_new(grdrm_fb **out, grdrm_card *card, const struct drm_mode_modeinfo *mode);
+grdrm_fb *grdrm_fb_free(grdrm_fb *fb);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdrm_fb*, grdrm_fb_free);
+
+#define fb_from_base(_fb) container_of((_fb), grdrm_fb, base)
+
+/*
+ * Pipes
+ */
+
+struct grdrm_pipe {
+        grdev_pipe base;
+        grdrm_crtc *crtc;
+        uint32_t counter;
+};
+
+#define grdrm_pipe_from_base(_e) container_of((_e), grdrm_pipe, base)
+
+#define GRDRM_PIPE_NAME_MAX (GRDRM_CARD_NAME_MAX + 1 + DECIMAL_STR_MAX(uint32_t))
+
+static const grdev_pipe_vtable grdrm_pipe_vtable;
+
+static int grdrm_pipe_new(grdrm_pipe **out, grdrm_crtc *crtc, struct drm_mode_modeinfo *mode, size_t n_fbs);
+
+/*
+ * Cards
+ */
+
+struct grdrm_card {
+        grdev_card base;
+
+        int fd;
+        sd_event_source *fd_src;
+
+        uint32_t n_crtcs;
+        uint32_t n_encoders;
+        uint32_t n_connectors;
+        uint32_t n_planes;
+        uint32_t max_ids;
+        Hashmap *object_map;
+
+        bool async_hotplug : 1;
+        bool hotplug : 1;
+        bool running : 1;
+        bool ready : 1;
+        bool cap_dumb : 1;
+        bool cap_monotonic : 1;
+};
+
+struct unmanaged_card {
+        grdrm_card card;
+        char *devnode;
+};
+
+struct managed_card {
+        grdrm_card card;
+        dev_t devnum;
+
+        sd_bus_slot *slot_pause_device;
+        sd_bus_slot *slot_resume_device;
+        sd_bus_slot *slot_take_device;
+
+        bool requested : 1;             /* TakeDevice() was sent */
+        bool acquired : 1;              /* TakeDevice() was successful */
+        bool master : 1;                /* we are DRM-Master */
+};
+
+#define grdrm_card_from_base(_e) container_of((_e), grdrm_card, base)
+#define unmanaged_card_from_base(_e) \
+        container_of(grdrm_card_from_base(_e), unmanaged_card, card)
+#define managed_card_from_base(_e) \
+        container_of(grdrm_card_from_base(_e), managed_card, card)
+
+#define GRDRM_CARD_INIT(_vtable, _session) ((grdrm_card){ \
+                .base = GRDEV_CARD_INIT((_vtable), (_session)), \
+                .fd = -1, \
+                .max_ids = 32, \
+        })
+
+#define GRDRM_CARD_NAME_MAX (6 + DECIMAL_STR_MAX(unsigned) * 2)
+
+static const grdev_card_vtable unmanaged_card_vtable;
+static const grdev_card_vtable managed_card_vtable;
+
+static int grdrm_card_open(grdrm_card *card, int dev_fd);
+static void grdrm_card_close(grdrm_card *card);
+static bool grdrm_card_async(grdrm_card *card, int r);
+
+/*
+ * The page-flip event of the kernel provides 64bit of arbitrary user-data. As
+ * drivers tend to drop events on intermediate deep mode-sets or because we
+ * might receive events during session activation, we try to avoid allocaing
+ * dynamic data on those events. Instead, we safe the CRTC id plus a 32bit
+ * counter in there. This way, we only get 32bit counters, not 64bit, but that
+ * should be more than enough. On the bright side, we no longer care whether we
+ * lose events. No memory leaks will occur.
+ * Modern DRM drivers might be fixed to no longer leak events, but we want to
+ * be safe. And associating dynamically allocated data with those events is
+ * kinda ugly, anyway.
+ */
+
+static uint64_t grdrm_encode_vblank_data(uint32_t id, uint32_t counter) {
+        return id | ((uint64_t)counter << 32);
+}
+
+static void grdrm_decode_vblank_data(uint64_t data, uint32_t *out_id, uint32_t *out_counter) {
+        if (out_id)
+                *out_id = data & 0xffffffffU;
+        if (out_counter)
+                *out_counter = (data >> 32) & 0xffffffffU;
+}
+
+static bool grdrm_modes_compatible(const struct drm_mode_modeinfo *a, const struct drm_mode_modeinfo *b) {
+        assert(a);
+        assert(b);
+
+        /* Test whether both modes are compatible according to our internal
+         * assumptions on modes. This comparison is highly dependent on how
+         * we treat modes in grdrm. If we export mode details, we need to
+         * make this comparison much stricter. */
+
+        if (a->hdisplay != b->hdisplay)
+                return false;
+        if (a->vdisplay != b->vdisplay)
+                return false;
+        if (a->vrefresh != b->vrefresh)
+                return false;
+
+        return true;
+}
+
+/*
+ * Objects
+ */
+
+grdrm_object *grdrm_find_object(grdrm_card *card, uint32_t id) {
+        assert_return(card, NULL);
+
+        return id > 0 ? hashmap_get(card->object_map, UINT32_TO_PTR(id)) : NULL;
+}
+
+int grdrm_object_add(grdrm_object *object) {
+        int r;
+
+        assert(object);
+        assert(object->card);
+        assert(object->id > 0);
+        assert(IN_SET(object->type, GRDRM_TYPE_CRTC, GRDRM_TYPE_ENCODER, GRDRM_TYPE_CONNECTOR, GRDRM_TYPE_PLANE));
+        assert(object->free_fn);
+
+        if (object->index >= 32)
+                log_debug("grdrm: %s: object index exceeds 32bit masks: type=%u, index=%" PRIu32,
+                          object->card->base.name, object->type, object->index);
+
+        r = hashmap_put(object->card->object_map, UINT32_TO_PTR(object->id), object);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+grdrm_object *grdrm_object_free(grdrm_object *object) {
+        if (!object)
+                return NULL;
+
+        assert(object->card);
+        assert(object->id > 0);
+        assert(IN_SET(object->type, GRDRM_TYPE_CRTC, GRDRM_TYPE_ENCODER, GRDRM_TYPE_CONNECTOR, GRDRM_TYPE_PLANE));
+        assert(object->free_fn);
+
+        hashmap_remove_value(object->card->object_map, UINT32_TO_PTR(object->id), object);
+
+        object->free_fn(object);
+        return NULL;
+}
+
+/*
+ * Planes
+ */
+
+static void plane_free(grdrm_object *object) {
+        grdrm_plane *plane = plane_from_object(object);
+
+        free(plane->kern.formats);
+        free(plane->kern.crtcs);
+        free(plane);
+}
+
+int grdrm_plane_new(grdrm_plane **out, grdrm_card *card, uint32_t id, uint32_t index) {
+        _cleanup_(grdrm_object_freep) grdrm_object *object = NULL;
+        grdrm_plane *plane;
+        int r;
+
+        assert(card);
+
+        plane = new0(grdrm_plane, 1);
+        if (!plane)
+                return -ENOMEM;
+
+        object = &plane->object;
+        *object = GRDRM_OBJECT_INIT(card, id, index, GRDRM_TYPE_PLANE, plane_free);
+
+        plane->kern.max_crtcs = 32;
+        plane->kern.crtcs = new0(uint32_t, plane->kern.max_crtcs);
+        if (!plane->kern.crtcs)
+                return -ENOMEM;
+
+        plane->kern.max_formats = 32;
+        plane->kern.formats = new0(uint32_t, plane->kern.max_formats);
+        if (!plane->kern.formats)
+                return -ENOMEM;
+
+        r = grdrm_object_add(object);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = plane;
+        object = NULL;
+        return 0;
+}
+
+static int grdrm_plane_resync(grdrm_plane *plane) {
+        grdrm_card *card = plane->object.card;
+        size_t tries;
+        int r;
+
+        assert(plane);
+
+        for (tries = 0; tries < GRDRM_MAX_TRIES; ++tries) {
+                struct drm_mode_get_plane res;
+                grdrm_object *object;
+                bool resized = false;
+                Iterator iter;
+
+                zero(res);
+                res.plane_id = plane->object.id;
+                res.format_type_ptr = PTR_TO_UINT64(plane->kern.formats);
+                res.count_format_types = plane->kern.max_formats;
+
+                r = ioctl(card->fd, DRM_IOCTL_MODE_GETPLANE, &res);
+                if (r < 0) {
+                        r = -errno;
+                        if (r == -ENOENT) {
+                                card->async_hotplug = true;
+                                r = 0;
+                                log_debug("grdrm: %s: plane %u removed during resync", card->base.name, plane->object.id);
+                        } else {
+                                log_debug("grdrm: %s: cannot retrieve plane %u: %m", card->base.name, plane->object.id);
+                        }
+
+                        return r;
+                }
+
+                plane->kern.n_crtcs = 0;
+                memzero(plane->kern.crtcs, sizeof(uint32_t) * plane->kern.max_crtcs);
+
+                HASHMAP_FOREACH(object, card->object_map, iter) {
+                        if (object->type != GRDRM_TYPE_CRTC || object->index >= 32)
+                                continue;
+                        if (!(res.possible_crtcs & (1 << object->index)))
+                                continue;
+                        if (plane->kern.n_crtcs >= 32) {
+                                log_debug("grdrm: %s: possible_crtcs of plane %" PRIu32 " exceeds 32bit mask",
+                                          card->base.name, plane->object.id);
+                                continue;
+                        }
+
+                        plane->kern.crtcs[plane->kern.n_crtcs++] = object->id;
+                }
+
+                if (res.count_format_types > plane->kern.max_formats) {
+                        uint32_t max, *t;
+
+                        max = ALIGN_POWER2(res.count_format_types);
+                        if (!max || max > UINT16_MAX) {
+                                log_debug("grdrm: %s: excessive plane resource limit: %" PRIu32, card->base.name, max);
+                                return -ERANGE;
+                        }
+
+                        t = realloc(plane->kern.formats, sizeof(*t) * max);
+                        if (!t)
+                                return -ENOMEM;
+
+                        plane->kern.formats = t;
+                        plane->kern.max_formats = max;
+                        resized = true;
+                }
+
+                if (resized)
+                        continue;
+
+                plane->kern.n_formats = res.count_format_types;
+                plane->kern.used_crtc = res.crtc_id;
+                plane->kern.used_fb = res.fb_id;
+                plane->kern.gamma_size = res.gamma_size;
+
+                break;
+        }
+
+        if (tries >= GRDRM_MAX_TRIES) {
+                log_debug("grdrm: %s: plane %u not settled for retrieval", card->base.name, plane->object.id);
+                return -EFAULT;
+        }
+
+        return 0;
+}
+
+/*
+ * Connectors
+ */
+
+static void connector_free(grdrm_object *object) {
+        grdrm_connector *connector = connector_from_object(object);
+
+        free(connector->kern.prop_values);
+        free(connector->kern.prop_ids);
+        free(connector->kern.modes);
+        free(connector->kern.encoders);
+        free(connector);
+}
+
+int grdrm_connector_new(grdrm_connector **out, grdrm_card *card, uint32_t id, uint32_t index) {
+        _cleanup_(grdrm_object_freep) grdrm_object *object = NULL;
+        grdrm_connector *connector;
+        int r;
+
+        assert(card);
+
+        connector = new0(grdrm_connector, 1);
+        if (!connector)
+                return -ENOMEM;
+
+        object = &connector->object;
+        *object = GRDRM_OBJECT_INIT(card, id, index, GRDRM_TYPE_CONNECTOR, connector_free);
+
+        connector->kern.max_encoders = 32;
+        connector->kern.encoders = new0(uint32_t, connector->kern.max_encoders);
+        if (!connector->kern.encoders)
+                return -ENOMEM;
+
+        connector->kern.max_modes = 32;
+        connector->kern.modes = new0(struct drm_mode_modeinfo, connector->kern.max_modes);
+        if (!connector->kern.modes)
+                return -ENOMEM;
+
+        connector->kern.max_props = 32;
+        connector->kern.prop_ids = new0(uint32_t, connector->kern.max_props);
+        connector->kern.prop_values = new0(uint64_t, connector->kern.max_props);
+        if (!connector->kern.prop_ids || !connector->kern.prop_values)
+                return -ENOMEM;
+
+        r = grdrm_object_add(object);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = connector;
+        object = NULL;
+        return 0;
+}
+
+static int grdrm_connector_resync(grdrm_connector *connector) {
+        grdrm_card *card = connector->object.card;
+        size_t tries;
+        int r;
+
+        assert(connector);
+
+        for (tries = 0; tries < GRDRM_MAX_TRIES; ++tries) {
+                struct drm_mode_get_connector res;
+                bool resized = false;
+                uint32_t max;
+
+                zero(res);
+                res.connector_id = connector->object.id;
+                res.encoders_ptr = PTR_TO_UINT64(connector->kern.encoders);
+                res.props_ptr = PTR_TO_UINT64(connector->kern.prop_ids);
+                res.prop_values_ptr = PTR_TO_UINT64(connector->kern.prop_values);
+                res.count_encoders = connector->kern.max_encoders;
+                res.count_props = connector->kern.max_props;
+
+                /* The kernel reads modes from the EDID information only if we
+                 * pass count_modes==0. This is a legacy hack for libdrm (which
+                 * called every ioctl twice). Now we have to adopt.. *sigh*.
+                 * If we never received an hotplug event, there's no reason to
+                 * sync modes. EDID reads are heavy, so skip that if not
+                 * required. */
+                if (card->hotplug) {
+                        if (tries > 0) {
+                                res.modes_ptr = PTR_TO_UINT64(connector->kern.modes);
+                                res.count_modes = connector->kern.max_modes;
+                        } else {
+                                resized = true;
+                        }
+                }
+
+                r = ioctl(card->fd, DRM_IOCTL_MODE_GETCONNECTOR, &res);
+                if (r < 0) {
+                        r = -errno;
+                        if (r == -ENOENT) {
+                                card->async_hotplug = true;
+                                r = 0;
+                                log_debug("grdrm: %s: connector %u removed during resync", card->base.name, connector->object.id);
+                        } else {
+                                log_debug("grdrm: %s: cannot retrieve connector %u: %m", card->base.name, connector->object.id);
+                        }
+
+                        return r;
+                }
+
+                if (res.count_encoders > connector->kern.max_encoders) {
+                        uint32_t *t;
+
+                        max = ALIGN_POWER2(res.count_encoders);
+                        if (!max || max > UINT16_MAX) {
+                                log_debug("grdrm: %s: excessive connector resource limit: %" PRIu32, card->base.name, max);
+                                return -ERANGE;
+                        }
+
+                        t = realloc(connector->kern.encoders, sizeof(*t) * max);
+                        if (!t)
+                                return -ENOMEM;
+
+                        connector->kern.encoders = t;
+                        connector->kern.max_encoders = max;
+                        resized = true;
+                }
+
+                if (res.count_modes > connector->kern.max_modes) {
+                        struct drm_mode_modeinfo *t;
+
+                        max = ALIGN_POWER2(res.count_modes);
+                        if (!max || max > UINT16_MAX) {
+                                log_debug("grdrm: %s: excessive connector resource limit: %" PRIu32, card->base.name, max);
+                                return -ERANGE;
+                        }
+
+                        t = realloc(connector->kern.modes, sizeof(*t) * max);
+                        if (!t)
+                                return -ENOMEM;
+
+                        connector->kern.modes = t;
+                        connector->kern.max_modes = max;
+                        resized = true;
+                }
+
+                if (res.count_props > connector->kern.max_props) {
+                        uint32_t *tids;
+                        uint64_t *tvals;
+
+                        max = ALIGN_POWER2(res.count_props);
+                        if (!max || max > UINT16_MAX) {
+                                log_debug("grdrm: %s: excessive connector resource limit: %" PRIu32, card->base.name, max);
+                                return -ERANGE;
+                        }
+
+                        tids = realloc(connector->kern.prop_ids, sizeof(*tids) * max);
+                        if (!tids)
+                                return -ENOMEM;
+                        connector->kern.prop_ids = tids;
+
+                        tvals = realloc(connector->kern.prop_values, sizeof(*tvals) * max);
+                        if (!tvals)
+                                return -ENOMEM;
+                        connector->kern.prop_values = tvals;
+
+                        connector->kern.max_props = max;
+                        resized = true;
+                }
+
+                if (resized)
+                        continue;
+
+                connector->kern.n_encoders = res.count_encoders;
+                connector->kern.n_props = res.count_props;
+                connector->kern.type = res.connector_type;
+                connector->kern.type_id = res.connector_type_id;
+                connector->kern.used_encoder = res.encoder_id;
+                connector->kern.connection = res.connection;
+                connector->kern.mm_width = res.mm_width;
+                connector->kern.mm_height = res.mm_height;
+                connector->kern.subpixel = res.subpixel;
+                if (res.modes_ptr == PTR_TO_UINT64(connector->kern.modes))
+                        connector->kern.n_modes = res.count_modes;
+
+                break;
+        }
+
+        if (tries >= GRDRM_MAX_TRIES) {
+                log_debug("grdrm: %s: connector %u not settled for retrieval", card->base.name, connector->object.id);
+                return -EFAULT;
+        }
+
+        return 0;
+}
+
+/*
+ * Encoders
+ */
+
+static void encoder_free(grdrm_object *object) {
+        grdrm_encoder *encoder = encoder_from_object(object);
+
+        free(encoder->kern.clones);
+        free(encoder->kern.crtcs);
+        free(encoder);
+}
+
+int grdrm_encoder_new(grdrm_encoder **out, grdrm_card *card, uint32_t id, uint32_t index) {
+        _cleanup_(grdrm_object_freep) grdrm_object *object = NULL;
+        grdrm_encoder *encoder;
+        int r;
+
+        assert(card);
+
+        encoder = new0(grdrm_encoder, 1);
+        if (!encoder)
+                return -ENOMEM;
+
+        object = &encoder->object;
+        *object = GRDRM_OBJECT_INIT(card, id, index, GRDRM_TYPE_ENCODER, encoder_free);
+
+        encoder->kern.max_crtcs = 32;
+        encoder->kern.crtcs = new0(uint32_t, encoder->kern.max_crtcs);
+        if (!encoder->kern.crtcs)
+                return -ENOMEM;
+
+        encoder->kern.max_clones = 32;
+        encoder->kern.clones = new0(uint32_t, encoder->kern.max_clones);
+        if (!encoder->kern.clones)
+                return -ENOMEM;
+
+        r = grdrm_object_add(object);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = encoder;
+        object = NULL;
+        return 0;
+}
+
+static int grdrm_encoder_resync(grdrm_encoder *encoder) {
+        grdrm_card *card = encoder->object.card;
+        struct drm_mode_get_encoder res;
+        grdrm_object *object;
+        Iterator iter;
+        int r;
+
+        assert(encoder);
+
+        zero(res);
+        res.encoder_id = encoder->object.id;
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_GETENCODER, &res);
+        if (r < 0) {
+                r = -errno;
+                if (r == -ENOENT) {
+                        card->async_hotplug = true;
+                        r = 0;
+                        log_debug("grdrm: %s: encoder %u removed during resync", card->base.name, encoder->object.id);
+                } else {
+                        log_debug("grdrm: %s: cannot retrieve encoder %u: %m", card->base.name, encoder->object.id);
+                }
+
+                return r;
+        }
+
+        encoder->kern.type = res.encoder_type;
+        encoder->kern.used_crtc = res.crtc_id;
+
+        encoder->kern.n_crtcs = 0;
+        memzero(encoder->kern.crtcs, sizeof(uint32_t) * encoder->kern.max_crtcs);
+
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (object->type != GRDRM_TYPE_CRTC || object->index >= 32)
+                        continue;
+                if (!(res.possible_crtcs & (1 << object->index)))
+                        continue;
+                if (encoder->kern.n_crtcs >= 32) {
+                        log_debug("grdrm: %s: possible_crtcs exceeds 32bit mask", card->base.name);
+                        continue;
+                }
+
+                encoder->kern.crtcs[encoder->kern.n_crtcs++] = object->id;
+        }
+
+        encoder->kern.n_clones = 0;
+        memzero(encoder->kern.clones, sizeof(uint32_t) * encoder->kern.max_clones);
+
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (object->type != GRDRM_TYPE_ENCODER || object->index >= 32)
+                        continue;
+                if (!(res.possible_clones & (1 << object->index)))
+                        continue;
+                if (encoder->kern.n_clones >= 32) {
+                        log_debug("grdrm: %s: possible_encoders exceeds 32bit mask", card->base.name);
+                        continue;
+                }
+
+                encoder->kern.clones[encoder->kern.n_clones++] = object->id;
+        }
+
+        return 0;
+}
+
+/*
+ * Crtcs
+ */
+
+static void crtc_free(grdrm_object *object) {
+        grdrm_crtc *crtc = crtc_from_object(object);
+
+        if (crtc->pipe)
+                grdev_pipe_free(&crtc->pipe->base);
+        free(crtc->set.connectors);
+        free(crtc->old.connectors);
+        free(crtc->kern.used_connectors);
+        free(crtc);
+}
+
+int grdrm_crtc_new(grdrm_crtc **out, grdrm_card *card, uint32_t id, uint32_t index) {
+        _cleanup_(grdrm_object_freep) grdrm_object *object = NULL;
+        grdrm_crtc *crtc;
+        int r;
+
+        assert(card);
+
+        crtc = new0(grdrm_crtc, 1);
+        if (!crtc)
+                return -ENOMEM;
+
+        object = &crtc->object;
+        *object = GRDRM_OBJECT_INIT(card, id, index, GRDRM_TYPE_CRTC, crtc_free);
+
+        crtc->kern.max_used_connectors = 32;
+        crtc->kern.used_connectors = new0(uint32_t, crtc->kern.max_used_connectors);
+        if (!crtc->kern.used_connectors)
+                return -ENOMEM;
+
+        crtc->old.connectors = new0(uint32_t, crtc->kern.max_used_connectors);
+        if (!crtc->old.connectors)
+                return -ENOMEM;
+
+        r = grdrm_object_add(object);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = crtc;
+        object = NULL;
+        return 0;
+}
+
+static int grdrm_crtc_resync(grdrm_crtc *crtc) {
+        grdrm_card *card = crtc->object.card;
+        struct drm_mode_crtc res = { .crtc_id = crtc->object.id };
+        int r;
+
+        assert(crtc);
+
+        /* make sure we can cache any combination later */
+        if (card->n_connectors > crtc->kern.max_used_connectors) {
+                uint32_t max, *t;
+
+                max = ALIGN_POWER2(card->n_connectors);
+                if (!max)
+                        return -ENOMEM;
+
+                t = realloc_multiply(crtc->kern.used_connectors, sizeof(*t), max);
+                if (!t)
+                        return -ENOMEM;
+
+                crtc->kern.used_connectors = t;
+                crtc->kern.max_used_connectors = max;
+
+                if (!crtc->old.set) {
+                        crtc->old.connectors = calloc(sizeof(*t), max);
+                        if (!crtc->old.connectors)
+                                return -ENOMEM;
+                }
+        }
+
+        /* GETCRTC doesn't return connectors. We have to read all
+         * encoder-state and deduce the setup ourselves.. */
+        crtc->kern.n_used_connectors = 0;
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_GETCRTC, &res);
+        if (r < 0) {
+                r = -errno;
+                if (r == -ENOENT) {
+                        card->async_hotplug = true;
+                        r = 0;
+                        log_debug("grdrm: %s: crtc %u removed during resync", card->base.name, crtc->object.id);
+                } else {
+                        log_debug("grdrm: %s: cannot retrieve crtc %u: %m", card->base.name, crtc->object.id);
+                }
+
+                return r;
+        }
+
+        crtc->kern.used_fb = res.fb_id;
+        crtc->kern.fb_offset_x = res.x;
+        crtc->kern.fb_offset_y = res.y;
+        crtc->kern.gamma_size = res.gamma_size;
+        crtc->kern.mode_set = res.mode_valid;
+        crtc->kern.mode = res.mode;
+
+        return 0;
+}
+
+static void grdrm_crtc_assign(grdrm_crtc *crtc, grdrm_connector *connector) {
+        uint32_t n_connectors;
+        int r;
+
+        assert(crtc);
+        assert(!crtc->object.assigned);
+        assert(!connector || !connector->object.assigned);
+
+        /* always mark both as assigned; even if assignments cannot be set */
+        crtc->object.assigned = true;
+        if (connector)
+                connector->object.assigned = true;
+
+        /* we will support hw clone mode in the future */
+        n_connectors = connector ? 1 : 0;
+
+        /* bail out if configuration is preserved */
+        if (crtc->set.n_connectors == n_connectors &&
+            (n_connectors == 0 || crtc->set.connectors[0] == connector->object.id))
+                return;
+
+        crtc->applied = false;
+        crtc->set.n_connectors = 0;
+
+        if (n_connectors > crtc->set.max_connectors) {
+                uint32_t max, *t;
+
+                max = ALIGN_POWER2(n_connectors);
+                if (!max) {
+                        r = -ENOMEM;
+                        goto error;
+                }
+
+                t = realloc(crtc->set.connectors, sizeof(*t) * max);
+                if (!t) {
+                        r = -ENOMEM;
+                        goto error;
+                }
+
+                crtc->set.connectors = t;
+                crtc->set.max_connectors = max;
+        }
+
+        if (connector) {
+                struct drm_mode_modeinfo *m, *pref = NULL;
+                uint32_t i;
+
+                for (i = 0; i < connector->kern.n_modes; ++i) {
+                        m = &connector->kern.modes[i];
+
+                        /* ignore 3D modes by default */
+                        if (m->flags & DRM_MODE_FLAG_3D_MASK)
+                                continue;
+
+                        if (!pref) {
+                                pref = m;
+                                continue;
+                        }
+
+                        /* use PREFERRED over non-PREFERRED */
+                        if ((pref->type & DRM_MODE_TYPE_PREFERRED) &&
+                            !(m->type & DRM_MODE_TYPE_PREFERRED))
+                                continue;
+
+                        /* use DRIVER over non-PREFERRED|DRIVER */
+                        if ((pref->type & DRM_MODE_TYPE_DRIVER) &&
+                            !(m->type & (DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED)))
+                                continue;
+
+                        /* always prefer higher resolution */
+                        if (pref->hdisplay > m->hdisplay ||
+                            (pref->hdisplay == m->hdisplay && pref->vdisplay > m->vdisplay))
+                                continue;
+
+                        pref = m;
+                }
+
+                if (pref) {
+                        crtc->set.mode = *pref;
+                        crtc->set.n_connectors = 1;
+                        crtc->set.connectors[0] = connector->object.id;
+                        log_debug("grdrm: %s: assigned connector %" PRIu32 " to crtc %" PRIu32 " with mode %s",
+                                  crtc->object.card->base.name, connector->object.id, crtc->object.id, pref->name);
+                } else {
+                        log_debug("grdrm: %s: connector %" PRIu32 " to be assigned but has no valid mode",
+                                  crtc->object.card->base.name, connector->object.id);
+                }
+        }
+
+        return;
+
+error:
+        log_debug("grdrm: %s: cannot assign crtc %" PRIu32 ": %s",
+                  crtc->object.card->base.name, crtc->object.id, strerror(-r));
+}
+
+static void grdrm_crtc_expose(grdrm_crtc *crtc) {
+        grdrm_pipe *pipe;
+        grdrm_fb *fb;
+        size_t i;
+        int r;
+
+        assert(crtc);
+        assert(crtc->object.assigned);
+
+        if (crtc->set.n_connectors < 1) {
+                if (crtc->pipe)
+                        grdev_pipe_free(&crtc->pipe->base);
+                crtc->pipe = NULL;
+                return;
+        }
+
+        pipe = crtc->pipe;
+        if (pipe) {
+                if (pipe->base.width != crtc->set.mode.hdisplay ||
+                    pipe->base.height != crtc->set.mode.vdisplay ||
+                    pipe->base.vrefresh != crtc->set.mode.vrefresh) {
+                        grdev_pipe_free(&pipe->base);
+                        crtc->pipe = NULL;
+                        pipe = NULL;
+                }
+        }
+
+        if (crtc->pipe) {
+                pipe->base.front = NULL;
+                pipe->base.back = NULL;
+                for (i = 0; i < pipe->base.max_fbs; ++i) {
+                        fb = fb_from_base(pipe->base.fbs[i]);
+                        if (fb->id == crtc->kern.used_fb)
+                                pipe->base.front = &fb->base;
+                        else if (!fb->flipid)
+                                pipe->base.back = &fb->base;
+                }
+        } else {
+                r = grdrm_pipe_new(&pipe, crtc, &crtc->set.mode, 2);
+                if (r < 0) {
+                        log_debug("grdrm: %s: cannot create pipe for crtc %" PRIu32 ": %s",
+                                  crtc->object.card->base.name, crtc->object.id, strerror(-r));
+                        return;
+                }
+
+                for (i = 0; i < pipe->base.max_fbs; ++i) {
+                        r = grdrm_fb_new(&fb, crtc->object.card, &crtc->set.mode);
+                        if (r < 0) {
+                                log_debug("grdrm: %s: cannot allocate framebuffer for crtc %" PRIu32 ": %s",
+                                          crtc->object.card->base.name, crtc->object.id, strerror(-r));
+                                grdev_pipe_free(&pipe->base);
+                                return;
+                        }
+
+                        pipe->base.fbs[i] = &fb->base;
+                }
+
+                pipe->base.front = NULL;
+                pipe->base.back = pipe->base.fbs[0];
+                crtc->pipe = pipe;
+        }
+
+        grdev_pipe_ready(&crtc->pipe->base, true);
+}
+
+static void grdrm_crtc_commit_deep(grdrm_crtc *crtc, grdev_fb *basefb) {
+        struct drm_mode_crtc set_crtc = { .crtc_id = crtc->object.id };
+        grdrm_card *card = crtc->object.card;
+        grdrm_pipe *pipe = crtc->pipe;
+        grdrm_fb *fb;
+        int r;
+
+        assert(crtc);
+        assert(basefb);
+        assert(pipe);
+
+        fb = fb_from_base(basefb);
+
+        set_crtc.set_connectors_ptr = PTR_TO_UINT64(crtc->set.connectors);
+        set_crtc.count_connectors = crtc->set.n_connectors;
+        set_crtc.fb_id = fb->id;
+        set_crtc.x = 0;
+        set_crtc.y = 0;
+        set_crtc.mode_valid = 1;
+        set_crtc.mode = crtc->set.mode;
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_SETCRTC, &set_crtc);
+        if (r < 0) {
+                r = -errno;
+                log_debug("grdrm: %s: cannot set crtc %" PRIu32 ": %m",
+                          card->base.name, crtc->object.id);
+
+                grdrm_card_async(card, r);
+                return;
+        }
+
+        if (!crtc->applied) {
+                log_debug("grdrm: %s: crtc %" PRIu32 " applied via deep modeset",
+                          card->base.name, crtc->object.id);
+                crtc->applied = true;
+        }
+
+        pipe->base.back = NULL;
+        pipe->base.front = &fb->base;
+        fb->flipid = 0;
+        ++pipe->counter;
+        pipe->base.flipping = false;
+        pipe->base.flip = false;
+
+        /* We cannot schedule dummy page-flips on pipes, hence, the
+         * application would have to schedule their own frame-timers.
+         * To avoid duplicating that everywhere, we schedule our own
+         * timer and raise a fake FRAME event when it fires. */
+        grdev_pipe_schedule(&pipe->base, 1);
+}
+
+static int grdrm_crtc_commit_flip(grdrm_crtc *crtc, grdev_fb *basefb) {
+        struct drm_mode_crtc_page_flip page_flip = { .crtc_id = crtc->object.id };
+        grdrm_card *card = crtc->object.card;
+        grdrm_pipe *pipe = crtc->pipe;
+        grdrm_fb *fb;
+        uint32_t cnt;
+        int r;
+
+        assert(crtc);
+        assert(basefb);
+        assert(pipe);
+
+        if (!crtc->applied) {
+                if (!grdrm_modes_compatible(&crtc->kern.mode, &crtc->set.mode))
+                        return 0;
+
+                /* TODO: Theoretically, we should be able to page-flip to our
+                 * framebuffer here. We didn't perform any deep modeset, but the
+                 * DRM driver is really supposed to reject our page-flip in case
+                 * the FB is not compatible. We then properly fall back to a
+                 * deep modeset.
+                 * As it turns out, drivers don't to this. Therefore, we need to
+                 * perform a full modeset on enter now. We might avoid this in
+                 * the future with fixed drivers.. */
+
+                return 0;
+        }
+
+        fb = fb_from_base(basefb);
+
+        cnt = ++pipe->counter ? : ++pipe->counter;
+        page_flip.fb_id = fb->id;
+        page_flip.flags = DRM_MODE_PAGE_FLIP_EVENT;
+        page_flip.user_data = grdrm_encode_vblank_data(crtc->object.id, cnt);
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_PAGE_FLIP, &page_flip);
+        if (r < 0) {
+                r = -errno;
+                /* Avoid excessive logging on EINVAL; it is currently not
+                 * possible to see whether cards support page-flipping, so
+                 * avoid logging on each frame. */
+                if (r != -EINVAL)
+                        log_debug("grdrm: %s: cannot schedule page-flip on crtc %" PRIu32 ": %m",
+                                  card->base.name, crtc->object.id);
+
+                if (grdrm_card_async(card, r))
+                        return r;
+
+                return 0;
+        }
+
+        if (!crtc->applied) {
+                log_debug("grdrm: %s: crtc %" PRIu32 " applied via page flip",
+                          card->base.name, crtc->object.id);
+                crtc->applied = true;
+        }
+
+        pipe->base.flipping = true;
+        pipe->base.flip = false;
+        pipe->counter = cnt;
+        fb->flipid = cnt;
+        pipe->base.back = NULL;
+
+        /* Raise fake FRAME event if it takes longer than 2
+         * frames to receive the pageflip event. We assume the
+         * queue ran over or some other error happened. */
+        grdev_pipe_schedule(&pipe->base, 2);
+
+        return 1;
+}
+
+static void grdrm_crtc_commit(grdrm_crtc *crtc) {
+        struct drm_mode_crtc set_crtc = { .crtc_id = crtc->object.id };
+        grdrm_card *card = crtc->object.card;
+        grdrm_pipe *pipe;
+        grdev_fb *fb;
+        int r;
+
+        assert(crtc);
+        assert(crtc->object.assigned);
+
+        pipe = crtc->pipe;
+        if (!pipe) {
+                /* If a crtc is not assigned any connector, we want any
+                 * previous setup to be cleared, so make sure the CRTC is
+                 * disabled. Otherwise, there might be content on the CRTC
+                 * while we run, which is not what we want.
+                 * If you want to avoid modesets on specific CRTCs, you should
+                 * still keep their assignment, but never enable the resulting
+                 * pipe. This way, we wouldn't touch it at all. */
+                if (!crtc->applied) {
+                        crtc->applied = true;
+                        r = ioctl(card->fd, DRM_IOCTL_MODE_SETCRTC, &set_crtc);
+                        if (r < 0) {
+                                r = -errno;
+                                log_debug("grdrm: %s: cannot shutdown crtc %" PRIu32 ": %m",
+                                          card->base.name, crtc->object.id);
+
+                                grdrm_card_async(card, r);
+                                return;
+                        }
+
+                        log_debug("grdrm: %s: crtc %" PRIu32 " applied via shutdown",
+                                  card->base.name, crtc->object.id);
+                }
+
+                return;
+        }
+
+        /* we always fully ignore disabled pipes */
+        if (!pipe->base.enabled)
+                return;
+
+        assert(crtc->set.n_connectors > 0);
+
+        if (pipe->base.flip)
+                fb = pipe->base.back;
+        else if (!crtc->applied)
+                fb = pipe->base.front;
+        else
+                return;
+
+        if (!fb)
+                return;
+
+        r = grdrm_crtc_commit_flip(crtc, fb);
+        if (r == 0) {
+                /* in case we couldn't page-flip, perform deep modeset */
+                grdrm_crtc_commit_deep(crtc, fb);
+        }
+}
+
+static void grdrm_crtc_restore(grdrm_crtc *crtc) {
+        struct drm_mode_crtc set_crtc = { .crtc_id = crtc->object.id };
+        grdrm_card *card = crtc->object.card;
+        int r;
+
+        if (!crtc->old.set)
+                return;
+
+        set_crtc.set_connectors_ptr = PTR_TO_UINT64(crtc->old.connectors);
+        set_crtc.count_connectors = crtc->old.n_connectors;
+        set_crtc.fb_id = crtc->old.fb;
+        set_crtc.x = crtc->old.fb_x;
+        set_crtc.y = crtc->old.fb_y;
+        set_crtc.gamma_size = crtc->old.gamma;
+        set_crtc.mode_valid = crtc->old.mode_set;
+        set_crtc.mode = crtc->old.mode;
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_SETCRTC, &set_crtc);
+        if (r < 0) {
+                r = -errno;
+                log_debug("grdrm: %s: cannot restore crtc %" PRIu32 ": %m",
+                          card->base.name, crtc->object.id);
+
+                grdrm_card_async(card, r);
+                return;
+        }
+
+        if (crtc->pipe) {
+                ++crtc->pipe->counter;
+                crtc->pipe->base.front = NULL;
+                crtc->pipe->base.flipping = false;
+        }
+
+        log_debug("grdrm: %s: crtc %" PRIu32 " restored", card->base.name, crtc->object.id);
+}
+
+static void grdrm_crtc_flip_complete(grdrm_crtc *crtc, uint32_t counter, struct drm_event_vblank *event) {
+        bool flipped = false;
+        grdrm_pipe *pipe;
+        size_t i;
+
+        assert(crtc);
+        assert(event);
+
+        pipe = crtc->pipe;
+        if (!pipe)
+                return;
+
+        /* We got a page-flip event. To be safe, we reset all FBs on the same
+         * pipe that have smaller flipids than the flip we got as we know they
+         * are executed in order. We need to do this to guarantee
+         * queue-overflows or other missed events don't cause starvation.
+         * Furthermore, if we find the exact FB this event is for, *and* this
+         * is the most recent event, we mark it as front FB and raise a
+         * frame event. */
+
+        for (i = 0; i < pipe->base.max_fbs; ++i) {
+                grdrm_fb *fb;
+
+                if (!pipe->base.fbs[i])
+                        continue;
+
+                fb = fb_from_base(pipe->base.fbs[i]);
+                if (counter != 0 && counter == pipe->counter && fb->flipid == counter) {
+                        pipe->base.front = &fb->base;
+                        fb->flipid = 0;
+                        flipped = true;
+                } else if (counter - fb->flipid < UINT16_MAX) {
+                        fb->flipid = 0;
+                }
+        }
+
+        if (flipped) {
+                crtc->pipe->base.flipping = false;
+                grdev_pipe_frame(&pipe->base);
+        }
+}
+
+/*
+ * Framebuffers
+ */
+
+static int grdrm_fb_new(grdrm_fb **out, grdrm_card *card, const struct drm_mode_modeinfo *mode) {
+        _cleanup_(grdrm_fb_freep) grdrm_fb *fb = NULL;
+        struct drm_mode_create_dumb create_dumb = { };
+        struct drm_mode_map_dumb map_dumb = { };
+        struct drm_mode_fb_cmd2 add_fb = { };
+        unsigned int i;
+        int r;
+
+        assert_return(out, -EINVAL);
+        assert_return(card, -EINVAL);
+
+        fb = new0(grdrm_fb, 1);
+        if (!fb)
+                return -ENOMEM;
+
+        /* TODO: we should choose a compatible format of the previous CRTC
+         * setting to allow page-flip to it. Only choose fallback if the
+         * previous setting was crap (non xrgb32'ish). */
+
+        fb->card = card;
+        fb->base.format = DRM_FORMAT_XRGB8888;
+        fb->base.width = mode->hdisplay;
+        fb->base.height = mode->vdisplay;
+
+        for (i = 0; i < ELEMENTSOF(fb->base.maps); ++i)
+                fb->base.maps[i] = MAP_FAILED;
+
+        create_dumb.width = fb->base.width;
+        create_dumb.height = fb->base.height;
+        create_dumb.bpp = 32;
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_CREATE_DUMB, &create_dumb);
+        if (r < 0) {
+                r = -errno;
+                log_debug("grdrm: %s: cannot create dumb buffer %" PRIu32 "x%" PRIu32": %m",
+                          card->base.name, fb->base.width, fb->base.height);
+                return r;
+        }
+
+        fb->handles[0] = create_dumb.handle;
+        fb->base.strides[0] = create_dumb.pitch;
+        fb->sizes[0] = create_dumb.size;
+
+        map_dumb.handle = fb->handles[0];
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_MAP_DUMB, &map_dumb);
+        if (r < 0) {
+                r = -errno;
+                log_debug("grdrm: %s: cannot map dumb buffer %" PRIu32 "x%" PRIu32": %m",
+                          card->base.name, fb->base.width, fb->base.height);
+                return r;
+        }
+
+        fb->base.maps[0] = mmap(0, fb->sizes[0], PROT_WRITE, MAP_SHARED, card->fd, map_dumb.offset);
+        if (fb->base.maps[0] == MAP_FAILED) {
+                r = -errno;
+                log_debug("grdrm: %s: cannot memory-map dumb buffer %" PRIu32 "x%" PRIu32": %m",
+                          card->base.name, fb->base.width, fb->base.height);
+                return r;
+        }
+
+        memzero(fb->base.maps[0], fb->sizes[0]);
+
+        add_fb.width = fb->base.width;
+        add_fb.height = fb->base.height;
+        add_fb.pixel_format = fb->base.format;
+        add_fb.flags = 0;
+        memcpy(add_fb.handles, fb->handles, sizeof(fb->handles));
+        memcpy(add_fb.pitches, fb->base.strides, sizeof(fb->base.strides));
+        memcpy(add_fb.offsets, fb->offsets, sizeof(fb->offsets));
+
+        r = ioctl(card->fd, DRM_IOCTL_MODE_ADDFB2, &add_fb);
+        if (r < 0) {
+                r = -errno;
+                log_debug("grdrm: %s: cannot add framebuffer %" PRIu32 "x%" PRIu32": %m",
+                          card->base.name, fb->base.width, fb->base.height);
+                return r;
+        }
+
+        fb->id = add_fb.fb_id;
+
+        *out = fb;
+        fb = NULL;
+        return 0;
+}
+
+grdrm_fb *grdrm_fb_free(grdrm_fb *fb) {
+        unsigned int i;
+        int r;
+
+        if (!fb)
+                return NULL;
+
+        assert(fb->card);
+
+        if (fb->base.free_fn)
+                fb->base.free_fn(fb->base.data.ptr);
+
+        if (fb->id > 0 && fb->card->fd >= 0) {
+                r = ioctl(fb->card->fd, DRM_IOCTL_MODE_RMFB, fb->id);
+                if (r < 0)
+                        log_debug("grdrm: %s: cannot delete framebuffer %" PRIu32 ": %m",
+                                  fb->card->base.name, fb->id);
+        }
+
+        for (i = 0; i < ELEMENTSOF(fb->handles); ++i) {
+                struct drm_mode_destroy_dumb destroy_dumb = { };
+
+                if (fb->base.maps[i] != MAP_FAILED)
+                        munmap(fb->base.maps[i], fb->sizes[i]);
+
+                if (fb->handles[i] > 0 && fb->card->fd >= 0) {
+                        destroy_dumb.handle = fb->handles[i];
+                        r = ioctl(fb->card->fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb);
+                        if (r < 0)
+                                log_debug("grdrm: %s: cannot destroy dumb-buffer %" PRIu32 ": %m",
+                                          fb->card->base.name, fb->handles[i]);
+                }
+        }
+
+        free(fb);
+
+        return NULL;
+}
+
+/*
+ * Pipes
+ */
+
+static void grdrm_pipe_name(char *out, grdrm_crtc *crtc) {
+        /* @out must be at least of size GRDRM_PIPE_NAME_MAX */
+        sprintf(out, "%s/%" PRIu32, crtc->object.card->base.name, crtc->object.id);
+}
+
+static int grdrm_pipe_new(grdrm_pipe **out, grdrm_crtc *crtc, struct drm_mode_modeinfo *mode, size_t n_fbs) {
+        _cleanup_(grdev_pipe_freep) grdev_pipe *basepipe = NULL;
+        grdrm_card *card = crtc->object.card;
+        char name[GRDRM_PIPE_NAME_MAX];
+        grdrm_pipe *pipe;
+        int r;
+
+        assert_return(crtc, -EINVAL);
+        assert_return(grdev_is_drm_card(&card->base), -EINVAL);
+
+        pipe = new0(grdrm_pipe, 1);
+        if (!pipe)
+                return -ENOMEM;
+
+        basepipe = &pipe->base;
+        pipe->base = GRDEV_PIPE_INIT(&grdrm_pipe_vtable, &card->base);
+        pipe->crtc = crtc;
+        pipe->base.width = mode->hdisplay;
+        pipe->base.height = mode->vdisplay;
+        pipe->base.vrefresh = mode->vrefresh ? : 25;
+
+        grdrm_pipe_name(name, crtc);
+        r = grdev_pipe_add(&pipe->base, name, n_fbs);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = pipe;
+        basepipe = NULL;
+        return 0;
+}
+
+static void grdrm_pipe_free(grdev_pipe *basepipe) {
+        grdrm_pipe *pipe = grdrm_pipe_from_base(basepipe);
+        size_t i;
+
+        assert(pipe->crtc);
+
+        for (i = 0; i < pipe->base.max_fbs; ++i)
+                if (pipe->base.fbs[i])
+                        grdrm_fb_free(fb_from_base(pipe->base.fbs[i]));
+
+        free(pipe);
+}
+
+static grdev_fb *grdrm_pipe_target(grdev_pipe *basepipe) {
+        grdrm_fb *fb;
+        size_t i;
+
+        if (!basepipe->back) {
+                for (i = 0; i < basepipe->max_fbs; ++i) {
+                        if (!basepipe->fbs[i])
+                                continue;
+
+                        fb = fb_from_base(basepipe->fbs[i]);
+                        if (&fb->base == basepipe->front)
+                                continue;
+                        if (basepipe->flipping && fb->flipid)
+                                continue;
+
+                        basepipe->back = &fb->base;
+                        break;
+                }
+        }
+
+        return basepipe->back;
+}
+
+static void grdrm_pipe_enable(grdev_pipe *basepipe) {
+        grdrm_pipe *pipe = grdrm_pipe_from_base(basepipe);
+
+        pipe->crtc->applied = false;
+}
+
+static void grdrm_pipe_disable(grdev_pipe *basepipe) {
+        grdrm_pipe *pipe = grdrm_pipe_from_base(basepipe);
+
+        pipe->crtc->applied = false;
+}
+
+static const grdev_pipe_vtable grdrm_pipe_vtable = {
+        .free                   = grdrm_pipe_free,
+        .target                 = grdrm_pipe_target,
+        .enable                 = grdrm_pipe_enable,
+        .disable                = grdrm_pipe_disable,
+};
+
+/*
+ * Cards
+ */
+
+static void grdrm_name(char *out, dev_t devnum) {
+        /* @out must be at least of size GRDRM_CARD_NAME_MAX */
+        sprintf(out, "drm/%u:%u", major(devnum), minor(devnum));
+}
+
+static void grdrm_card_print(grdrm_card *card) {
+        grdrm_object *object;
+        grdrm_crtc *crtc;
+        grdrm_encoder *encoder;
+        grdrm_connector *connector;
+        grdrm_plane *plane;
+        Iterator iter;
+        uint32_t i;
+        char *p, *buf;
+
+        log_debug("grdrm: %s: state dump", card->base.name);
+
+        log_debug("  crtcs:");
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (object->type != GRDRM_TYPE_CRTC)
+                        continue;
+
+                crtc = crtc_from_object(object);
+                log_debug("    (id: %u index: %d)", object->id, object->index);
+
+                if (crtc->kern.mode_set)
+                        log_debug("      mode: %dx%d", crtc->kern.mode.hdisplay, crtc->kern.mode.vdisplay);
+                else
+                        log_debug("      mode: <none>");
+        }
+
+        log_debug("  encoders:");
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (object->type != GRDRM_TYPE_ENCODER)
+                        continue;
+
+                encoder = encoder_from_object(object);
+                log_debug("    (id: %u index: %d)", object->id, object->index);
+
+                if (encoder->kern.used_crtc)
+                        log_debug("      crtc: %u", encoder->kern.used_crtc);
+                else
+                        log_debug("      crtc: <none>");
+
+                buf = malloc((DECIMAL_STR_MAX(uint32_t) + 1) * encoder->kern.n_crtcs + 1);
+                if (buf) {
+                        buf[0] = 0;
+                        p = buf;
+
+                        for (i = 0; i < encoder->kern.n_crtcs; ++i)
+                                p += sprintf(p, " %" PRIu32, encoder->kern.crtcs[i]);
+
+                        log_debug("      possible crtcs:%s", buf);
+                        free(buf);
+                }
+
+                buf = malloc((DECIMAL_STR_MAX(uint32_t) + 1) * encoder->kern.n_clones + 1);
+                if (buf) {
+                        buf[0] = 0;
+                        p = buf;
+
+                        for (i = 0; i < encoder->kern.n_clones; ++i)
+                                p += sprintf(p, " %" PRIu32, encoder->kern.clones[i]);
+
+                        log_debug("      possible clones:%s", buf);
+                        free(buf);
+                }
+        }
+
+        log_debug("  connectors:");
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (object->type != GRDRM_TYPE_CONNECTOR)
+                        continue;
+
+                connector = connector_from_object(object);
+                log_debug("    (id: %u index: %d)", object->id, object->index);
+                log_debug("      type: %" PRIu32 "-%" PRIu32 " connection: %" PRIu32 " subpixel: %" PRIu32 " extents: %" PRIu32 "x%" PRIu32,
+                          connector->kern.type, connector->kern.type_id, connector->kern.connection, connector->kern.subpixel,
+                          connector->kern.mm_width, connector->kern.mm_height);
+
+                if (connector->kern.used_encoder)
+                        log_debug("      encoder: %" PRIu32, connector->kern.used_encoder);
+                else
+                        log_debug("      encoder: <none>");
+
+                buf = malloc((DECIMAL_STR_MAX(uint32_t) + 1) * connector->kern.n_encoders + 1);
+                if (buf) {
+                        buf[0] = 0;
+                        p = buf;
+
+                        for (i = 0; i < connector->kern.n_encoders; ++i)
+                                p += sprintf(p, " %" PRIu32, connector->kern.encoders[i]);
+
+                        log_debug("      possible encoders:%s", buf);
+                        free(buf);
+                }
+
+                for (i = 0; i < connector->kern.n_modes; ++i) {
+                        struct drm_mode_modeinfo *mode = &connector->kern.modes[i];
+                        log_debug("      mode: %" PRIu32 "x%" PRIu32, mode->hdisplay, mode->vdisplay);
+                }
+        }
+
+        log_debug("  planes:");
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (object->type != GRDRM_TYPE_PLANE)
+                        continue;
+
+                plane = plane_from_object(object);
+                log_debug("    (id: %u index: %d)", object->id, object->index);
+                log_debug("      gamma-size: %" PRIu32, plane->kern.gamma_size);
+
+                if (plane->kern.used_crtc)
+                        log_debug("      crtc: %" PRIu32, plane->kern.used_crtc);
+                else
+                        log_debug("      crtc: <none>");
+
+                buf = malloc((DECIMAL_STR_MAX(uint32_t) + 1) * plane->kern.n_crtcs + 1);
+                if (buf) {
+                        buf[0] = 0;
+                        p = buf;
+
+                        for (i = 0; i < plane->kern.n_crtcs; ++i)
+                                p += sprintf(p, " %" PRIu32, plane->kern.crtcs[i]);
+
+                        log_debug("      possible crtcs:%s", buf);
+                        free(buf);
+                }
+
+                buf = malloc((DECIMAL_STR_MAX(unsigned int) + 3) * plane->kern.n_formats + 1);
+                if (buf) {
+                        buf[0] = 0;
+                        p = buf;
+
+                        for (i = 0; i < plane->kern.n_formats; ++i)
+                                p += sprintf(p, " 0x%x", (unsigned int)plane->kern.formats[i]);
+
+                        log_debug("      possible formats:%s", buf);
+                        free(buf);
+                }
+        }
+}
+
+static int grdrm_card_resync(grdrm_card *card) {
+        _cleanup_free_ uint32_t *crtc_ids = NULL, *encoder_ids = NULL, *connector_ids = NULL, *plane_ids = NULL;
+        uint32_t allocated = 0;
+        grdrm_object *object;
+        Iterator iter;
+        size_t tries;
+        int r;
+
+        assert(card);
+
+        card->async_hotplug = false;
+        allocated = 0;
+
+        /* mark existing objects for possible removal */
+        HASHMAP_FOREACH(object, card->object_map, iter)
+                object->present = false;
+
+        for (tries = 0; tries < GRDRM_MAX_TRIES; ++tries) {
+                struct drm_mode_get_plane_res pres;
+                struct drm_mode_card_res res;
+                uint32_t i, max;
+
+                if (allocated < card->max_ids) {
+                        free(crtc_ids);
+                        free(encoder_ids);
+                        free(connector_ids);
+                        free(plane_ids);
+                        crtc_ids = new0(uint32_t, card->max_ids);
+                        encoder_ids = new0(uint32_t, card->max_ids);
+                        connector_ids = new0(uint32_t, card->max_ids);
+                        plane_ids = new0(uint32_t, card->max_ids);
+
+                        if (!crtc_ids || !encoder_ids || !connector_ids || !plane_ids)
+                                return -ENOMEM;
+
+                        allocated = card->max_ids;
+                }
+
+                zero(res);
+                res.crtc_id_ptr = PTR_TO_UINT64(crtc_ids);
+                res.connector_id_ptr = PTR_TO_UINT64(connector_ids);
+                res.encoder_id_ptr = PTR_TO_UINT64(encoder_ids);
+                res.count_crtcs = allocated;
+                res.count_encoders = allocated;
+                res.count_connectors = allocated;
+
+                r = ioctl(card->fd, DRM_IOCTL_MODE_GETRESOURCES, &res);
+                if (r < 0) {
+                        r = -errno;
+                        log_debug("grdrm: %s: cannot retrieve drm resources: %m", card->base.name);
+                        return r;
+                }
+
+                zero(pres);
+                pres.plane_id_ptr = PTR_TO_UINT64(plane_ids);
+                pres.count_planes = allocated;
+
+                r = ioctl(card->fd, DRM_IOCTL_MODE_GETPLANERESOURCES, &pres);
+                if (r < 0) {
+                        r = -errno;
+                        log_debug("grdrm: %s: cannot retrieve drm plane-resources: %m", card->base.name);
+                        return r;
+                }
+
+                max = MAX(MAX(res.count_crtcs, res.count_encoders),
+                          MAX(res.count_connectors, pres.count_planes));
+                if (max > allocated) {
+                        uint32_t n;
+
+                        n = ALIGN_POWER2(max);
+                        if (!n || n > UINT16_MAX) {
+                                log_debug("grdrm: %s: excessive DRM resource limit: %" PRIu32, card->base.name, max);
+                                return -ERANGE;
+                        }
+
+                        /* retry with resized buffers */
+                        card->max_ids = n;
+                        continue;
+                }
+
+                /* mark available objects as present */
+
+                for (i = 0; i < res.count_crtcs; ++i) {
+                        object = grdrm_find_object(card, crtc_ids[i]);
+                        if (object && object->type == GRDRM_TYPE_CRTC) {
+                                object->present = true;
+                                object->index = i;
+                                crtc_ids[i] = 0;
+                        }
+                }
+
+                for (i = 0; i < res.count_encoders; ++i) {
+                        object = grdrm_find_object(card, encoder_ids[i]);
+                        if (object && object->type == GRDRM_TYPE_ENCODER) {
+                                object->present = true;
+                                object->index = i;
+                                encoder_ids[i] = 0;
+                        }
+                }
+
+                for (i = 0; i < res.count_connectors; ++i) {
+                        object = grdrm_find_object(card, connector_ids[i]);
+                        if (object && object->type == GRDRM_TYPE_CONNECTOR) {
+                                object->present = true;
+                                object->index = i;
+                                connector_ids[i] = 0;
+                        }
+                }
+
+                for (i = 0; i < pres.count_planes; ++i) {
+                        object = grdrm_find_object(card, plane_ids[i]);
+                        if (object && object->type == GRDRM_TYPE_PLANE) {
+                                object->present = true;
+                                object->index = i;
+                                plane_ids[i] = 0;
+                        }
+                }
+
+                /* drop removed objects */
+
+                HASHMAP_FOREACH(object, card->object_map, iter)
+                        if (!object->present)
+                                grdrm_object_free(object);
+
+                /* add new objects */
+
+                card->n_crtcs = res.count_crtcs;
+                for (i = 0; i < res.count_crtcs; ++i) {
+                        if (crtc_ids[i] < 1)
+                                continue;
+
+                        r = grdrm_crtc_new(NULL, card, crtc_ids[i], i);
+                        if (r < 0)
+                                return r;
+                }
+
+                card->n_encoders = res.count_encoders;
+                for (i = 0; i < res.count_encoders; ++i) {
+                        if (encoder_ids[i] < 1)
+                                continue;
+
+                        r = grdrm_encoder_new(NULL, card, encoder_ids[i], i);
+                        if (r < 0)
+                                return r;
+                }
+
+                card->n_connectors = res.count_connectors;
+                for (i = 0; i < res.count_connectors; ++i) {
+                        if (connector_ids[i] < 1)
+                                continue;
+
+                        r = grdrm_connector_new(NULL, card, connector_ids[i], i);
+                        if (r < 0)
+                                return r;
+                }
+
+                card->n_planes = pres.count_planes;
+                for (i = 0; i < pres.count_planes; ++i) {
+                        if (plane_ids[i] < 1)
+                                continue;
+
+                        r = grdrm_plane_new(NULL, card, plane_ids[i], i);
+                        if (r < 0)
+                                return r;
+                }
+
+                /* re-sync objects after object_map is synced */
+
+                HASHMAP_FOREACH(object, card->object_map, iter) {
+                        switch (object->type) {
+                        case GRDRM_TYPE_CRTC:
+                                r = grdrm_crtc_resync(crtc_from_object(object));
+                                break;
+                        case GRDRM_TYPE_ENCODER:
+                                r = grdrm_encoder_resync(encoder_from_object(object));
+                                break;
+                        case GRDRM_TYPE_CONNECTOR:
+                                r = grdrm_connector_resync(connector_from_object(object));
+                                break;
+                        case GRDRM_TYPE_PLANE:
+                                r = grdrm_plane_resync(plane_from_object(object));
+                                break;
+                        default:
+                                assert_not_reached("grdrm: invalid object type");
+                                r = 0;
+                        }
+
+                        if (r < 0)
+                                return r;
+
+                        if (card->async_hotplug)
+                                break;
+                }
+
+                /* if modeset objects change during sync, start over */
+                if (card->async_hotplug) {
+                        card->async_hotplug = false;
+                        continue;
+                }
+
+                /* cache crtc/connector relationship */
+                HASHMAP_FOREACH(object, card->object_map, iter) {
+                        grdrm_connector *connector;
+                        grdrm_encoder *encoder;
+                        grdrm_crtc *crtc;
+
+                        if (object->type != GRDRM_TYPE_CONNECTOR)
+                                continue;
+
+                        connector = connector_from_object(object);
+                        if (connector->kern.connection != 1 || connector->kern.used_encoder < 1)
+                                continue;
+
+                        object = grdrm_find_object(card, connector->kern.used_encoder);
+                        if (!object || object->type != GRDRM_TYPE_ENCODER)
+                                continue;
+
+                        encoder = encoder_from_object(object);
+                        if (encoder->kern.used_crtc < 1)
+                                continue;
+
+                        object = grdrm_find_object(card, encoder->kern.used_crtc);
+                        if (!object || object->type != GRDRM_TYPE_CRTC)
+                                continue;
+
+                        crtc = crtc_from_object(object);
+                        assert(crtc->kern.n_used_connectors < crtc->kern.max_used_connectors);
+                        crtc->kern.used_connectors[crtc->kern.n_used_connectors++] = connector->object.id;
+                }
+
+                /* cache old crtc settings for later restore */
+                HASHMAP_FOREACH(object, card->object_map, iter) {
+                        grdrm_crtc *crtc;
+
+                        if (object->type != GRDRM_TYPE_CRTC)
+                                continue;
+
+                        crtc = crtc_from_object(object);
+
+                        /* Save data if it is the first time we refresh the CRTC. This data can
+                         * be used optionally to restore any previous configuration. For
+                         * instance, it allows us to restore VT configurations after we close
+                         * our session again. */
+                        if (!crtc->old.set) {
+                                crtc->old.fb = crtc->kern.used_fb;
+                                crtc->old.fb_x = crtc->kern.fb_offset_x;
+                                crtc->old.fb_y = crtc->kern.fb_offset_y;
+                                crtc->old.gamma = crtc->kern.gamma_size;
+                                crtc->old.n_connectors = crtc->kern.n_used_connectors;
+                                if (crtc->old.n_connectors)
+                                        memcpy(crtc->old.connectors, crtc->kern.used_connectors, sizeof(uint32_t) * crtc->old.n_connectors);
+                                crtc->old.mode_set = crtc->kern.mode_set;
+                                crtc->old.mode = crtc->kern.mode;
+                                crtc->old.set = true;
+                        }
+                }
+
+                /* everything synced */
+                break;
+        }
+
+        if (tries >= GRDRM_MAX_TRIES) {
+                /*
+                 * Ugh! We were unable to sync the DRM card state due to heavy
+                 * hotplugging. This should never happen, so print a debug
+                 * message and bail out. The next uevent will trigger
+                 * this again.
+                 */
+
+                log_debug("grdrm: %s: hotplug-storm when syncing card", card->base.name);
+                return -EFAULT;
+        }
+
+        return 0;
+}
+
+static bool card_configure_crtc(grdrm_crtc *crtc, grdrm_connector *connector) {
+        grdrm_card *card = crtc->object.card;
+        grdrm_encoder *encoder;
+        grdrm_object *object;
+        uint32_t i, j;
+
+        if (crtc->object.assigned || connector->object.assigned)
+                return false;
+        if (connector->kern.connection != 1)
+                return false;
+
+        for (i = 0; i < connector->kern.n_encoders; ++i) {
+                object = grdrm_find_object(card, connector->kern.encoders[i]);
+                if (!object || object->type != GRDRM_TYPE_ENCODER)
+                        continue;
+
+                encoder = encoder_from_object(object);
+                for (j = 0; j < encoder->kern.n_crtcs; ++j) {
+                        if (encoder->kern.crtcs[j] == crtc->object.id) {
+                                grdrm_crtc_assign(crtc, connector);
+                                return true;
+                        }
+                }
+        }
+
+        return false;
+}
+
+static void grdrm_card_configure(grdrm_card *card) {
+        /*
+         * Modeset Configuration
+         * This is where we update our modeset configuration and assign
+         * connectors to CRTCs. This means, each connector that we want to
+         * enable needs a CRTC, disabled (or unavailable) connectors are left
+         * alone in the dark. Once all CRTCs are assigned, the remaining CRTCs
+         * are disabled.
+         * Sounds trivial, but there're several caveats:
+         *
+         *   * Multiple connectors can be driven by the same CRTC. This is
+         *     known as 'hardware clone mode'. Advantage over software clone
+         *     mode is that only a single CRTC is needed to drive multiple
+         *     displays. However, few hardware supports this and it's a huge
+         *     headache to configure on dynamic demands. Therefore, we only
+         *     support it if configured statically beforehand.
+         *
+         *   * CRTCs are not created equal. Some might be much more poweful
+         *     than others, including more advanced plane support. So far, our
+         *     CRTC selection is random. You need to supply static
+         *     configuration if you want special setups. So far, there is no
+         *     proper way to do advanced CRTC selection on dynamic demands. It
+         *     is not really clear which demands require what CRTC, so, like
+         *     everyone else, we do random CRTC selection unless explicitly
+         *     states otherwise.
+         *
+         *   * Each Connector has a list of possible encoders that can drive
+         *     it, and each encoder has a list of possible CRTCs. If this graph
+         *     is a tree, assignment is trivial. However, if not, we cannot
+         *     reliably decide on configurations beforehand. The encoder is
+         *     always selected by the kernel, so we have to actually set a mode
+         *     to know which encoder is used. There is no way to ask the kernel
+         *     whether a given configuration is possible. This will change with
+         *     atomic-modesetting, but until then, we keep our configurations
+         *     simple and assume they work all just fine. If one fails
+         *     unexpectedly, we print a warning and disable it.
+         *
+         * Configuring a card consists of several steps:
+         *
+         *  1) First of all, we apply any user-configuration. If a user wants
+         *     a fixed configuration, we apply it and preserve it.
+         *     So far, we don't support user configuration files, so this step
+         *     is skipped.
+         *
+         *  2) Secondly, we need to apply any quirks from hwdb. Some hardware
+         *     might only support limited configurations or require special
+         *     CRTC/Connector mappings. We read this from hwdb and apply it, if
+         *     present.
+         *     So far, we don't support this as there is no known quirk, so
+         *     this step is skipped.
+         *
+         *  3) As deep modesets are expensive, we try to avoid them if
+         *     possible. Therefore, we read the current configuration from the
+         *     kernel and try to preserve it, if compatible with our demands.
+         *     If not, we break it and reassign it in a following step.
+         *
+         *  4) The main step involves configuring all remaining objects. By
+         *     default, all available connectors are enabled, except for those
+         *     disabled by user-configuration. We lookup a suitable CRTC for
+         *     each connector and assign them. As there might be more
+         *     connectors than CRTCs, we apply some ordering so users can
+         *     select which connectors are more important right now.
+         *     So far, we only apply the default ordering, more might be added
+         *     in the future.
+         */
+
+        grdrm_object *object;
+        grdrm_crtc *crtc;
+        Iterator i, j;
+
+        /* clear assignments */
+        HASHMAP_FOREACH(object, card->object_map, i)
+                object->assigned = false;
+
+        /* preserve existing configurations */
+        HASHMAP_FOREACH(object, card->object_map, i) {
+                if (object->type != GRDRM_TYPE_CRTC || object->assigned)
+                        continue;
+
+                crtc = crtc_from_object(object);
+
+                if (crtc->applied) {
+                        /* If our mode is set, preserve it. If no connector is
+                         * set, modeset either failed or the pipe is unused. In
+                         * both cases, leave it alone. It might be tried again
+                         * below in case there're remaining connectors.
+                         * Otherwise, try restoring the assignments. If they
+                         * are no longer valid, leave the pipe untouched. */
+
+                        if (crtc->set.n_connectors < 1)
+                                continue;
+
+                        assert(crtc->set.n_connectors == 1);
+
+                        object = grdrm_find_object(card, crtc->set.connectors[0]);
+                        if (!object || object->type != GRDRM_TYPE_CONNECTOR)
+                                continue;
+
+                        card_configure_crtc(crtc, connector_from_object(object));
+                } else if (crtc->kern.mode_set && crtc->kern.n_used_connectors != 1) {
+                        /* If our mode is not set on the pipe, we know the kern
+                         * information is valid. Try keeping it. If it's not
+                         * possible, leave the pipe untouched for later
+                         * assignements. */
+
+                        object = grdrm_find_object(card, crtc->kern.used_connectors[0]);
+                        if (!object || object->type != GRDRM_TYPE_CONNECTOR)
+                                continue;
+
+                        card_configure_crtc(crtc, connector_from_object(object));
+                }
+        }
+
+        /* assign remaining objects */
+        HASHMAP_FOREACH(object, card->object_map, i) {
+                if (object->type != GRDRM_TYPE_CRTC || object->assigned)
+                        continue;
+
+                crtc = crtc_from_object(object);
+
+                HASHMAP_FOREACH(object, card->object_map, j) {
+                        if (object->type != GRDRM_TYPE_CONNECTOR)
+                                continue;
+
+                        if (card_configure_crtc(crtc, connector_from_object(object)))
+                                break;
+                }
+
+                if (!crtc->object.assigned)
+                        grdrm_crtc_assign(crtc, NULL);
+        }
+
+        /* expose configuration */
+        HASHMAP_FOREACH(object, card->object_map, i) {
+                if (object->type != GRDRM_TYPE_CRTC)
+                        continue;
+
+                grdrm_crtc_expose(crtc_from_object(object));
+        }
+}
+
+static void grdrm_card_hotplug(grdrm_card *card) {
+        int r;
+
+        assert(card);
+
+        if (!card->running)
+                return;
+
+        log_debug("grdrm: %s/%s: reconfigure card", card->base.session->name, card->base.name);
+
+        card->ready = false;
+        r = grdrm_card_resync(card);
+        if (r < 0) {
+                log_debug("grdrm: %s/%s: cannot re-sync card: %s",
+                          card->base.session->name, card->base.name, strerror(-r));
+                return;
+        }
+
+        grdev_session_pin(card->base.session);
+
+        /* debug statement to print card information */
+        if (0)
+                grdrm_card_print(card);
+
+        grdrm_card_configure(card);
+        card->ready = true;
+        card->hotplug = false;
+
+        grdev_session_unpin(card->base.session);
+}
+
+static int grdrm_card_io_fn(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        grdrm_card *card = userdata;
+        struct drm_event_vblank *vblank;
+        struct drm_event *event;
+        uint32_t id, counter;
+        grdrm_object *object;
+        char buf[4096];
+        size_t len;
+        ssize_t l;
+
+        if (revents & (EPOLLHUP | EPOLLERR)) {
+                /* Immediately close device on HUP; no need to flush pending
+                 * data.. there're no events we care about here. */
+                log_debug("grdrm: %s/%s: HUP", card->base.session->name, card->base.name);
+                grdrm_card_close(card);
+                return 0;
+        }
+
+        if (revents & (EPOLLIN)) {
+                l = read(card->fd, buf, sizeof(buf));
+                if (l < 0) {
+                        if (errno == EAGAIN || errno == EINTR)
+                                return 0;
+
+                        log_debug("grdrm: %s/%s: read error: %m", card->base.session->name, card->base.name);
+                        grdrm_card_close(card);
+                        return 0;
+                }
+
+                for (len = l; len > 0; len -= event->length) {
+                        event = (void*)buf;
+
+                        if (len < sizeof(*event) || len < event->length) {
+                                log_debug("grdrm: %s/%s: truncated event", card->base.session->name, card->base.name);
+                                break;
+                        }
+
+                        switch (event->type) {
+                        case DRM_EVENT_FLIP_COMPLETE:
+                                vblank = (void*)event;
+                                if (event->length < sizeof(*vblank)) {
+                                        log_debug("grdrm: %s/%s: truncated vblank event", card->base.session->name, card->base.name);
+                                        break;
+                                }
+
+                                grdrm_decode_vblank_data(vblank->user_data, &id, &counter);
+                                object = grdrm_find_object(card, id);
+                                if (!object || object->type != GRDRM_TYPE_CRTC)
+                                        break;
+
+                                grdrm_crtc_flip_complete(crtc_from_object(object), counter, vblank);
+                                break;
+                        }
+                }
+        }
+
+        return 0;
+}
+
+static int grdrm_card_add(grdrm_card *card, const char *name) {
+        assert(card);
+        assert(card->fd < 0);
+
+        card->object_map = hashmap_new(&trivial_hash_ops);
+        if (!card->object_map)
+                return -ENOMEM;
+
+        return grdev_card_add(&card->base, name);
+}
+
+static void grdrm_card_destroy(grdrm_card *card) {
+        assert(card);
+        assert(!card->running);
+        assert(card->fd < 0);
+        assert(hashmap_size(card->object_map) == 0);
+
+        hashmap_free(card->object_map);
+}
+
+static void grdrm_card_commit(grdev_card *basecard) {
+        grdrm_card *card = grdrm_card_from_base(basecard);
+        grdrm_object *object;
+        Iterator iter;
+
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (!card->ready)
+                        break;
+
+                if (object->type != GRDRM_TYPE_CRTC)
+                        continue;
+
+                grdrm_crtc_commit(crtc_from_object(object));
+        }
+}
+
+static void grdrm_card_restore(grdev_card *basecard) {
+        grdrm_card *card = grdrm_card_from_base(basecard);
+        grdrm_object *object;
+        Iterator iter;
+
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                if (!card->ready)
+                        break;
+
+                if (object->type != GRDRM_TYPE_CRTC)
+                        continue;
+
+                grdrm_crtc_restore(crtc_from_object(object));
+        }
+}
+
+static void grdrm_card_enable(grdrm_card *card) {
+        assert(card);
+
+        if (card->fd < 0 || card->running)
+                return;
+
+        /* ignore cards without DUMB_BUFFER capability */
+        if (!card->cap_dumb)
+                return;
+
+        assert(card->fd_src);
+
+        log_debug("grdrm: %s/%s: enable", card->base.session->name, card->base.name);
+
+        card->running = true;
+        sd_event_source_set_enabled(card->fd_src, SD_EVENT_ON);
+        grdrm_card_hotplug(card);
+}
+
+static void grdrm_card_disable(grdrm_card *card) {
+        grdrm_object *object;
+        Iterator iter;
+
+        assert(card);
+
+        if (card->fd < 0 || !card->running)
+                return;
+
+        assert(card->fd_src);
+
+        log_debug("grdrm: %s/%s: disable", card->base.session->name, card->base.name);
+
+        card->running = false;
+        card->ready = false;
+        sd_event_source_set_enabled(card->fd_src, SD_EVENT_OFF);
+
+        /* stop all pipes */
+        HASHMAP_FOREACH(object, card->object_map, iter) {
+                grdrm_crtc *crtc;
+
+                if (object->type != GRDRM_TYPE_CRTC)
+                        continue;
+
+                crtc = crtc_from_object(object);
+                crtc->applied = false;
+                if (crtc->pipe)
+                        grdev_pipe_ready(&crtc->pipe->base, false);
+        }
+}
+
+static int grdrm_card_open(grdrm_card *card, int dev_fd) {
+        _cleanup_(grdev_session_unpinp) grdev_session *pin = NULL;
+        _cleanup_close_ int fd = dev_fd;
+        struct drm_get_cap cap;
+        int r, flags;
+
+        assert(card);
+        assert(dev_fd >= 0);
+        assert(card->fd != dev_fd);
+
+        pin = grdev_session_pin(card->base.session);
+        grdrm_card_close(card);
+
+        log_debug("grdrm: %s/%s: open", card->base.session->name, card->base.name);
+
+        r = fd_nonblock(fd, true);
+        if (r < 0)
+                return r;
+
+        r = fd_cloexec(fd, true);
+        if (r < 0)
+                return r;
+
+        flags = fcntl(fd, F_GETFL, 0);
+        if (flags < 0)
+                return -errno;
+        if ((flags & O_ACCMODE) != O_RDWR)
+                return -EACCES;
+
+        r = sd_event_add_io(card->base.session->context->event,
+                            &card->fd_src,
+                            fd,
+                            EPOLLHUP | EPOLLERR | EPOLLIN,
+                            grdrm_card_io_fn,
+                            card);
+        if (r < 0)
+                return r;
+
+        sd_event_source_set_enabled(card->fd_src, SD_EVENT_OFF);
+
+        card->hotplug = true;
+        card->fd = fd;
+        fd = -1;
+
+        /* cache DUMB_BUFFER capability */
+        cap.capability = DRM_CAP_DUMB_BUFFER;
+        cap.value = 0;
+        r = ioctl(card->fd, DRM_IOCTL_GET_CAP, &cap);
+        card->cap_dumb = r >= 0 && cap.value;
+        if (r < 0)
+                log_debug("grdrm: %s/%s: cannot retrieve DUMB_BUFFER capability: %s",
+                          card->base.session->name, card->base.name, strerror(-r));
+        else if (!card->cap_dumb)
+                log_debug("grdrm: %s/%s: DUMB_BUFFER capability not supported",
+                          card->base.session->name, card->base.name);
+
+        /* cache TIMESTAMP_MONOTONIC capability */
+        cap.capability = DRM_CAP_TIMESTAMP_MONOTONIC;
+        cap.value = 0;
+        r = ioctl(card->fd, DRM_IOCTL_GET_CAP, &cap);
+        card->cap_monotonic = r >= 0 && cap.value;
+        if (r < 0)
+                log_debug("grdrm: %s/%s: cannot retrieve TIMESTAMP_MONOTONIC capability: %s",
+                          card->base.session->name, card->base.name, strerror(-r));
+        else if (!card->cap_monotonic)
+                log_debug("grdrm: %s/%s: TIMESTAMP_MONOTONIC is disabled globally, fix this NOW!",
+                          card->base.session->name, card->base.name);
+
+        return 0;
+}
+
+static void grdrm_card_close(grdrm_card *card) {
+        grdrm_object *object;
+
+        if (card->fd < 0)
+                return;
+
+        log_debug("grdrm: %s/%s: close", card->base.session->name, card->base.name);
+
+        grdrm_card_disable(card);
+
+        card->fd_src = sd_event_source_unref(card->fd_src);
+        card->fd = safe_close(card->fd);
+
+        grdev_session_pin(card->base.session);
+        while ((object = hashmap_first(card->object_map)))
+                grdrm_object_free(object);
+        grdev_session_unpin(card->base.session);
+}
+
+static bool grdrm_card_async(grdrm_card *card, int r) {
+        switch (r) {
+        case -EACCES:
+                /* If we get EACCES on runtime DRM calls, we lost DRM-Master
+                 * (or we did something terribly wrong). Immediately disable
+                 * the card, so we stop all pipes and wait to be activated
+                 * again. */
+                grdrm_card_disable(card);
+                break;
+        case -ENOENT:
+                /* DRM objects can be hotplugged at any time. If an object is
+                 * removed that we use, we remember that state so a following
+                 * call can test for this.
+                 * Note that we also get a uevent as followup, this will resync
+                 * the whole device. */
+                card->async_hotplug = true;
+                break;
+        }
+
+        return !card->ready;
+}
+
+/*
+ * Unmanaged Cards
+ * The unmanaged DRM card opens the device node for a given DRM device
+ * directly (/dev/dri/cardX) and thus needs sufficient privileges. It opens
+ * the device only if we really require it and releases it as soon as we're
+ * disabled or closed.
+ * The unmanaged element can be used in all situations where you have direct
+ * access to DRM device nodes. Unlike managed DRM elements, it can be used
+ * outside of user sessions and in emergency situations where logind is not
+ * available.
+ */
+
+static void unmanaged_card_enable(grdev_card *basecard) {
+        unmanaged_card *cu = unmanaged_card_from_base(basecard);
+        int r, fd;
+
+        if (cu->card.fd < 0) {
+                /* try open on activation if it failed during allocation */
+                fd = open(cu->devnode, O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
+                if (fd < 0) {
+                        /* not fatal; simply ignore the device */
+                        log_debug("grdrm: %s/%s: cannot open node %s: %m",
+                                  basecard->session->name, basecard->name, cu->devnode);
+                        return;
+                }
+
+                /* we might already be DRM-Master by open(); that's fine */
+
+                r = grdrm_card_open(&cu->card, fd);
+                if (r < 0) {
+                        log_debug("grdrm: %s/%s: cannot open: %s",
+                                  basecard->session->name, basecard->name, strerror(-r));
+                        return;
+                }
+        }
+
+        r = ioctl(cu->card.fd, DRM_IOCTL_SET_MASTER, 0);
+        if (r < 0) {
+                log_debug("grdrm: %s/%s: cannot acquire DRM-Master: %m",
+                          basecard->session->name, basecard->name);
+                return;
+        }
+
+        grdrm_card_enable(&cu->card);
+}
+
+static void unmanaged_card_disable(grdev_card *basecard) {
+        unmanaged_card *cu = unmanaged_card_from_base(basecard);
+
+        grdrm_card_disable(&cu->card);
+}
+
+static int unmanaged_card_new(grdev_card **out, grdev_session *session, struct udev_device *ud) {
+        _cleanup_(grdev_card_freep) grdev_card *basecard = NULL;
+        char name[GRDRM_CARD_NAME_MAX];
+        unmanaged_card *cu;
+        const char *devnode;
+        dev_t devnum;
+        int r, fd;
+
+        assert_return(session, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        devnode = udev_device_get_devnode(ud);
+        devnum = udev_device_get_devnum(ud);
+        if (!devnode || devnum == 0)
+                return -ENODEV;
+
+        grdrm_name(name, devnum);
+
+        cu = new0(unmanaged_card, 1);
+        if (!cu)
+                return -ENOMEM;
+
+        basecard = &cu->card.base;
+        cu->card = GRDRM_CARD_INIT(&unmanaged_card_vtable, session);
+
+        cu->devnode = strdup(devnode);
+        if (!cu->devnode)
+                return -ENOMEM;
+
+        r = grdrm_card_add(&cu->card, name);
+        if (r < 0)
+                return r;
+
+        /* try to open but ignore errors */
+        fd = open(cu->devnode, O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
+        if (fd < 0) {
+                /* not fatal; allow uaccess based control on activation */
+                log_debug("grdrm: %s/%s: cannot open node %s: %m",
+                          basecard->session->name, basecard->name, cu->devnode);
+        } else {
+                /* We might get DRM-Master implicitly on open(); drop it immediately
+                 * so we acquire it only once we're actually enabled. We don't
+                 * really care whether this call fails or not, but lets log any
+                 * weird errors, anyway. */
+                r = ioctl(fd, DRM_IOCTL_DROP_MASTER, 0);
+                if (r < 0 && errno != EACCES && errno != EINVAL)
+                        log_debug("grdrm: %s/%s: cannot drop DRM-Master: %m",
+                                  basecard->session->name, basecard->name);
+
+                r = grdrm_card_open(&cu->card, fd);
+                if (r < 0)
+                        log_debug("grdrm: %s/%s: cannot open: %s",
+                                  basecard->session->name, basecard->name, strerror(-r));
+        }
+
+        if (out)
+                *out = basecard;
+        basecard = NULL;
+        return 0;
+}
+
+static void unmanaged_card_free(grdev_card *basecard) {
+        unmanaged_card *cu = unmanaged_card_from_base(basecard);
+
+        assert(!basecard->enabled);
+
+        grdrm_card_close(&cu->card);
+        grdrm_card_destroy(&cu->card);
+        free(cu->devnode);
+        free(cu);
+}
+
+static const grdev_card_vtable unmanaged_card_vtable = {
+        .free                   = unmanaged_card_free,
+        .enable                 = unmanaged_card_enable,
+        .disable                = unmanaged_card_disable,
+        .commit                 = grdrm_card_commit,
+        .restore                = grdrm_card_restore,
+};
+
+/*
+ * Managed Cards
+ * The managed DRM card uses systemd-logind to acquire DRM devices. This
+ * means, we do not open the device node /dev/dri/cardX directly. Instead,
+ * logind passes us a file-descriptor whenever our session is activated. Thus,
+ * we don't need access to the device node directly.
+ * Furthermore, whenever the session is put asleep, logind revokes the
+ * file-descriptor so we loose access to the device.
+ * Managed DRM cards should be preferred over unmanaged DRM cards whenever
+ * you run inside a user session with exclusive device access.
+ */
+
+static void managed_card_enable(grdev_card *card) {
+        managed_card *cm = managed_card_from_base(card);
+
+        /* If the device is manually re-enabled, we try to resume our card
+         * management. Note that we have no control over DRM-Master and the fd,
+         * so we have to take over the state from the last logind event. */
+
+        if (cm->master)
+                grdrm_card_enable(&cm->card);
+}
+
+static void managed_card_disable(grdev_card *card) {
+        managed_card *cm = managed_card_from_base(card);
+
+        /* If the device is manually disabled, we keep the FD but put our card
+         * management asleep. This way, we can wake up at any time, but don't
+         * touch the device while asleep. */
+
+        grdrm_card_disable(&cm->card);
+}
+
+static int managed_card_pause_device_fn(sd_bus *bus,
+                                        sd_bus_message *signal,
+                                        void *userdata,
+                                        sd_bus_error *ret_error) {
+        managed_card *cm = userdata;
+        grdev_session *session = cm->card.base.session;
+        uint32_t major, minor;
+        const char *mode;
+        int r;
+
+        /*
+         * We get PauseDevice() signals from logind whenever a device we
+         * requested was, or is about to be, paused. Arguments are major/minor
+         * number of the device and the mode of the operation.
+         * In case the event is not about our device, we ignore it. Otherwise,
+         * we treat it as asynchronous DRM-DROP-MASTER. Note that we might have
+         * already handled an EACCES error from a modeset ioctl, in which case
+         * we already disabled the device.
+         *
+         * @mode can be one of the following:
+         *   "pause": The device is about to be paused. We must react
+         *            immediately and respond with PauseDeviceComplete(). Once
+         *            we replied, logind will pause the device. Note that
+         *            logind might apply any kind of timeout and force pause
+         *            the device if we don't respond in a timely manner. In
+         *            this case, we will receive a second PauseDevice event
+         *            with @mode set to "force" (or similar).
+         *   "force": The device was disabled forecfully by logind. DRM-Master
+         *            was already dropped. This is just an asynchronous
+         *            notification so we can put the device asleep (in case
+         *            we didn't already notice the dropped DRM-Master).
+         *    "gone": This is like "force" but is sent if the device was
+         *            paused due to a device-removal event.
+         *
+         * We always handle PauseDevice signals as "force" as we properly
+         * support asynchronously dropping DRM-Master, anyway. But in case
+         * logind sent mode "pause", we also call PauseDeviceComplete() to
+         * immediately acknowledge the request.
+         */
+
+        r = sd_bus_message_read(signal, "uus", &major, &minor, &mode);
+        if (r < 0) {
+                log_debug("grdrm: %s/%s: erroneous PauseDevice signal",
+                          session->name, cm->card.base.name);
+                return 0;
+        }
+
+        /* not our device? */
+        if (makedev(major, minor) != cm->devnum)
+                return 0;
+
+        cm->master = false;
+        grdrm_card_disable(&cm->card);
+
+        if (streq(mode, "pause")) {
+                _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+
+                /*
+                 * Sending PauseDeviceComplete() is racy if logind triggers the
+                 * timeout. That is, if we take too long and logind pauses the
+                 * device by sending a forced PauseDevice, our
+                 * PauseDeviceComplete call will be stray. That's fine, though.
+                 * logind ignores such stray calls. Only if logind also sent a
+                 * further PauseDevice() signal, it might match our call
+                 * incorrectly to the newer PauseDevice(). That's fine, too, as
+                 * we handle that event asynchronously, anyway. Therefore,
+                 * whatever happens, we're fine. Yay!
+                 */
+
+                r = sd_bus_message_new_method_call(session->context->sysbus,
+                                                   &m,
+                                                   "org.freedesktop.login1",
+                                                   session->path,
+                                                   "org.freedesktop.login1.Session",
+                                                   "PauseDeviceComplete");
+                if (r >= 0) {
+                        r = sd_bus_message_append(m, "uu", major, minor);
+                        if (r >= 0)
+                                r = sd_bus_send(session->context->sysbus, m, NULL);
+                }
+
+                if (r < 0)
+                        log_debug("grdrm: %s/%s: cannot send PauseDeviceComplete: %s",
+                                  session->name, cm->card.base.name, strerror(-r));
+        }
+
+        return 0;
+}
+
+static int managed_card_resume_device_fn(sd_bus *bus,
+                                         sd_bus_message *signal,
+                                         void *userdata,
+                                         sd_bus_error *ret_error) {
+        managed_card *cm = userdata;
+        grdev_session *session = cm->card.base.session;
+        uint32_t major, minor;
+        int r, fd;
+
+        /*
+         * We get ResumeDevice signals whenever logind resumed a previously
+         * paused device. The arguments contain the major/minor number of the
+         * related device and a new file-descriptor for the freshly opened
+         * device-node.
+         * If the signal is not about our device, we simply ignore it.
+         * Otherwise, we immediately resume the device. Note that we drop the
+         * new file-descriptor as we already have one from TakeDevice(). logind
+         * preserves the file-context across pause/resume for DRM but only
+         * drops/acquires DRM-Master accordingly. This way, our context (like
+         * DRM-FBs and BOs) is preserved.
+         */
+
+        r = sd_bus_message_read(signal, "uuh", &major, &minor, &fd);
+        if (r < 0) {
+                log_debug("grdrm: %s/%s: erroneous ResumeDevice signal",
+                          session->name, cm->card.base.name);
+                return 0;
+        }
+
+        /* not our device? */
+        if (makedev(major, minor) != cm->devnum)
+                return 0;
+
+        if (cm->card.fd < 0) {
+                /* This shouldn't happen. We should already own an FD from
+                 * TakeDevice(). However, lets be safe and use this FD in case
+                 * we really don't have one. There is no harm in doing this
+                 * and our code works fine this way. */
+                fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+                if (fd < 0) {
+                        log_debug("grdrm: %s/%s: cannot duplicate fd: %m",
+                                  session->name, cm->card.base.name);
+                        return 0;
+                }
+
+                r = grdrm_card_open(&cm->card, fd);
+                if (r < 0) {
+                        log_debug("grdrm: %s/%s: cannot open: %s",
+                                  session->name, cm->card.base.name, strerror(-r));
+                        return 0;
+                }
+        }
+
+        cm->master = true;
+        if (cm->card.base.enabled)
+                grdrm_card_enable(&cm->card);
+
+        return 0;
+}
+
+static int managed_card_setup_bus(managed_card *cm) {
+        grdev_session *session = cm->card.base.session;
+        _cleanup_free_ char *match = NULL;
+        int r;
+
+        match = strjoin("type='signal',"
+                        "sender='org.freedesktop.login1',"
+                        "interface='org.freedesktop.login1.Session',"
+                        "member='PauseDevice',"
+                        "path='", session->path, "'",
+                        NULL);
+        if (!match)
+                return -ENOMEM;
+
+        r = sd_bus_add_match(session->context->sysbus,
+                             &cm->slot_pause_device,
+                             match,
+                             managed_card_pause_device_fn,
+                             cm);
+        if (r < 0)
+                return r;
+
+        free(match);
+        match = strjoin("type='signal',"
+                        "sender='org.freedesktop.login1',"
+                        "interface='org.freedesktop.login1.Session',"
+                        "member='ResumeDevice',"
+                        "path='", session->path, "'",
+                        NULL);
+        if (!match)
+                return -ENOMEM;
+
+        r = sd_bus_add_match(session->context->sysbus,
+                             &cm->slot_resume_device,
+                             match,
+                             managed_card_resume_device_fn,
+                             cm);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int managed_card_take_device_fn(sd_bus *bus,
+                                       sd_bus_message *reply,
+                                       void *userdata,
+                                       sd_bus_error *ret_error) {
+        managed_card *cm = userdata;
+        grdev_session *session = cm->card.base.session;
+        int r, paused, fd;
+
+        cm->slot_take_device = sd_bus_slot_unref(cm->slot_take_device);
+
+        if (sd_bus_message_is_method_error(reply, NULL)) {
+                const sd_bus_error *error = sd_bus_message_get_error(reply);
+
+                log_debug("grdrm: %s/%s: TakeDevice failed: %s: %s",
+                          session->name, cm->card.base.name, error->name, error->message);
+                return 0;
+        }
+
+        cm->acquired = true;
+
+        r = sd_bus_message_read(reply, "hb", &fd, &paused);
+        if (r < 0) {
+                log_debug("grdrm: %s/%s: erroneous TakeDevice reply",
+                          session->name, cm->card.base.name);
+                return 0;
+        }
+
+        fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+        if (fd < 0) {
+                log_debug("grdrm: %s/%s: cannot duplicate fd: %m",
+                          session->name, cm->card.base.name);
+                return 0;
+        }
+
+        r = grdrm_card_open(&cm->card, fd);
+        if (r < 0) {
+                log_debug("grdrm: %s/%s: cannot open: %s",
+                          session->name, cm->card.base.name, strerror(-r));
+                return 0;
+        }
+
+        if (!paused && cm->card.base.enabled)
+                grdrm_card_enable(&cm->card);
+
+        return 0;
+}
+
+static void managed_card_take_device(managed_card *cm) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        grdev_session *session = cm->card.base.session;
+        int r;
+
+        r = sd_bus_message_new_method_call(session->context->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           session->path,
+                                           "org.freedesktop.login1.Session",
+                                           "TakeDevice");
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_message_append(m, "uu", major(cm->devnum), minor(cm->devnum));
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_call_async(session->context->sysbus,
+                              &cm->slot_take_device,
+                              m,
+                              managed_card_take_device_fn,
+                              cm,
+                              0);
+        if (r < 0)
+                goto error;
+
+        cm->requested = true;
+        return;
+
+error:
+        log_debug("grdrm: %s/%s: cannot send TakeDevice request: %s",
+                  session->name, cm->card.base.name, strerror(-r));
+}
+
+static void managed_card_release_device(managed_card *cm) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        grdev_session *session = cm->card.base.session;
+        int r;
+
+        /*
+         * If TakeDevice() is pending or was successful, make sure to
+         * release the device again. We don't care for return-values,
+         * so send it without waiting or callbacks.
+         * If a failed TakeDevice() is pending, but someone else took
+         * the device on the same bus-connection, we might incorrectly
+         * release their device. This is an unlikely race, though.
+         * Furthermore, you really shouldn't have two users of the
+         * controller-API on the same session, on the same devices, *AND* on
+         * the same bus-connection. So we don't care for that race..
+         */
+
+        grdrm_card_close(&cm->card);
+        cm->requested = false;
+
+        if (!cm->acquired && !cm->slot_take_device)
+                return;
+
+        cm->slot_take_device = sd_bus_slot_unref(cm->slot_take_device);
+        cm->acquired = false;
+
+        r = sd_bus_message_new_method_call(session->context->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           session->path,
+                                           "org.freedesktop.login1.Session",
+                                           "ReleaseDevice");
+        if (r >= 0) {
+                r = sd_bus_message_append(m, "uu", major(cm->devnum), minor(cm->devnum));
+                if (r >= 0)
+                        r = sd_bus_send(session->context->sysbus, m, NULL);
+        }
+
+        if (r < 0 && r != -ENOTCONN)
+                log_debug("grdrm: %s/%s: cannot send ReleaseDevice: %s",
+                          session->name, cm->card.base.name, strerror(-r));
+}
+
+static int managed_card_new(grdev_card **out, grdev_session *session, struct udev_device *ud) {
+        _cleanup_(grdev_card_freep) grdev_card *basecard = NULL;
+        char name[GRDRM_CARD_NAME_MAX];
+        managed_card *cm;
+        dev_t devnum;
+        int r;
+
+        assert_return(session, -EINVAL);
+        assert_return(session->managed, -EINVAL);
+        assert_return(session->context->sysbus, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        devnum = udev_device_get_devnum(ud);
+        if (devnum == 0)
+                return -ENODEV;
+
+        grdrm_name(name, devnum);
+
+        cm = new0(managed_card, 1);
+        if (!cm)
+                return -ENOMEM;
+
+        basecard = &cm->card.base;
+        cm->card = GRDRM_CARD_INIT(&managed_card_vtable, session);
+        cm->devnum = devnum;
+
+        r = managed_card_setup_bus(cm);
+        if (r < 0)
+                return r;
+
+        r = grdrm_card_add(&cm->card, name);
+        if (r < 0)
+                return r;
+
+        managed_card_take_device(cm);
+
+        if (out)
+                *out = basecard;
+        basecard = NULL;
+        return 0;
+}
+
+static void managed_card_free(grdev_card *basecard) {
+        managed_card *cm = managed_card_from_base(basecard);
+
+        assert(!basecard->enabled);
+
+        managed_card_release_device(cm);
+        cm->slot_resume_device = sd_bus_slot_unref(cm->slot_resume_device);
+        cm->slot_pause_device = sd_bus_slot_unref(cm->slot_pause_device);
+        grdrm_card_destroy(&cm->card);
+        free(cm);
+}
+
+static const grdev_card_vtable managed_card_vtable = {
+        .free                   = managed_card_free,
+        .enable                 = managed_card_enable,
+        .disable                = managed_card_disable,
+        .commit                 = grdrm_card_commit,
+        .restore                = grdrm_card_restore,
+};
+
+/*
+ * Generic Constructor
+ * Instead of relying on the caller to choose between managed and unmanaged
+ * DRM devices, the grdev_drm_new() constructor does that for you (by
+ * looking at session->managed).
+ */
+
+bool grdev_is_drm_card(grdev_card *basecard) {
+        return basecard && (basecard->vtable == &unmanaged_card_vtable ||
+                            basecard->vtable == &managed_card_vtable);
+}
+
+grdev_card *grdev_find_drm_card(grdev_session *session, dev_t devnum) {
+        char name[GRDRM_CARD_NAME_MAX];
+
+        assert_return(session, NULL);
+        assert_return(devnum != 0, NULL);
+
+        grdrm_name(name, devnum);
+        return grdev_find_card(session, name);
+}
+
+int grdev_drm_card_new(grdev_card **out, grdev_session *session, struct udev_device *ud) {
+        assert_return(session, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        return session->managed ? managed_card_new(out, session, ud) : unmanaged_card_new(out, session, ud);
+}
+
+void grdev_drm_card_hotplug(grdev_card *basecard, struct udev_device *ud) {
+        const char *p, *action;
+        grdrm_card *card;
+        dev_t devnum;
+
+        assert(basecard);
+        assert(grdev_is_drm_card(basecard));
+        assert(ud);
+
+        card = grdrm_card_from_base(basecard);
+
+        action = udev_device_get_action(ud);
+        if (!action || streq(action, "add") || streq(action, "remove")) {
+                /* If we get add/remove events on DRM nodes without devnum, we
+                 * got hotplugged DRM objects so refresh the device. */
+                devnum = udev_device_get_devnum(ud);
+                if (devnum == 0) {
+                        card->hotplug = true;
+                        grdrm_card_hotplug(card);
+                }
+        } else if (streq_ptr(action, "change")) {
+                /* A change event with HOTPLUG=1 is sent whenever a connector
+                 * changed state. Refresh the device to update our state. */
+                p = udev_device_get_property_value(ud, "HOTPLUG");
+                if (streq_ptr(p, "1")) {
+                        card->hotplug = true;
+                        grdrm_card_hotplug(card);
+                }
+        }
+}
diff --git a/src/libsystemd-terminal/grdev-internal.h b/src/libsystemd-terminal/grdev-internal.h
new file mode 100644 (file)
index 0000000..f455dd4
--- /dev/null
@@ -0,0 +1,251 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#pragma once
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include "grdev.h"
+#include "hashmap.h"
+#include "list.h"
+#include "util.h"
+
+typedef struct grdev_tile               grdev_tile;
+typedef struct grdev_display_cache      grdev_display_cache;
+
+typedef struct grdev_pipe_vtable        grdev_pipe_vtable;
+typedef struct grdev_pipe               grdev_pipe;
+typedef struct grdev_card_vtable        grdev_card_vtable;
+typedef struct grdev_card               grdev_card;
+
+/*
+ * DRM cards
+ */
+
+bool grdev_is_drm_card(grdev_card *card);
+grdev_card *grdev_find_drm_card(grdev_session *session, dev_t devnum);
+int grdev_drm_card_new(grdev_card **out, grdev_session *session, struct udev_device *ud);
+void grdev_drm_card_hotplug(grdev_card *card, struct udev_device *ud);
+
+/*
+ * Displays
+ */
+
+enum {
+        GRDEV_TILE_LEAF,
+        GRDEV_TILE_NODE,
+        GRDEV_TILE_CNT
+};
+
+struct grdev_tile {
+        LIST_FIELDS(grdev_tile, children_by_node);
+        grdev_tile *parent;
+        grdev_display *display;
+
+        uint32_t x;
+        uint32_t y;
+        unsigned int rotate;
+        unsigned int flip;
+        uint32_t cache_w;
+        uint32_t cache_h;
+
+        unsigned int type;
+
+        union {
+                struct {
+                        grdev_pipe *pipe;
+                } leaf;
+
+                struct {
+                        size_t n_children;
+                        LIST_HEAD(grdev_tile, child_list);
+                } node;
+        };
+};
+
+int grdev_tile_new_leaf(grdev_tile **out, grdev_pipe *pipe);
+int grdev_tile_new_node(grdev_tile **out);
+grdev_tile *grdev_tile_free(grdev_tile *tile);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_tile*, grdev_tile_free);
+
+struct grdev_display {
+        grdev_session *session;
+        char *name;
+        void *userdata;
+
+        size_t n_leafs;
+        grdev_tile *tile;
+
+        size_t n_pipes;
+        size_t max_pipes;
+
+        uint32_t width;
+        uint32_t height;
+
+        struct grdev_display_cache {
+                grdev_pipe *pipe;
+                grdev_display_target target;
+
+                bool incomplete : 1;
+        } *pipes;
+
+        bool enabled : 1;
+        bool public : 1;
+        bool modified : 1;
+        bool framed : 1;
+};
+
+grdev_display *grdev_find_display(grdev_session *session, const char *name);
+
+int grdev_display_new(grdev_display **out, grdev_session *session, const char *name);
+grdev_display *grdev_display_free(grdev_display *display);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_display*, grdev_display_free);
+
+/*
+ * Pipes
+ */
+
+struct grdev_pipe_vtable {
+        void (*free) (grdev_pipe *pipe);
+        void (*enable) (grdev_pipe *pipe);
+        void (*disable) (grdev_pipe *pipe);
+        grdev_fb *(*target) (grdev_pipe *pipe);
+};
+
+struct grdev_pipe {
+        const grdev_pipe_vtable *vtable;
+        grdev_card *card;
+        char *name;
+
+        grdev_tile *tile;
+        grdev_display_cache *cache;
+        sd_event_source *vsync_src;
+
+        uint32_t width;
+        uint32_t height;
+        uint32_t vrefresh;
+
+        size_t max_fbs;
+        grdev_fb *front;
+        grdev_fb *back;
+        grdev_fb **fbs;
+
+        bool enabled : 1;
+        bool running : 1;
+        bool flip : 1;
+        bool flipping : 1;
+};
+
+#define GRDEV_PIPE_INIT(_vtable, _card) ((grdev_pipe){ \
+                .vtable = (_vtable), \
+                .card = (_card), \
+        })
+
+grdev_pipe *grdev_find_pipe(grdev_card *card, const char *name);
+
+int grdev_pipe_add(grdev_pipe *pipe, const char *name, size_t n_fbs);
+grdev_pipe *grdev_pipe_free(grdev_pipe *pipe);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_pipe*, grdev_pipe_free);
+
+void grdev_pipe_ready(grdev_pipe *pipe, bool running);
+void grdev_pipe_frame(grdev_pipe *pipe);
+void grdev_pipe_schedule(grdev_pipe *pipe, uint64_t frames);
+
+/*
+ * Cards
+ */
+
+struct grdev_card_vtable {
+        void (*free) (grdev_card *card);
+        void (*enable) (grdev_card *card);
+        void (*disable) (grdev_card *card);
+        void (*commit) (grdev_card *card);
+        void (*restore) (grdev_card *card);
+};
+
+struct grdev_card {
+        const grdev_card_vtable *vtable;
+        grdev_session *session;
+        char *name;
+
+        Hashmap *pipe_map;
+
+        bool enabled : 1;
+        bool modified : 1;
+};
+
+#define GRDEV_CARD_INIT(_vtable, _session) ((grdev_card){ \
+                .vtable = (_vtable), \
+                .session = (_session), \
+        })
+
+grdev_card *grdev_find_card(grdev_session *session, const char *name);
+
+int grdev_card_add(grdev_card *card, const char *name);
+grdev_card *grdev_card_free(grdev_card *card);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_card*, grdev_card_free);
+
+/*
+ * Sessions
+ */
+
+struct grdev_session {
+        grdev_context *context;
+        char *name;
+        char *path;
+        grdev_event_fn event_fn;
+        void *userdata;
+
+        unsigned long n_pins;
+
+        Hashmap *card_map;
+        Hashmap *display_map;
+
+        bool custom : 1;
+        bool managed : 1;
+        bool enabled : 1;
+        bool modified : 1;
+};
+
+grdev_session *grdev_session_pin(grdev_session *session);
+grdev_session *grdev_session_unpin(grdev_session *session);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_session*, grdev_session_unpin);
+
+/*
+ * Contexts
+ */
+
+struct grdev_context {
+        unsigned long ref;
+        sd_event *event;
+        sd_bus *sysbus;
+
+        Hashmap *session_map;
+};
diff --git a/src/libsystemd-terminal/grdev.c b/src/libsystemd-terminal/grdev.c
new file mode 100644 (file)
index 0000000..0c21eac
--- /dev/null
@@ -0,0 +1,1362 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-login.h>
+#include "grdev.h"
+#include "grdev-internal.h"
+#include "hashmap.h"
+#include "login-shared.h"
+#include "macro.h"
+#include "udev-util.h"
+#include "util.h"
+
+static void pipe_enable(grdev_pipe *pipe);
+static void pipe_disable(grdev_pipe *pipe);
+static void card_modified(grdev_card *card);
+static void session_frame(grdev_session *session, grdev_display *display);
+
+/*
+ * Displays
+ */
+
+static inline grdev_tile *tile_leftmost(grdev_tile *tile) {
+        if (!tile)
+                return NULL;
+
+        while (tile->type == GRDEV_TILE_NODE && tile->node.child_list)
+                tile = tile->node.child_list;
+
+        return tile;
+}
+
+#define TILE_FOREACH(_root, _i) \
+        for (_i = tile_leftmost(_root); _i; _i = tile_leftmost(_i->children_by_node_next) ? : _i->parent)
+
+#define TILE_FOREACH_SAFE(_root, _i, _next) \
+        for (_i = tile_leftmost(_root); _i && ((_next = tile_leftmost(_i->children_by_node_next) ? : _i->parent), true); _i = _next)
+
+static void tile_link(grdev_tile *tile, grdev_tile *parent) {
+        grdev_display *display;
+        grdev_tile *t;
+
+        assert(tile);
+        assert(!tile->parent);
+        assert(!tile->display);
+        assert(parent);
+        assert(parent->type == GRDEV_TILE_NODE);
+
+        display = parent->display;
+
+        assert(!display || !display->enabled);
+
+        ++parent->node.n_children;
+        LIST_PREPEND(children_by_node, parent->node.child_list, tile);
+        tile->parent = parent;
+
+        if (display) {
+                display->modified = true;
+                TILE_FOREACH(tile, t) {
+                        t->display = display;
+                        if (t->type == GRDEV_TILE_LEAF) {
+                                ++display->n_leafs;
+                                if (display->enabled)
+                                        pipe_enable(t->leaf.pipe);
+                        }
+                }
+        }
+}
+
+static void tile_unlink(grdev_tile *tile) {
+        grdev_tile *parent, *t;
+        grdev_display *display;
+
+        assert(tile);
+
+        display = tile->display;
+        parent = tile->parent;
+        if (!parent) {
+                assert(!display);
+                return;
+        }
+
+        assert(parent->type == GRDEV_TILE_NODE);
+        assert(parent->display == display);
+        assert(parent->node.n_children > 0);
+
+        --parent->node.n_children;
+        LIST_REMOVE(children_by_node, parent->node.child_list, tile);
+        tile->parent = NULL;
+
+        if (display) {
+                display->modified = true;
+                TILE_FOREACH(tile, t) {
+                        t->display = NULL;
+                        if (t->type == GRDEV_TILE_LEAF) {
+                                --display->n_leafs;
+                                t->leaf.pipe->cache = NULL;
+                                pipe_disable(t->leaf.pipe);
+                        }
+                }
+        }
+
+        /* Tile trees are driven by leafs. Internal nodes have no owner, thus,
+         * we must take care to not leave them around. Therefore, whenever we
+         * unlink any part of a tree, we also destroy the parent, in case it's
+         * now stale.
+         * Parents are stale if they have no children and either have no display
+         * or if they are intermediate nodes (i.e, they have a parent).
+         * This means, you can easily create trees, but you can never partially
+         * move or destruct them so far. They're always reduced to minimal form
+         * if you cut them. This might change later, but so far we didn't need
+         * partial destruction or the ability to move whole trees. */
+
+        if (parent->node.n_children < 1 && (parent->parent || !parent->display))
+                grdev_tile_free(parent);
+}
+
+static int tile_new(grdev_tile **out) {
+        _cleanup_(grdev_tile_freep) grdev_tile *tile = NULL;
+
+        assert(out);
+
+        tile = new0(grdev_tile, 1);
+        if (!tile)
+                return -ENOMEM;
+
+        tile->type = (unsigned)-1;
+
+        *out = tile;
+        tile = NULL;
+        return 0;
+}
+
+int grdev_tile_new_leaf(grdev_tile **out, grdev_pipe *pipe) {
+        _cleanup_(grdev_tile_freep) grdev_tile *tile = NULL;
+        int r;
+
+        assert_return(out, -EINVAL);
+        assert_return(pipe, -EINVAL);
+        assert_return(!pipe->tile, -EINVAL);
+
+        r = tile_new(&tile);
+        if (r < 0)
+                return r;
+
+        tile->type = GRDEV_TILE_LEAF;
+        tile->leaf.pipe = pipe;
+
+        if (out)
+                *out = tile;
+        tile = NULL;
+        return 0;
+}
+
+int grdev_tile_new_node(grdev_tile **out) {
+        _cleanup_(grdev_tile_freep) grdev_tile *tile = NULL;
+        int r;
+
+        assert_return(out, -EINVAL);
+
+        r = tile_new(&tile);
+        if (r < 0)
+                return r;
+
+        tile->type = GRDEV_TILE_NODE;
+
+        *out = tile;
+        tile = NULL;
+        return 0;
+}
+
+grdev_tile *grdev_tile_free(grdev_tile *tile) {
+        if (!tile)
+                return NULL;
+
+        tile_unlink(tile);
+
+        switch (tile->type) {
+        case GRDEV_TILE_LEAF:
+                assert(!tile->parent);
+                assert(!tile->display);
+                assert(tile->leaf.pipe);
+
+                break;
+        case GRDEV_TILE_NODE:
+                assert(!tile->parent);
+                assert(!tile->display);
+                assert(tile->node.n_children == 0);
+
+                break;
+        }
+
+        free(tile);
+
+        return NULL;
+}
+
+grdev_display *grdev_find_display(grdev_session *session, const char *name) {
+        assert_return(session, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(session->display_map, name);
+}
+
+int grdev_display_new(grdev_display **out, grdev_session *session, const char *name) {
+        _cleanup_(grdev_display_freep) grdev_display *display = NULL;
+        int r;
+
+        assert(session);
+        assert(name);
+
+        display = new0(grdev_display, 1);
+        if (!display)
+                return -ENOMEM;
+
+        display->session = session;
+
+        display->name = strdup(name);
+        if (!display->name)
+                return -ENOMEM;
+
+        r = grdev_tile_new_node(&display->tile);
+        if (r < 0)
+                return r;
+
+        display->tile->display = display;
+
+        r = hashmap_put(session->display_map, display->name, display);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = display;
+        display = NULL;
+        return 0;
+}
+
+grdev_display *grdev_display_free(grdev_display *display) {
+        if (!display)
+                return NULL;
+
+        assert(!display->public);
+        assert(!display->enabled);
+        assert(!display->modified);
+        assert(display->n_leafs == 0);
+        assert(display->n_pipes == 0);
+
+        if (display->name)
+                hashmap_remove_value(display->session->display_map, display->name, display);
+
+        if (display->tile) {
+                display->tile->display = NULL;
+                grdev_tile_free(display->tile);
+        }
+
+        free(display->pipes);
+        free(display->name);
+        free(display);
+
+        return NULL;
+}
+
+void grdev_display_set_userdata(grdev_display *display, void *userdata) {
+        assert(display);
+
+        display->userdata = userdata;
+}
+
+void *grdev_display_get_userdata(grdev_display *display) {
+        assert_return(display, NULL);
+
+        return display->userdata;
+}
+
+const char *grdev_display_get_name(grdev_display *display) {
+        assert_return(display, NULL);
+
+        return display->name;
+}
+
+uint32_t grdev_display_get_width(grdev_display *display) {
+        assert_return(display, 0);
+
+        return display->width;
+}
+
+uint32_t grdev_display_get_height(grdev_display *display) {
+        assert_return(display, 0);
+
+        return display->height;
+}
+
+bool grdev_display_is_enabled(grdev_display *display) {
+        return display && display->enabled;
+}
+
+void grdev_display_enable(grdev_display *display) {
+        grdev_tile *t;
+
+        assert(display);
+
+        if (!display->enabled) {
+                display->enabled = true;
+                TILE_FOREACH(display->tile, t)
+                        if (t->type == GRDEV_TILE_LEAF)
+                                pipe_enable(t->leaf.pipe);
+        }
+}
+
+void grdev_display_disable(grdev_display *display) {
+        grdev_tile *t;
+
+        assert(display);
+
+        if (display->enabled) {
+                display->enabled = false;
+                TILE_FOREACH(display->tile, t)
+                        if (t->type == GRDEV_TILE_LEAF)
+                                pipe_disable(t->leaf.pipe);
+        }
+}
+
+const grdev_display_target *grdev_display_next_target(grdev_display *display, const grdev_display_target *prev) {
+        grdev_display_cache *cache;
+        size_t idx;
+
+        assert_return(display, NULL);
+        assert_return(!display->modified, NULL);
+        assert_return(display->enabled, NULL);
+
+        if (prev) {
+                cache = container_of(prev, grdev_display_cache, target);
+
+                assert(cache->pipe);
+                assert(cache->pipe->tile->display == display);
+                assert(display->pipes >= cache);
+
+                idx = cache - display->pipes + 1;
+        } else {
+                idx = 0;
+        }
+
+        for (cache = display->pipes + idx; idx < display->n_pipes; ++idx, ++cache) {
+                grdev_display_target *target;
+                grdev_pipe *pipe;
+                grdev_fb *fb;
+
+                pipe = cache->pipe;
+                target = &cache->target;
+
+                if (!pipe->running || !pipe->enabled)
+                        continue;
+
+                /* find suitable back-buffer */
+                if (!pipe->back) {
+                        if (!pipe->vtable->target)
+                                continue;
+                        if (!(fb = pipe->vtable->target(pipe)))
+                                continue;
+
+                        assert(fb == pipe->back);
+                }
+
+                target->front = pipe->front;
+                target->back = pipe->back;
+
+                return target;
+        }
+
+        return NULL;
+}
+
+void grdev_display_flip_target(grdev_display *display, const grdev_display_target *target) {
+        grdev_display_cache *cache;
+
+        assert(display);
+        assert(!display->modified);
+        assert(display->enabled);
+        assert(target);
+
+        cache = container_of(target, grdev_display_cache, target);
+
+        assert(cache->pipe);
+        assert(cache->pipe->tile->display == display);
+
+        cache->pipe->flip = true;
+}
+
+static void display_cache_apply(grdev_display_cache *c, grdev_tile *l) {
+        uint32_t x, y, width, height;
+        grdev_display_target *t;
+
+        assert(c);
+        assert(l);
+        assert(l->cache_w >= c->target.width + c->target.x);
+        assert(l->cache_h >= c->target.height + c->target.y);
+
+        t = &c->target;
+
+        /* rotate child */
+
+        t->rotate = (t->rotate + l->rotate) & 0x3;
+
+        x = t->x;
+        y = t->y;
+        width = t->width;
+        height = t->height;
+
+        switch (l->rotate) {
+        case GRDEV_ROTATE_0:
+                break;
+        case GRDEV_ROTATE_90:
+                t->x = l->cache_h - (height + y);
+                t->y = x;
+                t->width = height;
+                t->height = width;
+                break;
+        case GRDEV_ROTATE_180:
+                t->x = l->cache_w - (width + x);
+                t->y = l->cache_h - (height + y);
+                break;
+        case GRDEV_ROTATE_270:
+                t->x = y;
+                t->y = l->cache_w - (width + x);
+                t->width = height;
+                t->height = width;
+                break;
+        }
+
+        /* flip child */
+
+        t->flip ^= l->flip;
+
+        if (l->flip & GRDEV_FLIP_HORIZONTAL)
+                t->x = l->cache_w - (t->width + t->x);
+        if (l->flip & GRDEV_FLIP_VERTICAL)
+                t->y = l->cache_h - (t->height + t->y);
+
+        /* move child */
+
+        t->x += l->x;
+        t->y += l->y;
+}
+
+static void display_cache_targets(grdev_display *display) {
+        grdev_display_cache *c;
+        grdev_tile *tile;
+
+        assert(display);
+
+        /* depth-first with children before parent */
+        for (tile = tile_leftmost(display->tile);
+             tile;
+             tile = tile_leftmost(tile->children_by_node_next) ? : tile->parent) {
+                if (tile->type == GRDEV_TILE_LEAF) {
+                        grdev_pipe *p;
+
+                        /* We're at a leaf and no parent has been cached, yet.
+                         * Copy the pipe information into the target cache and
+                         * update our global pipe-caches if required. */
+
+                        assert(tile->leaf.pipe);
+                        assert(display->n_pipes + 1 <= display->max_pipes);
+
+                        p = tile->leaf.pipe;
+                        c = &display->pipes[display->n_pipes++];
+
+                        zero(*c);
+                        c->pipe = p;
+                        c->pipe->cache = c;
+                        c->target.width = p->width;
+                        c->target.height = p->height;
+                        tile->cache_w = p->width;
+                        tile->cache_h = p->height;
+
+                        /* all new tiles are incomplete due to geometry changes */
+                        c->incomplete = true;
+
+                        display_cache_apply(c, tile);
+                } else {
+                        grdev_tile *child, *l;
+
+                        /* We're now at a node with all its children already
+                         * computed (depth-first, child before parent). We
+                         * first need to know the size of our tile, then we
+                         * recurse into all leafs and update their cache. */
+
+                        tile->cache_w = 0;
+                        tile->cache_h = 0;
+
+                        LIST_FOREACH(children_by_node, child, tile->node.child_list) {
+                                if (child->x + child->cache_w > tile->cache_w)
+                                        tile->cache_w = child->x + child->cache_w;
+                                if (child->y + child->cache_h > tile->cache_h)
+                                        tile->cache_h = child->y + child->cache_h;
+                        }
+
+                        assert(tile->cache_w > 0);
+                        assert(tile->cache_h > 0);
+
+                        TILE_FOREACH(tile, l)
+                                if (l->type == GRDEV_TILE_LEAF)
+                                        display_cache_apply(l->leaf.pipe->cache, tile);
+                }
+        }
+}
+
+static bool display_cache(grdev_display *display) {
+        grdev_tile *tile;
+        size_t n;
+        void *t;
+        int r;
+
+        assert(display);
+
+        if (!display->modified)
+                return false;
+
+        display->modified = false;
+        display->framed = false;
+        display->n_pipes = 0;
+        display->width = 0;
+        display->height = 0;
+
+        if (display->n_leafs < 1)
+                return false;
+
+        TILE_FOREACH(display->tile, tile)
+                if (tile->type == GRDEV_TILE_LEAF)
+                        tile->leaf.pipe->cache = NULL;
+
+        if (display->n_leafs > display->max_pipes) {
+                n = ALIGN_POWER2(display->n_leafs);
+                if (!n) {
+                        r = -ENOMEM;
+                        goto out;
+                }
+
+                t = realloc_multiply(display->pipes, sizeof(*display->pipes), n);
+                if (!t) {
+                        r = -ENOMEM;
+                        goto out;
+                }
+
+                display->pipes = t;
+                display->max_pipes = n;
+        }
+
+        display_cache_targets(display);
+        display->width = display->tile->cache_w;
+        display->height = display->tile->cache_h;
+
+        r = 0;
+
+out:
+        if (r < 0)
+                log_debug("grdev: %s/%s: cannot cache pipes: %s",
+                          display->session->name, display->name, strerror(-r));
+        return true;
+}
+
+/*
+ * Pipes
+ */
+
+grdev_pipe *grdev_find_pipe(grdev_card *card, const char *name) {
+        assert_return(card, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(card->pipe_map, name);
+}
+
+static int pipe_vsync_fn(sd_event_source *src, uint64_t usec, void *userdata) {
+        grdev_pipe *pipe = userdata;
+
+        grdev_pipe_frame(pipe);
+        return 0;
+}
+
+int grdev_pipe_add(grdev_pipe *pipe, const char *name, size_t n_fbs) {
+        int r;
+
+        assert_return(pipe, -EINVAL);
+        assert_return(pipe->vtable, -EINVAL);
+        assert_return(pipe->vtable->free, -EINVAL);
+        assert_return(pipe->card, -EINVAL);
+        assert_return(pipe->card->session, -EINVAL);
+        assert_return(!pipe->cache, -EINVAL);
+        assert_return(pipe->width > 0, -EINVAL);
+        assert_return(pipe->height > 0, -EINVAL);
+        assert_return(pipe->vrefresh > 0, -EINVAL);
+        assert_return(!pipe->enabled, -EINVAL);
+        assert_return(!pipe->running, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        pipe->name = strdup(name);
+        if (!pipe->name)
+                return -ENOMEM;
+
+        if (n_fbs > 0) {
+                pipe->fbs = new0(grdev_fb*, n_fbs);
+                if (!pipe->fbs)
+                        return -ENOMEM;
+
+                pipe->max_fbs = n_fbs;
+        }
+
+        r = grdev_tile_new_leaf(&pipe->tile, pipe);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_time(pipe->card->session->context->event,
+                              &pipe->vsync_src,
+                              CLOCK_MONOTONIC,
+                              0,
+                              10 * USEC_PER_MSEC,
+                              pipe_vsync_fn,
+                              pipe);
+        if (r < 0)
+                return r;
+
+        r = sd_event_source_set_enabled(pipe->vsync_src, SD_EVENT_OFF);
+        if (r < 0)
+                return r;
+
+        r = hashmap_put(pipe->card->pipe_map, pipe->name, pipe);
+        if (r < 0)
+                return r;
+
+        card_modified(pipe->card);
+        return 0;
+}
+
+grdev_pipe *grdev_pipe_free(grdev_pipe *pipe) {
+        grdev_pipe tmp;
+
+        if (!pipe)
+                return NULL;
+
+        assert(pipe->card);
+        assert(pipe->vtable);
+        assert(pipe->vtable->free);
+
+        if (pipe->name)
+                hashmap_remove_value(pipe->card->pipe_map, pipe->name, pipe);
+        if (pipe->tile)
+                tile_unlink(pipe->tile);
+
+        assert(!pipe->cache);
+
+        tmp = *pipe;
+        pipe->vtable->free(pipe);
+
+        sd_event_source_unref(tmp.vsync_src);
+        grdev_tile_free(tmp.tile);
+        card_modified(tmp.card);
+        free(tmp.fbs);
+        free(tmp.name);
+
+        return NULL;
+}
+
+static void pipe_enable(grdev_pipe *pipe) {
+        assert(pipe);
+
+        if (!pipe->enabled) {
+                pipe->enabled = true;
+                if (pipe->vtable->enable)
+                        pipe->vtable->enable(pipe);
+        }
+}
+
+static void pipe_disable(grdev_pipe *pipe) {
+        assert(pipe);
+
+        if (pipe->enabled) {
+                pipe->enabled = false;
+                if (pipe->vtable->disable)
+                        pipe->vtable->disable(pipe);
+        }
+}
+
+void grdev_pipe_ready(grdev_pipe *pipe, bool running) {
+        assert(pipe);
+
+        /* grdev_pipe_ready() is used by backends to notify about pipe state
+         * changed. If a pipe is ready, it can be fully used by us (available,
+         * enabled and accessable). Backends can disable pipes at any time
+         * (like for async revocation), but can only enable them from parent
+         * context. Otherwise, we might call user-callbacks recursively. */
+
+        if (pipe->running == running)
+                return;
+
+        pipe->running = running;
+
+        /* runtime events for unused pipes are not interesting */
+        if (pipe->cache && pipe->enabled) {
+                grdev_display *display = pipe->tile->display;
+
+                assert(display);
+
+                if (running)
+                        session_frame(display->session, display);
+                else
+                        pipe->cache->incomplete = true;
+        }
+}
+
+void grdev_pipe_frame(grdev_pipe *pipe) {
+        grdev_display *display;
+
+        assert(pipe);
+
+        /* if pipe is unused, ignore any frame events */
+        if (!pipe->cache || !pipe->enabled)
+                return;
+
+        display = pipe->tile->display;
+        assert(display);
+
+        grdev_pipe_schedule(pipe, 0);
+        session_frame(display->session, display);
+}
+
+void grdev_pipe_schedule(grdev_pipe *pipe, uint64_t frames) {
+        int r;
+        uint64_t ts;
+
+        if (!frames) {
+                sd_event_source_set_enabled(pipe->vsync_src, SD_EVENT_OFF);
+                return;
+        }
+
+        r = sd_event_now(pipe->card->session->context->event, CLOCK_MONOTONIC, &ts);
+        if (r < 0)
+                goto error;
+
+        ts += frames * USEC_PER_MSEC * 1000ULL / pipe->vrefresh;
+
+        r = sd_event_source_set_time(pipe->vsync_src, ts);
+        if (r < 0)
+                goto error;
+
+        r = sd_event_source_set_enabled(pipe->vsync_src, SD_EVENT_ONESHOT);
+        if (r < 0)
+                goto error;
+
+        return;
+
+error:
+        log_debug("grdev: %s/%s/%s: cannot schedule vsync timer: %s",
+                  pipe->card->session->name, pipe->card->name, pipe->name, strerror(-r));
+}
+
+/*
+ * Cards
+ */
+
+grdev_card *grdev_find_card(grdev_session *session, const char *name) {
+        assert_return(session, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(session->card_map, name);
+}
+
+int grdev_card_add(grdev_card *card, const char *name) {
+        int r;
+
+        assert_return(card, -EINVAL);
+        assert_return(card->vtable, -EINVAL);
+        assert_return(card->vtable->free, -EINVAL);
+        assert_return(card->session, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        card->name = strdup(name);
+        if (!card->name)
+                return -ENOMEM;
+
+        card->pipe_map = hashmap_new(&string_hash_ops);
+        if (!card->pipe_map)
+                return -ENOMEM;
+
+        r = hashmap_put(card->session->card_map, card->name, card);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+grdev_card *grdev_card_free(grdev_card *card) {
+        grdev_card tmp;
+
+        if (!card)
+                return NULL;
+
+        assert(!card->enabled);
+        assert(card->vtable);
+        assert(card->vtable->free);
+
+        if (card->name)
+                hashmap_remove_value(card->session->card_map, card->name, card);
+
+        tmp = *card;
+        card->vtable->free(card);
+
+        assert(hashmap_size(tmp.pipe_map) == 0);
+
+        hashmap_free(tmp.pipe_map);
+        free(tmp.name);
+
+        return NULL;
+}
+
+static void card_modified(grdev_card *card) {
+        assert(card);
+        assert(card->session->n_pins > 0);
+
+        card->modified = true;
+}
+
+static void grdev_card_enable(grdev_card *card) {
+        assert(card);
+
+        if (!card->enabled) {
+                card->enabled = true;
+                if (card->vtable->enable)
+                        card->vtable->enable(card);
+        }
+}
+
+static void grdev_card_disable(grdev_card *card) {
+        assert(card);
+
+        if (card->enabled) {
+                card->enabled = false;
+                if (card->vtable->disable)
+                        card->vtable->disable(card);
+        }
+}
+
+/*
+ * Sessions
+ */
+
+static void session_raise(grdev_session *session, grdev_event *event) {
+        session->event_fn(session, session->userdata, event);
+}
+
+static void session_raise_display_add(grdev_session *session, grdev_display *display) {
+        grdev_event event = {
+                .type = GRDEV_EVENT_DISPLAY_ADD,
+                .display_add = {
+                        .display = display,
+                },
+        };
+
+        session_raise(session, &event);
+}
+
+static void session_raise_display_remove(grdev_session *session, grdev_display *display) {
+        grdev_event event = {
+                .type = GRDEV_EVENT_DISPLAY_REMOVE,
+                .display_remove = {
+                        .display = display,
+                },
+        };
+
+        session_raise(session, &event);
+}
+
+static void session_raise_display_change(grdev_session *session, grdev_display *display) {
+        grdev_event event = {
+                .type = GRDEV_EVENT_DISPLAY_CHANGE,
+                .display_change = {
+                        .display = display,
+                },
+        };
+
+        session_raise(session, &event);
+}
+
+static void session_raise_display_frame(grdev_session *session, grdev_display *display) {
+        grdev_event event = {
+                .type = GRDEV_EVENT_DISPLAY_FRAME,
+                .display_frame = {
+                        .display = display,
+                },
+        };
+
+        session_raise(session, &event);
+}
+
+static void session_add_card(grdev_session *session, grdev_card *card) {
+        assert(session);
+        assert(card);
+
+        log_debug("grdev: %s: add card '%s'", session->name, card->name);
+
+        /* Cards are not exposed to users, but managed internally. Cards are
+         * enabled if the session is enabled, and will track that state. The
+         * backend can probe the card at any time, but only if enabled. It
+         * will then add pipes according to hardware state.
+         * That is, the card may create pipes as soon as we enable it here. */
+
+        if (session->enabled)
+                grdev_card_enable(card);
+}
+
+static void session_remove_card(grdev_session *session, grdev_card *card) {
+        assert(session);
+        assert(card);
+
+        log_debug("grdev: %s: remove card '%s'", session->name, card->name);
+
+        /* As cards are not exposed, it can never be accessed by outside
+         * users and we can simply remove it. Disabling the card does not
+         * necessarily drop all pipes of the card. This is usually deferred
+         * to card destruction (as pipes are cached as long as FDs remain
+         * open). Therefore, the card destruction might cause pipes, and thus
+         * visible displays, to be removed. */
+
+        grdev_card_disable(card);
+        grdev_card_free(card);
+}
+
+static void session_add_display(grdev_session *session, grdev_display *display) {
+        assert(session);
+        assert(display);
+        assert(!display->enabled);
+
+        log_debug("grdev: %s: add display '%s'", session->name, display->name);
+
+        /* Displays are the main entity for public API users. We create them
+         * independent of card backends and they wrap any underlying display
+         * architecture. Displays are public at all times, thus, may be entered
+         * by outside users at any time. */
+
+        display->public = true;
+        session_raise_display_add(session, display);
+}
+
+static void session_remove_display(grdev_session *session, grdev_display *display) {
+        assert(session);
+        assert(display);
+
+        log_debug("grdev: %s: remove display '%s'", session->name, display->name);
+
+        /* Displays are public, so we have to be careful when removing them.
+         * We first tell users about their removal, disable them and then drop
+         * them. We now, after the notification, no external access will
+         * happen. Therefore, we can release the tiles afterwards safely. */
+
+        if (display->public) {
+                display->public = false;
+                session_raise_display_remove(session, display);
+        }
+
+        grdev_display_disable(display);
+        grdev_display_free(display);
+}
+
+static void session_change_display(grdev_session *session, grdev_display *display) {
+        bool changed;
+
+        assert(session);
+        assert(display);
+
+        changed = display_cache(display);
+
+        if (display->n_leafs == 0) {
+                session_remove_display(session, display);
+        } else if (!display->public) {
+                session_add_display(session, display);
+                session_frame(session, display);
+        } else if (changed) {
+                session_raise_display_change(session, display);
+                session_frame(session, display);
+        } else if (display->framed) {
+                session_frame(session, display);
+        }
+}
+
+static void session_frame(grdev_session *session, grdev_display *display) {
+        assert(session);
+        assert(display);
+
+        display->framed = false;
+
+        if (!display->enabled || !session->enabled)
+                return;
+
+        if (session->n_pins > 0)
+                display->framed = true;
+        else
+                session_raise_display_frame(session, display);
+}
+
+int grdev_session_new(grdev_session **out,
+                      grdev_context *context,
+                      unsigned int flags,
+                      const char *name,
+                      grdev_event_fn event_fn,
+                      void *userdata) {
+        _cleanup_(grdev_session_freep) grdev_session *session = NULL;
+        int r;
+
+        assert(out);
+        assert(context);
+        assert(name);
+        assert(event_fn);
+        assert_return(session_id_valid(name) == !(flags & GRDEV_SESSION_CUSTOM), -EINVAL);
+        assert_return(!(flags & GRDEV_SESSION_CUSTOM) || !(flags & GRDEV_SESSION_MANAGED), -EINVAL);
+        assert_return(!(flags & GRDEV_SESSION_MANAGED) || context->sysbus, -EINVAL);
+
+        session = new0(grdev_session, 1);
+        if (!session)
+                return -ENOMEM;
+
+        session->context = grdev_context_ref(context);
+        session->custom = flags & GRDEV_SESSION_CUSTOM;
+        session->managed = flags & GRDEV_SESSION_MANAGED;
+        session->event_fn = event_fn;
+        session->userdata = userdata;
+
+        session->name = strdup(name);
+        if (!session->name)
+                return -ENOMEM;
+
+        if (session->managed) {
+                r = sd_bus_path_encode("/org/freedesktop/login1/session",
+                                       session->name, &session->path);
+                if (r < 0)
+                        return r;
+        }
+
+        session->card_map = hashmap_new(&string_hash_ops);
+        if (!session->card_map)
+                return -ENOMEM;
+
+        session->display_map = hashmap_new(&string_hash_ops);
+        if (!session->display_map)
+                return -ENOMEM;
+
+        r = hashmap_put(context->session_map, session->name, session);
+        if (r < 0)
+                return r;
+
+        *out = session;
+        session = NULL;
+        return 0;
+}
+
+grdev_session *grdev_session_free(grdev_session *session) {
+        grdev_card *card;
+
+        if (!session)
+                return NULL;
+
+        grdev_session_disable(session);
+
+        while ((card = hashmap_first(session->card_map)))
+                session_remove_card(session, card);
+
+        assert(hashmap_size(session->display_map) == 0);
+
+        if (session->name)
+                hashmap_remove_value(session->context->session_map, session->name, session);
+
+        hashmap_free(session->display_map);
+        hashmap_free(session->card_map);
+        session->context = grdev_context_unref(session->context);
+        free(session->path);
+        free(session->name);
+        free(session);
+
+        return NULL;
+}
+
+bool grdev_session_is_enabled(grdev_session *session) {
+        return session && session->enabled;
+}
+
+void grdev_session_enable(grdev_session *session) {
+        grdev_card *card;
+        Iterator iter;
+
+        assert(session);
+
+        if (!session->enabled) {
+                session->enabled = true;
+                HASHMAP_FOREACH(card, session->card_map, iter)
+                        grdev_card_enable(card);
+        }
+}
+
+void grdev_session_disable(grdev_session *session) {
+        grdev_card *card;
+        Iterator iter;
+
+        assert(session);
+
+        if (session->enabled) {
+                session->enabled = false;
+                HASHMAP_FOREACH(card, session->card_map, iter)
+                        grdev_card_disable(card);
+        }
+}
+
+void grdev_session_commit(grdev_session *session) {
+        grdev_card *card;
+        Iterator iter;
+
+        assert(session);
+
+        if (!session->enabled)
+                return;
+
+        HASHMAP_FOREACH(card, session->card_map, iter)
+                if (card->vtable->commit)
+                        card->vtable->commit(card);
+}
+
+void grdev_session_restore(grdev_session *session) {
+        grdev_card *card;
+        Iterator iter;
+
+        assert(session);
+
+        if (!session->enabled)
+                return;
+
+        HASHMAP_FOREACH(card, session->card_map, iter)
+                if (card->vtable->restore)
+                        card->vtable->restore(card);
+}
+
+void grdev_session_add_drm(grdev_session *session, struct udev_device *ud) {
+        grdev_card *card;
+        dev_t devnum;
+        int r;
+
+        assert(session);
+        assert(ud);
+
+        devnum = udev_device_get_devnum(ud);
+        if (devnum == 0)
+                return grdev_session_hotplug_drm(session, ud);
+
+        card = grdev_find_drm_card(session, devnum);
+        if (card)
+                return;
+
+        r = grdev_drm_card_new(&card, session, ud);
+        if (r < 0) {
+                log_debug("grdev: %s: cannot add DRM device for %s: %s",
+                          session->name, udev_device_get_syspath(ud), strerror(-r));
+                return;
+        }
+
+        session_add_card(session, card);
+}
+
+void grdev_session_remove_drm(grdev_session *session, struct udev_device *ud) {
+        grdev_card *card;
+        dev_t devnum;
+
+        assert(session);
+        assert(ud);
+
+        devnum = udev_device_get_devnum(ud);
+        if (devnum == 0)
+                return grdev_session_hotplug_drm(session, ud);
+
+        card = grdev_find_drm_card(session, devnum);
+        if (!card)
+                return;
+
+        session_remove_card(session, card);
+}
+
+void grdev_session_hotplug_drm(grdev_session *session, struct udev_device *ud) {
+        grdev_card *card = NULL;
+        struct udev_device *p;
+        dev_t devnum;
+
+        assert(session);
+        assert(ud);
+
+        for (p = ud; p; p = udev_device_get_parent_with_subsystem_devtype(p, "drm", NULL)) {
+                devnum = udev_device_get_devnum(ud);
+                if (devnum == 0)
+                        continue;
+
+                card = grdev_find_drm_card(session, devnum);
+                if (card)
+                        break;
+        }
+
+        if (!card)
+                return;
+
+        grdev_drm_card_hotplug(card, ud);
+}
+
+static void session_configure(grdev_session *session) {
+        grdev_display *display;
+        grdev_tile *tile;
+        grdev_card *card;
+        grdev_pipe *pipe;
+        Iterator i, j;
+        int r;
+
+        assert(session);
+
+        /*
+         * Whenever backends add or remove pipes, we set session->modified and
+         * require them to pin the session while modifying it. On release, we
+         * reconfigure the device and re-assign displays to all modified pipes.
+         *
+         * So far, we configure each pipe as a separate display. We do not
+         * support user-configuration, nor have we gotten any reports from
+         * users with multi-pipe monitors (4k on DP-1.2 MST and so on). Until
+         * we get reports, we keep the logic to a minimum.
+         */
+
+        /* create new displays for all unconfigured pipes */
+        HASHMAP_FOREACH(card, session->card_map, i) {
+                if (!card->modified)
+                        continue;
+
+                card->modified = false;
+
+                HASHMAP_FOREACH(pipe, card->pipe_map, j) {
+                        tile = pipe->tile;
+                        if (tile->display)
+                                continue;
+
+                        assert(!tile->parent);
+
+                        display = grdev_find_display(session, pipe->name);
+                        if (display && display->tile) {
+                                log_debug("grdev: %s/%s: occupied display for pipe %s",
+                                          session->name, card->name, pipe->name);
+                                continue;
+                        } else if (!display) {
+                                r = grdev_display_new(&display, session, pipe->name);
+                                if (r < 0) {
+                                        log_debug("grdev: %s/%s: cannot create display for pipe %s: %s",
+                                                  session->name, card->name, pipe->name, strerror(-r));
+                                        continue;
+                                }
+                        }
+
+                        tile_link(pipe->tile, display->tile);
+                }
+        }
+
+        /* update displays */
+        HASHMAP_FOREACH(display, session->display_map, i)
+                session_change_display(session, display);
+}
+
+grdev_session *grdev_session_pin(grdev_session *session) {
+        assert(session);
+
+        ++session->n_pins;
+        return session;
+}
+
+grdev_session *grdev_session_unpin(grdev_session *session) {
+        if (!session)
+                return NULL;
+
+        assert(session->n_pins > 0);
+
+        if (--session->n_pins == 0)
+                session_configure(session);
+
+        return NULL;
+}
+
+/*
+ * Contexts
+ */
+
+int grdev_context_new(grdev_context **out, sd_event *event, sd_bus *sysbus) {
+        _cleanup_(grdev_context_unrefp) grdev_context *context = NULL;
+
+        assert_return(out, -EINVAL);
+        assert_return(event, -EINVAL);
+
+        context = new0(grdev_context, 1);
+        if (!context)
+                return -ENOMEM;
+
+        context->ref = 1;
+        context->event = sd_event_ref(event);
+
+        if (sysbus)
+                context->sysbus = sd_bus_ref(sysbus);
+
+        context->session_map = hashmap_new(&string_hash_ops);
+        if (!context->session_map)
+                return -ENOMEM;
+
+        *out = context;
+        context = NULL;
+        return 0;
+}
+
+static void context_cleanup(grdev_context *context) {
+        assert(hashmap_size(context->session_map) == 0);
+
+        hashmap_free(context->session_map);
+        context->sysbus = sd_bus_unref(context->sysbus);
+        context->event = sd_event_unref(context->event);
+        free(context);
+}
+
+grdev_context *grdev_context_ref(grdev_context *context) {
+        assert_return(context, NULL);
+        assert_return(context->ref > 0, NULL);
+
+        ++context->ref;
+        return context;
+}
+
+grdev_context *grdev_context_unref(grdev_context *context) {
+        if (!context)
+                return NULL;
+
+        assert_return(context->ref > 0, NULL);
+
+        if (--context->ref == 0)
+                context_cleanup(context);
+
+        return NULL;
+}
diff --git a/src/libsystemd-terminal/grdev.h b/src/libsystemd-terminal/grdev.h
new file mode 100644 (file)
index 0000000..35d6eb2
--- /dev/null
@@ -0,0 +1,201 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Graphics Devices
+ * The grdev layer provides generic access to graphics devices. The device
+ * types are hidden in the implementation and exported in a generic way. The
+ * grdev_session object forms the base layer. It loads, configures and prepares
+ * any graphics devices associated with that session. Each session is totally
+ * independent of other sessions and can be controlled separately.
+ * The target devices on a session are called display. A display always
+ * corresponds to a real display regardless how many pipes are needed to drive
+ * that display. That is, an exported display might internally be created out
+ * of arbitrary combinations of target pipes. However, this is meant as
+ * implementation detail and API users must never assume details below the
+ * display-level. That is, a display is the most low-level object exported.
+ * Therefore, pipe-configuration and any low-level modesetting is hidden from
+ * the public API. It is provided by the implementation, and it is the
+ * implementation that decides how pipes are driven.
+ *
+ * The API users are free to ignore specific displays or combine them to create
+ * larger screens. This often requires user-configuration so is dictated by
+ * policy. The underlying pipe-configuration might be affected by these
+ * high-level policies, but is never directly controlled by those. That means,
+ * depending on the displays you use, it might affect how underlying resources
+ * are assigned. However, users can never directly apply policies to the pipes,
+ * but only to displays. In case specific hardware needs quirks on the pipe
+ * level, we support that via hwdb, not via public user configuration.
+ *
+ * Right now, displays are limited to rgb32 memory-mapped framebuffers on the
+ * primary plane. However, the grdev implementation can be easily extended to
+ * allow more powerful access (including hardware-acceleration for 2D and 3D
+ * compositing). So far, this wasn't needed so it is not exposed.
+ */
+
+#pragma once
+
+#include <drm_fourcc.h>
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include "util.h"
+
+typedef struct grdev_fb                 grdev_fb;
+typedef struct grdev_display_target     grdev_display_target;
+typedef struct grdev_display            grdev_display;
+
+typedef struct grdev_event              grdev_event;
+typedef struct grdev_session            grdev_session;
+typedef struct grdev_context            grdev_context;
+
+enum {
+        /* clockwise rotation; we treat this is abelian group Z4 with ADD */
+        GRDEV_ROTATE_0                  = 0,
+        GRDEV_ROTATE_90                 = 1,
+        GRDEV_ROTATE_180                = 2,
+        GRDEV_ROTATE_270                = 3,
+};
+
+enum {
+        /* flip states; we treat this as abelian group V4 with XOR */
+        GRDEV_FLIP_NONE                 = 0x0,
+        GRDEV_FLIP_HORIZONTAL           = 0x1,
+        GRDEV_FLIP_VERTICAL             = 0x2,
+};
+
+/*
+ * Displays
+ */
+
+struct grdev_fb {
+        uint32_t width;
+        uint32_t height;
+        uint32_t format;
+        int32_t strides[4];
+        void *maps[4];
+
+        union {
+                void *ptr;
+                uint64_t u64;
+        } data;
+
+        void (*free_fn) (void *ptr);
+};
+
+struct grdev_display_target {
+        uint32_t x;
+        uint32_t y;
+        uint32_t width;
+        uint32_t height;
+        unsigned int rotate;
+        unsigned int flip;
+        grdev_fb *front;
+        grdev_fb *back;
+};
+
+void grdev_display_set_userdata(grdev_display *display, void *userdata);
+void *grdev_display_get_userdata(grdev_display *display);
+
+const char *grdev_display_get_name(grdev_display *display);
+uint32_t grdev_display_get_width(grdev_display *display);
+uint32_t grdev_display_get_height(grdev_display *display);
+
+bool grdev_display_is_enabled(grdev_display *display);
+void grdev_display_enable(grdev_display *display);
+void grdev_display_disable(grdev_display *display);
+
+const grdev_display_target *grdev_display_next_target(grdev_display *display, const grdev_display_target *prev);
+void grdev_display_flip_target(grdev_display *display, const grdev_display_target *target);
+
+#define GRDEV_DISPLAY_FOREACH_TARGET(_display, _t)                      \
+        for ((_t) = grdev_display_next_target((_display), NULL);        \
+             (_t);                                                      \
+             (_t) = grdev_display_next_target((_display), (_t)))
+
+/*
+ * Events
+ */
+
+enum {
+        GRDEV_EVENT_DISPLAY_ADD,
+        GRDEV_EVENT_DISPLAY_REMOVE,
+        GRDEV_EVENT_DISPLAY_CHANGE,
+        GRDEV_EVENT_DISPLAY_FRAME,
+};
+
+typedef void (*grdev_event_fn) (grdev_session *session, void *userdata, grdev_event *ev);
+
+struct grdev_event {
+        unsigned int type;
+        union {
+                struct {
+                        grdev_display *display;
+                } display_add, display_remove, display_change;
+
+                struct {
+                        grdev_display *display;
+                } display_frame;
+        };
+};
+
+/*
+ * Sessions
+ */
+
+enum {
+        GRDEV_SESSION_CUSTOM                    = (1 << 0),
+        GRDEV_SESSION_MANAGED                   = (1 << 1),
+};
+
+int grdev_session_new(grdev_session **out,
+                      grdev_context *context,
+                      unsigned int flags,
+                      const char *name,
+                      grdev_event_fn event_fn,
+                      void *userdata);
+grdev_session *grdev_session_free(grdev_session *session);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_session*, grdev_session_free);
+
+bool grdev_session_is_enabled(grdev_session *session);
+void grdev_session_enable(grdev_session *session);
+void grdev_session_disable(grdev_session *session);
+
+void grdev_session_commit(grdev_session *session);
+void grdev_session_restore(grdev_session *session);
+
+void grdev_session_add_drm(grdev_session *session, struct udev_device *ud);
+void grdev_session_remove_drm(grdev_session *session, struct udev_device *ud);
+void grdev_session_hotplug_drm(grdev_session *session, struct udev_device *ud);
+
+/*
+ * Contexts
+ */
+
+int grdev_context_new(grdev_context **out, sd_event *event, sd_bus *sysbus);
+grdev_context *grdev_context_ref(grdev_context *context);
+grdev_context *grdev_context_unref(grdev_context *context);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_context*, grdev_context_unref);
diff --git a/src/libsystemd-terminal/idev-evdev.c b/src/libsystemd-terminal/idev-evdev.c
new file mode 100644 (file)
index 0000000..63fa89e
--- /dev/null
@@ -0,0 +1,864 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include <libevdev/libevdev.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <unistd.h>
+#include "bus-util.h"
+#include "hashmap.h"
+#include "idev.h"
+#include "idev-internal.h"
+#include "macro.h"
+#include "udev-util.h"
+#include "util.h"
+
+typedef struct idev_evdev idev_evdev;
+typedef struct unmanaged_evdev unmanaged_evdev;
+typedef struct managed_evdev managed_evdev;
+
+struct idev_evdev {
+        idev_element element;
+        struct libevdev *evdev;
+        int fd;
+        sd_event_source *fd_src;
+        sd_event_source *idle_src;
+
+        bool unsync : 1;                /* not in-sync with kernel */
+        bool resync : 1;                /* re-syncing with kernel */
+        bool running : 1;
+};
+
+struct unmanaged_evdev {
+        idev_evdev evdev;
+        char *devnode;
+};
+
+struct managed_evdev {
+        idev_evdev evdev;
+        dev_t devnum;
+        sd_bus_slot *slot_take_device;
+
+        bool requested : 1;             /* TakeDevice() was sent */
+        bool acquired : 1;              /* TakeDevice() was successful */
+};
+
+#define idev_evdev_from_element(_e) container_of((_e), idev_evdev, element)
+#define unmanaged_evdev_from_element(_e) \
+        container_of(idev_evdev_from_element(_e), unmanaged_evdev, evdev)
+#define managed_evdev_from_element(_e) \
+        container_of(idev_evdev_from_element(_e), managed_evdev, evdev)
+
+#define IDEV_EVDEV_INIT(_vtable, _session) ((idev_evdev){ \
+                .element = IDEV_ELEMENT_INIT((_vtable), (_session)), \
+                .fd = -1, \
+        })
+
+#define IDEV_EVDEV_NAME_MAX (8 + DECIMAL_STR_MAX(unsigned) * 2)
+
+static const idev_element_vtable unmanaged_evdev_vtable;
+static const idev_element_vtable managed_evdev_vtable;
+
+static int idev_evdev_resume(idev_evdev *evdev, int dev_fd);
+static void idev_evdev_pause(idev_evdev *evdev, bool release);
+
+/*
+ * Virtual Evdev Element
+ * The virtual evdev element is the base class of all other evdev elements. It
+ * uses libevdev to access the kernel evdev API. It supports asynchronous
+ * access revocation, re-syncing if events got dropped and more.
+ * This element cannot be used by itself. There must be a wrapper around it
+ * which opens a file-descriptor and passes it to the virtual evdev element.
+ */
+
+static void idev_evdev_name(char *out, dev_t devnum) {
+        /* @out must be at least of size IDEV_EVDEV_NAME_MAX */
+        sprintf(out, "evdev/%u:%u", major(devnum), minor(devnum));
+}
+
+static int idev_evdev_feed_resync(idev_evdev *evdev) {
+        idev_data data = {
+                .type = IDEV_DATA_RESYNC,
+                .resync = evdev->resync,
+        };
+
+        return idev_element_feed(&evdev->element, &data);
+}
+
+static int idev_evdev_feed_evdev(idev_evdev *evdev, struct input_event *event) {
+        idev_data data = {
+                .type = IDEV_DATA_EVDEV,
+                .resync = evdev->resync,
+                .evdev = {
+                        .event = *event,
+                },
+        };
+
+        return idev_element_feed(&evdev->element, &data);
+}
+
+static void idev_evdev_hup(idev_evdev *evdev) {
+        /*
+         * On HUP, we close the current fd via idev_evdev_pause(). This drops
+         * the event-sources from the main-loop and effectively puts the
+         * element asleep. If the HUP is part of a hotplug-event, a following
+         * udev-notification will destroy the element. Otherwise, the HUP is
+         * either result of access-revokation or a serious error.
+         * For unmanaged devices, we should never receive HUP (except for
+         * unplug-events). But if we do, something went seriously wrong and we
+         * shouldn't try to be clever.
+         * Instead, we simply stay asleep and wait for the device to be
+         * disabled and then re-enabled (or closed and re-opened). This will
+         * re-open the device node and restart the device.
+         * For managed devices, a HUP usually means our device-access was
+         * revoked. In that case, we simply put the device asleep and wait for
+         * logind to notify us once the device is alive again. logind also
+         * passes us a new fd. Hence, we don't have to re-enable the device.
+         *
+         * Long story short: The only thing we have to do here, is close() the
+         * file-descriptor and remove it from the main-loop. Everything else is
+         * handled via additional events we receive.
+         */
+
+        idev_evdev_pause(evdev, true);
+}
+
+static int idev_evdev_io(idev_evdev *evdev) {
+        idev_element *e = &evdev->element;
+        struct input_event ev;
+        unsigned int flags;
+        int r, error = 0;
+
+        /*
+         * Read input-events via libevdev until the input-queue is drained. In
+         * case we're disabled, don't do anything. The input-queue might
+         * overflow, but we don't care as we have to resync after wake-up,
+         * anyway.
+         * TODO: libevdev should give us a hint how many events to read. We
+         * really want to avoid starvation, so we shouldn't read forever in
+         * case we cannot keep up with the kernel.
+         * TODO: Make sure libevdev always reports SYN_DROPPED to us, regardless
+         * whether any event was synced afterwards.
+         */
+
+        flags = LIBEVDEV_READ_FLAG_NORMAL;
+        while (e->enabled) {
+                if (evdev->unsync) {
+                        /* immediately resync, even if in sync right now */
+                        evdev->unsync = false;
+                        evdev->resync = false;
+                        flags = LIBEVDEV_READ_FLAG_NORMAL;
+                        r = libevdev_next_event(evdev->evdev, flags | LIBEVDEV_READ_FLAG_FORCE_SYNC, &ev);
+                        if (r < 0 && r != -EAGAIN) {
+                                r = 0;
+                                goto error;
+                        } else if (r != LIBEVDEV_READ_STATUS_SYNC) {
+                                log_debug("idev-evdev: %s/%s: cannot force resync: %d",
+                                          e->session->name, e->name, r);
+                        }
+                } else {
+                        r = libevdev_next_event(evdev->evdev, flags, &ev);
+                }
+
+                if (evdev->resync && r == -EAGAIN) {
+                        /* end of re-sync */
+                        evdev->resync = false;
+                        flags = LIBEVDEV_READ_FLAG_NORMAL;
+                } else if (r == -EAGAIN) {
+                        /* no data available */
+                        break;
+                } else if (r < 0) {
+                        /* read error */
+                        goto error;
+                } else if (r == LIBEVDEV_READ_STATUS_SYNC) {
+                        if (evdev->resync) {
+                                /* sync-event */
+                                r = idev_evdev_feed_evdev(evdev, &ev);
+                                if (r != 0) {
+                                        error = r;
+                                        break;
+                                }
+                        } else {
+                                /* start of sync */
+                                evdev->resync = true;
+                                flags = LIBEVDEV_READ_FLAG_SYNC;
+                                r = idev_evdev_feed_resync(evdev);
+                                if (r != 0) {
+                                        error = r;
+                                        break;
+                                }
+                        }
+                } else {
+                        /* normal event */
+                        r = idev_evdev_feed_evdev(evdev, &ev);
+                        if (r != 0) {
+                                error = r;
+                                break;
+                        }
+                }
+        }
+
+        if (error < 0)
+                log_debug("idev-evdev: %s/%s: error on data event: %s",
+                          e->session->name, e->name, strerror(-error));
+        return error;
+
+error:
+        idev_evdev_hup(evdev);
+        return 0; /* idev_evdev_hup() handles the error so discard it */
+}
+
+static int idev_evdev_event_fn(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        idev_evdev *evdev = userdata;
+
+        /* fetch data as long as EPOLLIN is signalled */
+        if (revents & EPOLLIN)
+                return idev_evdev_io(evdev);
+
+        if (revents & (EPOLLHUP | EPOLLERR))
+                idev_evdev_hup(evdev);
+
+        return 0;
+}
+
+static int idev_evdev_idle_fn(sd_event_source *s, void *userdata) {
+        idev_evdev *evdev = userdata;
+
+        /*
+         * The idle-event is raised whenever we have to re-sync the libevdev
+         * state from the kernel. We simply call into idev_evdev_io() which
+         * flushes the state and re-syncs it if @unsync is set.
+         * State has to be synced whenever our view of the kernel device is
+         * out of date. This is the case when we open the device, if the
+         * kernel's receive buffer overflows, or on other exceptional
+         * situations. Events during re-syncs must be forwarded to the upper
+         * layers so they can update their view of the device. However, such
+         * events must only be handled passively, as they might be out-of-order
+         * and/or re-ordered. Therefore, we mark them as 'sync' events.
+         */
+
+        if (!evdev->unsync)
+                return 0;
+
+        return idev_evdev_io(evdev);
+}
+
+static void idev_evdev_destroy(idev_evdev *evdev) {
+        assert(evdev);
+        assert(evdev->fd < 0);
+
+        libevdev_free(evdev->evdev);
+        evdev->evdev = NULL;
+}
+
+static void idev_evdev_enable(idev_evdev *evdev) {
+        assert(evdev);
+        assert(evdev->fd_src);
+        assert(evdev->idle_src);
+
+        if (evdev->running)
+                return;
+        if (evdev->fd < 0 || evdev->element.n_open < 1 || !evdev->element.enabled)
+                return;
+
+        evdev->running = true;
+        sd_event_source_set_enabled(evdev->fd_src, SD_EVENT_ON);
+        sd_event_source_set_enabled(evdev->idle_src, SD_EVENT_ONESHOT);
+}
+
+static void idev_evdev_disable(idev_evdev *evdev) {
+        assert(evdev);
+        assert(evdev->fd_src);
+        assert(evdev->idle_src);
+
+        if (!evdev->running)
+                return;
+
+        evdev->running = false;
+        idev_evdev_feed_resync(evdev);
+        sd_event_source_set_enabled(evdev->fd_src, SD_EVENT_OFF);
+        sd_event_source_set_enabled(evdev->idle_src, SD_EVENT_OFF);
+}
+
+static int idev_evdev_resume(idev_evdev *evdev, int dev_fd) {
+        idev_element *e = &evdev->element;
+        _cleanup_close_ int fd = dev_fd;
+        int r, flags;
+
+        if (fd < 0 || evdev->fd == fd) {
+                fd = -1;
+                idev_evdev_enable(evdev);
+                return 0;
+        }
+
+        idev_evdev_pause(evdev, true);
+        log_debug("idev-evdev: %s/%s: resume", e->session->name, e->name);
+
+        r = fd_nonblock(fd, true);
+        if (r < 0)
+                return r;
+
+        r = fd_cloexec(fd, true);
+        if (r < 0)
+                return r;
+
+        flags = fcntl(fd, F_GETFL, 0);
+        if (flags < 0)
+                return -errno;
+
+        flags &= O_ACCMODE;
+        if (flags == O_WRONLY)
+                return -EACCES;
+
+        evdev->element.readable = true;
+        evdev->element.writable = !(flags & O_RDONLY);
+
+        /*
+         * TODO: We *MUST* re-sync the device so we get a delta of the changed
+         * state while we didn't read events from the device. This works just
+         * fine with libevdev_change_fd(), however, libevdev_new_from_fd() (or
+         * libevdev_set_fd()) don't pass us events for the initial device
+         * state. So even if we force a re-sync, we will not get the delta for
+         * the initial device state.
+         * We really need to fix libevdev to support that!
+         */
+        if (evdev->evdev)
+                r = libevdev_change_fd(evdev->evdev, fd);
+        else
+                r = libevdev_new_from_fd(fd, &evdev->evdev);
+
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_io(e->session->context->event,
+                            &evdev->fd_src,
+                            fd,
+                            EPOLLHUP | EPOLLERR | EPOLLIN,
+                            idev_evdev_event_fn,
+                            evdev);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_defer(e->session->context->event,
+                               &evdev->idle_src,
+                               idev_evdev_idle_fn,
+                               evdev);
+        if (r < 0) {
+                evdev->fd_src = sd_event_source_unref(evdev->fd_src);
+                return r;
+        }
+
+        sd_event_source_set_enabled(evdev->fd_src, SD_EVENT_OFF);
+        sd_event_source_set_enabled(evdev->idle_src, SD_EVENT_OFF);
+
+        evdev->unsync = true;
+        evdev->fd = fd;
+        fd = -1;
+
+        idev_evdev_enable(evdev);
+        return 0;
+}
+
+static void idev_evdev_pause(idev_evdev *evdev, bool release) {
+        idev_element *e = &evdev->element;
+
+        if (evdev->fd < 0)
+                return;
+
+        log_debug("idev-evdev: %s/%s: pause", e->session->name, e->name);
+
+        idev_evdev_disable(evdev);
+        if (release) {
+                evdev->idle_src = sd_event_source_unref(evdev->idle_src);
+                evdev->fd_src = sd_event_source_unref(evdev->fd_src);
+                evdev->fd = safe_close(evdev->fd);
+        }
+}
+
+/*
+ * Unmanaged Evdev Element
+ * The unmanaged evdev element opens the evdev node for a given input device
+ * directly (/dev/input/eventX) and thus needs sufficient privileges. It opens
+ * the device only if we really require it and releases it as soon as we're
+ * disabled or closed.
+ * The unmanaged element can be used in all situations where you have direct
+ * access to input device nodes. Unlike managed evdev elements, it can be used
+ * outside of user sessions and in emergency situations where logind is not
+ * available.
+ */
+
+static void unmanaged_evdev_resume(idev_element *e) {
+        unmanaged_evdev *eu = unmanaged_evdev_from_element(e);
+        int r, fd;
+
+        /*
+         * Unmanaged devices can be acquired on-demand. Therefore, don't
+         * acquire it unless someone opened the device *and* we're enabled.
+         */
+        if (e->n_open < 1 || !e->enabled)
+                return;
+
+        fd = eu->evdev.fd;
+        if (fd < 0) {
+                fd = open(eu->devnode, O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
+                if (fd < 0) {
+                        if (errno != EACCES && errno != EPERM) {
+                                log_debug("idev-evdev: %s/%s: cannot open node %s: %m",
+                                          e->session->name, e->name, eu->devnode);
+                                return;
+                        }
+
+                        fd = open(eu->devnode, O_RDONLY | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
+                        if (fd < 0) {
+                                log_debug("idev-evdev: %s/%s: cannot open node %s: %m",
+                                          e->session->name, e->name, eu->devnode);
+                                return;
+                        }
+
+                        e->readable = true;
+                        e->writable = false;
+                } else {
+                        e->readable = true;
+                        e->writable = true;
+                }
+        }
+
+        r = idev_evdev_resume(&eu->evdev, fd);
+        if (r < 0)
+                log_debug("idev-evdev: %s/%s: cannot resume: %s",
+                          e->session->name, e->name, strerror(-r));
+}
+
+static void unmanaged_evdev_pause(idev_element *e) {
+        unmanaged_evdev *eu = unmanaged_evdev_from_element(e);
+
+        /*
+         * Release the device if the device is disabled or there is no-one who
+         * opened it. This guarantees we stay only available if we're opened
+         * *and* enabled.
+         */
+
+        idev_evdev_pause(&eu->evdev, true);
+}
+
+static int unmanaged_evdev_new(idev_element **out, idev_session *s, struct udev_device *ud) {
+        _cleanup_(idev_element_freep) idev_element *e = NULL;
+        char name[IDEV_EVDEV_NAME_MAX];
+        unmanaged_evdev *eu;
+        const char *devnode;
+        dev_t devnum;
+        int r;
+
+        assert_return(s, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        devnode = udev_device_get_devnode(ud);
+        devnum = udev_device_get_devnum(ud);
+        if (!devnode || devnum == 0)
+                return -ENODEV;
+
+        idev_evdev_name(name, devnum);
+
+        eu = new0(unmanaged_evdev, 1);
+        if (!eu)
+                return -ENOMEM;
+
+        e = &eu->evdev.element;
+        eu->evdev = IDEV_EVDEV_INIT(&unmanaged_evdev_vtable, s);
+
+        eu->devnode = strdup(devnode);
+        if (!eu->devnode)
+                return -ENOMEM;
+
+        r = idev_element_add(e, name);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = e;
+        e = NULL;
+        return 0;
+}
+
+static void unmanaged_evdev_free(idev_element *e) {
+        unmanaged_evdev *eu = unmanaged_evdev_from_element(e);
+
+        idev_evdev_destroy(&eu->evdev);
+        free(eu->devnode);
+        free(eu);
+}
+
+static const idev_element_vtable unmanaged_evdev_vtable = {
+        .free                   = unmanaged_evdev_free,
+        .enable                 = unmanaged_evdev_resume,
+        .disable                = unmanaged_evdev_pause,
+        .open                   = unmanaged_evdev_resume,
+        .close                  = unmanaged_evdev_pause,
+};
+
+/*
+ * Managed Evdev Element
+ * The managed evdev element uses systemd-logind to acquire evdev devices. This
+ * means, we do not open the device node /dev/input/eventX directly. Instead,
+ * logind passes us a file-descriptor whenever our session is activated. Thus,
+ * we don't need access to the device node directly.
+ * Furthermore, whenever the session is put asleep, logind revokes the
+ * file-descriptor so we loose access to the device.
+ * Managed evdev elements should be preferred over unmanaged elements whenever
+ * you run inside a user session with exclusive device access.
+ */
+
+static int managed_evdev_take_device_fn(sd_bus *bus,
+                                        sd_bus_message *reply,
+                                        void *userdata,
+                                        sd_bus_error *ret_error) {
+        managed_evdev *em = userdata;
+        idev_element *e = &em->evdev.element;
+        idev_session *s = e->session;
+        int r, paused, fd;
+
+        em->slot_take_device = sd_bus_slot_unref(em->slot_take_device);
+
+        if (sd_bus_message_is_method_error(reply, NULL)) {
+                const sd_bus_error *error = sd_bus_message_get_error(reply);
+
+                log_debug("idev-evdev: %s/%s: TakeDevice failed: %s: %s",
+                          s->name, e->name, error->name, error->message);
+                return 0;
+        }
+
+        em->acquired = true;
+
+        r = sd_bus_message_read(reply, "hb", &fd, &paused);
+        if (r < 0) {
+                log_debug("idev-evdev: %s/%s: erroneous TakeDevice reply", s->name, e->name);
+                return 0;
+        }
+
+        /* If the device is paused, ignore it; we will get the next fd via
+         * ResumeDevice signals. */
+        if (paused)
+                return 0;
+
+        fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+        if (fd < 0) {
+                log_debug("idev-evdev: %s/%s: cannot duplicate evdev fd: %m", s->name, e->name);
+                return 0;
+        }
+
+        r = idev_evdev_resume(&em->evdev, fd);
+        if (r < 0)
+                log_debug("idev-evdev: %s/%s: cannot resume: %s",
+                          s->name, e->name, strerror(-r));
+
+        return 0;
+}
+
+static void managed_evdev_enable(idev_element *e) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        managed_evdev *em = managed_evdev_from_element(e);
+        idev_session *s = e->session;
+        idev_context *c = s->context;
+        int r;
+
+        /*
+         * Acquiring managed devices is heavy, so do it only once we're
+         * enabled *and* opened by someone.
+         */
+        if (e->n_open < 1 || !e->enabled)
+                return;
+
+        /* bail out if already pending */
+        if (em->requested)
+                return;
+
+        r = sd_bus_message_new_method_call(c->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           s->path,
+                                           "org.freedesktop.login1.Session",
+                                           "TakeDevice");
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_message_append(m, "uu", major(em->devnum), minor(em->devnum));
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_call_async(c->sysbus,
+                              &em->slot_take_device,
+                              m,
+                              managed_evdev_take_device_fn,
+                              em,
+                              0);
+        if (r < 0)
+                goto error;
+
+        em->requested = true;
+        return;
+
+error:
+        log_debug("idev-evdev: %s/%s: cannot send TakeDevice request: %s",
+                  s->name, e->name, strerror(-r));
+}
+
+static void managed_evdev_disable(idev_element *e) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        managed_evdev *em = managed_evdev_from_element(e);
+        idev_session *s = e->session;
+        idev_context *c = s->context;
+        int r;
+
+        /*
+         * Releasing managed devices is heavy. Once acquired, we get
+         * notifications for sleep/wake-up events, so there's no reason to
+         * release it if disabled but opened. However, if a device is closed,
+         * we release it immediately as we don't care for sleep/wake-up events
+         * then (even if we're actually enabled).
+         */
+
+        idev_evdev_pause(&em->evdev, false);
+
+        if (e->n_open > 0 || !em->requested)
+                return;
+
+        /*
+         * If TakeDevice() is pending or was successful, make sure to
+         * release the device again. We don't care for return-values,
+         * so send it without waiting or callbacks.
+         * If a failed TakeDevice() is pending, but someone else took
+         * the device on the same bus-connection, we might incorrectly
+         * release their device. This is an unlikely race, though.
+         * Furthermore, you really shouldn't have two users of the
+         * controller-API on the same session, on the same devices, *AND* on
+         * the same bus-connection. So we don't care for that race..
+         */
+
+        idev_evdev_pause(&em->evdev, true);
+        em->requested = false;
+
+        if (!em->acquired && !em->slot_take_device)
+                return;
+
+        em->slot_take_device = sd_bus_slot_unref(em->slot_take_device);
+        em->acquired = false;
+
+        r = sd_bus_message_new_method_call(c->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           s->path,
+                                           "org.freedesktop.login1.Session",
+                                           "ReleaseDevice");
+        if (r >= 0) {
+                r = sd_bus_message_append(m, "uu", major(em->devnum), minor(em->devnum));
+                if (r >= 0)
+                        r = sd_bus_send(c->sysbus, m, NULL);
+        }
+
+        if (r < 0 && r != -ENOTCONN)
+                log_debug("idev-evdev: %s/%s: cannot send ReleaseDevice: %s",
+                          s->name, e->name, strerror(-r));
+}
+
+static void managed_evdev_resume(idev_element *e, int fd) {
+        managed_evdev *em = managed_evdev_from_element(e);
+        idev_session *s = e->session;
+        int r;
+
+        /*
+         * We get ResumeDevice signals whenever logind resumed a previously
+         * paused device. The arguments contain the major/minor number of the
+         * related device and a new file-descriptor for the freshly opened
+         * device-node. We take the file-descriptor and immediately resume the
+         * device.
+         */
+
+        fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+        if (fd < 0) {
+                log_debug("idev-evdev: %s/%s: cannot duplicate evdev fd: %m",
+                          s->name, e->name);
+                return;
+        }
+
+        r = idev_evdev_resume(&em->evdev, fd);
+        if (r < 0)
+                log_debug("idev-evdev: %s/%s: cannot resume: %s",
+                          s->name, e->name, strerror(-r));
+
+        return;
+}
+
+static void managed_evdev_pause(idev_element *e, const char *mode) {
+        managed_evdev *em = managed_evdev_from_element(e);
+        idev_session *s = e->session;
+        idev_context *c = s->context;
+        int r;
+
+        /*
+         * We get PauseDevice() signals from logind whenever a device we
+         * requested was, or is about to be, paused. Arguments are major/minor
+         * number of the device and the mode of the operation.
+         * We treat it as asynchronous access-revocation (as if we got HUP on
+         * the device fd). Note that we might have already treated the HUP
+         * event via EPOLLHUP, whichever comes first.
+         *
+         * @mode can be one of the following:
+         *   "pause": The device is about to be paused. We must react
+         *            immediately and respond with PauseDeviceComplete(). Once
+         *            we replied, logind will pause the device. Note that
+         *            logind might apply any kind of timeout and force pause
+         *            the device if we don't respond in a timely manner. In
+         *            this case, we will receive a second PauseDevice event
+         *            with @mode set to "force" (or similar).
+         *   "force": The device was disabled forecfully by logind. Access is
+         *            already revoked. This is just an asynchronous
+         *            notification so we can put the device asleep (in case
+         *            we didn't already notice the access revocation).
+         *    "gone": This is like "force" but is sent if the device was
+         *            paused due to a device-removal event.
+         *
+         * We always handle PauseDevice signals as "force" as we properly
+         * support asynchronous access revocation, anyway. But in case logind
+         * sent mode "pause", we also call PauseDeviceComplete() to immediately
+         * acknowledge the request.
+         */
+
+        idev_evdev_pause(&em->evdev, true);
+
+        if (streq(mode, "pause")) {
+                _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+
+                /*
+                 * Sending PauseDeviceComplete() is racy if logind triggers the
+                 * timeout. That is, if we take too long and logind pauses the
+                 * device by sending a forced PauseDevice, our
+                 * PauseDeviceComplete call will be stray. That's fine, though.
+                 * logind ignores such stray calls. Only if logind also sent a
+                 * further PauseDevice() signal, it might match our call
+                 * incorrectly to the newer PauseDevice(). That's fine, too, as
+                 * we handle that event asynchronously, anyway. Therefore,
+                 * whatever happens, we're fine. Yay!
+                 */
+
+                r = sd_bus_message_new_method_call(c->sysbus,
+                                                   &m,
+                                                   "org.freedesktop.login1",
+                                                   s->path,
+                                                   "org.freedesktop.login1.Session",
+                                                   "PauseDeviceComplete");
+                if (r >= 0) {
+                        r = sd_bus_message_append(m, "uu", major(em->devnum), minor(em->devnum));
+                        if (r >= 0)
+                                r = sd_bus_send(c->sysbus, m, NULL);
+                }
+
+                if (r < 0)
+                        log_debug("idev-evdev: %s/%s: cannot send PauseDeviceComplete: %s",
+                                  s->name, e->name, strerror(-r));
+        }
+}
+
+static int managed_evdev_new(idev_element **out, idev_session *s, struct udev_device *ud) {
+        _cleanup_(idev_element_freep) idev_element *e = NULL;
+        char name[IDEV_EVDEV_NAME_MAX];
+        managed_evdev *em;
+        dev_t devnum;
+        int r;
+
+        assert_return(s, -EINVAL);
+        assert_return(s->managed, -EINVAL);
+        assert_return(s->context->sysbus, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        devnum = udev_device_get_devnum(ud);
+        if (devnum == 0)
+                return -ENODEV;
+
+        idev_evdev_name(name, devnum);
+
+        em = new0(managed_evdev, 1);
+        if (!em)
+                return -ENOMEM;
+
+        e = &em->evdev.element;
+        em->evdev = IDEV_EVDEV_INIT(&managed_evdev_vtable, s);
+        em->devnum = devnum;
+
+        r = idev_element_add(e, name);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = e;
+        e = NULL;
+        return 0;
+}
+
+static void managed_evdev_free(idev_element *e) {
+        managed_evdev *em = managed_evdev_from_element(e);
+
+        idev_evdev_destroy(&em->evdev);
+        free(em);
+}
+
+static const idev_element_vtable managed_evdev_vtable = {
+        .free                   = managed_evdev_free,
+        .enable                 = managed_evdev_enable,
+        .disable                = managed_evdev_disable,
+        .open                   = managed_evdev_enable,
+        .close                  = managed_evdev_disable,
+        .resume                 = managed_evdev_resume,
+        .pause                  = managed_evdev_pause,
+};
+
+/*
+ * Generic Constructor
+ * Instead of relying on the caller to choose between managed and unmanaged
+ * evdev devices, the idev_evdev_new() constructor does that for you (by
+ * looking at s->managed).
+ */
+
+bool idev_is_evdev(idev_element *e) {
+        return e && (e->vtable == &unmanaged_evdev_vtable ||
+                     e->vtable == &managed_evdev_vtable);
+}
+
+idev_element *idev_find_evdev(idev_session *s, dev_t devnum) {
+        char name[IDEV_EVDEV_NAME_MAX];
+
+        assert_return(s, NULL);
+        assert_return(devnum != 0, NULL);
+
+        idev_evdev_name(name, devnum);
+        return idev_find_element(s, name);
+}
+
+int idev_evdev_new(idev_element **out, idev_session *s, struct udev_device *ud) {
+        assert_return(s, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        return s->managed ? managed_evdev_new(out, s, ud) : unmanaged_evdev_new(out, s, ud);
+}
diff --git a/src/libsystemd-terminal/idev-internal.h b/src/libsystemd-terminal/idev-internal.h
new file mode 100644 (file)
index 0000000..a159aef
--- /dev/null
@@ -0,0 +1,188 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#pragma once
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <linux/input.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <xkbcommon/xkbcommon.h>
+#include "hashmap.h"
+#include "idev.h"
+#include "list.h"
+#include "util.h"
+
+typedef struct idev_link                idev_link;
+typedef struct idev_device_vtable       idev_device_vtable;
+typedef struct idev_element             idev_element;
+typedef struct idev_element_vtable      idev_element_vtable;
+
+/*
+ * Evdev Elements
+ */
+
+bool idev_is_evdev(idev_element *e);
+idev_element *idev_find_evdev(idev_session *s, dev_t devnum);
+int idev_evdev_new(idev_element **out, idev_session *s, struct udev_device *ud);
+
+/*
+ * Keyboard Devices
+ */
+
+bool idev_is_keyboard(idev_device *d);
+idev_device *idev_find_keyboard(idev_session *s, const char *name);
+int idev_keyboard_new(idev_device **out, idev_session *s, const char *name);
+
+/*
+ * Element Links
+ */
+
+struct idev_link {
+        /* element-to-device connection */
+        LIST_FIELDS(idev_link, links_by_element);
+        idev_element *element;
+
+        /* device-to-element connection */
+        LIST_FIELDS(idev_link, links_by_device);
+        idev_device *device;
+};
+
+/*
+ * Devices
+ */
+
+struct idev_device_vtable {
+        void (*free) (idev_device *d);
+        void (*attach) (idev_device *d, idev_link *l);
+        void (*detach) (idev_device *d, idev_link *l);
+        int (*feed) (idev_device *d, idev_data *data);
+};
+
+struct idev_device {
+        const idev_device_vtable *vtable;
+        idev_session *session;
+        char *name;
+
+        LIST_HEAD(idev_link, links);
+
+        bool public : 1;
+        bool enabled : 1;
+};
+
+#define IDEV_DEVICE_INIT(_vtable, _session) ((idev_device){ \
+                .vtable = (_vtable), \
+                .session = (_session), \
+        })
+
+idev_device *idev_find_device(idev_session *s, const char *name);
+
+int idev_device_add(idev_device *d, const char *name);
+idev_device *idev_device_free(idev_device *d);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(idev_device*, idev_device_free);
+
+int idev_device_feed(idev_device *d, idev_data *data);
+void idev_device_feedback(idev_device *d, idev_data *data);
+
+/*
+ * Elements
+ */
+
+struct idev_element_vtable {
+        void (*free) (idev_element *e);
+        void (*enable) (idev_element *e);
+        void (*disable) (idev_element *e);
+        void (*open) (idev_element *e);
+        void (*close) (idev_element *e);
+        void (*resume) (idev_element *e, int fd);
+        void (*pause) (idev_element *e, const char *mode);
+        void (*feedback) (idev_element *e, idev_data *data);
+};
+
+struct idev_element {
+        const idev_element_vtable *vtable;
+        idev_session *session;
+        unsigned long n_open;
+        char *name;
+
+        LIST_HEAD(idev_link, links);
+
+        bool enabled : 1;
+        bool readable : 1;
+        bool writable : 1;
+};
+
+#define IDEV_ELEMENT_INIT(_vtable, _session) ((idev_element){ \
+                .vtable = (_vtable), \
+                .session = (_session), \
+        })
+
+idev_element *idev_find_element(idev_session *s, const char *name);
+
+int idev_element_add(idev_element *e, const char *name);
+idev_element *idev_element_free(idev_element *e);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(idev_element*, idev_element_free);
+
+int idev_element_feed(idev_element *e, idev_data *data);
+void idev_element_feedback(idev_element *e, idev_data *data);
+
+/*
+ * Sessions
+ */
+
+struct idev_session {
+        idev_context *context;
+        char *name;
+        char *path;
+        sd_bus_slot *slot_resume_device;
+        sd_bus_slot *slot_pause_device;
+
+        Hashmap *element_map;
+        Hashmap *device_map;
+
+        idev_event_fn event_fn;
+        void *userdata;
+
+        bool custom : 1;
+        bool managed : 1;
+        bool enabled : 1;
+};
+
+idev_session *idev_find_session(idev_context *c, const char *name);
+int idev_session_raise_device_data(idev_session *s, idev_device *d, idev_data *data);
+
+/*
+ * Contexts
+ */
+
+struct idev_context {
+        unsigned long ref;
+        sd_event *event;
+        sd_bus *sysbus;
+
+        Hashmap *session_map;
+        Hashmap *data_map;
+};
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
new file mode 100644 (file)
index 0000000..8dc1c20
--- /dev/null
@@ -0,0 +1,855 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <xkbcommon/xkbcommon.h>
+#include "bus-util.h"
+#include "hashmap.h"
+#include "idev.h"
+#include "idev-internal.h"
+#include "macro.h"
+#include "util.h"
+
+typedef struct kbdmap kbdmap;
+typedef struct kbdctx kbdctx;
+typedef struct idev_keyboard idev_keyboard;
+
+struct kbdmap {
+        unsigned long ref;
+        struct xkb_keymap *xkb_keymap;
+        xkb_mod_index_t modmap[IDEV_KBDMOD_CNT];
+        xkb_led_index_t ledmap[IDEV_KBDLED_CNT];
+};
+
+struct kbdctx {
+        unsigned long ref;
+        idev_context *context;
+        struct xkb_context *xkb_context;
+        struct kbdmap *kbdmap;
+
+        sd_bus_slot *slot_locale_props_changed;
+        sd_bus_slot *slot_locale_get_all;
+
+        char *locale_x11_model;
+        char *locale_x11_layout;
+        char *locale_x11_variant;
+        char *locale_x11_options;
+        char *last_x11_model;
+        char *last_x11_layout;
+        char *last_x11_variant;
+        char *last_x11_options;
+};
+
+struct idev_keyboard {
+        idev_device device;
+        kbdctx *kbdctx;
+        kbdmap *kbdmap;
+
+        struct xkb_state *xkb_state;
+
+        usec_t repeat_delay;
+        usec_t repeat_rate;
+        sd_event_source *repeat_timer;
+
+        uint32_t n_syms;
+        idev_data evdata;
+        idev_data repdata;
+
+        bool repeating : 1;
+};
+
+#define keyboard_from_device(_d) container_of((_d), idev_keyboard, device)
+
+#define KBDCTX_KEY "keyboard.context"           /* hashmap key for global kbdctx */
+#define KBDXKB_SHIFT (8)                        /* xkb shifts evdev key-codes by 8 */
+#define KBDKEY_UP (0)                           /* KEY UP event value */
+#define KBDKEY_DOWN (1)                         /* KEY DOWN event value */
+#define KBDKEY_REPEAT (2)                       /* KEY REPEAT event value */
+
+static const idev_device_vtable keyboard_vtable;
+
+static int keyboard_update_kbdmap(idev_keyboard *k);
+
+/*
+ * Keyboard Keymaps
+ */
+
+static const char * const kbdmap_modmap[IDEV_KBDMOD_CNT] = {
+        [IDEV_KBDMOD_IDX_SHIFT]                 = XKB_MOD_NAME_SHIFT,
+        [IDEV_KBDMOD_IDX_CTRL]                  = XKB_MOD_NAME_CTRL,
+        [IDEV_KBDMOD_IDX_ALT]                   = XKB_MOD_NAME_ALT,
+        [IDEV_KBDMOD_IDX_LINUX]                 = XKB_MOD_NAME_LOGO,
+        [IDEV_KBDMOD_IDX_CAPS]                  = XKB_MOD_NAME_CAPS,
+};
+
+static const char * const kbdmap_ledmap[IDEV_KBDLED_CNT] = {
+        [IDEV_KBDLED_IDX_NUM]                   = XKB_LED_NAME_NUM,
+        [IDEV_KBDLED_IDX_CAPS]                  = XKB_LED_NAME_CAPS,
+        [IDEV_KBDLED_IDX_SCROLL]                = XKB_LED_NAME_SCROLL,
+};
+
+static kbdmap *kbdmap_ref(kbdmap *km) {
+        assert_return(km, NULL);
+        assert_return(km->ref > 0, NULL);
+
+        ++km->ref;
+        return km;
+}
+
+static kbdmap *kbdmap_unref(kbdmap *km) {
+        if (!km)
+                return NULL;
+
+        assert_return(km->ref > 0, NULL);
+
+        if (--km->ref > 0)
+                return NULL;
+
+        xkb_keymap_unref(km->xkb_keymap);
+        free(km);
+
+        return 0;
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(kbdmap*, kbdmap_unref);
+
+static int kbdmap_new_from_names(kbdmap **out,
+                                 kbdctx *kc,
+                                 const char *model,
+                                 const char *layout,
+                                 const char *variant,
+                                 const char *options) {
+        _cleanup_(kbdmap_unrefp) kbdmap *km = NULL;
+        struct xkb_rule_names rmlvo = { };
+        unsigned int i;
+
+        assert_return(out, -EINVAL);
+
+        km = new0(kbdmap, 1);
+        if (!km)
+                return -ENOMEM;
+
+        km->ref = 1;
+
+        rmlvo.rules = "evdev";
+        rmlvo.model = model;
+        rmlvo.layout = layout;
+        rmlvo.variant = variant;
+        rmlvo.options = options;
+
+        errno = 0;
+        km->xkb_keymap = xkb_keymap_new_from_names(kc->xkb_context, &rmlvo, 0);
+        if (!km->xkb_keymap)
+                return errno > 0 ? -errno : -EFAULT;
+
+        for (i = 0; i < IDEV_KBDMOD_CNT; ++i) {
+                const char *t = kbdmap_modmap[i];
+
+                if (t)
+                        km->modmap[i] = xkb_keymap_mod_get_index(km->xkb_keymap, t);
+                else
+                        km->modmap[i] = XKB_MOD_INVALID;
+        }
+
+        for (i = 0; i < IDEV_KBDLED_CNT; ++i) {
+                const char *t = kbdmap_ledmap[i];
+
+                if (t)
+                        km->ledmap[i] = xkb_keymap_led_get_index(km->xkb_keymap, t);
+                else
+                        km->ledmap[i] = XKB_LED_INVALID;
+        }
+
+        *out = km;
+        km = NULL;
+        return 0;
+}
+
+/*
+ * Keyboard Context
+ */
+
+static void move_str(char **dest, char **src) {
+        free(*dest);
+        *dest = *src;
+        *src = NULL;
+}
+
+static int kbdctx_refresh_keymap(kbdctx *kc) {
+        idev_session *s;
+        idev_device *d;
+        Iterator i, j;
+        kbdmap *km;
+        int r;
+
+        if (kc->kbdmap &&
+            streq_ptr(kc->locale_x11_model, kc->last_x11_model) &&
+            streq_ptr(kc->locale_x11_layout, kc->last_x11_layout) &&
+            streq_ptr(kc->locale_x11_variant, kc->last_x11_variant) &&
+            streq_ptr(kc->locale_x11_options, kc->last_x11_options))
+                return 0 ;
+
+        move_str(&kc->last_x11_model, &kc->locale_x11_model);
+        move_str(&kc->last_x11_layout, &kc->locale_x11_layout);
+        move_str(&kc->last_x11_variant, &kc->locale_x11_variant);
+        move_str(&kc->last_x11_options, &kc->locale_x11_options);
+
+        log_debug("idev-keyboard: new default keymap: [%s / %s / %s / %s]",
+                  kc->last_x11_model, kc->last_x11_layout, kc->last_x11_variant, kc->last_x11_options);
+
+        /* TODO: add a fallback keymap that's compiled-in */
+        r = kbdmap_new_from_names(&km, kc, kc->last_x11_model, kc->last_x11_layout,
+                                  kc->last_x11_variant, kc->last_x11_options);
+        if (r < 0) {
+                log_debug("idev-keyboard: cannot create keymap from locale1: %s",
+                          strerror(-r));
+                return r;
+        }
+
+        kbdmap_unref(kc->kbdmap);
+        kc->kbdmap = km;
+
+        HASHMAP_FOREACH(s, kc->context->session_map, i)
+                HASHMAP_FOREACH(d, s->device_map, j)
+                        if (idev_is_keyboard(d))
+                                keyboard_update_kbdmap(keyboard_from_device(d));
+
+        return 0;
+}
+
+static const struct bus_properties_map kbdctx_locale_map[] = {
+        { "X11Model",   "s",    NULL, offsetof(kbdctx, locale_x11_model) },
+        { "X11Layout",  "s",    NULL, offsetof(kbdctx, locale_x11_layout) },
+        { "X11Variant", "s",    NULL, offsetof(kbdctx, locale_x11_variant) },
+        { "X11Options", "s",    NULL, offsetof(kbdctx, locale_x11_options) },
+};
+
+static int kbdctx_locale_get_all_fn(sd_bus *bus,
+                                    sd_bus_message *m,
+                                    void *userdata,
+                                    sd_bus_error *ret_err) {
+        kbdctx *kc = userdata;
+        int r;
+
+        kc->slot_locale_get_all = sd_bus_slot_unref(kc->slot_locale_get_all);
+
+        if (sd_bus_message_is_method_error(m, NULL)) {
+                const sd_bus_error *error = sd_bus_message_get_error(m);
+
+                log_debug("idev-keyboard: GetAll() on locale1 failed: %s: %s",
+                          error->name, error->message);
+                return 0;
+        }
+
+        r = bus_message_map_all_properties(bus, m, kbdctx_locale_map, kc);
+        if (r < 0) {
+                log_debug("idev-keyboard: erroneous GetAll() reply from locale1");
+                return 0;
+        }
+
+        kbdctx_refresh_keymap(kc);
+        return 0;
+}
+
+static int kbdctx_query_locale(kbdctx *kc) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        int r;
+
+        kc->slot_locale_get_all = sd_bus_slot_unref(kc->slot_locale_get_all);
+
+        r = sd_bus_message_new_method_call(kc->context->sysbus,
+                                           &m,
+                                           "org.freedesktop.locale1",
+                                           "/org/freedesktop/locale1",
+                                           "org.freedesktop.DBus.Properties",
+                                           "GetAll");
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_message_append(m, "s", "org.freedesktop.locale1");
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_call_async(kc->context->sysbus,
+                              &kc->slot_locale_get_all,
+                              m,
+                              kbdctx_locale_get_all_fn,
+                              kc,
+                              0);
+        if (r < 0)
+                goto error;
+
+        return 0;
+
+error:
+        log_debug("idev-keyboard: cannot send GetAll to locale1: %s", strerror(-r));
+        return r;
+}
+
+static int kbdctx_locale_props_changed_fn(sd_bus *bus,
+                                          sd_bus_message *signal,
+                                          void *userdata,
+                                          sd_bus_error *ret_err) {
+        kbdctx *kc = userdata;
+        int r;
+
+        kc->slot_locale_get_all = sd_bus_slot_unref(kc->slot_locale_get_all);
+
+        /* skip interface name */
+        r = sd_bus_message_skip(signal, "s");
+        if (r < 0)
+                goto error;
+
+        r = bus_message_map_properties_changed(bus, signal, kbdctx_locale_map, kc);
+        if (r < 0)
+                goto error;
+
+        if (r > 0) {
+                r = kbdctx_query_locale(kc);
+                if (r < 0)
+                        return r;
+        }
+
+        kbdctx_refresh_keymap(kc);
+        return 0;
+
+error:
+        log_debug("idev-keyboard: cannot handle PropertiesChanged from locale1: %s", strerror(-r));
+        return r;
+}
+
+static int kbdctx_setup_bus(kbdctx *kc) {
+        int r;
+
+        r = sd_bus_add_match(kc->context->sysbus,
+                             &kc->slot_locale_props_changed,
+                             "type='signal',"
+                             "sender='org.freedesktop.locale1',"
+                             "interface='org.freedesktop.DBus.Properties',"
+                             "member='PropertiesChanged',"
+                             "path='/org/freedesktop/locale1'",
+                             kbdctx_locale_props_changed_fn,
+                             kc);
+        if (r < 0) {
+                log_debug("idev-keyboard: cannot setup locale1 link: %s", strerror(-r));
+                return r;
+        }
+
+        return kbdctx_query_locale(kc);
+}
+
+static kbdctx *kbdctx_ref(kbdctx *kc) {
+        assert_return(kc, NULL);
+        assert_return(kc->ref > 0, NULL);
+
+        ++kc->ref;
+        return kc;
+}
+
+static kbdctx *kbdctx_unref(kbdctx *kc) {
+        if (!kc)
+                return NULL;
+
+        assert_return(kc->ref > 0, NULL);
+
+        if (--kc->ref > 0)
+                return NULL;
+
+        free(kc->last_x11_options);
+        free(kc->last_x11_variant);
+        free(kc->last_x11_layout);
+        free(kc->last_x11_model);
+        free(kc->locale_x11_options);
+        free(kc->locale_x11_variant);
+        free(kc->locale_x11_layout);
+        free(kc->locale_x11_model);
+        kc->slot_locale_get_all = sd_bus_slot_unref(kc->slot_locale_get_all);
+        kc->slot_locale_props_changed = sd_bus_slot_unref(kc->slot_locale_props_changed);
+        kc->kbdmap = kbdmap_unref(kc->kbdmap);
+        xkb_context_unref(kc->xkb_context);
+        hashmap_remove_value(kc->context->data_map, KBDCTX_KEY, kc);
+        free(kc);
+
+        return NULL;
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(kbdctx*, kbdctx_unref);
+
+static int kbdctx_new(kbdctx **out, idev_context *c) {
+        _cleanup_(kbdctx_unrefp) kbdctx *kc = NULL;
+        int r;
+
+        assert_return(out, -EINVAL);
+        assert_return(c, -EINVAL);
+
+        kc = new0(kbdctx, 1);
+        if (!kc)
+                return -ENOMEM;
+
+        kc->ref = 1;
+        kc->context = c;
+
+        errno = 0;
+        kc->xkb_context = xkb_context_new(0);
+        if (!kc->xkb_context)
+                return errno > 0 ? -errno : -EFAULT;
+
+        r = kbdctx_refresh_keymap(kc);
+        if (r < 0)
+                return r;
+
+        if (c->sysbus) {
+                r = kbdctx_setup_bus(kc);
+                if (r < 0)
+                        return r;
+        }
+
+        r = hashmap_put(c->data_map, KBDCTX_KEY, kc);
+        if (r < 0)
+                return r;
+
+        *out = kc;
+        kc = NULL;
+        return 0;
+}
+
+static int get_kbdctx(idev_context *c, kbdctx **out) {
+        kbdctx *kc;
+
+        assert_return(c, -EINVAL);
+        assert_return(out, -EINVAL);
+
+        kc = hashmap_get(c->data_map, KBDCTX_KEY);
+        if (kc) {
+                *out = kbdctx_ref(kc);
+                return 0;
+        }
+
+        return kbdctx_new(out, c);
+}
+
+/*
+ * Keyboard Devices
+ */
+
+bool idev_is_keyboard(idev_device *d) {
+        return d && d->vtable == &keyboard_vtable;
+}
+
+idev_device *idev_find_keyboard(idev_session *s, const char *name) {
+        char *kname;
+
+        assert_return(s, NULL);
+        assert_return(name, NULL);
+
+        kname = strappenda("keyboard/", name);
+        return hashmap_get(s->device_map, kname);
+}
+
+static int keyboard_raise_data(idev_keyboard *k, idev_data *data) {
+        idev_device *d = &k->device;
+        int r;
+
+        r = idev_session_raise_device_data(d->session, d, data);
+        if (r < 0)
+                log_debug("idev-keyboard: %s/%s: error while raising data event: %s",
+                          d->session->name, d->name, strerror(-r));
+
+        return r;
+}
+
+static void keyboard_arm(idev_keyboard *k, usec_t usecs) {
+        int r;
+
+        if (usecs != 0) {
+                usecs += now(CLOCK_MONOTONIC);
+                r = sd_event_source_set_time(k->repeat_timer, usecs);
+                if (r >= 0)
+                        sd_event_source_set_enabled(k->repeat_timer, SD_EVENT_ONESHOT);
+        } else {
+                sd_event_source_set_enabled(k->repeat_timer, SD_EVENT_OFF);
+        }
+}
+
+static int keyboard_repeat_timer_fn(sd_event_source *source, uint64_t usec, void *userdata) {
+        idev_keyboard *k = userdata;
+
+        keyboard_arm(k, k->repeat_rate);
+        return keyboard_raise_data(k, &k->repdata);
+}
+
+int idev_keyboard_new(idev_device **out, idev_session *s, const char *name) {
+        _cleanup_(idev_device_freep) idev_device *d = NULL;
+        idev_keyboard *k;
+        char *kname;
+        int r;
+
+        assert_return(out, -EINVAL);
+        assert_return(s, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        k = new0(idev_keyboard, 1);
+        if (!k)
+                return -ENOMEM;
+
+        d = &k->device;
+        k->device = IDEV_DEVICE_INIT(&keyboard_vtable, s);
+        k->repeat_delay = 250 * USEC_PER_MSEC;
+        k->repeat_rate = 30 * USEC_PER_MSEC;
+
+        /* TODO: add key-repeat configuration */
+
+        r = get_kbdctx(s->context, &k->kbdctx);
+        if (r < 0)
+                return r;
+
+        r = keyboard_update_kbdmap(k);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_time(s->context->event,
+                              &k->repeat_timer,
+                              CLOCK_MONOTONIC,
+                              0,
+                              10 * USEC_PER_MSEC,
+                              keyboard_repeat_timer_fn,
+                              k);
+        if (r < 0)
+                return r;
+
+        r = sd_event_source_set_enabled(k->repeat_timer, SD_EVENT_OFF);
+        if (r < 0)
+                return r;
+
+        kname = strappenda("keyboard/", name);
+        r = idev_device_add(d, kname);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = d;
+        d = NULL;
+        return 0;
+}
+
+static void keyboard_free(idev_device *d) {
+        idev_keyboard *k = keyboard_from_device(d);
+
+        xkb_state_unref(k->xkb_state);
+        free(k->repdata.keyboard.codepoints);
+        free(k->repdata.keyboard.keysyms);
+        free(k->evdata.keyboard.codepoints);
+        free(k->evdata.keyboard.keysyms);
+        k->repeat_timer = sd_event_source_unref(k->repeat_timer);
+        k->kbdmap = kbdmap_unref(k->kbdmap);
+        k->kbdctx = kbdctx_unref(k->kbdctx);
+        free(k);
+}
+
+static int8_t guess_ascii(struct xkb_state *state, uint32_t code, uint32_t n_syms, const uint32_t *syms) {
+        xkb_layout_index_t n_lo, lo;
+        xkb_level_index_t lv;
+        struct xkb_keymap *keymap;
+        const xkb_keysym_t *s;
+        int num;
+
+        if (n_syms == 1 && syms[0] < 128 && syms[0] > 0)
+                return syms[0];
+
+        keymap = xkb_state_get_keymap(state);
+        n_lo = xkb_keymap_num_layouts_for_key(keymap, code + KBDXKB_SHIFT);
+
+        for (lo = 0; lo < n_lo; ++lo) {
+                lv = xkb_state_key_get_level(state, code + KBDXKB_SHIFT, lo);
+                num = xkb_keymap_key_get_syms_by_level(keymap, code + KBDXKB_SHIFT, lo, lv, &s);
+                if (num == 1 && s[0] < 128 && s[0] > 0)
+                        return s[0];
+        }
+
+        return -1;
+}
+
+static int keyboard_fill(idev_keyboard *k,
+                         idev_data *dst,
+                         bool resync,
+                         uint16_t code,
+                         uint32_t value,
+                         uint32_t n_syms,
+                         const uint32_t *keysyms) {
+        idev_data_keyboard *kev;
+        uint32_t i;
+
+        assert(dst == &k->evdata || dst == &k->repdata);
+
+        if (n_syms > k->n_syms) {
+                uint32_t *t;
+
+                t = realloc(k->evdata.keyboard.keysyms, sizeof(*t) * n_syms);
+                if (!t)
+                        return -ENOMEM;
+                k->evdata.keyboard.keysyms = t;
+
+                t = realloc(k->evdata.keyboard.codepoints, sizeof(*t) * n_syms);
+                if (!t)
+                        return -ENOMEM;
+                k->evdata.keyboard.codepoints = t;
+
+                t = realloc(k->repdata.keyboard.keysyms, sizeof(*t) * n_syms);
+                if (!t)
+                        return -ENOMEM;
+                k->repdata.keyboard.keysyms = t;
+
+                t = realloc(k->repdata.keyboard.codepoints, sizeof(*t) * n_syms);
+                if (!t)
+                        return -ENOMEM;
+                k->repdata.keyboard.codepoints = t;
+
+                k->n_syms = n_syms;
+        }
+
+        dst->type = IDEV_DATA_KEYBOARD;
+        dst->resync = resync;
+        kev = &dst->keyboard;
+        kev->ascii = guess_ascii(k->xkb_state, code, n_syms, keysyms);
+        kev->value = value;
+        kev->keycode = code;
+        kev->mods = 0;
+        kev->consumed_mods = 0;
+        kev->n_syms = n_syms;
+        memcpy(kev->keysyms, keysyms, sizeof(*keysyms) * n_syms);
+
+        for (i = 0; i < n_syms; ++i) {
+                kev->codepoints[i] = xkb_keysym_to_utf32(keysyms[i]);
+                if (!kev->codepoints[i])
+                        kev->codepoints[i] = 0xffffffffUL;
+        }
+
+        for (i = 0; i < IDEV_KBDMOD_CNT; ++i) {
+                int r;
+
+                if (k->kbdmap->modmap[i] == XKB_MOD_INVALID)
+                        continue;
+
+                r = xkb_state_mod_index_is_active(k->xkb_state, k->kbdmap->modmap[i], XKB_STATE_MODS_EFFECTIVE);
+                if (r > 0)
+                        kev->mods |= 1 << i;
+
+                r = xkb_state_mod_index_is_consumed(k->xkb_state, code + KBDXKB_SHIFT, k->kbdmap->modmap[i]);
+                if (r > 0)
+                        kev->consumed_mods |= 1 << i;
+        }
+
+        return 0;
+}
+
+static void keyboard_repeat(idev_keyboard *k) {
+        idev_data *evdata = &k->evdata;
+        idev_data *repdata = &k->repdata;
+        idev_data_keyboard *evkbd = &evdata->keyboard;
+        idev_data_keyboard *repkbd = &repdata->keyboard;
+        const xkb_keysym_t *keysyms;
+        idev_device *d = &k->device;
+        bool repeats;
+        int r, num;
+
+        if (evdata->resync) {
+                /*
+                 * We received a re-sync event. During re-sync, any number of
+                 * key-events may have been lost and sync-events may be
+                 * re-ordered. Always disable key-repeat for those events. Any
+                 * following event will trigger it again.
+                 */
+
+                k->repeating = false;
+                keyboard_arm(k, 0);
+                return;
+        }
+
+        repeats = xkb_keymap_key_repeats(k->kbdmap->xkb_keymap, evkbd->keycode + KBDXKB_SHIFT);
+
+        if (k->repeating && repkbd->keycode == evkbd->keycode) {
+                /*
+                 * We received an event for the key we currently repeat. If it
+                 * was released, stop key-repeat. Otherwise, ignore the event.
+                 */
+
+                if (evkbd->value == KBDKEY_UP) {
+                        k->repeating = false;
+                        keyboard_arm(k, 0);
+                }
+        } else if (evkbd->value == KBDKEY_DOWN && repeats) {
+                /*
+                 * We received a key-down event for a key that repeats. The
+                 * previous condition caught keys we already repeat, so we know
+                 * this is a different key or no key-repeat is running. Start
+                 * new key-repeat.
+                 */
+
+                errno = 0;
+                num = xkb_state_key_get_syms(k->xkb_state, evkbd->keycode + KBDXKB_SHIFT, &keysyms);
+                if (num < 0)
+                        r = errno > 0 ? errno : -EFAULT;
+                else
+                        r = keyboard_fill(k, repdata, false, evkbd->keycode, KBDKEY_REPEAT, num, keysyms);
+
+                if (r < 0) {
+                        log_debug("idev-keyboard: %s/%s: cannot set key-repeat: %s",
+                                  d->session->name, d->name, strerror(-r));
+                        k->repeating = false;
+                        keyboard_arm(k, 0);
+                } else {
+                        k->repeating = true;
+                        keyboard_arm(k, k->repeat_delay);
+                }
+        } else if (k->repeating && !repeats) {
+                /*
+                 * We received an event for a key that does not repeat, but we
+                 * currently repeat a previously received key. The new key is
+                 * usually a modifier, but might be any kind of key. In this
+                 * case, we continue repeating the old key, but update the
+                 * symbols according to the new state.
+                 */
+
+                errno = 0;
+                num = xkb_state_key_get_syms(k->xkb_state, repkbd->keycode + KBDXKB_SHIFT, &keysyms);
+                if (num < 0)
+                        r = errno > 0 ? errno : -EFAULT;
+                else
+                        r = keyboard_fill(k, repdata, false, repkbd->keycode, KBDKEY_REPEAT, num, keysyms);
+
+                if (r < 0) {
+                        log_debug("idev-keyboard: %s/%s: cannot update key-repeat: %s",
+                                  d->session->name, d->name, strerror(-r));
+                        k->repeating = false;
+                        keyboard_arm(k, 0);
+                }
+        }
+}
+
+static int keyboard_feed_evdev(idev_keyboard *k, idev_data *data) {
+        struct input_event *ev = &data->evdev.event;
+        enum xkb_state_component compch;
+        const xkb_keysym_t *keysyms;
+        idev_device *d = &k->device;
+        int num, r;
+
+        if (ev->type != EV_KEY || ev->value > KBDKEY_DOWN)
+                return 0;
+
+        /* TODO: We should audit xkb-actions, whether they need @resync as
+         * flag. Most actions should just be executed, however, there might
+         * be actions that depend on modifier-orders. Those should be
+         * suppressed. */
+
+        num = xkb_state_key_get_syms(k->xkb_state, ev->code + KBDXKB_SHIFT, &keysyms);
+        compch = xkb_state_update_key(k->xkb_state, ev->code + KBDXKB_SHIFT, ev->value);
+
+        if (compch & XKB_STATE_LEDS) {
+                /* TODO: update LEDs */
+        }
+
+        if (num < 0) {
+                r = num;
+                goto error;
+        }
+
+        r = keyboard_fill(k, &k->evdata, data->resync, ev->code, ev->value, num, keysyms);
+        if (r < 0)
+                goto error;
+
+        keyboard_repeat(k);
+        return keyboard_raise_data(k, &k->evdata);
+
+error:
+        log_debug("idev-keyboard: %s/%s: cannot handle event: %s",
+                  d->session->name, d->name, strerror(-r));
+        k->repeating = false;
+        keyboard_arm(k, 0);
+        return 0;
+}
+
+static int keyboard_feed(idev_device *d, idev_data *data) {
+        idev_keyboard *k = keyboard_from_device(d);
+
+        switch (data->type) {
+        case IDEV_DATA_RESYNC:
+                /*
+                 * If the underlying device is re-synced, key-events might be
+                 * sent re-ordered. Thus, we don't know which key was pressed
+                 * last. Key-repeat might get confused, hence, disable it
+                 * during re-syncs. The first following event will enable it
+                 * again.
+                 */
+
+                k->repeating = false;
+                keyboard_arm(k, 0);
+                return 0;
+        case IDEV_DATA_EVDEV:
+                return keyboard_feed_evdev(k, data);
+        default:
+                return 0;
+        }
+}
+
+static int keyboard_update_kbdmap(idev_keyboard *k) {
+        idev_device *d = &k->device;
+        struct xkb_state *state;
+        kbdmap *km;
+        int r;
+
+        assert(k);
+
+        km = k->kbdctx->kbdmap;
+        if (km == k->kbdmap)
+                return 0;
+
+        errno = 0;
+        state = xkb_state_new(km->xkb_keymap);
+        if (!state) {
+                r = errno > 0 ? -errno : -EFAULT;
+                goto error;
+        }
+
+        kbdmap_unref(k->kbdmap);
+        k->kbdmap = kbdmap_ref(km);
+        xkb_state_unref(k->xkb_state);
+        k->xkb_state = state;
+
+        /* TODO: On state-change, we should trigger a resync so the whole
+         * event-state is flushed into the new xkb-state. libevdev currently
+         * does not support that, though. */
+
+        return 0;
+
+error:
+        log_debug("idev-keyboard: %s/%s: cannot adopt new keymap: %s",
+                  d->session->name, d->name, strerror(-r));
+        return r;
+}
+
+static const idev_device_vtable keyboard_vtable = {
+        .free                   = keyboard_free,
+        .feed                   = keyboard_feed,
+};
diff --git a/src/libsystemd-terminal/idev.c b/src/libsystemd-terminal/idev.c
new file mode 100644 (file)
index 0000000..e979b60
--- /dev/null
@@ -0,0 +1,806 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <linux/input.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-login.h>
+#include <xkbcommon/xkbcommon.h>
+#include "hashmap.h"
+#include "idev.h"
+#include "idev-internal.h"
+#include "login-shared.h"
+#include "macro.h"
+#include "udev-util.h"
+#include "util.h"
+
+static void element_open(idev_element *e);
+static void element_close(idev_element *e);
+
+/*
+ * Devices
+ */
+
+idev_device *idev_find_device(idev_session *s, const char *name) {
+        assert_return(s, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(s->device_map, name);
+}
+
+int idev_device_add(idev_device *d, const char *name) {
+        int r;
+
+        assert_return(d, -EINVAL);
+        assert_return(d->vtable, -EINVAL);
+        assert_return(d->session, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        d->name = strdup(name);
+        if (!d->name)
+                return -ENOMEM;
+
+        r = hashmap_put(d->session->device_map, d->name, d);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+idev_device *idev_device_free(idev_device *d) {
+        idev_device tmp;
+
+        if (!d)
+                return NULL;
+
+        assert(!d->enabled);
+        assert(!d->public);
+        assert(!d->links);
+        assert(d->vtable);
+        assert(d->vtable->free);
+
+        if (d->name)
+                hashmap_remove_value(d->session->device_map, d->name, d);
+
+        tmp = *d;
+        d->vtable->free(d);
+
+        free(tmp.name);
+
+        return NULL;
+}
+
+int idev_device_feed(idev_device *d, idev_data *data) {
+        assert(d);
+        assert(data);
+        assert(data->type < IDEV_DATA_CNT);
+
+        if (d->vtable->feed)
+                return d->vtable->feed(d, data);
+        else
+                return 0;
+}
+
+void idev_device_feedback(idev_device *d, idev_data *data) {
+        idev_link *l;
+
+        assert(d);
+        assert(data);
+        assert(data->type < IDEV_DATA_CNT);
+
+        LIST_FOREACH(links_by_device, l, d->links)
+                idev_element_feedback(l->element, data);
+}
+
+static void device_attach(idev_device *d, idev_link *l) {
+        assert(d);
+        assert(l);
+
+        if (d->vtable->attach)
+                d->vtable->attach(d, l);
+
+        if (d->enabled)
+                element_open(l->element);
+}
+
+static void device_detach(idev_device *d, idev_link *l) {
+        assert(d);
+        assert(l);
+
+        if (d->enabled)
+                element_close(l->element);
+
+        if (d->vtable->detach)
+                d->vtable->detach(d, l);
+}
+
+void idev_device_enable(idev_device *d) {
+        idev_link *l;
+
+        assert(d);
+
+        if (!d->enabled) {
+                d->enabled = true;
+                LIST_FOREACH(links_by_device, l, d->links)
+                        element_open(l->element);
+        }
+}
+
+void idev_device_disable(idev_device *d) {
+        idev_link *l;
+
+        assert(d);
+
+        if (d->enabled) {
+                d->enabled = false;
+                LIST_FOREACH(links_by_device, l, d->links)
+                        element_close(l->element);
+        }
+}
+
+/*
+ * Elements
+ */
+
+idev_element *idev_find_element(idev_session *s, const char *name) {
+        assert_return(s, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(s->element_map, name);
+}
+
+int idev_element_add(idev_element *e, const char *name) {
+        int r;
+
+        assert_return(e, -EINVAL);
+        assert_return(e->vtable, -EINVAL);
+        assert_return(e->session, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        e->name = strdup(name);
+        if (!e->name)
+                return -ENOMEM;
+
+        r = hashmap_put(e->session->element_map, e->name, e);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+idev_element *idev_element_free(idev_element *e) {
+        idev_element tmp;
+
+        if (!e)
+                return NULL;
+
+        assert(!e->enabled);
+        assert(!e->links);
+        assert(e->n_open == 0);
+        assert(e->vtable);
+        assert(e->vtable->free);
+
+        if (e->name)
+                hashmap_remove_value(e->session->element_map, e->name, e);
+
+        tmp = *e;
+        e->vtable->free(e);
+
+        free(tmp.name);
+
+        return NULL;
+}
+
+int idev_element_feed(idev_element *e, idev_data *data) {
+        int r, error = 0;
+        idev_link *l;
+
+        assert(e);
+        assert(data);
+        assert(data->type < IDEV_DATA_CNT);
+
+        LIST_FOREACH(links_by_element, l, e->links) {
+                r = idev_device_feed(l->device, data);
+                if (r != 0)
+                        error = r;
+        }
+
+        return error;
+}
+
+void idev_element_feedback(idev_element *e, idev_data *data) {
+        assert(e);
+        assert(data);
+        assert(data->type < IDEV_DATA_CNT);
+
+        if (e->vtable->feedback)
+               e->vtable->feedback(e, data);
+}
+
+static void element_open(idev_element *e) {
+        assert(e);
+
+        if (e->n_open++ == 0 && e->vtable->open)
+                e->vtable->open(e);
+}
+
+static void element_close(idev_element *e) {
+        assert(e);
+        assert(e->n_open > 0);
+
+        if (--e->n_open == 0 && e->vtable->close)
+                e->vtable->close(e);
+}
+
+static void element_enable(idev_element *e) {
+        assert(e);
+
+        if (!e->enabled) {
+                e->enabled = true;
+                if (e->vtable->enable)
+                        e->vtable->enable(e);
+        }
+}
+
+static void element_disable(idev_element *e) {
+        assert(e);
+
+        if (e->enabled) {
+                e->enabled = false;
+                if (e->vtable->disable)
+                        e->vtable->disable(e);
+        }
+}
+
+static void element_resume(idev_element *e, int fd) {
+        assert(e);
+        assert(fd >= 0);
+
+        if (e->vtable->resume)
+                e->vtable->resume(e, fd);
+}
+
+static void element_pause(idev_element *e, const char *mode) {
+        assert(e);
+        assert(mode);
+
+        if (e->vtable->pause)
+                e->vtable->pause(e, mode);
+}
+
+/*
+ * Sessions
+ */
+
+static int session_raise(idev_session *s, idev_event *ev) {
+        return s->event_fn(s, s->userdata, ev);
+}
+
+static int session_raise_device_add(idev_session *s, idev_device *d) {
+        idev_event event = {
+                .type = IDEV_EVENT_DEVICE_ADD,
+                .device_add = {
+                        .device = d,
+                },
+        };
+
+        return session_raise(s, &event);
+}
+
+static int session_raise_device_remove(idev_session *s, idev_device *d) {
+        idev_event event = {
+                .type = IDEV_EVENT_DEVICE_REMOVE,
+                .device_remove = {
+                        .device = d,
+                },
+        };
+
+        return session_raise(s, &event);
+}
+
+int idev_session_raise_device_data(idev_session *s, idev_device *d, idev_data *data) {
+        idev_event event = {
+                .type = IDEV_EVENT_DEVICE_DATA,
+                .device_data = {
+                        .device = d,
+                        .data = *data,
+                },
+        };
+
+        return session_raise(s, &event);
+}
+
+static int session_add_device(idev_session *s, idev_device *d) {
+        int r;
+
+        assert(s);
+        assert(d);
+
+        log_debug("idev: %s: add device '%s'", s->name, d->name);
+
+        d->public = true;
+        r = session_raise_device_add(s, d);
+        if (r != 0) {
+                d->public = false;
+                goto error;
+        }
+
+        return 0;
+
+error:
+        if (r < 0)
+                log_debug("idev: %s: error while adding device '%s': %s",
+                          s->name, d->name, strerror(-r));
+        return r;
+}
+
+static int session_remove_device(idev_session *s, idev_device *d) {
+        int r, error = 0;
+
+        assert(s);
+        assert(d);
+
+        log_debug("idev: %s: remove device '%s'", s->name, d->name);
+
+        d->public = false;
+        r = session_raise_device_remove(s, d);
+        if (r != 0)
+                error = r;
+
+        idev_device_disable(d);
+
+        if (error < 0)
+                log_debug("idev: %s: error while removing device '%s': %s",
+                          s->name, d->name, strerror(-error));
+        idev_device_free(d);
+        return error;
+}
+
+static int session_add_element(idev_session *s, idev_element *e) {
+        assert(s);
+        assert(e);
+
+        log_debug("idev: %s: add element '%s'", s->name, e->name);
+
+        if (s->enabled)
+                element_enable(e);
+
+        return 0;
+}
+
+static int session_remove_element(idev_session *s, idev_element *e) {
+        int r, error = 0;
+        idev_device *d;
+        idev_link *l;
+
+        assert(s);
+        assert(e);
+
+        log_debug("idev: %s: remove element '%s'", s->name, e->name);
+
+        while ((l = e->links)) {
+                d = l->device;
+                LIST_REMOVE(links_by_device, d->links, l);
+                LIST_REMOVE(links_by_element, e->links, l);
+                device_detach(d, l);
+
+                if (!d->links) {
+                        r = session_remove_device(s, d);
+                        if (r != 0)
+                                error = r;
+                }
+
+                l->device = NULL;
+                l->element = NULL;
+                free(l);
+        }
+
+        element_disable(e);
+
+        if (error < 0)
+                log_debug("idev: %s: error while removing element '%s': %s",
+                          s->name, e->name, strerror(-r));
+        idev_element_free(e);
+        return error;
+}
+
+idev_session *idev_find_session(idev_context *c, const char *name) {
+        assert_return(c, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(c->session_map, name);
+}
+
+static int session_resume_device_fn(sd_bus *bus,
+                                    sd_bus_message *signal,
+                                    void *userdata,
+                                    sd_bus_error *ret_error) {
+        idev_session *s = userdata;
+        idev_element *e;
+        uint32_t major, minor;
+        int r, fd;
+
+        r = sd_bus_message_read(signal, "uuh", &major, &minor, &fd);
+        if (r < 0) {
+                log_debug("idev: %s: erroneous ResumeDevice signal", s->name);
+                return 0;
+        }
+
+        e = idev_find_evdev(s, makedev(major, minor));
+        if (!e)
+                return 0;
+
+        element_resume(e, fd);
+        return 0;
+}
+
+static int session_pause_device_fn(sd_bus *bus,
+                                   sd_bus_message *signal,
+                                   void *userdata,
+                                   sd_bus_error *ret_error) {
+        idev_session *s = userdata;
+        idev_element *e;
+        uint32_t major, minor;
+        const char *mode;
+        int r;
+
+        r = sd_bus_message_read(signal, "uus", &major, &minor, &mode);
+        if (r < 0) {
+                log_debug("idev: %s: erroneous PauseDevice signal", s->name);
+                return 0;
+        }
+
+        e = idev_find_evdev(s, makedev(major, minor));
+        if (!e)
+                return 0;
+
+        element_pause(e, mode);
+        return 0;
+}
+
+static int session_setup_bus(idev_session *s) {
+        _cleanup_free_ char *match = NULL;
+        int r;
+
+        if (!s->managed)
+                return 0;
+
+        match = strjoin("type='signal',"
+                        "sender='org.freedesktop.login1',"
+                        "interface='org.freedesktop.login1.Session',"
+                        "member='ResumeDevice',"
+                        "path='", s->path, "'",
+                        NULL);
+        if (!match)
+                return -ENOMEM;
+
+        r = sd_bus_add_match(s->context->sysbus,
+                             &s->slot_resume_device,
+                             match,
+                             session_resume_device_fn,
+                             s);
+        if (r < 0)
+                return r;
+
+        free(match);
+        match = strjoin("type='signal',"
+                        "sender='org.freedesktop.login1',"
+                        "interface='org.freedesktop.login1.Session',"
+                        "member='PauseDevice',"
+                        "path='", s->path, "'",
+                        NULL);
+        if (!match)
+                return -ENOMEM;
+
+        r = sd_bus_add_match(s->context->sysbus,
+                             &s->slot_pause_device,
+                             match,
+                             session_pause_device_fn,
+                             s);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+int idev_session_new(idev_session **out,
+                     idev_context *c,
+                     unsigned int flags,
+                     const char *name,
+                     idev_event_fn event_fn,
+                     void *userdata) {
+        _cleanup_(idev_session_freep) idev_session *s = NULL;
+        int r;
+
+        assert_return(out, -EINVAL);
+        assert_return(c, -EINVAL);
+        assert_return(name, -EINVAL);
+        assert_return(event_fn, -EINVAL);
+        assert_return((flags & IDEV_SESSION_CUSTOM) == !session_id_valid(name), -EINVAL);
+        assert_return(!(flags & IDEV_SESSION_CUSTOM) || !(flags & IDEV_SESSION_MANAGED), -EINVAL);
+        assert_return(!(flags & IDEV_SESSION_MANAGED) || c->sysbus, -EINVAL);
+
+        s = new0(idev_session, 1);
+        if (!s)
+                return -ENOMEM;
+
+        s->context = idev_context_ref(c);
+        s->custom = flags & IDEV_SESSION_CUSTOM;
+        s->managed = flags & IDEV_SESSION_MANAGED;
+        s->event_fn = event_fn;
+        s->userdata = userdata;
+
+        s->name = strdup(name);
+        if (!s->name)
+                return -ENOMEM;
+
+        if (s->managed) {
+                r = sd_bus_path_encode("/org/freedesktop/login1/session", s->name, &s->path);
+                if (r < 0)
+                        return r;
+        }
+
+        s->element_map = hashmap_new(&string_hash_ops);
+        if (!s->element_map)
+                return -ENOMEM;
+
+        s->device_map = hashmap_new(&string_hash_ops);
+        if (!s->device_map)
+                return -ENOMEM;
+
+        r = session_setup_bus(s);
+        if (r < 0)
+                return r;
+
+        r = hashmap_put(c->session_map, s->name, s);
+        if (r < 0)
+                return r;
+
+        *out = s;
+        s = NULL;
+        return 0;
+}
+
+idev_session *idev_session_free(idev_session *s) {
+        idev_element *e;
+
+        if (!s)
+                return NULL;
+
+        while ((e = hashmap_first(s->element_map)))
+                session_remove_element(s, e);
+
+        assert(hashmap_size(s->device_map) == 0);
+
+        if (s->name)
+                hashmap_remove_value(s->context->session_map, s->name, s);
+
+        s->slot_pause_device = sd_bus_slot_unref(s->slot_pause_device);
+        s->slot_resume_device = sd_bus_slot_unref(s->slot_resume_device);
+        s->context = idev_context_unref(s->context);
+        hashmap_free(s->device_map);
+        hashmap_free(s->element_map);
+        free(s->path);
+        free(s->name);
+        free(s);
+
+        return NULL;
+}
+
+bool idev_session_is_enabled(idev_session *s) {
+        return s && s->enabled;
+}
+
+void idev_session_enable(idev_session *s) {
+        idev_element *e;
+        Iterator i;
+
+        assert(s);
+
+        if (!s->enabled) {
+                s->enabled = true;
+                HASHMAP_FOREACH(e, s->element_map, i)
+                        element_enable(e);
+        }
+}
+
+void idev_session_disable(idev_session *s) {
+        idev_element *e;
+        Iterator i;
+
+        assert(s);
+
+        if (s->enabled) {
+                s->enabled = false;
+                HASHMAP_FOREACH(e, s->element_map, i)
+                        element_disable(e);
+        }
+}
+
+static int add_link(idev_element *e, idev_device *d) {
+        idev_link *l;
+
+        assert(e);
+        assert(d);
+
+        l = new0(idev_link, 1);
+        if (!l)
+                return -ENOMEM;
+
+        l->element = e;
+        l->device = d;
+        LIST_PREPEND(links_by_element, e->links, l);
+        LIST_PREPEND(links_by_device, d->links, l);
+        device_attach(d, l);
+
+        return 0;
+}
+
+static int guess_type(struct udev_device *d) {
+        const char *id_key;
+
+        id_key = udev_device_get_property_value(d, "ID_INPUT_KEY");
+        if (streq_ptr(id_key, "1"))
+                return IDEV_DEVICE_KEYBOARD;
+
+        return IDEV_DEVICE_CNT;
+}
+
+int idev_session_add_evdev(idev_session *s, struct udev_device *ud) {
+        idev_element *e;
+        idev_device *d;
+        dev_t devnum;
+        int r, type;
+
+        assert_return(s, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        devnum = udev_device_get_devnum(ud);
+        if (devnum == 0)
+                return 0;
+
+        e = idev_find_evdev(s, devnum);
+        if (e)
+                return 0;
+
+        r = idev_evdev_new(&e, s, ud);
+        if (r < 0)
+                return r;
+
+        r = session_add_element(s, e);
+        if (r != 0)
+                return r;
+
+        type = guess_type(ud);
+        if (type < 0)
+                return type;
+
+        switch (type) {
+        case IDEV_DEVICE_KEYBOARD:
+                d = idev_find_keyboard(s, e->name);
+                if (d) {
+                        log_debug("idev: %s: keyboard for new evdev element '%s' already available",
+                                  s->name, e->name);
+                        return 0;
+                }
+
+                r = idev_keyboard_new(&d, s, e->name);
+                if (r < 0)
+                        return r;
+
+                r = add_link(e, d);
+                if (r < 0) {
+                        idev_device_free(d);
+                        return r;
+                }
+
+                return session_add_device(s, d);
+        default:
+                /* unknown elements are silently ignored */
+                return 0;
+        }
+}
+
+int idev_session_remove_evdev(idev_session *s, struct udev_device *ud) {
+        idev_element *e;
+        dev_t devnum;
+
+        assert(s);
+        assert(ud);
+
+        devnum = udev_device_get_devnum(ud);
+        if (devnum == 0)
+                return 0;
+
+        e = idev_find_evdev(s, devnum);
+        if (!e)
+                return 0;
+
+        return session_remove_element(s, e);
+}
+
+/*
+ * Contexts
+ */
+
+int idev_context_new(idev_context **out, sd_event *event, sd_bus *sysbus) {
+        _cleanup_(idev_context_unrefp) idev_context *c = NULL;
+
+        assert_return(out, -EINVAL);
+        assert_return(event, -EINVAL);
+
+        c = new0(idev_context, 1);
+        if (!c)
+                return -ENOMEM;
+
+        c->ref = 1;
+        c->event = sd_event_ref(event);
+
+        if (sysbus)
+                c->sysbus = sd_bus_ref(sysbus);
+
+        c->session_map = hashmap_new(&string_hash_ops);
+        if (!c->session_map)
+                return -ENOMEM;
+
+        c->data_map = hashmap_new(&string_hash_ops);
+        if (!c->data_map)
+                return -ENOMEM;
+
+        *out = c;
+        c = NULL;
+        return 0;
+}
+
+static void context_cleanup(idev_context *c) {
+        assert(hashmap_size(c->data_map) == 0);
+        assert(hashmap_size(c->session_map) == 0);
+
+        hashmap_free(c->data_map);
+        hashmap_free(c->session_map);
+        c->sysbus = sd_bus_unref(c->sysbus);
+        c->event = sd_event_unref(c->event);
+        free(c);
+}
+
+idev_context *idev_context_ref(idev_context *c) {
+        assert_return(c, NULL);
+        assert_return(c->ref > 0, NULL);
+
+        ++c->ref;
+        return c;
+}
+
+idev_context *idev_context_unref(idev_context *c) {
+        if (!c)
+                return NULL;
+
+        assert_return(c->ref > 0, NULL);
+
+        if (--c->ref == 0)
+                context_cleanup(c);
+
+        return NULL;
+}
diff --git a/src/libsystemd-terminal/idev.h b/src/libsystemd-terminal/idev.h
new file mode 100644 (file)
index 0000000..c8c03f3
--- /dev/null
@@ -0,0 +1,224 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * IDev
+ */
+
+#pragma once
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <linux/input.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <xkbcommon/xkbcommon.h>
+#include "util.h"
+
+typedef struct idev_data                idev_data;
+typedef struct idev_data_evdev          idev_data_evdev;
+typedef struct idev_data_keyboard       idev_data_keyboard;
+
+typedef struct idev_event               idev_event;
+typedef struct idev_device              idev_device;
+typedef struct idev_session             idev_session;
+typedef struct idev_context             idev_context;
+
+/*
+ * Types
+ */
+
+enum {
+        IDEV_ELEMENT_EVDEV,
+        IDEV_ELEMENT_CNT
+};
+
+enum {
+        IDEV_DEVICE_KEYBOARD,
+        IDEV_DEVICE_CNT
+};
+
+/*
+ * Evdev Elements
+ */
+
+struct idev_data_evdev {
+        struct input_event event;
+};
+
+/*
+ * Keyboard Devices
+ */
+
+struct xkb_state;
+
+enum {
+        IDEV_KBDMOD_IDX_SHIFT,
+        IDEV_KBDMOD_IDX_CTRL,
+        IDEV_KBDMOD_IDX_ALT,
+        IDEV_KBDMOD_IDX_LINUX,
+        IDEV_KBDMOD_IDX_CAPS,
+        IDEV_KBDMOD_CNT,
+
+        IDEV_KBDMOD_SHIFT               = 1 << IDEV_KBDMOD_IDX_SHIFT,
+        IDEV_KBDMOD_CTRL                = 1 << IDEV_KBDMOD_IDX_CTRL,
+        IDEV_KBDMOD_ALT                 = 1 << IDEV_KBDMOD_IDX_ALT,
+        IDEV_KBDMOD_LINUX               = 1 << IDEV_KBDMOD_IDX_LINUX,
+        IDEV_KBDMOD_CAPS                = 1 << IDEV_KBDMOD_IDX_CAPS,
+};
+
+enum {
+        IDEV_KBDLED_IDX_NUM,
+        IDEV_KBDLED_IDX_CAPS,
+        IDEV_KBDLED_IDX_SCROLL,
+        IDEV_KBDLED_CNT,
+
+        IDEV_KBDLED_NUM                 = 1 << IDEV_KBDLED_IDX_NUM,
+        IDEV_KBDLED_CAPS                = 1 << IDEV_KBDLED_IDX_CAPS,
+        IDEV_KBDLED_SCROLL              = 1 << IDEV_KBDLED_IDX_SCROLL,
+};
+
+struct idev_data_keyboard {
+        struct xkb_state *xkb_state;
+        int8_t ascii;
+        uint8_t value;
+        uint16_t keycode;
+        uint32_t mods;
+        uint32_t consumed_mods;
+        uint32_t n_syms;
+        uint32_t *keysyms;
+        uint32_t *codepoints;
+};
+
+static inline bool idev_kbdmatch(idev_data_keyboard *kdata,
+                                 uint32_t mods, uint32_t n_syms,
+                                 const uint32_t *syms) {
+        const uint32_t significant = IDEV_KBDMOD_SHIFT |
+                                     IDEV_KBDMOD_CTRL |
+                                     IDEV_KBDMOD_ALT |
+                                     IDEV_KBDMOD_LINUX;
+        uint32_t real;
+
+        if (n_syms != kdata->n_syms)
+                return false;
+
+        real = kdata->mods & ~kdata->consumed_mods & significant;
+        if (real != mods)
+                return false;
+
+        return !memcmp(syms, kdata->keysyms, n_syms * sizeof(*syms));
+}
+
+#define IDEV_KBDMATCH(_kdata, _mods, _sym) \
+        idev_kbdmatch((_kdata), (_mods), 1, (const uint32_t[]){ (_sym) })
+
+/*
+ * Data Packets
+ */
+
+enum {
+        IDEV_DATA_RESYNC,
+        IDEV_DATA_EVDEV,
+        IDEV_DATA_KEYBOARD,
+        IDEV_DATA_CNT
+};
+
+struct idev_data {
+        unsigned int type;
+        bool resync : 1;
+
+        union {
+                idev_data_evdev evdev;
+                idev_data_keyboard keyboard;
+        };
+};
+
+/*
+ * Events
+ */
+
+enum {
+        IDEV_EVENT_DEVICE_ADD,
+        IDEV_EVENT_DEVICE_REMOVE,
+        IDEV_EVENT_DEVICE_DATA,
+        IDEV_EVENT_CNT
+};
+
+struct idev_event {
+        unsigned int type;
+        union {
+                struct {
+                        idev_device *device;
+                } device_add, device_remove;
+
+                struct {
+                        idev_device *device;
+                        idev_data data;
+                } device_data;
+        };
+};
+
+typedef int (*idev_event_fn) (idev_session *s, void *userdata, idev_event *ev);
+
+/*
+ * Devices
+ */
+
+void idev_device_enable(idev_device *d);
+void idev_device_disable(idev_device *d);
+
+/*
+ * Sessions
+ */
+
+enum {
+        IDEV_SESSION_CUSTOM                     = (1 << 0),
+        IDEV_SESSION_MANAGED                    = (1 << 1),
+};
+
+int idev_session_new(idev_session **out,
+                     idev_context *c,
+                     unsigned int flags,
+                     const char *name,
+                     idev_event_fn event_fn,
+                     void *userdata);
+idev_session *idev_session_free(idev_session *s);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(idev_session*, idev_session_free);
+
+bool idev_session_is_enabled(idev_session *s);
+void idev_session_enable(idev_session *s);
+void idev_session_disable(idev_session *s);
+
+int idev_session_add_evdev(idev_session *s, struct udev_device *ud);
+int idev_session_remove_evdev(idev_session *s, struct udev_device *ud);
+
+/*
+ * Contexts
+ */
+
+int idev_context_new(idev_context **out, sd_event *event, sd_bus *sysbus);
+idev_context *idev_context_ref(idev_context *c);
+idev_context *idev_context_unref(idev_context *c);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(idev_context*, idev_context_unref);
diff --git a/src/libsystemd-terminal/modeset.c b/src/libsystemd-terminal/modeset.c
new file mode 100644 (file)
index 0000000..f5be38e
--- /dev/null
@@ -0,0 +1,497 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Modeset Testing
+ * The modeset tool attaches to the session of the caller and shows a
+ * test-pattern on all displays of this session. It is meant as debugging tool
+ * for the grdev infrastructure.
+ */
+
+#include <drm_fourcc.h>
+#include <errno.h>
+#include <getopt.h>
+#include <linux/kd.h>
+#include <linux/vt.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-login.h>
+#include <termios.h>
+#include <unistd.h>
+#include "build.h"
+#include "bus-util.h"
+#include "event-util.h"
+#include "grdev.h"
+#include "grdev-internal.h"
+#include "macro.h"
+#include "sysview.h"
+#include "util.h"
+
+typedef struct Modeset Modeset;
+
+struct Modeset {
+        char *session;
+        char *seat;
+        sd_event *event;
+        sd_bus *bus;
+        sd_event_source *exit_src;
+        sysview_context *sysview;
+        grdev_context *grdev;
+        grdev_session *grdev_session;
+
+        uint8_t r, g, b;
+        bool r_up, g_up, b_up;
+
+        bool my_tty : 1;
+        bool managed : 1;
+};
+
+static int modeset_exit_fn(sd_event_source *source, void *userdata) {
+        Modeset *m = userdata;
+
+        if (m->grdev_session)
+                grdev_session_restore(m->grdev_session);
+
+        return 0;
+}
+
+static Modeset *modeset_free(Modeset *m) {
+        if (!m)
+                return NULL;
+
+        m->grdev_session = grdev_session_free(m->grdev_session);
+        m->grdev = grdev_context_unref(m->grdev);
+        m->sysview = sysview_context_free(m->sysview);
+        m->exit_src = sd_event_source_unref(m->exit_src);
+        m->bus = sd_bus_unref(m->bus);
+        m->event = sd_event_unref(m->event);
+        free(m->seat);
+        free(m->session);
+        free(m);
+
+        return NULL;
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Modeset*, modeset_free);
+
+static bool is_my_tty(const char *session) {
+        unsigned int vtnr;
+        struct stat st;
+        long mode;
+        int r;
+
+        /* Using logind's Controller API is highly fragile if there is already
+         * a session controller running. If it is registered as controller
+         * itself, TakeControl will simply fail. But if its a legacy controller
+         * that does not use logind's controller API, we must never register
+         * our own controller. Otherwise, we really mess up the VT. Therefore,
+         * only run in managed mode if there's no-one else.  Furthermore, never
+         * try to access graphics devices if there's someone else. Unlike input
+         * devices, graphics devies cannot be shared easily. */
+
+        if (!isatty(1))
+                return false;
+
+        if (!session)
+                return false;
+
+        r = sd_session_get_vt(session, &vtnr);
+        if (r < 0 || vtnr < 1 || vtnr > 63)
+                return false;
+
+        mode = 0;
+        r = ioctl(1, KDGETMODE, &mode);
+        if (r < 0 || mode != KD_TEXT)
+                return false;
+
+        r = fstat(1, &st);
+        if (r < 0 || minor(st.st_rdev) != vtnr)
+                return false;
+
+        return true;
+}
+
+static int modeset_new(Modeset **out) {
+        _cleanup_(modeset_freep) Modeset *m = NULL;
+        int r;
+
+        assert(out);
+
+        m = new0(Modeset, 1);
+        if (!m)
+                return log_oom();
+
+        r = sd_pid_get_session(getpid(), &m->session);
+        if (r < 0) {
+                log_error("Cannot retrieve logind session: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_session_get_seat(m->session, &m->seat);
+        if (r < 0) {
+                log_error("Cannot retrieve seat of logind session: %s", strerror(-r));
+                return r;
+        }
+
+        m->my_tty = is_my_tty(m->session);
+        m->managed = m->my_tty && geteuid() > 0;
+
+        m->r = rand() % 0xff;
+        m->g = rand() % 0xff;
+        m->b = rand() % 0xff;
+        m->r_up = m->g_up = m->b_up = true;
+
+        r = sd_event_default(&m->event);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_open_system(&m->bus);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_attach_event(m->bus, m->event, SD_EVENT_PRIORITY_NORMAL);
+        if (r < 0)
+                return r;
+
+        r = sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, -1);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_exit(m->event, &m->exit_src, modeset_exit_fn, m);
+        if (r < 0)
+                return r;
+
+        /* schedule before sd-bus close */
+        r = sd_event_source_set_priority(m->exit_src, -10);
+        if (r < 0)
+                return r;
+
+        r = sysview_context_new(&m->sysview,
+                                SYSVIEW_CONTEXT_SCAN_LOGIND |
+                                SYSVIEW_CONTEXT_SCAN_DRM,
+                                m->event,
+                                m->bus,
+                                NULL);
+        if (r < 0)
+                return r;
+
+        r = grdev_context_new(&m->grdev, m->event, m->bus);
+        if (r < 0)
+                return r;
+
+        *out = m;
+        m = NULL;
+        return 0;
+}
+
+static uint8_t next_color(bool *up, uint8_t cur, unsigned int mod) {
+        uint8_t next;
+
+        /* generate smoothly morphing colors */
+
+        next = cur + (*up ? 1 : -1) * (rand() % mod);
+        if ((*up && next < cur) || (!*up && next > cur)) {
+                *up = !*up;
+                next = cur;
+        }
+
+        return next;
+}
+
+static void modeset_draw(Modeset *m, const grdev_display_target *t) {
+        uint32_t j, k, *b;
+        uint8_t *l;
+
+        assert(t->back->format == DRM_FORMAT_XRGB8888 || t->back->format == DRM_FORMAT_ARGB8888);
+        assert(!t->rotate);
+        assert(!t->flip);
+
+        l = t->back->maps[0];
+        for (j = 0; j < t->height; ++j) {
+                for (k = 0; k < t->width; ++k) {
+                        b = (uint32_t*)l;
+                        b[k] = (0xff << 24) | (m->r << 16) | (m->g << 8) | m->b;
+                }
+
+                l += t->back->strides[0];
+        }
+}
+
+static void modeset_render(Modeset *m, grdev_display *d) {
+        const grdev_display_target *t;
+
+        m->r = next_color(&m->r_up, m->r, 4);
+        m->g = next_color(&m->g_up, m->g, 3);
+        m->b = next_color(&m->b_up, m->b, 2);
+
+        GRDEV_DISPLAY_FOREACH_TARGET(d, t) {
+                modeset_draw(m, t);
+                grdev_display_flip_target(d, t);
+        }
+
+        grdev_session_commit(m->grdev_session);
+}
+
+static void modeset_grdev_fn(grdev_session *session, void *userdata, grdev_event *ev) {
+        Modeset *m = userdata;
+
+        switch (ev->type) {
+        case GRDEV_EVENT_DISPLAY_ADD:
+                grdev_display_enable(ev->display_add.display);
+                break;
+        case GRDEV_EVENT_DISPLAY_REMOVE:
+                break;
+        case GRDEV_EVENT_DISPLAY_CHANGE:
+                break;
+        case GRDEV_EVENT_DISPLAY_FRAME:
+                modeset_render(m, ev->display_frame.display);
+                break;
+        }
+}
+
+static int modeset_sysview_fn(sysview_context *c, void *userdata, sysview_event *ev) {
+        unsigned int flags, type;
+        Modeset *m = userdata;
+        sysview_device *d;
+        const char *name;
+        int r;
+
+        switch (ev->type) {
+        case SYSVIEW_EVENT_SESSION_FILTER:
+                if (streq_ptr(m->session, ev->session_filter.id))
+                        return 1;
+
+                break;
+        case SYSVIEW_EVENT_SESSION_ADD:
+                assert(!m->grdev_session);
+
+                name = sysview_session_get_name(ev->session_add.session);
+                flags = 0;
+
+                if (m->managed)
+                        flags |= GRDEV_SESSION_MANAGED;
+
+                r = grdev_session_new(&m->grdev_session,
+                                      m->grdev,
+                                      flags,
+                                      name,
+                                      modeset_grdev_fn,
+                                      m);
+                if (r < 0) {
+                        log_error("Cannot create grdev session: %s", strerror(-r));
+                        return r;
+                }
+
+                if (m->managed) {
+                        r = sysview_session_take_control(ev->session_add.session);
+                        if (r < 0) {
+                                log_error("Cannot request session control: %s", strerror(-r));
+                                return r;
+                        }
+                }
+
+                grdev_session_enable(m->grdev_session);
+
+                break;
+        case SYSVIEW_EVENT_SESSION_REMOVE:
+                if (!m->grdev_session)
+                        return 0;
+
+                grdev_session_restore(m->grdev_session);
+                grdev_session_disable(m->grdev_session);
+                m->grdev_session = grdev_session_free(m->grdev_session);
+                if (sd_event_get_exit_code(m->event, &r) == -ENODATA)
+                        sd_event_exit(m->event, 0);
+                break;
+        case SYSVIEW_EVENT_SESSION_ATTACH:
+                d = ev->session_attach.device;
+                type = sysview_device_get_type(d);
+                if (type == SYSVIEW_DEVICE_DRM)
+                        grdev_session_add_drm(m->grdev_session, sysview_device_get_ud(d));
+
+                break;
+        case SYSVIEW_EVENT_SESSION_DETACH:
+                d = ev->session_detach.device;
+                type = sysview_device_get_type(d);
+                if (type == SYSVIEW_DEVICE_DRM)
+                        grdev_session_remove_drm(m->grdev_session, sysview_device_get_ud(d));
+
+                break;
+        case SYSVIEW_EVENT_SESSION_REFRESH:
+                d = ev->session_refresh.device;
+                type = sysview_device_get_type(d);
+                if (type == SYSVIEW_DEVICE_DRM)
+                        grdev_session_hotplug_drm(m->grdev_session, ev->session_refresh.ud);
+
+                break;
+        case SYSVIEW_EVENT_SESSION_CONTROL:
+                r = ev->session_control.error;
+                if (r < 0) {
+                        log_error("Cannot acquire session control: %s", strerror(-r));
+                        return r;
+                }
+
+                r = ioctl(1, KDSKBMODE, K_UNICODE);
+                if (r < 0) {
+                        log_error("Cannot set K_UNICODE on stdout: %m");
+                        return -errno;
+                }
+
+                break;
+        }
+
+        return 0;
+}
+
+static int modeset_run(Modeset *m) {
+        struct termios in_attr, saved_attr;
+        int r;
+
+        assert(m);
+
+        if (!m->my_tty) {
+                log_warning("You need to run this program on a free VT");
+                return -EACCES;
+        }
+
+        if (!m->managed && geteuid() > 0)
+                log_warning("You run in unmanaged mode without being root. This is likely to fail..");
+
+        printf("modeset - Show test pattern on selected graphics devices\n"
+               "          Running on seat '%s' in user-session '%s'\n"
+               "          Exit by pressing ^C\n\n",
+               m->seat ? : "seat0", m->session ? : "<none>");
+
+        r = sysview_context_start(m->sysview, modeset_sysview_fn, m);
+        if (r < 0)
+                goto out;
+
+        r = tcgetattr(0, &in_attr);
+        if (r < 0) {
+                r = -errno;
+                goto out;
+        }
+
+        saved_attr = in_attr;
+        in_attr.c_lflag &= ~ECHO;
+
+        r = tcsetattr(0, TCSANOW, &in_attr);
+        if (r < 0) {
+                r = -errno;
+                goto out;
+        }
+
+        r = sd_event_loop(m->event);
+        tcsetattr(0, TCSANOW, &saved_attr);
+        printf("exiting..\n");
+
+out:
+        sysview_context_stop(m->sysview);
+        return r;
+}
+
+static int help(void) {
+        printf("%s [OPTIONS...]\n\n"
+               "Show test pattern on all selected graphics devices.\n\n"
+               "  -h --help               Show this help\n"
+               "     --version            Show package version\n"
+               , program_invocation_short_name);
+
+        return 0;
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+        };
+        static const struct option options[] = {
+                { "help",       no_argument,    NULL, 'h'               },
+                { "version",    no_argument,    NULL, ARG_VERSION       },
+                {},
+        };
+        int c;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
+                switch (c) {
+                case 'h':
+                        help();
+                        return 0;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0;
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option");
+                }
+
+        if (argc > optind) {
+                log_error("Too many arguments");
+                return -EINVAL;
+        }
+
+        return 1;
+}
+
+int main(int argc, char *argv[]) {
+        _cleanup_(modeset_freep) Modeset *m = NULL;
+        int r;
+
+        log_set_target(LOG_TARGET_AUTO);
+        log_parse_environment();
+        log_open();
+
+        srand(time(NULL));
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto finish;
+
+        r = modeset_new(&m);
+        if (r < 0)
+                goto finish;
+
+        r = modeset_run(m);
+
+finish:
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/src/libsystemd-terminal/subterm.c b/src/libsystemd-terminal/subterm.c
new file mode 100644 (file)
index 0000000..93c06be
--- /dev/null
@@ -0,0 +1,999 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Stacked Terminal-Emulator
+ * This is an interactive test of the term_screen implementation. It runs a
+ * fully-fletched terminal-emulator inside of a parent TTY. That is, instead of
+ * rendering the terminal as X11-window, it renders it as sub-window in the
+ * parent TTY. Think of this like what "GNU-screen" does.
+ */
+
+#include <assert.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <termios.h>
+#include "macro.h"
+#include "pty.h"
+#include "ring.h"
+#include "sd-event.h"
+#include "term-internal.h"
+#include "util.h"
+
+typedef struct Output Output;
+typedef struct Terminal Terminal;
+
+struct Output {
+        int fd;
+        unsigned int width;
+        unsigned int height;
+        unsigned int in_width;
+        unsigned int in_height;
+        unsigned int cursor_x;
+        unsigned int cursor_y;
+
+        char obuf[4096];
+        size_t n_obuf;
+
+        bool resized : 1;
+        bool in_menu : 1;
+};
+
+struct Terminal {
+        sd_event *event;
+        sd_event_source *frame_timer;
+        Output *output;
+        term_utf8 utf8;
+        term_parser *parser;
+        term_screen *screen;
+
+        int in_fd;
+        int out_fd;
+        struct termios saved_in_attr;
+        struct termios saved_out_attr;
+
+        Pty *pty;
+        Ring out_ring;
+
+        bool is_scheduled : 1;
+        bool is_dirty : 1;
+        bool is_menu : 1;
+};
+
+/*
+ * Output Handling
+ */
+
+#define BORDER_HORIZ            "\xe2\x94\x81"
+#define BORDER_VERT             "\xe2\x94\x83"
+#define BORDER_VERT_RIGHT       "\xe2\x94\xa3"
+#define BORDER_VERT_LEFT        "\xe2\x94\xab"
+#define BORDER_DOWN_RIGHT       "\xe2\x94\x8f"
+#define BORDER_DOWN_LEFT        "\xe2\x94\x93"
+#define BORDER_UP_RIGHT         "\xe2\x94\x97"
+#define BORDER_UP_LEFT          "\xe2\x94\x9b"
+
+static int output_winch(Output *o) {
+        struct winsize wsz = { };
+        int r;
+
+        assert_return(o, -EINVAL);
+
+        r = ioctl(o->fd, TIOCGWINSZ, &wsz);
+        if (r < 0) {
+                log_error("error: cannot read window-size: %m");
+                return -errno;
+        }
+
+        if (wsz.ws_col != o->width || wsz.ws_row != o->height) {
+                o->width = wsz.ws_col;
+                o->height = wsz.ws_row;
+                o->in_width = MAX(o->width, 2U) - 2;
+                o->in_height = MAX(o->height, 6U) - 6;
+                o->resized = true;
+        }
+
+        return 0;
+}
+
+static int output_flush(Output *o) {
+        ssize_t len;
+
+        if (o->n_obuf < 1)
+                return 0;
+
+        len = loop_write(o->fd, o->obuf, o->n_obuf, false);
+        if (len < 0) {
+                log_error("error: cannot write to TTY (%zd): %s", len, strerror(-len));
+                return len;
+        }
+
+        o->n_obuf = 0;
+
+        return 0;
+}
+
+static int output_write(Output *o, const void *buf, size_t size) {
+        ssize_t len;
+        int r;
+
+        assert_return(o, -EINVAL);
+        assert_return(buf || size < 1, -EINVAL);
+
+        if (size < 1)
+                return 0;
+
+        if (o->n_obuf + size > o->n_obuf && o->n_obuf + size <= sizeof(o->obuf)) {
+                memcpy(o->obuf + o->n_obuf, buf, size);
+                o->n_obuf += size;
+                return 0;
+        }
+
+        r = output_flush(o);
+        if (r < 0)
+                return r;
+
+        len = loop_write(o->fd, buf, size, false);
+        if (len < 0) {
+                log_error("error: cannot write to TTY (%zd): %s", len, strerror(-len));
+                return len;
+        }
+
+        return 0;
+}
+
+_printf_(3,0)
+static int output_vnprintf(Output *o, size_t max, const char *format, va_list args) {
+        char buf[4096];
+        int r;
+
+        assert_return(o, -EINVAL);
+        assert_return(format, -EINVAL);
+        assert_return(max <= sizeof(buf), -EINVAL);
+
+        r = vsnprintf(buf, max, format, args);
+        if (r > (ssize_t)max)
+                r = max;
+
+        return output_write(o, buf, r);
+}
+
+_printf_(3,4)
+static int output_nprintf(Output *o, size_t max, const char *format, ...) {
+        va_list args;
+        int r;
+
+        va_start(args, format);
+        r = output_vnprintf(o, max, format, args);
+        va_end(args);
+
+        return r;
+}
+
+_printf_(2,0)
+static int output_vprintf(Output *o, const char *format, va_list args) {
+        char buf[4096];
+        int r;
+
+        assert_return(o, -EINVAL);
+        assert_return(format, -EINVAL);
+
+        r = vsnprintf(buf, sizeof(buf), format, args);
+
+        assert_return(r < (ssize_t)sizeof(buf), -ENOBUFS);
+
+        return output_write(o, buf, r);
+}
+
+_printf_(2,3)
+static int output_printf(Output *o, const char *format, ...) {
+        va_list args;
+        int r;
+
+        va_start(args, format);
+        r = output_vprintf(o, format, args);
+        va_end(args);
+
+        return r;
+}
+
+static int output_move_to(Output *o, unsigned int x, unsigned int y) {
+        int r;
+
+        assert_return(o, -EINVAL);
+
+        /* force the \e[H code as o->cursor_x/y might be out-of-date */
+
+        r = output_printf(o, "\e[%u;%uH", y + 1, x + 1);
+        if (r < 0)
+                return r;
+
+        o->cursor_x = x;
+        o->cursor_y = y;
+        return 0;
+}
+
+static int output_print_line(Output *o, size_t len) {
+        const char line[] =
+                BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ
+                BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ
+                BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ
+                BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ
+                BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ
+                BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ
+                BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ BORDER_HORIZ;
+        const size_t max = (sizeof(line) - 1) / (sizeof(BORDER_HORIZ) - 1);
+        size_t i;
+        int r = 0;
+
+        assert_return(o, -EINVAL);
+
+        for ( ; len > 0; len -= i) {
+                i = (len > max) ? max : len;
+                r = output_write(o, line, i * (sizeof(BORDER_HORIZ) - 1));
+                if (r < 0)
+                        break;
+        }
+
+        return r;
+}
+
+_printf_(2,3)
+static int output_frame_printl(Output *o, const char *format, ...) {
+        va_list args;
+        int r;
+
+        assert(o);
+        assert(format);
+
+        /* out of frame? */
+        if (o->cursor_y < 3 || o->cursor_y >= o->height - 3)
+                return 0;
+
+        va_start(args, format);
+        r = output_vnprintf(o, o->width - 2, format, args);
+        va_end(args);
+
+        if (r < 0)
+                return r;
+
+        return output_move_to(o, 1, o->cursor_y + 1);
+}
+
+static Output *output_free(Output *o) {
+        if (!o)
+                return NULL;
+
+        /* re-enable cursor */
+        output_printf(o, "\e[?25h");
+        /* disable alternate screen buffer */
+        output_printf(o, "\e[?1049l");
+        output_flush(o);
+
+        /* o->fd is owned by the caller */
+        free(o);
+
+        return NULL;
+}
+
+static int output_new(Output **out, int fd) {
+        Output *o;
+        int r;
+
+        assert_return(out, -EINVAL);
+
+        o = new0(Output, 1);
+        if (!o)
+                return log_oom();
+
+        o->fd = fd;
+
+        r = output_winch(o);
+        if (r < 0)
+                goto error;
+
+        /* enable alternate screen buffer */
+        r = output_printf(o, "\e[?1049h");
+        if (r < 0)
+                goto error;
+
+        /* always hide cursor */
+        r = output_printf(o, "\e[?25l");
+        if (r < 0)
+                goto error;
+
+        r = output_flush(o);
+        if (r < 0)
+                goto error;
+
+        *out = o;
+        return 0;
+
+error:
+        output_free(o);
+        return r;
+}
+
+static void output_draw_frame(Output *o) {
+        unsigned int i;
+
+        assert(o);
+
+        /* print header-frame */
+
+        output_printf(o, BORDER_DOWN_RIGHT);
+        output_print_line(o, o->width - 2);
+        output_printf(o, BORDER_DOWN_LEFT
+                         "\r\n"
+                         BORDER_VERT
+                         "\e[2;%uH"    /* cursor-position: 2/x */
+                         BORDER_VERT
+                         "\r\n"
+                         BORDER_VERT_RIGHT,
+                      o->width);
+        output_print_line(o, o->width - 2);
+        output_printf(o, BORDER_VERT_LEFT
+                         "\r\n");
+
+        /* print body-frame */
+
+        for (i = 0; i < o->in_height; ++i) {
+                output_printf(o, BORDER_VERT
+                                 "\e[%u;%uH"    /* cursor-position: 2/x */
+                                 BORDER_VERT
+                                 "\r\n",
+                              i + 4, o->width);
+        }
+
+        /* print footer-frame */
+
+        output_printf(o, BORDER_VERT_RIGHT);
+        output_print_line(o, o->width - 2);
+        output_printf(o, BORDER_VERT_LEFT
+                         "\r\n"
+                         BORDER_VERT
+                         "\e[%u;%uH"    /* cursor-position: 2/x */
+                         BORDER_VERT
+                         "\r\n"
+                         BORDER_UP_RIGHT,
+                      o->height - 1, o->width);
+        output_print_line(o, o->width - 2);
+        output_printf(o, BORDER_UP_LEFT);
+
+        /* print header/footer text */
+
+        output_printf(o, "\e[2;3H");
+        output_nprintf(o, o->width - 4, "systemd - embedded terminal emulator");
+        output_printf(o, "\e[%u;3H", o->height - 1);
+        output_nprintf(o, o->width - 4, "press ^C to enter menu");
+}
+
+static void output_draw_menu(Output *o) {
+        assert(o);
+
+        output_frame_printl(o, "%s", "");
+        output_frame_printl(o, "    Menu: (the following keys are recognized)");
+        output_frame_printl(o, "      q: quit");
+        output_frame_printl(o, "     ^C: send ^C to the PTY");
+}
+
+static int output_draw_cell_fn(term_screen *screen,
+                               void *userdata,
+                               unsigned int x,
+                               unsigned int y,
+                               const term_attr *attr,
+                               const uint32_t *ch,
+                               size_t n_ch,
+                               unsigned int ch_width) {
+        Output *o = userdata;
+        size_t k, ulen;
+        char utf8[4];
+
+        if (x >= o->in_width || y >= o->in_height)
+                return 0;
+
+        if (x == 0 && y != 0)
+                output_printf(o, "\e[m\r\n" BORDER_VERT);
+
+        switch (attr->fg.ccode) {
+        case TERM_CCODE_DEFAULT:
+                output_printf(o, "\e[39m");
+                break;
+        case TERM_CCODE_256:
+                output_printf(o, "\e[38;5;%um", attr->fg.c256);
+                break;
+        case TERM_CCODE_RGB:
+                output_printf(o, "\e[38;2;%u;%u;%um", attr->fg.red, attr->fg.green, attr->fg.blue);
+                break;
+        case TERM_CCODE_BLACK ... TERM_CCODE_WHITE:
+                output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_BLACK + 30);
+                break;
+        case TERM_CCODE_LIGHT_BLACK ... TERM_CCODE_LIGHT_WHITE:
+                output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_LIGHT_BLACK + 90);
+                break;
+        }
+
+        switch (attr->bg.ccode) {
+        case TERM_CCODE_DEFAULT:
+                output_printf(o, "\e[49m");
+                break;
+        case TERM_CCODE_256:
+                output_printf(o, "\e[48;5;%um", attr->bg.c256);
+                break;
+        case TERM_CCODE_RGB:
+                output_printf(o, "\e[48;2;%u;%u;%um", attr->bg.red, attr->bg.green, attr->bg.blue);
+                break;
+        case TERM_CCODE_BLACK ... TERM_CCODE_WHITE:
+                output_printf(o, "\e[%um", attr->bg.ccode - TERM_CCODE_BLACK + 40);
+                break;
+        case TERM_CCODE_LIGHT_BLACK ... TERM_CCODE_LIGHT_WHITE:
+                output_printf(o, "\e[%um", attr->bg.ccode - TERM_CCODE_LIGHT_BLACK + 100);
+                break;
+        }
+
+        output_printf(o, "\e[%u;%u;%u;%u;%u;%um",
+                      attr->bold ? 1 : 22,
+                      attr->italic ? 3 : 23,
+                      attr->underline ? 4 : 24,
+                      attr->inverse ? 7 : 27,
+                      attr->blink ? 5 : 25,
+                      attr->hidden ? 8 : 28);
+
+        if (n_ch < 1) {
+                output_printf(o, " ");
+        } else {
+                for (k = 0; k < n_ch; ++k) {
+                        ulen = term_utf8_encode(utf8, ch[k]);
+                        output_write(o, utf8, ulen);
+                }
+        }
+
+        return 0;
+}
+
+static void output_draw_screen(Output *o, term_screen *s) {
+        assert(o);
+        assert(s);
+
+        term_screen_draw(s, output_draw_cell_fn, o, NULL);
+
+        output_printf(o, "\e[m");
+}
+
+static void output_draw(Output *o, bool menu, term_screen *screen) {
+        assert(o);
+
+        /*
+         * This renders the contenst of the terminal. The layout contains a
+         * header, the main body and a footer. Around all areas we draw a
+         * border. It looks something like this:
+         *
+         *     +----------------------------------------------------+
+         *     |                      Header                        |
+         *     +----------------------------------------------------+
+         *     |                                                    |
+         *     |                                                    |
+         *     |                                                    |
+         *     |                       Body                         |
+         *     |                                                    |
+         *     |                                                    |
+         *     ~                                                    ~
+         *     ~                                                    ~
+         *     +----------------------------------------------------+
+         *     |                      Footer                        |
+         *     +----------------------------------------------------+
+         *
+         * The body is the part that grows vertically.
+         *
+         * We need at least 6 vertical lines to render the screen. This would
+         * leave 0 lines for the body. Therefore, we require 7 lines so there's
+         * at least one body line. Similarly, we need 2 horizontal cells for the
+         * frame, so we require 3.
+         * If the window is too small, we print an error message instead.
+         */
+
+        if (o->in_width < 1 || o->in_height < 1) {
+                output_printf(o, "\e[2J"         /* erase-in-display: whole screen */
+                                 "\e[H");        /* cursor-position: home */
+                output_printf(o, "error: screen too small, need at least 3x7 cells");
+                output_flush(o);
+                return;
+        }
+
+        /* hide cursor */
+        output_printf(o, "\e[?25l");
+
+        /* frame-content is contant; only resizes can change it */
+        if (o->resized || o->in_menu != menu) {
+                output_printf(o, "\e[2J"         /* erase-in-display: whole screen */
+                                 "\e[H");        /* cursor-position: home */
+                output_draw_frame(o);
+                o->resized = false;
+                o->in_menu = menu;
+        }
+
+        /* move cursor to child's position */
+        output_move_to(o, 1, 3);
+
+        if (menu)
+                output_draw_menu(o);
+        else
+                output_draw_screen(o, screen);
+
+        /*
+         * Hack: sd-term was not written to support TTY as output-objects, thus
+         * expects callers to use term_screen_feed_keyboard(). However, we
+         * forward TTY input directly. Hence, we're not notified about keypad
+         * changes. Update the related modes djring redraw to keep them at least
+         * in sync.
+         */
+        if (screen->flags & TERM_FLAG_CURSOR_KEYS)
+                output_printf(o, "\e[?1h");
+        else
+                output_printf(o, "\e[?1l");
+
+        if (screen->flags & TERM_FLAG_KEYPAD_MODE)
+                output_printf(o, "\e=");
+        else
+                output_printf(o, "\e>");
+
+        output_flush(o);
+}
+
+/*
+ * Terminal Handling
+ */
+
+static void terminal_dirty(Terminal *t) {
+        usec_t usec;
+        int r;
+
+        assert(t);
+
+        if (t->is_scheduled) {
+                t->is_dirty = true;
+                return;
+        }
+
+        /* 16ms timer */
+        r = sd_event_now(t->event, CLOCK_MONOTONIC, &usec);
+        assert(r >= 0);
+
+        usec += 16 * USEC_PER_MSEC;
+        r = sd_event_source_set_time(t->frame_timer, usec);
+        if (r >= 0) {
+                r = sd_event_source_set_enabled(t->frame_timer, SD_EVENT_ONESHOT);
+                if (r >= 0)
+                        t->is_scheduled = true;
+        }
+
+        t->is_dirty = false;
+        output_draw(t->output, t->is_menu, t->screen);
+}
+
+static int terminal_frame_timer_fn(sd_event_source *source, uint64_t usec, void *userdata) {
+        Terminal *t = userdata;
+
+        t->is_scheduled = false;
+        if (t->is_dirty)
+                terminal_dirty(t);
+
+        return 0;
+}
+
+static int terminal_winch_fn(sd_event_source *source, const struct signalfd_siginfo *ssi, void *userdata) {
+        Terminal *t = userdata;
+        int r;
+
+        output_winch(t->output);
+
+        if (t->pty) {
+                r = pty_resize(t->pty, t->output->in_width, t->output->in_height);
+                if (r < 0)
+                        log_error("error: pty_resize() (%d): %s", r, strerror(-r));
+        }
+
+        r = term_screen_resize(t->screen, t->output->in_width, t->output->in_height);
+        if (r < 0)
+                log_error("error: term_screen_resize() (%d): %s", r, strerror(-r));
+
+        terminal_dirty(t);
+
+        return 0;
+}
+
+static int terminal_push_tmp(Terminal *t, uint32_t ucs4) {
+        char buf[4];
+        size_t len;
+        int r;
+
+        assert(t);
+
+        len = term_utf8_encode(buf, ucs4);
+        if (len < 1)
+                return 0;
+
+        r = ring_push(&t->out_ring, buf, len);
+        if (r < 0)
+                log_oom();
+
+        return r;
+}
+
+static int terminal_write_tmp(Terminal *t) {
+        struct iovec vec[2];
+        size_t num, i;
+        int r;
+
+        assert(t);
+
+        num = ring_peek(&t->out_ring, vec);
+        if (num < 1)
+                return 0;
+
+        if (t->pty) {
+                for (i = 0; i < num; ++i) {
+                        r = pty_write(t->pty, vec[i].iov_base, vec[i].iov_len);
+                        if (r < 0) {
+                                log_error("error: cannot write to PTY (%d): %s", r, strerror(-r));
+                                return r;
+                        }
+                }
+        }
+
+        ring_flush(&t->out_ring);
+        return 0;
+}
+
+static void terminal_discard_tmp(Terminal *t) {
+        assert(t);
+
+        ring_flush(&t->out_ring);
+}
+
+static int terminal_menu(Terminal *t, const term_seq *seq) {
+        switch (seq->type) {
+        case TERM_SEQ_IGNORE:
+                break;
+        case TERM_SEQ_GRAPHIC:
+                switch (seq->terminator) {
+                case 'q':
+                        sd_event_exit(t->event, 0);
+                        return 0;
+                }
+
+                break;
+        case TERM_SEQ_CONTROL:
+                switch (seq->terminator) {
+                case 0x03:
+                        terminal_push_tmp(t, 0x03);
+                        terminal_write_tmp(t);
+                        break;
+                }
+
+                break;
+        }
+
+        t->is_menu = false;
+        terminal_dirty(t);
+
+        return 0;
+}
+
+static int terminal_io_fn(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
+        Terminal *t = userdata;
+        char buf[4096];
+        ssize_t len, i;
+        int r, type;
+
+        len = read(fd, buf, sizeof(buf));
+        if (len < 0) {
+                if (errno == EAGAIN || errno == EINTR)
+                        return 0;
+
+                log_error("error: cannot read from TTY (%d): %m", -errno);
+                return -errno;
+        }
+
+        for (i = 0; i < len; ++i) {
+                const term_seq *seq;
+                uint32_t *str;
+                size_t n_str, j;
+
+                n_str = term_utf8_decode(&t->utf8, &str, buf[i]);
+                for (j = 0; j < n_str; ++j) {
+                        type = term_parser_feed(t->parser, &seq, str[j]);
+                        if (type < 0) {
+                                log_error("error: term_parser_feed() (%d): %s", type, strerror(-type));
+                                return type;
+                        }
+
+                        if (!t->is_menu) {
+                                r = terminal_push_tmp(t, str[j]);
+                                if (r < 0)
+                                        return r;
+                        }
+
+                        if (type == TERM_SEQ_NONE) {
+                                /* We only intercept one-char sequences, so in
+                                 * case term_parser_feed() couldn't parse a
+                                 * sequence, it is waiting for more data. We
+                                 * know it can never be a one-char sequence
+                                 * then, so we can safely forward the data.
+                                 * This avoids withholding ESC or other values
+                                 * that may be one-shot depending on the
+                                 * application. */
+                                r = terminal_write_tmp(t);
+                                if (r < 0)
+                                        return r;
+                        } else if (t->is_menu) {
+                                r = terminal_menu(t, seq);
+                                if (r < 0)
+                                        return r;
+                        } else if (seq->type == TERM_SEQ_CONTROL && seq->terminator == 0x03) { /* ^C opens the menu */
+                                terminal_discard_tmp(t);
+                                t->is_menu = true;
+                                terminal_dirty(t);
+                        } else {
+                                r = terminal_write_tmp(t);
+                                if (r < 0)
+                                        return r;
+                        }
+                }
+        }
+
+        return 0;
+}
+
+static int terminal_pty_fn(Pty *pty, void *userdata, unsigned int event, const void *ptr, size_t size) {
+        Terminal *t = userdata;
+        int r;
+
+        switch (event) {
+        case PTY_CHILD:
+                sd_event_exit(t->event, 0);
+                break;
+        case PTY_DATA:
+                r = term_screen_feed_text(t->screen, ptr, size);
+                if (r < 0) {
+                        log_error("error: term_screen_feed_text() (%d): %s", r, strerror(-r));
+                        return r;
+                }
+
+                terminal_dirty(t);
+                break;
+        }
+
+        return 0;
+}
+
+static int terminal_write_fn(term_screen *screen, void *userdata, const void *buf, size_t size) {
+        Terminal *t = userdata;
+        int r;
+
+        if (!t->pty)
+                return 0;
+
+        r = ring_push(&t->out_ring, buf, size);
+        if (r < 0)
+                log_oom();
+
+        return r;
+}
+
+static int terminal_cmd_fn(term_screen *screen, void *userdata, unsigned int cmd, const term_seq *seq) {
+        return 0;
+}
+
+static Terminal *terminal_free(Terminal *t) {
+        if (!t)
+                return NULL;
+
+        ring_clear(&t->out_ring);
+        term_screen_unref(t->screen);
+        term_parser_free(t->parser);
+        output_free(t->output);
+        sd_event_source_unref(t->frame_timer);
+        sd_event_unref(t->event);
+        tcsetattr(t->in_fd, TCSANOW, &t->saved_in_attr);
+        tcsetattr(t->out_fd, TCSANOW, &t->saved_out_attr);
+        free(t);
+
+        return NULL;
+}
+
+static int terminal_new(Terminal **out, int in_fd, int out_fd) {
+        struct termios in_attr, out_attr;
+        Terminal *t;
+        int r;
+
+        assert_return(out, -EINVAL);
+
+        r = tcgetattr(in_fd, &in_attr);
+        if (r < 0) {
+                log_error("error: tcgetattr() (%d): %m", -errno);
+                return -errno;
+        }
+
+        r = tcgetattr(out_fd, &out_attr);
+        if (r < 0) {
+                log_error("error: tcgetattr() (%d): %m", -errno);
+                return -errno;
+        }
+
+        t = new0(Terminal, 1);
+        if (!t)
+                return log_oom();
+
+        t->in_fd = in_fd;
+        t->out_fd = out_fd;
+        memcpy(&t->saved_in_attr, &in_attr, sizeof(in_attr));
+        memcpy(&t->saved_out_attr, &out_attr, sizeof(out_attr));
+
+        cfmakeraw(&in_attr);
+        cfmakeraw(&out_attr);
+
+        r = tcsetattr(t->in_fd, TCSANOW, &in_attr);
+        if (r < 0) {
+                log_error("error: tcsetattr() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = tcsetattr(t->out_fd, TCSANOW, &out_attr);
+        if (r < 0) {
+                log_error("error: tcsetattr() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_default(&t->event);
+        if (r < 0) {
+                log_error("error: sd_event_default() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = sigprocmask_many(SIG_BLOCK, SIGINT, SIGQUIT, SIGTERM, SIGWINCH, SIGCHLD, -1);
+        if (r < 0) {
+                log_error("error: sigprocmask_many() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_add_signal(t->event, NULL, SIGINT, NULL, NULL);
+        if (r < 0) {
+                log_error("error: sd_event_add_signal() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_add_signal(t->event, NULL, SIGQUIT, NULL, NULL);
+        if (r < 0) {
+                log_error("error: sd_event_add_signal() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_add_signal(t->event, NULL, SIGTERM, NULL, NULL);
+        if (r < 0) {
+                log_error("error: sd_event_add_signal() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_add_signal(t->event, NULL, SIGWINCH, terminal_winch_fn, t);
+        if (r < 0) {
+                log_error("error: sd_event_add_signal() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        /* force initial redraw on event-loop enter */
+        t->is_dirty = true;
+        r = sd_event_add_time(t->event, &t->frame_timer, CLOCK_MONOTONIC, 0, 0, terminal_frame_timer_fn, t);
+        if (r < 0) {
+                log_error("error: sd_event_add_time() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = output_new(&t->output, out_fd);
+        if (r < 0)
+                goto error;
+
+        r = term_parser_new(&t->parser, true);
+        if (r < 0)
+                goto error;
+
+        r = term_screen_new(&t->screen, terminal_write_fn, t, terminal_cmd_fn, t);
+        if (r < 0)
+                goto error;
+
+        r = term_screen_set_answerback(t->screen, "systemd-subterm");
+        if (r < 0)
+                goto error;
+
+        r = term_screen_resize(t->screen, t->output->in_width, t->output->in_height);
+        if (r < 0) {
+                log_error("error: term_screen_resize() (%d): %s", r, strerror(-r));
+                goto error;
+        }
+
+        r = sd_event_add_io(t->event, NULL, in_fd, EPOLLIN, terminal_io_fn, t);
+        if (r < 0)
+                goto error;
+
+        *out = t;
+        return 0;
+
+error:
+        terminal_free(t);
+        return r;
+}
+
+static int terminal_run(Terminal *t) {
+        pid_t pid;
+
+        assert_return(t, -EINVAL);
+
+        pid = pty_fork(&t->pty, t->event, terminal_pty_fn, t, t->output->in_width, t->output->in_height);
+        if (pid < 0) {
+                log_error("error: cannot fork PTY (%d): %s", pid, strerror(-pid));
+                return pid;
+        } else if (pid == 0) {
+                /* child */
+
+                char **argv = (char*[]){
+                        (char*)getenv("SHELL") ? : (char*)_PATH_BSHELL,
+                        NULL
+                };
+
+                setenv("TERM", "xterm-256color", 1);
+                setenv("COLORTERM", "systemd-subterm", 1);
+
+                execve(argv[0], argv, environ);
+                log_error("error: cannot exec %s (%d): %m", argv[0], -errno);
+                _exit(1);
+        }
+
+        /* parent */
+
+        return sd_event_loop(t->event);
+}
+
+/*
+ * Context Handling
+ */
+
+int main(int argc, char *argv[]) {
+        Terminal *t = NULL;
+        int r;
+
+        r = terminal_new(&t, 0, 1);
+        if (r < 0)
+                goto out;
+
+        r = terminal_run(t);
+        if (r < 0)
+                goto out;
+
+out:
+        if (r < 0)
+                log_error("error: terminal failed (%d): %s", r, strerror(-r));
+        terminal_free(t);
+        return -r;
+}
diff --git a/src/libsystemd-terminal/sysview-internal.h b/src/libsystemd-terminal/sysview-internal.h
new file mode 100644 (file)
index 0000000..39ff933
--- /dev/null
@@ -0,0 +1,142 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#pragma once
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include "hashmap.h"
+#include "list.h"
+#include "macro.h"
+#include "sysview.h"
+#include "util.h"
+
+/*
+ * Devices
+ */
+
+struct sysview_device {
+        sysview_seat *seat;
+        char *name;
+        unsigned int type;
+
+        union {
+                struct {
+                        struct udev_device *ud;
+                } evdev, drm;
+        };
+};
+
+sysview_device *sysview_find_device(sysview_context *c, const char *name);
+
+int sysview_device_new(sysview_device **out, sysview_seat *seat, const char *name);
+sysview_device *sysview_device_free(sysview_device *device);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(sysview_device*, sysview_device_free);
+
+/*
+ * Sessions
+ */
+
+struct sysview_session {
+        sysview_seat *seat;
+        char *name;
+        char *path;
+        void *userdata;
+
+        sd_bus_slot *slot_take_control;
+
+        bool custom : 1;
+        bool public : 1;
+        bool wants_control : 1;
+        bool has_control : 1;
+};
+
+sysview_session *sysview_find_session(sysview_context *c, const char *name);
+
+int sysview_session_new(sysview_session **out, sysview_seat *seat, const char *name);
+sysview_session *sysview_session_free(sysview_session *session);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(sysview_session*, sysview_session_free);
+
+/*
+ * Seats
+ */
+
+struct sysview_seat {
+        sysview_context *context;
+        char *name;
+        char *path;
+
+        Hashmap *session_map;
+        Hashmap *device_map;
+
+        bool scanned : 1;
+        bool public : 1;
+};
+
+sysview_seat *sysview_find_seat(sysview_context *c, const char *name);
+
+int sysview_seat_new(sysview_seat **out, sysview_context *c, const char *name);
+sysview_seat *sysview_seat_free(sysview_seat *seat);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(sysview_seat*, sysview_seat_free);
+
+/*
+ * Contexts
+ */
+
+struct sysview_context {
+        sd_event *event;
+        sd_bus *sysbus;
+        struct udev *ud;
+        uint64_t custom_sid;
+
+        Hashmap *seat_map;
+        Hashmap *session_map;
+        Hashmap *device_map;
+
+        sd_event_source *scan_src;
+        sysview_event_fn event_fn;
+        void *userdata;
+
+        /* udev scanner */
+        struct udev_monitor *ud_monitor;
+        sd_event_source *ud_monitor_src;
+
+        /* logind scanner */
+        sd_bus_slot *ld_slot_manager_signal;
+        sd_bus_slot *ld_slot_list_seats;
+        sd_bus_slot *ld_slot_list_sessions;
+
+        bool scan_logind : 1;
+        bool scan_evdev : 1;
+        bool scan_drm : 1;
+        bool running : 1;
+        bool scanned : 1;
+        bool rescan : 1;
+};
+
+int sysview_context_rescan(sysview_context *c);
diff --git a/src/libsystemd-terminal/sysview.c b/src/libsystemd-terminal/sysview.c
new file mode 100644 (file)
index 0000000..70a6ca7
--- /dev/null
@@ -0,0 +1,1533 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-login.h>
+#include "bus-util.h"
+#include "event-util.h"
+#include "macro.h"
+#include "set.h"
+#include "sysview.h"
+#include "sysview-internal.h"
+#include "udev-util.h"
+#include "util.h"
+
+static int context_raise_session_control(sysview_context *c, sysview_session *session, int error);
+
+/*
+ * Devices
+ */
+
+sysview_device *sysview_find_device(sysview_context *c, const char *name) {
+        assert_return(c, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(c->device_map, name);
+}
+
+int sysview_device_new(sysview_device **out, sysview_seat *seat, const char *name) {
+        _cleanup_(sysview_device_freep) sysview_device *device = NULL;
+        int r;
+
+        assert_return(seat, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        device = new0(sysview_device, 1);
+        if (!device)
+                return -ENOMEM;
+
+        device->seat = seat;
+        device->type = (unsigned)-1;
+
+        device->name = strdup(name);
+        if (!device->name)
+                return -ENOMEM;
+
+        r = hashmap_put(seat->context->device_map, device->name, device);
+        if (r < 0)
+                return r;
+
+        r = hashmap_put(seat->device_map, device->name, device);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = device;
+        device = NULL;
+        return 0;
+}
+
+sysview_device *sysview_device_free(sysview_device *device) {
+        if (!device)
+                return NULL;
+
+        if (device->name) {
+                hashmap_remove_value(device->seat->device_map, device->name, device);
+                hashmap_remove_value(device->seat->context->device_map, device->name, device);
+        }
+
+        switch (device->type) {
+        case SYSVIEW_DEVICE_EVDEV:
+                device->evdev.ud = udev_device_unref(device->evdev.ud);
+                break;
+        case SYSVIEW_DEVICE_DRM:
+                device->drm.ud = udev_device_unref(device->drm.ud);
+                break;
+        }
+
+        free(device->name);
+        free(device);
+
+        return NULL;
+}
+
+const char *sysview_device_get_name(sysview_device *device) {
+        assert_return(device, NULL);
+
+        return device->name;
+}
+
+unsigned int sysview_device_get_type(sysview_device *device) {
+        assert_return(device, (unsigned)-1);
+
+        return device->type;
+}
+
+struct udev_device *sysview_device_get_ud(sysview_device *device) {
+        assert_return(device, NULL);
+
+        switch (device->type) {
+        case SYSVIEW_DEVICE_EVDEV:
+                return device->evdev.ud;
+        case SYSVIEW_DEVICE_DRM:
+                return device->drm.ud;
+        default:
+                assert_return(0, NULL);
+        }
+}
+
+static int device_new_ud(sysview_device **out, sysview_seat *seat, unsigned int type, struct udev_device *ud) {
+        _cleanup_(sysview_device_freep) sysview_device *device = NULL;
+        int r;
+
+        assert_return(seat, -EINVAL);
+        assert_return(ud, -EINVAL);
+
+        r = sysview_device_new(&device, seat, udev_device_get_syspath(ud));
+        if (r < 0)
+                return r;
+
+        device->type = type;
+
+        switch (type) {
+        case SYSVIEW_DEVICE_EVDEV:
+                device->evdev.ud = udev_device_ref(ud);
+                break;
+        case SYSVIEW_DEVICE_DRM:
+                device->drm.ud = udev_device_ref(ud);
+                break;
+        default:
+                assert_not_reached("sysview: invalid udev-device type");
+        }
+
+        if (out)
+                *out = device;
+        device = NULL;
+        return 0;
+}
+
+/*
+ * Sessions
+ */
+
+sysview_session *sysview_find_session(sysview_context *c, const char *name) {
+        assert_return(c, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(c->session_map, name);
+}
+
+int sysview_session_new(sysview_session **out, sysview_seat *seat, const char *name) {
+        _cleanup_(sysview_session_freep) sysview_session *session = NULL;
+        int r;
+
+        assert_return(seat, -EINVAL);
+
+        session = new0(sysview_session, 1);
+        if (!session)
+                return -ENOMEM;
+
+        session->seat = seat;
+
+        if (name) {
+                /*
+                 * If a name is given, we require it to be a logind session
+                 * name. The session will be put in managed mode and we use
+                 * logind to request controller access.
+                 */
+
+                session->name = strdup(name);
+                if (!session->name)
+                        return -ENOMEM;
+
+                r = sd_bus_path_encode("/org/freedesktop/login1/session",
+                                       session->name, &session->path);
+                if (r < 0)
+                        return r;
+
+                session->custom = false;;
+        } else {
+                /*
+                 * No session name was given. We assume this is an unmanaged
+                 * session controlled by the application. We don't use logind
+                 * at all and leave session management to the application. The
+                 * name of the session-object is set to a unique random string
+                 * that does not clash with the logind namespace.
+                 */
+
+                r = asprintf(&session->name, "@custom%" PRIu64,
+                             ++seat->context->custom_sid);
+                if (r < 0)
+                        return -ENOMEM;
+
+                session->custom = true;
+        }
+
+        r = hashmap_put(seat->context->session_map, session->name, session);
+        if (r < 0)
+                return r;
+
+        r = hashmap_put(seat->session_map, session->name, session);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = session;
+        session = NULL;
+        return 0;
+}
+
+sysview_session *sysview_session_free(sysview_session *session) {
+        if (!session)
+                return NULL;
+
+        assert(!session->public);
+        assert(!session->wants_control);
+
+        if (session->name) {
+                hashmap_remove_value(session->seat->session_map, session->name, session);
+                hashmap_remove_value(session->seat->context->session_map, session->name, session);
+        }
+
+        free(session->path);
+        free(session->name);
+        free(session);
+
+        return NULL;
+}
+
+void sysview_session_set_userdata(sysview_session *session, void *userdata) {
+        assert(session);
+
+        session->userdata = userdata;
+}
+
+void *sysview_session_get_userdata(sysview_session *session) {
+        assert_return(session, NULL);
+
+        return session->userdata;
+}
+
+const char *sysview_session_get_name(sysview_session *session) {
+        assert_return(session, NULL);
+
+        return session->name;
+}
+
+sysview_seat *sysview_session_get_seat(sysview_session *session) {
+        assert_return(session, NULL);
+
+        return session->seat;
+}
+
+static int session_take_control_fn(sd_bus *bus,
+                                   sd_bus_message *reply,
+                                   void *userdata,
+                                   sd_bus_error *ret_error) {
+        sysview_session *session = userdata;
+        int r, error;
+
+        session->slot_take_control = sd_bus_slot_unref(session->slot_take_control);
+
+        if (sd_bus_message_is_method_error(reply, NULL)) {
+                const sd_bus_error *e = sd_bus_message_get_error(reply);
+
+                log_debug("sysview: %s: TakeControl failed: %s: %s",
+                          session->name, e->name, e->message);
+                error = -sd_bus_error_get_errno(e);
+        } else {
+                session->has_control = true;
+                error = 0;
+        }
+
+        r = context_raise_session_control(session->seat->context, session, error);
+        if (r < 0)
+                log_debug("sysview: callback failed while signalling session control '%d' on session '%s': %s",
+                          error, session->name, strerror(-r));
+
+        return 0;
+}
+
+int sysview_session_take_control(sysview_session *session) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        int r;
+
+        assert_return(session, -EINVAL);
+        assert_return(!session->custom, -EINVAL);
+
+        if (session->wants_control)
+                return 0;
+
+        r = sd_bus_message_new_method_call(session->seat->context->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           session->path,
+                                           "org.freedesktop.login1.Session",
+                                           "TakeControl");
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_append(m, "b", 0);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_call_async(session->seat->context->sysbus,
+                              &session->slot_take_control,
+                              m,
+                              session_take_control_fn,
+                              session,
+                              0);
+        if (r < 0)
+                return r;
+
+        session->wants_control = true;
+        return 0;
+}
+
+void sysview_session_release_control(sysview_session *session) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        int r;
+
+        assert(session);
+        assert(!session->custom);
+
+        if (!session->wants_control)
+                return;
+
+        session->wants_control = false;
+
+        if (!session->has_control && !session->slot_take_control)
+                return;
+
+        session->has_control = false;
+        session->slot_take_control = sd_bus_slot_unref(session->slot_take_control);
+
+        r = sd_bus_message_new_method_call(session->seat->context->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           session->path,
+                                           "org.freedesktop.login1.Session",
+                                           "ReleaseControl");
+        if (r >= 0)
+                r = sd_bus_send(session->seat->context->sysbus, m, NULL);
+
+        if (r < 0 && r != -ENOTCONN)
+                log_debug("sysview: %s: cannot send ReleaseControl: %s",
+                          session->name, strerror(-r));
+}
+
+/*
+ * Seats
+ */
+
+sysview_seat *sysview_find_seat(sysview_context *c, const char *name) {
+        assert_return(c, NULL);
+        assert_return(name, NULL);
+
+        return hashmap_get(c->seat_map, name);
+}
+
+int sysview_seat_new(sysview_seat **out, sysview_context *c, const char *name) {
+        _cleanup_(sysview_seat_freep) sysview_seat *seat = NULL;
+        int r;
+
+        assert_return(c, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        seat = new0(sysview_seat, 1);
+        if (!seat)
+                return -ENOMEM;
+
+        seat->context = c;
+
+        seat->name = strdup(name);
+        if (!seat->name)
+                return -ENOMEM;
+
+        r = sd_bus_path_encode("/org/freedesktop/login1/seat", seat->name, &seat->path);
+        if (r < 0)
+                return r;
+
+        seat->session_map = hashmap_new(&string_hash_ops);
+        if (!seat->session_map)
+                return -ENOMEM;
+
+        seat->device_map = hashmap_new(&string_hash_ops);
+        if (!seat->device_map)
+                return -ENOMEM;
+
+        r = hashmap_put(c->seat_map, seat->name, seat);
+        if (r < 0)
+                return r;
+
+        if (out)
+                *out = seat;
+        seat = NULL;
+        return 0;
+}
+
+sysview_seat *sysview_seat_free(sysview_seat *seat) {
+        if (!seat)
+                return NULL;
+
+        assert(!seat->public);
+        assert(hashmap_size(seat->device_map) == 0);
+        assert(hashmap_size(seat->session_map) == 0);
+
+        if (seat->name)
+                hashmap_remove_value(seat->context->seat_map, seat->name, seat);
+
+        hashmap_free(seat->device_map);
+        hashmap_free(seat->session_map);
+        free(seat->path);
+        free(seat->name);
+        free(seat);
+
+        return NULL;
+}
+
+const char *sysview_seat_get_name(sysview_seat *seat) {
+        assert_return(seat, NULL);
+
+        return seat->name;
+}
+
+int sysview_seat_switch_to(sysview_seat *seat, uint32_t nr) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        int r;
+
+        assert_return(seat, -EINVAL);
+        assert_return(seat->context->sysbus, -EINVAL);
+
+        r = sd_bus_message_new_method_call(seat->context->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           seat->path,
+                                           "org.freedesktop.login1.Seat",
+                                           "SwitchTo");
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_append(m, "u", nr);
+        if (r < 0)
+                return r;
+
+        return sd_bus_send(seat->context->sysbus, m, NULL);
+}
+
+/*
+ * Contexts
+ */
+
+static int context_raise(sysview_context *c, sysview_event *event, int def) {
+        return c->running ? c->event_fn(c, c->userdata, event) : def;
+}
+
+static int context_raise_seat_add(sysview_context *c, sysview_seat *seat) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SEAT_ADD,
+                .seat_add = {
+                        .seat = seat,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static int context_raise_seat_remove(sysview_context *c, sysview_seat *seat) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SEAT_REMOVE,
+                .seat_remove = {
+                        .seat = seat,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static int context_raise_session_filter(sysview_context *c,
+                                        const char *id,
+                                        const char *seatid,
+                                        const char *username,
+                                        unsigned int uid) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SESSION_FILTER,
+                .session_filter = {
+                        .id = id,
+                        .seatid = seatid,
+                        .username = username,
+                        .uid = uid,
+                }
+        };
+
+        return context_raise(c, &event, 1);
+}
+
+static int context_raise_session_add(sysview_context *c, sysview_session *session) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SESSION_ADD,
+                .session_add = {
+                        .session = session,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static int context_raise_session_remove(sysview_context *c, sysview_session *session) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SESSION_REMOVE,
+                .session_remove = {
+                        .session = session,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static int context_raise_session_control(sysview_context *c, sysview_session *session, int error) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SESSION_CONTROL,
+                .session_control = {
+                        .session = session,
+                        .error = error,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static int context_raise_session_attach(sysview_context *c, sysview_session *session, sysview_device *device) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SESSION_ATTACH,
+                .session_attach = {
+                        .session = session,
+                        .device = device,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static int context_raise_session_detach(sysview_context *c, sysview_session *session, sysview_device *device) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SESSION_DETACH,
+                .session_detach = {
+                        .session = session,
+                        .device = device,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static int context_raise_session_refresh(sysview_context *c, sysview_session *session, sysview_device *device, struct udev_device *ud) {
+        sysview_event event = {
+                .type = SYSVIEW_EVENT_SESSION_REFRESH,
+                .session_refresh = {
+                        .session = session,
+                        .device = device,
+                        .ud = ud,
+                }
+        };
+
+        return context_raise(c, &event, 0);
+}
+
+static void context_add_device(sysview_context *c, sysview_device *device) {
+        sysview_session *session;
+        Iterator i;
+        int r;
+
+        assert(c);
+        assert(device);
+
+        log_debug("sysview: add device '%s' on seat '%s'",
+                  device->name, device->seat->name);
+
+        HASHMAP_FOREACH(session, device->seat->session_map, i) {
+                if (!session->public)
+                        continue;
+
+                r = context_raise_session_attach(c, session, device);
+                if (r < 0)
+                        log_debug("sysview: callback failed while attaching device '%s' to session '%s': %s",
+                                  device->name, session->name, strerror(-r));
+        }
+}
+
+static void context_remove_device(sysview_context *c, sysview_device *device) {
+        sysview_session *session;
+        Iterator i;
+        int r;
+
+        assert(c);
+        assert(device);
+
+        log_debug("sysview: remove device '%s'", device->name);
+
+        HASHMAP_FOREACH(session, device->seat->session_map, i) {
+                if (!session->public)
+                        continue;
+
+                r = context_raise_session_detach(c, session, device);
+                if (r < 0)
+                        log_debug("sysview: callback failed while detaching device '%s' from session '%s': %s",
+                                  device->name, session->name, strerror(-r));
+        }
+
+        sysview_device_free(device);
+}
+
+static void context_change_device(sysview_context *c, sysview_device *device, struct udev_device *ud) {
+        sysview_session *session;
+        Iterator i;
+        int r;
+
+        assert(c);
+        assert(device);
+
+        log_debug("sysview: change device '%s'", device->name);
+
+        HASHMAP_FOREACH(session, device->seat->session_map, i) {
+                if (!session->public)
+                        continue;
+
+                r = context_raise_session_refresh(c, session, device, ud);
+                if (r < 0)
+                        log_debug("sysview: callback failed while changing device '%s' on session '%s': %s",
+                                  device->name, session->name, strerror(-r));
+        }
+}
+
+static void context_add_session(sysview_context *c, sysview_seat *seat, const char *id) {
+        sysview_session *session;
+        sysview_device *device;
+        Iterator i;
+        int r;
+
+        assert(c);
+        assert(seat);
+        assert(id);
+
+        session = sysview_find_session(c, id);
+        if (session)
+                return;
+
+        log_debug("sysview: add session '%s' on seat '%s'", id, seat->name);
+
+        r = sysview_session_new(&session, seat, id);
+        if (r < 0)
+                goto error;
+
+        if (!seat->scanned) {
+                r = sysview_context_rescan(c);
+                if (r < 0)
+                        goto error;
+        }
+
+        if (seat->public) {
+                session->public = true;
+                r = context_raise_session_add(c, session);
+                if (r < 0) {
+                        log_debug("sysview: callback failed while adding session '%s': %s",
+                                  session->name, strerror(-r));
+                        session->public = false;
+                        goto error;
+                }
+
+                HASHMAP_FOREACH(device, seat->device_map, i) {
+                        r = context_raise_session_attach(c, session, device);
+                        if (r < 0)
+                                log_debug("sysview: callback failed while attaching device '%s' to new session '%s': %s",
+                                          device->name, session->name, strerror(-r));
+                }
+        }
+
+        return;
+
+error:
+        if (r < 0)
+                log_debug("sysview: error while adding session '%s': %s",
+                          id, strerror(-r));
+}
+
+static void context_remove_session(sysview_context *c, sysview_session *session) {
+        sysview_device *device;
+        Iterator i;
+        int r;
+
+        assert(c);
+        assert(session);
+
+        log_debug("sysview: remove session '%s'", session->name);
+
+        if (session->public) {
+                HASHMAP_FOREACH(device, session->seat->device_map, i) {
+                        r = context_raise_session_detach(c, session, device);
+                        if (r < 0)
+                                log_debug("sysview: callback failed while detaching device '%s' from old session '%s': %s",
+                                          device->name, session->name, strerror(-r));
+                }
+
+                session->public = false;
+                r = context_raise_session_remove(c, session);
+                if (r < 0)
+                        log_debug("sysview: callback failed while removing session '%s': %s",
+                                  session->name, strerror(-r));
+        }
+
+        if (!session->custom)
+                sysview_session_release_control(session);
+
+        sysview_session_free(session);
+}
+
+static void context_add_seat(sysview_context *c, const char *id) {
+        sysview_seat *seat;
+        int r;
+
+        assert(c);
+        assert(id);
+
+        seat = sysview_find_seat(c, id);
+        if (seat)
+                return;
+
+        log_debug("sysview: add seat '%s'", id);
+
+        r = sysview_seat_new(&seat, c, id);
+        if (r < 0)
+                goto error;
+
+        seat->public = true;
+        r = context_raise_seat_add(c, seat);
+        if (r < 0) {
+                log_debug("sysview: callback failed while adding seat '%s': %s",
+                          seat->name, strerror(-r));
+                seat->public = false;
+        }
+
+        return;
+
+error:
+        if (r < 0)
+                log_debug("sysview: error while adding seat '%s': %s",
+                          id, strerror(-r));
+}
+
+static void context_remove_seat(sysview_context *c, sysview_seat *seat) {
+        sysview_session *session;
+        sysview_device *device;
+        int r;
+
+        assert(c);
+        assert(seat);
+
+        log_debug("sysview: remove seat '%s'", seat->name);
+
+        while ((device = hashmap_first(seat->device_map)))
+                context_remove_device(c, device);
+
+        while ((session = hashmap_first(seat->session_map)))
+                context_remove_session(c, session);
+
+        if (seat->public) {
+                seat->public = false;
+                r = context_raise_seat_remove(c, seat);
+                if (r < 0)
+                        log_debug("sysview: callback failed while removing seat '%s': %s",
+                                  seat->name, strerror(-r));
+        }
+
+        sysview_seat_free(seat);
+}
+
+int sysview_context_new(sysview_context **out,
+                        unsigned int flags,
+                        sd_event *event,
+                        sd_bus *sysbus,
+                        struct udev *ud) {
+        _cleanup_(sysview_context_freep) sysview_context *c = NULL;
+        int r;
+
+        assert_return(out, -EINVAL);
+        assert_return(event, -EINVAL);
+
+        log_debug("sysview: new");
+
+        c = new0(sysview_context, 1);
+        if (!c)
+                return -ENOMEM;
+
+        c->event = sd_event_ref(event);
+        if (flags & SYSVIEW_CONTEXT_SCAN_LOGIND)
+                c->scan_logind = true;
+        if (flags & SYSVIEW_CONTEXT_SCAN_EVDEV)
+                c->scan_evdev = true;
+        if (flags & SYSVIEW_CONTEXT_SCAN_DRM)
+                c->scan_drm = true;
+
+        if (sysbus) {
+                c->sysbus = sd_bus_ref(sysbus);
+        } else if (c->scan_logind) {
+                r = sd_bus_open_system(&c->sysbus);
+                if (r < 0)
+                        return r;
+        }
+
+        if (ud) {
+                c->ud = udev_ref(ud);
+        } else if (c->scan_evdev || c->scan_drm) {
+                errno = 0;
+                c->ud = udev_new();
+                if (!c->ud)
+                        return errno > 0 ? -errno : -EFAULT;
+        }
+
+        c->seat_map = hashmap_new(&string_hash_ops);
+        if (!c->seat_map)
+                return -ENOMEM;
+
+        c->session_map = hashmap_new(&string_hash_ops);
+        if (!c->session_map)
+                return -ENOMEM;
+
+        c->device_map = hashmap_new(&string_hash_ops);
+        if (!c->device_map)
+                return -ENOMEM;
+
+        *out = c;
+        c = NULL;
+        return 0;
+}
+
+sysview_context *sysview_context_free(sysview_context *c) {
+        if (!c)
+                return NULL;
+
+        log_debug("sysview: free");
+
+        sysview_context_stop(c);
+
+        assert(hashmap_size(c->device_map) == 0);
+        assert(hashmap_size(c->session_map) == 0);
+        assert(hashmap_size(c->seat_map) == 0);
+
+        hashmap_free(c->device_map);
+        hashmap_free(c->session_map);
+        hashmap_free(c->seat_map);
+        c->ud = udev_unref(c->ud);
+        c->sysbus = sd_bus_unref(c->sysbus);
+        c->event = sd_event_unref(c->event);
+        free(c);
+
+        return NULL;
+}
+
+static int context_ud_prepare_monitor(sysview_context *c, struct udev_monitor *m) {
+        int r;
+
+        if (c->scan_evdev) {
+                r = udev_monitor_filter_add_match_subsystem_devtype(m, "input", NULL);
+                if (r < 0)
+                        return r;
+        }
+
+        if (c->scan_drm) {
+                r = udev_monitor_filter_add_match_subsystem_devtype(m, "drm", NULL);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+static int context_ud_prepare_scan(sysview_context *c, struct udev_enumerate *e) {
+        int r;
+
+        if (c->scan_evdev) {
+                r = udev_enumerate_add_match_subsystem(e, "input");
+                if (r < 0)
+                        return r;
+        }
+
+        if (c->scan_drm) {
+                r = udev_enumerate_add_match_subsystem(e, "drm");
+                if (r < 0)
+                        return r;
+        }
+
+        r = udev_enumerate_add_match_is_initialized(e);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int context_ud_hotplug(sysview_context *c, struct udev_device *d) {
+        const char *syspath, *sysname, *subsystem, *action, *seatname;
+        sysview_device *device;
+        int r;
+
+        syspath = udev_device_get_syspath(d);
+        sysname = udev_device_get_sysname(d);
+        subsystem = udev_device_get_subsystem(d);
+        action = udev_device_get_action(d);
+
+        /* not interested in custom devices without syspath/etc */
+        if (!syspath || !sysname || !subsystem)
+                return 0;
+
+        device = sysview_find_device(c, syspath);
+
+        if (streq_ptr(action, "remove")) {
+                if (!device)
+                        return 0;
+
+                context_remove_device(c, device);
+        } else if (streq_ptr(action, "change")) {
+                if (!device)
+                        return 0;
+
+                context_change_device(c, device, d);
+        } else if (!action || streq_ptr(action, "add")) {
+                struct udev_device *p;
+                unsigned int type, t;
+                sysview_seat *seat;
+
+                if (device)
+                        return 0;
+
+                if (streq(subsystem, "input") && startswith(sysname, "event") && safe_atou(sysname + 5, &t) >= 0)
+                        type = SYSVIEW_DEVICE_EVDEV;
+                else if (streq(subsystem, "drm") && startswith(sysname, "card"))
+                        type = SYSVIEW_DEVICE_DRM;
+                else
+                        type = (unsigned)-1;
+
+                if (type >= SYSVIEW_DEVICE_CNT)
+                        return 0;
+
+                p = d;
+                seatname = NULL;
+                do {
+                        seatname = udev_device_get_property_value(p, "ID_SEAT");
+                        if (seatname)
+                                break;
+                } while ((p = udev_device_get_parent(p)));
+
+                seat = sysview_find_seat(c, seatname ? : "seat0");
+                if (!seat)
+                        return 0;
+
+                r = device_new_ud(&device, seat, type, d);
+                if (r < 0) {
+                        log_debug("sysview: cannot create device for udev-device '%s': %s",
+                                  syspath, strerror(-r));
+                        return r;
+                }
+
+                context_add_device(c, device);
+        }
+
+        return 0;
+}
+
+static int context_ud_monitor_fn(sd_event_source *s,
+                                 int fd,
+                                 uint32_t revents,
+                                 void *userdata) {
+        sysview_context *c = userdata;
+        struct udev_device *d;
+        int r;
+
+        if (revents & EPOLLIN) {
+                while ((d = udev_monitor_receive_device(c->ud_monitor))) {
+                        r = context_ud_hotplug(c, d);
+                        udev_device_unref(d);
+                        if (r != 0)
+                                return r;
+                }
+
+                /* as long as EPOLLIN is signalled, read pending data */
+                return 0;
+        }
+
+        if (revents & (EPOLLHUP | EPOLLERR)) {
+                log_debug("sysview: HUP on udev-monitor");
+                c->ud_monitor_src = sd_event_source_unref(c->ud_monitor_src);
+        }
+
+        return 0;
+}
+
+static int context_ud_start(sysview_context *c) {
+        int r, fd;
+
+        if (!c->ud)
+                return 0;
+
+        errno = 0;
+        c->ud_monitor = udev_monitor_new_from_netlink(c->ud, "udev");
+        if (!c->ud_monitor)
+                return errno > 0 ? -errno : -EFAULT;
+
+        r = context_ud_prepare_monitor(c, c->ud_monitor);
+        if (r < 0)
+                return r;
+
+        r = udev_monitor_enable_receiving(c->ud_monitor);
+        if (r < 0)
+                return r;
+
+        fd = udev_monitor_get_fd(c->ud_monitor);
+        r = sd_event_add_io(c->event,
+                            &c->ud_monitor_src,
+                            fd,
+                            EPOLLHUP | EPOLLERR | EPOLLIN,
+                            context_ud_monitor_fn,
+                            c);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static void context_ud_stop(sysview_context *c) {
+        c->ud_monitor_src = sd_event_source_unref(c->ud_monitor_src);
+        c->ud_monitor = udev_monitor_unref(c->ud_monitor);
+}
+
+static int context_ud_scan(sysview_context *c) {
+        _cleanup_(udev_enumerate_unrefp) struct udev_enumerate *e = NULL;
+        struct udev_list_entry *entry;
+        struct udev_device *d;
+        int r;
+
+        if (!c->ud_monitor)
+                return 0;
+
+        errno = 0;
+        e = udev_enumerate_new(c->ud);
+        if (!e)
+                return errno > 0 ? -errno : -EFAULT;
+
+        r = context_ud_prepare_scan(c, e);
+        if (r < 0)
+                return r;
+
+        r = udev_enumerate_scan_devices(e);
+        if (r < 0)
+                return r;
+
+        udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) {
+                const char *name;
+
+                name = udev_list_entry_get_name(entry);
+
+                errno = 0;
+                d = udev_device_new_from_syspath(c->ud, name);
+                if (!d) {
+                        r = errno > 0 ? -errno : -EFAULT;
+                        log_debug("sysview: cannot create udev-device for %s: %s",
+                                  name, strerror(-r));
+                        continue;
+                }
+
+                r = context_ud_hotplug(c, d);
+                udev_device_unref(d);
+                if (r != 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+static int context_ld_seat_new(sysview_context *c, sd_bus_message *signal) {
+        const char *id, *path;
+        int r;
+
+        r = sd_bus_message_read(signal, "so", &id, &path);
+        if (r < 0) {
+                log_debug("sysview: cannot parse SeatNew from logind: %s",
+                          strerror(-r));
+                return r;
+        }
+
+        context_add_seat(c, id);
+        return 0;
+}
+
+static int context_ld_seat_removed(sysview_context *c, sd_bus_message *signal) {
+        const char *id, *path;
+        sysview_seat *seat;
+        int r;
+
+        r = sd_bus_message_read(signal, "so", &id, &path);
+        if (r < 0) {
+                log_debug("sysview: cannot parse SeatRemoved from logind: %s",
+                          strerror(-r));
+                return r;
+        }
+
+        seat = sysview_find_seat(c, id);
+        if (!seat)
+                return 0;
+
+        context_remove_seat(c, seat);
+        return 0;
+}
+
+static int context_ld_session_new(sysview_context *c, sd_bus_message *signal) {
+        _cleanup_free_ char *seatid = NULL, *username = NULL;
+        const char *id, *path;
+        sysview_seat *seat;
+        uid_t uid;
+        int r;
+
+        r = sd_bus_message_read(signal, "so", &id, &path);
+        if (r < 0) {
+                log_debug("sysview: cannot parse SessionNew from logind: %s",
+                          strerror(-r));
+                return r;
+        }
+
+        /*
+         * As the dbus message didn't contain enough information, we
+         * read missing bits via sd-login. Note that this might race session
+         * destruction, so we handle ENOENT properly.
+         */
+
+        /* ENOENT is also returned for sessions without seats */
+        r = sd_session_get_seat(id, &seatid);
+        if (r == -ENOENT)
+                return 0;
+        else if (r < 0)
+                goto error;
+
+        seat = sysview_find_seat(c, seatid);
+        if (!seat)
+                return 0;
+
+        r = sd_session_get_uid(id, &uid);
+        if (r == -ENOENT)
+                return 0;
+        else if (r < 0)
+                goto error;
+
+        username = lookup_uid(uid);
+        if (!username) {
+                r = -ENOMEM;
+                goto error;
+        }
+
+        r = context_raise_session_filter(c, id, seatid, username, uid);
+        if (r < 0)
+                log_debug("sysview: callback failed while filtering session '%s': %s",
+                          id, strerror(-r));
+        else if (r > 0)
+                context_add_session(c, seat, id);
+
+        return 0;
+
+error:
+        log_debug("sysview: failed retrieving information for new session '%s': %s",
+                  id, strerror(-r));
+        return r;
+}
+
+static int context_ld_session_removed(sysview_context *c, sd_bus_message *signal) {
+        sysview_session *session;
+        const char *id, *path;
+        int r;
+
+        r = sd_bus_message_read(signal, "so", &id, &path);
+        if (r < 0) {
+                log_debug("sysview: cannot parse SessionRemoved from logind: %s",
+                          strerror(-r));
+                return r;
+        }
+
+        session = sysview_find_session(c, id);
+        if (!session)
+                return 0;
+
+        context_remove_session(c, session);
+        return 0;
+}
+
+static int context_ld_manager_signal_fn(sd_bus *bus,
+                                        sd_bus_message *signal,
+                                        void *userdata,
+                                        sd_bus_error *ret_error) {
+        sysview_context *c = userdata;
+
+        if (sd_bus_message_is_signal(signal, "org.freedesktop.login1.Manager", "SeatNew"))
+                return context_ld_seat_new(c, signal);
+        else if (sd_bus_message_is_signal(signal, "org.freedesktop.login1.Manager", "SeatRemoved"))
+                return context_ld_seat_removed(c, signal);
+        else if (sd_bus_message_is_signal(signal, "org.freedesktop.login1.Manager", "SessionNew"))
+                return context_ld_session_new(c, signal);
+        else if (sd_bus_message_is_signal(signal, "org.freedesktop.login1.Manager", "SessionRemoved"))
+                return context_ld_session_removed(c, signal);
+        else
+                return 0;
+}
+
+static int context_ld_start(sysview_context *c) {
+        int r;
+
+        if (!c->scan_logind)
+                return 0;
+
+        r = sd_bus_add_match(c->sysbus,
+                             &c->ld_slot_manager_signal,
+                             "type='signal',"
+                             "sender='org.freedesktop.login1',"
+                             "interface='org.freedesktop.login1.Manager',"
+                             "path='/org/freedesktop/login1'",
+                             context_ld_manager_signal_fn,
+                             c);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static void context_ld_stop(sysview_context *c) {
+        c->ld_slot_list_sessions = sd_bus_slot_unref(c->ld_slot_list_sessions);
+        c->ld_slot_list_seats = sd_bus_slot_unref(c->ld_slot_list_seats);
+        c->ld_slot_manager_signal = sd_bus_slot_unref(c->ld_slot_manager_signal);
+}
+
+static int context_ld_list_seats_fn(sd_bus *bus,
+                                    sd_bus_message *reply,
+                                    void *userdata,
+                                    sd_bus_error *ret_error) {
+        sysview_context *c = userdata;
+        int r;
+
+        c->ld_slot_list_seats = sd_bus_slot_unref(c->ld_slot_list_seats);
+
+        if (sd_bus_message_is_method_error(reply, NULL)) {
+                const sd_bus_error *error = sd_bus_message_get_error(reply);
+
+                log_debug("sysview: ListSeats on logind failed: %s: %s",
+                          error->name, error->message);
+                return -sd_bus_error_get_errno(error);
+        }
+
+        r = sd_bus_message_enter_container(reply, 'a', "(so)");
+        if (r < 0)
+                goto error;
+
+        while ((r = sd_bus_message_enter_container(reply, 'r', "so")) > 0) {
+                const char *id, *path;
+
+                r = sd_bus_message_read(reply, "so", &id, &path);
+                if (r < 0)
+                        goto error;
+
+                context_add_seat(c, id);
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        goto error;
+        }
+
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_message_exit_container(reply);
+        if (r < 0)
+                return r;
+
+        return 0;
+
+error:
+        log_debug("sysview: erroneous ListSeats response from logind: %s",
+                  strerror(-r));
+        return r;
+}
+
+static int context_ld_list_sessions_fn(sd_bus *bus,
+                                       sd_bus_message *reply,
+                                       void *userdata,
+                                       sd_bus_error *ret_error) {
+        sysview_context *c = userdata;
+        int r;
+
+        c->ld_slot_list_sessions = sd_bus_slot_unref(c->ld_slot_list_sessions);
+
+        if (sd_bus_message_is_method_error(reply, NULL)) {
+                const sd_bus_error *error = sd_bus_message_get_error(reply);
+
+                log_debug("sysview: ListSessions on logind failed: %s: %s",
+                          error->name, error->message);
+                return -sd_bus_error_get_errno(error);
+        }
+
+        r = sd_bus_message_enter_container(reply, 'a', "(susso)");
+        if (r < 0)
+                goto error;
+
+        while ((r = sd_bus_message_enter_container(reply, 'r', "susso")) > 0) {
+                const char *id, *username, *seatid, *path;
+                sysview_seat *seat;
+                unsigned int uid;
+
+                r = sd_bus_message_read(reply,
+                                        "susso",
+                                        &id,
+                                        &uid,
+                                        &username,
+                                        &seatid,
+                                        &path);
+                if (r < 0)
+                        goto error;
+
+                seat = sysview_find_seat(c, seatid);
+                if (seat) {
+                        r = context_raise_session_filter(c, id, seatid, username, uid);
+                        if (r < 0)
+                                log_debug("sysview: callback failed while filtering session '%s': %s",
+                                          id, strerror(-r));
+                        else if (r > 0)
+                                context_add_session(c, seat, id);
+                }
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        goto error;
+        }
+
+        if (r < 0)
+                goto error;
+
+        r = sd_bus_message_exit_container(reply);
+        if (r < 0)
+                return r;
+
+        return 0;
+
+error:
+        log_debug("sysview: erroneous ListSessions response from logind: %s",
+                  strerror(-r));
+        return r;
+}
+
+static int context_ld_scan(sysview_context *c) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        int r;
+
+        if (!c->ld_slot_manager_signal)
+                return 0;
+
+        /* request seat list */
+
+        r = sd_bus_message_new_method_call(c->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           "/org/freedesktop/login1",
+                                           "org.freedesktop.login1.Manager",
+                                           "ListSeats");
+        if (r < 0)
+                return r;
+
+        r = sd_bus_call_async(c->sysbus,
+                              &c->ld_slot_list_seats,
+                              m,
+                              context_ld_list_seats_fn,
+                              c,
+                              0);
+        if (r < 0)
+                return r;
+
+        /* request session list */
+
+        m = sd_bus_message_unref(m);
+        r = sd_bus_message_new_method_call(c->sysbus,
+                                           &m,
+                                           "org.freedesktop.login1",
+                                           "/org/freedesktop/login1",
+                                           "org.freedesktop.login1.Manager",
+                                           "ListSessions");
+        if (r < 0)
+                return r;
+
+        r = sd_bus_call_async(c->sysbus,
+                              &c->ld_slot_list_sessions,
+                              m,
+                              context_ld_list_sessions_fn,
+                              c,
+                              0);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+bool sysview_context_is_running(sysview_context *c) {
+        return c && c->running;
+}
+
+int sysview_context_start(sysview_context *c, sysview_event_fn event_fn, void *userdata) {
+        int r;
+
+        assert_return(c, -EINVAL);
+        assert_return(event_fn, -EINVAL);
+
+        if (c->running)
+                return -EALREADY;
+
+        log_debug("sysview: start");
+
+        c->running = true;
+        c->event_fn = event_fn;
+        c->userdata = userdata;
+
+        r = context_ld_start(c);
+        if (r < 0)
+                goto error;
+
+        r = context_ud_start(c);
+        if (r < 0)
+                goto error;
+
+        r = sysview_context_rescan(c);
+        if (r < 0)
+                goto error;
+
+        return 0;
+
+error:
+        sysview_context_stop(c);
+        return r;
+}
+
+void sysview_context_stop(sysview_context *c) {
+        sysview_session *session;
+        sysview_device *device;
+        sysview_seat *seat;
+
+        assert(c);
+
+        if (!c->running)
+                return;
+
+        log_debug("sysview: stop");
+
+        while ((device = hashmap_first(c->device_map)))
+                context_remove_device(c, device);
+
+        while ((session = hashmap_first(c->session_map)))
+                context_remove_session(c, session);
+
+        while ((seat = hashmap_first(c->seat_map)))
+                context_remove_seat(c, seat);
+
+        c->running = false;
+        c->scanned = false;
+        c->event_fn = NULL;
+        c->userdata = NULL;
+        c->scan_src = sd_event_source_unref(c->scan_src);
+        context_ud_stop(c);
+        context_ld_stop(c);
+}
+
+static int context_scan_fn(sd_event_source *s, void *userdata) {
+        sysview_context *c = userdata;
+        sysview_seat *seat;
+        Iterator i;
+        int r;
+
+        if (!c->scanned) {
+                r = context_ld_scan(c);
+                if (r < 0) {
+                        log_debug("sysview: logind scan failed: %s", strerror(-r));
+                        return r;
+                }
+        }
+
+        /* skip device scans if no sessions are available */
+        if (hashmap_size(c->session_map) > 0) {
+                r = context_ud_scan(c);
+                if (r < 0) {
+                        log_debug("sysview: udev scan failed: %s", strerror(-r));
+                        return r;
+                }
+
+                HASHMAP_FOREACH(seat, c->seat_map, i)
+                        seat->scanned = true;
+        }
+
+        c->scanned = true;
+
+        return 0;
+}
+
+int sysview_context_rescan(sysview_context *c) {
+        assert(c);
+
+        if (!c->running)
+                return 0;
+
+        if (c->scan_src)
+                return sd_event_source_set_enabled(c->scan_src, SD_EVENT_ONESHOT);
+        else
+                return sd_event_add_defer(c->event, &c->scan_src, context_scan_fn, c);
+}
diff --git a/src/libsystemd-terminal/sysview.h b/src/libsystemd-terminal/sysview.h
new file mode 100644 (file)
index 0000000..cad603d
--- /dev/null
@@ -0,0 +1,164 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * System View
+ * The sysview interface scans and monitors the system for seats, sessions and
+ * devices. It basically mirrors the state of logind on the application side.
+ * It's meant as base for session services that require managed device access.
+ * The logind controller API is employed to allow unprivileged access to all
+ * devices of a user.
+ * Furthermore, the sysview interface can be used for system services that run
+ * in situations where logind is not available, but session-like services are
+ * needed. For instance, the initrd does not run logind but might require
+ * graphics access. It cannot run session services, though. The sysview
+ * interface pretends that a session is available and provides the same
+ * interface as to normal session services.
+ */
+
+#pragma once
+
+#include <inttypes.h>
+#include <libudev.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include "util.h"
+
+typedef struct sysview_event            sysview_event;
+typedef struct sysview_device           sysview_device;
+typedef struct sysview_session          sysview_session;
+typedef struct sysview_seat             sysview_seat;
+typedef struct sysview_context          sysview_context;
+
+/*
+ * Events
+ */
+
+enum {
+        SYSVIEW_EVENT_SEAT_ADD,
+        SYSVIEW_EVENT_SEAT_REMOVE,
+
+        SYSVIEW_EVENT_SESSION_FILTER,
+        SYSVIEW_EVENT_SESSION_ADD,
+        SYSVIEW_EVENT_SESSION_REMOVE,
+        SYSVIEW_EVENT_SESSION_ATTACH,
+        SYSVIEW_EVENT_SESSION_DETACH,
+        SYSVIEW_EVENT_SESSION_REFRESH,
+        SYSVIEW_EVENT_SESSION_CONTROL,
+};
+
+struct sysview_event {
+        unsigned int type;
+
+        union {
+                struct {
+                        sysview_seat *seat;
+                } seat_add, seat_remove;
+
+                struct {
+                        const char *id;
+                        const char *seatid;
+                        const char *username;
+                        unsigned int uid;
+                } session_filter;
+
+                struct {
+                        sysview_session *session;
+                } session_add, session_remove;
+
+                struct {
+                        sysview_session *session;
+                        sysview_device *device;
+                } session_attach, session_detach;
+
+                struct {
+                        sysview_session *session;
+                        sysview_device *device;
+                        struct udev_device *ud;
+                } session_refresh;
+
+                struct {
+                        sysview_session *session;
+                        int error;
+                } session_control;
+        };
+};
+
+typedef int (*sysview_event_fn) (sysview_context *c, void *userdata, sysview_event *e);
+
+/*
+ * Devices
+ */
+
+enum {
+        SYSVIEW_DEVICE_EVDEV,
+        SYSVIEW_DEVICE_DRM,
+        SYSVIEW_DEVICE_CNT
+};
+
+const char *sysview_device_get_name(sysview_device *device);
+unsigned int sysview_device_get_type(sysview_device *device);
+struct udev_device *sysview_device_get_ud(sysview_device *device);
+
+/*
+ * Sessions
+ */
+
+void sysview_session_set_userdata(sysview_session *session, void *userdata);
+void *sysview_session_get_userdata(sysview_session *session);
+
+const char *sysview_session_get_name(sysview_session *session);
+sysview_seat *sysview_session_get_seat(sysview_session *session);
+
+int sysview_session_take_control(sysview_session *session);
+void sysview_session_release_control(sysview_session *session);
+
+/*
+ * Seats
+ */
+
+const char *sysview_seat_get_name(sysview_seat *seat);
+int sysview_seat_switch_to(sysview_seat *seat, uint32_t nr);
+
+/*
+ * Contexts
+ */
+
+enum {
+        SYSVIEW_CONTEXT_SCAN_LOGIND             = (1 << 0),
+        SYSVIEW_CONTEXT_SCAN_EVDEV              = (1 << 1),
+        SYSVIEW_CONTEXT_SCAN_DRM                = (1 << 2),
+};
+
+int sysview_context_new(sysview_context **out,
+                        unsigned int flags,
+                        sd_event *event,
+                        sd_bus *sysbus,
+                        struct udev *ud);
+sysview_context *sysview_context_free(sysview_context *c);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(sysview_context*, sysview_context_free);
+
+bool sysview_context_is_running(sysview_context *c);
+int sysview_context_start(sysview_context *c, sysview_event_fn event_fn, void *userdata);
+void sysview_context_stop(sysview_context *c);
diff --git a/src/libsystemd-terminal/term-charset.c b/src/libsystemd-terminal/term-charset.c
new file mode 100644 (file)
index 0000000..a00a191
--- /dev/null
@@ -0,0 +1,491 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * VTE Character Sets
+ * These are predefined charactersets that can be loaded into GL and GR. By
+ * default we use unicode_lower and unicode_upper, that is, both sets have the
+ * exact unicode mapping. unicode_lower is effectively ASCII and unicode_upper
+ * as defined by the unicode standard (I guess, ISO 8859-1).
+ * Several other character sets are defined here. However, all of them are
+ * limited to the 96 character space of GL or GR. Everything beyond GR (which
+ * was not supported by the classic VTs by DEC but is available in VT emulators
+ * that support unicode/UTF8) is always mapped to unicode and cannot be changed
+ * by these character sets. Even mapping GL and GR is only available for
+ * backwards compatibility as new applications can use the Unicode functionality
+ * of the VTE.
+ *
+ * Moreover, mapping GR is almost unnecessary to support. In fact, Unicode UTF-8
+ * support in VTE works by reading every incoming data as UTF-8 stream. This
+ * maps GL/ASCII to ASCII, as UTF-8 is backwards compatible to ASCII, however,
+ * everything that has the 8th bit set is a >=2-byte haracter in UTF-8. That is,
+ * this is in no way backwards compatible to >=VT220 8bit support. Therefore, if
+ * someone maps a character set into GR and wants to use them with this VTE,
+ * then they must already send UTF-8 characters to use GR (all GR characters are
+ * 8-bits). Hence, they can easily also send the correct UTF-8 character for the
+ * unicode mapping.
+ * The only advantage is that most characters in many sets are 3-byte UTF-8
+ * characters and by mapping the set into GR/GL you can use 2 or 1 byte UTF-8
+ * characters which saves bandwidth.
+ * Another reason is, if you have older applications that use the VT220 8-bit
+ * support and you put a ASCII/8bit-extension to UTF-8 converter in between, you
+ * need these mappings to have the application behave correctly if it uses GL/GR
+ * mappings extensively.
+ *
+ * Anyway, we support GL/GR mappings so here are the most commonly used maps as
+ * defined by Unicode-standard, DEC-private maps and other famous charmaps.
+ *
+ * Characters 1-32 are always the control characters (part of CL) and cannot be
+ * mapped. Characters 34-127 (94 characters) are part of GL and can be mapped.
+ * Characters 33 and 128 are not part of GL and always mapped by the VTE.
+ * However, for GR they can be mapped differently (96 chars) so we have to
+ * include them. The mapper has to take care not to use them in GL.
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include "term-internal.h"
+
+/*
+ * Lower Unicode character set. This maps the characters to the basic ASCII
+ * characters 33-126. These are all graphics characters defined in ASCII.
+ */
+term_charset term_unicode_lower = {
+        [0] = 32,
+        [1] = 33,
+        [2] = 34,
+        [3] = 35,
+        [4] = 36,
+        [5] = 37,
+        [6] = 38,
+        [7] = 39,
+        [8] = 40,
+        [9] = 41,
+        [10] = 42,
+        [11] = 43,
+        [12] = 44,
+        [13] = 45,
+        [14] = 46,
+        [15] = 47,
+        [16] = 48,
+        [17] = 49,
+        [18] = 50,
+        [19] = 51,
+        [20] = 52,
+        [21] = 53,
+        [22] = 54,
+        [23] = 55,
+        [24] = 56,
+        [25] = 57,
+        [26] = 58,
+        [27] = 59,
+        [28] = 60,
+        [29] = 61,
+        [30] = 62,
+        [31] = 63,
+        [32] = 64,
+        [33] = 65,
+        [34] = 66,
+        [35] = 67,
+        [36] = 68,
+        [37] = 69,
+        [38] = 70,
+        [39] = 71,
+        [40] = 72,
+        [41] = 73,
+        [42] = 74,
+        [43] = 75,
+        [44] = 76,
+        [45] = 77,
+        [46] = 78,
+        [47] = 79,
+        [48] = 80,
+        [49] = 81,
+        [50] = 82,
+        [51] = 83,
+        [52] = 84,
+        [53] = 85,
+        [54] = 86,
+        [55] = 87,
+        [56] = 88,
+        [57] = 89,
+        [58] = 90,
+        [59] = 91,
+        [60] = 92,
+        [61] = 93,
+        [62] = 94,
+        [63] = 95,
+        [64] = 96,
+        [65] = 97,
+        [66] = 98,
+        [67] = 99,
+        [68] = 100,
+        [69] = 101,
+        [70] = 102,
+        [71] = 103,
+        [72] = 104,
+        [73] = 105,
+        [74] = 106,
+        [75] = 107,
+        [76] = 108,
+        [77] = 109,
+        [78] = 110,
+        [79] = 111,
+        [80] = 112,
+        [81] = 113,
+        [82] = 114,
+        [83] = 115,
+        [84] = 116,
+        [85] = 117,
+        [86] = 118,
+        [87] = 119,
+        [88] = 120,
+        [89] = 121,
+        [90] = 122,
+        [91] = 123,
+        [92] = 124,
+        [93] = 125,
+        [94] = 126,
+        [95] = 127,
+};
+
+/*
+ * Upper Unicode Table
+ * This maps all characters to the upper unicode characters 161-254. These are
+ * not compatible to any older 8 bit character sets. See the Unicode standard
+ * for the definitions of each symbol.
+ */
+term_charset term_unicode_upper = {
+        [0] = 160,
+        [1] = 161,
+        [2] = 162,
+        [3] = 163,
+        [4] = 164,
+        [5] = 165,
+        [6] = 166,
+        [7] = 167,
+        [8] = 168,
+        [9] = 169,
+        [10] = 170,
+        [11] = 171,
+        [12] = 172,
+        [13] = 173,
+        [14] = 174,
+        [15] = 175,
+        [16] = 176,
+        [17] = 177,
+        [18] = 178,
+        [19] = 179,
+        [20] = 180,
+        [21] = 181,
+        [22] = 182,
+        [23] = 183,
+        [24] = 184,
+        [25] = 185,
+        [26] = 186,
+        [27] = 187,
+        [28] = 188,
+        [29] = 189,
+        [30] = 190,
+        [31] = 191,
+        [32] = 192,
+        [33] = 193,
+        [34] = 194,
+        [35] = 195,
+        [36] = 196,
+        [37] = 197,
+        [38] = 198,
+        [39] = 199,
+        [40] = 200,
+        [41] = 201,
+        [42] = 202,
+        [43] = 203,
+        [44] = 204,
+        [45] = 205,
+        [46] = 206,
+        [47] = 207,
+        [48] = 208,
+        [49] = 209,
+        [50] = 210,
+        [51] = 211,
+        [52] = 212,
+        [53] = 213,
+        [54] = 214,
+        [55] = 215,
+        [56] = 216,
+        [57] = 217,
+        [58] = 218,
+        [59] = 219,
+        [60] = 220,
+        [61] = 221,
+        [62] = 222,
+        [63] = 223,
+        [64] = 224,
+        [65] = 225,
+        [66] = 226,
+        [67] = 227,
+        [68] = 228,
+        [69] = 229,
+        [70] = 230,
+        [71] = 231,
+        [72] = 232,
+        [73] = 233,
+        [74] = 234,
+        [75] = 235,
+        [76] = 236,
+        [77] = 237,
+        [78] = 238,
+        [79] = 239,
+        [80] = 240,
+        [81] = 241,
+        [82] = 242,
+        [83] = 243,
+        [84] = 244,
+        [85] = 245,
+        [86] = 246,
+        [87] = 247,
+        [88] = 248,
+        [89] = 249,
+        [90] = 250,
+        [91] = 251,
+        [92] = 252,
+        [93] = 253,
+        [94] = 254,
+        [95] = 255,
+};
+
+/*
+ * The DEC supplemental graphics set. For its definition see here:
+ *  http://vt100.net/docs/vt220-rm/table2-3b.html
+ * Its basically a mixture of common European symbols that are not part of
+ * ASCII. Most often, this is mapped into GR to extend the basci ASCII part.
+ *
+ * This is very similar to unicode_upper, however, few symbols differ so do not
+ * mix them up!
+ */
+term_charset term_dec_supplemental_graphics = {
+        [0] = -1,       /* undefined */
+        [1] = 161,
+        [2] = 162,
+        [3] = 163,
+        [4] = 0,
+        [5] = 165,
+        [6] = 0,
+        [7] = 167,
+        [8] = 164,
+        [9] = 169,
+        [10] = 170,
+        [11] = 171,
+        [12] = 0,
+        [13] = 0,
+        [14] = 0,
+        [15] = 0,
+        [16] = 176,
+        [17] = 177,
+        [18] = 178,
+        [19] = 179,
+        [20] = 0,
+        [21] = 181,
+        [22] = 182,
+        [23] = 183,
+        [24] = 0,
+        [25] = 185,
+        [26] = 186,
+        [27] = 187,
+        [28] = 188,
+        [29] = 189,
+        [30] = 0,
+        [31] = 191,
+        [32] = 192,
+        [33] = 193,
+        [34] = 194,
+        [35] = 195,
+        [36] = 196,
+        [37] = 197,
+        [38] = 198,
+        [39] = 199,
+        [40] = 200,
+        [41] = 201,
+        [42] = 202,
+        [43] = 203,
+        [44] = 204,
+        [45] = 205,
+        [46] = 206,
+        [47] = 207,
+        [48] = 0,
+        [49] = 209,
+        [50] = 210,
+        [51] = 211,
+        [52] = 212,
+        [53] = 213,
+        [54] = 214,
+        [55] = 338,
+        [56] = 216,
+        [57] = 217,
+        [58] = 218,
+        [59] = 219,
+        [60] = 220,
+        [61] = 376,
+        [62] = 0,
+        [63] = 223,
+        [64] = 224,
+        [65] = 225,
+        [66] = 226,
+        [67] = 227,
+        [68] = 228,
+        [69] = 229,
+        [70] = 230,
+        [71] = 231,
+        [72] = 232,
+        [73] = 233,
+        [74] = 234,
+        [75] = 235,
+        [76] = 236,
+        [77] = 237,
+        [78] = 238,
+        [79] = 239,
+        [80] = 0,
+        [81] = 241,
+        [82] = 242,
+        [83] = 243,
+        [84] = 244,
+        [85] = 245,
+        [86] = 246,
+        [87] = 339,
+        [88] = 248,
+        [89] = 249,
+        [90] = 250,
+        [91] = 251,
+        [92] = 252,
+        [93] = 255,
+        [94] = 0,
+        [95] = -1,       /* undefined */
+};
+
+/*
+ * DEC special graphics character set. See here for its definition:
+ *  http://vt100.net/docs/vt220-rm/table2-4.html
+ * This contains several characters to create ASCII drawings and similar. Its
+ * commonly mapped into GR to extend the basic ASCII characters.
+ *
+ * Lower 62 characters map to ASCII 33-64, everything beyond is special and
+ * commonly used for ASCII drawings. It depends on the Unicode Standard 3.2 for
+ * the extended horizontal scan-line characters 3, 5, 7, and 9.
+ */
+term_charset term_dec_special_graphics = {
+        [0] = -1,       /* undefined */
+        [1] = 33,
+        [2] = 34,
+        [3] = 35,
+        [4] = 36,
+        [5] = 37,
+        [6] = 38,
+        [7] = 39,
+        [8] = 40,
+        [9] = 41,
+        [10] = 42,
+        [11] = 43,
+        [12] = 44,
+        [13] = 45,
+        [14] = 46,
+        [15] = 47,
+        [16] = 48,
+        [17] = 49,
+        [18] = 50,
+        [19] = 51,
+        [20] = 52,
+        [21] = 53,
+        [22] = 54,
+        [23] = 55,
+        [24] = 56,
+        [25] = 57,
+        [26] = 58,
+        [27] = 59,
+        [28] = 60,
+        [29] = 61,
+        [30] = 62,
+        [31] = 63,
+        [32] = 64,
+        [33] = 65,
+        [34] = 66,
+        [35] = 67,
+        [36] = 68,
+        [37] = 69,
+        [38] = 70,
+        [39] = 71,
+        [40] = 72,
+        [41] = 73,
+        [42] = 74,
+        [43] = 75,
+        [44] = 76,
+        [45] = 77,
+        [46] = 78,
+        [47] = 79,
+        [48] = 80,
+        [49] = 81,
+        [50] = 82,
+        [51] = 83,
+        [52] = 84,
+        [53] = 85,
+        [54] = 86,
+        [55] = 87,
+        [56] = 88,
+        [57] = 89,
+        [58] = 90,
+        [59] = 91,
+        [60] = 92,
+        [61] = 93,
+        [62] = 94,
+        [63] = 0,
+        [64] = 9830,
+        [65] = 9618,
+        [66] = 9225,
+        [67] = 9228,
+        [68] = 9229,
+        [69] = 9226,
+        [70] = 176,
+        [71] = 177,
+        [72] = 9252,
+        [73] = 9227,
+        [74] = 9496,
+        [75] = 9488,
+        [76] = 9484,
+        [77] = 9492,
+        [78] = 9532,
+        [79] = 9146,
+        [80] = 9147,
+        [81] = 9472,
+        [82] = 9148,
+        [83] = 9149,
+        [84] = 9500,
+        [85] = 9508,
+        [86] = 9524,
+        [87] = 9516,
+        [88] = 9474,
+        [89] = 8804,
+        [90] = 8805,
+        [91] = 960,
+        [92] = 8800,
+        [93] = 163,
+        [94] = 8901,
+        [95] = -1,      /* undefined */
+};
diff --git a/src/libsystemd-terminal/term-internal.h b/src/libsystemd-terminal/term-internal.h
new file mode 100644 (file)
index 0000000..53713dd
--- /dev/null
@@ -0,0 +1,650 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#pragma once
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "term.h"
+#include "util.h"
+
+typedef struct term_char term_char_t;
+typedef struct term_charbuf term_charbuf_t;
+
+typedef struct term_cell term_cell;
+typedef struct term_line term_line;
+
+typedef struct term_page term_page;
+typedef struct term_history term_history;
+
+typedef uint32_t term_charset[96];
+typedef struct term_state term_state;
+
+/*
+ * Miscellaneous
+ * Sundry things and external helpers.
+ */
+
+int mk_wcwidth(wchar_t ucs4);
+int mk_wcwidth_cjk(wchar_t ucs4);
+int mk_wcswidth(const wchar_t *str, size_t len);
+int mk_wcswidth_cjk(const wchar_t *str, size_t len);
+
+/*
+ * Characters
+ * Each cell in a terminal page contains only a single character. This is
+ * usually a single UCS-4 value. However, Unicode allows combining-characters,
+ * therefore, the number of UCS-4 characters per cell must be unlimited. The
+ * term_char_t object wraps the internal combining char API so it can be
+ * treated as a single object.
+ */
+
+struct term_char {
+        /* never access this value directly */
+        uint64_t _value;
+};
+
+struct term_charbuf {
+        /* 3 bytes + zero-terminator */
+        uint32_t buf[4];
+};
+
+#define TERM_CHAR_INIT(_val) ((term_char_t){ ._value = (_val) })
+#define TERM_CHAR_NULL TERM_CHAR_INIT(0)
+
+term_char_t term_char_set(term_char_t previous, uint32_t append_ucs4);
+term_char_t term_char_merge(term_char_t base, uint32_t append_ucs4);
+term_char_t term_char_dup(term_char_t ch);
+term_char_t term_char_dup_append(term_char_t base, uint32_t append_ucs4);
+
+const uint32_t *term_char_resolve(term_char_t ch, size_t *s, term_charbuf_t *b);
+unsigned int term_char_lookup_width(term_char_t ch);
+
+/* true if @ch is TERM_CHAR_NULL, otherwise false */
+static inline bool term_char_is_null(term_char_t ch) {
+        return ch._value == 0;
+}
+
+/* true if @ch is dynamically allocated and needs to be freed */
+static inline bool term_char_is_allocated(term_char_t ch) {
+        return !term_char_is_null(ch) && !(ch._value & 0x1);
+}
+
+/* true if (a == b), otherwise false; this is (a == b), NOT (*a == *b) */
+static inline bool term_char_same(term_char_t a, term_char_t b) {
+        return a._value == b._value;
+}
+
+/* true if (*a == *b), otherwise false; this is implied by (a == b) */
+static inline bool term_char_equal(term_char_t a, term_char_t b) {
+        const uint32_t *sa, *sb;
+        term_charbuf_t ca, cb;
+        size_t na, nb;
+
+        sa = term_char_resolve(a, &na, &ca);
+        sb = term_char_resolve(b, &nb, &cb);
+        return na == nb && !memcmp(sa, sb, sizeof(*sa) * na);
+}
+
+/* free @ch in case it is dynamically allocated */
+static inline term_char_t term_char_free(term_char_t ch) {
+        if (term_char_is_allocated(ch))
+                term_char_set(ch, 0);
+
+        return TERM_CHAR_NULL;
+}
+
+/* gcc _cleanup_ helpers */
+#define _term_char_free_ _cleanup_(term_char_freep)
+static inline void term_char_freep(term_char_t *p) {
+        term_char_free(*p);
+}
+
+/*
+ * Cells
+ * The term_cell structure respresents a single cell in a terminal page. It
+ * contains the stored character, the age of the cell and all its attributes.
+ */
+
+struct term_cell {
+        term_char_t ch;         /* stored char or TERM_CHAR_NULL */
+        term_age_t age;         /* cell age or TERM_AGE_NULL */
+        term_attr attr;         /* cell attributes */
+        unsigned int cwidth;    /* cached term_char_lookup_width(cell->ch) */
+};
+
+/*
+ * Lines
+ * Instead of storing cells in a 2D array, we store them in an array of
+ * dynamically allocated lines. This way, scrolling can be implemented very
+ * fast without moving any cells at all. Similarly, the scrollback-buffer is
+ * much simpler to implement.
+ * We use term_line to store a single line. It contains an array of cells, a
+ * fill-state which remembers the amount of blanks on the right side, a
+ * separate age just for the line which can overwrite the age for all cells,
+ * and some management data.
+ */
+
+struct term_line {
+        term_line *lines_next;          /* linked-list for histories */
+        term_line *lines_prev;          /* linked-list for histories */
+
+        unsigned int width;             /* visible width of line */
+        unsigned int n_cells;           /* # of allocated cells */
+        term_cell *cells;               /* cell-array */
+
+        term_age_t age;                 /* line age */
+        unsigned int fill;              /* # of valid cells; starting left */
+};
+
+int term_line_new(term_line **out);
+term_line *term_line_free(term_line *line);
+
+#define _term_line_free_ _cleanup_(term_line_freep)
+DEFINE_TRIVIAL_CLEANUP_FUNC(term_line*, term_line_free);
+
+int term_line_reserve(term_line *line, unsigned int width, const term_attr *attr, term_age_t age, unsigned int protect_width);
+void term_line_set_width(term_line *line, unsigned int width);
+void term_line_write(term_line *line, unsigned int pos_x, term_char_t ch, unsigned int cwidth, const term_attr *attr, term_age_t age, bool insert_mode);
+void term_line_insert(term_line *line, unsigned int from, unsigned int num, const term_attr *attr, term_age_t age);
+void term_line_delete(term_line *line, unsigned int from, unsigned int num, const term_attr *attr, term_age_t age);
+void term_line_append_combchar(term_line *line, unsigned int pos_x, uint32_t ucs4, term_age_t age);
+void term_line_erase(term_line *line, unsigned int from, unsigned int num, const term_attr *attr, term_age_t age, bool keep_protected);
+void term_line_reset(term_line *line, const term_attr *attr, term_age_t age);
+
+void term_line_link(term_line *line, term_line **first, term_line **last);
+void term_line_link_tail(term_line *line, term_line **first, term_line **last);
+void term_line_unlink(term_line *line, term_line **first, term_line **last);
+
+#define TERM_LINE_LINK(_line, _head) term_line_link((_line), &(_head)->lines_first, &(_head)->lines_last)
+#define TERM_LINE_LINK_TAIL(_line, _head) term_line_link_tail((_line), &(_head)->lines_first, &(_head)->lines_last)
+#define TERM_LINE_UNLINK(_line, _head) term_line_unlink((_line), &(_head)->lines_first, &(_head)->lines_last)
+
+/*
+ * Pages
+ * A page represents the 2D table containing all cells of a terminal. It stores
+ * lines as an array of pointers so scrolling becomes a simple line-shuffle
+ * operation.
+ * Scrolling is always targeted only at the scroll-region defined via scroll_idx
+ * and scroll_num. The fill-state keeps track of the number of touched lines in
+ * the scroll-region. @width and @height describe the visible region of the page
+ * and are guaranteed to be allocated at all times.
+ */
+
+struct term_page {
+        term_age_t age;                 /* page age */
+
+        term_line **lines;              /* array of line-pointers */
+        term_line **line_cache;         /* cache for temporary operations */
+        unsigned int n_lines;           /* # of allocated lines */
+
+        unsigned int width;             /* width of visible area */
+        unsigned int height;            /* height of visible area */
+        unsigned int scroll_idx;        /* scrolling-region start index */
+        unsigned int scroll_num;        /* scrolling-region length in lines */
+        unsigned int scroll_fill;       /* # of valid scroll-lines */
+};
+
+int term_page_new(term_page **out);
+term_page *term_page_free(term_page *page);
+
+#define _term_page_free_ _cleanup_(term_page_freep)
+DEFINE_TRIVIAL_CLEANUP_FUNC(term_page*, term_page_free);
+
+term_cell *term_page_get_cell(term_page *page, unsigned int x, unsigned int y);
+
+int term_page_reserve(term_page *page, unsigned int cols, unsigned int rows, const term_attr *attr, term_age_t age);
+void term_page_resize(term_page *page, unsigned int cols, unsigned int rows, const term_attr *attr, term_age_t age, term_history *history);
+void term_page_write(term_page *page, unsigned int pos_x, unsigned int pos_y, term_char_t ch, unsigned int cwidth, const term_attr *attr, term_age_t age, bool insert_mode);
+void term_page_insert_cells(term_page *page, unsigned int from_x, unsigned int from_y, unsigned int num, const term_attr *attr, term_age_t age);
+void term_page_delete_cells(term_page *page, unsigned int from_x, unsigned int from_y, unsigned int num, const term_attr *attr, term_age_t age);
+void term_page_append_combchar(term_page *page, unsigned int pos_x, unsigned int pos_y, uint32_t ucs4, term_age_t age);
+void term_page_erase(term_page *page, unsigned int from_x, unsigned int from_y, unsigned int to_x, unsigned int to_y, const term_attr *attr, term_age_t age, bool keep_protected);
+void term_page_reset(term_page *page, const term_attr *attr, term_age_t age);
+
+void term_page_set_scroll_region(term_page *page, unsigned int idx, unsigned int num);
+void term_page_scroll_up(term_page *page, unsigned int num, const term_attr *attr, term_age_t age, term_history *history);
+void term_page_scroll_down(term_page *page, unsigned int num, const term_attr *attr, term_age_t age, term_history *history);
+void term_page_insert_lines(term_page *page, unsigned int pos_y, unsigned int num, const term_attr *attr, term_age_t age);
+void term_page_delete_lines(term_page *page, unsigned int pos_y, unsigned int num, const term_attr *attr, term_age_t age);
+
+/*
+ * Histories
+ * Scroll-back buffers use term_history objects to store scroll-back lines. A
+ * page is independent of the history used. All page operations that modify a
+ * history take it as separate argument. You're free to pass NULL at all times
+ * if no history should be used.
+ * Lines are stored in a linked list as no complex operations are ever done on
+ * history lines, besides pushing/poping. Note that history lines do not have a
+ * guaranteed minimum length. Any kind of line might be stored there. Missing
+ * cells should be cleared to the background color.
+ */
+
+struct term_history {
+        term_line *lines_first;
+        term_line *lines_last;
+        unsigned int n_lines;
+        unsigned int max_lines;
+};
+
+int term_history_new(term_history **out);
+term_history *term_history_free(term_history *history);
+
+#define _term_history_free_ _cleanup_(term_history_freep)
+DEFINE_TRIVIAL_CLEANUP_FUNC(term_history*, term_history_free);
+
+void term_history_clear(term_history *history);
+void term_history_trim(term_history *history, unsigned int max);
+void term_history_push(term_history *history, term_line *line);
+term_line *term_history_pop(term_history *history, unsigned int reserve_width, const term_attr *attr, term_age_t age);
+unsigned int term_history_peek(term_history *history, unsigned int max, unsigned int reserve_width, const term_attr *attr, term_age_t age);
+
+/*
+ * Parsers
+ * The term_parser object parses control-sequences for both host and terminal
+ * side. Based on this parser, there is a set of command-parsers that take a
+ * term_seq sequence and returns the command it represents. This is different
+ * for host and terminal side so a different set of parsers is provided.
+ */
+
+enum {
+        TERM_SEQ_NONE,                  /* placeholder, no sequence parsed */
+
+        TERM_SEQ_IGNORE,                /* no-op character */
+        TERM_SEQ_GRAPHIC,               /* graphic character */
+        TERM_SEQ_CONTROL,               /* control character */
+        TERM_SEQ_ESCAPE,                /* escape sequence */
+        TERM_SEQ_CSI,                   /* control sequence function */
+        TERM_SEQ_DCS,                   /* device control string */
+        TERM_SEQ_OSC,                   /* operating system control */
+
+        TERM_SEQ_CNT
+};
+
+enum {
+        /* these must be kept compatible to (1U << (ch - 0x20)) */
+
+        TERM_SEQ_FLAG_SPACE             = (1U <<  0),   /* char:   */
+        TERM_SEQ_FLAG_BANG              = (1U <<  1),   /* char: ! */
+        TERM_SEQ_FLAG_DQUOTE            = (1U <<  2),   /* char: " */
+        TERM_SEQ_FLAG_HASH              = (1U <<  3),   /* char: # */
+        TERM_SEQ_FLAG_CASH              = (1U <<  4),   /* char: $ */
+        TERM_SEQ_FLAG_PERCENT           = (1U <<  5),   /* char: % */
+        TERM_SEQ_FLAG_AND               = (1U <<  6),   /* char: & */
+        TERM_SEQ_FLAG_SQUOTE            = (1U <<  7),   /* char: ' */
+        TERM_SEQ_FLAG_POPEN             = (1U <<  8),   /* char: ( */
+        TERM_SEQ_FLAG_PCLOSE            = (1U <<  9),   /* char: ) */
+        TERM_SEQ_FLAG_MULT              = (1U << 10),   /* char: * */
+        TERM_SEQ_FLAG_PLUS              = (1U << 11),   /* char: + */
+        TERM_SEQ_FLAG_COMMA             = (1U << 12),   /* char: , */
+        TERM_SEQ_FLAG_MINUS             = (1U << 13),   /* char: - */
+        TERM_SEQ_FLAG_DOT               = (1U << 14),   /* char: . */
+        TERM_SEQ_FLAG_SLASH             = (1U << 15),   /* char: / */
+
+        /* 16-35 is reserved for numbers; unused */
+
+        /* COLON is reserved            = (1U << 26),      char: : */
+        /* SEMICOLON is reserved        = (1U << 27),      char: ; */
+        TERM_SEQ_FLAG_LT                = (1U << 28),   /* char: < */
+        TERM_SEQ_FLAG_EQUAL             = (1U << 29),   /* char: = */
+        TERM_SEQ_FLAG_GT                = (1U << 30),   /* char: > */
+        TERM_SEQ_FLAG_WHAT              = (1U << 31),   /* char: ? */
+};
+
+enum {
+        TERM_CMD_NONE,                          /* placeholder */
+        TERM_CMD_GRAPHIC,                       /* graphics character */
+
+        TERM_CMD_BEL,                           /* bell */
+        TERM_CMD_BS,                            /* backspace */
+        TERM_CMD_CBT,                           /* cursor-backward-tabulation */
+        TERM_CMD_CHA,                           /* cursor-horizontal-absolute */
+        TERM_CMD_CHT,                           /* cursor-horizontal-forward-tabulation */
+        TERM_CMD_CNL,                           /* cursor-next-line */
+        TERM_CMD_CPL,                           /* cursor-previous-line */
+        TERM_CMD_CR,                            /* carriage-return */
+        TERM_CMD_CUB,                           /* cursor-backward */
+        TERM_CMD_CUD,                           /* cursor-down */
+        TERM_CMD_CUF,                           /* cursor-forward */
+        TERM_CMD_CUP,                           /* cursor-position */
+        TERM_CMD_CUU,                           /* cursor-up */
+        TERM_CMD_DA1,                           /* primary-device-attributes */
+        TERM_CMD_DA2,                           /* secondary-device-attributes */
+        TERM_CMD_DA3,                           /* tertiary-device-attributes */
+        TERM_CMD_DC1,                           /* device-control-1 or XON */
+        TERM_CMD_DC3,                           /* device-control-3 or XOFF */
+        TERM_CMD_DCH,                           /* delete-character */
+        TERM_CMD_DECALN,                        /* screen-alignment-pattern */
+        TERM_CMD_DECANM,                        /* ansi-mode */
+        TERM_CMD_DECBI,                         /* back-index */
+        TERM_CMD_DECCARA,                       /* change-attributes-in-rectangular-area */
+        TERM_CMD_DECCRA,                        /* copy-rectangular-area */
+        TERM_CMD_DECDC,                         /* delete-column */
+        TERM_CMD_DECDHL_BH,                     /* double-width-double-height-line: bottom half */
+        TERM_CMD_DECDHL_TH,                     /* double-width-double-height-line: top half */
+        TERM_CMD_DECDWL,                        /* double-width-single-height-line */
+        TERM_CMD_DECEFR,                        /* enable-filter-rectangle */
+        TERM_CMD_DECELF,                        /* enable-local-functions */
+        TERM_CMD_DECELR,                        /* enable-locator-reporting */
+        TERM_CMD_DECERA,                        /* erase-rectangular-area */
+        TERM_CMD_DECFI,                         /* forward-index */
+        TERM_CMD_DECFRA,                        /* fill-rectangular-area */
+        TERM_CMD_DECIC,                         /* insert-column */
+        TERM_CMD_DECID,                         /* return-terminal-id */
+        TERM_CMD_DECINVM,                       /* invoke-macro */
+        TERM_CMD_DECKBD,                        /* keyboard-language-selection */
+        TERM_CMD_DECKPAM,                       /* keypad-application-mode */
+        TERM_CMD_DECKPNM,                       /* keypad-numeric-mode */
+        TERM_CMD_DECLFKC,                       /* local-function-key-control */
+        TERM_CMD_DECLL,                         /* load-leds */
+        TERM_CMD_DECLTOD,                       /* load-time-of-day */
+        TERM_CMD_DECPCTERM,                     /* pcterm-mode */
+        TERM_CMD_DECPKA,                        /* program-key-action */
+        TERM_CMD_DECPKFMR,                      /* program-key-free-memory-report */
+        TERM_CMD_DECRARA,                       /* reverse-attributes-in-rectangular-area */
+        TERM_CMD_DECRC,                         /* restore-cursor */
+        TERM_CMD_DECREQTPARM,                   /* request-terminal-parameters */
+        TERM_CMD_DECRPKT,                       /* report-key-type */
+        TERM_CMD_DECRQCRA,                      /* request-checksum-of-rectangular-area */
+        TERM_CMD_DECRQDE,                       /* request-display-extent */
+        TERM_CMD_DECRQKT,                       /* request-key-type */
+        TERM_CMD_DECRQLP,                       /* request-locator-position */
+        TERM_CMD_DECRQM_ANSI,                   /* request-mode-ansi */
+        TERM_CMD_DECRQM_DEC,                    /* request-mode-dec */
+        TERM_CMD_DECRQPKFM,                     /* request-program-key-free-memory */
+        TERM_CMD_DECRQPSR,                      /* request-presentation-state-report */
+        TERM_CMD_DECRQTSR,                      /* request-terminal-state-report */
+        TERM_CMD_DECRQUPSS,                     /* request-user-preferred-supplemental-set */
+        TERM_CMD_DECSACE,                       /* select-attribute-change-extent */
+        TERM_CMD_DECSASD,                       /* select-active-status-display */
+        TERM_CMD_DECSC,                         /* save-cursor */
+        TERM_CMD_DECSCA,                        /* select-character-protection-attribute */
+        TERM_CMD_DECSCL,                        /* select-conformance-level */
+        TERM_CMD_DECSCP,                        /* select-communication-port */
+        TERM_CMD_DECSCPP,                       /* select-columns-per-page */
+        TERM_CMD_DECSCS,                        /* select-communication-speed */
+        TERM_CMD_DECSCUSR,                      /* set-cursor-style */
+        TERM_CMD_DECSDDT,                       /* select-disconnect-delay-time */
+        TERM_CMD_DECSDPT,                       /* select-digital-printed-data-type */
+        TERM_CMD_DECSED,                        /* selective-erase-in-display */
+        TERM_CMD_DECSEL,                        /* selective-erase-in-line */
+        TERM_CMD_DECSERA,                       /* selective-erase-rectangular-area */
+        TERM_CMD_DECSFC,                        /* select-flow-control */
+        TERM_CMD_DECSKCV,                       /* set-key-click-volume */
+        TERM_CMD_DECSLCK,                       /* set-lock-key-style */
+        TERM_CMD_DECSLE,                        /* select-locator-events */
+        TERM_CMD_DECSLPP,                       /* set-lines-per-page */
+        TERM_CMD_DECSLRM_OR_SC,                 /* set-left-and-right-margins or save-cursor */
+        TERM_CMD_DECSMBV,                       /* set-margin-bell-volume */
+        TERM_CMD_DECSMKR,                       /* select-modifier-key-reporting */
+        TERM_CMD_DECSNLS,                       /* set-lines-per-screen */
+        TERM_CMD_DECSPP,                        /* set-port-parameter */
+        TERM_CMD_DECSPPCS,                      /* select-pro-printer-character-set */
+        TERM_CMD_DECSPRTT,                      /* select-printer-type */
+        TERM_CMD_DECSR,                         /* secure-reset */
+        TERM_CMD_DECSRFR,                       /* select-refresh-rate */
+        TERM_CMD_DECSSCLS,                      /* set-scroll-speed */
+        TERM_CMD_DECSSDT,                       /* select-status-display-line-type */
+        TERM_CMD_DECSSL,                        /* select-setup-language */
+        TERM_CMD_DECST8C,                       /* set-tab-at-every-8-columns */
+        TERM_CMD_DECSTBM,                       /* set-top-and-bottom-margins */
+        TERM_CMD_DECSTR,                        /* soft-terminal-reset */
+        TERM_CMD_DECSTRL,                       /* set-transmit-rate-limit */
+        TERM_CMD_DECSWBV,                       /* set-warning-bell-volume */
+        TERM_CMD_DECSWL,                        /* single-width-single-height-line */
+        TERM_CMD_DECTID,                        /* select-terminal-id */
+        TERM_CMD_DECTME,                        /* terminal-mode-emulation */
+        TERM_CMD_DECTST,                        /* invoke-confidence-test */
+        TERM_CMD_DL,                            /* delete-line */
+        TERM_CMD_DSR_ANSI,                      /* device-status-report-ansi */
+        TERM_CMD_DSR_DEC,                       /* device-status-report-dec */
+        TERM_CMD_ECH,                           /* erase-character */
+        TERM_CMD_ED,                            /* erase-in-display */
+        TERM_CMD_EL,                            /* erase-in-line */
+        TERM_CMD_ENQ,                           /* enquiry */
+        TERM_CMD_EPA,                           /* end-of-guarded-area */
+        TERM_CMD_FF,                            /* form-feed */
+        TERM_CMD_HPA,                           /* horizontal-position-absolute */
+        TERM_CMD_HPR,                           /* horizontal-position-relative */
+        TERM_CMD_HT,                            /* horizontal-tab */
+        TERM_CMD_HTS,                           /* horizontal-tab-set */
+        TERM_CMD_HVP,                           /* horizontal-and-vertical-position */
+        TERM_CMD_ICH,                           /* insert-character */
+        TERM_CMD_IL,                            /* insert-line */
+        TERM_CMD_IND,                           /* index */
+        TERM_CMD_LF,                            /* line-feed */
+        TERM_CMD_LS1R,                          /* locking-shift-1-right */
+        TERM_CMD_LS2,                           /* locking-shift-2 */
+        TERM_CMD_LS2R,                          /* locking-shift-2-right */
+        TERM_CMD_LS3,                           /* locking-shift-3 */
+        TERM_CMD_LS3R,                          /* locking-shift-3-right */
+        TERM_CMD_MC_ANSI,                       /* media-copy-ansi */
+        TERM_CMD_MC_DEC,                        /* media-copy-dec */
+        TERM_CMD_NEL,                           /* next-line */
+        TERM_CMD_NP,                            /* next-page */
+        TERM_CMD_NULL,                          /* null */
+        TERM_CMD_PP,                            /* preceding-page */
+        TERM_CMD_PPA,                           /* page-position-absolute */
+        TERM_CMD_PPB,                           /* page-position-backward */
+        TERM_CMD_PPR,                           /* page-position-relative */
+        TERM_CMD_RC,                            /* restore-cursor */
+        TERM_CMD_REP,                           /* repeat */
+        TERM_CMD_RI,                            /* reverse-index */
+        TERM_CMD_RIS,                           /* reset-to-initial-state */
+        TERM_CMD_RM_ANSI,                       /* reset-mode-ansi */
+        TERM_CMD_RM_DEC,                        /* reset-mode-dec */
+        TERM_CMD_S7C1T,                         /* set-7bit-c1-terminal */
+        TERM_CMD_S8C1T,                         /* set-8bit-c1-terminal */
+        TERM_CMD_SCS,                           /* select-character-set */
+        TERM_CMD_SD,                            /* scroll-down */
+        TERM_CMD_SGR,                           /* select-graphics-rendition */
+        TERM_CMD_SI,                            /* shift-in */
+        TERM_CMD_SM_ANSI,                       /* set-mode-ansi */
+        TERM_CMD_SM_DEC,                        /* set-mode-dec */
+        TERM_CMD_SO,                            /* shift-out */
+        TERM_CMD_SPA,                           /* start-of-protected-area */
+        TERM_CMD_SS2,                           /* single-shift-2 */
+        TERM_CMD_SS3,                           /* single-shift-3 */
+        TERM_CMD_ST,                            /* string-terminator */
+        TERM_CMD_SU,                            /* scroll-up */
+        TERM_CMD_SUB,                           /* substitute */
+        TERM_CMD_TBC,                           /* tab-clear */
+        TERM_CMD_VPA,                           /* vertical-line-position-absolute */
+        TERM_CMD_VPR,                           /* vertical-line-position-relative */
+        TERM_CMD_VT,                            /* vertical-tab */
+        TERM_CMD_XTERM_CLLHP,                   /* xterm-cursor-lower-left-hp-bugfix */
+        TERM_CMD_XTERM_IHMT,                    /* xterm-initiate-highlight-mouse-tracking*/
+        TERM_CMD_XTERM_MLHP,                    /* xterm-memory-lock-hp-bugfix */
+        TERM_CMD_XTERM_MUHP,                    /* xterm-memory-unlock-hp-bugfix */
+        TERM_CMD_XTERM_RPM,                     /* xterm-restore-private-mode */
+        TERM_CMD_XTERM_RRV,                     /* xterm-reset-resource-value */
+        TERM_CMD_XTERM_RTM,                     /* xterm-reset-title-mode */
+        TERM_CMD_XTERM_SACL1,                   /* xterm-set-ansi-conformance-level-1 */
+        TERM_CMD_XTERM_SACL2,                   /* xterm-set-ansi-conformance-level-2 */
+        TERM_CMD_XTERM_SACL3,                   /* xterm-set-ansi-conformance-level-3 */
+        TERM_CMD_XTERM_SDCS,                    /* xterm-set-default-character-set */
+        TERM_CMD_XTERM_SGFX,                    /* xterm-sixel-graphics */
+        TERM_CMD_XTERM_SPM,                     /* xterm-set-private-mode */
+        TERM_CMD_XTERM_SRV,                     /* xterm-set-resource-value */
+        TERM_CMD_XTERM_STM,                     /* xterm-set-title-mode */
+        TERM_CMD_XTERM_SUCS,                    /* xterm-set-utf8-character-set */
+        TERM_CMD_XTERM_WM,                      /* xterm-window-management */
+
+        TERM_CMD_CNT
+};
+
+enum {
+        /*
+         * Charsets: DEC marks charsets according to "Digital Equ. Corp.".
+         *           NRCS marks charsets according to the "National Replacement
+         *           Character Sets". ISO marks charsets according to ISO-8859.
+         * The USERDEF charset is special and can be modified by the host.
+         */
+
+        TERM_CHARSET_NONE,
+
+        /* 96-compat charsets */
+        TERM_CHARSET_ISO_LATIN1_SUPPLEMENTAL,
+        TERM_CHARSET_BRITISH_NRCS = TERM_CHARSET_ISO_LATIN1_SUPPLEMENTAL,
+        TERM_CHARSET_ISO_LATIN2_SUPPLEMENTAL,
+        TERM_CHARSET_AMERICAN_NRCS = TERM_CHARSET_ISO_LATIN2_SUPPLEMENTAL,
+        TERM_CHARSET_ISO_LATIN5_SUPPLEMENTAL,
+        TERM_CHARSET_ISO_GREEK_SUPPLEMENTAL,
+        TERM_CHARSET_ISO_HEBREW_SUPPLEMENTAL,
+        TERM_CHARSET_ISO_LATIN_CYRILLIC,
+
+        TERM_CHARSET_96_CNT,
+
+        /* 94-compat charsets */
+        TERM_CHARSET_DEC_SPECIAL_GRAPHIC = TERM_CHARSET_96_CNT,
+        TERM_CHARSET_DEC_SUPPLEMENTAL,
+        TERM_CHARSET_DEC_TECHNICAL,
+        TERM_CHARSET_CYRILLIC_DEC,
+        TERM_CHARSET_DUTCH_NRCS,
+        TERM_CHARSET_FINNISH_NRCS,
+        TERM_CHARSET_FRENCH_NRCS,
+        TERM_CHARSET_FRENCH_CANADIAN_NRCS,
+        TERM_CHARSET_GERMAN_NRCS,
+        TERM_CHARSET_GREEK_DEC,
+        TERM_CHARSET_GREEK_NRCS,
+        TERM_CHARSET_HEBREW_DEC,
+        TERM_CHARSET_HEBREW_NRCS,
+        TERM_CHARSET_ITALIAN_NRCS,
+        TERM_CHARSET_NORWEGIAN_DANISH_NRCS,
+        TERM_CHARSET_PORTUGUESE_NRCS,
+        TERM_CHARSET_RUSSIAN_NRCS,
+        TERM_CHARSET_SCS_NRCS,
+        TERM_CHARSET_SPANISH_NRCS,
+        TERM_CHARSET_SWEDISH_NRCS,
+        TERM_CHARSET_SWISS_NRCS,
+        TERM_CHARSET_TURKISH_DEC,
+        TERM_CHARSET_TURKISH_NRCS,
+
+        TERM_CHARSET_94_CNT,
+
+        /* special charsets */
+        TERM_CHARSET_USERPREF_SUPPLEMENTAL = TERM_CHARSET_94_CNT,
+
+        TERM_CHARSET_CNT,
+};
+
+extern term_charset term_unicode_lower;
+extern term_charset term_unicode_upper;
+extern term_charset term_dec_supplemental_graphics;
+extern term_charset term_dec_special_graphics;
+
+#define TERM_PARSER_ARG_MAX (16)
+#define TERM_PARSER_ST_MAX (4096)
+
+struct term_seq {
+        unsigned int type;
+        unsigned int command;
+        uint32_t terminator;
+        unsigned int intermediates;
+        unsigned int charset;
+        unsigned int n_args;
+        int args[TERM_PARSER_ARG_MAX];
+        unsigned int n_st;
+        char *st;
+};
+
+struct term_parser {
+        term_seq seq;
+        size_t st_alloc;
+        unsigned int state;
+
+        bool is_host : 1;
+};
+
+/*
+ * Screens
+ * A term_screen object represents the terminal-side of the communication. It
+ * connects the term-parser and term-pages and handles all required commands.
+ * All state is managed by it.
+ */
+
+enum {
+        TERM_FLAG_7BIT_MODE                     = (1U << 0),    /* 7bit mode (default: on) */
+        TERM_FLAG_HIDE_CURSOR                   = (1U << 1),    /* hide cursor caret (default: off) */
+        TERM_FLAG_INHIBIT_TPARM                 = (1U << 2),    /* do not send TPARM unrequested (default: off) */
+        TERM_FLAG_NEWLINE_MODE                  = (1U << 3),    /* perform carriage-return on line-feeds (default: off) */
+        TERM_FLAG_PENDING_WRAP                  = (1U << 4),    /* wrap-around is pending */
+        TERM_FLAG_KEYPAD_MODE                   = (1U << 5),    /* application-keypad mode (default: off) */
+        TERM_FLAG_CURSOR_KEYS                   = (1U << 6),    /* enable application cursor-keys (default: off) */
+};
+
+enum {
+        TERM_CONFORMANCE_LEVEL_VT52,
+        TERM_CONFORMANCE_LEVEL_VT100,
+        TERM_CONFORMANCE_LEVEL_VT400,
+        TERM_CONFORMANCE_LEVEL_CNT,
+};
+
+struct term_state {
+        unsigned int cursor_x;
+        unsigned int cursor_y;
+        term_attr attr;
+        term_charset **gl;
+        term_charset **gr;
+        term_charset **glt;
+        term_charset **grt;
+
+        bool auto_wrap : 1;
+        bool origin_mode : 1;
+};
+
+struct term_screen {
+        unsigned long ref;
+        term_age_t age;
+
+        term_page *page;
+        term_page *page_main;
+        term_page *page_alt;
+        term_history *history;
+        term_history *history_main;
+
+        unsigned int n_tabs;
+        uint8_t *tabs;
+
+        term_utf8 utf8;
+        term_parser *parser;
+
+        term_screen_write_fn write_fn;
+        void *write_fn_data;
+        term_screen_cmd_fn cmd_fn;
+        void *cmd_fn_data;
+
+        unsigned int flags;
+        unsigned int conformance_level;
+        term_attr default_attr;
+
+        term_charset *g0;
+        term_charset *g1;
+        term_charset *g2;
+        term_charset *g3;
+
+        char *answerback;
+
+        term_state state;
+        term_state saved;
+        term_state saved_alt;
+};
diff --git a/src/libsystemd-terminal/term-page.c b/src/libsystemd-terminal/term-page.c
new file mode 100644 (file)
index 0000000..ae73cdf
--- /dev/null
@@ -0,0 +1,2096 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Terminal Page/Line/Cell/Char Handling
+ * This file implements page handling of a terminal. It is split into pages,
+ * lines, cells and characters. Each object is independent of the next upper
+ * object.
+ *
+ * The Terminal layer keeps each line of a terminal separate and dynamically
+ * allocated. This allows us to move lines from main-screen to history-buffers
+ * very fast. Same is true for scrolling, top/bottom borders and other buffer
+ * operations.
+ *
+ * While lines are dynamically allocated, cells are not. This would be a waste
+ * of memory and causes heavy fragmentation. Furthermore, cells are moved much
+ * less frequently than lines so the performance-penalty is pretty small.
+ * However, to support combining-characters, we have to initialize and cleanup
+ * cells properly and cannot just release the underlying memory. Therefore,
+ * cells are treated as proper objects despite being allocated in arrays.
+ *
+ * Each cell has a set of attributes and a stored character. This is usually a
+ * single Unicode character stored as 32bit UCS-4 char. However, we need to
+ * support Unicode combining-characters, therefore this gets more complicated.
+ * Characters themselves are represented by a "term_char_t" object. It
+ * should be treated as a normal integer and passed by value. The
+ * surrounding struct is just to hide the internals. A term-char can contain a
+ * base character together with up to 2 combining-chars in a single integer.
+ * Only if you need more combining-chars (very unlikely!) a term-char is a
+ * pointer to an allocated storage. This requires you to always free term-char
+ * objects once no longer used (even though this is a no-op most of the time).
+ * Furthermore, term-char objects are not ref-counted so you must duplicate them
+ * in case you want to store it somewhere and retain a copy yourself. By
+ * convention, all functions that take a term-char object will not duplicate
+ * it but implicitly take ownership of the passed value. It's up to the caller
+ * to duplicate it beforehand, in case it wants to retain a copy.
+ *
+ * If it turns out, that more than 2 comb-chars become common in specific
+ * languages, we can try to optimize this. One idea is to ref-count allocated
+ * characters and store them in a hash-table (like gnome's libvte3 does). This
+ * way we will never have two allocated chars for the same content. Or we can
+ * simply put two uint64_t into a "term_char_t". This will slow down operations
+ * on systems that don't need that many comb-chars, but avoid the dynamic
+ * allocations on others.
+ * Anyhow, until we have proper benchmarks, we will keep the current code. It
+ * seems to compete very well with other solutions so far.
+ *
+ * The page-layer is a one-dimensional array of lines. Considering that each
+ * line is a one-dimensional array of cells, the page layer provides the
+ * two-dimensional cell-page required for terminals. The page itself only
+ * operates on lines. All cell-related operations are forwarded to the correct
+ * line.
+ * A page does not contain any cursor tracking. It only provides the raw
+ * operations to shuffle lines and modify the page.
+ */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "macro.h"
+#include "term-internal.h"
+#include "util.h"
+
+/* maximum UCS-4 character */
+#define CHAR_UCS4_MAX (0x10ffff)
+/* mask for valid UCS-4 characters (21bit) */
+#define CHAR_UCS4_MASK (0x1fffff)
+/* UCS-4 replacement character */
+#define CHAR_UCS4_REPLACEMENT (0xfffd)
+
+/* real storage behind "term_char_t" in case it's not packed */
+typedef struct term_character {
+        uint8_t n;
+        uint32_t codepoints[];
+} term_character;
+
+/*
+ * char_pack() takes 3 UCS-4 values and packs them into a term_char_t object.
+ * Note that UCS-4 chars only take 21 bits, so we still have the LSB as marker.
+ * We set it to 1 so others can distinguish it from pointers.
+ */
+static inline term_char_t char_pack(uint32_t v1, uint32_t v2, uint32_t v3) {
+        uint64_t packed, u1, u2, u3;
+
+        u1 = v1;
+        u2 = v2;
+        u3 = v3;
+
+        packed = 0x01;
+        packed |= (u1 & (uint64_t)CHAR_UCS4_MASK) << 43;
+        packed |= (u2 & (uint64_t)CHAR_UCS4_MASK) << 22;
+        packed |= (u3 & (uint64_t)CHAR_UCS4_MASK) <<  1;
+
+        return TERM_CHAR_INIT(packed);
+}
+
+#define char_pack1(_v1) char_pack2((_v1), CHAR_UCS4_MAX + 1)
+#define char_pack2(_v1, _v2) char_pack3((_v1), (_v2), CHAR_UCS4_MAX + 1)
+#define char_pack3(_v1, _v2, _v3) char_pack((_v1), (_v2), (_v3))
+
+/*
+ * char_unpack() is the inverse of char_pack(). It extracts the 3 stored UCS-4
+ * characters and returns them. Note that this does not validate the passed
+ * term_char_t. That's the responsibility of the caller.
+ * This returns the number of characters actually packed. This obviously is a
+ * number between 0 and 3 (inclusive).
+ */
+static inline uint8_t char_unpack(term_char_t packed, uint32_t *out_v1, uint32_t *out_v2, uint32_t *out_v3) {
+        uint32_t v1, v2, v3;
+
+        v1 = (packed._value >> 43) & (uint64_t)CHAR_UCS4_MASK;
+        v2 = (packed._value >> 22) & (uint64_t)CHAR_UCS4_MASK;
+        v3 = (packed._value >>  1) & (uint64_t)CHAR_UCS4_MASK;
+
+        if (out_v1)
+                *out_v1 = v1;
+        if (out_v2)
+                *out_v2 = v2;
+        if (out_v3)
+                *out_v3 = v3;
+
+        return (v1 > CHAR_UCS4_MAX) ? 0 :
+              ((v2 > CHAR_UCS4_MAX) ? 1 :
+              ((v3 > CHAR_UCS4_MAX) ? 2 :
+                                      3));
+}
+
+/* cast a term_char_t to a term_character* */
+static inline term_character *char_to_ptr(term_char_t ch) {
+        return (term_character*)(unsigned long)ch._value;
+}
+
+/* cast a term_character* to a term_char_t */
+static inline term_char_t char_from_ptr(term_character *c) {
+        return TERM_CHAR_INIT((unsigned long)c);
+}
+
+/*
+ * char_alloc() allocates a properly aligned term_character object and returns
+ * a pointer to it. NULL is returned on allocation errors. The object will have
+ * enough room for @n following UCS-4 chars.
+ * Note that we allocate (n+1) characters and set the last one to 0 in case
+ * anyone prints this string for debugging.
+ */
+static term_character *char_alloc(uint8_t n) {
+        term_character *c;
+        int r;
+
+        r = posix_memalign((void**)&c,
+                           MAX(sizeof(void*), (size_t)2),
+                           sizeof(*c) + sizeof(*c->codepoints) * (n + 1));
+        if (r)
+                return NULL;
+
+        c->n = n;
+        c->codepoints[n] = 0;
+
+        return c;
+}
+
+/*
+ * char_free() frees the memory allocated via char_alloc(). It is safe to call
+ * this on any term_char_t, only allocated characters are freed.
+ */
+static inline void char_free(term_char_t ch) {
+        if (term_char_is_allocated(ch))
+                free(char_to_ptr(ch));
+}
+
+/*
+ * This appends @append_ucs4 to the existing character @base and returns
+ * it as a new character. In case that's not possible, @base is returned. The
+ * caller can use term_char_same() to test whether the returned character was
+ * freshly allocated or not.
+ */
+static term_char_t char_build(term_char_t base, uint32_t append_ucs4) {
+        /* soft-limit for combining-chars; hard-limit is currently 255 */
+        const size_t climit = 64;
+        term_character *c;
+        uint32_t buf[3], *t;
+        uint8_t n;
+
+        /* ignore invalid UCS-4 */
+        if (append_ucs4 > CHAR_UCS4_MAX)
+                return base;
+
+        if (term_char_is_null(base)) {
+                return char_pack1(append_ucs4);
+        } else if (!term_char_is_allocated(base)) {
+                /* unpack and try extending the packed character */
+                n = char_unpack(base, &buf[0], &buf[1], &buf[2]);
+
+                switch (n) {
+                case 0:
+                        return char_pack1(append_ucs4);
+                case 1:
+                        if (climit < 2)
+                                return base;
+
+                        return char_pack2(buf[0], append_ucs4);
+                case 2:
+                        if (climit < 3)
+                                return base;
+
+                        return char_pack3(buf[0], buf[1], append_ucs4);
+                default:
+                        /* fallthrough */
+                        break;
+                }
+
+                /* already fully packed, we need to allocate a new one */
+                t = buf;
+        } else {
+                /* already an allocated type, we need to allocate a new one */
+                c = char_to_ptr(base);
+                t = c->codepoints;
+                n = c->n;
+        }
+
+        /* bail out if soft-limit is reached */
+        if (n >= climit)
+                return base;
+
+        /* allocate new char */
+        c = char_alloc(n + 1);
+        if (!c)
+                return base;
+
+        memcpy(c->codepoints, t, sizeof(*t) * n);
+        c->codepoints[n] = append_ucs4;
+
+        return char_from_ptr(c);
+}
+
+/**
+ * term_char_set() - Reset character to a single UCS-4 character
+ * @previous: term-char to reset
+ * @append_ucs4: UCS-4 char to set
+ *
+ * This frees all resources in @previous and re-initializes it to @append_ucs4.
+ * The new char is returned.
+ *
+ * Usually, this is used like this:
+ *   obj->ch = term_char_set(obj->ch, ucs4);
+ *
+ * Returns: The previous character reset to @append_ucs4.
+ */
+term_char_t term_char_set(term_char_t previous, uint32_t append_ucs4) {
+        char_free(previous);
+        return char_build(TERM_CHAR_NULL, append_ucs4);
+}
+
+/**
+ * term_char_merge() - Merge UCS-4 char at the end of an existing char
+ * @base: existing term-char
+ * @append_ucs4: UCS-4 character to append
+ *
+ * This appends @append_ucs4 to @base and returns the result. @base is
+ * invalidated by this function and must no longer be used. The returned value
+ * replaces the old one.
+ *
+ * Usually, this is used like this:
+ *   obj->ch = term_char_merge(obj->ch, ucs4);
+ *
+ * Returns: The new merged character.
+ */
+term_char_t term_char_merge(term_char_t base, uint32_t append_ucs4) {
+        term_char_t ch;
+
+        ch = char_build(base, append_ucs4);
+        if (!term_char_same(ch, base))
+                term_char_free(base);
+
+        return ch;
+}
+
+/**
+ * term_char_dup() - Duplicate character
+ * @ch: character to duplicate
+ *
+ * This duplicates a term-character. In case the character is not allocated,
+ * nothing is done. Otherwise, the underlying memory is copied and returned. You
+ * need to call term_char_free() on the returned character to release it again.
+ * On allocation errors, a replacement character is returned. Therefore, the
+ * caller can safely assume that this function always succeeds.
+ *
+ * Returns: The duplicated term-character.
+ */
+term_char_t term_char_dup(term_char_t ch) {
+        term_character *c, *newc;
+
+        if (!term_char_is_allocated(ch))
+                return ch;
+
+        c = char_to_ptr(ch);
+        newc = char_alloc(c->n);
+        if (!newc)
+                return char_pack1(CHAR_UCS4_REPLACEMENT);
+
+        memcpy(newc->codepoints, c->codepoints, sizeof(*c->codepoints) * c->n);
+        return char_from_ptr(newc);
+}
+
+/**
+ * term_char_dup_append() - Duplicate tsm-char with UCS-4 character appended
+ * @base: existing term-char
+ * @append_ucs4: UCS-4 character to append
+ *
+ * This is similar to term_char_merge(), but it returns a separately allocated
+ * character. That is, @base will stay valid after this returns and is not
+ * touched. In case the append-operation fails, @base is duplicated and
+ * returned. That is, the returned char is always independent of @base.
+ *
+ * Returns: Newly allocated character with @append_ucs4 appended to @base.
+ */
+term_char_t term_char_dup_append(term_char_t base, uint32_t append_ucs4) {
+        term_char_t ch;
+
+        ch = char_build(base, append_ucs4);
+        if (term_char_same(ch, base))
+                ch = term_char_dup(base);
+
+        return ch;
+}
+
+/**
+ * term_char_resolve() - Retrieve the UCS-4 string for a term-char
+ * @ch: character to resolve
+ * @s: storage for size of string or NULL
+ * @b: storage for string or NULL
+ *
+ * This takes a term-character and returns the UCS-4 string associated with it.
+ * In case @ch is not allocated, the string is stored in @b (in case @b is NULL
+ * static storage is used). Otherwise, a pointer to the allocated storage is
+ * returned.
+ *
+ * The returned string is only valid as long as @ch and @b are valid. The string
+ * is zero-terminated and can safely be printed via long-character printf().
+ * The length of the string excluding the zero-character is returned in @s.
+ *
+ * This never returns NULL. Even if the size is 0, this points to a buffer of at
+ * least a zero-terminator.
+ *
+ * Returns: The UCS-4 string-representation of @ch, and its size in @s.
+ */
+const uint32_t *term_char_resolve(term_char_t ch, size_t *s, term_charbuf_t *b) {
+        static term_charbuf_t static_b;
+        term_character *c;
+        uint32_t *cache;
+        size_t len;
+
+        if (b)
+                cache = b->buf;
+        else
+                cache = static_b.buf;
+
+        if (term_char_is_null(ch)) {
+                len = 0;
+                cache[0] = 0;
+        } else if (term_char_is_allocated(ch)) {
+                c = char_to_ptr(ch);
+                len = c->n;
+                cache = c->codepoints;
+        } else {
+                len = char_unpack(ch, &cache[0], &cache[1], &cache[2]);
+                cache[len] = 0;
+        }
+
+        if (s)
+                *s = len;
+
+        return cache;
+}
+
+/**
+ * term_char_lookup_width() - Lookup cell-width of a character
+ * @ch: character to return cell-width for
+ *
+ * This is an equivalent of wcwidth() for term_char_t. It can deal directly
+ * with UCS-4 and combining-characters and avoids the mess that is wchar_t and
+ * locale handling.
+ *
+ * Returns: 0 for unprintable characters, >0 for everything else.
+ */
+unsigned int term_char_lookup_width(term_char_t ch) {
+        term_charbuf_t b;
+        const uint32_t *str;
+        unsigned int max;
+        size_t i, len;
+        int r;
+
+        max = 0;
+        str = term_char_resolve(ch, &len, &b);
+
+        for (i = 0; i < len; ++i) {
+                /*
+                 * Oh god, C99 locale handling strikes again: wcwidth() expects
+                 * wchar_t, but there is no way for us to know the
+                 * internal encoding of wchar_t. Moreover, it is nearly
+                 * impossible to convert UCS-4 into wchar_t (except for iconv,
+                 * which is way too much overhead).
+                 * Therefore, we use our own copy of wcwidth(). Lets just hope
+                 * that glibc will one day export it's internal UCS-4 and UTF-8
+                 * helpers for direct use.
+                 */
+                assert_cc(sizeof(wchar_t) >= 4);
+                r = mk_wcwidth((wchar_t)str[i]);
+                if (r > 0 && (unsigned int)r > max)
+                        max = r;
+        }
+
+        return max;
+}
+
+/**
+ * term_cell_init() - Initialize a new cell
+ * @cell: cell to initialize
+ * @ch: character to set on the cell or TERM_CHAR_NULL
+ * @cwidth: character width of @ch
+ * @attr: attributes to set on the cell or NULL
+ * @age: age to set on the cell or TERM_AGE_NULL
+ *
+ * This initializes a new cell. The backing-memory of the cell must be allocated
+ * by the caller beforehand. The caller is responsible to destroy the cell via
+ * term_cell_destroy() before freeing the backing-memory.
+ *
+ * It is safe (and supported!) to use:
+ *   zero(*c);
+ * instead of:
+ *   term_cell_init(c, TERM_CHAR_NULL, NULL, TERM_AGE_NULL);
+ *
+ * Note that this call takes ownership of @ch. If you want to use it yourself
+ * after this call, you need to duplicate it before calling this.
+ */
+static void term_cell_init(term_cell *cell, term_char_t ch, unsigned int cwidth, const term_attr *attr, term_age_t age) {
+        assert(cell);
+
+        cell->ch = ch;
+        cell->cwidth = cwidth;
+        cell->age = age;
+
+        if (attr)
+                memcpy(&cell->attr, attr, sizeof(*attr));
+        else
+                zero(cell->attr);
+}
+
+/**
+ * term_cell_destroy() - Destroy previously initialized cell
+ * @cell: cell to destroy or NULL
+ *
+ * This releases all resources associated with a cell. The backing memory is
+ * kept as-is. It's the responsibility of the caller to manage it.
+ *
+ * You must not call any other cell operations on this cell after this call
+ * returns. You must re-initialize the cell via term_cell_init() before you can
+ * use it again.
+ *
+ * If @cell is NULL, this is a no-op.
+ */
+static void term_cell_destroy(term_cell *cell) {
+        if (!cell)
+                return;
+
+        term_char_free(cell->ch);
+}
+
+/**
+ * term_cell_set() - Change contents of a cell
+ * @cell: cell to modify
+ * @ch: character to set on the cell or cell->ch
+ * @cwidth: character width of @ch or cell->cwidth
+ * @attr: attributes to set on the cell or NULL
+ * @age: age to set on the cell or cell->age
+ *
+ * This changes the contents of a cell. It can be used to change the character,
+ * attributes and age. To keep the current character, pass cell->ch as @ch. To
+ * reset the current attributes, pass NULL. To keep the current age, pass
+ * cell->age.
+ *
+ * This call takes ownership of @ch. You need to duplicate it first, in case you
+ * want to use it for your own purposes after this call.
+ *
+ * The cell must have been initialized properly before calling this. See
+ * term_cell_init().
+ */
+static void term_cell_set(term_cell *cell, term_char_t ch, unsigned int cwidth, const term_attr *attr, term_age_t age) {
+        assert(cell);
+
+        if (!term_char_same(ch, cell->ch)) {
+                term_char_free(cell->ch);
+                cell->ch = ch;
+        }
+
+        cell->cwidth = cwidth;
+        cell->age = age;
+
+        if (attr)
+                memcpy(&cell->attr, attr, sizeof(*attr));
+        else
+                zero(cell->attr);
+}
+
+/**
+ * term_cell_append() - Append a combining-char to a cell
+ * @cell: cell to modify
+ * @ucs4: UCS-4 character to append to the cell
+ * @age: new age to set on the cell or cell->age
+ *
+ * This appends a combining-character to a cell. No validation of the UCS-4
+ * character is done, so this can be used to append any character. Additionally,
+ * this can update the age of the cell.
+ *
+ * The cell must have been initialized properly before calling this. See
+ * term_cell_init().
+ */
+static void term_cell_append(term_cell *cell, uint32_t ucs4, term_age_t age) {
+        assert(cell);
+
+        cell->ch = term_char_merge(cell->ch, ucs4);
+        cell->age = age;
+}
+
+/**
+ * term_cell_init_n() - Initialize an array of cells
+ * @cells: pointer to an array of cells to initialize
+ * @n: number of cells
+ * @attr: attributes to set on all cells or NULL
+ * @age: age to set on all cells
+ *
+ * This is the same as term_cell_init() but initializes an array of cells.
+ * Furthermore, this always sets the character to TERM_CHAR_NULL.
+ * If you want to set a specific characters on all cells, you need to hard-code
+ * this loop and duplicate the character for each cell.
+ */
+static void term_cell_init_n(term_cell *cells, unsigned int n, const term_attr *attr, term_age_t age) {
+        for ( ; n > 0; --n, ++cells)
+                term_cell_init(cells, TERM_CHAR_NULL, 0, attr, age);
+}
+
+/**
+ * term_cell_destroy_n() - Destroy an array of cells
+ * @cells: pointer to an array of cells to destroy
+ * @n: number of cells
+ *
+ * This is the same as term_cell_destroy() but destroys an array of cells.
+ */
+static void term_cell_destroy_n(term_cell *cells, unsigned int n) {
+        for ( ; n > 0; --n, ++cells)
+                term_cell_destroy(cells);
+}
+
+/**
+ * term_cell_clear_n() - Clear contents of an array of cells
+ * @cells: pointer to an array of cells to modify
+ * @n: number of cells
+ * @attr: attributes to set on all cells or NULL
+ * @age: age to set on all cells
+ *
+ * This is the same as term_cell_set() but operates on an array of cells. Note
+ * that all characters are always set to TERM_CHAR_NULL, unlike term_cell_set()
+ * which takes the character as argument.
+ * If you want to set a specific characters on all cells, you need to hard-code
+ * this loop and duplicate the character for each cell.
+ */
+static void term_cell_clear_n(term_cell *cells, unsigned int n, const term_attr *attr, term_age_t age) {
+        for ( ; n > 0; --n, ++cells)
+                term_cell_set(cells, TERM_CHAR_NULL, 0, attr, age);
+}
+
+/**
+ * term_line_new() - Allocate a new line
+ * @out: place to store pointer to new line
+ *
+ * This allocates and initialized a new line. The line is unlinked and
+ * independent of any page. It can be used for any purpose. The initial
+ * cell-count is set to 0.
+ *
+ * The line has to be freed via term_line_free() once it's no longer needed.
+ *
+ * Returns: 0 on success, negative error code on failure.
+ */
+int term_line_new(term_line **out) {
+        _term_line_free_ term_line *line = NULL;
+
+        assert_return(out, -EINVAL);
+
+        line = new0(term_line, 1);
+        if (!line)
+                return -ENOMEM;
+
+        *out = line;
+        line = NULL;
+        return 0;
+}
+
+/**
+ * term_line_free() - Free a line
+ * @line: line to free or NULL
+ *
+ * This frees a line that was previously allocated via term_line_free(). All its
+ * cells are released, too.
+ *
+ * If @line is NULL, this is a no-op.
+ */
+term_line *term_line_free(term_line *line) {
+        if (!line)
+                return NULL;
+
+        term_cell_destroy_n(line->cells, line->n_cells);
+        free(line->cells);
+        free(line);
+
+        return NULL;
+}
+
+/**
+ * term_line_reserve() - Pre-allocate cells for a line
+ * @line: line to pre-allocate cells for
+ * @width: numbers of cells the line shall have pre-allocated
+ * @attr: attribute for all allocated cells or NULL
+ * @age: current age for all modifications
+ * @protect_width: width to protect from erasure
+ *
+ * This pre-allocates cells for this line. Please note that @width is the number
+ * of cells the line is guaranteed to have allocated after this call returns.
+ * It's not the number of cells that are added, neither is it the new width of
+ * the line.
+ *
+ * This function never frees memory. That is, reducing the line-width will
+ * always succeed, same is true for increasing the width to a previously set
+ * width.
+ *
+ * @attr and @age are used to initialize new cells. Additionally, any
+ * existing cell outside of the protected area specified by @protect_width are
+ * cleared and reset with @attr and @age.
+ *
+ * Returns: 0 on success, negative error code on failure.
+ */
+int term_line_reserve(term_line *line, unsigned int width, const term_attr *attr, term_age_t age, unsigned int protect_width) {
+        unsigned int min_width;
+        term_cell *t;
+
+        assert_return(line, -EINVAL);
+
+        /* reset existing cells if required */
+        min_width = MIN(line->n_cells, width);
+        if (min_width > protect_width)
+                term_cell_clear_n(line->cells + protect_width,
+                                  min_width - protect_width,
+                                  attr,
+                                  age);
+
+        /* allocate new cells if required */
+
+        if (width > line->n_cells) {
+                t = realloc_multiply(line->cells, sizeof(*t), width);
+                if (!t)
+                        return -ENOMEM;
+
+                if (!attr && !age)
+                        memzero(t + line->n_cells,
+                                sizeof(*t) * (width - line->n_cells));
+                else
+                        term_cell_init_n(t + line->n_cells,
+                                         width - line->n_cells,
+                                         attr,
+                                         age);
+
+                line->cells = t;
+                line->n_cells = width;
+        }
+
+        line->fill = MIN(line->fill, protect_width);
+
+        return 0;
+}
+
+/**
+ * term_line_set_width() - Change width of a line
+ * @line: line to modify
+ * @width: new width
+ *
+ * This changes the actual width of a line. It is the caller's responsibility
+ * to use term_line_reserve() to make sure enough space is allocated. If @width
+ * is greater than the allocated size, it is cropped.
+ *
+ * This does not modify any cells. Use term_line_reserve() or term_line_erase()
+ * to clear any newly added cells.
+ *
+ * NOTE: The fill state is cropped at line->width. Therefore, if you increase
+ *       the line-width afterwards, but there is a multi-cell character at the
+ *       end of the line that got cropped, then the fill-state will _not_ be
+ *       adjusted.
+ *       This means, the fill-state always includes the cells up to the start
+ *       of the right-most character, but it might or might not cover it until
+ *       its end. This should be totally fine, though. You should never access
+ *       multi-cell tails directly, anyway.
+ */
+void term_line_set_width(term_line *line, unsigned int width) {
+        assert(line);
+
+        if (width > line->n_cells)
+                width = line->n_cells;
+
+        line->width = width;
+        line->fill = MIN(line->fill, width);
+}
+
+/**
+ * line_insert() - Insert characters and move existing cells to the right
+ * @from: position to insert cells at
+ * @num: number of cells to insert
+ * @head_char: character that is set on the first cell
+ * @head_cwidth: character-length of @head_char
+ * @attr: attribute for all inserted cells or NULL
+ * @age: current age for all modifications
+ *
+ * The INSERT operation (or writes with INSERT_MODE) writes data at a specific
+ * position on a line and shifts the existing cells to the right. Cells that are
+ * moved beyond the right hand border are discarded.
+ *
+ * This helper contains the actual INSERT implementation which is independent of
+ * the data written. It works on cells, not on characters. The first cell is set
+ * to @head_char, all others are reset to TERM_CHAR_NULL. See each caller for a
+ * more detailed description.
+ */
+static inline void line_insert(term_line *line, unsigned int from, unsigned int num, term_char_t head_char, unsigned int head_cwidth, const term_attr *attr, term_age_t age) {
+        unsigned int i, rem, move;
+
+        if (from >= line->width)
+                return;
+        if (from + num < from || from + num > line->width)
+                num = line->width - from;
+        if (!num)
+                return;
+
+        move = line->width - from - num;
+        rem = MIN(num, move);
+
+        if (rem > 0) {
+                /*
+                 * Make room for @num cells; shift cells to the right if
+                 * required. @rem is the number of remaining cells that we will
+                 * knock off on the right and overwrite during the right shift.
+                 *
+                 * For INSERT_MODE, @num/@rem are usually 1 or 2, @move is 50%
+                 * of the line on average. Therefore, the actual move is quite
+                 * heavy and we can safely invalidate cells manually instead of
+                 * the whole line.
+                 * However, for INSERT operations, any parameters are
+                 * possible. But we cannot place any assumption on its usage
+                 * across applications, so we just handle it the same as
+                 * INSERT_MODE and do per-cell invalidation.
+                 */
+
+                /* destroy cells that are knocked off on the right */
+                term_cell_destroy_n(line->cells + line->width - rem, rem);
+
+                /* move remaining bulk of cells */
+                memmove(line->cells + from + num,
+                        line->cells + from,
+                        sizeof(*line->cells) * move);
+
+                /* invalidate cells */
+                for (i = 0; i < move; ++i)
+                        line->cells[from + num + i].age = age;
+
+                /* initialize fresh head-cell */
+                term_cell_init(line->cells + from,
+                               head_char,
+                               head_cwidth,
+                               attr,
+                               age);
+
+                /* initialize fresh tail-cells */
+                term_cell_init_n(line->cells + from + 1,
+                                 num - 1,
+                                 attr,
+                                 age);
+
+                /* adjust fill-state */
+                DISABLE_WARNING_SHADOW;
+                line->fill = MIN(line->width,
+                                 MAX(line->fill + num,
+                                     from + num));
+                REENABLE_WARNING;
+        } else {
+                /* modify head-cell */
+                term_cell_set(line->cells + from,
+                              head_char,
+                              head_cwidth,
+                              attr,
+                              age);
+
+                /* reset tail-cells */
+                term_cell_clear_n(line->cells + from + 1,
+                                  num - 1,
+                                  attr,
+                                  age);
+
+                /* adjust fill-state */
+                line->fill = line->width;
+        }
+}
+
+/**
+ * term_line_write() - Write to a single, specific cell
+ * @line: line to write to
+ * @pos_x: x-position of cell in @line to write to
+ * @ch: character to write to the cell
+ * @cwidth: character width of @ch
+ * @attr: attributes to set on the cell or NULL
+ * @age: current age for all modifications
+ * @insert_mode: true if INSERT-MODE is enabled
+ *
+ * This writes to a specific cell in a line. The cell is addressed by its
+ * X-position @pos_x. If that cell does not exist, this is a no-op.
+ *
+ * @ch and @attr are set on this cell.
+ *
+ * If @insert_mode is true, this inserts the character instead of overwriting
+ * existing data (existing data is now moved to the right before writing).
+ *
+ * This function is the low-level handler of normal writes to a terminal.
+ */
+void term_line_write(term_line *line, unsigned int pos_x, term_char_t ch, unsigned int cwidth, const term_attr *attr, term_age_t age, bool insert_mode) {
+        unsigned int len;
+
+        assert(line);
+
+        if (pos_x >= line->width)
+                return;
+
+        len = MAX(1U, cwidth);
+        if (pos_x + len < pos_x || pos_x + len > line->width)
+                len = line->width - pos_x;
+        if (!len)
+                return;
+
+        if (insert_mode) {
+                /* Use line_insert() to insert the character-head and fill
+                 * the remains with NULLs. */
+                line_insert(line, pos_x, len, ch, cwidth, attr, age);
+        } else {
+                /* modify head-cell */
+                term_cell_set(line->cells + pos_x, ch, cwidth, attr, age);
+
+                /* reset tail-cells */
+                term_cell_clear_n(line->cells + pos_x + 1,
+                                  len - 1,
+                                  attr,
+                                  age);
+
+                /* adjust fill-state */
+                DISABLE_WARNING_SHADOW;
+                line->fill = MIN(line->width,
+                                 MAX(line->fill,
+                                     pos_x + len));
+                REENABLE_WARNING;
+        }
+}
+
+/**
+ * term_line_insert() - Insert empty cells
+ * @line: line to insert empty cells into
+ * @from: x-position where to insert cells
+ * @num: number of cells to insert
+ * @attr: attributes to set on the cells or NULL
+ * @age: current age for all modifications
+ *
+ * This inserts @num empty cells at position @from in line @line. All existing
+ * cells to the right are shifted to make room for the new cells. Cells that get
+ * pushed beyond the right hand border are discarded.
+ */
+void term_line_insert(term_line *line, unsigned int from, unsigned int num, const term_attr *attr, term_age_t age) {
+        /* use line_insert() to insert @num empty cells */
+        return line_insert(line, from, num, TERM_CHAR_NULL, 0, attr, age);
+}
+
+/**
+ * term_line_delete() - Delete cells from line
+ * @line: line to delete cells from
+ * @from: position to delete cells at
+ * @num: number of cells to delete
+ * @attr: attributes to set on any new cells
+ * @age: current age for all modifications
+ *
+ * Delete cells from a line. All cells to the right of the deleted cells are
+ * shifted to the left to fill the empty space. New cells appearing on the right
+ * hand border are cleared and initialized with @attr.
+ */
+void term_line_delete(term_line *line, unsigned int from, unsigned int num, const term_attr *attr, term_age_t age) {
+        unsigned int rem, move, i;
+
+        assert(line);
+
+        if (from >= line->width)
+                return;
+        if (from + num < from || from + num > line->width)
+                num = line->width - from;
+        if (!num)
+                return;
+
+        /* destroy and move as many upfront as possible */
+        move = line->width - from - num;
+        rem = MIN(num, move);
+        if (rem > 0) {
+                /* destroy to be removed cells */
+                term_cell_destroy_n(line->cells + from, rem);
+
+                /* move tail upfront */
+                memmove(line->cells + from,
+                        line->cells + from + num,
+                        sizeof(*line->cells) * move);
+
+                /* invalidate copied cells */
+                for (i = 0; i < move; ++i)
+                        line->cells[from + i].age = age;
+
+                /* initialize tail that was moved away */
+                term_cell_init_n(line->cells + line->width - rem,
+                                 rem,
+                                 attr,
+                                 age);
+
+                /* reset remaining cells in case the move was too small */
+                if (num > move)
+                        term_cell_clear_n(line->cells + from + move,
+                                          num - move,
+                                          attr,
+                                          age);
+        } else {
+                /* reset cells */
+                term_cell_clear_n(line->cells + from,
+                                  num,
+                                  attr,
+                                  age);
+        }
+
+        /* adjust fill-state */
+        if (from + num < line->fill)
+                line->fill -= num;
+        else if (from < line->fill)
+                line->fill = from;
+}
+
+/**
+ * term_line_append_combchar() - Append combining char to existing cell
+ * @line: line to modify
+ * @pos_x: position of cell to append combining char to
+ * @ucs4: combining character to append
+ * @age: current age for all modifications
+ *
+ * Unicode allows trailing combining characters, which belong to the
+ * char in front of them. The caller is responsible of detecting
+ * combining characters and calling term_line_append_combchar() instead of
+ * term_line_write(). This simply appends the char to the correct cell then.
+ * If the cell is not in the visible area, this call is skipped.
+ *
+ * Note that control-sequences are not 100% compatible with combining
+ * characters as they require delayed parsing. However, we must handle
+ * control-sequences immediately. Therefore, there might be trailing
+ * combining chars that should be discarded by the parser.
+ * However, to prevent programming errors, we're also being pedantic
+ * here and discard weirdly placed combining chars. This prevents
+ * situations were invalid content is parsed into the terminal and you
+ * might end up with cells containing only combining chars.
+ *
+ * Long story short: To get combining-characters working with old-fashioned
+ * terminal-emulation, we parse them exclusively for direct cell-writes. Other
+ * combining-characters are usually simply discarded and ignored.
+ */
+void term_line_append_combchar(term_line *line, unsigned int pos_x, uint32_t ucs4, term_age_t age) {
+        assert(line);
+
+        if (pos_x >= line->width)
+                return;
+
+        /* Unused cell? Skip appending any combining chars then. */
+        if (term_char_is_null(line->cells[pos_x].ch))
+                return;
+
+        term_cell_append(line->cells + pos_x, ucs4, age);
+}
+
+/**
+ * term_line_erase() - Erase parts of a line
+ * @line: line to modify
+ * @from: position to start the erase
+ * @num: number of cells to erase
+ * @attr: attributes to initialize erased cells with
+ * @age: current age for all modifications
+ * @keep_protected: true if protected cells should be kept
+ *
+ * This is the standard erase operation. It clears all cells in the targeted
+ * area and re-initializes them. Cells to the right are not shifted left, you
+ * must use DELETE to achieve that. Cells outside the visible area are skipped.
+ *
+ * If @keep_protected is true, protected cells will not be erased.
+ */
+void term_line_erase(term_line *line, unsigned int from, unsigned int num, const term_attr *attr, term_age_t age, bool keep_protected) {
+        term_cell *cell;
+        unsigned int i, last_protected;
+
+        assert(line);
+
+        if (from >= line->width)
+                return;
+        if (from + num < from || from + num > line->width)
+                num = line->width - from;
+        if (!num)
+                return;
+
+        last_protected = 0;
+        for (i = 0; i < num; ++i) {
+                cell = line->cells + from + i;
+                if (keep_protected && cell->attr.protect) {
+                        /* only count protected-cells inside the fill-region */
+                        if (from + i < line->fill)
+                                last_protected = from + i;
+
+                        continue;
+                }
+
+                term_cell_set(cell, TERM_CHAR_NULL, 0, attr, age);
+        }
+
+        /* Adjust fill-state. This is a bit tricks, we can only adjust it in
+         * case the erase-region starts inside the fill-region and ends at the
+         * tail or beyond the fill-region. Otherwise, the current fill-state
+         * stays as it was.
+         * Furthermore, we must account for protected cells. The loop above
+         * ensures that protected-cells are only accounted for if they're
+         * inside the fill-region. */
+        if (from < line->fill && from + num >= line->fill)
+                line->fill = MAX(from, last_protected);
+}
+
+/**
+ * term_line_reset() - Reset a line
+ * @line: line to reset
+ * @attr: attributes to initialize all cells with
+ * @age: current age for all modifications
+ *
+ * This resets all visible cells of a line and sets their attributes and ages
+ * to @attr and @age. This is equivalent to erasing a whole line via
+ * term_line_erase().
+ */
+void term_line_reset(term_line *line, const term_attr *attr, term_age_t age) {
+        assert(line);
+
+        return term_line_erase(line, 0, line->width, attr, age, 0);
+}
+
+/**
+ * term_line_link() - Link line in front of a list
+ * @line: line to link
+ * @first: member pointing to first entry
+ * @last: member pointing to last entry
+ *
+ * This links a line into a list of lines. The line is inserted at the front and
+ * must not be linked, yet. See the TERM_LINE_LINK() macro for an easier usage of
+ * this.
+ */
+void term_line_link(term_line *line, term_line **first, term_line **last) {
+        assert(line);
+        assert(first);
+        assert(last);
+        assert(!line->lines_prev);
+        assert(!line->lines_next);
+
+        line->lines_prev = NULL;
+        line->lines_next = *first;
+        if (*first)
+                (*first)->lines_prev = line;
+        else
+                *last = line;
+        *first = line;
+}
+
+/**
+ * term_line_link_tail() - Link line at tail of a list
+ * @line: line to link
+ * @first: member pointing to first entry
+ * @last: member pointing to last entry
+ *
+ * Same as term_line_link() but links the line at the tail.
+ */
+void term_line_link_tail(term_line *line, term_line **first, term_line **last) {
+        assert(line);
+        assert(first);
+        assert(last);
+        assert(!line->lines_prev);
+        assert(!line->lines_next);
+
+        line->lines_next = NULL;
+        line->lines_prev = *last;
+        if (*last)
+                (*last)->lines_next = line;
+        else
+                *first = line;
+        *last = line;
+}
+
+/**
+ * term_line_unlink() - Unlink line from a list
+ * @line: line to unlink
+ * @first: member pointing to first entry
+ * @last: member pointing to last entry
+ *
+ * This unlinks a previously linked line. See TERM_LINE_UNLINK() for an easier to
+ * use macro.
+ */
+void term_line_unlink(term_line *line, term_line **first, term_line **last) {
+        assert(line);
+        assert(first);
+        assert(last);
+
+        if (line->lines_prev)
+                line->lines_prev->lines_next = line->lines_next;
+        else
+                *first = line->lines_next;
+        if (line->lines_next)
+                line->lines_next->lines_prev = line->lines_prev;
+        else
+                *last = line->lines_prev;
+
+        line->lines_prev = NULL;
+        line->lines_next = NULL;
+}
+
+/**
+ * term_page_new() - Allocate new page
+ * @out: storage for pointer to new page
+ *
+ * Allocate a new page. The initial dimensions are 0/0.
+ *
+ * Returns: 0 on success, negative error code on failure.
+ */
+int term_page_new(term_page **out) {
+        _term_page_free_ term_page *page = NULL;
+
+        assert_return(out, -EINVAL);
+
+        page = new0(term_page, 1);
+        if (!page)
+                return -ENOMEM;
+
+        *out = page;
+        page = NULL;
+        return 0;
+}
+
+/**
+ * term_page_free() - Free page
+ * @page: page to free or NULL
+ *
+ * Free a previously allocated page and all associated data. If @page is NULL,
+ * this is a no-op.
+ *
+ * Returns: NULL
+ */
+term_page *term_page_free(term_page *page) {
+        unsigned int i;
+
+        if (!page)
+                return NULL;
+
+        for (i = 0; i < page->n_lines; ++i)
+                term_line_free(page->lines[i]);
+
+        free(page->line_cache);
+        free(page->lines);
+        free(page);
+
+        return NULL;
+}
+
+/**
+ * term_page_get_cell() - Return pointer to requested cell
+ * @page: page to operate on
+ * @x: x-position of cell
+ * @y: y-position of cell
+ *
+ * This returns a pointer to the cell at position @x/@y. You're free to modify
+ * this cell as much as you like. However, once you call any other function on
+ * the page, you must drop the pointer to the cell.
+ *
+ * Returns: Pointer to the cell or NULL if out of the visible area.
+ */
+term_cell *term_page_get_cell(term_page *page, unsigned int x, unsigned int y) {
+        assert_return(page, NULL);
+
+        if (x >= page->width)
+                return NULL;
+        if (y >= page->height)
+                return NULL;
+
+        return &page->lines[y]->cells[x];
+}
+
+/**
+ * page_scroll_up() - Scroll up
+ * @page: page to operate on
+ * @new_width: width to use for any new line moved into the visible area
+ * @num: number of lines to scroll up
+ * @attr: attributes to set on new lines
+ * @age: age to use for all modifications
+ * @history: history to use for old lines or NULL
+ *
+ * This scrolls the scroll-region by @num lines. New lines are cleared and reset
+ * with the given attributes. Old lines are moved into the history if non-NULL.
+ * If a new line is allocated, moved from the history buffer or moved from
+ * outside the visible region into the visible region, this call makes sure it
+ * has at least @width cells allocated. If a possible memory-allocation fails,
+ * the previous line is reused. This has the side effect, that it will not be
+ * linked into the history buffer.
+ *
+ * If the scroll-region is empty, this is a no-op.
+ */
+static void page_scroll_up(term_page *page, unsigned int new_width, unsigned int num, const term_attr *attr, term_age_t age, term_history *history) {
+        term_line *line, **cache;
+        unsigned int i;
+        int r;
+
+        assert(page);
+
+        if (num > page->scroll_num)
+                num = page->scroll_num;
+        if (num < 1)
+                return;
+
+        /* Better safe than sorry: avoid under-allocating lines, even when
+         * resizing. */
+        new_width = MAX(new_width, page->width);
+
+        cache = page->line_cache;
+
+        /* Try moving lines into history and allocate new lines for each moved
+         * line. In case allocation fails, or if we have no history, reuse the
+         * line.
+         * We keep the lines in the line-cache so we can safely move the
+         * remaining lines around. */
+        for (i = 0; i < num; ++i) {
+                line = page->lines[page->scroll_idx + i];
+
+                r = -EAGAIN;
+                if (history) {
+                        r = term_line_new(&cache[i]);
+                        if (r >= 0) {
+                                r = term_line_reserve(cache[i],
+                                                      new_width,
+                                                      attr,
+                                                      age,
+                                                      0);
+                                if (r < 0)
+                                        term_line_free(cache[i]);
+                                else
+                                        term_line_set_width(cache[i], page->width);
+                        }
+                }
+
+                if (r >= 0) {
+                        term_history_push(history, line);
+                } else {
+                        cache[i] = line;
+                        term_line_reset(line, attr, age);
+                }
+        }
+
+        if (num < page->scroll_num) {
+                memmove(page->lines + page->scroll_idx,
+                        page->lines + page->scroll_idx + num,
+                        sizeof(*page->lines) * (page->scroll_num - num));
+
+                /* update age of moved lines */
+                for (i = 0; i < page->scroll_num - num; ++i)
+                        page->lines[page->scroll_idx + i]->age = age;
+        }
+
+        /* copy remaining lines from cache; age is already updated */
+        memcpy(page->lines + page->scroll_idx + page->scroll_num - num,
+               cache,
+               sizeof(*cache) * num);
+
+        /* update fill */
+        page->scroll_fill -= MIN(page->scroll_fill, num);
+}
+
+/**
+ * page_scroll_down() - Scroll down
+ * @page: page to operate on
+ * @new_width: width to use for any new line moved into the visible area
+ * @num: number of lines to scroll down
+ * @attr: attributes to set on new lines
+ * @age: age to use for all modifications
+ * @history: history to use for new lines or NULL
+ *
+ * This scrolls the scroll-region by @num lines. New lines are retrieved from
+ * the history or cleared if the history is empty or NULL.
+ *
+ * Usually, scroll-down implies that new lines are cleared. Therefore, you're
+ * highly encouraged to set @history to NULL. However, if you resize a terminal,
+ * you might want to include history-lines in the new area. In that case, you
+ * should set @history to non-NULL.
+ *
+ * If a new line is allocated, moved from the history buffer or moved from
+ * outside the visible region into the visible region, this call makes sure it
+ * has at least @width cells allocated. If a possible memory-allocation fails,
+ * the previous line is reused. This will have the side-effect that lines from
+ * the history will not get visible on-screen but kept in history.
+ *
+ * If the scroll-region is empty, this is a no-op.
+ */
+static void page_scroll_down(term_page *page, unsigned int new_width, unsigned int num, const term_attr *attr, term_age_t age, term_history *history) {
+        term_line *line, **cache, *t;
+        unsigned int i, last_idx;
+
+        assert(page);
+
+        if (num > page->scroll_num)
+                num = page->scroll_num;
+        if (num < 1)
+                return;
+
+        /* Better safe than sorry: avoid under-allocating lines, even when
+         * resizing. */
+        new_width = MAX(new_width, page->width);
+
+        cache = page->line_cache;
+        last_idx = page->scroll_idx + page->scroll_num - 1;
+
+        /* Try pulling out lines from history; if history is empty or if no
+         * history is given, we reuse the to-be-removed lines. Otherwise, those
+         * lines are released. */
+        for (i = 0; i < num; ++i) {
+                line = page->lines[last_idx - i];
+
+                t = NULL;
+                if (history)
+                        t = term_history_pop(history, new_width, attr, age);
+
+                if (t) {
+                        cache[num - 1 - i] = t;
+                        term_line_free(line);
+                } else {
+                        cache[num - 1 - i] = line;
+                        term_line_reset(line, attr, age);
+                }
+        }
+
+        if (num < page->scroll_num) {
+                memmove(page->lines + page->scroll_idx + num,
+                        page->lines + page->scroll_idx,
+                        sizeof(*page->lines) * (page->scroll_num - num));
+
+                /* update age of moved lines */
+                for (i = 0; i < page->scroll_num - num; ++i)
+                        page->lines[page->scroll_idx + num + i]->age = age;
+        }
+
+        /* copy remaining lines from cache; age is already updated */
+        memcpy(page->lines + page->scroll_idx,
+               cache,
+               sizeof(*cache) * num);
+
+        /* update fill; but only if there's already content in it */
+        if (page->scroll_fill > 0)
+                page->scroll_fill = MIN(page->scroll_num,
+                                        page->scroll_fill + num);
+}
+
+/**
+ * page_reserve() - Reserve page area
+ * @page: page to modify
+ * @cols: required columns (width)
+ * @rows: required rows (height)
+ * @attr: attributes for newly allocated cells
+ * @age: age to set on any modified cells
+ *
+ * This allocates the required amount of lines and cells to guarantee that the
+ * page has at least the demanded dimensions of @cols x @rows. Note that this
+ * never shrinks the page-memory. We keep cells allocated for performance
+ * reasons.
+ *
+ * Additionally to allocating lines, this also clears any newly added cells so
+ * you can safely change the size afterwards without clearing new cells.
+ *
+ * Note that you must be careful what operations you call on the page between
+ * page_reserve() and updating page->width/height. Any newly allocated line (or
+ * shifted line) might not meet your new width/height expectations.
+ *
+ * Returns: 0 on success, negative error code on failure.
+ */
+int term_page_reserve(term_page *page, unsigned int cols, unsigned int rows, const term_attr *attr, term_age_t age) {
+        _term_line_free_ term_line *line = NULL;
+        unsigned int i, min_lines;
+        term_line **t;
+        int r;
+
+        assert_return(page, -EINVAL);
+
+        /*
+         * First make sure the first MIN(page->n_lines, rows) lines have at
+         * least the required width of @cols. This does not modify any visible
+         * cells in the existing @page->width x @page->height area, therefore,
+         * we can safely bail out afterwards in case anything else fails.
+         * Note that lines in between page->height and page->n_lines might be
+         * shorter than page->width. Hence, we need to resize them all, but we
+         * can skip some of them for better performance.
+         */
+        min_lines = MIN(page->n_lines, rows);
+        for (i = 0; i < min_lines; ++i) {
+                /* lines below page->height have at least page->width cells */
+                if (cols < page->width && i < page->height)
+                        continue;
+
+                r = term_line_reserve(page->lines[i],
+                                      cols,
+                                      attr,
+                                      age,
+                                      (i < page->height) ? page->width : 0);
+                if (r < 0)
+                        return r;
+        }
+
+        /*
+         * We now know the first @min_lines lines have at least width @cols and
+         * are prepared for resizing. We now only have to allocate any
+         * additional lines below @min_lines in case @rows is greater than
+         * page->n_lines.
+         */
+        if (rows > page->n_lines) {
+                t = realloc_multiply(page->lines, sizeof(*t), rows);
+                if (!t)
+                        return -ENOMEM;
+                page->lines = t;
+
+                t = realloc_multiply(page->line_cache, sizeof(*t), rows);
+                if (!t)
+                        return -ENOMEM;
+                page->line_cache = t;
+
+                while (page->n_lines < rows) {
+                        r = term_line_new(&line);
+                        if (r < 0)
+                                return r;
+
+                        r = term_line_reserve(line, cols, attr, age, 0);
+                        if (r < 0)
+                                return r;
+
+                        page->lines[page->n_lines++] = line;
+                        line = NULL;
+                }
+        }
+
+        return 0;
+}
+
+/**
+ * term_page_resize() - Resize page
+ * @page: page to modify
+ * @cols: number of columns (width)
+ * @rows: number of rows (height)
+ * @attr: attributes for newly allocated cells
+ * @age: age to set on any modified cells
+ * @history: history buffer to use for new/old lines or NULL
+ *
+ * This changes the visible dimensions of a page. You must have called
+ * term_page_reserve() beforehand, otherwise, this will fail.
+ *
+ * Returns: 0 on success, negative error code on failure.
+ */
+void term_page_resize(term_page *page, unsigned int cols, unsigned int rows, const term_attr *attr, term_age_t age, term_history *history) {
+        unsigned int i, num, empty, max, old_height;
+        term_line *line;
+
+        assert(page);
+        assert(page->n_lines >= rows);
+
+        old_height = page->height;
+
+        if (rows < old_height) {
+                /*
+                 * If we decrease the terminal-height, we emulate a scroll-up.
+                 * This way, existing data from the scroll-area is moved into
+                 * the history, making space at the bottom to reduce the screen
+                 * height. In case the scroll-fill indicates empty lines, we
+                 * reduce the amount of scrolled lines.
+                 * Once scrolled, we have to move the lower margin from below
+                 * the scroll area up so it is preserved.
+                 */
+
+                /* move lines to history if scroll region is filled */
+                num = old_height - rows;
+                empty = page->scroll_num - page->scroll_fill;
+                if (num > empty)
+                        page_scroll_up(page,
+                                       cols,
+                                       num - empty,
+                                       attr,
+                                       age,
+                                       history);
+
+                /* move lower margin up; drop its lines if not enough space */
+                num = LESS_BY(old_height, page->scroll_idx + page->scroll_num);
+                max = LESS_BY(rows, page->scroll_idx);
+                num = MIN(num, max);
+                if (num > 0) {
+                        unsigned int top, bottom;
+
+                        top = rows - num;
+                        bottom = page->scroll_idx + page->scroll_num;
+
+                        /* might overlap; must run topdown, not bottomup */
+                        for (i = 0; i < num; ++i) {
+                                line = page->lines[top + i];
+                                page->lines[top + i] = page->lines[bottom + i];
+                                page->lines[bottom + i] = line;
+                        }
+                }
+
+                /* update vertical extents */
+                page->height = rows;
+                page->scroll_idx = MIN(page->scroll_idx, rows);
+                page->scroll_num -= MIN(page->scroll_num, old_height - rows);
+                /* fill is already up-to-date or 0 due to scroll-up */
+        } else if (rows > old_height) {
+                /*
+                 * If we increase the terminal-height, we emulate a scroll-down
+                 * and fetch new lines from the history.
+                 * New lines are always accounted to the scroll-region. Thus we
+                 * have to preserve the lower margin first, by moving it down.
+                 */
+
+                /* move lower margin down */
+                num = LESS_BY(old_height, page->scroll_idx + page->scroll_num);
+                if (num > 0) {
+                        unsigned int top, bottom;
+
+                        top = page->scroll_idx + page->scroll_num;
+                        bottom = top + (rows - old_height);
+
+                        /* might overlap; must run bottomup, not topdown */
+                        for (i = num; i-- > 0; ) {
+                                line = page->lines[top + i];
+                                page->lines[top + i] = page->lines[bottom + i];
+                                page->lines[bottom + i] = line;
+                        }
+                }
+
+                /* update vertical extents */
+                page->height = rows;
+                page->scroll_num = MIN(LESS_BY(rows, page->scroll_idx),
+                                       page->scroll_num + (rows - old_height));
+
+                /* check how many lines can be received from history */
+                if (history)
+                        num = term_history_peek(history,
+                                                rows - old_height,
+                                                cols,
+                                                attr,
+                                                age);
+                else
+                        num = 0;
+
+                /* retrieve new lines from history if available */
+                if (num > 0)
+                        page_scroll_down(page,
+                                         cols,
+                                         num,
+                                         attr,
+                                         age,
+                                         history);
+        }
+
+        /* set horizontal extents */
+        page->width = cols;
+        for (i = 0; i < page->height; ++i)
+                term_line_set_width(page->lines[i], cols);
+}
+
+/**
+ * term_page_write() - Write to a single cell
+ * @page: page to operate on
+ * @pos_x: x-position of cell to write to
+ * @pos_y: y-position of cell to write to
+ * @ch: character to write
+ * @cwidth: character-width of @ch
+ * @attr: attributes to set on the cell or NULL
+ * @age: age to use for all modifications
+ * @insert_mode: true if INSERT-MODE is enabled
+ *
+ * This writes a character to a specific cell. If the cell is beyond bounds,
+ * this is a no-op. @attr and @age are used to update the cell. @flags can be
+ * used to alter the behavior of this function.
+ *
+ * This is a wrapper around term_line_write().
+ *
+ * This call does not wrap around lines. That is, this only operates on a single
+ * line.
+ */
+void term_page_write(term_page *page, unsigned int pos_x, unsigned int pos_y, term_char_t ch, unsigned int cwidth, const term_attr *attr, term_age_t age, bool insert_mode) {
+        assert(page);
+
+        if (pos_y >= page->height)
+                return;
+
+        term_line_write(page->lines[pos_y], pos_x, ch, cwidth, attr, age, insert_mode);
+}
+
+/**
+ * term_page_insert_cells() - Insert cells into a line
+ * @page: page to operate on
+ * @from_x: x-position where to insert new cells
+ * @from_y: y-position where to insert new cells
+ * @num: number of cells to insert
+ * @attr: attributes to set on new cells or NULL
+ * @age: age to use for all modifications
+ *
+ * This inserts new cells into a given line. This is a wrapper around
+ * term_line_insert().
+ *
+ * This call does not wrap around lines. That is, this only operates on a single
+ * line.
+ */
+void term_page_insert_cells(term_page *page, unsigned int from_x, unsigned int from_y, unsigned int num, const term_attr *attr, term_age_t age) {
+        assert(page);
+
+        if (from_y >= page->height)
+                return;
+
+        term_line_insert(page->lines[from_y], from_x, num, attr, age);
+}
+
+/**
+ * term_page_delete_cells() - Delete cells from a line
+ * @page: page to operate on
+ * @from_x: x-position where to delete cells
+ * @from_y: y-position where to delete cells
+ * @num: number of cells to delete
+ * @attr: attributes to set on new cells or NULL
+ * @age: age to use for all modifications
+ *
+ * This deletes cells from a given line. This is a wrapper around
+ * term_line_delete().
+ *
+ * This call does not wrap around lines. That is, this only operates on a single
+ * line.
+ */
+void term_page_delete_cells(term_page *page, unsigned int from_x, unsigned int from_y, unsigned int num, const term_attr *attr, term_age_t age) {
+        assert(page);
+
+        if (from_y >= page->height)
+                return;
+
+        term_line_delete(page->lines[from_y], from_x, num, attr, age);
+}
+
+/**
+ * term_page_append_combchar() - Append combining-character to a cell
+ * @page: page to operate on
+ * @pos_x: x-position of target cell
+ * @pos_y: y-position of target cell
+ * @ucs4: combining character to append
+ * @age: age to use for all modifications
+ *
+ * This appends a combining-character to a specific cell. This is a wrapper
+ * around term_line_append_combchar().
+ */
+void term_page_append_combchar(term_page *page, unsigned int pos_x, unsigned int pos_y, uint32_t ucs4, term_age_t age) {
+        assert(page);
+
+        if (pos_y >= page->height)
+                return;
+
+        term_line_append_combchar(page->lines[pos_y], pos_x, ucs4, age);
+}
+
+/**
+ * term_page_erase() - Erase parts of a page
+ * @page: page to operate on
+ * @from_x: x-position where to start erasure (inclusive)
+ * @from_y: y-position where to start erasure (inclusive)
+ * @to_x: x-position where to stop erasure (inclusive)
+ * @to_y: y-position where to stop erasure (inclusive)
+ * @attr: attributes to set on cells
+ * @age: age to use for all modifications
+ * @keep_protected: true if protected cells should be kept
+ *
+ * This erases all cells starting at @from_x/@from_y up to @to_x/@to_y. Note
+ * that this wraps around line-boundaries so lines between @from_y and @to_y
+ * are cleared entirely.
+ *
+ * Lines outside the visible area are left untouched.
+ */
+void term_page_erase(term_page *page, unsigned int from_x, unsigned int from_y, unsigned int to_x, unsigned int to_y, const term_attr *attr, term_age_t age, bool keep_protected) {
+        unsigned int i, from, to;
+
+        assert(page);
+
+        for (i = from_y; i <= to_y && i < page->height; ++i) {
+                from = 0;
+                to = page->width;
+
+                if (i == from_y)
+                        from = from_x;
+                if (i == to_y)
+                        to = to_x;
+
+                term_line_erase(page->lines[i],
+                                from,
+                                LESS_BY(to, from),
+                                attr,
+                                age,
+                                keep_protected);
+        }
+}
+
+/**
+ * term_page_reset() - Reset page
+ * @page: page to modify
+ * @attr: attributes to set on cells
+ * @age: age to use for all modifications
+ *
+ * This erases the whole visible page. See term_page_erase().
+ */
+void term_page_reset(term_page *page, const term_attr *attr, term_age_t age) {
+        assert(page);
+
+        return term_page_erase(page,
+                               0, 0,
+                               page->width - 1, page->height - 1,
+                               attr,
+                               age,
+                               0);
+}
+
+/**
+ * term_page_set_scroll_region() - Set scroll region
+ * @page: page to operate on
+ * @idx: start-index of scroll region
+ * @num: number of lines in scroll region
+ *
+ * This sets the scroll region of a page. Whenever an operation needs to scroll
+ * lines, it scrolls them inside of that region. Lines outside the region are
+ * left untouched. In case a scroll-operation is targeted outside of this
+ * region, it will implicitly get a scroll-region of only one line (i.e., no
+ * scroll region at all).
+ *
+ * Note that the scroll-region is clipped to the current page-extents. Growing
+ * or shrinking the page always accounts new/old lines to the scroll region and
+ * moves top/bottom margins accordingly so they're preserved.
+ */
+void term_page_set_scroll_region(term_page *page, unsigned int idx, unsigned int num) {
+        assert(page);
+
+        if (page->height < 1) {
+                page->scroll_idx = 0;
+                page->scroll_num = 0;
+        } else {
+                page->scroll_idx = MIN(idx, page->height - 1);
+                page->scroll_num = MIN(num, page->height - page->scroll_idx);
+        }
+}
+
+/**
+ * term_page_scroll_up() - Scroll up
+ * @page: page to operate on
+ * @num: number of lines to scroll up
+ * @attr: attributes to set on new lines
+ * @age: age to use for all modifications
+ * @history: history to use for old lines or NULL
+ *
+ * This scrolls the scroll-region by @num lines. New lines are cleared and reset
+ * with the given attributes. Old lines are moved into the history if non-NULL.
+ *
+ * If the scroll-region is empty, this is a no-op.
+ */
+void term_page_scroll_up(term_page *page, unsigned int num, const term_attr *attr, term_age_t age, term_history *history) {
+        page_scroll_up(page, page->width, num, attr, age, history);
+}
+
+/**
+ * term_page_scroll_down() - Scroll down
+ * @page: page to operate on
+ * @num: number of lines to scroll down
+ * @attr: attributes to set on new lines
+ * @age: age to use for all modifications
+ * @history: history to use for new lines or NULL
+ *
+ * This scrolls the scroll-region by @num lines. New lines are retrieved from
+ * the history or cleared if the history is empty or NULL.
+ *
+ * Usually, scroll-down implies that new lines are cleared. Therefore, you're
+ * highly encouraged to set @history to NULL. However, if you resize a terminal,
+ * you might want to include history-lines in the new area. In that case, you
+ * should set @history to non-NULL.
+ *
+ * If the scroll-region is empty, this is a no-op.
+ */
+void term_page_scroll_down(term_page *page, unsigned int num, const term_attr *attr, term_age_t age, term_history *history) {
+        page_scroll_down(page, page->width, num, attr, age, history);
+}
+
+/**
+ * term_page_insert_lines() - Insert new lines
+ * @page: page to operate on
+ * @pos_y: y-position where to insert new lines
+ * @num: number of lines to insert
+ * @attr: attributes to set on new lines
+ * @age: age to use for all modifications
+ *
+ * This inserts @num new lines at position @pos_y. If @pos_y is beyond
+ * boundaries or @num is 0, this is a no-op.
+ * All lines below @pos_y are moved down to make space for the new lines. Lines
+ * on the bottom are dropped. Note that this only moves lines above or inside
+ * the scroll-region. If @pos_y is below the scroll-region, a scroll-region of
+ * one line is implied (which means the line is simply cleared).
+ */
+void term_page_insert_lines(term_page *page, unsigned int pos_y, unsigned int num, const term_attr *attr, term_age_t age) {
+        unsigned int scroll_idx, scroll_num;
+
+        assert(page);
+
+        if (pos_y >= page->height)
+                return;
+        if (num >= page->height)
+                num = page->height;
+
+        /* remember scroll-region */
+        scroll_idx = page->scroll_idx;
+        scroll_num = page->scroll_num;
+
+        /* set scroll-region temporarily so we can reuse scroll_down() */
+        {
+                page->scroll_idx = pos_y;
+                if (pos_y >= scroll_idx + scroll_num)
+                        page->scroll_num = 1;
+                else if (pos_y >= scroll_idx)
+                        page->scroll_num -= pos_y - scroll_idx;
+                else
+                        page->scroll_num += scroll_idx - pos_y;
+
+                term_page_scroll_down(page, num, attr, age, NULL);
+        }
+
+        /* reset scroll-region */
+        page->scroll_idx = scroll_idx;
+        page->scroll_num = scroll_num;
+}
+
+/**
+ * term_page_delete_lines() - Delete lines
+ * @page: page to operate on
+ * @pos_y: y-position where to delete lines
+ * @num: number of lines to delete
+ * @attr: attributes to set on new lines
+ * @age: age to use for all modifications
+ *
+ * This deletes @num lines at position @pos_y. If @pos_y is beyond boundaries or
+ * @num is 0, this is a no-op.
+ * All lines below @pos_y are moved up into the newly made space. New lines
+ * on the bottom are clear. Note that this only moves lines above or inside
+ * the scroll-region. If @pos_y is below the scroll-region, a scroll-region of
+ * one line is implied (which means the line is simply cleared).
+ */
+void term_page_delete_lines(term_page *page, unsigned int pos_y, unsigned int num, const term_attr *attr, term_age_t age) {
+        unsigned int scroll_idx, scroll_num;
+
+        assert(page);
+
+        if (pos_y >= page->height)
+                return;
+        if (num >= page->height)
+                num = page->height;
+
+        /* remember scroll-region */
+        scroll_idx = page->scroll_idx;
+        scroll_num = page->scroll_num;
+
+        /* set scroll-region temporarily so we can reuse scroll_up() */
+        {
+                page->scroll_idx = pos_y;
+                if (pos_y >= scroll_idx + scroll_num)
+                        page->scroll_num = 1;
+                else if (pos_y > scroll_idx)
+                        page->scroll_num -= pos_y - scroll_idx;
+                else
+                        page->scroll_num += scroll_idx - pos_y;
+
+                term_page_scroll_up(page, num, attr, age, NULL);
+        }
+
+        /* reset scroll-region */
+        page->scroll_idx = scroll_idx;
+        page->scroll_num = scroll_num;
+}
+
+/**
+ * term_history_new() - Create new history object
+ * @out: storage for pointer to new history
+ *
+ * Create a new history object. Histories are used to store scrollback-lines
+ * from VTE pages. You're highly recommended to set a history-limit on
+ * history->max_lines and trim it via term_history_trim(), otherwise history
+ * allocations are unlimited.
+ *
+ * Returns: 0 on success, negative error code on failure.
+ */
+int term_history_new(term_history **out) {
+        _term_history_free_ term_history *history = NULL;
+
+        assert_return(out, -EINVAL);
+
+        history = new0(term_history, 1);
+        if (!history)
+                return -ENOMEM;
+
+        history->max_lines = 4096;
+
+        *out = history;
+        history = NULL;
+        return 0;
+}
+
+/**
+ * term_history_free() - Free history
+ * @history: history to free
+ *
+ * Clear and free history. You must not access the object afterwards.
+ *
+ * Returns: NULL
+ */
+term_history *term_history_free(term_history *history) {
+        if (!history)
+                return NULL;
+
+        term_history_clear(history);
+        free(history);
+        return NULL;
+}
+
+/**
+ * term_history_clear() - Clear history
+ * @history: history to clear
+ *
+ * Remove all linked lines from a history and reset it to its initial state.
+ */
+void term_history_clear(term_history *history) {
+        return term_history_trim(history, 0);
+}
+
+/**
+ * term_history_trim() - Trim history
+ * @history: history to trim
+ * @max: maximum number of lines to be left in history
+ *
+ * This removes lines from the history until it is smaller than @max. Lines are
+ * removed from the top.
+ */
+void term_history_trim(term_history *history, unsigned int max) {
+        term_line *line;
+
+        if (!history)
+                return;
+
+        while (history->n_lines > max && (line = history->lines_first)) {
+                TERM_LINE_UNLINK(line, history);
+                term_line_free(line);
+                --history->n_lines;
+        }
+}
+
+/**
+ * term_history_push() - Push line into history
+ * @history: history to work on
+ * @line: line to push into history
+ *
+ * This pushes a line into the given history. It is linked at the tail. In case
+ * the history is limited, the top-most line might be freed.
+ */
+void term_history_push(term_history *history, term_line *line) {
+        assert(history);
+        assert(line);
+
+        TERM_LINE_LINK_TAIL(line, history);
+        if (history->max_lines > 0 && history->n_lines >= history->max_lines) {
+                line = history->lines_first;
+                TERM_LINE_UNLINK(line, history);
+                term_line_free(line);
+        } else {
+                ++history->n_lines;
+        }
+}
+
+/**
+ * term_history_pop() - Retrieve last line from history
+ * @history: history to work on
+ * @new_width: width to reserve and set on the line
+ * @attr: attributes to use for cell reservation
+ * @age: age to use for cell reservation
+ *
+ * This unlinks the last linked line of the history and returns it. This also
+ * makes sure the line has the given width pre-allocated (see
+ * term_line_reserve()). If the pre-allocation fails, this returns NULL, so it
+ * is treated like there's no line in history left. This simplifies
+ * history-handling on the caller's side in case of allocation errors. No need
+ * to throw lines away just because the reservation failed. We can keep them in
+ * history safely, and make them available as scrollback.
+ *
+ * Returns: Line from history or NULL
+ */
+term_line *term_history_pop(term_history *history, unsigned int new_width, const term_attr *attr, term_age_t age) {
+        term_line *line;
+        int r;
+
+        assert_return(history, NULL);
+
+        line = history->lines_last;
+        if (!line)
+                return NULL;
+
+        r = term_line_reserve(line, new_width, attr, age, line->width);
+        if (r < 0)
+                return NULL;
+
+        term_line_set_width(line, new_width);
+        TERM_LINE_UNLINK(line, history);
+        --history->n_lines;
+
+        return line;
+}
+
+/**
+ * term_history_peek() - Return number of available history-lines
+ * @history: history to work on
+ * @max: maximum number of lines to look at
+ * @reserve_width: width to reserve on the line
+ * @attr: attributes to use for cell reservation
+ * @age: age to use for cell reservation
+ *
+ * This returns the number of available lines in the history given as @history.
+ * It returns at most @max. For each line that is looked at, the line is
+ * verified to have at least @reserve_width cells. Valid cells are preserved,
+ * new cells are initialized with @attr and @age. In case an allocation fails,
+ * we bail out and return the number of lines that are valid so far.
+ *
+ * Usually, this function should be used before running a loop on
+ * term_history_pop(). This function guarantees that term_history_pop() (with
+ * the same arguments) will succeed at least the returned number of times.
+ *
+ * Returns: Number of valid lines that can be received via term_history_pop().
+ */
+unsigned int term_history_peek(term_history *history, unsigned int max, unsigned int reserve_width, const term_attr *attr, term_age_t age) {
+        unsigned int num;
+        term_line *line;
+        int r;
+
+        assert(history);
+
+        num = 0;
+        line = history->lines_last;
+
+        while (num < max && line) {
+                r = term_line_reserve(line, reserve_width, attr, age, line->width);
+                if (r < 0)
+                        break;
+
+                ++num;
+                line = line->lines_prev;
+        }
+
+        return num;
+}
diff --git a/src/libsystemd-terminal/term-parser.c b/src/libsystemd-terminal/term-parser.c
new file mode 100644 (file)
index 0000000..d8206a4
--- /dev/null
@@ -0,0 +1,1745 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Terminal Parser
+ * This file contains a bunch of UTF-8 helpers and the main ctlseq-parser. The
+ * parser is a simple state-machine that correctly parses all CSI, DCS, OSC, ST
+ * control sequences and generic escape sequences.
+ * The parser itself does not perform any actions but lets the caller react to
+ * detected sequences.
+ */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "macro.h"
+#include "term-internal.h"
+#include "util.h"
+
+static const uint8_t default_palette[18][3] = {
+        {   0,   0,   0 }, /* black */
+        { 205,   0,   0 }, /* red */
+        {   0, 205,   0 }, /* green */
+        { 205, 205,   0 }, /* yellow */
+        {   0,   0, 238 }, /* blue */
+        { 205,   0, 205 }, /* magenta */
+        {   0, 205, 205 }, /* cyan */
+        { 229, 229, 229 }, /* light grey */
+        { 127, 127, 127 }, /* dark grey */
+        { 255,   0,   0 }, /* light red */
+        {   0, 255,   0 }, /* light green */
+        { 255, 255,   0 }, /* light yellow */
+        {  92,  92, 255 }, /* light blue */
+        { 255,   0, 255 }, /* light magenta */
+        {   0, 255, 255 }, /* light cyan */
+        { 255, 255, 255 }, /* white */
+
+        { 229, 229, 229 }, /* light grey */
+        {   0,   0,   0 }, /* black */
+};
+
+static uint32_t term_color_to_argb32(const term_color *color, const term_attr *attr, const uint8_t *palette) {
+        static const uint8_t bval[] = {
+                0x00, 0x5f, 0x87,
+                0xaf, 0xd7, 0xff,
+        };
+        uint8_t r, g, b, t;
+
+        assert(color);
+
+        if (!palette)
+                palette = (void*)default_palette;
+
+        switch (color->ccode) {
+        case TERM_CCODE_RGB:
+                r = color->red;
+                g = color->green;
+                b = color->blue;
+
+                break;
+        case TERM_CCODE_256:
+                t = color->c256;
+                if (t < 16) {
+                        r = palette[t * 3 + 0];
+                        g = palette[t * 3 + 1];
+                        b = palette[t * 3 + 2];
+                } else if (t < 232) {
+                        t -= 16;
+                        b = bval[t % 6];
+                        t /= 6;
+                        g = bval[t % 6];
+                        t /= 6;
+                        r = bval[t % 6];
+                } else {
+                        t = (t - 232) * 10 + 8;
+                        r = t;
+                        g = t;
+                        b = t;
+                }
+
+                break;
+        case TERM_CCODE_BLACK ... TERM_CCODE_LIGHT_WHITE:
+                t = color->ccode - TERM_CCODE_BLACK;
+
+                /* bold causes light colors (only for foreground colors) */
+                if (t < 8 && attr->bold && color == &attr->fg)
+                        t += 8;
+
+                r = palette[t * 3 + 0];
+                g = palette[t * 3 + 1];
+                b = palette[t * 3 + 2];
+                break;
+        case TERM_CCODE_DEFAULT:
+                /* fallthrough */
+        default:
+                t = 16 + !(color == &attr->fg);
+                r = palette[t * 3 + 0];
+                g = palette[t * 3 + 1];
+                b = palette[t * 3 + 2];
+                break;
+        }
+
+        return (0xff << 24) | (r << 16) | (g << 8) | b;
+}
+
+/**
+ * term_attr_to_argb32() - Encode terminal colors as native ARGB32 value
+ * @color: Terminal attributes to work on
+ * @fg: Storage for foreground color (or NULL)
+ * @bg: Storage for background color (or NULL)
+ * @palette: The color palette to use (or NULL for default)
+ *
+ * This encodes the colors attr->fg and attr->bg as native-endian ARGB32 values
+ * and returns them. Any color conversions are automatically applied.
+ */
+void term_attr_to_argb32(const term_attr *attr, uint32_t *fg, uint32_t *bg, const uint8_t *palette) {
+        uint32_t f, b, t;
+
+        assert(attr);
+
+        f = term_color_to_argb32(&attr->fg, attr, palette);
+        b = term_color_to_argb32(&attr->bg, attr, palette);
+
+        if (attr->inverse) {
+                t = f;
+                f = b;
+                b = t;
+        }
+
+        if (fg)
+                *fg = f;
+        if (bg)
+                *bg = b;
+}
+
+/**
+ * term_utf8_encode() - Encode single UCS-4 character as UTF-8
+ * @out_utf8: output buffer of at least 4 bytes or NULL
+ * @g: UCS-4 character to encode
+ *
+ * This encodes a single UCS-4 character as UTF-8 and writes it into @out_utf8.
+ * The length of the character is returned. It is not zero-terminated! If the
+ * output buffer is NULL, only the length is returned.
+ *
+ * Returns: The length in bytes that the UTF-8 representation does or would
+ *          occupy.
+ */
+size_t term_utf8_encode(char *out_utf8, uint32_t g) {
+        if (g < (1 << 7)) {
+                if (out_utf8)
+                        out_utf8[0] = g & 0x7f;
+                return 1;
+        } else if (g < (1 << 11)) {
+                if (out_utf8) {
+                        out_utf8[0] = 0xc0 | ((g >> 6) & 0x1f);
+                        out_utf8[1] = 0x80 | (g & 0x3f);
+                }
+                return 2;
+        } else if (g < (1 << 16)) {
+                if (out_utf8) {
+                        out_utf8[0] = 0xe0 | ((g >> 12) & 0x0f);
+                        out_utf8[1] = 0x80 | ((g >> 6) & 0x3f);
+                        out_utf8[2] = 0x80 | (g & 0x3f);
+                }
+                return 3;
+        } else if (g < (1 << 21)) {
+                if (out_utf8) {
+                        out_utf8[0] = 0xf0 | ((g >> 18) & 0x07);
+                        out_utf8[1] = 0x80 | ((g >> 12) & 0x3f);
+                        out_utf8[2] = 0x80 | ((g >> 6) & 0x3f);
+                        out_utf8[3] = 0x80 | (g & 0x3f);
+                }
+                return 4;
+        } else {
+                return 0;
+        }
+}
+
+/**
+ * term_utf8_decode() - Try decoding the next UCS-4 character
+ * @p: decoder object to operate on or NULL
+ * @out_len: output storage for pointer to decoded UCS-4 string or NULL
+ * @c: next char to push into decoder
+ *
+ * This decodes a UTF-8 stream. It must be called for each input-byte of the
+ * UTF-8 stream and returns a UCS-4 stream. A pointer to the parsed UCS-4
+ * string is stored in @out_buf if non-NULL. The length of this string (number
+ * of parsed UCS4 characters) is returned as result. The string is not
+ * zero-terminated! Furthermore, the string is only valid until the next
+ * invocation of this function. It is also bound to the parser state @p and
+ * must not be freed nor written to by the caller.
+ *
+ * This function is highly optimized to work with terminal-emulators. Instead
+ * of being strict about UTF-8 validity, this tries to perform a fallback to
+ * ISO-8859-1 in case a wrong series was detected. Therefore, this function
+ * might return multiple UCS-4 characters by parsing just a single UTF-8 byte.
+ *
+ * The parser state @p should be allocated and managed by the caller. There're
+ * no helpers to do that for you. To initialize it, simply reset it to all
+ * zero. You can reset or free the object at any point in time.
+ *
+ * Returns: Number of parsed UCS4 characters
+ */
+size_t term_utf8_decode(term_utf8 *p, uint32_t **out_buf, char c) {
+        static uint32_t ucs4_null = 0;
+        uint32_t t, *res = NULL;
+        uint8_t byte;
+        size_t len = 0;
+
+        if (!p)
+                goto out;
+
+        byte = c;
+
+        if (!p->valid || p->i_bytes >= p->n_bytes) {
+                /*
+                 * If the previous sequence was invalid or fully parsed, start
+                 * parsing a fresh new sequence.
+                 */
+
+                if ((byte & 0xE0) == 0xC0) {
+                        /* start of two byte sequence */
+                        t = byte & 0x1F;
+                        p->n_bytes = 2;
+                        p->i_bytes = 1;
+                        p->valid = 1;
+                } else if ((byte & 0xF0) == 0xE0) {
+                        /* start of three byte sequence */
+                        t = byte & 0x0F;
+                        p->n_bytes = 3;
+                        p->i_bytes = 1;
+                        p->valid = 1;
+                } else if ((byte & 0xF8) == 0xF0) {
+                        /* start of four byte sequence */
+                        t = byte & 0x07;
+                        p->n_bytes = 4;
+                        p->i_bytes = 1;
+                        p->valid = 1;
+                } else {
+                        /* Either of:
+                         *  - single ASCII 7-bit char
+                         *  - out-of-sync continuation byte
+                         *  - overlong encoding
+                         * All of them are treated as single byte ISO-8859-1 */
+                        t = byte;
+                        p->n_bytes = 1;
+                        p->i_bytes = 1;
+                        p->valid = 0;
+                }
+
+                p->chars[0] = byte;
+                p->ucs4 = t << (6 * (p->n_bytes - p->i_bytes));
+        } else {
+                /*
+                 * ..otherwise, try to continue the previous sequence..
+                 */
+
+                if ((byte & 0xC0) == 0x80) {
+                        /*
+                         * Valid continuation byte. Append to sequence and
+                         * update the ucs4 cache accordingly.
+                         */
+
+                        t = byte & 0x3F;
+                        p->chars[p->i_bytes++] = byte;
+                        p->ucs4 |= t << (6 * (p->n_bytes - p->i_bytes));
+                } else {
+                        /*
+                         * Invalid continuation? Treat cached sequence as
+                         * ISO-8859-1, but parse the new char as valid new
+                         * starting character. If it's a new single-byte UTF-8
+                         * sequence, we immediately return it in the same run,
+                         * otherwise, we might suffer from starvation.
+                         */
+
+                        if ((byte & 0xE0) == 0xC0 ||
+                            (byte & 0xF0) == 0xE0 ||
+                            (byte & 0xF8) == 0xF0) {
+                                /*
+                                 * New multi-byte sequence. Move to-be-returned
+                                 * data at the end and start new sequence. Only
+                                 * return the old sequence.
+                                 */
+
+                                memmove(p->chars + 1,
+                                        p->chars,
+                                        sizeof(*p->chars) * p->i_bytes);
+                                res = p->chars + 1;
+                                len = p->i_bytes;
+
+                                if ((byte & 0xE0) == 0xC0) {
+                                        /* start of two byte sequence */
+                                        t = byte & 0x1F;
+                                        p->n_bytes = 2;
+                                        p->i_bytes = 1;
+                                        p->valid = 1;
+                                } else if ((byte & 0xF0) == 0xE0) {
+                                        /* start of three byte sequence */
+                                        t = byte & 0x0F;
+                                        p->n_bytes = 3;
+                                        p->i_bytes = 1;
+                                        p->valid = 1;
+                                } else if ((byte & 0xF8) == 0xF0) {
+                                        /* start of four byte sequence */
+                                        t = byte & 0x07;
+                                        p->n_bytes = 4;
+                                        p->i_bytes = 1;
+                                        p->valid = 1;
+                                } else
+                                        assert_not_reached("Should not happen");
+
+                                p->chars[0] = byte;
+                                p->ucs4 = t << (6 * (p->n_bytes - p->i_bytes));
+
+                                goto out;
+                        } else {
+                                /*
+                                 * New single byte sequence, append to output
+                                 * and return combined sequence.
+                                 */
+
+                                p->chars[p->i_bytes++] = byte;
+                                p->valid = 0;
+                        }
+                }
+        }
+
+        /*
+         * Check whether a full sequence (valid or invalid) has been parsed and
+         * then return it. Otherwise, return nothing.
+         */
+        if (p->valid) {
+                /* still parsing? then bail out */
+                if (p->i_bytes < p->n_bytes)
+                        goto out;
+
+                res = &p->ucs4;
+                len = 1;
+        } else {
+                res = p->chars;
+                len = p->i_bytes;
+        }
+
+        p->valid = 0;
+        p->i_bytes = 0;
+        p->n_bytes = 0;
+
+out:
+        if (out_buf)
+                *out_buf = res ? : &ucs4_null;
+        return len;
+}
+
+/*
+ * Command Parser
+ * The ctl-seq parser "term_parser" only detects whole sequences, it does not
+ * detect the specific command. Once a sequence is parsed, the command-parsers
+ * are used to figure out their meaning. Note that this depends on whether we
+ * run on the host or terminal side.
+ */
+
+static unsigned int term_parse_host_control(const term_seq *seq) {
+        assert_return(seq, TERM_CMD_NONE);
+
+        switch (seq->terminator) {
+        case 0x00: /* NUL */
+                return TERM_CMD_NULL;
+        case 0x05: /* ENQ */
+                return TERM_CMD_ENQ;
+        case 0x07: /* BEL */
+                return TERM_CMD_BEL;
+        case 0x08: /* BS */
+                return TERM_CMD_BS;
+        case 0x09: /* HT */
+                return TERM_CMD_HT;
+        case 0x0a: /* LF */
+                return TERM_CMD_LF;
+        case 0x0b: /* VT */
+                return TERM_CMD_VT;
+        case 0x0c: /* FF */
+                return TERM_CMD_FF;
+        case 0x0d: /* CR */
+                return TERM_CMD_CR;
+        case 0x0e: /* SO */
+                return TERM_CMD_SO;
+        case 0x0f: /* SI */
+                return TERM_CMD_SI;
+        case 0x11: /* DC1 */
+                return TERM_CMD_DC1;
+        case 0x13: /* DC3 */
+                return TERM_CMD_DC3;
+        case 0x18: /* CAN */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x1a: /* SUB */
+                return TERM_CMD_SUB;
+        case 0x1b: /* ESC */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x1f: /* DEL */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x84: /* IND */
+                return TERM_CMD_IND;
+        case 0x85: /* NEL */
+                return TERM_CMD_NEL;
+        case 0x88: /* HTS */
+                return TERM_CMD_HTS;
+        case 0x8d: /* RI */
+                return TERM_CMD_RI;
+        case 0x8e: /* SS2 */
+                return TERM_CMD_SS2;
+        case 0x8f: /* SS3 */
+                return TERM_CMD_SS3;
+        case 0x90: /* DCS */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x96: /* SPA */
+                return TERM_CMD_SPA;
+        case 0x97: /* EPA */
+                return TERM_CMD_EPA;
+        case 0x98: /* SOS */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x9a: /* DECID */
+                return TERM_CMD_DECID;
+        case 0x9b: /* CSI */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x9c: /* ST */
+                return TERM_CMD_ST;
+        case 0x9d: /* OSC */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x9e: /* PM */
+                /* this is already handled by the state-machine */
+                break;
+        case 0x9f: /* APC */
+                /* this is already handled by the state-machine */
+                break;
+        }
+
+        return TERM_CMD_NONE;
+}
+
+static inline int charset_from_cmd(uint32_t raw, unsigned int flags, bool require_96) {
+        static const struct {
+                uint32_t raw;
+                unsigned int flags;
+        } charset_cmds[] = {
+                /* 96-compat charsets */
+                [TERM_CHARSET_ISO_LATIN1_SUPPLEMENTAL]   = { .raw = 'A', .flags = 0 },
+                [TERM_CHARSET_ISO_LATIN2_SUPPLEMENTAL]   = { .raw = 'B', .flags = 0 },
+                [TERM_CHARSET_ISO_LATIN5_SUPPLEMENTAL]   = { .raw = 'M', .flags = 0 },
+                [TERM_CHARSET_ISO_GREEK_SUPPLEMENTAL]    = { .raw = 'F', .flags = 0 },
+                [TERM_CHARSET_ISO_HEBREW_SUPPLEMENTAL]   = { .raw = 'H', .flags = 0 },
+                [TERM_CHARSET_ISO_LATIN_CYRILLIC]        = { .raw = 'L', .flags = 0 },
+
+                /* 94-compat charsets */
+                [TERM_CHARSET_DEC_SPECIAL_GRAPHIC]       = { .raw = '0', .flags = 0 },
+                [TERM_CHARSET_DEC_SUPPLEMENTAL]          = { .raw = '5', .flags = TERM_SEQ_FLAG_PERCENT },
+                [TERM_CHARSET_DEC_TECHNICAL]             = { .raw = '>', .flags = 0 },
+                [TERM_CHARSET_CYRILLIC_DEC]              = { .raw = '4', .flags = TERM_SEQ_FLAG_AND },
+                [TERM_CHARSET_DUTCH_NRCS]                = { .raw = '4', .flags = 0 },
+                [TERM_CHARSET_FINNISH_NRCS]              = { .raw = '5', .flags = 0 },
+                [TERM_CHARSET_FRENCH_NRCS]               = { .raw = 'R', .flags = 0 },
+                [TERM_CHARSET_FRENCH_CANADIAN_NRCS]      = { .raw = '9', .flags = 0 },
+                [TERM_CHARSET_GERMAN_NRCS]               = { .raw = 'K', .flags = 0 },
+                [TERM_CHARSET_GREEK_DEC]                 = { .raw = '?', .flags = TERM_SEQ_FLAG_DQUOTE },
+                [TERM_CHARSET_GREEK_NRCS]                = { .raw = '>', .flags = TERM_SEQ_FLAG_DQUOTE },
+                [TERM_CHARSET_HEBREW_DEC]                = { .raw = '4', .flags = TERM_SEQ_FLAG_DQUOTE },
+                [TERM_CHARSET_HEBREW_NRCS]               = { .raw = '=', .flags = TERM_SEQ_FLAG_PERCENT },
+                [TERM_CHARSET_ITALIAN_NRCS]              = { .raw = 'Y', .flags = 0 },
+                [TERM_CHARSET_NORWEGIAN_DANISH_NRCS]     = { .raw = '`', .flags = 0 },
+                [TERM_CHARSET_PORTUGUESE_NRCS]           = { .raw = '6', .flags = TERM_SEQ_FLAG_PERCENT },
+                [TERM_CHARSET_RUSSIAN_NRCS]              = { .raw = '5', .flags = TERM_SEQ_FLAG_AND },
+                [TERM_CHARSET_SCS_NRCS]                  = { .raw = '3', .flags = TERM_SEQ_FLAG_PERCENT },
+                [TERM_CHARSET_SPANISH_NRCS]              = { .raw = 'Z', .flags = 0 },
+                [TERM_CHARSET_SWEDISH_NRCS]              = { .raw = '7', .flags = 0 },
+                [TERM_CHARSET_SWISS_NRCS]                = { .raw = '=', .flags = 0 },
+                [TERM_CHARSET_TURKISH_DEC]               = { .raw = '0', .flags = TERM_SEQ_FLAG_PERCENT },
+                [TERM_CHARSET_TURKISH_NRCS]              = { .raw = '2', .flags = TERM_SEQ_FLAG_PERCENT },
+
+                /* special charsets */
+                [TERM_CHARSET_USERPREF_SUPPLEMENTAL]     = { .raw = '<', .flags = 0 },
+
+                /* secondary choices */
+                [TERM_CHARSET_CNT + TERM_CHARSET_FINNISH_NRCS]            = { .raw = 'C', .flags = 0 },
+                [TERM_CHARSET_CNT + TERM_CHARSET_FRENCH_NRCS]             = { .raw = 'f', .flags = 0 },
+                [TERM_CHARSET_CNT + TERM_CHARSET_FRENCH_CANADIAN_NRCS]    = { .raw = 'Q', .flags = 0 },
+                [TERM_CHARSET_CNT + TERM_CHARSET_NORWEGIAN_DANISH_NRCS]   = { .raw = 'E', .flags = 0 },
+                [TERM_CHARSET_CNT + TERM_CHARSET_SWEDISH_NRCS]            = { .raw = 'H', .flags = 0 }, /* unused; conflicts with ISO_HEBREW */
+
+                /* tertiary choices */
+                [TERM_CHARSET_CNT + TERM_CHARSET_CNT + TERM_CHARSET_NORWEGIAN_DANISH_NRCS] = { .raw = '6', .flags = 0 },
+        };
+        size_t i, cs;
+
+        /*
+         * Secondary choice on SWEDISH_NRCS and primary choice on
+         * ISO_HEBREW_SUPPLEMENTAL have a conflict: raw=="H", flags==0.
+         * We always choose the ISO 96-compat set, which is what VT510 does.
+         */
+
+        for (i = 0; i < ELEMENTSOF(charset_cmds); ++i) {
+                if (charset_cmds[i].raw == raw && charset_cmds[i].flags == flags) {
+                        cs = i;
+                        while (cs >= TERM_CHARSET_CNT)
+                                cs -= TERM_CHARSET_CNT;
+
+                        if (!require_96 || cs < TERM_CHARSET_96_CNT || cs >= TERM_CHARSET_94_CNT)
+                                return cs;
+                }
+        }
+
+        return -ENOENT;
+}
+
+/* true if exactly one bit in @value is set */
+static inline bool exactly_one_bit_set(unsigned int value) {
+        return __builtin_popcount(value) == 1;
+}
+
+static unsigned int term_parse_host_escape(const term_seq *seq, unsigned int *cs_out) {
+        unsigned int t, flags;
+        int cs;
+
+        assert_return(seq, TERM_CMD_NONE);
+
+        flags = seq->intermediates;
+        t = TERM_SEQ_FLAG_POPEN | TERM_SEQ_FLAG_PCLOSE | TERM_SEQ_FLAG_MULT |
+            TERM_SEQ_FLAG_PLUS  | TERM_SEQ_FLAG_MINUS  | TERM_SEQ_FLAG_DOT  |
+            TERM_SEQ_FLAG_SLASH;
+
+        if (exactly_one_bit_set(flags & t)) {
+                switch (flags & t) {
+                case TERM_SEQ_FLAG_POPEN:
+                case TERM_SEQ_FLAG_PCLOSE:
+                case TERM_SEQ_FLAG_MULT:
+                case TERM_SEQ_FLAG_PLUS:
+                        cs = charset_from_cmd(seq->terminator, flags & ~t, false);
+                        break;
+                case TERM_SEQ_FLAG_MINUS:
+                case TERM_SEQ_FLAG_DOT:
+                case TERM_SEQ_FLAG_SLASH:
+                        cs = charset_from_cmd(seq->terminator, flags & ~t, true);
+                        break;
+                default:
+                        cs = -ENOENT;
+                        break;
+                }
+
+                if (cs >= 0) {
+                        if (cs_out)
+                                *cs_out = cs;
+                        return TERM_CMD_SCS;
+                }
+
+                /* looked like a charset-cmd but wasn't; continue */
+        }
+
+        switch (seq->terminator) {
+        case '3':
+                if (flags == TERM_SEQ_FLAG_HASH) /* DECDHL top-half */
+                        return TERM_CMD_DECDHL_TH;
+                break;
+        case '4':
+                if (flags == TERM_SEQ_FLAG_HASH) /* DECDHL bottom-half */
+                        return TERM_CMD_DECDHL_BH;
+                break;
+        case '5':
+                if (flags == TERM_SEQ_FLAG_HASH) /* DECSWL */
+                        return TERM_CMD_DECSWL;
+                break;
+        case '6':
+                if (flags == 0) /* DECBI */
+                        return TERM_CMD_DECBI;
+                else if (flags == TERM_SEQ_FLAG_HASH) /* DECDWL */
+                        return TERM_CMD_DECDWL;
+                break;
+        case '7':
+                if (flags == 0) /* DECSC */
+                        return TERM_CMD_DECSC;
+                break;
+        case '8':
+                if (flags == 0) /* DECRC */
+                        return TERM_CMD_DECRC;
+                else if (flags == TERM_SEQ_FLAG_HASH) /* DECALN */
+                        return TERM_CMD_DECALN;
+                break;
+        case '9':
+                if (flags == 0) /* DECFI */
+                        return TERM_CMD_DECFI;
+                break;
+        case '<':
+                if (flags == 0) /* DECANM */
+                        return TERM_CMD_DECANM;
+                break;
+        case '=':
+                if (flags == 0) /* DECKPAM */
+                        return TERM_CMD_DECKPAM;
+                break;
+        case '>':
+                if (flags == 0) /* DECKPNM */
+                        return TERM_CMD_DECKPNM;
+                break;
+        case '@':
+                if (flags == TERM_SEQ_FLAG_PERCENT) {
+                        /* Select default character set */
+                        return TERM_CMD_XTERM_SDCS;
+                }
+                break;
+        case 'D':
+                if (flags == 0) /* IND */
+                        return TERM_CMD_IND;
+                break;
+        case 'E':
+                if (flags == 0) /* NEL */
+                        return TERM_CMD_NEL;
+                break;
+        case 'F':
+                if (flags == 0) /* Cursor to lower-left corner of screen */
+                        return TERM_CMD_XTERM_CLLHP;
+                else if (flags == TERM_SEQ_FLAG_SPACE) /* S7C1T */
+                        return TERM_CMD_S7C1T;
+                break;
+        case 'G':
+                if (flags == TERM_SEQ_FLAG_SPACE) { /* S8C1T */
+                        return TERM_CMD_S8C1T;
+                } else if (flags == TERM_SEQ_FLAG_PERCENT) {
+                        /* Select UTF-8 character set */
+                        return TERM_CMD_XTERM_SUCS;
+                }
+                break;
+        case 'H':
+                if (flags == 0) /* HTS */
+                        return TERM_CMD_HTS;
+                break;
+        case 'L':
+                if (flags == TERM_SEQ_FLAG_SPACE) {
+                        /* Set ANSI conformance level 1 */
+                        return TERM_CMD_XTERM_SACL1;
+                }
+                break;
+        case 'M':
+                if (flags == 0) { /* RI */
+                        return TERM_CMD_RI;
+                } else if (flags == TERM_SEQ_FLAG_SPACE) {
+                        /* Set ANSI conformance level 2 */
+                        return TERM_CMD_XTERM_SACL2;
+                }
+                break;
+        case 'N':
+                if (flags == 0) { /* SS2 */
+                        return TERM_CMD_SS2;
+                } else if (flags == TERM_SEQ_FLAG_SPACE) {
+                        /* Set ANSI conformance level 3 */
+                        return TERM_CMD_XTERM_SACL3;
+                }
+                break;
+        case 'O':
+                if (flags == 0) /* SS3 */
+                        return TERM_CMD_SS3;
+                break;
+        case 'P':
+                if (flags == 0) /* DCS: this is already handled by the state-machine */
+                        return 0;
+                break;
+        case 'V':
+                if (flags == 0) /* SPA */
+                        return TERM_CMD_SPA;
+                break;
+        case 'W':
+                if (flags == 0) /* EPA */
+                        return TERM_CMD_EPA;
+                break;
+        case 'X':
+                if (flags == 0) { /* SOS */
+                        /* this is already handled by the state-machine */
+                        break;
+                }
+                break;
+        case 'Z':
+                if (flags == 0) /* DECID */
+                        return TERM_CMD_DECID;
+                break;
+        case '[':
+                if (flags == 0) { /* CSI */
+                        /* this is already handled by the state-machine */
+                        break;
+                }
+                break;
+        case '\\':
+                if (flags == 0) /* ST */
+                        return TERM_CMD_ST;
+                break;
+        case ']':
+                if (flags == 0) { /* OSC */
+                        /* this is already handled by the state-machine */
+                        break;
+                }
+                break;
+        case '^':
+                if (flags == 0) { /* PM */
+                        /* this is already handled by the state-machine */
+                        break;
+                }
+                break;
+        case '_':
+                if (flags == 0) { /* APC */
+                        /* this is already handled by the state-machine */
+                        break;
+                }
+                break;
+        case 'c':
+                if (flags == 0) /* RIS */
+                        return TERM_CMD_RIS;
+                break;
+        case 'l':
+                if (flags == 0) /* Memory lock */
+                        return TERM_CMD_XTERM_MLHP;
+                break;
+        case 'm':
+                if (flags == 0) /* Memory unlock */
+                        return TERM_CMD_XTERM_MUHP;
+                break;
+        case 'n':
+                if (flags == 0) /* LS2 */
+                        return TERM_CMD_LS2;
+                break;
+        case 'o':
+                if (flags == 0) /* LS3 */
+                        return TERM_CMD_LS3;
+                break;
+        case '|':
+                if (flags == 0) /* LS3R */
+                        return TERM_CMD_LS3R;
+                break;
+        case '}':
+                if (flags == 0) /* LS2R */
+                        return TERM_CMD_LS2R;
+                break;
+        case '~':
+                if (flags == 0) /* LS1R */
+                        return TERM_CMD_LS1R;
+                break;
+        }
+
+        return TERM_CMD_NONE;
+}
+
+static unsigned int term_parse_host_csi(const term_seq *seq) {
+        unsigned int flags;
+
+        assert_return(seq, TERM_CMD_NONE);
+
+        flags = seq->intermediates;
+
+        switch (seq->terminator) {
+        case 'A':
+                if (flags == 0) /* CUU */
+                        return TERM_CMD_CUU;
+                break;
+        case 'a':
+                if (flags == 0) /* HPR */
+                        return TERM_CMD_HPR;
+                break;
+        case 'B':
+                if (flags == 0) /* CUD */
+                        return TERM_CMD_CUD;
+                break;
+        case 'b':
+                if (flags == 0) /* REP */
+                        return TERM_CMD_REP;
+                break;
+        case 'C':
+                if (flags == 0) /* CUF */
+                        return TERM_CMD_CUF;
+                break;
+        case 'c':
+                if (flags == 0) /* DA1 */
+                        return TERM_CMD_DA1;
+                else if (flags == TERM_SEQ_FLAG_GT) /* DA2 */
+                        return TERM_CMD_DA2;
+                else if (flags == TERM_SEQ_FLAG_EQUAL) /* DA3 */
+                        return TERM_CMD_DA3;
+                break;
+        case 'D':
+                if (flags == 0) /* CUB */
+                        return TERM_CMD_CUB;
+                break;
+        case 'd':
+                if (flags == 0) /* VPA */
+                        return TERM_CMD_VPA;
+                break;
+        case 'E':
+                if (flags == 0) /* CNL */
+                        return TERM_CMD_CNL;
+                break;
+        case 'e':
+                if (flags == 0) /* VPR */
+                        return TERM_CMD_VPR;
+                break;
+        case 'F':
+                if (flags == 0) /* CPL */
+                        return TERM_CMD_CPL;
+                break;
+        case 'f':
+                if (flags == 0) /* HVP */
+                        return TERM_CMD_HVP;
+                break;
+        case 'G':
+                if (flags == 0) /* CHA */
+                        return TERM_CMD_CHA;
+                break;
+        case 'g':
+                if (flags == 0) /* TBC */
+                        return TERM_CMD_TBC;
+                else if (flags == TERM_SEQ_FLAG_MULT) /* DECLFKC */
+                        return TERM_CMD_DECLFKC;
+                break;
+        case 'H':
+                if (flags == 0) /* CUP */
+                        return TERM_CMD_CUP;
+                break;
+        case 'h':
+                if (flags == 0) /* SM ANSI */
+                        return TERM_CMD_SM_ANSI;
+                else if (flags == TERM_SEQ_FLAG_WHAT) /* SM DEC */
+                        return TERM_CMD_SM_DEC;
+                break;
+        case 'I':
+                if (flags == 0) /* CHT */
+                        return TERM_CMD_CHT;
+                break;
+        case 'i':
+                if (flags == 0) /* MC ANSI */
+                        return TERM_CMD_MC_ANSI;
+                else if (flags == TERM_SEQ_FLAG_WHAT) /* MC DEC */
+                        return TERM_CMD_MC_DEC;
+                break;
+        case 'J':
+                if (flags == 0) /* ED */
+                        return TERM_CMD_ED;
+                else if (flags == TERM_SEQ_FLAG_WHAT) /* DECSED */
+                        return TERM_CMD_DECSED;
+                break;
+        case 'K':
+                if (flags == 0) /* EL */
+                        return TERM_CMD_EL;
+                else if (flags == TERM_SEQ_FLAG_WHAT) /* DECSEL */
+                        return TERM_CMD_DECSEL;
+                break;
+        case 'L':
+                if (flags == 0) /* IL */
+                        return TERM_CMD_IL;
+                break;
+        case 'l':
+                if (flags == 0) /* RM ANSI */
+                        return TERM_CMD_RM_ANSI;
+                else if (flags == TERM_SEQ_FLAG_WHAT) /* RM DEC */
+                        return TERM_CMD_RM_DEC;
+                break;
+        case 'M':
+                if (flags == 0) /* DL */
+                        return TERM_CMD_DL;
+                break;
+        case 'm':
+                if (flags == 0) /* SGR */
+                        return TERM_CMD_SGR;
+                else if (flags == TERM_SEQ_FLAG_GT) /* XTERM SMR */
+                        return TERM_CMD_XTERM_SRV;
+                break;
+        case 'n':
+                if (flags == 0) /* DSR ANSI */
+                        return TERM_CMD_DSR_ANSI;
+                else if (flags == TERM_SEQ_FLAG_GT) /* XTERM RMR */
+                        return TERM_CMD_XTERM_RRV;
+                else if (flags == TERM_SEQ_FLAG_WHAT) /* DSR DEC */
+                        return TERM_CMD_DSR_DEC;
+                break;
+        case 'P':
+                if (flags == 0) /* DCH */
+                        return TERM_CMD_DCH;
+                else if (flags == TERM_SEQ_FLAG_SPACE) /* PPA */
+                        return TERM_CMD_PPA;
+                break;
+        case 'p':
+                if (flags == 0) /* DECSSL */
+                        return TERM_CMD_DECSSL;
+                else if (flags == TERM_SEQ_FLAG_SPACE) /* DECSSCLS */
+                        return TERM_CMD_DECSSCLS;
+                else if (flags == TERM_SEQ_FLAG_BANG) /* DECSTR */
+                        return TERM_CMD_DECSTR;
+                else if (flags == TERM_SEQ_FLAG_DQUOTE) /* DECSCL */
+                        return TERM_CMD_DECSCL;
+                else if (flags == TERM_SEQ_FLAG_CASH) /* DECRQM-ANSI */
+                        return TERM_CMD_DECRQM_ANSI;
+                else if (flags == (TERM_SEQ_FLAG_CASH | TERM_SEQ_FLAG_WHAT)) /* DECRQM-DEC */
+                        return TERM_CMD_DECRQM_DEC;
+                else if (flags == TERM_SEQ_FLAG_PCLOSE) /* DECSDPT */
+                        return TERM_CMD_DECSDPT;
+                else if (flags == TERM_SEQ_FLAG_MULT) /* DECSPPCS */
+                        return TERM_CMD_DECSPPCS;
+                else if (flags == TERM_SEQ_FLAG_PLUS) /* DECSR */
+                        return TERM_CMD_DECSR;
+                else if (flags == TERM_SEQ_FLAG_COMMA) /* DECLTOD */
+                        return TERM_CMD_DECLTOD;
+                else if (flags == TERM_SEQ_FLAG_GT) /* XTERM SPM */
+                        return TERM_CMD_XTERM_SPM;
+                break;
+        case 'Q':
+                if (flags == TERM_SEQ_FLAG_SPACE) /* PPR */
+                        return TERM_CMD_PPR;
+                break;
+        case 'q':
+                if (flags == 0) /* DECLL */
+                        return TERM_CMD_DECLL;
+                else if (flags == TERM_SEQ_FLAG_SPACE) /* DECSCUSR */
+                        return TERM_CMD_DECSCUSR;
+                else if (flags == TERM_SEQ_FLAG_DQUOTE) /* DECSCA */
+                        return TERM_CMD_DECSCA;
+                else if (flags == TERM_SEQ_FLAG_CASH) /* DECSDDT */
+                        return TERM_CMD_DECSDDT;
+                else if (flags == TERM_SEQ_FLAG_MULT) /* DECSRC */
+                        return TERM_CMD_DECSR;
+                else if (flags == TERM_SEQ_FLAG_PLUS) /* DECELF */
+                        return TERM_CMD_DECELF;
+                else if (flags == TERM_SEQ_FLAG_COMMA) /* DECTID */
+                        return TERM_CMD_DECTID;
+                break;
+        case 'R':
+                if (flags == TERM_SEQ_FLAG_SPACE) /* PPB */
+                        return TERM_CMD_PPB;
+                break;
+        case 'r':
+                if (flags == 0) {
+                        /* DECSTBM */
+                        return TERM_CMD_DECSTBM;
+                } else if (flags == TERM_SEQ_FLAG_SPACE) {
+                        /* DECSKCV */
+                        return TERM_CMD_DECSKCV;
+                } else if (flags == TERM_SEQ_FLAG_CASH) {
+                        /* DECCARA */
+                        return TERM_CMD_DECCARA;
+                } else if (flags == TERM_SEQ_FLAG_MULT) {
+                        /* DECSCS */
+                        return TERM_CMD_DECSCS;
+                } else if (flags == TERM_SEQ_FLAG_PLUS) {
+                        /* DECSMKR */
+                        return TERM_CMD_DECSMKR;
+                } else if (flags == TERM_SEQ_FLAG_WHAT) {
+                        /*
+                         * There's a conflict between DECPCTERM and XTERM-RPM.
+                         * XTERM-RPM takes a single argument, DECPCTERM takes 2.
+                         * Split both up and forward the call to the closer
+                         * match.
+                         */
+                        if (seq->n_args <= 1) /* XTERM RPM */
+                                return TERM_CMD_XTERM_RPM;
+                        else if (seq->n_args >= 2) /* DECPCTERM */
+                                return TERM_CMD_DECPCTERM;
+                }
+                break;
+        case 'S':
+                if (flags == 0) /* SU */
+                        return TERM_CMD_SU;
+                else if (flags == TERM_SEQ_FLAG_WHAT) /* XTERM SGFX */
+                        return TERM_CMD_XTERM_SGFX;
+                break;
+        case 's':
+                if (flags == 0) {
+                        /*
+                         * There's a conflict between DECSLRM and SC-ANSI which
+                         * cannot be resolved without knowing the state of
+                         * DECLRMM. We leave that decision up to the caller.
+                         */
+                        return TERM_CMD_DECSLRM_OR_SC;
+                } else if (flags == TERM_SEQ_FLAG_CASH) {
+                        /* DECSPRTT */
+                        return TERM_CMD_DECSPRTT;
+                } else if (flags == TERM_SEQ_FLAG_MULT) {
+                        /* DECSFC */
+                        return TERM_CMD_DECSFC;
+                } else if (flags == TERM_SEQ_FLAG_WHAT) {
+                        /* XTERM SPM */
+                        return TERM_CMD_XTERM_SPM;
+                }
+                break;
+        case 'T':
+                if (flags == 0) {
+                        /*
+                         * Awesome: There's a conflict between SD and XTERM IHMT
+                         * that we have to resolve by checking the parameter
+                         * count.. XTERM_IHMT needs exactly 5 arguments, SD
+                         * takes 0 or 1. We're conservative here and give both
+                         * a wider range to allow unused arguments (compat...).
+                         */
+                        if (seq->n_args >= 5) {
+                                /* XTERM IHMT */
+                                return TERM_CMD_XTERM_IHMT;
+                        } else if (seq->n_args < 5) {
+                                /* SD */
+                                return TERM_CMD_SD;
+                        }
+                } else if (flags == TERM_SEQ_FLAG_GT) {
+                        /* XTERM RTM */
+                        return TERM_CMD_XTERM_RTM;
+                }
+                break;
+        case 't':
+                if (flags == 0) {
+                        if (seq->n_args > 0 && seq->args[0] < 24) {
+                                /* XTERM WM */
+                                return TERM_CMD_XTERM_WM;
+                        } else {
+                                /* DECSLPP */
+                                return TERM_CMD_DECSLPP;
+                        }
+                } else if (flags == TERM_SEQ_FLAG_SPACE) {
+                        /* DECSWBV */
+                        return TERM_CMD_DECSWBV;
+                } else if (flags == TERM_SEQ_FLAG_DQUOTE) {
+                        /* DECSRFR */
+                        return TERM_CMD_DECSRFR;
+                } else if (flags == TERM_SEQ_FLAG_CASH) {
+                        /* DECRARA */
+                        return TERM_CMD_DECRARA;
+                } else if (flags == TERM_SEQ_FLAG_GT) {
+                        /* XTERM STM */
+                        return TERM_CMD_XTERM_STM;
+                }
+                break;
+        case 'U':
+                if (flags == 0) /* NP */
+                        return TERM_CMD_NP;
+                break;
+        case 'u':
+                if (flags == 0) {
+                        /* RC */
+                        return TERM_CMD_RC;
+                } else if (flags == TERM_SEQ_FLAG_SPACE) {
+                        /* DECSMBV */
+                        return TERM_CMD_DECSMBV;
+                } else if (flags == TERM_SEQ_FLAG_DQUOTE) {
+                        /* DECSTRL */
+                        return TERM_CMD_DECSTRL;
+                } else if (flags == TERM_SEQ_FLAG_WHAT) {
+                        /* DECRQUPSS */
+                        return TERM_CMD_DECRQUPSS;
+                } else if (seq->args[0] == 1 && flags == TERM_SEQ_FLAG_CASH) {
+                        /* DECRQTSR */
+                        return TERM_CMD_DECRQTSR;
+                } else if (flags == TERM_SEQ_FLAG_MULT) {
+                        /* DECSCP */
+                        return TERM_CMD_DECSCP;
+                } else if (flags == TERM_SEQ_FLAG_COMMA) {
+                        /* DECRQKT */
+                        return TERM_CMD_DECRQKT;
+                }
+                break;
+        case 'V':
+                if (flags == 0) /* PP */
+                        return TERM_CMD_PP;
+                break;
+        case 'v':
+                if (flags == TERM_SEQ_FLAG_SPACE) /* DECSLCK */
+                        return TERM_CMD_DECSLCK;
+                else if (flags == TERM_SEQ_FLAG_DQUOTE) /* DECRQDE */
+                        return TERM_CMD_DECRQDE;
+                else if (flags == TERM_SEQ_FLAG_CASH) /* DECCRA */
+                        return TERM_CMD_DECCRA;
+                else if (flags == TERM_SEQ_FLAG_COMMA) /* DECRPKT */
+                        return TERM_CMD_DECRPKT;
+                break;
+        case 'W':
+                if (seq->args[0] == 5 && flags == TERM_SEQ_FLAG_WHAT) {
+                        /* DECST8C */
+                        return TERM_CMD_DECST8C;
+                }
+                break;
+        case 'w':
+                if (flags == TERM_SEQ_FLAG_CASH) /* DECRQPSR */
+                        return TERM_CMD_DECRQPSR;
+                else if (flags == TERM_SEQ_FLAG_SQUOTE) /* DECEFR */
+                        return TERM_CMD_DECEFR;
+                else if (flags == TERM_SEQ_FLAG_PLUS) /* DECSPP */
+                        return TERM_CMD_DECSPP;
+                break;
+        case 'X':
+                if (flags == 0) /* ECH */
+                        return TERM_CMD_ECH;
+                break;
+        case 'x':
+                if (flags == 0) /* DECREQTPARM */
+                        return TERM_CMD_DECREQTPARM;
+                else if (flags == TERM_SEQ_FLAG_CASH) /* DECFRA */
+                        return TERM_CMD_DECFRA;
+                else if (flags == TERM_SEQ_FLAG_MULT) /* DECSACE */
+                        return TERM_CMD_DECSACE;
+                else if (flags == TERM_SEQ_FLAG_PLUS) /* DECRQPKFM */
+                        return TERM_CMD_DECRQPKFM;
+                break;
+        case 'y':
+                if (flags == 0) /* DECTST */
+                        return TERM_CMD_DECTST;
+                else if (flags == TERM_SEQ_FLAG_MULT) /* DECRQCRA */
+                        return TERM_CMD_DECRQCRA;
+                else if (flags == TERM_SEQ_FLAG_PLUS) /* DECPKFMR */
+                        return TERM_CMD_DECPKFMR;
+                break;
+        case 'Z':
+                if (flags == 0) /* CBT */
+                        return TERM_CMD_CBT;
+                break;
+        case 'z':
+                if (flags == TERM_SEQ_FLAG_CASH) /* DECERA */
+                        return TERM_CMD_DECERA;
+                else if (flags == TERM_SEQ_FLAG_SQUOTE) /* DECELR */
+                        return TERM_CMD_DECELR;
+                else if (flags == TERM_SEQ_FLAG_MULT) /* DECINVM */
+                        return TERM_CMD_DECINVM;
+                else if (flags == TERM_SEQ_FLAG_PLUS) /* DECPKA */
+                        return TERM_CMD_DECPKA;
+                break;
+        case '@':
+                if (flags == 0) /* ICH */
+                        return TERM_CMD_ICH;
+                break;
+        case '`':
+                if (flags == 0) /* HPA */
+                        return TERM_CMD_HPA;
+                break;
+        case '{':
+                if (flags == TERM_SEQ_FLAG_CASH) /* DECSERA */
+                        return TERM_CMD_DECSERA;
+                else if (flags == TERM_SEQ_FLAG_SQUOTE) /* DECSLE */
+                        return TERM_CMD_DECSLE;
+                break;
+        case '|':
+                if (flags == TERM_SEQ_FLAG_CASH) /* DECSCPP */
+                        return TERM_CMD_DECSCPP;
+                else if (flags == TERM_SEQ_FLAG_SQUOTE) /* DECRQLP */
+                        return TERM_CMD_DECRQLP;
+                else if (flags == TERM_SEQ_FLAG_MULT) /* DECSNLS */
+                        return TERM_CMD_DECSNLS;
+                break;
+        case '}':
+                if (flags == TERM_SEQ_FLAG_SPACE) /* DECKBD */
+                        return TERM_CMD_DECKBD;
+                else if (flags == TERM_SEQ_FLAG_CASH) /* DECSASD */
+                        return TERM_CMD_DECSASD;
+                else if (flags == TERM_SEQ_FLAG_SQUOTE) /* DECIC */
+                        return TERM_CMD_DECIC;
+                break;
+        case '~':
+                if (flags == TERM_SEQ_FLAG_SPACE) /* DECTME */
+                        return TERM_CMD_DECTME;
+                else if (flags == TERM_SEQ_FLAG_CASH) /* DECSSDT */
+                        return TERM_CMD_DECSSDT;
+                else if (flags == TERM_SEQ_FLAG_SQUOTE) /* DECDC */
+                        return TERM_CMD_DECDC;
+                break;
+        }
+
+        return TERM_CMD_NONE;
+}
+
+/*
+ * State Machine
+ * This parser controls the parser-state and returns any detected sequence to
+ * the caller. The parser is based on this state-diagram from Paul Williams:
+ *   http://vt100.net/emu/
+ * It was written from scratch and extended where needed.
+ * This parser is fully compatible up to the vt500 series. We expect UCS-4 as
+ * input. It's the callers responsibility to do any UTF-8 parsing.
+ */
+
+enum parser_state {
+        STATE_NONE,             /* placeholder */
+        STATE_GROUND,           /* initial state and ground */
+        STATE_ESC,              /* ESC sequence was started */
+        STATE_ESC_INT,          /* intermediate escape characters */
+        STATE_CSI_ENTRY,        /* starting CSI sequence */
+        STATE_CSI_PARAM,        /* CSI parameters */
+        STATE_CSI_INT,          /* intermediate CSI characters */
+        STATE_CSI_IGNORE,       /* CSI error; ignore this CSI sequence */
+        STATE_DCS_ENTRY,        /* starting DCS sequence */
+        STATE_DCS_PARAM,        /* DCS parameters */
+        STATE_DCS_INT,          /* intermediate DCS characters */
+        STATE_DCS_PASS,         /* DCS data passthrough */
+        STATE_DCS_IGNORE,       /* DCS error; ignore this DCS sequence */
+        STATE_OSC_STRING,       /* parsing OSC sequence */
+        STATE_ST_IGNORE,        /* unimplemented seq; ignore until ST */
+        STATE_NUM
+};
+
+enum parser_action {
+        ACTION_NONE,            /* placeholder */
+        ACTION_CLEAR,           /* clear parameters */
+        ACTION_IGNORE,          /* ignore the character entirely */
+        ACTION_PRINT,           /* print the character on the console */
+        ACTION_EXECUTE,         /* execute single control character (C0/C1) */
+        ACTION_COLLECT,         /* collect intermediate character */
+        ACTION_PARAM,           /* collect parameter character */
+        ACTION_ESC_DISPATCH,    /* dispatch escape sequence */
+        ACTION_CSI_DISPATCH,    /* dispatch csi sequence */
+        ACTION_DCS_START,       /* start of DCS data */
+        ACTION_DCS_COLLECT,     /* collect DCS data */
+        ACTION_DCS_CONSUME,     /* consume DCS terminator */
+        ACTION_DCS_DISPATCH,    /* dispatch dcs sequence */
+        ACTION_OSC_START,       /* start of OSC data */
+        ACTION_OSC_COLLECT,     /* collect OSC data */
+        ACTION_OSC_CONSUME,     /* consume OSC terminator */
+        ACTION_OSC_DISPATCH,    /* dispatch osc sequence */
+        ACTION_NUM
+};
+
+int term_parser_new(term_parser **out, bool host) {
+        _term_parser_free_ term_parser *parser = NULL;
+
+        assert_return(out, -EINVAL);
+
+        parser = new0(term_parser, 1);
+        if (!parser)
+                return -ENOMEM;
+
+        parser->is_host = host;
+        parser->st_alloc = 64;
+        parser->seq.st = new0(char, parser->st_alloc + 1);
+        if (!parser->seq.st)
+                return -ENOMEM;
+
+        *out = parser;
+        parser = NULL;
+        return 0;
+}
+
+term_parser *term_parser_free(term_parser *parser) {
+        if (!parser)
+                return NULL;
+
+        free(parser->seq.st);
+        free(parser);
+        return NULL;
+}
+
+static inline void parser_clear(term_parser *parser) {
+        unsigned int i;
+
+        parser->seq.command = TERM_CMD_NONE;
+        parser->seq.terminator = 0;
+        parser->seq.intermediates = 0;
+        parser->seq.charset = TERM_CHARSET_NONE;
+        parser->seq.n_args = 0;
+        for (i = 0; i < TERM_PARSER_ARG_MAX; ++i)
+                parser->seq.args[i] = -1;
+
+        parser->seq.n_st = 0;
+        parser->seq.st[0] = 0;
+}
+
+static int parser_ignore(term_parser *parser, uint32_t raw) {
+        parser_clear(parser);
+        parser->seq.type = TERM_SEQ_IGNORE;
+        parser->seq.command = TERM_CMD_NONE;
+        parser->seq.terminator = raw;
+        parser->seq.charset = TERM_CHARSET_NONE;
+
+        return parser->seq.type;
+}
+
+static int parser_print(term_parser *parser, uint32_t raw) {
+        parser_clear(parser);
+        parser->seq.type = TERM_SEQ_GRAPHIC;
+        parser->seq.command = TERM_CMD_GRAPHIC;
+        parser->seq.terminator = raw;
+        parser->seq.charset = TERM_CHARSET_NONE;
+
+        return parser->seq.type;
+}
+
+static int parser_execute(term_parser *parser, uint32_t raw) {
+        parser_clear(parser);
+        parser->seq.type = TERM_SEQ_CONTROL;
+        parser->seq.command = TERM_CMD_GRAPHIC;
+        parser->seq.terminator = raw;
+        parser->seq.charset = TERM_CHARSET_NONE;
+        if (!parser->is_host)
+                parser->seq.command = term_parse_host_control(&parser->seq);
+
+        return parser->seq.type;
+}
+
+static void parser_collect(term_parser *parser, uint32_t raw) {
+        /*
+         * Usually, characters from 0x30 to 0x3f are only allowed as leading
+         * markers (or as part of the parameters), characters from 0x20 to 0x2f
+         * are only allowed as trailing markers. However, our state-machine
+         * already verifies those restrictions so we can handle them the same
+         * way here. Note that we safely allow markers to be specified multiple
+         * times.
+         */
+
+        if (raw >= 0x20 && raw <= 0x3f)
+                parser->seq.intermediates |= 1 << (raw - 0x20);
+}
+
+static void parser_param(term_parser *parser, uint32_t raw) {
+        int new;
+
+        if (raw == ';') {
+                if (parser->seq.n_args < TERM_PARSER_ARG_MAX)
+                        ++parser->seq.n_args;
+
+                return;
+        }
+
+        if (parser->seq.n_args >= TERM_PARSER_ARG_MAX)
+                return;
+
+        if (raw >= '0' && raw <= '9') {
+                new = parser->seq.args[parser->seq.n_args];
+                if (new < 0)
+                        new = 0;
+                new = new * 10 + raw - '0';
+
+                /* VT510 tells us to clamp all values to [0, 9999], however, it
+                 * also allows commands with values up to 2^15-1. We simply use
+                 * 2^16 as maximum here to be compatible to all commands, but
+                 * avoid overflows in any calculations. */
+                if (new > 0xffff)
+                        new = 0xffff;
+
+                parser->seq.args[parser->seq.n_args] = new;
+        }
+}
+
+static int parser_esc(term_parser *parser, uint32_t raw) {
+        parser->seq.type = TERM_SEQ_ESCAPE;
+        parser->seq.command = TERM_CMD_NONE;
+        parser->seq.terminator = raw;
+        parser->seq.charset = TERM_CHARSET_NONE;
+        if (!parser->is_host)
+                parser->seq.command = term_parse_host_escape(&parser->seq, &parser->seq.charset);
+
+        return parser->seq.type;
+}
+
+static int parser_csi(term_parser *parser, uint32_t raw) {
+        /* parser->seq is cleared during CSI-ENTER state, thus there's no need
+         * to clear invalid fields here. */
+
+        if (parser->seq.n_args < TERM_PARSER_ARG_MAX) {
+                if (parser->seq.n_args > 0 ||
+                    parser->seq.args[parser->seq.n_args] >= 0)
+                        ++parser->seq.n_args;
+        }
+
+        parser->seq.type = TERM_SEQ_CSI;
+        parser->seq.command = TERM_CMD_NONE;
+        parser->seq.terminator = raw;
+        parser->seq.charset = TERM_CHARSET_NONE;
+        if (!parser->is_host)
+                parser->seq.command = term_parse_host_csi(&parser->seq);
+
+        return parser->seq.type;
+}
+
+/* perform state transition and dispatch related actions */
+static int parser_transition(term_parser *parser, uint32_t raw, unsigned int state, unsigned int action) {
+        if (state != STATE_NONE)
+                parser->state = state;
+
+        switch (action) {
+        case ACTION_NONE:
+                return TERM_SEQ_NONE;
+        case ACTION_CLEAR:
+                parser_clear(parser);
+                return TERM_SEQ_NONE;
+        case ACTION_IGNORE:
+                return parser_ignore(parser, raw);
+        case ACTION_PRINT:
+                return parser_print(parser, raw);
+        case ACTION_EXECUTE:
+                return parser_execute(parser, raw);
+        case ACTION_COLLECT:
+                parser_collect(parser, raw);
+                return TERM_SEQ_NONE;
+        case ACTION_PARAM:
+                parser_param(parser, raw);
+                return TERM_SEQ_NONE;
+        case ACTION_ESC_DISPATCH:
+                return parser_esc(parser, raw);
+        case ACTION_CSI_DISPATCH:
+                return parser_csi(parser, raw);
+        case ACTION_DCS_START:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        case ACTION_DCS_COLLECT:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        case ACTION_DCS_CONSUME:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        case ACTION_DCS_DISPATCH:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        case ACTION_OSC_START:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        case ACTION_OSC_COLLECT:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        case ACTION_OSC_CONSUME:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        case ACTION_OSC_DISPATCH:
+                /* not implemented */
+                return TERM_SEQ_NONE;
+        default:
+                assert_not_reached("invalid vte-parser action");
+                return TERM_SEQ_NONE;
+        }
+}
+
+static int parser_feed_to_state(term_parser *parser, uint32_t raw) {
+        switch (parser->state) {
+        case STATE_NONE:
+                /*
+                 * During initialization, parser->state is cleared. Treat this
+                 * as STATE_GROUND. We will then never get to STATE_NONE again.
+                 */
+        case STATE_GROUND:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                case 0x80 ... 0x9b:     /* C1 \ { ST } */
+                case 0x9d ... 0x9f:
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_EXECUTE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_NONE, ACTION_PRINT);
+        case STATE_ESC:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_EXECUTE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_ESC_INT, ACTION_COLLECT);
+                case 0x30 ... 0x4f:     /* ['0' - '~'] \ { 'P', 'X', '[', ']', '^', '_' } */
+                case 0x51 ... 0x57:
+                case 0x59 ... 0x5a:
+                case 0x5c:
+                case 0x60 ... 0x7e:
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_ESC_DISPATCH);
+                case 0x50:              /* 'P' */
+                        return parser_transition(parser, raw, STATE_DCS_ENTRY, ACTION_CLEAR);
+                case 0x5b:              /* '[' */
+                        return parser_transition(parser, raw, STATE_CSI_ENTRY, ACTION_CLEAR);
+                case 0x5d:              /* ']' */
+                        return parser_transition(parser, raw, STATE_OSC_STRING, ACTION_CLEAR);
+                case 0x58:              /* 'X' */
+                case 0x5e:              /* '^' */
+                case 0x5f:              /* '_' */
+                        return parser_transition(parser, raw, STATE_ST_IGNORE, ACTION_NONE);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_ESC_INT, ACTION_COLLECT);
+        case STATE_ESC_INT:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_EXECUTE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_COLLECT);
+                case 0x30 ... 0x7e:     /* ['0' - '~'] */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_ESC_DISPATCH);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_NONE, ACTION_COLLECT);
+        case STATE_CSI_ENTRY:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_EXECUTE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_CSI_INT, ACTION_COLLECT);
+                case 0x3a:              /* ':' */
+                        return parser_transition(parser, raw, STATE_CSI_IGNORE, ACTION_NONE);
+                case 0x30 ... 0x39:     /* ['0' - '9'] */
+                case 0x3b:              /* ';' */
+                        return parser_transition(parser, raw, STATE_CSI_PARAM, ACTION_PARAM);
+                case 0x3c ... 0x3f:     /* ['<' - '?'] */
+                        return parser_transition(parser, raw, STATE_CSI_PARAM, ACTION_COLLECT);
+                case 0x40 ... 0x7e:     /* ['@' - '~'] */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_CSI_DISPATCH);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_CSI_IGNORE, ACTION_NONE);
+        case STATE_CSI_PARAM:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_EXECUTE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_CSI_INT, ACTION_COLLECT);
+                case 0x30 ... 0x39:     /* ['0' - '9'] */
+                case 0x3b:              /* ';' */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_PARAM);
+                case 0x3a:              /* ':' */
+                case 0x3c ... 0x3f:     /* ['<' - '?'] */
+                        return parser_transition(parser, raw, STATE_CSI_IGNORE, ACTION_NONE);
+                case 0x40 ... 0x7e:     /* ['@' - '~'] */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_CSI_DISPATCH);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_CSI_IGNORE, ACTION_NONE);
+        case STATE_CSI_INT:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_EXECUTE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_COLLECT);
+                case 0x30 ... 0x3f:     /* ['0' - '?'] */
+                        return parser_transition(parser, raw, STATE_CSI_IGNORE, ACTION_NONE);
+                case 0x40 ... 0x7e:     /* ['@' - '~'] */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_CSI_DISPATCH);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_CSI_IGNORE, ACTION_NONE);
+        case STATE_CSI_IGNORE:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_EXECUTE);
+                case 0x20 ... 0x3f:     /* [' ' - '?'] */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_NONE);
+                case 0x40 ... 0x7e:     /* ['@' - '~'] */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_NONE);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_NONE, ACTION_NONE);
+        case STATE_DCS_ENTRY:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_DCS_INT, ACTION_COLLECT);
+                case 0x3a:              /* ':' */
+                        return parser_transition(parser, raw, STATE_DCS_IGNORE, ACTION_NONE);
+                case 0x30 ... 0x39:     /* ['0' - '9'] */
+                case 0x3b:              /* ';' */
+                        return parser_transition(parser, raw, STATE_DCS_PARAM, ACTION_PARAM);
+                case 0x3c ... 0x3f:     /* ['<' - '?'] */
+                        return parser_transition(parser, raw, STATE_DCS_PARAM, ACTION_COLLECT);
+                case 0x40 ... 0x7e:     /* ['@' - '~'] */
+                        return parser_transition(parser, raw, STATE_DCS_PASS, ACTION_DCS_CONSUME);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_DCS_PASS, ACTION_DCS_CONSUME);
+        case STATE_DCS_PARAM:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_DCS_INT, ACTION_COLLECT);
+                case 0x30 ... 0x39:     /* ['0' - '9'] */
+                case 0x3b:              /* ';' */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_PARAM);
+                case 0x3a:              /* ':' */
+                case 0x3c ... 0x3f:     /* ['<' - '?'] */
+                        return parser_transition(parser, raw, STATE_DCS_IGNORE, ACTION_NONE);
+                case 0x40 ... 0x7e:     /* ['@' - '~'] */
+                        return parser_transition(parser, raw, STATE_DCS_PASS, ACTION_DCS_CONSUME);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_DCS_PASS, ACTION_DCS_CONSUME);
+        case STATE_DCS_INT:
+                switch (raw) {
+                case 0x00 ... 0x1f:     /* C0 */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x20 ... 0x2f:     /* [' ' - '\'] */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_COLLECT);
+                case 0x30 ... 0x3f:     /* ['0' - '?'] */
+                        return parser_transition(parser, raw, STATE_DCS_IGNORE, ACTION_NONE);
+                case 0x40 ... 0x7e:     /* ['@' - '~'] */
+                        return parser_transition(parser, raw, STATE_DCS_PASS, ACTION_DCS_CONSUME);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_DCS_PASS, ACTION_DCS_CONSUME);
+        case STATE_DCS_PASS:
+                switch (raw) {
+                case 0x00 ... 0x7e:     /* ASCII \ { DEL } */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_DCS_COLLECT);
+                case 0x7f:              /* DEL */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_DCS_DISPATCH);
+                }
+
+                return parser_transition(parser, raw, STATE_NONE, ACTION_DCS_COLLECT);
+        case STATE_DCS_IGNORE:
+                switch (raw) {
+                case 0x00 ... 0x7f:     /* ASCII */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_NONE);
+                }
+
+                return parser_transition(parser, raw, STATE_NONE, ACTION_NONE);
+        case STATE_OSC_STRING:
+                switch (raw) {
+                case 0x00 ... 0x06:     /* C0 \ { BEL } */
+                case 0x08 ... 0x1f:
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x20 ... 0x7f:     /* [' ' - DEL] */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_OSC_COLLECT);
+                case 0x07:              /* BEL */
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_OSC_DISPATCH);
+                }
+
+                return parser_transition(parser, raw, STATE_NONE, ACTION_OSC_COLLECT);
+        case STATE_ST_IGNORE:
+                switch (raw) {
+                case 0x00 ... 0x7f:     /* ASCII */
+                        return parser_transition(parser, raw, STATE_NONE, ACTION_IGNORE);
+                case 0x9c:              /* ST */
+                        return parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                }
+
+                return parser_transition(parser, raw, STATE_NONE, ACTION_NONE);
+        }
+
+        assert_not_reached("bad vte-parser state");
+        return -EINVAL;
+}
+
+int term_parser_feed(term_parser *parser, const term_seq **seq_out, uint32_t raw) {
+        int r;
+
+        assert_return(parser, -EINVAL);
+        assert_return(seq_out, -EINVAL);
+
+        /*
+         * Notes:
+         *  * DEC treats GR codes as GL. We don't do that as we require UTF-8
+         *    as charset and, thus, it doesn't make sense to treat GR special.
+         *  * During control sequences, unexpected C1 codes cancel the sequence
+         *    and immediately start a new one. C0 codes, however, may or may not
+         *    be ignored/executed depending on the sequence.
+         */
+
+        switch (raw) {
+        case 0x18:              /* CAN */
+                r = parser_transition(parser, raw, STATE_GROUND, ACTION_IGNORE);
+                break;
+        case 0x1a:              /* SUB */
+                r = parser_transition(parser, raw, STATE_GROUND, ACTION_EXECUTE);
+                break;
+        case 0x80 ... 0x8f:     /* C1 \ {DCS, SOS, CSI, ST, OSC, PM, APC} */
+        case 0x91 ... 0x97:
+        case 0x99 ... 0x9a:
+                r = parser_transition(parser, raw, STATE_GROUND, ACTION_EXECUTE);
+                break;
+        case 0x1b:              /* ESC */
+                r = parser_transition(parser, raw, STATE_ESC, ACTION_CLEAR);
+                break;
+        case 0x98:              /* SOS */
+        case 0x9e:              /* PM */
+        case 0x9f:              /* APC */
+                r = parser_transition(parser, raw, STATE_ST_IGNORE, ACTION_NONE);
+                break;
+        case 0x90:              /* DCS */
+                r = parser_transition(parser, raw, STATE_DCS_ENTRY, ACTION_CLEAR);
+                break;
+        case 0x9d:              /* OSC */
+                r = parser_transition(parser, raw, STATE_OSC_STRING, ACTION_CLEAR);
+                break;
+        case 0x9b:              /* CSI */
+                r = parser_transition(parser, raw, STATE_CSI_ENTRY, ACTION_CLEAR);
+                break;
+        default:
+                r = parser_feed_to_state(parser, raw);
+                break;
+        }
+
+        if (r <= 0)
+                *seq_out = NULL;
+        else
+                *seq_out = &parser->seq;
+
+        return r;
+}
diff --git a/src/libsystemd-terminal/term-screen.c b/src/libsystemd-terminal/term-screen.c
new file mode 100644 (file)
index 0000000..acd7cc9
--- /dev/null
@@ -0,0 +1,4334 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Terminal Screens
+ * The term_screen layer implements the terminal-side. It handles all commands
+ * returned by the seq-parser and applies them to its own pages.
+ *
+ * While there are a lot of legacy control-sequences, we only support a small
+ * subset. There is no reason to implement unused codes like horizontal
+ * scrolling.
+ * If you implement new commands, make sure to document them properly.
+ *
+ * Standards:
+ *   ECMA-48
+ *   ANSI X3.64
+ *   ISO/IEC 6429
+ * References:
+ *   http://www.vt100.net/emu/ctrlseq_dec.html
+ *   http://www.vt100.net/docs/vt100-ug/chapter3.html
+ *   http://www.vt100.net/docs/vt510-rm/chapter4
+ *   http://www.vt100.net/docs/vt510-rm/contents
+ *   http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+ *   ASCII
+ *   http://en.wikipedia.org/wiki/C0_and_C1_control_codes
+ *   https://en.wikipedia.org/wiki/ANSI_color
+ */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <xkbcommon/xkbcommon-keysyms.h>
+#include "macro.h"
+#include "term-internal.h"
+#include "util.h"
+
+int term_screen_new(term_screen **out, term_screen_write_fn write_fn, void *write_fn_data, term_screen_cmd_fn cmd_fn, void *cmd_fn_data) {
+        _cleanup_(term_screen_unrefp) term_screen *screen = NULL;
+        int r;
+
+        assert_return(out, -EINVAL);
+
+        screen = new0(term_screen, 1);
+        if (!screen)
+                return -ENOMEM;
+
+        screen->ref = 1;
+        screen->age = 1;
+        screen->write_fn = write_fn;
+        screen->write_fn_data = write_fn_data;
+        screen->cmd_fn = cmd_fn;
+        screen->cmd_fn_data = cmd_fn_data;
+        screen->flags = TERM_FLAG_7BIT_MODE;
+        screen->conformance_level = TERM_CONFORMANCE_LEVEL_VT400;
+        screen->g0 = &term_unicode_lower;
+        screen->g1 = &term_unicode_upper;
+        screen->g2 = &term_unicode_lower;
+        screen->g3 = &term_unicode_upper;
+        screen->state.gl = &screen->g0;
+        screen->state.gr = &screen->g1;
+        screen->saved = screen->state;
+        screen->saved_alt = screen->saved;
+
+        r = term_page_new(&screen->page_main);
+        if (r < 0)
+                return r;
+
+        r = term_page_new(&screen->page_alt);
+        if (r < 0)
+                return r;
+
+        r = term_parser_new(&screen->parser, false);
+        if (r < 0)
+                return r;
+
+        r = term_history_new(&screen->history_main);
+        if (r < 0)
+                return r;
+
+        screen->page = screen->page_main;
+        screen->history = screen->history_main;
+
+        *out = screen;
+        screen = NULL;
+        return 0;
+}
+
+term_screen *term_screen_ref(term_screen *screen) {
+        if (!screen)
+                return NULL;
+
+        assert_return(screen->ref > 0, NULL);
+
+        ++screen->ref;
+        return screen;
+}
+
+term_screen *term_screen_unref(term_screen *screen) {
+        if (!screen)
+                return NULL;
+
+        assert_return(screen->ref > 0, NULL);
+
+        if (--screen->ref)
+                return NULL;
+
+        free(screen->answerback);
+        free(screen->tabs);
+        term_history_free(screen->history_main);
+        term_page_free(screen->page_alt);
+        term_page_free(screen->page_main);
+        term_parser_free(screen->parser);
+        free(screen);
+
+        return NULL;
+}
+
+/*
+ * Write-Helpers
+ * Unfortunately, 7bit/8bit compat mode requires us to send C1 controls encoded
+ * as 7bit if asked by the application. This is really used in the wild, so we
+ * cannot fall back to "always 7bit".
+ * screen_write() is the underlying backend which forwards any writes to the
+ * users's callback. It's the users responsibility to buffer these and write
+ * them out once their call to term_screen_feed_*() returns.
+ * The SEQ_WRITE() and SEQ_WRITE_KEY() macros allow constructing C0/C1 sequences
+ * directly in the code-base without requiring any intermediate buffer during
+ * runtime.
+ */
+
+#define C0_CSI "\e["
+#define C1_CSI "\x9b"
+
+#define SEQ(_screen, _prefix_esc, _c0, _c1, _seq) \
+                (((_screen)->flags & TERM_FLAG_7BIT_MODE) ? \
+                        ((_prefix_esc) ? ("\e" _c0 _seq) : (_c0 _seq)) : \
+                        ((_prefix_esc) ? ("\e" _c1 _seq) : (_c1 _seq)))
+
+#define SEQ_SIZE(_screen, _prefix_esc, _c0, _c1, _seq) \
+                (((_screen)->flags & TERM_FLAG_7BIT_MODE) ? \
+                        ((_prefix_esc) ? sizeof("\e" _c0 _seq) : sizeof(_c0 _seq)) : \
+                        ((_prefix_esc) ? sizeof("\e" _c1 _seq) : sizeof(_c1 _seq)))
+
+#define SEQ_WRITE_KEY(_screen, _prefix_esc, _c0, _c1, _seq) \
+                screen_write((_screen), \
+                             SEQ((_screen), (_prefix_esc), \
+                                 _c0, _c1, _seq), \
+                             SEQ_SIZE((_screen), (_prefix_esc), \
+                                     _c0, _c1, _seq) - 1)
+
+#define SEQ_WRITE(_screen, _c0, _c1, _seq) \
+                SEQ_WRITE_KEY((_screen), false, _c0, _c1, _seq)
+
+static int screen_write(term_screen *screen, const void *buf, size_t len) {
+        if (len < 1 || !screen->write_fn)
+                return 0;
+
+        return screen->write_fn(screen, screen->write_fn_data, buf, len);
+}
+
+/*
+ * Command Forwarding
+ * Some commands cannot be handled by the screen-layer directly. Those are
+ * forwarded to the command-handler of the caller. This is rarely used and can
+ * safely be set to NULL.
+ */
+
+static int screen_forward(term_screen *screen, unsigned int cmd, const term_seq *seq) {
+        if (!screen->cmd_fn)
+                return 0;
+
+        return screen->cmd_fn(screen, screen->cmd_fn_data, cmd, seq);
+}
+
+/*
+ * Screen Helpers
+ * These helpers implement common-operations like cursor-handler and more, which
+ * are used by several command dispatchers.
+ */
+
+static unsigned int screen_clamp_x(term_screen *screen, unsigned int x) {
+        if (x >= screen->page->width)
+                return (screen->page->width > 0) ? screen->page->width - 1 : 0;
+
+        return x;
+}
+
+static unsigned int screen_clamp_y(term_screen *screen, unsigned int y) {
+        if (y >= screen->page->height)
+                return (screen->page->height > 0) ? screen->page->height - 1 : 0;
+
+        return y;
+}
+
+static bool screen_tab_is_set(term_screen *screen, unsigned int pos) {
+        if (pos >= screen->page->width)
+                return false;
+
+        return screen->tabs[pos / 8] & (1 << (pos % 8));
+}
+
+static inline void screen_age_cursor(term_screen *screen) {
+        term_cell *cell;
+
+        cell = term_page_get_cell(screen->page, screen->state.cursor_x, screen->state.cursor_y);
+        if (cell)
+                cell->age = screen->age;
+}
+
+static void screen_cursor_clear_wrap(term_screen *screen) {
+        screen->flags &= ~TERM_FLAG_PENDING_WRAP;
+}
+
+static void screen_cursor_set(term_screen *screen, unsigned int x, unsigned int y) {
+        x = screen_clamp_x(screen, x);
+        y = screen_clamp_y(screen, y);
+
+        if (x == screen->state.cursor_x && y == screen->state.cursor_y)
+                return;
+
+        if (!(screen->flags & TERM_FLAG_HIDE_CURSOR))
+                screen_age_cursor(screen);
+
+        screen->state.cursor_x = x;
+        screen->state.cursor_y = y;
+
+        if (!(screen->flags & TERM_FLAG_HIDE_CURSOR))
+                screen_age_cursor(screen);
+}
+
+static void screen_cursor_set_rel(term_screen *screen, unsigned int x, unsigned int y) {
+        if (screen->state.origin_mode) {
+                x = screen_clamp_x(screen, x);
+                y = screen_clamp_x(screen, y) + screen->page->scroll_idx;
+
+                if (y >= screen->page->scroll_idx + screen->page->scroll_num) {
+                        y = screen->page->scroll_idx + screen->page->scroll_num;
+                        if (screen->page->scroll_num > 0)
+                                y -= 1;
+                }
+        }
+
+        screen_cursor_set(screen, x, y);
+}
+
+static void screen_cursor_left(term_screen *screen, unsigned int num) {
+        if (num > screen->state.cursor_x)
+                num = screen->state.cursor_x;
+
+        screen_cursor_set(screen, screen->state.cursor_x - num, screen->state.cursor_y);
+}
+
+static void screen_cursor_left_tab(term_screen *screen, unsigned int num) {
+        unsigned int i;
+
+        i = screen->state.cursor_x;
+        while (i > 0 && num > 0) {
+                if (screen_tab_is_set(screen, --i))
+                        --num;
+        }
+
+        screen_cursor_set(screen, i, screen->state.cursor_y);
+}
+
+static void screen_cursor_right(term_screen *screen, unsigned int num) {
+        if (num > screen->page->width)
+                num = screen->page->width;
+
+        screen_cursor_set(screen, screen->state.cursor_x + num, screen->state.cursor_y);
+}
+
+static void screen_cursor_right_tab(term_screen *screen, unsigned int num) {
+        unsigned int i;
+
+        i = screen->state.cursor_x;
+        while (i + 1 < screen->page->width && num > 0) {
+                if (screen_tab_is_set(screen, ++i))
+                        --num;
+        }
+
+        screen_cursor_set(screen, i, screen->state.cursor_y);
+}
+
+static void screen_cursor_up(term_screen *screen, unsigned int num, bool scroll) {
+        unsigned int max;
+
+        if (screen->state.cursor_y < screen->page->scroll_idx) {
+                if (num > screen->state.cursor_y)
+                        num = screen->state.cursor_y;
+
+                screen_cursor_set(screen, screen->state.cursor_x, screen->state.cursor_y - num);
+        } else {
+                max = screen->state.cursor_y - screen->page->scroll_idx;
+                if (num > max) {
+                        if (num < 1)
+                                return;
+
+                        if (!(screen->flags & TERM_FLAG_HIDE_CURSOR))
+                                screen_age_cursor(screen);
+
+                        if (scroll)
+                                term_page_scroll_down(screen->page, num - max, &screen->state.attr, screen->age, NULL);
+
+                        screen->state.cursor_y = screen->page->scroll_idx;
+
+                        if (!(screen->flags & TERM_FLAG_HIDE_CURSOR))
+                                screen_age_cursor(screen);
+                } else {
+                        screen_cursor_set(screen, screen->state.cursor_x, screen->state.cursor_y - num);
+                }
+        }
+}
+
+static void screen_cursor_down(term_screen *screen, unsigned int num, bool scroll) {
+        unsigned int max;
+
+        if (screen->state.cursor_y >= screen->page->scroll_idx + screen->page->scroll_num) {
+                if (num > screen->page->height)
+                        num = screen->page->height;
+
+                screen_cursor_set(screen, screen->state.cursor_x, screen->state.cursor_y - num);
+        } else {
+                max = screen->page->scroll_idx + screen->page->scroll_num - 1 - screen->state.cursor_y;
+                if (num > max) {
+                        if (num < 1)
+                                return;
+
+                        if (!(screen->flags & TERM_FLAG_HIDE_CURSOR))
+                                screen_age_cursor(screen);
+
+                        if (scroll)
+                                term_page_scroll_up(screen->page, num - max, &screen->state.attr, screen->age, screen->history);
+
+                        screen->state.cursor_y = screen->page->scroll_idx + screen->page->scroll_num - 1;
+
+                        if (!(screen->flags & TERM_FLAG_HIDE_CURSOR))
+                                screen_age_cursor(screen);
+                } else {
+                        screen_cursor_set(screen, screen->state.cursor_x, screen->state.cursor_y + num);
+                }
+        }
+}
+
+static void screen_save_state(term_screen *screen, term_state *where) {
+        *where = screen->state;
+}
+
+static void screen_restore_state(term_screen *screen, term_state *from) {
+        screen_cursor_set(screen, from->cursor_x, from->cursor_y);
+        screen->state = *from;
+}
+
+static void screen_reset_page(term_screen *screen, term_page *page) {
+        term_page_set_scroll_region(page, 0, page->height);
+        term_page_erase(page, 0, 0, page->width, page->height, &screen->state.attr, screen->age, false);
+}
+
+static void screen_change_alt(term_screen *screen, bool set) {
+        if (set) {
+                screen->page = screen->page_alt;
+                screen->history = NULL;
+        } else {
+                screen->page = screen->page_main;
+                screen->history = screen->history_main;
+        }
+
+        screen->page->age = screen->age;
+}
+
+static inline void set_reset(term_screen *screen, unsigned int flag, bool set) {
+        if (set)
+                screen->flags |= flag;
+        else
+                screen->flags &= ~flag;
+}
+
+static void screen_mode_change_ansi(term_screen *screen, unsigned mode, bool set) {
+        switch (mode) {
+        case 20:
+                /*
+                 * LNM: line-feed/new-line mode
+                 * TODO
+                 */
+                set_reset(screen, TERM_FLAG_NEWLINE_MODE, set);
+
+                break;
+        default:
+                log_debug("terminal: failed to %s unknown ANSI mode %u", set ? "set" : "unset", mode);
+        }
+}
+
+static void screen_mode_change_dec(term_screen *screen, unsigned int mode, bool set) {
+        switch (mode) {
+        case 1:
+                /*
+                 * DECCKM: cursor-keys
+                 * TODO
+                 */
+                set_reset(screen, TERM_FLAG_CURSOR_KEYS, set);
+
+                break;
+        case 6:
+                /*
+                 * DECOM: origin-mode
+                 * TODO
+                 */
+                screen->state.origin_mode = set;
+
+                break;
+        case 7:
+                /*
+                 * DECAWN: auto-wrap mode
+                 * TODO
+                 */
+                screen->state.auto_wrap = set;
+
+                break;
+        case 25:
+                /*
+                 * DECTCEM: text-cursor-enable
+                 * TODO
+                 */
+                set_reset(screen, TERM_FLAG_HIDE_CURSOR, !set);
+                screen_age_cursor(screen);
+
+                break;
+        case 47:
+                /*
+                 * XTERM-ASB: alternate-screen-buffer
+                 * This enables/disables the alternate screen-buffer.
+                 * It effectively saves the current page content and
+                 * allows you to restore it when changing to the
+                 * original screen-buffer again.
+                 */
+                screen_change_alt(screen, set);
+
+                break;
+        case 1047:
+                /*
+                 * XTERM-ASBPE: alternate-screen-buffer-post-erase
+                 * This is the same as XTERM-ASB but erases the
+                 * alternate screen-buffer before switching back to the
+                 * original buffer. Use it to discard any data on the
+                 * alternate screen buffer when done.
+                 */
+                if (!set)
+                        screen_reset_page(screen, screen->page_alt);
+
+                screen_change_alt(screen, set);
+
+                break;
+        case 1048:
+                /*
+                 * XTERM-ASBCS: alternate-screen-buffer-cursor-state
+                 * This has the same effect as DECSC/DECRC, but uses a
+                 * separate state buffer. It is usually used in
+                 * combination with alternate screen buffers to provide
+                 * stacked state storage.
+                 */
+                if (set)
+                        screen_save_state(screen, &screen->saved_alt);
+                else
+                        screen_restore_state(screen, &screen->saved_alt);
+
+                break;
+        case 1049:
+                /*
+                 * XTERM-ASBX: alternate-screen-buffer-extended
+                 * This combines XTERM-ASBPE and XTERM-ASBCS somewhat.
+                 * When enabling, state is saved, alternate screen
+                 * buffer is activated and cleared.
+                 * When disabled, alternate screen buffer is cleared,
+                 * then normal screen buffer is enabled and state is
+                 * restored.
+                 */
+                if (set)
+                        screen_save_state(screen, &screen->saved_alt);
+
+                screen_reset_page(screen, screen->page_alt);
+                screen_change_alt(screen, set);
+
+                if (!set)
+                        screen_restore_state(screen, &screen->saved_alt);
+
+                break;
+        default:
+                log_debug("terminal: failed to %s unknown DEC mode %u", set ? "set" : "unset", mode);
+        }
+}
+
+/* map a character according to current GL and GR maps */
+static uint32_t screen_map(term_screen *screen, uint32_t val) {
+        uint32_t nval = -1U;
+
+        /* 32 and 127 always map to identity. 160 and 255 map to identity iff a
+         * 96 character set is loaded into GR. Values above 255 always map to
+         * identity. */
+        switch (val) {
+        case 33 ... 126:
+                if (screen->state.glt) {
+                        nval = (**screen->state.glt)[val - 32];
+                        screen->state.glt = NULL;
+                } else {
+                        nval = (**screen->state.gl)[val - 32];
+                }
+                break;
+        case 160 ... 255:
+                if (screen->state.grt) {
+                        nval = (**screen->state.grt)[val - 160];
+                        screen->state.grt = NULL;
+                } else {
+                        nval = (**screen->state.gr)[val - 160];
+                }
+                break;
+        }
+
+        return (nval == -1U) ? val : nval;
+}
+
+/*
+ * Command Handlers
+ * This is the unofficial documentation of all the TERM_CMD_* definitions. Each
+ * handled command has a separate function with an extensive comment on the
+ * semantics of the command.
+ * Note that many semantics are unknown and need to be verified. This is mostly
+ * about error-handling, though. Applications rarely rely on those features.
+ */
+
+static int screen_DA1(term_screen *screen, const term_seq *seq);
+static int screen_LF(term_screen *screen, const term_seq *seq);
+
+static int screen_GRAPHIC(term_screen *screen, const term_seq *seq) {
+        term_char_t ch = TERM_CHAR_NULL;
+        uint32_t c;
+
+        if (screen->state.cursor_x + 1 == screen->page->width
+            && screen->flags & TERM_FLAG_PENDING_WRAP
+            && screen->state.auto_wrap) {
+                screen_cursor_down(screen, 1, true);
+                screen_cursor_set(screen, 0, screen->state.cursor_y);
+        }
+
+        screen_cursor_clear_wrap(screen);
+
+        c = screen_map(screen, seq->terminator);
+        ch = term_char_merge(ch, screen_map(screen, c));
+        term_page_write(screen->page, screen->state.cursor_x, screen->state.cursor_y, ch, 1, &screen->state.attr, screen->age, false);
+
+        if (screen->state.cursor_x + 1 == screen->page->width)
+                screen->flags |= TERM_FLAG_PENDING_WRAP;
+        else
+                screen_cursor_right(screen, 1);
+
+        return 0;
+}
+
+static int screen_BEL(term_screen *screen, const term_seq *seq) {
+        /*
+         * BEL - sound bell tone
+         * This command should trigger an acoustic bell. Usually, this is
+         * forwarded directly to the pcspkr. However, bells have become quite
+         * uncommon and annoying, so we're not implementing them here. Instead,
+         * it's one of the commands we forward to the caller.
+         */
+
+        return screen_forward(screen, TERM_CMD_BEL, seq);
+}
+
+static int screen_BS(term_screen *screen, const term_seq *seq) {
+        /*
+         * BS - backspace
+         * Move cursor one cell to the left. If already at the left margin,
+         * nothing happens.
+         */
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_left(screen, 1);
+        return 0;
+}
+
+static int screen_CBT(term_screen *screen, const term_seq *seq) {
+        /*
+         * CBT - cursor-backward-tabulation
+         * Move the cursor @args[0] tabs backwards (to the left). The
+         * current cursor cell, in case it's a tab, is not counted.
+         * Furthermore, the cursor cannot be moved beyond position 0 and
+         * it will stop there.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_left_tab(screen, num);
+
+        return 0;
+}
+
+static int screen_CHA(term_screen *screen, const term_seq *seq) {
+        /*
+         * CHA - cursor-horizontal-absolute
+         * Move the cursor to position @args[0] in the current line. The
+         * cursor cannot be moved beyond the rightmost cell and will stop
+         * there.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int pos = 1;
+
+        if (seq->args[0] > 0)
+                pos = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_set(screen, pos - 1, screen->state.cursor_y);
+
+        return 0;
+}
+
+static int screen_CHT(term_screen *screen, const term_seq *seq) {
+        /*
+         * CHT - cursor-horizontal-forward-tabulation
+         * Move the cursor @args[0] tabs forward (to the right). The
+         * current cursor cell, in case it's a tab, is not counted.
+         * Furthermore, the cursor cannot be moved beyond the rightmost cell
+         * and will stop there.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_right_tab(screen, num);
+
+        return 0;
+}
+
+static int screen_CNL(term_screen *screen, const term_seq *seq) {
+        /*
+         * CNL - cursor-next-line
+         * Move the cursor @args[0] lines down.
+         *
+         * TODO: Does this stop at the bottom or cause a scroll-up?
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_down(screen, num, false);
+
+        return 0;
+}
+
+static int screen_CPL(term_screen *screen, const term_seq *seq) {
+        /*
+         * CPL - cursor-preceding-line
+         * Move the cursor @args[0] lines up.
+         *
+         * TODO: Does this stop at the top or cause a scroll-up?
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_up(screen, num, false);
+
+        return 0;
+}
+
+static int screen_CR(term_screen *screen, const term_seq *seq) {
+        /*
+         * CR - carriage-return
+         * Move the cursor to the left margin on the current line.
+         */
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_set(screen, 0, screen->state.cursor_y);
+
+        return 0;
+}
+
+static int screen_CUB(term_screen *screen, const term_seq *seq) {
+        /*
+         * CUB - cursor-backward
+         * Move the cursor @args[0] positions to the left. The cursor stops
+         * at the left-most position.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_left(screen, num);
+
+        return 0;
+}
+
+static int screen_CUD(term_screen *screen, const term_seq *seq) {
+        /*
+         * CUD - cursor-down
+         * Move the cursor @args[0] positions down. The cursor stops at the
+         * bottom margin. If it was already moved further, it stops at the
+         * bottom line.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_down(screen, num, false);
+
+        return 0;
+}
+
+static int screen_CUF(term_screen *screen, const term_seq *seq) {
+        /*
+         * CUF -cursor-forward
+         * Move the cursor @args[0] positions to the right. The cursor stops
+         * at the right-most position.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_right(screen, num);
+
+        return 0;
+}
+
+static int screen_CUP(term_screen *screen, const term_seq *seq) {
+        /*
+         * CUP - cursor-position
+         * Moves the cursor to position @args[1] x @args[0]. If either is 0, it
+         * is treated as 1. The positions are subject to the origin-mode and
+         * clamped to the addressable with/height.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         */
+
+        unsigned int x = 1, y = 1;
+
+        if (seq->args[0] > 0)
+                y = seq->args[0];
+        if (seq->args[1] > 0)
+                x = seq->args[1];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_set_rel(screen, x - 1, y - 1);
+
+        return 0;
+}
+
+static int screen_CUU(term_screen *screen, const term_seq *seq) {
+        /*
+         * CUU - cursor-up
+         * Move the cursor @args[0] positions up. The cursor stops at the
+         * top margin. If it was already moved further, it stops at the
+         * top line.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_up(screen, num, false);
+
+        return 0;
+}
+
+static int screen_DA1(term_screen *screen, const term_seq *seq) {
+        /*
+         * DA1 - primary-device-attributes
+         * The primary DA asks for basic terminal features. We simply return
+         * a hard-coded list of features we implement.
+         * Note that the primary DA asks for supported features, not currently
+         * enabled features.
+         *
+         * The terminal's answer is:
+         *   ^[ ? 64 ; ARGS c
+         * The first argument, 64, is fixed and denotes a VT420, the last
+         * DEC-term that extended this number.
+         * All following arguments denote supported features. Note
+         * that at most 15 features can be sent (max CSI args). It is safe to
+         * send more, but clients might not be able to parse them. This is a
+         * client's problem and we shouldn't care. There is no other way to
+         * send those feature lists, so we have to extend them beyond 15 in
+         * those cases.
+         *
+         * Known modes:
+         *    1: 132 column mode
+         *       The 132 column mode is supported by the terminal.
+         *    2: printer port
+         *       A priner-port is supported and can be addressed via
+         *       control-codes.
+         *    3: ReGIS graphics
+         *       Support for ReGIS graphics is available. The ReGIS routines
+         *       provide the "remote graphics instruction set" and allow basic
+         *       vector-rendering.
+         *    4: sixel
+         *       Support of Sixel graphics is available. This provides access
+         *       to the sixel bitmap routines.
+         *    6: selective erase
+         *       The terminal supports DECSCA and related selective-erase
+         *       functions. This allows to protect specific cells from being
+         *       erased, if specified.
+         *    7: soft character set (DRCS)
+         *       TODO: ?
+         *    8: user-defined keys (UDKs)
+         *       TODO: ?
+         *    9: national-replacement character sets (NRCS)
+         *       National-replacement character-sets are available.
+         *   12: Yugoslavian (SCS)
+         *       TODO: ?
+         *   15: technical character set
+         *       The DEC technical-character-set is available.
+         *   18: windowing capability
+         *       TODO: ?
+         *   21: horizontal scrolling
+         *       TODO: ?
+         *   22: ANSII color
+         *       TODO: ?
+         *   23: Greek
+         *       TODO: ?
+         *   24: Turkish
+         *       TODO: ?
+         *   29: ANSI text locator
+         *       TODO: ?
+         *   42: ISO Latin-2 character set
+         *       TODO: ?
+         *   44: PCTerm
+         *       TODO: ?
+         *   45: soft keymap
+         *       TODO: ?
+         *   46: ASCII emulation
+         *       TODO: ?
+         */
+
+        return SEQ_WRITE(screen, C0_CSI, C1_CSI, "?64;1;6;9;15c");
+}
+
+static int screen_DA2(term_screen *screen, const term_seq *seq) {
+        /*
+         * DA2 - secondary-device-attributes
+         * The secondary DA asks for the terminal-ID, firmware versions and
+         * other non-primary attributes. All these values are
+         * informational-only and should not be used by the host to detect
+         * terminal features.
+         *
+         * The terminal's response is:
+         *   ^[ > 61 ; FIRMWARE ; KEYBOARD c
+         * whereas 65 is fixed for VT525 terminals, the last terminal-line that
+         * increased this number. FIRMWARE is the firmware
+         * version encoded as major/minor (20 == 2.0) and KEYBOARD is 0 for STD
+         * keyboard and 1 for PC keyboards.
+         *
+         * We replace the firmware-version with the systemd-version so clients
+         * can decode it again.
+         */
+
+        return SEQ_WRITE(screen, C0_CSI, C1_CSI, ">65;" PACKAGE_VERSION ";1c");
+}
+
+static int screen_DA3(term_screen *screen, const term_seq *seq) {
+        /*
+         * DA3 - tertiary-device-attributes
+         * The tertiary DA is used to query the terminal-ID.
+         *
+         * The terminal's response is:
+         *   ^P ! | XX AA BB CC ^\
+         * whereas all four parameters are hexadecimal-encoded pairs. XX
+         * denotes the manufacturing site, AA BB CC is the terminal's ID.
+         */
+
+        /* we do not support tertiary DAs */
+        return 0;
+}
+
+static int screen_DC1(term_screen *screen, const term_seq *seq) {
+        /*
+         * DC1 - device-control-1 or XON
+         * This clears any previous XOFF and resumes terminal-transmission.
+         */
+
+        /* we do not support XON */
+        return 0;
+}
+
+static int screen_DC3(term_screen *screen, const term_seq *seq) {
+        /*
+         * DC3 - device-control-3 or XOFF
+         * Stops terminal transmission. No further characters are sent until
+         * an XON is received.
+         */
+
+        /* we do not support XOFF */
+        return 0;
+}
+
+static int screen_DCH(term_screen *screen, const term_seq *seq) {
+        /*
+         * DCH - delete-character
+         * This deletes @argv[0] characters at the current cursor position. As
+         * characters are deleted, the remaining characters between the cursor
+         * and right margin move to the left. Character attributes move with the
+         * characters. The terminal adds blank spaces with no visual character
+         * attributes at the right margin. DCH has no effect outside the
+         * scrolling margins.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        term_page_delete_cells(screen->page, screen->state.cursor_x, screen->state.cursor_y, num, &screen->state.attr, screen->age);
+
+        return 0;
+}
+
+static int screen_DECALN(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECALN - screen-alignment-pattern
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECANM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECANM - ansi-mode
+         * Set the terminal into VT52 compatibility mode. Control sequences
+         * overlap with regular sequences so we have to detect them early before
+         * dispatching them.
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECBI(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECBI - back-index
+         * This control function moves the cursor backward one column. If the
+         * cursor is at the left margin, then all screen data within the margin
+         * moves one column to the right. The column that shifted past the right
+         * margin is lost.
+         * DECBI adds a new column at the left margin with no visual attributes.
+         * DECBI does not affect the margins. If the cursor is beyond the
+         * left-margin at the left border, then the terminal ignores DECBI.
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECCARA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECCARA - change-attributes-in-rectangular-area
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECCRA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECCRA - copy-rectangular-area
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECDC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECDC - delete-column
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECDHL_BH(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECDHL_BH - double-width-double-height-line: bottom half
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECDHL_TH(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECDHL_TH - double-width-double-height-line: top half
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECDWL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECDWL - double-width-single-height-line
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECEFR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECEFR - enable-filter-rectangle
+         * Defines the coordinates of a filter rectangle (top, left, bottom,
+         * right as @args[0] to @args[3]) and activates it.
+         * Anytime the locator is detected outside of the filter rectangle, an
+         * outside rectangle event is generated and the rectangle is disabled.
+         * Filter rectangles are always treated as "one-shot" events. Any
+         * parameters that are omitted default to the current locator position.
+         * If all parameters are omitted, any locator motion will be reported.
+         * DECELR always cancels any prevous rectangle definition.
+         *
+         * The locator is usually associated with the mouse-cursor, but based
+         * on cells instead of pixels. See DECELR how to initialize and enable
+         * it. DECELR can also enable pixel-mode instead of cell-mode.
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECELF(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECELF - enable-local-functions
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECELR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECELR - enable-locator-reporting
+         * This changes the locator-reporting mode. @args[0] specifies the mode
+         * to set, 0 disables locator-reporting, 1 enables it continuously, 2
+         * enables it for a single report. @args[1] specifies the
+         * precision-mode. 0 and 2 set the reporting to cell-precision, 1 sets
+         * pixel-precision.
+         *
+         * Defaults:
+         *   args[0]: 0
+         *   args[1]: 0
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECERA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECERA - erase-rectangular-area
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECFI(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECFI - forward-index
+         * This control function moves the cursor forward one column. If the
+         * cursor is at the right margin, then all screen data within the
+         * margins moves one column to the left. The column shifted past the
+         * left margin is lost.
+         * DECFI adds a new column at the right margin, with no visual
+         * attributes. DECFI does not affect margins. If the cursor is beyond
+         * the right margin at the border of the page when the terminal
+         * receives DECFI, then the terminal ignores DECFI.
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECFRA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECFRA - fill-rectangular-area
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECIC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECIC - insert-column
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECID(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECID - return-terminal-id
+         * This is an obsolete form of TERM_CMD_DA1.
+         */
+
+        return screen_DA1(screen, seq);
+}
+
+static int screen_DECINVM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECINVM - invoke-macro
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECKBD(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECKBD - keyboard-language-selection
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECKPAM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECKPAM - keypad-application-mode
+         * Enables the keypad-application mode. If enabled, the keypad sends
+         * special characters instead of the printed characters. This way,
+         * applications can detect whether a numeric key was pressed on the
+         * top-row or on the keypad.
+         * Default is keypad-numeric-mode.
+         */
+
+        screen->flags |= TERM_FLAG_KEYPAD_MODE;
+
+        return 0;
+}
+
+static int screen_DECKPNM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECKPNM - keypad-numeric-mode
+         * This disables the keypad-application-mode (DECKPAM) and returns to
+         * the keypad-numeric-mode. Keypresses on the keypad generate the same
+         * sequences as corresponding keypresses on the main keyboard.
+         * Default is keypad-numeric-mode.
+         */
+
+        screen->flags &= ~TERM_FLAG_KEYPAD_MODE;
+
+        return 0;
+}
+
+static int screen_DECLFKC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECLFKC - local-function-key-control
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECLL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECLL - load-leds
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECLTOD(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECLTOD - load-time-of-day
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECPCTERM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECPCTERM - pcterm-mode
+         * This enters/exits the PCTerm mode. Default mode is VT-mode. It can
+         * also select parameters for scancode/keycode mappings in SCO mode.
+         *
+         * Definitely not worth implementing. Lets kill PCTerm/SCO modes!
+         */
+
+        return 0;
+}
+
+static int screen_DECPKA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECPKA - program-key-action
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECPKFMR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECPKFMR - program-key-free-memory-report
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRARA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRARA - reverse-attributes-in-rectangular-area
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRC - restore-cursor
+         * Restores the terminal to the state saved by the save cursor (DECSC)
+         * function. This includes more than just the cursor-position.
+         *
+         * If nothing was saved by DECSC, then DECRC performs the following
+         * actions:
+         *   * Moves the cursor to the home position (upper left of screen).
+         *   * Resets origin mode (DECOM).
+         *   * Turns all character attributes off (normal setting).
+         *   * Maps the ASCII character set into GL, and the DEC Supplemental
+         *     Graphic set into GR.
+         *
+         * The terminal maintains a separate DECSC buffer for the main display
+         * and the status line. This feature lets you save a separate operating
+         * state for the main display and the status line.
+         */
+
+        screen_restore_state(screen, &screen->saved);
+
+        return 0;
+}
+
+static int screen_DECREQTPARM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECREQTPARM - request-terminal-parameters
+         * The sequence DECREPTPARM is sent by the terminal controller to notify
+         * the host of the status of selected terminal parameters. The status
+         * sequence may be sent when requested by the host or at the terminal's
+         * discretion. DECREPTPARM is sent upon receipt of a DECREQTPARM.
+         *
+         * If @args[0] is 0, this marks a request and the terminal is allowed
+         * to send DECREPTPARM messages without request. If it is 1, the same
+         * applies but the terminal should no longer send DECREPTPARM
+         * unrequested.
+         * 2 and 3 mark a report, but 3 is only used if the terminal answers as
+         * an explicit request with @args[0] == 1.
+         *
+         * The other arguments are ignored in requests, but have the following
+         * meaning in responses:
+         *   args[1]: 1=no-parity-set 4=parity-set-and-odd 5=parity-set-and-even
+         *   args[2]: 1=8bits-per-char 2=7bits-per-char
+         *   args[3]: transmission-speed
+         *   args[4]: receive-speed
+         *   args[5]: 1=bit-rate-multiplier-is-16
+         *   args[6]: This value communicates the four switch values in block 5
+         *            of SETUP B, which are only visible to the user when an STP
+         *            option is installed. These bits may be assigned for an STP
+         *            device. The four bits are a decimal-encoded binary number.
+         *            Value between 0-15.
+         *
+         * The transmission/receive speeds have mappings for number => bits/s
+         * which are quite weird. Examples are: 96->3600, 112->9600, 120->19200
+         *
+         * Defaults:
+         *   args[0]: 0
+         */
+
+        if (seq->n_args < 1 || seq->args[0] == 0) {
+                screen->flags &= ~TERM_FLAG_INHIBIT_TPARM;
+                return SEQ_WRITE(screen, C0_CSI, C1_CSI, "2;1;1;120;120;1;0x");
+        } else if (seq->args[0] == 1) {
+                screen->flags |= TERM_FLAG_INHIBIT_TPARM;
+                return SEQ_WRITE(screen, C0_CSI, C1_CSI, "3;1;1;120;120;1;0x");
+        } else {
+                return 0;
+        }
+}
+
+static int screen_DECRPKT(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRPKT - report-key-type
+         * Response to DECRQKT, we can safely ignore it as we're the one sending
+         * it to the host.
+         */
+
+        return 0;
+}
+
+static int screen_DECRQCRA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQCRA - request-checksum-of-rectangular-area
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRQDE(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQDE - request-display-extent
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRQKT(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQKT - request-key-type
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRQLP(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQLP - request-locator-position
+         * See DECELR for locator-information.
+         *
+         * TODO: document and implement
+         */
+
+        return 0;
+}
+
+static int screen_DECRQM_ANSI(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQM_ANSI - request-mode-ansi
+         * The host sends this control function to find out if a particular mode
+         * is set or reset. The terminal responds with a report mode function.
+         * @args[0] contains the mode to query.
+         *
+         * Response is DECRPM with the first argument set to the mode that was
+         * queried, second argument is 0 if mode is invalid, 1 if mode is set,
+         * 2 if mode is not set (reset), 3 if mode is permanently set and 4 if
+         * mode is permanently not set (reset):
+         *   ANSI: ^[ MODE ; VALUE $ y
+         *   DEC:  ^[ ? MODE ; VALUE $ y
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECRQM_DEC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQM_DEC - request-mode-dec
+         * Same as DECRQM_ANSI but for DEC modes.
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECRQPKFM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQPKFM - request-program-key-free-memory
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRQPSR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQPSR - request-presentation-state-report
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRQTSR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQTSR - request-terminal-state-report
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECRQUPSS(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECRQUPSS - request-user-preferred-supplemental-set
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSACE(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSACE - select-attribute-change-extent
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSASD(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSASD - select-active-status-display
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSC - save-cursor
+         * Save cursor and terminal state so it can be restored later on.
+         * Saves the following items in the terminal's memory:
+         *   * Cursor position
+         *   * Character attributes set by the SGR command
+         *   * Character sets (G0, G1, G2, or G3) currently in GL and GR
+         *   * Wrap flag (autowrap or no autowrap)
+         *   * State of origin mode (DECOM)
+         *   * Selective erase attribute
+         *   * Any single shift 2 (SS2) or single shift 3 (SS3) functions sent
+         */
+
+        screen_save_state(screen, &screen->saved);
+
+        return 0;
+}
+
+static int screen_DECSCA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSCA - select-character-protection-attribute
+         * Defines the characters that come after it as erasable or not erasable
+         * from the screen. The selective erase control functions (DECSED and
+         * DECSEL) can only erase characters defined as erasable.
+         *
+         * @args[0] specifies the new mode. 0 and 2 mark any following character
+         * as erasable, 1 marks it as not erasable.
+         *
+         * Defaults:
+         *   args[0]: 0
+         */
+
+        unsigned int mode = 0;
+
+        if (seq->args[0] > 0)
+                mode = seq->args[0];
+
+        switch (mode) {
+        case 0:
+        case 2:
+                screen->state.attr.protect = 0;
+                break;
+        case 1:
+                screen->state.attr.protect = 1;
+                break;
+        }
+
+        return 0;
+}
+
+static int screen_DECSCL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSCL - select-conformance-level
+         * Select the terminal's operating level. The factory default is
+         * level 4 (VT Level 4 mode, 7-bit controls).
+         * When you change the conformance level, the terminal performs a hard
+         * reset (RIS).
+         *
+         * @args[0] defines the conformance-level, valid values are:
+         *   61: Level 1 (VT100)
+         *   62: Level 2 (VT200)
+         *   63: Level 3 (VT300)
+         *   64: Level 4 (VT400)
+         * @args[1] defines the 8bit-mode, valid values are:
+         *    0: 8-bit controls
+         *    1: 7-bit controls
+         *    2: 8-bit controls (same as 0)
+         *
+         * If @args[0] is 61, then @args[1] is ignored and 7bit controls are
+         * enforced.
+         *
+         * Defaults:
+         *   args[0]: 64
+         *   args[1]: 0
+         */
+
+        unsigned int level = 64, bit = 0;
+
+        if (seq->n_args > 0) {
+                level = seq->args[0];
+                if (seq->n_args > 1)
+                        bit = seq->args[1];
+        }
+
+        term_screen_hard_reset(screen);
+
+        switch (level) {
+        case 61:
+                screen->conformance_level = TERM_CONFORMANCE_LEVEL_VT100;
+                screen->flags |= TERM_FLAG_7BIT_MODE;
+                break;
+        case 62 ... 69:
+                screen->conformance_level = TERM_CONFORMANCE_LEVEL_VT400;
+                if (bit == 1)
+                        screen->flags |= TERM_FLAG_7BIT_MODE;
+                else
+                        screen->flags &= ~TERM_FLAG_7BIT_MODE;
+                break;
+        }
+
+        return 0;
+}
+
+static int screen_DECSCP(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSCP - select-communication-port
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSCPP(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSCPP - select-columns-per-page
+         * Select columns per page. The number of rows is unaffected by this.
+         * @args[0] selectes the number of columns (width), DEC only defines 80
+         * and 132, but we allow any integer here. 0 is equivalent to 80.
+         * Page content is *not* cleared and the cursor is left untouched.
+         * However, if the page is reduced in width and the cursor would be
+         * outside the visible region, it's set to the right border. Newly added
+         * cells are cleared. No data is retained outside the visible region.
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECSCS(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSCS - select-communication-speed
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSCUSR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSCUSR - set-cursor-style
+         * This changes the style of the cursor. @args[0] can be one of:
+         *   0, 1: blinking block
+         *      2: steady block
+         *      3: blinking underline
+         *      4: steady underline
+         * Changing this setting does _not_ affect the cursor visibility itself.
+         * Use DECTCEM for that.
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECSDDT(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSDDT - select-disconnect-delay-time
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSDPT(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSDPT - select-digital-printed-data-type
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSED(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSED - selective-erase-in-display
+         * This control function erases some or all of the erasable characters
+         * in the display. DECSED can only erase characters defined as erasable
+         * by the DECSCA control function. DECSED works inside or outside the
+         * scrolling margins.
+         *
+         * @args[0] defines which regions are erased. If it is 0, all cells from
+         * the cursor (inclusive) till the end of the display are erase. If it
+         * is 1, all cells from the start of the display till the cursor
+         * (inclusive) are erased. If it is 2, all cells are erased.
+         *
+         * Defaults:
+         *   args[0]: 0
+         */
+
+        unsigned int mode = 0;
+
+        if (seq->args[0] > 0)
+                mode = seq->args[0];
+
+        switch (mode) {
+        case 0:
+                term_page_erase(screen->page,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                screen->page->width, screen->page->height,
+                                &screen->state.attr, screen->age, true);
+                break;
+        case 1:
+                term_page_erase(screen->page,
+                                0, 0,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, true);
+                break;
+        case 2:
+                term_page_erase(screen->page,
+                                0, 0,
+                                screen->page->width, screen->page->height,
+                                &screen->state.attr, screen->age, true);
+                break;
+        }
+
+        return 0;
+}
+
+static int screen_DECSEL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSEL - selective-erase-in-line
+         * This control function erases some or all of the erasable characters
+         * in a single line of text. DECSEL erases only those characters defined
+         * as erasable by the DECSCA control function. DECSEL works inside or
+         * outside the scrolling margins.
+         *
+         * @args[0] defines the region to be erased. If it is 0, all cells from
+         * the cursor (inclusive) till the end of the line are erase. If it is
+         * 1, all cells from the start of the line till the cursor (inclusive)
+         * are erased. If it is 2, the whole line of the cursor is erased.
+         *
+         * Defaults:
+         *   args[0]: 0
+         */
+
+        unsigned int mode = 0;
+
+        if (seq->args[0] > 0)
+                mode = seq->args[0];
+
+        switch (mode) {
+        case 0:
+                term_page_erase(screen->page,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                screen->page->width, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, true);
+                break;
+        case 1:
+                term_page_erase(screen->page,
+                                0, screen->state.cursor_y,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, true);
+                break;
+        case 2:
+                term_page_erase(screen->page,
+                                0, screen->state.cursor_y,
+                                screen->page->width, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, true);
+                break;
+        }
+
+        return 0;
+}
+
+static int screen_DECSERA(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSERA - selective-erase-rectangular-area
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSFC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSFC - select-flow-control
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSKCV(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSKCV - set-key-click-volume
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSLCK(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSLCK - set-lock-key-style
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSLE(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSLE - select-locator-events
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECSLPP(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSLPP - set-lines-per-page
+         * Set the number of lines used for the page. @args[0] specifies the
+         * number of lines to be used. DEC only allows a limited number of
+         * choices, however, we allow all integers. 0 is equivalent to 24.
+         *
+         * Defaults:
+         *   args[0]: 0
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DECSLRM_OR_SC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSLRM_OR_SC - set-left-and-right-margins or save-cursor
+         *
+         * TODO: Detect save-cursor and run it. DECSLRM is not worth
+         *       implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSMBV(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSMBV - set-margin-bell-volume
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSMKR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSMKR - select-modifier-key-reporting
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSNLS(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSNLS - set-lines-per-screen
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSPP(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSPP - set-port-parameter
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSPPCS(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSPPCS - select-pro-printer-character-set
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSPRTT(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSPRTT - select-printer-type
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSR - secure-reset
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSRFR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSRFR - select-refresh-rate
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSSCLS(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSSCLS - set-scroll-speed
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSSDT(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSSDT - select-status-display-line-type
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSSL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSSL - select-setup-language
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECST8C(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECST8C - set-tab-at-every-8-columns
+         * Clear the tab-ruler and reset it to a tab at every 8th column,
+         * starting at 9 (though, setting a tab at 1 is fine as it has no
+         * effect).
+         */
+
+        unsigned int i;
+
+        for (i = 0; i < screen->page->width; i += 8)
+                screen->tabs[i / 8] = 0x1;
+
+        return 0;
+}
+
+static int screen_DECSTBM(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSTBM - set-top-and-bottom-margins
+         * This control function sets the top and bottom margins for the current
+         * page. You cannot perform scrolling outside the margins.
+         *
+         * @args[0] defines the top margin, @args[1] defines the bottom margin.
+         * The bottom margin must be lower than the top-margin.
+         *
+         * This call resets the cursor position to 0/0 of the page.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: last page-line
+         */
+
+        unsigned int top, bottom;
+
+        top = 1;
+        bottom = screen->page->height;
+
+        if (seq->args[0] > 0)
+                top = seq->args[0];
+        if (seq->args[1] > 0)
+                bottom = seq->args[1];
+
+        if (top > screen->page->height)
+                top = screen->page->height;
+        if (bottom > screen->page->height)
+                bottom = screen->page->height;
+
+        if (top >= bottom || top > screen->page->height || bottom > screen->page->height) {
+                top = 1;
+                bottom = screen->page->height;
+        }
+
+        term_page_set_scroll_region(screen->page, top - 1, bottom - top + 1);
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_set(screen, 0, 0);
+
+        return 0;
+}
+
+static int screen_DECSTR(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSTR - soft-terminal-reset
+         * Perform a soft reset to the default values.
+         */
+
+        term_screen_soft_reset(screen);
+
+        return 0;
+}
+
+static int screen_DECSTRL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSTRL - set-transmit-rate-limit
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSWBV(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSWBV - set-warning-bell-volume
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECSWL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECSWL - single-width-single-height-line
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECTID(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECTID - select-terminal-id
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECTME(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECTME - terminal-mode-emulation
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DECTST(term_screen *screen, const term_seq *seq) {
+        /*
+         * DECTST - invoke-confidence-test
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_DL(term_screen *screen, const term_seq *seq) {
+        /*
+         * DL - delete-line
+         * This control function deletes one or more lines in the scrolling
+         * region, starting with the line that has the cursor. @args[0] defines
+         * the number of lines to delete. 0 is treated the same as 1.
+         * As lines are deleted, lines below the cursor and in the scrolling
+         * region move up. The terminal adds blank lines with no visual
+         * character attributes at the bottom of the scrolling region. If it is
+         * greater than the number of lines remaining on the page, DL deletes
+         * only the remaining lines. DL has no effect outside the scrolling
+         * margins.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        term_page_delete_lines(screen->page, screen->state.cursor_y, num, &screen->state.attr, screen->age);
+
+        return 0;
+}
+
+static int screen_DSR_ANSI(term_screen *screen, const term_seq *seq) {
+        /*
+         * DSR_ANSI - device-status-report-ansi
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_DSR_DEC(term_screen *screen, const term_seq *seq) {
+        /*
+         * DSR_DEC - device-status-report-dec
+         *
+         * TODO: implement
+         */
+
+        return 0;
+}
+
+static int screen_ECH(term_screen *screen, const term_seq *seq) {
+        /*
+         * ECH - erase-character
+         * This control function erases one or more characters, from the cursor
+         * position to the right. ECH clears character attributes from erased
+         * character positions. ECH works inside or outside the scrolling
+         * margins.
+         * @args[0] defines the number of characters to erase. 0 is treated the
+         * same as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        term_page_erase(screen->page,
+                        screen->state.cursor_x, screen->state.cursor_y,
+                        screen->state.cursor_x + num, screen->state.cursor_y,
+                        &screen->state.attr, screen->age, false);
+
+        return 0;
+}
+
+static int screen_ED(term_screen *screen, const term_seq *seq) {
+        /*
+         * ED - erase-in-display
+         * This control function erases characters from part or all of the
+         * display. When you erase complete lines, they become single-height,
+         * single-width lines, with all visual character attributes cleared. ED
+         * works inside or outside the scrolling margins.
+         *
+         * @args[0] defines the region to erase. 0 means from cursor (inclusive)
+         * till the end of the screen. 1 means from the start of the screen till
+         * the cursor (inclusive) and 2 means the whole screen.
+         *
+         * Defaults:
+         *   args[0]: 0
+         */
+
+        unsigned int mode = 0;
+
+        if (seq->args[0] > 0)
+                mode = seq->args[0];
+
+        switch (mode) {
+        case 0:
+                term_page_erase(screen->page,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                screen->page->width, screen->page->height,
+                                &screen->state.attr, screen->age, false);
+                break;
+        case 1:
+                term_page_erase(screen->page,
+                                0, 0,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, false);
+                break;
+        case 2:
+                term_page_erase(screen->page,
+                                0, 0,
+                                screen->page->width, screen->page->height,
+                                &screen->state.attr, screen->age, false);
+                break;
+        }
+
+        return 0;
+}
+
+static int screen_EL(term_screen *screen, const term_seq *seq) {
+        /*
+         * EL - erase-in-line
+         * This control function erases characters on the line that has the
+         * cursor. EL clears all character attributes from erased character
+         * positions. EL works inside or outside the scrolling margins.
+         *
+         * @args[0] defines the region to erase. 0 means from cursor (inclusive)
+         * till the end of the line. 1 means from the start of the line till the
+         * cursor (inclusive) and 2 means the whole line.
+         *
+         * Defaults:
+         *   args[0]: 0
+         */
+
+        unsigned int mode = 0;
+
+        if (seq->args[0] > 0)
+                mode = seq->args[0];
+
+        switch (mode) {
+        case 0:
+                term_page_erase(screen->page,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                screen->page->width, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, false);
+                break;
+        case 1:
+                term_page_erase(screen->page,
+                                0, screen->state.cursor_y,
+                                screen->state.cursor_x, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, false);
+                break;
+        case 2:
+                term_page_erase(screen->page,
+                                0, screen->state.cursor_y,
+                                screen->page->width, screen->state.cursor_y,
+                                &screen->state.attr, screen->age, false);
+                break;
+        }
+
+        return 0;
+}
+
+static int screen_ENQ(term_screen *screen, const term_seq *seq) {
+        /*
+         * ENQ - enquiry
+         * Transmit the answerback-string. If none is set, do nothing.
+         */
+
+        if (screen->answerback)
+                return screen_write(screen, screen->answerback, strlen(screen->answerback));
+
+        return 0;
+}
+
+static int screen_EPA(term_screen *screen, const term_seq *seq) {
+        /*
+         * EPA - end-of-guarded-area
+         *
+         * TODO: What is this?
+         */
+
+        return 0;
+}
+
+static int screen_FF(term_screen *screen, const term_seq *seq) {
+        /*
+         * FF - form-feed
+         * This causes the cursor to jump to the next line. It is treated the
+         * same as LF.
+         */
+
+        return screen_LF(screen, seq);
+}
+
+static int screen_HPA(term_screen *screen, const term_seq *seq) {
+        /*
+         * HPA - horizontal-position-absolute
+         * HPA causes the active position to be moved to the n-th horizontal
+         * position of the active line. If an attempt is made to move the active
+         * position past the last position on the line, then the active position
+         * stops at the last position on the line.
+         *
+         * @args[0] defines the horizontal position. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_set(screen, num - 1, screen->state.cursor_y);
+
+        return 0;
+}
+
+static int screen_HPR(term_screen *screen, const term_seq *seq) {
+        /*
+         * HPR - horizontal-position-relative
+         * HPR causes the active position to be moved to the n-th following
+         * horizontal position of the active line. If an attempt is made to move
+         * the active position past the last position on the line, then the
+         * active position stops at the last position on the line.
+         *
+         * @args[0] defines the horizontal position. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_right(screen, num);
+
+        return 0;
+}
+
+static int screen_HT(term_screen *screen, const term_seq *seq) {
+        /*
+         * HT - horizontal-tab
+         * Moves the cursor to the next tab stop. If there are no more tab
+         * stops, the cursor moves to the right margin. HT does not cause text
+         * to auto wrap.
+         */
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_right_tab(screen, 1);
+
+        return 0;
+}
+
+static int screen_HTS(term_screen *screen, const term_seq *seq) {
+        /*
+         * HTS - horizontal-tab-set
+         * HTS sets a horizontal tab stop at the column position indicated by
+         * the value of the active column when the terminal receives an HTS.
+         *
+         * Executing an HTS does not effect the other horizontal tab stop
+         * settings.
+         */
+
+        unsigned int pos;
+
+        pos = screen->state.cursor_x;
+        if (screen->page->width > 0)
+                screen->tabs[pos / 8] |= 1U << (pos % 8);
+
+        return 0;
+}
+
+static int screen_HVP(term_screen *screen, const term_seq *seq) {
+        /*
+         * HVP - horizontal-and-vertical-position
+         * This control function works the same as the cursor position (CUP)
+         * function. Origin mode (DECOM) selects line numbering and the ability
+         * to move the cursor into margins.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *   args[1]: 1
+         */
+
+        return screen_CUP(screen, seq);
+}
+
+static int screen_ICH(term_screen *screen, const term_seq *seq) {
+        /*
+         * ICH - insert-character
+         * This control function inserts one or more space (SP) characters
+         * starting at the cursor position. @args[0] is the number of characters
+         * to insert. 0 is treated as 1.
+         *
+         * The ICH sequence inserts blank characters with the normal
+         * character attribute. The cursor remains at the beginning of the blank
+         * characters. Text between the cursor and right margin moves to the
+         * right. Characters scrolled past the right margin are lost. ICH has no
+         * effect outside the scrolling margins.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        term_page_insert_cells(screen->page, screen->state.cursor_x, screen->state.cursor_y, num, &screen->state.attr, screen->age);
+
+        return 0;
+}
+
+static int screen_IL(term_screen *screen, const term_seq *seq) {
+        /*
+         * IL - insert-line
+         * This control function inserts one or more blank lines, starting at
+         * the cursor. @args[0] is the number of lines to insert. 0 is treated
+         * as 1.
+         *
+         * As lines are inserted, lines below the cursor and in the scrolling
+         * region move down. Lines scrolled off the page are lost. IL has no
+         * effect outside the page margins.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        term_page_insert_lines(screen->page, screen->state.cursor_y, num, &screen->state.attr, screen->age);
+
+        return 0;
+}
+
+static int screen_IND(term_screen *screen, const term_seq *seq) {
+        /*
+         * IND - index
+         * IND moves the cursor down one line in the same column. If the cursor
+         * is at the bottom margin, then the screen performs a scroll-up.
+         */
+
+        screen_cursor_down(screen, 1, true);
+
+        return 0;
+}
+
+static int screen_LF(term_screen *screen, const term_seq *seq) {
+        /*
+         * LF - line-feed
+         * Causes a line feed or a new line operation, depending on the setting
+         * of line feed/new line mode.
+         */
+
+        screen_cursor_down(screen, 1, true);
+        if (screen->flags & TERM_FLAG_NEWLINE_MODE)
+                screen_cursor_left(screen, screen->state.cursor_x);
+
+        return 0;
+}
+
+static int screen_LS1R(term_screen *screen, const term_seq *seq) {
+        /*
+         * LS1R - locking-shift-1-right
+         * Map G1 into GR.
+         */
+
+        screen->state.gr = &screen->g1;
+
+        return 0;
+}
+
+static int screen_LS2(term_screen *screen, const term_seq *seq) {
+        /*
+         * LS2 - locking-shift-2
+         * Map G2 into GL.
+         */
+
+        screen->state.gl = &screen->g2;
+
+        return 0;
+}
+
+static int screen_LS2R(term_screen *screen, const term_seq *seq) {
+        /*
+         * LS2R - locking-shift-2-right
+         * Map G2 into GR.
+         */
+
+        screen->state.gr = &screen->g2;
+
+        return 0;
+}
+
+static int screen_LS3(term_screen *screen, const term_seq *seq) {
+        /*
+         * LS3 - locking-shift-3
+         * Map G3 into GL.
+         */
+
+        screen->state.gl = &screen->g3;
+
+        return 0;
+}
+
+static int screen_LS3R(term_screen *screen, const term_seq *seq) {
+        /*
+         * LS3R - locking-shift-3-right
+         * Map G3 into GR.
+         */
+
+        screen->state.gr = &screen->g3;
+
+        return 0;
+}
+
+static int screen_MC_ANSI(term_screen *screen, const term_seq *seq) {
+        /*
+         * MC_ANSI - media-copy-ansi
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_MC_DEC(term_screen *screen, const term_seq *seq) {
+        /*
+         * MC_DEC - media-copy-dec
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_NEL(term_screen *screen, const term_seq *seq) {
+        /*
+         * NEL - next-line
+         * Moves cursor to first position on next line. If cursor is at bottom
+         * margin, then screen performs a scroll-up.
+         */
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_down(screen, 1, true);
+        screen_cursor_set(screen, 0, screen->state.cursor_y);
+
+        return 0;
+}
+
+static int screen_NP(term_screen *screen, const term_seq *seq) {
+        /*
+         * NP - next-page
+         * This control function moves the cursor forward to the home position
+         * on one of the following pages in page memory. If there is only one
+         * page, then the terminal ignores NP.
+         * If NP tries to move the cursor past the last page in memory, then the
+         * cursor stops at the last page.
+         *
+         * @args[0] defines the number of pages to forward. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * Probably not worth implementing. We only support a single page.
+         */
+
+        return 0;
+}
+
+static int screen_NULL(term_screen *screen, const term_seq *seq) {
+        /*
+         * NULL - null
+         * The NULL operation does nothing. ASCII NULL is always ignored.
+         */
+
+        return 0;
+}
+
+static int screen_PP(term_screen *screen, const term_seq *seq) {
+        /*
+         * PP - preceding-page
+         * This control function moves the cursor backward to the home position
+         * on one of the preceding pages in page memory. If there is only one
+         * page, then the terminal ignores PP.
+         * If PP tries to move the cursor back farther than the first page in
+         * memory, then the cursor stops at the first page.
+         *
+         * @args[0] defines the number of pages to go backwards. 0 is treated
+         * as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * Probably not worth implementing. We only support a single page.
+         */
+
+        return 0;
+}
+
+static int screen_PPA(term_screen *screen, const term_seq *seq) {
+        /*
+         * PPA - page-position-absolute
+         * This control function can move the cursor to the corresponding row
+         * and column on any page in page memory. You select the page by its
+         * number. If there is only one page, then the terminal ignores PPA.
+         *
+         * @args[0] is the number of the page to move the cursor to. If it is
+         * greater than the number of the last page in memory, then the cursor
+         * stops at the last page. If it is less than the number of the first
+         * page, then the cursor stops at the first page.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * Probably not worth implementing. We only support a single page.
+         */
+
+        return 0;
+}
+
+static int screen_PPB(term_screen *screen, const term_seq *seq) {
+        /*
+         * PPB - page-position-backward
+         * This control function moves the cursor backward to the corresponding
+         * row and column on one of the preceding pages in page memory. If there
+         * is only one page, then the terminal ignores PPB.
+         *
+         * @args[0] indicates the number of pages to move the cursor backward.
+         * If it tries to move the cursor back farther than the first page in
+         * memory, then the cursor stops at the first page. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * Probably not worth implementing. We only support a single page.
+         */
+
+        return 0;
+}
+
+static int screen_PPR(term_screen *screen, const term_seq *seq) {
+        /*
+         * PPR - page-position-relative
+         * This control function moves the cursor forward to the corresponding
+         * row and column on one of the following pages in page memory. If there
+         * is only one page, then the terminal ignores PPR.
+         *
+         * @args[0] indicates how many pages to move the cursor forward. If it
+         * tries to move the cursor beyond the last page in memory, then the
+         * cursor stops at the last page. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * Probably not worth implementing. We only support a single page.
+         */
+
+        return 0;
+}
+
+static int screen_RC(term_screen *screen, const term_seq *seq) {
+        /*
+         * RC - restore-cursor
+         */
+
+        return screen_DECRC(screen, seq);
+}
+
+static int screen_REP(term_screen *screen, const term_seq *seq) {
+        /*
+         * REP - repeat
+         * Repeat the preceding graphics-character the given number of times.
+         * @args[0] specifies how often it shall be repeated. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_RI(term_screen *screen, const term_seq *seq) {
+        /*
+         * RI - reverse-index
+         * Moves the cursor up one line in the same column. If the cursor is at
+         * the top margin, the page scrolls down.
+         */
+
+        screen_cursor_up(screen, 1, true);
+
+        return 0;
+}
+
+static int screen_RIS(term_screen *screen, const term_seq *seq) {
+        /*
+         * RIS - reset-to-initial-state
+         * This control function causes a nonvolatile memory (NVR) recall to
+         * occur. RIS replaces all set-up features with their saved settings.
+         *
+         * The terminal stores these saved settings in NVR memory. The saved
+         * setting for a feature is the same as the factory-default setting,
+         * unless you saved a new setting.
+         */
+
+        term_screen_hard_reset(screen);
+
+        return 0;
+}
+
+static int screen_RM_ANSI(term_screen *screen, const term_seq *seq) {
+        /*
+         * RM_ANSI - reset-mode-ansi
+         *
+         * TODO: implement (see VT510rm manual)
+         */
+
+        unsigned int i;
+
+        for (i = 0; i < seq->n_args; ++i)
+                screen_mode_change_ansi(screen, seq->args[i], false);
+
+        return 0;
+}
+
+static int screen_RM_DEC(term_screen *screen, const term_seq *seq) {
+        /*
+         * RM_DEC - reset-mode-dec
+         * This is the same as RM_ANSI but for DEC modes.
+         */
+
+        unsigned int i;
+
+        for (i = 0; i < seq->n_args; ++i)
+                screen_mode_change_dec(screen, seq->args[i], false);
+
+        return 0;
+}
+
+static int screen_S7C1T(term_screen *screen, const term_seq *seq) {
+        /*
+         * S7C1T - set-7bit-c1-terminal
+         * This causes the terminal to start sending C1 controls as 7bit
+         * sequences instead of 8bit C1 controls.
+         * This is ignored if the terminal is below level-2 emulation mode
+         * (VT100 and below), the terminal already sends 7bit controls then.
+         */
+
+        if (screen->conformance_level > TERM_CONFORMANCE_LEVEL_VT100)
+                screen->flags |= TERM_FLAG_7BIT_MODE;
+
+        return 0;
+}
+
+static int screen_S8C1T(term_screen *screen, const term_seq *seq) {
+        /*
+         * S8C1T - set-8bit-c1-terminal
+         * This causes the terminal to start sending C1 controls as 8bit C1
+         * control instead of 7bit sequences.
+         * This is ignored if the terminal is below level-2 emulation mode
+         * (VT100 and below). The terminal always sends 7bit controls in those
+         * modes.
+         */
+
+        if (screen->conformance_level > TERM_CONFORMANCE_LEVEL_VT100)
+                screen->flags &= ~TERM_FLAG_7BIT_MODE;
+
+        return 0;
+}
+
+static int screen_SCS(term_screen *screen, const term_seq *seq) {
+        /*
+         * SCS - select-character-set
+         * Designate character sets to G-sets. The mapping from intermediates
+         * and terminal characters in the escape sequence to G-sets and
+         * character-sets is non-trivial and implemented separately. See there
+         * for more information.
+         * This call simply sets the selected G-set to the desired
+         * character-set.
+         */
+
+        term_charset *cs = NULL;
+
+        /* TODO: support more of them? */
+        switch (seq->charset) {
+        case TERM_CHARSET_ISO_LATIN1_SUPPLEMENTAL:
+        case TERM_CHARSET_ISO_LATIN2_SUPPLEMENTAL:
+        case TERM_CHARSET_ISO_LATIN5_SUPPLEMENTAL:
+        case TERM_CHARSET_ISO_GREEK_SUPPLEMENTAL:
+        case TERM_CHARSET_ISO_HEBREW_SUPPLEMENTAL:
+        case TERM_CHARSET_ISO_LATIN_CYRILLIC:
+                break;
+
+        case TERM_CHARSET_DEC_SPECIAL_GRAPHIC:
+                cs = &term_dec_special_graphics;
+                break;
+        case TERM_CHARSET_DEC_SUPPLEMENTAL:
+                cs = &term_dec_supplemental_graphics;
+                break;
+        case TERM_CHARSET_DEC_TECHNICAL:
+        case TERM_CHARSET_CYRILLIC_DEC:
+        case TERM_CHARSET_DUTCH_NRCS:
+        case TERM_CHARSET_FINNISH_NRCS:
+        case TERM_CHARSET_FRENCH_NRCS:
+        case TERM_CHARSET_FRENCH_CANADIAN_NRCS:
+        case TERM_CHARSET_GERMAN_NRCS:
+        case TERM_CHARSET_GREEK_DEC:
+        case TERM_CHARSET_GREEK_NRCS:
+        case TERM_CHARSET_HEBREW_DEC:
+        case TERM_CHARSET_HEBREW_NRCS:
+        case TERM_CHARSET_ITALIAN_NRCS:
+        case TERM_CHARSET_NORWEGIAN_DANISH_NRCS:
+        case TERM_CHARSET_PORTUGUESE_NRCS:
+        case TERM_CHARSET_RUSSIAN_NRCS:
+        case TERM_CHARSET_SCS_NRCS:
+        case TERM_CHARSET_SPANISH_NRCS:
+        case TERM_CHARSET_SWEDISH_NRCS:
+        case TERM_CHARSET_SWISS_NRCS:
+        case TERM_CHARSET_TURKISH_DEC:
+        case TERM_CHARSET_TURKISH_NRCS:
+                break;
+
+        case TERM_CHARSET_USERPREF_SUPPLEMENTAL:
+                break;
+        }
+
+        if (seq->intermediates & TERM_SEQ_FLAG_POPEN)
+                screen->g0 = cs ? : &term_unicode_lower;
+        else if (seq->intermediates & TERM_SEQ_FLAG_PCLOSE)
+                screen->g1 = cs ? : &term_unicode_upper;
+        else if (seq->intermediates & TERM_SEQ_FLAG_MULT)
+                screen->g2 = cs ? : &term_unicode_lower;
+        else if (seq->intermediates & TERM_SEQ_FLAG_PLUS)
+                screen->g3 = cs ? : &term_unicode_upper;
+        else if (seq->intermediates & TERM_SEQ_FLAG_MINUS)
+                screen->g1 = cs ? : &term_unicode_upper;
+        else if (seq->intermediates & TERM_SEQ_FLAG_DOT)
+                screen->g2 = cs ? : &term_unicode_lower;
+        else if (seq->intermediates & TERM_SEQ_FLAG_SLASH)
+                screen->g3 = cs ? : &term_unicode_upper;
+
+        return 0;
+}
+
+static int screen_SD(term_screen *screen, const term_seq *seq) {
+        /*
+         * SD - scroll-down
+         * This control function moves the user window down a specified number
+         * of lines in page memory.
+         * @args[0] is the number of lines to move the
+         * user window up in page memory. New lines appear at the top of the
+         * display. Old lines disappear at the bottom of the display. You
+         * cannot pan past the top margin of the current page. 0 is treated
+         * as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        term_page_scroll_down(screen->page, num, &screen->state.attr, screen->age, NULL);
+
+        return 0;
+}
+
+static int screen_SGR(term_screen *screen, const term_seq *seq) {
+        /*
+         * SGR - select-graphics-rendition
+         */
+
+        term_color *dst;
+        unsigned int i, code;
+        int v;
+
+        if (seq->n_args < 1) {
+                zero(screen->state.attr);
+                return 0;
+        }
+
+        for (i = 0; i < seq->n_args; ++i) {
+                v = seq->args[i];
+                switch (v) {
+                case 1:
+                        screen->state.attr.bold = 1;
+                        break;
+                case 3:
+                        screen->state.attr.italic = 1;
+                        break;
+                case 4:
+                        screen->state.attr.underline = 1;
+                        break;
+                case 5:
+                        screen->state.attr.blink = 1;
+                        break;
+                case 7:
+                        screen->state.attr.inverse = 1;
+                        break;
+                case 8:
+                        screen->state.attr.hidden = 1;
+                        break;
+                case 22:
+                        screen->state.attr.bold = 0;
+                        break;
+                case 23:
+                        screen->state.attr.italic = 0;
+                        break;
+                case 24:
+                        screen->state.attr.underline = 0;
+                        break;
+                case 25:
+                        screen->state.attr.blink = 0;
+                        break;
+                case 27:
+                        screen->state.attr.inverse = 0;
+                        break;
+                case 28:
+                        screen->state.attr.hidden = 0;
+                        break;
+                case 30 ... 37:
+                        screen->state.attr.fg.ccode = v - 30 + TERM_CCODE_BLACK;
+                        break;
+                case 39:
+                        screen->state.attr.fg.ccode = 0;
+                        break;
+                case 40 ... 47:
+                        screen->state.attr.bg.ccode = v - 40 + TERM_CCODE_BLACK;
+                        break;
+                case 49:
+                        screen->state.attr.bg.ccode = 0;
+                        break;
+                case 90 ... 97:
+                        screen->state.attr.fg.ccode = v - 90 + TERM_CCODE_LIGHT_BLACK;
+                        break;
+                case 100 ... 107:
+                        screen->state.attr.bg.ccode = v - 100 + TERM_CCODE_LIGHT_BLACK;
+                        break;
+                case 38:
+                        /* fallthrough */
+                case 48:
+
+                        if (v == 38)
+                                dst = &screen->state.attr.fg;
+                        else
+                                dst = &screen->state.attr.bg;
+
+                        ++i;
+                        if (i >= seq->n_args)
+                                break;
+
+                        switch (seq->args[i]) {
+                        case 2:
+                                /* 24bit-color support */
+
+                                i += 3;
+                                if (i >= seq->n_args)
+                                        break;
+
+                                dst->ccode = TERM_CCODE_RGB;
+                                dst->red = (seq->args[i - 2] >= 0) ? seq->args[i - 2] : 0;
+                                dst->green = (seq->args[i - 1] >= 0) ? seq->args[i - 1] : 0;
+                                dst->blue = (seq->args[i] >= 0) ? seq->args[i] : 0;
+
+                                break;
+                        case 5:
+                                /* 256-color support */
+
+                                ++i;
+                                if (i >= seq->n_args || seq->args[i] < 0)
+                                        break;
+
+                                dst->ccode = TERM_CCODE_256;
+                                code = seq->args[i];
+                                dst->c256 = code < 256 ? code : 0;
+
+                                break;
+                        }
+
+                        break;
+                case -1:
+                        /* fallthrough */
+                case 0:
+                        zero(screen->state.attr);
+                        break;
+                }
+        }
+
+        return 0;
+}
+
+static int screen_SI(term_screen *screen, const term_seq *seq) {
+        /*
+         * SI - shift-in
+         * Map G0 into GL.
+         */
+
+        screen->state.gl = &screen->g0;
+
+        return 0;
+}
+
+static int screen_SM_ANSI(term_screen *screen, const term_seq *seq) {
+        /*
+         * SM_ANSI - set-mode-ansi
+         *
+         * TODO: implement
+         */
+
+        unsigned int i;
+
+        for (i = 0; i < seq->n_args; ++i)
+                screen_mode_change_ansi(screen, seq->args[i], true);
+
+        return 0;
+}
+
+static int screen_SM_DEC(term_screen *screen, const term_seq *seq) {
+        /*
+         * SM_DEC - set-mode-dec
+         * This is the same as SM_ANSI but for DEC modes.
+         */
+
+        unsigned int i;
+
+        for (i = 0; i < seq->n_args; ++i)
+                screen_mode_change_dec(screen, seq->args[i], true);
+
+        return 0;
+}
+
+static int screen_SO(term_screen *screen, const term_seq *seq) {
+        /*
+         * SO - shift-out
+         * Map G1 into GL.
+         */
+
+        screen->state.gl = &screen->g1;
+
+        return 0;
+}
+
+static int screen_SPA(term_screen *screen, const term_seq *seq) {
+        /*
+         * SPA - start-of-protected-area
+         *
+         * TODO: What is this?
+         */
+
+        return 0;
+}
+
+static int screen_SS2(term_screen *screen, const term_seq *seq) {
+        /*
+         * SS2 - single-shift-2
+         * Temporarily map G2 into GL for the next graphics character.
+         */
+
+        screen->state.glt = &screen->g2;
+
+        return 0;
+}
+
+static int screen_SS3(term_screen *screen, const term_seq *seq) {
+        /*
+         * SS3 - single-shift-3
+         * Temporarily map G3 into GL for the next graphics character
+         */
+
+        screen->state.glt = &screen->g3;
+
+        return 0;
+}
+
+static int screen_ST(term_screen *screen, const term_seq *seq) {
+        /*
+         * ST - string-terminator
+         * The string-terminator is usually part of control-sequences and
+         * handled by the parser. In all other situations it is silently
+         * ignored.
+         */
+
+        return 0;
+}
+
+static int screen_SU(term_screen *screen, const term_seq *seq) {
+        /*
+         * SU - scroll-up
+         * This control function moves the user window up a specified number of
+         * lines in page memory.
+         * @args[0] is the number of lines to move the
+         * user window down in page memory. New lines appear at the bottom of
+         * the display. Old lines disappear at the top of the display. You
+         * cannot pan past the bottom margin of the current page. 0 is treated
+         * as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        term_page_scroll_up(screen->page, num, &screen->state.attr, screen->age, screen->history);
+
+        return 0;
+}
+
+static int screen_SUB(term_screen *screen, const term_seq *seq) {
+        /*
+         * SUB - substitute
+         * Cancel the current control-sequence and print a replacement
+         * character. Our parser already handles this so all we have to do is
+         * print the replacement character.
+         */
+
+        static const term_seq rep = {
+                .type = TERM_SEQ_GRAPHIC,
+                .command = TERM_CMD_GRAPHIC,
+                .terminator = 0xfffd,
+        };
+
+        return screen_GRAPHIC(screen, &rep);
+}
+
+static int screen_TBC(term_screen *screen, const term_seq *seq) {
+        /*
+         * TBC - tab-clear
+         * This clears tab-stops. If @args[0] is 0, the tab-stop at the current
+         * cursor position is cleared. If it is 3, all tab stops are cleared.
+         *
+         * Defaults:
+         *   args[0]: 0
+         */
+
+        unsigned int mode = 0, pos;
+
+        if (seq->args[0] > 0)
+                mode = seq->args[0];
+
+        switch (mode) {
+        case 0:
+                pos = screen->state.cursor_x;
+                if (screen->page->width > 0)
+                        screen->tabs[pos / 8] &= ~(1U << (pos % 8));
+                break;
+        case 3:
+                if (screen->page->width > 0)
+                        memset(screen->tabs, 0, (screen->page->width + 7) / 8);
+                break;
+        }
+
+        return 0;
+}
+
+static int screen_VPA(term_screen *screen, const term_seq *seq) {
+        /*
+         * VPA - vertical-line-position-absolute
+         * VPA causes the active position to be moved to the corresponding
+         * horizontal position. @args[0] specifies the line to jump to. If an
+         * attempt is made to move the active position below the last line, then
+         * the active position stops on the last line. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int pos = 1;
+
+        if (seq->args[0] > 0)
+                pos = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_set_rel(screen, screen->state.cursor_x, pos - 1);
+
+        return 0;
+}
+
+static int screen_VPR(term_screen *screen, const term_seq *seq) {
+        /*
+         * VPR - vertical-line-position-relative
+         * VPR causes the active position to be moved to the corresponding
+         * horizontal position. @args[0] specifies the number of lines to jump
+         * down relative to the current cursor position. If an attempt is made
+         * to move the active position below the last line, the active position
+         * stops at the last line. 0 is treated as 1.
+         *
+         * Defaults:
+         *   args[0]: 1
+         */
+
+        unsigned int num = 1;
+
+        if (seq->args[0] > 0)
+                num = seq->args[0];
+
+        screen_cursor_clear_wrap(screen);
+        screen_cursor_down(screen, num, false);
+
+        return 0;
+}
+
+static int screen_VT(term_screen *screen, const term_seq *seq) {
+        /*
+         * VT - vertical-tab
+         * This causes a vertical jump by one line. Terminals treat it exactly
+         * the same as LF.
+         */
+
+        return screen_LF(screen, seq);
+}
+
+static int screen_XTERM_CLLHP(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_CLLHP - xterm-cursor-lower-left-hp-bugfix
+         * Move the cursor to the lower-left corner of the page. This is an HP
+         * bugfix by xterm.
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_IHMT(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_IHMT - xterm-initiate-highlight-mouse-tracking
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_MLHP(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_MLHP - xterm-memory-lock-hp-bugfix
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_MUHP(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_MUHP - xterm-memory-unlock-hp-bugfix
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_RPM(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_RPM - xterm-restore-private-mode
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_RRV(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_RRV - xterm-reset-resource-value
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_RTM(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_RTM - xterm-reset-title-mode
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SACL1(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SACL1 - xterm-set-ansi-conformance-level-1
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SACL2(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SACL2 - xterm-set-ansi-conformance-level-2
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SACL3(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SACL3 - xterm-set-ansi-conformance-level-3
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SDCS(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SDCS - xterm-set-default-character-set
+         * Select the default character set. We treat this the same as UTF-8 as
+         * this is our default character set. As we always use UTF-8, this
+         * becomes as no-op.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SGFX(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SGFX - xterm-sixel-graphics
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SPM(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SPM - xterm-set-private-mode
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SRV(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SRV - xterm-set-resource-value
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_STM(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_STM - xterm-set-title-mode
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_SUCS(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_SUCS - xterm-select-utf8-character-set
+         * Select UTF-8 as character set. This is our default on only character
+         * set. Hence, this is a no-op.
+         */
+
+        return 0;
+}
+
+static int screen_XTERM_WM(term_screen *screen, const term_seq *seq) {
+        /*
+         * XTERM_WM - xterm-window-management
+         *
+         * Probably not worth implementing.
+         */
+
+        return 0;
+}
+
+/*
+ * Feeding data
+ * The screen_feed_*() handlers take data from the user and feed it into the
+ * screen. Once the parser has detected a sequence, we parse the command-type
+ * and forward it to the command-dispatchers.
+ */
+
+static int screen_feed_cmd(term_screen *screen, const term_seq *seq) {
+        switch (seq->command) {
+        case TERM_CMD_GRAPHIC:
+                return screen_GRAPHIC(screen, seq);
+        case TERM_CMD_BEL:
+                return screen_BEL(screen, seq);
+        case TERM_CMD_BS:
+                return screen_BS(screen, seq);
+        case TERM_CMD_CBT:
+                return screen_CBT(screen, seq);
+        case TERM_CMD_CHA:
+                return screen_CHA(screen, seq);
+        case TERM_CMD_CHT:
+                return screen_CHT(screen, seq);
+        case TERM_CMD_CNL:
+                return screen_CNL(screen, seq);
+        case TERM_CMD_CPL:
+                return screen_CPL(screen, seq);
+        case TERM_CMD_CR:
+                return screen_CR(screen, seq);
+        case TERM_CMD_CUB:
+                return screen_CUB(screen, seq);
+        case TERM_CMD_CUD:
+                return screen_CUD(screen, seq);
+        case TERM_CMD_CUF:
+                return screen_CUF(screen, seq);
+        case TERM_CMD_CUP:
+                return screen_CUP(screen, seq);
+        case TERM_CMD_CUU:
+                return screen_CUU(screen, seq);
+        case TERM_CMD_DA1:
+                return screen_DA1(screen, seq);
+        case TERM_CMD_DA2:
+                return screen_DA2(screen, seq);
+        case TERM_CMD_DA3:
+                return screen_DA3(screen, seq);
+        case TERM_CMD_DC1:
+                return screen_DC1(screen, seq);
+        case TERM_CMD_DC3:
+                return screen_DC3(screen, seq);
+        case TERM_CMD_DCH:
+                return screen_DCH(screen, seq);
+        case TERM_CMD_DECALN:
+                return screen_DECALN(screen, seq);
+        case TERM_CMD_DECANM:
+                return screen_DECANM(screen, seq);
+        case TERM_CMD_DECBI:
+                return screen_DECBI(screen, seq);
+        case TERM_CMD_DECCARA:
+                return screen_DECCARA(screen, seq);
+        case TERM_CMD_DECCRA:
+                return screen_DECCRA(screen, seq);
+        case TERM_CMD_DECDC:
+                return screen_DECDC(screen, seq);
+        case TERM_CMD_DECDHL_BH:
+                return screen_DECDHL_BH(screen, seq);
+        case TERM_CMD_DECDHL_TH:
+                return screen_DECDHL_TH(screen, seq);
+        case TERM_CMD_DECDWL:
+                return screen_DECDWL(screen, seq);
+        case TERM_CMD_DECEFR:
+                return screen_DECEFR(screen, seq);
+        case TERM_CMD_DECELF:
+                return screen_DECELF(screen, seq);
+        case TERM_CMD_DECELR:
+                return screen_DECELR(screen, seq);
+        case TERM_CMD_DECERA:
+                return screen_DECERA(screen, seq);
+        case TERM_CMD_DECFI:
+                return screen_DECFI(screen, seq);
+        case TERM_CMD_DECFRA:
+                return screen_DECFRA(screen, seq);
+        case TERM_CMD_DECIC:
+                return screen_DECIC(screen, seq);
+        case TERM_CMD_DECID:
+                return screen_DECID(screen, seq);
+        case TERM_CMD_DECINVM:
+                return screen_DECINVM(screen, seq);
+        case TERM_CMD_DECKBD:
+                return screen_DECKBD(screen, seq);
+        case TERM_CMD_DECKPAM:
+                return screen_DECKPAM(screen, seq);
+        case TERM_CMD_DECKPNM:
+                return screen_DECKPNM(screen, seq);
+        case TERM_CMD_DECLFKC:
+                return screen_DECLFKC(screen, seq);
+        case TERM_CMD_DECLL:
+                return screen_DECLL(screen, seq);
+        case TERM_CMD_DECLTOD:
+                return screen_DECLTOD(screen, seq);
+        case TERM_CMD_DECPCTERM:
+                return screen_DECPCTERM(screen, seq);
+        case TERM_CMD_DECPKA:
+                return screen_DECPKA(screen, seq);
+        case TERM_CMD_DECPKFMR:
+                return screen_DECPKFMR(screen, seq);
+        case TERM_CMD_DECRARA:
+                return screen_DECRARA(screen, seq);
+        case TERM_CMD_DECRC:
+                return screen_DECRC(screen, seq);
+        case TERM_CMD_DECREQTPARM:
+                return screen_DECREQTPARM(screen, seq);
+        case TERM_CMD_DECRPKT:
+                return screen_DECRPKT(screen, seq);
+        case TERM_CMD_DECRQCRA:
+                return screen_DECRQCRA(screen, seq);
+        case TERM_CMD_DECRQDE:
+                return screen_DECRQDE(screen, seq);
+        case TERM_CMD_DECRQKT:
+                return screen_DECRQKT(screen, seq);
+        case TERM_CMD_DECRQLP:
+                return screen_DECRQLP(screen, seq);
+        case TERM_CMD_DECRQM_ANSI:
+                return screen_DECRQM_ANSI(screen, seq);
+        case TERM_CMD_DECRQM_DEC:
+                return screen_DECRQM_DEC(screen, seq);
+        case TERM_CMD_DECRQPKFM:
+                return screen_DECRQPKFM(screen, seq);
+        case TERM_CMD_DECRQPSR:
+                return screen_DECRQPSR(screen, seq);
+        case TERM_CMD_DECRQTSR:
+                return screen_DECRQTSR(screen, seq);
+        case TERM_CMD_DECRQUPSS:
+                return screen_DECRQUPSS(screen, seq);
+        case TERM_CMD_DECSACE:
+                return screen_DECSACE(screen, seq);
+        case TERM_CMD_DECSASD:
+                return screen_DECSASD(screen, seq);
+        case TERM_CMD_DECSC:
+                return screen_DECSC(screen, seq);
+        case TERM_CMD_DECSCA:
+                return screen_DECSCA(screen, seq);
+        case TERM_CMD_DECSCL:
+                return screen_DECSCL(screen, seq);
+        case TERM_CMD_DECSCP:
+                return screen_DECSCP(screen, seq);
+        case TERM_CMD_DECSCPP:
+                return screen_DECSCPP(screen, seq);
+        case TERM_CMD_DECSCS:
+                return screen_DECSCS(screen, seq);
+        case TERM_CMD_DECSCUSR:
+                return screen_DECSCUSR(screen, seq);
+        case TERM_CMD_DECSDDT:
+                return screen_DECSDDT(screen, seq);
+        case TERM_CMD_DECSDPT:
+                return screen_DECSDPT(screen, seq);
+        case TERM_CMD_DECSED:
+                return screen_DECSED(screen, seq);
+        case TERM_CMD_DECSEL:
+                return screen_DECSEL(screen, seq);
+        case TERM_CMD_DECSERA:
+                return screen_DECSERA(screen, seq);
+        case TERM_CMD_DECSFC:
+                return screen_DECSFC(screen, seq);
+        case TERM_CMD_DECSKCV:
+                return screen_DECSKCV(screen, seq);
+        case TERM_CMD_DECSLCK:
+                return screen_DECSLCK(screen, seq);
+        case TERM_CMD_DECSLE:
+                return screen_DECSLE(screen, seq);
+        case TERM_CMD_DECSLPP:
+                return screen_DECSLPP(screen, seq);
+        case TERM_CMD_DECSLRM_OR_SC:
+                return screen_DECSLRM_OR_SC(screen, seq);
+        case TERM_CMD_DECSMBV:
+                return screen_DECSMBV(screen, seq);
+        case TERM_CMD_DECSMKR:
+                return screen_DECSMKR(screen, seq);
+        case TERM_CMD_DECSNLS:
+                return screen_DECSNLS(screen, seq);
+        case TERM_CMD_DECSPP:
+                return screen_DECSPP(screen, seq);
+        case TERM_CMD_DECSPPCS:
+                return screen_DECSPPCS(screen, seq);
+        case TERM_CMD_DECSPRTT:
+                return screen_DECSPRTT(screen, seq);
+        case TERM_CMD_DECSR:
+                return screen_DECSR(screen, seq);
+        case TERM_CMD_DECSRFR:
+                return screen_DECSRFR(screen, seq);
+        case TERM_CMD_DECSSCLS:
+                return screen_DECSSCLS(screen, seq);
+        case TERM_CMD_DECSSDT:
+                return screen_DECSSDT(screen, seq);
+        case TERM_CMD_DECSSL:
+                return screen_DECSSL(screen, seq);
+        case TERM_CMD_DECST8C:
+                return screen_DECST8C(screen, seq);
+        case TERM_CMD_DECSTBM:
+                return screen_DECSTBM(screen, seq);
+        case TERM_CMD_DECSTR:
+                return screen_DECSTR(screen, seq);
+        case TERM_CMD_DECSTRL:
+                return screen_DECSTRL(screen, seq);
+        case TERM_CMD_DECSWBV:
+                return screen_DECSWBV(screen, seq);
+        case TERM_CMD_DECSWL:
+                return screen_DECSWL(screen, seq);
+        case TERM_CMD_DECTID:
+                return screen_DECTID(screen, seq);
+        case TERM_CMD_DECTME:
+                return screen_DECTME(screen, seq);
+        case TERM_CMD_DECTST:
+                return screen_DECTST(screen, seq);
+        case TERM_CMD_DL:
+                return screen_DL(screen, seq);
+        case TERM_CMD_DSR_ANSI:
+                return screen_DSR_ANSI(screen, seq);
+        case TERM_CMD_DSR_DEC:
+                return screen_DSR_DEC(screen, seq);
+        case TERM_CMD_ECH:
+                return screen_ECH(screen, seq);
+        case TERM_CMD_ED:
+                return screen_ED(screen, seq);
+        case TERM_CMD_EL:
+                return screen_EL(screen, seq);
+        case TERM_CMD_ENQ:
+                return screen_ENQ(screen, seq);
+        case TERM_CMD_EPA:
+                return screen_EPA(screen, seq);
+        case TERM_CMD_FF:
+                return screen_FF(screen, seq);
+        case TERM_CMD_HPA:
+                return screen_HPA(screen, seq);
+        case TERM_CMD_HPR:
+                return screen_HPR(screen, seq);
+        case TERM_CMD_HT:
+                return screen_HT(screen, seq);
+        case TERM_CMD_HTS:
+                return screen_HTS(screen, seq);
+        case TERM_CMD_HVP:
+                return screen_HVP(screen, seq);
+        case TERM_CMD_ICH:
+                return screen_ICH(screen, seq);
+        case TERM_CMD_IL:
+                return screen_IL(screen, seq);
+        case TERM_CMD_IND:
+                return screen_IND(screen, seq);
+        case TERM_CMD_LF:
+                return screen_LF(screen, seq);
+        case TERM_CMD_LS1R:
+                return screen_LS1R(screen, seq);
+        case TERM_CMD_LS2:
+                return screen_LS2(screen, seq);
+        case TERM_CMD_LS2R:
+                return screen_LS2R(screen, seq);
+        case TERM_CMD_LS3:
+                return screen_LS3(screen, seq);
+        case TERM_CMD_LS3R:
+                return screen_LS3R(screen, seq);
+        case TERM_CMD_MC_ANSI:
+                return screen_MC_ANSI(screen, seq);
+        case TERM_CMD_MC_DEC:
+                return screen_MC_DEC(screen, seq);
+        case TERM_CMD_NEL:
+                return screen_NEL(screen, seq);
+        case TERM_CMD_NP:
+                return screen_NP(screen, seq);
+        case TERM_CMD_NULL:
+                return screen_NULL(screen, seq);
+        case TERM_CMD_PP:
+                return screen_PP(screen, seq);
+        case TERM_CMD_PPA:
+                return screen_PPA(screen, seq);
+        case TERM_CMD_PPB:
+                return screen_PPB(screen, seq);
+        case TERM_CMD_PPR:
+                return screen_PPR(screen, seq);
+        case TERM_CMD_RC:
+                return screen_RC(screen, seq);
+        case TERM_CMD_REP:
+                return screen_REP(screen, seq);
+        case TERM_CMD_RI:
+                return screen_RI(screen, seq);
+        case TERM_CMD_RIS:
+                return screen_RIS(screen, seq);
+        case TERM_CMD_RM_ANSI:
+                return screen_RM_ANSI(screen, seq);
+        case TERM_CMD_RM_DEC:
+                return screen_RM_DEC(screen, seq);
+        case TERM_CMD_S7C1T:
+                return screen_S7C1T(screen, seq);
+        case TERM_CMD_S8C1T:
+                return screen_S8C1T(screen, seq);
+        case TERM_CMD_SCS:
+                return screen_SCS(screen, seq);
+        case TERM_CMD_SD:
+                return screen_SD(screen, seq);
+        case TERM_CMD_SGR:
+                return screen_SGR(screen, seq);
+        case TERM_CMD_SI:
+                return screen_SI(screen, seq);
+        case TERM_CMD_SM_ANSI:
+                return screen_SM_ANSI(screen, seq);
+        case TERM_CMD_SM_DEC:
+                return screen_SM_DEC(screen, seq);
+        case TERM_CMD_SO:
+                return screen_SO(screen, seq);
+        case TERM_CMD_SPA:
+                return screen_SPA(screen, seq);
+        case TERM_CMD_SS2:
+                return screen_SS2(screen, seq);
+        case TERM_CMD_SS3:
+                return screen_SS3(screen, seq);
+        case TERM_CMD_ST:
+                return screen_ST(screen, seq);
+        case TERM_CMD_SU:
+                return screen_SU(screen, seq);
+        case TERM_CMD_SUB:
+                return screen_SUB(screen, seq);
+        case TERM_CMD_TBC:
+                return screen_TBC(screen, seq);
+        case TERM_CMD_VPA:
+                return screen_VPA(screen, seq);
+        case TERM_CMD_VPR:
+                return screen_VPR(screen, seq);
+        case TERM_CMD_VT:
+                return screen_VT(screen, seq);
+        case TERM_CMD_XTERM_CLLHP:
+                return screen_XTERM_CLLHP(screen, seq);
+        case TERM_CMD_XTERM_IHMT:
+                return screen_XTERM_IHMT(screen, seq);
+        case TERM_CMD_XTERM_MLHP:
+                return screen_XTERM_MLHP(screen, seq);
+        case TERM_CMD_XTERM_MUHP:
+                return screen_XTERM_MUHP(screen, seq);
+        case TERM_CMD_XTERM_RPM:
+                return screen_XTERM_RPM(screen, seq);
+        case TERM_CMD_XTERM_RRV:
+                return screen_XTERM_RRV(screen, seq);
+        case TERM_CMD_XTERM_RTM:
+                return screen_XTERM_RTM(screen, seq);
+        case TERM_CMD_XTERM_SACL1:
+                return screen_XTERM_SACL1(screen, seq);
+        case TERM_CMD_XTERM_SACL2:
+                return screen_XTERM_SACL2(screen, seq);
+        case TERM_CMD_XTERM_SACL3:
+                return screen_XTERM_SACL3(screen, seq);
+        case TERM_CMD_XTERM_SDCS:
+                return screen_XTERM_SDCS(screen, seq);
+        case TERM_CMD_XTERM_SGFX:
+                return screen_XTERM_SGFX(screen, seq);
+        case TERM_CMD_XTERM_SPM:
+                return screen_XTERM_SPM(screen, seq);
+        case TERM_CMD_XTERM_SRV:
+                return screen_XTERM_SRV(screen, seq);
+        case TERM_CMD_XTERM_STM:
+                return screen_XTERM_STM(screen, seq);
+        case TERM_CMD_XTERM_SUCS:
+                return screen_XTERM_SUCS(screen, seq);
+        case TERM_CMD_XTERM_WM:
+                return screen_XTERM_WM(screen, seq);
+        }
+
+        return 0;
+}
+
+unsigned int term_screen_get_width(term_screen *screen) {
+        assert_return(screen, -EINVAL);
+
+        return screen->page->width;
+}
+
+unsigned int term_screen_get_height(term_screen *screen) {
+        assert_return(screen, -EINVAL);
+
+        return screen->page->height;
+}
+
+uint64_t term_screen_get_age(term_screen *screen) {
+        assert_return(screen, 0);
+
+        return screen->age;
+}
+
+int term_screen_feed_text(term_screen *screen, const uint8_t *in, size_t size) {
+        uint32_t *ucs4_str;
+        size_t i, j, ucs4_len;
+        const term_seq *seq;
+        int r;
+
+        assert_return(screen, -EINVAL);
+
+        ++screen->age;
+
+        /* Feed bytes into utf8 decoder and handle parsed ucs4 chars. We always
+         * treat data as UTF-8, but the parser makes sure to fall back to raw
+         * 8bit mode if the stream is not valid UTF-8. This should be more than
+         * enough to support old 7bit/8bit modes. */
+        for (i = 0; i < size; ++i) {
+                ucs4_len = term_utf8_decode(&screen->utf8, &ucs4_str, in[i]);
+                for (j = 0; j < ucs4_len; ++j) {
+                        r = term_parser_feed(screen->parser, &seq, ucs4_str[j]);
+                        if (r < 0) {
+                                return r;
+                        } else if (r != TERM_SEQ_NONE) {
+                                r = screen_feed_cmd(screen, seq);
+                                if (r < 0)
+                                        return r;
+                        }
+                }
+        }
+
+        return 0;
+}
+
+static char *screen_map_key(term_screen *screen,
+                            char *p,
+                            const uint32_t *keysyms,
+                            size_t n_syms,
+                            uint32_t ascii,
+                            const uint32_t *ucs4,
+                            unsigned int mods) {
+        char ch, ch2, ch_mods;
+        uint32_t v;
+        size_t i;
+
+        /* TODO: All these key-mappings need to be verified. Public information
+         * on those mappings is pretty scarce and every emulator seems to do it
+         * slightly differently.
+         * A lot of mappings are also missing. */
+
+        if (n_syms < 1)
+                return p;
+
+        if (n_syms == 1)
+                v = keysyms[0];
+        else
+                v = XKB_KEY_NoSymbol;
+
+        /* In some mappings, the modifiers are encoded as CSI parameters. The
+         * encoding is rather arbitrary, but seems to work. */
+        ch_mods = 0;
+        switch (mods & (TERM_KBDMOD_SHIFT | TERM_KBDMOD_ALT | TERM_KBDMOD_CTRL)) {
+        case TERM_KBDMOD_SHIFT:
+                ch_mods = '2';
+                break;
+        case TERM_KBDMOD_ALT:
+                ch_mods = '3';
+                break;
+        case TERM_KBDMOD_SHIFT | TERM_KBDMOD_ALT:
+                ch_mods = '4';
+                break;
+        case TERM_KBDMOD_CTRL:
+                ch_mods = '5';
+                break;
+        case TERM_KBDMOD_CTRL | TERM_KBDMOD_SHIFT:
+                ch_mods = '6';
+                break;
+        case TERM_KBDMOD_CTRL | TERM_KBDMOD_ALT:
+                ch_mods = '7';
+                break;
+        case TERM_KBDMOD_CTRL | TERM_KBDMOD_SHIFT | TERM_KBDMOD_ALT:
+                ch_mods = '8';
+                break;
+        }
+
+        /* A user might actually use multiple layouts for keyboard
+         * input. @keysyms[0] contains the actual keysym that the user
+         * used. But if this keysym is not in the ascii range, the
+         * input handler does check all other layouts that the user
+         * specified whether one of them maps the key to some ASCII
+         * keysym and provides this via @ascii. We always use the real
+         * keysym except when handling CTRL+<XY> shortcuts we use the
+         * ascii keysym. This is for compatibility to xterm et. al. so
+         * ctrl+c always works regardless of the currently active
+         * keyboard layout. But if no ascii-sym is found, we still use
+         * the real keysym. */
+        if (ascii == XKB_KEY_NoSymbol)
+                ascii = v;
+
+        /* map CTRL+<ascii> */
+        if (mods & TERM_KBDMOD_CTRL) {
+                switch (ascii) {
+                case 0x60 ... 0x7e:
+                        /* Right hand side is mapped to the left and then
+                         * treated equally. Fall through to left-hand side.. */
+                        ascii -= 0x20;
+                case 0x20 ... 0x5f:
+                        /* Printable ASCII is mapped 1-1 in XKB and in
+                         * combination with CTRL bit 7 is flipped. This
+                         * is equivalent to the caret-notation. */
+                        *p++ = ascii ^ 0x40;
+                        return p;
+                }
+        }
+
+        /* map cursor keys */
+        ch = 0;
+        switch (v) {
+        case XKB_KEY_Up:
+                ch = 'A';
+                break;
+        case XKB_KEY_Down:
+                ch = 'B';
+                break;
+        case XKB_KEY_Right:
+                ch = 'C';
+                break;
+        case XKB_KEY_Left:
+                ch = 'D';
+                break;
+        case XKB_KEY_Home:
+                ch = 'H';
+                break;
+        case XKB_KEY_End:
+                ch = 'F';
+                break;
+        }
+        if (ch) {
+                *p++ = 0x1b;
+                if (screen->flags & TERM_FLAG_CURSOR_KEYS)
+                        *p++ = 'O';
+                else
+                        *p++ = '[';
+                if (ch_mods) {
+                        *p++ = '1';
+                        *p++ = ';';
+                        *p++ = ch_mods;
+                }
+                *p++ = ch;
+                return p;
+        }
+
+        /* map action keys */
+        ch = 0;
+        switch (v) {
+        case XKB_KEY_Find:
+                ch = '1';
+                break;
+        case XKB_KEY_Insert:
+                ch = '2';
+                break;
+        case XKB_KEY_Delete:
+                ch = '3';
+                break;
+        case XKB_KEY_Select:
+                ch = '4';
+                break;
+        case XKB_KEY_Page_Up:
+                ch = '5';
+                break;
+        case XKB_KEY_Page_Down:
+                ch = '6';
+                break;
+        }
+        if (ch) {
+                *p++ = 0x1b;
+                *p++ = '[';
+                *p++ = ch;
+                if (ch_mods) {
+                        *p++ = ';';
+                        *p++ = ch_mods;
+                }
+                *p++ = '~';
+                return p;
+        }
+
+        /* map lower function keys */
+        ch = 0;
+        switch (v) {
+        case XKB_KEY_F1:
+                ch = 'P';
+                break;
+        case XKB_KEY_F2:
+                ch = 'Q';
+                break;
+        case XKB_KEY_F3:
+                ch = 'R';
+                break;
+        case XKB_KEY_F4:
+                ch = 'S';
+                break;
+        }
+        if (ch) {
+                if (ch_mods) {
+                        *p++ = 0x1b;
+                        *p++ = '[';
+                        *p++ = '1';
+                        *p++ = ';';
+                        *p++ = ch_mods;
+                        *p++ = ch;
+                } else {
+                        *p++ = 0x1b;
+                        *p++ = 'O';
+                        *p++ = ch;
+                }
+
+                return p;
+        }
+
+        /* map upper function keys */
+        ch = 0;
+        ch2 = 0;
+        switch (v) {
+        case XKB_KEY_F5:
+                ch = '1';
+                ch2 = '5';
+                break;
+        case XKB_KEY_F6:
+                ch = '1';
+                ch2 = '7';
+                break;
+        case XKB_KEY_F7:
+                ch = '1';
+                ch2 = '8';
+                break;
+        case XKB_KEY_F8:
+                ch = '1';
+                ch2 = '9';
+                break;
+        case XKB_KEY_F9:
+                ch = '2';
+                ch2 = '0';
+                break;
+        case XKB_KEY_F10:
+                ch = '2';
+                ch2 = '1';
+                break;
+        case XKB_KEY_F11:
+                ch = '2';
+                ch2 = '2';
+                break;
+        case XKB_KEY_F12:
+                ch = '2';
+                ch2 = '3';
+                break;
+        }
+        if (ch) {
+                *p++ = 0x1b;
+                *p++ = '[';
+                *p++ = ch;
+                if (ch2)
+                        *p++ = ch2;
+                if (ch_mods) {
+                        *p++ = ';';
+                        *p++ = ch_mods;
+                }
+                *p++ = '~';
+                return p;
+        }
+
+        /* map special keys */
+        switch (v) {
+        case 0xff08: /* XKB_KEY_BackSpace */
+        case 0xff09: /* XKB_KEY_Tab */
+        case 0xff0a: /* XKB_KEY_Linefeed */
+        case 0xff0b: /* XKB_KEY_Clear */
+        case 0xff15: /* XKB_KEY_Sys_Req */
+        case 0xff1b: /* XKB_KEY_Escape */
+        case 0xffff: /* XKB_KEY_Delete */
+                *p++ = v - 0xff00;
+                return p;
+        case 0xff13: /* XKB_KEY_Pause */
+                /* TODO: What should we do with this key?
+                 * Sending XOFF is awful as there is no simple
+                 * way on modern keyboards to send XON again.
+                 * If someone wants this, we can re-eanble
+                 * optionally. */
+                return p;
+        case 0xff14: /* XKB_KEY_Scroll_Lock */
+                /* TODO: What should we do on scroll-lock?
+                 * Sending 0x14 is what the specs say but it is
+                 * not used today the way most users would
+                 * expect so we disable it. If someone wants
+                 * this, we can re-enable it (optionally). */
+                return p;
+        case XKB_KEY_Return:
+                *p++ = 0x0d;
+                if (screen->flags & TERM_FLAG_NEWLINE_MODE)
+                        *p++ = 0x0a;
+                return p;
+        case XKB_KEY_ISO_Left_Tab:
+                *p++ = 0x09;
+                return p;
+        }
+
+        /* map unicode keys */
+        for (i = 0; i < n_syms; ++i)
+                p += term_utf8_encode(p, ucs4[i]);
+
+        return p;
+}
+
+int term_screen_feed_keyboard(term_screen *screen,
+                              const uint32_t *keysyms,
+                              size_t n_syms,
+                              uint32_t ascii,
+                              const uint32_t *ucs4,
+                              unsigned int mods) {
+        _cleanup_free_ char *dyn = NULL;
+        static const size_t padding = 1;
+        char buf[128], *start, *p;
+
+        assert_return(screen, -EINVAL);
+
+        /* allocate buffer if too small */
+        start = buf;
+        if (4 * n_syms + padding > sizeof(buf)) {
+                dyn = malloc(4 * n_syms + padding);
+                if (!dyn)
+                        return -ENOMEM;
+
+                start = dyn;
+        }
+
+        /* reserve prefix space */
+        start += padding;
+        p = start;
+
+        p = screen_map_key(screen, p, keysyms, n_syms, ascii, ucs4, mods);
+        if (!p || p - start < 1)
+                return 0;
+
+        /* The ALT modifier causes ESC to be prepended to any key-stroke. We
+         * already accounted for that buffer space above, so simply prepend it
+         * here.
+         * TODO: is altSendsEscape a suitable default? What are the semantics
+         * exactly? Is it used in C0/C1 conversion? Is it prepended if there
+         * already is an escape character? */
+        if (mods & TERM_KBDMOD_ALT && *start != 0x1b)
+                *--start = 0x1b;
+
+        /* turn C0 into C1 */
+        if (!(screen->flags & TERM_FLAG_7BIT_MODE) && p - start >= 2)
+                if (start[0] == 0x1b && start[1] >= 0x40 && start[1] <= 0x5f)
+                        *++start ^= 0x40;
+
+        return screen_write(screen, start, p - start);
+}
+
+int term_screen_resize(term_screen *screen, unsigned int x, unsigned int y) {
+        unsigned int i;
+        uint8_t *t;
+        int r;
+
+        assert_return(screen, -EINVAL);
+
+        r = term_page_reserve(screen->page_main, x, y, &screen->state.attr, screen->age);
+        if (r < 0)
+                return r;
+
+        r = term_page_reserve(screen->page_alt, x, y, &screen->state.attr, screen->age);
+        if (r < 0)
+                return r;
+
+        if (x > screen->n_tabs) {
+                t = realloc(screen->tabs, (x + 7) / 8);
+                if (!t)
+                        return -ENOMEM;
+
+                screen->tabs = t;
+                screen->n_tabs = x;
+        }
+
+        for (i = (screen->page->width + 7) / 8 * 8; i < x; i += 8)
+                screen->tabs[i / 8] = 0x1;
+
+        term_page_resize(screen->page_main, x, y, &screen->state.attr, screen->age, screen->history);
+        term_page_resize(screen->page_alt, x, y, &screen->state.attr, screen->age, NULL);
+
+        screen->state.cursor_x = screen_clamp_x(screen, screen->state.cursor_x);
+        screen->state.cursor_y = screen_clamp_x(screen, screen->state.cursor_y);
+        screen_cursor_clear_wrap(screen);
+
+        return 0;
+}
+
+void term_screen_soft_reset(term_screen *screen) {
+        unsigned int i;
+
+        assert(screen);
+
+        screen->g0 = &term_unicode_lower;
+        screen->g1 = &term_unicode_upper;
+        screen->g2 = &term_unicode_lower;
+        screen->g3 = &term_unicode_upper;
+        screen->state.attr = screen->default_attr;
+        screen->state.gl = &screen->g0;
+        screen->state.gr = &screen->g1;
+        screen->state.glt = NULL;
+        screen->state.grt = NULL;
+        screen->state.auto_wrap = 0;
+        screen->state.origin_mode = 0;
+
+        screen->saved = screen->state;
+        screen->saved.cursor_x = 0;
+        screen->saved.cursor_y = 0;
+        screen->saved_alt = screen->saved;
+
+        screen->page = screen->page_main;
+        screen->history = screen->history_main;
+        screen->flags = TERM_FLAG_7BIT_MODE;
+        screen->conformance_level = TERM_CONFORMANCE_LEVEL_VT400;
+
+        for (i = 0; i < screen->page->width; i += 8)
+                screen->tabs[i / 8] = 0x1;
+
+        term_page_set_scroll_region(screen->page_main, 0, screen->page->height);
+        term_page_set_scroll_region(screen->page_alt, 0, screen->page->height);
+}
+
+void term_screen_hard_reset(term_screen *screen) {
+        assert(screen);
+
+        term_screen_soft_reset(screen);
+        zero(screen->utf8);
+        screen->state.cursor_x = 0;
+        screen->state.cursor_y = 0;
+        term_page_erase(screen->page_main, 0, 0, screen->page->width, screen->page->height, &screen->state.attr, screen->age, false);
+        term_page_erase(screen->page_alt, 0, 0, screen->page->width, screen->page->height, &screen->state.attr, screen->age, false);
+}
+
+int term_screen_set_answerback(term_screen *screen, const char *answerback) {
+        char *t = NULL;
+
+        assert_return(screen, -EINVAL);
+
+        if (answerback) {
+                t = strdup(answerback);
+                if (!t)
+                        return -ENOMEM;
+        }
+
+        free(screen->answerback);
+        screen->answerback = t;
+
+        return 0;
+}
+
+int term_screen_draw(term_screen *screen,
+                     int (*draw_fn) (term_screen *screen,
+                                     void *userdata,
+                                     unsigned int x,
+                                     unsigned int y,
+                                     const term_attr *attr,
+                                     const uint32_t *ch,
+                                     size_t n_ch,
+                                     unsigned int ch_width),
+                     void *userdata,
+                     uint64_t *fb_age) {
+        uint64_t cell_age, line_age, age = 0;
+        term_charbuf_t ch_buf;
+        const uint32_t *ch_str;
+        unsigned int i, j, cw;
+        term_page *page;
+        term_line *line;
+        term_cell *cell;
+        size_t ch_n;
+        int r;
+
+        assert(screen);
+        assert(draw_fn);
+
+        if (fb_age)
+                age = *fb_age;
+
+        page = screen->page;
+
+        for (j = 0; j < page->height; ++j) {
+                line = page->lines[j];
+                line_age = MAX(line->age, page->age);
+
+                for (i = 0; i < page->width; ++i) {
+                        term_attr attr;
+
+                        cell = &line->cells[i];
+                        cell_age = MAX(cell->age, line_age);
+
+                        if (age != 0 && cell_age <= age)
+                                continue;
+
+                        ch_str = term_char_resolve(cell->ch, &ch_n, &ch_buf);
+
+                        /* Character-width of 0 is used for cleared cells.
+                         * Always treat this as single-cell character, so
+                         * renderers can assume ch_width is set properpy. */
+                        cw = MAX(cell->cwidth, 1U);
+
+                        attr = cell->attr;
+                        if (i == screen->state.cursor_x && j == screen->state.cursor_y &&
+                            !(screen->flags & TERM_FLAG_HIDE_CURSOR))
+                                attr.inverse ^= 1;
+
+                        r = draw_fn(screen,
+                                    userdata,
+                                    i,
+                                    j,
+                                    &attr,
+                                    ch_str,
+                                    ch_n,
+                                    cw);
+                        if (r != 0)
+                                return r;
+                }
+        }
+
+        if (fb_age)
+                *fb_age = screen->age;
+
+        return 0;
+}
diff --git a/src/libsystemd-terminal/term-wcwidth.c b/src/libsystemd-terminal/term-wcwidth.c
new file mode 100644 (file)
index 0000000..df20a40
--- /dev/null
@@ -0,0 +1,313 @@
+/*
+ * (Minimal changes made by David Herrmann, to make clean for inclusion in
+ *  systemd. Original header follows.)
+ *
+ * This is an implementation of wcwidth() and wcswidth() (defined in
+ * IEEE Std 1002.1-2001) for Unicode.
+ *
+ * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
+ * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html
+ *
+ * In fixed-width output devices, Latin characters all occupy a single
+ * "cell" position of equal width, whereas ideographic CJK characters
+ * occupy two such cells. Interoperability between terminal-line
+ * applications and (teletype-style) character terminals using the
+ * UTF-8 encoding requires agreement on which character should advance
+ * the cursor by how many cell positions. No established formal
+ * standards exist at present on which Unicode character shall occupy
+ * how many cell positions on character terminals. These routines are
+ * a first attempt of defining such behavior based on simple rules
+ * applied to data provided by the Unicode Consortium.
+ *
+ * For some graphical characters, the Unicode standard explicitly
+ * defines a character-cell width via the definition of the East Asian
+ * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.
+ * In all these cases, there is no ambiguity about which width a
+ * terminal shall use. For characters in the East Asian Ambiguous (A)
+ * class, the width choice depends purely on a preference of backward
+ * compatibility with either historic CJK or Western practice.
+ * Choosing single-width for these characters is easy to justify as
+ * the appropriate long-term solution, as the CJK practice of
+ * displaying these characters as double-width comes from historic
+ * implementation simplicity (8-bit encoded characters were displayed
+ * single-width and 16-bit ones double-width, even for Greek,
+ * Cyrillic, etc.) and not any typographic considerations.
+ *
+ * Much less clear is the choice of width for the Not East Asian
+ * (Neutral) class. Existing practice does not dictate a width for any
+ * of these characters. It would nevertheless make sense
+ * typographically to allocate two character cells to characters such
+ * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be
+ * represented adequately with a single-width glyph. The following
+ * routines at present merely assign a single-cell width to all
+ * neutral characters, in the interest of simplicity. This is not
+ * entirely satisfactory and should be reconsidered before
+ * establishing a formal standard in this area. At the moment, the
+ * decision which Not East Asian (Neutral) characters should be
+ * represented by double-width glyphs cannot yet be answered by
+ * applying a simple rule from the Unicode database content. Setting
+ * up a proper standard for the behavior of UTF-8 character terminals
+ * will require a careful analysis not only of each Unicode character,
+ * but also of each presentation form, something the author of these
+ * routines has avoided to do so far.
+ *
+ * http://www.unicode.org/unicode/reports/tr11/
+ *
+ * Markus Kuhn -- 2007-05-26 (Unicode 5.0)
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * for any purpose and without fee is hereby granted. The author
+ * disclaims all warranties with regard to this software.
+ *
+ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
+ */
+
+#include <wchar.h>
+#include "term-internal.h"
+
+struct interval {
+  wchar_t first;
+  wchar_t last;
+};
+
+/* auxiliary function for binary search in interval table */
+static int bisearch(wchar_t ucs, const struct interval *table, int max) {
+  int min = 0;
+  int mid;
+
+  if (ucs < table[0].first || ucs > table[max].last)
+    return 0;
+  while (max >= min) {
+    mid = (min + max) / 2;
+    if (ucs > table[mid].last)
+      min = mid + 1;
+    else if (ucs < table[mid].first)
+      max = mid - 1;
+    else
+      return 1;
+  }
+
+  return 0;
+}
+
+
+/* The following two functions define the column width of an ISO 10646
+ * character as follows:
+ *
+ *    - The null character (U+0000) has a column width of 0.
+ *
+ *    - Other C0/C1 control characters and DEL will lead to a return
+ *      value of -1.
+ *
+ *    - Non-spacing and enclosing combining characters (general
+ *      category code Mn or Me in the Unicode database) have a
+ *      column width of 0.
+ *
+ *    - SOFT HYPHEN (U+00AD) has a column width of 1.
+ *
+ *    - Other format characters (general category code Cf in the Unicode
+ *      database) and ZERO WIDTH SPACE (U+200B) have a column width of 0.
+ *
+ *    - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
+ *      have a column width of 0.
+ *
+ *    - Spacing characters in the East Asian Wide (W) or East Asian
+ *      Full-width (F) category as defined in Unicode Technical
+ *      Report #11 have a column width of 2.
+ *
+ *    - All remaining characters (including all printable
+ *      ISO 8859-1 and WGL4 characters, Unicode control characters,
+ *      etc.) have a column width of 1.
+ *
+ * This implementation assumes that wchar_t characters are encoded
+ * in ISO 10646.
+ */
+
+int mk_wcwidth(wchar_t ucs)
+{
+  /* sorted list of non-overlapping intervals of non-spacing characters */
+  /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
+  static const struct interval combining[] = {
+    { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 },
+    { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
+    { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 },
+    { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 },
+    { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
+    { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },
+    { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 },
+    { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D },
+    { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 },
+    { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD },
+    { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C },
+    { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D },
+    { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC },
+    { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD },
+    { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },
+    { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D },
+    { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 },
+    { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },
+    { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC },
+    { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },
+    { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D },
+    { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 },
+    { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },
+    { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC },
+    { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 },
+    { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E },
+    { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 },
+    { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 },
+    { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 },
+    { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F },
+    { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 },
+    { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD },
+    { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD },
+    { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 },
+    { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B },
+    { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },
+    { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 },
+    { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF },
+    { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 },
+    { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F },
+    { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },
+    { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F },
+    { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB },
+    { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F },
+    { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 },
+    { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD },
+    { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F },
+    { 0xE0100, 0xE01EF }
+  };
+
+  /* test for 8-bit control characters */
+  if (ucs == 0)
+    return 0;
+  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
+    return -1;
+
+  /* binary search in table of non-spacing characters */
+  if (bisearch(ucs, combining,
+               sizeof(combining) / sizeof(struct interval) - 1))
+    return 0;
+
+  /* if we arrive here, ucs is not a combining or C0/C1 control character */
+
+  return 1 +
+    (ucs >= 0x1100 &&
+     (ucs <= 0x115f ||                    /* Hangul Jamo init. consonants */
+      ucs == 0x2329 || ucs == 0x232a ||
+      (ucs >= 0x2e80 && ucs <= 0xa4cf &&
+       ucs != 0x303f) ||                  /* CJK ... Yi */
+      (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */
+      (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
+      (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */
+      (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
+      (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */
+      (ucs >= 0xffe0 && ucs <= 0xffe6) ||
+      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
+      (ucs >= 0x30000 && ucs <= 0x3fffd)));
+}
+
+
+int mk_wcswidth(const wchar_t *pwcs, size_t n)
+{
+  int w, width = 0;
+
+  for (;*pwcs && n-- > 0; pwcs++)
+    if ((w = mk_wcwidth(*pwcs)) < 0)
+      return -1;
+    else
+      width += w;
+
+  return width;
+}
+
+
+/*
+ * The following functions are the same as mk_wcwidth() and
+ * mk_wcswidth(), except that spacing characters in the East Asian
+ * Ambiguous (A) category as defined in Unicode Technical Report #11
+ * have a column width of 2. This variant might be useful for users of
+ * CJK legacy encodings who want to migrate to UCS without changing
+ * the traditional terminal character-width behaviour. It is not
+ * otherwise recommended for general use.
+ */
+int mk_wcwidth_cjk(wchar_t ucs)
+{
+  /* sorted list of non-overlapping intervals of East Asian Ambiguous
+   * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
+  static const struct interval ambiguous[] = {
+    { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 },
+    { 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 },
+    { 0x00B6, 0x00BA }, { 0x00BC, 0x00BF }, { 0x00C6, 0x00C6 },
+    { 0x00D0, 0x00D0 }, { 0x00D7, 0x00D8 }, { 0x00DE, 0x00E1 },
+    { 0x00E6, 0x00E6 }, { 0x00E8, 0x00EA }, { 0x00EC, 0x00ED },
+    { 0x00F0, 0x00F0 }, { 0x00F2, 0x00F3 }, { 0x00F7, 0x00FA },
+    { 0x00FC, 0x00FC }, { 0x00FE, 0x00FE }, { 0x0101, 0x0101 },
+    { 0x0111, 0x0111 }, { 0x0113, 0x0113 }, { 0x011B, 0x011B },
+    { 0x0126, 0x0127 }, { 0x012B, 0x012B }, { 0x0131, 0x0133 },
+    { 0x0138, 0x0138 }, { 0x013F, 0x0142 }, { 0x0144, 0x0144 },
+    { 0x0148, 0x014B }, { 0x014D, 0x014D }, { 0x0152, 0x0153 },
+    { 0x0166, 0x0167 }, { 0x016B, 0x016B }, { 0x01CE, 0x01CE },
+    { 0x01D0, 0x01D0 }, { 0x01D2, 0x01D2 }, { 0x01D4, 0x01D4 },
+    { 0x01D6, 0x01D6 }, { 0x01D8, 0x01D8 }, { 0x01DA, 0x01DA },
+    { 0x01DC, 0x01DC }, { 0x0251, 0x0251 }, { 0x0261, 0x0261 },
+    { 0x02C4, 0x02C4 }, { 0x02C7, 0x02C7 }, { 0x02C9, 0x02CB },
+    { 0x02CD, 0x02CD }, { 0x02D0, 0x02D0 }, { 0x02D8, 0x02DB },
+    { 0x02DD, 0x02DD }, { 0x02DF, 0x02DF }, { 0x0391, 0x03A1 },
+    { 0x03A3, 0x03A9 }, { 0x03B1, 0x03C1 }, { 0x03C3, 0x03C9 },
+    { 0x0401, 0x0401 }, { 0x0410, 0x044F }, { 0x0451, 0x0451 },
+    { 0x2010, 0x2010 }, { 0x2013, 0x2016 }, { 0x2018, 0x2019 },
+    { 0x201C, 0x201D }, { 0x2020, 0x2022 }, { 0x2024, 0x2027 },
+    { 0x2030, 0x2030 }, { 0x2032, 0x2033 }, { 0x2035, 0x2035 },
+    { 0x203B, 0x203B }, { 0x203E, 0x203E }, { 0x2074, 0x2074 },
+    { 0x207F, 0x207F }, { 0x2081, 0x2084 }, { 0x20AC, 0x20AC },
+    { 0x2103, 0x2103 }, { 0x2105, 0x2105 }, { 0x2109, 0x2109 },
+    { 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 },
+    { 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 },
+    { 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 },
+    { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 },
+    { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 },
+    { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B },
+    { 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 },
+    { 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 },
+    { 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E },
+    { 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 },
+    { 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 },
+    { 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F },
+    { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 },
+    { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF },
+    { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B },
+    { 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 },
+    { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 },
+    { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 },
+    { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 },
+    { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 },
+    { 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 },
+    { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 },
+    { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 },
+    { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F },
+    { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF },
+    { 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD }
+  };
+
+  /* binary search in table of non-spacing characters */
+  if (bisearch(ucs, ambiguous,
+               sizeof(ambiguous) / sizeof(struct interval) - 1))
+    return 2;
+
+  return mk_wcwidth(ucs);
+}
+
+
+int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
+{
+  int w, width = 0;
+
+  for (;*pwcs && n-- > 0; pwcs++)
+    if ((w = mk_wcwidth_cjk(*pwcs)) < 0)
+      return -1;
+    else
+      width += w;
+
+  return width;
+}
diff --git a/src/libsystemd-terminal/term.h b/src/libsystemd-terminal/term.h
new file mode 100644 (file)
index 0000000..eae6c63
--- /dev/null
@@ -0,0 +1,184 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#pragma once
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "util.h"
+
+typedef struct term_color term_color;
+typedef struct term_attr term_attr;
+
+typedef struct term_utf8 term_utf8;
+typedef struct term_seq term_seq;
+typedef struct term_parser term_parser;
+
+typedef struct term_screen term_screen;
+
+/*
+ * Ageing
+ */
+
+typedef uint64_t term_age_t;
+
+#define TERM_AGE_NULL 0
+
+/*
+ * Attributes
+ */
+
+enum {
+        /* special color-codes */
+        TERM_CCODE_DEFAULT,                                             /* default foreground/background color */
+        TERM_CCODE_256,                                                 /* 256color code */
+        TERM_CCODE_RGB,                                                 /* color is specified as RGB */
+
+        /* dark color-codes */
+        TERM_CCODE_BLACK,
+        TERM_CCODE_RED,
+        TERM_CCODE_GREEN,
+        TERM_CCODE_YELLOW,
+        TERM_CCODE_BLUE,
+        TERM_CCODE_MAGENTA,
+        TERM_CCODE_CYAN,
+        TERM_CCODE_WHITE,                                               /* technically: light grey */
+
+        /* light color-codes */
+        TERM_CCODE_LIGHT_BLACK          = TERM_CCODE_BLACK + 8,         /* technically: dark grey */
+        TERM_CCODE_LIGHT_RED            = TERM_CCODE_RED + 8,
+        TERM_CCODE_LIGHT_GREEN          = TERM_CCODE_GREEN + 8,
+        TERM_CCODE_LIGHT_YELLOW         = TERM_CCODE_YELLOW + 8,
+        TERM_CCODE_LIGHT_BLUE           = TERM_CCODE_BLUE + 8,
+        TERM_CCODE_LIGHT_MAGENTA        = TERM_CCODE_MAGENTA + 8,
+        TERM_CCODE_LIGHT_CYAN           = TERM_CCODE_CYAN + 8,
+        TERM_CCODE_LIGHT_WHITE          = TERM_CCODE_WHITE + 8,
+
+        TERM_CCODE_CNT,
+};
+
+struct term_color {
+        uint8_t ccode;
+        uint8_t c256;
+        uint8_t red;
+        uint8_t green;
+        uint8_t blue;
+};
+
+struct term_attr {
+        term_color fg;                          /* foreground color */
+        term_color bg;                          /* background color */
+
+        unsigned int bold : 1;                  /* bold font */
+        unsigned int italic : 1;                /* italic font */
+        unsigned int underline : 1;             /* underline text */
+        unsigned int inverse : 1;               /* inverse fg/bg */
+        unsigned int protect : 1;               /* protect from erase */
+        unsigned int blink : 1;                 /* blink text */
+        unsigned int hidden : 1;                /* hidden */
+};
+
+void term_attr_to_argb32(const term_attr *attr, uint32_t *fg, uint32_t *bg, const uint8_t *palette);
+
+/*
+ * UTF-8
+ */
+
+struct term_utf8 {
+        uint32_t chars[5];
+        uint32_t ucs4;
+
+        unsigned int i_bytes : 3;
+        unsigned int n_bytes : 3;
+        unsigned int valid : 1;
+};
+
+size_t term_utf8_encode(char *out_utf8, uint32_t g);
+size_t term_utf8_decode(term_utf8 *p, uint32_t **out_buf, char c);
+
+/*
+ * Parsers
+ */
+
+int term_parser_new(term_parser **out, bool host);
+term_parser *term_parser_free(term_parser *parser);
+int term_parser_feed(term_parser *parser, const term_seq **seq_out, uint32_t raw);
+
+#define _term_parser_free_ _cleanup_(term_parser_freep)
+DEFINE_TRIVIAL_CLEANUP_FUNC(term_parser*, term_parser_free);
+
+/*
+ * Screens
+ */
+
+enum {
+        TERM_KBDMOD_IDX_SHIFT,
+        TERM_KBDMOD_IDX_CTRL,
+        TERM_KBDMOD_IDX_ALT,
+        TERM_KBDMOD_IDX_LINUX,
+        TERM_KBDMOD_IDX_CAPS,
+        TERM_KBDMOD_CNT,
+
+        TERM_KBDMOD_SHIFT               = 1 << TERM_KBDMOD_IDX_SHIFT,
+        TERM_KBDMOD_CTRL                = 1 << TERM_KBDMOD_IDX_CTRL,
+        TERM_KBDMOD_ALT                 = 1 << TERM_KBDMOD_IDX_ALT,
+        TERM_KBDMOD_LINUX               = 1 << TERM_KBDMOD_IDX_LINUX,
+        TERM_KBDMOD_CAPS                = 1 << TERM_KBDMOD_IDX_CAPS,
+};
+
+typedef int (*term_screen_write_fn) (term_screen *screen, void *userdata, const void *buf, size_t size);
+typedef int (*term_screen_cmd_fn) (term_screen *screen, void *userdata, unsigned int cmd, const term_seq *seq);
+
+int term_screen_new(term_screen **out, term_screen_write_fn write_fn, void *write_fn_data, term_screen_cmd_fn cmd_fn, void *cmd_fn_data);
+term_screen *term_screen_ref(term_screen *screen);
+term_screen *term_screen_unref(term_screen *screen);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(term_screen*, term_screen_unref);
+
+unsigned int term_screen_get_width(term_screen *screen);
+unsigned int term_screen_get_height(term_screen *screen);
+uint64_t term_screen_get_age(term_screen *screen);
+
+int term_screen_feed_text(term_screen *screen, const uint8_t *in, size_t size);
+int term_screen_feed_keyboard(term_screen *screen,
+                              const uint32_t *keysyms,
+                              size_t n_syms,
+                              uint32_t ascii,
+                              const uint32_t *ucs4,
+                              unsigned int mods);
+int term_screen_resize(term_screen *screen, unsigned int width, unsigned int height);
+void term_screen_soft_reset(term_screen *screen);
+void term_screen_hard_reset(term_screen *screen);
+
+int term_screen_set_answerback(term_screen *screen, const char *answerback);
+
+int term_screen_draw(term_screen *screen,
+                     int (*draw_fn) (term_screen *screen,
+                                     void *userdata,
+                                     unsigned int x,
+                                     unsigned int y,
+                                     const term_attr *attr,
+                                     const uint32_t *ch,
+                                     size_t n_ch,
+                                     unsigned int ch_width),
+                     void *userdata,
+                     uint64_t *fb_age);
diff --git a/src/libsystemd-terminal/test-term-page.c b/src/libsystemd-terminal/test-term-page.c
new file mode 100644 (file)
index 0000000..9e33877
--- /dev/null
@@ -0,0 +1,463 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Terminal Page/Line/Cell/Char Tests
+ * This tests internals of terminal page, line, cell and char handling. It
+ * relies on some implementation details, so it might need to be updated if
+ * those internals are changed. They should be fairly obvious, though.
+ */
+
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "macro.h"
+#include "term-internal.h"
+#include "util.h"
+
+#define MY_ASSERT_VALS __FILE__, __LINE__, __PRETTY_FUNCTION__
+#define MY_ASSERT_FORW _FILE, _LINE, _FUNC
+#define MY_ASSERT_ARGS const char *_FILE, int _LINE, const char *_FUNC
+#define MY_ASSERT(expr)                                                 \
+        do {                                                            \
+                if (_unlikely_(!(expr)))                                \
+                        log_assert_failed(#expr, _FILE, _LINE, _FUNC);  \
+        } while (false)                                                 \
+
+/*
+ * Character Tests
+ *
+ * These tests rely on some implementation details of term_char_t, including
+ * the way we pack characters and the internal layout of "term_char_t". These
+ * tests have to be updated once we change the implementation.
+ */
+
+#define PACK(v1, v2, v3) \
+                TERM_CHAR_INIT( \
+                        (((((uint64_t)v1) & 0x1fffffULL) << 43) | \
+                         ((((uint64_t)v2) & 0x1fffffULL) << 22) | \
+                         ((((uint64_t)v3) & 0x1fffffULL) <<  1) | \
+                         0x1) \
+                )
+#define PACK1(v1) PACK2((v1), 0x110000)
+#define PACK2(v1, v2) PACK3((v1), (v2), 0x110000)
+#define PACK3(v1, v2, v3) PACK((v1), (v2), (v3))
+
+static void test_term_char_misc(void) {
+        term_char_t c, t;
+
+        /* test TERM_CHAR_NULL handling */
+
+        c = TERM_CHAR_NULL;                     /* c is NULL */
+        assert_se(term_char_same(c, TERM_CHAR_NULL));
+        assert_se(term_char_equal(c, TERM_CHAR_NULL));
+        assert_se(term_char_is_null(c));
+        assert_se(term_char_is_null(TERM_CHAR_NULL));
+        assert_se(!term_char_is_allocated(c));
+
+        /* test single char handling */
+
+        t = term_char_dup_append(c, 'A');       /* t is >A< now */
+        assert_se(!term_char_same(c, t));
+        assert_se(!term_char_equal(c, t));
+        assert_se(!term_char_is_allocated(t));
+        assert_se(!term_char_is_null(t));
+
+        /* test basic combined char handling */
+
+        t = term_char_dup_append(t, '~');
+        t = term_char_dup_append(t, '^');       /* t is >A~^< now */
+        assert_se(!term_char_same(c, t));
+        assert_se(!term_char_is_allocated(t));
+        assert_se(!term_char_is_null(t));
+
+        c = term_char_dup_append(c, 'A');
+        c = term_char_dup_append(c, '~');
+        c = term_char_dup_append(c, '^');       /* c is >A~^< now */
+        assert_se(term_char_same(c, t));
+        assert_se(term_char_equal(c, t));
+
+        /* test more than 2 comb-chars so the chars are allocated */
+
+        t = term_char_dup_append(t, '`');       /* t is >A~^`< now */
+        c = term_char_dup_append(c, '`');       /* c is >A~^`< now */
+        assert_se(!term_char_same(c, t));
+        assert_se(term_char_equal(c, t));
+
+        /* test dup_append() on allocated chars */
+
+        term_char_free(t);
+        t = term_char_dup_append(c, '"');       /* t is >A~^`"< now */
+        assert_se(!term_char_same(c, t));
+        assert_se(!term_char_equal(c, t));
+        c = term_char_merge(c, '"');            /* c is >A~^`"< now */
+        assert_se(!term_char_same(c, t));
+        assert_se(term_char_equal(c, t));
+
+        term_char_free(t);
+        term_char_free(c);
+}
+
+static void test_term_char_packing(void)  {
+        uint32_t seqs[][1024] = {
+                { -1 },
+                { 0, -1 },
+                { 'A', '~', -1 },
+                { 'A', '~', 0, -1 },
+                { 'A', '~', 'a', -1 },
+        };
+        term_char_t res[] = {
+                TERM_CHAR_NULL,
+                PACK1(0),
+                PACK2('A', '~'),
+                PACK3('A', '~', 0),
+                PACK3('A', '~', 'a'),
+        };
+        uint32_t next;
+        unsigned int i, j;
+        term_char_t c = TERM_CHAR_NULL;
+
+        /*
+         * This creates term_char_t objects based on the data in @seqs and
+         * compares the result to @res. Only basic packed types are tested, no
+         * allocations are done.
+         */
+
+        for (i = 0; i < ELEMENTSOF(seqs); ++i) {
+                for (j = 0; j < ELEMENTSOF(seqs[i]); ++j) {
+                        next = seqs[i][j];
+                        if (next == (uint32_t)-1)
+                                break;
+
+                        c = term_char_merge(c, next);
+                }
+
+                assert_se(!memcmp(&c, &res[i], sizeof(c)));
+                c = term_char_free(c);
+        }
+}
+
+static void test_term_char_allocating(void) {
+        uint32_t seqs[][1024] = {
+                { 0, -1 },
+                { 'A', '~', -1 },
+                { 'A', '~', 0, -1 },
+                { 'A', '~', 'a', -1 },
+                { 'A', '~', 'a', 'b', 'c', 'd', -1 },
+                { 'A', '~', 'a', 'b', 'c', 'd', 0, '^', -1 },
+                /* exceeding implementation-defined soft-limit of 64 */
+                { 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', -1 },
+        };
+        term_char_t res[] = {
+                PACK1(0),
+                PACK2('A', '~'),
+                PACK3('A', '~', 0),
+                PACK3('A', '~', 'a'),
+                TERM_CHAR_NULL,                 /* allocated */
+                TERM_CHAR_NULL,                 /* allocated */
+                TERM_CHAR_NULL,                 /* allocated */
+        };
+        uint32_t str[][1024] = {
+                { 0, -1 },
+                { 'A', '~', -1 },
+                { 'A', '~', 0, -1 },
+                { 'A', '~', 'a', -1 },
+                { 'A', '~', 'a', 'b', 'c', 'd', -1 },
+                { 'A', '~', 'a', 'b', 'c', 'd', 0, '^', -1 },
+                { 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd',
+                  'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', -1 },
+        };
+        size_t n;
+        uint32_t next;
+        unsigned int i, j;
+        const uint32_t *t;
+
+        /*
+         * This builds term_char_t objects based on the data in @seqs. It
+         * compares the result to @res for packed chars, otherwise it requires
+         * them to be allocated.
+         * After that, we resolve the UCS-4 string and compare it to the
+         * expected strings in @str.
+         */
+
+        for (i = 0; i < ELEMENTSOF(seqs); ++i) {
+                _term_char_free_ term_char_t c = TERM_CHAR_NULL;
+
+                for (j = 0; j < ELEMENTSOF(seqs[i]); ++j) {
+                        next = seqs[i][j];
+                        if (next == (uint32_t)-1)
+                                break;
+
+                        c = term_char_merge(c, next);
+                }
+
+                /* we use TERM_CHAR_NULL as marker for allocated chars here */
+                if (term_char_is_null(res[i]))
+                        assert_se(term_char_is_allocated(c));
+                else
+                        assert_se(!memcmp(&c, &res[i], sizeof(c)));
+
+                t = term_char_resolve(c, &n, NULL);
+                for (j = 0; j < ELEMENTSOF(str[i]); ++j) {
+                        next = str[i][j];
+                        if (next == (uint32_t)-1)
+                                break;
+
+                        assert_se(t[j] == next);
+                }
+
+                assert_se(n == j);
+        }
+}
+
+/*
+ * Line Tests
+ *
+ * The following tests work on term_line objects and verify their behavior when
+ * we modify them. To verify and set line layouts, we have two simple helpers
+ * to avoid harcoding the cell-verification all the time:
+ *   line_set(): Set a line to a given layout
+ *   line_assert(): Verify that a line has a given layout
+ *
+ * These functions take the line-layout encoded as a string and verify it
+ * against, or set it on, a term_line object. The format used to describe a
+ * line looks like this:
+ *       example: "|   | A |   |   |   |   |   | 10 *AB* |"
+ *
+ * The string describes the contents of all cells of a line, separated by
+ * pipe-symbols ('|'). Whitespace are ignored, the leading pipe-symbol is
+ * optional.
+ * The description of each cell can contain an arbitrary amount of characters
+ * in the range 'A'-'Z', 'a'-'z'. All those are combined and used as term_char_t
+ * on this cell. Any numbers in the description are combined and are used as
+ * cell-age.
+ * The occurrence of a '*'-symbol marks the cell as bold, '/' marks it as italic.
+ * You can use those characters multiple times, but only the first one has an
+ * effect.
+ * For further symbols, see parse_attr().
+ *
+ * Therefore, the following descriptions are equivalent:
+ *       1) "|   | /A*   |   |   |   |   |   | 10 *AB*  |"
+ *       2) "|   | /A**  |   |   |   |   |   | 10 *AB*  |"
+ *       3) "|   | A* // |   |   |   |   |   | 10 *AB*  |"
+ *       4) "|   | A* // |   |   |   |   |   | 1 *AB* 0 |"
+ *       5) "|   | A* // |   |   |   |   |   | A1B0*    |"
+ *
+ * The parser isn't very strict about placement of alpha/numerical characters,
+ * but simply appends all found chars. Don't make use of that feature! It's
+ * just a stupid parser to simplify these tests. Make them readable!
+ */
+
+static void parse_attr(char c, term_char_t *ch, term_attr *attr, term_age_t *age) {
+        switch (c) {
+        case ' ':
+                /* ignore */
+                break;
+        case '0' ... '9':
+                /* increase age */
+                *age = *age * 10;
+                *age = *age + c - '0';
+                break;
+        case 'A' ... 'Z':
+        case 'a' ... 'z':
+                /* add to character */
+                *ch = term_char_merge(*ch, c);
+                break;
+        case '*':
+                attr->bold = true;
+                break;
+        case '/':
+                attr->italic = true;
+                break;
+        default:
+                assert_se(0);
+                break;
+        }
+}
+
+static void cell_assert(MY_ASSERT_ARGS, term_cell *c, term_char_t ch, const term_attr *attr, term_age_t age) {
+        MY_ASSERT(term_char_equal(c->ch, ch));
+        MY_ASSERT(!memcmp(&c->attr, attr, sizeof(*attr)));
+        MY_ASSERT(c->age == age);
+}
+#define CELL_ASSERT(_cell, _ch, _attr, _age) cell_assert(MY_ASSERT_VALS, (_cell), (_ch), (_attr), (_age))
+
+static void line_assert(MY_ASSERT_ARGS, term_line *l, const char *str, unsigned int fill) {
+        unsigned int cell_i;
+        term_char_t ch = TERM_CHAR_NULL;
+        term_attr attr = { };
+        term_age_t age = TERM_AGE_NULL;
+        char c;
+
+        assert_se(l->fill == fill);
+
+        /* skip leading whitespace */
+        while (*str == ' ')
+                ++str;
+
+        /* skip leading '|' */
+        if (*str == '|')
+                ++str;
+
+        cell_i = 0;
+        while ((c = *str++)) {
+                switch (c) {
+                case '|':
+                        /* end of cell-description; compare it */
+                        assert_se(cell_i < l->n_cells);
+                        cell_assert(MY_ASSERT_FORW,
+                                    &l->cells[cell_i],
+                                    ch,
+                                    &attr,
+                                    age);
+
+                        ++cell_i;
+                        ch = term_char_free(ch);
+                        zero(attr);
+                        age = TERM_AGE_NULL;
+                        break;
+                default:
+                        parse_attr(c, &ch, &attr, &age);
+                        break;
+                }
+        }
+
+        assert_se(cell_i == l->n_cells);
+}
+#define LINE_ASSERT(_line, _str, _fill) line_assert(MY_ASSERT_VALS, (_line), (_str), (_fill))
+
+static void line_set(term_line *l, unsigned int pos, const char *str, bool insert_mode) {
+        term_char_t ch = TERM_CHAR_NULL;
+        term_attr attr = { };
+        term_age_t age = TERM_AGE_NULL;
+        char c;
+
+        while ((c = *str++))
+                parse_attr(c, &ch, &attr, &age);
+
+        term_line_write(l, pos, ch, 1, &attr, age, insert_mode);
+}
+
+static void line_resize(term_line *l, unsigned int width, const term_attr *attr, term_age_t age) {
+        assert_se(term_line_reserve(l, width, attr, age, width) >= 0);
+        term_line_set_width(l, width);
+}
+
+static void test_term_line_misc(void) {
+        term_line *l;
+
+        assert_se(term_line_new(&l) >= 0);
+        assert_se(!term_line_free(l));
+
+        assert_se(term_line_new(NULL) < 0);
+        assert_se(!term_line_free(NULL));
+
+        assert_se(term_line_new(&l) >= 0);
+        assert_se(l->n_cells == 0);
+        assert_se(l->fill == 0);
+        assert_se(term_line_reserve(l, 16, NULL, 0, 0) >= 0);
+        assert_se(l->n_cells == 16);
+        assert_se(l->fill == 0);
+        assert_se(term_line_reserve(l, 512, NULL, 0, 0) >= 0);
+        assert_se(l->n_cells == 512);
+        assert_se(l->fill == 0);
+        assert_se(term_line_reserve(l, 16, NULL, 0, 0) >= 0);
+        assert_se(l->n_cells == 512);
+        assert_se(l->fill == 0);
+        assert_se(!term_line_free(l));
+}
+
+static void test_term_line_ops(void) {
+        term_line *l;
+        term_attr attr_regular = { };
+        term_attr attr_bold = { .bold = true };
+        term_attr attr_italic = { .italic = true };
+
+        assert_se(term_line_new(&l) >= 0);
+        line_resize(l, 8, NULL, 0);
+        assert_se(l->n_cells == 8);
+
+        LINE_ASSERT(l, "| | | | | | | | |", 0);
+
+        term_line_write(l, 4, TERM_CHAR_NULL, 0, NULL, TERM_AGE_NULL, 0);
+        LINE_ASSERT(l, "| | | | | | | | |", 5);
+
+        term_line_write(l, 1, PACK1('A'), 1, NULL, TERM_AGE_NULL, 0);
+        LINE_ASSERT(l, "| |A| | | | | | |", 5);
+
+        term_line_write(l, 8, PACK2('A', 'B'), 1, NULL, TERM_AGE_NULL, 0);
+        LINE_ASSERT(l, "| |A| | | | | | |", 5);
+
+        term_line_write(l, 7, PACK2('A', 'B'), 1, &attr_regular, 10, 0);
+        LINE_ASSERT(l, "| |A| | | | | | 10 AB |", 8);
+
+        term_line_write(l, 7, PACK2('A', 'B'), 1, &attr_bold, 10, 0);
+        LINE_ASSERT(l, "| |A| | | | | | 10 *AB* |", 8);
+
+        term_line_reset(l, NULL, TERM_AGE_NULL);
+
+        LINE_ASSERT(l, "|   |   |          |          |          |   |   |   |", 0);
+        line_set(l, 2, "*wxyz* 8", 0);
+        line_set(l, 3, "/wxyz/ 8", 0);
+        LINE_ASSERT(l, "|   |   | *wxyz* 8 | /wxyz/ 8 |          |   |   |   |", 4);
+        line_set(l, 2, "*abc* 9", true);
+        LINE_ASSERT(l, "|   |   | *abc* 9  | *wxyz* 9 | /wxyz/ 9 | 9 | 9 | 9 |", 5);
+        line_set(l, 7, "*abc* 10", true);
+        LINE_ASSERT(l, "|   |   | *abc* 9  | *wxyz* 9 | /wxyz/ 9 | 9 | 9 | *abc* 10 |", 8);
+
+        term_line_erase(l, 6, 1, NULL, 11, 0);
+        LINE_ASSERT(l, "|   |   | *abc* 9  | *wxyz* 9 | /wxyz/ 9 | 9 | 11 | *abc* 10 |", 8);
+        term_line_erase(l, 6, 2, &attr_italic, 12, 0);
+        LINE_ASSERT(l, "|   |   | *abc* 9  | *wxyz* 9 | /wxyz/ 9 | 9 | 12 // | 12 // |", 6);
+        term_line_erase(l, 7, 2, &attr_regular, 13, 0);
+        LINE_ASSERT(l, "|   |   | *abc* 9  | *wxyz* 9 | /wxyz/ 9 | 9 | 12 // | 13 |", 6);
+        term_line_delete(l, 1, 3, &attr_bold, 14);
+        LINE_ASSERT(l, "|   | /wxyz/ 14 | 14 | 14 // | 14 | 14 ** | 14 ** | 14 ** |", 3);
+        term_line_insert(l, 2, 2, &attr_regular, 15);
+        LINE_ASSERT(l, "|   | /wxyz/ 14 | 15 | 15 | 15 | 15 // | 15 | 15 ** |", 5);
+
+        assert_se(!term_line_free(l));
+}
+
+int main(int argc, char *argv[]) {
+        test_term_char_misc();
+        test_term_char_packing();
+        test_term_char_allocating();
+
+        test_term_line_misc();
+        test_term_line_ops();
+
+        return 0;
+}
diff --git a/src/libsystemd-terminal/test-term-parser.c b/src/libsystemd-terminal/test-term-parser.c
new file mode 100644 (file)
index 0000000..e8d5dcf
--- /dev/null
@@ -0,0 +1,144 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Terminal Parser Tests
+ */
+
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "macro.h"
+#include "term-internal.h"
+#include "util.h"
+
+static void test_term_utf8_invalid(void) {
+        term_utf8 p = { };
+        uint32_t *res;
+        size_t len;
+
+        len = term_utf8_decode(NULL, NULL, 0);
+        assert_se(!len);
+
+        len = term_utf8_decode(&p, NULL, 0);
+        assert_se(len == 1);
+
+        res = NULL;
+        len = term_utf8_decode(NULL, &res, 0);
+        assert_se(!len);
+        assert_se(res != NULL);
+        assert_se(!*res);
+
+        len = term_utf8_decode(&p, &res, 0);
+        assert_se(len == 1);
+        assert_se(res != NULL);
+        assert_se(!*res);
+
+        len = term_utf8_decode(&p, &res, 0xCf);
+        assert_se(len == 0);
+        assert_se(res != NULL);
+        assert_se(!*res);
+
+        len = term_utf8_decode(&p, &res, 0);
+        assert_se(len == 2);
+        assert_se(res != NULL);
+        assert_se(res[0] == 0xCf && res[1] == 0);
+}
+
+static void test_term_utf8_range(void) {
+        term_utf8 p = { };
+        uint32_t *res;
+        char u8[4];
+        uint32_t i, j;
+        size_t ulen, len;
+
+        /* Convert all ucs-4 chars to utf-8 and back */
+
+        for (i = 0; i < 0x10FFFF; ++i) {
+                ulen = term_utf8_encode(u8, i);
+                if (!ulen)
+                        continue;
+
+                for (j = 0; j < ulen; ++j) {
+                        len = term_utf8_decode(&p, &res, u8[j]);
+                        if (len < 1) {
+                                assert_se(j + 1 != ulen);
+                                continue;
+                        }
+
+                        assert_se(j + 1 == ulen);
+                        assert_se(len == 1 && *res == i);
+                        assert_se(i <= 127 || ulen >= 2);
+                }
+        }
+}
+
+static void test_term_utf8_mix(void) {
+        static const char source[] = {
+                0x00,                           /* normal 0 */
+                0xC0, 0x80,                     /* overlong 0 */
+                0xC0, 0x81,                     /* overlong 1 */
+                0xE0, 0x80, 0x81,               /* overlong 1 */
+                0xF0, 0x80, 0x80, 0x81,         /* overlong 1 */
+                0xC0, 0x00,                     /* invalid continuation */
+                0xC0, 0xC0, 0x81,               /* invalid continuation with a following overlong 1 */
+                0xF8, 0x80, 0x80, 0x80, 0x81,   /* overlong 1 with 5 bytes */
+                0xE0, 0x80, 0xC0, 0x81,         /* invalid 3-byte followed by valid 2-byte */
+                0xF0, 0x80, 0x80, 0xC0, 0x81,   /* invalid 4-byte followed by valid 2-byte */
+        };
+        static const uint32_t result[] = {
+                0x0000,
+                0x0000,
+                0x0001,
+                0x0001,
+                0x0001,
+                0x00C0, 0x0000,
+                0x00C0, 0x0001,
+                0x00F8, 0x0080, 0x0080, 0x0080, 0x0081,
+                0x00E0, 0x0080, 0x0001,
+                0x00F0, 0x0080, 0x0080, 0x0001,
+        };
+        term_utf8 p = { };
+        uint32_t *res;
+        unsigned int i, j;
+        size_t len;
+
+        for (i = 0, j = 0; i < sizeof(source); ++i) {
+                len = term_utf8_decode(&p, &res, source[i]);
+                if (len < 1)
+                        continue;
+
+                assert_se(j + len <= ELEMENTSOF(result));
+                assert_se(!memcmp(res, &result[j], sizeof(uint32_t) * len));
+                j += len;
+        }
+
+        assert_se(j == ELEMENTSOF(result));
+}
+
+int main(int argc, char *argv[]) {
+        test_term_utf8_invalid();
+        test_term_utf8_range();
+        test_term_utf8_mix();
+
+        return 0;
+}
diff --git a/src/libsystemd-terminal/test-unifont.c b/src/libsystemd-terminal/test-unifont.c
new file mode 100644 (file)
index 0000000..cfeef61
--- /dev/null
@@ -0,0 +1,128 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Test Unifont Helper
+ * This tries opening the binary unifont glyph-array and renders some glyphs.
+ * The glyphs are then compared to hard-coded glyphs.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "macro.h"
+#include "unifont-def.h"
+#include "unifont.h"
+#include "util.h"
+
+static void render(char *w, const unifont_glyph *g) {
+        unsigned int i, j;
+        const uint8_t *d = g->data;
+
+        for (j = 0; j < 16; ++j) {
+                for (i = 0; i < 8 * g->cwidth; ++i) {
+                        if (d[i / 8] & (1 << (7 - i % 8)))
+                                *w++ = '#';
+                        else
+                                *w++ = ' ';
+                }
+                *w++ = '\n';
+                d += g->stride;
+        }
+
+        *w++ = 0;
+}
+
+static void test_unifont(void) {
+        char buf[4096];
+        unifont_glyph g;
+        unifont *u;
+
+        assert_se(unifont_new(&u) >= 0);
+
+        /* lookup invalid font */
+        assert_se(unifont_lookup(u, &g, 0xffffffffU) < 0);
+
+        /* lookup and render 'A' */
+        assert_se(unifont_lookup(u, &g, 'A') >= 0);
+        assert_se(g.width == 8);
+        assert_se(g.height == 16);
+        assert_se(g.stride >= 1);
+        assert_se(g.cwidth == 1);
+        assert_se(g.data != NULL);
+        render(buf, &g);
+        assert_se(!strcmp(buf,
+                          "        \n"
+                          "        \n"
+                          "        \n"
+                          "        \n"
+                          "   ##   \n"
+                          "  #  #  \n"
+                          "  #  #  \n"
+                          " #    # \n"
+                          " #    # \n"
+                          " ###### \n"
+                          " #    # \n"
+                          " #    # \n"
+                          " #    # \n"
+                          " #    # \n"
+                          "        \n"
+                          "        \n"
+                          ));
+
+        /* lookup and render '什' */
+        assert_se(unifont_lookup(u, &g, 0x4ec0) >= 0);
+        assert_se(g.width == 16);
+        assert_se(g.height == 16);
+        assert_se(g.stride >= 2);
+        assert_se(g.cwidth == 2);
+        assert_se(g.data != NULL);
+        render(buf, &g);
+        assert_se(!strcmp(buf,
+                          "    #     #     \n"
+                          "    #     #     \n"
+                          "    #     #     \n"
+                          "   #      #     \n"
+                          "   #      #     \n"
+                          "  ##      #     \n"
+                          "  ## ########## \n"
+                          " # #      #     \n"
+                          "#  #      #     \n"
+                          "   #      #     \n"
+                          "   #      #     \n"
+                          "   #      #     \n"
+                          "   #      #     \n"
+                          "   #      #     \n"
+                          "   #      #     \n"
+                          "   #      #     \n"
+                          ));
+
+        unifont_unref(u);
+}
+
+int main(int argc, char **argv) {
+        if (access(UNIFONT_PATH, F_OK))
+                return 77;
+
+        test_unifont();
+
+        return 0;
+}
diff --git a/src/libsystemd-terminal/unifont-def.h b/src/libsystemd-terminal/unifont-def.h
new file mode 100644 (file)
index 0000000..2b0b859
--- /dev/null
@@ -0,0 +1,137 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#pragma once
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "sparse-endian.h"
+#include "util.h"
+
+typedef struct unifont_header unifont_header;
+typedef struct unifont_glyph_header unifont_glyph_header;
+
+/*
+ * Unifont: On-disk data
+ * Conventional font-formats have the problem that you have to pre-render each
+ * glyph before you can use it. If you just need one glyph, you have to parse
+ * the font-file until you found that glyph.
+ * GNU-Unifont is a bitmap font with very good Unicode coverage. All glyphs are
+ * (n*8)x16 bitmaps. Our on-disk data stores all those glyphs pre-compiled with
+ * fixed offsets. Therefore, the font-file can be mmap()ed and all glyphs can
+ * be accessed in O(1) (because all glyphs have the same size and thus their
+ * offsets can be easily computed). This guarantees, that the kernel only loads
+ * the pages that are really accessed. Thus, we have a far lower overhead than
+ * traditional font-formats like BDF. Furthermore, the backing file is read-only
+ * and can be shared in memory between multiple users.
+ *
+ * The binary-format starts with a fixed header:
+ *
+ *      | 2bytes | 2bytes | 2bytes | 2bytes |
+ *
+ *      +-----------------------------------+
+ *      |             SIGNATURE             |   8 bytes
+ *      +-----------------+-----------------+
+ *      |  COMPAT FLAGS   | INCOMPAT FLAGS  |   8 bytes
+ *      +-----------------+--------+--------+
+ *      |   HEADER SIZE   |GH-SIZE |G-STRIDE|   8 bytes
+ *      +-----------------+--------+--------+
+ *      |          GLYPH BODY SIZE          |   8 bytes
+ *      +-----------------------------------+
+ *
+ *  * The 8 bytes signature must be set to the ASCII string "DVDHRMUF".
+ *  * The 4 bytes compatible-flags field contains flags for new features that
+ *    might be added in the future and which are compatible to older parsers.
+ *  * The 4 bytes incompatible-flags field contains flags for new features that
+ *    might be added in the future and which are incompatible to old parses.
+ *    Thus, if you encounter an unknown bit set, you must abort!
+ *  * The 4 bytes header-size field contains the size of the header in bytes. It
+ *    must be at least 32 (the size of this fixed header). If new features are
+ *    added, it might be increased. It can also be used to add padding to the
+ *    end of the header.
+ *  * The 2 bytes glyph-header-size field specifies the size of each glyph
+ *    header in bytes (see below).
+ *  * The 2 bytes glyph-stride field specifies the stride of each line of glyph
+ *    data in "bytes per line".
+ *  * The 8 byte glyph-body-size field defines the size of each glyph body in
+ *    bytes.
+ *
+ * After the header, the file can contain padding bytes, depending on the
+ * header-size field. Everything beyond the header+padding is treated as a big
+ * array of glyphs. Each glyph looks like this:
+ *
+ *      |              1 byte               |
+ *
+ *      +-----------------------------------+
+ *      |               WIDTH               |   1 byte
+ *      +-----------------------------------+
+ *      ~              PADDING              ~
+ *      +-----------------------------------+
+ *      ~                                   ~
+ *      ~                                   ~
+ *      ~                DATA               ~
+ *      ~                                   ~
+ *      ~                                   ~
+ *      +-----------------------------------+
+ *
+ *  * The first byte specifies the width of the glyph. If it is 0, the glyph
+ *    must be treated as non-existant.
+ *    All glyphs are "8*n" pixels wide and "16" pixels high. The width-field
+ *    specifies the width multiplier "n".
+ *  * After the width field padding might be added. This depends on the global
+ *    glyph-header-size field. It defines the total size of each glyph-header.
+ *    After the glyph-header+padding, the data-field starts.
+ *  * The data-field contains a byte-array of bitmap data. The array is always
+ *    as big as specified in the global glyph-body-size header field. This might
+ *    include padding.
+ *    The array contains all 16 lines of bitmap information for that glyph. The
+ *    stride is given in the global glyph-stride header field. This can be used
+ *    to add padding after each line.
+ *    Each line is encoded as 1 bit per pixel bitmap. That is, each byte encodes
+ *    data for 8 pixels (left most pixel is encoded in the LSB, right most pixel
+ *    in the MSB). The width field defines the number of bytes valid per line.
+ *    For width==1, you need 1 byte to encode the 8 pixels. The stride defines
+ *    where the encoding of the next line starts.
+ *    Any data beyond the 16th line is padding and must be ignored.
+ */
+
+/* path to binary file */
+#define UNIFONT_PATH "/usr/share/systemd/unifont-glyph-array.bin"
+
+/* header-size of version 1 */
+#define UNIFONT_HEADER_SIZE_MIN 32
+
+struct unifont_header {
+        /* fields available in version 1 */
+        uint8_t signature[8];
+        le32_t compatible_flags;
+        le32_t incompatible_flags;
+        le32_t header_size;
+        le16_t glyph_header_size;
+        le16_t glyph_stride;
+        le64_t glyph_body_size;
+} _packed_;
+
+struct unifont_glyph_header {
+        /* fields available in version 1 */
+        uint8_t width;
+} _packed_;
diff --git a/src/libsystemd-terminal/unifont-glyph-array.bin b/src/libsystemd-terminal/unifont-glyph-array.bin
new file mode 100644 (file)
index 0000000..46f150c
Binary files /dev/null and b/src/libsystemd-terminal/unifont-glyph-array.bin differ
diff --git a/src/libsystemd-terminal/unifont.c b/src/libsystemd-terminal/unifont.c
new file mode 100644 (file)
index 0000000..2acfa98
--- /dev/null
@@ -0,0 +1,241 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+/*
+ * Unifont
+ * This implements the unifont glyph-array parser and provides it via a simple
+ * API to the caller. No heavy transformations are performed so glyph-lookups
+ * stay as fast as possible.
+ */
+
+#include <endian.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include "macro.h"
+#include "unifont-def.h"
+#include "unifont.h"
+#include "util.h"
+
+struct unifont {
+        unsigned long ref;
+
+        int fd;
+        const uint8_t *map;
+        size_t size;
+
+        unifont_header header;
+        const void *glyphs;     /* unaligned! */
+        size_t n_glyphs;
+        size_t glyphsize;
+};
+
+static int unifont_fetch_header(unifont *u) {
+        unifont_header h = { };
+        uint64_t glyphsize;
+
+        if (u->size < UNIFONT_HEADER_SIZE_MIN)
+                return -EBFONT;
+
+        assert_cc(sizeof(h) >= UNIFONT_HEADER_SIZE_MIN);
+        memcpy(&h, u->map, UNIFONT_HEADER_SIZE_MIN);
+
+        h.compatible_flags = le32toh(h.compatible_flags);
+        h.incompatible_flags = le32toh(h.incompatible_flags);
+        h.header_size = le32toh(h.header_size);
+        h.glyph_header_size = le16toh(h.glyph_header_size);
+        h.glyph_stride = le16toh(h.glyph_stride);
+        h.glyph_body_size = le64toh(h.glyph_body_size);
+
+        if (memcmp(h.signature, "DVDHRMUF", 8))
+                return -EBFONT;
+        if (h.incompatible_flags != 0)
+                return -EBFONT;
+        if (h.header_size < UNIFONT_HEADER_SIZE_MIN || h.header_size > u->size)
+                return -EBFONT;
+        if (h.glyph_header_size + h.glyph_body_size < h.glyph_header_size)
+                return -EBFONT;
+        if (h.glyph_stride * 16ULL > h.glyph_body_size)
+                return -EBFONT;
+
+        glyphsize = h.glyph_header_size + h.glyph_body_size;
+
+        if (glyphsize == 0 || glyphsize > u->size - h.header_size) {
+                u->n_glyphs = 0;
+        } else {
+                u->glyphs = u->map + h.header_size;
+                u->n_glyphs = (u->size - h.header_size) / glyphsize;
+                u->glyphsize = glyphsize;
+        }
+
+        memcpy(&u->header, &h, sizeof(h));
+        return 0;
+}
+
+static int unifont_fetch_glyph(unifont *u, unifont_glyph_header *out_header, const void **out_body, uint32_t ucs4) {
+        unifont_glyph_header glyph_header = { };
+        const void *glyph_body = NULL;
+        const uint8_t *p;
+
+        if (ucs4 >= u->n_glyphs)
+                return -ENOENT;
+
+        p = u->glyphs;
+
+        /* copy glyph-header data */
+        p += ucs4 * u->glyphsize;
+        memcpy(&glyph_header, p, MIN(sizeof(glyph_header), u->header.glyph_header_size));
+
+        /* copy glyph-body pointer */
+        p += u->header.glyph_header_size;
+        glyph_body = p;
+
+        if (glyph_header.width < 1)
+                return -ENOENT;
+        if (glyph_header.width > u->header.glyph_stride)
+                return -EBFONT;
+
+        memcpy(out_header, &glyph_header, sizeof(glyph_header));
+        *out_body = glyph_body;
+        return 0;
+}
+
+int unifont_new(unifont **out) {
+        _cleanup_(unifont_unrefp) unifont *u = NULL;
+        struct stat st;
+        int r;
+
+        assert_return(out, -EINVAL);
+
+        u = new0(unifont, 1);
+        if (!u)
+                return -ENOMEM;
+
+        u->ref = 1;
+        u->fd = -1;
+        u->map = MAP_FAILED;
+
+        u->fd = open(UNIFONT_PATH, O_RDONLY | O_CLOEXEC | O_NOCTTY);
+        if (u->fd < 0)
+                return -errno;
+
+        r = fstat(u->fd, &st);
+        if (r < 0)
+                return -errno;
+
+        u->size = st.st_size;
+        u->map = mmap(NULL, u->size, PROT_READ, MAP_PRIVATE, u->fd, 0);
+        if (u->map == MAP_FAILED)
+                return -errno;
+
+        r = unifont_fetch_header(u);
+        if (r < 0)
+                return r;
+
+        *out = u;
+        u = NULL;
+        return 0;
+}
+
+unifont *unifont_ref(unifont *u) {
+        if (!u || !u->ref)
+                return NULL;
+
+        ++u->ref;
+
+        return u;
+}
+
+unifont *unifont_unref(unifont *u) {
+        if (!u || !u->ref || --u->ref)
+                return NULL;
+
+        if (u->map != MAP_FAILED)
+                munmap((void*)u->map, u->size);
+        u->fd = safe_close(u->fd);
+        free(u);
+
+        return NULL;
+}
+
+unsigned int unifont_get_width(unifont *u) {
+        assert(u);
+
+        return 8U;
+}
+
+unsigned int unifont_get_height(unifont *u) {
+        assert(u);
+
+        return 16U;
+}
+
+unsigned int unifont_get_stride(unifont *u) {
+        assert(u);
+
+        return u->header.glyph_stride;
+}
+
+int unifont_lookup(unifont *u, unifont_glyph *out, uint32_t ucs4) {
+        unifont_glyph_header h = { };
+        const void *b = NULL;
+        unifont_glyph g = { };
+        int r;
+
+        assert_return(u, -EINVAL);
+
+        r = unifont_fetch_glyph(u, &h, &b, ucs4);
+        if (r < 0)
+                return r;
+
+        g.width = h.width * 8U;
+        g.height = 16U;
+        g.stride = u->header.glyph_stride;
+        g.cwidth = h.width;
+        g.data = b;
+
+        if (out)
+                memcpy(out, &g, sizeof(g));
+        return 0;
+}
+
+void unifont_fallback(unifont_glyph *out) {
+        static const uint8_t fallback_data[] = {
+                /* unifont 0xfffd '�' (unicode replacement character) */
+                0x00, 0x00, 0x00, 0x7e,
+                0x66, 0x5a, 0x5a, 0x7a,
+                0x76, 0x76, 0x7e, 0x76,
+                0x76, 0x7e, 0x00, 0x00,
+        };
+
+        assert(out);
+
+        out->width = 8;
+        out->height = 16;
+        out->stride = 1;
+        out->cwidth = 1;
+        out->data = fallback_data;
+}
diff --git a/src/libsystemd-terminal/unifont.h b/src/libsystemd-terminal/unifont.h
new file mode 100644 (file)
index 0000000..30527cb
--- /dev/null
@@ -0,0 +1,57 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright (C) 2014 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/>.
+***/
+
+#pragma once
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "util.h"
+
+typedef struct unifont unifont;
+typedef struct unifont_glyph unifont_glyph;
+
+/*
+ * Unifont
+ * The unifont API provides a glyph-lookup for bitmap fonts which can be used
+ * as fallback if no system-font is available or if you don't want to deal with
+ * full font renderers.
+ */
+
+struct unifont_glyph {
+        unsigned int width;
+        unsigned int height;
+        unsigned int stride;
+        unsigned int cwidth;
+        const void *data;       /* unaligned! */
+};
+
+int unifont_new(unifont **out);
+unifont *unifont_ref(unifont *u);
+unifont *unifont_unref(unifont *u);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(unifont*, unifont_unref);
+
+unsigned int unifont_get_width(unifont *u);
+unsigned int unifont_get_height(unifont *u);
+unsigned int unifont_get_stride(unifont *u);
+int unifont_lookup(unifont *u, unifont_glyph *out, uint32_t ucs4);
+void unifont_fallback(unifont_glyph *out);
index b4e303587189a20747f51bb6a816c3ba5342be24..ab11448bb991122aaa57990da77d76741b3bdf40 100644 (file)
@@ -148,6 +148,16 @@ global:
         sd_pid_notifyf;
 } LIBSYSTEMD_213;
 
+LIBSYSTEMD_216 {
+global:
+        sd_machine_get_ifindices;
+} LIBSYSTEMD_214;
+
+LIBSYSTEMD_217 {
+global:
+        sd_session_get_desktop;
+} LIBSYSTEMD_216;
+
 m4_ifdef(`ENABLE_KDBUS',
 LIBSYSTEMD_FUTURE {
 global:
@@ -181,7 +191,7 @@ global:
         sd_bus_is_open;
         sd_bus_can_send;
         sd_bus_get_server_id;
-        sd_bus_get_peer_creds;
+        sd_bus_get_owner_creds;
         sd_bus_get_name;
         sd_bus_send;
         sd_bus_send_to;
@@ -277,8 +287,8 @@ global:
         sd_bus_request_name;
         sd_bus_release_name;
         sd_bus_list_names;
-        sd_bus_get_owner;
-        sd_bus_get_owner_machine_id;
+        sd_bus_get_name_creds;
+        sd_bus_get_name_machine_id;
         sd_bus_call_method;
         sd_bus_get_property;
         sd_bus_get_property_trivial;
@@ -354,20 +364,6 @@ global:
         sd_bus_track_first;
         sd_bus_track_next;
 
-        /* sd-memfd */
-        sd_memfd_new;
-        sd_memfd_new_and_map;
-        sd_memfd_free;
-        sd_memfd_get_fd;
-        sd_memfd_get_file;
-        sd_memfd_dup_fd;
-        sd_memfd_map;
-        sd_memfd_set_sealed;
-        sd_memfd_get_sealed;
-        sd_memfd_get_size;
-        sd_memfd_set_size;
-        sd_memfd_get_name;
-
         /* sd-event */
         sd_event_default;
         sd_event_new;
@@ -383,6 +379,7 @@ global:
         sd_event_loop;
         sd_event_exit;
         sd_event_now;
+        sd_event_get_fd;
         sd_event_get_state;
         sd_event_get_tid;
         sd_event_get_exit_code;
@@ -390,6 +387,8 @@ global:
         sd_event_get_watchdog;
         sd_event_source_ref;
         sd_event_source_unref;
+        sd_event_source_set_name;
+        sd_event_source_get_name;
         sd_event_source_set_prepare;
         sd_event_source_get_pending;
         sd_event_source_get_priority;
@@ -440,5 +439,9 @@ global:
         sd_resolve_query_get_userdata;
         sd_resolve_query_set_userdata;
         sd_resolve_query_get_resolve;
-} LIBSYSTEMD_214;
+
+        /* sd-path */
+        sd_path_home;
+        sd_path_search;
+} LIBSYSTEMD_217;
 )
index 6205e32736789e1fd0989c9045ae73bf116ad715..81e94132b324f9ef54bf650793154ef494af92b0 100644 (file)
@@ -66,7 +66,7 @@ fields as you need.
 
 The kernel will return in the "id" field your unique id. This is a
 simple numeric value. For compatibility with classic dbus1 simply
-format this as string and prefix ":0.".
+format this as string and prefix ":1.".
 
 The kernel will also return the bloom filter size and bloom filter
 hash function number used for the signal broadcast bloom filter (see
@@ -156,11 +156,11 @@ multiple items. Some restrictions apply however:
    contained in the payload, as well is immediately before framing of a
    Gvariant, as well after as any padding bytes if there are any. The
    padding bytes must be wholly contained in the preceding
-   PAYLOAD_VEC/PAYLOAD_MEMFD item. You may not split up simple types
-   nor arrays of trivial types. The latter is necessary to allow APIs
-   to return direct pointers to linear chunks of fixed size trivial
-   arrays. Examples: The simple types "u", "s", "t" have to be in the
-   same payload item. The array of simple types "ay", "ai" have to be
+   PAYLOAD_VEC/PAYLOAD_MEMFD item. You may not split up basic types
+   nor arrays of fixed types. The latter is necessary to allow APIs
+   to return direct pointers to linear arrays of numeric
+   values. Examples: The basic types "u", "s", "t" have to be in the
+   same payload item. The array of fixed types "ay", "ai" have to be
    fully in contained in the same payload item. For an array "as" or
    "a(si)" the only restriction however is to keep each string
    individually in an uninterrupted item, to keep the framing of each
@@ -362,46 +362,6 @@ ioctl()s are added for a single match strings.
 
 MEMFDS
 
-The "memfd" concept is used for zero-copy data transfers (see
-above). memfds are file descriptors to memory chunks of arbitrary
-sizes. If you have a memfd you can mmap() it to get access to the data
-it contains or write to it. They are comparable to file descriptors to
-unlinked files on a tmpfs, or to anonymous memory that one may refer
-to with an fd. They have one particular property: they can be
-"sealed". A memfd that is "sealed" is protected from alteration. Only
-memfds that are currently not mapped and to which a single fd refers
-may be sealed (they may also be unsealed in that case).
-
-The concept of "sealing" makes memfds useful for using them as
-transport for kdbus messages: only when the receiver knows that the
-message it has received cannot change while looking at, it can safely
-parse it without having to copy it to a safe memory area. memfds can also
-be reused in multiple messages. A sender may send the same memfd to
-multiple peers, and since it is sealed, it can be sure that the receiver
-will not be able to modify it. "Sealing" hence provides both sides of
-a transaction with the guarantee that the data stays constant and is
-reusable.
-
-memfds are a generic concept that can be used outside of the immediate
-kdbus usecase. You can send them across AF_UNIX sockets too, sealed or
-unsealed. In kdbus themselves, they can be used to send zero-copy
-payloads, but may also be sent as normal fds.
-
-memfds are allocated with the KDBUS_CMD_MEMFD_NEW ioctl. After allocation,
-simply memory map them and write to them. To set their size, use
-KDBUS_CMD_MEMFD_SIZE_SET. Note that memfds will be increased in size
-automatically if you touch previously unallocated pages. However, the
-size will only be increased in multiples of the page size in that
-case. Thus, in almost all cases, an explicit KDBUS_CMD_MEMFD_SIZE_SET
-is necessary, since it allows setting memfd sizes in finer
-granularity. To seal a memfd use the KDBUS_CMD_MEMFD_SEAL_SET ioctl
-call. It will only succeed if the caller has the only fd reference to
-the memfd open, and if the memfd is currently unmapped.
-
-If memfds are shared, keep in mind that the file pointer used by
-write/read/seek is shared too, only pread/pwrite are safe to use
-in that case.
-
 memfds may be sent across kdbus via KDBUS_ITEM_PAYLOAD_MEMFD items
 attached to messages. If this is done, the data included in the memfd
 is considered part of the payload stream of a message, and are treated
index e1542969942ab706b7608d98255786e8832e392c..3556774074c38ad9d3492d8f9cde0652bcc55891 100644 (file)
@@ -48,6 +48,7 @@ static void bloom_add_data(
         uint8_t h[8];
         uint64_t m;
         unsigned w, i, c = 0;
+        unsigned hash_index;
 
         assert(size > 0);
         assert(k > 0);
@@ -65,13 +66,13 @@ static void bloom_add_data(
          * hash value for each 128 bits of hash key. */
         assert(k * w <= ELEMENTSOF(hash_keys) * 8);
 
-        for (i = 0; i < k; i++) {
+        for (i = 0, hash_index = 0; i < k; i++) {
                 uint64_t p = 0;
                 unsigned d;
 
                 for (d = 0; d < w; d++) {
                         if (c <= 0) {
-                                siphash24(h, data, n, hash_keys[i++].bytes);
+                                siphash24(h, data, n, hash_keys[hash_index++].bytes);
                                 c += 8;
                         }
 
index 076bbce6b1a2c8438eb746cf8907fa5c4169b868..5a052d455eb425dd50e0adefb22b40b3a22ff6c4 100644 (file)
@@ -58,12 +58,15 @@ static int bus_request_name_kernel(sd_bus *bus, const char *name, uint64_t flags
         assert(bus);
         assert(name);
 
-        l = strlen(name);
-        size = offsetof(struct kdbus_cmd_name, name) + l + 1;
-        n = alloca0(size);
+        l = strlen(name) + 1;
+        size = offsetof(struct kdbus_cmd_name, items) + KDBUS_ITEM_SIZE(l);
+        n = alloca0_align(size, 8);
         n->size = size;
         kdbus_translate_request_name_flags(flags, (uint64_t *) &n->flags);
-        memcpy(n->name, name, l+1);
+
+        n->items[0].size = KDBUS_ITEM_HEADER_SIZE + l;
+        n->items[0].type = KDBUS_ITEM_NAME;
+        memcpy(n->items[0].str, name, l);
 
 #ifdef HAVE_VALGRIND_MEMCHECK_H
         VALGRIND_MAKE_MEM_DEFINED(n, n->size);
@@ -144,16 +147,20 @@ _public_ int sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags)
 
 static int bus_release_name_kernel(sd_bus *bus, const char *name) {
         struct kdbus_cmd_name *n;
-        size_t l;
+        size_t size, l;
         int r;
 
         assert(bus);
         assert(name);
 
-        l = strlen(name);
-        n = alloca0(offsetof(struct kdbus_cmd_name, name) + l + 1);
-        n->size = offsetof(struct kdbus_cmd_name, name) + l + 1;
-        memcpy(n->name, name, l+1);
+        l = strlen(name) + 1;
+        size = offsetof(struct kdbus_cmd_name, items) + KDBUS_ITEM_SIZE(l);
+        n = alloca0_align(size, 8);
+        n->size = size;
+
+        n->items[0].size = KDBUS_ITEM_HEADER_SIZE + l;
+        n->items[0].type = KDBUS_ITEM_NAME;
+        memcpy(n->items[0].str, name, l);
 
 #ifdef HAVE_VALGRIND_MEMCHECK_H
         VALGRIND_MAKE_MEM_DEFINED(n, n->size);
@@ -162,7 +169,7 @@ static int bus_release_name_kernel(sd_bus *bus, const char *name) {
         if (r < 0)
                 return -errno;
 
-        return n->flags;
+        return 0;
 }
 
 static int bus_release_name_dbus1(sd_bus *bus, const char *name) {
@@ -216,10 +223,27 @@ _public_ int sd_bus_release_name(sd_bus *bus, const char *name) {
                 return bus_release_name_dbus1(bus, name);
 }
 
+static int kernel_cmd_free(sd_bus *bus, uint64_t offset)
+{
+        struct kdbus_cmd_free cmd;
+        int r;
+
+        assert(bus);
+
+        cmd.flags = 0;
+        cmd.offset = offset;
+
+        r = ioctl(bus->input_fd, KDBUS_CMD_FREE, &cmd);
+        if (r < 0)
+                return -errno;
+
+        return 0;
+}
+
 static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) {
         struct kdbus_cmd_name_list cmd = {};
         struct kdbus_name_list *name_list;
-        struct kdbus_cmd_name *name;
+        struct kdbus_name_info *name;
         uint64_t previous_id = 0;
         int r;
 
@@ -235,31 +259,42 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) {
 
         KDBUS_ITEM_FOREACH(name, name_list, names) {
 
+                struct kdbus_item *item;
+                const char *entry_name = NULL;
+
                 if ((flags & KDBUS_NAME_LIST_UNIQUE) && name->owner_id != previous_id) {
                         char *n;
 
-                        if (asprintf(&n, ":1.%llu", (unsigned long long) name->owner_id) < 0)
-                                return -ENOMEM;
+                        if (asprintf(&n, ":1.%llu", (unsigned long long) name->owner_id) < 0) {
+                                r = -ENOMEM;
+                                goto fail;
+                        }
 
                         r = strv_consume(x, n);
                         if (r < 0)
-                                return r;
+                                goto fail;
 
                         previous_id = name->owner_id;
                 }
 
-                if (name->size > sizeof(*name) && service_name_is_valid(name->name)) {
-                        r = strv_extend(x, name->name);
-                        if (r < 0)
-                                return -ENOMEM;
+                KDBUS_ITEM_FOREACH(item, name, items)
+                        if (item->type == KDBUS_ITEM_NAME)
+                                entry_name = item->str;
+
+                if (entry_name && service_name_is_valid(entry_name)) {
+                        r = strv_extend(x, entry_name);
+                        if (r < 0) {
+                                r = -ENOMEM;
+                                goto fail;
+                        }
                 }
         }
 
-        r = ioctl(bus->input_fd, KDBUS_CMD_FREE, &cmd.offset);
-        if (r < 0)
-                return -errno;
+        r = 0;
 
-        return 0;
+fail:
+        kernel_cmd_free(bus, cmd.offset);
+        return r;
 }
 
 static int bus_list_names_kernel(sd_bus *bus, char ***acquired, char ***activatable) {
@@ -357,58 +392,16 @@ _public_ int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatabl
                 return bus_list_names_dbus1(bus, acquired, activatable);
 }
 
-static int bus_get_owner_kdbus(
-                sd_bus *bus,
-                const char *name,
-                uint64_t mask,
-                sd_bus_creds **creds) {
+static int bus_populate_creds_from_items(sd_bus *bus,
+                                         struct kdbus_info *info,
+                                         uint64_t mask,
+                                         sd_bus_creds *c) {
 
-        _cleanup_bus_creds_unref_ sd_bus_creds *c = NULL;
-        struct kdbus_cmd_conn_info *cmd;
-        struct kdbus_conn_info *conn_info;
         struct kdbus_item *item;
-        size_t size;
-        uint64_t m, id;
+        uint64_t m;
         int r;
 
-        r = bus_kernel_parse_unique_name(name, &id);
-        if (r < 0)
-                return r;
-        if (r > 0) {
-                size = offsetof(struct kdbus_cmd_conn_info, name);
-                cmd = alloca0(size);
-                cmd->id = id;
-        } else {
-                size = offsetof(struct kdbus_cmd_conn_info, name) + strlen(name) + 1;
-                cmd = alloca0(size);
-                strcpy(cmd->name, name);
-        }
-
-        cmd->size = size;
-        kdbus_translate_attach_flags(mask, (uint64_t*) &cmd->flags);
-
-        r = ioctl(bus->input_fd, KDBUS_CMD_CONN_INFO, cmd);
-        if (r < 0)
-                return -errno;
-
-        conn_info = (struct kdbus_conn_info *) ((uint8_t *) bus->kdbus_buffer + cmd->offset);
-
-        /* Non-activated names are considered not available */
-        if (conn_info->flags & KDBUS_HELLO_ACTIVATOR)
-                return name[0] == ':' ? -ENXIO : -ESRCH;
-
-        c = bus_creds_new();
-        if (!c)
-                return -ENOMEM;
-
-        if (mask & SD_BUS_CREDS_UNIQUE_NAME) {
-                if (asprintf(&c->unique_name, ":1.%llu", (unsigned long long) conn_info->id) < 0)
-                        return -ENOMEM;
-
-                c->mask |= SD_BUS_CREDS_UNIQUE_NAME;
-        }
-
-        KDBUS_ITEM_FOREACH(item, conn_info, items) {
+        KDBUS_ITEM_FOREACH(item, info, items) {
 
                 switch (item->type) {
 
@@ -437,10 +430,8 @@ static int bus_get_owner_kdbus(
                 case KDBUS_ITEM_PID_COMM:
                         if (mask & SD_BUS_CREDS_COMM) {
                                 c->comm = strdup(item->str);
-                                if (!c->comm) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->comm)
+                                        return -ENOMEM;
 
                                 c->mask |= SD_BUS_CREDS_COMM;
                         }
@@ -449,10 +440,8 @@ static int bus_get_owner_kdbus(
                 case KDBUS_ITEM_TID_COMM:
                         if (mask & SD_BUS_CREDS_TID_COMM) {
                                 c->tid_comm = strdup(item->str);
-                                if (!c->tid_comm) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->tid_comm)
+                                        return -ENOMEM;
 
                                 c->mask |= SD_BUS_CREDS_TID_COMM;
                         }
@@ -461,10 +450,8 @@ static int bus_get_owner_kdbus(
                 case KDBUS_ITEM_EXE:
                         if (mask & SD_BUS_CREDS_EXE) {
                                 c->exe = strdup(item->str);
-                                if (!c->exe) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->exe)
+                                        return -ENOMEM;
 
                                 c->mask |= SD_BUS_CREDS_EXE;
                         }
@@ -474,10 +461,8 @@ static int bus_get_owner_kdbus(
                         if (mask & SD_BUS_CREDS_CMDLINE) {
                                 c->cmdline_size = item->size - KDBUS_ITEM_HEADER_SIZE;
                                 c->cmdline = memdup(item->data, c->cmdline_size);
-                                if (!c->cmdline) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->cmdline)
+                                        return -ENOMEM;
 
                                 c->mask |= SD_BUS_CREDS_CMDLINE;
                         }
@@ -490,22 +475,16 @@ static int bus_get_owner_kdbus(
 
                         if (m) {
                                 c->cgroup = strdup(item->str);
-                                if (!c->cgroup) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->cgroup)
+                                        return -ENOMEM;
 
-                                if (!bus->cgroup_root) {
-                                        r = cg_get_root_path(&bus->cgroup_root);
-                                        if (r < 0)
-                                                goto fail;
-                                }
+                                r = bus_get_root_path(bus);
+                                if (r < 0)
+                                        return r;
 
                                 c->cgroup_root = strdup(bus->cgroup_root);
-                                if (!c->cgroup_root) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->cgroup_root)
+                                        return -ENOMEM;
 
                                 c->mask |= m;
                         }
@@ -516,12 +495,10 @@ static int bus_get_owner_kdbus(
                              SD_BUS_CREDS_INHERITABLE_CAPS | SD_BUS_CREDS_BOUNDING_CAPS) & mask;
 
                         if (m) {
-                                c->capability_size = item->size - KDBUS_ITEM_HEADER_SIZE;
-                                c->capability = memdup(item->data, c->capability_size);
-                                if (!c->capability) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                c->capability_size = item->size - offsetof(struct kdbus_item, caps.caps);
+                                c->capability = memdup(item->caps.caps, c->capability_size);
+                                if (!c->capability)
+                                        return -ENOMEM;
 
                                 c->mask |= m;
                         }
@@ -530,10 +507,8 @@ static int bus_get_owner_kdbus(
                 case KDBUS_ITEM_SECLABEL:
                         if (mask & SD_BUS_CREDS_SELINUX_CONTEXT) {
                                 c->label = strdup(item->str);
-                                if (!c->label) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->label)
+                                        return -ENOMEM;
 
                                 c->mask |= SD_BUS_CREDS_SELINUX_CONTEXT;
                         }
@@ -553,7 +528,7 @@ static int bus_get_owner_kdbus(
                         if ((mask & SD_BUS_CREDS_WELL_KNOWN_NAMES) && service_name_is_valid(item->name.name)) {
                                 r = strv_extend(&c->well_known_names, item->name.name);
                                 if (r < 0)
-                                        goto fail;
+                                        return r;
 
                                 c->mask |= SD_BUS_CREDS_WELL_KNOWN_NAMES;
                         }
@@ -562,10 +537,8 @@ static int bus_get_owner_kdbus(
                 case KDBUS_ITEM_CONN_NAME:
                         if ((mask & SD_BUS_CREDS_CONNECTION_NAME)) {
                                 c->conn_name = strdup(item->str);
-                                if (!c->conn_name) {
-                                        r = -ENOMEM;
-                                        goto fail;
-                                }
+                                if (!c->conn_name)
+                                        return -ENOMEM;
 
                                 c->mask |= SD_BUS_CREDS_CONNECTION_NAME;
                         }
@@ -573,6 +546,75 @@ static int bus_get_owner_kdbus(
                 }
         }
 
+        return 0;
+}
+
+static int bus_get_name_creds_kdbus(
+                sd_bus *bus,
+                const char *name,
+                uint64_t mask,
+                sd_bus_creds **creds) {
+
+        _cleanup_bus_creds_unref_ sd_bus_creds *c = NULL;
+        struct kdbus_cmd_info *cmd;
+        struct kdbus_info *conn_info;
+        size_t size, l;
+        uint64_t id;
+        int r;
+
+        r = bus_kernel_parse_unique_name(name, &id);
+        if (r < 0)
+                return r;
+        if (r > 0) {
+                size = offsetof(struct kdbus_cmd_info, items);
+                cmd = alloca0_align(size, 8);
+                cmd->id = id;
+        } else {
+                l = strlen(name) + 1;
+                size = offsetof(struct kdbus_cmd_info, items) + KDBUS_ITEM_SIZE(l);
+                cmd = alloca0_align(size, 8);
+                cmd->items[0].size = KDBUS_ITEM_HEADER_SIZE + l;
+                cmd->items[0].type = KDBUS_ITEM_NAME;
+                memcpy(cmd->items[0].str, name, l);
+        }
+
+        cmd->size = size;
+        kdbus_translate_attach_flags(mask, (uint64_t*) &cmd->flags);
+
+        r = ioctl(bus->input_fd, KDBUS_CMD_CONN_INFO, cmd);
+        if (r < 0)
+                return -errno;
+
+        conn_info = (struct kdbus_info *) ((uint8_t *) bus->kdbus_buffer + cmd->offset);
+
+        /* Non-activated names are considered not available */
+        if (conn_info->flags & KDBUS_HELLO_ACTIVATOR) {
+                if (name[0] == ':')
+                        r = -ENXIO;
+                else
+                        r = -ESRCH;
+                goto fail;
+        }
+
+        c = bus_creds_new();
+        if (!c) {
+                r = -ENOMEM;
+                goto fail;
+        }
+
+        if (mask & SD_BUS_CREDS_UNIQUE_NAME) {
+                if (asprintf(&c->unique_name, ":1.%llu", (unsigned long long) conn_info->id) < 0) {
+                        r = -ENOMEM;
+                        goto fail;
+                }
+
+                c->mask |= SD_BUS_CREDS_UNIQUE_NAME;
+        }
+
+        r = bus_populate_creds_from_items(bus, conn_info, mask, c);
+        if (r < 0)
+                goto fail;
+
         if (creds) {
                 *creds = c;
                 c = NULL;
@@ -581,11 +623,11 @@ static int bus_get_owner_kdbus(
         r = 0;
 
 fail:
-        ioctl(bus->input_fd, KDBUS_CMD_FREE, &cmd->offset);
+        kernel_cmd_free(bus, cmd->offset);
         return r;
 }
 
-static int bus_get_owner_dbus1(
+static int bus_get_name_creds_dbus1(
                 sd_bus *bus,
                 const char *name,
                 uint64_t mask,
@@ -731,7 +773,7 @@ static int bus_get_owner_dbus1(
         return 0;
 }
 
-_public_ int sd_bus_get_owner(
+_public_ int sd_bus_get_name_creds(
                 sd_bus *bus,
                 const char *name,
                 uint64_t mask,
@@ -749,9 +791,72 @@ _public_ int sd_bus_get_owner(
                 return -ENOTCONN;
 
         if (bus->is_kernel)
-                return bus_get_owner_kdbus(bus, name, mask, creds);
+                return bus_get_name_creds_kdbus(bus, name, mask, creds);
         else
-                return bus_get_owner_dbus1(bus, name, mask, creds);
+                return bus_get_name_creds_dbus1(bus, name, mask, creds);
+}
+
+_public_ int sd_bus_get_owner_creds(sd_bus *bus, uint64_t mask, sd_bus_creds **ret) {
+        _cleanup_bus_creds_unref_ sd_bus_creds *c = NULL;
+        pid_t pid = 0;
+        int r;
+
+        assert_return(bus, -EINVAL);
+        assert_return(mask <= _SD_BUS_CREDS_ALL, -ENOTSUP);
+        assert_return(ret, -EINVAL);
+        assert_return(!bus_pid_changed(bus), -ECHILD);
+
+        if (!BUS_IS_OPEN(bus->state))
+                return -ENOTCONN;
+
+        if (!bus->ucred_valid && !isempty(bus->label))
+                return -ENODATA;
+
+        c = bus_creds_new();
+        if (!c)
+                return -ENOMEM;
+
+        if (bus->ucred_valid) {
+                pid = c->pid = bus->ucred.pid;
+                c->uid = bus->ucred.uid;
+                c->gid = bus->ucred.gid;
+
+                c->mask |= (SD_BUS_CREDS_UID | SD_BUS_CREDS_PID | SD_BUS_CREDS_GID) & mask;
+        }
+
+        if (!isempty(bus->label) && (mask & SD_BUS_CREDS_SELINUX_CONTEXT)) {
+                c->label = strdup(bus->label);
+                if (!c->label)
+                        return -ENOMEM;
+
+                c->mask |= SD_BUS_CREDS_SELINUX_CONTEXT;
+        }
+
+        if (bus->is_kernel) {
+                struct kdbus_cmd_info cmd = {};
+                struct kdbus_info *creator_info;
+
+                cmd.size = sizeof(cmd);
+                r = ioctl(bus->input_fd, KDBUS_CMD_BUS_CREATOR_INFO, &cmd);
+                if (r < 0)
+                        return -errno;
+
+                creator_info = (struct kdbus_info *) ((uint8_t *) bus->kdbus_buffer + cmd.offset);
+
+                r = bus_populate_creds_from_items(bus, creator_info, mask, c);
+                kernel_cmd_free(bus, cmd.offset);
+
+                if (r < 0)
+                        return r;
+        } else {
+                r = bus_creds_add_more(c, mask, pid, 0);
+                if (r < 0)
+                        return r;
+        }
+
+        *ret = c;
+        c = NULL;
+        return 0;
 }
 
 static int add_name_change_match(sd_bus *bus,
@@ -829,7 +934,7 @@ static int add_name_change_match(sd_bus *bus,
                             offsetof(struct kdbus_notify_name_change, name) +
                             l);
 
-                m = alloca0(sz);
+                m = alloca0_align(sz, 8);
                 m->size = sz;
                 m->cookie = cookie;
 
@@ -839,8 +944,8 @@ static int add_name_change_match(sd_bus *bus,
                         offsetof(struct kdbus_notify_name_change, name) +
                         l;
 
-                item->name_change.old.id = old_owner_id;
-                item->name_change.new.id = new_owner_id;
+                item->name_change.old_id.id = old_owner_id;
+                item->name_change.new_id.id = new_owner_id;
 
                 if (name)
                         memcpy(item->name_change.name, name, l);
@@ -889,7 +994,7 @@ static int add_name_change_match(sd_bus *bus,
                             offsetof(struct kdbus_item, id_change) +
                             sizeof(struct kdbus_notify_id_change));
 
-                m = alloca0(sz);
+                m = alloca0_align(sz, 8);
                 m->size = sz;
                 m->cookie = cookie;
 
@@ -1059,7 +1164,7 @@ int bus_add_match_internal_kernel(
         if (using_bloom)
                 sz += ALIGN8(offsetof(struct kdbus_item, data64) + bus->bloom_size);
 
-        m = alloca0(sz);
+        m = alloca0_align(sz, 8);
         m->size = sz;
         m->cookie = cookie;
 
@@ -1203,7 +1308,7 @@ int bus_remove_match_internal(
                 return bus_remove_match_internal_dbus1(bus, match);
 }
 
-_public_ int sd_bus_get_owner_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine) {
+_public_ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine) {
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL, *m = NULL;
         const char *mid;
         int r;
index c5b9cd4caaf812252ad85542d65b90e3e4ef0494..8081a2f9c0fe85d28bb827f835dfabecbb7d679c 100644 (file)
@@ -465,10 +465,63 @@ _public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_b
                  * to get it from the sender or peer */
 
                 if (call->sender)
-                        return sd_bus_get_owner(call->bus, call->sender, mask, creds);
+                        return sd_bus_get_name_creds(call->bus, call->sender, mask, creds);
                 else
-                        return sd_bus_get_peer_creds(call->bus, mask, creds);
+                        return sd_bus_get_owner_creds(call->bus, mask, creds);
         }
 
         return bus_creds_extend_by_pid(c, mask, creds);
 }
+
+_public_ int sd_bus_query_sender_privilege(sd_bus_message *call, int capability) {
+        _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
+        uid_t our_uid;
+        int r;
+
+        assert_return(call, -EINVAL);
+        assert_return(call->sealed, -EPERM);
+        assert_return(call->bus, -EINVAL);
+        assert_return(!bus_pid_changed(call->bus), -ECHILD);
+
+        if (!BUS_IS_OPEN(call->bus->state))
+                return -ENOTCONN;
+
+        /* We only trust the effective capability set if this is
+         * kdbus. On classic dbus1 we cannot retrieve the value
+         * without races. Since this function is supposed to be useful
+         * for authentication decision we hence avoid requesting and
+         * using that information. */
+        if (call->bus->is_kernel && capability >= 0) {
+                r = sd_bus_query_sender_creds(call, SD_BUS_CREDS_UID|SD_BUS_CREDS_EFFECTIVE_CAPS, &creds);
+                if (r < 0)
+                        return r;
+
+                r = sd_bus_creds_has_effective_cap(creds, capability);
+                if (r > 0)
+                        return 1;
+        } else {
+                r = sd_bus_query_sender_creds(call, SD_BUS_CREDS_UID, &creds);
+                if (r < 0)
+                        return r;
+        }
+
+        /* Now, check the UID, but only if the capability check wasn't
+         * sufficient */
+        our_uid = getuid();
+        if (our_uid != 0 || !call->bus->is_kernel || capability < 0) {
+                uid_t sender_uid;
+
+                r = sd_bus_creds_get_uid(creds, &sender_uid);
+                if (r >= 0) {
+                        /* Sender has same UID as us, then let's grant access */
+                        if (sender_uid == our_uid)
+                                return 1;
+
+                        /* Sender is root, we are not root. */
+                        if (our_uid != 0 && sender_uid == 0)
+                                return 1;
+                }
+        }
+
+        return 0;
+}
index df2c4d407de7bb3464e984134ab93a3e4901659f..59eaa3554bcc2660d5b380a62cc4abacfab0a91a 100644 (file)
@@ -13,37 +13,38 @@ name_error_mapping;
 %struct-type
 %includes
 %%
-org.freedesktop.DBus.Error.Failed,                        EACCES
-org.freedesktop.DBus.Error.NoMemory,                      ENOMEM
-org.freedesktop.DBus.Error.ServiceUnknown,                EHOSTUNREACH
-org.freedesktop.DBus.Error.NameHasNoOwner,                ENXIO
-org.freedesktop.DBus.Error.NoReply,                       ETIMEDOUT
-org.freedesktop.DBus.Error.IOError,                       EIO
-org.freedesktop.DBus.Error.BadAddress,                    EADDRNOTAVAIL
-org.freedesktop.DBus.Error.NotSupported,                  ENOTSUP
-org.freedesktop.DBus.Error.LimitsExceeded,                ENOBUFS
-org.freedesktop.DBus.Error.AccessDenied,                  EACCES
-org.freedesktop.DBus.Error.AuthFailed,                    EACCES
-org.freedesktop.DBus.Error.NoServer,                      EHOSTDOWN
-org.freedesktop.DBus.Error.Timeout,                       ETIMEDOUT
-org.freedesktop.DBus.Error.NoNetwork,                     ENONET
-org.freedesktop.DBus.Error.AddressInUse,                  EADDRINUSE
-org.freedesktop.DBus.Error.Disconnected,                  ECONNRESET
-org.freedesktop.DBus.Error.InvalidArgs,                   EINVAL
-org.freedesktop.DBus.Error.FileNotFound,                  ENOENT
-org.freedesktop.DBus.Error.FileExists,                    EEXIST
-org.freedesktop.DBus.Error.UnknownMethod,                 EBADR
-org.freedesktop.DBus.Error.UnknownObject,                 EBADR
-org.freedesktop.DBus.Error.UnknownInterface,              EBADR
-org.freedesktop.DBus.Error.UnknownProperty,               EBADR
-org.freedesktop.DBus.Error.PropertyReadOnly,              EROFS
-org.freedesktop.DBus.Error.UnixProcessIdUnknown,          ESRCH
-org.freedesktop.DBus.Error.InvalidSignature,              EINVAL
-org.freedesktop.DBus.Error.InconsistentMessage,           EBADMSG
+org.freedesktop.DBus.Error.Failed,                          EACCES
+org.freedesktop.DBus.Error.NoMemory,                        ENOMEM
+org.freedesktop.DBus.Error.ServiceUnknown,                  EHOSTUNREACH
+org.freedesktop.DBus.Error.NameHasNoOwner,                  ENXIO
+org.freedesktop.DBus.Error.NoReply,                         ETIMEDOUT
+org.freedesktop.DBus.Error.IOError,                         EIO
+org.freedesktop.DBus.Error.BadAddress,                      EADDRNOTAVAIL
+org.freedesktop.DBus.Error.NotSupported,                    ENOTSUP
+org.freedesktop.DBus.Error.LimitsExceeded,                  ENOBUFS
+org.freedesktop.DBus.Error.AccessDenied,                    EACCES
+org.freedesktop.DBus.Error.AuthFailed,                      EACCES
+org.freedesktop.DBus.Error.InteractiveAuthorizationRequired EACCES
+org.freedesktop.DBus.Error.NoServer,                        EHOSTDOWN
+org.freedesktop.DBus.Error.Timeout,                         ETIMEDOUT
+org.freedesktop.DBus.Error.NoNetwork,                       ENONET
+org.freedesktop.DBus.Error.AddressInUse,                    EADDRINUSE
+org.freedesktop.DBus.Error.Disconnected,                    ECONNRESET
+org.freedesktop.DBus.Error.InvalidArgs,                     EINVAL
+org.freedesktop.DBus.Error.FileNotFound,                    ENOENT
+org.freedesktop.DBus.Error.FileExists,                      EEXIST
+org.freedesktop.DBus.Error.UnknownMethod,                   EBADR
+org.freedesktop.DBus.Error.UnknownObject,                   EBADR
+org.freedesktop.DBus.Error.UnknownInterface,                EBADR
+org.freedesktop.DBus.Error.UnknownProperty,                 EBADR
+org.freedesktop.DBus.Error.PropertyReadOnly,                EROFS
+org.freedesktop.DBus.Error.UnixProcessIdUnknown,            ESRCH
+org.freedesktop.DBus.Error.InvalidSignature,                EINVAL
+org.freedesktop.DBus.Error.InconsistentMessage,             EBADMSG
 #
-org.freedesktop.DBus.Error.TimedOut,                      ETIMEDOUT
-org.freedesktop.DBus.Error.MatchRuleInvalid,              EINVAL
-org.freedesktop.DBus.Error.InvalidFileContent,            EINVAL
-org.freedesktop.DBus.Error.MatchRuleNotFound,             ENOENT
-org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown, ESRCH
-org.freedesktop.DBus.Error.ObjectPathInUse,               EBUSY
+org.freedesktop.DBus.Error.TimedOut,                        ETIMEDOUT
+org.freedesktop.DBus.Error.MatchRuleInvalid,                EINVAL
+org.freedesktop.DBus.Error.InvalidFileContent,              EINVAL
+org.freedesktop.DBus.Error.MatchRuleNotFound,               ENOENT
+org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown,   ESRCH
+org.freedesktop.DBus.Error.ObjectPathInUse,                 EBUSY
index c2e41fb01676de2e7e79c7b4b9276af042a0e4f5..af83c12d53971cbcca81465ced712da0abf865b0 100644 (file)
@@ -194,8 +194,10 @@ int bus_error_setfv(sd_bus_error *e, const char *name, const char *format, va_li
                 return -ENOMEM;
         }
 
+        /* Of we hit OOM on formatting the pretty message, we ignore
+         * this, since we at least managed to write the error name */
         if (format)
-                vasprintf((char**) &e->message, format, ap);
+                (void) vasprintf((char**) &e->message, format, ap);
 
         e->_need_free = 1;
 
@@ -312,7 +314,7 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
                         continue;
                 }
 
-                if (!x || errno) {
+                if (errno) {
                         free(m);
                         return;
                 }
index d1183d69c430c42f744dce43c2c59e2272a65183..57247d7df986204759882f577fa24d13fd6689d1 100644 (file)
@@ -230,19 +230,14 @@ struct sd_bus {
 
         struct bus_match_node match_callbacks;
         Prioq *reply_callbacks_prioq;
-        Hashmap *reply_callbacks;
+        OrderedHashmap *reply_callbacks;
         LIST_HEAD(struct filter_callback, filter_callbacks);
 
         Hashmap *nodes;
         Hashmap *vtable_methods;
         Hashmap *vtable_properties;
 
-        union {
-                struct sockaddr sa;
-                struct sockaddr_un un;
-                struct sockaddr_in in;
-                struct sockaddr_in6 in6;
-        } sockaddr;
+        union sockaddr_union sockaddr;
         socklen_t sockaddr_size;
 
         char *kernel;
@@ -303,6 +298,8 @@ struct sd_bus {
 
         sd_bus_message *current_message;
         sd_bus_slot *current_slot;
+        sd_bus_message_handler_t current_handler;
+        void *current_userdata;
 
         sd_bus **default_bus_ptr;
         pid_t tid;
@@ -386,3 +383,5 @@ int bus_set_address_system_remote(sd_bus *b, const char *host);
 int bus_set_address_system_container(sd_bus *b, const char *machine);
 
 int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
+
+int bus_get_root_path(sd_bus *bus);
index f49fb5b3944bf9faae6f9d42803fa829ecb78f2b..032761474234cfecee05408d66c0d20413148751 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <fcntl.h>
 #include <malloc.h>
+#include <libgen.h>
 #include <sys/mman.h>
 #include <sys/prctl.h>
 
@@ -269,10 +270,15 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) {
         m->kdbus->cookie = (uint64_t) m->header->serial;
         m->kdbus->priority = m->priority;
 
-        if (m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
+        if (m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) {
                 m->kdbus->cookie_reply = m->reply_cookie;
-        else
-                m->kdbus->timeout_ns = m->timeout * NSEC_PER_USEC;
+        } else {
+                struct timespec now;
+
+                assert_se(clock_gettime(CLOCK_MONOTONIC_COARSE, &now) == 0);
+                m->kdbus->timeout_ns = now.tv_sec * NSEC_PER_SEC + now.tv_nsec +
+                                       m->timeout * NSEC_PER_USEC;
+        }
 
         d = m->kdbus->items;
 
@@ -331,6 +337,18 @@ fail:
         return r;
 }
 
+static void unset_memfds(struct sd_bus_message *m) {
+        struct bus_body_part *part;
+        unsigned i;
+
+        assert(m);
+
+        /* Make sure the memfds are not freed twice */
+        MESSAGE_FOREACH_PART(part, i, m)
+                if (part->memfd >= 0)
+                        part->memfd = -1;
+}
+
 static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
         sd_bus_message *m = NULL;
         struct kdbus_item *d;
@@ -542,11 +560,9 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
                         m->creds.cgroup = d->str;
                         m->creds.mask |= (SD_BUS_CREDS_CGROUP|SD_BUS_CREDS_UNIT|SD_BUS_CREDS_USER_UNIT|SD_BUS_CREDS_SLICE|SD_BUS_CREDS_SESSION|SD_BUS_CREDS_OWNER_UID) & bus->creds_mask;
 
-                        if (!bus->cgroup_root) {
-                                r = cg_get_root_path(&bus->cgroup_root);
-                                if (r < 0)
-                                        goto fail;
-                        }
+                        r = bus_get_root_path(bus);
+                        if (r < 0)
+                                goto fail;
 
                         m->creds.cgroup_root = bus->cgroup_root;
 
@@ -559,8 +575,8 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
                         break;
 
                 case KDBUS_ITEM_CAPS:
-                        m->creds.capability = d->data;
-                        m->creds.capability_size = l;
+                        m->creds.capability = (uint8_t *) d->caps.caps;
+                        m->creds.capability_size = d->size - offsetof(struct kdbus_item, caps.caps);
                         m->creds.mask |= (SD_BUS_CREDS_EFFECTIVE_CAPS|SD_BUS_CREDS_PERMITTED_CAPS|SD_BUS_CREDS_INHERITABLE_CAPS|SD_BUS_CREDS_BOUNDING_CAPS) & bus->creds_mask;
                         break;
 
@@ -628,17 +644,8 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
         return 1;
 
 fail:
-        if (m) {
-                struct bus_body_part *part;
-                unsigned i;
-
-                /* Make sure the memfds are not freed twice */
-                MESSAGE_FOREACH_PART(part, i, m)
-                        if (part->memfd >= 0)
-                                part->memfd = -1;
-
-                sd_bus_message_unref(m);
-        }
+        unset_memfds(m);
+        sd_bus_message_unref(m);
 
         return r;
 }
@@ -710,9 +717,9 @@ int bus_kernel_take_fd(sd_bus *b) {
                 sz += ALIGN8(offsetof(struct kdbus_item, str) + l + 1);
         }
 
-        hello = alloca0(sz);
+        hello = alloca0_align(sz, 8);
         hello->size = sz;
-        hello->conn_flags = b->hello_flags;
+        hello->flags = b->hello_flags;
         hello->attach_flags = b->attach_flags;
         hello->pool_size = KDBUS_POOL_SIZE;
 
@@ -749,10 +756,9 @@ int bus_kernel_take_fd(sd_bus *b) {
                 }
         }
 
-        /* The higher 32bit of both flags fields are considered
+        /* The higher 32bit of the bus_flags fields are considered
          * 'incompatible flags'. Refuse them all for now. */
-        if (hello->bus_flags > 0xFFFFFFFFULL ||
-            hello->conn_flags > 0xFFFFFFFFULL)
+        if (hello->bus_flags > 0xFFFFFFFFULL)
                 return -ENOTSUP;
 
         if (!bloom_validate_parameters((size_t) hello->bloom.size, (unsigned) hello->bloom.n_hash))
@@ -768,7 +774,7 @@ int bus_kernel_take_fd(sd_bus *b) {
 
         b->is_kernel = true;
         b->bus_client = true;
-        b->can_fds = !!(hello->conn_flags & KDBUS_HELLO_ACCEPT_FD);
+        b->can_fds = !!(hello->flags & KDBUS_HELLO_ACCEPT_FD);
         b->message_version = 2;
         b->message_endian = BUS_NATIVE_ENDIAN;
 
@@ -797,14 +803,14 @@ int bus_kernel_connect(sd_bus *b) {
 }
 
 static void close_kdbus_msg(sd_bus *bus, struct kdbus_msg *k) {
-        uint64_t off;
+        struct kdbus_cmd_free cmd;
         struct kdbus_item *d;
 
         assert(bus);
         assert(k);
 
-        off = (uint8_t *)k - (uint8_t *)bus->kdbus_buffer;
-        ioctl(bus->input_fd, KDBUS_CMD_FREE, &off);
+        cmd.flags = 0;
+        cmd.offset = (uint8_t *)k - (uint8_t *)bus->kdbus_buffer;
 
         KDBUS_ITEM_FOREACH(d, k, items) {
 
@@ -813,6 +819,8 @@ static void close_kdbus_msg(sd_bus *bus, struct kdbus_msg *k) {
                 else if (d->type == KDBUS_ITEM_PAYLOAD_MEMFD)
                         safe_close(d->memfd.fd);
         }
+
+        (void) ioctl(bus->input_fd, KDBUS_CMD_FREE, &cmd);
 }
 
 int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call) {
@@ -951,19 +959,19 @@ static int translate_name_change(sd_bus *bus, struct kdbus_msg *k, struct kdbus_
         assert(k);
         assert(d);
 
-        if (d->type == KDBUS_ITEM_NAME_ADD || (d->name_change.old.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR)))
+        if (d->type == KDBUS_ITEM_NAME_ADD || (d->name_change.old_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR)))
                 old_owner[0] = 0;
         else
-                sprintf(old_owner, ":1.%llu", (unsigned long long) d->name_change.old.id);
+                sprintf(old_owner, ":1.%llu", (unsigned long long) d->name_change.old_id.id);
 
-        if (d->type == KDBUS_ITEM_NAME_REMOVE || (d->name_change.new.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR))) {
+        if (d->type == KDBUS_ITEM_NAME_REMOVE || (d->name_change.new_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR))) {
 
                 if (isempty(old_owner))
                         return 0;
 
                 new_owner[0] = 0;
         } else
-                sprintf(new_owner, ":1.%llu", (unsigned long long) d->name_change.new.id);
+                sprintf(new_owner, ":1.%llu", (unsigned long long) d->name_change.new_id.id);
 
         return push_name_owner_changed(bus, d->name_change.name, old_owner, new_owner);
 }
@@ -1111,9 +1119,6 @@ int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_t *al
 
         if (bus->n_memfd_cache <= 0) {
                 _cleanup_free_ char *g = NULL;
-                struct kdbus_cmd_memfd_make *cmd;
-                struct kdbus_item *item;
-                size_t l, sz;
                 int r;
 
                 assert_se(pthread_mutex_unlock(&bus->memfd_cache_mutex) >= 0);
@@ -1124,26 +1129,14 @@ int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_t *al
                 if (!g)
                         return -ENOMEM;
 
-                l = strlen(g);
-                sz = ALIGN8(offsetof(struct kdbus_cmd_memfd_make, items)) +
-                        ALIGN8(offsetof(struct kdbus_item, str)) +
-                        l + 1;
-                cmd = alloca0(sz);
-                cmd->size = sz;
-
-                item = cmd->items;
-                item->size = ALIGN8(offsetof(struct kdbus_item, str)) + l + 1;
-                item->type = KDBUS_ITEM_MEMFD_NAME;
-                memcpy(item->str, g, l + 1);
-
-                r = ioctl(bus->input_fd, KDBUS_CMD_MEMFD_NEW, cmd);
+                r = memfd_create(g, MFD_ALLOW_SEALING);
                 if (r < 0)
                         return -errno;
 
                 *address = NULL;
                 *mapped = 0;
                 *allocated = 0;
-                return cmd->fd;
+                return r;
         }
 
         c = &bus->memfd_cache[--bus->n_memfd_cache];
@@ -1195,7 +1188,7 @@ void bus_kernel_push_memfd(sd_bus *bus, int fd, void *address, size_t mapped, si
 
         /* If overly long, let's return a bit to the OS */
         if (mapped > max_mapped) {
-                assert_se(ioctl(fd, KDBUS_CMD_MEMFD_SIZE_SET, &max_mapped) >= 0);
+                assert_se(ftruncate(fd, max_mapped) >= 0);
                 assert_se(munmap((uint8_t*) address + max_mapped, PAGE_ALIGN(mapped - max_mapped)) >= 0);
                 c->mapped = c->allocated = max_mapped;
         } else {
@@ -1241,8 +1234,11 @@ int kdbus_translate_attach_flags(uint64_t mask, uint64_t *kdbus_mask) {
         if (mask & (SD_BUS_CREDS_UID|SD_BUS_CREDS_GID|SD_BUS_CREDS_PID|SD_BUS_CREDS_PID_STARTTIME|SD_BUS_CREDS_TID))
                 m |= KDBUS_ATTACH_CREDS;
 
-        if (mask & (SD_BUS_CREDS_COMM|SD_BUS_CREDS_TID_COMM))
-                m |= KDBUS_ATTACH_COMM;
+        if (mask & SD_BUS_CREDS_COMM)
+                m |= KDBUS_ATTACH_PID_COMM;
+
+        if (mask & SD_BUS_CREDS_TID_COMM)
+                m |= KDBUS_ATTACH_TID_COMM;
 
         if (mask & SD_BUS_CREDS_EXE)
                 m |= KDBUS_ATTACH_EXE;
@@ -1284,10 +1280,11 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
         if (fd < 0)
                 return -errno;
 
-        make = alloca0(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
-                              offsetof(struct kdbus_item, data64) + sizeof(uint64_t) +
-                              offsetof(struct kdbus_item, str) +
-                              DECIMAL_STR_MAX(uid_t) + 1 + strlen(name) + 1));
+        make = alloca0_align(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
+                                    offsetof(struct kdbus_item, data64) + sizeof(uint64_t) +
+                                    offsetof(struct kdbus_item, str) +
+                                    DECIMAL_STR_MAX(uid_t) + 1 + strlen(name) + 1),
+                             8);
 
         make->size = offsetof(struct kdbus_cmd_make, items);
 
@@ -1317,13 +1314,6 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
                 return -errno;
         }
 
-        /* The higher 32bit of the flags field are considered
-         * 'incompatible flags'. Refuse them all for now. */
-        if (make->flags > 0xFFFFFFFFULL) {
-                safe_close(fd);
-                return -ENOTSUP;
-        }
-
         if (s) {
                 char *p;
 
@@ -1339,19 +1329,19 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
         return fd;
 }
 
-static int bus_kernel_translate_access(BusNamePolicyAccess access) {
+static int bus_kernel_translate_access(BusPolicyAccess access) {
         assert(access >= 0);
-        assert(access < _BUSNAME_POLICY_ACCESS_MAX);
+        assert(access < _BUS_POLICY_ACCESS_MAX);
 
         switch (access) {
 
-        case BUSNAME_POLICY_ACCESS_SEE:
+        case BUS_POLICY_ACCESS_SEE:
                 return KDBUS_POLICY_SEE;
 
-        case BUSNAME_POLICY_ACCESS_TALK:
+        case BUS_POLICY_ACCESS_TALK:
                 return KDBUS_POLICY_TALK;
 
-        case BUSNAME_POLICY_ACCESS_OWN:
+        case BUS_POLICY_ACCESS_OWN:
                 return KDBUS_POLICY_OWN;
 
         default:
@@ -1402,11 +1392,20 @@ static int bus_kernel_translate_policy(const BusNamePolicy *policy, struct kdbus
         return 0;
 }
 
-int bus_kernel_open_bus_fd(const char *bus) {
+int bus_kernel_open_bus_fd(const char *bus, char **path) {
         char *p;
         int fd;
+        size_t len;
 
-        p = alloca(strlen("/dev/kdbus/") + DECIMAL_STR_MAX(uid_t) + 1 + strlen(bus) + strlen("/bus") + 1);
+        len = strlen("/dev/kdbus/") + DECIMAL_STR_MAX(uid_t) + 1 + strlen(bus) + strlen("/bus") + 1;
+
+        if (path) {
+                p = malloc(len);
+                if (!p)
+                        return -ENOMEM;
+                *path = p;
+        } else
+                p = alloca(len);
         sprintf(p, "/dev/kdbus/" UID_FMT "-%s/bus", getuid(), bus);
 
         fd = open(p, O_RDWR|O_NOCTTY|O_CLOEXEC);
@@ -1416,13 +1415,101 @@ int bus_kernel_open_bus_fd(const char *bus) {
         return fd;
 }
 
+int bus_kernel_create_endpoint(const char *bus_name, const char *ep_name, char **ep_path) {
+        _cleanup_free_ char *path = NULL;
+        struct kdbus_cmd_make *make;
+        struct kdbus_item *n;
+        size_t size;
+        int fd;
+
+        fd = bus_kernel_open_bus_fd(bus_name, &path);
+        if (fd < 0)
+                return fd;
+
+        size = ALIGN8(offsetof(struct kdbus_cmd_make, items));
+        size += ALIGN8(offsetof(struct kdbus_item, str) + strlen(ep_name) + 1);
+
+        make = alloca0_align(size, 8);
+        make->size = size;
+        make->flags = KDBUS_MAKE_ACCESS_WORLD;
+
+        n = make->items;
+
+        n->type = KDBUS_ITEM_MAKE_NAME;
+        n->size = offsetof(struct kdbus_item, str) + strlen(ep_name) + 1;
+        strcpy(n->str, ep_name);
+
+        if (ioctl(fd, KDBUS_CMD_ENDPOINT_MAKE, make) < 0) {
+                safe_close(fd);
+                return -errno;
+        }
+
+        if (ep_path) {
+                char *p;
+
+                p = strjoin(dirname(path), "/", ep_name, NULL);
+                if (!p) {
+                        safe_close(fd);
+                        return -ENOMEM;
+                }
+
+                *ep_path = p;
+        }
+
+        return fd;
+}
+
+int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep) {
+
+        struct kdbus_cmd_update *update;
+        struct kdbus_item *n;
+        BusEndpointPolicy *po;
+        Iterator i;
+        size_t size;
+        int r;
+
+        size = ALIGN8(offsetof(struct kdbus_cmd_update, items));
+
+        HASHMAP_FOREACH(po, ep->policy_hash, i) {
+                size += ALIGN8(offsetof(struct kdbus_item, str) + strlen(po->name) + 1);
+                size += ALIGN8(offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access));
+        }
+
+        update = alloca0_align(size, 8);
+        update->size = size;
+
+        n = update->items;
+
+        HASHMAP_FOREACH(po, ep->policy_hash, i) {
+                n->type = KDBUS_ITEM_NAME;
+                n->size = offsetof(struct kdbus_item, str) + strlen(po->name) + 1;
+                strcpy(n->str, po->name);
+                n = KDBUS_ITEM_NEXT(n);
+
+                n->type = KDBUS_ITEM_POLICY_ACCESS;
+                n->size = offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access);
+
+                n->policy_access.type = KDBUS_POLICY_ACCESS_USER;
+                n->policy_access.access = bus_kernel_translate_access(po->access);
+                n->policy_access.id = uid;
+
+                n = KDBUS_ITEM_NEXT(n);
+        }
+
+        r = ioctl(fd, KDBUS_CMD_ENDPOINT_UPDATE, update);
+        if (r < 0)
+                return -errno;
+
+        return 0;
+}
+
 int bus_kernel_make_starter(
                 int fd,
                 const char *name,
                 bool activating,
                 bool accept_fd,
                 BusNamePolicy *policy,
-                BusNamePolicyAccess world_policy) {
+                BusPolicyAccess world_policy) {
 
         struct kdbus_cmd_hello *hello;
         struct kdbus_item *n;
@@ -1444,7 +1531,7 @@ int bus_kernel_make_starter(
                ALIGN8(offsetof(struct kdbus_item, str) + strlen(name) + 1) +
                policy_cnt * ALIGN8(offsetof(struct kdbus_item, policy_access) + sizeof(struct kdbus_policy_access));
 
-        hello = alloca0(size);
+        hello = alloca0_align(size, 8);
 
         n = hello->items;
         strcpy(n->str, name);
@@ -1471,7 +1558,7 @@ int bus_kernel_make_starter(
         }
 
         hello->size = size;
-        hello->conn_flags =
+        hello->flags =
                 (activating ? KDBUS_HELLO_ACTIVATOR : KDBUS_HELLO_POLICY_HOLDER) |
                 (accept_fd ? KDBUS_HELLO_ACCEPT_FD : 0);
         hello->pool_size = KDBUS_POOL_SIZE;
@@ -1480,10 +1567,9 @@ int bus_kernel_make_starter(
         if (ioctl(fd, KDBUS_CMD_HELLO, hello) < 0)
                 return -errno;
 
-        /* The higher 32bit of both flags fields are considered
+        /* The higher 32bit of the bus_flags fields are considered
          * 'incompatible flags'. Refuse them all for now. */
-        if (hello->bus_flags > 0xFFFFFFFFULL ||
-            hello->conn_flags > 0xFFFFFFFFULL)
+        if (hello->bus_flags > 0xFFFFFFFFULL)
                 return -ENOTSUP;
 
         if (!bloom_validate_parameters((size_t) hello->bloom.size, (unsigned) hello->bloom.n_hash))
@@ -1504,9 +1590,10 @@ int bus_kernel_create_domain(const char *name, char **s) {
         if (fd < 0)
                 return -errno;
 
-        make = alloca0(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
-                              offsetof(struct kdbus_item, str) +
-                              strlen(name) + 1));
+        make = alloca0_align(ALIGN8(offsetof(struct kdbus_cmd_make, items) +
+                                    offsetof(struct kdbus_item, str) +
+                                    strlen(name) + 1),
+                             8);
 
         n = make->items;
         strcpy(n->str, name);
@@ -1543,37 +1630,6 @@ int bus_kernel_create_domain(const char *name, char **s) {
         return fd;
 }
 
-int bus_kernel_create_monitor(const char *bus) {
-        struct kdbus_cmd_hello *hello;
-        int fd;
-
-        assert(bus);
-
-        fd = bus_kernel_open_bus_fd(bus);
-        if (fd < 0)
-                return fd;
-
-        hello = alloca0(sizeof(struct kdbus_cmd_hello));
-        hello->size = sizeof(struct kdbus_cmd_hello);
-        hello->conn_flags = KDBUS_HELLO_ACTIVATOR;
-        hello->pool_size = KDBUS_POOL_SIZE;
-
-        if (ioctl(fd, KDBUS_CMD_HELLO, hello) < 0) {
-                safe_close(fd);
-                return -errno;
-        }
-
-        /* The higher 32bit of both flags fields are considered
-         * 'incompatible flags'. Refuse them all for now. */
-        if (hello->bus_flags > 0xFFFFFFFFULL ||
-            hello->conn_flags > 0xFFFFFFFFULL) {
-                safe_close(fd);
-                return -ENOTSUP;
-        }
-
-        return fd;
-}
-
 int bus_kernel_try_close(sd_bus *bus) {
         assert(bus);
         assert(bus->is_kernel);
index 2fe2495a6ca1fcffc7e64a45a866a0da4680a749..f1d832a764598291b012a635ed1f6e2ec59b8992 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdbool.h>
 
 #include "busname.h"
+#include "bus-endpoint.h"
 #include "sd-bus.h"
 
 #define KDBUS_ITEM_NEXT(item) \
@@ -65,12 +66,14 @@ int bus_kernel_take_fd(sd_bus *b);
 int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call);
 int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority);
 
-int bus_kernel_open_bus_fd(const char *bus);
-int bus_kernel_make_starter(int fd, const char *name, bool activating, bool accept_fd, BusNamePolicy *policy, BusNamePolicyAccess world_policy);
+int bus_kernel_open_bus_fd(const char *bus, char **path);
+int bus_kernel_make_starter(int fd, const char *name, bool activating, bool accept_fd, BusNamePolicy *policy, BusPolicyAccess world_policy);
 
 int bus_kernel_create_bus(const char *name, bool world, char **s);
+int bus_kernel_create_endpoint(const char *bus_name, const char *ep_name, char **path);
 int bus_kernel_create_domain(const char *name, char **s);
-int bus_kernel_create_monitor(const char *bus);
+
+int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep);
 
 int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_t *allocated);
 void bus_kernel_push_memfd(sd_bus *bus, int fd, void *address, size_t mapped, size_t allocated);
index 9e0769caa63dc08e6fa36f5f3f2ecc1802c2b477..18afe0f12a0e96d585b8a29e81b3ff3a70cc01ec 100644 (file)
@@ -294,11 +294,17 @@ int bus_match_run(
                         sd_bus_slot *slot;
 
                         slot = container_of(node->leaf.callback, sd_bus_slot, match_callback);
-                        if (bus)
+                        if (bus) {
                                 bus->current_slot = sd_bus_slot_ref(slot);
+                                bus->current_handler = node->leaf.callback->callback;
+                                bus->current_userdata = slot->userdata;
+                        }
                         r = node->leaf.callback->callback(bus, m, slot->userdata, &error_buffer);
-                        if (bus)
+                        if (bus) {
+                                bus->current_userdata = NULL;
+                                bus->current_handler = NULL;
                                 bus->current_slot = sd_bus_slot_unref(slot);
+                        }
 
                         r = bus_maybe_reply_error(m, r, &error_buffer);
                         if (r != 0)
@@ -444,13 +450,13 @@ static int bus_match_add_compare_value(
                 where->child = c;
 
                 if (t == BUS_MATCH_MESSAGE_TYPE) {
-                        c->compare.children = hashmap_new(trivial_hash_func, trivial_compare_func);
+                        c->compare.children = hashmap_new(NULL);
                         if (!c->compare.children) {
                                 r = -ENOMEM;
                                 goto fail;
                         }
                 } else if (BUS_MATCH_CAN_HASH(t)) {
-                        c->compare.children = hashmap_new(string_hash_func, string_compare_func);
+                        c->compare.children = hashmap_new(&string_hash_ops);
                         if (!c->compare.children) {
                                 r = -ENOMEM;
                                 goto fail;
index 4768a1fa9e1e8c2cef2a40b8f0c5e6ef866b612f..1362a60f0869cb49a6f0fa16166a12b792f73571 100644 (file)
@@ -28,6 +28,7 @@
 #include "strv.h"
 #include "time-util.h"
 #include "cgroup-util.h"
+#include "memfd.h"
 
 #include "sd-bus.h"
 #include "bus-message.h"
@@ -126,16 +127,17 @@ static void message_free(sd_bus_message *m) {
 
         message_reset_parts(m);
 
-        if (m->free_kdbus)
-                free(m->kdbus);
-
         if (m->release_kdbus) {
-                uint64_t off;
+                struct kdbus_cmd_free cmd_free;
 
-                off = (uint8_t *)m->kdbus - (uint8_t *)m->bus->kdbus_buffer;
-                ioctl(m->bus->input_fd, KDBUS_CMD_FREE, &off);
+                cmd_free.flags = 0;
+                cmd_free.offset = (uint8_t *)m->kdbus - (uint8_t *)m->bus->kdbus_buffer;
+                (void) ioctl(m->bus->input_fd, KDBUS_CMD_FREE, &cmd_free);
         }
 
+        if (m->free_kdbus)
+                free(m->kdbus);
+
         sd_bus_unref(m->bus);
 
         if (m->free_fds) {
@@ -847,6 +849,13 @@ _public_ int sd_bus_message_get_auto_start(sd_bus_message *m) {
         return !(m->header->flags & BUS_MESSAGE_NO_AUTO_START);
 }
 
+_public_ int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m) {
+        assert_return(m, -EINVAL);
+
+        return m->header->type == SD_BUS_MESSAGE_METHOD_CALL &&
+                (m->header->flags & BUS_MESSAGE_ALLOW_INTERACTIVE_AUTHORIZATION);
+}
+
 _public_ const char *sd_bus_message_get_path(sd_bus_message *m) {
         assert_return(m, NULL);
 
@@ -997,6 +1006,18 @@ _public_ int sd_bus_message_set_auto_start(sd_bus_message *m, int b) {
         return 0;
 }
 
+_public_ int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *m, int b) {
+        assert_return(m, -EINVAL);
+        assert_return(!m->sealed, -EPERM);
+
+        if (b)
+                m->header->flags |= BUS_MESSAGE_ALLOW_INTERACTIVE_AUTHORIZATION;
+        else
+                m->header->flags &= ~BUS_MESSAGE_ALLOW_INTERACTIVE_AUTHORIZATION;
+
+        return 0;
+}
+
 static struct bus_container *message_get_container(sd_bus_message *m) {
         assert(m);
 
@@ -1076,7 +1097,7 @@ static int part_make_space(
                         uint64_t new_allocated;
 
                         new_allocated = PAGE_ALIGN(sz > 0 ? 2 * sz : 1);
-                        r = ioctl(part->memfd, KDBUS_CMD_MEMFD_SIZE_SET, &new_allocated);
+                        r = ftruncate(part->memfd, new_allocated);
                         if (r < 0) {
                                 m->poisoned = true;
                                 return -errno;
@@ -2527,7 +2548,7 @@ _public_ int sd_bus_message_append_array_iovec(
 
 _public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
                                                char type,
-                                               sd_memfd *memfd) {
+                                               int memfd) {
         _cleanup_close_ int copy_fd = -1;
         struct bus_body_part *part;
         ssize_t align, sz;
@@ -2537,7 +2558,7 @@ _public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
 
         if (!m)
                 return -EINVAL;
-        if (!memfd)
+        if (memfd < 0)
                 return -EINVAL;
         if (m->sealed)
                 return -EPERM;
@@ -2546,15 +2567,15 @@ _public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
         if (m->poisoned)
                 return -ESTALE;
 
-        r = sd_memfd_set_sealed(memfd, true);
+        r = memfd_set_sealed(memfd);
         if (r < 0)
                 return r;
 
-        copy_fd = sd_memfd_dup_fd(memfd);
+        copy_fd = dup(memfd);
         if (copy_fd < 0)
                 return copy_fd;
 
-        r = sd_memfd_get_size(memfd, &size);
+        r = memfd_get_size(memfd, &size);
         if (r < 0)
                 return r;
 
@@ -2593,7 +2614,7 @@ _public_ int sd_bus_message_append_array_memfd(sd_bus_message *m,
         return sd_bus_message_close_container(m);
 }
 
-_public_ int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd *memfd) {
+_public_ int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd) {
         _cleanup_close_ int copy_fd = -1;
         struct bus_body_part *part;
         struct bus_container *c;
@@ -2602,19 +2623,19 @@ _public_ int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd *mem
         int r;
 
         assert_return(m, -EINVAL);
-        assert_return(memfd, -EINVAL);
+        assert_return(memfd >= 0, -EINVAL);
         assert_return(!m->sealed, -EPERM);
         assert_return(!m->poisoned, -ESTALE);
 
-        r = sd_memfd_set_sealed(memfd, true);
+        r = memfd_set_sealed(memfd);
         if (r < 0)
                 return r;
 
-        copy_fd = sd_memfd_dup_fd(memfd);
+        copy_fd = dup(memfd);
         if (copy_fd < 0)
                 return copy_fd;
 
-        r = sd_memfd_get_size(memfd, &size);
+        r = memfd_get_size(memfd, &size);
         if (r < 0)
                 return r;
 
@@ -2799,11 +2820,11 @@ int bus_message_seal(sd_bus_message *m, uint64_t cookie, usec_t timeout) {
 
                                 /* Then, sync up real memfd size */
                                 sz = part->size;
-                                if (ioctl(part->memfd, KDBUS_CMD_MEMFD_SIZE_SET, &sz) < 0)
+                                if (ftruncate(part->memfd, sz) < 0)
                                         return -errno;
 
                                 /* Finally, try to seal */
-                                if (ioctl(part->memfd, KDBUS_CMD_MEMFD_SEAL_SET, 1) >= 0)
+                                if (fcntl(part->memfd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE) >= 0)
                                         part->sealed = true;
                         }
         }
@@ -2840,7 +2861,7 @@ int bus_body_part_map(struct bus_body_part *part) {
         psz = PAGE_ALIGN(part->size);
 
         if (part->memfd >= 0)
-                p = mmap(NULL, psz, PROT_READ, MAP_SHARED, part->memfd, 0);
+                p = mmap(NULL, psz, PROT_READ, MAP_PRIVATE, part->memfd, 0);
         else if (part->is_zero)
                 p = mmap(NULL, psz, PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
         else
@@ -5336,7 +5357,7 @@ int bus_header_message_size(struct bus_header *h, size_t *sum) {
 }
 
 _public_ int sd_bus_message_get_errno(sd_bus_message *m) {
-        assert_return(m, -EINVAL);
+        assert_return(m, EINVAL);
 
         if (m->header->type != SD_BUS_MESSAGE_METHOD_ERROR)
                 return 0;
index dbb04e5ec6505973af821fe8220c5a4c27a78494..0ab1119b583d679da2588e039903dce0c2c01bab 100644 (file)
@@ -51,7 +51,9 @@ static int node_vtable_get_userdata(
         u = s->userdata;
         if (c->find) {
                 bus->current_slot = sd_bus_slot_ref(s);
+                bus->current_userdata = u;
                 r = c->find(bus, path, c->interface, u, &u, error);
+                bus->current_userdata = NULL;
                 bus->current_slot = sd_bus_slot_unref(s);
 
                 if (r < 0)
@@ -123,7 +125,9 @@ static int add_enumerated_to_set(
                 slot = container_of(c, sd_bus_slot, node_enumerator);
 
                 bus->current_slot = sd_bus_slot_ref(slot);
+                bus->current_userdata = slot->userdata;
                 r = c->callback(bus, prefix, slot->userdata, &children, error);
+                bus->current_userdata = NULL;
                 bus->current_slot = sd_bus_slot_unref(slot);
 
                 if (r < 0)
@@ -221,7 +225,7 @@ static int get_child_nodes(
         assert(n);
         assert(_s);
 
-        s = set_new(string_hash_func, string_compare_func);
+        s = set_new(&string_hash_ops);
         if (!s)
                 return -ENOMEM;
 
@@ -273,7 +277,11 @@ static int node_callbacks_run(
                 slot = container_of(c, sd_bus_slot, node_callback);
 
                 bus->current_slot = sd_bus_slot_ref(slot);
+                bus->current_handler = c->callback;
+                bus->current_userdata = slot->userdata;
                 r = c->callback(bus, m, slot->userdata, &error_buffer);
+                bus->current_userdata = NULL;
+                bus->current_handler = NULL;
                 bus->current_slot = sd_bus_slot_unref(slot);
 
                 r = bus_maybe_reply_error(m, r, &error_buffer);
@@ -287,9 +295,7 @@ static int node_callbacks_run(
 #define CAPABILITY_SHIFT(x) (((x) >> __builtin_ctzll(_SD_BUS_VTABLE_CAPABILITY_MASK)) & 0xFFFF)
 
 static int check_access(sd_bus *bus, sd_bus_message *m, struct vtable_member *c, sd_bus_error *error) {
-        _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
         uint64_t cap;
-        uid_t uid;
         int r;
 
         assert(bus);
@@ -304,17 +310,6 @@ static int check_access(sd_bus *bus, sd_bus_message *m, struct vtable_member *c,
         if (c->vtable->flags & SD_BUS_VTABLE_UNPRIVILEGED)
                 return 0;
 
-        /* If we are not connected to kdbus we cannot retrieve the
-         * effective capability set without race. Since we need this
-         * for a security decision we cannot use racy data, hence
-         * don't request it. */
-        if (bus->is_kernel)
-                r = sd_bus_query_sender_creds(m, SD_BUS_CREDS_UID|SD_BUS_CREDS_EFFECTIVE_CAPS, &creds);
-        else
-                r = sd_bus_query_sender_creds(m, SD_BUS_CREDS_UID, &creds);
-        if (r < 0)
-                return r;
-
         /* Check have the caller has the requested capability
          * set. Note that the flags value contains the capability
          * number plus one, which we need to subtract here. We do this
@@ -328,16 +323,11 @@ static int check_access(sd_bus *bus, sd_bus_message *m, struct vtable_member *c,
         else
                 cap --;
 
-        r = sd_bus_creds_has_effective_cap(creds, cap);
+        r = sd_bus_query_sender_privilege(m, cap);
+        if (r < 0)
+                return r;
         if (r > 0)
-                return 1;
-
-        /* Caller has same UID as us, then let's grant access */
-        r = sd_bus_creds_get_uid(creds, &uid);
-        if (r >= 0) {
-                if (uid == getuid())
-                        return 1;
-        }
+                return 0;
 
         return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Access to %s.%s() not permitted.", c->interface, c->member);
 }
@@ -405,7 +395,11 @@ static int method_callbacks_run(
                 slot = container_of(c->parent, sd_bus_slot, node_vtable);
 
                 bus->current_slot = sd_bus_slot_ref(slot);
+                bus->current_handler = c->vtable->x.method.handler;
+                bus->current_userdata = u;
                 r = c->vtable->x.method.handler(bus, m, u, &error);
+                bus->current_userdata = NULL;
+                bus->current_handler = NULL;
                 bus->current_slot = sd_bus_slot_unref(slot);
 
                 return bus_maybe_reply_error(m, r, &error);
@@ -444,7 +438,9 @@ static int invoke_property_get(
         if (v->x.property.get) {
 
                 bus->current_slot = sd_bus_slot_ref(slot);
+                bus->current_userdata = userdata;
                 r = v->x.property.get(bus, path, interface, property, reply, userdata, error);
+                bus->current_userdata = NULL;
                 bus->current_slot = sd_bus_slot_unref(slot);
 
                 if (r < 0)
@@ -506,7 +502,9 @@ static int invoke_property_set(
         if (v->x.property.set) {
 
                 bus->current_slot = sd_bus_slot_ref(slot);
+                bus->current_userdata = userdata;
                 r = v->x.property.set(bus, path, interface, property, value, userdata, error);
+                bus->current_userdata = NULL;
                 bus->current_slot = sd_bus_slot_unref(slot);
 
                 if (r < 0)
@@ -822,20 +820,7 @@ static int property_get_all_callbacks_run(
         return 1;
 }
 
-static bool bus_node_with_object_manager(sd_bus *bus, struct node *n) {
-        assert(bus);
-        assert(n);
-
-        if (n->object_managers)
-                return true;
-
-        if (n->parent)
-                return bus_node_with_object_manager(bus, n->parent);
-
-        return false;
-}
-
-static bool bus_node_exists(
+static int bus_node_exists(
                 sd_bus *bus,
                 struct node *n,
                 const char *path,
@@ -843,6 +828,7 @@ static bool bus_node_exists(
 
         struct node_vtable *c;
         struct node_callback *k;
+        int r;
 
         assert(bus);
         assert(n);
@@ -851,11 +837,14 @@ static bool bus_node_exists(
         /* Tests if there's anything attached directly to this node
          * for the specified path */
 
+        if (!require_fallback && (n->enumerators || n->object_managers))
+                return true;
+
         LIST_FOREACH(callbacks, k, n->callbacks) {
                 if (require_fallback && !k->is_fallback)
                         continue;
 
-                return true;
+                return 1;
         }
 
         LIST_FOREACH(vtables, c, n->vtables) {
@@ -864,13 +853,14 @@ static bool bus_node_exists(
                 if (require_fallback && !c->is_fallback)
                         continue;
 
-                if (node_vtable_get_userdata(bus, path, c, NULL, &error) > 0)
-                        return true;
+                r = node_vtable_get_userdata(bus, path, c, NULL, &error);
+                if (r != 0)
+                        return r;
                 if (bus->nodes_modified)
-                        return false;
+                        return 0;
         }
 
-        return !require_fallback && (n->enumerators || n->object_managers);
+        return 0;
 }
 
 static int process_introspect(
@@ -904,7 +894,7 @@ static int process_introspect(
         if (r < 0)
                 return r;
 
-        r = introspect_write_default_interfaces(&intro, bus_node_with_object_manager(bus, n));
+        r = introspect_write_default_interfaces(&intro, !require_fallback && n->object_managers);
         if (r < 0)
                 return r;
 
@@ -953,12 +943,12 @@ static int process_introspect(
                 /* Nothing?, let's see if we exist at all, and if not
                  * refuse to do anything */
                 r = bus_node_exists(bus, n, m->path, require_fallback);
-                if (r < 0)
-                        return r;
-                if (bus->nodes_modified)
-                        return 0;
-                if (r == 0)
+                if (r <= 0)
                         goto finish;
+                if (bus->nodes_modified) {
+                        r = 0;
+                        goto finish;
+                }
         }
 
         *found_object = true;
@@ -1144,7 +1134,8 @@ static int process_get_managed_objects(
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
         _cleanup_set_free_free_ Set *s = NULL;
-        bool empty;
+        Iterator i;
+        char *path;
         int r;
 
         assert(bus);
@@ -1152,7 +1143,11 @@ static int process_get_managed_objects(
         assert(n);
         assert(found_object);
 
-        if (!bus_node_with_object_manager(bus, n))
+        /* Spec says, GetManagedObjects() is only implemented on the root of a
+         * sub-tree. Therefore, we require a registered object-manager on
+         * exactly the queried path, otherwise, we refuse to respond. */
+
+        if (require_fallback || !n->object_managers)
                 return 0;
 
         r = get_child_nodes(bus, m->path, n, &s, &error);
@@ -1169,42 +1164,13 @@ static int process_get_managed_objects(
         if (r < 0)
                 return r;
 
-        empty = set_isempty(s);
-        if (empty) {
-                struct node_vtable *c;
-
-                /* Hmm, so we have no children? Then let's check
-                 * whether we exist at all, i.e. whether at least one
-                 * vtable exists. */
-
-                LIST_FOREACH(vtables, c, n->vtables) {
-
-                        if (require_fallback && !c->is_fallback)
-                                continue;
-
-                        if (r < 0)
-                                return r;
-                        if (r == 0)
-                                continue;
-
-                        empty = false;
-                        break;
-                }
+        SET_FOREACH(path, s, i) {
+                r = object_manager_serialize_path_and_fallbacks(bus, reply, path, &error);
+                if (r < 0)
+                        return r;
 
-                if (empty)
+                if (bus->nodes_modified)
                         return 0;
-        } else {
-                Iterator i;
-                char *path;
-
-                SET_FOREACH(path, s, i) {
-                        r = object_manager_serialize_path_and_fallbacks(bus, reply, path, &error);
-                        if (r < 0)
-                                return r;
-
-                        if (bus->nodes_modified)
-                                return 0;
-                }
         }
 
         r = sd_bus_message_close_container(reply);
@@ -1332,6 +1298,8 @@ static int object_find_and_run(
                 r = bus_node_exists(bus, n, m->path, require_fallback);
                 if (r < 0)
                         return r;
+                if (bus->nodes_modified)
+                        return 0;
                 if (r > 0)
                         *found_object = true;
         }
@@ -1422,7 +1390,7 @@ static struct node *bus_node_allocate(sd_bus *bus, const char *path) {
         if (n)
                 return n;
 
-        r = hashmap_ensure_allocated(&bus->nodes, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&bus->nodes, &string_hash_ops);
         if (r < 0)
                 return NULL;
 
@@ -1592,6 +1560,11 @@ static int vtable_member_compare_func(const void *a, const void *b) {
         return strcmp(x->member, y->member);
 }
 
+static const struct hash_ops vtable_member_hash_ops = {
+        .hash = vtable_member_hash_func,
+        .compare = vtable_member_compare_func
+};
+
 static int add_object_vtable_internal(
                 sd_bus *bus,
                 sd_bus_slot **slot,
@@ -1620,11 +1593,11 @@ static int add_object_vtable_internal(
                       !streq(interface, "org.freedesktop.DBus.Peer") &&
                       !streq(interface, "org.freedesktop.DBus.ObjectManager"), -EINVAL);
 
-        r = hashmap_ensure_allocated(&bus->vtable_methods, vtable_member_hash_func, vtable_member_compare_func);
+        r = hashmap_ensure_allocated(&bus->vtable_methods, &vtable_member_hash_ops);
         if (r < 0)
                 return r;
 
-        r = hashmap_ensure_allocated(&bus->vtable_properties, vtable_member_hash_func, vtable_member_compare_func);
+        r = hashmap_ensure_allocated(&bus->vtable_properties, &vtable_member_hash_ops);
         if (r < 0)
                 return r;
 
index 5046d17a103fe217ad1b0cbe2628bb1080c1b321..75c6ded7285b7efaa14119310c093e8188d84b79 100644 (file)
@@ -21,6 +21,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <endian.h>
 
 /* Endianness */
 
@@ -41,7 +42,8 @@ enum {
 
 enum {
         BUS_MESSAGE_NO_REPLY_EXPECTED = 1,
-        BUS_MESSAGE_NO_AUTO_START = 2
+        BUS_MESSAGE_NO_AUTO_START = 2,
+        BUS_MESSAGE_ALLOW_INTERACTIVE_AUTHORIZATION = 4,
 };
 
 /* Header fields */
index 5e927511d5decc78039c620b516c338151998fc2..568a6ed60c340e3f93d59c96a66964c54f78970c 100644 (file)
@@ -75,7 +75,7 @@ void bus_slot_disconnect(sd_bus_slot *slot) {
         case BUS_REPLY_CALLBACK:
 
                 if (slot->reply_callback.cookie != 0)
-                        hashmap_remove(slot->bus->reply_callbacks, &slot->reply_callback.cookie);
+                        ordered_hashmap_remove(slot->bus->reply_callbacks, &slot->reply_callback.cookie);
 
                 if (slot->reply_callback.timeout != 0)
                         prioq_remove(slot->bus->reply_callbacks_prioq, &slot->reply_callback, &slot->reply_callback.prioq_idx);
@@ -245,3 +245,23 @@ _public_ sd_bus_message *sd_bus_slot_get_current_message(sd_bus_slot *slot) {
 
         return slot->bus->current_message;
 }
+
+_public_ sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot *slot) {
+        assert_return(slot, NULL);
+        assert_return(slot->type >= 0, NULL);
+
+        if (slot->bus->current_slot != slot)
+                return NULL;
+
+        return slot->bus->current_handler;
+}
+
+_public_ void* sd_bus_slot_get_current_userdata(sd_bus_slot *slot) {
+        assert_return(slot, NULL);
+        assert_return(slot->type >= 0, NULL);
+
+        if (slot->bus->current_slot != slot)
+                return NULL;
+
+        return slot->bus->current_userdata;
+}
index ffa2cf3d75afe21fc0bf1eb3920eaf3a632bc0e1..f3b593d2b80732f73d67d0df445e7bc471541f8a 100644 (file)
@@ -166,7 +166,7 @@ _public_ int sd_bus_track_add_name(sd_bus_track *track, const char *name) {
         assert_return(track, -EINVAL);
         assert_return(service_name_is_valid(name), -EINVAL);
 
-        r = hashmap_ensure_allocated(&track->names, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&track->names, &string_hash_ops);
         if (r < 0)
                 return r;
 
@@ -188,7 +188,7 @@ _public_ int sd_bus_track_add_name(sd_bus_track *track, const char *name) {
 
         /* Second, check if it is currently existing, or maybe
          * doesn't, or maybe disappeared already. */
-        r = sd_bus_get_owner(track->bus, n, 0, NULL);
+        r = sd_bus_get_name_creds(track->bus, n, 0, NULL);
         if (r < 0) {
                 hashmap_remove(track->names, n);
                 return r;
@@ -245,7 +245,7 @@ _public_ const char* sd_bus_track_first(sd_bus_track *track) {
                 return NULL;
 
         track->modified = false;
-        track->iterator = NULL;
+        track->iterator = ITERATOR_FIRST;
 
         hashmap_iterate(track->names, &track->iterator, (const void**) &n);
         return n;
index 2e423bbfdb31c6a979f8a8b038ef228c18954319..581e8d584112b8a15f1238fa47357017ce340c74 100644 (file)
@@ -29,6 +29,8 @@
 bool bus_type_is_valid(char c) _const_;
 bool bus_type_is_valid_in_signature(char c) _const_;
 bool bus_type_is_basic(char c) _const_;
+/* "trivial" is systemd's term for what the D-Bus Specification calls
+ * a "fixed type": that is, a basic type of fixed length */
 bool bus_type_is_trivial(char c) _const_;
 bool bus_type_is_container(char c) _const_;
 
index 6441c5b162da6279d1c22aeef6c8f34529987722..43acf5b9597774f55195c60be2d20705250a676c 100644 (file)
@@ -22,6 +22,8 @@
 #include <sys/socket.h>
 #include <sys/capability.h>
 
+#include "systemd/sd-daemon.h"
+
 #include "util.h"
 #include "strv.h"
 #include "macro.h"
@@ -128,11 +130,17 @@ int bus_event_loop_with_idle(
                         if (r == -EBUSY)
                                 continue;
 
+                        /* Fallback for dbus1 connections: we
+                         * unregister the name and wait for the
+                         * response to come through for it */
                         if (r == -ENOTSUP) {
-                                /* Fallback for dbus1 connections: we
-                                 * unregister the name and wait for
-                                 * the response to come through for
-                                 * it */
+
+                                /* Inform the service manager that we
+                                 * are going down, so that it will
+                                 * queue all further start requests,
+                                 * instead of assuming we are already
+                                 * running. */
+                                sd_notify(false, "STOPPING=1");
 
                                 r = bus_async_unregister_and_exit(e, bus, name);
                                 if (r < 0)
@@ -184,44 +192,41 @@ int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error) {
 }
 
 int bus_verify_polkit(
-                sd_bus *bus,
-                sd_bus_message *m,
+                sd_bus_message *call,
+                int capability,
                 const char *action,
                 bool interactive,
                 bool *_challenge,
                 sd_bus_error *e) {
 
-        _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
-        uid_t uid;
         int r;
 
-        assert(bus);
-        assert(m);
+        assert(call);
         assert(action);
 
-        r = sd_bus_query_sender_creds(m, SD_BUS_CREDS_UID, &creds);
+        r = sd_bus_query_sender_privilege(call, capability);
         if (r < 0)
                 return r;
-
-        r = sd_bus_creds_get_uid(creds, &uid);
-        if (r < 0)
-                return r;
-
-        if (uid == 0)
+        else if (r > 0)
                 return 1;
-
 #ifdef ENABLE_POLKIT
         else {
                 _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
-                int authorized = false, challenge = false;
+                int authorized = false, challenge = false, c;
                 const char *sender;
 
-                sender = sd_bus_message_get_sender(m);
+                sender = sd_bus_message_get_sender(call);
                 if (!sender)
                         return -EBADMSG;
 
+                c = sd_bus_message_get_allow_interactive_authorization(call);
+                if (c < 0)
+                        return c;
+                if (c > 0)
+                        interactive = true;
+
                 r = sd_bus_call_method(
-                                bus,
+                                call->bus,
                                 "org.freedesktop.PolicyKit1",
                                 "/org/freedesktop/PolicyKit1/Authority",
                                 "org.freedesktop.PolicyKit1.Authority",
@@ -232,7 +237,7 @@ int bus_verify_polkit(
                                 "system-bus-name", 1, "name", "s", sender,
                                 action,
                                 0,
-                                interactive ? 1 : 0,
+                                !!interactive,
                                 "");
 
                 if (r < 0) {
@@ -322,31 +327,29 @@ finish:
 #endif
 
 int bus_verify_polkit_async(
-                sd_bus *bus,
-                Hashmap **registry,
-                sd_bus_message *m,
+                sd_bus_message *call,
+                int capability,
                 const char *action,
                 bool interactive,
-                sd_bus_error *error,
-                sd_bus_message_handler_t callback,
-                void *userdata) {
+                Hashmap **registry,
+                sd_bus_error *error) {
 
 #ifdef ENABLE_POLKIT
         _cleanup_bus_message_unref_ sd_bus_message *pk = NULL;
         AsyncPolkitQuery *q;
         const char *sender;
+        sd_bus_message_handler_t callback;
+        void *userdata;
+        int c;
 #endif
-        _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
-        uid_t uid;
         int r;
 
-        assert(bus);
-        assert(registry);
-        assert(m);
+        assert(call);
         assert(action);
+        assert(registry);
 
 #ifdef ENABLE_POLKIT
-        q = hashmap_get(*registry, m);
+        q = hashmap_get(*registry, call);
         if (q) {
                 int authorized, challenge;
 
@@ -379,32 +382,45 @@ int bus_verify_polkit_async(
                 if (authorized)
                         return 1;
 
+                if (challenge)
+                        return sd_bus_error_set(error, SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED, "Interactive authentication required.");
+
                 return -EACCES;
         }
 #endif
 
-        r = sd_bus_query_sender_creds(m, SD_BUS_CREDS_UID, &creds);
-        if (r < 0)
-                return r;
-
-        r = sd_bus_creds_get_uid(creds, &uid);
+        r = sd_bus_query_sender_privilege(call, capability);
         if (r < 0)
                 return r;
-
-        if (uid == 0)
+        else if (r > 0)
                 return 1;
 
 #ifdef ENABLE_POLKIT
-        sender = sd_bus_message_get_sender(m);
+        if (sd_bus_get_current_message(call->bus) != call)
+                return -EINVAL;
+
+        callback = sd_bus_get_current_handler(call->bus);
+        if (!callback)
+                return -EINVAL;
+
+        userdata = sd_bus_get_current_userdata(call->bus);
+
+        sender = sd_bus_message_get_sender(call);
         if (!sender)
                 return -EBADMSG;
 
-        r = hashmap_ensure_allocated(registry, trivial_hash_func, trivial_compare_func);
+        c = sd_bus_message_get_allow_interactive_authorization(call);
+        if (c < 0)
+                return c;
+        if (c > 0)
+                interactive = true;
+
+        r = hashmap_ensure_allocated(registry, NULL);
         if (r < 0)
                 return r;
 
         r = sd_bus_message_new_method_call(
-                        bus,
+                        call->bus,
                         &pk,
                         "org.freedesktop.PolicyKit1",
                         "/org/freedesktop/PolicyKit1/Authority",
@@ -419,7 +435,7 @@ int bus_verify_polkit_async(
                         "system-bus-name", 1, "name", "s", sender,
                         action,
                         0,
-                        interactive ? 1 : 0,
+                        !!interactive,
                         NULL);
         if (r < 0)
                 return r;
@@ -428,11 +444,11 @@ int bus_verify_polkit_async(
         if (!q)
                 return -ENOMEM;
 
-        q->request = sd_bus_message_ref(m);
+        q->request = sd_bus_message_ref(call);
         q->callback = callback;
         q->userdata = userdata;
 
-        r = hashmap_put(*registry, m, q);
+        r = hashmap_put(*registry, call, q);
         if (r < 0) {
                 async_polkit_query_free(q);
                 return r;
@@ -440,7 +456,7 @@ int bus_verify_polkit_async(
 
         q->registry = *registry;
 
-        r = sd_bus_call_async(bus, &q->slot, pk, async_polkit_callback, q, 0);
+        r = sd_bus_call_async(call->bus, &q->slot, pk, async_polkit_callback, q, 0);
         if (r < 0) {
                 async_polkit_query_free(q);
                 return r;
@@ -452,7 +468,7 @@ int bus_verify_polkit_async(
         return -EACCES;
 }
 
-void bus_verify_polkit_async_registry_free(sd_bus *bus, Hashmap *registry) {
+void bus_verify_polkit_async_registry_free(Hashmap *registry) {
 #ifdef ENABLE_POLKIT
         AsyncPolkitQuery *q;
 
@@ -631,7 +647,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
         }
 
         case SD_BUS_TYPE_BOOLEAN: {
-                bool b;
+                int b;
 
                 r = sd_bus_message_read_basic(property, type, &b);
                 if (r < 0)
@@ -974,32 +990,17 @@ static int map_basic(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_
         return r;
 }
 
-int bus_map_all_properties(sd_bus *bus,
-                           const char *destination,
-                           const char *path,
-                           const struct bus_properties_map *map,
-                           void *userdata) {
-        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+int bus_message_map_all_properties(sd_bus *bus,
+                                   sd_bus_message *m,
+                                   const struct bus_properties_map *map,
+                                   void *userdata) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
         int r;
 
         assert(bus);
-        assert(destination);
-        assert(path);
+        assert(m);
         assert(map);
 
-        r = sd_bus_call_method(
-                        bus,
-                        destination,
-                        path,
-                        "org.freedesktop.DBus.Properties",
-                        "GetAll",
-                        &error,
-                        &m,
-                        "s", "");
-        if (r < 0)
-                return r;
-
         r = sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY, "{sv}");
         if (r < 0)
                 return r;
@@ -1052,7 +1053,70 @@ int bus_map_all_properties(sd_bus *bus,
                         return r;
         }
 
-        return r;
+        return sd_bus_message_exit_container(m);
+}
+
+int bus_message_map_properties_changed(sd_bus *bus,
+                                       sd_bus_message *m,
+                                       const struct bus_properties_map *map,
+                                       void *userdata) {
+        const char *member;
+        int r, invalidated, i;
+
+        assert(bus);
+        assert(m);
+        assert(map);
+
+        r = bus_message_map_all_properties(bus, m, map, userdata);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY, "s");
+        if (r < 0)
+                return r;
+
+        invalidated = 0;
+        while ((r = sd_bus_message_read_basic(m, SD_BUS_TYPE_STRING, &member)) > 0)
+                for (i = 0; map[i].member; i++)
+                        if (streq(map[i].member, member)) {
+                                ++invalidated;
+                                break;
+                        }
+
+        r = sd_bus_message_exit_container(m);
+        if (r < 0)
+                return r;
+
+        return invalidated;
+}
+
+int bus_map_all_properties(sd_bus *bus,
+                           const char *destination,
+                           const char *path,
+                           const struct bus_properties_map *map,
+                           void *userdata) {
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        int r;
+
+        assert(bus);
+        assert(destination);
+        assert(path);
+        assert(map);
+
+        r = sd_bus_call_method(
+                        bus,
+                        destination,
+                        path,
+                        "org.freedesktop.DBus.Properties",
+                        "GetAll",
+                        &error,
+                        &m,
+                        "s", "");
+        if (r < 0)
+                return r;
+
+        return bus_message_map_all_properties(bus, m, map, userdata);
 }
 
 int bus_open_transport(BusTransport transport, const char *host, bool user, sd_bus **bus) {
@@ -1186,12 +1250,12 @@ int bus_property_get_ulong(
 #endif
 
 int bus_log_parse_error(int r) {
-        log_error("Failed to parse message: %s", strerror(-r));
+        log_error("Failed to parse bus message: %s", strerror(-r));
         return r;
 }
 
 int bus_log_create_error(int r) {
-        log_error("Failed to create message: %s", strerror(-r));
+        log_error("Failed to create bus message: %s", strerror(-r));
         return r;
 }
 
@@ -1265,7 +1329,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
                         if (r < 0)
                                 return bus_log_create_error(r);
 
-                        r = sd_bus_message_append(m, "v", "t", (usec_t) -1);
+                        r = sd_bus_message_append(m, "v", "t", USEC_INFINITY);
 
                 } else if (endswith(eq, "%")) {
                         double percent;
index 0a3d5dd567637330fce5f6470e831a228d727a79..696daa1f0329fda3a348db4234e8e8d68201b942 100644 (file)
@@ -46,6 +46,14 @@ struct bus_properties_map {
 
 int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata);
 
+int bus_message_map_all_properties(sd_bus *bus,
+                                   sd_bus_message *m,
+                                   const struct bus_properties_map *map,
+                                   void *userdata);
+int bus_message_map_properties_changed(sd_bus *bus,
+                                       sd_bus_message *m,
+                                       const struct bus_properties_map *map,
+                                       void *userdata);
 int bus_map_all_properties(sd_bus *bus,
                            const char *destination,
                            const char *path,
@@ -62,10 +70,10 @@ int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error);
 
 int bus_check_peercred(sd_bus *c);
 
-int bus_verify_polkit(sd_bus *bus, sd_bus_message *m, const char *action, bool interactive, bool *_challenge, sd_bus_error *e);
+int bus_verify_polkit(sd_bus_message *call, int capability, const char *action, bool interactive, bool *_challenge, sd_bus_error *e);
 
-int bus_verify_polkit_async(sd_bus *bus, Hashmap **registry, sd_bus_message *m, const char *action, bool interactive, sd_bus_error *error, sd_bus_message_handler_t callback, void *userdata);
-void bus_verify_polkit_async_registry_free(sd_bus *bus, Hashmap *registry);
+int bus_verify_polkit_async(sd_bus_message *call, int capability, const char *action, bool interactive, Hashmap **registry, sd_bus_error *error);
+void bus_verify_polkit_async_registry_free(Hashmap *registry);
 
 int bus_open_system_systemd(sd_bus **_bus);
 int bus_open_user_systemd(sd_bus **_bus);
@@ -137,6 +145,14 @@ typedef struct UnitInfo {
 
 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u);
 
+static inline void sd_bus_close_unrefp(sd_bus **bus) {
+        if (*bus) {
+                sd_bus_flush(*bus);
+                sd_bus_close(*bus);
+                sd_bus_unref(*bus);
+        }
+}
+
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus*, sd_bus_unref);
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_slot*, sd_bus_slot_unref);
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message*, sd_bus_message_unref);
@@ -144,6 +160,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_creds*, sd_bus_creds_unref);
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_track*, sd_bus_track_unref);
 
 #define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp)
+#define _cleanup_bus_close_unref_ _cleanup_(sd_bus_close_unrefp)
 #define _cleanup_bus_slot_unref_ _cleanup_(sd_bus_slot_unrefp)
 #define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp)
 #define _cleanup_bus_creds_unref_ _cleanup_(sd_bus_creds_unrefp)
index 454504701141df862114d3908218025b6e7ed136..fdc275ce46d1291c70888010556528a816558396 100644 (file)
@@ -76,7 +76,7 @@ static int list_bus_names(sd_bus *bus, char **argv) {
 
         pager_open_if_enabled();
 
-        names = hashmap_new(string_hash_func, string_compare_func);
+        names = hashmap_new(&string_hash_ops);
         if (!names)
                 return log_oom();
 
@@ -142,7 +142,7 @@ static int list_bus_names(sd_bus *bus, char **argv) {
 
                 printf("%-*s", (int) max_i, *i);
 
-                r = sd_bus_get_owner(bus, *i,
+                r = sd_bus_get_name_creds(bus, *i,
                                      SD_BUS_CREDS_UID|SD_BUS_CREDS_PID|SD_BUS_CREDS_COMM|
                                      SD_BUS_CREDS_UNIQUE_NAME|SD_BUS_CREDS_UNIT|SD_BUS_CREDS_SESSION|
                                      SD_BUS_CREDS_CONNECTION_NAME, &creds);
@@ -210,7 +210,7 @@ static int list_bus_names(sd_bus *bus, char **argv) {
                         printf("          - -               -                -             -                         -          -                  ");
 
                 if (arg_show_machine) {
-                        r = sd_bus_get_owner_machine_id(bus, *i, &mid);
+                        r = sd_bus_get_name_machine_id(bus, *i, &mid);
                         if (r >= 0) {
                                 char m[SD_ID128_STRING_MAX];
                                 printf(" %s\n", sd_id128_to_string(mid, m));
@@ -306,7 +306,7 @@ static int status(sd_bus *bus, char *argv[]) {
 
         r = parse_pid(argv[1], &pid);
         if (r < 0)
-                r = sd_bus_get_owner(bus, argv[1], _SD_BUS_CREDS_ALL, &creds);
+                r = sd_bus_get_name_creds(bus, argv[1], _SD_BUS_CREDS_ALL, &creds);
         else
                 r = sd_bus_creds_new_from_pid(&creds, pid, _SD_BUS_CREDS_ALL);
 
@@ -320,7 +320,6 @@ static int status(sd_bus *bus, char *argv[]) {
 }
 
 static int help(void) {
-
         printf("%s [OPTIONS...] {COMMAND} ...\n\n"
                "Introspect the bus.\n\n"
                "  -h --help               Show this help\n"
@@ -341,8 +340,8 @@ static int help(void) {
                "  list                    List bus names\n"
                "  monitor [SERVICE...]    Show bus traffic\n"
                "  status NAME             Show name status\n"
-               "  help                    Show this help\n",
-               program_invocation_short_name);
+               "  help                    Show this help\n"
+               program_invocation_short_name);
 
         return 0;
 }
@@ -386,7 +385,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0)
 
                 switch (c) {
 
@@ -455,7 +454,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (!arg_unique && !arg_acquired && !arg_activatable)
                 arg_unique = arg_acquired = arg_activatable = true;
@@ -484,7 +482,7 @@ static int busctl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         log_parse_environment();
index e9f7d44bcb1a3a2236dc5f85000abf3a9fa34a26..2ebf405d7dfabcd4c5e3d07e84b8d898697f0506 100644 (file)
@@ -1,33 +1,22 @@
 /*
- * Copyright (C) 2013 Kay Sievers
- * Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- * Copyright (C) 2013 Linux Foundation
- * Copyright (C) 2013 Lennart Poettering
- * Copyright (C) 2013 Daniel Mack <daniel@zonque.org>
- *
  * kdbus is free software; you can redistribute it and/or modify it under
  * 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.
- *
- * "Everything should be made as simple as possible, but not simpler."
- *   -- Albert Einstein
  */
 
-#ifndef _KDBUS_H_
-#define _KDBUS_H_
+#ifndef _KDBUS_UAPI_H_
+#define _KDBUS_UAPI_H_
 
-#ifndef __KERNEL__
-#include <sys/ioctl.h>
-#include <sys/types.h>
+#include <linux/ioctl.h>
 #include <linux/types.h>
-#endif
 
 #define KDBUS_IOCTL_MAGIC              0x95
 #define KDBUS_SRC_ID_KERNEL            (0)
 #define KDBUS_DST_ID_NAME              (0)
 #define KDBUS_MATCH_ID_ANY             (~0ULL)
 #define KDBUS_DST_ID_BROADCAST         (~0ULL)
+#define KDBUS_FLAG_KERNEL              (1ULL << 63)
 
 /**
  * struct kdbus_notify_id_change - name registry change message
@@ -48,8 +37,8 @@ struct kdbus_notify_id_change {
 
 /**
  * struct kdbus_notify_name_change - name registry change message
- * @old:               ID and flags of former owner of a name
- * @new:               ID and flags of new owner of a name
+ * @old_id:            ID and flags of former owner of a name
+ * @new_id:            ID and flags of new owner of a name
  * @name:              Well-known name
  *
  * Sent from kernel to userspace when the owner or activator of
@@ -61,8 +50,8 @@ struct kdbus_notify_id_change {
  *   KDBUS_ITEM_NAME_CHANGE
  */
 struct kdbus_notify_name_change {
-       struct kdbus_notify_id_change old;
-       struct kdbus_notify_id_change new;
+       struct kdbus_notify_id_change old_id;
+       struct kdbus_notify_id_change new_id;
        char name[0];
 };
 
@@ -90,6 +79,21 @@ struct kdbus_creds {
        __u64 starttime;
 };
 
+/**
+ * struct kdbus_caps - process capabilities
+ * @last_cap:  Highest currently known capability bit
+ * @caps:      Variable number of 32-bit capabilities flags
+ *
+ * Contains a variable number of 32-bit capabilities flags.
+ *
+ * Attached to:
+ *   KDBUS_ITEM_CAPS
+ */
+struct kdbus_caps {
+       __u32 last_cap;
+       __u32 caps[0];
+};
+
 /**
  * struct kdbus_audit - audit information
  * @sessionid:         The audit session ID
@@ -121,12 +125,12 @@ struct kdbus_timestamp {
 /**
  * struct kdbus_vec - I/O vector for kdbus payload items
  * @size:              The size of the vector
- * @address:           Memory address for memory addresses
+ * @address:           Memory address of data buffer
  * @offset:            Offset in the in-message payload memory,
  *                     relative to the message head
  *
  * Attached to:
- *   KDBUS_ITEM_PAYLOAD_VEC
+ *   KDBUS_ITEM_PAYLOAD_VEC, KDBUS_ITEM_PAYLOAD_OFF
  */
 struct kdbus_vec {
        __u64 size;
@@ -160,7 +164,7 @@ struct kdbus_bloom_filter {
  * struct kdbus_memfd - a kdbus memfd
  * @size:              The memfd's size
  * @fd:                        The file descriptor number
- * @__pad:             Padding to ensure proper alignement and size
+ * @__pad:             Padding to ensure proper alignment and size
  *
  * Attached to:
  *   KDBUS_ITEM_PAYLOAD_MEMFD
@@ -215,7 +219,6 @@ struct kdbus_policy_access {
  *                             bloom filter
  * @KDBUS_ITEM_DST_NAME:       Destination's well-known name
  * @KDBUS_ITEM_MAKE_NAME:      Name of domain, bus, endpoint
- * @KDBUS_ITEM_MEMFD_NAME:     The human readable name of a memfd (debugging)
  * @KDBUS_ITEM_ATTACH_FLAGS:   Attach-flags, used for updating which metadata
  *                             a connection subscribes to
  * @_KDBUS_ITEM_ATTACH_BASE:   Start of metadata attach items
@@ -223,6 +226,7 @@ struct kdbus_policy_access {
  * @KDBUS_ITEM_ID:             Connection ID
  * @KDBUS_ITEM_TIMESTAMP:      Timestamp
  * @KDBUS_ITEM_CREDS:          Process credential
+ * @KDBUS_ITEM_AUXGROUPS:      Auxiliary process groups
  * @KDBUS_ITEM_PID_COMM:       Process ID "comm" identifier
  * @KDBUS_ITEM_TID_COMM:       Thread ID "comm" identifier
  * @KDBUS_ITEM_EXE:            The path of the executable
@@ -255,7 +259,6 @@ enum kdbus_item_type {
        KDBUS_ITEM_BLOOM_MASK,
        KDBUS_ITEM_DST_NAME,
        KDBUS_ITEM_MAKE_NAME,
-       KDBUS_ITEM_MEMFD_NAME,
        KDBUS_ITEM_ATTACH_FLAGS,
 
        _KDBUS_ITEM_ATTACH_BASE = 0x1000,
@@ -263,6 +266,7 @@ enum kdbus_item_type {
        KDBUS_ITEM_ID,
        KDBUS_ITEM_TIMESTAMP,
        KDBUS_ITEM_CREDS,
+       KDBUS_ITEM_AUXGROUPS,
        KDBUS_ITEM_PID_COMM,
        KDBUS_ITEM_TID_COMM,
        KDBUS_ITEM_EXE,
@@ -323,6 +327,7 @@ struct kdbus_item {
                struct kdbus_vec vec;
                struct kdbus_creds creds;
                struct kdbus_audit audit;
+               struct kdbus_caps caps;
                struct kdbus_timestamp timestamp;
                struct kdbus_name name;
                struct kdbus_bloom_parameter bloom_parameter;
@@ -356,9 +361,9 @@ struct kdbus_item {
  *                                     name is not currently active
  */
 enum kdbus_msg_flags {
-       KDBUS_MSG_FLAGS_EXPECT_REPLY    = 1 << 0,
-       KDBUS_MSG_FLAGS_SYNC_REPLY      = 1 << 1,
-       KDBUS_MSG_FLAGS_NO_AUTO_START   = 1 << 2,
+       KDBUS_MSG_FLAGS_EXPECT_REPLY    = 1ULL << 0,
+       KDBUS_MSG_FLAGS_SYNC_REPLY      = 1ULL << 1,
+       KDBUS_MSG_FLAGS_NO_AUTO_START   = 1ULL << 2,
 };
 
 /**
@@ -374,7 +379,8 @@ enum kdbus_payload_type {
 /**
  * struct kdbus_msg - the representation of a kdbus message
  * @size:              Total size of the message
- * @flags:             Message flags (KDBUS_MSG_FLAGS_*)
+ * @flags:             Message flags (KDBUS_MSG_FLAGS_*), userspace → kernel
+ * @kernel_flags:      Supported message flags, kernel → userspace
  * @priority:          Message queue priority value
  * @dst_id:            64-bit ID of the destination connection
  * @src_id:            64-bit ID of the source connection
@@ -384,7 +390,8 @@ enum kdbus_payload_type {
  * @timeout_ns:                The time to wait for a message reply from the peer.
  *                     If there is no reply, a kernel-generated message
  *                     with an attached KDBUS_ITEM_REPLY_TIMEOUT item
- *                     is sent to @src_id.
+ *                     is sent to @src_id. The timeout is expected in
+ *                     nanoseconds and as absolute CLOCK_MONOTONIC value.
  * @cookie_reply:      A reply to the requesting message with the same
  *                     cookie. The requesting connection can match its
  *                     request and the reply with this value
@@ -396,6 +403,7 @@ enum kdbus_payload_type {
 struct kdbus_msg {
        __u64 size;
        __u64 flags;
+       __u64 kernel_flags;
        __s64 priority;
        __u64 dst_id;
        __u64 src_id;
@@ -423,14 +431,15 @@ struct kdbus_msg {
  *                             the priority value is ignored.
  */
 enum kdbus_recv_flags {
-       KDBUS_RECV_PEEK         = 1 <<  0,
-       KDBUS_RECV_DROP         = 1 <<  1,
-       KDBUS_RECV_USE_PRIORITY = 1 <<  2,
+       KDBUS_RECV_PEEK         = 1ULL <<  0,
+       KDBUS_RECV_DROP         = 1ULL <<  1,
+       KDBUS_RECV_USE_PRIORITY = 1ULL <<  2,
 };
 
 /**
  * struct kdbus_cmd_recv - struct to de-queue a buffered message
- * @flags:             KDBUS_RECV_* flags
+ * @flags:             KDBUS_RECV_* flags, userspace → kernel
+ * @kernel_flags:      Supported KDBUS_RECV_* flags, kernel → userspace
  * @priority:          Minimum priority of the messages to de-queue. Lowest
  *                     values have the highest priority.
  * @offset:            Returned offset in the pool where the message is
@@ -441,10 +450,38 @@ enum kdbus_recv_flags {
  */
 struct kdbus_cmd_recv {
        __u64 flags;
+       __u64 kernel_flags;
        __s64 priority;
        __u64 offset;
 } __attribute__((aligned(8)));
 
+/**
+ * struct kdbus_cmd_cancel - struct to cancel a synchronously pending message
+ * @cookie             The cookie of the pending message
+ * @flags              Flags for the free command. Currently unused.
+ *
+ * This struct is used with the KDBUS_CMD_CANCEL ioctl.
+ */
+struct kdbus_cmd_cancel {
+       __u64 cookie;
+       __u64 flags;
+} __attribute__((aligned(8)));
+
+/**
+ * struct kdbus_cmd_free - struct to free a slice of memory in the pool
+ * @offset:            The offset of the memory slice, as returned by other
+ *                     ioctls
+ * @flags:             Flags for the free command, userspace → kernel
+ * @kernel_flags:      Supported flags of the free command, userspace → kernel
+ *
+ * This struct is used with the KDBUS_CMD_FREE ioctl.
+ */
+struct kdbus_cmd_free {
+       __u64 offset;
+       __u64 flags;
+       __u64 kernel_flags;
+} __attribute__((aligned(8)));
+
 /**
  * enum kdbus_policy_access_type - permissions of a policy record
  * @_KDBUS_POLICY_ACCESS_NULL: Uninitialized/invalid
@@ -475,31 +512,35 @@ enum kdbus_policy_type {
 
 /**
  * enum kdbus_hello_flags - flags for struct kdbus_cmd_hello
- * @KDBUS_HELLO_ACCEPT_FD:     The connection allows the receiving of
+ * @KDBUS_HELLO_ACCEPT_FD:     The connection allows the reception of
  *                             any passed file descriptors
  * @KDBUS_HELLO_ACTIVATOR:     Special-purpose connection which registers
  *                             a well-know name for a process to be started
  *                             when traffic arrives
  * @KDBUS_HELLO_POLICY_HOLDER: Special-purpose connection which registers
- *                             policy entries for one or multiple names. The
- *                             provided names are not activated, and are not
- *                             registered with the name database
+ *                             policy entries for a name. The provided name
+ *                             is not activated and not registered with the
+ *                             name database, it only allows unprivileged
+ *                             connections to aquire a name, talk or discover
+ *                             a service
  * @KDBUS_HELLO_MONITOR:       Special-purpose connection to monitor
  *                             bus traffic
  */
 enum kdbus_hello_flags {
-       KDBUS_HELLO_ACCEPT_FD           =  1 <<  0,
-       KDBUS_HELLO_ACTIVATOR           =  1 <<  1,
-       KDBUS_HELLO_POLICY_HOLDER       =  1 <<  2,
-       KDBUS_HELLO_MONITOR             =  1 <<  3,
+       KDBUS_HELLO_ACCEPT_FD           =  1ULL <<  0,
+       KDBUS_HELLO_ACTIVATOR           =  1ULL <<  1,
+       KDBUS_HELLO_POLICY_HOLDER       =  1ULL <<  2,
+       KDBUS_HELLO_MONITOR             =  1ULL <<  3,
 };
 
 /**
  * enum kdbus_attach_flags - flags for metadata attachments
  * @KDBUS_ATTACH_TIMESTAMP:    Timestamp
  * @KDBUS_ATTACH_CREDS:                Credentials
+ * @KDBUS_ATTACH_AUXGROUPS:    Auxiliary groups
  * @KDBUS_ATTACH_NAMES:                Well-known names
- * @KDBUS_ATTACH_COMM:         The "comm" process identifier
+ * @KDBUS_ATTACH_COMM_TID:     The "comm" process identifier of the TID
+ * @KDBUS_ATTACH_COMM_PID:     The "comm" process identifier of the PID
  * @KDBUS_ATTACH_EXE:          The path of the executable
  * @KDBUS_ATTACH_CMDLINE:      The process command line
  * @KDBUS_ATTACH_CGROUP:       The croup membership
@@ -510,25 +551,27 @@ enum kdbus_hello_flags {
  * @_KDBUS_ATTACH_ALL:         All of the above
  */
 enum kdbus_attach_flags {
-       KDBUS_ATTACH_TIMESTAMP          =  1 <<  0,
-       KDBUS_ATTACH_CREDS              =  1 <<  1,
-       KDBUS_ATTACH_NAMES              =  1 <<  2,
-       KDBUS_ATTACH_COMM               =  1 <<  3,
-       KDBUS_ATTACH_EXE                =  1 <<  4,
-       KDBUS_ATTACH_CMDLINE            =  1 <<  5,
-       KDBUS_ATTACH_CGROUP             =  1 <<  6,
-       KDBUS_ATTACH_CAPS               =  1 <<  7,
-       KDBUS_ATTACH_SECLABEL           =  1 <<  8,
-       KDBUS_ATTACH_AUDIT              =  1 <<  9,
-       KDBUS_ATTACH_CONN_NAME          =  1 << 10,
-       _KDBUS_ATTACH_ALL               =  (1 << 11) - 1,
+       KDBUS_ATTACH_TIMESTAMP          =  1ULL <<  0,
+       KDBUS_ATTACH_CREDS              =  1ULL <<  1,
+       KDBUS_ATTACH_AUXGROUPS          =  1ULL <<  2,
+       KDBUS_ATTACH_NAMES              =  1ULL <<  3,
+       KDBUS_ATTACH_TID_COMM           =  1ULL <<  4,
+       KDBUS_ATTACH_PID_COMM           =  1ULL <<  5,
+       KDBUS_ATTACH_EXE                =  1ULL <<  6,
+       KDBUS_ATTACH_CMDLINE            =  1ULL <<  7,
+       KDBUS_ATTACH_CGROUP             =  1ULL <<  8,
+       KDBUS_ATTACH_CAPS               =  1ULL <<  9,
+       KDBUS_ATTACH_SECLABEL           =  1ULL << 10,
+       KDBUS_ATTACH_AUDIT              =  1ULL << 11,
+       KDBUS_ATTACH_CONN_NAME          =  1ULL << 12,
+       _KDBUS_ATTACH_ALL               =  (1ULL << 13) - 1,
 };
 
 /**
  * struct kdbus_cmd_hello - struct to say hello to kdbus
  * @size:              The total size of the structure
- * @conn_flags:                Connection flags (KDBUS_HELLO_*). The kernel will
- *                     return its capabilities in that field.
+ * @flags:             Connection flags (KDBUS_HELLO_*), userspace → kernel
+ * @kernel_flags:      Supported connection flags, kernel → userspace
  * @attach_flags:      Mask of metadata to attach to each message sent
  *                     (KDBUS_ATTACH_*)
  * @bus_flags:         The flags field copied verbatim from the original
@@ -547,7 +590,8 @@ enum kdbus_attach_flags {
  */
 struct kdbus_cmd_hello {
        __u64 size;
-       __u64 conn_flags;
+       __u64 flags;
+       __u64 kernel_flags;
        __u64 attach_flags;
        __u64 bus_flags;
        __u64 id;
@@ -563,22 +607,25 @@ struct kdbus_cmd_hello {
  * @KDBUS_MAKE_ACCESS_WORLD:   Make the device node world-accessible
  */
 enum kdbus_make_flags {
-       KDBUS_MAKE_ACCESS_GROUP         = 1 <<  0,
-       KDBUS_MAKE_ACCESS_WORLD         = 1 <<  1,
+       KDBUS_MAKE_ACCESS_GROUP         = 1ULL <<  0,
+       KDBUS_MAKE_ACCESS_WORLD         = 1ULL <<  1,
 };
 
 /**
  * struct kdbus_cmd_make - struct to make a bus, an endpoint or a domain
  * @size:              The total size of the struct
- * @flags:             Properties for the bus/ep/domain to create
+ * @flags:             Properties for the bus/ep/domain to create,
+ *                     userspace → kernel
+ * @kernel_flags:      Supported flags for the used command, kernel → userspace
  * @items:             Items describing details
  *
- * This structure is used with the KDBUS_CMD_BUS_MAKE, KDBUS_CMD_EP_MAKE and
- * KDBUS_CMD_DOMAIN_MAKE ioctls.
+ * This structure is used with the KDBUS_CMD_BUS_MAKE, KDBUS_CMD_ENDPOINT_MAKE
+ * and KDBUS_CMD_DOMAIN_MAKE ioctls.
  */
 struct kdbus_cmd_make {
        __u64 size;
        __u64 flags;
+       __u64 kernel_flags;
        struct kdbus_item items[0];
 } __attribute__((aligned(8)));
 
@@ -591,31 +638,48 @@ struct kdbus_cmd_make {
  * @KDBUS_NAME_ACTIVATOR:              Name is owned by a activator connection
  */
 enum kdbus_name_flags {
-       KDBUS_NAME_REPLACE_EXISTING     = 1 <<  0,
-       KDBUS_NAME_ALLOW_REPLACEMENT    = 1 <<  1,
-       KDBUS_NAME_QUEUE                = 1 <<  2,
-       KDBUS_NAME_IN_QUEUE             = 1 <<  3,
-       KDBUS_NAME_ACTIVATOR            = 1 <<  4,
+       KDBUS_NAME_REPLACE_EXISTING     = 1ULL <<  0,
+       KDBUS_NAME_ALLOW_REPLACEMENT    = 1ULL <<  1,
+       KDBUS_NAME_QUEUE                = 1ULL <<  2,
+       KDBUS_NAME_IN_QUEUE             = 1ULL <<  3,
+       KDBUS_NAME_ACTIVATOR            = 1ULL <<  4,
 };
 
 /**
  * struct kdbus_cmd_name - struct to describe a well-known name
  * @size:              The total size of the struct
- * @flags:             Flags for a name entry (KDBUS_NAME_*)
- * @owner_id:          The current owner of the name. For requests,
- *                     privileged users may set this field to
- *                     (de)register names on behalf of other connections.
- * @conn_flags:                The flags of the owning connection (KDBUS_HELLO_*)
- * @name:              The well-known name
+ * @flags:             Flags for a name entry (KDBUS_NAME_*),
+ *                     userspace → kernel, kernel → userspace
+ * @kernel_flags:      Supported flags for a name entry, kernel → userspace
+ * @items:             Item list, containing the well-known name as
+ *                     KDBUS_ITEM_NAME
  *
  * This structure is used with the KDBUS_CMD_NAME_ACQUIRE ioctl.
  */
 struct kdbus_cmd_name {
        __u64 size;
        __u64 flags;
-       __u64 owner_id;
+       __u64 kernel_flags;
+       struct kdbus_item items[0];
+} __attribute__((aligned(8)));
+
+/**
+ * struct kdbus_name_info - struct to describe a well-known name
+ * @size:              The total size of the struct
+ * @flags:             Flags for a name entry (KDBUS_NAME_*),
+ * @conn_flags:                The flags of the owning connection (KDBUS_HELLO_*)
+ * @owner_id:          The current owner of the name
+ * @items:             Item list, containing the well-known name as
+ *                     KDBUS_ITEM_NAME
+ *
+ * This structure is used as return struct for the KDBUS_CMD_NAME_LIST ioctl.
+ */
+struct kdbus_name_info {
+       __u64 size;
+       __u64 flags;
        __u64 conn_flags;
-       char name[0];
+       __u64 owner_id;
+       struct kdbus_item items[0];
 } __attribute__((aligned(8)));
 
 /**
@@ -626,15 +690,17 @@ struct kdbus_cmd_name {
  * @KDBUS_NAME_LIST_QUEUED:    All queued-up names
  */
 enum kdbus_name_list_flags {
-       KDBUS_NAME_LIST_UNIQUE          = 1 <<  0,
-       KDBUS_NAME_LIST_NAMES           = 1 <<  1,
-       KDBUS_NAME_LIST_ACTIVATORS      = 1 <<  2,
-       KDBUS_NAME_LIST_QUEUED          = 1 <<  3,
+       KDBUS_NAME_LIST_UNIQUE          = 1ULL <<  0,
+       KDBUS_NAME_LIST_NAMES           = 1ULL <<  1,
+       KDBUS_NAME_LIST_ACTIVATORS      = 1ULL <<  2,
+       KDBUS_NAME_LIST_QUEUED          = 1ULL <<  3,
 };
 
 /**
  * struct kdbus_cmd_name_list - request a list of name entries
- * @flags:             Flags for the query (KDBUS_NAME_LIST_*)
+ * @flags:             Flags for the query (KDBUS_NAME_LIST_*),
+ *                     userspace → kernel
+ * @kernel_flags:      Supported flags for queries, kernel → userspace
  * @offset:            The returned offset in the caller's pool buffer.
  *                     The user must use KDBUS_CMD_FREE to free the
  *                     allocated memory.
@@ -643,6 +709,7 @@ enum kdbus_name_list_flags {
  */
 struct kdbus_cmd_name_list {
        __u64 flags;
+       __u64 kernel_flags;
        __u64 offset;
 } __attribute__((aligned(8)));
 
@@ -656,45 +723,48 @@ struct kdbus_cmd_name_list {
  */
 struct kdbus_name_list {
        __u64 size;
-       struct kdbus_cmd_name names[0];
+       struct kdbus_name_info names[0];
 };
 
 /**
- * struct kdbus_cmd_conn_info - struct used for KDBUS_CMD_CONN_INFO ioctl
+ * struct kdbus_cmd_info - struct used for KDBUS_CMD_CONN_INFO ioctl
  * @size:              The total size of the struct
- * @flags:             KDBUS_ATTACH_* flags
+ * @flags:             KDBUS_ATTACH_* flags, userspace → kernel
+ * @kernel_flags:      Supported KDBUS_ATTACH_* flags, kernel → userspace
  * @id:                        The 64-bit ID of the connection. If set to zero, passing
  *                     @name is required. kdbus will look up the name to
  *                     determine the ID in this case.
  * @offset:            Returned offset in the caller's pool buffer where the
- *                     kdbus_conn_info struct result is stored. The user must
+ *                     kdbus_info struct result is stored. The user must
  *                     use KDBUS_CMD_FREE to free the allocated memory.
- * @name:              The optional well-known name to look up. Only needed in
- *                     case @id is zero.
+ * @items:             The optional item list, containing the
+ *                     well-known name to look up as a KDBUS_ITEM_NAME.
+ *                     Only needed in case @id is zero.
  *
  * On success, the KDBUS_CMD_CONN_INFO ioctl will return 0 and @offset will
  * tell the user the offset in the connection pool buffer at which to find the
- * result in a struct kdbus_conn_info.
+ * result in a struct kdbus_info.
  */
-struct kdbus_cmd_conn_info {
+struct kdbus_cmd_info {
        __u64 size;
        __u64 flags;
+       __u64 kernel_flags;
        __u64 id;
        __u64 offset;
-       char name[0];
+       struct kdbus_item items[0];
 } __attribute__((aligned(8)));
 
 /**
- * struct kdbus_conn_info - information returned by KDBUS_CMD_CONN_INFO
+ * struct kdbus_info - information returned by KDBUS_CMD_*_INFO
  * @size:              The total size of the struct
- * @id:                        The connection's 64-bit ID
- * @flags:             The connection's flags
+ * @id:                        The connection's or bus' 64-bit ID
+ * @flags:             The connection's or bus' flags
  * @items:             A list of struct kdbus_item
  *
  * Note that the user is responsible for freeing the allocated memory with
  * the KDBUS_CMD_FREE ioctl.
  */
-struct kdbus_conn_info {
+struct kdbus_info {
        __u64 size;
        __u64 id;
        __u64 flags;
@@ -704,46 +774,47 @@ struct kdbus_conn_info {
 /**
  * struct kdbus_cmd_update - update flags of a connection
  * @size:              The total size of the struct
+ * @flags:             Flags for the update command, userspace → kernel
+ * @kernel_flags:      Supported flags for this command, kernel → userspace
  * @items:             A list of struct kdbus_item
  *
  * This struct is used with the KDBUS_CMD_CONN_UPDATE ioctl.
  */
 struct kdbus_cmd_update {
        __u64 size;
+       __u64 flags;
+       __u64 kernel_flags;
        struct kdbus_item items[0];
 } __attribute__((aligned(8)));
 
+/**
+ * enum kdbus_cmd_match_flags - flags to control the KDBUS_CMD_MATCH_ADD ioctl
+ * @KDBUS_MATCH_REPLACE:       If entries with the supplied cookie already
+ *                             exists, remove them before installing the new
+ *                             matches.
+ */
+enum kdbus_cmd_match_flags {
+       KDBUS_MATCH_REPLACE     = 1ULL <<  0,
+};
+
 /**
  * struct kdbus_cmd_match - struct to add or remove matches
  * @size:              The total size of the struct
  * @cookie:            Userspace supplied cookie. When removing, the cookie
  *                     identifies the match to remove
+ * @flags:             Flags for match command (KDBUS_MATCH_*),
+ *                     userspace → kernel
+ * @kernel_flags:      Supported flags of the used command, kernel → userspace
  * @items:             A list of items for additional information
  *
- * This structure is used with the KDBUS_CMD_ADD_MATCH and
- * KDBUS_CMD_REMOVE_MATCH ioctl.
+ * This structure is used with the KDBUS_CMD_MATCH_ADD and
+ * KDBUS_CMD_MATCH_REMOVE ioctl.
  */
 struct kdbus_cmd_match {
        __u64 size;
        __u64 cookie;
-       struct kdbus_item items[0];
-} __attribute__((aligned(8)));
-
-/**
- * struct kdbus_cmd_memfd_make - create a kdbus memfd
- * @size:              The total size of the struct
- * @file_size:         The initial file size
- * @fd:                        The returned file descriptor number
- * @__pad:             Padding to ensure proper alignement
- * @items:             A list of items for additional information
- *
- * This structure is used with the KDBUS_CMD_MEMFD_NEW ioctl.
- */
-struct kdbus_cmd_memfd_make {
-       __u64 size;
-       __u64 file_size;
-       int fd;
-       __u32 __pad;
+       __u64 flags;
+       __u64 kernel_flags;
        struct kdbus_item items[0];
 } __attribute__((aligned(8)));
 
@@ -756,18 +827,18 @@ struct kdbus_cmd_memfd_make {
  *                             is closed.
  * @KDBUS_CMD_DOMAIN_MAKE:     Similar to KDBUS_CMD_BUS_MAKE, but it creates a
  *                             new kdbus domain.
- * @KDBUS_CMD_EP_MAKE:         Creates a new named special endpoint to talk to
+ * @KDBUS_CMD_ENDPOINT_MAKE:   Creates a new named special endpoint to talk to
  *                             the bus. Such endpoints usually carry a more
  *                             restrictive policy and grant restricted access
  *                             to specific applications.
  * @KDBUS_CMD_HELLO:           By opening the bus device node a connection is
  *                             created. After a HELLO the opened connection
  *                             becomes an active peer on the bus.
- * @KDBUS_CMD_BYEBYE:          Disconnect a connection. If the connection's
- *                             message list is empty, the calls succeeds, and
- *                             the handle is rendered unusable. Otherwise,
- *                             -EAGAIN is returned without any further side-
- *                             effects.
+ * @KDBUS_CMD_BYEBYE:          Disconnect a connection. If there are no
+ *                             messages queued up in the connection's pool,
+ *                             the call succeeds, and the handle is rendered
+ *                             unusable. Otherwise, -EBUSY is returned without
+ *                             any further side-effects.
  * @KDBUS_CMD_MSG_SEND:                Send a message and pass data from userspace to
  *                             the kernel.
  * @KDBUS_CMD_MSG_RECV:                Receive a message from the kernel which is
@@ -792,44 +863,20 @@ struct kdbus_cmd_memfd_make {
  * @KDBUS_CMD_CONN_UPDATE:     Update the properties of a connection. Used to
  *                             update the metadata subscription mask and
  *                             policy.
- * @KDBUS_CMD_EP_UPDATE:       Update the properties of a custom enpoint. Used
+ * @KDBUS_CMD_BUS_CREATOR_INFO:        Retrieve information of the creator of the bus
+ *                             a connection is attached to.
+ * @KDBUS_CMD_ENDPOINT_UPDATE: Update the properties of a custom enpoint. Used
  *                             to update the policy.
  * @KDBUS_CMD_MATCH_ADD:       Install a match which broadcast messages should
  *                             be delivered to the connection.
  * @KDBUS_CMD_MATCH_REMOVE:    Remove a current match for broadcast messages.
- * @KDBUS_CMD_MEMFD_NEW:       Return a new file descriptor which provides an
- *                             anonymous shared memory file and which can be
- *                             used to pass around larger chunks of data.
- *                             Kdbus memfd files can be sealed, which allows
- *                             the receiver to trust the data it has received.
- *                             Kdbus memfd files expose only very limited
- *                             operations, they can be mmap()ed, seek()ed,
- *                             (p)read(v)() and (p)write(v)(); most other
- *                             common file operations are not implemented.
- *                             Special caution needs to be taken with
- *                             read(v)()/write(v)() on a shared file; the
- *                             underlying file position is always shared
- *                             between all users of the file and race against
- *                             each other, pread(v)()/pwrite(v)() avoid these
- *                             issues.
- * @KDBUS_CMD_MEMFD_SIZE_GET:  Return the size of the underlying file, which
- *                             changes with write().
- * @KDBUS_CMD_MEMFD_SIZE_SET:  Truncate the underlying file to the specified
- *                             size.
- * @KDBUS_CMD_MEMFD_SEAL_GET:  Return the state of the file sealing.
- * @KDBUS_CMD_MEMFD_SEAL_SET:  Seal or break a seal of the file. Only files
- *                             which are not shared with other processes and
- *                             which are currently not mapped can be sealed.
- *                             The current process needs to be the one and
- *                             single owner of the file, the sealing cannot
- *                             be changed as long as the file is shared.
  */
 enum kdbus_ioctl_type {
        KDBUS_CMD_BUS_MAKE =            _IOW(KDBUS_IOCTL_MAGIC, 0x00,
                                             struct kdbus_cmd_make),
        KDBUS_CMD_DOMAIN_MAKE =         _IOW(KDBUS_IOCTL_MAGIC, 0x10,
                                             struct kdbus_cmd_make),
-       KDBUS_CMD_EP_MAKE =             _IOW(KDBUS_IOCTL_MAGIC, 0x20,
+       KDBUS_CMD_ENDPOINT_MAKE =       _IOW(KDBUS_IOCTL_MAGIC, 0x20,
                                             struct kdbus_cmd_make),
 
        KDBUS_CMD_HELLO =               _IOWR(KDBUS_IOCTL_MAGIC, 0x30,
@@ -840,112 +887,32 @@ enum kdbus_ioctl_type {
                                              struct kdbus_msg),
        KDBUS_CMD_MSG_RECV =            _IOWR(KDBUS_IOCTL_MAGIC, 0x41,
                                              struct kdbus_cmd_recv),
-       KDBUS_CMD_MSG_CANCEL =          _IOW(KDBUS_IOCTL_MAGIC, 0x42, __u64 *),
-       KDBUS_CMD_FREE =                _IOW(KDBUS_IOCTL_MAGIC, 0x43, __u64 *),
+       KDBUS_CMD_MSG_CANCEL =          _IOW(KDBUS_IOCTL_MAGIC, 0x42,
+                                            struct kdbus_cmd_cancel),
+       KDBUS_CMD_FREE =                _IOW(KDBUS_IOCTL_MAGIC, 0x43,
+                                            struct kdbus_cmd_free),
 
        KDBUS_CMD_NAME_ACQUIRE =        _IOWR(KDBUS_IOCTL_MAGIC, 0x50,
                                              struct kdbus_cmd_name),
        KDBUS_CMD_NAME_RELEASE =        _IOW(KDBUS_IOCTL_MAGIC, 0x51,
                                             struct kdbus_cmd_name),
        KDBUS_CMD_NAME_LIST =           _IOWR(KDBUS_IOCTL_MAGIC, 0x52,
-                                            struct kdbus_cmd_name_list),
+                                             struct kdbus_cmd_name_list),
 
        KDBUS_CMD_CONN_INFO =           _IOWR(KDBUS_IOCTL_MAGIC, 0x60,
-                                             struct kdbus_cmd_conn_info),
+                                             struct kdbus_cmd_info),
        KDBUS_CMD_CONN_UPDATE =         _IOW(KDBUS_IOCTL_MAGIC, 0x61,
                                             struct kdbus_cmd_update),
+       KDBUS_CMD_BUS_CREATOR_INFO =    _IOWR(KDBUS_IOCTL_MAGIC, 0x62,
+                                             struct kdbus_cmd_info),
 
-       KDBUS_CMD_EP_UPDATE =           _IOW(KDBUS_IOCTL_MAGIC, 0x71,
+       KDBUS_CMD_ENDPOINT_UPDATE =     _IOW(KDBUS_IOCTL_MAGIC, 0x71,
                                             struct kdbus_cmd_update),
 
        KDBUS_CMD_MATCH_ADD =           _IOW(KDBUS_IOCTL_MAGIC, 0x80,
                                             struct kdbus_cmd_match),
        KDBUS_CMD_MATCH_REMOVE =        _IOW(KDBUS_IOCTL_MAGIC, 0x81,
                                             struct kdbus_cmd_match),
-
-       KDBUS_CMD_MEMFD_NEW =           _IOWR(KDBUS_IOCTL_MAGIC, 0xc0,
-                                             struct kdbus_cmd_memfd_make),
-       KDBUS_CMD_MEMFD_SIZE_GET =      _IOR(KDBUS_IOCTL_MAGIC, 0xc1, __u64 *),
-       KDBUS_CMD_MEMFD_SIZE_SET =      _IOW(KDBUS_IOCTL_MAGIC, 0xc2, __u64 *),
-       KDBUS_CMD_MEMFD_SEAL_GET =      _IOR(KDBUS_IOCTL_MAGIC, 0xc3, int *),
-       KDBUS_CMD_MEMFD_SEAL_SET =      _IO(KDBUS_IOCTL_MAGIC, 0xc4),
 };
 
-/*
- * errno - api error codes
- * @E2BIG:             A message contains too many records or items.
- * @EADDRINUSE:                A well-known bus name is already taken by another
- *                     connection.
- * @EADDRNOTAVAIL:     A message flagged not to activate a service, addressed
- *                     a service which is not currently running.
- * @EAGAIN:            No messages are queued at the moment.
- * @EALREADY:          A requested name is already owned by the connection,
- *                     a connection is already disconnected, memfd is already
- *                     sealed or has the requested size.
- * @EBADF:             File descriptors passed with the message are not valid.
- * @EBADFD:            A bus connection is in a corrupted state.
- * @EBADMSG:           Passed data contains a combination of conflicting or
- *                     inconsistent types.
- * @EBUSY:             The user tried to say BYEBYE to a connection, but the
- *                     connection had a non-empty message list.
- * @ECANCELED:         A synchronous message sending was cancelled.
- * @ECONNRESET:                A connection is shut down, no further operations are
- *                     possible.
- * @ECOMM:             A peer does not accept the file descriptors addressed
- *                     to it.
- * @EDESTADDRREQ:      The well-known bus name is required but missing.
- * @EDOM:              The size of data does not match the expectations. Used
- *                     for bloom bit field sizes.
- * @EEXIST:            A requested domain, bus or endpoint with the same
- *                     name already exists.  A specific data type, which is
- *                     only expected once, is provided multiple times.
- * @EFAULT:            The supplied memory could not be accessed, or the data
- *                     is not properly aligned.
- * @EINVAL:            The provided data does not match its type or other
- *                     expectations, like a string which is not NUL terminated,
- *                     or a string length that points behind the first
- *                     \0-byte in the string.
- * @EMEDIUMTYPE:       A file descriptor which is not a kdbus memfd was
- *                     refused to send as KDBUS_MSG_PAYLOAD_MEMFD.
- * @EMFILE:            Too many file descriptors have been supplied with a
- *                     message.
- *                     Too many connections or buses are created for a given
- *                     user.
- * @EMLINK:            Too many requests from this connection to other peers
- *                     are queued and waiting for a reply
- * @EMSGSIZE:          The supplied data is larger than the allowed maximum
- *                     size.
- * @ENAMETOOLONG:      The requested name is larger than the allowed maximum
- *                     size.
- * @ENOBUFS:           There is no space left for the submitted data to fit
- *                     into the receiver's pool.
- * @ENOENT:            The to be cancelled message was not found.
- * @ENOMEM:            Out of memory.
- * @ENOMSG:            The queue is not empty, but no message with a matching
- *                     priority is currently queued.
- * @ENOSYS:            The requested functionality is not available.
- * @ENOTTY:            An unknown ioctl command was received.
- * @ENOTUNIQ:          A specific data type was addressed to a broadcast
- *                     address, but only direct addresses support this kind of
- *                     data.
- * @ENXIO:             A unique address does not exist, or an offset in the
- *                     receiver's pool does not represent a queued message.
- * @EOPNOTSUPP:                The feature negotiation failed, a not supported feature
- *                     was requested, or an unknown item type was received.
- * @EPERM:             The policy prevented an operation. The requested
- *                     resource is owned by another entity.
- * @EPIPE:             When sending a message, a synchronous reply from the
- *                     receiving connection was expected but the connection
- *                     died before answering.
- * @ESHUTDOWN:         A domain, bus or endpoint is currently shutting down;
- *                     no further operations will be possible.
- * @ESRCH:             A requested well-known bus name is not found.
- * @ETIMEDOUT:         A synchronous wait for a message reply did not arrive
- *                     within the specified time frame.
- * @ETXTBSY:           A kdbus memfd file cannot be sealed or the seal removed,
- *                     because it is shared with other processes or still
- *                     mmap()ed.
- * @EXFULL:            The size limits in the pool are reached, no data of
- *                     the size tried to submit can be queued.
- */
-#endif
+#endif /* _KDBUS_UAPI_H_ */
index 28fc19e2cf2d7b935b35371f2955ca5e256a1d54..03ec6036fab17c864595760b9c87c9de173aba65 100644 (file)
@@ -139,9 +139,10 @@ static void bus_free(sd_bus *b) {
 
         bus_reset_queues(b);
 
-        hashmap_free_free(b->reply_callbacks);
+        ordered_hashmap_free_free(b->reply_callbacks);
         prioq_free(b->reply_callbacks_prioq);
 
+        assert(b->match_callbacks.type == BUS_MATCH_ROOT);
         bus_match_free(&b->match_callbacks);
 
         hashmap_free_free(b->vtable_methods);
@@ -349,8 +350,6 @@ static int hello_callback(sd_bus *bus, sd_bus_message *reply, void *userdata, sd
         assert(reply);
 
         r = sd_bus_message_get_errno(reply);
-        if (r < 0)
-                return r;
         if (r > 0)
                 return -r;
 
@@ -768,7 +767,7 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid)
         if (!machine)
                 return -EINVAL;
 
-        if (!filename_is_safe(machine))
+        if (!machine_name_is_valid(machine))
                 return -EINVAL;
 
         free(b->machine);
@@ -810,7 +809,7 @@ static int parse_container_kernel_address(sd_bus *b, const char **p, char **guid
         if (!machine)
                 return -EINVAL;
 
-        if (!filename_is_safe(machine))
+        if (!machine_name_is_valid(machine))
                 return -EINVAL;
 
         free(b->machine);
@@ -1158,13 +1157,13 @@ int bus_set_address_user(sd_bus *b) {
                         return -ENOMEM;
 
 #ifdef ENABLE_KDBUS
-                asprintf(&b->address, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT, getuid(), ee);
+                (void) asprintf(&b->address, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT, getuid(), ee);
 #else
-                asprintf(&b->address, UNIX_USER_BUS_FMT, ee);
+                (void) asprintf(&b->address, UNIX_USER_BUS_FMT, ee);
 #endif
         } else {
 #ifdef ENABLE_KDBUS
-                asprintf(&b->address, KERNEL_USER_BUS_FMT, getuid());
+                (void) asprintf(&b->address, KERNEL_USER_BUS_FMT, getuid());
 #else
                 return -ECONNREFUSED;
 #endif
@@ -1306,7 +1305,7 @@ _public_ int sd_bus_open_system_container(sd_bus **ret, const char *machine) {
 
         assert_return(machine, -EINVAL);
         assert_return(ret, -EINVAL);
-        assert_return(filename_is_safe(machine), -EINVAL);
+        assert_return(machine_name_is_valid(machine), -EINVAL);
 
         r = sd_bus_new(&bus);
         if (r < 0)
@@ -1756,7 +1755,7 @@ _public_ int sd_bus_call_async(
         if (!BUS_IS_OPEN(bus->state))
                 return -ENOTCONN;
 
-        r = hashmap_ensure_allocated(&bus->reply_callbacks, uint64_hash_func, uint64_compare_func);
+        r = ordered_hashmap_ensure_allocated(&bus->reply_callbacks, &uint64_hash_ops);
         if (r < 0)
                 return r;
 
@@ -1779,7 +1778,7 @@ _public_ int sd_bus_call_async(
         s->reply_callback.callback = callback;
 
         s->reply_callback.cookie = BUS_MESSAGE_COOKIE(m);
-        r = hashmap_put(bus->reply_callbacks, &s->reply_callback.cookie, &s->reply_callback);
+        r = ordered_hashmap_put(bus->reply_callbacks, &s->reply_callback.cookie, &s->reply_callback);
         if (r < 0) {
                 s->reply_callback.cookie = 0;
                 return r;
@@ -2093,7 +2092,7 @@ static int process_timeout(sd_bus *bus) {
         assert_se(prioq_pop(bus->reply_callbacks_prioq) == c);
         c->timeout = 0;
 
-        hashmap_remove(bus->reply_callbacks, &c->cookie);
+        ordered_hashmap_remove(bus->reply_callbacks, &c->cookie);
         c->cookie = 0;
 
         slot = container_of(c, sd_bus_slot, reply_callback);
@@ -2102,8 +2101,12 @@ static int process_timeout(sd_bus *bus) {
 
         bus->current_message = m;
         bus->current_slot = sd_bus_slot_ref(slot);
+        bus->current_handler = c->callback;
+        bus->current_userdata = slot->userdata;
         r = c->callback(bus, m, slot->userdata, &error_buffer);
-        bus->current_slot = sd_bus_slot_unref(slot);
+        bus->current_userdata = NULL;
+        bus->current_handler = NULL;
+        bus->current_slot = NULL;
         bus->current_message = NULL;
 
         if (slot->floating) {
@@ -2111,6 +2114,8 @@ static int process_timeout(sd_bus *bus) {
                 sd_bus_slot_unref(slot);
         }
 
+        sd_bus_slot_unref(slot);
+
         return bus_maybe_reply_error(m, r, &error_buffer);
 }
 
@@ -2156,7 +2161,7 @@ static int process_reply(sd_bus *bus, sd_bus_message *m) {
         if (m->destination && bus->unique_name && !streq_ptr(m->destination, bus->unique_name))
                 return 0;
 
-        c = hashmap_remove(bus->reply_callbacks, &m->reply_cookie);
+        c = ordered_hashmap_remove(bus->reply_callbacks, &m->reply_cookie);
         if (!c)
                 return 0;
 
@@ -2194,14 +2199,20 @@ static int process_reply(sd_bus *bus, sd_bus_message *m) {
         }
 
         bus->current_slot = sd_bus_slot_ref(slot);
+        bus->current_handler = c->callback;
+        bus->current_userdata = slot->userdata;
         r = c->callback(bus, m, slot->userdata, &error_buffer);
-        bus->current_slot = sd_bus_slot_unref(slot);
+        bus->current_userdata = NULL;
+        bus->current_handler = NULL;
+        bus->current_slot = NULL;
 
         if (slot->floating) {
                 bus_slot_disconnect(slot);
                 sd_bus_slot_unref(slot);
         }
 
+        sd_bus_slot_unref(slot);
+
         return bus_maybe_reply_error(m, r, &error_buffer);
 }
 
@@ -2235,7 +2246,11 @@ static int process_filter(sd_bus *bus, sd_bus_message *m) {
                         slot = container_of(l, sd_bus_slot, filter_callback);
 
                         bus->current_slot = sd_bus_slot_ref(slot);
+                        bus->current_handler = l->callback;
+                        bus->current_userdata = slot->userdata;
                         r = l->callback(bus, m, slot->userdata, &error_buffer);
+                        bus->current_userdata = NULL;
+                        bus->current_handler = NULL;
                         bus->current_slot = sd_bus_slot_unref(slot);
 
                         r = bus_maybe_reply_error(m, r, &error_buffer);
@@ -2480,7 +2495,7 @@ static int process_closing(sd_bus *bus, sd_bus_message **ret) {
         assert(bus);
         assert(bus->state == BUS_CLOSING);
 
-        c = hashmap_first(bus->reply_callbacks);
+        c = ordered_hashmap_first(bus->reply_callbacks);
         if (c) {
                 _cleanup_bus_error_free_ sd_bus_error error_buffer = SD_BUS_ERROR_NULL;
                 sd_bus_slot *slot;
@@ -2503,7 +2518,7 @@ static int process_closing(sd_bus *bus, sd_bus_message **ret) {
                         c->timeout = 0;
                 }
 
-                hashmap_remove(bus->reply_callbacks, &c->cookie);
+                ordered_hashmap_remove(bus->reply_callbacks, &c->cookie);
                 c->cookie = 0;
 
                 slot = container_of(c, sd_bus_slot, reply_callback);
@@ -2512,8 +2527,12 @@ static int process_closing(sd_bus *bus, sd_bus_message **ret) {
 
                 bus->current_message = m;
                 bus->current_slot = sd_bus_slot_ref(slot);
+                bus->current_handler = c->callback;
+                bus->current_userdata = slot->userdata;
                 r = c->callback(bus, m, slot->userdata, &error_buffer);
-                bus->current_slot = sd_bus_slot_unref(slot);
+                bus->current_userdata = NULL;
+                bus->current_handler = NULL;
+                bus->current_slot = NULL;
                 bus->current_message = NULL;
 
                 if (slot->floating) {
@@ -2521,6 +2540,8 @@ static int process_closing(sd_bus *bus, sd_bus_message **ret) {
                         sd_bus_slot_unref(slot);
                 }
 
+                sd_bus_slot_unref(slot);
+
                 return bus_maybe_reply_error(m, r, &error_buffer);
         }
 
@@ -2646,7 +2667,7 @@ static int bus_poll(sd_bus *bus, bool need_more, uint64_t timeout_usec) {
         struct pollfd p[2] = {};
         int r, e, n;
         struct timespec ts;
-        usec_t m = (usec_t) -1;
+        usec_t m = USEC_INFINITY;
 
         assert(bus);
 
@@ -2991,6 +3012,10 @@ static int attach_io_events(sd_bus *bus) {
                         return r;
 
                 r = sd_event_source_set_priority(bus->input_io_event_source, bus->event_priority);
+                if (r < 0)
+                        return r;
+
+                r = sd_event_source_set_name(bus->input_io_event_source, "bus-input");
         } else
                 r = sd_event_source_set_io_fd(bus->input_io_event_source, bus->input_fd);
 
@@ -3006,6 +3031,10 @@ static int attach_io_events(sd_bus *bus) {
                                 return r;
 
                         r = sd_event_source_set_priority(bus->output_io_event_source, bus->event_priority);
+                        if (r < 0)
+                                return r;
+
+                        r = sd_event_source_set_name(bus->input_io_event_source, "bus-output");
                 } else
                         r = sd_event_source_set_io_fd(bus->output_io_event_source, bus->output_fd);
 
@@ -3058,10 +3087,18 @@ _public_ int sd_bus_attach_event(sd_bus *bus, sd_event *event, int priority) {
         if (r < 0)
                 goto fail;
 
+        r = sd_event_source_set_name(bus->time_event_source, "bus-time");
+        if (r < 0)
+                goto fail;
+
         r = sd_event_add_exit(bus->event, &bus->quit_event_source, quit_callback, bus);
         if (r < 0)
                 goto fail;
 
+        r = sd_event_source_set_name(bus->quit_event_source, "bus-exit");
+        if (r < 0)
+                goto fail;
+
         r = attach_io_events(bus);
         if (r < 0)
                 goto fail;
@@ -3113,6 +3150,18 @@ _public_ sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus) {
         return bus->current_slot;
 }
 
+_public_ sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus) {
+        assert_return(bus, NULL);
+
+        return bus->current_handler;
+}
+
+_public_ void* sd_bus_get_current_userdata(sd_bus *bus) {
+        assert_return(bus, NULL);
+
+        return bus->current_userdata;
+}
+
 static int bus_default(int (*bus_open)(sd_bus **), sd_bus **default_bus, sd_bus **ret) {
         sd_bus *b = NULL;
         int r;
@@ -3247,55 +3296,6 @@ _public_ int sd_bus_path_decode(const char *path, const char *prefix, char **ext
         return 1;
 }
 
-_public_ int sd_bus_get_peer_creds(sd_bus *bus, uint64_t mask, sd_bus_creds **ret) {
-        sd_bus_creds *c;
-        pid_t pid = 0;
-        int r;
-
-        assert_return(bus, -EINVAL);
-        assert_return(mask <= _SD_BUS_CREDS_ALL, -ENOTSUP);
-        assert_return(ret, -EINVAL);
-        assert_return(!bus_pid_changed(bus), -ECHILD);
-
-        if (bus->is_kernel)
-                return -ENOTSUP;
-
-        if (!BUS_IS_OPEN(bus->state))
-                return -ENOTCONN;
-
-        if (!bus->ucred_valid && !isempty(bus->label))
-                return -ENODATA;
-
-        c = bus_creds_new();
-        if (!c)
-                return -ENOMEM;
-
-        if (bus->ucred_valid) {
-                pid = c->pid = bus->ucred.pid;
-                c->uid = bus->ucred.uid;
-                c->gid = bus->ucred.gid;
-
-                c->mask |= (SD_BUS_CREDS_UID | SD_BUS_CREDS_PID | SD_BUS_CREDS_GID) & mask;
-        }
-
-        if (!isempty(bus->label) && (mask & SD_BUS_CREDS_SELINUX_CONTEXT)) {
-                c->label = strdup(bus->label);
-                if (!c->label) {
-                        sd_bus_creds_unref(c);
-                        return -ENOMEM;
-                }
-
-                c->mask |= SD_BUS_CREDS_SELINUX_CONTEXT;
-        }
-
-        r = bus_creds_add_more(c, mask, pid, 0);
-        if (r < 0)
-                return r;
-
-        *ret = c;
-        return 0;
-}
-
 _public_ int sd_bus_try_close(sd_bus *bus) {
         int r;
 
@@ -3330,3 +3330,21 @@ _public_ int sd_bus_get_name(sd_bus *bus, const char **name) {
         *name = bus->connection_name;
         return 0;
 }
+
+int bus_get_root_path(sd_bus *bus) {
+        int r;
+
+        if (bus->cgroup_root)
+                return 0;
+
+        r = cg_get_root_path(&bus->cgroup_root);
+        if (r == -ENOENT) {
+                bus->cgroup_root = strdup("/");
+                if (!bus->cgroup_root)
+                        return -ENOMEM;
+
+                r = 0;
+        }
+
+        return r;
+}
diff --git a/src/libsystemd/sd-bus/sd-memfd.c b/src/libsystemd/sd-bus/sd-memfd.c
deleted file mode 100644 (file)
index fcf3e73..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2013 Lennart Poettering
-
-  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/>.
-***/
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/prctl.h>
-
-#include "util.h"
-#include "kdbus.h"
-#include "bus-label.h"
-
-#include "sd-memfd.h"
-#include "sd-bus.h"
-
-struct sd_memfd {
-        int fd;
-        FILE *f;
-};
-
-_public_ int sd_memfd_new(sd_memfd **m, const char *name) {
-
-        struct kdbus_cmd_memfd_make *cmd;
-        struct kdbus_item *item;
-        _cleanup_close_ int kdbus = -1;
-        _cleanup_free_ char *g = NULL;
-        size_t sz, l;
-        sd_memfd *n;
-
-        assert_return(m, -EINVAL);
-
-        kdbus = open("/dev/kdbus/control", O_RDWR|O_NOCTTY|O_CLOEXEC);
-        if (kdbus < 0)
-                return -errno;
-
-        if (name) {
-                /* The kernel side is pretty picky about the character
-                 * set here, let's do the usual bus escaping to deal
-                 * with that. */
-
-                g = bus_label_escape(name);
-                if (!g)
-                        return -ENOMEM;
-
-                name = g;
-
-        } else {
-                char pr[17] = {};
-
-                /* If no name is specified we generate one. We include
-                 * a hint indicating our library implementation, and
-                 * add the thread name to it */
-
-                assert_se(prctl(PR_GET_NAME, (unsigned long) pr) >= 0);
-
-                if (isempty(pr))
-                        name = "sd";
-                else {
-                        _cleanup_free_ char *e = NULL;
-
-                        e = bus_label_escape(pr);
-                        if (!e)
-                                return -ENOMEM;
-
-                        g = strappend("sd-", e);
-                        if (!g)
-                                return -ENOMEM;
-
-                        name = g;
-                }
-        }
-
-        l = strlen(name);
-        sz = ALIGN8(offsetof(struct kdbus_cmd_memfd_make, items)) +
-                ALIGN8(offsetof(struct kdbus_item, str)) +
-                l + 1;
-
-        cmd = alloca0(sz);
-        cmd->size = sz;
-
-        item = cmd->items;
-        item->size = ALIGN8(offsetof(struct kdbus_item, str)) + l + 1;
-        item->type = KDBUS_ITEM_MEMFD_NAME;
-        memcpy(item->str, name, l + 1);
-
-        if (ioctl(kdbus, KDBUS_CMD_MEMFD_NEW, cmd) < 0)
-                return -errno;
-
-        n = new0(struct sd_memfd, 1);
-        if (!n) {
-                safe_close(cmd->fd);
-                return -ENOMEM;
-        }
-
-        n->fd = cmd->fd;
-        *m = n;
-        return 0;
-}
-
-_public_ int sd_memfd_new_from_fd(sd_memfd **m, int fd) {
-        sd_memfd *n;
-        uint64_t sz;
-
-        assert_return(m, -EINVAL);
-        assert_return(fd >= 0, -EINVAL);
-
-        /* Check if this is a valid memfd */
-        if (ioctl(fd, KDBUS_CMD_MEMFD_SIZE_GET, &sz) < 0)
-                return -ENOTTY;
-
-        n = new0(struct sd_memfd, 1);
-        if (!n)
-                return -ENOMEM;
-
-        n->fd = fd;
-        *m = n;
-
-        return 0;
-}
-
-_public_ void sd_memfd_free(sd_memfd *m) {
-        if (!m)
-                return;
-
-        if (m->f)
-                fclose(m->f);
-        else
-                safe_close(m->fd);
-
-        free(m);
-}
-
-_public_ int sd_memfd_get_fd(sd_memfd *m) {
-        assert_return(m, -EINVAL);
-
-        return m->fd;
-}
-
-_public_ int sd_memfd_get_file(sd_memfd *m, FILE **f) {
-        assert_return(m, -EINVAL);
-        assert_return(f, -EINVAL);
-
-        if (!m->f) {
-                m->f = fdopen(m->fd, "r+");
-                if (!m->f)
-                        return -errno;
-        }
-
-        *f = m->f;
-        return 0;
-}
-
-_public_ int sd_memfd_dup_fd(sd_memfd *m) {
-        int fd;
-
-        assert_return(m, -EINVAL);
-
-        fd = fcntl(m->fd, F_DUPFD_CLOEXEC, 3);
-        if (fd < 0)
-                return -errno;
-
-        return fd;
-}
-
-_public_ int sd_memfd_map(sd_memfd *m, uint64_t offset, size_t size, void **p) {
-        void *q;
-        int sealed;
-
-        assert_return(m, -EINVAL);
-        assert_return(size > 0, -EINVAL);
-        assert_return(p, -EINVAL);
-
-        sealed = sd_memfd_get_sealed(m);
-        if (sealed < 0)
-                return sealed;
-
-        q = mmap(NULL, size, sealed ? PROT_READ : PROT_READ|PROT_WRITE, MAP_SHARED, m->fd, offset);
-        if (q == MAP_FAILED)
-                return -errno;
-
-        *p = q;
-        return 0;
-}
-
-_public_ int sd_memfd_set_sealed(sd_memfd *m, int b) {
-        int r;
-
-        assert_return(m, -EINVAL);
-
-        r = ioctl(m->fd, KDBUS_CMD_MEMFD_SEAL_SET, b);
-        if (r < 0)
-                return -errno;
-
-        return 0;
-}
-
-_public_ int sd_memfd_get_sealed(sd_memfd *m) {
-        int r, b;
-
-        assert_return(m, -EINVAL);
-
-        r = ioctl(m->fd, KDBUS_CMD_MEMFD_SEAL_GET, &b);
-        if (r < 0)
-                return -errno;
-
-        return !!b;
-}
-
-_public_ int sd_memfd_get_size(sd_memfd *m, uint64_t *sz) {
-        int r;
-
-        assert_return(m, -EINVAL);
-        assert_return(sz, -EINVAL);
-
-        r = ioctl(m->fd, KDBUS_CMD_MEMFD_SIZE_GET, sz);
-        if (r < 0)
-                return -errno;
-
-        return r;
-}
-
-_public_ int sd_memfd_set_size(sd_memfd *m, uint64_t sz) {
-        int r;
-
-        assert_return(m, -EINVAL);
-
-        r = ioctl(m->fd, KDBUS_CMD_MEMFD_SIZE_SET, &sz);
-        if (r < 0)
-                return -errno;
-
-        return r;
-}
-
-_public_ int sd_memfd_new_and_map(sd_memfd **m, const char *name, size_t sz, void **p) {
-        sd_memfd *n;
-        int r;
-
-        r = sd_memfd_new(&n, name);
-        if (r < 0)
-                return r;
-
-        r = sd_memfd_set_size(n, sz);
-        if (r < 0) {
-                sd_memfd_free(n);
-                return r;
-        }
-
-        r = sd_memfd_map(n, 0, sz, p);
-        if (r < 0) {
-                sd_memfd_free(n);
-                return r;
-        }
-
-        *m = n;
-        return 0;
-}
-
-_public_ int sd_memfd_get_name(sd_memfd *m, char **name) {
-        char path[sizeof("/proc/self/fd/") + DECIMAL_STR_MAX(int)], buf[FILENAME_MAX+1], *e;
-        const char *delim, *end;
-        _cleanup_free_ char *n = NULL;
-        ssize_t k;
-
-        assert_return(m, -EINVAL);
-        assert_return(name, -EINVAL);
-
-        sprintf(path, "/proc/self/fd/%i", m->fd);
-
-        k = readlink(path, buf, sizeof(buf));
-        if (k < 0)
-                return -errno;
-
-        if ((size_t) k >= sizeof(buf))
-                return -E2BIG;
-
-        buf[k] = 0;
-
-        delim = strstr(buf, ":[");
-        if (!delim)
-                return -EIO;
-
-        delim = strchr(delim + 2, ':');
-        if (!delim)
-                return -EIO;
-
-        delim++;
-
-        end = strchr(delim, ']');
-        if (!end)
-                return -EIO;
-
-        n = strndup(delim, end - delim);
-        if (!n)
-                return -ENOMEM;
-
-        e = bus_label_unescape(n);
-        if (!e)
-                return -ENOMEM;
-
-        *name = e;
-
-        return 0;
-}
index e36a69f0d1e14d4334ec9c7b0fd194b493f05b4f..f58688059304e821be5be2495317eeaf9814eb9f 100644 (file)
@@ -34,11 +34,18 @@ static void test_bus_new(void) {
         printf("after new: refcount %u\n", REFCNT_GET(bus->n_ref));
 }
 
-static void test_bus_open(void) {
+static int test_bus_open(void) {
         _cleanup_bus_unref_ sd_bus *bus = NULL;
+        int r;
 
-        assert_se(sd_bus_open_system(&bus) >= 0);
+        r = sd_bus_open_system(&bus);
+        if (r == -ECONNREFUSED || r == -ENOENT)
+                return r;
+
+        assert_se(r >= 0);
         printf("after open: refcount %u\n", REFCNT_GET(bus->n_ref));
+
+        return 0;
 }
 
 static void test_bus_new_method_call(void) {
@@ -70,11 +77,20 @@ static void test_bus_new_signal(void) {
 }
 
 int main(int argc, char **argv) {
+        int r;
+
         log_parse_environment();
         log_open();
 
         test_bus_new();
-        test_bus_open();
+        r = test_bus_open();
+        if (r < 0) {
+                log_info("Failed to connect to bus, skipping tests.");
+                return EXIT_TEST_SKIP;
+        }
+
         test_bus_new_method_call();
         test_bus_new_signal();
+
+        return EXIT_SUCCESS;
 }
index 90257d4f3c94bf3212bf50ac701acdb20a95cb44..35f87e91bd9c927f7420dc91eb1dcc7ebeb9adaa 100644 (file)
@@ -33,7 +33,7 @@
 #include "bus-internal.h"
 #include "bus-util.h"
 
-#define MAX_SIZE (4*1024*1024)
+#define MAX_SIZE (2*1024*1024)
 
 static usec_t arg_loop_usec = 100 * USEC_PER_MSEC;
 
@@ -47,7 +47,7 @@ static void server(sd_bus *b, size_t *result) {
                 assert_se(r >= 0);
 
                 if (r == 0)
-                        assert_se(sd_bus_wait(b, (usec_t) -1) >= 0);
+                        assert_se(sd_bus_wait(b, USEC_INFINITY) >= 0);
                 if (!m)
                         continue;
 
diff --git a/src/libsystemd/sd-bus/test-bus-memfd.c b/src/libsystemd/sd-bus/test-bus-memfd.c
deleted file mode 100644 (file)
index 3462732..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2013 Lennart Poettering
-
-  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/>.
-***/
-
-#include <sys/mman.h>
-#include <sys/uio.h>
-
-#include "log.h"
-#include "macro.h"
-#include "util.h"
-
-#include "sd-memfd.h"
-
-int main(int argc, char *argv[]) {
-        sd_memfd *m;
-        char *s, *name;
-        uint64_t sz;
-        int r, fd;
-        FILE *f = NULL;
-        char buf[3] = {};
-        struct iovec iov[3] = {};
-        char bufv[3][3] = {};
-
-        log_set_max_level(LOG_DEBUG);
-
-        r = sd_memfd_new(&m, NULL);
-        if (r == -ENOENT)
-                return EXIT_TEST_SKIP;
-
-        assert_se(r >= 0);
-
-        assert_se(sd_memfd_get_name(m, &name) >= 0);
-        log_info("name: %s", name);
-        free(name);
-
-        r = sd_memfd_map(m, 0, 12, (void**) &s);
-        assert_se(r >= 0);
-
-        strcpy(s, "----- world");
-
-        r = sd_memfd_set_sealed(m, 1);
-        assert_se(r == -ETXTBSY);
-
-        assert_se(write(sd_memfd_get_fd(m), "he", 2) == 2);
-        assert_se(write(sd_memfd_get_fd(m), "XXX", 3) == 3);
-        assert_se(streq(s, "heXXX world"));
-
-        /* fix "hello" */
-        assert_se(lseek(sd_memfd_get_fd(m), 2, SEEK_SET) == 2);
-        assert_se(write(sd_memfd_get_fd(m), "ll", 2) == 2);
-
-        assert_se(sd_memfd_get_file(m, &f) >= 0);
-        fputc('o', f);
-        fflush(f);
-
-        /* check content  */
-        assert_se(streq(s, "hello world"));
-
-        assert_se(munmap(s, 12) == 0);
-
-        r = sd_memfd_get_sealed(m);
-        assert_se(r == 0);
-
-        r = sd_memfd_get_size(m, &sz);
-        assert_se(r >= 0);
-        assert_se(sz = page_size());
-
-        /* truncate it */
-        r = sd_memfd_set_size(m, 6);
-        assert_se(r >= 0);
-
-        /* get back new value */
-        r = sd_memfd_get_size(m, &sz);
-        assert_se(r >= 0);
-        assert_se(sz == 6);
-
-        r = sd_memfd_set_sealed(m, 1);
-        assert_se(r >= 0);
-
-        r = sd_memfd_get_sealed(m);
-        assert_se(r == 1);
-
-        fd = sd_memfd_dup_fd(m);
-        assert_se(fd >= 0);
-
-        sd_memfd_free(m);
-
-        /* new sd_memfd, same underlying memfd */
-        r = sd_memfd_new_from_fd(&m, fd);
-        assert_se(r >= 0);
-
-        /* we did truncate it to 6 */
-        r = sd_memfd_get_size(m, &sz);
-        assert_se(r >= 0 && sz == 6);
-
-        /* map it, check content */
-        r = sd_memfd_map(m, 0, 12, (void **)&s);
-        assert_se(r >= 0);
-
-        /* we only see the truncated size */
-        assert_se(streq(s, "hello "));
-
-        /* it was already sealed */
-        r = sd_memfd_set_sealed(m, 1);
-        assert_se(r == -EALREADY);
-
-        /* we cannot break the seal, it is mapped */
-        r = sd_memfd_set_sealed(m, 0);
-        assert_se(r == -ETXTBSY);
-
-        /* unmap it; become the single owner */
-        assert_se(munmap(s, 12) == 0);
-
-        /* now we can do flip the sealing */
-        r = sd_memfd_set_sealed(m, 0);
-        assert_se(r == 0);
-        r = sd_memfd_get_sealed(m);
-        assert_se(r == 0);
-
-        r = sd_memfd_set_sealed(m, 1);
-        assert_se(r == 0);
-        r = sd_memfd_get_sealed(m);
-        assert_se(r == 1);
-
-        r = sd_memfd_set_sealed(m, 0);
-        assert_se(r == 0);
-        r = sd_memfd_get_sealed(m);
-        assert_se(r == 0);
-
-        /* seek at 2, read() 2 bytes */
-        assert_se(lseek(fd, 2, SEEK_SET) == 2);
-        assert_se(read(fd, buf, 2) == 2);
-
-        /* check content */
-        assert_se(memcmp(buf, "ll", 2) == 0);
-
-        /* writev it out*/
-        iov[0].iov_base = (char *)"ABC";
-        iov[0].iov_len = 3;
-        iov[1].iov_base = (char *)"DEF";
-        iov[1].iov_len = 3;
-        iov[2].iov_base = (char *)"GHI";
-        iov[2].iov_len = 3;
-        assert_se(pwritev(fd, iov, 3, 0) == 9);
-
-        /* readv it back */
-        iov[0].iov_base = bufv[0];
-        iov[0].iov_len = 3;
-        iov[1].iov_base = bufv[1];
-        iov[1].iov_len = 3;
-        iov[2].iov_base = bufv[2];
-        iov[2].iov_len = 3;
-        assert_se(preadv(fd, iov, 3, 0) == 9);
-
-        /* check content */
-        assert_se(memcmp(bufv[0], "ABC", 3) == 0);
-        assert_se(memcmp(bufv[1], "DEF", 3) == 0);
-        assert_se(memcmp(bufv[2], "GHI", 3) == 0);
-
-        sd_memfd_free(m);
-
-        return 0;
-}
index 29e40aa0afd234379e7f61f7e34a804dd2f4fcea..e3010fbf7e5689ccabd8b7cdb3caa9a36e4e3d95 100644 (file)
@@ -24,9 +24,9 @@
 
 #include "util.h"
 #include "log.h"
+#include "memfd.h"
 
 #include "sd-bus.h"
-#include "sd-memfd.h"
 #include "bus-message.h"
 #include "bus-error.h"
 #include "bus-kernel.h"
@@ -43,7 +43,7 @@ int main(int argc, char *argv[]) {
         sd_bus *a, *b;
         int r, bus_ref;
         sd_bus_message *m;
-        sd_memfd *f;
+        int f;
         uint64_t sz;
         uint32_t u32;
         size_t i, l;
@@ -93,8 +93,8 @@ int main(int argc, char *argv[]) {
         memset(p+1, 'L', FIRST_ARRAY-2);
         p[FIRST_ARRAY-1] = '>';
 
-        r = sd_memfd_new_and_map(&f, NULL, STRING_SIZE, (void**) &s);
-        assert_se(r >= 0);
+        f = memfd_new_and_map(NULL, STRING_SIZE, (void**) &s);
+        assert_se(f >= 0);
 
         s[0] = '<';
         for (i = 1; i < STRING_SIZE-2; i++)
@@ -103,31 +103,31 @@ int main(int argc, char *argv[]) {
         s[STRING_SIZE-1] = 0;
         munmap(s, STRING_SIZE);
 
-        r = sd_memfd_get_size(f, &sz);
+        r = memfd_get_size(f, &sz);
         assert_se(r >= 0);
         assert_se(sz == STRING_SIZE);
 
         r = sd_bus_message_append_string_memfd(m, f);
         assert_se(r >= 0);
 
-        sd_memfd_free(f);
+        close(f);
 
-        r = sd_memfd_new_and_map(&f, NULL, SECOND_ARRAY, (void**) &p);
-        assert_se(r >= 0);
+        f = memfd_new_and_map(NULL, SECOND_ARRAY, (void**) &p);
+        assert_se(f >= 0);
 
         p[0] = '<';
         memset(p+1, 'P', SECOND_ARRAY-2);
         p[SECOND_ARRAY-1] = '>';
         munmap(p, SECOND_ARRAY);
 
-        r = sd_memfd_get_size(f, &sz);
+        r = memfd_get_size(f, &sz);
         assert_se(r >= 0);
         assert_se(sz == SECOND_ARRAY);
 
         r = sd_bus_message_append_array_memfd(m, 'y', f);
         assert_se(r >= 0);
 
-        sd_memfd_free(f);
+        close(f);
 
         r = sd_bus_message_close_container(m);
         assert_se(r >= 0);
index 7caa63db1472e6edfb1c9c8a01ee49e06476cec1..1f2a53393f58a1f5e27a6286cd6d4ebb65b470e3 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "util.h"
 #include "path-util.h"
+#include "socket-util.h"
 #include "sd-daemon.h"
 
 _public_ int sd_listen_fds(int unset_environment) {
@@ -196,14 +197,6 @@ static int sd_is_socket_internal(int fd, int type, int listening) {
         return 1;
 }
 
-union sockaddr_union {
-        struct sockaddr sa;
-        struct sockaddr_in in4;
-        struct sockaddr_in6 in6;
-        struct sockaddr_un un;
-        struct sockaddr_storage storage;
-};
-
 _public_ int sd_is_socket(int fd, int family, int type, int listening) {
         int r;
 
@@ -261,7 +254,7 @@ _public_ int sd_is_socket_inet(int fd, int family, int type, int listening, uint
                         if (l < sizeof(struct sockaddr_in))
                                 return -EINVAL;
 
-                        return htons(port) == sockaddr.in4.sin_port;
+                        return htons(port) == sockaddr.in.sin_port;
                 } else {
                         if (l < sizeof(struct sockaddr_in6))
                                 return -EINVAL;
@@ -498,39 +491,35 @@ _public_ int sd_booted(void) {
 }
 
 _public_ int sd_watchdog_enabled(int unset_environment, uint64_t *usec) {
-        const char *e;
+        const char *s, *p = ""; /* p is set to dummy value to do unsetting */
         uint64_t u;
-        pid_t pid;
-        int r;
+        int r = 0;
 
-        e = getenv("WATCHDOG_PID");
-        if (!e) {
-                r = 0;
+        s = getenv("WATCHDOG_USEC");
+        if (!s)
                 goto finish;
-        }
 
-        r = parse_pid(e, &pid);
+        r = safe_atou64(s, &u);
         if (r < 0)
                 goto finish;
-
-        /* Is this for us? */
-        if (getpid() != pid) {
-                r = 0;
-                goto finish;
-        }
-
-        e = getenv("WATCHDOG_USEC");
-        if (!e) {
+        if (u <= 0) {
                 r = -EINVAL;
                 goto finish;
         }
 
-        r = safe_atou64(e, &u);
-        if (r < 0)
-                goto finish;
-        if (u <= 0) {
-                r = -EINVAL;
-                goto finish;
+        p = getenv("WATCHDOG_PID");
+        if (p) {
+                pid_t pid;
+
+                r = parse_pid(p, &pid);
+                if (r < 0)
+                        goto finish;
+
+                /* Is this for us? */
+                if (getpid() != pid) {
+                        r = 0;
+                        goto finish;
+                }
         }
 
         if (usec)
@@ -539,10 +528,10 @@ _public_ int sd_watchdog_enabled(int unset_environment, uint64_t *usec) {
         r = 1;
 
 finish:
-        if (unset_environment) {
-                unsetenv("WATCHDOG_PID");
+        if (unset_environment && s)
                 unsetenv("WATCHDOG_USEC");
-        }
+        if (unset_environment && p)
+                unsetenv("WATCHDOG_PID");
 
         return r;
 }
index e58020dedf67c0a6b286cee8154a7f34b4ed834c..e7cad9be46e35bd8d207b3f4eefd1162afc9a6da 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include "util.h"
+#include "sd-event.h"
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event*, sd_event_unref);
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event_source*, sd_event_source_unref);
index 53f1904d3de828dcf56b62bcdb81bcdd42423361..80a2ae97e8e7ece88cfe87b487d1b5a470e0cf93 100644 (file)
@@ -43,6 +43,7 @@
 typedef enum EventSourceType {
         SOURCE_IO,
         SOURCE_TIME_REALTIME,
+        SOURCE_TIME_BOOTTIME,
         SOURCE_TIME_MONOTONIC,
         SOURCE_TIME_REALTIME_ALARM,
         SOURCE_TIME_BOOTTIME_ALARM,
@@ -56,7 +57,7 @@ typedef enum EventSourceType {
         _SOURCE_EVENT_SOURCE_TYPE_INVALID = -1
 } EventSourceType;
 
-#define EVENT_SOURCE_IS_TIME(t) IN_SET((t), SOURCE_TIME_REALTIME, SOURCE_TIME_MONOTONIC, SOURCE_TIME_REALTIME_ALARM, SOURCE_TIME_BOOTTIME_ALARM)
+#define EVENT_SOURCE_IS_TIME(t) IN_SET((t), SOURCE_TIME_REALTIME, SOURCE_TIME_BOOTTIME, SOURCE_TIME_MONOTONIC, SOURCE_TIME_REALTIME_ALARM, SOURCE_TIME_BOOTTIME_ALARM)
 
 struct sd_event_source {
         unsigned n_ref;
@@ -65,6 +66,8 @@ struct sd_event_source {
         void *userdata;
         sd_event_handler_t prepare;
 
+        char *name;
+
         EventSourceType type:5;
         int enabled:3;
         bool pending:1;
@@ -130,6 +133,8 @@ struct clock_data {
         Prioq *earliest;
         Prioq *latest;
         usec_t next;
+
+        bool needs_rearm:1;
 };
 
 struct sd_event {
@@ -142,10 +147,11 @@ struct sd_event {
         Prioq *pending;
         Prioq *prepare;
 
-        /* timerfd_create() only supports these four clocks so far. We
+        /* timerfd_create() only supports these five clocks so far. We
          * can add support for more clocks when the kernel learns to
          * deal with them, too. */
         struct clock_data realtime;
+        struct clock_data boottime;
         struct clock_data monotonic;
         struct clock_data realtime_alarm;
         struct clock_data boottime_alarm;
@@ -377,6 +383,7 @@ static void event_free(sd_event *e) {
         safe_close(e->watchdog_fd);
 
         free_clock_data(&e->realtime);
+        free_clock_data(&e->boottime);
         free_clock_data(&e->monotonic);
         free_clock_data(&e->realtime_alarm);
         free_clock_data(&e->boottime_alarm);
@@ -403,10 +410,10 @@ _public_ int sd_event_new(sd_event** ret) {
                 return -ENOMEM;
 
         e->n_ref = 1;
-        e->signal_fd = e->watchdog_fd = e->epoll_fd = e->realtime.fd = e->monotonic.fd = e->realtime_alarm.fd = e->boottime_alarm.fd = -1;
-        e->realtime.next = e->monotonic.next = e->realtime_alarm.next = e->boottime_alarm.next = (usec_t) -1;
+        e->signal_fd = e->watchdog_fd = e->epoll_fd = e->realtime.fd = e->boottime.fd = e->monotonic.fd = e->realtime_alarm.fd = e->boottime_alarm.fd = -1;
+        e->realtime.next = e->boottime.next = e->monotonic.next = e->realtime_alarm.next = e->boottime_alarm.next = USEC_INFINITY;
         e->original_pid = getpid();
-        e->perturb = (usec_t) -1;
+        e->perturb = USEC_INFINITY;
 
         assert_se(sigemptyset(&e->sigset) == 0);
 
@@ -517,6 +524,9 @@ static clockid_t event_source_type_to_clock(EventSourceType t) {
         case SOURCE_TIME_REALTIME:
                 return CLOCK_REALTIME;
 
+        case SOURCE_TIME_BOOTTIME:
+                return CLOCK_BOOTTIME;
+
         case SOURCE_TIME_MONOTONIC:
                 return CLOCK_MONOTONIC;
 
@@ -538,6 +548,9 @@ static EventSourceType clock_to_event_source_type(clockid_t clock) {
         case CLOCK_REALTIME:
                 return SOURCE_TIME_REALTIME;
 
+        case CLOCK_BOOTTIME:
+                return SOURCE_TIME_BOOTTIME;
+
         case CLOCK_MONOTONIC:
                 return SOURCE_TIME_MONOTONIC;
 
@@ -560,6 +573,9 @@ static struct clock_data* event_get_clock_data(sd_event *e, EventSourceType t) {
         case SOURCE_TIME_REALTIME:
                 return &e->realtime;
 
+        case SOURCE_TIME_BOOTTIME:
+                return &e->boottime;
+
         case SOURCE_TIME_MONOTONIC:
                 return &e->monotonic;
 
@@ -574,6 +590,44 @@ static struct clock_data* event_get_clock_data(sd_event *e, EventSourceType t) {
         }
 }
 
+static bool need_signal(sd_event *e, int signal) {
+        return (e->signal_sources && e->signal_sources[signal] &&
+                e->signal_sources[signal]->enabled != SD_EVENT_OFF)
+                ||
+               (signal == SIGCHLD &&
+                e->n_enabled_child_sources > 0);
+}
+
+static int event_update_signal_fd(sd_event *e) {
+        struct epoll_event ev = {};
+        bool add_to_epoll;
+        int r;
+
+        assert(e);
+
+        add_to_epoll = e->signal_fd < 0;
+
+        r = signalfd(e->signal_fd, &e->sigset, SFD_NONBLOCK|SFD_CLOEXEC);
+        if (r < 0)
+                return -errno;
+
+        e->signal_fd = r;
+
+        if (!add_to_epoll)
+                return 0;
+
+        ev.events = EPOLLIN;
+        ev.data.ptr = INT_TO_PTR(SOURCE_SIGNAL);
+
+        r = epoll_ctl(e->epoll_fd, EPOLL_CTL_ADD, e->signal_fd, &ev);
+        if (r < 0) {
+                e->signal_fd = safe_close(e->signal_fd);
+                return -errno;
+        }
+
+        return 0;
+}
+
 static void source_disconnect(sd_event_source *s) {
         sd_event *event;
 
@@ -593,6 +647,7 @@ static void source_disconnect(sd_event_source *s) {
                 break;
 
         case SOURCE_TIME_REALTIME:
+        case SOURCE_TIME_BOOTTIME:
         case SOURCE_TIME_MONOTONIC:
         case SOURCE_TIME_REALTIME_ALARM:
         case SOURCE_TIME_BOOTTIME_ALARM: {
@@ -603,16 +658,23 @@ static void source_disconnect(sd_event_source *s) {
 
                 prioq_remove(d->earliest, s, &s->time.earliest_index);
                 prioq_remove(d->latest, s, &s->time.latest_index);
+                d->needs_rearm = true;
                 break;
         }
 
         case SOURCE_SIGNAL:
                 if (s->signal.sig > 0) {
-                        if (s->signal.sig != SIGCHLD || s->event->n_enabled_child_sources == 0)
-                                assert_se(sigdelset(&s->event->sigset, s->signal.sig) == 0);
-
                         if (s->event->signal_sources)
                                 s->event->signal_sources[s->signal.sig] = NULL;
+
+                        /* If the signal was on and now it is off... */
+                        if (s->enabled != SD_EVENT_OFF && !need_signal(s->event, s->signal.sig)) {
+                                assert_se(sigdelset(&s->event->sigset, s->signal.sig) == 0);
+
+                                (void) event_update_signal_fd(s->event);
+                                /* If disabling failed, we might get a spurious event,
+                                 * but otherwise nothing bad should happen. */
+                        }
                 }
 
                 break;
@@ -622,10 +684,16 @@ static void source_disconnect(sd_event_source *s) {
                         if (s->enabled != SD_EVENT_OFF) {
                                 assert(s->event->n_enabled_child_sources > 0);
                                 s->event->n_enabled_child_sources--;
-                        }
 
-                        if (!s->event->signal_sources || !s->event->signal_sources[SIGCHLD])
-                                assert_se(sigdelset(&s->event->sigset, SIGCHLD) == 0);
+                                /* We know the signal was on, if it is off now... */
+                                if (!need_signal(s->event, SIGCHLD)) {
+                                        assert_se(sigdelset(&s->event->sigset, SIGCHLD) == 0);
+
+                                        (void) event_update_signal_fd(s->event);
+                                        /* If disabling failed, we might get a spurious event,
+                                         * but otherwise nothing bad should happen. */
+                                }
+                        }
 
                         hashmap_remove(s->event->child_sources, INT_TO_PTR(s->child.pid));
                 }
@@ -669,6 +737,7 @@ static void source_free(sd_event_source *s) {
         assert(s);
 
         source_disconnect(s);
+        free(s->name);
         free(s);
 }
 
@@ -702,6 +771,7 @@ static int source_set_pending(sd_event_source *s, bool b) {
 
                 prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
                 prioq_reshuffle(d->latest, s, &s->time.latest_index);
+                d->needs_rearm = true;
         }
 
         return 0;
@@ -762,7 +832,7 @@ _public_ int sd_event_add_io(
         r = source_io_register(s, s->enabled, events);
         if (r < 0) {
                 source_free(s);
-                return -errno;
+                return r;
         }
 
         if (ret)
@@ -783,7 +853,7 @@ static void initialize_perturb(sd_event *e) {
            bit. Here, we calculate a perturbation usec offset from the
            boot ID. */
 
-        if (_likely_(e->perturb != (usec_t) -1))
+        if (_likely_(e->perturb != USEC_INFINITY))
                 return;
 
         if (sd_id128_get_boot(&bootid) >= 0)
@@ -877,6 +947,8 @@ _public_ int sd_event_add_time(
         s->userdata = userdata;
         s->enabled = SD_EVENT_ONESHOT;
 
+        d->needs_rearm = true;
+
         r = prioq_put(d->earliest, s, &s->time.earliest_index);
         if (r < 0)
                 goto fail;
@@ -895,36 +967,6 @@ fail:
         return r;
 }
 
-static int event_update_signal_fd(sd_event *e) {
-        struct epoll_event ev = {};
-        bool add_to_epoll;
-        int r;
-
-        assert(e);
-
-        add_to_epoll = e->signal_fd < 0;
-
-        r = signalfd(e->signal_fd, &e->sigset, SFD_NONBLOCK|SFD_CLOEXEC);
-        if (r < 0)
-                return -errno;
-
-        e->signal_fd = r;
-
-        if (!add_to_epoll)
-                return 0;
-
-        ev.events = EPOLLIN;
-        ev.data.ptr = INT_TO_PTR(SOURCE_SIGNAL);
-
-        r = epoll_ctl(e->epoll_fd, EPOLL_CTL_ADD, e->signal_fd, &ev);
-        if (r < 0) {
-                e->signal_fd = safe_close(e->signal_fd);
-                return -errno;
-        }
-
-        return 0;
-}
-
 static int signal_exit_callback(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata) {
         assert(s);
 
@@ -941,6 +983,7 @@ _public_ int sd_event_add_signal(
         sd_event_source *s;
         sigset_t ss;
         int r;
+        bool previous;
 
         assert_return(e, -EINVAL);
         assert_return(sig > 0, -EINVAL);
@@ -965,6 +1008,8 @@ _public_ int sd_event_add_signal(
         } else if (e->signal_sources[sig])
                 return -EBUSY;
 
+        previous = need_signal(e, sig);
+
         s = source_new(e, !ret, SOURCE_SIGNAL);
         if (!s)
                 return -ENOMEM;
@@ -975,9 +1020,10 @@ _public_ int sd_event_add_signal(
         s->enabled = SD_EVENT_ON;
 
         e->signal_sources[sig] = s;
-        assert_se(sigaddset(&e->sigset, sig) == 0);
 
-        if (sig != SIGCHLD || e->n_enabled_child_sources == 0) {
+        if (!previous) {
+                assert_se(sigaddset(&e->sigset, sig) == 0);
+
                 r = event_update_signal_fd(e);
                 if (r < 0) {
                         source_free(s);
@@ -1001,6 +1047,7 @@ _public_ int sd_event_add_child(
 
         sd_event_source *s;
         int r;
+        bool previous;
 
         assert_return(e, -EINVAL);
         assert_return(pid > 1, -EINVAL);
@@ -1010,13 +1057,15 @@ _public_ int sd_event_add_child(
         assert_return(e->state != SD_EVENT_FINISHED, -ESTALE);
         assert_return(!event_pid_changed(e), -ECHILD);
 
-        r = hashmap_ensure_allocated(&e->child_sources, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&e->child_sources, NULL);
         if (r < 0)
                 return r;
 
         if (hashmap_contains(e->child_sources, INT_TO_PTR(pid)))
                 return -EBUSY;
 
+        previous = need_signal(e, SIGCHLD);
+
         s = source_new(e, !ret, SOURCE_CHILD);
         if (!s)
                 return -ENOMEM;
@@ -1035,13 +1084,13 @@ _public_ int sd_event_add_child(
 
         e->n_enabled_child_sources ++;
 
-        assert_se(sigaddset(&e->sigset, SIGCHLD) == 0);
+        if (!previous) {
+                assert_se(sigaddset(&e->sigset, SIGCHLD) == 0);
 
-        if (!e->signal_sources || !e->signal_sources[SIGCHLD]) {
                 r = event_update_signal_fd(e);
                 if (r < 0) {
                         source_free(s);
-                        return -errno;
+                        return r;
                 }
         }
 
@@ -1101,7 +1150,7 @@ _public_ int sd_event_add_post(
         assert_return(e->state != SD_EVENT_FINISHED, -ESTALE);
         assert_return(!event_pid_changed(e), -ECHILD);
 
-        r = set_ensure_allocated(&e->post_sources, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&e->post_sources, NULL);
         if (r < 0)
                 return r;
 
@@ -1204,6 +1253,21 @@ _public_ sd_event_source* sd_event_source_unref(sd_event_source *s) {
         return NULL;
 }
 
+_public_ int sd_event_source_set_name(sd_event_source *s, const char *name) {
+        assert_return(s, -EINVAL);
+
+        return free_and_strdup(&s->name, name);
+}
+
+_public_ int sd_event_source_get_name(sd_event_source *s, const char **name) {
+        assert_return(s, -EINVAL);
+        assert_return(name, -EINVAL);
+
+        *name = s->name;
+
+        return 0;
+}
+
 _public_ sd_event *sd_event_source_get_event(sd_event_source *s) {
         assert_return(s, NULL);
 
@@ -1282,7 +1346,8 @@ _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events)
         assert_return(s->event->state != SD_EVENT_FINISHED, -ESTALE);
         assert_return(!event_pid_changed(s->event), -ECHILD);
 
-        if (s->io.events == events)
+        /* edge-triggered updates are never skipped, so we can reset edges */
+        if (s->io.events == events && !(events & EPOLLET))
                 return 0;
 
         if (s->enabled != SD_EVENT_OFF) {
@@ -1382,6 +1447,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
                         break;
 
                 case SOURCE_TIME_REALTIME:
+                case SOURCE_TIME_BOOTTIME:
                 case SOURCE_TIME_MONOTONIC:
                 case SOURCE_TIME_REALTIME_ALARM:
                 case SOURCE_TIME_BOOTTIME_ALARM: {
@@ -1393,27 +1459,37 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
 
                         prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
                         prioq_reshuffle(d->latest, s, &s->time.latest_index);
+                        d->needs_rearm = true;
                         break;
                 }
 
                 case SOURCE_SIGNAL:
+                        assert(need_signal(s->event, s->signal.sig));
+
                         s->enabled = m;
-                        if (s->signal.sig != SIGCHLD || s->event->n_enabled_child_sources == 0) {
+
+                        if (!need_signal(s->event, s->signal.sig)) {
                                 assert_se(sigdelset(&s->event->sigset, s->signal.sig) == 0);
-                                event_update_signal_fd(s->event);
+
+                                (void) event_update_signal_fd(s->event);
+                                /* If disabling failed, we might get a spurious event,
+                                 * but otherwise nothing bad should happen. */
                         }
 
                         break;
 
                 case SOURCE_CHILD:
+                        assert(need_signal(s->event, SIGCHLD));
+
                         s->enabled = m;
 
                         assert(s->event->n_enabled_child_sources > 0);
                         s->event->n_enabled_child_sources--;
 
-                        if (!s->event->signal_sources || !s->event->signal_sources[SIGCHLD]) {
+                        if (!need_signal(s->event, SIGCHLD)) {
                                 assert_se(sigdelset(&s->event->sigset, SIGCHLD) == 0);
-                                event_update_signal_fd(s->event);
+
+                                (void) event_update_signal_fd(s->event);
                         }
 
                         break;
@@ -1444,6 +1520,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
                         break;
 
                 case SOURCE_TIME_REALTIME:
+                case SOURCE_TIME_BOOTTIME:
                 case SOURCE_TIME_MONOTONIC:
                 case SOURCE_TIME_REALTIME_ALARM:
                 case SOURCE_TIME_BOOTTIME_ALARM: {
@@ -1455,26 +1532,39 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
 
                         prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
                         prioq_reshuffle(d->latest, s, &s->time.latest_index);
+                        d->needs_rearm = true;
                         break;
                 }
 
                 case SOURCE_SIGNAL:
-                        s->enabled = m;
-
-                        if (s->signal.sig != SIGCHLD || s->event->n_enabled_child_sources == 0)  {
+                        /* Check status before enabling. */
+                        if (!need_signal(s->event, s->signal.sig)) {
                                 assert_se(sigaddset(&s->event->sigset, s->signal.sig) == 0);
-                                event_update_signal_fd(s->event);
+
+                                r = event_update_signal_fd(s->event);
+                                if (r < 0) {
+                                        s->enabled = SD_EVENT_OFF;
+                                        return r;
+                                }
                         }
+
+                        s->enabled = m;
                         break;
 
                 case SOURCE_CHILD:
+                        /* Check status before enabling. */
                         if (s->enabled == SD_EVENT_OFF) {
-                                s->event->n_enabled_child_sources++;
-
-                                if (!s->event->signal_sources || !s->event->signal_sources[SIGCHLD]) {
-                                        assert_se(sigaddset(&s->event->sigset, SIGCHLD) == 0);
-                                        event_update_signal_fd(s->event);
+                                if (!need_signal(s->event, SIGCHLD)) {
+                                        assert_se(sigaddset(&s->event->sigset, s->signal.sig) == 0);
+
+                                        r = event_update_signal_fd(s->event);
+                                        if (r < 0) {
+                                                s->enabled = SD_EVENT_OFF;
+                                                return r;
+                                        }
                                 }
+
+                                s->event->n_enabled_child_sources++;
                         }
 
                         s->enabled = m;
@@ -1532,6 +1622,7 @@ _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) {
 
         prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
         prioq_reshuffle(d->latest, s, &s->time.latest_index);
+        d->needs_rearm = true;
 
         return 0;
 }
@@ -1566,6 +1657,7 @@ _public_ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec
         assert(d);
 
         prioq_reshuffle(d->latest, s, &s->time.latest_index);
+        d->needs_rearm = true;
 
         return 0;
 }
@@ -1729,13 +1821,18 @@ static int event_arm_timer(
         assert(e);
         assert(d);
 
+        if (!d->needs_rearm)
+                return 0;
+        else
+                d->needs_rearm = false;
+
         a = prioq_peek(d->earliest);
         if (!a || a->enabled == SD_EVENT_OFF) {
 
                 if (d->fd < 0)
                         return 0;
 
-                if (d->next == (usec_t) -1)
+                if (d->next == USEC_INFINITY)
                         return 0;
 
                 /* disarm */
@@ -1743,7 +1840,7 @@ static int event_arm_timer(
                 if (r < 0)
                         return r;
 
-                d->next = (usec_t) -1;
+                d->next = USEC_INFINITY;
                 return 0;
         }
 
@@ -1811,7 +1908,7 @@ static int flush_timer(sd_event *e, int fd, uint32_t events, usec_t *next) {
                 return -EIO;
 
         if (next)
-                *next = (usec_t) -1;
+                *next = USEC_INFINITY;
 
         return 0;
 }
@@ -1841,6 +1938,7 @@ static int process_timer(
 
                 prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
                 prioq_reshuffle(d->latest, s, &s->time.latest_index);
+                d->needs_rearm = true;
         }
 
         return 0;
@@ -1918,38 +2016,42 @@ static int process_signal(sd_event *e, uint32_t events) {
         int r;
 
         assert(e);
-        assert(e->signal_sources);
 
         assert_return(events == EPOLLIN, -EIO);
 
         for (;;) {
                 struct signalfd_siginfo si;
-                ssize_t ss;
-                sd_event_source *s;
+                ssize_t n;
+                sd_event_source *s = NULL;
 
-                ss = read(e->signal_fd, &si, sizeof(si));
-                if (ss < 0) {
+                n = read(e->signal_fd, &si, sizeof(si));
+                if (n < 0) {
                         if (errno == EAGAIN || errno == EINTR)
                                 return read_one;
 
                         return -errno;
                 }
 
-                if (_unlikely_(ss != sizeof(si)))
+                if (_unlikely_(n != sizeof(si)))
                         return -EIO;
 
+                assert(si.ssi_signo < _NSIG);
+
                 read_one = true;
 
-                s = e->signal_sources[si.ssi_signo];
                 if (si.ssi_signo == SIGCHLD) {
                         r = process_child(e);
                         if (r < 0)
                                 return r;
-                        if (r > 0 || !s)
+                        if (r > 0)
                                 continue;
-                } else
-                        if (!s)
-                                return -EIO;
+                }
+
+                if (e->signal_sources)
+                        s = e->signal_sources[si.ssi_signo];
+
+                if (!s)
+                        continue;
 
                 s->signal.siginfo = si;
                 r = source_set_pending(s, true);
@@ -2002,6 +2104,7 @@ static int source_dispatch(sd_event_source *s) {
                 break;
 
         case SOURCE_TIME_REALTIME:
+        case SOURCE_TIME_BOOTTIME:
         case SOURCE_TIME_MONOTONIC:
         case SOURCE_TIME_REALTIME_ALARM:
         case SOURCE_TIME_BOOTTIME_ALARM:
@@ -2048,8 +2151,12 @@ static int source_dispatch(sd_event_source *s) {
 
         s->dispatching = false;
 
-        if (r < 0)
-                log_debug("Event source %p returned error, disabling: %s", s, strerror(-r));
+        if (r < 0) {
+                if (s->name)
+                        log_debug("Event source '%s' returned error, disabling: %s", s->name, strerror(-r));
+                else
+                        log_debug("Event source %p returned error, disabling: %s", s, strerror(-r));
+        }
 
         if (s->n_ref == 0)
                 source_free(s);
@@ -2082,8 +2189,12 @@ static int event_prepare(sd_event *e) {
                 r = s->prepare(s, s->userdata);
                 s->dispatching = false;
 
-                if (r < 0)
-                        log_debug("Prepare callback of event source %p returned error, disabling: %s", s, strerror(-r));
+                if (r < 0) {
+                        if (s->name)
+                                log_debug("Prepare callback of event source '%s' returned error, disabling: %s", s->name, strerror(-r));
+                        else
+                                log_debug("Prepare callback of event source %p returned error, disabling: %s", s, strerror(-r));
+                }
 
                 if (s->n_ref == 0)
                         source_free(s);
@@ -2175,12 +2286,8 @@ static int process_watchdog(sd_event *e) {
         return arm_watchdog(e);
 }
 
-_public_ int sd_event_run(sd_event *e, uint64_t timeout) {
-        struct epoll_event *ev_queue;
-        unsigned ev_queue_max;
-        sd_event_source *p;
-        int r, i, m;
-        bool timedout;
+_public_ int sd_event_prepare(sd_event *e) {
+        int r;
 
         assert_return(e, -EINVAL);
         assert_return(!event_pid_changed(e), -ECHILD);
@@ -2188,34 +2295,64 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
         assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY);
 
         if (e->exit_requested)
-                return dispatch_exit(e);
+                goto pending;
 
-        sd_event_ref(e);
         e->iteration++;
-        e->state = SD_EVENT_RUNNING;
 
         r = event_prepare(e);
         if (r < 0)
-                goto finish;
+                return r;
 
         r = event_arm_timer(e, &e->realtime);
         if (r < 0)
-                goto finish;
+                return r;
+
+        r = event_arm_timer(e, &e->boottime);
+        if (r < 0)
+                return r;
 
         r = event_arm_timer(e, &e->monotonic);
         if (r < 0)
-                goto finish;
+                return r;
 
         r = event_arm_timer(e, &e->realtime_alarm);
         if (r < 0)
-                goto finish;
+                return r;
 
         r = event_arm_timer(e, &e->boottime_alarm);
         if (r < 0)
-                goto finish;
+                return r;
 
         if (event_next_pending(e) || e->need_process_child)
-                timeout = 0;
+                goto pending;
+
+        e->state = SD_EVENT_PREPARED;
+
+        return 0;
+
+pending:
+        e->state = SD_EVENT_PREPARED;
+        r = sd_event_wait(e, 0);
+        if (r == 0)
+                e->state = SD_EVENT_PREPARED;
+
+        return r;
+}
+
+_public_ int sd_event_wait(sd_event *e, uint64_t timeout) {
+        struct epoll_event *ev_queue;
+        unsigned ev_queue_max;
+        int r, m, i;
+
+        assert_return(e, -EINVAL);
+        assert_return(!event_pid_changed(e), -ECHILD);
+        assert_return(e->state != SD_EVENT_FINISHED, -ESTALE);
+        assert_return(e->state == SD_EVENT_PREPARED, -EBUSY);
+
+        if (e->exit_requested) {
+                e->state = SD_EVENT_PENDING;
+                return 1;
+        }
 
         ev_queue_max = CLAMP(e->n_sources, 1U, EPOLL_QUEUE_MAX);
         ev_queue = newa(struct epoll_event, ev_queue_max);
@@ -2223,12 +2360,16 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
         m = epoll_wait(e->epoll_fd, ev_queue, ev_queue_max,
                        timeout == (uint64_t) -1 ? -1 : (int) ((timeout + USEC_PER_MSEC - 1) / USEC_PER_MSEC));
         if (m < 0) {
-                r = errno == EAGAIN || errno == EINTR ? 1 : -errno;
+                if (errno == EINTR) {
+                        e->state = SD_EVENT_PENDING;
+                        return 1;
+                }
+
+                r = -errno;
+
                 goto finish;
         }
 
-        timedout = m == 0;
-
         dual_timestamp_get(&e->timestamp);
         e->timestamp_boottime = now(CLOCK_BOOTTIME);
 
@@ -2236,6 +2377,8 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
 
                 if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_REALTIME))
                         r = flush_timer(e, e->realtime.fd, ev_queue[i].events, &e->realtime.next);
+                else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_BOOTTIME))
+                        r = flush_timer(e, e->boottime.fd, ev_queue[i].events, &e->boottime.next);
                 else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_MONOTONIC))
                         r = flush_timer(e, e->monotonic.fd, ev_queue[i].events, &e->monotonic.next);
                 else if (ev_queue[i].data.ptr == INT_TO_PTR(SOURCE_TIME_REALTIME_ALARM))
@@ -2261,6 +2404,10 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
         if (r < 0)
                 goto finish;
 
+        r = process_timer(e, e->timestamp_boottime, &e->boottime);
+        if (r < 0)
+                goto finish;
+
         r = process_timer(e, e->timestamp.monotonic, &e->monotonic);
         if (r < 0)
                 goto finish;
@@ -2279,21 +2426,71 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
                         goto finish;
         }
 
-        p = event_next_pending(e);
-        if (!p) {
-                r = !timedout;
-                goto finish;
+        if (event_next_pending(e)) {
+                e->state = SD_EVENT_PENDING;
+
+                return 1;
         }
 
-        r = source_dispatch(p);
+        r = 0;
 
 finish:
         e->state = SD_EVENT_PASSIVE;
-        sd_event_unref(e);
 
         return r;
 }
 
+_public_ int sd_event_dispatch(sd_event *e) {
+        sd_event_source *p;
+        int r;
+
+        assert_return(e, -EINVAL);
+        assert_return(!event_pid_changed(e), -ECHILD);
+        assert_return(e->state != SD_EVENT_FINISHED, -ESTALE);
+        assert_return(e->state == SD_EVENT_PENDING, -EBUSY);
+
+        if (e->exit_requested)
+                return dispatch_exit(e);
+
+        p = event_next_pending(e);
+        if (p) {
+                sd_event_ref(e);
+
+                e->state = SD_EVENT_RUNNING;
+                r = source_dispatch(p);
+                e->state = SD_EVENT_PASSIVE;
+
+                sd_event_unref(e);
+
+                return r;
+        }
+
+        e->state = SD_EVENT_PASSIVE;
+
+        return 1;
+}
+
+_public_ int sd_event_run(sd_event *e, uint64_t timeout) {
+        int r;
+
+        assert_return(e, -EINVAL);
+        assert_return(!event_pid_changed(e), -ECHILD);
+        assert_return(e->state != SD_EVENT_FINISHED, -ESTALE);
+        assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY);
+
+        r = sd_event_prepare(e);
+        if (r > 0)
+                return sd_event_dispatch(e);
+        else if (r < 0)
+                return r;
+
+        r = sd_event_wait(e, timeout);
+        if (r > 0)
+                return sd_event_dispatch(e);
+        else
+                return r;
+}
+
 _public_ int sd_event_loop(sd_event *e) {
         int r;
 
@@ -2316,6 +2513,14 @@ finish:
         return r;
 }
 
+_public_ int sd_event_get_fd(sd_event *e) {
+
+        assert_return(e, -EINVAL);
+        assert_return(!event_pid_changed(e), -ECHILD);
+
+        return e->epoll_fd;
+}
+
 _public_ int sd_event_get_state(sd_event *e) {
         assert_return(e, -EINVAL);
         assert_return(!event_pid_changed(e), -ECHILD);
@@ -2366,6 +2571,7 @@ _public_ int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec) {
                 *usec = e->timestamp.monotonic;
                 break;
 
+        case CLOCK_BOOTTIME:
         case CLOCK_BOOTTIME_ALARM:
                 *usec = e->timestamp_boottime;
                 break;
index a1e44e6d19df927b6fa371aa968483aa44b60176..233ffa070bdb69900afa3ee482b0f987c7b5d73e 100644 (file)
@@ -183,11 +183,14 @@ _public_ int sd_id128_get_boot(sd_id128_t *ret) {
         for (j = 0, p = buf; j < 16; j++) {
                 int a, b;
 
-                if (p >= buf + k)
+                if (p >= buf + k - 1)
                         return -EIO;
 
-                if (*p == '-')
+                if (*p == '-') {
                         p++;
+                        if (p >= buf + k - 1)
+                                return -EIO;
+                }
 
                 a = unhexchar(p[0]);
                 b = unhexchar(p[1]);
index d1478ddb785a43703dd61dc479d616306a9e3a3b..c72d23ed5342f2032a85c438ca7741897262d282 100644 (file)
@@ -226,11 +226,10 @@ _public_ int sd_uid_get_display(uid_t uid, char **session) {
 }
 
 _public_ int sd_uid_is_on_seat(uid_t uid, int require_active, const char *seat) {
-        char *w, *state;
         _cleanup_free_ char *t = NULL, *s = NULL, *p = NULL;
         size_t l;
         int r;
-        const char *variable;
+        const char *word, *variable, *state;
 
         assert_return(seat, -EINVAL);
 
@@ -251,8 +250,8 @@ _public_ int sd_uid_is_on_seat(uid_t uid, int require_active, const char *seat)
         if (asprintf(&t, UID_FMT, uid) < 0)
                 return -ENOMEM;
 
-        FOREACH_WORD(w, l, s, state) {
-                if (strneq(t, w, l))
+        FOREACH_WORD(word, l, s, state) {
+                if (strneq(t, word, l))
                         return 1;
         }
 
@@ -486,6 +485,25 @@ _public_ int sd_session_get_class(const char *session, char **class) {
         return session_get_string(session, "CLASS", class);
 }
 
+_public_ int sd_session_get_desktop(const char *session, char **desktop) {
+        _cleanup_free_ char *escaped = NULL;
+        char *t;
+        int r;
+
+        assert_return(desktop, -EINVAL);
+
+        r = session_get_string(session, "DESKTOP", &escaped);
+        if (r < 0)
+                return r;
+
+        t = cunescape(escaped);
+        if (!t)
+                return -ENOMEM;
+
+        *desktop = t;
+        return 0;
+}
+
 _public_ int sd_session_get_display(const char *session, char **display) {
         return session_get_string(session, "DISPLAY", display);
 }
@@ -587,10 +605,10 @@ _public_ int sd_seat_get_sessions(const char *seat, char ***sessions, uid_t **ui
         }
 
         if (uids && t) {
-                char *w, *state;
+                const char *word, *state;
                 size_t l;
 
-                FOREACH_WORD(w, l, t, state)
+                FOREACH_WORD(word, l, t, state)
                         n++;
 
                 if (n > 0) {
@@ -600,10 +618,10 @@ _public_ int sd_seat_get_sessions(const char *seat, char ***sessions, uid_t **ui
                         if (!b)
                                 return -ENOMEM;
 
-                        FOREACH_WORD(w, l, t, state) {
+                        FOREACH_WORD(word, l, t, state) {
                                 _cleanup_free_ char *k = NULL;
 
-                                k = strndup(w, l);
+                                k = strndup(word, l);
                                 if (!k)
                                         return -ENOMEM;
 
@@ -786,6 +804,48 @@ _public_ int sd_machine_get_class(const char *machine, char **class) {
         return 0;
 }
 
+_public_ int sd_machine_get_ifindices(const char *machine, int **ifindices) {
+        _cleanup_free_ char *netif = NULL;
+        size_t l, allocated = 0, nr = 0;
+        int *ni = NULL;
+        const char *p, *word, *state;
+        int r;
+
+        assert_return(machine_name_is_valid(machine), -EINVAL);
+        assert_return(ifindices, -EINVAL);
+
+        p = strappenda("/run/systemd/machines/", machine);
+        r = parse_env_file(p, NEWLINE, "NETIF", &netif, NULL);
+        if (r < 0)
+                return r;
+        if (!netif) {
+                *ifindices = NULL;
+                return 0;
+        }
+
+        FOREACH_WORD(word, l, netif, state) {
+                char buf[l+1];
+                int ifi;
+
+                *(char*) (mempcpy(buf, word, l)) = 0;
+
+                if (safe_atoi(buf, &ifi) < 0)
+                        continue;
+                if (ifi <= 0)
+                        continue;
+
+                if (!GREEDY_REALLOC(ni, allocated, nr+1)) {
+                        free(ni);
+                        return -ENOMEM;
+                }
+
+                ni[nr++] = ifi;
+        }
+
+        *ifindices = ni;
+        return nr;
+}
+
 static inline int MONITOR_TO_FD(sd_login_monitor *m) {
         return (int) (unsigned long) m - 1;
 }
index ccf2c958167db7d63a359728727ba1913fd71e90..28f88a15703db6c828520ed933f6552b3ba463a9 100644 (file)
@@ -22,7 +22,7 @@
 #include <sys/poll.h>
 #include <string.h>
 
-#include <systemd/sd-login.h>
+#include "systemd/sd-login.h"
 
 #include "util.h"
 #include "strv.h"
diff --git a/src/libsystemd/sd-network/network-util.c b/src/libsystemd/sd-network/network-util.c
new file mode 100644 (file)
index 0000000..48958e8
--- /dev/null
@@ -0,0 +1,37 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "strv.h"
+#include "network-util.h"
+
+bool network_is_online(void) {
+        _cleanup_free_ char *state = NULL;
+        int r;
+
+        r = sd_network_get_operational_state(&state);
+        if (r < 0) /* if we don't know anything, we consider the system online */
+                return true;
+
+        if (STR_IN_SET(state, "routable", "degraded"))
+                return true;
+
+        return false;
+}
diff --git a/src/libsystemd/sd-network/network-util.h b/src/libsystemd/sd-network/network-util.h
new file mode 100644 (file)
index 0000000..02bd545
--- /dev/null
@@ -0,0 +1,30 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Thomas Hindø Paabøl Andersen
+
+  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/>.
+***/
+
+#include "util.h"
+#include "sd-network.h"
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(sd_network_monitor*, sd_network_monitor_unref);
+#define _cleanup_network_monitor_unref_ _cleanup_(sd_network_monitor_unrefp)
+
+bool network_is_online(void);
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
new file mode 100644 (file)
index 0000000..d63e6f9
--- /dev/null
@@ -0,0 +1,344 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2011 Lennart Poettering
+  Copyright 2014 Tom Gundersen
+
+  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/>.
+***/
+
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/inotify.h>
+#include <sys/poll.h>
+#include <net/if.h>
+
+#include "util.h"
+#include "macro.h"
+#include "strv.h"
+#include "fileio.h"
+#include "sd-network.h"
+#include "network-internal.h"
+
+_public_ int sd_network_get_operational_state(char **state) {
+        _cleanup_free_ char *s = NULL;
+        int r;
+
+        assert_return(state, -EINVAL);
+
+        r = parse_env_file("/run/systemd/netif/state", NEWLINE, "OPER_STATE", &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s))
+                return -ENODATA;
+
+        *state = s;
+        s = NULL;
+
+        return 0;
+}
+
+static int network_get_strv(const char *key, char ***ret) {
+        _cleanup_strv_free_ char **a = NULL;
+        _cleanup_free_ char *s = NULL;
+        int r;
+
+        assert_return(ret, -EINVAL);
+
+        r = parse_env_file("/run/systemd/netif/state", NEWLINE, key, &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s)) {
+                *ret = NULL;
+                return 0;
+        }
+
+        a = strv_split(s, " ");
+        if (!a)
+                return -ENOMEM;
+
+        strv_uniq(a);
+        r = strv_length(a);
+
+        *ret = a;
+        a = NULL;
+
+        return r;
+}
+
+_public_ int sd_network_get_dns(char ***ret) {
+        return network_get_strv("DNS", ret);
+}
+
+_public_ int sd_network_get_ntp(char ***ret) {
+        return network_get_strv("NTP", ret);
+}
+
+_public_ int sd_network_get_domains(char ***ret) {
+        return network_get_strv("DOMAINS", ret);
+}
+
+_public_ int sd_network_link_get_setup_state(int ifindex, char **state) {
+        _cleanup_free_ char *s = NULL, *p = NULL;
+        int r;
+
+        assert_return(ifindex > 0, -EINVAL);
+        assert_return(state, -EINVAL);
+
+        if (asprintf(&p, "/run/systemd/netif/links/%d", ifindex) < 0)
+                return -ENOMEM;
+
+        r = parse_env_file(p, NEWLINE, "ADMIN_STATE", &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s))
+                return -ENODATA;
+
+        *state = s;
+        s = NULL;
+
+        return 0;
+}
+
+_public_ int sd_network_link_get_network_file(int ifindex, char **filename) {
+        _cleanup_free_ char *s = NULL, *p = NULL;
+        int r;
+
+        assert_return(ifindex > 0, -EINVAL);
+        assert_return(filename, -EINVAL);
+
+        if (asprintf(&p, "/run/systemd/netif/links/%d", ifindex) < 0)
+                return -ENOMEM;
+
+        r = parse_env_file(p, NEWLINE, "NETWORK_FILE", &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s))
+                return -ENODATA;
+
+        *filename = s;
+        s = NULL;
+
+        return 0;
+}
+
+_public_ int sd_network_link_get_operational_state(int ifindex, char **state) {
+        _cleanup_free_ char *s = NULL, *p = NULL;
+        int r;
+
+        assert_return(ifindex > 0, -EINVAL);
+        assert_return(state, -EINVAL);
+
+        if (asprintf(&p, "/run/systemd/netif/links/%d", ifindex) < 0)
+                return -ENOMEM;
+
+        r = parse_env_file(p, NEWLINE, "OPER_STATE", &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s))
+                return -ENODATA;
+
+        *state = s;
+        s = NULL;
+
+        return 0;
+}
+
+_public_ int sd_network_link_get_llmnr(int ifindex, char **llmnr) {
+        _cleanup_free_ char *s = NULL, *p = NULL;
+        int r;
+
+        assert_return(ifindex > 0, -EINVAL);
+        assert_return(llmnr, -EINVAL);
+
+        if (asprintf(&p, "/run/systemd/netif/links/%d", ifindex) < 0)
+                return -ENOMEM;
+
+        r = parse_env_file(p, NEWLINE, "LLMNR", &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s))
+                return -ENODATA;
+
+        *llmnr = s;
+        s = NULL;
+
+        return 0;
+}
+
+static int network_get_link_strv(const char *key, int ifindex, char ***ret) {
+        _cleanup_free_ char *p = NULL, *s = NULL;
+        _cleanup_strv_free_ char **a = NULL;
+        int r;
+
+        assert_return(ifindex > 0, -EINVAL);
+        assert_return(ret, -EINVAL);
+
+        if (asprintf(&p, "/run/systemd/netif/links/%d", ifindex) < 0)
+                return -ENOMEM;
+
+        r = parse_env_file(p, NEWLINE, key, &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s)) {
+                *ret = NULL;
+                return 0;
+        }
+
+        a = strv_split(s, " ");
+        if (!a)
+                return -ENOMEM;
+
+        strv_uniq(a);
+        r = strv_length(a);
+
+        *ret = a;
+        a = NULL;
+
+        return r;
+}
+
+_public_ int sd_network_link_get_dns(int ifindex, char ***ret) {
+        return network_get_link_strv("DNS", ifindex, ret);
+}
+
+_public_ int sd_network_link_get_ntp(int ifindex, char ***ret) {
+        return network_get_link_strv("NTP", ifindex, ret);
+}
+
+_public_ int sd_network_link_get_domains(int ifindex, char ***ret) {
+        return network_get_link_strv("DOMAINS", ifindex, ret);
+}
+
+_public_ int sd_network_link_get_wildcard_domain(int ifindex) {
+        int r;
+        _cleanup_free_ char *p = NULL, *s = NULL;
+
+        assert_return(ifindex > 0, -EINVAL);
+
+        if (asprintf(&p, "/run/systemd/netif/links/%d", ifindex) < 0)
+                return -ENOMEM;
+
+        r = parse_env_file(p, NEWLINE, "WILDCARD_DOMAIN", &s, NULL);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+        if (isempty(s))
+                return -ENODATA;
+
+        return parse_boolean(s);
+}
+
+static inline int MONITOR_TO_FD(sd_network_monitor *m) {
+        return (int) (unsigned long) m - 1;
+}
+
+static inline sd_network_monitor* FD_TO_MONITOR(int fd) {
+        return (sd_network_monitor*) (unsigned long) (fd + 1);
+}
+
+_public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category) {
+        int fd, k;
+        bool good = false;
+
+        assert_return(m, -EINVAL);
+
+        fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
+        if (fd < 0)
+                return -errno;
+
+        if (!category || streq(category, "links")) {
+                k = inotify_add_watch(fd, "/run/systemd/netif/links/", IN_MOVED_TO|IN_DELETE);
+                if (k < 0) {
+                        safe_close(fd);
+                        return -errno;
+                }
+
+                good = true;
+        }
+
+        if (!good) {
+                close_nointr(fd);
+                return -EINVAL;
+        }
+
+        *m = FD_TO_MONITOR(fd);
+        return 0;
+}
+
+_public_ sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m) {
+        int fd;
+
+        assert_return(m, NULL);
+
+        fd = MONITOR_TO_FD(m);
+        close_nointr(fd);
+
+        return NULL;
+}
+
+_public_ int sd_network_monitor_flush(sd_network_monitor *m) {
+
+        assert_return(m, -EINVAL);
+
+        return flush_fd(MONITOR_TO_FD(m));
+}
+
+_public_ int sd_network_monitor_get_fd(sd_network_monitor *m) {
+
+        assert_return(m, -EINVAL);
+
+        return MONITOR_TO_FD(m);
+}
+
+_public_ int sd_network_monitor_get_events(sd_network_monitor *m) {
+
+        assert_return(m, -EINVAL);
+
+        /* For now we will only return POLLIN here, since we don't
+         * need anything else ever for inotify.  However, let's have
+         * this API to keep our options open should we later on need
+         * it. */
+        return POLLIN;
+}
+
+_public_ int sd_network_monitor_get_timeout(sd_network_monitor *m, uint64_t *timeout_usec) {
+
+        assert_return(m, -EINVAL);
+        assert_return(timeout_usec, -EINVAL);
+
+        /* For now we will only return (uint64_t) -1, since we don't
+         * need any timeout. However, let's have this API to keep our
+         * options open should we later on need it. */
+        *timeout_usec = (uint64_t) -1;
+        return 0;
+}
index 7ade915c2bcfa01449779602b6b6608f718beefe..651fceb79da3fe01935e3b65582a8ea294e14370 100644 (file)
@@ -22,6 +22,7 @@
 #include "path-util.h"
 #include "strv.h"
 #include "sd-path.h"
+#include "missing.h"
 
 static int from_environment(const char *envname, const char *fallback, const char **ret) {
         assert(ret);
@@ -325,7 +326,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
         return -ENOTSUP;
 }
 
-int sd_path_home(uint64_t type, const char *suffix, char **path) {
+_public_ int sd_path_home(uint64_t type, const char *suffix, char **path) {
         char *buffer = NULL, *cc;
         const char *ret;
         int r;
@@ -554,7 +555,7 @@ static int get_search(uint64_t type, char ***list) {
         return -ENOTSUP;
 }
 
-int sd_path_search(uint64_t type, const char *suffix, char ***paths) {
+_public_ int sd_path_search(uint64_t type, const char *suffix, char ***paths) {
         char **l, **i, **j, **n;
         int r;
 
index 10f8ed29a2041785b50b094baef4b7be0629ce01..fea695fcf945e0d9f5a495d7f9104cb124465c73 100644 (file)
@@ -85,9 +85,9 @@ struct sd_resolve {
         pthread_t workers[WORKERS_MAX];
         unsigned n_valid_workers;
 
-        unsigned current_id, current_index;
+        unsigned current_id;
         sd_resolve_query* query_array[QUERIES_MAX];
-        unsigned n_queries, n_done;
+        unsigned n_queries, n_done, n_outstanding;
 
         sd_event_source *event_source;
         sd_event *event;
@@ -526,7 +526,7 @@ static int start_threads(sd_resolve *resolve, unsigned extra) {
         unsigned n;
         int r;
 
-        n = resolve->n_queries + extra - resolve->n_done;
+        n = resolve->n_outstanding + extra;
         n = CLAMP(n, WORKERS_MIN, WORKERS_MAX);
 
         while (resolve->n_valid_workers < n) {
@@ -772,13 +772,15 @@ static int complete_query(sd_resolve *resolve, sd_resolve_query *q) {
                 assert_not_reached("Cannot complete unknown query type");
         }
 
-        resolve->current = sd_resolve_query_unref(q);
+        resolve->current = NULL;
 
         if (q->floating) {
                 resolve_query_disconnect(q);
                 sd_resolve_query_unref(q);
         }
 
+        sd_resolve_query_unref(q);
+
         return r;
 }
 
@@ -852,6 +854,9 @@ static int handle_response(sd_resolve *resolve, const Packet *packet, size_t len
                 return 0;
         }
 
+        assert(resolve->n_outstanding > 0);
+        resolve->n_outstanding--;
+
         q = lookup_query(resolve, resp->id);
         if (!q)
                 return 0;
@@ -1022,21 +1027,17 @@ static int alloc_query(sd_resolve *resolve, bool floating, sd_resolve_query **_q
         if (r < 0)
                 return r;
 
-        while (resolve->query_array[resolve->current_index]) {
-                resolve->current_index++;
+        while (resolve->query_array[resolve->current_id % QUERIES_MAX])
                 resolve->current_id++;
 
-                resolve->current_index %= QUERIES_MAX;
-        }
-
-        q = resolve->query_array[resolve->current_index] = new0(sd_resolve_query, 1);
+        q = resolve->query_array[resolve->current_id % QUERIES_MAX] = new0(sd_resolve_query, 1);
         if (!q)
                 return -ENOMEM;
 
         q->n_ref = 1;
         q->resolve = resolve;
         q->floating = floating;
-        q->id = resolve->current_id;
+        q->id = resolve->current_id++;
 
         if (!floating)
                 sd_resolve_ref(resolve);
@@ -1101,6 +1102,8 @@ _public_ int sd_resolve_getaddrinfo(
                 return -errno;
         }
 
+        resolve->n_outstanding++;
+
         if (_q)
                 *_q = q;
 
@@ -1169,6 +1172,8 @@ _public_ int sd_resolve_getnameinfo(
                 return -errno;
         }
 
+        resolve->n_outstanding++;
+
         if (_q)
                 *_q = q;
 
@@ -1233,6 +1238,8 @@ static int resolve_res(
                 return -errno;
         }
 
+        resolve->n_outstanding++;
+
         if (_q)
                 *_q = q;
 
diff --git a/src/libsystemd/sd-rtnl/local-addresses.c b/src/libsystemd/sd-rtnl/local-addresses.c
new file mode 100644 (file)
index 0000000..c550885
--- /dev/null
@@ -0,0 +1,160 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2008-2011 Lennart Poettering
+  Copyright 2014 Tom Gundersen
+
+  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/>.
+***/
+
+#include "sd-rtnl.h"
+#include "rtnl-util.h"
+#include "macro.h"
+#include "local-addresses.h"
+
+static int address_compare(const void *_a, const void *_b) {
+        const struct local_address *a = _a, *b = _b;
+
+        /* Order lowest scope first, IPv4 before IPv6, lowest interface index first */
+
+        if (a->scope < b->scope)
+                return -1;
+        if (a->scope > b->scope)
+                return 1;
+
+        if (a->family == AF_INET && b->family == AF_INET6)
+                return -1;
+        if (a->family == AF_INET6 && b->family == AF_INET)
+                return 1;
+
+        if (a->ifindex < b->ifindex)
+                return -1;
+        if (a->ifindex > b->ifindex)
+                return 1;
+
+        return 0;
+}
+
+int local_addresses(sd_rtnl *context, int ifindex, struct local_address **ret) {
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_free_ struct local_address *list = NULL;
+        size_t n_list = 0, n_allocated = 0;
+        sd_rtnl_message *m;
+        int r;
+
+        assert(ret);
+
+        if (context)
+                rtnl = sd_rtnl_ref(context);
+        else {
+                r = sd_rtnl_open(&rtnl, 0);
+                if (r < 0)
+                        return r;
+        }
+
+        r = sd_rtnl_message_new_addr(rtnl, &req, RTM_GETADDR, 0, AF_UNSPEC);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_call(rtnl, req, 0, &reply);
+        if (r < 0)
+                return r;
+
+        for (m = reply; m; m = sd_rtnl_message_next(m)) {
+                struct local_address *a;
+                unsigned char flags;
+                uint16_t type;
+                int ifi;
+
+                r = sd_rtnl_message_get_errno(m);
+                if (r < 0)
+                        return r;
+
+                r = sd_rtnl_message_get_type(m, &type);
+                if (r < 0)
+                        return r;
+
+                if (type != RTM_NEWADDR)
+                        continue;
+
+                r = sd_rtnl_message_addr_get_ifindex(m, &ifi);
+                if (r < 0)
+                        return r;
+
+                if (ifindex != 0 && ifi != ifindex)
+                        continue;
+
+                r = sd_rtnl_message_addr_get_flags(m, &flags);
+                if (r < 0)
+                        return r;
+
+                if (flags & IFA_F_DEPRECATED)
+                        continue;
+
+                if (!GREEDY_REALLOC(list, n_allocated, n_list+1))
+                        return -ENOMEM;
+
+                a = list + n_list;
+
+                r = sd_rtnl_message_addr_get_scope(m, &a->scope);
+                if (r < 0)
+                        return r;
+
+                if (ifindex == 0 && (a->scope == RT_SCOPE_HOST || a->scope == RT_SCOPE_NOWHERE))
+                        continue;
+
+                r = sd_rtnl_message_addr_get_family(m, &a->family);
+                if (r < 0)
+                        return r;
+
+                switch (a->family) {
+
+                case AF_INET:
+                        r = sd_rtnl_message_read_in_addr(m, IFA_LOCAL, &a->address.in);
+                        if (r < 0) {
+                                r = sd_rtnl_message_read_in_addr(m, IFA_ADDRESS, &a->address.in);
+                                if (r < 0)
+                                        continue;
+                        }
+                        break;
+
+                case AF_INET6:
+                        r = sd_rtnl_message_read_in6_addr(m, IFA_LOCAL, &a->address.in6);
+                        if (r < 0) {
+                                r = sd_rtnl_message_read_in6_addr(m, IFA_ADDRESS, &a->address.in6);
+                                if (r < 0)
+                                        continue;
+                        }
+                        break;
+
+                default:
+                        continue;
+                }
+
+                a->ifindex = ifi;
+
+                n_list++;
+        };
+
+        if (n_list)
+                qsort(list, n_list, sizeof(struct local_address), address_compare);
+
+        *ret = list;
+        list = NULL;
+
+        return (int) n_list;
+}
diff --git a/src/libsystemd/sd-rtnl/local-addresses.h b/src/libsystemd/sd-rtnl/local-addresses.h
new file mode 100644 (file)
index 0000000..b1ed634
--- /dev/null
@@ -0,0 +1,38 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2008-2011 Lennart Poettering
+
+  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/>.
+***/
+
+#include <inttypes.h>
+#include <sys/types.h>
+#include <assert.h>
+#include <sys/socket.h>
+
+#include "sd-rtnl.h"
+#include "in-addr-util.h"
+
+struct local_address {
+        int family, ifindex;
+        unsigned char scope;
+        union in_addr_union address;
+};
+
+int local_addresses(sd_rtnl *rtnl, int ifindex, struct local_address **ret);
index 4d1b6fb198a6bd38ace8b69e121a5f8f9e050365..b501a52cf1db4280cfdca35c42c1ee786eaf62de 100644 (file)
 #include <netinet/ether.h>
 #include <stdbool.h>
 #include <unistd.h>
-#include <linux/netlink.h>
-#include <linux/veth.h>
-#include <linux/if.h>
-#include <linux/ip.h>
-#include <linux/if_tunnel.h>
-#include <linux/if_bridge.h>
 
 #include "util.h"
 #include "refcnt.h"
@@ -133,7 +127,8 @@ int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope) {
 }
 
 int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret,
-                              uint16_t nlmsg_type, unsigned char rtm_family) {
+                              uint16_t nlmsg_type, int rtm_family,
+                              unsigned char rtm_protocol) {
         struct rtmsg *rtm;
         int r;
 
@@ -154,7 +149,7 @@ int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret,
         rtm->rtm_scope = RT_SCOPE_UNIVERSE;
         rtm->rtm_type = RTN_UNICAST;
         rtm->rtm_table = RT_TABLE_MAIN;
-        rtm->rtm_protocol = RTPROT_BOOT;
+        rtm->rtm_protocol = rtm_protocol;
 
         return 0;
 }
@@ -275,7 +270,7 @@ int sd_rtnl_message_addr_set_scope(sd_rtnl_message *m, unsigned char scope) {
         return 0;
 }
 
-int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, unsigned char *family) {
+int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, int *family) {
         struct ifaddrmsg *ifa;
 
         assert_return(m, -EINVAL);
@@ -352,7 +347,7 @@ int sd_rtnl_message_addr_get_ifindex(sd_rtnl_message *m, int *ifindex) {
 
 int sd_rtnl_message_new_addr(sd_rtnl *rtnl, sd_rtnl_message **ret,
                              uint16_t nlmsg_type, int index,
-                             unsigned char family) {
+                             int family) {
         struct ifaddrmsg *ifa;
         int r;
 
@@ -383,7 +378,7 @@ int sd_rtnl_message_new_addr(sd_rtnl *rtnl, sd_rtnl_message **ret,
 }
 
 int sd_rtnl_message_new_addr_update(sd_rtnl *rtnl, sd_rtnl_message **ret,
-                             int index, unsigned char family) {
+                             int index, int family) {
         int r;
 
         r = sd_rtnl_message_new_addr(rtnl, ret, RTM_NEWADDR, index, family);
@@ -464,6 +459,21 @@ int sd_rtnl_message_link_get_flags(sd_rtnl_message *m, unsigned *flags) {
         return 0;
 }
 
+int sd_rtnl_message_link_get_type(sd_rtnl_message *m, unsigned *type) {
+        struct ifinfomsg *ifi;
+
+        assert_return(m, -EINVAL);
+        assert_return(m->hdr, -EINVAL);
+        assert_return(rtnl_message_type_is_link(m->hdr->nlmsg_type), -EINVAL);
+        assert_return(type, -EINVAL);
+
+        ifi = NLMSG_DATA(m->hdr);
+
+        *type = ifi->ifi_type;
+
+        return 0;
+}
+
 /* If successful the updated message will be correctly aligned, if
    unsuccessful the old message is untouched. */
 static int add_rtattr(sd_rtnl_message *m, unsigned short type, const void *data, size_t data_length) {
@@ -515,7 +525,6 @@ static int add_rtattr(sd_rtnl_message *m, unsigned short type, const void *data,
                 /* if no data was passed, make sure we still initialize the padding
                    note that we can have data_length > 0 (used by some containers) */
                 padding = RTA_DATA(rta);
-                data_length = 0;
         }
 
         /* make sure also the padding at the end of the message is initialized */
@@ -786,7 +795,7 @@ int rtnl_message_read_internal(sd_rtnl_message *m, unsigned short type, void **d
         return RTA_PAYLOAD(rta);
 }
 
-int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, char **data) {
+int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, const char **data) {
         int r;
         void *attr_data;
 
@@ -800,7 +809,7 @@ int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, char **
         else if (strnlen(attr_data, r) >= (size_t) r)
                 return -EIO;
 
-        *data = (char *) attr_data;
+        *data = (const char *) attr_data;
 
         return 0;
 }
@@ -962,7 +971,7 @@ int sd_rtnl_message_enter_container(sd_rtnl_message *m, unsigned short type) {
                         return r;
         } else if (nl_type->type == NLA_UNION) {
                 const NLTypeSystemUnion *type_system_union;
-                char *key;
+                const char *key;
 
                 r = type_system_get_type_system_union(m->container_type_system[m->n_containers],
                                                       &type_system_union,
@@ -1116,10 +1125,13 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
         assert(iov);
 
         r = recvmsg(fd, &msg, MSG_TRUNC | (peek ? MSG_PEEK : 0));
-        if (r < 0)
+        if (r < 0) {
                 /* no data */
+                if (errno == ENOBUFS)
+                        log_debug("rtnl: kernel receive buffer overrun");
+
                 return (errno == EAGAIN) ? 0 : -errno;
-        else if (r == 0)
+        else if (r == 0)
                 /* connection was closed by the kernel */
                 return -ECONNRESET;
 
index 9c3430d1bf88a9c039bbefcc24543dcbcc4fef36..df9a45dab1bc35d76880214f79a2536ac22985ae 100644 (file)
@@ -90,15 +90,12 @@ static const NLType rtnl_link_info_data_vxlan_types[IFLA_VXLAN_MAX+1] = {
 static const NLType rtnl_link_info_data_bond_types[IFLA_BOND_MAX + 1] = {
         [IFLA_BOND_MODE]                = { .type = NLA_U8 },
         [IFLA_BOND_ACTIVE_SLAVE]        = { .type = NLA_U32 },
-#ifdef IFLA_BOND_MIIMON
         [IFLA_BOND_MIIMON]              = { .type = NLA_U32 },
         [IFLA_BOND_UPDELAY]             = { .type = NLA_U32 },
         [IFLA_BOND_DOWNDELAY]           = { .type = NLA_U32 },
         [IFLA_BOND_USE_CARRIER]         = { .type = NLA_U8 },
         [IFLA_BOND_ARP_INTERVAL]        = { .type = NLA_U32 },
-/*
         [IFLA_BOND_ARP_IP_TARGET]       = { .type = NLA_NESTED },
-*/
         [IFLA_BOND_ARP_VALIDATE]        = { .type = NLA_U32 },
         [IFLA_BOND_ARP_ALL_TARGETS]     = { .type = NLA_U32 },
         [IFLA_BOND_PRIMARY]             = { .type = NLA_U32 },
@@ -113,10 +110,7 @@ static const NLType rtnl_link_info_data_bond_types[IFLA_BOND_MAX + 1] = {
         [IFLA_BOND_PACKETS_PER_SLAVE]   = { .type = NLA_U32 },
         [IFLA_BOND_AD_LACP_RATE]        = { .type = NLA_U8 },
         [IFLA_BOND_AD_SELECT]           = { .type = NLA_U8 },
-/*
         [IFLA_BOND_AD_INFO]             = { .type = NLA_NESTED },
-*/
-#endif
 };
 
 static const NLType rtnl_link_info_data_iptun_types[IFLA_IPTUN_MAX + 1] = {
@@ -155,25 +149,6 @@ static const NLType rtnl_link_info_data_ipvti_types[IFLA_VTI_MAX + 1] = {
         [IFLA_VTI_REMOTE]       = { .type = NLA_IN_ADDR  },
 };
 
-typedef enum NLUnionLinkInfoData {
-        NL_UNION_LINK_INFO_DATA_BOND,
-        NL_UNION_LINK_INFO_DATA_BRIDGE,
-        NL_UNION_LINK_INFO_DATA_VLAN,
-        NL_UNION_LINK_INFO_DATA_VETH,
-        NL_UNION_LINK_INFO_DATA_DUMMY,
-        NL_UNION_LINK_INFO_DATA_MACVLAN,
-        NL_UNION_LINK_INFO_DATA_VXLAN,
-        NL_UNION_LINK_INFO_DATA_IPIP_TUNNEL,
-        NL_UNION_LINK_INFO_DATA_IPGRE_TUNNEL,
-        NL_UNION_LINK_INFO_DATA_SIT_TUNNEL,
-        NL_UNION_LINK_INFO_DATA_VTI_TUNNEL,
-        _NL_UNION_LINK_INFO_DATA_MAX,
-        _NL_UNION_LINK_INFO_DATA_INVALID = -1
-} NLUnionLinkInfoData;
-
-const char *nl_union_link_info_data_to_string(NLUnionLinkInfoData p) _const_;
-NLUnionLinkInfoData nl_union_link_info_data_from_string(const char *p) _pure_;
-
 /* these strings must match the .kind entries in the kernel */
 static const char* const nl_union_link_info_data_table[_NL_UNION_LINK_INFO_DATA_MAX] = {
         [NL_UNION_LINK_INFO_DATA_BOND] = "bond",
index 7ce9597c847151eb16c0ca2839080ec77e081988..8621746015924815cb14ac4c088afbb8482283c6 100644 (file)
@@ -63,3 +63,22 @@ int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, ui
 int type_system_get_type_system(const NLTypeSystem *type_system, const NLTypeSystem **ret, uint16_t type);
 int type_system_get_type_system_union(const NLTypeSystem *type_system, const NLTypeSystemUnion **ret, uint16_t type);
 int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_union, const NLTypeSystem **ret, const char *key);
+
+typedef enum NLUnionLinkInfoData {
+        NL_UNION_LINK_INFO_DATA_BOND,
+        NL_UNION_LINK_INFO_DATA_BRIDGE,
+        NL_UNION_LINK_INFO_DATA_VLAN,
+        NL_UNION_LINK_INFO_DATA_VETH,
+        NL_UNION_LINK_INFO_DATA_DUMMY,
+        NL_UNION_LINK_INFO_DATA_MACVLAN,
+        NL_UNION_LINK_INFO_DATA_VXLAN,
+        NL_UNION_LINK_INFO_DATA_IPIP_TUNNEL,
+        NL_UNION_LINK_INFO_DATA_IPGRE_TUNNEL,
+        NL_UNION_LINK_INFO_DATA_SIT_TUNNEL,
+        NL_UNION_LINK_INFO_DATA_VTI_TUNNEL,
+        _NL_UNION_LINK_INFO_DATA_MAX,
+        _NL_UNION_LINK_INFO_DATA_INVALID = -1
+} NLUnionLinkInfoData;
+
+const char *nl_union_link_info_data_to_string(NLUnionLinkInfoData p) _const_;
+NLUnionLinkInfoData nl_union_link_info_data_from_string(const char *p) _pure_;
index c8b20d109e476c7ea589f7d79a30654e3d158101..1ec1fa8d27905c7b5a77b7765983624a3a877da4 100644 (file)
@@ -26,7 +26,7 @@
 #include "rtnl-util.h"
 #include "rtnl-internal.h"
 
-int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name) {
+int rtnl_set_link_name(sd_rtnl **rtnl, int ifindex, const char *name) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *message = NULL;
         int r;
 
@@ -34,7 +34,13 @@ int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name) {
         assert(ifindex > 0);
         assert(name);
 
-        r = sd_rtnl_message_new_link(rtnl, &message, RTM_SETLINK, ifindex);
+        if (!*rtnl) {
+                r = sd_rtnl_open(rtnl, 0);
+                if (r < 0)
+                        return r;
+        }
+
+        r = sd_rtnl_message_new_link(*rtnl, &message, RTM_SETLINK, ifindex);
         if (r < 0)
                 return r;
 
@@ -42,17 +48,16 @@ int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name) {
         if (r < 0)
                 return r;
 
-        r = sd_rtnl_call(rtnl, message, 0, NULL);
+        r = sd_rtnl_call(*rtnl, message, 0, NULL);
         if (r < 0)
                 return r;
 
         return 0;
 }
 
-int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias,
+int rtnl_set_link_properties(sd_rtnl **rtnl, int ifindex, const char *alias,
                              const struct ether_addr *mac, unsigned mtu) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *message = NULL;
-        bool need_update = false;
         int r;
 
         assert(rtnl);
@@ -61,7 +66,13 @@ int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias,
         if (!alias && !mac && mtu == 0)
                 return 0;
 
-        r = sd_rtnl_message_new_link(rtnl, &message, RTM_SETLINK, ifindex);
+        if (!*rtnl) {
+                r = sd_rtnl_open(rtnl, 0);
+                if (r < 0)
+                        return r;
+        }
+
+        r = sd_rtnl_message_new_link(*rtnl, &message, RTM_SETLINK, ifindex);
         if (r < 0)
                 return r;
 
@@ -69,32 +80,23 @@ int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias,
                 r = sd_rtnl_message_append_string(message, IFLA_IFALIAS, alias);
                 if (r < 0)
                         return r;
-
-                need_update = true;
-
         }
 
         if (mac) {
                 r = sd_rtnl_message_append_ether_addr(message, IFLA_ADDRESS, mac);
                 if (r < 0)
                         return r;
-
-                need_update = true;
         }
 
         if (mtu > 0) {
                 r = sd_rtnl_message_append_u32(message, IFLA_MTU, mtu);
                 if (r < 0)
                         return r;
-
-                need_update = true;
         }
 
-        if  (need_update) {
-                r = sd_rtnl_call(rtnl, message, 0, NULL);
-                if (r < 0)
-                        return r;
-        }
+        r = sd_rtnl_call(*rtnl, message, 0, NULL);
+        if (r < 0)
+                return r;
 
         return 0;
 }
@@ -153,3 +155,13 @@ bool rtnl_message_type_is_addr(uint16_t type) {
                         return false;
         }
 }
+
+int rtnl_log_parse_error(int r) {
+        log_error("Failed to parse netlink message: %s", strerror(-r));
+        return r;
+}
+
+int rtnl_log_create_error(int r) {
+        log_error("Failed to create netlink message: %s", strerror(-r));
+        return r;
+}
index 06d5699c3a24d00d783aa5af5f020888b29088f7..fa3592df9dfb89f0f32b462995e9aef56034077d 100644 (file)
@@ -34,8 +34,11 @@ bool rtnl_message_type_is_link(uint16_t type);
 bool rtnl_message_type_is_addr(uint16_t type);
 bool rtnl_message_type_is_route(uint16_t type);
 
-int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name);
-int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias, const struct ether_addr *mac, unsigned mtu);
+int rtnl_set_link_name(sd_rtnl **rtnl, int ifindex, const char *name);
+int rtnl_set_link_properties(sd_rtnl **rtnl, int ifindex, const char *alias, const struct ether_addr *mac, unsigned mtu);
+
+int rtnl_log_parse_error(int r);
+int rtnl_log_create_error(int r);
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl*, sd_rtnl_unref);
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl_message*, sd_rtnl_message_unref);
index b91d08012ad78aaf52a621fcf59691be876e2a7c..b7f1afe905066bf2b388af097614259fb13c82b5 100644 (file)
@@ -473,7 +473,7 @@ static usec_t calc_elapse(uint64_t usec) {
 static int rtnl_poll(sd_rtnl *rtnl, bool need_more, uint64_t timeout_usec) {
         struct pollfd p[1] = {};
         struct timespec ts;
-        usec_t m = (usec_t) -1;
+        usec_t m = USEC_INFINITY;
         int r, e;
 
         assert(rtnl);
@@ -557,7 +557,7 @@ int sd_rtnl_call_async(sd_rtnl *nl,
         assert_return(callback, -EINVAL);
         assert_return(!rtnl_pid_changed(nl), -ECHILD);
 
-        r = hashmap_ensure_allocated(&nl->reply_callbacks, uint64_hash_func, uint64_compare_func);
+        r = hashmap_ensure_allocated(&nl->reply_callbacks, &uint64_hash_ops);
         if (r < 0)
                 return r;
 
@@ -680,7 +680,7 @@ int sd_rtnl_call(sd_rtnl *rtnl,
                 if (r < 0)
                         return r;
                 if (r > 0)
-                        /* receieved message, so try to process straight away */
+                        /* received message, so try to process straight away */
                         continue;
 
                 if (timeout > 0) {
@@ -859,6 +859,10 @@ int sd_rtnl_attach_event(sd_rtnl *rtnl, sd_event *event, int priority) {
         if (r < 0)
                 goto fail;
 
+        r = sd_event_source_set_name(rtnl->io_event_source, "rtnl-receive-message");
+        if (r < 0)
+                goto fail;
+
         r = sd_event_source_set_prepare(rtnl->io_event_source, prepare_callback);
         if (r < 0)
                 goto fail;
@@ -871,10 +875,18 @@ int sd_rtnl_attach_event(sd_rtnl *rtnl, sd_event *event, int priority) {
         if (r < 0)
                 goto fail;
 
+        r = sd_event_source_set_name(rtnl->time_event_source, "rtnl-timer");
+        if (r < 0)
+                goto fail;
+
         r = sd_event_add_exit(rtnl->event, &rtnl->exit_event_source, exit_callback, rtnl);
         if (r < 0)
                 goto fail;
 
+        r = sd_event_source_set_name(rtnl->exit_event_source, "rtnl-exit");
+        if (r < 0)
+                goto fail;
+
         return 0;
 
 fail:
index e6ba08e076b122c692d98f357f80ea0595848ddb..46b5bb20c38d82ecf9366dfe27da69f75cdd1c3f 100644 (file)
@@ -34,8 +34,9 @@
 static void test_link_configure(sd_rtnl *rtnl, int ifindex) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *message;
         const char *mac = "98:fe:94:3f:c6:18", *name = "test";
+        char buffer[ETHER_ADDR_TO_STRING_MAX];
         unsigned int mtu = 1450, mtu_out;
-        char *name_out;
+        const char *name_out;
         struct ether_addr mac_out;
 
         /* we'd really like to test NEWLINK, but let's not mess with the running kernel */
@@ -51,7 +52,7 @@ static void test_link_configure(sd_rtnl *rtnl, int ifindex) {
         assert_se(streq(name, name_out));
 
         assert_se(sd_rtnl_message_read_ether_addr(message, IFLA_ADDRESS, &mac_out) >= 0);
-        assert_se(streq(mac, ether_ntoa(&mac_out)));
+        assert_se(streq(mac, ether_addr_to_string(&mac_out, buffer)));
 
         assert_se(sd_rtnl_message_read_u32(message, IFLA_MTU, &mtu_out) >= 0);
         assert_se(mtu == mtu_out);
@@ -61,7 +62,7 @@ static void test_link_get(sd_rtnl *rtnl, int ifindex) {
         sd_rtnl_message *m;
         sd_rtnl_message *r;
         unsigned int mtu = 1500;
-        char *str_data;
+        const char *str_data;
         uint8_t u8_data;
         uint32_t u32_data;
         struct ether_addr eth_data;
@@ -108,7 +109,7 @@ static void test_address_get(sd_rtnl *rtnl, int ifindex) {
         sd_rtnl_message *r;
         struct in_addr in_data;
         struct ifa_cacheinfo cache;
-        char *label;
+        const char *label;
 
         assert_se(sd_rtnl_message_new_addr(rtnl, &m, RTM_GETADDR, ifindex, AF_INET) >= 0);
         assert_se(m);
@@ -132,7 +133,7 @@ static void test_route(void) {
         uint32_t index = 2, u32_data;
         int r;
 
-        r = sd_rtnl_message_new_route(NULL, &req, RTM_NEWROUTE, AF_INET);
+        r = sd_rtnl_message_new_route(NULL, &req, RTM_NEWROUTE, AF_INET, RTPROT_STATIC);
         if (r < 0) {
                 log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r));
                 return;
@@ -174,7 +175,8 @@ static void test_multiple(void) {
 }
 
 static int link_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
-        char *ifname = userdata, *data;
+        char *ifname = userdata;
+        const char *data;
 
         assert_se(rtnl);
         assert_se(m);
@@ -277,7 +279,7 @@ static void test_container(void) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
         uint16_t u16_data;
         uint32_t u32_data;
-        char *string_data;
+        const char *string_data;
 
         assert_se(sd_rtnl_message_new_link(NULL, &m, RTM_NEWLINK, 0) >= 0);
 
@@ -333,8 +335,8 @@ static void test_get_addresses(sd_rtnl *rtnl) {
 
         for (m = reply; m; m = sd_rtnl_message_next(m)) {
                 uint16_t type;
-                unsigned char family, scope, flags;
-                int ifindex;
+                unsigned char scope, flags;
+                int family, ifindex;
 
                 assert_se(sd_rtnl_message_get_type(m, &type) >= 0);
                 assert_se(type == RTM_NEWADDR);
@@ -355,7 +357,7 @@ int main(void) {
         sd_rtnl *rtnl;
         sd_rtnl_message *m;
         sd_rtnl_message *r;
-        char *string_data;
+        const char *string_data;
         int if_loopback;
         uint16_t type;
 
index 3a64f24fb89f91b24725ea801710a7e2c2d138f3..26993740728268fbf3e02d09685f87315d563f50 100644 (file)
@@ -161,7 +161,7 @@ _public_ dev_t udev_device_get_devnum(struct udev_device *udev_device)
         return udev_device->devnum;
 }
 
-static int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum)
+int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum)
 {
         char num[32];
 
@@ -644,12 +644,16 @@ struct udev_device *udev_device_new(struct udev *udev)
         struct udev_device *udev_device;
         struct udev_list_entry *list_entry;
 
-        if (udev == NULL)
+        if (udev == NULL) {
+                errno = EINVAL;
                 return NULL;
+        }
 
         udev_device = new0(struct udev_device, 1);
-        if (udev_device == NULL)
+        if (udev_device == NULL) {
+                errno = ENOMEM;
                 return NULL;
+        }
         udev_device->refcount = 1;
         udev_device->udev = udev;
         udev_list_init(udev, &udev_device->devlinks_list, true);
@@ -688,22 +692,30 @@ _public_ struct udev_device *udev_device_new_from_syspath(struct udev *udev, con
         struct stat statbuf;
         struct udev_device *udev_device;
 
-        if (udev == NULL)
+        if (udev == NULL) {
+                errno = EINVAL;
                 return NULL;
-        if (syspath == NULL)
+        }
+
+        if (syspath == NULL) {
+                errno = EINVAL;
                 return NULL;
+        }
 
         /* path starts in sys */
         if (!startswith(syspath, "/sys")) {
                 udev_dbg(udev, "not in sys :%s\n", syspath);
+                errno = EINVAL;
                 return NULL;
         }
 
         /* path is not a root directory */
         subdir = syspath + strlen("/sys");
         pos = strrchr(subdir, '/');
-        if (pos == NULL || pos[1] == '\0' || pos < &subdir[2])
+        if (pos == NULL || pos[1] == '\0' || pos < &subdir[2]) {
+                errno = EINVAL;
                 return NULL;
+        }
 
         /* resolve possible symlink to real path */
         strscpy(path, sizeof(path), syspath);
@@ -757,8 +769,10 @@ _public_ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char
                 type_str = "block";
         else if (type == 'c')
                 type_str = "char";
-        else
+        else {
+                errno = EINVAL;
                 return NULL;
+        }
 
         /* use /sys/dev/{block,char}/<maj>:<min> link */
         snprintf(path, sizeof(path), "/sys/dev/%s/%u:%u",
@@ -804,8 +818,10 @@ _public_ struct udev_device *udev_device_new_from_device_id(struct udev *udev, c
                 int ifindex;
 
                 ifindex = strtoul(&id[1], NULL, 10);
-                if (ifindex <= 0)
+                if (ifindex <= 0) {
+                        errno = EINVAL;
                         return NULL;
+                }
 
                 sk = socket(PF_INET, SOCK_DGRAM, 0);
                 if (sk < 0)
@@ -823,18 +839,24 @@ _public_ struct udev_device *udev_device_new_from_device_id(struct udev *udev, c
                         return NULL;
                 if (udev_device_get_ifindex(dev) == ifindex)
                         return dev;
+
+                /* this is racy, so we may end up with the wrong device */
                 udev_device_unref(dev);
+                errno = ENODEV;
                 return NULL;
         }
         case '+':
                 strscpy(subsys, sizeof(subsys), &id[1]);
                 sysname = strchr(subsys, ':');
-                if (sysname == NULL)
+                if (sysname == NULL) {
+                        errno = EINVAL;
                         return NULL;
+                }
                 sysname[0] = '\0';
                 sysname = &sysname[1];
                 return udev_device_new_from_subsystem_sysname(udev, subsys, sysname);
         default:
+                errno = EINVAL;
                 return NULL;
         }
 }
@@ -898,7 +920,9 @@ _public_ struct udev_device *udev_device_new_from_subsystem_sysname(struct udev
                         strscpyl(path, sizeof(path), "/sys/bus/", subsys, "/drivers/", driver, NULL);
                         if (stat(path, &statbuf) == 0)
                                 goto found;
-                }
+                } else
+                        errno = EINVAL;
+
                 goto out;
         }
 
@@ -974,6 +998,8 @@ static struct udev_device *device_new_from_parent(struct udev_device *udev_devic
                 if (udev_device_parent != NULL)
                         return udev_device_parent;
         }
+
+        errno = ENOENT;
         return NULL;
 }
 
@@ -997,8 +1023,10 @@ static struct udev_device *device_new_from_parent(struct udev_device *udev_devic
  **/
 _public_ struct udev_device *udev_device_get_parent(struct udev_device *udev_device)
 {
-        if (udev_device == NULL)
+        if (udev_device == NULL) {
+                errno = EINVAL;
                 return NULL;
+        }
         if (!udev_device->parent_set) {
                 udev_device->parent_set = true;
                 udev_device->parent_device = device_new_from_parent(udev_device);
@@ -1031,8 +1059,10 @@ _public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struc
 {
         struct udev_device *parent;
 
-        if (subsystem == NULL)
+        if (subsystem == NULL) {
+                errno = EINVAL;
                 return NULL;
+        }
 
         parent = udev_device_get_parent(udev_device);
         while (parent != NULL) {
@@ -1049,6 +1079,10 @@ _public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struc
                 }
                 parent = udev_device_get_parent(parent);
         }
+
+        if (!parent)
+                errno = ENOENT;
+
         return parent;
 }
 
@@ -1698,9 +1732,14 @@ void udev_device_set_is_initialized(struct udev_device *udev_device)
         udev_device->is_initialized = true;
 }
 
+static bool is_valid_tag(const char *tag)
+{
+        return !strchr(tag, ':') && !strchr(tag, ' ');
+}
+
 int udev_device_add_tag(struct udev_device *udev_device, const char *tag)
 {
-        if (strchr(tag, ':') != NULL || strchr(tag, ' ') != NULL)
+        if (!is_valid_tag(tag))
                 return -EINVAL;
         udev_device->tags_uptodate = false;
         if (udev_list_entry_add(&udev_device->tags_list, tag, NULL) != NULL)
@@ -1708,6 +1747,20 @@ int udev_device_add_tag(struct udev_device *udev_device, const char *tag)
         return -ENOMEM;
 }
 
+void udev_device_remove_tag(struct udev_device *udev_device, const char *tag)
+{
+        struct udev_list_entry *e;
+
+        if (!is_valid_tag(tag))
+                return;
+        e = udev_list_get_entry(&udev_device->tags_list);
+        e = udev_list_entry_get_by_name(e, tag);
+        if (e) {
+                udev_device->tags_uptodate = false;
+                udev_list_entry_delete(e);
+        }
+}
+
 void udev_device_cleanup_tags_list(struct udev_device *udev_device)
 {
         udev_device->tags_uptodate = false;
index e0d4d7ca8f7c615fa1cd768ea9d31b08f5729b5b..a1cfc0bd5a6396bcb433c811bf45fd8e9fc50d4a 100644 (file)
@@ -256,6 +256,11 @@ static int trie_search_f(struct udev_hwdb *hwdb, const char *search) {
         return 0;
 }
 
+static const char hwdb_bin_paths[] =
+    "/etc/udev/hwdb.bin\0"
+    UDEVLIBEXECDIR "/hwdb.bin\0";
+
+
 /**
  * udev_hwdb_new:
  * @udev: udev library context
@@ -266,6 +271,7 @@ static int trie_search_f(struct udev_hwdb *hwdb, const char *search) {
  **/
 _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) {
         struct udev_hwdb *hwdb;
+        const char *hwdb_bin_path;
         const char sig[] = HWDB_SIG;
 
         hwdb = new0(struct udev_hwdb, 1);
@@ -275,37 +281,50 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) {
         hwdb->refcount = 1;
         udev_list_init(udev, &hwdb->properties_list, true);
 
-        hwdb->f = fopen("/etc/udev/hwdb.bin", "re");
+        /* find hwdb.bin in hwdb_bin_paths */
+        NULSTR_FOREACH(hwdb_bin_path, hwdb_bin_paths) {
+                hwdb->f = fopen(hwdb_bin_path, "re");
+                if (hwdb->f)
+                        break;
+                else if (errno == ENOENT)
+                        continue;
+                else {
+                        udev_dbg(udev, "error reading %s: %m", hwdb_bin_path);
+                        udev_hwdb_unref(hwdb);
+                        return NULL;
+                }
+        }
+
         if (!hwdb->f) {
-                udev_dbg(udev, "error reading /etc/udev/hwdb.bin: %m");
+                udev_err(udev, "hwdb.bin does not exist, please run udevadm hwdb --update");
                 udev_hwdb_unref(hwdb);
                 return NULL;
         }
 
         if (fstat(fileno(hwdb->f), &hwdb->st) < 0 ||
             (size_t)hwdb->st.st_size < offsetof(struct trie_header_f, strings_len) + 8) {
-                udev_dbg(udev, "error reading /etc/udev/hwdb.bin: %m");
+                udev_dbg(udev, "error reading %s: %m", hwdb_bin_path);
                 udev_hwdb_unref(hwdb);
                 return NULL;
         }
 
         hwdb->map = mmap(0, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0);
         if (hwdb->map == MAP_FAILED) {
-                udev_dbg(udev, "error mapping /etc/udev/hwdb.bin: %m");
+                udev_dbg(udev, "error mapping %s: %m", hwdb_bin_path);
                 udev_hwdb_unref(hwdb);
                 return NULL;
         }
 
         if (memcmp(hwdb->map, sig, sizeof(hwdb->head->signature)) != 0 ||
             (size_t)hwdb->st.st_size != le64toh(hwdb->head->file_size)) {
-                udev_dbg(udev, "error recognizing the format of /etc/udev/hwdb.bin");
+                udev_dbg(udev, "error recognizing the format of %s", hwdb_bin_path);
                 udev_hwdb_unref(hwdb);
                 return NULL;
         }
 
         udev_dbg(udev, "=== trie on-disk ===\n");
         udev_dbg(udev, "tool version:          %"PRIu64, le64toh(hwdb->head->tool_version));
-        udev_dbg(udev, "file size:        %8zu bytes\n", hwdb->st.st_size);
+        udev_dbg(udev, "file size:        %8"PRIu64" bytes\n", hwdb->st.st_size);
         udev_dbg(udev, "header size       %8"PRIu64" bytes\n", le64toh(hwdb->head->header_size));
         udev_dbg(udev, "strings           %8"PRIu64" bytes\n", le64toh(hwdb->head->strings_len));
         udev_dbg(udev, "nodes             %8"PRIu64" bytes\n", le64toh(hwdb->head->nodes_len));
@@ -352,14 +371,25 @@ _public_ struct udev_hwdb *udev_hwdb_unref(struct udev_hwdb *hwdb) {
 }
 
 bool udev_hwdb_validate(struct udev_hwdb *hwdb) {
+        bool found = false;
+        const char* p;
         struct stat st;
 
         if (!hwdb)
                 return false;
         if (!hwdb->f)
                 return false;
-        if (stat("/etc/udev/hwdb.bin", &st) < 0)
+
+        /* if hwdb.bin doesn't exist anywhere, we need to update */
+        NULSTR_FOREACH(p, hwdb_bin_paths) {
+                if (stat(p, &st) >= 0) {
+                        found = true;
+                        break;
+                }
+        }
+        if (!found)
                 return true;
+
         if (timespec_load(&hwdb->st.st_mtim) != timespec_load(&st.st_mtim))
                 return true;
         return false;
index 186e5e1e87360e46ce458331138fa9686c7a5db7..59698b85b70774f22bec0e73214e58b28b1d2cca 100644 (file)
@@ -412,7 +412,10 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
         }
 
         /* enable receiving of sender credentials */
-        setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        err = setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        if (err < 0)
+                udev_err(udev_monitor->udev, "setting SO_PASSCRED failed: %m\n");
+
         return 0;
 }
 
index af0f125c7391c8633b5811346a90e2b14c002d3c..7e11f7326d708c9f9e8bd092b662f8cc0ebd4d31 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef _LIBUDEV_PRIVATE_H_
 #define _LIBUDEV_PRIVATE_H_
 
-#include <syslog.h>
 #include <signal.h>
 #include <stdint.h>
 #include <stdbool.h>
@@ -60,6 +59,7 @@ uid_t udev_device_get_devnode_uid(struct udev_device *udev_device);
 gid_t udev_device_get_devnode_gid(struct udev_device *udev_device);
 int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem);
 int udev_device_set_syspath(struct udev_device *udev_device, const char *syspath);
+int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum);
 int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink);
 void udev_device_cleanup_devlinks_list(struct udev_device *udev_device);
 struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value);
@@ -74,6 +74,7 @@ const char *udev_device_get_devpath_old(struct udev_device *udev_device);
 const char *udev_device_get_id_filename(struct udev_device *udev_device);
 void udev_device_set_is_initialized(struct udev_device *udev_device);
 int udev_device_add_tag(struct udev_device *udev_device, const char *tag);
+void udev_device_remove_tag(struct udev_device *udev_device, const char *tag);
 void udev_device_cleanup_tags_list(struct udev_device *udev_device);
 usec_t udev_device_get_usec_initialized(struct udev_device *udev_device);
 void udev_device_set_usec_initialized(struct udev_device *udev_device, usec_t usec_initialized);
@@ -167,10 +168,6 @@ unsigned int util_string_hash32(const char *key);
 uint64_t util_string_bloom64(const char *str);
 
 /* libudev-util-private.c */
-int util_delete_path(struct udev *udev, const char *path);
-uid_t util_lookup_user(struct udev *udev, const char *user);
-gid_t util_lookup_group(struct udev *udev, const char *group);
 int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value);
-ssize_t print_kmsg(const char *fmt, ...) _printf_(1, 2);
 
 #endif
index d9cdde1751483e8dbad65a5b10b129ba40991836..f3fdf3b5aa7843fd91789ab732ec370002f1150f 100644 (file)
  * Utilities useful when dealing with devices and device node names.
  */
 
-int util_delete_path(struct udev *udev, const char *path)
-{
-        char p[UTIL_PATH_SIZE];
-        char *pos;
-        int err = 0;
-
-        if (path[0] == '/')
-                while(path[1] == '/')
-                        path++;
-        strscpy(p, sizeof(p), path);
-        pos = strrchr(p, '/');
-        if (pos == p || pos == NULL)
-                return 0;
-
-        for (;;) {
-                *pos = '\0';
-                pos = strrchr(p, '/');
-
-                /* don't remove the last one */
-                if ((pos == p) || (pos == NULL))
-                        break;
-
-                err = rmdir(p);
-                if (err < 0) {
-                        if (errno == ENOENT)
-                                err = 0;
-                        break;
-                }
-        }
-        return err;
-}
-
-uid_t util_lookup_user(struct udev *udev, const char *user)
-{
-        char *endptr;
-        struct passwd pwbuf;
-        struct passwd *pw;
-        uid_t uid;
-        size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-        char *buf = alloca(buflen);
-
-        if (streq(user, "root"))
-                return 0;
-        uid = strtoul(user, &endptr, 10);
-        if (endptr[0] == '\0')
-                return uid;
-
-        errno = getpwnam_r(user, &pwbuf, buf, buflen, &pw);
-        if (pw != NULL)
-                return pw->pw_uid;
-        if (errno == 0 || errno == ENOENT || errno == ESRCH)
-                udev_err(udev, "specified user '%s' unknown\n", user);
-        else
-                udev_err(udev, "error resolving user '%s': %m\n", user);
-        return 0;
-}
-
-gid_t util_lookup_group(struct udev *udev, const char *group)
-{
-        char *endptr;
-        struct group grbuf;
-        struct group *gr;
-        gid_t gid = 0;
-        size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-        char *buf = NULL;
-
-        if (streq(group, "root"))
-                return 0;
-        gid = strtoul(group, &endptr, 10);
-        if (endptr[0] == '\0')
-                return gid;
-        gid = 0;
-        for (;;) {
-                char *newbuf;
-
-                newbuf = realloc(buf, buflen);
-                if (!newbuf)
-                        break;
-                buf = newbuf;
-                errno = getgrnam_r(group, &grbuf, buf, buflen, &gr);
-                if (gr != NULL) {
-                        gid = gr->gr_gid;
-                } else if (errno == ERANGE) {
-                        buflen *= 2;
-                        continue;
-                } else if (errno == 0 || errno == ENOENT || errno == ESRCH) {
-                        udev_err(udev, "specified group '%s' unknown\n", group);
-                } else {
-                        udev_err(udev, "error resolving group '%s': %m\n", group);
-                }
-                break;
-        }
-        free(buf);
-        return gid;
-}
-
 /* handle "[<SUBSYSTEM>/<KERNEL>]<attribute>" format */
 int util_resolve_subsys_kernel(struct udev *udev, const char *string,
                                char *result, size_t maxsize, int read_value)
@@ -258,13 +162,8 @@ int util_log_priority(const char *priority)
         prio = strtol(priority, &endptr, 10);
         if (endptr[0] == '\0' || isspace(endptr[0]))
                 return prio;
-        if (startswith(priority, "err"))
-                return LOG_ERR;
-        if (startswith(priority, "info"))
-                return LOG_INFO;
-        if (startswith(priority, "debug"))
-                return LOG_DEBUG;
-        return 0;
+
+        return log_level_from_string(priority);
 }
 
 size_t util_path_encode(const char *src, char *dest, size_t size)
@@ -415,28 +314,3 @@ uint64_t util_string_bloom64(const char *str)
         bits |= 1LLU << ((hash >> 18) & 63);
         return bits;
 }
-
-ssize_t print_kmsg(const char *fmt, ...)
-{
-        _cleanup_close_ int fd = -1;
-        va_list ap;
-        char text[1024];
-        ssize_t len;
-        ssize_t ret;
-
-        fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC);
-        if (fd < 0)
-                return -errno;
-
-        len = snprintf(text, sizeof(text), "<30>systemd-udevd[%u]: ", getpid());
-
-        va_start(ap, fmt);
-        len += vsnprintf(text + len, sizeof(text) - len, fmt, ap);
-        va_end(ap);
-
-        ret = write(fd, text, len);
-        if (ret < 0)
-                return -errno;
-
-        return ret;
-}
index 95cd1c7b9ef1c51588434f7f7f181fcd5dbfb32a..76726fca774892451e6ece4baab7380d1ce945a5 100644 (file)
@@ -82,8 +82,6 @@ global:
         udev_queue_get_udev;
         udev_queue_get_udev_is_active;
         udev_queue_get_udev_seqnum;
-        udev_queue_get_fd;
-        udev_queue_flush;
         udev_queue_new;
         udev_queue_ref;
         udev_queue_unref;
@@ -114,3 +112,9 @@ LIBUDEV_199 {
 global:
         udev_device_set_sysattr_value;
 } LIBUDEV_196;
+
+LIBUDEV_215 {
+global:
+        udev_queue_flush;
+        udev_queue_get_fd;
+} LIBUDEV_199;
index 322c0a9bc22e192b295105a0833f37b3874c5f6f..f39d991179e9946bf2fe48b32c6a0bc13c800fb8 100644 (file)
@@ -16,7 +16,6 @@ slovene                       si      pc105           -               terminate:ctrl_alt_bksp
 hu101                  hu      pc105           qwerty          terminate:ctrl_alt_bksp
 jp106                  jp      jp106           -               terminate:ctrl_alt_bksp
 croat                  hr      pc105           -               terminate:ctrl_alt_bksp
-fi-latin1              fi      pc105           -               terminate:ctrl_alt_bksp
 it2                    it      pc105           -               terminate:ctrl_alt_bksp
 hu                     hu      pc105           -               terminate:ctrl_alt_bksp
 sr-latin               rs      pc105           latin           terminate:ctrl_alt_bksp
index 2632305dcc24c4e797cc781778940067222dada3..3690f9fc892c5037a15a42a09eb3e2f537291e3e 100644 (file)
@@ -43,6 +43,9 @@
 #include "path-util.h"
 #include "utf8.h"
 #include "def.h"
+#include "virt.h"
+#include "fileio.h"
+#include "locale-util.h"
 
 static bool arg_no_pager = false;
 static bool arg_ask_password = true;
@@ -80,6 +83,52 @@ typedef struct StatusInfo {
         const char *x11_options;
 } StatusInfo;
 
+static void print_overriden_variables(void) {
+        int r;
+        char *variables[_VARIABLE_LC_MAX] = {};
+        LocaleVariable j;
+        bool print_warning = true;
+
+        if (detect_container(NULL) > 0 || arg_host)
+                return;
+
+        r = parse_env_file("/proc/cmdline", WHITESPACE,
+                           "locale.LANG",              &variables[VARIABLE_LANG],
+                           "locale.LANGUAGE",          &variables[VARIABLE_LANGUAGE],
+                           "locale.LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
+                           "locale.LC_NUMERIC",        &variables[VARIABLE_LC_NUMERIC],
+                           "locale.LC_TIME",           &variables[VARIABLE_LC_TIME],
+                           "locale.LC_COLLATE",        &variables[VARIABLE_LC_COLLATE],
+                           "locale.LC_MONETARY",       &variables[VARIABLE_LC_MONETARY],
+                           "locale.LC_MESSAGES",       &variables[VARIABLE_LC_MESSAGES],
+                           "locale.LC_PAPER",          &variables[VARIABLE_LC_PAPER],
+                           "locale.LC_NAME",           &variables[VARIABLE_LC_NAME],
+                           "locale.LC_ADDRESS",        &variables[VARIABLE_LC_ADDRESS],
+                           "locale.LC_TELEPHONE",      &variables[VARIABLE_LC_TELEPHONE],
+                           "locale.LC_MEASUREMENT",    &variables[VARIABLE_LC_MEASUREMENT],
+                           "locale.LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
+                           NULL);
+
+        if (r < 0 && r != -ENOENT) {
+                log_warning("Failed to read /proc/cmdline: %s", strerror(-r));
+                goto finish;
+        }
+
+        for (j = 0; j < _VARIABLE_LC_MAX; j++)
+                if (variables[j]) {
+                        if (print_warning) {
+                                log_warning("Warning: Settings on kernel command line override system locale settings in /etc/locale.conf.\n"
+                                            "  Command Line: %s=%s\n", locale_variable_to_string(j), variables[j]);
+
+                                print_warning = false;
+                        } else
+                                log_warning("                %s=%s\n", locale_variable_to_string(j), variables[j]);
+                }
+ finish:
+        for (j = 0; j < _VARIABLE_LC_MAX; j++)
+                free(variables[j]);
+}
+
 static void print_status_info(StatusInfo *i) {
         assert(i);
 
@@ -133,6 +182,7 @@ static int show_status(sd_bus *bus, char **args, unsigned n) {
                 goto fail;
         }
 
+        print_overriden_variables();
         print_status_info(&info);
 
 fail:
@@ -177,192 +227,19 @@ static int set_locale(sd_bus *bus, char **args, unsigned n) {
         return 0;
 }
 
-static int add_locales_from_archive(Set *locales) {
-        /* Stolen from glibc... */
-
-        struct locarhead {
-                uint32_t magic;
-                /* Serial number.  */
-                uint32_t serial;
-                /* Name hash table.  */
-                uint32_t namehash_offset;
-                uint32_t namehash_used;
-                uint32_t namehash_size;
-                /* String table.  */
-                uint32_t string_offset;
-                uint32_t string_used;
-                uint32_t string_size;
-                /* Table with locale records.  */
-                uint32_t locrectab_offset;
-                uint32_t locrectab_used;
-                uint32_t locrectab_size;
-                /* MD5 sum hash table.  */
-                uint32_t sumhash_offset;
-                uint32_t sumhash_used;
-                uint32_t sumhash_size;
-        };
-
-        struct namehashent {
-                /* Hash value of the name.  */
-                uint32_t hashval;
-                /* Offset of the name in the string table.  */
-                uint32_t name_offset;
-                /* Offset of the locale record.  */
-                uint32_t locrec_offset;
-        };
-
-        const struct locarhead *h;
-        const struct namehashent *e;
-        const void *p = MAP_FAILED;
-        _cleanup_close_ int fd = -1;
-        size_t sz = 0;
-        struct stat st;
-        unsigned i;
-        int r;
-
-        fd = open("/usr/lib/locale/locale-archive", O_RDONLY|O_NOCTTY|O_CLOEXEC);
-        if (fd < 0) {
-                if (errno != ENOENT)
-                        log_error("Failed to open locale archive: %m");
-                r = -errno;
-                goto finish;
-        }
-
-        if (fstat(fd, &st) < 0) {
-                log_error("fstat() failed: %m");
-                r = -errno;
-                goto finish;
-        }
-
-        if (!S_ISREG(st.st_mode)) {
-                log_error("Archive file is not regular");
-                r = -EBADMSG;
-                goto finish;
-        }
-
-        if (st.st_size < (off_t) sizeof(struct locarhead)) {
-                log_error("Archive has invalid size");
-                r = -EBADMSG;
-                goto finish;
-        }
-
-        p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
-        if (p == MAP_FAILED) {
-                log_error("Failed to map archive: %m");
-                r = -errno;
-                goto finish;
-        }
-
-        h = (const struct locarhead *) p;
-        if (h->magic != 0xde020109 ||
-            h->namehash_offset + h->namehash_size > st.st_size ||
-            h->string_offset + h->string_size > st.st_size ||
-            h->locrectab_offset + h->locrectab_size > st.st_size ||
-            h->sumhash_offset + h->sumhash_size > st.st_size) {
-                log_error("Invalid archive file.");
-                r = -EBADMSG;
-                goto finish;
-        }
-
-        e = (const struct namehashent*) ((const uint8_t*) p + h->namehash_offset);
-        for (i = 0; i < h->namehash_size; i++) {
-                char *z;
-
-                if (e[i].locrec_offset == 0)
-                        continue;
-
-                if (!utf8_is_valid((char*) p + e[i].name_offset))
-                        continue;
-
-                z = strdup((char*) p + e[i].name_offset);
-                if (!z) {
-                        r = log_oom();
-                        goto finish;
-                }
-
-                r = set_consume(locales, z);
-                if (r < 0) {
-                        log_error("Failed to add locale: %s", strerror(-r));
-                        goto finish;
-                }
-        }
-
-        r = 0;
-
- finish:
-        if (p != MAP_FAILED)
-                munmap((void*) p, sz);
-
-        return r;
-}
-
-static int add_locales_from_libdir (Set *locales) {
-        _cleanup_closedir_ DIR *dir;
-        struct dirent *entry;
-        int r;
-
-        dir = opendir("/usr/lib/locale");
-        if (!dir) {
-                log_error("Failed to open locale directory: %m");
-                return -errno;
-        }
-
-        errno = 0;
-        while ((entry = readdir(dir))) {
-                char *z;
-
-                if (entry->d_type != DT_DIR)
-                        continue;
-
-                if (ignore_file(entry->d_name))
-                        continue;
-
-                z = strdup(entry->d_name);
-                if (!z)
-                        return log_oom();
-
-                r = set_consume(locales, z);
-                if (r < 0 && r != -EEXIST) {
-                        log_error("Failed to add locale: %s", strerror(-r));
-                        return r;
-                }
-
-                errno = 0;
-        }
-
-        if (errno > 0) {
-                log_error("Failed to read locale directory: %m");
-                return -errno;
-        }
-
-        return 0;
-}
-
 static int list_locales(sd_bus *bus, char **args, unsigned n) {
-        _cleanup_set_free_ Set *locales;
         _cleanup_strv_free_ char **l = NULL;
         int r;
 
-        locales = set_new(string_hash_func, string_compare_func);
-        if (!locales)
-                return log_oom();
-
-        r = add_locales_from_archive(locales);
-        if (r < 0 && r != -ENOENT)
-                return r;
+        assert(args);
 
-        r = add_locales_from_libdir(locales);
-        if (r < 0)
+        r = get_locales(&l);
+        if (r < 0) {
+                log_error("Failed to read list of locales: %s", strerror(-r));
                 return r;
-
-        l = set_get_strv(locales);
-        if (!l)
-                return log_oom();
-
-        strv_sort(l);
+        }
 
         pager_open_if_enabled();
-
         strv_print(l);
 
         return 0;
@@ -444,7 +321,7 @@ static int list_vconsole_keymaps(sd_bus *bus, char **args, unsigned n) {
         _cleanup_strv_free_ char **l = NULL;
         const char *dir;
 
-        keymaps = set_new(string_hash_func, string_compare_func);
+        keymaps = set_new(&string_hash_ops);
         if (!keymaps)
                 return log_oom();
 
@@ -612,8 +489,7 @@ static int list_x11_keymaps(sd_bus *bus, char **args, unsigned n) {
         return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] COMMAND ...\n\n"
                "Query or change system locale and keyboard settings.\n\n"
                "  -h --help                Show this help\n"
@@ -635,10 +511,8 @@ static int help(void) {
                "  list-x11-keymap-layouts  Show known X11 keyboard mapping layouts\n"
                "  list-x11-keymap-variants [LAYOUT]\n"
                "                           Show known X11 keyboard mapping variants\n"
-               "  list-x11-keymap-options  Show known X11 keyboard mapping options\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  list-x11-keymap-options  Show known X11 keyboard mapping options\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -666,12 +540,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -706,7 +581,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -796,7 +670,7 @@ static int localectl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char*argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");
index 23da149b0e18e137a9c2ac9b2268a074ab05c326..552ffdf87a60c479ad2e8ef4c02f199c58da0550 100644 (file)
@@ -23,6 +23,7 @@
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
+#include <sys/capability.h>
 
 #include "sd-bus.h"
 
@@ -38,6 +39,7 @@
 #include "bus-error.h"
 #include "bus-message.h"
 #include "event-util.h"
+#include "locale-util.h"
 
 enum {
         /* We don't list LC_ALL here on purpose. People should be
@@ -90,20 +92,8 @@ typedef struct Context {
         Hashmap *polkit_registry;
 } Context;
 
-static int free_and_copy(char **s, const char *v) {
-        int r;
-        char *t;
-
-        assert(s);
-
-        r = strdup_or_null(isempty(v) ? NULL : v, &t);
-        if (r < 0)
-                return r;
-
-        free(*s);
-        *s = t;
-
-        return 0;
+static const char* nonempty(const char *s) {
+        return isempty(s) ? NULL : s;
 }
 
 static void free_and_replace(char **s, char *v) {
@@ -111,6 +101,12 @@ static void free_and_replace(char **s, char *v) {
         *s = v;
 }
 
+static bool startswith_comma(const char *s, const char *prefix) {
+        const char *t;
+
+        return s && (t = startswith(s, prefix)) && (*t == ',');
+}
+
 static void context_free_x11(Context *c) {
         free_and_replace(&c->x11_layout, NULL);
         free_and_replace(&c->x11_model, NULL);
@@ -130,22 +126,20 @@ static void context_free_locale(Context *c) {
                 free_and_replace(&c->locale[p], NULL);
 }
 
-static void context_free(Context *c, sd_bus *bus) {
+static void context_free(Context *c) {
         context_free_locale(c);
         context_free_x11(c);
         context_free_vconsole(c);
 
-        bus_verify_polkit_async_registry_free(bus, c->polkit_registry);
+        bus_verify_polkit_async_registry_free(c->polkit_registry);
 };
 
 static void locale_simplify(Context *c) {
         int p;
 
         for (p = LOCALE_LANG+1; p < _LOCALE_MAX; p++)
-                if (isempty(c->locale[p]) || streq_ptr(c->locale[LOCALE_LANG], c->locale[p])) {
-                        free(c->locale[p]);
-                        c->locale[p] = NULL;
-                }
+                if (isempty(c->locale[p]) || streq_ptr(c->locale[LOCALE_LANG], c->locale[p]))
+                        free_and_replace(&c->locale[p], NULL);
 }
 
 static int locale_read_data(Context *c) {
@@ -177,7 +171,8 @@ static int locale_read_data(Context *c) {
                 for (p = 0; p < _LOCALE_MAX; p++) {
                         assert(names[p]);
 
-                        r = free_and_copy(&c->locale[p], getenv(names[p]));
+                        r = free_and_strdup(&c->locale[p],
+                                            nonempty(getenv(names[p])));
                         if (r < 0)
                                 return r;
                 }
@@ -206,9 +201,10 @@ static int vconsole_read_data(Context *c) {
 }
 
 static int x11_read_data(Context *c) {
-        FILE *f;
+        _cleanup_fclose_ FILE *f;
         char line[LINE_MAX];
         bool in_section = false;
+        int r;
 
         context_free_x11(c);
 
@@ -226,13 +222,11 @@ static int x11_read_data(Context *c) {
                         continue;
 
                 if (in_section && first_word(l, "Option")) {
-                        char **a;
+                        _cleanup_strv_free_ char **a = NULL;
 
-                        a = strv_split_quoted(l);
-                        if (!a) {
-                                fclose(f);
-                                return -ENOMEM;
-                        }
+                        r = strv_split_quoted(&a, l);
+                        if (r < 0)
+                                return r;
 
                         if (strv_length(a) == 3) {
                                 if (streq(a[1], "XkbLayout")) {
@@ -250,27 +244,20 @@ static int x11_read_data(Context *c) {
                                 }
                         }
 
-                        strv_free(a);
-
                 } else if (!in_section && first_word(l, "Section")) {
-                        char **a;
+                        _cleanup_strv_free_ char **a = NULL;
 
-                        a = strv_split_quoted(l);
-                        if (!a) {
-                                fclose(f);
+                        r = strv_split_quoted(&a, l);
+                        if (r < 0)
                                 return -ENOMEM;
-                        }
 
                         if (strv_length(a) == 2 && streq(a[1], "InputClass"))
                                 in_section = true;
 
-                        strv_free(a);
                 } else if (in_section && first_word(l, "EndSection"))
                         in_section = false;
         }
 
-        fclose(f);
-
         return 0;
 }
 
@@ -284,16 +271,19 @@ static int context_read_data(Context *c) {
         return r < 0 ? r : q < 0 ? q : p;
 }
 
-static int locale_write_data(Context *c) {
+static int locale_write_data(Context *c, char ***settings) {
         int r, p;
-        char **l = NULL;
+        _cleanup_strv_free_ char **l = NULL;
+
+        /* Set values will be returned as strv in *settings on success. */
 
         r = load_env_file(NULL, "/etc/locale.conf", NULL, &l);
         if (r < 0 && r != -ENOENT)
                 return r;
 
         for (p = 0; p < _LOCALE_MAX; p++) {
-                char *t, **u;
+                _cleanup_free_ char *t = NULL;
+                char **u;
 
                 assert(names[p]);
 
@@ -302,24 +292,18 @@ static int locale_write_data(Context *c) {
                         continue;
                 }
 
-                if (asprintf(&t, "%s=%s", names[p], c->locale[p]) < 0) {
-                        strv_free(l);
+                if (asprintf(&t, "%s=%s", names[p], c->locale[p]) < 0)
                         return -ENOMEM;
-                }
 
                 u = strv_env_set(l, t);
-                free(t);
-                strv_free(l);
-
                 if (!u)
                         return -ENOMEM;
 
+                strv_free(l);
                 l = u;
         }
 
         if (strv_isempty(l)) {
-                strv_free(l);
-
                 if (unlink("/etc/locale.conf") < 0)
                         return errno == ENOENT ? 0 : -errno;
 
@@ -327,9 +311,12 @@ static int locale_write_data(Context *c) {
         }
 
         r = write_env_file_label("/etc/locale.conf", l);
-        strv_free(l);
+        if (r < 0)
+                return r;
 
-        return r;
+        *settings = l;
+        l = NULL;
+        return 0;
 }
 
 static int locale_update_system_manager(Context *c, sd_bus *bus) {
@@ -400,38 +387,36 @@ static int vconsole_write_data(Context *c) {
         if (isempty(c->vc_keymap))
                 l = strv_env_unset(l, "KEYMAP");
         else {
-                char *s, **u;
+                _cleanup_free_ char *s = NULL;
+                char **u;
 
                 s = strappend("KEYMAP=", c->vc_keymap);
                 if (!s)
                         return -ENOMEM;
 
                 u = strv_env_set(l, s);
-                free(s);
-                strv_free(l);
-
                 if (!u)
                         return -ENOMEM;
 
+                strv_free(l);
                 l = u;
         }
 
         if (isempty(c->vc_keymap_toggle))
                 l = strv_env_unset(l, "KEYMAP_TOGGLE");
         else  {
-                char *s, **u;
+                _cleanup_free_ char *s = NULL;
+                char **u;
 
                 s = strappend("KEYMAP_TOGGLE=", c->vc_keymap_toggle);
                 if (!s)
                         return -ENOMEM;
 
                 u = strv_env_set(l, s);
-                free(s);
-                strv_free(l);
-
                 if (!u)
                         return -ENOMEM;
 
+                strv_free(l);
                 l = u;
         }
 
@@ -442,11 +427,10 @@ static int vconsole_write_data(Context *c) {
                 return 0;
         }
 
-        r = write_env_file_label("/etc/vconsole.conf", l);
-        return r;
+        return write_env_file_label("/etc/vconsole.conf", l);
 }
 
-static int write_data_x11(Context *c) {
+static int x11_write_data(Context *c) {
         _cleanup_fclose_ FILE *f = NULL;
         _cleanup_free_ char *temp_path = NULL;
         int r;
@@ -520,8 +504,8 @@ static int vconsole_reload(sd_bus *bus) {
         return r;
 }
 
-static char *strnulldash(const char *s) {
-        return s == NULL || *s == 0 || (s[0] == '-' && s[1] == 0) ? NULL : (char*) s;
+static const char* strnulldash(const char *s) {
+        return isempty(s) || streq(s, "-") ? NULL : s;
 }
 
 static int read_next_mapping(FILE *f, unsigned *n, char ***a) {
@@ -532,6 +516,7 @@ static int read_next_mapping(FILE *f, unsigned *n, char ***a) {
         for (;;) {
                 char line[LINE_MAX];
                 char *l, **b;
+                int r;
 
                 errno = 0;
                 if (!fgets(line, sizeof(line), f)) {
@@ -548,9 +533,9 @@ static int read_next_mapping(FILE *f, unsigned *n, char ***a) {
                 if (l[0] == 0 || l[0] == '#')
                         continue;
 
-                b = strv_split_quoted(l);
-                if (!b)
-                        return -ENOMEM;
+                r = strv_split_quoted(&b, l);
+                if (r < 0)
+                        return r;
 
                 if (strv_length(b) < 5) {
                         log_error("Invalid line "SYSTEMD_KBD_MODEL_MAP":%u, ignoring.", *n);
@@ -604,10 +589,10 @@ static int vconsole_convert_to_x11(Context *c, sd_bus *bus) {
                             !streq_ptr(c->x11_variant, strnulldash(a[3])) ||
                             !streq_ptr(c->x11_options, strnulldash(a[4]))) {
 
-                                if (free_and_copy(&c->x11_layout, strnulldash(a[1])) < 0 ||
-                                    free_and_copy(&c->x11_model, strnulldash(a[2])) < 0 ||
-                                    free_and_copy(&c->x11_variant, strnulldash(a[3])) < 0 ||
-                                    free_and_copy(&c->x11_options, strnulldash(a[4])) < 0)
+                                if (free_and_strdup(&c->x11_layout, strnulldash(a[1])) < 0 ||
+                                    free_and_strdup(&c->x11_model, strnulldash(a[2])) < 0 ||
+                                    free_and_strdup(&c->x11_variant, strnulldash(a[3])) < 0 ||
+                                    free_and_strdup(&c->x11_options, strnulldash(a[4])) < 0)
                                         return -ENOMEM;
 
                                 modified = true;
@@ -620,39 +605,53 @@ static int vconsole_convert_to_x11(Context *c, sd_bus *bus) {
         if (modified) {
                 int r;
 
-                r = write_data_x11(c);
-                if (r < 0)
+                r = x11_write_data(c);
+                if (r < 0) {
                         log_error("Failed to set X11 keyboard layout: %s", strerror(-r));
+                        return r;
+                }
+
+                log_info("Changed X11 keyboard layout to '%s' model '%s' variant '%s' options '%s'",
+                         strempty(c->x11_layout),
+                         strempty(c->x11_model),
+                         strempty(c->x11_variant),
+                         strempty(c->x11_options));
 
                 sd_bus_emit_properties_changed(bus,
                                 "/org/freedesktop/locale1",
                                 "org.freedesktop.locale1",
                                 "X11Layout", "X11Model", "X11Variant", "X11Options", NULL);
-        }
+        } else
+                log_debug("X11 keyboard layout was not modified.");
 
         return 0;
 }
 
-static int find_converted_keymap(Context *c, char **new_keymap) {
+static int find_converted_keymap(const char *x11_layout, const char *x11_variant, char **new_keymap) {
         const char *dir;
         _cleanup_free_ char *n;
 
-        if (c->x11_variant)
-                n = strjoin(c->x11_layout, "-", c->x11_variant, NULL);
+        if (x11_variant)
+                n = strjoin(x11_layout, "-", x11_variant, NULL);
         else
-                n = strdup(c->x11_layout);
+                n = strdup(x11_layout);
         if (!n)
                 return -ENOMEM;
 
         NULSTR_FOREACH(dir, KBD_KEYMAP_DIRS) {
                 _cleanup_free_ char *p = NULL, *pz = NULL;
+                bool uncompressed;
 
                 p = strjoin(dir, "xkb/", n, ".map", NULL);
                 pz = strjoin(dir, "xkb/", n, ".map.gz", NULL);
                 if (!p || !pz)
                         return -ENOMEM;
 
-                if (access(p, F_OK) == 0 || access(pz, F_OK) == 0) {
+                uncompressed = access(p, F_OK) == 0;
+                if (uncompressed || access(pz, F_OK) == 0) {
+                        log_debug("Found converted keymap %s at %s",
+                                  n, uncompressed ? p : pz);
+
                         *new_keymap = n;
                         n = NULL;
                         return 1;
@@ -666,7 +665,7 @@ static int find_legacy_keymap(Context *c, char **new_keymap) {
         _cleanup_fclose_ FILE *f;
         unsigned n = 0;
         unsigned best_matching = 0;
-
+        int r;
 
         f = fopen(SYSTEMD_KBD_MODEL_MAP, "re");
         if (!f)
@@ -675,7 +674,6 @@ static int find_legacy_keymap(Context *c, char **new_keymap) {
         for (;;) {
                 _cleanup_strv_free_ char **a = NULL;
                 unsigned matching = 0;
-                int r;
 
                 r = read_next_mapping(f, &n, &a);
                 if (r < 0)
@@ -688,26 +686,18 @@ static int find_legacy_keymap(Context *c, char **new_keymap) {
                         /* If we got an exact match, this is best */
                         matching = 10;
                 else {
-                        size_t x;
-
-                        x = strcspn(c->x11_layout, ",");
-
                         /* We have multiple X layouts, look for an
                          * entry that matches our key with everything
                          * but the first layout stripped off. */
-                        if (x > 0 &&
-                            strlen(a[1]) == x &&
-                            strneq(c->x11_layout, a[1], x))
+                        if (startswith_comma(c->x11_layout, a[1]))
                                 matching = 5;
                         else  {
-                                size_t w;
+                                char *x;
 
                                 /* If that didn't work, strip off the
                                  * other layouts from the entry, too */
-                                w = strcspn(a[1], ",");
-
-                                if (x > 0 && x == w &&
-                                    memcmp(c->x11_layout, a[1], x) == 0)
+                                x = strndupa(a[1], strcspn(a[1], ","));
+                                if (startswith_comma(c->x11_layout, x))
                                         matching = 1;
                         }
                 }
@@ -726,16 +716,37 @@ static int find_legacy_keymap(Context *c, char **new_keymap) {
                 }
 
                 /* The best matching entry so far, then let's save that */
-                if (matching > best_matching) {
-                        best_matching = matching;
+                if (matching >= MAX(best_matching, 1u)) {
+                        log_debug("Found legacy keymap %s with score %u",
+                                  a[0], matching);
 
-                        free(*new_keymap);
-                        *new_keymap = strdup(a[0]);
-                        if (!*new_keymap)
-                                return -ENOMEM;
+                        if (matching > best_matching) {
+                                best_matching = matching;
+
+                                r = free_and_strdup(new_keymap, a[0]);
+                                if (r < 0)
+                                        return r;
+                        }
                 }
         }
 
+        if (best_matching < 10 && c->x11_layout) {
+                /* The best match is only the first part of the X11
+                 * keymap. Check if we have a converted map which
+                 * matches just the first layout.
+                 */
+                char *l, *v = NULL, *converted;
+
+                l = strndupa(c->x11_layout, strcspn(c->x11_layout, ","));
+                if (c->x11_variant)
+                        v = strndupa(c->x11_variant, strcspn(c->x11_variant, ","));
+                r = find_converted_keymap(l, v, &converted);
+                if (r < 0)
+                        return r;
+                if (r > 0)
+                        free_and_replace(new_keymap, converted);
+        }
+
         return 0;
 }
 
@@ -755,7 +766,7 @@ static int x11_convert_to_vconsole(Context *c, sd_bus *bus) {
         } else {
                 char *new_keymap = NULL;
 
-                r = find_converted_keymap(c, &new_keymap);
+                r = find_converted_keymap(c->x11_layout, c->x11_variant, &new_keymap);
                 if (r < 0)
                         return r;
                 else if (r == 0) {
@@ -777,13 +788,17 @@ static int x11_convert_to_vconsole(Context *c, sd_bus *bus) {
                 if (r < 0)
                         log_error("Failed to set virtual console keymap: %s", strerror(-r));
 
+                log_info("Changed virtual console keymap to '%s' toggle '%s'",
+                         strempty(c->vc_keymap), strempty(c->vc_keymap_toggle));
+
                 sd_bus_emit_properties_changed(bus,
                                 "/org/freedesktop/locale1",
                                 "org.freedesktop.locale1",
                                 "VConsoleKeymap", "VConsoleKeymapToggle", NULL);
 
                 return vconsole_reload(bus);
-        }
+        } else
+                log_debug("Virtual console keymap was not modified.");
 
         return 0;
 }
@@ -838,7 +853,7 @@ static int method_set_locale(sd_bus *bus, sd_bus_message *m, void *userdata, sd_
         if (r < 0)
                 return r;
 
-        /* Check whether a variable changed and if so valid */
+        /* Check whether a variable changed and if it is valid */
         STRV_FOREACH(i, l) {
                 bool valid = false;
 
@@ -848,7 +863,7 @@ static int method_set_locale(sd_bus *bus, sd_bus_message *m, void *userdata, sd_
                         k = strlen(names[p]);
                         if (startswith(*i, names[p]) &&
                             (*i)[k] == '=' &&
-                            string_is_safe((*i) + k + 1)) {
+                            locale_is_valid((*i) + k + 1)) {
                                 valid = true;
                                 passed[p] = true;
 
@@ -864,41 +879,34 @@ static int method_set_locale(sd_bus *bus, sd_bus_message *m, void *userdata, sd_
         }
 
         /* Check whether a variable is unset */
-        if (!modified)  {
+        if (!modified)
                 for (p = 0; p < _LOCALE_MAX; p++)
                         if (!isempty(c->locale[p]) && !passed[p]) {
                                 modified = true;
                                 break;
                         }
-        }
 
         if (modified) {
-                r = bus_verify_polkit_async(bus, &c->polkit_registry, m,
-                                            "org.freedesktop.locale1.set-locale", interactive,
-                                            error, method_set_locale, c);
+                _cleanup_strv_free_ char **settings = NULL;
+
+                r = bus_verify_polkit_async(m, CAP_SYS_ADMIN, "org.freedesktop.locale1.set-locale", interactive, &c->polkit_registry, error);
                 if (r < 0)
                         return r;
                 if (r == 0)
                         return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
 
-                STRV_FOREACH(i, l) {
+                STRV_FOREACH(i, l)
                         for (p = 0; p < _LOCALE_MAX; p++) {
                                 size_t k;
 
                                 k = strlen(names[p]);
                                 if (startswith(*i, names[p]) && (*i)[k] == '=') {
-                                        char *t;
-
-                                        t = strdup(*i + k + 1);
-                                        if (!t)
-                                                return -ENOMEM;
-
-                                        free(c->locale[p]);
-                                        c->locale[p] = t;
+                                        r = free_and_strdup(&c->locale[p], *i + k + 1);
+                                        if (r < 0)
+                                                return r;
                                         break;
                                 }
                         }
-                }
 
                 for (p = 0; p < _LOCALE_MAX; p++) {
                         if (passed[p])
@@ -909,7 +917,7 @@ static int method_set_locale(sd_bus *bus, sd_bus_message *m, void *userdata, sd_
 
                 locale_simplify(c);
 
-                r = locale_write_data(c);
+                r = locale_write_data(c, &settings);
                 if (r < 0) {
                         log_error("Failed to set locale: %s", strerror(-r));
                         return sd_bus_error_set_errnof(error, r, "Failed to set locale: %s", strerror(-r));
@@ -917,13 +925,21 @@ static int method_set_locale(sd_bus *bus, sd_bus_message *m, void *userdata, sd_
 
                 locale_update_system_manager(c, bus);
 
-                log_info("Changed locale information.");
+                if (settings) {
+                        _cleanup_free_ char *line;
+
+                        line = strv_join(settings, ", ");
+                        log_info("Changed locale to %s.", strnull(line));
+                } else
+                        log_info("Changed locale to unset.");
 
                 sd_bus_emit_properties_changed(bus,
                                 "/org/freedesktop/locale1",
                                 "org.freedesktop.locale1",
                                 "Locale", NULL);
-        }
+        } else
+                log_debug("Locale settings were not modified.");
+
 
         return sd_bus_reply_method_return(m, NULL);
 }
@@ -951,16 +967,14 @@ static int method_set_vc_keyboard(sd_bus *bus, sd_bus_message *m, void *userdata
                     (keymap_toggle && (!filename_is_safe(keymap_toggle) || !string_is_safe(keymap_toggle))))
                         return sd_bus_error_set_errnof(error, -EINVAL, "Received invalid keymap data");
 
-                r = bus_verify_polkit_async(bus, &c->polkit_registry, m,
-                                "org.freedesktop.locale1.set-keyboard",
-                                interactive, error, method_set_vc_keyboard, c);
+                r = bus_verify_polkit_async(m, CAP_SYS_ADMIN, "org.freedesktop.locale1.set-keyboard", interactive, &c->polkit_registry, error);
                 if (r < 0)
                         return r;
                 if (r == 0)
                         return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
 
-                if (free_and_copy(&c->vc_keymap, keymap) < 0 ||
-                    free_and_copy(&c->vc_keymap_toggle, keymap_toggle) < 0)
+                if (free_and_strdup(&c->vc_keymap, keymap) < 0 ||
+                    free_and_strdup(&c->vc_keymap_toggle, keymap_toggle) < 0)
                         return -ENOMEM;
 
                 r = vconsole_write_data(c);
@@ -969,7 +983,8 @@ static int method_set_vc_keyboard(sd_bus *bus, sd_bus_message *m, void *userdata
                         return sd_bus_error_set_errnof(error, r, "Failed to set virtual console keymap: %s", strerror(-r));
                 }
 
-                log_info("Changed virtual console keymap to '%s'", strempty(c->vc_keymap));
+                log_info("Changed virtual console keymap to '%s' toggle '%s'",
+                         strempty(c->vc_keymap), strempty(c->vc_keymap_toggle));
 
                 r = vconsole_reload(bus);
                 if (r < 0)
@@ -1023,32 +1038,34 @@ static int method_set_x11_keyboard(sd_bus *bus, sd_bus_message *m, void *userdat
                     (options && !string_is_safe(options)))
                         return sd_bus_error_set_errnof(error, -EINVAL, "Received invalid keyboard data");
 
-                r = bus_verify_polkit_async(bus, &c->polkit_registry, m,
-                                "org.freedesktop.locale1.set-keyboard",
-                                interactive, error, method_set_x11_keyboard, c);
+                r = bus_verify_polkit_async(m, CAP_SYS_ADMIN, "org.freedesktop.locale1.set-keyboard", interactive, &c->polkit_registry, error);
                 if (r < 0)
                         return r;
                 if (r == 0)
                         return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
 
-                if (free_and_copy(&c->x11_layout, layout) < 0 ||
-                    free_and_copy(&c->x11_model, model) < 0 ||
-                    free_and_copy(&c->x11_variant, variant) < 0 ||
-                    free_and_copy(&c->x11_options, options) < 0)
+                if (free_and_strdup(&c->x11_layout, layout) < 0 ||
+                    free_and_strdup(&c->x11_model, model) < 0 ||
+                    free_and_strdup(&c->x11_variant, variant) < 0 ||
+                    free_and_strdup(&c->x11_options, options) < 0)
                         return -ENOMEM;
 
-                r = write_data_x11(c);
+                r = x11_write_data(c);
                 if (r < 0) {
                         log_error("Failed to set X11 keyboard layout: %s", strerror(-r));
                         return sd_bus_error_set_errnof(error, r, "Failed to set X11 keyboard layout: %s", strerror(-r));
                 }
 
-                log_info("Changed X11 keyboard layout to '%s'", strempty(c->x11_layout));
+                log_info("Changed X11 keyboard layout to '%s' model '%s' variant '%s' options '%s'",
+                         strempty(c->x11_layout),
+                         strempty(c->x11_model),
+                         strempty(c->x11_variant),
+                         strempty(c->x11_options));
 
                 sd_bus_emit_properties_changed(bus,
                                 "/org/freedesktop/locale1",
                                 "org.freedesktop.locale1",
-                                "X11Layout" "X11Model" "X11Variant" "X11Options", NULL);
+                                "X11Layout", "X11Model", "X11Variant", "X11Options", NULL);
 
                 if (convert) {
                         r = x11_convert_to_vconsole(c, bus);
@@ -1076,7 +1093,7 @@ static const sd_bus_vtable locale_vtable[] = {
 };
 
 static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         assert(c);
@@ -1114,9 +1131,9 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
 }
 
 int main(int argc, char *argv[]) {
-        Context context = {};
+        _cleanup_(context_free) Context context = {};
         _cleanup_event_unref_ sd_event *event = NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         log_set_target(LOG_TARGET_AUTO);
@@ -1124,7 +1141,7 @@ int main(int argc, char *argv[]) {
         log_open();
 
         umask(0022);
-        label_init("/etc");
+        mac_selinux_init("/etc");
 
         if (argc != 1) {
                 log_error("This program takes no arguments.");
@@ -1157,7 +1174,5 @@ int main(int argc, char *argv[]) {
         }
 
 finish:
-        context_free(&context, bus);
-
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
diff --git a/src/locale/org.freedesktop.locale1.policy b/src/locale/org.freedesktop.locale1.policy
deleted file mode 100644 (file)
index 4c7db93..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
-        "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
-        <vendor>The systemd Project</vendor>
-        <vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
-
-        <action id="org.freedesktop.locale1.set-locale">
-                <description>Set system locale</description>
-                <description xml:lang="de">Die lokale Sprachumgebung festlegen</description>
-                <description xml:lang="el">Ορισμός τοπικών ρυθμίσεων συστήματος</description>
-                <description xml:lang="fr">Définir la langue du système</description>
-                <description xml:lang="it">Configura le impostazioni regionali di sistema</description>
-                <description xml:lang="pl">Ustawienie lokalizacji systemu</description>
-                <description xml:lang="ru">Настроить системную локаль</description>
-                <message>Authentication is required to set the system locale.</message>
-                <message xml:lang="de">Legitimierung ist zum Festlegen der systemweiten Spracheinstellungen erforderlich.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ορίσετε τις τοπικές ρυθμίσεις του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour définir la langue du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per configurare le impostazioni regionali di sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ustawić lokalizację systemu.</message>
-                <message xml:lang="ru">Чтобы настроить системную локаль, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.locale1.set-keyboard</annotate>
-        </action>
-
-        <action id="org.freedesktop.locale1.set-keyboard">
-                <description>Set system keyboard settings</description>
-                <description xml:lang="de">Tastatureinstellungen des Systems festlegen</description>
-                <description xml:lang="el">Ορισμός ρυθμίσεων πληκτρολογίου συστήματος</description>
-                <description xml:lang="fr">Définir les paramètres de clavier du système</description>
-                <description xml:lang="it">Configura la tastiera di sistema</description>
-                <description xml:lang="pl">Ustawienie klawiatury systemu</description>
-                <description xml:lang="ru">Настроить параметры клавиатуры</description>
-                <message>Authentication is required to set the system keyboard settings.</message>
-                <message xml:lang="de">Legitimierung ist zum Festlegen der Tastatureinstellungen des Systems erforderlich.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ορίσετε τις ρυθμίσεις πληκτρολογίου του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour définir les paramètres de clavier du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per configurare la tastiera di sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ustawić klawiaturę systemu.</message>
-                <message xml:lang="ru">Чтобы настроить параметры клавиатуры, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-</policyconfig>
\ No newline at end of file
index 36fb827315655c3ee899830e57c5b873c0130e25..695d2463707aae4888e646ba82c6258635bd4162 100644 (file)
@@ -9,5 +9,7 @@ ACTION=="remove", GOTO="power_switch_end"
 
 SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
 SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch"
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch"
 
 LABEL="power_switch_end"
index e1cf897acde018ef0a75ab5dac4b6623550a7e91..694df2cfc8a8d59cadf04916d0a9658582acd88a 100644 (file)
@@ -12,7 +12,7 @@ ENV{MAJOR}=="", GOTO="uaccess_end"
 SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="uaccess"
 
 # Digicams with proprietary protocol
-ENV{ID_GPHOTO2}=="*?", TAG+="uaccess"
+ENV{ID_GPHOTO2}=="?*", TAG+="uaccess"
 
 # SCSI and USB scanners
 ENV{libsane_matched}=="yes", TAG+="uaccess"
@@ -49,13 +49,13 @@ SUBSYSTEM=="drm", KERNEL=="card*|renderD*", TAG+="uaccess"
 SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="uaccess"
 
 # smart-card readers
-ENV{ID_SMARTCARD_READER}=="*?", TAG+="uaccess"
+ENV{ID_SMARTCARD_READER}=="?*", TAG+="uaccess"
 
 # (USB) authentication devices
-ENV{ID_SECURITY_TOKEN}=="*?", TAG+="uaccess"
+ENV{ID_SECURITY_TOKEN}=="?*", TAG+="uaccess"
 
 # PDA devices
-ENV{ID_PDA}=="*?", TAG+="uaccess"
+ENV{ID_PDA}=="?*", TAG+="uaccess"
 
 # Programmable remote control
 ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess"
@@ -64,12 +64,15 @@ ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess"
 SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="uaccess"
 
 # color measurement devices
-ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="uaccess"
+ENV{COLOR_MEASUREMENT_DEVICE}=="?*", TAG+="uaccess"
 
 # DDC/CI device, usually high-end monitors such as the DreamColor
-ENV{DDC_DEVICE}=="*?", TAG+="uaccess"
+ENV{DDC_DEVICE}=="?*", TAG+="uaccess"
 
 # media player raw devices (for user-mode drivers, Android SDK, etc.)
 SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
 
+# software-defined radio communication devices
+ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess"
+
 LABEL="uaccess_end"
index 24e8fb04bd5544d733ff3b92ebcf581e7aa62f48..d5ea1d913cd91b404e1ace06ced17004ce93fb7a 100644 (file)
@@ -122,8 +122,7 @@ static int print_inhibitors(sd_bus *bus, sd_bus_error *error) {
         return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] {COMMAND} ...\n\n"
                "Execute a process while inhibiting shutdown/sleep/idle.\n\n"
                "  -h --help               Show this help\n"
@@ -135,10 +134,8 @@ static int help(void) {
                "     --who=STRING         A descriptive string who is inhibiting\n"
                "     --why=STRING         A descriptive string why is being inhibited\n"
                "     --mode=MODE          One of block or delay\n"
-               "     --list               List active inhibitors\n",
-               program_invocation_short_name);
-
-        return 0;
+               "     --list               List active inhibitors\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -168,12 +165,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "+h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -206,7 +204,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (arg_action == ACTION_INHIBIT && argc == 1)
                 arg_action = ACTION_LIST;
@@ -221,7 +218,7 @@ static int parse_argv(int argc, char *argv[]) {
 
 int main(int argc, char *argv[]) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         log_parse_environment();
index ebe9c1f16ce55be5cb62433cb7da8ecce67f99fa..fcdf6275e9cd6fef21cabaece41053fc452eebe9 100644 (file)
@@ -1047,8 +1047,7 @@ static int terminate_seat(sd_bus *bus, char **args, unsigned n) {
         return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] {COMMAND} ...\n\n"
                "Send control commands to or query the login manager.\n\n"
                "  -h --help              Show this help\n"
@@ -1086,10 +1085,8 @@ static int help(void) {
                "  show-seat NAME...        Show properties of one or more seats\n"
                "  attach NAME DEVICE...    Attach one or more devices to a seat\n"
                "  flush-devices            Flush all device associations\n"
-               "  terminate-seat NAME...   Terminate all sessions on one or more seats\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  terminate-seat NAME...   Terminate all sessions on one or more seats\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -1123,12 +1120,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hp:als:H:M:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hp:als:H:M:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -1195,7 +1193,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -1298,7 +1295,7 @@ static int loginctl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");
index 4bbeb64e8b86276fcf7e1632c389aa28ef975f7e..f7c6f3a4efe17b7dcf1ef07548e275c4bf88cd5b 100644 (file)
@@ -190,7 +190,7 @@ int devnode_acl_all(struct udev *udev,
 
         assert(udev);
 
-        nodes = set_new(string_hash_func, string_compare_func);
+        nodes = set_new(&string_hash_ops);
         if (!nodes)
                 return -ENOMEM;
 
@@ -277,11 +277,14 @@ int devnode_acl_all(struct udev *udev,
         SET_FOREACH(n, nodes, i) {
                 int k;
 
-                log_debug("Fixing up ACLs at %s for seat %s", n, seat);
+                log_debug("Changing ACLs at %s for seat %s (uid "UID_FMT"→"UID_FMT"%s%s)",
+                          n, seat, old_uid, new_uid,
+                          del ? " del" : "", add ? " add" : "");
+
                 k = devnode_acl(n, flush, del, old_uid, add, new_uid);
                 if (k == -ENOENT)
                         log_debug("Device %s disappeared while setting ACLs", n);
-                else if (k < 0)
+                else if (k < 0 && r == 0)
                         r = k;
         }
 
index 36ee4418b8bc6f85a3ecd47223d3dc2c5644c081..0844df20a9762ec3b0197c9346dec28d54617989 100644 (file)
@@ -71,24 +71,6 @@ int manager_handle_action(
         }
 
         if (inhibit_key == INHIBIT_HANDLE_LID_SWITCH) {
-                int n;
-
-                /* If we are docked don't react to lid closing */
-                if (manager_is_docked(m)) {
-                        log_debug("Ignoring lid switch request, system is docked.");
-                        return 0;
-                }
-
-                /* If we have more than one display connected,
-                 * don't react to lid closing. */
-                n = manager_count_displays(m);
-                if (n < 0)
-                        log_warning("Display counting failed: %s", strerror(-n));
-                else if (n > 1) {
-                        log_debug("Ignoring lid switch request, %i displays connected.", n);
-                        return 0;
-                }
-
                 /* If the last system suspend or startup is too close,
                  * let's not suspend for now, to give USB docking
                  * stations some time to settle so that we can
index 2561d13c673f55c7ab807369d01a28bbe4621316..57e619efe690b801e80fa65cb5115afcb58a48ae 100644 (file)
@@ -97,13 +97,27 @@ int button_set_seat(Button *b, const char *sn) {
         return 0;
 }
 
+static void button_lid_switch_handle_action(Manager *manager, bool is_edge) {
+        HandleAction handle_action;
+
+        assert(manager);
+
+        /* If we are docked, handle the lid switch differently */
+        if (manager_is_docked_or_multiple_displays(manager))
+                handle_action = manager->handle_lid_switch_docked;
+        else
+                handle_action = manager->handle_lid_switch;
+
+        manager_handle_action(manager, INHIBIT_HANDLE_LID_SWITCH, handle_action, manager->lid_switch_ignore_inhibited, is_edge);
+}
+
 static int button_recheck(sd_event_source *e, void *userdata) {
         Button *b = userdata;
 
         assert(b);
         assert(b->lid_closed);
 
-        manager_handle_action(b->manager, INHIBIT_HANDLE_LID_SWITCH, b->manager->handle_lid_switch, b->manager->lid_switch_ignore_inhibited, false);
+        button_lid_switch_handle_action(b->manager, false);
         return 1;
 }
 
@@ -186,7 +200,7 @@ static int button_dispatch(sd_event_source *s, int fd, uint32_t revents, void *u
                                    NULL);
 
                         b->lid_closed = true;
-                        manager_handle_action(b->manager, INHIBIT_HANDLE_LID_SWITCH, b->manager->handle_lid_switch, b->manager->lid_switch_ignore_inhibited, true);
+                        button_lid_switch_handle_action(b->manager, true);
                         button_install_check_event_source(b);
 
                 } else if (ev.code == SW_DOCK) {
index 053d2ed63e189df1cfec0c53e8d3093deb672ca7..ed7ea5da31cd9ba45aaeb6838e6b78824cd186cb 100644 (file)
@@ -537,3 +537,25 @@ int manager_count_displays(Manager *m) {
 
         return n;
 }
+
+bool manager_is_docked_or_multiple_displays(Manager *m) {
+        int n;
+
+        /* If we are docked don't react to lid closing */
+        if (manager_is_docked(m)) {
+                log_debug("System is docked.");
+                return true;
+        }
+
+        /* If we have more than one display connected,
+         * assume that we are docked. */
+        n = manager_count_displays(m);
+        if (n < 0)
+                log_warning("Display counting failed: %s", strerror(-n));
+        else if (n > 1) {
+                log_debug("Multiple (%i) displays connected.", n);
+                return true;
+        }
+
+        return false;
+}
index 1a363c2c5924e43f899ff2a9cb562a10e446480b..f18d21055ac089502ddd43e593f4c0bed260c626 100644 (file)
@@ -1029,13 +1029,13 @@ static int method_set_user_linger(sd_bus *bus, sd_bus_message *message, void *us
         if (!pw)
                 return errno ? -errno : -ENOENT;
 
-        r = bus_verify_polkit_async(bus,
-                                    &m->polkit_registry,
-                                    message,
-                                    "org.freedesktop.login1.set-user-linger",
-                                    interactive,
-                                    error,
-                                    method_set_user_linger, m);
+        r = bus_verify_polkit_async(
+                        message,
+                        CAP_SYS_ADMIN,
+                        "org.freedesktop.login1.set-user-linger",
+                        interactive,
+                        &m->polkit_registry,
+                        error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -1143,7 +1143,7 @@ static int attach_device(Manager *m, const char *seat, const char *sysfs) {
                 return -ENOMEM;
 
         mkdir_p_label("/etc/udev/rules.d", 0755);
-        label_init("/etc");
+        mac_selinux_init("/etc");
         r = write_string_file_atomic_label(file, rule);
         if (r < 0)
                 return r;
@@ -1201,13 +1201,13 @@ static int method_attach_device(sd_bus *bus, sd_bus_message *message, void *user
         if (!seat_name_is_valid(seat))
                 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Seat %s is not valid", seat);
 
-        r = bus_verify_polkit_async(bus,
-                                    &m->polkit_registry,
-                                    message,
-                                    "org.freedesktop.login1.attach-device",
-                                    interactive,
-                                    error,
-                                    method_attach_device, m);
+        r = bus_verify_polkit_async(
+                        message,
+                        CAP_SYS_ADMIN,
+                        "org.freedesktop.login1.attach-device",
+                        interactive,
+                        &m->polkit_registry,
+                        error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -1232,13 +1232,13 @@ static int method_flush_devices(sd_bus *bus, sd_bus_message *message, void *user
         if (r < 0)
                 return r;
 
-        r = bus_verify_polkit_async(bus,
-                                    &m->polkit_registry,
-                                    message,
-                                    "org.freedesktop.login1.flush-devices",
-                                    interactive,
-                                    error,
-                                    method_flush_devices, m);
+        r = bus_verify_polkit_async(
+                        message,
+                        CAP_SYS_ADMIN,
+                        "org.freedesktop.login1.flush-devices",
+                        interactive,
+                        &m->polkit_registry,
+                        error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -1532,8 +1532,7 @@ static int method_do_shutdown_or_sleep(
         blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL);
 
         if (multiple_sessions) {
-                r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message,
-                                            action_multiple_sessions, interactive, error, method, m);
+                r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, &m->polkit_registry, error);
                 if (r < 0)
                         return r;
                 if (r == 0)
@@ -1541,8 +1540,7 @@ static int method_do_shutdown_or_sleep(
         }
 
         if (blocked) {
-                r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message,
-                                            action_ignore_inhibit, interactive, error, method, m);
+                r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, &m->polkit_registry, error);
                 if (r < 0)
                         return r;
                 if (r == 0)
@@ -1550,8 +1548,7 @@ static int method_do_shutdown_or_sleep(
         }
 
         if (!multiple_sessions && !blocked) {
-                r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message,
-                                            action, interactive, error, method, m);
+                r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, &m->polkit_registry, error);
                 if (r < 0)
                         return r;
                 if (r == 0)
@@ -1688,7 +1685,7 @@ static int method_can_shutdown_or_sleep(
         blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL);
 
         if (multiple_sessions) {
-                r = bus_verify_polkit(m->bus, message, action_multiple_sessions, false, &challenge, error);
+                r = bus_verify_polkit(message, CAP_SYS_BOOT, action_multiple_sessions, false, &challenge, error);
                 if (r < 0)
                         return r;
 
@@ -1701,7 +1698,7 @@ static int method_can_shutdown_or_sleep(
         }
 
         if (blocked) {
-                r = bus_verify_polkit(m->bus, message, action_ignore_inhibit, false, &challenge, error);
+                r = bus_verify_polkit(message, CAP_SYS_BOOT, action_ignore_inhibit, false, &challenge, error);
                 if (r < 0)
                         return r;
 
@@ -1717,7 +1714,7 @@ static int method_can_shutdown_or_sleep(
                 /* If neither inhibit nor multiple sessions
                  * apply then just check the normal policy */
 
-                r = bus_verify_polkit(m->bus, message, action, false, &challenge, error);
+                r = bus_verify_polkit(message, CAP_SYS_BOOT, action, false, &challenge, error);
                 if (r < 0)
                         return r;
 
@@ -1837,7 +1834,7 @@ static int method_inhibit(sd_bus *bus, sd_bus_message *message, void *userdata,
         if (m->action_what & w)
                 return sd_bus_error_setf(error, BUS_ERROR_OPERATION_IN_PROGRESS, "The operation inhibition has been requested for is already running");
 
-        r = bus_verify_polkit_async(bus, &m->polkit_registry, message,
+        r = bus_verify_polkit_async(message, CAP_SYS_BOOT,
                                     w == INHIBIT_SHUTDOWN             ? (mm == INHIBIT_BLOCK ? "org.freedesktop.login1.inhibit-block-shutdown" : "org.freedesktop.login1.inhibit-delay-shutdown") :
                                     w == INHIBIT_SLEEP                ? (mm == INHIBIT_BLOCK ? "org.freedesktop.login1.inhibit-block-sleep"    : "org.freedesktop.login1.inhibit-delay-sleep") :
                                     w == INHIBIT_IDLE                 ? "org.freedesktop.login1.inhibit-block-idle" :
@@ -1845,7 +1842,7 @@ static int method_inhibit(sd_bus *bus, sd_bus_message *message, void *userdata,
                                     w == INHIBIT_HANDLE_SUSPEND_KEY   ? "org.freedesktop.login1.inhibit-handle-suspend-key" :
                                     w == INHIBIT_HANDLE_HIBERNATE_KEY ? "org.freedesktop.login1.inhibit-handle-hibernate-key" :
                                                                         "org.freedesktop.login1.inhibit-handle-lid-switch",
-                                    false, error, method_inhibit, m);
+                                    false, &m->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -1922,6 +1919,7 @@ const sd_bus_vtable manager_vtable[] = {
         SD_BUS_PROPERTY("HandleSuspendKey", "s", property_get_handle_action, offsetof(Manager, handle_suspend_key), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandleHibernateKey", "s", property_get_handle_action, offsetof(Manager, handle_hibernate_key), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandleLidSwitch", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("HandleLidSwitchDocked", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch_docked), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("IdleAction", "s", property_get_handle_action, offsetof(Manager, idle_action), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("IdleActionUSec", "t", NULL, offsetof(Manager, idle_action_usec), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("PreparingForShutdown", "b", property_get_preparing, 0, 0),
index 006f7286c5d1db0a6bba1ebfe2e6ec0761b100c9..62460673b9bd4e78eb5098f899f26c85af766699 100644 (file)
@@ -24,6 +24,7 @@ Login.HandlePowerKey,              config_parse_handle_action, 0, offsetof(Manag
 Login.HandleSuspendKey,            config_parse_handle_action, 0, offsetof(Manager, handle_suspend_key)
 Login.HandleHibernateKey,          config_parse_handle_action, 0, offsetof(Manager, handle_hibernate_key)
 Login.HandleLidSwitch,             config_parse_handle_action, 0, offsetof(Manager, handle_lid_switch)
+Login.HandleLidSwitchDocked,       config_parse_handle_action, 0, offsetof(Manager, handle_lid_switch_docked)
 Login.PowerKeyIgnoreInhibited,     config_parse_bool,          0, offsetof(Manager, power_key_ignore_inhibited)
 Login.SuspendKeyIgnoreInhibited,   config_parse_bool,          0, offsetof(Manager, suspend_key_ignore_inhibited)
 Login.HibernateKeyIgnoreInhibited, config_parse_bool,          0, offsetof(Manager, hibernate_key_ignore_inhibited)
index 64a62ffeae6f51b0f3f86aed4e39aa6275621006..a9e14af8dbf29148b1f510a765740f9d70f17a1b 100644 (file)
@@ -439,23 +439,23 @@ const char *inhibit_what_to_string(InhibitWhat w) {
 
 InhibitWhat inhibit_what_from_string(const char *s) {
         InhibitWhat what = 0;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
 
-        FOREACH_WORD_SEPARATOR(w, l, s, ":", state) {
-                if (l == 8 && strneq(w, "shutdown", l))
+        FOREACH_WORD_SEPARATOR(word, l, s, ":", state) {
+                if (l == 8 && strneq(word, "shutdown", l))
                         what |= INHIBIT_SHUTDOWN;
-                else if (l == 5 && strneq(w, "sleep", l))
+                else if (l == 5 && strneq(word, "sleep", l))
                         what |= INHIBIT_SLEEP;
-                else if (l == 4 && strneq(w, "idle", l))
+                else if (l == 4 && strneq(word, "idle", l))
                         what |= INHIBIT_IDLE;
-                else if (l == 16 && strneq(w, "handle-power-key", l))
+                else if (l == 16 && strneq(word, "handle-power-key", l))
                         what |= INHIBIT_HANDLE_POWER_KEY;
-                else if (l == 18 && strneq(w, "handle-suspend-key", l))
+                else if (l == 18 && strneq(word, "handle-suspend-key", l))
                         what |= INHIBIT_HANDLE_SUSPEND_KEY;
-                else if (l == 20 && strneq(w, "handle-hibernate-key", l))
+                else if (l == 20 && strneq(word, "handle-hibernate-key", l))
                         what |= INHIBIT_HANDLE_HIBERNATE_KEY;
-                else if (l == 17 && strneq(w, "handle-lid-switch", l))
+                else if (l == 17 && strneq(word, "handle-lid-switch", l))
                         what |= INHIBIT_HANDLE_LID_SWITCH;
                 else
                         return _INHIBIT_WHAT_INVALID;
index 3114de84de5811950248486d1a02862f29eb7fb1..99921951511cc3c9293c06d0be12fb3669cda899 100644 (file)
@@ -275,8 +275,13 @@ int seat_switch_to(Seat *s, unsigned int num) {
         if (!num)
                 return -EINVAL;
 
-        if (num >= s->position_count || !s->positions[num])
+        if (num >= s->position_count || !s->positions[num]) {
+                /* allow switching to unused VTs to trigger auto-activate */
+                if (seat_has_vts(s) && num < 64)
+                        return chvt(num);
+
                 return -EINVAL;
+        }
 
         return session_activate(s->positions[num]);
 }
index 7d81500426dc0e7bbc5fed8c153a2f08b6bab719..58836fce2597b6a2234e1ad0ef9920854c4ec2c1 100644 (file)
@@ -249,7 +249,7 @@ static int method_set_idle_hint(sd_bus *bus, sd_bus_message *message, void *user
                 return r;
 
         if (uid != 0 && uid != s->user->uid)
-                return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Only owner of session my set idle hint");
+                return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Only owner of session may set idle hint");
 
         session_set_idle_hint(s, b);
 
index fdeacb150acb42a84f203cb052fc412a613c6a50..65bbb77750b27ffdb1d575b02d3ce3c78c6c7ff8 100644 (file)
 
 static void session_remove_fifo(Session *s);
 
-static unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
-        uint64_t u = *(const dev_t*)p;
-
-        return uint64_hash_func(&u, hash_key);
-}
-
-static int devt_compare_func(const void *_a, const void *_b) {
-        dev_t a, b;
-
-        a = *(const dev_t*) _a;
-        b = *(const dev_t*) _b;
-
-        return a < b ? -1 : (a > b ? 1 : 0);
-}
-
 Session* session_new(Manager *m, const char *id) {
         Session *s;
 
@@ -76,7 +61,7 @@ Session* session_new(Manager *m, const char *id) {
                 return NULL;
         }
 
-        s->devices = hashmap_new(devt_hash_func, devt_compare_func);
+        s->devices = hashmap_new(&devt_hash_ops);
         if (!s->devices) {
                 free(s->state_file);
                 free(s);
@@ -153,8 +138,6 @@ void session_free(Session *s) {
 
         hashmap_remove(s->manager->sessions, s->id);
 
-        s->vt_source = sd_event_source_unref(s->vt_source);
-
         free(s->state_file);
         free(s);
 }
@@ -978,8 +961,8 @@ int session_kill(Session *s, KillWho who, int signo) {
 static int session_open_vt(Session *s) {
         char path[sizeof("/dev/tty") + DECIMAL_STR_MAX(s->vtnr)];
 
-        if (!s->vtnr)
-                return -1;
+        if (s->vtnr < 1)
+                return -ENODEV;
 
         if (s->vtfd >= 0)
                 return s->vtfd;
@@ -994,59 +977,56 @@ static int session_open_vt(Session *s) {
         return s->vtfd;
 }
 
-static int session_vt_fn(sd_event_source *source, const struct signalfd_siginfo *si, void *data) {
-        Session *s = data;
-
-        if (s->vtfd >= 0)
-                ioctl(s->vtfd, VT_RELDISP, 1);
-
-        return 0;
-}
-
-void session_prepare_vt(Session *s) {
+int session_prepare_vt(Session *s) {
         int vt, r;
         struct vt_mode mode = { 0 };
-        sigset_t mask;
+
+        if (s->vtnr < 1)
+                return 0;
 
         vt = session_open_vt(s);
         if (vt < 0)
-                return;
+                return vt;
 
         r = fchown(vt, s->user->uid, -1);
-        if (r < 0)
+        if (r < 0) {
+                r = -errno;
+                log_error("Cannot change owner of /dev/tty%u: %m", s->vtnr);
                 goto error;
+        }
 
         r = ioctl(vt, KDSKBMODE, K_OFF);
-        if (r < 0)
+        if (r < 0) {
+                r = -errno;
+                log_error("Cannot set K_OFF on /dev/tty%u: %m", s->vtnr);
                 goto error;
+        }
 
         r = ioctl(vt, KDSETMODE, KD_GRAPHICS);
-        if (r < 0)
-                goto error;
-
-        sigemptyset(&mask);
-        sigaddset(&mask, SIGUSR1);
-        sigprocmask(SIG_BLOCK, &mask, NULL);
-
-        r = sd_event_add_signal(s->manager->event, &s->vt_source, SIGUSR1, session_vt_fn, s);
-        if (r < 0)
+        if (r < 0) {
+                r = -errno;
+                log_error("Cannot set KD_GRAPHICS on /dev/tty%u: %m", s->vtnr);
                 goto error;
+        }
 
         /* Oh, thanks to the VT layer, VT_AUTO does not work with KD_GRAPHICS.
          * So we need a dummy handler here which just acknowledges *all* VT
          * switch requests. */
         mode.mode = VT_PROCESS;
-        mode.relsig = SIGUSR1;
-        mode.acqsig = SIGUSR1;
+        mode.relsig = SIGRTMIN;
+        mode.acqsig = SIGRTMIN + 1;
         r = ioctl(vt, VT_SETMODE, &mode);
-        if (r < 0)
+        if (r < 0) {
+                r = -errno;
+                log_error("Cannot set VT_PROCESS on /dev/tty%u: %m", s->vtnr);
                 goto error;
+        }
 
-        return;
+        return 0;
 
 error:
-        log_error("cannot mute VT %u for session %s (%d/%d)", s->vtnr, s->id, r, errno);
         session_restore_vt(s);
+        return r;
 }
 
 void session_restore_vt(Session *s) {
@@ -1058,8 +1038,6 @@ void session_restore_vt(Session *s) {
         if (vt < 0)
                 return;
 
-        s->vt_source = sd_event_source_unref(s->vt_source);
-
         ioctl(vt, KDSETMODE, KD_TEXT);
 
         if (read_one_line_file("/sys/module/vt/parameters/default_utf8", &utf8) >= 0 && *utf8 == '1')
@@ -1075,36 +1053,61 @@ void session_restore_vt(Session *s) {
         s->vtfd = safe_close(s->vtfd);
 }
 
+void session_leave_vt(Session *s) {
+        int r;
+
+        assert(s);
+
+        /* This is called whenever we get a VT-switch signal from the kernel.
+         * We acknowledge all of them unconditionally. Note that session are
+         * free to overwrite those handlers and we only register them for
+         * sessions with controllers. Legacy sessions are not affected.
+         * However, if we switch from a non-legacy to a legacy session, we must
+         * make sure to pause all device before acknowledging the switch. We
+         * process the real switch only after we are notified via sysfs, so the
+         * legacy session might have already started using the devices. If we
+         * don't pause the devices before the switch, we might confuse the
+         * session we switch to. */
+
+        if (s->vtfd < 0)
+                return;
+
+        session_device_pause_all(s);
+        r = ioctl(s->vtfd, VT_RELDISP, 1);
+        if (r < 0)
+                log_debug("Cannot release VT of session %s: %m", s->id);
+}
+
 bool session_is_controller(Session *s, const char *sender) {
         assert(s);
 
         return streq_ptr(s->controller, sender);
 }
 
-static void session_swap_controller(Session *s, char *name) {
+static void session_release_controller(Session *s, bool notify) {
+        _cleanup_free_ char *name = NULL;
         SessionDevice *sd;
 
-        if (s->controller) {
-                manager_drop_busname(s->manager, s->controller);
-                free(s->controller);
-                s->controller = NULL;
+        if (!s->controller)
+                return;
 
-                /* Drop all devices as they're now unused. Do that after the
-                 * controller is released to avoid sending out useles
-                 * dbus signals. */
-                while ((sd = hashmap_first(s->devices)))
-                        session_device_free(sd);
+        name = s->controller;
 
-                if (!name)
-                        session_restore_vt(s);
-        }
+        /* By resetting the controller before releasing the devices, we won't
+         * send notification signals. This avoids sending useless notifications
+         * if the controller is released on disconnects. */
+        if (!notify)
+                s->controller = NULL;
 
-        s->controller = name;
-        session_save(s);
+        while ((sd = hashmap_first(s->devices)))
+                session_device_free(sd);
+
+        s->controller = NULL;
+        manager_drop_busname(s->manager, name);
 }
 
 int session_set_controller(Session *s, const char *sender, bool force) {
-        char *t;
+        _cleanup_free_ char *name = NULL;
         int r;
 
         assert(s);
@@ -1115,17 +1118,13 @@ int session_set_controller(Session *s, const char *sender, bool force) {
         if (s->controller && !force)
                 return -EBUSY;
 
-        t = strdup(sender);
-        if (!t)
+        name = strdup(sender);
+        if (!name)
                 return -ENOMEM;
 
-        r = manager_watch_busname(s->manager, sender);
-        if (r) {
-                free(t);
+        r = manager_watch_busname(s->manager, name);
+        if (r)
                 return r;
-        }
-
-        session_swap_controller(s, t);
 
         /* When setting a session controller, we forcibly mute the VT and set
          * it into graphics-mode. Applications can override that by changing
@@ -1135,7 +1134,16 @@ int session_set_controller(Session *s, const char *sender, bool force) {
          * exits.
          * If logind crashes/restarts, we restore the controller during restart
          * or reset the VT in case it crashed/exited, too. */
-        session_prepare_vt(s);
+        r = session_prepare_vt(s);
+        if (r < 0) {
+                manager_drop_busname(s->manager, name);
+                return r;
+        }
+
+        session_release_controller(s, true);
+        s->controller = name;
+        name = NULL;
+        session_save(s);
 
         return 0;
 }
@@ -1146,7 +1154,9 @@ void session_drop_controller(Session *s) {
         if (!s->controller)
                 return;
 
-        session_swap_controller(s, NULL);
+        session_release_controller(s, false);
+        session_save(s);
+        session_restore_vt(s);
 }
 
 static const char* const session_state_table[_SESSION_STATE_MAX] = {
@@ -1164,6 +1174,7 @@ static const char* const session_type_table[_SESSION_TYPE_MAX] = {
         [SESSION_X11] = "x11",
         [SESSION_WAYLAND] = "wayland",
         [SESSION_MIR] = "mir",
+        [SESSION_WEB] = "web",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(session_type, SessionType);
index 81957dfa78d6f6c74ba025daaacbc4e04f3089a3..a007fb5e84cf468fe02df363ce0e4af94bb04eb2 100644 (file)
@@ -56,6 +56,7 @@ typedef enum SessionType {
         SESSION_X11,
         SESSION_WAYLAND,
         SESSION_MIR,
+        SESSION_WEB,
         _SESSION_TYPE_MAX,
         _SESSION_TYPE_INVALID = -1
 } SessionType;
@@ -72,7 +73,7 @@ enum KillWho {
 struct Session {
         Manager *manager;
 
-        char *id;
+        const char *id;
         unsigned int pos;
         SessionType type;
         SessionClass class;
@@ -98,7 +99,6 @@ struct Session {
         Seat *seat;
         unsigned int vtnr;
         int vtfd;
-        sd_event_source *vt_source;
 
         pid_t leader;
         uint32_t audit_id;
@@ -172,8 +172,9 @@ SessionClass session_class_from_string(const char *s) _pure_;
 const char *kill_who_to_string(KillWho k) _const_;
 KillWho kill_who_from_string(const char *s) _pure_;
 
-void session_prepare_vt(Session *s);
+int session_prepare_vt(Session *s);
 void session_restore_vt(Session *s);
+void session_leave_vt(Session *s);
 
 bool session_is_controller(Session *s, const char *sender);
 int session_set_controller(Session *s, const char *sender, bool force);
index fdbccb364c1814f45d07249253c9107b8bbee8c7..1205b48abb8f9b11b088fd40041da0e285dd122d 100644 (file)
@@ -37,6 +37,7 @@
 #include "conf-parser.h"
 #include "clean-ipc.h"
 #include "logind-user.h"
+#include "smack-util.h"
 
 User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name) {
         User *u;
@@ -325,7 +326,12 @@ static int user_mkdir_runtime_path(User *u) {
 
                 mkdir(p, 0700);
 
-                if (asprintf(&t, "mode=0700,uid=" UID_FMT ",gid=" GID_FMT ",size=%zu", u->uid, u->gid, u->manager->runtime_dir_size) < 0) {
+                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);
+                else
+                        r = asprintf(&t, "mode=0700,uid=" UID_FMT ",gid=" GID_FMT ",size=%zu", u->uid, u->gid, u->manager->runtime_dir_size);
+
+                if (r < 0) {
                         r = log_oom();
                         goto fail;
                 }
@@ -714,7 +720,7 @@ int user_kill(User *u, int signo) {
 }
 
 void user_elect_display(User *u) {
-        Session *graphical = NULL, *text = NULL, *s;
+        Session *graphical = NULL, *text = NULL, *other = NULL, *s;
 
         assert(u);
 
@@ -732,22 +738,35 @@ void user_elect_display(User *u) {
 
                 if (SESSION_TYPE_IS_GRAPHICAL(s->type))
                         graphical = s;
-                else
+                else if (s->type == SESSION_TTY)
                         text = s;
+                else
+                        other = s;
         }
 
         if (graphical &&
             (!u->display ||
              u->display->class != SESSION_USER ||
              u->display->stopping ||
-             !SESSION_TYPE_IS_GRAPHICAL(u->display->type)))
+             !SESSION_TYPE_IS_GRAPHICAL(u->display->type))) {
                 u->display = graphical;
+                return;
+        }
 
         if (text &&
             (!u->display ||
              u->display->class != SESSION_USER ||
-             u->display->stopping))
+             u->display->stopping ||
+             u->display->type != SESSION_TTY)) {
                 u->display = text;
+                return;
+        }
+
+        if (other &&
+            (!u->display ||
+             u->display->class != SESSION_USER ||
+             u->display->stopping))
+                u->display = other;
 }
 
 static const char* const user_state_table[_USER_STATE_MAX] = {
index 7a7bd97150864739fd66e3f07980907f7e0b3791..8f00c463399bc951015e98e0856e348d08300224 100644 (file)
@@ -55,6 +55,7 @@ Manager *manager_new(void) {
         m->handle_suspend_key = HANDLE_SUSPEND;
         m->handle_hibernate_key = HANDLE_HIBERNATE;
         m->handle_lid_switch = HANDLE_SUSPEND;
+        m->handle_lid_switch_docked = HANDLE_IGNORE;
         m->lid_switch_ignore_inhibited = true;
 
         m->idle_action_usec = 30 * USEC_PER_MINUTE;
@@ -63,17 +64,17 @@ Manager *manager_new(void) {
 
         m->runtime_dir_size = PAGE_ALIGN((size_t) (physical_memory() / 10)); /* 10% */
 
-        m->devices = hashmap_new(string_hash_func, string_compare_func);
-        m->seats = hashmap_new(string_hash_func, string_compare_func);
-        m->sessions = hashmap_new(string_hash_func, string_compare_func);
-        m->users = hashmap_new(trivial_hash_func, trivial_compare_func);
-        m->inhibitors = hashmap_new(string_hash_func, string_compare_func);
-        m->buttons = hashmap_new(string_hash_func, string_compare_func);
+        m->devices = hashmap_new(&string_hash_ops);
+        m->seats = hashmap_new(&string_hash_ops);
+        m->sessions = hashmap_new(&string_hash_ops);
+        m->users = hashmap_new(NULL);
+        m->inhibitors = hashmap_new(&string_hash_ops);
+        m->buttons = hashmap_new(&string_hash_ops);
 
-        m->user_units = hashmap_new(string_hash_func, string_compare_func);
-        m->session_units = hashmap_new(string_hash_func, string_compare_func);
+        m->user_units = hashmap_new(&string_hash_ops);
+        m->session_units = hashmap_new(&string_hash_ops);
 
-        m->busnames = set_new(string_hash_func, string_compare_func);
+        m->busnames = set_new(&string_hash_ops);
 
         if (!m->devices || !m->seats || !m->sessions || !m->users || !m->inhibitors || !m->buttons || !m->busnames ||
             !m->user_units || !m->session_units)
@@ -163,7 +164,7 @@ void manager_free(Manager *m) {
         if (m->udev)
                 udev_unref(m->udev);
 
-        bus_verify_polkit_async_registry_free(m->bus, m->polkit_registry);
+        bus_verify_polkit_async_registry_free(m->polkit_registry);
 
         sd_bus_unref(m->bus);
         sd_event_unref(m->event);
@@ -232,7 +233,8 @@ static int manager_enumerate_buttons(Manager *m) {
         if (m->handle_power_key == HANDLE_IGNORE &&
             m->handle_suspend_key == HANDLE_IGNORE &&
             m->handle_hibernate_key == HANDLE_IGNORE &&
-            m->handle_lid_switch == HANDLE_IGNORE)
+            m->handle_lid_switch == HANDLE_IGNORE &&
+            m->handle_lid_switch_docked == HANDLE_IGNORE)
                 return 0;
 
         e = udev_enumerate_new(m->udev);
@@ -720,6 +722,47 @@ static int manager_connect_bus(Manager *m) {
         return 0;
 }
 
+static int manager_vt_switch(sd_event_source *src, const struct signalfd_siginfo *si, void *data) {
+        Manager *m = data;
+        Session *active, *iter;
+
+        /*
+         * We got a VT-switch signal and we have to acknowledge it immediately.
+         * Preferably, we'd just use m->seat0->active->vtfd, but unfortunately,
+         * old user-space might run multiple sessions on a single VT, *sigh*.
+         * Therefore, we have to iterate all sessions and find one with a vtfd
+         * on the requested VT.
+         * As only VTs with active controllers have VT_PROCESS set, our current
+         * notion of the active VT might be wrong (for instance if the switch
+         * happens while we setup VT_PROCESS). Therefore, read the current VT
+         * first and then use s->active->vtnr as reference. Note that this is
+         * not racy, as no further VT-switch can happen as long as we're in
+         * synchronous VT_PROCESS mode.
+         */
+
+        assert(m->seat0);
+        seat_read_active_vt(m->seat0);
+
+        active = m->seat0->active;
+        if (!active || active->vtnr < 1) {
+                log_warning("Received VT_PROCESS signal without a registered session on that VT.");
+                return 0;
+        }
+
+        if (active->vtfd >= 0) {
+                session_leave_vt(active);
+        } else {
+                LIST_FOREACH(sessions_by_seat, iter, m->seat0->sessions) {
+                        if (iter->vtnr == active->vtnr && iter->vtfd >= 0) {
+                                session_leave_vt(iter);
+                                break;
+                        }
+                }
+        }
+
+        return 0;
+}
+
 static int manager_connect_console(Manager *m) {
         int r;
 
@@ -750,6 +793,34 @@ static int manager_connect_console(Manager *m) {
                 return r;
         }
 
+        /*
+         * SIGRTMIN is used as global VT-release signal, SIGRTMIN + 1 is used
+         * as VT-acquire signal. We ignore any acquire-events (yes, we still
+         * have to provide a valid signal-number for it!) and acknowledge all
+         * release events immediately.
+         */
+
+        if (SIGRTMIN + 1 > SIGRTMAX) {
+                log_error("Not enough real-time signals available: %u-%u", SIGRTMIN, SIGRTMAX);
+                return -EINVAL;
+        }
+
+        r = ignore_signals(SIGRTMIN + 1, -1);
+        if (r < 0) {
+                log_error("Cannot ignore SIGRTMIN + 1: %s", strerror(-r));
+                return r;
+        }
+
+        r = sigprocmask_many(SIG_BLOCK, SIGRTMIN, -1);
+        if (r < 0) {
+                log_error("Cannot block SIGRTMIN: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_event_add_signal(m->event, NULL, SIGRTMIN, manager_vt_switch, m);
+        if (r < 0)
+                return r;
+
         return 0;
 }
 
@@ -806,7 +877,8 @@ static int manager_connect_udev(Manager *m) {
         if (m->handle_power_key != HANDLE_IGNORE ||
             m->handle_suspend_key != HANDLE_IGNORE ||
             m->handle_hibernate_key != HANDLE_IGNORE ||
-            m->handle_lid_switch != HANDLE_IGNORE) {
+            m->handle_lid_switch != HANDLE_IGNORE ||
+            m->handle_lid_switch_docked != HANDLE_IGNORE) {
 
                 m->udev_button_monitor = udev_monitor_new_from_netlink(m->udev, "udev");
                 if (!m->udev_button_monitor)
@@ -1097,27 +1169,12 @@ int manager_run(Manager *m) {
 }
 
 static int manager_parse_config_file(Manager *m) {
-        static const char fn[] = "/etc/systemd/logind.conf";
-        _cleanup_fclose_ FILE *f = NULL;
-        int r;
-
         assert(m);
 
-        f = fopen(fn, "re");
-        if (!f) {
-                if (errno == ENOENT)
-                        return 0;
-
-                log_warning("Failed to open configuration file %s: %m", fn);
-                return -errno;
-        }
-
-        r = config_parse(NULL, fn, f, "Login\0", config_item_perf_lookup,
-                         (void*) logind_gperf_lookup, false, false, m);
-        if (r < 0)
-                log_warning("Failed to parse configuration file: %s", strerror(-r));
-
-        return r;
+        return config_parse(NULL, "/etc/systemd/logind.conf", NULL,
+                            "Login\0",
+                            config_item_perf_lookup, logind_gperf_lookup,
+                            false, false, true, m);
 }
 
 int main(int argc, char *argv[]) {
@@ -1172,6 +1229,7 @@ int main(int argc, char *argv[]) {
 
 finish:
         sd_notify(false,
+                  "STOPPING=1\n"
                   "STATUS=Shutting down...");
 
         if (m)
index 79f96ec05bb366dd3fd89a723ba393032ef491f8..4608a2c0e2477a30c0300437fd0ed5edbbb57575 100644 (file)
@@ -18,6 +18,7 @@
 #HandleSuspendKey=suspend
 #HandleHibernateKey=hibernate
 #HandleLidSwitch=suspend
+#HandleLidSwitchDocked=ignore
 #PowerKeyIgnoreInhibited=no
 #SuspendKeyIgnoreInhibited=no
 #HibernateKeyIgnoreInhibited=no
index 31353eff028154697f5bd7b3df43831e48615d73..2f76572580bf24273635e6474dd01172fda7ae7b 100644 (file)
@@ -114,6 +114,7 @@ struct Manager {
         HandleAction handle_suspend_key;
         HandleAction handle_hibernate_key;
         HandleAction handle_lid_switch;
+        HandleAction handle_lid_switch_docked;
 
         bool power_key_ignore_inhibited;
         bool suspend_key_ignore_inhibited;
@@ -159,6 +160,7 @@ 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);
 
 extern const sd_bus_vtable manager_vtable[];
 
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644 (file)
index 83760d4..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2011 Lennart Poettering
-
-  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/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
-        int i;
-        const char *seat = NULL;
-        char **new_argv;
-        _cleanup_free_ char *path = NULL;
-        int r;
-        _cleanup_fclose_ FILE *f = NULL;
-
-        /* This binary will go away as soon as X natively takes the
-         * arguments in question as command line parameters, instead
-         * of requiring them in the configuration file. */
-
-        /* If this file is removed, don't forget to remove the code
-         * that invokes this in gdm and other display managers. */
-
-        for (i = 1; i < argc; i++)
-                if (streq(argv[i], "-seat"))
-                        seat = argv[i+1];
-
-        if (isempty(seat) || streq(seat, "seat0")) {
-                argv[0] = (char*) X_SERVER;
-                execv(X_SERVER, argv);
-                log_error("Failed to execute real X server: %m");
-                goto fail;
-        }
-
-        r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0);
-        if (r < 0) {
-                log_error("Failed to create directory: %s", strerror(-r));
-                goto fail;
-        }
-
-        path = strappend("/run/systemd/multi-session-x/", seat);
-        if (!path) {
-                log_oom();
-                goto fail;
-        }
-
-        f = fopen(path, "we");
-        if (!f) {
-                log_error("Failed to write configuration file: %m");
-                goto fail;
-        }
-
-        fprintf(f,
-                "Section \"ServerFlags\"\n"
-                "        Option \"AutoAddDevices\" \"True\"\n"
-                "        Option \"AllowEmptyInput\" \"True\"\n"
-                "        Option \"DontVTSwitch\" \"True\"\n"
-                "EndSection\n"
-                "Section \"InputClass\"\n"
-                "        Identifier \"Force Input Devices to Seat\"\n"
-                "        Option \"GrabDevice\" \"True\"\n"
-                "EndSection\n");
-
-        fflush(f);
-
-        if (ferror(f)) {
-                log_error("Failed to write configuration file: %m");
-                goto fail;
-        }
-
-        fclose(f);
-        f = NULL;
-
-        new_argv = newa(char*, argc + 3 + 1);
-        memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
-        new_argv[0] = (char*) X_SERVER;
-        new_argv[argc+0] = (char*) "-config";
-        new_argv[argc+1] = path;
-        new_argv[argc+2] = (char*) "-sharevts";
-        new_argv[argc+3] = NULL;
-
-        execv(X_SERVER, new_argv);
-        log_error("Failed to execute real X server: %m");
-
-fail:
-        return EXIT_FAILURE;
-}
diff --git a/src/login/org.freedesktop.login1.policy b/src/login/org.freedesktop.login1.policy
deleted file mode 100644 (file)
index e64d052..0000000
+++ /dev/null
@@ -1,551 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
-        "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
-        <vendor>The systemd Project</vendor>
-        <vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
-
-        <action id="org.freedesktop.login1.inhibit-block-shutdown">
-                <description>Allow applications to inhibit system shutdown</description>
-                <description xml:lang="de">Anwendungen dürfen das Herunterfahren des Systems unterbinden</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να αποτρέπουν τον τερματισμό του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications d'empêcher l'arrêt du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di inibire lo spegnimento del sistema</description>
-                <description xml:lang="pl">Zezwolenie programom na wstrzymywanie wyłączenia systemu</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать блокировку на выключение системы</description>
-                <message>Authentication is required to allow an application to inhibit system shutdown.</message>
-                <message xml:lang="de">Legitimierung ist notwendig, um Anwendungen das Herunterfahren des Systems zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει τον τερματισμό του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application d'empêcher l'arrêt du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire alle applicazione di inibire lo spegnimento del sistema</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na wstrzymanie wyłączenia systemu.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать блокировку на выключение системы, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-shutdown org.freedesktop.login1.inhibit-block-sleep org.freedesktop.login1.inhibit-delay-sleep org.freedesktop.login1.inhibit-block-idle</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-delay-shutdown">
-                <description>Allow applications to delay system shutdown</description>
-                <description xml:lang="de">Anwendungen dürfen das Herunterfahren des Systems verzögern</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να καθυστερούν τον τερματισμό του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications de retarder l'arrêt du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di ritardare lo spegnimento del sistema</description>
-                <description xml:lang="pl">Zezwolenie programom na opóźnienie wyłączenia systemu</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать задержку на выключение системы</description>
-                <message>Authentication is required to allow an application to delay system shutdown.</message>
-                <message xml:lang="de">Legitimierung ist notwendig, um Anwendungen das Verzögern des Herunterfahren des Systems zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να καθυστερήσει τον τερματισμό του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application de retarder l'arrêt du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire alle applicazione di ritardare lo spegnimento del sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na opóźnienie wyłączenia systemu.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать задержку на выключение системы, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>yes</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-sleep</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-block-sleep">
-                <description>Allow applications to inhibit system sleep</description>
-                <description xml:lang="de">Anwendungen dürfen den Bereitschaftsmodus unterbinden</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να αποτρέπουν την ύπνωση του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications d'empêcher la mise en veille du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di inibire il sistema in pausa</description>
-                <description xml:lang="pl">Zezwolenie programom na wstrzymanie uśpienia systemu</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать блокировку на засыпание системы</description>
-                <message>Authentication is required to allow an application to inhibit system sleep.</message>
-                <message xml:lang="de">Legitimierung ist erforderlich, um Anwendungen das Unterbinden des Bereitschaftsmodus zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την ύπνωση του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application d'empêcher la mise en veille du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire alle applicazioni di inibire il sistema in pausa.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na wstrzymanie uśpienia systemu.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать блокировку на засыпание системы, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-sleep org.freedesktop.login1.inhibit-block-idle</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-delay-sleep">
-                <description>Allow applications to delay system sleep</description>
-                <description xml:lang="de">Anwendungen dürfen den Bereitschaftsmodus verzögern</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να καθυστερούν την ύπνωση του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications de retarder la mise en veille du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di ritardare il sistema in pausa</description>
-                <description xml:lang="pl">Zezwolenie programom na opóźnienie uśpienia systemu</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать задержку на засыпание системы</description>
-                <message>Authentication is required to allow an application to delay system sleep.</message>
-                <message xml:lang="de">Legitimierung ist erforderlich, um Anwendungen das Verzögern des Bereitschaftsmodus zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να καθυστερήσει την ύπνωση του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application de retarder la mise en veille du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire alle applicazioni di ritardare il sistema in pausa.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na opóźnienie uśpienia systemu.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать задержку на засыпание системы, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>yes</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-block-idle">
-                <description>Allow applications to inhibit automatic system suspend</description>
-                <description xml:lang="de">Anwendungen dürfen den automatischen Bereitschaftsmodus unterbinden</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να αποτρέπουν την αυτόματη αναστολή του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications d'empêcher l'hibernation automatique du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di inibire la sospesione automatica del sistema</description>
-                <description xml:lang="pl">Zezwolenie programom na wstrzymanie automatycznego uśpienia systemu</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать блокировку на автоматический переход системы в ждущий режим</description>
-                <message>Authentication is required to allow an application to inhibit automatic system suspend.</message>
-                <message xml:lang="de">Legitimierung ist notwendig, um Anwendungen das Unterbinden des automatischen Bereitschaftsmodus zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την αυτόματη αναστολή του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application d'empêcher l'hibernation automatique du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire alle applicazioni di inibire la sospensione automatica del sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na wstrzymanie automatycznego uśpienia systemu.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать блокировку на автоматический переход системы в ждущий режим, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>yes</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-handle-power-key">
-                <description>Allow applications to inhibit system handling of the power key</description>
-                <description xml:lang="de">Anwendungen dürfen das Auswerten des Ein-/Ausschaltknopfs des Systems unterbinden</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου ενεργοποίησης του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications d'empêcher la gestion du bouton d'alimentation  du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di inibire al sistema la gestione del tasto di accensione</description>
-                <description xml:lang="pl">Zezwolenie programom na wstrzymanie obsługi klawisza zasilania przez system</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать блокировку обработки нажатий на кнопку выключения</description>
-                <message>Authentication is required to allow an application to inhibit system handling of the power key.</message>
-                <message xml:lang="de">Legitmierung ist erforderlich, um Anwendungen das Unterbinden der Auswertung der Ein-/Ausschaltknopfs des Systems zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την διαχείριση του πλήκτρου ενεργοποίησης του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application d'empêcher la gestion du bouton d'alimentation du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire alle applicazioni di inibire al sistema la gestione del tasto di accensione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na wstrzymanie obsługi klawisza zasilania przez system.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать блокировку обработки нажатий на кнопку выключения, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-handle-suspend-key org.freedesktop.login1.inhibit-handle-hibernate-key org.freedesktop.login1.inhibit-handle-lid-switch</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-handle-suspend-key">
-                <description>Allow applications to inhibit system handling of the suspend key</description>
-                <description xml:lang="de">Anwendungen dürfen das Auswerten des Bereitschaftsknopfs des Systems unterbinden</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου αναστολής του συστήματος.</description>
-                <description xml:lang="fr">Permet aux applications d'empêcher la gestion du bouton de mise en veille du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di inibire al sistema la gestione del tasto di sospensione</description>
-                <description xml:lang="pl">Zezwolenie programom na wstrzymanie obsługi klawisza uśpienia przez system</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать блокировку обработки нажатий на кнопку перехода в ждущий режим</description>
-                <message>Authentication is required to allow an application to inhibit system handling of the suspend key.</message>
-                <message xml:lang="de">Legitimierung ist erforderlich, um Anwendungen das Unterbinden der Auswertung des Bereitschaftsknopfes des Systems zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την διαχείριση του πλήκτρου αναστολής του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application d'empêcher la gestion du bouton de mise en veille du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire ad un'applicazione di inibire al sistema la gestione del tasto di sospensione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na wstrzymanie obsługi klawisza uśpienia przez system.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать блокировку обработки нажатий на кнопку перехода в ждущий режим, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-handle-hibernate-key org.freedesktop.login1.inhibit-handle-lid-switch</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-handle-hibernate-key">
-                <description>Allow applications to inhibit system handling of the hibernate key</description>
-                <description xml:lang="de">Anwendungen dürfen das Auswerten des Knopfs für den Ruhezustand unterbinden</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου αδρανοποίησης του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications d'empêcher la gestion du bouton d'hibernation du système</description>
-                <description xml:lang="it">Consenti alle applicazioni di inibire al sistema la gestione del tasto di ibernazione</description>
-                <description xml:lang="pl">Zezwolenie programom na wstrzymanie obsługi klawisza hibernacji przez system</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать блокировку обработки нажатий на кнопку перехода в спящий режим</description>
-                <message>Authentication is required to allow an application to inhibit system handling of the hibernate key.</message>
-                <message xml:lang="de">Legitimierung ist erforderlich, um Anwendungen das Unterbinden der Auswertung des Knopfs für den Ruhezustand zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την διαχείριση του πλήκτρου αδρανοποίησης του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application d'empêcher la gestion du bouton d'hibernation du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire ad un'applicazione di inibire al sistema la gestione del tasto di ibernazione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na wstrzymanie obsługi klawisza hibernacji przez system.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать блокировку обработки нажатий на кнопку перехода в спящий режим, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.inhibit-handle-lid-switch">
-                <description>Allow applications to inhibit system handling of the lid switch</description>
-                <description xml:lang="de">Anwendungen dürfen das Auswerten des Notebookdeckelschalters unterbinden</description>
-                <description xml:lang="el">Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του διακόπτη καλύμματος του συστήματος</description>
-                <description xml:lang="fr">Permet aux applications d'empêcher la gestion par le système du rabat de l'écran</description>
-                <description xml:lang="it">Consenti alle applicazioni di inibire al sistema la gestione degli eventi relativi alla chiusura del portatile</description>
-                <description xml:lang="pl">Zezwolenie programom na wstrzymanie obsługi przełącznika pokrywy przez system</description>
-                <description xml:lang="ru">Разрешить приложениям устанавливать блокировку на обработку закрытия крышки ноутбука</description>
-                <message>Authentication is required to allow an application to inhibit system handling of the lid switch.</message>
-                <message xml:lang="de">Legitimierung ist erforderlich, um Anwendungen das Unterbinden der Auswertung des Notebookdeckelschalters des Systems zu erlauben.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την διαχείριση του διακόπτη καλύμματος του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour permettre à une application d'empêcher la gestion par le système du rabat de l'écran.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire alle applicazioni di inibire al sistema la gestione degli eventi relativi alla chiusura del portatile.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić programowi na wstrzymanie obsługi przełącznika pokrywy przez system.</message>
-                <message xml:lang="ru">Чтобы разрешить приложениям устанавливать блокировку на обработку закрытия крышки ноутбука, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>no</allow_any>
-                        <allow_inactive>yes</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.set-user-linger">
-                <description>Allow non-logged-in users to run programs</description>
-                <description xml:lang="de">Nicht angemeldete Benutzer dürfen Programme ausführen</description>
-                <description xml:lang="el">Να επιτρέπεται σε μη συνδεμένους χρήστες να εκτελούν προγράμματα</description>
-                <description xml:lang="fr">Permet aux utilisateurs non connectés d'exécuter des programmes</description>
-                <description xml:lang="it">Consenti agli utenti non connessi di eseguire programmi</description>
-                <description xml:lang="pl">Zezwolenie niezalogowanym użytkownikom na uruchamianie programów</description>
-                <description xml:lang="ru">Разрешить пользователям оставлять программы в фоновом режиме после завершения сеанса</description>
-                <message>Authentication is required to allow a non-logged-in user to run programs.</message>
-                <message xml:lang="de">Legitimierung ist erforderlich, damit nicht angemeldete Benutzer Programme ausführen dürfen.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να επιτρέπεται σε μη συνδεμένους χρήστες να εκτελούν προγράμματα.</message>
-                <message xml:lang="fr">Authentification requise pour permettre aux utilisateurs non connectés d'exécuter des programmes.</message>
-                <message xml:lang="it">Autenticazione richiesta per consentire agli utenti non connessi di eseguire programmi.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zezwolić niezalogowanemu użytkownikowi na uruchamianie programów.</message>
-                <message xml:lang="ru">Чтобы разрешить пользователям оставлять программы в фоновом режиме после завершения сеанса, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.attach-device">
-                <description>Allow attaching devices to seats</description>
-                <description xml:lang="de">Das Anschließen von Geräten an Arbeitsstationen erlauben</description>
-                <description xml:lang="el">Να επιτρέπεται η προσάρτηση συσκευών στους σταθμούς εργασίας</description>
-                <description xml:lang="fr">Permet d'associer des périphériques à des postes (seats)</description>
-                <description xml:lang="it">Consenti di collegare dispositivi alle postazioni</description>
-                <description xml:lang="pl">Zezwolenie na podłączanie urządzeń do stanowisk</description>
-                <description xml:lang="ru">Разрешить подключение устройств к рабочим местам</description>
-                <message>Authentication is required for attaching a device to a seat.</message>
-                <message xml:lang="de">Legitimierung ist zum Anschließen eines Geräts an eine Arbeitsstation notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για προσάρτηση μιας συσκευής σε έναν σταθμό εργασίας.</message>
-                <message xml:lang="fr">Authentification requise pour associer un périphérique à un poste (seat).</message>
-                <message xml:lang="it">Autenticazione richiesta per collegare un dispositivo alla postazione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby podłączyć urządzenie do stanowiska.</message>
-                <message xml:lang="ru">Чтобы разрешить подключение устройств к рабочим местам, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.flush-devices</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.flush-devices">
-                <description>Flush device to seat attachments</description>
-                <description xml:lang="de">Zurücksetzen der an eine Arbeitsstation angeschlossenen Geräte</description>
-                <description xml:lang="el">Αφαίρεση συσκευής από προσαρτήσεις σταθμού εργασίας</description>
-                <description xml:lang="fr">Révoquer les associations de périphériques aux postes (seats)</description>
-                <description xml:lang="it">Scollega i dispositivi dalla postazione</description>
-                <description xml:lang="pl">Usunięcie podłączenia urządzeń do stanowisk</description>
-                <description xml:lang="ru">Сбросить привязки устройств к рабочим местам</description>
-                <message>Authentication is required for resetting how devices are attached to seats.</message>
-                <message xml:lang="de">Legitimierung ist zum Zurücksetzen notwendig, wie Geräte an eine Arbeitsstation angeschlossen werden.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για επαναφορά του τρόπου που οι συσκευές προσαρτώνται στους σταθμούς εργασίας.</message>
-                <message xml:lang="fr">Authentification requise pour révoquer les associations de périphériques aux postes (seats).</message>
-                <message xml:lang="it">Autenticazione richiesta per scollegare i dispositivi dalla postazione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ponownie ustawić sposób podłączenia urządzeń do stanowisk.</message>
-                <message xml:lang="ru">Чтобы сбросить привязки устройств к рабочим местам, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.power-off">
-                <description>Power off the system</description>
-                <description xml:lang="de">Das System ausschalten</description>
-                <description xml:lang="el">Σβήσιμο του συστήματος</description>
-                <description xml:lang="fr">Éteindre le système</description>
-                <description xml:lang="it">Spegnere il sistema</description>
-                <description xml:lang="pl">Wyłączenie systemu</description>
-                <description xml:lang="ru">Выключить систему</description>
-                <message>Authentication is required for powering off the system.</message>
-                <message xml:lang="de">Legitimierung ist zum Ausschalten des Systems notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για την σβήσιμο του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour éteindre le système.</message>
-                <message xml:lang="it">Autenticazione richiesta per spegnere il sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby wyłączyć system.</message>
-                <message xml:lang="ru">Чтобы выключить систему, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.power-off-multiple-sessions">
-                <description>Power off the system while other users are logged in</description>
-                <description xml:lang="de">Das System herunter fahren, während andere Benutzer angemeldet sind</description>
-                <description xml:lang="el">Σβήσιμο του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι</description>
-                <description xml:lang="fr">Éteindre le système alors que d'autres utilisateurs sont connectés</description>
-                <description xml:lang="it">Spegnere il sistema mentre altri utenti sono connessi</description>
-                <description xml:lang="pl">Wyłączenie systemu, kiedy są zalogowani inni użytkownicy</description>
-                <description xml:lang="ru">Выключить систему, несмотря на то, что в ней работают другие пользователи</description>
-                <message>Authentication is required for powering off the system while other users are logged in.</message>
-                <message xml:lang="de">Legitimierung ist zum Herunterfahren des Systems notwendig, während andere Benutzer angemeldet sind.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για σβήσιμο του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι.</message>
-                <message xml:lang="fr">Authentification requise pour éteindre le système alors que d'autres utilisateurs sont connectés.</message>
-                <message xml:lang="it">Autenticazione richiesta per spegnere il sistema mentre altri utenti sono connessi.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy są zalogowani inni użytkownicy.</message>
-                <message xml:lang="ru">Чтобы выключить систему, несмотря на то, что в ней работают другие пользователи, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.power-off</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.power-off-ignore-inhibit">
-                <description>Power off the system while an application asked to inhibit it</description>
-                <description xml:lang="de">Das System ausschalten, während eine Anwendung anfordert es zu unterbinden</description>
-                <description xml:lang="el">Απενεργοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί.</description>
-                <description xml:lang="fr">Éteindre le système alors qu'une application a demandé de l'empêcher</description>
-                <description xml:lang="it">Spegnere il sistema nonostante l'inibizione di una applicazione</description>
-                <description xml:lang="pl">Wyłączenie systemu, kiedy program zażądał jego wstrzymania</description>
-                <description xml:lang="ru">Выключить систему, несмотря на то, что приложение запросило блокировку выключения</description>
-                <message>Authentication is required for powering off the system while an application asked to inhibit it.</message>
-                <message xml:lang="de">Legitimierung ist zum Ausschalten des Systems notwendig, während eine Anwendung anfordert es zu unterbinden.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για απενεργοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί.</message>
-                <message xml:lang="fr">Authentification requise pour éteindre le système alors qu'une application a demandé de l'empêcher.</message>
-                <message xml:lang="it">Autenticazione richiesta per spegnere il sistema nonostante l'inibizione di una applicazione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy program zażądał jego wstrzymania.</message>
-                <message xml:lang="ru">Чтобы выключить систему, несмотря на то, что приложение запросило блокировку выключения, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.power-off</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.reboot">
-                <description>Reboot the system</description>
-                <description xml:lang="de">Das System neu starten</description>
-                <description xml:lang="el">Επανεκκίνηση του συστήματος</description>
-                <description xml:lang="fr">Redémarrer le système</description>
-                <description xml:lang="it">Riavviare il sistema</description>
-                <description xml:lang="pl">Ponowne uruchomienie systemu</description>
-                <description xml:lang="ru">Перезагрузить систему</description>
-                <message>Authentication is required for rebooting the system.</message>
-                <message xml:lang="de">Legitimierung ist zum Neustart des Systems notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour redémarrer le système.</message>
-                <message xml:lang="it">Autenticazione richiesta per riavviare il sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ponownie uruchomić system.</message>
-                <message xml:lang="ru">Чтобы перезагрузить систему, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.reboot-multiple-sessions">
-                <description>Reboot the system while other users are logged in</description>
-                <description xml:lang="de">Das Systems neu starten, während andere Benutzer angemeldet sind</description>
-                <description xml:lang="el">Επανεκκίνηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι</description>
-                <description xml:lang="fr">Redémarrer le système alors que d'autres utilisateurs sont connectés</description>
-                <description xml:lang="it">Riavviare il sistema mentre altri utenti sono connessi</description>
-                <description xml:lang="pl">Ponowne uruchomienie systemu, kiedy są zalogowani inni użytkownicy</description>
-                <description xml:lang="ru">Перезагрузить систему, несмотря на то, что в ней работают другие пользователи</description>
-                <message>Authentication is required for rebooting the system while other users are logged in.</message>
-                <message xml:lang="de">Legitimierung ist zum Neustart des Systems notwendig, während andere Benutzer angemeldet sind.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι.</message>
-                <message xml:lang="fr">Authentification requise pour redémarrer le système alors que d'autres utilisateurs sont connectés.</message>
-                <message xml:lang="it">Autenticazione richiesta per riavviare il sistema mentre altri utenti sono connessi.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy są zalogowani inni użytkownicy.</message>
-                <message xml:lang="ru">Чтобы перезагрузить систему, несмотря на то, что в ней работают другие пользователи, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.reboot</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.reboot-ignore-inhibit">
-                <description>Reboot the system while an application asked to inhibit it</description>
-                <description xml:lang="de">Das System neu starten, während eine Anwendung anfordert es zu unterbinden</description>
-                <description xml:lang="el">Επανεκκίνηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί</description>
-                <description xml:lang="fr">Redémarrer le système alors qu'une application a demandé de l'empêcher</description>
-                <description xml:lang="it">Riavviare il sistema nonostante l'inibizione di una applicazione</description>
-                <description xml:lang="pl">Ponowne uruchomienie systemu, kiedy program poprosił o jego wstrzymanie</description>
-                <description xml:lang="ru">Перезагрузить систему, несмотря на то, что приложение запросило блокировку выключения</description>
-                <message>Authentication is required for rebooting the system while an application asked to inhibit it.</message>
-                <message xml:lang="de">Legitimierung ist zum Neustart des Systems notwendig, während eine Anwendung anforderte es zu unterbinden.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί.</message>
-                <message xml:lang="fr">Authentification requise pour redémarrer le système alors qu'une application  a demandé de l'empêcher.</message>
-                <message xml:lang="it">Autenticazione richiesta per riavviare il sistema nonostante l'inibizione di una applicazione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy program zażądał jego wstrzymania.</message>
-                <message xml:lang="ru">Чтобы перезагрузить систему, несмотря на то, что приложение запросило блокировку выключения, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.reboot</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.suspend">
-                <description>Suspend the system</description>
-                <description xml:lang="de">Das System in Bereitschaft versetzen</description>
-                <description xml:lang="el">Αναστολή του συστήματος</description>
-                <description xml:lang="fr">Mettre le système en veille</description>
-                <description xml:lang="it">Sospendere il sistema</description>
-                <description xml:lang="pl">Uśpienie systemu</description>
-                <description xml:lang="ru">Перевести систему в ждущий режим</description>
-                <message>Authentication is required for suspending the system.</message>
-                <message xml:lang="de">Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για την αναστολή του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour mettre le système en veille.</message>
-                <message xml:lang="it">Autenticazione richiesta per sospendere il sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby uśpić system.</message>
-                <message xml:lang="ru">Чтобы перевести систему в ждущий режим, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.suspend-multiple-sessions">
-                <description>Suspend the system while other users are logged in</description>
-                <description xml:lang="de">Das System in Bereitschaft versetzen, während andere Benutzer angemeldet sind.</description>
-                <description xml:lang="el">Αναστολή του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι</description>
-                <description xml:lang="fr">Mettre le système en veille alors que d'autres utilisateurs sont connectés</description>
-                <description xml:lang="it">Sospendere il sistema mentre altri utenti sono connessi</description>
-                <description xml:lang="pl">Uśpienie systemu, kiedy są zalogowani inni użytkownicy</description>
-                <description xml:lang="ru">Перевести систему в ждущий режим, несмотря на то, что в ней работают другие пользователи</description>
-                <message>Authentication is required for suspending the system while other users are logged in.</message>
-                <message xml:lang="de">Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig, während andere Benutzer angemeldet sind.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για αναστολή του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι.</message>
-                <message xml:lang="fr">Authentification requise pour mettre le système en veille alors que d'autres utilisateurs sont connectés.</message>
-                <message xml:lang="it">Autenticazione richiesta per sospendere il sistema mentre altri utenti sono connessi.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby uśpić system, kiedy są zalogowani inni użytkownicy.</message>
-                <message xml:lang="ru">Чтобы перевести систему в ждущий режим, несмотря на то, что в ней работают другие пользователи, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.suspend</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.suspend-ignore-inhibit">
-                <description>Suspend the system while an application asked to inhibit it</description>
-                <description xml:lang="de">Das System in Bereitschaft versetzen, während eine Anwendung anfordert dies zu unterbinden</description>
-                <description xml:lang="el">Αναστολή του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί</description>
-                <description xml:lang="fr">Mettre le système en veille alors qu'une application a demandé de l'empêcher</description>
-                <description xml:lang="it">Sospendere il sistema nonostante l'inibizione di una applicazione</description>
-                <description xml:lang="pl">Uśpienie systemu, kiedy program poprosił o jego wstrzymanie</description>
-                <description xml:lang="ru">Перевести систему в ждущий режим, несмотря на то, что приложение запросило блокировку</description>
-                <message>Authentication is required for suspending the system while an application asked to inhibit it.</message>
-                <message xml:lang="de">Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig, während eine Anwendung anfordert dies zu unterbinden.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για αναστολή του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί.</message>
-                <message xml:lang="fr">Authentification requise pour mettre le système en veille alors qu'une application a demandé de l'empêcher.</message>
-                <message xml:lang="it">Autenticazione richiesta per sospendere il sistema nonostante l'inibizione di una applicazione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby uśpić system, kiedy program zażądał jego wstrzymania.</message>
-                <message xml:lang="ru">Чтобы перевести систему в ждущий режим, несмотря на то, что приложение запросило блокировку, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.suspend</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.hibernate">
-                <description>Hibernate the system</description>
-                <description xml:lang="de">Den Ruhezustand des Systems aktivieren</description>
-                <description xml:lang="el">Αδρανοποίηση του συτήματος</description>
-                <description xml:lang="fr">Mettre le système en hibernation</description>
-                <description xml:lang="it">Ibernare il sistema</description>
-                <description xml:lang="pl">Hibernacja systemu</description>
-                <description xml:lang="ru">Перевести систему в спящий режим</description>
-                <message>Authentication is required for hibernating the system.</message>
-                <message xml:lang="de">Legitimierung ist zum Aktivieren des Ruhezustands des Systems notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour mettre le système en hibernation.</message>
-                <message xml:lang="it">Autenticazione richiesta per ibernare il sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zahibernować system.</message>
-                <message xml:lang="ru">Чтобы перевести систему в спящий режим, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.login1.hibernate-multiple-sessions">
-                <description>Hibernate the system while other users are logged in</description>
-                <description xml:lang="de">Den Ruhezustand des Systems aktivieren, während andere Benutzer angemeldet sind</description>
-                <description xml:lang="el">Αδρανοποίηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι</description>
-                <description xml:lang="fr">Mettre le système en hibernation alors que d'autres utilisateurs sont connectés</description>
-                <description xml:lang="it">Ibernare il sistema mentre altri utenti sono connessi</description>
-                <description xml:lang="pl">Hibernacja systemu, kiedy są zalogowani inni użytkownicy</description>
-                <description xml:lang="ru">Перевести систему в спящий режим, несмотря на то, что в ней работают другие пользователи</description>
-                <message>Authentication is required for hibernating the system while other users are logged in.</message>
-                <message xml:lang="de">Legitimierung ist zum Aktivieren des Ruhezustands des Systems notwendig, während andere Benutzer angemeldet sind.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι.</message>
-                <message xml:lang="fr">Authentification requise pour mettre le système en hibernation alors que d'autres utilisateurs sont connectés.</message>
-                <message xml:lang="it">Autenticazione richiesta per ibernare il sistema mentre altri utenti sono connessi.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy są zalogowani inni użytkownicy.</message>
-                <message xml:lang="ru">Чтобы перевести систему в спящий режим, несмотря на то, что в ней работают другие пользователи, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>yes</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.hibernate</annotate>
-        </action>
-
-        <action id="org.freedesktop.login1.hibernate-ignore-inhibit">
-                <description>Hibernate the system while an application asked to inhibit it</description>
-                <description xml:lang="de">Das System in den Ruhezustand versetzen, während eine Anwendung wünscht dies zu verhindern</description>
-                <description xml:lang="el">Αδρανοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί</description>
-                <description xml:lang="fr">Mettre le système en hibernation alors qu'une application a demandé de l'empêcher</description>
-                <description xml:lang="it">Ibernare il sistema nonostante l'inibizione di una applicazione</description>
-                <description xml:lang="pl">Hibernacja systemu, kiedy program zażądał jej wstrzymania</description>
-                <description xml:lang="ru">Перевести систему в спящий режим, несмотря на то, что приложение запросило блокировку</description>
-                <message>Authentication is required for hibernating the system while an application asked to inhibit it.</message>
-                <message xml:lang="de">Legitimierung ist zum Versetzen des System in den Ruhezustand notwendig, während eine Anwendung wünscht dies zu verhindern.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί.</message>
-                <message xml:lang="fr">Authentification requise pour mettre le système en hibernation alors qu'une application a demandé de l'empêcher.</message>
-                <message xml:lang="it">Autenticazione richiesta per ibernare il sistema nonostante l'inibizione di una applicazione.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy program zażądał jej wstrzymania.</message>
-                <message xml:lang="ru">Чтобы перевести систему в спящий режим, несмотря на то, что приложение запросило блокировку, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.hibernate</annotate>
-        </action>
-
-</policyconfig>
\ No newline at end of file
index f522d6ec4f20fa83b8b1ecefa22bc8cbb0019174..0c71177deb96c48354e495d13d3f2f4559edf6db 100644 (file)
@@ -213,7 +213,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
                 *seat = NULL,
                 *type = NULL, *class = NULL,
                 *class_pam = NULL, *type_pam = NULL, *cvtnr = NULL, *desktop = NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int session_fd = -1, existing, r;
         bool debug = false, remote;
         struct passwd *pw;
@@ -496,7 +496,7 @@ _public_ PAM_EXTERN int pam_sm_close_session(
                 int argc, const char **argv) {
 
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         const void *existing = NULL;
         const char *id;
         int r;
index 7b57dbf78492359cb8d6c00915bc33aa3306f054..8112d746404d8569f5c162276a58aefc89d8285b 100644 (file)
@@ -1,8 +1,6 @@
-#%PAM-1.0
+# This file is part of systemd.
+#
+# Used by systemd --user instances.
 
-# Used by systemd when launching systemd user instances.
-
-account include system-auth
-session include system-auth
-auth required pam_deny.so
-password required pam_deny.so
+account  include system-auth
+session  include system-auth
index 1c933ce600b3cc0e324a8e4a7c0ec0f4254d66a2..85bbfc42991cd1bda21feef04a7237d019ecdf46 100644 (file)
 
 static const char *arg_root = "";
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...]\n\n"
                "Initialize /etc/machine-id from a random source.\n\n"
                "  -h --help             Show this help\n"
                "     --version          Show package version\n"
                "     --root=ROOT        Filesystem root\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -62,12 +59,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hqcv", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hqcv", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -84,7 +82,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind < argc) {
                 log_error("Extraneous arguments");
index 14dae0a03345605d6d7bfcbf07407970d018d8a9..f12ce98a8434ad29e05c002f854b574bf02a2c50 100644 (file)
 #include <sys/capability.h>
 #include <arpa/inet.h>
 
-#include "sd-rtnl.h"
 #include "bus-util.h"
 #include "bus-label.h"
 #include "strv.h"
-#include "rtnl-util.h"
 #include "bus-errors.h"
 #include "copy.h"
 #include "fileio.h"
+#include "in-addr-util.h"
+#include "local-addresses.h"
 #include "machine.h"
 
 static int property_get_id(
@@ -83,6 +83,31 @@ static int property_get_state(
         return 1;
 }
 
+static int property_get_netif(
+                sd_bus *bus,
+                const char *path,
+                const char *interface,
+                const char *property,
+                sd_bus_message *reply,
+                void *userdata,
+                sd_bus_error *error) {
+
+        Machine *m = userdata;
+        int r;
+
+        assert(bus);
+        assert(reply);
+        assert(m);
+
+        assert_cc(sizeof(int) == sizeof(int32_t));
+
+        r = sd_bus_message_append_array(reply, 'i', m->netif, m->n_netif * sizeof(int));
+        if (r < 0)
+                return r;
+
+        return 1;
+}
+
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_class, machine_class, MachineClass);
 
 int bus_machine_method_terminate(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
@@ -172,9 +197,9 @@ int bus_machine_method_get_addresses(sd_bus *bus, sd_bus_message *message, void
                 return sd_bus_error_set_errno(error, -errno);
 
         if (child == 0) {
-                _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *resp = NULL;
-                _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
-                sd_rtnl_message *addr;
+                _cleanup_free_ struct local_address *addresses = NULL;
+                struct local_address *a;
+                int i, n;
 
                 pair[0] = safe_close(pair[0]);
 
@@ -182,79 +207,23 @@ int bus_machine_method_get_addresses(sd_bus *bus, sd_bus_message *message, void
                 if (r < 0)
                         _exit(EXIT_FAILURE);
 
-                r = sd_rtnl_open(&rtnl, 0);
-                if (r < 0)
-                        _exit(EXIT_FAILURE);
-
-                r = sd_rtnl_message_new_addr(rtnl, &req, RTM_GETADDR, 0, AF_UNSPEC);
-                if (r < 0)
-                        _exit(EXIT_FAILURE);
-
-                r = sd_rtnl_message_request_dump(req, true);
-                if (r < 0)
-                        _exit(EXIT_FAILURE);
-
-                r = sd_rtnl_call(rtnl, req, 0, &resp);
-                if (r < 0)
+                n = local_addresses(NULL, 0, &addresses);
+                if (n < 0)
                         _exit(EXIT_FAILURE);
 
-                for (addr = resp; addr; addr = sd_rtnl_message_next(addr)) {
-                        uint16_t type;
-                        unsigned char family;
-                        union {
-                                struct in_addr in;
-                                struct in6_addr in6;
-                        } in_addr;
-                        struct iovec iov[2];
-
-                        r = sd_rtnl_message_get_type(addr, &type);
-                        if (r < 0)
-                                _exit(EXIT_FAILURE);
-
-                        if (type != RTM_NEWADDR)
-                                continue;
-
-                        r = sd_rtnl_message_addr_get_family(addr, &family);
-                        if (r < 0)
-                                _exit(EXIT_FAILURE);
-
-                        iov[0] = (struct iovec) { .iov_base = &family, .iov_len = sizeof(family) };
-
-                        switch (family) {
-
-                        case AF_INET:
-
-                                r = sd_rtnl_message_read_in_addr(addr, IFA_LOCAL, &in_addr.in);
-                                if (r < 0)
-                                        _exit(EXIT_FAILURE);
-
-                                if (in_addr.in.s_addr == htobe32(INADDR_LOOPBACK))
-                                        continue;
-
-                                iov[1] = (struct iovec) { .iov_base = &in_addr.in, .iov_len = sizeof(in_addr.in) };
-                                break;
-
-                        case AF_INET6:
-
-                                r = sd_rtnl_message_read_in6_addr(addr, IFA_ADDRESS, &in_addr.in6);
-                                if (r < 0)
-                                        _exit(EXIT_FAILURE);
-
-                                if (IN6_IS_ADDR_LOOPBACK(&in_addr.in6))
-                                        continue;
-
-                                iov[1] = (struct iovec) { .iov_base = &in_addr.in6, .iov_len = sizeof(in_addr.in6) };
-                                break;
-
-                        default:
-                                continue;
-                        }
+                for (a = addresses, i = 0; i < n; a++, i++) {
+                        struct iovec iov[2] = {
+                                { .iov_base = &a->family, .iov_len = sizeof(a->family) },
+                                { .iov_base = &a->address, .iov_len = FAMILY_ADDRESS_SIZE(a->family) },
+                        };
 
                         r = writev(pair[1], iov, 2);
                         if (r < 0)
                                 _exit(EXIT_FAILURE);
                 }
 
+                pair[1] = safe_close(pair[1]);
+
                 _exit(EXIT_SUCCESS);
         }
 
@@ -264,17 +233,14 @@ int bus_machine_method_get_addresses(sd_bus *bus, sd_bus_message *message, void
         if (r < 0)
                 return sd_bus_error_set_errno(error, r);
 
-        r = sd_bus_message_open_container(reply, 'a', "(yay)");
+        r = sd_bus_message_open_container(reply, 'a', "(iay)");
         if (r < 0)
                 return sd_bus_error_set_errno(error, r);
 
         for (;;) {
-                unsigned char family;
+                int family;
                 ssize_t n;
-                union {
-                        struct in_addr in;
-                        struct in6_addr in6;
-                } in_addr;
+                union in_addr_union in_addr;
                 struct iovec iov[2];
                 struct msghdr mh = {
                         .msg_iov = iov,
@@ -290,11 +256,11 @@ int bus_machine_method_get_addresses(sd_bus *bus, sd_bus_message *message, void
                 if ((size_t) n < sizeof(family))
                         break;
 
-                r = sd_bus_message_open_container(reply, 'r', "yay");
+                r = sd_bus_message_open_container(reply, 'r', "iay");
                 if (r < 0)
                         return sd_bus_error_set_errno(error, r);
 
-                r = sd_bus_message_append(reply, "y", family);
+                r = sd_bus_message_append(reply, "i", family);
                 if (r < 0)
                         return sd_bus_error_set_errno(error, r);
 
@@ -435,10 +401,11 @@ const sd_bus_vtable machine_vtable[] = {
         SD_BUS_PROPERTY("Leader", "u", NULL, offsetof(Machine, leader), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Class", "s", property_get_class, offsetof(Machine, class), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("RootDirectory", "s", NULL, offsetof(Machine, root_directory), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("NetworkInterfaces", "ai", property_get_netif, 0, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("State", "s", property_get_state, 0, 0),
         SD_BUS_METHOD("Terminate", NULL, NULL, bus_machine_method_terminate, SD_BUS_VTABLE_CAPABILITY(CAP_KILL)),
         SD_BUS_METHOD("Kill", "si", NULL, bus_machine_method_kill, SD_BUS_VTABLE_CAPABILITY(CAP_KILL)),
-        SD_BUS_METHOD("GetAddresses", NULL, "a(yay)", bus_machine_method_get_addresses, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("GetAddresses", NULL, "a(iay)", bus_machine_method_get_addresses, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("GetOSRelease", NULL, "a{ss}", bus_machine_method_get_os_release, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_VTABLE_END
 };
index c0fa1b24b6c068e06923d05d0f2f39834ed4731e..13d3448adf47422ce66a6da43bfc82fd7e5de664 100644 (file)
@@ -94,6 +94,7 @@ void machine_free(Machine *m) {
         free(m->state_file);
         free(m->service);
         free(m->root_directory);
+        free(m->netif);
         free(m);
 }
 
@@ -176,6 +177,21 @@ int machine_save(Machine *m) {
                         m->timestamp.realtime,
                         m->timestamp.monotonic);
 
+        if (m->n_netif > 0) {
+                unsigned i;
+
+                fputs("NETIF=", f);
+
+                for (i = 0; i < m->n_netif; i++) {
+                        if (i != 0)
+                                fputc(' ', f);
+
+                        fprintf(f, "%i", m->netif[i]);
+                }
+
+                fputc('\n', f);
+        }
+
         r = fflush_and_check(f);
         if (r < 0)
                 goto finish;
@@ -222,7 +238,7 @@ static void machine_unlink(Machine *m) {
 }
 
 int machine_load(Machine *m) {
-        _cleanup_free_ char *realtime = NULL, *monotonic = NULL, *id = NULL, *leader = NULL, *class = NULL;
+        _cleanup_free_ char *realtime = NULL, *monotonic = NULL, *id = NULL, *leader = NULL, *class = NULL, *netif = NULL;
         int r;
 
         assert(m);
@@ -237,6 +253,7 @@ int machine_load(Machine *m) {
                            "CLASS",     &class,
                            "REALTIME",  &realtime,
                            "MONOTONIC", &monotonic,
+                           "NETIF",     &netif,
                            NULL);
         if (r < 0) {
                 if (r == -ENOENT)
@@ -272,6 +289,35 @@ int machine_load(Machine *m) {
                         m->timestamp.monotonic = l;
         }
 
+        if (netif) {
+                size_t l, allocated = 0, nr = 0;
+                const char *word, *state;
+                int *ni = NULL;
+
+                FOREACH_WORD(word, l, netif, state) {
+                        char buf[l+1];
+                        int ifi;
+
+                        *(char*) (mempcpy(buf, word, l)) = 0;
+
+                        if (safe_atoi(buf, &ifi) < 0)
+                                continue;
+                        if (ifi <= 0)
+                                continue;
+
+                        if (!GREEDY_REALLOC(ni, allocated, nr+1)) {
+                                free(ni);
+                                return log_oom();
+                        }
+
+                        ni[nr++] = ifi;
+                }
+
+                free(m->netif);
+                m->netif = ni;
+                m->n_netif = nr;
+        }
+
         return r;
 }
 
@@ -371,7 +417,7 @@ static int machine_stop_scope(Machine *m) {
         free(m->scope_job);
         m->scope_job = job;
 
-        return r;
+        return 0;
 }
 
 int machine_stop(Machine *m) {
@@ -447,6 +493,8 @@ int machine_kill(Machine *m, KillWho who, int signo) {
 
                 if (kill(m->leader, signo) < 0)
                         return -errno;
+
+                return 0;
         }
 
         /* Otherwise make PID 1 do it for us, for the entire cgroup */
index fa9262d52c62a736862a417fe5f7bcd242965108..5c6366554a0d1c688ce1c2e5cb8e118f8d12c22a 100644 (file)
@@ -76,6 +76,9 @@ struct Machine {
 
         sd_bus_message *create_message;
 
+        int *netif;
+        unsigned n_netif;
+
         LIST_FIELDS(Machine, gc_queue);
 };
 
index 022a4ebe5014e11ddd2e536b4b98f1dd8e90dbd0..7491d69c8b2d4f170b18a330231e4c5f44ea501f 100644 (file)
@@ -29,6 +29,7 @@
 #include <fcntl.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <net/if.h>
 
 #include "sd-bus.h"
 #include "log.h"
@@ -167,7 +168,7 @@ static int show_unit_cgroup(sd_bus *bus, const char *unit, pid_t leader) {
         return 0;
 }
 
-static int print_addresses(sd_bus *bus, const char *name, const char *prefix, const char *prefix2) {
+static int print_addresses(sd_bus *bus, const char *name, int ifi, const char *prefix, const char *prefix2) {
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
         int r;
 
@@ -187,17 +188,17 @@ static int print_addresses(sd_bus *bus, const char *name, const char *prefix, co
         if (r < 0)
                 return r;
 
-        r = sd_bus_message_enter_container(reply, 'a', "(yay)");
+        r = sd_bus_message_enter_container(reply, 'a', "(iay)");
         if (r < 0)
                 return bus_log_parse_error(r);
 
-        while ((r = sd_bus_message_enter_container(reply, 'r', "yay")) > 0) {
-                unsigned char family;
+        while ((r = sd_bus_message_enter_container(reply, 'r', "iay")) > 0) {
+                int family;
                 const void *a;
                 size_t sz;
                 char buffer[MAX(INET6_ADDRSTRLEN, INET_ADDRSTRLEN)];
 
-                r = sd_bus_message_read(reply, "y", &family);
+                r = sd_bus_message_read(reply, "i", &family);
                 if (r < 0)
                         return bus_log_parse_error(r);
 
@@ -205,7 +206,11 @@ static int print_addresses(sd_bus *bus, const char *name, const char *prefix, co
                 if (r < 0)
                         return bus_log_parse_error(r);
 
-                printf("%s%s\n", prefix, inet_ntop(family, a, buffer, sizeof(buffer)));
+                fputs(prefix, stdout);
+                fputs(inet_ntop(family, a, buffer, sizeof(buffer)), stdout);
+                if (family == AF_INET6 && ifi > 0)
+                        printf("%%%i", ifi);
+                fputc('\n', stdout);
 
                 r = sd_bus_message_exit_container(reply);
                 if (r < 0)
@@ -275,11 +280,15 @@ typedef struct MachineStatusInfo {
         char *root_directory;
         pid_t leader;
         usec_t timestamp;
+        int *netif;
+        unsigned n_netif;
 } MachineStatusInfo;
 
 static void print_machine_status_info(sd_bus *bus, MachineStatusInfo *i) {
         char since1[FORMAT_TIMESTAMP_RELATIVE_MAX], *s1;
         char since2[FORMAT_TIMESTAMP_MAX], *s2;
+        int ifi = -1;
+
         assert(i);
 
         fputs(strna(i->name), stdout);
@@ -322,7 +331,30 @@ static void print_machine_status_info(sd_bus *bus, MachineStatusInfo *i) {
         if (i->root_directory)
                 printf("\t    Root: %s\n", i->root_directory);
 
-        print_addresses(bus, i->name,
+        if (i->n_netif > 0) {
+                unsigned c;
+
+                fputs("\t   Iface:", stdout);
+
+                for (c = 0; c < i->n_netif; c++) {
+                        char name[IF_NAMESIZE+1] = "";
+
+                        if (if_indextoname(i->netif[c], name)) {
+                                fputc(' ', stdout);
+                                fputs(name, stdout);
+
+                                if (ifi < 0)
+                                        ifi = i->netif[c];
+                                else
+                                        ifi = 0;
+                        } else
+                                printf(" %i", i->netif[c]);
+                }
+
+                fputc('\n', stdout);
+        }
+
+        print_addresses(bus, i->name, ifi,
                        "\t Address: ",
                        "\t          ");
 
@@ -334,17 +366,39 @@ static void print_machine_status_info(sd_bus *bus, MachineStatusInfo *i) {
         }
 }
 
+static int map_netif(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata) {
+        MachineStatusInfo *i = userdata;
+        size_t l;
+        const void *v;
+        int r;
+
+        assert_cc(sizeof(int32_t) == sizeof(int));
+        r = sd_bus_message_read_array(m, SD_BUS_TYPE_INT32, &v, &l);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return -EBADMSG;
+
+        i->n_netif = l / sizeof(int32_t);
+        i->netif = memdup(v, l);
+        if (!i->netif)
+                return -ENOMEM;
+
+        return 0;
+}
+
 static int show_info(const char *verb, sd_bus *bus, const char *path, bool *new_line) {
 
         static const struct bus_properties_map map[]  = {
-                { "Name",          "s",  NULL,          offsetof(MachineStatusInfo, name) },
-                { "Class",         "s",  NULL,          offsetof(MachineStatusInfo, class) },
-                { "Service",       "s",  NULL,          offsetof(MachineStatusInfo, service) },
-                { "Unit",          "s",  NULL,          offsetof(MachineStatusInfo, unit) },
-                { "RootDirectory", "s",  NULL,          offsetof(MachineStatusInfo, root_directory) },
-                { "Leader",        "u",  NULL,          offsetof(MachineStatusInfo, leader) },
-                { "Timestamp",     "t",  NULL,          offsetof(MachineStatusInfo, timestamp) },
-                { "Id",            "ay", bus_map_id128, offsetof(MachineStatusInfo, id) },
+                { "Name",              "s",  NULL,          offsetof(MachineStatusInfo, name) },
+                { "Class",             "s",  NULL,          offsetof(MachineStatusInfo, class) },
+                { "Service",           "s",  NULL,          offsetof(MachineStatusInfo, service) },
+                { "Unit",              "s",  NULL,          offsetof(MachineStatusInfo, unit) },
+                { "RootDirectory",     "s",  NULL,          offsetof(MachineStatusInfo, root_directory) },
+                { "Leader",            "u",  NULL,          offsetof(MachineStatusInfo, leader) },
+                { "Timestamp",         "t",  NULL,          offsetof(MachineStatusInfo, timestamp) },
+                { "Id",                "ay", bus_map_id128, offsetof(MachineStatusInfo, id) },
+                { "NetworkInterfaces", "ai", map_netif,     0 },
                 {}
         };
 
@@ -375,6 +429,7 @@ static int show_info(const char *verb, sd_bus *bus, const char *path, bool *new_
         free(info.service);
         free(info.unit);
         free(info.root_directory);
+        free(info.netif);
 
         return r;
 }
@@ -606,7 +661,7 @@ static int openpt_in_namespace(pid_t pid, int flags) {
 static int login_machine(sd_bus *bus, char **args, unsigned n) {
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL, *reply2 = NULL, *reply3 = NULL;
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_unref_ sd_bus *container_bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *container_bus = NULL;
         _cleanup_close_ int master = -1;
         _cleanup_free_ char *getty = NULL;
         const char *path, *pty, *p;
@@ -724,8 +779,7 @@ static int login_machine(sd_bus *bus, char **args, unsigned n) {
         return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] {COMMAND} ...\n\n"
                "Send control commands to or query the virtual machine and container registration manager.\n\n"
                "  -h --help              Show this help\n"
@@ -749,8 +803,6 @@ static int help(void) {
                "  kill NAME...           Send signal to processes of a VM/container\n"
                "  terminate NAME...      Terminate one or more VMs/containers\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -782,12 +834,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hp:als:H:M:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hp:als:H:M:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -849,7 +902,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -937,7 +989,7 @@ static int machinectl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char*argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");
index a041444b735a5c558b690eb0165485d511f612a7..3c7d4be8d28d2905c5e5b021598a4d758ace99c0 100644 (file)
@@ -151,14 +151,15 @@ static int method_list_machines(sd_bus *bus, sd_bus_message *message, void *user
         return sd_bus_send(bus, reply, NULL);
 }
 
-static int method_create_or_register_machine(Manager *manager, sd_bus_message *message, Machine **_m, sd_bus_error *error) {
+static int method_create_or_register_machine(Manager *manager, sd_bus_message *message, bool read_network, Machine **_m, sd_bus_error *error) {
         const char *name, *service, *class, *root_directory;
+        const int32_t *netif = NULL;
         MachineClass c;
         uint32_t leader;
         sd_id128_t id;
         const void *v;
         Machine *m;
-        size_t n;
+        size_t n, n_netif = 0;
         int r;
 
         assert(manager);
@@ -185,6 +186,21 @@ static int method_create_or_register_machine(Manager *manager, sd_bus_message *m
         if (r < 0)
                 return r;
 
+        if (read_network) {
+                size_t i;
+
+                r = sd_bus_message_read_array(message, 'i', (const void**) &netif, &n_netif);
+                if (r < 0)
+                        return r;
+
+                n_netif /= sizeof(int32_t);
+
+                for (i = 0; i < n_netif; i++) {
+                        if (netif[i] <= 0)
+                                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid network interface index %i", netif[i]);
+                }
+        }
+
         if (isempty(class))
                 c = _MACHINE_CLASS_INVALID;
         else {
@@ -240,6 +256,17 @@ static int method_create_or_register_machine(Manager *manager, sd_bus_message *m
                 }
         }
 
+        if (n_netif > 0) {
+                assert_cc(sizeof(int32_t) == sizeof(int));
+                m->netif = memdup(netif, sizeof(int32_t) * n_netif);
+                if (!m->netif) {
+                        r = -ENOMEM;
+                        goto fail;
+                }
+
+                m->n_netif = n_netif;
+        }
+
         *_m = m;
 
         return 1;
@@ -249,12 +276,12 @@ fail:
         return r;
 }
 
-static int method_create_machine(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int method_create_machine_internal(sd_bus *bus, sd_bus_message *message, bool read_network, void *userdata, sd_bus_error *error) {
         Manager *manager = userdata;
         Machine *m = NULL;
         int r;
 
-        r = method_create_or_register_machine(manager, message, &m, error);
+        r = method_create_or_register_machine(manager, message, read_network, &m, error);
         if (r < 0)
                 return r;
 
@@ -274,13 +301,21 @@ fail:
         return r;
 }
 
-static int method_register_machine(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int method_create_machine_with_network(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        return method_create_machine_internal(bus, message, true, userdata, error);
+}
+
+static int method_create_machine(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        return method_create_machine_internal(bus, message, false, userdata, error);
+}
+
+static int method_register_machine_internal(sd_bus *bus, sd_bus_message *message, bool read_network, void *userdata, sd_bus_error *error) {
         Manager *manager = userdata;
         _cleanup_free_ char *p = NULL;
         Machine *m = NULL;
         int r;
 
-        r = method_create_or_register_machine(manager, message, &m, error);
+        r = method_create_or_register_machine(manager, message, read_network, &m, error);
         if (r < 0)
                 return r;
 
@@ -309,6 +344,14 @@ fail:
         return r;
 }
 
+static int method_register_machine_with_network(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        return method_register_machine_internal(bus, message, true, userdata, error);
+}
+
+static int method_register_machine(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        return method_register_machine_internal(bus, message, false, userdata, error);
+}
+
 static int method_terminate_machine(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
         Manager *m = userdata;
         Machine *machine;
@@ -400,9 +443,11 @@ const sd_bus_vtable manager_vtable[] = {
         SD_BUS_METHOD("ListMachines", NULL, "a(ssso)", method_list_machines, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CreateMachine", "sayssusa(sv)", "o", method_create_machine, 0),
         SD_BUS_METHOD("RegisterMachine", "sayssus", "o", method_register_machine, 0),
+        SD_BUS_METHOD("CreateMachineWithNetwork", "sayssusaia(sv)", "o", method_create_machine_with_network, 0),
+        SD_BUS_METHOD("RegisterMachineWithNetwork", "sayssusai", "o", method_register_machine_with_network, 0),
         SD_BUS_METHOD("KillMachine", "ssi", NULL, method_kill_machine, SD_BUS_VTABLE_CAPABILITY(CAP_KILL)),
         SD_BUS_METHOD("TerminateMachine", "s", NULL, method_terminate_machine, SD_BUS_VTABLE_CAPABILITY(CAP_KILL)),
-        SD_BUS_METHOD("GetMachineAddresses", "s", "a(yay)", method_get_machine_addresses, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("GetMachineAddresses", "s", "a(iay)", method_get_machine_addresses, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("GetMachineOSRelease", "s", "a{ss}", method_get_machine_os_release, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_SIGNAL("MachineNew", "so", 0),
         SD_BUS_SIGNAL("MachineRemoved", "so", 0),
index 616032012737cd94b95c924e5095a0cd7b2ca3b2..966475b2429680bbf65c0a7e7acbcc8b48af5bb3 100644 (file)
@@ -35,6 +35,7 @@
 #include "bus-util.h"
 #include "bus-error.h"
 #include "machined.h"
+#include "label.h"
 
 Manager *manager_new(void) {
         Manager *m;
@@ -44,9 +45,9 @@ Manager *manager_new(void) {
         if (!m)
                 return NULL;
 
-        m->machines = hashmap_new(string_hash_func, string_compare_func);
-        m->machine_units = hashmap_new(string_hash_func, string_compare_func);
-        m->machine_leaders = hashmap_new(trivial_hash_func, trivial_compare_func);
+        m->machines = hashmap_new(&string_hash_ops);
+        m->machine_units = hashmap_new(&string_hash_ops);
+        m->machine_leaders = hashmap_new(NULL);
 
         if (!m->machines || !m->machine_units || !m->machine_leaders) {
                 manager_free(m);
@@ -349,9 +350,6 @@ int main(int argc, char *argv[]) {
         log_debug("systemd-machined stopped as pid "PID_FMT, getpid());
 
 finish:
-        sd_notify(false,
-                  "STATUS=Shutting down...");
-
         if (m)
                 manager_free(m);
 
index 3a77c70bf1171c9959c6345aecfaadd640c923fb..ac1aee855dc32ca275a797a24cfd61a6dce05e4f 100644 (file)
 
                 <allow send_destination="org.freedesktop.machine1"
                        send_interface="org.freedesktop.machine1.Manager"
-                       send_member="GetMachineAddresses"/>
+                       send_member="GetMachine"/>
 
                 <allow send_destination="org.freedesktop.machine1"
                        send_interface="org.freedesktop.machine1.Manager"
-                       send_member="GetMachine"/>
+                       send_member="GetMachineByPID"/>
 
                 <allow send_destination="org.freedesktop.machine1"
                        send_interface="org.freedesktop.machine1.Manager"
-                       send_member="GetMachineByPID"/>
+                       send_member="GetMachineAddresses"/>
+
+                <allow send_destination="org.freedesktop.machine1"
+                       send_interface="org.freedesktop.machine1.Manager"
+                       send_member="GetMachineOSRelease"/>
 
                 <allow send_destination="org.freedesktop.machine1"
                        send_interface="org.freedesktop.machine1.Machine"
@@ -58,7 +62,7 @@
 
                 <allow send_destination="org.freedesktop.machine1"
                        send_interface="org.freedesktop.machine1.Machine"
-                       send_member="GetMachineOSRelease"/>
+                       send_member="GetOSRelease"/>
 
                 <allow receive_sender="org.freedesktop.machine1"/>
         </policy>
index ecb84da6d733efdab36f2827a415a38284f6cea1..c77b092a628b3599a03dca0ff7160ee205a1a888 100644 (file)
@@ -181,15 +181,12 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent
         return r;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n"
                "Loads statically configured kernel modules.\n\n"
                "  -h --help             Show this help\n"
                "     --version          Show package version\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -209,12 +206,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -227,7 +225,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
diff --git a/src/network/network-util.h b/src/network/network-util.h
deleted file mode 100644 (file)
index 139efc7..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#pragma once
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Thomas Hindø Paabøl Andersen
-
-  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/>.
-***/
-
-#include "util.h"
-#include "sd-network.h"
-
-DEFINE_TRIVIAL_CLEANUP_FUNC(sd_network_monitor*, sd_network_monitor_unref);
-
-#define _cleanup_network_monitor_unref_ _cleanup_(sd_network_monitor_unrefp)
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
new file mode 100644 (file)
index 0000000..b374121
--- /dev/null
@@ -0,0 +1,707 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <stdbool.h>
+#include <getopt.h>
+
+#include "sd-network.h"
+#include "sd-rtnl.h"
+#include "libudev.h"
+
+#include "build.h"
+#include "util.h"
+#include "pager.h"
+#include "rtnl-util.h"
+#include "udev-util.h"
+#include "arphrd-list.h"
+#include "local-addresses.h"
+#include "socket-util.h"
+
+static bool arg_no_pager = false;
+static bool arg_legend = true;
+static bool arg_all = false;
+
+static void pager_open_if_enabled(void) {
+
+        if (arg_no_pager)
+                return;
+
+        pager_open(false);
+}
+
+static int link_get_type_string(int iftype, struct udev_device *d, char **ret) {
+        const char *t;
+        char *p;
+
+        if (iftype == ARPHRD_ETHER && d) {
+                const char *devtype, *id = NULL;
+                /* WLANs have iftype ARPHRD_ETHER, but we want
+                 * to show a more useful type string for
+                 * them */
+
+                devtype = udev_device_get_devtype(d);
+                if (streq_ptr(devtype, "wlan"))
+                        id = "wlan";
+                else if (streq_ptr(devtype, "wwan"))
+                        id = "wwan";
+
+                if (id) {
+                        p = strdup(id);
+                        if (!p)
+                                return -ENOMEM;
+
+                        *ret = p;
+                        return 1;
+                }
+        }
+
+        t = arphrd_to_name(iftype);
+        if (!t) {
+                *ret = NULL;
+                return 0;
+        }
+
+        p = strdup(t);
+        if (!p)
+                return -ENOMEM;
+
+        ascii_strlower(p);
+        *ret = p;
+
+        return 0;
+}
+
+typedef struct LinkInfo {
+        const char *name;
+        int ifindex;
+        unsigned iftype;
+} LinkInfo;
+
+static int link_info_compare(const void *a, const void *b) {
+        const LinkInfo *x = a, *y = b;
+
+        return x->ifindex - y->ifindex;
+}
+
+static int decode_and_sort_links(sd_rtnl_message *m, LinkInfo **ret) {
+        _cleanup_free_ LinkInfo *links = NULL;
+        size_t size = 0, c = 0;
+        sd_rtnl_message *i;
+        int r;
+
+        for (i = m; i; i = sd_rtnl_message_next(i)) {
+                const char *name;
+                unsigned iftype;
+                uint16_t type;
+                int ifindex;
+
+                r = sd_rtnl_message_get_type(i, &type);
+                if (r < 0)
+                        return r;
+
+                if (type != RTM_NEWLINK)
+                        continue;
+
+                r = sd_rtnl_message_link_get_ifindex(i, &ifindex);
+                if (r < 0)
+                        return r;
+
+                r = sd_rtnl_message_read_string(i, IFLA_IFNAME, &name);
+                if (r < 0)
+                        return r;
+
+                r = sd_rtnl_message_link_get_type(i, &iftype);
+                if (r < 0)
+                        return r;
+
+                if (!GREEDY_REALLOC(links, size, c+1))
+                        return -ENOMEM;
+
+                links[c].name = name;
+                links[c].ifindex = ifindex;
+                links[c].iftype = iftype;
+                c++;
+        }
+
+        qsort_safe(links, c, sizeof(LinkInfo), link_info_compare);
+
+        *ret = links;
+        links = NULL;
+
+        return (int) c;
+}
+
+static void operational_state_to_color(const char *state, const char **on, const char **off) {
+        assert(on);
+        assert(off);
+
+        if (streq_ptr(state, "routable")) {
+                *on = ansi_highlight_green();
+                *off = ansi_highlight_off();
+        } else if (streq_ptr(state, "degraded")) {
+                *on = ansi_highlight_yellow();
+                *off = ansi_highlight_off();
+        } else
+                *on = *off = "";
+}
+
+static void setup_state_to_color(const char *state, const char **on, const char **off) {
+        assert(on);
+        assert(off);
+
+        if (streq_ptr(state, "configured")) {
+                *on = ansi_highlight_green();
+                *off = ansi_highlight_off();
+        } else if (streq_ptr(state, "configuring")) {
+                *on = ansi_highlight_yellow();
+                *off = ansi_highlight_off();
+        } else if (streq_ptr(state, "failed") || streq_ptr(state, "linger")) {
+                *on = ansi_highlight_red();
+                *off = ansi_highlight_off();
+        } else
+                *on = *off = "";
+}
+
+static int list_links(char **args, unsigned n) {
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
+        _cleanup_udev_unref_ struct udev *udev = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_free_ LinkInfo *links = NULL;
+        int r, c, i;
+
+        pager_open_if_enabled();
+
+        r = sd_rtnl_open(&rtnl, 0);
+        if (r < 0) {
+                log_error("Failed to connect to netlink: %s", strerror(-r));
+                return r;
+        }
+
+        udev = udev_new();
+        if (!udev) {
+                log_error("Failed to connect to udev: %m");
+                return -errno;
+        }
+
+        r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, 0);
+        if (r < 0)
+                return rtnl_log_create_error(r);
+
+        r = sd_rtnl_message_request_dump(req, true);
+        if (r < 0)
+                return rtnl_log_create_error(r);
+
+        r = sd_rtnl_call(rtnl, req, 0, &reply);
+        if (r < 0) {
+                log_error("Failed to enumerate links: %s", strerror(-r));
+                return r;
+        }
+
+        if (arg_legend)
+                printf("%3s %-16s %-18s %-11s %-10s\n", "IDX", "LINK", "TYPE", "OPERATIONAL", "SETUP");
+
+        c = decode_and_sort_links(reply, &links);
+        if (c < 0)
+                return rtnl_log_parse_error(c);
+
+        for (i = 0; i < c; i++) {
+                _cleanup_free_ char *setup_state = NULL, *operational_state = NULL;
+                _cleanup_udev_device_unref_ struct udev_device *d = NULL;
+                const char *on_color_operational, *off_color_operational,
+                           *on_color_setup, *off_color_setup;
+                 char devid[2 + DECIMAL_STR_MAX(int)];
+                _cleanup_free_ char *t = NULL;
+
+                sd_network_link_get_operational_state(links[i].ifindex, &operational_state);
+                operational_state_to_color(operational_state, &on_color_operational, &off_color_operational);
+
+                sd_network_link_get_setup_state(links[i].ifindex, &setup_state);
+                setup_state_to_color(setup_state, &on_color_setup, &off_color_setup);
+
+                sprintf(devid, "n%i", links[i].ifindex);
+                d = udev_device_new_from_device_id(udev, devid);
+
+                link_get_type_string(links[i].iftype, d, &t);
+
+                printf("%3i %-16s %-18s %s%-11s%s %s%-10s%s\n",
+                       links[i].ifindex, links[i].name, strna(t),
+                       on_color_operational, strna(operational_state), off_color_operational,
+                       on_color_setup, strna(setup_state), off_color_setup);
+        }
+
+        if (arg_legend)
+                printf("\n%i links listed.\n", c);
+
+        return 0;
+}
+
+static int dump_addresses(sd_rtnl *rtnl, const char *prefix, int ifindex) {
+        _cleanup_free_ struct local_address *local = NULL;
+        int r, n, i;
+
+        n = local_addresses(rtnl, ifindex, &local);
+        if (n < 0)
+                return n;
+
+        for (i = 0; i < n; i++) {
+                _cleanup_free_ char *pretty = NULL;
+
+                r = in_addr_to_string(local[i].family, &local[i].address, &pretty);
+                if (r < 0)
+                        return r;
+
+                printf("%*s%s\n",
+                       (int) strlen(prefix),
+                       i == 0 ? prefix : "",
+                       pretty);
+        }
+
+        return 0;
+}
+
+static void dump_list(const char *prefix, char **l) {
+        char **i;
+
+        STRV_FOREACH(i, l) {
+                printf("%*s%s\n",
+                       (int) strlen(prefix),
+                       i == l ? prefix : "",
+                       *i);
+        }
+}
+
+static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) {
+        _cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **domains = NULL;
+        _cleanup_free_ char *setup_state = NULL, *operational_state = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
+        _cleanup_udev_device_unref_ struct udev_device *d = NULL;
+        char devid[2 + DECIMAL_STR_MAX(int)];
+        _cleanup_free_ char *t = NULL, *network = NULL;
+        const char *driver = NULL, *path = NULL, *vendor = NULL, *model = NULL, *link = NULL;
+        const char *on_color_operational, *off_color_operational,
+                   *on_color_setup, *off_color_setup;
+        struct ether_addr e;
+        unsigned iftype;
+        int r, ifindex;
+        bool have_mac;
+        uint32_t mtu;
+
+        assert(rtnl);
+        assert(udev);
+        assert(name);
+
+        if (safe_atoi(name, &ifindex) >= 0 && ifindex > 0)
+                r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, ifindex);
+        else {
+                r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, 0);
+                if (r < 0)
+                        return rtnl_log_create_error(r);
+
+                r = sd_rtnl_message_append_string(req, IFLA_IFNAME, name);
+        }
+
+        if (r < 0)
+                return rtnl_log_create_error(r);
+
+        r = sd_rtnl_call(rtnl, req, 0, &reply);
+        if (r < 0) {
+                log_error("Failed to query link: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_link_get_ifindex(reply, &ifindex);
+        if (r < 0)
+                return rtnl_log_parse_error(r);
+
+        r = sd_rtnl_message_read_string(reply, IFLA_IFNAME, &name);
+        if (r < 0)
+                return rtnl_log_parse_error(r);
+
+        r = sd_rtnl_message_link_get_type(reply, &iftype);
+        if (r < 0)
+                return rtnl_log_parse_error(r);
+
+        have_mac = sd_rtnl_message_read_ether_addr(reply, IFLA_ADDRESS, &e) >= 0;
+
+        if (have_mac) {
+                const uint8_t *p;
+                bool all_zeroes = true;
+
+                for (p = (uint8_t*) &e; p < (uint8_t*) &e + sizeof(e); p++)
+                        if (*p != 0) {
+                                all_zeroes = false;
+                                break;
+                        }
+
+                if (all_zeroes)
+                        have_mac = false;
+        }
+
+        sd_rtnl_message_read_u32(reply, IFLA_MTU, &mtu);
+
+        sd_network_link_get_operational_state(ifindex, &operational_state);
+        operational_state_to_color(operational_state, &on_color_operational, &off_color_operational);
+
+        sd_network_link_get_setup_state(ifindex, &setup_state);
+        setup_state_to_color(setup_state, &on_color_setup, &off_color_setup);
+
+        sd_network_link_get_dns(ifindex, &dns);
+        sd_network_link_get_ntp(ifindex, &ntp);
+        sd_network_link_get_domains(ifindex, &domains);
+        r = sd_network_link_get_wildcard_domain(ifindex);
+        if (r > 0) {
+                char *wildcard;
+
+                wildcard = strdup("*");
+                if (!wildcard)
+                        return log_oom();
+
+                if (strv_consume(&domains, wildcard) < 0)
+                        return log_oom();
+        }
+
+        sprintf(devid, "n%i", ifindex);
+        d = udev_device_new_from_device_id(udev, devid);
+
+        link_get_type_string(iftype, d, &t);
+
+        if (d) {
+                link = udev_device_get_property_value(d, "ID_NET_LINK_FILE");
+                driver = udev_device_get_property_value(d, "ID_NET_DRIVER");
+                path = udev_device_get_property_value(d, "ID_PATH");
+
+                vendor = udev_device_get_property_value(d, "ID_VENDOR_FROM_DATABASE");
+                if (!vendor)
+                        vendor = udev_device_get_property_value(d, "ID_VENDOR");
+
+                model = udev_device_get_property_value(d, "ID_MODEL_FROM_DATABASE");
+                if (!model)
+                        model = udev_device_get_property_value(d, "ID_MODEL");
+        }
+
+        sd_network_link_get_network_file(ifindex, &network);
+
+        printf("%s%s%s %i: %s\n", on_color_operational, draw_special_char(DRAW_BLACK_CIRCLE), off_color_operational, ifindex, name);
+
+        printf("   Link File: %s\n"
+               "Network File: %s\n"
+               "        Type: %s\n"
+               "       State: %s%s%s (%s%s%s)\n",
+               strna(link),
+               strna(network),
+               strna(t),
+               on_color_operational, strna(operational_state), off_color_operational,
+               on_color_setup, strna(setup_state), off_color_setup);
+
+        if (path)
+                printf("        Path: %s\n", path);
+        if (driver)
+                printf("      Driver: %s\n", driver);
+        if (vendor)
+                printf("      Vendor: %s\n", vendor);
+        if (model)
+                printf("       Model: %s\n", model);
+
+        if (have_mac) {
+                char ea[ETHER_ADDR_TO_STRING_MAX];
+                printf("  HW Address: %s\n", ether_addr_to_string(&e, ea));
+        }
+
+        if (mtu > 0)
+                printf("         MTU: %u\n", mtu);
+
+        dump_addresses(rtnl, "     Address: ", ifindex);
+
+        if (!strv_isempty(dns))
+                dump_list("         DNS: ", dns);
+        if (!strv_isempty(domains))
+                dump_list("      Domain: ", domains);
+        if (!strv_isempty(ntp))
+                dump_list("         NTP: ", ntp);
+
+        return 0;
+}
+
+static int link_status(char **args, unsigned n) {
+        _cleanup_udev_unref_ struct udev *udev = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        char **name;
+        int r;
+
+        r = sd_rtnl_open(&rtnl, 0);
+        if (r < 0) {
+                log_error("Failed to connect to netlink: %s", strerror(-r));
+                return r;
+        }
+
+        udev = udev_new();
+        if (!udev) {
+                log_error("Failed to connect to udev: %m");
+                return -errno;
+        }
+
+        if (n <= 1 && !arg_all) {
+                _cleanup_free_ char *operational_state = NULL;
+                _cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **domains = NULL;
+                _cleanup_free_ struct local_address *addresses = NULL;
+                const char *on_color_operational, *off_color_operational;
+                int i, c;
+
+                sd_network_get_operational_state(&operational_state);
+                operational_state_to_color(operational_state, &on_color_operational, &off_color_operational);
+
+                printf("       State: %s%s%s\n", on_color_operational, strna(operational_state), off_color_operational);
+
+                c = local_addresses(rtnl, 0, &addresses);
+                for (i = 0; i < c; i++) {
+                        _cleanup_free_ char *pretty = NULL;
+
+                        r = in_addr_to_string(addresses[i].family, &addresses[i].address, &pretty);
+                        if (r < 0)
+                                return log_oom();
+
+                        printf("%13s %s\n",
+                               i > 0 ? "" : "Address:", pretty);
+                }
+
+                sd_network_get_dns(&dns);
+                if (!strv_isempty(dns))
+                        dump_list("         DNS: ", dns);
+
+                sd_network_get_domains(&domains);
+                if (!strv_isempty(domains))
+                        dump_list("      Domain: ", domains);
+
+                sd_network_get_ntp(&ntp);
+                if (!strv_isempty(ntp))
+                        dump_list("         NTP: ", ntp);
+
+                return 0;
+        }
+
+        pager_open_if_enabled();
+
+        if (arg_all) {
+                _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
+                _cleanup_free_ LinkInfo *links = NULL;
+                int c, i;
+
+                r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, 0);
+                if (r < 0)
+                        return rtnl_log_create_error(r);
+
+                r = sd_rtnl_message_request_dump(req, true);
+                if (r < 0)
+                        return rtnl_log_create_error(r);
+
+                r = sd_rtnl_call(rtnl, req, 0, &reply);
+                if (r < 0) {
+                        log_error("Failed to enumerate links: %s", strerror(-r));
+                        return r;
+                }
+
+                c = decode_and_sort_links(reply, &links);
+                if (c < 0)
+                        return rtnl_log_parse_error(c);
+
+                for (i = 0; i < c; i++) {
+                        if (i > 0)
+                                fputc('\n', stdout);
+
+                        link_status_one(rtnl, udev, links[i].name);
+                }
+        }
+
+        STRV_FOREACH(name, args + 1) {
+                if (name != args+1)
+                        fputc('\n', stdout);
+
+                link_status_one(rtnl, udev, *name);
+        }
+
+        return 0;
+}
+
+static void help(void) {
+        printf("%s [OPTIONS...]\n\n"
+               "Query and control the networking subsystem.\n\n"
+               "  -h --help             Show this help\n"
+               "     --version          Show package version\n"
+               "     --no-pager         Do not pipe output into a pager\n"
+               "     --no-legend        Do not show the headers and footers\n"
+               "  -a --all              Show status for all links\n\n"
+               "Commands:\n"
+               "  list                  List links\n"
+               "  status LINK           Show link status\n"
+               , program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_NO_PAGER,
+                ARG_NO_LEGEND,
+        };
+
+        static const struct option options[] = {
+                { "help",      no_argument,       NULL, 'h'           },
+                { "version",   no_argument,       NULL, ARG_VERSION   },
+                { "no-pager",  no_argument,       NULL, ARG_NO_PAGER  },
+                { "no-legend", no_argument,       NULL, ARG_NO_LEGEND },
+                { "all",       no_argument,       NULL, 'a'           },
+                {}
+        };
+
+        int c;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "ha", options, NULL)) >= 0) {
+
+                switch (c) {
+
+                case 'h':
+                        help();
+                        return 0;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0;
+
+                case ARG_NO_PAGER:
+                        arg_no_pager = true;
+                        break;
+
+                case ARG_NO_LEGEND:
+                        arg_legend = false;
+                        break;
+
+                case 'a':
+                        arg_all = true;
+                        break;
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option");
+                }
+        }
+
+        return 1;
+}
+
+static int networkctl_main(int argc, char *argv[]) {
+
+        static const struct {
+                const char* verb;
+                const enum {
+                        MORE,
+                        LESS,
+                        EQUAL
+                } argc_cmp;
+                const int argc;
+                int (* const dispatch)(char **args, unsigned n);
+        } verbs[] = {
+                { "list",   LESS, 1, list_links  },
+                { "status", MORE, 1, link_status },
+        };
+
+        int left;
+        unsigned i;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        left = argc - optind;
+
+        if (left <= 0)
+                /* Special rule: no arguments means "list" */
+                i = 0;
+        else {
+                if (streq(argv[optind], "help")) {
+                        help();
+                        return 0;
+                }
+
+                for (i = 0; i < ELEMENTSOF(verbs); i++)
+                        if (streq(argv[optind], verbs[i].verb))
+                                break;
+
+                if (i >= ELEMENTSOF(verbs)) {
+                        log_error("Unknown operation %s", argv[optind]);
+                        return -EINVAL;
+                }
+        }
+
+        switch (verbs[i].argc_cmp) {
+
+        case EQUAL:
+                if (left != verbs[i].argc) {
+                        log_error("Invalid number of arguments.");
+                        return -EINVAL;
+                }
+
+                break;
+
+        case MORE:
+                if (left < verbs[i].argc) {
+                        log_error("Too few arguments.");
+                        return -EINVAL;
+                }
+
+                break;
+
+        case LESS:
+                if (left > verbs[i].argc) {
+                        log_error("Too many arguments.");
+                        return -EINVAL;
+                }
+
+                break;
+
+        default:
+                assert_not_reached("Unknown comparison operator.");
+        }
+
+        return verbs[i].dispatch(argv + optind, left);
+}
+
+int main(int argc, char* argv[]) {
+        int r;
+
+        log_parse_environment();
+        log_open();
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto finish;
+
+        r = networkctl_main(argc, argv);
+
+finish:
+        pager_close();
+
+        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+}
index a5079add0249f095098c7b027eccb1c07bf8e1dd..7ad11c617799dc8c8e36103e273ab0ab3f38a4e1 100644 (file)
 #include <arpa/inet.h>
 
 #include "networkd.h"
+#include "networkd-link.h"
 
 int address_pool_new(
                 Manager *m,
                 AddressPool **ret,
-                unsigned family,
+                int family,
                 const union in_addr_union *u,
                 unsigned prefixlen) {
 
@@ -54,7 +55,7 @@ int address_pool_new(
 int address_pool_new_from_string(
                 Manager *m,
                 AddressPool **ret,
-                unsigned family,
+                int family,
                 const char *p,
                 unsigned prefixlen) {
 
index 1ba210831661aa946c7f33141291cbb9e61b04a1..ce85109d22dd13684929b7af912ebdbbf8774b10 100644 (file)
@@ -22,6 +22,7 @@
 #include <net/if.h>
 
 #include "networkd.h"
+#include "networkd-link.h"
 
 #include "utf8.h"
 #include "util.h"
@@ -41,8 +42,7 @@ int address_new_static(Network *network, unsigned section, Address **ret) {
         _cleanup_address_free_ Address *address = NULL;
 
         if (section) {
-                uint64_t key = section;
-                address = hashmap_get(network->addresses_by_section, &key);
+                address = hashmap_get(network->addresses_by_section, UINT_TO_PTR(section));
                 if (address) {
                         *ret = address;
                         address = NULL;
@@ -63,7 +63,8 @@ int address_new_static(Network *network, unsigned section, Address **ret) {
 
         if (section) {
                 address->section = section;
-                hashmap_put(network->addresses_by_section, &address->section, address);
+                hashmap_put(network->addresses_by_section,
+                            UINT_TO_PTR(address->section), address);
         }
 
         *ret = address;
@@ -96,7 +97,7 @@ void address_free(Address *address) {
 
                 if (address->section)
                         hashmap_remove(address->network->addresses_by_section,
-                                       &address->section);
+                                       UINT_TO_PTR(address->section));
         }
 
         free(address);
@@ -243,7 +244,7 @@ static int address_acquire(Link *link, Address *original, Address **ret) {
         assert(ret);
 
         /* Something useful was configured? just use it */
-        if (in_addr_null(original->family, &original->in_addr) <= 0)
+        if (in_addr_is_null(original->family, &original->in_addr) <= 0)
                 return 0;
 
         /* The address is configured to be 0.0.0.0 or [::] by the user?
@@ -345,13 +346,25 @@ int address_configure(Address *address, Link *link,
                 return r;
         }
 
-        if (address->family == AF_INET) {
-                r = sd_rtnl_message_append_in_addr(req, IFA_BROADCAST, &address->broadcast);
+        if (!in_addr_is_null(address->family, &address->in_addr_peer)) {
+                if (address->family == AF_INET)
+                        r = sd_rtnl_message_append_in_addr(req, IFA_ADDRESS, &address->in_addr_peer.in);
+                else if (address->family == AF_INET6)
+                        r = sd_rtnl_message_append_in6_addr(req, IFA_ADDRESS, &address->in_addr_peer.in6);
                 if (r < 0) {
-                        log_error("Could not append IFA_BROADCAST attribute: %s",
+                        log_error("Could not append IFA_ADDRESS attribute: %s",
                                   strerror(-r));
                         return r;
                 }
+        } else {
+                if (address->family == AF_INET) {
+                        r = sd_rtnl_message_append_in_addr(req, IFA_BROADCAST, &address->broadcast);
+                        if (r < 0) {
+                                log_error("Could not append IFA_BROADCAST attribute: %s",
+                                          strerror(-r));
+                                return r;
+                        }
+                }
         }
 
         if (address->label) {
@@ -382,7 +395,8 @@ int address_configure(Address *address, Link *link,
         return 0;
 }
 
-int config_parse_dns(const char *unit,
+int config_parse_broadcast(
+                const char *unit,
                 const char *filename,
                 unsigned line,
                 const char *section,
@@ -392,58 +406,9 @@ int config_parse_dns(const char *unit,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
-        Network *network = userdata;
-        Address *tail;
-        _cleanup_address_free_ Address *n = NULL;
-        int r;
-
-        assert(filename);
-        assert(section);
-        assert(lvalue);
-        assert(rvalue);
-        assert(network);
-
-        r = address_new_dynamic(&n);
-        if (r < 0)
-                return r;
-
-        r = net_parse_inaddr(rvalue, &n->family, &n->in_addr);
-        if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "DNS address is invalid, ignoring assignment: %s", rvalue);
-                return 0;
-        }
-
-        if (streq(lvalue, "DNS")) {
-                LIST_FIND_TAIL(addresses, network->dns, tail);
-                LIST_INSERT_AFTER(addresses, network->dns, tail, n);
-        } else if (streq(lvalue, "NTP")) {
-                LIST_FIND_TAIL(addresses, network->ntp, tail);
-                LIST_INSERT_AFTER(addresses, network->ntp, tail, n);
-        } else {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "Key is invalid, ignoring assignment: %s=%s", lvalue, rvalue);
-                return 0;
-        }
-
-        n = NULL;
 
-        return 0;
-}
-
-int config_parse_broadcast(const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
         Network *network = userdata;
         _cleanup_address_free_ Address *n = NULL;
-        _cleanup_free_ char *address = NULL;
         int r;
 
         assert(filename);
@@ -458,18 +423,18 @@ int config_parse_broadcast(const char *unit,
 
         if (n->family == AF_INET6) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "Broadcast is not valid for IPv6 addresses, "
-                           "ignoring assignment: %s", address);
+                           "Broadcast is not valid for IPv6 addresses, ignoring assignment: %s", rvalue);
                 return 0;
         }
 
-        r = net_parse_inaddr(address, &n->family, &n->broadcast);
+        r = in_addr_from_string(AF_INET, rvalue, (union in_addr_union*) &n->broadcast);
         if (r < 0) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "Broadcast is invalid, ignoring assignment: %s", address);
+                           "Broadcast is invalid, ignoring assignment: %s", rvalue);
                 return 0;
         }
 
+        n->family = AF_INET;
         n = NULL;
 
         return 0;
@@ -485,11 +450,12 @@ int config_parse_address(const char *unit,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
+
         Network *network = userdata;
         _cleanup_address_free_ Address *n = NULL;
-        _cleanup_free_ char *address = NULL;
-        const char *e;
-        int r;
+        const char *address, *e;
+        union in_addr_union buffer;
+        int r, f;
 
         assert(filename);
         assert(section);
@@ -516,32 +482,47 @@ int config_parse_address(const char *unit,
                 r = safe_atou(e + 1, &i);
                 if (r < 0) {
                         log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "Interface prefix length is invalid, "
-                                   "ignoring assignment: %s", e + 1);
+                                   "Prefix length is invalid, ignoring assignment: %s", e + 1);
                         return 0;
                 }
 
                 n->prefixlen = (unsigned char) i;
 
-                address = strndup(rvalue, e - rvalue);
-                if (!address)
-                        return log_oom();
-        } else {
-                address = strdup(rvalue);
-                if (!address)
-                        return log_oom();
-        }
+                address = strndupa(rvalue, e - rvalue);
+        } else
+                address = rvalue;
 
-        r = net_parse_inaddr(address, &n->family, &n->in_addr);
+        r = in_addr_from_string_auto(address, &f, &buffer);
         if (r < 0) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
                            "Address is invalid, ignoring assignment: %s", address);
                 return 0;
         }
 
-        if (n->family == AF_INET && !n->broadcast.s_addr)
-                n->broadcast.s_addr = n->in_addr.in.s_addr |
-                                      htonl(0xfffffffflu >> n->prefixlen);
+        if (!e && f == AF_INET) {
+                r = in_addr_default_prefixlen(&buffer.in, &n->prefixlen);
+                if (r < 0) {
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                                   "Prefix length not specified, and a default one can not be deduced for '%s', ignoring assignment", address);
+                        return 0;
+                }
+        }
+
+        if (n->family != AF_UNSPEC && f != n->family) {
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Address is incompatible, ignoring assignment: %s", address);
+                return 0;
+        }
+
+        n->family = f;
+
+        if (streq(lvalue, "Address"))
+                n->in_addr = buffer;
+        else
+                n->in_addr_peer = buffer;
+
+        if (n->family == AF_INET && n->broadcast.s_addr == 0)
+                n->broadcast.s_addr = n->in_addr.in.s_addr | htonl(0xfffffffflu >> n->prefixlen);
 
         n = NULL;
 
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
new file mode 100644 (file)
index 0000000..63bfa86
--- /dev/null
@@ -0,0 +1,668 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013-2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#include <netinet/ether.h>
+#include <linux/if.h>
+
+#include "networkd-link.h"
+#include "network-internal.h"
+#include "dhcp-lease-internal.h"
+
+static int dhcp4_route_handler(sd_rtnl *rtnl, sd_rtnl_message *m,
+                               void *userdata) {
+        _cleanup_link_unref_ Link *link = userdata;
+        int r;
+
+        assert(link);
+        assert(link->dhcp4_messages);
+
+        link->dhcp4_messages --;
+
+        r = sd_rtnl_message_get_errno(m);
+        if (r < 0 && r != -EEXIST) {
+                log_error_link(link, "could not set DHCPv4 route: %s",
+                               strerror(-r));
+                link_enter_failed(link);
+        }
+
+        if (!link->dhcp4_messages) {
+                link->dhcp4_configured = true;
+                link_client_handler(link);
+        }
+
+        return 1;
+}
+
+static int link_set_dhcp_routes(Link *link) {
+        struct in_addr gateway;
+        struct sd_dhcp_route *static_routes;
+        int r, n, i;
+
+        assert(link);
+        assert(link->dhcp_lease);
+
+        r = sd_dhcp_lease_get_router(link->dhcp_lease, &gateway);
+        if (r < 0 && r != -ENOENT) {
+                log_warning_link(link,
+                                 "DHCP error: could not get gateway: %s",
+                                 strerror(-r));
+                return r;
+        }
+        if (r >= 0) {
+                struct in_addr address;
+                _cleanup_route_free_ Route *route = NULL;
+                _cleanup_route_free_ Route *route_gw = NULL;
+
+                r = sd_dhcp_lease_get_address(link->dhcp_lease, &address);
+                if (r < 0) {
+                        log_warning_link(link,
+                                         "DHCP error: could not get address: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                r = route_new_dynamic(&route, RTPROT_DHCP);
+                if (r < 0) {
+                        log_error_link(link,
+                                       "Could not allocate route: %s",
+                                       strerror(-r));
+                        return r;
+                }
+
+                r = route_new_dynamic(&route_gw, RTPROT_DHCP);
+                if (r < 0) {
+                log_error_link(link,
+                               "Could not allocate route: %s",
+                               strerror(-r));
+                               return r;
+                }
+
+                /* The dhcp netmask may mask out the gateway. Add an explicit
+                 * route for the gw host so that we can route no matter the
+                 * netmask or existing kernel route tables. */
+                route_gw->family = AF_INET;
+                route_gw->dst_addr.in = gateway;
+                route_gw->dst_prefixlen = 32;
+                route_gw->prefsrc_addr.in = address;
+                route_gw->scope = RT_SCOPE_LINK;
+                route_gw->metrics = link->network->dhcp_route_metric;
+
+                r = route_configure(route_gw, link, &dhcp4_route_handler);
+                if (r < 0) {
+                        log_warning_link(link,
+                                         "could not set host route: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                link->dhcp4_messages ++;
+
+                route->family = AF_INET;
+                route->in_addr.in = gateway;
+                route->prefsrc_addr.in = address;
+                route->metrics = link->network->dhcp_route_metric;
+
+                r = route_configure(route, link, &dhcp4_route_handler);
+                if (r < 0) {
+                        log_warning_link(link,
+                                         "could not set routes: %s",
+                                         strerror(-r));
+                        link_enter_failed(link);
+                        return r;
+                }
+
+                link->dhcp4_messages ++;
+        }
+
+        n = sd_dhcp_lease_get_routes(link->dhcp_lease, &static_routes);
+        if (n == -ENOENT)
+                return 0;
+        if (n < 0) {
+                log_warning_link(link,
+                                 "DHCP error: could not get routes: %s",
+                                 strerror(-n));
+
+                return n;
+        }
+
+        for (i = 0; i < n; i++) {
+                _cleanup_route_free_ Route *route = NULL;
+
+                r = route_new_dynamic(&route, RTPROT_DHCP);
+                if (r < 0) {
+                        log_error_link(link, "Could not allocate route: %s",
+                                       strerror(-r));
+                        return r;
+                }
+
+                route->family = AF_INET;
+                route->in_addr.in = static_routes[i].gw_addr;
+                route->dst_addr.in = static_routes[i].dst_addr;
+                route->dst_prefixlen = static_routes[i].dst_prefixlen;
+                route->metrics = link->network->dhcp_route_metric;
+
+                r = route_configure(route, link, &dhcp4_route_handler);
+                if (r < 0) {
+                        log_warning_link(link,
+                                         "could not set host route: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                link->dhcp4_messages ++;
+        }
+
+        return 0;
+}
+
+static int dhcp_lease_lost(Link *link) {
+        _cleanup_address_free_ Address *address = NULL;
+        struct in_addr addr;
+        struct in_addr netmask;
+        struct in_addr gateway;
+        unsigned prefixlen = 0;
+        int r;
+
+        assert(link);
+        assert(link->dhcp_lease);
+
+        log_warning_link(link, "DHCP lease lost");
+
+        if (link->network->dhcp_routes) {
+                struct sd_dhcp_route *routes;
+                int n, i;
+
+                n = sd_dhcp_lease_get_routes(link->dhcp_lease, &routes);
+                if (n >= 0) {
+                        for (i = 0; i < n; i++) {
+                                _cleanup_route_free_ Route *route = NULL;
+
+                                r = route_new_dynamic(&route, RTPROT_UNSPEC);
+                                if (r >= 0) {
+                                        route->family = AF_INET;
+                                        route->in_addr.in = routes[i].gw_addr;
+                                        route->dst_addr.in = routes[i].dst_addr;
+                                        route->dst_prefixlen = routes[i].dst_prefixlen;
+
+                                        route_drop(route, link,
+                                                   &link_route_drop_handler);
+                                }
+                        }
+                }
+        }
+
+        r = address_new_dynamic(&address);
+        if (r >= 0) {
+                r = sd_dhcp_lease_get_router(link->dhcp_lease, &gateway);
+                if (r >= 0) {
+                        _cleanup_route_free_ Route *route_gw = NULL;
+                        _cleanup_route_free_ Route *route = NULL;
+
+                        r = route_new_dynamic(&route_gw, RTPROT_UNSPEC);
+                        if (r >= 0) {
+                                route_gw->family = AF_INET;
+                                route_gw->dst_addr.in = gateway;
+                                route_gw->dst_prefixlen = 32;
+                                route_gw->scope = RT_SCOPE_LINK;
+
+                                route_drop(route_gw, link,
+                                           &link_route_drop_handler);
+                        }
+
+                        r = route_new_dynamic(&route, RTPROT_UNSPEC);
+                        if (r >= 0) {
+                                route->family = AF_INET;
+                                route->in_addr.in = gateway;
+
+                                route_drop(route, link,
+                                           &link_route_drop_handler);
+                        }
+                }
+
+                r = sd_dhcp_lease_get_address(link->dhcp_lease, &addr);
+                if (r >= 0) {
+                        r = sd_dhcp_lease_get_netmask(link->dhcp_lease, &netmask);
+                        if (r >= 0)
+                                prefixlen = in_addr_netmask_to_prefixlen(&netmask);
+
+                        address->family = AF_INET;
+                        address->in_addr.in = addr;
+                        address->prefixlen = prefixlen;
+
+                       address_drop(address, link, &link_address_drop_handler);
+                }
+        }
+
+        if (link->network->dhcp_mtu) {
+                uint16_t mtu;
+
+                r = sd_dhcp_lease_get_mtu(link->dhcp_lease, &mtu);
+                if (r >= 0 && link->original_mtu != mtu) {
+                        r = link_set_mtu(link, link->original_mtu);
+                        if (r < 0) {
+                                log_warning_link(link,
+                                                 "DHCP error: could not reset MTU");
+                                link_enter_failed(link);
+                                return r;
+                        }
+                }
+        }
+
+        if (link->network->dhcp_hostname) {
+                const char *hostname = NULL;
+
+                r = sd_dhcp_lease_get_hostname(link->dhcp_lease, &hostname);
+                if (r >= 0 && hostname) {
+                        r = link_set_hostname(link, "");
+                        if (r < 0)
+                                log_error_link(link,
+                                               "Failed to reset transient hostname");
+                }
+        }
+
+        link->dhcp_lease = sd_dhcp_lease_unref(link->dhcp_lease);
+        link->dhcp4_configured = false;
+
+        return 0;
+}
+
+static int dhcp4_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m,
+                                 void *userdata) {
+        _cleanup_link_unref_ Link *link = userdata;
+        int r;
+
+        assert(link);
+
+        r = sd_rtnl_message_get_errno(m);
+        if (r < 0 && r != -EEXIST) {
+                log_error_link(link, "could not set DHCPv4 address: %s",
+                               strerror(-r));
+                link_enter_failed(link);
+        } else if (r >= 0) {
+                /* calling handler directly so take a ref */
+                link_ref(link);
+                link_get_address_handler(rtnl, m, link);
+        }
+
+        link_set_dhcp_routes(link);
+
+        return 1;
+}
+
+static int dhcp4_update_address(Link *link,
+                                struct in_addr *address,
+                                struct in_addr *netmask,
+                                uint32_t lifetime) {
+        _cleanup_address_free_ Address *addr = NULL;
+        unsigned prefixlen;
+        int r;
+
+        assert(address);
+        assert(netmask);
+        assert(lifetime);
+
+        prefixlen = in_addr_netmask_to_prefixlen(netmask);
+
+        r = address_new_dynamic(&addr);
+        if (r < 0)
+                return r;
+
+        addr->family = AF_INET;
+        addr->in_addr.in.s_addr = address->s_addr;
+        addr->cinfo.ifa_prefered = lifetime;
+        addr->cinfo.ifa_valid = lifetime;
+        addr->prefixlen = prefixlen;
+        addr->broadcast.s_addr = address->s_addr | ~netmask->s_addr;
+
+        /* use update rather than configure so that we will update the
+         * lifetime of an existing address if it has already been configured */
+        r = address_update(addr, link, &dhcp4_address_handler);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int dhcp_lease_renew(sd_dhcp_client *client, Link *link) {
+        sd_dhcp_lease *lease;
+        struct in_addr address;
+        struct in_addr netmask;
+        uint32_t lifetime = CACHE_INFO_INFINITY_LIFE_TIME;
+        int r;
+
+        assert(link);
+        assert(client);
+        assert(link->network);
+
+        r = sd_dhcp_client_get_lease(client, &lease);
+        if (r < 0) {
+                log_warning_link(link, "DHCP error: no lease %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        sd_dhcp_lease_unref(link->dhcp_lease);
+        link->dhcp4_configured = false;
+        link->dhcp_lease = lease;
+
+        r = sd_dhcp_lease_get_address(lease, &address);
+        if (r < 0) {
+                log_warning_link(link, "DHCP error: no address: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_dhcp_lease_get_netmask(lease, &netmask);
+        if (r < 0) {
+                log_warning_link(link, "DHCP error: no netmask: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        if (!link->network->dhcp_critical) {
+                r = sd_dhcp_lease_get_lifetime(link->dhcp_lease,
+                                               &lifetime);
+                if (r < 0) {
+                        log_warning_link(link,
+                                         "DHCP error: no lifetime: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        r = dhcp4_update_address(link, &address, &netmask, lifetime);
+        if (r < 0) {
+                log_warning_link(link, "could not update IP address: %s",
+                                 strerror(-r));
+                link_enter_failed(link);
+                return r;
+        }
+
+        return 0;
+}
+
+static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
+        sd_dhcp_lease *lease;
+        struct in_addr address;
+        struct in_addr netmask;
+        struct in_addr gateway;
+        unsigned prefixlen;
+        uint32_t lifetime = CACHE_INFO_INFINITY_LIFE_TIME;
+        int r;
+
+        assert(client);
+        assert(link);
+
+        r = sd_dhcp_client_get_lease(client, &lease);
+        if (r < 0) {
+                log_warning_link(link, "DHCP error: no lease: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_dhcp_lease_get_address(lease, &address);
+        if (r < 0) {
+                log_warning_link(link, "DHCP error: no address: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_dhcp_lease_get_netmask(lease, &netmask);
+        if (r < 0) {
+                log_warning_link(link, "DHCP error: no netmask: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        prefixlen = in_addr_netmask_to_prefixlen(&netmask);
+
+        r = sd_dhcp_lease_get_router(lease, &gateway);
+        if (r < 0 && r != -ENOENT) {
+                log_warning_link(link, "DHCP error: could not get gateway: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        if (r >= 0)
+                log_struct_link(LOG_INFO, link,
+                                "MESSAGE=%-*s: DHCPv4 address %u.%u.%u.%u/%u via %u.%u.%u.%u",
+                                 IFNAMSIZ,
+                                 link->ifname,
+                                 ADDRESS_FMT_VAL(address),
+                                 prefixlen,
+                                 ADDRESS_FMT_VAL(gateway),
+                                 "ADDRESS=%u.%u.%u.%u",
+                                 ADDRESS_FMT_VAL(address),
+                                 "PREFIXLEN=%u",
+                                 prefixlen,
+                                 "GATEWAY=%u.%u.%u.%u",
+                                 ADDRESS_FMT_VAL(gateway),
+                                 NULL);
+        else
+                log_struct_link(LOG_INFO, link,
+                                "MESSAGE=%-*s: DHCPv4 address %u.%u.%u.%u/%u",
+                                 IFNAMSIZ,
+                                 link->ifname,
+                                 ADDRESS_FMT_VAL(address),
+                                 prefixlen,
+                                 "ADDRESS=%u.%u.%u.%u",
+                                 ADDRESS_FMT_VAL(address),
+                                 "PREFIXLEN=%u",
+                                 prefixlen,
+                                 NULL);
+
+        link->dhcp_lease = lease;
+
+        if (link->network->dhcp_mtu) {
+                uint16_t mtu;
+
+                r = sd_dhcp_lease_get_mtu(lease, &mtu);
+                if (r >= 0) {
+                        r = link_set_mtu(link, mtu);
+                        if (r < 0)
+                                log_error_link(link, "Failed to set MTU "
+                                               "to %" PRIu16, mtu);
+                }
+        }
+
+        if (link->network->dhcp_hostname) {
+                const char *hostname;
+
+                r = sd_dhcp_lease_get_hostname(lease, &hostname);
+                if (r >= 0) {
+                        r = link_set_hostname(link, hostname);
+                        if (r < 0)
+                                log_error_link(link,
+                                               "Failed to set transient hostname to '%s'",
+                                               hostname);
+                }
+        }
+
+        if (!link->network->dhcp_critical) {
+                r = sd_dhcp_lease_get_lifetime(link->dhcp_lease,
+                                               &lifetime);
+                if (r < 0) {
+                        log_warning_link(link,
+                                         "DHCP error: no lifetime: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        r = dhcp4_update_address(link, &address, &netmask, lifetime);
+        if (r < 0) {
+                log_warning_link(link, "could not update IP address: %s",
+                                 strerror(-r));
+                link_enter_failed(link);
+                return r;
+        }
+
+        return 0;
+}
+static void dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
+        Link *link = userdata;
+        int r = 0;
+
+        assert(link);
+        assert(link->network);
+        assert(link->manager);
+
+        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
+                return;
+
+        switch (event) {
+                case DHCP_EVENT_EXPIRED:
+                case DHCP_EVENT_STOP:
+                case DHCP_EVENT_IP_CHANGE:
+                        if (link->network->dhcp_critical) {
+                                log_error_link(link,
+                                               "DHCPv4 connection considered system critical, ignoring request to reconfigure it.");
+                                return;
+                        }
+
+                        if (link->dhcp_lease) {
+                                r = dhcp_lease_lost(link);
+                                if (r < 0) {
+                                        link_enter_failed(link);
+                                        return;
+                                }
+                        }
+
+                        if (event == DHCP_EVENT_IP_CHANGE) {
+                                r = dhcp_lease_acquired(client, link);
+                                if (r < 0) {
+                                        link_enter_failed(link);
+                                        return;
+                                }
+                        }
+
+                        break;
+                case DHCP_EVENT_RENEW:
+                        r = dhcp_lease_renew(client, link);
+                        if (r < 0) {
+                                link_enter_failed(link);
+                                return;
+                        }
+                        break;
+                case DHCP_EVENT_IP_ACQUIRE:
+                        r = dhcp_lease_acquired(client, link);
+                        if (r < 0) {
+                                link_enter_failed(link);
+                                return;
+                        }
+                        break;
+                default:
+                        if (event < 0)
+                                log_warning_link(link,
+                                                 "DHCP error: client failed: %s",
+                                                 strerror(-event));
+                        else
+                                log_warning_link(link,
+                                                 "DHCP unknown event: %d",
+                                                 event);
+                        break;
+        }
+
+        return;
+}
+
+int dhcp4_configure(Link *link) {
+        int r;
+
+        assert(link);
+        assert(link->network);
+        assert(IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V4));
+
+        r = sd_dhcp_client_new(&link->dhcp_client);
+        if (r < 0)
+                return r;
+
+        r = sd_dhcp_client_attach_event(link->dhcp_client, NULL, 0);
+        if (r < 0)
+                return r;
+
+        r = sd_dhcp_client_set_mac(link->dhcp_client,
+                                   (const uint8_t *) &link->mac,
+                                   sizeof (link->mac), ARPHRD_ETHER);
+        if (r < 0)
+                return r;
+
+        r = sd_dhcp_client_set_index(link->dhcp_client, link->ifindex);
+        if (r < 0)
+                return r;
+
+        r = sd_dhcp_client_set_callback(link->dhcp_client, dhcp4_handler, link);
+        if (r < 0)
+                return r;
+
+        r = sd_dhcp_client_set_request_broadcast(link->dhcp_client,
+                                                 link->network->dhcp_broadcast);
+        if (r < 0)
+                return r;
+
+        if (link->mtu) {
+                r = sd_dhcp_client_set_mtu(link->dhcp_client, link->mtu);
+                if (r < 0)
+                        return r;
+        }
+
+        if (link->network->dhcp_mtu) {
+             r = sd_dhcp_client_set_request_option(link->dhcp_client,
+                                                   DHCP_OPTION_INTERFACE_MTU);
+             if (r < 0)
+                return r;
+        }
+
+        if (link->network->dhcp_routes) {
+                r = sd_dhcp_client_set_request_option(link->dhcp_client,
+                                                      DHCP_OPTION_STATIC_ROUTE);
+                if (r < 0)
+                        return r;
+                r = sd_dhcp_client_set_request_option(link->dhcp_client,
+                                                      DHCP_OPTION_CLASSLESS_STATIC_ROUTE);
+                        if (r < 0)
+                                return r;
+        }
+
+        if (link->network->dhcp_sendhost) {
+                _cleanup_free_ char *hostname = NULL;
+
+                hostname = gethostname_malloc();
+                if (!hostname)
+                        return -ENOMEM;
+
+                if (!is_localhost(hostname)) {
+                        r = sd_dhcp_client_set_hostname(link->dhcp_client,
+                                                        hostname);
+                        if (r < 0)
+                                return r;
+                }
+        }
+
+        if (link->network->dhcp_vendor_class_identifier) {
+                r = sd_dhcp_client_set_vendor_class_identifier(link->dhcp_client,
+                                                               link->network->dhcp_vendor_class_identifier);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
diff --git a/src/network/networkd-dummy.c b/src/network/networkd-dummy.c
deleted file mode 100644 (file)
index 80fe41b..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-    This file is part of systemd.
-
-    Copyright 2014 Susant Sahani <susant@redhat.com>
-    Copyright 2014 Tom Gundersen
-
-    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/>.
-***/
-
-#include <netinet/ether.h>
-#include <arpa/inet.h>
-#include <net/if.h>
-#include <linux/veth.h>
-
-#include "sd-rtnl.h"
-#include "networkd.h"
-
-
-static int netdev_fill_dummy_rtnl_message(NetDev *netdev, sd_rtnl_message *m) {
-        int r;
-
-        assert(netdev);
-        assert(m);
-
-        r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME, attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
-                                                 netdev_kind_to_string(netdev->kind));
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-int netdev_create_dummy(NetDev *netdev, sd_rtnl_message_handler_t callback) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
-        int r;
-
-        assert(netdev);
-        assert(netdev->ifname);
-        assert(netdev->manager);
-        assert(netdev->manager->rtnl);
-
-        r = sd_rtnl_message_new_link(netdev->manager->rtnl, &m, RTM_NEWLINK, 0);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not allocate RTM_NEWLINK message: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->kind != NETDEV_KIND_DUMMY)
-                return -ENOTSUP;
-
-        r = netdev_fill_dummy_rtnl_message(netdev, m);
-        if(r < 0)
-                return r;
-
-        r = sd_rtnl_call_async(netdev->manager->rtnl, m, callback, netdev, 0, NULL);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not send rtnetlink message: %s", strerror(-r));
-                return r;
-        }
-
-        netdev_ref(netdev);
-
-        log_debug_netdev(netdev, "Creating dummy netdev.");
-
-        netdev->state = NETDEV_STATE_CREATING;
-
-        return 0;
-}
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
new file mode 100644 (file)
index 0000000..5467bc3
--- /dev/null
@@ -0,0 +1,248 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013-2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#include <netinet/ether.h>
+#include <linux/if.h>
+
+#include "networkd-link.h"
+#include "network-internal.h"
+
+static int ipv4ll_address_lost(Link *link) {
+        _cleanup_address_free_ Address *address = NULL;
+        _cleanup_route_free_ Route *route = NULL;
+        struct in_addr addr;
+        int r;
+
+        assert(link);
+
+        link->ipv4ll_route = false;
+        link->ipv4ll_address =  false;
+
+        r = sd_ipv4ll_get_address(link->ipv4ll, &addr);
+        if (r < 0)
+                return 0;
+
+        log_debug_link(link, "IPv4 link-local release %u.%u.%u.%u",
+                       ADDRESS_FMT_VAL(addr));
+
+        r = address_new_dynamic(&address);
+        if (r < 0) {
+                log_error_link(link, "Could not allocate address: %s", strerror(-r));
+                return r;
+        }
+
+        address->family = AF_INET;
+        address->in_addr.in = addr;
+        address->prefixlen = 16;
+        address->scope = RT_SCOPE_LINK;
+
+        address_drop(address, link, &link_address_drop_handler);
+
+        r = route_new_dynamic(&route, RTPROT_UNSPEC);
+        if (r < 0) {
+                log_error_link(link, "Could not allocate route: %s",
+                               strerror(-r));
+                return r;
+        }
+
+        route->family = AF_INET;
+        route->scope = RT_SCOPE_LINK;
+        route->metrics = IPV4LL_ROUTE_METRIC;
+
+        route_drop(route, link, &link_route_drop_handler);
+
+        link_client_handler(link);
+
+        return 0;
+}
+
+static int ipv4ll_route_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+        _cleanup_link_unref_ Link *link = userdata;
+        int r;
+
+        assert(link);
+        assert(!link->ipv4ll_route);
+
+        r = sd_rtnl_message_get_errno(m);
+        if (r < 0 && r != -EEXIST) {
+                log_error_link(link, "could not set ipv4ll route: %s", strerror(-r));
+                link_enter_failed(link);
+        }
+
+        link->ipv4ll_route = true;
+
+        if (link->ipv4ll_address == true)
+                link_client_handler(link);
+
+        return 1;
+}
+
+static int ipv4ll_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+        _cleanup_link_unref_ Link *link = userdata;
+        int r;
+
+        assert(link);
+        assert(!link->ipv4ll_address);
+
+        r = sd_rtnl_message_get_errno(m);
+        if (r < 0 && r != -EEXIST) {
+                log_error_link(link, "could not set ipv4ll address: %s", strerror(-r));
+                link_enter_failed(link);
+        } else if (r >= 0) {
+                /* calling handler directly so take a ref */
+                link_ref(link);
+                link_get_address_handler(rtnl, m, link);
+        }
+
+        link->ipv4ll_address = true;
+
+        if (link->ipv4ll_route == true)
+                link_client_handler(link);
+
+        return 1;
+}
+
+static int ipv4ll_address_claimed(sd_ipv4ll *ll, Link *link) {
+        _cleanup_address_free_ Address *ll_addr = NULL;
+        _cleanup_route_free_ Route *route = NULL;
+        struct in_addr address;
+        int r;
+
+        assert(ll);
+        assert(link);
+
+        r = sd_ipv4ll_get_address(ll, &address);
+        if (r == -ENOENT)
+                return 0;
+        else if (r < 0)
+                return r;
+
+        log_debug_link(link, "IPv4 link-local claim %u.%u.%u.%u",
+                       ADDRESS_FMT_VAL(address));
+
+        r = address_new_dynamic(&ll_addr);
+        if (r < 0)
+                return r;
+
+        ll_addr->family = AF_INET;
+        ll_addr->in_addr.in = address;
+        ll_addr->prefixlen = 16;
+        ll_addr->broadcast.s_addr = ll_addr->in_addr.in.s_addr | htonl(0xfffffffflu >> ll_addr->prefixlen);
+        ll_addr->scope = RT_SCOPE_LINK;
+
+        r = address_configure(ll_addr, link, ipv4ll_address_handler);
+        if (r < 0)
+                return r;
+
+        link->ipv4ll_address = false;
+
+        r = route_new_dynamic(&route, RTPROT_STATIC);
+        if (r < 0)
+                return r;
+
+        route->family = AF_INET;
+        route->scope = RT_SCOPE_LINK;
+        route->metrics = IPV4LL_ROUTE_METRIC;
+
+        r = route_configure(route, link, ipv4ll_route_handler);
+        if (r < 0)
+                return r;
+
+        link->ipv4ll_route = false;
+
+        return 0;
+}
+
+static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata){
+        Link *link = userdata;
+        int r;
+
+        assert(link);
+        assert(link->network);
+        assert(link->manager);
+
+        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
+                return;
+
+        switch(event) {
+                case IPV4LL_EVENT_STOP:
+                case IPV4LL_EVENT_CONFLICT:
+                        r = ipv4ll_address_lost(link);
+                        if (r < 0) {
+                                link_enter_failed(link);
+                                return;
+                        }
+                        break;
+                case IPV4LL_EVENT_BIND:
+                        r = ipv4ll_address_claimed(ll, link);
+                        if (r < 0) {
+                                link_enter_failed(link);
+                                return;
+                        }
+                        break;
+                default:
+                        if (event < 0)
+                                log_warning_link(link, "IPv4 link-local error: %s", strerror(-event));
+                        else
+                                log_warning_link(link, "IPv4 link-local unknown event: %d", event);
+                        break;
+        }
+}
+
+int ipv4ll_configure(Link *link) {
+        uint8_t seed[8];
+        int r;
+
+        assert(link);
+        assert(link->network);
+        assert(link->network->ipv4ll);
+
+        r = sd_ipv4ll_new(&link->ipv4ll);
+        if (r < 0)
+                return r;
+
+        if (link->udev_device) {
+                r = net_get_unique_predictable_data(link->udev_device, seed);
+                if (r >= 0) {
+                        r = sd_ipv4ll_set_address_seed(link->ipv4ll, seed);
+                        if (r < 0)
+                                return r;
+                }
+        }
+
+        r = sd_ipv4ll_attach_event(link->ipv4ll, NULL, 0);
+        if (r < 0)
+                return r;
+
+        r = sd_ipv4ll_set_mac(link->ipv4ll, &link->mac);
+        if (r < 0)
+                return r;
+
+        r = sd_ipv4ll_set_index(link->ipv4ll, link->ifindex);
+        if (r < 0)
+                return r;
+
+        r = sd_ipv4ll_set_callback(link->ipv4ll, ipv4ll_handler, link);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
index 14c0417d83a1a1e3bf3bc6c58a04af173e1b3ccf..26ef0feaae2d6c635d9fe6284e0db28adfb6b635 100644 (file)
@@ -23,7 +23,8 @@
 #include <linux/if.h>
 #include <unistd.h>
 
-#include "networkd.h"
+#include "networkd-link.h"
+#include "networkd-netdev.h"
 #include "libudev-private.h"
 #include "udev-util.h"
 #include "util.h"
 #include "network-internal.h"
 #include "conf-parser.h"
 
-#include "network-util.h"
 #include "dhcp-lease-internal.h"
 
-static int ipv4ll_address_update(Link *link, bool deprecate);
-static bool ipv4ll_is_bound(sd_ipv4ll *ll);
+static bool link_dhcp6_enabled(Link *link) {
+        if (link->flags & IFF_LOOPBACK)
+                return false;
+
+        if (!link->network)
+                return false;
+
+        return IN_SET(link->network->dhcp, DHCP_SUPPORT_V6, DHCP_SUPPORT_BOTH);
+}
+
+static bool link_dhcp4_enabled(Link *link) {
+        if (link->flags & IFF_LOOPBACK)
+                return false;
+
+        if (!link->network)
+                return false;
+
+        return IN_SET(link->network->dhcp, DHCP_SUPPORT_V4, DHCP_SUPPORT_BOTH);
+}
+
+static bool link_dhcp4_server_enabled(Link *link) {
+        if (link->flags & IFF_LOOPBACK)
+                return false;
+
+        if (!link->network)
+                return false;
+
+        return link->network->dhcp_server;
+}
+
+static bool link_ipv4ll_enabled(Link *link) {
+        if (link->flags & IFF_LOOPBACK)
+                return false;
+
+        if (!link->network)
+                return false;
+
+        return link->network->ipv4ll;
+}
+
+#define FLAG_STRING(string, flag, old, new) \
+        (((old ^ new) & flag) \
+                ? ((old & flag) ? (" -" string) : (" +" string)) \
+                : "")
+
+static int link_update_flags(Link *link, sd_rtnl_message *m) {
+        unsigned flags, unknown_flags_added, unknown_flags_removed, unknown_flags;
+        uint8_t operstate;
+        int r;
+
+        assert(link);
+
+        r = sd_rtnl_message_link_get_flags(m, &flags);
+        if (r < 0) {
+                log_warning_link(link, "Could not get link flags");
+                return r;
+        }
+
+        r = sd_rtnl_message_read_u8(m, IFLA_OPERSTATE, &operstate);
+        if (r < 0)
+                /* if we got a message without operstate, take it to mean
+                   the state was unchanged */
+                operstate = link->kernel_operstate;
+
+        if ((link->flags == flags) && (link->kernel_operstate == operstate))
+                return 0;
+
+        if (link->flags != flags) {
+                log_debug_link(link, "flags change:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+                               FLAG_STRING("LOOPBACK", IFF_LOOPBACK, link->flags, flags),
+                               FLAG_STRING("MASTER", IFF_MASTER, link->flags, flags),
+                               FLAG_STRING("SLAVE", IFF_SLAVE, link->flags, flags),
+                               FLAG_STRING("UP", IFF_UP, link->flags, flags),
+                               FLAG_STRING("DORMANT", IFF_DORMANT, link->flags, flags),
+                               FLAG_STRING("LOWER_UP", IFF_LOWER_UP, link->flags, flags),
+                               FLAG_STRING("RUNNING", IFF_RUNNING, link->flags, flags),
+                               FLAG_STRING("MULTICAST", IFF_MULTICAST, link->flags, flags),
+                               FLAG_STRING("BROADCAST", IFF_BROADCAST, link->flags, flags),
+                               FLAG_STRING("POINTOPOINT", IFF_POINTOPOINT, link->flags, flags),
+                               FLAG_STRING("PROMISC", IFF_PROMISC, link->flags, flags),
+                               FLAG_STRING("ALLMULTI", IFF_ALLMULTI, link->flags, flags),
+                               FLAG_STRING("PORTSEL", IFF_PORTSEL, link->flags, flags),
+                               FLAG_STRING("AUTOMEDIA", IFF_AUTOMEDIA, link->flags, flags),
+                               FLAG_STRING("DYNAMIC", IFF_DYNAMIC, link->flags, flags),
+                               FLAG_STRING("NOARP", IFF_NOARP, link->flags, flags),
+                               FLAG_STRING("NOTRAILERS", IFF_NOTRAILERS, link->flags, flags),
+                               FLAG_STRING("DEBUG", IFF_DEBUG, link->flags, flags),
+                               FLAG_STRING("ECHO", IFF_ECHO, link->flags, flags));
+
+                unknown_flags = ~(IFF_LOOPBACK | IFF_MASTER | IFF_SLAVE | IFF_UP |
+                                  IFF_DORMANT | IFF_LOWER_UP | IFF_RUNNING |
+                                  IFF_MULTICAST | IFF_BROADCAST | IFF_POINTOPOINT |
+                                  IFF_PROMISC | IFF_ALLMULTI | IFF_PORTSEL |
+                                  IFF_AUTOMEDIA | IFF_DYNAMIC | IFF_NOARP |
+                                  IFF_NOTRAILERS | IFF_DEBUG | IFF_ECHO);
+                unknown_flags_added = ((link->flags ^ flags) & flags & unknown_flags);
+                unknown_flags_removed = ((link->flags ^ flags) & link->flags & unknown_flags);
+
+                /* link flags are currently at most 18 bits, let's align to
+                 * printing 20 */
+                if (unknown_flags_added)
+                        log_debug_link(link,
+                                       "unknown link flags gained: %#.5x (ignoring)",
+                                       unknown_flags_added);
+
+                if (unknown_flags_removed)
+                        log_debug_link(link,
+                                       "unknown link flags lost: %#.5x (ignoring)",
+                                       unknown_flags_removed);
+        }
+
+        link->flags = flags;
+        link->kernel_operstate = operstate;
+
+        link_save(link);
+
+        return 0;
+}
 
 static int link_new(Manager *manager, sd_rtnl_message *message, Link **ret) {
         _cleanup_link_unref_ Link *link = NULL;
         uint16_t type;
-        char *ifname;
+        const char *ifname;
         int r, ifindex;
 
         assert(manager);
-        assert(manager->links);
         assert(message);
         assert(ret);
 
@@ -71,7 +186,7 @@ static int link_new(Manager *manager, sd_rtnl_message *message, Link **ret) {
 
         link->n_ref = 1;
         link->manager = manager;
-        link->state = LINK_STATE_INITIALIZING;
+        link->state = LINK_STATE_PENDING;
         link->ifindex = ifindex;
         link->ifname = strdup(ifname);
         if (!link->ifname)
@@ -81,17 +196,25 @@ static int link_new(Manager *manager, sd_rtnl_message *message, Link **ret) {
         if (r < 0)
                 log_debug_link(link, "MAC address not found for new device, continuing without");
 
-        r = asprintf(&link->state_file, "/run/systemd/netif/links/%"PRIu64,
+        r = asprintf(&link->state_file, "/run/systemd/netif/links/%d",
                      link->ifindex);
         if (r < 0)
                 return -ENOMEM;
 
-        r = asprintf(&link->lease_file, "/run/systemd/netif/leases/%"PRIu64,
+        r = asprintf(&link->lease_file, "/run/systemd/netif/leases/%d",
                      link->ifindex);
         if (r < 0)
                 return -ENOMEM;
 
-        r = hashmap_put(manager->links, &link->ifindex, link);
+        r = hashmap_ensure_allocated(&manager->links, NULL);
+        if (r < 0)
+                return r;
+
+        r = hashmap_put(manager->links, INT_TO_PTR(link->ifindex), link);
+        if (r < 0)
+                return r;
+
+        r = link_update_flags(link, message);
         if (r < 0)
                 return r;
 
@@ -128,7 +251,7 @@ static void link_free(Link *link) {
         sd_icmp6_nd_unref(link->icmp6_router_discovery);
 
         if (link->manager)
-                hashmap_remove(link->manager->links, &link->ifindex);
+                hashmap_remove(link->manager->links, INT_TO_PTR(link->ifindex));
 
         free(link->ifname);
 
@@ -156,15 +279,12 @@ Link *link_ref(Link *link) {
 
 int link_get(Manager *m, int ifindex, Link **ret) {
         Link *link;
-        uint64_t ifindex_64;
 
         assert(m);
-        assert(m->links);
         assert(ifindex);
         assert(ret);
 
-        ifindex_64 = ifindex;
-        link = hashmap_get(m->links, &ifindex_64);
+        link = hashmap_get(m->links, INT_TO_PTR(ifindex));
         if (!link)
                 return -ENODEV;
 
@@ -206,50 +326,40 @@ static int link_stop_clients(Link *link) {
         if (!link->network)
                 return 0;
 
-        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V6)) {
-                assert(link->dhcp_client);
-
+        if (link->dhcp_client) {
                 k = sd_dhcp_client_stop(link->dhcp_client);
                 if (k < 0) {
-                        log_warning_link(link, "Could not stop DHCPv4 client: %s", strerror(-r));
+                        log_warning_link(link, "Could not stop DHCPv4 client: %s",
+                                         strerror(-r));
                         r = k;
                 }
         }
 
-        if (link->network->ipv4ll) {
-                assert(link->ipv4ll);
-
+        if (link->ipv4ll) {
                 k = sd_ipv4ll_stop(link->ipv4ll);
                 if (k < 0) {
-                        log_warning_link(link, "Could not stop IPv4 link-local: %s", strerror(-r));
-                        r = k;
-                }
-        }
-
-        if (link->network->dhcp_server) {
-                assert(link->dhcp_server);
-
-                k = sd_dhcp_server_stop(link->dhcp_server);
-                if (k < 0) {
-                        log_warning_link(link, "Could not stop DHCPv4 server: %s", strerror(-r));
+                        log_warning_link(link, "Could not stop IPv4 link-local: %s",
+                                         strerror(-r));
                         r = k;
                 }
         }
 
-        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V6)) {
-                assert(link->icmp6_router_discovery);
+        if(link->icmp6_router_discovery) {
 
                 if (link->dhcp6_client) {
                         k = sd_dhcp6_client_stop(link->dhcp6_client);
                         if (k < 0) {
-                                log_warning_link(link, "Could not stop DHCPv6 client: %s", strerror(-r));
+                                log_warning_link(link, "Could not stop DHCPv6 client: %s",
+                                                 strerror(-r));
                                 r = k;
                         }
                 }
 
                 k = sd_icmp6_nd_stop(link->icmp6_router_discovery);
                 if (k < 0) {
-                        log_warning_link(link, "Could not stop ICMPv6 router discovery: %s", strerror(-r));
+                        log_warning_link(link,
+                                         "Could not stop ICMPv6 router discovery: %s",
+                                         strerror(-r));
                         r = k;
                 }
         }
@@ -257,7 +367,7 @@ static int link_stop_clients(Link *link) {
         return r;
 }
 
-static void link_enter_failed(Link *link) {
+void link_enter_failed(Link *link) {
         assert(link);
 
         if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
@@ -284,7 +394,7 @@ static Address* link_find_dhcp_server_address(Link *link) {
                 if (address->family != AF_INET)
                         continue;
 
-                if (in_addr_null(address->family, &address->in_addr))
+                if (in_addr_is_null(address->family, &address->in_addr))
                         continue;
 
                 return address;
@@ -308,21 +418,24 @@ static int link_enter_configured(Link *link) {
         assert(link->network);
         assert(link->state == LINK_STATE_SETTING_ROUTES);
 
-        if (link->network->dhcp_server &&
+        if (link_dhcp4_server_enabled(link) &&
             !sd_dhcp_server_is_running(link->dhcp_server)) {
                 struct in_addr pool_start;
                 Address *address;
 
                 address = link_find_dhcp_server_address(link);
                 if (!address) {
-                        log_warning_link(link, "Failed to find suitable address for DHCPv4 server instance.");
+                        log_warning_link(link,
+                                         "Failed to find suitable address for DHCPv4 server instance.");
                         link_enter_failed(link);
                         return 0;
                 }
 
                 log_debug_link(link, "offering DHCPv4 leases");
 
-                r = sd_dhcp_server_set_address(link->dhcp_server, &address->in_addr.in);
+                r = sd_dhcp_server_set_address(link->dhcp_server,
+                                               &address->in_addr.in,
+                                               address->prefixlen);
                 if (r < 0)
                         return r;
 
@@ -365,18 +478,39 @@ static int link_enter_configured(Link *link) {
         return 0;
 }
 
+void link_client_handler(Link *link) {
+        assert(link);
+        assert(link->network);
+
+        if (!link->static_configured)
+                return;
+
+        if (link_ipv4ll_enabled(link))
+                if (!link->ipv4ll_address ||
+                    !link->ipv4ll_route)
+                        return;
+
+        if (link_dhcp4_enabled(link) && !link->dhcp4_configured)
+                        return;
+
+        if (link->state != LINK_STATE_CONFIGURED)
+                link_enter_configured(link);
+
+        return;
+}
+
 static int route_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
         _cleanup_link_unref_ Link *link = userdata;
         int r;
 
-        assert(link->route_messages > 0);
+        assert(link->link_messages > 0);
         assert(IN_SET(link->state, LINK_STATE_SETTING_ADDRESSES,
                       LINK_STATE_SETTING_ROUTES, LINK_STATE_FAILED,
                       LINK_STATE_LINGER));
 
-        link->route_messages --;
+        link->link_messages --;
 
-        if (IN_SET(LINK_STATE_FAILED, LINK_STATE_LINGER))
+        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
                 return 1;
 
         r = sd_rtnl_message_get_errno(m);
@@ -388,60 +522,15 @@ static int route_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
                                 "ERRNO=%d", -r,
                                 NULL);
 
-        /* we might have received an old reply after moving back to SETTING_ADDRESSES,
-         * ignore it */
-        if (link->route_messages == 0 && link->state == LINK_STATE_SETTING_ROUTES) {
+        if (link->link_messages == 0) {
                 log_debug_link(link, "routes set");
-                link_enter_configured(link);
+                link->static_configured = true;
+                link_client_handler(link);
         }
 
         return 1;
 }
 
-static int link_set_dhcp_routes(Link *link) {
-        struct sd_dhcp_route *static_routes;
-        size_t static_routes_size;
-        int r;
-        unsigned i;
-
-        assert(link);
-
-        r = sd_dhcp_lease_get_routes(link->dhcp_lease, &static_routes, &static_routes_size);
-        if (r < 0) {
-                if (r != -ENOENT)
-                        log_warning_link(link, "DHCP error: could not get routes: %s", strerror(-r));
-                return r;
-        }
-
-        for (i = 0; i < static_routes_size; i++) {
-                _cleanup_route_free_ Route *route = NULL;
-
-                r = route_new_dynamic(&route);
-                if (r < 0) {
-                        log_error_link(link, "Could not allocate route: %s",
-                                       strerror(-r));
-                        return r;
-                }
-
-                route->family = AF_INET;
-                route->in_addr.in = static_routes[i].gw_addr;
-                route->dst_addr.in = static_routes[i].dst_addr;
-                route->dst_prefixlen = static_routes[i].dst_prefixlen;
-                route->metrics = DHCP_STATIC_ROUTE_METRIC;
-
-                r = route_configure(route, link, &route_handler);
-                if (r < 0) {
-                        log_warning_link(link,
-                                         "could not set host route: %s", strerror(-r));
-                        return r;
-                }
-
-                link->route_messages ++;
-        }
-
-        return 0;
-}
-
 static int link_enter_set_routes(Link *link) {
         Route *rt;
         int r;
@@ -452,131 +541,29 @@ static int link_enter_set_routes(Link *link) {
 
         link->state = LINK_STATE_SETTING_ROUTES;
 
-        if (!link->network->static_routes && !link->dhcp_lease &&
-            (!link->ipv4ll || ipv4ll_is_bound(link->ipv4ll) == false))
-                return link_enter_configured(link);
-
-        log_debug_link(link, "setting routes");
-
         LIST_FOREACH(routes, rt, link->network->static_routes) {
                 r = route_configure(rt, link, &route_handler);
                 if (r < 0) {
                         log_warning_link(link,
-                                         "could not set routes: %s", strerror(-r));
-                        link_enter_failed(link);
-                        return r;
-                }
-
-                link->route_messages ++;
-        }
-
-        if (link->ipv4ll && !link->dhcp_lease) {
-                _cleanup_route_free_ Route *route = NULL;
-                struct in_addr addr;
-
-                r = sd_ipv4ll_get_address(link->ipv4ll, &addr);
-                if (r < 0 && r != -ENOENT) {
-                        log_warning_link(link, "IPV4LL error: no address: %s",
-                                        strerror(-r));
-                        return r;
-                }
-
-                if (r != -ENOENT) {
-                        r = route_new_dynamic(&route);
-                        if (r < 0) {
-                                log_error_link(link, "Could not allocate route: %s",
-                                               strerror(-r));
-                                return r;
-                        }
-
-                        route->family = AF_INET;
-                        route->scope = RT_SCOPE_LINK;
-                        route->metrics = 99;
-
-                        r = route_configure(route, link, &route_handler);
-                        if (r < 0) {
-                                log_warning_link(link,
-                                                 "could not set routes: %s", strerror(-r));
-                                link_enter_failed(link);
-                                return r;
-                        }
-
-                        link->route_messages ++;
-                }
-        }
-
-        if (link->dhcp_lease) {
-                _cleanup_route_free_ Route *route = NULL;
-                _cleanup_route_free_ Route *route_gw = NULL;
-                struct in_addr gateway;
-
-                r = sd_dhcp_lease_get_router(link->dhcp_lease, &gateway);
-                if (r < 0 && r != -ENOENT) {
-                        log_warning_link(link, "DHCP error: could not get gateway: %s",
+                                         "could not set routes: %s",
                                          strerror(-r));
+                        link_enter_failed(link);
                         return r;
                 }
 
-                if (r >= 0) {
-                        r = route_new_dynamic(&route);
-                        if (r < 0) {
-                                log_error_link(link, "Could not allocate route: %s",
-                                               strerror(-r));
-                                return r;
-                        }
-
-                        r = route_new_dynamic(&route_gw);
-                        if (r < 0) {
-                                log_error_link(link, "Could not allocate route: %s",
-                                               strerror(-r));
-                                return r;
-                        }
-
-                        /* The dhcp netmask may mask out the gateway. Add an explicit
-                         * route for the gw host so that we can route no matter the
-                         * netmask or existing kernel route tables. */
-                        route_gw->family = AF_INET;
-                        route_gw->dst_addr.in = gateway;
-                        route_gw->dst_prefixlen = 32;
-                        route_gw->scope = RT_SCOPE_LINK;
-                        route_gw->metrics = DHCP_STATIC_ROUTE_METRIC;
-
-                        r = route_configure(route_gw, link, &route_handler);
-                        if (r < 0) {
-                                log_warning_link(link,
-                                                 "could not set host route: %s", strerror(-r));
-                                return r;
-                        }
-
-                        link->route_messages ++;
-
-                        route->family = AF_INET;
-                        route->in_addr.in = gateway;
-                        route->metrics = DHCP_STATIC_ROUTE_METRIC;
-
-                        r = route_configure(route, link, &route_handler);
-                        if (r < 0) {
-                                log_warning_link(link,
-                                                 "could not set routes: %s", strerror(-r));
-                                link_enter_failed(link);
-                                return r;
-                        }
-
-                        link->route_messages ++;
-                }
-
-                if (link->network->dhcp_routes)
-                        link_set_dhcp_routes(link);
+                link->link_messages ++;
         }
 
-        if (link->route_messages == 0) {
-                link_enter_configured(link);
-        }
+        if (link->link_messages == 0) {
+                link->static_configured = true;
+                link_client_handler(link);
+        } else
+                log_debug_link(link, "setting routes");
 
         return 0;
 }
 
-static int route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+int link_route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
         _cleanup_link_unref_ Link *link = userdata;
         int r;
 
@@ -596,21 +583,48 @@ static int route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata)
                                 "ERRNO=%d", -r,
                                 NULL);
 
-        return 0;
+        return 1;
+}
+
+int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+        _cleanup_link_unref_ Link *link = userdata;
+        int r;
+
+        assert(rtnl);
+        assert(m);
+        assert(link);
+        assert(link->manager);
+
+        for (; m; m = sd_rtnl_message_next(m)) {
+                r = sd_rtnl_message_get_errno(m);
+                if (r < 0) {
+                        log_debug_link(link, "getting address failed: %s",
+                                       strerror(-r));
+                        continue;
+                }
+
+                r = link_rtnl_process_address(rtnl, m, link->manager);
+                if (r < 0)
+                        log_warning_link(link, "could not process address: %s",
+                                         strerror(-r));
+        }
+
+        return 1;
 }
 
 static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
         _cleanup_link_unref_ Link *link = userdata;
         int r;
 
+        assert(rtnl);
         assert(m);
         assert(link);
         assert(link->ifname);
-        assert(link->addr_messages > 0);
+        assert(link->link_messages > 0);
         assert(IN_SET(link->state, LINK_STATE_SETTING_ADDRESSES,
                LINK_STATE_FAILED, LINK_STATE_LINGER));
 
-        link->addr_messages --;
+        link->link_messages --;
 
         if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
                 return 1;
@@ -623,8 +637,13 @@ static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
                                 link->ifname, strerror(-r),
                                 "ERRNO=%d", -r,
                                 NULL);
+        else if (r >= 0) {
+                /* calling handler directly so take a ref */
+                link_ref(link);
+                link_get_address_handler(rtnl, m, link);
+        }
 
-        if (link->addr_messages == 0) {
+        if (link->link_messages == 0) {
                 log_debug_link(link, "addresses set");
                 link_enter_set_routes(link);
         }
@@ -635,7 +654,6 @@ static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
 static int link_enter_set_addresses(Link *link) {
         Address *ad;
         int r;
-        uint32_t lifetime = CACHE_INFO_INFINITY_LIFE_TIME;
 
         assert(link);
         assert(link->network);
@@ -643,146 +661,28 @@ static int link_enter_set_addresses(Link *link) {
 
         link->state = LINK_STATE_SETTING_ADDRESSES;
 
-        if (!link->network->static_addresses && !link->dhcp_lease &&
-                (!link->ipv4ll || ipv4ll_is_bound(link->ipv4ll) == false))
-                return link_enter_set_routes(link);
-
-        log_debug_link(link, "setting addresses");
-
         LIST_FOREACH(addresses, ad, link->network->static_addresses) {
                 r = address_configure(ad, link, &address_handler);
                 if (r < 0) {
                         log_warning_link(link,
-                                         "could not set addresses: %s", strerror(-r));
+                                         "could not set addresses: %s",
+                                         strerror(-r));
                         link_enter_failed(link);
                         return r;
                 }
 
-                link->addr_messages ++;
+                link->link_messages ++;
         }
 
-        if (link->ipv4ll && !link->dhcp_lease) {
-                _cleanup_address_free_ Address *ll_addr = NULL;
-                struct in_addr addr;
+        if (link->link_messages == 0) {
+                link_enter_set_routes(link);
+        } else
+                log_debug_link(link, "setting addresses");
 
-                r = sd_ipv4ll_get_address(link->ipv4ll, &addr);
-                if (r < 0 && r != -ENOENT) {
-                        log_warning_link(link, "IPV4LL error: no address: %s",
-                                        strerror(-r));
-                        return r;
-                }
+        return 0;
+}
 
-                if (r != -ENOENT) {
-                        r = address_new_dynamic(&ll_addr);
-                        if (r < 0) {
-                                log_error_link(link, "Could not allocate address: %s", strerror(-r));
-                                return r;
-                        }
-
-                        ll_addr->family = AF_INET;
-                        ll_addr->in_addr.in = addr;
-                        ll_addr->prefixlen = 16;
-                        ll_addr->broadcast.s_addr = ll_addr->in_addr.in.s_addr | htonl(0xfffffffflu >> ll_addr->prefixlen);
-                        ll_addr->scope = RT_SCOPE_LINK;
-
-                        r = address_configure(ll_addr, link, &address_handler);
-                        if (r < 0) {
-                                log_warning_link(link,
-                                         "could not set addresses: %s", strerror(-r));
-                                link_enter_failed(link);
-                                return r;
-                        }
-
-                        link->addr_messages ++;
-                }
-        }
-
-        if (link->dhcp_lease) {
-                _cleanup_address_free_ Address *address = NULL;
-                struct in_addr addr;
-                struct in_addr netmask;
-                unsigned prefixlen;
-
-                r = sd_dhcp_lease_get_address(link->dhcp_lease, &addr);
-                if (r < 0) {
-                        log_warning_link(link, "DHCP error: no address: %s",
-                                         strerror(-r));
-                        return r;
-                }
-
-                if (!link->network->dhcp_critical) {
-                        r = sd_dhcp_lease_get_lifetime(link->dhcp_lease,
-                                                       &lifetime);
-                        if (r < 0) {
-                                log_warning_link(link, "DHCP error: no lifetime: %s",
-                                                 strerror(-r));
-                                return r;
-                        }
-                }
-
-                r = sd_dhcp_lease_get_netmask(link->dhcp_lease, &netmask);
-                if (r < 0) {
-                        log_warning_link(link, "DHCP error: no netmask: %s",
-                                         strerror(-r));
-                        return r;
-                }
-
-                prefixlen = net_netmask_to_prefixlen(&netmask);
-
-                r = address_new_dynamic(&address);
-                if (r < 0) {
-                        log_error_link(link, "Could not allocate address: %s",
-                                       strerror(-r));
-                        return r;
-                }
-
-                address->family = AF_INET;
-                address->in_addr.in = addr;
-                address->cinfo.ifa_prefered = lifetime;
-                address->cinfo.ifa_valid = lifetime;
-                address->prefixlen = prefixlen;
-                address->broadcast.s_addr = addr.s_addr | ~netmask.s_addr;
-
-                /* use update rather than configure so that we will update the lifetime
-                   of an existing address if it has already been configured */
-                r = address_update(address, link, &address_handler);
-                if (r < 0) {
-                        log_warning_link(link,
-                                         "could not set addresses: %s", strerror(-r));
-                        link_enter_failed(link);
-                        return r;
-                }
-
-                link->addr_messages ++;
-        }
-
-        return 0;
-}
-
-static int address_update_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
-        _cleanup_link_unref_ Link *link = userdata;
-        int r;
-
-        assert(m);
-        assert(link);
-        assert(link->ifname);
-
-        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
-                return 1;
-
-        r = sd_rtnl_message_get_errno(m);
-        if (r < 0 && r != -ENOENT)
-                log_struct_link(LOG_WARNING, link,
-                                "MESSAGE=%-*s: could not update address: %s",
-                                IFNAMSIZ,
-                                link->ifname, strerror(-r),
-                                "ERRNO=%d", -r,
-                                NULL);
-
-        return 0;
-}
-
-static int address_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+int link_address_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
         _cleanup_link_unref_ Link *link = userdata;
         int r;
 
@@ -802,10 +702,11 @@ static int address_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdat
                                 "ERRNO=%d", -r,
                                 NULL);
 
-        return 0;
+        return 1;
 }
 
-static int set_hostname_handler(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
+static int set_hostname_handler(sd_bus *bus, sd_bus_message *m, void *userdata,
+                                sd_bus_error *ret_error) {
         _cleanup_link_unref_ Link *link = userdata;
         int r;
 
@@ -815,13 +716,14 @@ static int set_hostname_handler(sd_bus *bus, sd_bus_message *m, void *userdata,
                 return 1;
 
         r = sd_bus_message_get_errno(m);
-        if (r < 0)
-                log_warning_link(link, "Could not set hostname: %s", strerror(-r));
+        if (r > 0)
+                log_warning_link(link, "Could not set hostname: %s",
+                                 strerror(r));
 
         return 1;
 }
 
-static int link_set_hostname(Link *link, const char *hostname) {
+int link_set_hostname(Link *link, const char *hostname) {
         _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
         int r = 0;
 
@@ -831,8 +733,10 @@ static int link_set_hostname(Link *link, const char *hostname) {
 
         log_debug_link(link, "Setting transient hostname: '%s'", hostname);
 
-        if (!link->manager->bus) { /* TODO: replace by assert when we can rely on kdbus */
-                log_info_link(link, "Not connected to system bus, ignoring transient hostname.");
+        if (!link->manager->bus) {
+                /* TODO: replace by assert when we can rely on kdbus */
+                log_info_link(link,
+                              "Not connected to system bus, ignoring transient hostname.");
                 return 0;
         }
 
@@ -850,9 +754,11 @@ static int link_set_hostname(Link *link, const char *hostname) {
         if (r < 0)
                 return r;
 
-        r = sd_bus_call_async(link->manager->bus, NULL, m, set_hostname_handler, link, 0);
+        r = sd_bus_call_async(link->manager->bus, NULL, m, set_hostname_handler,
+                              link, 0);
         if (r < 0) {
-                log_error_link(link, "Could not set transient hostname: %s", strerror(-r));
+                log_error_link(link, "Could not set transient hostname: %s",
+                               strerror(-r));
                 return r;
         }
 
@@ -883,7 +789,7 @@ static int set_mtu_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
         return 1;
 }
 
-static int link_set_mtu(Link *link, uint32_t mtu) {
+int link_set_mtu(Link *link, uint32_t mtu) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
@@ -906,10 +812,12 @@ static int link_set_mtu(Link *link, uint32_t mtu) {
                 return r;
         }
 
-        r = sd_rtnl_call_async(link->manager->rtnl, req, set_mtu_handler, link, 0, NULL);
+        r = sd_rtnl_call_async(link->manager->rtnl, req, set_mtu_handler, link,
+                               0, NULL);
         if (r < 0) {
                 log_error_link(link,
-                               "Could not send rtnetlink message: %s", strerror(-r));
+                               "Could not send rtnetlink message: %s",
+                               strerror(-r));
                 return r;
         }
 
@@ -918,464 +826,6 @@ static int link_set_mtu(Link *link, uint32_t mtu) {
         return 0;
 }
 
-static int dhcp_lease_lost(Link *link) {
-        _cleanup_address_free_ Address *address = NULL;
-        struct in_addr addr;
-        struct in_addr netmask;
-        struct in_addr gateway;
-        unsigned prefixlen;
-        unsigned i;
-        int r;
-
-        assert(link);
-        assert(link->dhcp_lease);
-
-        log_warning_link(link, "DHCP lease lost");
-
-        if (link->network->dhcp_routes) {
-                struct sd_dhcp_route *routes;
-                size_t routes_size;
-
-                r = sd_dhcp_lease_get_routes(link->dhcp_lease, &routes, &routes_size);
-                if (r >= 0) {
-                        for (i = 0; i < routes_size; i++) {
-                                _cleanup_route_free_ Route *route = NULL;
-
-                                r = route_new_dynamic(&route);
-                                if (r >= 0) {
-                                        route->family = AF_INET;
-                                        route->in_addr.in = routes[i].gw_addr;
-                                        route->dst_addr.in = routes[i].dst_addr;
-                                        route->dst_prefixlen = routes[i].dst_prefixlen;
-
-                                        route_drop(route, link, &route_drop_handler);
-                                }
-                        }
-                }
-        }
-
-        r = address_new_dynamic(&address);
-        if (r >= 0) {
-                r = sd_dhcp_lease_get_router(link->dhcp_lease, &gateway);
-                if (r >= 0) {
-                        _cleanup_route_free_ Route *route_gw = NULL;
-                        _cleanup_route_free_ Route *route = NULL;
-
-                        r = route_new_dynamic(&route_gw);
-                        if (r >= 0) {
-                                route_gw->family = AF_INET;
-                                route_gw->dst_addr.in = gateway;
-                                route_gw->dst_prefixlen = 32;
-                                route_gw->scope = RT_SCOPE_LINK;
-
-                                route_drop(route_gw, link, &route_drop_handler);
-                        }
-
-                        r = route_new_dynamic(&route);
-                        if (r >= 0) {
-                                route->family = AF_INET;
-                                route->in_addr.in = gateway;
-
-                                route_drop(route, link, &route_drop_handler);
-                        }
-                }
-
-                sd_dhcp_lease_get_address(link->dhcp_lease, &addr);
-                sd_dhcp_lease_get_netmask(link->dhcp_lease, &netmask);
-                prefixlen = net_netmask_to_prefixlen(&netmask);
-
-                address->family = AF_INET;
-                address->in_addr.in = addr;
-                address->prefixlen = prefixlen;
-
-                address_drop(address, link, &address_drop_handler);
-        }
-
-        if (link->network->dhcp_mtu) {
-                uint16_t mtu;
-
-                r = sd_dhcp_lease_get_mtu(link->dhcp_lease, &mtu);
-                if (r >= 0 && link->original_mtu != mtu) {
-                        r = link_set_mtu(link, link->original_mtu);
-                        if (r < 0) {
-                                log_warning_link(link, "DHCP error: could not reset MTU");
-                                link_enter_failed(link);
-                                return r;
-                        }
-                }
-        }
-
-        if (link->network->dhcp_hostname) {
-                const char *hostname = NULL;
-
-                r = sd_dhcp_lease_get_hostname(link->dhcp_lease, &hostname);
-                if (r >= 0 && hostname) {
-                        r = link_set_hostname(link, "");
-                        if (r < 0)
-                                log_error_link(link, "Failed to reset transient hostname");
-                }
-        }
-
-        link->dhcp_lease = sd_dhcp_lease_unref(link->dhcp_lease);
-
-        return 0;
-}
-
-static int dhcp_lease_renew(sd_dhcp_client *client, Link *link) {
-        sd_dhcp_lease *lease;
-        int r;
-
-        r = sd_dhcp_client_get_lease(client, &lease);
-        if (r < 0) {
-                log_warning_link(link, "DHCP error: no lease %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        sd_dhcp_lease_unref(link->dhcp_lease);
-        link->dhcp_lease = lease;
-
-        link_enter_set_addresses(link);
-
-        return 0;
-}
-
-static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
-        sd_dhcp_lease *lease;
-        struct in_addr address;
-        struct in_addr netmask;
-        struct in_addr gateway;
-        unsigned prefixlen;
-        int r;
-
-        assert(client);
-        assert(link);
-
-        r = sd_dhcp_client_get_lease(client, &lease);
-        if (r < 0) {
-                log_warning_link(link, "DHCP error: no lease: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_dhcp_lease_get_address(lease, &address);
-        if (r < 0) {
-                log_warning_link(link, "DHCP error: no address: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_dhcp_lease_get_netmask(lease, &netmask);
-        if (r < 0) {
-                log_warning_link(link, "DHCP error: no netmask: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        prefixlen = net_netmask_to_prefixlen(&netmask);
-
-        r = sd_dhcp_lease_get_router(lease, &gateway);
-        if (r < 0 && r != -ENOENT) {
-                log_warning_link(link, "DHCP error: could not get gateway: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (r >= 0)
-                log_struct_link(LOG_INFO, link,
-                                "MESSAGE=%-*s: DHCPv4 address %u.%u.%u.%u/%u via %u.%u.%u.%u",
-                                 IFNAMSIZ,
-                                 link->ifname,
-                                 ADDRESS_FMT_VAL(address),
-                                 prefixlen,
-                                 ADDRESS_FMT_VAL(gateway),
-                                 "ADDRESS=%u.%u.%u.%u",
-                                 ADDRESS_FMT_VAL(address),
-                                 "PREFIXLEN=%u",
-                                 prefixlen,
-                                 "GATEWAY=%u.%u.%u.%u",
-                                 ADDRESS_FMT_VAL(gateway),
-                                 NULL);
-        else
-                log_struct_link(LOG_INFO, link,
-                                "MESSAGE=%-*s: DHCPv4 address %u.%u.%u.%u/%u",
-                                 IFNAMSIZ,
-                                 link->ifname,
-                                 ADDRESS_FMT_VAL(address),
-                                 prefixlen,
-                                 "ADDRESS=%u.%u.%u.%u",
-                                 ADDRESS_FMT_VAL(address),
-                                 "PREFIXLEN=%u",
-                                 prefixlen,
-                                 NULL);
-
-        link->dhcp_lease = lease;
-
-        if (link->network->dhcp_mtu) {
-                uint16_t mtu;
-
-                r = sd_dhcp_lease_get_mtu(lease, &mtu);
-                if (r >= 0) {
-                        r = link_set_mtu(link, mtu);
-                        if (r < 0)
-                                log_error_link(link, "Failed to set MTU "
-                                               "to %" PRIu16, mtu);
-                }
-        }
-
-        if (link->network->dhcp_hostname) {
-                const char *hostname;
-
-                r = sd_dhcp_lease_get_hostname(lease, &hostname);
-                if (r >= 0) {
-                        r = link_set_hostname(link, hostname);
-                        if (r < 0)
-                                log_error_link(link, "Failed to set transient hostname "
-                                          "to '%s'", hostname);
-                }
-        }
-
-        link_enter_set_addresses(link);
-
-        return 0;
-}
-
-static void dhcp_handler(sd_dhcp_client *client, int event, void *userdata) {
-        Link *link = userdata;
-        int r = 0;
-
-        assert(link);
-        assert(link->network);
-        assert(link->manager);
-
-        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
-                return;
-
-        switch (event) {
-                case DHCP_EVENT_NO_LEASE:
-                        log_debug_link(link, "IP address in use.");
-                        break;
-                case DHCP_EVENT_EXPIRED:
-                case DHCP_EVENT_STOP:
-                case DHCP_EVENT_IP_CHANGE:
-                        if (link->network->dhcp_critical) {
-                                log_error_link(link, "DHCPv4 connection considered system critical, "
-                                               "ignoring request to reconfigure it.");
-                                return;
-                        }
-
-                        if (link->dhcp_lease) {
-                                r = dhcp_lease_lost(link);
-                                if (r < 0) {
-                                        link_enter_failed(link);
-                                        return;
-                                }
-                        }
-
-                        if (event == DHCP_EVENT_IP_CHANGE) {
-                                r = dhcp_lease_acquired(client, link);
-                                if (r < 0) {
-                                        link_enter_failed(link);
-                                        return;
-                                }
-                        }
-
-                        if (event == DHCP_EVENT_EXPIRED && link->network->ipv4ll) {
-                                if (!sd_ipv4ll_is_running(link->ipv4ll))
-                                        r = sd_ipv4ll_start(link->ipv4ll);
-                                else if (ipv4ll_is_bound(link->ipv4ll))
-                                        r = ipv4ll_address_update(link, false);
-                                if (r < 0) {
-                                        link_enter_failed(link);
-                                        return;
-                                }
-                        }
-
-                        break;
-                case DHCP_EVENT_RENEW:
-                        r = dhcp_lease_renew(client, link);
-                        if (r < 0) {
-                                link_enter_failed(link);
-                                return;
-                        }
-                        break;
-                case DHCP_EVENT_IP_ACQUIRE:
-                        r = dhcp_lease_acquired(client, link);
-                        if (r < 0) {
-                                link_enter_failed(link);
-                                return;
-                        }
-                        if (link->ipv4ll) {
-                                if (ipv4ll_is_bound(link->ipv4ll))
-                                        r = ipv4ll_address_update(link, true);
-                                else
-                                        r = sd_ipv4ll_stop(link->ipv4ll);
-                                if (r < 0) {
-                                        link_enter_failed(link);
-                                        return;
-                                }
-                        }
-                        break;
-                default:
-                        if (event < 0)
-                                log_warning_link(link, "DHCP error: client failed: %s", strerror(-event));
-                        else
-                                log_warning_link(link, "DHCP unknown event: %d", event);
-                        break;
-        }
-
-        return;
-}
-
-static int ipv4ll_address_update(Link *link, bool deprecate) {
-        int r;
-        struct in_addr addr;
-
-        assert(link);
-
-        r = sd_ipv4ll_get_address(link->ipv4ll, &addr);
-        if (r >= 0) {
-                _cleanup_address_free_ Address *address = NULL;
-
-                log_debug_link(link, "IPv4 link-local %s %u.%u.%u.%u",
-                               deprecate ? "deprecate" : "approve",
-                               ADDRESS_FMT_VAL(addr));
-
-                r = address_new_dynamic(&address);
-                if (r < 0) {
-                        log_error_link(link, "Could not allocate address: %s", strerror(-r));
-                        return r;
-                }
-
-                address->family = AF_INET;
-                address->in_addr.in = addr;
-                address->prefixlen = 16;
-                address->scope = RT_SCOPE_LINK;
-                address->cinfo.ifa_prefered = deprecate ? 0 : CACHE_INFO_INFINITY_LIFE_TIME;
-                address->broadcast.s_addr = address->in_addr.in.s_addr | htonl(0xfffffffflu >> address->prefixlen);
-
-                address_update(address, link, &address_update_handler);
-        }
-
-        return 0;
-
-}
-
-static int ipv4ll_address_lost(Link *link) {
-        int r;
-        struct in_addr addr;
-
-        assert(link);
-
-        r = sd_ipv4ll_get_address(link->ipv4ll, &addr);
-        if (r >= 0) {
-                _cleanup_address_free_ Address *address = NULL;
-                _cleanup_route_free_ Route *route = NULL;
-
-                log_debug_link(link, "IPv4 link-local release %u.%u.%u.%u",
-                                ADDRESS_FMT_VAL(addr));
-
-                r = address_new_dynamic(&address);
-                if (r < 0) {
-                        log_error_link(link, "Could not allocate address: %s", strerror(-r));
-                        return r;
-                }
-
-                address->family = AF_INET;
-                address->in_addr.in = addr;
-                address->prefixlen = 16;
-                address->scope = RT_SCOPE_LINK;
-
-                address_drop(address, link, &address_drop_handler);
-
-                r = route_new_dynamic(&route);
-                if (r < 0) {
-                        log_error_link(link, "Could not allocate route: %s",
-                                       strerror(-r));
-                        return r;
-                }
-
-                route->family = AF_INET;
-                route->scope = RT_SCOPE_LINK;
-                route->metrics = 99;
-
-                route_drop(route, link, &route_drop_handler);
-        }
-
-        return 0;
-}
-
-static bool ipv4ll_is_bound(sd_ipv4ll *ll) {
-        int r;
-        struct in_addr addr;
-
-        assert(ll);
-
-        r = sd_ipv4ll_get_address(ll, &addr);
-        if (r < 0)
-                return false;
-        return true;
-}
-
-static int ipv4ll_address_claimed(sd_ipv4ll *ll, Link *link) {
-        struct in_addr address;
-        int r;
-
-        assert(ll);
-        assert(link);
-
-        r = sd_ipv4ll_get_address(ll, &address);
-        if (r < 0)
-                return r;
-
-        log_struct_link(LOG_INFO, link,
-                        "MESSAGE=%-*s: IPv4 link-local address %u.%u.%u.%u",
-                        IFNAMSIZ,
-                        link->ifname,
-                        ADDRESS_FMT_VAL(address),
-                        NULL);
-
-       link_enter_set_addresses(link);
-
-       return 0;
-}
-
-static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata){
-        Link *link = userdata;
-        int r;
-
-        assert(link);
-        assert(link->network);
-        assert(link->manager);
-
-        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
-                return;
-
-        switch(event) {
-                case IPV4LL_EVENT_STOP:
-                case IPV4LL_EVENT_CONFLICT:
-                        r = ipv4ll_address_lost(link);
-                        if (r < 0) {
-                                link_enter_failed(link);
-                                return;
-                        }
-                        break;
-                case IPV4LL_EVENT_BIND:
-                        r = ipv4ll_address_claimed(ll, link);
-                        if (r < 0) {
-                                link_enter_failed(link);
-                                return;
-                        }
-                        break;
-                default:
-                        if (event < 0)
-                                log_warning_link(link, "IPv4 link-local error: %s", strerror(-event));
-                        else
-                                log_warning_link(link, "IPv4 link-local unknown event: %d", event);
-                        break;
-        }
-}
-
 static void dhcp6_handler(sd_dhcp6_client *client, int event, void *userdata) {
         Link *link = userdata;
 
@@ -1450,7 +900,9 @@ static void icmp6_router_handler(sd_icmp6_nd *nd, int event, void *userdata) {
                 return;
         }
 
-        r = sd_dhcp6_client_set_mac(link->dhcp6_client, &link->mac);
+        r = sd_dhcp6_client_set_mac(link->dhcp6_client,
+                                    (const uint8_t *) &link->mac,
+                                    sizeof (link->mac), ARPHRD_ETHER);
         if (r < 0) {
                 link->dhcp6_client = sd_dhcp6_client_unref(link->dhcp6_client);
                 return;
@@ -1480,162 +932,43 @@ static int link_acquire_conf(Link *link) {
         assert(link);
         assert(link->network);
         assert(link->manager);
-        assert(link->manager->event);
-
-        if (link->network->ipv4ll) {
-                assert(link->ipv4ll);
-
-                log_debug_link(link, "acquiring IPv4 link-local address");
-
-                r = sd_ipv4ll_start(link->ipv4ll);
-                if (r < 0) {
-                        log_warning_link(link, "could not acquire IPv4 "
-                                         "link-local address");
-                        return r;
-                }
-        }
-
-        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V4)) {
-                assert(link->dhcp_client);
-
-                log_debug_link(link, "acquiring DHCPv4 lease");
-
-                r = sd_dhcp_client_start(link->dhcp_client);
-                if (r < 0) {
-                        log_warning_link(link, "could not acquire DHCPv4 "
-                                         "lease");
-                        return r;
-                }
-        }
-
-        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V6)) {
-                assert(link->icmp6_router_discovery);
-
-                log_debug_link(link, "discovering IPv6 routers");
-
-                r = sd_icmp6_router_solicitation_start(link->icmp6_router_discovery);
-                if (r < 0) {
-                        log_warning_link(link, "could not start IPv6 router discovery");
-                        return r;
-                }
-        }
-
-        return 0;
-}
-
-bool link_has_carrier(unsigned flags, uint8_t operstate) {
-        /* see Documentation/networking/operstates.txt in the kernel sources */
-
-        if (operstate == IF_OPER_UP)
-                return true;
-
-        if (operstate == IF_OPER_UNKNOWN)
-                /* operstate may not be implemented, so fall back to flags */
-                if ((flags & IFF_LOWER_UP) && !(flags & IFF_DORMANT))
-                        return true;
-
-        return false;
-}
-
-#define FLAG_STRING(string, flag, old, new) \
-        (((old ^ new) & flag) \
-                ? ((old & flag) ? (" -" string) : (" +" string)) \
-                : "")
-
-static int link_update_flags(Link *link, sd_rtnl_message *m) {
-        unsigned flags, unknown_flags_added, unknown_flags_removed, unknown_flags;
-        uint8_t operstate;
-        bool carrier_gained = false, carrier_lost = false;
-        int r;
-
-        assert(link);
-
-        r = sd_rtnl_message_link_get_flags(m, &flags);
-        if (r < 0) {
-                log_warning_link(link, "Could not get link flags");
-                return r;
-        }
-
-        r = sd_rtnl_message_read_u8(m, IFLA_OPERSTATE, &operstate);
-        if (r < 0)
-                /* if we got a message without operstate, take it to mean
-                   the state was unchanged */
-                operstate = link->kernel_operstate;
-
-        if ((link->flags == flags) && (link->kernel_operstate == operstate))
-                return 0;
-
-        if (link->flags != flags) {
-                log_debug_link(link, "flags change:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
-                               FLAG_STRING("LOOPBACK", IFF_LOOPBACK, link->flags, flags),
-                               FLAG_STRING("MASTER", IFF_MASTER, link->flags, flags),
-                               FLAG_STRING("SLAVE", IFF_SLAVE, link->flags, flags),
-                               FLAG_STRING("UP", IFF_UP, link->flags, flags),
-                               FLAG_STRING("DORMANT", IFF_DORMANT, link->flags, flags),
-                               FLAG_STRING("LOWER_UP", IFF_LOWER_UP, link->flags, flags),
-                               FLAG_STRING("RUNNING", IFF_RUNNING, link->flags, flags),
-                               FLAG_STRING("MULTICAST", IFF_MULTICAST, link->flags, flags),
-                               FLAG_STRING("BROADCAST", IFF_BROADCAST, link->flags, flags),
-                               FLAG_STRING("POINTOPOINT", IFF_POINTOPOINT, link->flags, flags),
-                               FLAG_STRING("PROMISC", IFF_PROMISC, link->flags, flags),
-                               FLAG_STRING("ALLMULTI", IFF_ALLMULTI, link->flags, flags),
-                               FLAG_STRING("PORTSEL", IFF_PORTSEL, link->flags, flags),
-                               FLAG_STRING("AUTOMEDIA", IFF_AUTOMEDIA, link->flags, flags),
-                               FLAG_STRING("DYNAMIC", IFF_DYNAMIC, link->flags, flags),
-                               FLAG_STRING("NOARP", IFF_NOARP, link->flags, flags),
-                               FLAG_STRING("NOTRAILERS", IFF_NOTRAILERS, link->flags, flags),
-                               FLAG_STRING("DEBUG", IFF_DEBUG, link->flags, flags),
-                               FLAG_STRING("ECHO", IFF_ECHO, link->flags, flags));
-
-                unknown_flags = ~(IFF_LOOPBACK | IFF_MASTER | IFF_SLAVE | IFF_UP |
-                                  IFF_DORMANT | IFF_LOWER_UP | IFF_RUNNING |
-                                  IFF_MULTICAST | IFF_BROADCAST | IFF_POINTOPOINT |
-                                  IFF_PROMISC | IFF_ALLMULTI | IFF_PORTSEL |
-                                  IFF_AUTOMEDIA | IFF_DYNAMIC | IFF_NOARP |
-                                  IFF_NOTRAILERS | IFF_DEBUG | IFF_ECHO);
-                unknown_flags_added = ((link->flags ^ flags) & flags & unknown_flags);
-                unknown_flags_removed = ((link->flags ^ flags) & link->flags & unknown_flags);
-
-                /* link flags are currently at most 18 bits, let's align to printing 20 */
-                if (unknown_flags_added)
-                        log_debug_link(link, "unknown link flags gained: %#.5x (ignoring)",
-                                       unknown_flags_added);
-
-                if (unknown_flags_removed)
-                        log_debug_link(link, "unknown link flags lost: %#.5x (ignoring)",
-                                       unknown_flags_removed);
-        }
+        assert(link->manager->event);
 
-        carrier_gained = !link_has_carrier(link->flags, link->kernel_operstate) &&
-                       link_has_carrier(flags, operstate);
-        carrier_lost = link_has_carrier(link->flags, link->kernel_operstate) &&
-                         !link_has_carrier(flags, operstate);
+        if (link_ipv4ll_enabled(link)) {
+                assert(link->ipv4ll);
 
-        link->flags = flags;
-        link->kernel_operstate = operstate;
+                log_debug_link(link, "acquiring IPv4 link-local address");
 
-        link_save(link);
+                r = sd_ipv4ll_start(link->ipv4ll);
+                if (r < 0) {
+                        log_warning_link(link, "could not acquire IPv4 "
+                                         "link-local address");
+                        return r;
+                }
+        }
 
-        if (link->state == LINK_STATE_FAILED ||
-            link->state == LINK_STATE_UNMANAGED)
-                return 0;
+        if (link_dhcp4_enabled(link)) {
+                assert(link->dhcp_client);
 
-        if (carrier_gained) {
-                log_info_link(link, "gained carrier");
+                log_debug_link(link, "acquiring DHCPv4 lease");
 
-                if (link->network) {
-                        r = link_acquire_conf(link);
-                        if (r < 0) {
-                                link_enter_failed(link);
-                                return r;
-                        }
+                r = sd_dhcp_client_start(link->dhcp_client);
+                if (r < 0) {
+                        log_warning_link(link, "could not acquire DHCPv4 "
+                                         "lease");
+                        return r;
                 }
-        } else if (carrier_lost) {
-                log_info_link(link, "lost carrier");
+        }
 
-                r = link_stop_clients(link);
+        if (link_dhcp6_enabled(link)) {
+                assert(link->icmp6_router_discovery);
+
+                log_debug_link(link, "discovering IPv6 routers");
+
+                r = sd_icmp6_router_solicitation_start(link->icmp6_router_discovery);
                 if (r < 0) {
-                        link_enter_failed(link);
+                        log_warning_link(link,
+                                         "could not start IPv6 router discovery");
                         return r;
                 }
         }
@@ -1643,6 +976,20 @@ static int link_update_flags(Link *link, sd_rtnl_message *m) {
         return 0;
 }
 
+bool link_has_carrier(Link *link) {
+        /* see Documentation/networking/operstates.txt in the kernel sources */
+
+        if (link->kernel_operstate == IF_OPER_UP)
+                return true;
+
+        if (link->kernel_operstate == IF_OPER_UNKNOWN)
+                /* operstate may not be implemented, so fall back to flags */
+                if ((link->flags & IFF_LOWER_UP) && !(link->flags & IFF_DORMANT))
+                        return true;
+
+        return false;
+}
+
 static int link_up_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
         _cleanup_link_unref_ Link *link = userdata;
         int r;
@@ -1686,14 +1033,17 @@ static int link_up(Link *link) {
 
         r = sd_rtnl_message_link_set_flags(req, IFF_UP, IFF_UP);
         if (r < 0) {
-                log_error_link(link, "Could not set link flags: %s", strerror(-r));
+                log_error_link(link, "Could not set link flags: %s",
+                               strerror(-r));
                 return r;
         }
 
-        r = sd_rtnl_call_async(link->manager->rtnl, req, link_up_handler, link, 0, NULL);
+        r = sd_rtnl_call_async(link->manager->rtnl, req, link_up_handler, link,
+                               0, NULL);
         if (r < 0) {
                 log_error_link(link,
-                               "Could not send rtnetlink message: %s", strerror(-r));
+                               "Could not send rtnetlink message: %s",
+                               strerror(-r));
                 return r;
         }
 
@@ -1702,15 +1052,12 @@ static int link_up(Link *link) {
         return 0;
 }
 
-static int link_enslaved(Link *link) {
+static int link_joined(Link *link) {
         int r;
 
         assert(link);
-        assert(link->state == LINK_STATE_ENSLAVING);
         assert(link->network);
 
-        log_debug_link(link, "enslaved");
-
         if (!(link->flags & IFF_UP)) {
                 r = link_up(link);
                 if (r < 0) {
@@ -1722,13 +1069,12 @@ static int link_enslaved(Link *link) {
         return link_enter_set_addresses(link);
 }
 
-static int enslave_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+static int netdev_join_handler(sd_rtnl *rtnl, sd_rtnl_message *m,
+                               void *userdata) {
         _cleanup_link_unref_ Link *link = userdata;
         int r;
 
         assert(link);
-        assert(IN_SET(link->state, LINK_STATE_ENSLAVING, LINK_STATE_FAILED,
-                      LINK_STATE_LINGER));
         assert(link->network);
 
         link->enslaving --;
@@ -1739,29 +1085,30 @@ static int enslave_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
         r = sd_rtnl_message_get_errno(m);
         if (r < 0 && r != -EEXIST) {
                 log_struct_link(LOG_ERR, link,
-                                "MESSAGE=%-*s: could not enslave: %s",
+                                "MESSAGE=%-*s: could not join netdev: %s",
                                 IFNAMSIZ,
                                 link->ifname, strerror(-r),
                                 "ERRNO=%d", -r,
                                 NULL);
                 link_enter_failed(link);
                 return 1;
-        }
+        } else
+                log_debug_link(link, "joined netdev");
 
         if (link->enslaving <= 0)
-                link_enslaved(link);
+                link_joined(link);
 
         return 1;
 }
 
-static int link_enter_enslave(Link *link) {
-        NetDev *vlan, *macvlan, *vxlan;
+static int link_enter_join_netdev(Link *link) {
+        NetDev *netdev;
         Iterator i;
         int r;
 
         assert(link);
         assert(link->network);
-        assert(link->state == LINK_STATE_INITIALIZING);
+        assert(link->state == LINK_STATE_PENDING);
 
         link->state = LINK_STATE_ENSLAVING;
 
@@ -1769,27 +1116,25 @@ static int link_enter_enslave(Link *link) {
 
         if (!link->network->bridge &&
             !link->network->bond &&
-            !link->network->tunnel &&
-            hashmap_isempty(link->network->vlans) &&
-            hashmap_isempty(link->network->macvlans) &&
-            hashmap_isempty(link->network->vxlans))
-                return link_enslaved(link);
+            hashmap_isempty(link->network->stacked_netdevs))
+                return link_joined(link);
 
         if (link->network->bond) {
                 log_struct_link(LOG_DEBUG, link,
                                 "MESSAGE=%-*s: enslaving by '%s'",
                                 IFNAMSIZ,
                                 link->ifname, link->network->bond->ifname,
-                                NETDEV(link->network->bond),
+                                NETDEVIF(link->network->bond),
                                 NULL);
 
-                r = netdev_enslave(link->network->bond, link, &enslave_handler);
+                r = netdev_join(link->network->bond, link, &netdev_join_handler);
                 if (r < 0) {
                         log_struct_link(LOG_WARNING, link,
-                                        "MESSAGE=%-*s: could not enslave by '%s': %s",
+                                        "MESSAGE=%-*s: could not join netdev '%s': %s",
                                         IFNAMSIZ,
-                                        link->ifname, link->network->bond->ifname, strerror(-r),
-                                        NETDEV(link->network->bond),
+                                        link->ifname, link->network->bond->ifname,
+                                        strerror(-r),
+                                        NETDEVIF(link->network->bond),
                                         NULL);
                         link_enter_failed(link);
                         return r;
@@ -1803,16 +1148,18 @@ static int link_enter_enslave(Link *link) {
                                 "MESSAGE=%-*s: enslaving by '%s'",
                                 IFNAMSIZ,
                                 link->ifname, link->network->bridge->ifname,
-                                NETDEV(link->network->bridge),
+                                NETDEVIF(link->network->bridge),
                                 NULL);
 
-                r = netdev_enslave(link->network->bridge, link, &enslave_handler);
+                r = netdev_join(link->network->bridge, link,
+                                &netdev_join_handler);
                 if (r < 0) {
                         log_struct_link(LOG_WARNING, link,
-                                        "MESSAGE=%-*s: could not enslave by '%s': %s",
+                                        "MESSAGE=%-*s: could not join netdev '%s': %s",
                                         IFNAMSIZ,
-                                        link->ifname, link->network->bridge->ifname, strerror(-r),
-                                        NETDEV(link->network->bridge),
+                                        link->ifname, link->network->bridge->ifname,
+                                        strerror(-r),
+                                        NETDEVIF(link->network->bridge),
                                         NULL);
                         link_enter_failed(link);
                         return r;
@@ -1821,82 +1168,21 @@ static int link_enter_enslave(Link *link) {
                 link->enslaving ++;
         }
 
-        if (link->network->tunnel) {
+        HASHMAP_FOREACH(netdev, link->network->stacked_netdevs, i) {
                 log_struct_link(LOG_DEBUG, link,
                                 "MESSAGE=%-*s: enslaving by '%s'",
                                 IFNAMSIZ,
-                                link->ifname, link->network->tunnel->ifname,
-                                NETDEV(link->network->tunnel),
+                                link->ifname, netdev->ifname, NETDEVIF(netdev),
                                 NULL);
 
-                r = netdev_enslave(link->network->tunnel, link, &enslave_handler);
-                if (r < 0) {
-                        log_struct_link(LOG_WARNING, link,
-                                        "MESSAGE=%-*s: could not enslave by '%s': %s",
-                                        IFNAMSIZ,
-                                        link->ifname, link->network->tunnel->ifname, strerror(-r),
-                                        NETDEV(link->network->tunnel),
-                                        NULL);
-                        link_enter_failed(link);
-                        return r;
-                }
-
-                link->enslaving ++;
-        }
-
-        HASHMAP_FOREACH(vlan, link->network->vlans, i) {
-                log_struct_link(LOG_DEBUG, link,
-                                "MESSAGE=%-*s: enslaving by '%s'",
-                                IFNAMSIZ,
-                                link->ifname, vlan->ifname, NETDEV(vlan), NULL);
-
-                r = netdev_enslave(vlan, link, &enslave_handler);
-                if (r < 0) {
-                        log_struct_link(LOG_WARNING, link,
-                                        "MESSAGE=%-*s: could not enslave by '%s': %s",
-                                        IFNAMSIZ,
-                                        link->ifname, vlan->ifname, strerror(-r),
-                                        NETDEV(vlan), NULL);
-                        link_enter_failed(link);
-                        return r;
-                }
-
-                link->enslaving ++;
-        }
-
-        HASHMAP_FOREACH(macvlan, link->network->macvlans, i) {
-                log_struct_link(LOG_DEBUG, link,
-                                "MESSAGE=%-*s: enslaving by '%s'",
-                                IFNAMSIZ,
-                                link->ifname, macvlan->ifname, NETDEV(macvlan), NULL);
-
-                r = netdev_enslave(macvlan, link, &enslave_handler);
-                if (r < 0) {
-                        log_struct_link(LOG_WARNING, link,
-                                        "MESSAGE=%-*s: could not enslave by '%s': %s",
-                                        IFNAMSIZ,
-                                        link->ifname, macvlan->ifname, strerror(-r),
-                                        NETDEV(macvlan), NULL);
-                        link_enter_failed(link);
-                        return r;
-                }
-
-                link->enslaving ++;
-        }
-
-        HASHMAP_FOREACH(vxlan, link->network->vxlans, i) {
-                log_struct_link(LOG_DEBUG, link,
-                                "MESSAGE=%*s: enslaving by '%s'",
-                                IFNAMSIZ,
-                                link->ifname, vxlan->ifname, NETDEV(vxlan), NULL);
-
-                r = netdev_enslave(vxlan, link, &enslave_handler);
+                r = netdev_join(netdev, link, &netdev_join_handler);
                 if (r < 0) {
                         log_struct_link(LOG_WARNING, link,
-                                        "MESSAGE=%*s: could not enslave by '%s': %s",
+                                        "MESSAGE=%-*s: could not join netdev '%s': %s",
                                         IFNAMSIZ,
-                                        link->ifname, vxlan->ifname, strerror(-r),
-                                        NETDEV(vxlan), NULL);
+                                        link->ifname, netdev->ifname,
+                                        strerror(-r),
+                                        NETDEVIF(netdev), NULL);
                         link_enter_failed(link);
                         return r;
                 }
@@ -1911,91 +1197,22 @@ static int link_configure(Link *link) {
         int r;
 
         assert(link);
-        assert(link->state == LINK_STATE_INITIALIZING);
-
-        if (link->network->ipv4ll) {
-                uint8_t seed[8];
-
-                r = sd_ipv4ll_new(&link->ipv4ll);
-                if (r < 0)
-                        return r;
-
-                if (link->udev_device) {
-                        r = net_get_unique_predictable_data(link->udev_device, seed);
-                        if (r >= 0) {
-                                r = sd_ipv4ll_set_address_seed(link->ipv4ll, seed);
-                                if (r < 0)
-                                        return r;
-                        }
-                }
-
-                r = sd_ipv4ll_attach_event(link->ipv4ll, NULL, 0);
-                if (r < 0)
-                        return r;
-
-                r = sd_ipv4ll_set_mac(link->ipv4ll, &link->mac);
-                if (r < 0)
-                        return r;
-
-                r = sd_ipv4ll_set_index(link->ipv4ll, link->ifindex);
-                if (r < 0)
-                        return r;
+        assert(link->network);
+        assert(link->state == LINK_STATE_PENDING);
 
-                r = sd_ipv4ll_set_callback(link->ipv4ll, ipv4ll_handler, link);
+        if (link_ipv4ll_enabled(link)) {
+                r = ipv4ll_configure(link);
                 if (r < 0)
                         return r;
         }
 
-        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V4)) {
-                r = sd_dhcp_client_new(&link->dhcp_client);
-                if (r < 0)
-                        return r;
-
-                r = sd_dhcp_client_attach_event(link->dhcp_client, NULL, 0);
-                if (r < 0)
-                        return r;
-
-                r = sd_dhcp_client_set_mac(link->dhcp_client, &link->mac);
-                if (r < 0)
-                        return r;
-
-                r = sd_dhcp_client_set_index(link->dhcp_client, link->ifindex);
+        if (link_dhcp4_enabled(link)) {
+                r = dhcp4_configure(link);
                 if (r < 0)
                         return r;
-
-                r = sd_dhcp_client_set_callback(link->dhcp_client, dhcp_handler, link);
-                if (r < 0)
-                        return r;
-
-                if (link->network->dhcp_mtu) {
-                        r = sd_dhcp_client_set_request_option(link->dhcp_client, 26);
-                        if (r < 0)
-                                return r;
-                }
-
-                if (link->network->dhcp_routes) {
-                        r = sd_dhcp_client_set_request_option(link->dhcp_client, DHCP_OPTION_STATIC_ROUTE);
-                        if (r < 0)
-                                return r;
-                        r = sd_dhcp_client_set_request_option(link->dhcp_client, DHCP_OPTION_CLASSLESS_STATIC_ROUTE);
-                        if (r < 0)
-                                return r;
-                }
-
-                if (link->network->dhcp_sendhost) {
-                        _cleanup_free_ char *hostname = gethostname_malloc();
-                        if (!hostname)
-                                return -ENOMEM;
-
-                        if (!is_localhost(hostname)) {
-                                r = sd_dhcp_client_set_hostname(link->dhcp_client, hostname);
-                                if (r < 0)
-                                        return r;
-                        }
-                }
         }
 
-        if (link->network->dhcp_server) {
+        if (link_dhcp4_server_enabled(link)) {
                 r = sd_dhcp_server_new(&link->dhcp_server, link->ifindex);
                 if (r < 0)
                         return r;
@@ -2005,7 +1222,7 @@ static int link_configure(Link *link) {
                         return r;
         }
 
-        if (IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V6)) {
+        if (link_dhcp6_enabled(link)) {
                 r = sd_icmp6_nd_new(&link->icmp6_router_discovery);
                 if (r < 0)
                         return r;
@@ -2031,16 +1248,17 @@ static int link_configure(Link *link) {
                         return r;
         }
 
-        if (link_has_carrier(link->flags, link->kernel_operstate)) {
+        if (link_has_carrier(link)) {
                 r = link_acquire_conf(link);
                 if (r < 0)
                         return r;
         }
 
-        return link_enter_enslave(link);
+        return link_enter_join_netdev(link);
 }
 
-static int link_initialized_and_synced(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
+static int link_initialized_and_synced(sd_rtnl *rtnl, sd_rtnl_message *m,
+                                       void *userdata) {
         _cleanup_link_unref_ Link *link = userdata;
         Network *network;
         int r;
@@ -2049,18 +1267,30 @@ static int link_initialized_and_synced(sd_rtnl *rtnl, sd_rtnl_message *m, void *
         assert(link->ifname);
         assert(link->manager);
 
-        if (link->state != LINK_STATE_INITIALIZING)
+        if (link->state != LINK_STATE_PENDING)
                 return 1;
 
         log_debug_link(link, "link state is up-to-date");
 
-        r = network_get(link->manager, link->udev_device, link->ifname, &link->mac, &network);
+        r = network_get(link->manager, link->udev_device, link->ifname,
+                        &link->mac, &network);
         if (r == -ENOENT) {
                 link_enter_unmanaged(link);
                 return 1;
         } else if (r < 0)
                 return r;
 
+        if (link->flags & IFF_LOOPBACK) {
+                if (network->ipv4ll)
+                        log_debug_link(link, "ignoring IPv4LL for loopback link");
+
+                if (network->dhcp != DHCP_SUPPORT_NONE)
+                        log_debug_link(link, "ignoring DHCP clients for loopback link");
+
+                if (network->dhcp_server)
+                        log_debug_link(link, "ignoring DHCP server for loopback link");
+        }
+
         r = network_apply(link->manager, network, link);
         if (r < 0)
                 return r;
@@ -2081,23 +1311,28 @@ int link_initialized(Link *link, struct udev_device *device) {
         assert(link->manager->rtnl);
         assert(device);
 
-        if (link->state != LINK_STATE_INITIALIZING)
+        if (link->state != LINK_STATE_PENDING)
+                return 0;
+
+        if (link->udev_device)
                 return 0;
 
         log_debug_link(link, "udev initialized link");
 
         link->udev_device = udev_device_ref(device);
 
-        /* udev has initialized the link, but we don't know if we have yet processed
-           the NEWLINK messages with the latest state. Do a GETLINK, when it returns
-           we know that the pending NEWLINKs have already been processed and that we
-           are up-to-date */
+        /* udev has initialized the link, but we don't know if we have yet
+         * processed the NEWLINK messages with the latest state. Do a GETLINK,
+         * when it returns we know that the pending NEWLINKs have already been
+         * processed and that we are up-to-date */
 
-        r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_GETLINK, link->ifindex);
+        r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_GETLINK,
+                                     link->ifindex);
         if (r < 0)
                 return r;
 
-        r = sd_rtnl_call_async(link->manager->rtnl, req, link_initialized_and_synced, link, 0, NULL);
+        r = sd_rtnl_call_async(link->manager->rtnl, req,
+                               link_initialized_and_synced, link, 0, NULL);
         if (r < 0)
                 return r;
 
@@ -2106,13 +1341,16 @@ int link_initialized(Link *link, struct udev_device *device) {
         return 0;
 }
 
-int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *userdata) {
+int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message,
+                              void *userdata) {
         Manager *m = userdata;
         Link *link = NULL;
         uint16_t type;
         _cleanup_address_free_ Address *address = NULL;
         Address *ad;
         char buf[INET6_ADDRSTRLEN];
+        char valid_buf[FORMAT_TIMESPAN_MAX];
+        const char *valid_str = NULL;
         bool address_dropped = false;
         int r, ifindex;
 
@@ -2133,47 +1371,61 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
         } else {
                 r = link_get(m, ifindex, &link);
                 if (r < 0 || !link) {
-                        log_warning("rtnl: received address for a nonexistent link, ignoring");
+                        log_warning("rtnl: received address for a nonexistent link (%d), ignoring", ifindex);
                         return 0;
                 }
         }
 
         r = address_new_dynamic(&address);
         if (r < 0)
-                return 0;
+                return r;
 
         r = sd_rtnl_message_addr_get_family(message, &address->family);
         if (r < 0 || !IN_SET(address->family, AF_INET, AF_INET6)) {
-                log_warning_link(link, "rtnl: received address with invalid family, ignoring");
+                log_warning_link(link,
+                                 "rtnl: received address with invalid family, ignoring");
                 return 0;
         }
 
         r = sd_rtnl_message_addr_get_prefixlen(message, &address->prefixlen);
         if (r < 0) {
-                log_warning_link(link, "rtnl: received address with invalid prefixlen, ignoring");
+                log_warning_link(link,
+                                 "rtnl: received address with invalid prefixlen, ignoring");
                 return 0;
         }
 
         r = sd_rtnl_message_addr_get_scope(message, &address->scope);
         if (r < 0) {
-                log_warning_link(link, "rtnl: received address with invalid scope, ignoring");
+                log_warning_link(link,
+                                 "rtnl: received address with invalid scope, ignoring");
+                return 0;
+        }
+
+        r = sd_rtnl_message_addr_get_flags(message, &address->flags);
+        if (r < 0) {
+                log_warning_link(link,
+                                 "rtnl: received address with invalid flags, ignoring");
                 return 0;
         }
 
         switch (address->family) {
         case AF_INET:
-                r = sd_rtnl_message_read_in_addr(message, IFA_LOCAL, &address->in_addr.in);
+                r = sd_rtnl_message_read_in_addr(message, IFA_LOCAL,
+                                                 &address->in_addr.in);
                 if (r < 0) {
-                        log_warning_link(link, "rtnl: received address without valid address, ignoring");
+                        log_warning_link(link,
+                                         "rtnl: received address without valid address, ignoring");
                         return 0;
                 }
 
                 break;
 
         case AF_INET6:
-                r = sd_rtnl_message_read_in6_addr(message, IFA_ADDRESS, &address->in_addr.in6);
+                r = sd_rtnl_message_read_in6_addr(message, IFA_ADDRESS,
+                                                  &address->in_addr.in6);
                 if (r < 0) {
-                        log_warning_link(link, "rtnl: received address without valid address, ignoring");
+                        log_warning_link(link,
+                                         "rtnl: received address without valid address, ignoring");
                         return 0;
                 }
 
@@ -2183,11 +1435,23 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
                 assert_not_reached("invalid address family");
         }
 
-        if (!inet_ntop(address->family, &address->in_addr, buf, INET6_ADDRSTRLEN)) {
+        if (!inet_ntop(address->family, &address->in_addr, buf,
+                       INET6_ADDRSTRLEN)) {
                 log_warning_link(link, "could not print address");
                 return 0;
         }
 
+        r = sd_rtnl_message_read_cache_info(message, IFA_CACHEINFO,
+                                            &address->cinfo);
+        if (r >= 0) {
+                if (address->cinfo.ifa_valid == CACHE_INFO_INFINITY_LIFE_TIME)
+                        valid_str = "ever";
+                else
+                        valid_str = format_timespan(valid_buf, FORMAT_TIMESPAN_MAX,
+                                                    address->cinfo.ifa_valid * USEC_PER_SEC,
+                                                    USEC_PER_SEC);
+        }
+
         LIST_FOREACH(addresses, ad, link->addresses) {
                 if (address_equal(ad, address)) {
                         LIST_REMOVE(addresses, link->addresses, ad);
@@ -2203,8 +1467,11 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
         switch (type) {
         case RTM_NEWADDR:
                 if (!address_dropped)
-                        log_debug_link(link, "added address: %s/%u", buf,
-                                      address->prefixlen);
+                        log_debug_link(link, "added address: %s/%u (valid for %s)",
+                                       buf, address->prefixlen, valid_str);
+                else
+                        log_debug_link(link, "updated address: %s/%u (valid for %s)",
+                                       buf, address->prefixlen, valid_str);
 
                 LIST_PREPEND(addresses, link->addresses, address);
                 address = NULL;
@@ -2214,11 +1481,14 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
                 break;
         case RTM_DELADDR:
                 if (address_dropped) {
-                        log_debug_link(link, "removed address: %s/%u", buf,
-                                      address->prefixlen);
+                        log_debug_link(link, "removed address: %s/%u (valid for %s)",
+                                       buf, address->prefixlen, valid_str);
 
                         link_save(link);
-                }
+                } else
+                        log_warning_link(link,
+                                         "removing non-existent address: %s/%u (valid for %s)",
+                                         buf, address->prefixlen, valid_str);
 
                 break;
         default:
@@ -2228,30 +1498,6 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
         return 1;
 }
 
-static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
-        _cleanup_link_unref_ Link *link = userdata;
-        int r;
-
-        assert(rtnl);
-        assert(m);
-        assert(link);
-        assert(link->manager);
-
-        for (; m; m = sd_rtnl_message_next(m)) {
-                r = sd_rtnl_message_get_errno(m);
-                if (r < 0) {
-                        log_debug_link(link, "getting address failed: %s", strerror(-r));
-                        continue;
-                }
-
-                r = link_rtnl_process_address(rtnl, m, link->manager);
-                if (r < 0)
-                        log_warning_link(link, "could not process address: %s", strerror(-r));
-        }
-
-        return 1;
-}
-
 int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
         Link *link;
         _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
@@ -2270,13 +1516,15 @@ int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
 
         link = *ret;
 
-        log_debug_link(link, "link %"PRIu64" added", link->ifindex);
+        log_debug_link(link, "link %d added", link->ifindex);
 
-        r = sd_rtnl_message_new_addr(m->rtnl, &req, RTM_GETADDR, link->ifindex, 0);
+        r = sd_rtnl_message_new_addr(m->rtnl, &req, RTM_GETADDR, link->ifindex,
+                                     0);
         if (r < 0)
                 return r;
 
-        r = sd_rtnl_call_async(m->rtnl, req, link_get_address_handler, link, 0, NULL);
+        r = sd_rtnl_call_async(m->rtnl, req, link_get_address_handler, link, 0,
+                               NULL);
         if (r < 0)
                 return r;
 
@@ -2284,16 +1532,17 @@ int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
 
         if (detect_container(NULL) <= 0) {
                 /* not in a container, udev will be around */
-                sprintf(ifindex_str, "n%"PRIu64, link->ifindex);
+                sprintf(ifindex_str, "n%d", link->ifindex);
                 device = udev_device_new_from_device_id(m->udev, ifindex_str);
                 if (!device) {
-                        log_warning_link(link, "could not find udev device");
+                        log_warning_link(link,
+                                         "could not find udev device: %m");
                         return -errno;
                 }
 
                 if (udev_device_get_is_initialized(device) <= 0) {
                         /* not yet ready */
-                        log_debug_link(link, "udev initializing link...");
+                        log_debug_link(link, "link pending udev initialization...");
                         return 0;
                 }
 
@@ -2314,7 +1563,9 @@ int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
 
 int link_update(Link *link, sd_rtnl_message *m) {
         struct ether_addr mac;
-        char *ifname;
+        const char *ifname;
+        uint32_t mtu;
+        bool had_carrier, carrier_gained, carrier_lost;
         int r;
 
         assert(link);
@@ -2337,20 +1588,36 @@ int link_update(Link *link, sd_rtnl_message *m) {
                         return -ENOMEM;
         }
 
-        if (!link->original_mtu) {
-                r = sd_rtnl_message_read_u16(m, IFLA_MTU, &link->original_mtu);
-                if (r >= 0)
+        r = sd_rtnl_message_read_u32(m, IFLA_MTU, &mtu);
+        if (r >= 0 && mtu > 0) {
+                link->mtu = mtu;
+                if (!link->original_mtu) {
+                        link->original_mtu = mtu;
                         log_debug_link(link, "saved original MTU: %"
-                                       PRIu16, link->original_mtu);
+                                       PRIu32, link->original_mtu);
+                }
+
+                if (link->dhcp_client) {
+                        r = sd_dhcp_client_set_mtu(link->dhcp_client,
+                                                   link->mtu);
+                        if (r < 0) {
+                                log_warning_link(link,
+                                                 "Could not update MTU in DHCP client: %s",
+                                                 strerror(-r));
+                                return r;
+                        }
+                }
         }
 
         /* The kernel may broadcast NEWLINK messages without the MAC address
            set, simply ignore them. */
         r = sd_rtnl_message_read_ether_addr(m, IFLA_ADDRESS, &mac);
         if (r >= 0) {
-                if (memcmp(link->mac.ether_addr_octet, mac.ether_addr_octet, ETH_ALEN)) {
+                if (memcmp(link->mac.ether_addr_octet, mac.ether_addr_octet,
+                           ETH_ALEN)) {
 
-                        memcpy(link->mac.ether_addr_octet, mac.ether_addr_octet, ETH_ALEN);
+                        memcpy(link->mac.ether_addr_octet, mac.ether_addr_octet,
+                               ETH_ALEN);
 
                         log_debug_link(link, "MAC address: "
                                        "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
@@ -2364,18 +1631,21 @@ int link_update(Link *link, sd_rtnl_message *m) {
                         if (link->ipv4ll) {
                                 r = sd_ipv4ll_set_mac(link->ipv4ll, &link->mac);
                                 if (r < 0) {
-                                        log_warning_link(link, "Could not update MAC "
-                                                         "address in IPv4LL client: %s",
+                                        log_warning_link(link,
+                                                         "Could not update MAC address in IPv4LL client: %s",
                                                          strerror(-r));
                                         return r;
                                 }
                         }
 
                         if (link->dhcp_client) {
-                                r = sd_dhcp_client_set_mac(link->dhcp_client, &link->mac);
+                                r = sd_dhcp_client_set_mac(link->dhcp_client,
+                                                           (const uint8_t *) &link->mac,
+                                                           sizeof (link->mac),
+                                                           ARPHRD_ETHER);
                                 if (r < 0) {
-                                        log_warning_link(link, "Could not update MAC "
-                                                         "address in DHCP client: %s",
+                                        log_warning_link(link,
+                                                         "Could not update MAC address in DHCP client: %s",
                                                          strerror(-r));
                                         return r;
                                 }
@@ -2383,9 +1653,12 @@ int link_update(Link *link, sd_rtnl_message *m) {
 
                         if (link->dhcp6_client) {
                                 r = sd_dhcp6_client_set_mac(link->dhcp6_client,
-                                                            &link->mac);
+                                                            (const uint8_t *) &link->mac,
+                                                            sizeof (link->mac),
+                                                            ARPHRD_ETHER);
                                 if (r < 0) {
-                                        log_warning_link(link, "Could not update MAC address in DHCPv6 client: %s",
+                                        log_warning_link(link,
+                                                         "Could not update MAC address in DHCPv6 client: %s",
                                                          strerror(-r));
                                         return r;
                                 }
@@ -2393,28 +1666,36 @@ int link_update(Link *link, sd_rtnl_message *m) {
                 }
         }
 
-        return link_update_flags(link, m);
-}
-
-static void serialize_addresses(FILE *f, const char *key, Address *address) {
-        Address *ad;
+        had_carrier = link_has_carrier(link);
 
-        assert(f);
-        assert(key);
+        r = link_update_flags(link, m);
+        if (r < 0)
+                return r;
 
-        if (!address)
-                return;
+        carrier_gained = !had_carrier && link_has_carrier(link);
+        carrier_lost = had_carrier && !link_has_carrier(link);
 
-        fprintf(f, "%s=", key);
+        if (carrier_gained) {
+                log_info_link(link, "gained carrier");
 
-        LIST_FOREACH(addresses, ad, address) {
-                char buf[INET6_ADDRSTRLEN];
+                if (link->network) {
+                        r = link_acquire_conf(link);
+                        if (r < 0) {
+                                link_enter_failed(link);
+                                return r;
+                        }
+                }
+        } else if (carrier_lost) {
+                log_info_link(link, "lost carrier");
 
-                if (inet_ntop(ad->family, &ad->in_addr, buf, INET6_ADDRSTRLEN))
-                        fprintf(f, "%s%s", buf, (ad->addresses_next) ? " ": "");
+                r = link_stop_clients(link);
+                if (r < 0) {
+                        link_enter_failed(link);
+                        return r;
+                }
         }
 
-        fputs("\n", f);
+        return 0;
 }
 
 static void link_update_operstate(Link *link) {
@@ -2423,12 +1704,15 @@ static void link_update_operstate(Link *link) {
 
         if (link->kernel_operstate == IF_OPER_DORMANT)
                 link->operstate = LINK_OPERSTATE_DORMANT;
-        else if (link_has_carrier(link->flags, link->kernel_operstate)) {
+        else if (link_has_carrier(link)) {
                 Address *address;
                 uint8_t scope = RT_SCOPE_NOWHERE;
 
                 /* if we have carrier, check what addresses we have */
                 LIST_FOREACH(addresses, address, link->addresses) {
+                        if (address->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED))
+                                continue;
+
                         if (address->scope < scope)
                                 scope = address->scope;
                 }
@@ -2442,8 +1726,10 @@ static void link_update_operstate(Link *link) {
                 else
                         /* no useful addresses found */
                         link->operstate = LINK_OPERSTATE_CARRIER;
-        } else
-                link->operstate = LINK_OPERSTATE_UNKNOWN;
+        } else if (link->flags & IFF_UP)
+                link->operstate = LINK_OPERSTATE_NO_CARRIER;
+        else
+                link->operstate = LINK_OPERSTATE_OFF;
 }
 
 int link_save(Link *link) {
@@ -2476,20 +1762,96 @@ int link_save(Link *link) {
 
         r = fopen_temporary(link->state_file, &f, &temp_path);
         if (r < 0)
-                goto finish;
+                return r;
 
         fchmod(fileno(f), 0644);
 
         fprintf(f,
                 "# This is private data. Do not parse.\n"
                 "ADMIN_STATE=%s\n"
-                "OPER_STATE=%s\n"
-                "FLAGS=%u\n",
-                admin_state, oper_state, link->flags);
+                "OPER_STATE=%s\n",
+                admin_state, oper_state);
 
         if (link->network) {
-                serialize_addresses(f, "DNS", link->network->dns);
-                serialize_addresses(f, "NTP", link->network->ntp);
+                char **address, **domain;
+                bool space;
+
+                fprintf(f, "NETWORK_FILE=%s\n", link->network->filename);
+
+                fputs("DNS=", f);
+                space = false;
+                STRV_FOREACH(address, link->network->dns) {
+                        if (space)
+                                fputc(' ', f);
+                        fputs(*address, f);
+                        space = true;
+                }
+
+                if (link->network->dhcp_dns &&
+                    link->dhcp_lease) {
+                        const struct in_addr *addresses;
+
+                        r = sd_dhcp_lease_get_dns(link->dhcp_lease, &addresses);
+                        if (r > 0) {
+                                if (space)
+                                        fputc(' ', f);
+                                serialize_in_addrs(f, addresses, r);
+                        }
+                }
+
+                fputs("\n", f);
+
+                fprintf(f, "NTP=");
+                space = false;
+                STRV_FOREACH(address, link->network->ntp) {
+                        if (space)
+                                fputc(' ', f);
+                        fputs(*address, f);
+                        space = true;
+                }
+
+                if (link->network->dhcp_ntp &&
+                    link->dhcp_lease) {
+                        const struct in_addr *addresses;
+
+                        r = sd_dhcp_lease_get_ntp(link->dhcp_lease, &addresses);
+                        if (r > 0) {
+                                if (space)
+                                        fputc(' ', f);
+                                serialize_in_addrs(f, addresses, r);
+                        }
+                }
+
+                fputs("\n", f);
+
+                fprintf(f, "DOMAINS=");
+                space = false;
+                STRV_FOREACH(domain, link->network->domains) {
+                        if (space)
+                                fputc(' ', f);
+                        fputs(*domain, f);
+                        space = true;
+                }
+
+                if (link->network->dhcp_domains &&
+                    link->dhcp_lease) {
+                        const char *domainname;
+
+                        r = sd_dhcp_lease_get_domainname(link->dhcp_lease, &domainname);
+                        if (r >= 0) {
+                                if (space)
+                                        fputc(' ', f);
+                                fputs(domainname, f);
+                        }
+                }
+
+                fputs("\n", f);
+
+                fprintf(f, "WILDCARD_DOMAIN=%s\n",
+                        yes_no(link->network->wildcard_domain));
+
+                fprintf(f, "LLMNR=%s\n",
+                        llmnr_support_to_string(link->network->llmnr));
         }
 
         if (link->dhcp_lease) {
@@ -2497,35 +1859,33 @@ int link_save(Link *link) {
 
                 r = dhcp_lease_save(link->dhcp_lease, link->lease_file);
                 if (r < 0)
-                        goto finish;
+                        goto fail;
 
                 fprintf(f,
-                        "DHCP_LEASE=%s\n"
-                        "DHCP_USE_DNS=%s\n"
-                        "DHCP_USE_NTP=%s\n",
-                        link->lease_file,
-                        yes_no(link->network->dhcp_dns),
-                        yes_no(link->network->dhcp_ntp));
+                        "DHCP_LEASE=%s\n",
+                        link->lease_file);
         } else
                 unlink(link->lease_file);
 
-        fflush(f);
+        r = fflush_and_check(f);
+        if (r < 0)
+                goto fail;
 
-        if (ferror(f) || rename(temp_path, link->state_file) < 0) {
+        if (rename(temp_path, link->state_file) < 0) {
                 r = -errno;
-                unlink(link->state_file);
-                unlink(temp_path);
+                goto fail;
         }
 
-finish:
-        if (r < 0)
-                log_error_link(link, "Failed to save link data to %s: %s", link->state_file, strerror(-r));
-
+        return 0;
+fail:
+        log_error_link(link, "Failed to save link data to %s: %s", link->state_file, strerror(-r));
+        unlink(link->state_file);
+        unlink(temp_path);
         return r;
 }
 
 static const char* const link_state_table[_LINK_STATE_MAX] = {
-        [LINK_STATE_INITIALIZING] = "initializing",
+        [LINK_STATE_PENDING] = "pending",
         [LINK_STATE_ENSLAVING] = "configuring",
         [LINK_STATE_SETTING_ADDRESSES] = "configuring",
         [LINK_STATE_SETTING_ROUTES] = "configuring",
@@ -2538,7 +1898,8 @@ static const char* const link_state_table[_LINK_STATE_MAX] = {
 DEFINE_STRING_TABLE_LOOKUP(link_state, LinkState);
 
 static const char* const link_operstate_table[_LINK_OPERSTATE_MAX] = {
-        [LINK_OPERSTATE_UNKNOWN] = "unknown",
+        [LINK_OPERSTATE_OFF] = "off",
+        [LINK_OPERSTATE_NO_CARRIER] = "no-carrier",
         [LINK_OPERSTATE_DORMANT] = "dormant",
         [LINK_OPERSTATE_CARRIER] = "carrier",
         [LINK_OPERSTATE_DEGRADED] = "degraded",
@@ -2546,55 +1907,3 @@ static const char* const link_operstate_table[_LINK_OPERSTATE_MAX] = {
 };
 
 DEFINE_STRING_TABLE_LOOKUP(link_operstate, LinkOperationalState);
-
-static const char* const dhcp_support_table[_DHCP_SUPPORT_MAX] = {
-        [DHCP_SUPPORT_NONE] = "none",
-        [DHCP_SUPPORT_BOTH] = "both",
-        [DHCP_SUPPORT_V4] = "v4",
-        [DHCP_SUPPORT_V6] = "v6",
-};
-
-DEFINE_STRING_TABLE_LOOKUP(dhcp_support, DHCPSupport);
-
-int config_parse_dhcp(
-                const char* unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-        DHCPSupport *dhcp = data;
-        int k;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        /* Our enum shall be a superset of booleans, hence first try
-         * to parse as boolean, and then as enum */
-
-        k = parse_boolean(rvalue);
-        if (k > 0)
-                *dhcp = DHCP_SUPPORT_BOTH;
-        else if (k == 0)
-                *dhcp = DHCP_SUPPORT_NONE;
-        else {
-                DHCPSupport s;
-
-                s = dhcp_support_from_string(rvalue);
-                if (s < 0){
-                        log_syntax(unit, LOG_ERR, filename, line, -s, "Failed to parse DHCP option, ignoring: %s", rvalue);
-                        return 0;
-                }
-
-                *dhcp = s;
-        }
-
-        return 0;
-}
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
new file mode 100644 (file)
index 0000000..7acf404
--- /dev/null
@@ -0,0 +1,148 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+#include "networkd.h"
+
+typedef enum LinkState {
+        LINK_STATE_PENDING,
+        LINK_STATE_ENSLAVING,
+        LINK_STATE_SETTING_ADDRESSES,
+        LINK_STATE_SETTING_ROUTES,
+        LINK_STATE_CONFIGURED,
+        LINK_STATE_UNMANAGED,
+        LINK_STATE_FAILED,
+        LINK_STATE_LINGER,
+        _LINK_STATE_MAX,
+        _LINK_STATE_INVALID = -1
+} LinkState;
+
+typedef enum LinkOperationalState {
+        LINK_OPERSTATE_OFF,
+        LINK_OPERSTATE_NO_CARRIER,
+        LINK_OPERSTATE_DORMANT,
+        LINK_OPERSTATE_CARRIER,
+        LINK_OPERSTATE_DEGRADED,
+        LINK_OPERSTATE_ROUTABLE,
+        _LINK_OPERSTATE_MAX,
+        _LINK_OPERSTATE_INVALID = -1
+} LinkOperationalState;
+
+struct Link {
+        Manager *manager;
+
+        int n_ref;
+
+        int ifindex;
+        char *ifname;
+        char *state_file;
+        struct ether_addr mac;
+        uint32_t mtu;
+        struct udev_device *udev_device;
+
+        unsigned flags;
+        uint8_t kernel_operstate;
+
+        Network *network;
+
+        LinkState state;
+        LinkOperationalState operstate;
+
+        unsigned link_messages;
+        unsigned enslaving;
+
+        LIST_HEAD(Address, addresses);
+
+        sd_dhcp_client *dhcp_client;
+        sd_dhcp_lease *dhcp_lease;
+        char *lease_file;
+        uint16_t original_mtu;
+        unsigned dhcp4_messages;
+        bool dhcp4_configured;
+
+        sd_ipv4ll *ipv4ll;
+        bool ipv4ll_address;
+        bool ipv4ll_route;
+
+        bool static_configured;
+
+        LIST_HEAD(Address, pool_addresses);
+
+        sd_dhcp_server *dhcp_server;
+
+        sd_icmp6_nd *icmp6_router_discovery;
+        sd_dhcp6_client *dhcp6_client;
+};
+
+Link *link_unref(Link *link);
+Link *link_ref(Link *link);
+int link_get(Manager *m, int ifindex, Link **ret);
+int link_add(Manager *manager, sd_rtnl_message *message, Link **ret);
+void link_drop(Link *link);
+
+int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata);
+int link_address_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata);
+int link_route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata);
+
+void link_enter_failed(Link *link);
+int link_initialized(Link *link, struct udev_device *device);
+
+void link_client_handler(Link *link);
+
+int link_update(Link *link, sd_rtnl_message *message);
+int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *userdata);
+
+int link_save(Link *link);
+
+bool link_has_carrier(Link *link);
+
+int link_set_mtu(Link *link, uint32_t mtu);
+int link_set_hostname(Link *link, const char *hostname);
+
+int ipv4ll_configure(Link *link);
+int dhcp4_configure(Link *link);
+
+const char* link_state_to_string(LinkState s) _const_;
+LinkState link_state_from_string(const char *s) _pure_;
+
+const char* link_operstate_to_string(LinkOperationalState s) _const_;
+LinkOperationalState link_operstate_from_string(const char *s) _pure_;
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_unref);
+#define _cleanup_link_unref_ _cleanup_(link_unrefp)
+
+/* Macros which append INTERFACE= to the message */
+
+#define log_full_link(level, link, fmt, ...) log_meta_object(level, __FILE__, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__)
+#define log_debug_link(link, ...)       log_full_link(LOG_DEBUG, link, ##__VA_ARGS__)
+#define log_info_link(link, ...)        log_full_link(LOG_INFO, link, ##__VA_ARGS__)
+#define log_notice_link(link, ...)      log_full_link(LOG_NOTICE, link, ##__VA_ARGS__)
+#define log_warning_link(link, ...)     log_full_link(LOG_WARNING, link, ##__VA_ARGS__)
+#define log_error_link(link, ...)       log_full_link(LOG_ERR, link, ##__VA_ARGS__)
+
+#define log_struct_link(level, link, ...) log_struct(level, "INTERFACE=%s", link->ifname, __VA_ARGS__)
+
+#define ADDRESS_FMT_VAL(address)            \
+        (address).s_addr & 0xFF,            \
+        ((address).s_addr >> 8) & 0xFF,     \
+        ((address).s_addr >> 16) & 0xFF,    \
+        (address).s_addr >> 24
diff --git a/src/network/networkd-macvlan.c b/src/network/networkd-macvlan.c
deleted file mode 100644 (file)
index 9227144..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2013 Tom Gundersen <teg@jklm.no>
-
-  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/>.
-***/
-
-#include <net/if.h>
-
-#include "networkd.h"
-#include "network-internal.h"
-#include "conf-parser.h"
-#include "list.h"
-
-static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = {
-        [NETDEV_MACVLAN_MODE_PRIVATE] = "private",
-        [NETDEV_MACVLAN_MODE_VEPA] = "vepa",
-        [NETDEV_MACVLAN_MODE_BRIDGE] = "bridge",
-        [NETDEV_MACVLAN_MODE_PASSTHRU] = "passthru",
-};
-
-DEFINE_STRING_TABLE_LOOKUP(macvlan_mode, MacVlanMode);
-DEFINE_CONFIG_PARSE_ENUM(config_parse_macvlan_mode, macvlan_mode, MacVlanMode, "Failed to parse macvlan mode");
-
-int netdev_create_macvlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
-        const char *kind;
-        int r;
-
-        assert(netdev);
-        assert(netdev->kind == NETDEV_KIND_MACVLAN);
-        assert(link);
-        assert(callback);
-        assert(netdev->ifname);
-        assert(netdev->manager);
-        assert(netdev->manager->rtnl);
-
-        r = sd_rtnl_message_new_link(netdev->manager->rtnl, &req, RTM_NEWLINK, 0);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not allocate RTM_NEWLINK message: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (link) {
-                r = sd_rtnl_message_append_u32(req, IFLA_LINK, link->ifindex);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_LINK attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        r = sd_rtnl_message_append_string(req, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (netdev->mtu) {
-                r = sd_rtnl_message_append_u32(req, IFLA_MTU, netdev->mtu);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_MTU attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(req, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(req, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not open IFLA_LINKINFO container: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        kind = netdev_kind_to_string(netdev->kind);
-        if (!kind) {
-                log_error_netdev(netdev, "Invalid kind");
-                return -EINVAL;
-        }
-
-        r = sd_rtnl_message_open_container_union(req, IFLA_INFO_DATA, kind);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not open IFLA_INFO_DATA container: %s",
-                                  strerror(-r));
-                return r;
-        }
-
-        if (netdev->macvlan_mode != _NETDEV_MACVLAN_MODE_INVALID) {
-        r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, netdev->macvlan_mode);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_MACVLAN_MODE attribute: %s",
-                                 strerror(-r));
-                        return r;
-                }
-        }
-
-        r = sd_rtnl_message_close_container(req);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not close IFLA_INFO_DATA container %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(req);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not close IFLA_LINKINFO container %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_call_async(netdev->manager->rtnl, req, callback, link, 0, NULL);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not send rtnetlink message: %s", strerror(-r));
-                return r;
-        }
-
-        log_debug_netdev(netdev, "creating netdev");
-
-        netdev->state = NETDEV_STATE_CREATING;
-
-        return 0;
-}
index c1d50128a5d978cb13dd269d6251ee331730215b..2213ad717cb97233cbc254be5a90217d18b00078 100644 (file)
@@ -25,6 +25,8 @@
 #include "conf-parser.h"
 #include "path-util.h"
 #include "networkd.h"
+#include "networkd-netdev.h"
+#include "networkd-link.h"
 #include "network-internal.h"
 #include "libudev-private.h"
 #include "udev-util.h"
@@ -43,38 +45,6 @@ const char* const network_dirs[] = {
 #endif
         NULL};
 
-static int dispatch_sigterm(sd_event_source *es, const struct signalfd_siginfo *si, void *userdata) {
-        Manager *m = userdata;
-
-        assert(m);
-
-        log_received_signal(LOG_INFO, si);
-
-        sd_event_exit(m->event, 0);
-        return 0;
-}
-
-static int setup_signals(Manager *m) {
-        sigset_t mask;
-        int r;
-
-        assert(m);
-
-        assert_se(sigemptyset(&mask) == 0);
-        sigset_add_many(&mask, SIGINT, SIGTERM, -1);
-        assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
-
-        r = sd_event_add_signal(m->event, &m->sigterm_event_source, SIGTERM, dispatch_sigterm, m);
-        if (r < 0)
-                return r;
-
-        r = sd_event_add_signal(m->event, &m->sigint_event_source, SIGINT, dispatch_sigterm, m);
-        if (r < 0)
-                return r;
-
-        return 0;
-}
-
 static int setup_default_address_pool(Manager *m) {
         AddressPool *p;
         int r;
@@ -120,6 +90,9 @@ int manager_new(Manager **ret) {
 
         sd_event_set_watchdog(m->event, true);
 
+        sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
+        sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+
         r = sd_rtnl_open(&m->rtnl, 3, RTNLGRP_LINK, RTNLGRP_IPV4_IFADDR,
                          RTNLGRP_IPV6_IFADDR);
         if (r < 0)
@@ -129,10 +102,6 @@ int manager_new(Manager **ret) {
         if (r < 0 && r != -ENOENT) /* TODO: drop when we can rely on kdbus */
                 return r;
 
-        r = setup_signals(m);
-        if (r < 0)
-                return r;
-
         /* udev does not initialize devices inside containers,
          * so we rely on them being already initialized before
          * entering the container */
@@ -146,11 +115,7 @@ int manager_new(Manager **ret) {
                         return -ENOMEM;
         }
 
-        m->links = hashmap_new(uint64_hash_func, uint64_compare_func);
-        if (!m->links)
-                return -ENOMEM;
-
-        m->netdevs = hashmap_new(string_hash_func, string_compare_func);
+        m->netdevs = hashmap_new(&string_hash_ops);
         if (!m->netdevs)
                 return -ENOMEM;
 
@@ -181,8 +146,6 @@ void manager_free(Manager *m) {
         udev_unref(m->udev);
         sd_bus_unref(m->bus);
         sd_event_source_unref(m->udev_event_source);
-        sd_event_source_unref(m->sigterm_event_source);
-        sd_event_source_unref(m->sigint_event_source);
         sd_event_unref(m->event);
 
         while ((link = hashmap_first(m->links)))
@@ -259,7 +222,7 @@ static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, vo
         Link *link = NULL;
         NetDev *netdev = NULL;
         uint16_t type;
-        char *name;
+        const char *name;
         int r, ifindex;
 
         assert(rtnl);
@@ -405,6 +368,10 @@ int manager_udev_listen(Manager *m) {
         if (r < 0)
                 return r;
 
+        r = sd_event_source_set_name(m->udev_event_source, "networkd-udev");
+        if (r < 0)
+                return r;
+
         return 0;
 }
 
@@ -451,24 +418,147 @@ int manager_bus_listen(Manager *m) {
         return 0;
 }
 
+static int set_put_in_addr(Set *s, const struct in_addr *address) {
+        char *p;
+        int r;
+
+        assert(s);
+
+        r = in_addr_to_string(AF_INET, (const union in_addr_union*) address, &p);
+        if (r < 0)
+                return r;
+
+        r = set_consume(s, p);
+        if (r == -EEXIST)
+                return 0;
+
+        return r;
+}
+
+static int set_put_in_addrv(Set *s, const struct in_addr *addresses, int n) {
+        int r, i, c = 0;
+
+        assert(s);
+        assert(n <= 0 || addresses);
+
+        for (i = 0; i < n; i++) {
+                r = set_put_in_addr(s, addresses+i);
+                if (r < 0)
+                        return r;
+
+                c += r;
+        }
+
+        return c;
+}
+
+static void print_string_set(FILE *f, const char *field, Set *s) {
+        bool space = false;
+        Iterator i;
+        char *p;
+
+        if (set_isempty(s))
+                return;
+
+        fputs(field, f);
+
+        SET_FOREACH(p, s, i) {
+                if (space)
+                        fputc(' ', f);
+                fputs(p, f);
+                space = true;
+        }
+        fputc('\n', f);
+}
+
 int manager_save(Manager *m) {
+        _cleanup_set_free_free_ Set *dns = NULL, *ntp = NULL, *domains = NULL;
         Link *link;
         Iterator i;
         _cleanup_free_ char *temp_path = NULL;
         _cleanup_fclose_ FILE *f = NULL;
-        LinkOperationalState operstate = LINK_OPERSTATE_UNKNOWN;
+        LinkOperationalState operstate = LINK_OPERSTATE_OFF;
         const char *operstate_str;
         int r;
 
         assert(m);
         assert(m->state_file);
 
+        /* We add all NTP and DNS server to a set, to filter out duplicates */
+        dns = set_new(&string_hash_ops);
+        if (!dns)
+                return -ENOMEM;
+
+        ntp = set_new(&string_hash_ops);
+        if (!ntp)
+                return -ENOMEM;
+
+        domains = set_new(&string_hash_ops);
+        if (!domains)
+                return -ENOMEM;
+
         HASHMAP_FOREACH(link, m->links, i) {
                 if (link->flags & IFF_LOOPBACK)
                         continue;
 
                 if (link->operstate > operstate)
                         operstate = link->operstate;
+
+                if (!link->network)
+                        continue;
+
+                /* First add the static configured entries */
+                r = set_put_strdupv(dns, link->network->dns);
+                if (r < 0)
+                        return r;
+
+                r = set_put_strdupv(ntp, link->network->ntp);
+                if (r < 0)
+                        return r;
+
+                r = set_put_strdupv(domains, link->network->domains);
+                if (r < 0)
+                        return r;
+
+                if (!link->dhcp_lease)
+                        continue;
+
+                /* Secondly, add the entries acquired via DHCP */
+                if (link->network->dhcp_dns) {
+                        const struct in_addr *addresses;
+
+                        r = sd_dhcp_lease_get_dns(link->dhcp_lease, &addresses);
+                        if (r > 0) {
+                                r = set_put_in_addrv(dns, addresses, r);
+                                if (r < 0)
+                                        return r;
+                        } else if (r < 0 && r != -ENOENT)
+                                return r;
+                }
+
+                if (link->network->dhcp_ntp) {
+                        const struct in_addr *addresses;
+
+                        r = sd_dhcp_lease_get_ntp(link->dhcp_lease, &addresses);
+                        if (r > 0) {
+                                r = set_put_in_addrv(ntp, addresses, r);
+                                if (r < 0)
+                                        return r;
+                        } else if (r < 0 && r != -ENOENT)
+                                return r;
+                }
+
+                if (link->network->dhcp_domains) {
+                        const char *domainname;
+
+                        r = sd_dhcp_lease_get_domainname(link->dhcp_lease, &domainname);
+                        if (r >= 0) {
+                                r = set_put_strdup(domains, domainname);
+                                if (r < 0)
+                                        return r;
+                        } else if (r != -ENOENT)
+                                return r;
+                }
         }
 
         operstate_str = link_operstate_to_string(operstate);
@@ -476,7 +566,7 @@ int manager_save(Manager *m) {
 
         r = fopen_temporary(m->state_file, &f, &temp_path);
         if (r < 0)
-                goto finish;
+                return r;
 
         fchmod(fileno(f), 0644);
 
@@ -484,22 +574,29 @@ int manager_save(Manager *m) {
                 "# This is private data. Do not parse.\n"
                 "OPER_STATE=%s\n", operstate_str);
 
-        fflush(f);
+        print_string_set(f, "DNS=", dns);
+        print_string_set(f, "NTP=", ntp);
+        print_string_set(f, "DOMAINS=", domains);
+
+        r = fflush_and_check(f);
+        if (r < 0)
+                goto fail;
 
-        if (ferror(f) || rename(temp_path, m->state_file) < 0) {
+        if (rename(temp_path, m->state_file) < 0) {
                 r = -errno;
-                unlink(m->state_file);
-                unlink(temp_path);
+                goto fail;
         }
 
-finish:
-        if (r < 0)
-                log_error("Failed to save network state to %s: %s", m->state_file, strerror(-r));
+        return 0;
 
+fail:
+        log_error("Failed to save network state to %s: %s", m->state_file, strerror(-r));
+        unlink(m->state_file);
+        unlink(temp_path);
         return r;
 }
 
-int manager_address_pool_acquire(Manager *m, unsigned family, unsigned prefixlen, union in_addr_union *found) {
+int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found) {
         AddressPool *p;
         int r;
 
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c
new file mode 100644 (file)
index 0000000..4640821
--- /dev/null
@@ -0,0 +1,198 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+    This file is part of systemd.
+
+    Copyright 2014  Tom Gundersen <teg@jklm.no>
+    Copyright 2014  Susant Sahani
+
+    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/>.
+***/
+
+#include <netinet/ether.h>
+#include <arpa/inet.h>
+#include <linux/if_bonding.h>
+
+#include "conf-parser.h"
+#include "sd-rtnl.h"
+#include "networkd-netdev-bond.h"
+#include "missing.h"
+
+static const char* const bond_mode_table[_NETDEV_BOND_MODE_MAX] = {
+        [NETDEV_BOND_MODE_BALANCE_RR] = "balance-rr",
+        [NETDEV_BOND_MODE_ACTIVE_BACKUP] = "active-backup",
+        [NETDEV_BOND_MODE_BALANCE_XOR] = "balance-xor",
+        [NETDEV_BOND_MODE_BROADCAST] = "broadcast",
+        [NETDEV_BOND_MODE_802_3AD] = "802.3ad",
+        [NETDEV_BOND_MODE_BALANCE_TLB] = "balance-tlb",
+        [NETDEV_BOND_MODE_BALANCE_ALB] = "balance-alb",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(bond_mode, BondMode);
+DEFINE_CONFIG_PARSE_ENUM(config_parse_bond_mode, bond_mode, BondMode, "Failed to parse bond mode");
+
+
+static const char* const bond_xmit_hash_policy_table[_NETDEV_BOND_XMIT_HASH_POLICY_MAX] = {
+        [NETDEV_BOND_XMIT_HASH_POLICY_LAYER2] = "layer2",
+        [NETDEV_BOND_XMIT_HASH_POLICY_LAYER34] = "layer3+4",
+        [NETDEV_BOND_XMIT_HASH_POLICY_LAYER23] = "layer2+3",
+        [NETDEV_BOND_XMIT_HASH_POLICY_ENCAP23] = "encap2+3",
+        [NETDEV_BOND_XMIT_HASH_POLICY_ENCAP34] = "encap3+4",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(bond_xmit_hash_policy, BondXmitHashPolicy);
+DEFINE_CONFIG_PARSE_ENUM(config_parse_bond_xmit_hash_policy,
+                         bond_xmit_hash_policy,
+                         BondXmitHashPolicy,
+                         "Failed to parse bond transmit hash policy")
+
+static const char* const bond_lacp_rate_table[_NETDEV_BOND_LACP_RATE_MAX] = {
+        [NETDEV_BOND_LACP_RATE_SLOW] = "slow",
+        [NETDEV_BOND_LACP_RATE_FAST] = "fast",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(bond_lacp_rate, BondLacpRate);
+DEFINE_CONFIG_PARSE_ENUM(config_parse_bond_lacp_rate, bond_lacp_rate, BondLacpRate, "Failed to parse bond lacp rate")
+
+static uint8_t bond_mode_to_kernel(BondMode mode) {
+        switch (mode) {
+        case NETDEV_BOND_MODE_BALANCE_RR:
+                return BOND_MODE_ROUNDROBIN;
+        case NETDEV_BOND_MODE_ACTIVE_BACKUP:
+                return BOND_MODE_ACTIVEBACKUP;
+        case NETDEV_BOND_MODE_BALANCE_XOR:
+                return BOND_MODE_XOR;
+        case NETDEV_BOND_MODE_BROADCAST:
+                return BOND_MODE_BROADCAST;
+        case NETDEV_BOND_MODE_802_3AD:
+                return BOND_MODE_8023AD;
+        case NETDEV_BOND_MODE_BALANCE_TLB:
+                return BOND_MODE_TLB;
+        case NETDEV_BOND_MODE_BALANCE_ALB:
+                return BOND_MODE_ALB;
+        default:
+                return (uint8_t) -1;
+        }
+}
+
+static uint8_t bond_xmit_hash_policy_to_kernel(BondXmitHashPolicy policy) {
+        switch (policy) {
+        case NETDEV_BOND_XMIT_HASH_POLICY_LAYER2:
+                return BOND_XMIT_POLICY_LAYER2;
+        case NETDEV_BOND_XMIT_HASH_POLICY_LAYER34:
+                return BOND_XMIT_POLICY_LAYER34;
+        case NETDEV_BOND_XMIT_HASH_POLICY_LAYER23:
+                return BOND_XMIT_POLICY_LAYER23;
+        case NETDEV_BOND_XMIT_HASH_POLICY_ENCAP23:
+                return BOND_XMIT_POLICY_ENCAP23;
+        case NETDEV_BOND_XMIT_HASH_POLICY_ENCAP34:
+                return BOND_XMIT_POLICY_ENCAP34;
+        default:
+                return (uint8_t) -1;
+        }
+}
+
+static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *m) {
+        Bond *b = BOND(netdev);
+        int r;
+
+        assert(netdev);
+        assert(!link);
+        assert(b);
+        assert(m);
+
+        if (b->mode != _NETDEV_BOND_MODE_INVALID) {
+                r = sd_rtnl_message_append_u8(m, IFLA_BOND_MODE,
+                                              bond_mode_to_kernel(b->mode));
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_BOND_MODE attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        if (b->xmit_hash_policy != _NETDEV_BOND_XMIT_HASH_POLICY_INVALID) {
+                r = sd_rtnl_message_append_u8(m, IFLA_BOND_XMIT_HASH_POLICY,
+                                              bond_xmit_hash_policy_to_kernel(b->xmit_hash_policy));
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_BOND_XMIT_HASH_POLICY attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        if (b->lacp_rate != _NETDEV_BOND_LACP_RATE_INVALID &&
+            b->mode == NETDEV_BOND_MODE_802_3AD) {
+                r = sd_rtnl_message_append_u8(m, IFLA_BOND_AD_LACP_RATE, b->lacp_rate );
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_BOND_AD_LACP_RATE attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        if (b->miimon != 0) {
+                r = sd_rtnl_message_append_u32(m, IFLA_BOND_MIIMON, b->miimon / USEC_PER_MSEC);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_BOND_BOND_MIIMON attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        if (b->downdelay != 0) {
+                r = sd_rtnl_message_append_u32(m, IFLA_BOND_DOWNDELAY, b->downdelay / USEC_PER_MSEC);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_BOND_DOWNDELAY attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        if (b->updelay != 0) {
+                r = sd_rtnl_message_append_u32(m, IFLA_BOND_UPDELAY, b->updelay / USEC_PER_MSEC);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_BOND_UPDELAY attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        return 0;
+}
+
+static void bond_init(NetDev *netdev) {
+        Bond *b = BOND(netdev);
+
+        assert(netdev);
+        assert(b);
+
+        b->mode = _NETDEV_BOND_MODE_INVALID;
+        b->xmit_hash_policy = _NETDEV_BOND_XMIT_HASH_POLICY_INVALID;
+        b->lacp_rate = _NETDEV_BOND_LACP_RATE_INVALID;
+}
+
+const NetDevVTable bond_vtable = {
+        .object_size = sizeof(Bond),
+        .init = bond_init,
+        .sections = "Match\0NetDev\0Bond\0",
+        .fill_message_create = netdev_bond_fill_message_create,
+        .create_type = NETDEV_CREATE_MASTER,
+};
diff --git a/src/network/networkd-netdev-bond.h b/src/network/networkd-netdev-bond.h
new file mode 100644 (file)
index 0000000..c09af5f
--- /dev/null
@@ -0,0 +1,83 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct Bond Bond;
+
+#include "networkd-netdev.h"
+
+typedef enum BondMode {
+        NETDEV_BOND_MODE_BALANCE_RR,
+        NETDEV_BOND_MODE_ACTIVE_BACKUP,
+        NETDEV_BOND_MODE_BALANCE_XOR,
+        NETDEV_BOND_MODE_BROADCAST,
+        NETDEV_BOND_MODE_802_3AD,
+        NETDEV_BOND_MODE_BALANCE_TLB,
+        NETDEV_BOND_MODE_BALANCE_ALB,
+        _NETDEV_BOND_MODE_MAX,
+        _NETDEV_BOND_MODE_INVALID = -1
+} BondMode;
+
+typedef enum BondXmitHashPolicy {
+        NETDEV_BOND_XMIT_HASH_POLICY_LAYER2,
+        NETDEV_BOND_XMIT_HASH_POLICY_LAYER34,
+        NETDEV_BOND_XMIT_HASH_POLICY_LAYER23,
+        NETDEV_BOND_XMIT_HASH_POLICY_ENCAP23,
+        NETDEV_BOND_XMIT_HASH_POLICY_ENCAP34,
+        _NETDEV_BOND_XMIT_HASH_POLICY_MAX,
+        _NETDEV_BOND_XMIT_HASH_POLICY_INVALID = -1
+} BondXmitHashPolicy;
+
+
+typedef enum BondLacpRate {
+        NETDEV_BOND_LACP_RATE_SLOW,
+        NETDEV_BOND_LACP_RATE_FAST,
+        _NETDEV_BOND_LACP_RATE_MAX,
+        _NETDEV_BOND_LACP_RATE_INVALID = -1,
+} BondLacpRate;
+
+struct Bond {
+        NetDev meta;
+
+        BondMode mode;
+        BondXmitHashPolicy xmit_hash_policy;
+        BondLacpRate lacp_rate;
+
+        usec_t miimon;
+        usec_t updelay;
+        usec_t downdelay;
+};
+
+extern const NetDevVTable bond_vtable;
+
+const char *bond_mode_to_string(BondMode d) _const_;
+BondMode bond_mode_from_string(const char *d) _pure_;
+
+const char *bond_xmit_hash_policy_to_string(BondXmitHashPolicy d) _const_;
+BondXmitHashPolicy bond_xmit_hash_policy_from_string(const char *d) _pure_;
+
+const char *bond_lacp_rate_to_string(BondLacpRate d) _const_;
+BondLacpRate bond_lacp_rate_from_string(const char *d) _pure_;
+
+int config_parse_bond_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_bond_xmit_hash_policy(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_bond_lacp_rate(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/network/networkd-netdev-bridge.c b/src/network/networkd-netdev-bridge.c
new file mode 100644 (file)
index 0000000..91b7051
--- /dev/null
@@ -0,0 +1,35 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+    This file is part of systemd.
+
+    Copyright 2014  Tom Gundersen <teg@jklm.no>
+    Copyright 2014  Susant Sahani
+
+    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/>.
+***/
+
+#include <netinet/ether.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+
+#include "sd-rtnl.h"
+#include "networkd-netdev-bridge.h"
+#include "missing.h"
+
+const NetDevVTable bridge_vtable = {
+        .object_size = sizeof(Bridge),
+        .sections = "Match\0NetDev\0",
+        .create_type = NETDEV_CREATE_MASTER,
+};
diff --git a/src/network/networkd-netdev-bridge.h b/src/network/networkd-netdev-bridge.h
new file mode 100644 (file)
index 0000000..a7d02b1
--- /dev/null
@@ -0,0 +1,32 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct Bridge Bridge;
+
+#include "networkd-netdev.h"
+
+struct Bridge {
+        NetDev meta;
+};
+
+extern const NetDevVTable bridge_vtable;
diff --git a/src/network/networkd-netdev-dummy.c b/src/network/networkd-netdev-dummy.c
new file mode 100644 (file)
index 0000000..01c10a2
--- /dev/null
@@ -0,0 +1,35 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+    This file is part of systemd.
+
+    Copyright 2014 Susant Sahani <susant@redhat.com>
+    Copyright 2014 Tom Gundersen
+
+    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/>.
+***/
+
+#include <netinet/ether.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <linux/veth.h>
+
+#include "sd-rtnl.h"
+#include "networkd-netdev-dummy.h"
+
+const NetDevVTable dummy_vtable = {
+        .object_size = sizeof(Dummy),
+        .sections = "Match\0NetDev\0",
+        .create_type = NETDEV_CREATE_INDEPENDENT,
+};
diff --git a/src/network/networkd-netdev-dummy.h b/src/network/networkd-netdev-dummy.h
new file mode 100644 (file)
index 0000000..0d321e5
--- /dev/null
@@ -0,0 +1,32 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct Dummy Dummy;
+
+#include "networkd-netdev.h"
+
+struct Dummy {
+        NetDev meta;
+};
+
+extern const NetDevVTable dummy_vtable;
index 5955f5195e26074ea677428f50b6a8e3da86ba94..c524ee57980259e9b5d440ec76eef7a1ab1b9128 100644 (file)
@@ -1,7 +1,10 @@
 %{
 #include <stddef.h>
 #include "conf-parser.h"
-#include "networkd.h"
+#include "networkd-netdev.h"
+#include "networkd-netdev-tunnel.h"
+#include "networkd-netdev-bond.h"
+#include "networkd-netdev-macvlan.h"
 #include "network-internal.h"
 %}
 struct ConfigPerfItem;
@@ -24,27 +27,33 @@ NetDev.Name,             config_parse_ifname,                0,
 NetDev.Kind,             config_parse_netdev_kind,           0,                             offsetof(NetDev, kind)
 NetDev.MTUBytes,         config_parse_iec_size,              0,                             offsetof(NetDev, mtu)
 NetDev.MACAddress,       config_parse_hwaddr,                0,                             offsetof(NetDev, mac)
-VLAN.Id,                 config_parse_uint64,                0,                             offsetof(NetDev, vlanid)
-MACVLAN.Mode,            config_parse_macvlan_mode,          0,                             offsetof(NetDev, macvlan_mode)
-Tunnel.Local,            config_parse_tunnel_address,        0,                             offsetof(NetDev, local)
-Tunnel.Remote,           config_parse_tunnel_address,        0,                             offsetof(NetDev, remote)
-Tunnel.TOS,              config_parse_unsigned,              0,                             offsetof(NetDev, tos)
-Tunnel.TTL,              config_parse_unsigned,              0,                             offsetof(NetDev, ttl)
-Tunnel.DiscoverPathMTU,  config_parse_bool,                  0,                             offsetof(NetDev, tunnel_pmtudisc)
-Peer.Name,               config_parse_ifname,                0,                             offsetof(NetDev, ifname_peer)
-Peer.MACAddress,         config_parse_hwaddr,                0,                             offsetof(NetDev, mac_peer)
-VXLAN.Id,                config_parse_uint64,                0,                             offsetof(NetDev, vxlanid)
-VXLAN.Group,             config_parse_tunnel_address,        0,                             offsetof(NetDev, group)
-VXLAN.TOS,               config_parse_unsigned,              0,                             offsetof(NetDev, tos)
-VXLAN.TTL,               config_parse_unsigned,              0,                             offsetof(NetDev, ttl)
-VXLAN.MacLearning,       config_parse_bool,                  0,                             offsetof(NetDev, learning)
-Tun.OneQueue,            config_parse_bool,                  0,                             offsetof(NetDev, one_queue)
-Tun.MultiQueue,          config_parse_bool,                  0,                             offsetof(NetDev, multi_queue)
-Tun.PacketInfo,          config_parse_bool,                  0,                             offsetof(NetDev, packet_info)
-Tun.User,                config_parse_string,                0,                             offsetof(NetDev, user_name)
-Tun.Group,               config_parse_string,                0,                             offsetof(NetDev, group_name)
-Tap.OneQueue,            config_parse_bool,                  0,                             offsetof(NetDev, one_queue)
-Tap.MultiQueue,          config_parse_bool,                  0,                             offsetof(NetDev, multi_queue)
-Tap.PacketInfo,          config_parse_bool,                  0,                             offsetof(NetDev, packet_info)
-Tap.User,                config_parse_string,                0,                             offsetof(NetDev, user_name)
-Tap.Group,               config_parse_string,                0,                             offsetof(NetDev, group_name)
+VLAN.Id,                 config_parse_uint64,                0,                             offsetof(VLan, id)
+MACVLAN.Mode,            config_parse_macvlan_mode,          0,                             offsetof(MacVlan, mode)
+Tunnel.Local,            config_parse_tunnel_address,        0,                             offsetof(Tunnel, local)
+Tunnel.Remote,           config_parse_tunnel_address,        0,                             offsetof(Tunnel, remote)
+Tunnel.TOS,              config_parse_unsigned,              0,                             offsetof(Tunnel, tos)
+Tunnel.TTL,              config_parse_unsigned,              0,                             offsetof(Tunnel, ttl)
+Tunnel.DiscoverPathMTU,  config_parse_bool,                  0,                             offsetof(Tunnel, pmtudisc)
+Peer.Name,               config_parse_ifname,                0,                             offsetof(Veth, ifname_peer)
+Peer.MACAddress,         config_parse_hwaddr,                0,                             offsetof(Veth, mac_peer)
+VXLAN.Id,                config_parse_uint64,                0,                             offsetof(VxLan, id)
+VXLAN.Group,             config_parse_tunnel_address,        0,                             offsetof(VxLan, group)
+VXLAN.TOS,               config_parse_unsigned,              0,                             offsetof(VxLan, tos)
+VXLAN.TTL,               config_parse_unsigned,              0,                             offsetof(VxLan, ttl)
+VXLAN.MacLearning,       config_parse_bool,                  0,                             offsetof(VxLan, learning)
+Tun.OneQueue,            config_parse_bool,                  0,                             offsetof(TunTap, one_queue)
+Tun.MultiQueue,          config_parse_bool,                  0,                             offsetof(TunTap, multi_queue)
+Tun.PacketInfo,          config_parse_bool,                  0,                             offsetof(TunTap, packet_info)
+Tun.User,                config_parse_string,                0,                             offsetof(TunTap, user_name)
+Tun.Group,               config_parse_string,                0,                             offsetof(TunTap, group_name)
+Tap.OneQueue,            config_parse_bool,                  0,                             offsetof(TunTap, one_queue)
+Tap.MultiQueue,          config_parse_bool,                  0,                             offsetof(TunTap, multi_queue)
+Tap.PacketInfo,          config_parse_bool,                  0,                             offsetof(TunTap, packet_info)
+Tap.User,                config_parse_string,                0,                             offsetof(TunTap, user_name)
+Tap.Group,               config_parse_string,                0,                             offsetof(TunTap, group_name)
+Bond.Mode,               config_parse_bond_mode,             0,                             offsetof(Bond, mode)
+Bond.TransmitHashPolicy, config_parse_bond_xmit_hash_policy, 0,                             offsetof(Bond, xmit_hash_policy)
+Bond.LACPTransmitRate,   config_parse_bond_lacp_rate,        0,                             offsetof(Bond, lacp_rate)
+Bond.MIIMonitorSec,      config_parse_sec,                   0,                             offsetof(Bond, miimon)
+Bond.UpDelaySec,         config_parse_sec,                   0,                             offsetof(Bond, updelay)
+Bond.DownDelaySec,       config_parse_sec,                   0,                             offsetof(Bond, downdelay)
diff --git a/src/network/networkd-netdev-macvlan.c b/src/network/networkd-netdev-macvlan.c
new file mode 100644 (file)
index 0000000..2e5554a
--- /dev/null
@@ -0,0 +1,76 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#include <net/if.h>
+
+#include "networkd-netdev-macvlan.h"
+#include "network-internal.h"
+#include "conf-parser.h"
+#include "list.h"
+
+static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = {
+        [NETDEV_MACVLAN_MODE_PRIVATE] = "private",
+        [NETDEV_MACVLAN_MODE_VEPA] = "vepa",
+        [NETDEV_MACVLAN_MODE_BRIDGE] = "bridge",
+        [NETDEV_MACVLAN_MODE_PASSTHRU] = "passthru",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(macvlan_mode, MacVlanMode);
+DEFINE_CONFIG_PARSE_ENUM(config_parse_macvlan_mode, macvlan_mode, MacVlanMode, "Failed to parse macvlan mode");
+
+static int netdev_macvlan_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *req) {
+        MacVlan *m = MACVLAN(netdev);
+        int r;
+
+        assert(netdev);
+        assert(m);
+        assert(link);
+        assert(netdev->ifname);
+
+        if (m->mode != _NETDEV_MACVLAN_MODE_INVALID) {
+        r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, m->mode);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_MACVLAN_MODE attribute: %s",
+                                 strerror(-r));
+                        return r;
+                }
+        }
+
+        return 0;
+}
+
+static void macvlan_init(NetDev *n) {
+        MacVlan *m = MACVLAN(n);
+
+        assert(n);
+        assert(m);
+
+        m->mode = _NETDEV_MACVLAN_MODE_INVALID;
+}
+
+const NetDevVTable macvlan_vtable = {
+        .object_size = sizeof(MacVlan),
+        .init = macvlan_init,
+        .sections = "Match\0NetDev\0MACVLAN\0",
+        .fill_message_create = netdev_macvlan_fill_message_create,
+        .create_type = NETDEV_CREATE_STACKED,
+};
diff --git a/src/network/networkd-netdev-macvlan.h b/src/network/networkd-netdev-macvlan.h
new file mode 100644 (file)
index 0000000..d61efc1
--- /dev/null
@@ -0,0 +1,48 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct MacVlan MacVlan;
+
+#include "networkd-netdev.h"
+
+typedef enum MacVlanMode {
+        NETDEV_MACVLAN_MODE_PRIVATE = MACVLAN_MODE_PRIVATE,
+        NETDEV_MACVLAN_MODE_VEPA = MACVLAN_MODE_VEPA,
+        NETDEV_MACVLAN_MODE_BRIDGE = MACVLAN_MODE_BRIDGE,
+        NETDEV_MACVLAN_MODE_PASSTHRU = MACVLAN_MODE_PASSTHRU,
+        _NETDEV_MACVLAN_MODE_MAX,
+        _NETDEV_MACVLAN_MODE_INVALID = -1
+} MacVlanMode;
+
+struct MacVlan {
+        NetDev meta;
+
+        MacVlanMode mode;
+};
+
+extern const NetDevVTable macvlan_vtable;
+
+const char *macvlan_mode_to_string(MacVlanMode d) _const_;
+MacVlanMode macvlan_mode_from_string(const char *d) _pure_;
+
+int config_parse_macvlan_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/network/networkd-netdev-tunnel.c b/src/network/networkd-netdev-tunnel.c
new file mode 100644 (file)
index 0000000..174fe23
--- /dev/null
@@ -0,0 +1,365 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+    This file is part of systemd.
+
+    Copyright 2014 Susant Sahani <susant@redhat.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/>.
+***/
+
+#include <netinet/ether.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <linux/ip.h>
+#include <linux/if_tunnel.h>
+
+#include "sd-rtnl.h"
+#include "networkd-netdev-tunnel.h"
+#include "networkd-link.h"
+#include "network-internal.h"
+#include "util.h"
+#include "missing.h"
+#include "conf-parser.h"
+
+static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *m) {
+        Tunnel *t = IPIP(netdev);
+        int r;
+
+        assert(netdev);
+        assert(link);
+        assert(m);
+        assert(t);
+        assert(t->family == AF_INET);
+
+        r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &t->local.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_LOCAL attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &t->remote.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_REMOTE attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, t->ttl);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_TTL  attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        return r;
+}
+
+static int netdev_sit_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *m) {
+        Tunnel *t = SIT(netdev);
+        int r;
+
+        assert(netdev);
+        assert(link);
+        assert(m);
+        assert(t);
+        assert(t->family == AF_INET);
+
+        r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &t->local.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_LOCAL attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &t->remote.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_REMOTE attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, t->ttl);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_TTL attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        return r;
+}
+
+static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *m) {
+        Tunnel *t = GRE(netdev);
+        int r;
+
+        assert(netdev);
+        assert(link);
+        assert(m);
+        assert(t);
+        assert(t->family == AF_INET);
+
+        r = sd_rtnl_message_append_u32(m, IFLA_GRE_LINK, link->ifindex);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_GRE_LINK attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &t->local.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_GRE_LOCAL attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &t->remote.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_GRE_REMOTE attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TTL, t->ttl);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_GRE_TTL attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TOS, t->tos);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_GRE_TOS attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        return r;
+}
+
+static int netdev_vti_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *m) {
+        Tunnel *t = VTI(netdev);
+        int r;
+
+        assert(netdev);
+        assert(link);
+        assert(m);
+        assert(t);
+        assert(t->family == AF_INET);
+
+        r = sd_rtnl_message_append_u32(m, IFLA_VTI_LINK, link->ifindex);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &t->local.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_LOCAL attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &t->remote.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_REMOTE attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        return r;
+}
+
+static int netdev_tunnel_verify(NetDev *netdev, const char *filename) {
+        Tunnel *t = NULL;
+
+        assert(netdev);
+        assert(filename);
+
+        switch (netdev->kind) {
+        case NETDEV_KIND_IPIP:
+                t = IPIP(netdev);
+                break;
+        case NETDEV_KIND_SIT:
+                t = SIT(netdev);
+                break;
+        case NETDEV_KIND_GRE:
+                t = GRE(netdev);
+                break;
+        case NETDEV_KIND_VTI:
+                t = VTI(netdev);
+                break;
+        default:
+                assert_not_reached("Invalid tunnel kind");
+        }
+
+        assert(t);
+
+        if (t->local.in.s_addr == INADDR_ANY) {
+               log_warning("Tunnel without local address configured in %s. Ignoring", filename);
+               return -EINVAL;
+        }
+
+        if (t->remote.in.s_addr == INADDR_ANY) {
+               log_warning("Tunnel without remote address configured in %s. Ignoring", filename);
+               return -EINVAL;
+        }
+
+        if (t->family != AF_INET) {
+              log_warning("Tunnel with invalid address family configured in %s. Ignoring", filename);
+              return -EINVAL;
+        }
+
+        return 0;
+}
+
+int config_parse_tunnel_address(const char *unit,
+                                const char *filename,
+                                unsigned line,
+                                const char *section,
+                                unsigned section_line,
+                                const char *lvalue,
+                                int ltype,
+                                const char *rvalue,
+                                void *data,
+                                void *userdata) {
+        Tunnel *t = userdata;
+        union in_addr_union *addr = data, buffer;
+        int r, f;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        r = in_addr_from_string_auto(rvalue, &f, &buffer);
+        if (r < 0) {
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Tunnel address is invalid, ignoring assignment: %s", rvalue);
+                return 0;
+        }
+
+        if (t->family != AF_UNSPEC && t->family != f) {
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Tunnel addresses incompatible, ignoring assignment: %s", rvalue);
+                return 0;
+        }
+
+        t->family = f;
+        *addr = buffer;
+
+        return 0;
+}
+
+static void ipip_init(NetDev *n) {
+        Tunnel *t = IPIP(n);
+
+        assert(n);
+        assert(t);
+
+        t->pmtudisc = true;
+}
+
+static void sit_init(NetDev *n) {
+        Tunnel *t = SIT(n);
+
+        assert(n);
+        assert(t);
+
+        t->pmtudisc = true;
+}
+
+static void vti_init(NetDev *n) {
+        Tunnel *t = VTI(n);
+
+        assert(n);
+        assert(t);
+
+        t->pmtudisc = true;
+}
+
+static void gre_init(NetDev *n) {
+        Tunnel *t = GRE(n);
+
+        assert(n);
+        assert(t);
+
+        t->pmtudisc = true;
+}
+
+const NetDevVTable ipip_vtable = {
+        .object_size = sizeof(Tunnel),
+        .init = ipip_init,
+        .sections = "Match\0NetDev\0Tunnel\0",
+        .fill_message_create = netdev_ipip_fill_message_create,
+        .create_type = NETDEV_CREATE_STACKED,
+        .config_verify = netdev_tunnel_verify,
+};
+
+const NetDevVTable sit_vtable = {
+        .object_size = sizeof(Tunnel),
+        .init = sit_init,
+        .sections = "Match\0NetDev\0Tunnel\0",
+        .fill_message_create = netdev_sit_fill_message_create,
+        .create_type = NETDEV_CREATE_STACKED,
+        .config_verify = netdev_tunnel_verify,
+};
+
+const NetDevVTable vti_vtable = {
+        .object_size = sizeof(Tunnel),
+        .init = vti_init,
+        .sections = "Match\0NetDev\0Tunnel\0",
+        .fill_message_create = netdev_vti_fill_message_create,
+        .create_type = NETDEV_CREATE_STACKED,
+        .config_verify = netdev_tunnel_verify,
+};
+
+const NetDevVTable gre_vtable = {
+        .object_size = sizeof(Tunnel),
+        .init = gre_init,
+        .sections = "Match\0NetDev\0Tunnel\0",
+        .fill_message_create = netdev_gre_fill_message_create,
+        .create_type = NETDEV_CREATE_STACKED,
+        .config_verify = netdev_tunnel_verify,
+};
diff --git a/src/network/networkd-netdev-tunnel.h b/src/network/networkd-netdev-tunnel.h
new file mode 100644 (file)
index 0000000..000a646
--- /dev/null
@@ -0,0 +1,43 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct Tunnel Tunnel;
+
+#include "networkd-netdev.h"
+
+struct Tunnel {
+        NetDev meta;
+
+        int family;
+
+        unsigned ttl;
+        unsigned tos;
+        union in_addr_union local;
+        union in_addr_union remote;
+        bool pmtudisc;
+};
+
+extern const NetDevVTable ipip_vtable;
+extern const NetDevVTable sit_vtable;
+extern const NetDevVTable vti_vtable;
+extern const NetDevVTable gre_vtable;
diff --git a/src/network/networkd-netdev-tuntap.c b/src/network/networkd-netdev-tuntap.c
new file mode 100644 (file)
index 0000000..eaf5df4
--- /dev/null
@@ -0,0 +1,214 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+    This file is part of systemd.
+
+    Copyright 2014 Susant Sahani <susant@redhat.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/>.
+***/
+
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <linux/if_tun.h>
+
+#include "networkd-netdev-tuntap.h"
+
+#define TUN_DEV "/dev/net/tun"
+
+static int netdev_fill_tuntap_message(NetDev *netdev, struct ifreq *ifr) {
+        TunTap *t;
+
+        assert(netdev);
+        assert(netdev->ifname);
+        assert(ifr);
+
+        if (netdev->kind == NETDEV_KIND_TAP) {
+                t = TAP(netdev);
+                ifr->ifr_flags |= IFF_TAP;
+        } else {
+                t = TUN(netdev);
+                ifr->ifr_flags |= IFF_TUN;
+        }
+
+        if (!t->packet_info)
+                ifr->ifr_flags |= IFF_NO_PI;
+
+        if (t->one_queue)
+                ifr->ifr_flags |= IFF_ONE_QUEUE;
+
+        if (t->multi_queue)
+                ifr->ifr_flags |= IFF_MULTI_QUEUE;
+
+        strncpy(ifr->ifr_name, netdev->ifname, IFNAMSIZ-1);
+
+        return 0;
+}
+
+static int netdev_tuntap_add(NetDev *netdev, struct ifreq *ifr) {
+        _cleanup_close_ int fd;
+        TunTap *t = NULL;
+        const char *user;
+        const char *group;
+        uid_t uid;
+        gid_t gid;
+        int r;
+
+        assert(netdev);
+        assert(ifr);
+
+        fd = open(TUN_DEV, O_RDWR);
+        if (fd < 0) {
+                log_error_netdev(netdev, "Failed to open tun dev: %m");
+                return -errno;
+        }
+
+        r = ioctl(fd, TUNSETIFF, ifr);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "TUNSETIFF failed on tun dev: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        if (netdev->kind == NETDEV_KIND_TAP)
+                t = TAP(netdev);
+        else
+                t = TUN(netdev);
+
+        assert(t);
+
+        if(t->user_name) {
+
+                user = t->user_name;
+
+                r = get_user_creds(&user, &uid, NULL, NULL, NULL);
+                if (r < 0) {
+                        log_error("Cannot resolve user name %s: %s",
+                                  t->user_name, strerror(-r));
+                        return 0;
+                }
+
+                r = ioctl(fd, TUNSETOWNER, uid);
+                if ( r < 0) {
+                        log_error_netdev(netdev,
+                                         "TUNSETOWNER failed on tun dev: %s",
+                                         strerror(-r));
+                }
+        }
+
+        if(t->group_name) {
+
+                group = t->group_name;
+
+                r = get_group_creds(&group, &gid);
+                if (r < 0) {
+                        log_error("Cannot resolve group name %s: %s",
+                                  t->group_name, strerror(-r));
+                        return 0;
+                }
+
+                r = ioctl(fd, TUNSETGROUP, gid);
+                if( r < 0) {
+                        log_error_netdev(netdev,
+                                         "TUNSETGROUP failed on tun dev: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+        }
+
+        r = ioctl(fd, TUNSETPERSIST, 1);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "TUNSETPERSIST failed on tun dev: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        return 0;
+}
+
+static int netdev_create_tuntap(NetDev *netdev) {
+        struct ifreq ifr = {};
+        int r;
+
+        r = netdev_fill_tuntap_message(netdev, &ifr);
+        if(r < 0)
+                return r;
+
+        return netdev_tuntap_add(netdev, &ifr);
+}
+
+static void tuntap_done(NetDev *netdev) {
+        TunTap *t = NULL;
+
+        assert(netdev);
+
+        if (netdev->kind == NETDEV_KIND_TUN)
+                t = TUN(netdev);
+        else
+                t = TAP(netdev);
+
+        assert(t);
+
+        free(t->user_name);
+        t->user_name = NULL;
+
+        free(t->group_name);
+        t->group_name = NULL;
+}
+
+static int tuntap_verify(NetDev *netdev, const char *filename) {
+        TunTap *t = NULL;
+
+        assert(netdev);
+
+        if (netdev->kind == NETDEV_KIND_TUN)
+                t = TUN(netdev);
+        else
+                t = TAP(netdev);
+
+        assert(t);
+
+        if (netdev->mtu) {
+                log_warning_netdev(netdev, "MTU configured for %s, ignoring",
+                                   netdev_kind_to_string(netdev->kind));
+        }
+
+        if (netdev->mac) {
+                log_warning_netdev(netdev, "MAC configured for %s, ignoring",
+                                   netdev_kind_to_string(netdev->kind));
+        }
+
+        return 0;
+}
+
+const NetDevVTable tun_vtable = {
+        .object_size = sizeof(TunTap),
+        .sections = "Match\0NetDev\0Tun\0",
+        .config_verify = tuntap_verify,
+        .done = tuntap_done,
+        .create = netdev_create_tuntap,
+        .create_type = NETDEV_CREATE_INDEPENDENT,
+};
+
+const NetDevVTable tap_vtable = {
+        .object_size = sizeof(TunTap),
+        .sections = "Match\0NetDev\0Tap\0",
+        .config_verify = tuntap_verify,
+        .done = tuntap_done,
+        .create = netdev_create_tuntap,
+        .create_type = NETDEV_CREATE_INDEPENDENT,
+};
diff --git a/src/network/networkd-netdev-tuntap.h b/src/network/networkd-netdev-tuntap.h
new file mode 100644 (file)
index 0000000..b804875
--- /dev/null
@@ -0,0 +1,39 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct TunTap TunTap;
+
+#include "networkd-netdev.h"
+
+struct TunTap {
+        NetDev meta;
+
+        char *user_name;
+        char *group_name;
+        bool one_queue;
+        bool multi_queue;
+        bool packet_info;
+};
+
+extern const NetDevVTable tun_vtable;
+extern const NetDevVTable tap_vtable;
diff --git a/src/network/networkd-netdev-veth.c b/src/network/networkd-netdev-veth.c
new file mode 100644 (file)
index 0000000..da09ef9
--- /dev/null
@@ -0,0 +1,119 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+    This file is part of systemd.
+
+    Copyright 2014 Susant Sahani <susant@redhat.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/>.
+***/
+
+#include <netinet/ether.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <linux/veth.h>
+
+#include "sd-rtnl.h"
+#include "networkd-netdev-veth.h"
+
+static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *m) {
+        Veth *v = VETH(netdev);
+        int r;
+
+        assert(netdev);
+        assert(!link);
+        assert(v);
+        assert(m);
+
+        r = sd_rtnl_message_open_container(m, VETH_INFO_PEER);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        if (v->ifname_peer) {
+                r = sd_rtnl_message_append_string(m, IFLA_IFNAME, v->ifname_peer);
+                if (r < 0) {
+                        log_error("Failed to add netlink interface name: %s", strerror(-r));
+                        return r;
+                }
+        }
+
+        if (v->mac_peer) {
+                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, v->mac_peer);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_ADDRESS attribute: %s",
+                                         strerror(-r));
+                    return r;
+                }
+        }
+
+        r = sd_rtnl_message_close_container(m);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_INFO_DATA attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        return r;
+}
+
+static int netdev_veth_verify(NetDev *netdev, const char *filename) {
+        Veth *v = VETH(netdev);
+        int r;
+
+        assert(netdev);
+        assert(v);
+        assert(filename);
+
+        if (!v->ifname_peer) {
+                log_warning("Veth NetDev without peer name configured in %s. Ignoring",
+                            filename);
+                return -EINVAL;
+        }
+
+        if (!v->mac_peer) {
+                r = netdev_get_mac(v->ifname_peer, &v->mac_peer);
+                if (r < 0) {
+                        log_warning("Failed to generate predictable MAC address for %s. Ignoring",
+                                  v->ifname_peer);
+                        return -EINVAL;
+                }
+        }
+
+        return 0;
+}
+
+static void veth_done(NetDev *n) {
+        Veth *v = VETH(n);
+
+        assert(n);
+        assert(v);
+
+        free(v->ifname_peer);
+        free(v->mac_peer);
+}
+
+const NetDevVTable veth_vtable = {
+        .object_size = sizeof(Veth),
+        .sections = "Match\0NetDev\0Peer\0",
+        .done = veth_done,
+        .fill_message_create = netdev_veth_fill_message_create,
+        .create_type = NETDEV_CREATE_INDEPENDENT,
+        .config_verify = netdev_veth_verify,
+};
diff --git a/src/network/networkd-netdev-veth.h b/src/network/networkd-netdev-veth.h
new file mode 100644 (file)
index 0000000..85d8b49
--- /dev/null
@@ -0,0 +1,35 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct Veth Veth;
+
+#include "networkd-netdev.h"
+
+struct Veth {
+        NetDev meta;
+
+        char *ifname_peer;
+        struct ether_addr *mac_peer;
+};
+
+extern const NetDevVTable veth_vtable;
diff --git a/src/network/networkd-netdev-vlan.c b/src/network/networkd-netdev-vlan.c
new file mode 100644 (file)
index 0000000..13c4456
--- /dev/null
@@ -0,0 +1,81 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#include <net/if.h>
+
+#include "networkd-netdev-vlan.h"
+#include "network-internal.h"
+#include "list.h"
+
+static int netdev_vlan_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *req) {
+        VLan *v = VLAN(netdev);
+        int r;
+
+        assert(netdev);
+        assert(v);
+        assert(link);
+        assert(req);
+
+        if (v->id <= VLANID_MAX) {
+                r = sd_rtnl_message_append_u16(req, IFLA_VLAN_ID, v->id);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_VLAN_ID attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        return 0;
+}
+
+static int netdev_vlan_verify(NetDev *netdev, const char *filename) {
+        VLan *v = VLAN(netdev);
+
+        assert(netdev);
+        assert(v);
+        assert(filename);
+
+        if (v->id > VLANID_MAX) {
+                log_warning("VLAN without valid Id (%"PRIu64") configured in %s. Ignoring", v->id, filename);
+                return -EINVAL;
+        }
+
+        return 0;
+}
+
+static void vlan_init(NetDev *netdev) {
+        VLan *v = VLAN(netdev);
+
+        assert(netdev);
+        assert(v);
+
+        v->id = VLANID_MAX + 1;
+}
+
+const NetDevVTable vlan_vtable = {
+        .object_size = sizeof(VLan),
+        .init = vlan_init,
+        .sections = "Match\0NetDev\0VLAN\0",
+        .fill_message_create = netdev_vlan_fill_message_create,
+        .create_type = NETDEV_CREATE_STACKED,
+        .config_verify = netdev_vlan_verify,
+};
diff --git a/src/network/networkd-netdev-vlan.h b/src/network/networkd-netdev-vlan.h
new file mode 100644 (file)
index 0000000..0c0fbbe
--- /dev/null
@@ -0,0 +1,36 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct VLan VLan;
+
+#include "networkd-netdev.h"
+
+#define VLANID_MAX 4094
+
+struct VLan {
+        NetDev meta;
+
+        uint64_t id;
+};
+
+extern const NetDevVTable vlan_vtable;
diff --git a/src/network/networkd-netdev-vxlan.c b/src/network/networkd-netdev-vxlan.c
new file mode 100644 (file)
index 0000000..326ac54
--- /dev/null
@@ -0,0 +1,130 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+    This file is part of systemd.
+
+    Copyright 2014 Susant Sahani <susant@redhat.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/>.
+***/
+
+#include <netinet/ether.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+
+#include "sd-rtnl.h"
+#include "networkd-netdev-vxlan.h"
+#include "networkd-link.h"
+#include "missing.h"
+
+static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_message *m) {
+        VxLan *v = VXLAN(netdev);
+        int r;
+
+        assert(netdev);
+        assert(v);
+        assert(link);
+        assert(m);
+
+
+        if (v->id <= VXLAN_VID_MAX) {
+                r = sd_rtnl_message_append_u32(m, IFLA_VXLAN_ID, v->id);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_VXLAN_ID attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        r = sd_rtnl_message_append_in_addr(m, IFLA_VXLAN_GROUP, &v->group.in);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_VXLAN_GROUP attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        r = sd_rtnl_message_append_u32(m, IFLA_VXLAN_LINK, link->ifindex);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_VXLAN_LINK attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        if(v->ttl) {
+                r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_TTL, v->ttl);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_VXLAN_TTL attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        if(v->tos) {
+                r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_TOS, v->tos);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_VXLAN_TOS attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+        }
+
+        r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_LEARNING, v->learning);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_VXLAN_LEARNING attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
+        return r;
+}
+
+static int netdev_vxlan_verify(NetDev *netdev, const char *filename) {
+        VxLan *v = VXLAN(netdev);
+
+        assert(netdev);
+        assert(v);
+        assert(filename);
+
+        if (v->id > VXLAN_VID_MAX) {
+                log_warning("VXLAN without valid Id configured in %s. Ignoring", filename);
+                return -EINVAL;
+        }
+
+        return 0;
+}
+
+static void vxlan_init(NetDev *netdev) {
+        VxLan *v = VXLAN(netdev);
+
+        assert(netdev);
+        assert(v);
+
+        v->id = VXLAN_VID_MAX + 1;
+        v->learning = true;
+}
+
+const NetDevVTable vxlan_vtable = {
+        .object_size = sizeof(VxLan),
+        .init = vxlan_init,
+        .sections = "Match\0NetDev\0VXLAN\0",
+        .fill_message_create = netdev_vxlan_fill_message_create,
+        .create_type = NETDEV_CREATE_STACKED,
+        .config_verify = netdev_vxlan_verify,
+};
diff --git a/src/network/networkd-netdev-vxlan.h b/src/network/networkd-netdev-vxlan.h
new file mode 100644 (file)
index 0000000..8c906f1
--- /dev/null
@@ -0,0 +1,42 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+typedef struct VxLan VxLan;
+
+#include "networkd-netdev.h"
+
+#include "in-addr-util.h"
+
+#define VXLAN_VID_MAX (1u << 24) - 1
+
+struct VxLan {
+        NetDev meta;
+
+        uint64_t id;
+        union in_addr_union group;
+        unsigned tos;
+        unsigned ttl;
+        bool learning;
+};
+
+extern const NetDevVTable vxlan_vtable;
index a8c1ea3b44a7e3b24f4409c66a2069298611fc46..fd1f51ec56d5399bf49b87a4ec82f540521688ad 100644 (file)
@@ -21,7 +21,8 @@
 
 #include <net/if.h>
 
-#include "networkd.h"
+#include "networkd-netdev.h"
+#include "networkd-link.h"
 #include "network-internal.h"
 #include "path-util.h"
 #include "conf-files.h"
 #include "list.h"
 #include "siphash24.h"
 
+const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
+        [NETDEV_KIND_BRIDGE] = &bridge_vtable,
+        [NETDEV_KIND_BOND] = &bond_vtable,
+        [NETDEV_KIND_VLAN] = &vlan_vtable,
+        [NETDEV_KIND_MACVLAN] = &macvlan_vtable,
+        [NETDEV_KIND_VXLAN] = &vxlan_vtable,
+        [NETDEV_KIND_IPIP] = &ipip_vtable,
+        [NETDEV_KIND_GRE] = &gre_vtable,
+        [NETDEV_KIND_SIT] = &sit_vtable,
+        [NETDEV_KIND_VTI] = &vti_vtable,
+        [NETDEV_KIND_VETH] = &veth_vtable,
+        [NETDEV_KIND_DUMMY] = &dummy_vtable,
+        [NETDEV_KIND_TUN] = &tun_vtable,
+        [NETDEV_KIND_TAP] = &tap_vtable,
+};
+
 static const char* const netdev_kind_table[_NETDEV_KIND_MAX] = {
         [NETDEV_KIND_BRIDGE] = "bridge",
         [NETDEV_KIND_BOND] = "bond",
@@ -48,9 +65,10 @@ static const char* const netdev_kind_table[_NETDEV_KIND_MAX] = {
 DEFINE_STRING_TABLE_LOOKUP(netdev_kind, NetDevKind);
 DEFINE_CONFIG_PARSE_ENUM(config_parse_netdev_kind, netdev_kind, NetDevKind, "Failed to parse netdev kind");
 
+
 static void netdev_cancel_callbacks(NetDev *netdev) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
-        netdev_enslave_callback *callback;
+        netdev_join_callback *callback;
 
         if (!netdev)
                 return;
@@ -85,17 +103,17 @@ static void netdev_free(NetDev *netdev) {
 
         free(netdev->description);
         free(netdev->ifname);
-        free(netdev->ifname_peer);
         free(netdev->mac);
-        free(netdev->mac_peer);
-        free(netdev->user_name);
-        free(netdev->group_name);
 
         condition_free_list(netdev->match_host);
         condition_free_list(netdev->match_virt);
         condition_free_list(netdev->match_kernel);
         condition_free_list(netdev->match_arch);
 
+        if (NETDEV_VTABLE(netdev) &&
+            NETDEV_VTABLE(netdev)->done)
+                NETDEV_VTABLE(netdev)->done(netdev);
+
         free(netdev);
 }
 
@@ -160,6 +178,7 @@ static int netdev_enslave_ready(NetDev *netdev, Link* link, sd_rtnl_message_hand
         assert(netdev->state == NETDEV_STATE_READY);
         assert(netdev->manager);
         assert(netdev->manager->rtnl);
+        assert(IN_SET(netdev->kind, NETDEV_KIND_BRIDGE, NETDEV_KIND_BOND));
         assert(link);
         assert(callback);
 
@@ -196,7 +215,7 @@ static int netdev_enslave_ready(NetDev *netdev, Link* link, sd_rtnl_message_hand
 }
 
 static int netdev_enter_ready(NetDev *netdev) {
-        netdev_enslave_callback *callback, *callback_next;
+        netdev_join_callback *callback, *callback_next;
         int r;
 
         assert(netdev);
@@ -241,128 +260,16 @@ static int netdev_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
                 return 1;
         }
 
-        return 1;
-}
-
-static int netdev_create(NetDev *netdev) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
-        const char *kind;
-        int r;
-
-        assert(netdev);
-        assert(netdev->ifname);
-        assert(netdev->manager);
-        assert(netdev->manager->rtnl);
-
-        r = sd_rtnl_message_new_link(netdev->manager->rtnl, &req, RTM_NEWLINK, 0);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not allocate RTM_NEWLINK message: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_string(req, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (netdev->mtu) {
-                r = sd_rtnl_message_append_u32(req, IFLA_MTU, netdev->mtu);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_MTU attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(req, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(req, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not open IFLA_LINKINFO container: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        kind = netdev_kind_to_string(netdev->kind);
-        if (!kind) {
-                log_error_netdev(netdev, "Invalid kind");
-                return -EINVAL;
-        }
-
-        r = sd_rtnl_message_open_container_union(req, IFLA_INFO_DATA, kind);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not open IFLA_INFO_DATA container: %s",
-                                  strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(req);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not close IFLA_INFO_DATA container %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(req);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not close IFLA_LINKINFO container %s",
-                                 strerror(-r));
-                return r;
-        }
+        log_debug_netdev(netdev, "created");
 
-        r = sd_rtnl_call_async(netdev->manager->rtnl, req, &netdev_create_handler, netdev, 0, NULL);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not send rtnetlink message: %s", strerror(-r));
-                return r;
-        }
-
-        netdev_ref(netdev);
-
-        log_debug_netdev(netdev, "creating netdev");
-
-        netdev->state = NETDEV_STATE_CREATING;
-
-        return 0;
+        return 1;
 }
 
-/* the callback must be called, possibly after a timeout, as otherwise the Link will hang */
 int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) {
         int r;
 
-        switch(netdev->kind) {
-        case NETDEV_KIND_VLAN:
-                return netdev_create_vlan(netdev, link, callback);
-        case NETDEV_KIND_MACVLAN:
-                return netdev_create_macvlan(netdev, link, callback);
-        case NETDEV_KIND_VXLAN:
-                return netdev_create_vxlan(netdev, link, callback);
-        case NETDEV_KIND_IPIP:
-        case NETDEV_KIND_GRE:
-        case NETDEV_KIND_SIT:
-        case NETDEV_KIND_VTI:
-                return netdev_create_tunnel(netdev, link, callback);
-        default:
-                break;
-        }
+        assert(netdev);
+        assert(IN_SET(netdev->kind, NETDEV_KIND_BRIDGE, NETDEV_KIND_BOND));
 
         if (netdev->state == NETDEV_STATE_READY) {
                 r = netdev_enslave_ready(netdev, link, callback);
@@ -370,9 +277,9 @@ int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callbac
                         return r;
         } else {
                 /* the netdev is not yet read, save this request for when it is*/
-                netdev_enslave_callback *cb;
+                netdev_join_callback *cb;
 
-                cb = new0(netdev_enslave_callback, 1);
+                cb = new0(netdev_join_callback, 1);
                 if (!cb)
                         return log_oom();
 
@@ -381,6 +288,9 @@ int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callbac
                 link_ref(link);
 
                 LIST_PREPEND(callbacks, netdev->callbacks, cb);
+
+                log_debug_netdev(netdev, "will enslave '%s', when reday",
+                                 link->ifname);
         }
 
         return 0;
@@ -389,8 +299,8 @@ int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callbac
 int netdev_set_ifindex(NetDev *netdev, sd_rtnl_message *message) {
         uint16_t type;
         const char *kind;
-        char *received_kind;
-        char *received_name;
+        const char *received_kind;
+        const char *received_name;
         int r, ifindex;
 
         assert(netdev);
@@ -491,7 +401,7 @@ int netdev_set_ifindex(NetDev *netdev, sd_rtnl_message *message) {
 
 #define HASH_KEY SD_ID128_MAKE(52,e1,45,bd,00,6f,29,96,21,c6,30,6d,83,71,04,48)
 
-static int netdev_get_mac(const char *ifname, struct ether_addr **ret) {
+int netdev_get_mac(const char *ifname, struct ether_addr **ret) {
         _cleanup_free_ struct ether_addr *mac = NULL;
         uint8_t result[8];
         size_t l, sz;
@@ -535,19 +445,182 @@ static int netdev_get_mac(const char *ifname, struct ether_addr **ret) {
         return 0;
 }
 
+static int netdev_create(NetDev *netdev, Link *link,
+                         sd_rtnl_message_handler_t callback) {
+        int r;
+
+        assert(netdev);
+        assert(!link || callback);
+
+        /* create netdev */
+        if (NETDEV_VTABLE(netdev)->create) {
+                assert(!link);
+
+                r = NETDEV_VTABLE(netdev)->create(netdev);
+                if (r < 0)
+                        return r;
+
+                log_debug_netdev(netdev, "created");
+        } else {
+                _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
+
+                r = sd_rtnl_message_new_link(netdev->manager->rtnl, &m, RTM_NEWLINK, 0);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not allocate RTM_NEWLINK message: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_IFNAME, attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                if (netdev->mac) {
+                        r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
+                        if (r < 0) {
+                                log_error_netdev(netdev,
+                                                 "Could not append IFLA_ADDRESS attribute: %s",
+                                                 strerror(-r));
+                            return r;
+                        }
+                }
+
+                if (netdev->mtu) {
+                        r = sd_rtnl_message_append_u32(m, IFLA_MTU, netdev->mtu);
+                        if (r < 0) {
+                                log_error_netdev(netdev,
+                                                 "Could not append IFLA_MTU attribute: %s",
+                                                 strerror(-r));
+                                return r;
+                        }
+                }
+
+                if (link) {
+                        r = sd_rtnl_message_append_u32(m, IFLA_LINK, link->ifindex);
+                        if (r < 0) {
+                                log_error_netdev(netdev,
+                                                 "Colud not append IFLA_LINK attribute: %s",
+                                                 strerror(-r));
+                                return r;
+                        }
+                }
+
+                r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_LINKINFO attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
+                                                         netdev_kind_to_string(netdev->kind));
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_INFO_DATA attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                if (NETDEV_VTABLE(netdev)->fill_message_create) {
+                        r = NETDEV_VTABLE(netdev)->fill_message_create(netdev, link, m);
+                        if (r < 0)
+                                return r;
+                }
+
+                r = sd_rtnl_message_close_container(m);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_LINKINFO attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+                r = sd_rtnl_message_close_container(m);
+                if (r < 0) {
+                        log_error_netdev(netdev,
+                                         "Could not append IFLA_LINKINFO attribute: %s",
+                                         strerror(-r));
+                        return r;
+                }
+
+
+                if (link) {
+                        r = sd_rtnl_call_async(netdev->manager->rtnl, m,
+                                               callback, link, 0, NULL);
+                        if (r < 0) {
+                                log_error_netdev(netdev,
+                                                 "Could not send rtnetlink message: %s",
+                                                 strerror(-r));
+                                return r;
+                        }
+
+                        link_ref(link);
+                } else {
+                        r = sd_rtnl_call_async(netdev->manager->rtnl, m,
+                                               netdev_create_handler, netdev, 0,
+                                               NULL);
+                        if (r < 0) {
+                                log_error_netdev(netdev,
+                                                 "Could not send rtnetlink message: %s",
+                                                 strerror(-r));
+                                return r;
+                        }
+
+                        netdev_ref(netdev);
+                }
+
+                netdev->state = NETDEV_STATE_CREATING;
+
+                log_debug_netdev(netdev, "creating");
+        }
+
+        return 0;
+}
+
+/* the callback must be called, possibly after a timeout, as otherwise the Link will hang */
+int netdev_join(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) {
+        int r;
+
+        assert(netdev);
+        assert(netdev->manager);
+        assert(netdev->manager->rtnl);
+        assert(NETDEV_VTABLE(netdev));
+
+        switch (NETDEV_VTABLE(netdev)->create_type) {
+        case NETDEV_CREATE_MASTER:
+                r = netdev_enslave(netdev, link, callback);
+                if (r < 0)
+                        return r;
+
+                break;
+        case NETDEV_CREATE_STACKED:
+                r = netdev_create(netdev, link, callback);
+                if (r < 0)
+                        return r;
+
+                break;
+        default:
+                assert_not_reached("Can not join independent netdev");
+        }
+
+        return 0;
+}
+
 static int netdev_load_one(Manager *manager, const char *filename) {
         _cleanup_netdev_unref_ NetDev *netdev = NULL;
+        _cleanup_free_ NetDev *netdev_raw = NULL;
         _cleanup_fclose_ FILE *file = NULL;
         int r;
 
         assert(manager);
         assert(filename);
 
-        if (null_or_empty_path(filename)) {
-                log_debug("skipping empty file: %s", filename);
-                return 0;
-        }
-
         file = fopen(filename, "re");
         if (!file) {
                 if (errno == ENOENT)
@@ -556,100 +629,76 @@ static int netdev_load_one(Manager *manager, const char *filename) {
                         return -errno;
         }
 
-        netdev = new0(NetDev, 1);
-        if (!netdev)
+        if (null_or_empty_fd(fileno(file))) {
+                log_debug("Skipping empty file: %s", filename);
+                return 0;
+        }
+
+        netdev_raw = new0(NetDev, 1);
+        if (!netdev_raw)
                 return log_oom();
 
-        netdev->n_ref = 1;
-        netdev->manager = manager;
-        netdev->state = _NETDEV_STATE_INVALID;
-        netdev->kind = _NETDEV_KIND_INVALID;
-        netdev->macvlan_mode = _NETDEV_MACVLAN_MODE_INVALID;
-        netdev->vlanid = VLANID_MAX + 1;
-        netdev->vxlanid = VXLAN_VID_MAX + 1;
-        netdev->tunnel_pmtudisc = true;
-        netdev->learning = true;
+        netdev_raw->kind = _NETDEV_KIND_INVALID;
 
         r = config_parse(NULL, filename, file,
-                         "Match\0NetDev\0VLAN\0MACVLAN\0VXLAN\0Tunnel\0Peer\0Tun\0Tap\0",
-                         config_item_perf_lookup, (void*) network_netdev_gperf_lookup,
-                         false, false, netdev);
-        if (r < 0) {
-                log_warning("Could not parse config file %s: %s", filename, strerror(-r));
+                         "Match\0NetDev\0",
+                         config_item_perf_lookup, network_netdev_gperf_lookup,
+                         true, false, true, netdev_raw);
+        if (r < 0)
                 return r;
-        }
 
-        switch (netdev->kind) {
-        case _NETDEV_KIND_INVALID:
-                log_warning("NetDev without Kind configured in %s. Ignoring", filename);
-                return 0;
-        case NETDEV_KIND_VLAN:
-                if (netdev->vlanid > VLANID_MAX) {
-                        log_warning("VLAN without valid Id configured in %s. Ignoring", filename);
-                        return 0;
-                }
-                break;
-        case NETDEV_KIND_VXLAN:
-                if (netdev->vxlanid > VXLAN_VID_MAX) {
-                        log_warning("VXLAN without valid Id configured in %s. Ignoring", filename);
-                        return 0;
-                }
-                break;
-        case NETDEV_KIND_IPIP:
-        case NETDEV_KIND_GRE:
-        case NETDEV_KIND_SIT:
-        case NETDEV_KIND_VTI:
-                if (netdev->local.in.s_addr == INADDR_ANY) {
-                        log_warning("Tunnel without local address configured in %s. Ignoring", filename);
-                        return 0;
-                }
-                if (netdev->remote.in.s_addr == INADDR_ANY) {
-                        log_warning("Tunnel without remote address configured in %s. Ignoring", filename);
-                        return 0;
-                }
-                if (netdev->family != AF_INET) {
-                        log_warning("Tunnel with invalid address family configured in %s. Ignoring", filename);
-                        return 0;
-                }
-                break;
-        default:
-                break;
-        }
+        r = fseek(file, 0, SEEK_SET);
+        if (r < 0)
+                return -errno;
 
-        if (!netdev->ifname) {
-                log_warning("NetDev without Name configured in %s. Ignoring", filename);
+        /* skip out early if configuration does not match the environment */
+        if (net_match_config(NULL, NULL, NULL, NULL, NULL,
+                             netdev_raw->match_host, netdev_raw->match_virt,
+                             netdev_raw->match_kernel, netdev_raw->match_arch,
+                             NULL, NULL, NULL, NULL, NULL, NULL) <= 0)
                 return 0;
-        }
 
-        if (netdev->kind != NETDEV_KIND_VLAN && netdev->vlanid <= VLANID_MAX) {
-                log_warning("VLAN Id configured for a %s in %s. Ignoring",
-                            netdev_kind_to_string(netdev->kind), filename);
+        if (!NETDEV_VTABLE(netdev_raw)) {
+                log_warning("NetDev with invalid Kind configured in %s. Ignoring", filename);
                 return 0;
         }
 
-        if (netdev->kind != NETDEV_KIND_VXLAN && netdev->vxlanid <= VXLAN_VID_MAX) {
-                log_warning("VXLAN Id configured for a %s in %s. Ignoring",
-                            netdev_kind_to_string(netdev->kind), filename);
+        if (!netdev_raw->ifname) {
+                log_warning("NetDev without Name configured in %s. Ignoring", filename);
                 return 0;
         }
 
-        if (netdev->kind != NETDEV_KIND_MACVLAN &&
-            netdev->macvlan_mode != _NETDEV_MACVLAN_MODE_INVALID) {
-                log_warning("MACVLAN Mode configured for a %s in %s. Ignoring",
-                            netdev_kind_to_string(netdev->kind), filename);
-                return 0;
+        netdev = malloc0(NETDEV_VTABLE(netdev_raw)->object_size);
+        if (!netdev)
+                return log_oom();
+
+        netdev->n_ref = 1;
+        netdev->manager = manager;
+        netdev->state = _NETDEV_STATE_INVALID;
+        netdev->kind = netdev_raw->kind;
+        netdev->ifname = netdev_raw->ifname;
+
+        if (NETDEV_VTABLE(netdev)->init)
+                NETDEV_VTABLE(netdev)->init(netdev);
+
+        r = config_parse(NULL, filename, file,
+                         NETDEV_VTABLE(netdev)->sections,
+                         config_item_perf_lookup, network_netdev_gperf_lookup,
+                         false, false, false, netdev);
+        if (r < 0)
+                return r;
+
+        /* verify configuration */
+        if (NETDEV_VTABLE(netdev)->config_verify) {
+                r = NETDEV_VTABLE(netdev)->config_verify(netdev, filename);
+                if (r < 0)
+                        return 0;
         }
 
         netdev->filename = strdup(filename);
         if (!netdev->filename)
                 return log_oom();
 
-        if (net_match_config(NULL, NULL, NULL, NULL, NULL,
-                             netdev->match_host, netdev->match_virt,
-                             netdev->match_kernel, netdev->match_arch,
-                             NULL, NULL, NULL, NULL, NULL, NULL) <= 0)
-                return 0;
-
         if (!netdev->mac) {
                 r = netdev_get_mac(netdev->ifname, &netdev->mac);
                 if (r < 0) {
@@ -665,54 +714,20 @@ static int netdev_load_one(Manager *manager, const char *filename) {
 
         LIST_HEAD_INIT(netdev->callbacks);
 
-        switch (netdev->kind) {
-        case NETDEV_KIND_VETH:
-                if (!netdev->ifname_peer) {
-                        log_warning("Veth NetDev without peer name configured "
-                                    "in %s. Ignoring", filename);
-                        return 0;
-                }
-
-                if (!netdev->mac) {
-                        r = netdev_get_mac(netdev->ifname_peer, &netdev->mac_peer);
-                        if (r < 0) {
-                                log_error("Failed to generate predictable MAC address for %s",
-                                          netdev->ifname_peer);
-                                return r;
-                        }
-                }
-
-                r = netdev_create_veth(netdev, netdev_create_handler);
-                if (r < 0)
-                        return r;
-
-                break;
-        case NETDEV_KIND_DUMMY:
-                r = netdev_create_dummy(netdev, netdev_create_handler);
-                if (r < 0)
-                        return r;
+        log_debug_netdev(netdev, "loaded %s", netdev_kind_to_string(netdev->kind));
 
-                break;
-        case NETDEV_KIND_BRIDGE:
-        case NETDEV_KIND_BOND:
-                r = netdev_create(netdev);
+        switch (NETDEV_VTABLE(netdev)->create_type) {
+        case NETDEV_CREATE_MASTER:
+        case NETDEV_CREATE_INDEPENDENT:
+                r = netdev_create(netdev, NULL, NULL);
                 if (r < 0)
-                        return r;
-                break;
+                        return 0;
 
-        case NETDEV_KIND_TUN:
-        case NETDEV_KIND_TAP:
-                r = netdev_create_tuntap(netdev);
-                if (r < 0)
-                        return r;
                 break;
-
         default:
                 break;
         }
 
-        log_debug_netdev(netdev, "loaded %s", netdev_kind_to_string(netdev->kind));
-
         netdev = NULL;
 
         return 0;
diff --git a/src/network/networkd-netdev.h b/src/network/networkd-netdev.h
new file mode 100644 (file)
index 0000000..e9a8a16
--- /dev/null
@@ -0,0 +1,205 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#pragma once
+
+#include "networkd.h"
+#include "hashmap.h"
+#include "list.h"
+#include "set.h"
+#include "condition-util.h"
+#include "in-addr-util.h"
+
+typedef struct NetDevVTable NetDevVTable;
+
+typedef struct netdev_join_callback netdev_join_callback;
+
+struct netdev_join_callback {
+        sd_rtnl_message_handler_t callback;
+        Link *link;
+
+        LIST_FIELDS(netdev_join_callback, callbacks);
+};
+
+typedef enum NetDevKind {
+        NETDEV_KIND_BRIDGE,
+        NETDEV_KIND_BOND,
+        NETDEV_KIND_VLAN,
+        NETDEV_KIND_MACVLAN,
+        NETDEV_KIND_VXLAN,
+        NETDEV_KIND_IPIP,
+        NETDEV_KIND_GRE,
+        NETDEV_KIND_SIT,
+        NETDEV_KIND_VETH,
+        NETDEV_KIND_VTI,
+        NETDEV_KIND_DUMMY,
+        NETDEV_KIND_TUN,
+        NETDEV_KIND_TAP,
+        _NETDEV_KIND_MAX,
+        _NETDEV_KIND_INVALID = -1
+} NetDevKind;
+
+typedef enum NetDevState {
+        NETDEV_STATE_FAILED,
+        NETDEV_STATE_CREATING,
+        NETDEV_STATE_READY,
+        NETDEV_STATE_LINGER,
+        _NETDEV_STATE_MAX,
+        _NETDEV_STATE_INVALID = -1,
+} NetDevState;
+
+typedef enum NetDevCreateType {
+        NETDEV_CREATE_INDEPENDENT,
+        NETDEV_CREATE_MASTER,
+        NETDEV_CREATE_STACKED,
+        _NETDEV_CREATE_MAX,
+        _NETDEV_CREATE_INVALID = -1,
+} NetDevCreateType;
+
+struct NetDev {
+        Manager *manager;
+
+        int n_ref;
+
+        char *filename;
+
+        Condition *match_host;
+        Condition *match_virt;
+        Condition *match_kernel;
+        Condition *match_arch;
+
+        NetDevState state;
+        NetDevKind kind;
+        char *description;
+        char *ifname;
+        struct ether_addr *mac;
+        size_t mtu;
+        int ifindex;
+
+        LIST_HEAD(netdev_join_callback, callbacks);
+};
+
+#include "networkd-netdev-bridge.h"
+#include "networkd-netdev-bond.h"
+#include "networkd-netdev-vlan.h"
+#include "networkd-netdev-macvlan.h"
+#include "networkd-netdev-vxlan.h"
+#include "networkd-netdev-veth.h"
+#include "networkd-netdev-tunnel.h"
+#include "networkd-netdev-dummy.h"
+#include "networkd-netdev-tuntap.h"
+
+struct NetDevVTable {
+        /* How much memory does an object of this unit type need */
+        size_t object_size;
+
+        /* Config file sections this netdev kind understands, separated
+         * by NUL chars */
+        const char *sections;
+
+        /* This should reset all type-specific variables. This should
+         * not allocate memory, and is called with zero-initialized
+         * data. It should hence only initialize variables that need
+         * to be set != 0. */
+        void (*init)(NetDev *n);
+
+        /* This should free all kind-specific variables. It should be
+         * idempotent. */
+        void (*done)(NetDev *n);
+
+        /* fill in message to create netdev */
+        int (*fill_message_create)(NetDev *netdev, Link *link, sd_rtnl_message *message);
+
+        /* specifies if netdev is independent, or a master device or a stacked device */
+        NetDevCreateType create_type;
+
+        /* create netdev, if not done via rtnl */
+        int (*create)(NetDev *netdev);
+
+        /* verify that compulsory configuration options were specified */
+        int (*config_verify)(NetDev *netdev, const char *filename);
+};
+
+extern const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX];
+
+#define NETDEV_VTABLE(n) netdev_vtable[(n)->kind]
+
+/* For casting a netdev into the various netdev kinds */
+#define DEFINE_CAST(UPPERCASE, MixedCase)                                   \
+        static inline MixedCase* UPPERCASE(NetDev *n) {                     \
+                if (_unlikely_(!n || n->kind != NETDEV_KIND_##UPPERCASE))   \
+                        return NULL;                                        \
+                                                                            \
+                return (MixedCase*) n;                                      \
+        }
+
+/* For casting the various netdev kinds into a netdev */
+#define NETDEV(n) (&(n)->meta)
+
+DEFINE_CAST(BRIDGE, Bridge);
+DEFINE_CAST(BOND, Bond);
+DEFINE_CAST(VLAN, VLan);
+DEFINE_CAST(MACVLAN, MacVlan);
+DEFINE_CAST(VXLAN, VxLan);
+DEFINE_CAST(IPIP, Tunnel);
+DEFINE_CAST(GRE, Tunnel);
+DEFINE_CAST(SIT, Tunnel);
+DEFINE_CAST(VTI, Tunnel);
+DEFINE_CAST(VETH, Veth);
+DEFINE_CAST(DUMMY, Dummy);
+DEFINE_CAST(TUN, TunTap);
+DEFINE_CAST(TAP, TunTap);
+
+int netdev_load(Manager *manager);
+void netdev_drop(NetDev *netdev);
+
+NetDev *netdev_unref(NetDev *netdev);
+NetDev *netdev_ref(NetDev *netdev);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(NetDev*, netdev_unref);
+#define _cleanup_netdev_unref_ _cleanup_(netdev_unrefp)
+
+int netdev_get(Manager *manager, const char *name, NetDev **ret);
+int netdev_set_ifindex(NetDev *netdev, sd_rtnl_message *newlink);
+int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback);
+int netdev_get_mac(const char *ifname, struct ether_addr **ret);
+int netdev_join(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cb);
+
+const char *netdev_kind_to_string(NetDevKind d) _const_;
+NetDevKind netdev_kind_from_string(const char *d) _pure_;
+
+int config_parse_netdev_kind(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+
+/* gperf */
+const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, unsigned length);
+
+/* Macros which append INTERFACE= to the message */
+
+#define log_full_netdev(level, netdev, fmt, ...) log_meta_object(level, __FILE__, __LINE__, __func__, "INTERFACE=", netdev->ifname, "%-*s: " fmt, IFNAMSIZ, netdev->ifname, ##__VA_ARGS__)
+#define log_debug_netdev(netdev, ...)       log_full_netdev(LOG_DEBUG, netdev, ##__VA_ARGS__)
+#define log_info_netdev(netdev, ...)        log_full_netdev(LOG_INFO, netdev, ##__VA_ARGS__)
+#define log_notice_netdev(netdev, ...)      log_full_netdev(LOG_NOTICE, netdev, ##__VA_ARGS__)
+#define log_warning_netdev(netdev, ...)     log_full_netdev(LOG_WARNING, netdev,## __VA_ARGS__)
+#define log_error_netdev(netdev, ...)       log_full_netdev(LOG_ERR, netdev, ##__VA_ARGS__)
+
+#define log_struct_netdev(level, netdev, ...) log_struct(level, "INTERFACE=%s", netdev->ifname, __VA_ARGS__)
+
+#define NETDEVIF(netdev) "INTERFACE=%s", netdev->ifname
index ce9047cd06c4ce6a807d737bb87bfd3b3aa50c40..a73646187ea3fa060fc6c21da1a1ed7225b262de 100644 (file)
@@ -27,32 +27,41 @@ Match.Architecture,          config_parse_net_condition,         CONDITION_ARCHI
 Network.Description,         config_parse_string,                0,                             offsetof(Network, description)
 Network.Bridge,              config_parse_netdev,                0,                             offsetof(Network, bridge)
 Network.Bond,                config_parse_netdev,                0,                             offsetof(Network, bond)
-Network.VLAN,                config_parse_netdev,                0,                             offsetof(Network, vlans)
-Network.MACVLAN,             config_parse_netdev,                0,                             offsetof(Network, macvlans)
-Network.VXLAN,               config_parse_netdev,                0,                             offsetof(Network, vxlans)
+Network.VLAN,                config_parse_netdev,                0,                             0
+Network.MACVLAN,             config_parse_netdev,                0,                             0
+Network.VXLAN,               config_parse_netdev,                0,                             0
+Network.Tunnel,              config_parse_tunnel,                0,                             0
 Network.DHCP,                config_parse_dhcp,                  0,                             offsetof(Network, dhcp)
 Network.DHCPServer,          config_parse_bool,                  0,                             offsetof(Network, dhcp_server)
 Network.IPv4LL,              config_parse_bool,                  0,                             offsetof(Network, ipv4ll)
+Network.IPv4LLRoute,         config_parse_bool,                  0,                             offsetof(Network, ipv4ll_route)
 Network.Address,             config_parse_address,               0,                             0
 Network.Gateway,             config_parse_gateway,               0,                             0
-Network.DNS,                 config_parse_dns,                   0,                             offsetof(Network, dns)
-Network.NTP,                 config_parse_dns,                   0,                             offsetof(Network, ntp)
-Network.Tunnel,              config_parse_tunnel,                0,                             offsetof(Network, tunnel)
+Network.Domains,             config_parse_domains,               0,                             offsetof(Network, domains)
+Network.DNS,                 config_parse_strv,                  0,                             offsetof(Network, dns)
+Network.LLMNR,               config_parse_llmnr,                 0,                             offsetof(Network, llmnr)
+Network.NTP,                 config_parse_strv,                  0,                             offsetof(Network, ntp)
 Address.Address,             config_parse_address,               0,                             0
+Address.Peer,                config_parse_address,               0,                             0
 Address.Broadcast,           config_parse_broadcast,             0,                             0
 Address.Label,               config_parse_label,                 0,                             0
 Route.Gateway,               config_parse_gateway,               0,                             0
 Route.Destination,           config_parse_destination,           0,                             0
+Route.Metric,                config_parse_route_priority,        0,                             0
 DHCP.UseDNS,                 config_parse_bool,                  0,                             offsetof(Network, dhcp_dns)
 DHCP.UseMTU,                 config_parse_bool,                  0,                             offsetof(Network, dhcp_mtu)
 DHCP.UseHostname,            config_parse_bool,                  0,                             offsetof(Network, dhcp_hostname)
-DHCP.UseDomainName,          config_parse_bool,                  0,                             offsetof(Network, dhcp_domainname)
+DHCP.UseDomains,             config_parse_bool,                  0,                             offsetof(Network, dhcp_domains)
 DHCP.UseRoutes,              config_parse_bool,                  0,                             offsetof(Network, dhcp_routes)
 DHCP.SendHostname,           config_parse_bool,                  0,                             offsetof(Network, dhcp_sendhost)
+DHCP.RequestBroadcast,       config_parse_bool,                  0,                             offsetof(Network, dhcp_broadcast)
 DHCP.CriticalConnection,     config_parse_bool,                  0,                             offsetof(Network, dhcp_critical)
+DHCP.VendorClassIdentifier,  config_parse_string,                0,                             offsetof(Network, dhcp_vendor_class_identifier)
+DHCP.RouteMetric,            config_parse_unsigned,              0,                             offsetof(Network, dhcp_route_metric)
 /* backwards compatibility: do not add new entries to this section */
 DHCPv4.UseDNS,               config_parse_bool,                  0,                             offsetof(Network, dhcp_dns)
 DHCPv4.UseMTU,               config_parse_bool,                  0,                             offsetof(Network, dhcp_mtu)
 DHCPv4.UseHostname,          config_parse_bool,                  0,                             offsetof(Network, dhcp_hostname)
-DHCPv4.UseDomainName,        config_parse_bool,                  0,                             offsetof(Network, dhcp_domainname)
+DHCP.UseDomainName,          config_parse_bool,                  0,                             offsetof(Network, dhcp_domains)
+DHCPv4.UseDomainName,        config_parse_bool,                  0,                             offsetof(Network, dhcp_domains)
 DHCPv4.CriticalConnection,   config_parse_bool,                  0,                             offsetof(Network, dhcp_critical)
index 9ab4f2306887ff4d0d0aa4f685e353662361c5d4..aad99236c4a4c93c51cb1992ddfa8ebfd87552d2 100644 (file)
@@ -23,6 +23,8 @@
 #include <net/if.h>
 
 #include "networkd.h"
+#include "networkd-netdev.h"
+#include "networkd-link.h"
 #include "network-internal.h"
 #include "path-util.h"
 #include "conf-files.h"
@@ -47,8 +49,8 @@ static int network_load_one(Manager *manager, const char *filename) {
                         return -errno;
         }
 
-        if (null_or_empty_path(filename)) {
-                log_debug("skipping empty file: %s", filename);
+        if (null_or_empty_fd(fileno(file))) {
+                log_debug("Skipping empty file: %s", filename);
                 return 0;
         }
 
@@ -61,23 +63,15 @@ static int network_load_one(Manager *manager, const char *filename) {
         LIST_HEAD_INIT(network->static_addresses);
         LIST_HEAD_INIT(network->static_routes);
 
-        network->vlans = hashmap_new(string_hash_func, string_compare_func);
-        if (!network->vlans)
+        network->stacked_netdevs = hashmap_new(&string_hash_ops);
+        if (!network->stacked_netdevs)
                 return log_oom();
 
-        network->macvlans = hashmap_new(uint64_hash_func, uint64_compare_func);
-        if (!network->macvlans)
-                return log_oom();
-
-        network->vxlans = hashmap_new(uint64_hash_func, uint64_compare_func);
-        if (!network->vxlans)
-                return log_oom();
-
-        network->addresses_by_section = hashmap_new(uint64_hash_func, uint64_compare_func);
+        network->addresses_by_section = hashmap_new(NULL);
         if (!network->addresses_by_section)
                 return log_oom();
 
-        network->routes_by_section = hashmap_new(uint64_hash_func, uint64_compare_func);
+        network->routes_by_section = hashmap_new(NULL);
         if (!network->routes_by_section)
                 return log_oom();
 
@@ -85,19 +79,22 @@ static int network_load_one(Manager *manager, const char *filename) {
         if (!network->filename)
                 return log_oom();
 
+        network->dhcp = DHCP_SUPPORT_NONE;
         network->dhcp_ntp = true;
         network->dhcp_dns = true;
         network->dhcp_hostname = true;
-        network->dhcp_domainname = true;
         network->dhcp_routes = true;
         network->dhcp_sendhost = true;
+        network->dhcp_route_metric = DHCP_ROUTE_METRIC;
 
-        r = config_parse(NULL, filename, file, "Match\0Network\0Address\0Route\0DHCPv4\0", config_item_perf_lookup,
-                        (void*) network_network_gperf_lookup, false, false, network);
-        if (r < 0) {
-                log_warning("Could not parse config file %s: %s", filename, strerror(-r));
+        network->llmnr = LLMNR_SUPPORT_YES;
+
+        r = config_parse(NULL, filename, file,
+                         "Match\0Network\0Address\0Route\0DHCP\0DHCPv4\0",
+                         config_item_perf_lookup, network_network_gperf_lookup,
+                         false, false, true, network);
+        if (r < 0)
                 return r;
-        }
 
         LIST_PREPEND(networks, manager->networks, network);
 
@@ -166,34 +163,21 @@ void network_free(Network *network) {
         free(network->match_name);
 
         free(network->description);
+        free(network->dhcp_vendor_class_identifier);
 
-        while ((address = network->ntp)) {
-                LIST_REMOVE(addresses, network->ntp, address);
-                address_free(address);
-        }
-
-        while ((address = network->dns)) {
-                LIST_REMOVE(addresses, network->dns, address);
-                address_free(address);
-        }
+        strv_free(network->ntp);
+        strv_free(network->dns);
+        strv_free(network->domains);
 
         netdev_unref(network->bridge);
 
         netdev_unref(network->bond);
 
-        netdev_unref(network->tunnel);
-
-        HASHMAP_FOREACH(netdev, network->vlans, i)
-                netdev_unref(netdev);
-        hashmap_free(network->vlans);
-
-        HASHMAP_FOREACH(netdev, network->macvlans, i)
+        HASHMAP_FOREACH(netdev, network->stacked_netdevs, i) {
+                hashmap_remove(network->stacked_netdevs, netdev->ifname);
                 netdev_unref(netdev);
-        hashmap_free(network->macvlans);
-
-        HASHMAP_FOREACH(netdev, network->vxlans, i)
-                netdev_unref(netdev);
-        hashmap_free(network->vxlans);
+        }
+        hashmap_free(network->stacked_netdevs);
 
         while ((route = network->static_routes))
                 route_free(route);
@@ -252,6 +236,26 @@ int network_apply(Manager *manager, Network *network, Link *link) {
 
         link->network = network;
 
+        if (network->ipv4ll_route) {
+                Route *route;
+
+                r = route_new_static(network, 0, &route);
+                if (r < 0)
+                        return r;
+
+                r = inet_pton(AF_INET, "169.254.0.0", &route->dst_addr.in);
+                if (r == 0)
+                        return -EINVAL;
+                if (r < 0)
+                        return -errno;
+
+                route->family = AF_INET;
+                route->dst_prefixlen = 16;
+                route->scope = RT_SCOPE_LINK;
+                route->metrics = IPV4LL_ROUTE_METRIC;
+                route->protocol = RTPROT_STATIC;
+        }
+
         if (network->dns || network->ntp) {
                 r = link_save(link);
                 if (r < 0)
@@ -321,28 +325,13 @@ int config_parse_netdev(const char *unit,
 
                 break;
         case NETDEV_KIND_VLAN:
-                r = hashmap_put(network->vlans, &netdev->vlanid, netdev);
-                if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "Can not add VLAN to network: %s", rvalue);
-                        return 0;
-                }
-
-                break;
         case NETDEV_KIND_MACVLAN:
-                r = hashmap_put(network->macvlans, netdev->ifname, netdev);
-                if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "Can not add MACVLAN to network: %s", rvalue);
-                        return 0;
-                }
-
-                break;
         case NETDEV_KIND_VXLAN:
-                r = hashmap_put(network->vxlans, netdev->ifname, netdev);
+                r = hashmap_put(network->stacked_netdevs, netdev->ifname, netdev);
                 if (r < 0) {
                         log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "Can not add VXLAN to network: %s", rvalue);
+                                   "Can not add VLAN '%s' to network: %s",
+                                   rvalue, strerror(-r));
                         return 0;
                 }
 
@@ -356,6 +345,47 @@ int config_parse_netdev(const char *unit,
         return 0;
 }
 
+int config_parse_domains(const char *unit,
+                         const char *filename,
+                         unsigned line,
+                         const char *section,
+                         unsigned section_line,
+                         const char *lvalue,
+                         int ltype,
+                         const char *rvalue,
+                         void *data,
+                         void *userdata) {
+        Network *network = userdata;
+        char ***domains = data;
+        char **domain;
+        int r;
+
+        r = config_parse_strv(unit, filename, line, section, section_line,
+                              lvalue, ltype, rvalue, domains, userdata);
+        if (r < 0)
+                return r;
+
+        strv_uniq(*domains);
+        network->wildcard_domain = !!strv_find(*domains, "*");
+
+        STRV_FOREACH(domain, *domains) {
+                if (is_localhost(*domain))
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "'localhost' domain names may not be configured, ignoring assignment: %s", *domain);
+                else if (!hostname_is_valid(*domain)) {
+                        if (!streq(*domain, "*"))
+                                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "domain name is not valid, ignoring assignment: %s", *domain);
+                } else
+                        continue;
+
+                strv_remove(*domains, *domain);
+
+                /* We removed one entry, make sure we don't skip the next one */
+                domain--;
+        }
+
+        return 0;
+}
+
 int config_parse_tunnel(const char *unit,
                         const char *filename,
                         unsigned line,
@@ -391,7 +421,118 @@ int config_parse_tunnel(const char *unit,
                 return 0;
         }
 
-        network->tunnel = netdev;
+        r = hashmap_put(network->stacked_netdevs, netdev->ifname, netdev);
+        if (r < 0) {
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Can not add VLAN '%s' to network: %s",
+                           rvalue, strerror(-r));
+                return 0;
+        }
+
+        netdev_ref(netdev);
+
+        return 0;
+}
+
+static const char* const dhcp_support_table[_DHCP_SUPPORT_MAX] = {
+        [DHCP_SUPPORT_NONE] = "none",
+        [DHCP_SUPPORT_BOTH] = "both",
+        [DHCP_SUPPORT_V4] = "v4",
+        [DHCP_SUPPORT_V6] = "v6",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(dhcp_support, DHCPSupport);
+
+int config_parse_dhcp(
+                const char* unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        DHCPSupport *dhcp = data;
+        int k;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        /* Our enum shall be a superset of booleans, hence first try
+         * to parse as boolean, and then as enum */
+
+        k = parse_boolean(rvalue);
+        if (k > 0)
+                *dhcp = DHCP_SUPPORT_BOTH;
+        else if (k == 0)
+                *dhcp = DHCP_SUPPORT_NONE;
+        else {
+                DHCPSupport s;
+
+                s = dhcp_support_from_string(rvalue);
+                if (s < 0){
+                        log_syntax(unit, LOG_ERR, filename, line, -s, "Failed to parse DHCP option, ignoring: %s", rvalue);
+                        return 0;
+                }
+
+                *dhcp = s;
+        }
+
+        return 0;
+}
+
+static const char* const llmnr_support_table[_LLMNR_SUPPORT_MAX] = {
+        [LLMNR_SUPPORT_NO] = "no",
+        [LLMNR_SUPPORT_YES] = "yes",
+        [LLMNR_SUPPORT_RESOLVE] = "resolve",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(llmnr_support, LLMNRSupport);
+
+int config_parse_llmnr(
+                const char* unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        LLMNRSupport *llmnr = data;
+        int k;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        /* Our enum shall be a superset of booleans, hence first try
+         * to parse as boolean, and then as enum */
+
+        k = parse_boolean(rvalue);
+        if (k > 0)
+                *llmnr = LLMNR_SUPPORT_YES;
+        else if (k == 0)
+                *llmnr = LLMNR_SUPPORT_NO;
+        else {
+                LLMNRSupport s;
+
+                s = llmnr_support_from_string(rvalue);
+                if (s < 0){
+                        log_syntax(unit, LOG_ERR, filename, line, -s, "Failed to parse LLMNR option, ignoring: %s", rvalue);
+                        return 0;
+                }
+
+                *llmnr = s;
+        }
 
         return 0;
 }
index acfe3f023f1dfd2a15f1df406acb535158a28232..10d8cd902a8c16147eb52bb4aa0d01781054ed1b 100644 (file)
@@ -22,6 +22,7 @@
 #include <net/if.h>
 
 #include "networkd.h"
+#include "networkd-link.h"
 
 #include "utf8.h"
 #include "util.h"
@@ -32,9 +33,8 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
         _cleanup_route_free_ Route *route = NULL;
 
         if (section) {
-                uint64_t key = section;
-
-                route = hashmap_get(network->routes_by_section, &key);
+                route = hashmap_get(network->routes_by_section,
+                                    UINT_TO_PTR(section));
                 if (route) {
                         *ret = route;
                         route = NULL;
@@ -49,6 +49,7 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
 
         route->family = AF_UNSPEC;
         route->scope = RT_SCOPE_UNIVERSE;
+        route->protocol = RTPROT_STATIC;
 
         route->network = network;
 
@@ -56,7 +57,8 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
 
         if (section) {
                 route->section = section;
-                hashmap_put(network->routes_by_section, &route->section, route);
+                hashmap_put(network->routes_by_section,
+                            UINT_TO_PTR(route->section), route);
         }
 
         *ret = route;
@@ -65,7 +67,7 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
         return 0;
 }
 
-int route_new_dynamic(Route **ret) {
+int route_new_dynamic(Route **ret, unsigned char rtm_protocol) {
         _cleanup_route_free_ Route *route = NULL;
 
         route = new0(Route, 1);
@@ -74,6 +76,7 @@ int route_new_dynamic(Route **ret) {
 
         route->family = AF_UNSPEC;
         route->scope = RT_SCOPE_UNIVERSE;
+        route->protocol = rtm_protocol;
 
         *ret = route;
         route = NULL;
@@ -90,7 +93,7 @@ void route_free(Route *route) {
 
                 if (route->section)
                         hashmap_remove(route->network->routes_by_section,
-                                       &route->section);
+                                       UINT_TO_PTR(route->section));
         }
 
         free(route);
@@ -108,7 +111,8 @@ int route_drop(Route *route, Link *link,
         assert(route->family == AF_INET || route->family == AF_INET6);
 
         r = sd_rtnl_message_new_route(link->manager->rtnl, &req,
-                                      RTM_DELROUTE, route->family);
+                                      RTM_DELROUTE, route->family,
+                                      route->protocol);
         if (r < 0) {
                 log_error("Could not create RTM_DELROUTE message: %s", strerror(-r));
                 return r;
@@ -140,6 +144,17 @@ int route_drop(Route *route, Link *link,
                 }
         }
 
+        if (!in_addr_is_null(route->family, &route->prefsrc_addr)) {
+                if (route->family == AF_INET)
+                        r = sd_rtnl_message_append_in_addr(req, RTA_PREFSRC, &route->prefsrc_addr.in);
+                else if (route->family == AF_INET6)
+                        r = sd_rtnl_message_append_in6_addr(req, RTA_PREFSRC, &route->prefsrc_addr.in6);
+                if (r < 0) {
+                        log_error("Could not append RTA_PREFSRC attribute: %s", strerror(-r));
+                        return r;
+                }
+        }
+
         r = sd_rtnl_message_route_set_scope(req, route->scope);
         if (r < 0) {
                 log_error("Could not set scope: %s", strerror(-r));
@@ -181,7 +196,8 @@ int route_configure(Route *route, Link *link,
         assert(route->family == AF_INET || route->family == AF_INET6);
 
         r = sd_rtnl_message_new_route(link->manager->rtnl, &req,
-                                      RTM_NEWROUTE, route->family);
+                                      RTM_NEWROUTE, route->family,
+                                      route->protocol);
         if (r < 0) {
                 log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r));
                 return r;
@@ -213,6 +229,17 @@ int route_configure(Route *route, Link *link,
                 }
         }
 
+        if (!in_addr_is_null(route->family, &route->prefsrc_addr)) {
+                if (route->family == AF_INET)
+                        r = sd_rtnl_message_append_in_addr(req, RTA_PREFSRC, &route->prefsrc_addr.in);
+                else if (route->family == AF_INET6)
+                        r = sd_rtnl_message_append_in6_addr(req, RTA_PREFSRC, &route->prefsrc_addr.in6);
+                if (r < 0) {
+                        log_error("Could not append RTA_PREFSRC attribute: %s", strerror(-r));
+                        return r;
+                }
+        }
+
         r = sd_rtnl_message_route_set_scope(req, route->scope);
         if (r < 0) {
                 log_error("Could not set scope: %s", strerror(-r));
@@ -252,10 +279,11 @@ int config_parse_gateway(const char *unit,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
+
         Network *network = userdata;
         _cleanup_route_free_ Route *n = NULL;
-        _cleanup_free_ char *route = NULL;
-        int r;
+        union in_addr_union buffer;
+        int r, f;
 
         assert(filename);
         assert(section);
@@ -273,13 +301,15 @@ int config_parse_gateway(const char *unit,
         if (r < 0)
                 return r;
 
-        r = net_parse_inaddr(rvalue, &n->family, &n->in_addr);
+        r = in_addr_from_string_auto(rvalue, &f, &buffer);
         if (r < 0) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "Route is invalid, ignoring assignment: %s", route);
+                           "Route is invalid, ignoring assignment: %s", rvalue);
                 return 0;
         }
 
+        n->family = f;
+        n->in_addr = buffer;
         n = NULL;
 
         return 0;
@@ -295,11 +325,12 @@ int config_parse_destination(const char *unit,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
+
         Network *network = userdata;
         _cleanup_route_free_ Route *n = NULL;
-        _cleanup_free_ char *address = NULL;
-        const char *e;
-        int r;
+        const char *address, *e;
+        union in_addr_union buffer;
+        int r, f;
 
         assert(filename);
         assert(section);
@@ -315,17 +346,12 @@ int config_parse_destination(const char *unit,
 
         /* address */
         e = strchr(rvalue, '/');
-        if (e) {
-                address = strndup(rvalue, e - rvalue);
-                if (!address)
-                        return log_oom();
-        } else {
-                address = strdup(rvalue);
-                if (!address)
-                        return log_oom();
-        }
+        if (e)
+                address = strndupa(rvalue, e - rvalue);
+        else
+                address = rvalue;
 
-        r = net_parse_inaddr(address, &n->family, &n->dst_addr);
+        r = in_addr_from_string_auto(address, &f, &buffer);
         if (r < 0) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
                            "Destination is invalid, ignoring assignment: %s", address);
@@ -339,8 +365,7 @@ int config_parse_destination(const char *unit,
                 r = safe_atou(e + 1, &i);
                 if (r < 0) {
                         log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "Route destination prefix length is invalid, "
-                                   "ignoring assignment: %s", e + 1);
+                                   "Route destination prefix length is invalid, ignoring assignment: %s", e + 1);
                         return 0;
                 }
 
@@ -356,6 +381,43 @@ int config_parse_destination(const char *unit,
                 }
         }
 
+        n->family = f;
+        n->dst_addr = buffer;
+        n = NULL;
+
+        return 0;
+}
+
+int config_parse_route_priority(const char *unit,
+                                const char *filename,
+                                unsigned line,
+                                const char *section,
+                                unsigned section_line,
+                                const char *lvalue,
+                                int ltype,
+                                const char *rvalue,
+                                void *data,
+                                void *userdata) {
+        Network *network = userdata;
+        _cleanup_route_free_ Route *n = NULL;
+        int r;
+
+        assert(filename);
+        assert(section);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        r = route_new_static(network, section_line, &n);
+        if (r < 0)
+                return r;
+
+        r = config_parse_unsigned(unit, filename, line, section,
+                                  section_line, lvalue, ltype,
+                                  rvalue, &n->metrics, userdata);
+        if (r < 0)
+                return r;
+
         n = NULL;
 
         return 0;
diff --git a/src/network/networkd-tunnel.c b/src/network/networkd-tunnel.c
deleted file mode 100644 (file)
index 7341487..0000000
+++ /dev/null
@@ -1,567 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-    This file is part of systemd.
-
-    Copyright 2014 Susant Sahani <susant@redhat.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/>.
-***/
-
-#include <netinet/ether.h>
-#include <arpa/inet.h>
-#include <net/if.h>
-#include <linux/ip.h>
-#include <linux/if_tunnel.h>
-
-#include "sd-rtnl.h"
-#include "networkd.h"
-#include "network-internal.h"
-#include "util.h"
-#include "missing.h"
-#include "conf-parser.h"
-
-
-static int netdev_fill_ipip_rtnl_message(Link *link, sd_rtnl_message *m) {
-        NetDev *netdev;
-        int r;
-
-        assert(link);
-        assert(link->network);
-        assert(link->network->tunnel);
-        assert(m);
-
-        netdev = link->network->tunnel;
-
-        assert(netdev->family == AF_INET);
-
-        r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME, attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->mtu) {
-                r = sd_rtnl_message_append_u32(m, IFLA_MTU, netdev->mtu);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_MTU attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
-                                                 netdev_kind_to_string(netdev->kind));
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_LOCAL attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_REMOTE attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TTL, netdev->ttl);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_TTL  attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) {
-        NetDev *netdev;
-        int r;
-
-        assert(link);
-        assert(link->network);
-        assert(link->network->tunnel);
-        assert(m);
-
-        netdev = link->network->tunnel;
-
-        assert(netdev->family == AF_INET);
-
-        r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME, attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->mtu) {
-                r = sd_rtnl_message_append_u32(m, IFLA_MTU, netdev->mtu);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_MTU attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
-                                                 netdev_kind_to_string(netdev->kind));
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u32(m, IFLA_IPTUN_LINK, link->ifindex);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_LOCAL attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_REMOTE attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_TOS, netdev->tos);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_TOS attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_PMTUDISC, netdev->tunnel_pmtudisc);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_PMTUDISC attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) {
-        NetDev *netdev;
-        int r;
-
-        assert(link);
-        assert(link->network);
-        assert(link->network->tunnel);
-        assert(m);
-
-        netdev = link->network->tunnel;
-
-        assert(netdev->family == AF_INET);
-
-        r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME, attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->mtu) {
-                r = sd_rtnl_message_append_u32(m, IFLA_MTU, netdev->mtu);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_MTU attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
-                                                 netdev_kind_to_string(netdev->kind));
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u32(m, IFLA_GRE_LINK, link->ifindex);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_GRE_LINK attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &netdev->local.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_GRE_LOCAL attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &netdev->remote.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_GRE_REMOTE attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TTL, netdev->ttl);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_GRE_TTL attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u8(m, IFLA_GRE_TOS, netdev->tos);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_GRE_TOS attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-static int netdev_fill_vti_rtnl_message(Link *link, sd_rtnl_message *m) {
-        NetDev *netdev;
-        int r;
-
-        assert(link);
-        assert(link->network);
-        assert(link->network->tunnel);
-        assert(m);
-
-        netdev = link->network->tunnel;
-
-        assert(netdev->family == AF_INET);
-
-        r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME, attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->mtu) {
-                r = sd_rtnl_message_append_u32(m, IFLA_MTU, netdev->mtu);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_MTU attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
-                                                 netdev_kind_to_string(netdev->kind));
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u32(m, IFLA_VTI_LINK, link->ifindex);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &netdev->local.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_LOCAL attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &netdev->remote.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_REMOTE attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-int netdev_create_tunnel(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
-        int r;
-
-        assert(netdev);
-        assert(netdev->ifname);
-        assert(netdev->manager);
-        assert(netdev->manager->rtnl);
-        assert(link);
-        assert(link->network);
-        assert(link->network->tunnel == netdev);
-
-        r = sd_rtnl_message_new_link(netdev->manager->rtnl, &m, RTM_NEWLINK, 0);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not allocate RTM_NEWLINK message: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        switch(netdev->kind) {
-        case NETDEV_KIND_IPIP:
-                r = netdev_fill_ipip_rtnl_message(link, m);
-                if(r < 0)
-                        return r;
-                break;
-        case NETDEV_KIND_SIT:
-                r = netdev_fill_sit_rtnl_message(link, m);
-                if(r < 0)
-                        return r;
-                break;
-        case NETDEV_KIND_VTI:
-                netdev_fill_vti_rtnl_message(link, m);
-                if(r < 0)
-                        return r;
-                break;
-        case NETDEV_KIND_GRE:
-                r = netdev_fill_ipgre_rtnl_message(link, m);
-                if(r < 0)
-                        return r;
-                break;
-        default:
-                return -ENOTSUP;
-        }
-
-        r = sd_rtnl_call_async(netdev->manager->rtnl, m, callback, link, 0, NULL);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not send rtnetlink message: %s", strerror(-r));
-                return r;
-        }
-
-        log_debug_netdev(netdev, "Creating tunnel netdev: %s",
-                         netdev_kind_to_string(netdev->kind));
-
-        netdev->state = NETDEV_STATE_CREATING;
-
-        return 0;
-}
-
-int config_parse_tunnel_address(const char *unit,
-                                const char *filename,
-                                unsigned line,
-                                const char *section,
-                                unsigned section_line,
-                                const char *lvalue,
-                                int ltype,
-                                const char *rvalue,
-                                void *data,
-                                void *userdata) {
-        NetDev *n = userdata;
-        union in_addr_union *addr = data;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        r = net_parse_inaddr(rvalue, &n->family, addr);
-        if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "Tunnel address is invalid, ignoring assignment: %s", rvalue);
-                return 0;
-        }
-
-        return 0;
-}
diff --git a/src/network/networkd-tuntap.c b/src/network/networkd-tuntap.c
deleted file mode 100644 (file)
index ae2d5c1..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-    This file is part of systemd.
-
-    Copyright 2014 Susant Sahani <susant@redhat.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/>.
-***/
-
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <linux/if_tun.h>
-
-#include "networkd.h"
-
-#define TUN_DEV "/dev/net/tun"
-
-
-static int netdev_fill_tuntap_message(NetDev *netdev, struct ifreq *ifr) {
-
-        assert(netdev);
-        assert(ifr);
-
-        memset(ifr, 0, sizeof(*ifr));
-
-        if (netdev->kind == NETDEV_KIND_TAP)
-                ifr->ifr_flags |= IFF_TAP;
-        else
-                ifr->ifr_flags |= IFF_TUN;
-
-        if (!netdev->packet_info)
-                ifr->ifr_flags |= IFF_NO_PI;
-
-        if (netdev->one_queue)
-                ifr->ifr_flags |= IFF_ONE_QUEUE;
-
-        if (netdev->multi_queue)
-                ifr->ifr_flags |= IFF_MULTI_QUEUE;
-
-        strncpy(ifr->ifr_name, netdev->ifname, IFNAMSIZ-1);
-
-        return 0;
-}
-
-static int netdev_tuntap_add(NetDev *netdev, struct ifreq *ifr) {
-        _cleanup_close_ int fd;
-        const char *user;
-        const char *group;
-        uid_t uid;
-        gid_t gid;
-        int r = 0;
-
-        fd = open(TUN_DEV, O_RDWR);
-        if (fd < 0) {
-                log_error_netdev(netdev,
-                                 "Failed to open tun dev: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = ioctl(fd, TUNSETIFF, ifr);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "TUNSETIFF failed on tun dev: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->user_name) {
-
-                user = netdev->user_name;
-
-                r = get_user_creds(&user, &uid, NULL, NULL, NULL);
-                if (r < 0) {
-                        log_error("Cannot resolve user name %s: %s",
-                                  netdev->user_name, strerror(-r));
-                        return 0;
-                }
-
-                r = ioctl(fd, TUNSETOWNER, uid);
-                if ( r < 0) {
-                        log_error_netdev(netdev,
-                                         "TUNSETOWNER failed on tun dev: %s",
-                                         strerror(-r));
-                }
-        }
-
-        if(netdev->group_name) {
-
-                group = netdev->group_name;
-
-                r = get_group_creds(&group, &gid);
-                if (r < 0) {
-                        log_error("Cannot resolve group name %s: %s",
-                                  netdev->group_name, strerror(-r));
-                        return 0;
-                }
-
-                r = ioctl(fd, TUNSETGROUP, gid);
-                if( r < 0) {
-                        log_error_netdev(netdev,
-                                         "TUNSETGROUP failed on tun dev: %s",
-                                         strerror(-r));
-                        return r;
-                }
-
-        }
-
-        r = ioctl(fd, TUNSETPERSIST, 1);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "TUNSETPERSIST failed on tun dev: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-int netdev_create_tuntap(NetDev *netdev) {
-        struct ifreq ifr;
-        int r;
-
-        assert(netdev);
-        assert(netdev->ifname);
-
-        switch(netdev->kind) {
-        case NETDEV_KIND_TUN:
-        case NETDEV_KIND_TAP:
-                break;
-        default:
-                return -ENOTSUP;
-        }
-
-        r = netdev_fill_tuntap_message(netdev, &ifr);
-        if(r < 0)
-                return r;
-
-        log_debug_netdev(netdev, "Creating tuntap netdev: %s",
-                         netdev_kind_to_string(netdev->kind));
-
-        return netdev_tuntap_add(netdev, &ifr);
-}
diff --git a/src/network/networkd-veth.c b/src/network/networkd-veth.c
deleted file mode 100644 (file)
index 3eac90b..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-    This file is part of systemd.
-
-    Copyright 2014 Susant Sahani <susant@redhat.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/>.
-***/
-
-#include <netinet/ether.h>
-#include <arpa/inet.h>
-#include <net/if.h>
-#include <linux/veth.h>
-
-#include "sd-rtnl.h"
-#include "networkd.h"
-
-
-static int netdev_fill_veth_rtnl_message(NetDev *netdev, sd_rtnl_message *m) {
-        int r;
-
-        assert(netdev);
-        assert(m);
-
-        r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME, attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
-                                                 netdev_kind_to_string(netdev->kind));
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container(m, VETH_INFO_PEER);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IPTUN_LINK attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (netdev->ifname_peer) {
-                r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname_peer);
-                if (r < 0) {
-                        log_error("Failed to add netlink interface name: %s", strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac_peer) {
-                r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac_peer);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-int netdev_create_veth(NetDev *netdev, sd_rtnl_message_handler_t callback) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
-        int r;
-
-        assert(netdev);
-        assert(netdev->ifname);
-        assert(netdev->manager);
-        assert(netdev->manager->rtnl);
-
-        r = sd_rtnl_message_new_link(netdev->manager->rtnl, &m, RTM_NEWLINK, 0);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not allocate RTM_NEWLINK message: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->kind != NETDEV_KIND_VETH)
-                return -ENOTSUP;
-
-        r = netdev_fill_veth_rtnl_message(netdev, m);
-        if(r < 0)
-                return r;
-
-        r = sd_rtnl_call_async(netdev->manager->rtnl, m, callback, netdev, 0, NULL);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not send rtnetlink message: %s", strerror(-r));
-                return r;
-        }
-
-        netdev_ref(netdev);
-
-        log_debug_netdev(netdev, "Creating veth netdev: %s",
-                         netdev_kind_to_string(netdev->kind));
-
-        netdev->state = NETDEV_STATE_CREATING;
-
-        return 0;
-}
diff --git a/src/network/networkd-vlan.c b/src/network/networkd-vlan.c
deleted file mode 100644 (file)
index 1d812fd..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2013 Tom Gundersen <teg@jklm.no>
-
-  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/>.
-***/
-
-#include <net/if.h>
-
-#include "networkd.h"
-#include "network-internal.h"
-#include "list.h"
-
-int netdev_create_vlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
-        const char *kind;
-        int r;
-
-        assert(netdev);
-        assert(netdev->kind == NETDEV_KIND_VLAN);
-        assert(link);
-        assert(callback);
-        assert(netdev->ifname);
-        assert(netdev->manager);
-        assert(netdev->manager->rtnl);
-
-        r = sd_rtnl_message_new_link(netdev->manager->rtnl, &req, RTM_NEWLINK, 0);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not allocate RTM_NEWLINK message: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (link) {
-                r = sd_rtnl_message_append_u32(req, IFLA_LINK, link->ifindex);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_LINK attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        r = sd_rtnl_message_append_string(req, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (netdev->mtu) {
-                r = sd_rtnl_message_append_u32(req, IFLA_MTU, netdev->mtu);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_MTU attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if (netdev->mac) {
-                r = sd_rtnl_message_append_ether_addr(req, IFLA_ADDRESS, netdev->mac);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Colud not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
-        }
-
-        r = sd_rtnl_message_open_container(req, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not open IFLA_LINKINFO container: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        kind = netdev_kind_to_string(netdev->kind);
-        if (!kind) {
-                log_error_netdev(netdev, "Invalid kind");
-                return -EINVAL;
-        }
-
-        r = sd_rtnl_message_open_container_union(req, IFLA_INFO_DATA, kind);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not open IFLA_INFO_DATA container: %s",
-                                  strerror(-r));
-                return r;
-        }
-
-        if (netdev->vlanid <= VLANID_MAX) {
-                r = sd_rtnl_message_append_u16(req, IFLA_VLAN_ID, netdev->vlanid);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_VLAN_ID attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        r = sd_rtnl_message_close_container(req);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not close IFLA_INFO_DATA container %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(req);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not close IFLA_LINKINFO container %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_call_async(netdev->manager->rtnl, req, callback, link, 0, NULL);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not send rtnetlink message: %s", strerror(-r));
-                return r;
-        }
-
-        log_debug_netdev(netdev, "creating netdev");
-
-        netdev->state = NETDEV_STATE_CREATING;
-
-        return 0;
-}
diff --git a/src/network/networkd-vxlan.c b/src/network/networkd-vxlan.c
deleted file mode 100644 (file)
index 8832024..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-    This file is part of systemd.
-
-    Copyright 2014 Susant Sahani <susant@redhat.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/>.
-***/
-
-#include <netinet/ether.h>
-#include <arpa/inet.h>
-#include <net/if.h>
-
-#include "sd-rtnl.h"
-#include "networkd.h"
-#include "missing.h"
-
-
-static int netdev_fill_vxlan_rtnl_message(NetDev *netdev, Link *link, sd_rtnl_message *m) {
-        int r;
-
-        assert(link);
-        assert(link->network);
-        assert(m);
-
-        r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_IFNAME, attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA,
-                                                 netdev_kind_to_string(netdev->kind));
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if (netdev->vlanid <= VXLAN_VID_MAX) {
-                r = sd_rtnl_message_append_u32(m, IFLA_VXLAN_ID, netdev->vxlanid);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_VXLAN_ID attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        r = sd_rtnl_message_append_in_addr(m, IFLA_VXLAN_GROUP, &netdev->group.in);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_VXLAN_GROUP attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_append_u32(m, IFLA_VXLAN_LINK, link->ifindex);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_VXLAN_LINK attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        if(netdev->ttl) {
-                r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_TTL, netdev->ttl);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_VXLAN_TTL attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if(netdev->tos) {
-                r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_TOS, netdev->tos);
-                if (r < 0) {
-                        log_error_netdev(netdev,
-                                         "Could not append IFLA_VXLAN_TOS attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_LEARNING, netdev->learning);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_VXLAN_LEARNING attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not append IFLA_LINKINFO attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        return r;
-}
-
-int netdev_create_vxlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) {
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
-        int r;
-
-        assert(netdev);
-        assert(!(netdev->kind == NETDEV_KIND_VXLAN) || (link && callback));
-        assert(netdev->ifname);
-        assert(netdev->manager);
-        assert(netdev->manager->rtnl);
-
-        r = sd_rtnl_message_new_link(netdev->manager->rtnl, &m, RTM_NEWLINK, 0);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not allocate RTM_NEWLINK message: %s",
-                                 strerror(-r));
-                return r;
-        }
-
-        r = netdev_fill_vxlan_rtnl_message(netdev, link, m);
-        if(r < 0)
-                return r;
-
-        r = sd_rtnl_call_async(netdev->manager->rtnl, m, callback, link, 0, NULL);
-        if (r < 0) {
-                log_error_netdev(netdev,
-                                 "Could not send rtnetlink message: %s", strerror(-r));
-                return r;
-        }
-
-        log_debug_netdev(netdev, "Creating vxlan netdev: %s",
-                         netdev_kind_to_string(netdev->kind));
-
-        netdev->state = NETDEV_STATE_CREATING;
-
-        return 0;
-}
diff --git a/src/network/networkd-wait-online-link.c b/src/network/networkd-wait-online-link.c
new file mode 100644 (file)
index 0000000..268ab67
--- /dev/null
@@ -0,0 +1,145 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+  Copyright 2014 Tom Gundersen
+
+  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/>.
+***/
+
+#include <net/if.h>
+
+#include "sd-network.h"
+#include "strv.h"
+
+#include "networkd-wait-online-link.h"
+
+int link_new(Manager *m, Link **ret, int ifindex, const char *ifname) {
+        _cleanup_(link_freep) Link *l = NULL;
+        int r;
+
+        assert(m);
+        assert(ifindex > 0);
+
+        r = hashmap_ensure_allocated(&m->links, NULL);
+        if (r < 0)
+                return r;
+
+        r = hashmap_ensure_allocated(&m->links_by_name, &string_hash_ops);
+        if (r < 0)
+                return r;
+
+        l = new0(Link, 1);
+        if (!l)
+                return -ENOMEM;
+
+        l->manager = m;
+
+        l->ifname = strdup(ifname);
+        if (!l->ifname)
+                return -ENOMEM;
+
+        r = hashmap_put(m->links_by_name, l->ifname, l);
+        if (r < 0)
+                return r;
+
+        l->ifindex = ifindex;
+
+        r = hashmap_put(m->links, INT_TO_PTR(ifindex), l);
+        if (r < 0)
+                return r;
+
+        if (ret)
+                *ret = l;
+        l = NULL;
+
+        return 0;
+}
+
+Link *link_free(Link *l) {
+
+        if (!l)
+                return NULL;
+
+        if (l->manager) {
+                hashmap_remove(l->manager->links, INT_TO_PTR(l->ifindex));
+                hashmap_remove(l->manager->links_by_name, l->ifname);
+        }
+
+        free(l->ifname);
+        free(l);
+        return NULL;
+ }
+
+int link_update_rtnl(Link *l, sd_rtnl_message *m) {
+        const char *ifname;
+        int r;
+
+        assert(l);
+        assert(l->manager);
+        assert(m);
+
+        r = sd_rtnl_message_link_get_flags(m, &l->flags);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_message_read_string(m, IFLA_IFNAME, &ifname);
+        if (r < 0)
+                return r;
+
+        if (!streq(l->ifname, ifname)) {
+                char *new_ifname;
+
+                new_ifname = strdup(ifname);
+                if (!new_ifname)
+                        return -ENOMEM;
+
+                hashmap_remove(l->manager->links_by_name, l->ifname);
+                free(l->ifname);
+                l->ifname = new_ifname;
+
+                r = hashmap_put(l->manager->links_by_name, l->ifname, l);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+int link_update_monitor(Link *l) {
+        assert(l);
+
+        free(l->operational_state);
+        l->operational_state = NULL;
+
+        sd_network_link_get_operational_state(l->ifindex, &l->operational_state);
+
+        free(l->state);
+        l->state = NULL;
+
+        sd_network_link_get_setup_state(l->ifindex, &l->state);
+
+        return 0;
+}
+
+bool link_relevant(Link *l) {
+        assert(l);
+
+        if (l->flags & IFF_LOOPBACK)
+                return false;
+
+        return true;
+}
diff --git a/src/network/networkd-wait-online-link.h b/src/network/networkd-wait-online-link.h
new file mode 100644 (file)
index 0000000..90ea6b3
--- /dev/null
@@ -0,0 +1,46 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+  Copyright 2014 Tom Gundersen
+
+  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/>.
+***/
+
+typedef struct Link Link;
+
+#include "networkd-wait-online.h"
+
+struct Link {
+        Manager *manager;
+
+        int ifindex;
+        char *ifname;
+        unsigned flags;
+
+        char *operational_state;
+        char *state;
+};
+
+int link_new(Manager *m, Link **ret, int ifindex, const char *ifname);
+Link *link_free(Link *l);
+int link_update_rtnl(Link *l, sd_rtnl_message *m);
+int link_update_monitor(Link *l);
+bool link_relevant(Link *l);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);
diff --git a/src/network/networkd-wait-online-manager.c b/src/network/networkd-wait-online-manager.c
new file mode 100644 (file)
index 0000000..6e3ec69
--- /dev/null
@@ -0,0 +1,304 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#include <netinet/ether.h>
+#include <linux/if.h>
+
+#include "rtnl-util.h"
+
+#include "network-util.h"
+#include "network-internal.h"
+#include "networkd-wait-online-link.h"
+#include "networkd-wait-online.h"
+
+#include "util.h"
+
+bool manager_all_configured(Manager *m) {
+        Iterator i;
+        Link *l;
+        char **ifname;
+        bool one_ready = false;
+
+        /* wait for all the links given on the commandline to appear */
+        STRV_FOREACH(ifname, m->interfaces) {
+                l = hashmap_get(m->links_by_name, *ifname);
+                if (!l) {
+                        log_debug("still waiting for %s", *ifname);
+                        return false;
+                }
+        }
+
+        /* wait for all links networkd manages to be in admin state 'configured'
+           and at least one link to gain a carrier */
+        HASHMAP_FOREACH(l, m->links, i) {
+                if (!link_relevant(l)) {
+                        log_info("ignore irrelevant link: %s", l->ifname);
+                        continue;
+                }
+
+                if (!l->state) {
+                        log_debug("link %s has not yet been processed by udev",
+                                  l->ifname);
+                        return false;
+                }
+
+                if (streq(l->state, "configuring")) {
+                        log_debug("link %s is being processed by networkd",
+                                  l->ifname);
+                        return false;
+                }
+
+                if (l->operational_state &&
+                    STR_IN_SET(l->operational_state, "degraded", "routable"))
+                        /* we wait for at least one link to be ready,
+                           regardless of who manages it */
+                        one_ready = true;
+        }
+
+        return one_ready;
+}
+
+static int manager_process_link(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) {
+        Manager *m = userdata;
+        uint16_t type;
+        Link *l;
+        const char *ifname;
+        int ifindex, r;
+
+        assert(rtnl);
+        assert(m);
+        assert(mm);
+
+        r = sd_rtnl_message_get_type(mm, &type);
+        if (r < 0)
+                goto fail;
+
+        r = sd_rtnl_message_link_get_ifindex(mm, &ifindex);
+        if (r < 0)
+                goto fail;
+
+        r = sd_rtnl_message_read_string(mm, IFLA_IFNAME, &ifname);
+        if (r < 0)
+                goto fail;
+
+        l = hashmap_get(m->links, INT_TO_PTR(ifindex));
+
+        switch (type) {
+
+        case RTM_NEWLINK:
+                if (!l) {
+                        log_debug("Found link %i", ifindex);
+
+                        r = link_new(m, &l, ifindex, ifname);
+                        if (r < 0)
+                                goto fail;
+
+                        r = link_update_monitor(l);
+                        if (r < 0)
+                                goto fail;
+                }
+
+                r = link_update_rtnl(l, mm);
+                if (r < 0)
+                        goto fail;
+
+                break;
+
+        case RTM_DELLINK:
+                if (l) {
+                        log_debug("Removing link %i", l->ifindex);
+                        link_free(l);
+                }
+
+                break;
+        }
+
+        return 0;
+
+fail:
+        log_warning("Failed to process RTNL link message: %s", strerror(-r));
+        return 0;
+}
+
+static int on_rtnl_event(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) {
+        Manager *m = userdata;
+        int r;
+
+        r = manager_process_link(rtnl, mm, m);
+        if (r < 0)
+                return r;
+
+        if (manager_all_configured(m))
+                sd_event_exit(m->event, 0);
+
+        return 1;
+}
+
+static int manager_rtnl_listen(Manager *m) {
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
+        sd_rtnl_message *i;
+        int r;
+
+        assert(m);
+
+        /* First, subscibe to interfaces coming and going */
+        r = sd_rtnl_open(&m->rtnl, 3, RTNLGRP_LINK, RTNLGRP_IPV4_IFADDR, RTNLGRP_IPV6_IFADDR);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_attach_event(m->rtnl, m->event, 0);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_add_match(m->rtnl, RTM_NEWLINK, on_rtnl_event, m);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_add_match(m->rtnl, RTM_DELLINK, on_rtnl_event, m);
+        if (r < 0)
+                return r;
+
+        /* Then, enumerate all links */
+        r = sd_rtnl_message_new_link(m->rtnl, &req, RTM_GETLINK, 0);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_message_request_dump(req, true);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_call(m->rtnl, req, 0, &reply);
+        if (r < 0)
+                return r;
+
+        for (i = reply; i; i = sd_rtnl_message_next(i)) {
+                r = manager_process_link(m->rtnl, i, m);
+                if (r < 0)
+                        return r;
+        }
+
+        return r;
+}
+
+static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        Manager *m = userdata;
+        Iterator i;
+        Link *l;
+        int r;
+
+        assert(m);
+
+        sd_network_monitor_flush(m->network_monitor);
+
+        HASHMAP_FOREACH(l, m->links, i) {
+                r = link_update_monitor(l);
+                if (r < 0)
+                        log_warning("Failed to update monitor information for %i: %s", l->ifindex, strerror(-r));
+        }
+
+        if (manager_all_configured(m))
+                sd_event_exit(m->event, 0);
+
+        return 0;
+}
+
+static int manager_network_monitor_listen(Manager *m) {
+        int r, fd, events;
+
+        assert(m);
+
+        r = sd_network_monitor_new(&m->network_monitor, NULL);
+        if (r < 0)
+                return r;
+
+        fd = sd_network_monitor_get_fd(m->network_monitor);
+        if (fd < 0)
+                return fd;
+
+        events = sd_network_monitor_get_events(m->network_monitor);
+        if (events < 0)
+                return events;
+
+        r = sd_event_add_io(m->event, &m->network_monitor_event_source,
+                            fd, events, &on_network_event, m);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+int manager_new(Manager **ret, char **interfaces) {
+        _cleanup_(manager_freep) Manager *m = NULL;
+        int r;
+
+        assert(ret);
+
+        m = new0(Manager, 1);
+        if (!m)
+                return -ENOMEM;
+
+        m->interfaces = interfaces;
+
+        r = sd_event_default(&m->event);
+        if (r < 0)
+                return r;
+
+        sd_event_add_signal(m->event, NULL, SIGTERM, NULL,  NULL);
+        sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+
+        sd_event_set_watchdog(m->event, true);
+
+        r = manager_network_monitor_listen(m);
+        if (r < 0)
+                return r;
+
+        r = manager_rtnl_listen(m);
+        if (r < 0)
+                return r;
+
+        *ret = m;
+        m = NULL;
+
+        return 0;
+}
+
+void manager_free(Manager *m) {
+        Link *l;
+
+        if (!m)
+                return;
+
+        while ((l = hashmap_first(m->links)))
+               link_free(l);
+        hashmap_free(m->links);
+        hashmap_free(m->links_by_name);
+
+        sd_event_source_unref(m->network_monitor_event_source);
+        sd_network_monitor_unref(m->network_monitor);
+
+        sd_event_source_unref(m->rtnl_event_source);
+        sd_rtnl_unref(m->rtnl);
+
+        sd_event_unref(m->event);
+        free(m);
+
+        return;
+}
index c6038c63bfaa77d534e86de38a83d3de7ca354ed..714343656b268d7019aaa96377f61a7348fc3b49 100644 (file)
@@ -1,4 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
 /***
   This file is part of systemd.
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <netinet/ether.h>
-#include <linux/if.h>
 #include <getopt.h>
 
-#include "sd-event.h"
-#include "event-util.h"
-#include "sd-rtnl.h"
-#include "rtnl-util.h"
 #include "sd-daemon.h"
-#include "sd-network.h"
-#include "network-util.h"
-#include "network-internal.h"
+
 #include "networkd-wait-online.h"
 
-#include "conf-parser.h"
 #include "strv.h"
-#include "util.h"
 #include "build.h"
 
 static bool arg_quiet = false;
 static char **arg_interfaces = NULL;
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...]\n\n"
                "Block until network is configured.\n\n"
                "  -h --help                 Show this help\n"
                "     --version              Print version string\n"
                "  -q --quiet                Do not show status information\n"
-               "  -i --interface=INTERFACE  Block until at least these interfaces have appeared\n",
-               program_invocation_short_name);
-
-        return 0;
+               "  -i --interface=INTERFACE  Block until at least these interfaces have appeared\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -73,12 +59,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+hq", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "+hiq", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case 'q':
                         arg_quiet = true;
@@ -101,134 +88,20 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
-
-        return 1;
-}
-
-static bool all_configured(Manager *m) {
-        _cleanup_free_ unsigned *indices = NULL;
-        char **ifname;
-        bool one_ready = false;
-        int r, n, i;
-
-        n = sd_network_get_ifindices(&indices);
-        if (n <= 0)
-                return false;
-
-        /* wait for networkd to be aware of all the links given on the commandline */
-        STRV_FOREACH(ifname, arg_interfaces) {
-                _cleanup_rtnl_message_unref_ sd_rtnl_message *message = NULL, *reply = NULL;
-                bool found = false;
-                int index;
-
-                r = sd_rtnl_message_new_link(m->rtnl, &message, RTM_GETLINK, 0);
-                if (r < 0) {
-                        log_warning("could not create GETLINK message: %s", strerror(-r));
-                        return false;
-                }
-
-                r = sd_rtnl_message_append_string(message, IFLA_IFNAME, *ifname);
-                if (r < 0) {
-                        log_warning("could not attach ifname to GETLINK message: %s", strerror(-r));
-                        return false;
-                }
-
-                r = sd_rtnl_call(m->rtnl, message, 0, &reply);
-                if (r < 0) {
-                        if (r != -ENODEV)
-                                log_warning("could not get link info for %s: %s", *ifname,
-                                            strerror(-r));
-
-                        /* link does not yet exist */
-                        return false;
-                }
-
-                r = sd_rtnl_message_link_get_ifindex(reply, &index);
-                if (r < 0) {
-                        log_warning("could not get ifindex: %s", strerror(-r));
-                        return false;
-                }
-
-                if (index <= 0) {
-                        log_warning("invalid ifindex %d for %s", index, *ifname);
-                        return false;
-                }
-
-                for (i = 0; i < n; i++) {
-                        if (indices[i] == (unsigned) index) {
-                                found = true;
-                                break;
-                        }
-                }
-
-                if (!found) {
-                        /* link exists, but networkd is not yet aware of it */
-                        return false;
-                }
-        }
-
-        /* wait for all links networkd manages to be in admin state 'configured'
-           and at least one link to gain a carrier */
-        for (i = 0; i < n; i++) {
-                _cleanup_free_ char *state = NULL, *oper_state = NULL;
-
-                if (sd_network_link_is_loopback(indices[i]))
-                        /* ignore loopback devices */
-                        continue;
-
-                r = sd_network_get_link_state(indices[i], &state);
-                if (r == -EBUSY || (r >= 0 && !streq(state, "configured")))
-                        /* not yet processed by udev, or managed by networkd, but not yet configured */
-                        return false;
-
-                r = sd_network_get_link_operational_state(indices[i], &oper_state);
-                if (r >= 0 &&
-                    (streq(oper_state, "degraded") ||
-                     streq(oper_state, "routable")))
-                        /* we wait for at least one link to be ready,
-                           regardless of who manages it */
-                        one_ready = true;
-        }
-
-        return one_ready;
-}
-
-static int monitor_event_handler(sd_event_source *s, int fd, uint32_t revents,
-                         void *userdata) {
-        Manager *m = userdata;
-
-        assert(m);
-        assert(m->event);
-
-        if (all_configured(m))
-                sd_event_exit(m->event, 0);
-
-        sd_network_monitor_flush(m->monitor);
 
         return 1;
 }
 
-void manager_free(Manager *m) {
-        if (!m)
-                return;
-
-        sd_event_unref(m->event);
-        sd_rtnl_unref(m->rtnl);
-
-        free(m);
-}
-
 int main(int argc, char *argv[]) {
-        _cleanup_manager_free_ Manager *m = NULL;
-        _cleanup_event_source_unref_ sd_event_source *event_source = NULL;
-        int r, fd, events;
-
-        umask(0022);
+        _cleanup_(manager_freep) Manager *m = NULL;
+        int r;
 
+        log_set_target(LOG_TARGET_AUTO);
         log_parse_environment();
         log_open();
 
+        umask(0022);
+
         r = parse_argv(argc, argv);
         if (r <= 0)
                 return r;
@@ -236,50 +109,17 @@ int main(int argc, char *argv[]) {
         if (arg_quiet)
                 log_set_max_level(LOG_WARNING);
 
-        m = new0(Manager, 1);
-        if (!m)
-                return log_oom();
+        assert_se(sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, -1) == 0);
 
-        r = sd_event_new(&m->event);
+        r = manager_new(&m, arg_interfaces);
         if (r < 0) {
-                log_error("Could not create event: %s", strerror(-r));
-                goto out;
+                log_error("Could not create manager: %s", strerror(-r));
+                goto finish;
         }
 
-        r = sd_rtnl_open(&m->rtnl, 0);
-        if (r < 0) {
-                log_error("Could not create rtnl: %s", strerror(-r));
-                goto out;
-        }
-
-        r = sd_network_monitor_new(NULL, &m->monitor);
-        if (r < 0) {
-                log_error("Could not create monitor: %s", strerror(-r));
-                goto out;
-        }
-
-        fd = sd_network_monitor_get_fd(m->monitor);
-        if (fd < 0) {
-                log_error("Could not get monitor fd: %s", strerror(-r));
-                goto out;
-        }
-
-        events = sd_network_monitor_get_events(m->monitor);
-        if (events < 0) {
-                log_error("Could not get monitor events: %s", strerror(-r));
-                goto out;
-        }
-
-        r = sd_event_add_io(m->event, &event_source, fd, events, &monitor_event_handler,
-                            m);
-        if (r < 0) {
-                log_error("Could not add io event source: %s", strerror(-r));
-                goto out;
-        }
-
-        if (all_configured(m)) {
+        if (manager_all_configured(m)) {
                 r = 0;
-                goto out;
+                goto finish;
         }
 
         sd_notify(false,
@@ -289,12 +129,11 @@ int main(int argc, char *argv[]) {
         r = sd_event_loop(m->event);
         if (r < 0) {
                 log_error("Event loop failed: %s", strerror(-r));
-                goto out;
+                goto finish;
         }
 
-out:
-        sd_notify(false,
-                  "STATUS=All interfaces configured...");
+finish:
+        sd_notify(false, "STATUS=All interfaces configured...");
 
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index e894351d2e4125916c839884d38323a389e5d2e3..c57f902e9e763108babbee1fd98af2c760b2e8a1 100644 (file)
 
 #include "sd-event.h"
 #include "sd-rtnl.h"
+#include "sd-network.h"
 
 #include "util.h"
+#include "hashmap.h"
 
 typedef struct Manager {
-        sd_event *event;
+        Hashmap *links;
+        Hashmap *links_by_name;
+
+        char **interfaces;
+
         sd_rtnl *rtnl;
-        sd_network_monitor *monitor;
+        sd_event_source *rtnl_event_source;
+
+        sd_network_monitor *network_monitor;
+        sd_event_source *network_monitor_event_source;
+
+        sd_event *event;
 } Manager;
 
 void manager_free(Manager *m);
+int manager_new(Manager **ret, char **interfaces);
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
-#define _cleanup_manager_free_ _cleanup_(manager_freep)
+
+bool manager_all_configured(Manager *m);
index d6075359c880411e7bd8d83650736994dd533814..fdb80368d4dddfce19cfcd5cbd6068e3b9770418 100644 (file)
@@ -75,6 +75,8 @@ int main(int argc, char *argv[]) {
         if (r < 0)
                 goto out;
 
+        assert_se(sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, -1) == 0);
+
         r = manager_new(&m);
         if (r < 0) {
                 log_error("Could not create manager: %s", strerror(-r));
@@ -123,6 +125,7 @@ int main(int argc, char *argv[]) {
 
 out:
         sd_notify(false,
+                  "STOPPING=1\n"
                   "STATUS=Shutting down...");
 
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
index 6a001751570d2a57e4d473e24b56564c91dcd7cf..d4e79ab2f339badf6afb61761f90c70e39a60543 100644 (file)
 #include "list.h"
 #include "set.h"
 #include "condition-util.h"
-#include "socket-util.h"
+#include "in-addr-util.h"
 
 #define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU
-#define VXLAN_VID_MAX (1u << 24) - 1
-#define DHCP_STATIC_ROUTE_METRIC 1024
+#define DHCP_ROUTE_METRIC 1024
+#define IPV4LL_ROUTE_METRIC 2048
 
 typedef struct NetDev NetDev;
 typedef struct Network Network;
@@ -52,96 +52,6 @@ typedef struct Route Route;
 typedef struct Manager Manager;
 typedef struct AddressPool AddressPool;
 
-typedef struct netdev_enslave_callback netdev_enslave_callback;
-
-struct netdev_enslave_callback {
-        sd_rtnl_message_handler_t callback;
-        Link *link;
-
-        LIST_FIELDS(netdev_enslave_callback, callbacks);
-};
-
-typedef enum MacVlanMode {
-        NETDEV_MACVLAN_MODE_PRIVATE = MACVLAN_MODE_PRIVATE,
-        NETDEV_MACVLAN_MODE_VEPA = MACVLAN_MODE_VEPA,
-        NETDEV_MACVLAN_MODE_BRIDGE = MACVLAN_MODE_BRIDGE,
-        NETDEV_MACVLAN_MODE_PASSTHRU = MACVLAN_MODE_PASSTHRU,
-        _NETDEV_MACVLAN_MODE_MAX,
-        _NETDEV_MACVLAN_MODE_INVALID = -1
-} MacVlanMode;
-
-typedef enum NetDevKind {
-        NETDEV_KIND_BRIDGE,
-        NETDEV_KIND_BOND,
-        NETDEV_KIND_VLAN,
-        NETDEV_KIND_MACVLAN,
-        NETDEV_KIND_VXLAN,
-        NETDEV_KIND_IPIP,
-        NETDEV_KIND_GRE,
-        NETDEV_KIND_SIT,
-        NETDEV_KIND_VETH,
-        NETDEV_KIND_VTI,
-        NETDEV_KIND_DUMMY,
-        NETDEV_KIND_TUN,
-        NETDEV_KIND_TAP,
-        _NETDEV_KIND_MAX,
-        _NETDEV_KIND_INVALID = -1
-} NetDevKind;
-
-typedef enum NetDevState {
-        NETDEV_STATE_FAILED,
-        NETDEV_STATE_CREATING,
-        NETDEV_STATE_READY,
-        NETDEV_STATE_LINGER,
-        _NETDEV_STATE_MAX,
-        _NETDEV_STATE_INVALID = -1,
-} NetDevState;
-
-struct NetDev {
-        Manager *manager;
-
-        int n_ref;
-
-        char *filename;
-
-        Condition *match_host;
-        Condition *match_virt;
-        Condition *match_kernel;
-        Condition *match_arch;
-
-        char *description;
-        char *ifname;
-        char *ifname_peer;
-        char *user_name;
-        char *group_name;
-        size_t mtu;
-        struct ether_addr *mac;
-        struct ether_addr *mac_peer;
-        NetDevKind kind;
-
-        uint64_t vlanid;
-        uint64_t vxlanid;
-        int32_t macvlan_mode;
-
-        int ifindex;
-        NetDevState state;
-
-        bool tunnel_pmtudisc;
-        bool learning;
-        bool one_queue;
-        bool multi_queue;
-        bool packet_info;
-
-        unsigned ttl;
-        unsigned tos;
-        unsigned char family;
-        union in_addr_union local;
-        union in_addr_union remote;
-        union in_addr_union group;
-
-        LIST_HEAD(netdev_enslave_callback, callbacks);
-};
-
 typedef enum DHCPSupport {
         DHCP_SUPPORT_NONE,
         DHCP_SUPPORT_BOTH,
@@ -151,6 +61,14 @@ typedef enum DHCPSupport {
         _DHCP_SUPPORT_INVALID = -1,
 } DHCPSupport;
 
+typedef enum LLMNRSupport {
+        LLMNR_SUPPORT_NO,
+        LLMNR_SUPPORT_YES,
+        LLMNR_SUPPORT_RESOLVE,
+        _LLMNR_SUPPORT_MAX,
+        _LLMNR_SUPPORT_INVALID = -1,
+} LLMNRSupport;
+
 struct Network {
         Manager *manager;
 
@@ -161,6 +79,8 @@ struct Network {
         char *match_driver;
         char *match_type;
         char *match_name;
+        char *dhcp_vendor_class_identifier;
+
         Condition *match_host;
         Condition *match_virt;
         Condition *match_kernel;
@@ -169,20 +89,20 @@ struct Network {
         char *description;
         NetDev *bridge;
         NetDev *bond;
-        NetDev *tunnel;
-        Hashmap *vlans;
-        Hashmap *macvlans;
-        Hashmap *vxlans;
+        Hashmap *stacked_netdevs;
         DHCPSupport dhcp;
         bool dhcp_dns;
         bool dhcp_ntp;
         bool dhcp_mtu;
         bool dhcp_hostname;
-        bool dhcp_domainname;
+        bool dhcp_domains;
         bool dhcp_sendhost;
+        bool dhcp_broadcast;
         bool dhcp_critical;
         bool dhcp_routes;
+        unsigned dhcp_route_metric;
         bool ipv4ll;
+        bool ipv4ll_route;
 
         bool dhcp_server;
 
@@ -192,110 +112,54 @@ struct Network {
         Hashmap *addresses_by_section;
         Hashmap *routes_by_section;
 
-        LIST_HEAD(Address, dns);
-        LIST_HEAD(Address, ntp);
+        bool wildcard_domain;
+        char **domains, **dns, **ntp;
+
+        LLMNRSupport llmnr;
 
         LIST_FIELDS(Network, networks);
 };
 
 struct Address {
         Network *network;
-        uint64_t section;
+        unsigned section;
 
-        unsigned char family;
+        int family;
         unsigned char prefixlen;
         unsigned char scope;
+        unsigned char flags;
         char *label;
 
         struct in_addr broadcast;
         struct ifa_cacheinfo cinfo;
 
         union in_addr_union in_addr;
+        union in_addr_union in_addr_peer;
 
         LIST_FIELDS(Address, addresses);
 };
 
 struct Route {
         Network *network;
-        uint64_t section;
+        unsigned section;
 
-        unsigned char family;
+        int family;
         unsigned char dst_prefixlen;
         unsigned char scope;
         uint32_t metrics;
+        unsigned char protocol;  /* RTPROT_* */
 
         union in_addr_union in_addr;
         union in_addr_union dst_addr;
+        union in_addr_union prefsrc_addr;
 
         LIST_FIELDS(Route, routes);
 };
 
-typedef enum LinkState {
-        LINK_STATE_INITIALIZING,
-        LINK_STATE_ENSLAVING,
-        LINK_STATE_SETTING_ADDRESSES,
-        LINK_STATE_SETTING_ROUTES,
-        LINK_STATE_CONFIGURED,
-        LINK_STATE_UNMANAGED,
-        LINK_STATE_FAILED,
-        LINK_STATE_LINGER,
-        _LINK_STATE_MAX,
-        _LINK_STATE_INVALID = -1
-} LinkState;
-
-typedef enum LinkOperationalState {
-        LINK_OPERSTATE_UNKNOWN,
-        LINK_OPERSTATE_DORMANT,
-        LINK_OPERSTATE_CARRIER,
-        LINK_OPERSTATE_DEGRADED,
-        LINK_OPERSTATE_ROUTABLE,
-        _LINK_OPERSTATE_MAX,
-        _LINK_OPERSTATE_INVALID = -1
-} LinkOperationalState;
-
-struct Link {
-        Manager *manager;
-
-        int n_ref;
-
-        uint64_t ifindex;
-        char *ifname;
-        char *state_file;
-        struct ether_addr mac;
-        struct udev_device *udev_device;
-
-        unsigned flags;
-        uint8_t kernel_operstate;
-
-        Network *network;
-
-        LinkState state;
-        LinkOperationalState operstate;
-
-        unsigned addr_messages;
-        unsigned route_messages;
-        unsigned enslaving;
-
-        LIST_HEAD(Address, addresses);
-
-        sd_dhcp_client *dhcp_client;
-        sd_dhcp_lease *dhcp_lease;
-        char *lease_file;
-        uint16_t original_mtu;
-        sd_ipv4ll *ipv4ll;
-
-        LIST_HEAD(Address, pool_addresses);
-
-        sd_dhcp_server *dhcp_server;
-
-        sd_icmp6_nd *icmp6_router_discovery;
-        sd_dhcp6_client *dhcp6_client;
-};
-
 struct AddressPool {
         Manager *manager;
 
-        unsigned family;
+        int family;
         unsigned prefixlen;
 
         union in_addr_union in_addr;
@@ -310,8 +174,6 @@ struct Manager {
         struct udev *udev;
         struct udev_monitor *udev_monitor;
         sd_event_source *udev_event_source;
-        sd_event_source *sigterm_event_source;
-        sd_event_source *sigint_event_source;
 
         char *state_file;
 
@@ -341,48 +203,11 @@ int manager_bus_listen(Manager *m);
 
 int manager_save(Manager *m);
 
-int manager_address_pool_acquire(Manager *m, unsigned family, unsigned prefixlen, union in_addr_union *found);
+int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found);
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
 #define _cleanup_manager_free_ _cleanup_(manager_freep)
 
-/* NetDev */
-
-#define VLANID_MAX 4094
-
-int netdev_load(Manager *manager);
-void netdev_drop(NetDev *netdev);
-
-NetDev *netdev_unref(NetDev *netdev);
-NetDev *netdev_ref(NetDev *netdev);
-
-DEFINE_TRIVIAL_CLEANUP_FUNC(NetDev*, netdev_unref);
-#define _cleanup_netdev_unref_ _cleanup_(netdev_unrefp)
-
-int netdev_get(Manager *manager, const char *name, NetDev **ret);
-int netdev_set_ifindex(NetDev *netdev, sd_rtnl_message *newlink);
-int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cb);
-int netdev_create_tunnel(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback);
-int netdev_create_veth(NetDev *netdev, sd_rtnl_message_handler_t callback);
-int netdev_create_vxlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback);
-int netdev_create_vlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback);
-int netdev_create_macvlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback);
-int netdev_create_dummy(NetDev *netdev, sd_rtnl_message_handler_t callback);
-int netdev_create_tuntap(NetDev *netdev);
-
-const char *netdev_kind_to_string(NetDevKind d) _const_;
-NetDevKind netdev_kind_from_string(const char *d) _pure_;
-
-const char *macvlan_mode_to_string(MacVlanMode d) _const_;
-MacVlanMode macvlan_mode_from_string(const char *d) _pure_;
-
-int config_parse_netdev_kind(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-
-int config_parse_macvlan_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-
-/* gperf */
-const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, unsigned length);
-
 /* Network */
 
 int network_load(Manager *manager);
@@ -401,6 +226,17 @@ int config_parse_netdev(const char *unit, const char *filename, unsigned line,
                         const char *section, unsigned section_line, const char *lvalue,
                         int ltype, const char *rvalue, void *data, void *userdata);
 
+int config_parse_domains(const char *unit,
+                         const char *filename,
+                         unsigned line,
+                         const char *section,
+                         unsigned section_line,
+                         const char *lvalue,
+                         int ltype,
+                         const char *rvalue,
+                         void *data,
+                         void *userdata);
+
 int config_parse_tunnel(const char *unit,
                         const char *filename,
                         unsigned line,
@@ -428,7 +264,7 @@ const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsig
 
 /* Route */
 int route_new_static(Network *network, unsigned section, Route **ret);
-int route_new_dynamic(Route **ret);
+int route_new_dynamic(Route **ret, unsigned char rtm_protocol);
 void route_free(Route *route);
 int route_configure(Route *route, Link *link, sd_rtnl_message_handler_t callback);
 int route_drop(Route *route, Link *link, sd_rtnl_message_handler_t callback);
@@ -445,6 +281,9 @@ int config_parse_destination(const char *unit, const char *filename, unsigned li
                              const char *section, unsigned section_line, const char *lvalue,
                              int ltype, const char *rvalue, void *data, void *userdata);
 
+int config_parse_route_priority(const char *unit, const char *filename, unsigned line,
+                                const char *section, unsigned section_line, const char *lvalue,
+                                int ltype, const char *rvalue, void *data, void *userdata);
 /* Address */
 int address_new_static(Network *network, unsigned section, Address **ret);
 int address_new_dynamic(Address **ret);
@@ -457,10 +296,6 @@ bool address_equal(Address *a1, Address *a2);
 DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free);
 #define _cleanup_address_free_ _cleanup_(address_freep)
 
-int config_parse_dns(const char *unit, const char *filename, unsigned line,
-                     const char *section, unsigned section_line, const char *lvalue,
-                     int ltype, const char *rvalue, void *data, void *userdata);
-
 int config_parse_address(const char *unit, const char *filename, unsigned line,
                          const char *section, unsigned section_line, const char *lvalue,
                          int ltype, const char *rvalue, void *data, void *userdata);
@@ -473,32 +308,6 @@ int config_parse_label(const char *unit, const char *filename, unsigned line,
                        const char *section, unsigned section_line, const char *lvalue,
                        int ltype, const char *rvalue, void *data, void *userdata);
 
-/* Link */
-
-Link *link_unref(Link *link);
-Link *link_ref(Link *link);
-int link_get(Manager *m, int ifindex, Link **ret);
-int link_add(Manager *manager, sd_rtnl_message *message, Link **ret);
-void link_drop(Link *link);
-
-int link_update(Link *link, sd_rtnl_message *message);
-int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *userdata);
-
-int link_initialized(Link *link, struct udev_device *device);
-
-int link_save(Link *link);
-
-bool link_has_carrier(unsigned flags, uint8_t operstate);
-
-const char* link_state_to_string(LinkState s) _const_;
-LinkState link_state_from_string(const char *s) _pure_;
-
-const char* link_operstate_to_string(LinkOperationalState s) _const_;
-LinkOperationalState link_operstate_from_string(const char *s) _pure_;
-
-DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_unref);
-#define _cleanup_link_unref_ _cleanup_(link_unrefp)
-
 /* DHCP support */
 
 const char* dhcp_support_to_string(DHCPSupport i) _const_;
@@ -508,10 +317,19 @@ int config_parse_dhcp(const char *unit, const char *filename, unsigned line,
                       const char *section, unsigned section_line, const char *lvalue,
                       int ltype, const char *rvalue, void *data, void *userdata);
 
+/* LLMNR support */
+
+const char* llmnr_support_to_string(LLMNRSupport i) _const_;
+LLMNRSupport llmnr_support_from_string(const char *s) _pure_;
+
+int config_parse_llmnr(const char *unit, const char *filename, unsigned line,
+                      const char *section, unsigned section_line, const char *lvalue,
+                      int ltype, const char *rvalue, void *data, void *userdata);
+
 /* Address Pool */
 
-int address_pool_new(Manager *m, AddressPool **ret, unsigned family, const union in_addr_union *u, unsigned prefixlen);
-int address_pool_new_from_string(Manager *m, AddressPool **ret, unsigned family, const char *p, unsigned prefixlen);
+int address_pool_new(Manager *m, AddressPool **ret, int family, const union in_addr_union *u, unsigned prefixlen);
+int address_pool_new_from_string(Manager *m, AddressPool **ret, int family, const char *p, unsigned prefixlen);
 void address_pool_free(AddressPool *p);
 
 int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found);
@@ -527,18 +345,6 @@ int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union
 
 #define log_struct_link(level, link, ...) log_struct(level, "INTERFACE=%s", link->ifname, __VA_ARGS__)
 
-/* More macros which append INTERFACE= to the message */
-
-#define log_full_netdev(level, netdev, fmt, ...) log_meta_object(level, __FILE__, __LINE__, __func__, "INTERFACE=", netdev->ifname, "%-*s: " fmt, IFNAMSIZ, netdev->ifname, ##__VA_ARGS__)
-#define log_debug_netdev(netdev, ...)       log_full_netdev(LOG_DEBUG, netdev, ##__VA_ARGS__)
-#define log_info_netdev(netdev, ...)        log_full_netdev(LOG_INFO, netdev, ##__VA_ARGS__)
-#define log_notice_netdev(netdev, ...)      log_full_netdev(LOG_NOTICE, netdev, ##__VA_ARGS__)
-#define log_warning_netdev(netdev, ...)     log_full_netdev(LOG_WARNING, netdev,## __VA_ARGS__)
-#define log_error_netdev(netdev, ...)       log_full_netdev(LOG_ERR, netdev, ##__VA_ARGS__)
-
-#define log_struct_netdev(level, netdev, ...) log_struct(level, "INTERFACE=%s", netdev->ifname, __VA_ARGS__)
-
-#define NETDEV(netdev) "INTERFACE=%s", netdev->ifname
 #define ADDRESS_FMT_VAL(address)            \
         (address).s_addr & 0xFF,            \
         ((address).s_addr >> 8) & 0xFF,     \
diff --git a/src/network/sd-network.c b/src/network/sd-network.c
deleted file mode 100644 (file)
index 3ebc5d8..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2011 Lennart Poettering
-  Copyright 2014 Tom Gundersen
-
-  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/>.
-***/
-
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/inotify.h>
-#include <sys/poll.h>
-#include <net/if.h>
-
-#include "util.h"
-#include "macro.h"
-#include "strv.h"
-#include "fileio.h"
-#include "sd-network.h"
-#include "network-internal.h"
-#include "dhcp-lease-internal.h"
-
-static int link_get_flags(unsigned index, unsigned *flags) {
-        _cleanup_free_ char *s = NULL, *p = NULL;
-        int r;
-
-        assert(index);
-        assert(flags);
-
-        if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
-                return -ENOMEM;
-
-        r = parse_env_file(p, NEWLINE, "FLAGS", &s, NULL);
-        if (r == -ENOENT)
-                return -ENODATA;
-        else if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        return safe_atou(s, flags);
-}
-
-_public_ int sd_network_link_is_loopback(unsigned index) {
-        unsigned flags;
-        int r;
-
-        r = link_get_flags(index, &flags);
-        if (r < 0)
-                return 0;
-
-        return flags & IFF_LOOPBACK;
-}
-
-_public_ int sd_network_get_link_state(unsigned index, char **state) {
-        _cleanup_free_ char *s = NULL, *p = NULL;
-        int r;
-
-        assert_return(index, -EINVAL);
-        assert_return(state, -EINVAL);
-
-        if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
-                return -ENOMEM;
-
-        r = parse_env_file(p, NEWLINE, "ADMIN_STATE", &s, NULL);
-        if (r == -ENOENT)
-                return -ENODATA;
-        else if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        if (streq(s, "unmanaged"))
-                return -EUNATCH;
-        else if (streq(s, "initializing"))
-                return -EBUSY;
-
-        *state = s;
-        s = NULL;
-
-        return 0;
-}
-
-_public_ int sd_network_get_operational_state(char **state) {
-        _cleanup_free_ char *s = NULL;
-        int r;
-
-        assert_return(state, -EINVAL);
-
-        r = parse_env_file("/run/systemd/netif/state", NEWLINE, "OPER_STATE",
-                           &s, NULL);
-        if (r == -ENOENT)
-                return -ENODATA;
-        else if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        *state = s;
-        s = NULL;
-
-        return 0;
-}
-
-_public_ int sd_network_get_link_operational_state(unsigned index, char **state) {
-        _cleanup_free_ char *s = NULL, *p = NULL;
-        int r;
-
-        assert_return(index, -EINVAL);
-        assert_return(state, -EINVAL);
-
-        if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
-                return -ENOMEM;
-
-        r = parse_env_file(p, NEWLINE, "OPER_STATE", &s, NULL);
-        if (r == -ENOENT)
-                return -ENODATA;
-        else if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        *state = s;
-        s = NULL;
-
-        return 0;
-}
-
-_public_ int sd_network_get_dhcp_lease(unsigned index, sd_dhcp_lease **ret) {
-        _cleanup_free_ char *p = NULL, *s = NULL;
-        sd_dhcp_lease *lease = NULL;
-        int r;
-
-        assert_return(index, -EINVAL);
-        assert_return(ret, -EINVAL);
-
-        if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
-                return -ENOMEM;
-
-        r = parse_env_file(p, NEWLINE, "DHCP_LEASE", &s, NULL);
-
-        if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        r = dhcp_lease_load(s, &lease);
-        if (r < 0)
-                return r;
-
-        *ret = lease;
-
-        return 0;
-}
-
-static int network_get_in_addr(const char *key, unsigned index, struct in_addr **addr, size_t *addr_size) {
-        _cleanup_free_ char *p = NULL, *s = NULL;
-        int r;
-
-        assert_return(index, -EINVAL);
-        assert_return(addr, -EINVAL);
-        assert_return(addr_size, -EINVAL);
-
-        if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
-                return -ENOMEM;
-
-        r = parse_env_file(p, NEWLINE, key, &s, NULL);
-        if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        return deserialize_in_addrs(addr, addr_size, s);
-}
-
-_public_ int sd_network_get_dns(unsigned index, struct in_addr **addr, size_t *addr_size) {
-        return network_get_in_addr("DNS", index, addr, addr_size);
-}
-
-_public_ int sd_network_get_ntp(unsigned index, struct in_addr **addr, size_t *addr_size) {
-        return network_get_in_addr("NTP", index, addr, addr_size);
-}
-
-static int network_get_in6_addr(const char *key, unsigned index, struct in6_addr **addr, size_t *addr_size) {
-        _cleanup_free_ char *p = NULL, *s = NULL;
-        int r;
-
-        assert_return(index, -EINVAL);
-        assert_return(addr, -EINVAL);
-        assert_return(addr_size, -EINVAL);
-
-        if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
-                return -ENOMEM;
-
-        r = parse_env_file(p, NEWLINE, key, &s, NULL);
-        if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        return deserialize_in6_addrs(addr, addr_size, s);
-}
-
-_public_ int sd_network_get_dns6(unsigned index, struct in6_addr **addr, size_t *addr_size) {
-        return network_get_in6_addr("DNS", index, addr, addr_size);
-}
-
-_public_ int sd_network_get_ntp6(unsigned index, struct in6_addr **addr, size_t *addr_size) {
-        return network_get_in6_addr("NTP", index, addr, addr_size);
-}
-
-static int network_get_boolean(const char *key, unsigned index) {
-        _cleanup_free_ char *p = NULL, *s = NULL;
-        int r;
-
-        assert_return(index, -EINVAL);
-
-        if (asprintf(&p, "/run/systemd/netif/links/%u", index) < 0)
-                return -ENOMEM;
-
-        r = parse_env_file(p, NEWLINE, key, &s, NULL);
-        if (r < 0)
-                return r;
-        else if (!s)
-                return -EIO;
-
-        return parse_boolean(s);
-}
-
-_public_ int sd_network_dhcp_use_dns(unsigned index) {
-        return network_get_boolean("DHCP_USE_DNS", index);
-}
-
-_public_ int sd_network_dhcp_use_ntp(unsigned index) {
-        return network_get_boolean("DHCP_USE_NTP", index);
-}
-
-_public_ int sd_network_get_ifindices(unsigned **indices) {
-        _cleanup_closedir_ DIR *d;
-        int r = 0;
-        unsigned n = 0;
-        _cleanup_free_ uid_t *l = NULL;
-
-        d = opendir("/run/systemd/netif/links/");
-        if (!d)
-                return -errno;
-
-        for (;;) {
-                struct dirent *de;
-                int k;
-                unsigned index;
-
-                errno = 0;
-                de = readdir(d);
-                if (!de && errno != 0)
-                        return -errno;
-
-                if (!de)
-                        break;
-
-                dirent_ensure_type(d, de);
-
-                if (!dirent_is_file(de))
-                        continue;
-
-                k = safe_atou(de->d_name, &index);
-                if (k < 0)
-                        continue;
-
-                if (indices) {
-                        if ((unsigned) r >= n) {
-                                unsigned *t;
-
-                                n = MAX(16, 2*r);
-                                t = realloc(l, sizeof(unsigned) * n);
-                                if (!t)
-                                        return -ENOMEM;
-
-                                l = t;
-                        }
-
-                        assert((unsigned) r < n);
-                        l[r++] = index;
-                } else
-                        r++;
-        }
-
-        if (indices) {
-                *indices = l;
-                l = NULL;
-        }
-
-        return r;
-}
-
-static inline int MONITOR_TO_FD(sd_network_monitor *m) {
-        return (int) (unsigned long) m - 1;
-}
-
-static inline sd_network_monitor* FD_TO_MONITOR(int fd) {
-        return (sd_network_monitor*) (unsigned long) (fd + 1);
-}
-
-_public_ int sd_network_monitor_new(const char *category, sd_network_monitor **m) {
-        int fd, k;
-        bool good = false;
-
-        assert_return(m, -EINVAL);
-
-        fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
-        if (fd < 0)
-                return -errno;
-
-        if (!category || streq(category, "links")) {
-                k = inotify_add_watch(fd, "/run/systemd/netif/links/", IN_MOVED_TO|IN_DELETE);
-                if (k < 0) {
-                        safe_close(fd);
-                        return -errno;
-                }
-
-                good = true;
-        }
-
-        if (!category || streq(category, "leases")) {
-                k = inotify_add_watch(fd, "/run/systemd/netif/leases/", IN_MOVED_TO|IN_DELETE);
-                if (k < 0) {
-                        safe_close(fd);
-                        return -errno;
-                }
-
-                good = true;
-        }
-
-        if (!good) {
-                close_nointr(fd);
-                return -EINVAL;
-        }
-
-        *m = FD_TO_MONITOR(fd);
-        return 0;
-}
-
-_public_ sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m) {
-        int fd;
-
-        assert_return(m, NULL);
-
-        fd = MONITOR_TO_FD(m);
-        close_nointr(fd);
-
-        return NULL;
-}
-
-_public_ int sd_network_monitor_flush(sd_network_monitor *m) {
-
-        assert_return(m, -EINVAL);
-
-        return flush_fd(MONITOR_TO_FD(m));
-}
-
-_public_ int sd_network_monitor_get_fd(sd_network_monitor *m) {
-
-        assert_return(m, -EINVAL);
-
-        return MONITOR_TO_FD(m);
-}
-
-_public_ int sd_network_monitor_get_events(sd_network_monitor *m) {
-
-        assert_return(m, -EINVAL);
-
-        /* For now we will only return POLLIN here, since we don't
-         * need anything else ever for inotify.  However, let's have
-         * this API to keep our options open should we later on need
-         * it. */
-        return POLLIN;
-}
-
-_public_ int sd_network_monitor_get_timeout(sd_network_monitor *m, uint64_t *timeout_usec) {
-
-        assert_return(m, -EINVAL);
-        assert_return(timeout_usec, -EINVAL);
-
-        /* For now we will only return (uint64_t) -1, since we don't
-         * need any timeout. However, let's have this API to keep our
-         * options open should we later on need it. */
-        *timeout_usec = (uint64_t) -1;
-        return 0;
-}
diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c
new file mode 100644 (file)
index 0000000..4d55434
--- /dev/null
@@ -0,0 +1,27 @@
+#include "networkd.h"
+#include "networkd-link.h"
+#include "networkd-netdev-bond.h"
+#include "networkd-netdev-macvlan.h"
+#include "dhcp6-internal.h"
+#include "dhcp6-protocol.h"
+#include "rtnl-internal.h"
+#include "ethtool-util.h"
+
+#include "test-tables.h"
+
+int main(int argc, char **argv) {
+        test_table(bond_mode, NETDEV_BOND_MODE);
+        /* test_table(link_state, LINK_STATE);  -- not a reversible mapping */
+        test_table(link_operstate, LINK_OPERSTATE);
+        test_table(dhcp_support, DHCP_SUPPORT);
+        test_table(netdev_kind, NETDEV_KIND);
+        test_table(dhcp6_message_status, DHCP6_STATUS);
+        test_table(duplex, DUP);
+        test_table(wol, WOL);
+        test_table(nl_union_link_info_data, NL_UNION_LINK_INFO_DATA);
+
+        test_table_sparse(macvlan_mode, NETDEV_MACVLAN_MODE);
+        test_table_sparse(dhcp6_message_type, DHCP6_MESSAGE);
+
+        return EXIT_SUCCESS;
+}
index 75e70fae1400cbef9ecd2fc588906656d559ead7..ea9f93864918d2f9cda1a1708b20db247c27c38b 100644 (file)
@@ -28,7 +28,7 @@ static void test_deserialize_in_addr(void) {
         _cleanup_free_ struct in6_addr *addresses6 = NULL;
         struct in_addr  a, b, c;
         struct in6_addr d, e, f;
-        size_t size;
+        int size;
         const char *addresses_string = "192.168.0.1 0:0:0:0:0:FFFF:204.152.189.116 192.168.0.2 ::1 192.168.0.3 1:0:0:0:0:0:0:8";
 
         assert_se(inet_pton(AF_INET, "0:0:0:0:0:FFFF:204.152.189.116", &a) == 0);
@@ -41,13 +41,13 @@ static void test_deserialize_in_addr(void) {
         assert_se(inet_pton(AF_INET6, "::1", &e) == 1);
         assert_se(inet_pton(AF_INET6, "1:0:0:0:0:0:0:8", &f) == 1);
 
-        assert_se(deserialize_in_addrs(&addresses, &size, addresses_string) >= 0);
+        assert_se((size = deserialize_in_addrs(&addresses, addresses_string)) >= 0);
         assert_se(size == 3);
         assert_se(!memcmp(&a, &addresses[0], sizeof(struct in_addr)));
         assert_se(!memcmp(&b, &addresses[1], sizeof(struct in_addr)));
         assert_se(!memcmp(&c, &addresses[2], sizeof(struct in_addr)));
 
-        assert_se(deserialize_in6_addrs(&addresses6, &size, addresses_string) >= 0);
+        assert_se((size = deserialize_in6_addrs(&addresses6, addresses_string)) >= 0);
         assert_se(size == 3);
         assert_se(!memcmp(&d, &addresses6[0], sizeof(struct in6_addr)));
         assert_se(!memcmp(&e, &addresses6[1], sizeof(struct in6_addr)));
@@ -96,9 +96,9 @@ static void test_deserialize_dhcp_routes(void) {
                 assert_se(routes[0].gw_addr.s_addr == inet_addr("192.168.0.1"));
                 assert_se(routes[0].dst_prefixlen == 16);
 
-                assert_se(routes[2].dst_addr.s_addr == inet_addr("0.0.0.0"));
-                assert_se(routes[2].gw_addr.s_addr == inet_addr("10.0.1.1"));
-                assert_se(routes[2].dst_prefixlen == 0);
+                assert_se(routes[1].dst_addr.s_addr == inet_addr("0.0.0.0"));
+                assert_se(routes[1].gw_addr.s_addr == inet_addr("10.0.1.1"));
+                assert_se(routes[1].dst_prefixlen == 0);
         }
 
         {
@@ -111,15 +111,23 @@ static void test_deserialize_dhcp_routes(void) {
         }
 }
 
-static void test_load_config(Manager *manager) {
+static int test_load_config(Manager *manager) {
+        int r;
 /*  TODO: should_reload, is false if the config dirs do not exist, so
  *        so we can't do this test here, move it to a test for paths_check_timestamps
  *        directly
  *
  *        assert_se(network_should_reload(manager) == true);
 */
-        assert_se(manager_load_config(manager) >= 0);
+
+        r = manager_load_config(manager);
+        if (r == -EPERM)
+                return r;
+        assert_se(r >= 0);
+
         assert_se(manager_should_reload(manager) == false);
+
+        return 0;
 }
 
 static void test_network_get(Manager *manager, struct udev_device *loopback) {
@@ -181,6 +189,7 @@ int main(void) {
         _cleanup_manager_free_ Manager *manager = NULL;
         struct udev *udev;
         struct udev_device *loopback;
+        int r;
 
         test_deserialize_in_addr();
         test_deserialize_dhcp_routes();
@@ -188,7 +197,9 @@ int main(void) {
 
         assert_se(manager_new(&manager) >= 0);
 
-        test_load_config(manager);
+        r = test_load_config(manager);
+        if (r == -EPERM)
+                return EXIT_TEST_SKIP;
 
         udev = udev_new();
         assert_se(udev);
index 0b7f3b12f8594049d3e6cc047b1053139d8abe6c..a0f757a2523abde87f04e906092d621330ff45c5 100644 (file)
 
 #include <stdio.h>
 #include <getopt.h>
-#include <error.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-daemon.h"
 
 #include "strv.h"
 #include "util.h"
 #include "log.h"
-#include "sd-readahead.h"
 #include "build.h"
 #include "env-util.h"
 
@@ -40,10 +38,8 @@ static bool arg_ready = false;
 static pid_t arg_pid = 0;
 static const char *arg_status = NULL;
 static bool arg_booted = false;
-static const char *arg_readahead = NULL;
-
-static int help(void) {
 
+static void help(void) {
         printf("%s [OPTIONS...] [VARIABLE=VALUE...]\n\n"
                "Notify the init system about service status updates.\n\n"
                "  -h --help             Show this help\n"
@@ -51,11 +47,8 @@ static int help(void) {
                "     --ready            Inform the init system about service start-up completion\n"
                "     --pid[=PID]        Set main pid of daemon\n"
                "     --status=TEXT      Set status text\n"
-               "     --booted           Returns 0 if the system was booted up with systemd, non-zero otherwise\n"
-               "     --readahead=ACTION Controls read-ahead operations\n",
+               "     --booted           Returns 0 if the system was booted up with systemd, non-zero otherwise\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -66,7 +59,6 @@ static int parse_argv(int argc, char *argv[]) {
                 ARG_PID,
                 ARG_STATUS,
                 ARG_BOOTED,
-                ARG_READAHEAD
         };
 
         static const struct option options[] = {
@@ -76,7 +68,6 @@ static int parse_argv(int argc, char *argv[]) {
                 { "pid",       optional_argument, NULL, ARG_PID       },
                 { "status",    required_argument, NULL, ARG_STATUS    },
                 { "booted",    no_argument,       NULL, ARG_BOOTED    },
-                { "readahead", required_argument, NULL, ARG_READAHEAD },
                 {}
         };
 
@@ -90,7 +81,8 @@ static int parse_argv(int argc, char *argv[]) {
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -121,10 +113,6 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_booted = true;
                         break;
 
-                case ARG_READAHEAD:
-                        arg_readahead = optarg;
-                        break;
-
                 case '?':
                         return -EINVAL;
 
@@ -137,8 +125,7 @@ static int parse_argv(int argc, char *argv[]) {
             !arg_ready &&
             !arg_status &&
             !arg_pid &&
-            !arg_booted &&
-            !arg_readahead) {
+            !arg_booted) {
                 help();
                 return -EINVAL;
         }
@@ -163,14 +150,6 @@ int main(int argc, char* argv[]) {
         if (arg_booted)
                 return sd_booted() <= 0;
 
-        if (arg_readahead) {
-                r = sd_readahead(arg_readahead);
-                if (r < 0) {
-                        log_error("Failed to issue read-ahead control command: %s", strerror(-r));
-                        goto finish;
-                }
-        }
-
         if (arg_ready)
                 our_env[i++] = (char*) "READY=1";
 
index 0d538c25434edd0a51904c4180187d30412080e5..b6d9bc631cb7adf55223806b00d4032dd6d910b4 100644 (file)
@@ -40,7 +40,6 @@
 #include <sys/un.h>
 #include <sys/socket.h>
 #include <linux/netlink.h>
-#include <sys/eventfd.h>
 #include <net/if.h>
 #include <linux/veth.h>
 #include <sys/personality.h>
 #include "def.h"
 #include "rtnl-util.h"
 #include "udev-util.h"
-#include "eventfd-util.h"
 #include "blkid-util.h"
 #include "gpt.h"
 #include "siphash24.h"
 #include "copy.h"
 #include "base-filesystem.h"
+#include "barrier.h"
 
 #ifdef HAVE_SECCOMP
 #include "seccomp-util.h"
@@ -107,6 +106,12 @@ typedef enum LinkJournal {
         LINK_GUEST
 } LinkJournal;
 
+typedef enum Volatile {
+        VOLATILE_NO,
+        VOLATILE_YES,
+        VOLATILE_STATE,
+} Volatile;
+
 static char *arg_directory = NULL;
 static char *arg_user = NULL;
 static sd_id128_t arg_uuid = {};
@@ -159,9 +164,9 @@ static bool arg_network_veth = false;
 static const char *arg_network_bridge = NULL;
 static unsigned long arg_personality = 0xffffffffLU;
 static const char *arg_image = NULL;
+static Volatile arg_volatile = VOLATILE_NO;
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [PATH] [ARGUMENTS...]\n\n"
                "Spawn a minimal namespace container for debugging, testing and building.\n\n"
                "  -h --help                 Show this help\n"
@@ -207,10 +212,9 @@ static int help(void) {
                "     --share-system         Share system namespaces with host\n"
                "     --register=BOOLEAN     Register container as machine\n"
                "     --keep-unit            Do not register a scope for the machine, reuse\n"
-               "                            the service unit nspawn is running in\n",
+               "                            the service unit nspawn is running in\n"
+               "     --volatile[=MODE]      Run the system in volatile mode\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -235,6 +239,7 @@ static int parse_argv(int argc, char *argv[]) {
                 ARG_NETWORK_VETH,
                 ARG_NETWORK_BRIDGE,
                 ARG_PERSONALITY,
+                ARG_VOLATILE,
         };
 
         static const struct option options[] = {
@@ -267,6 +272,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "network-bridge",        required_argument, NULL, ARG_NETWORK_BRIDGE    },
                 { "personality",           required_argument, NULL, ARG_PERSONALITY       },
                 { "image",                 required_argument, NULL, 'i'                   },
+                { "volatile",              optional_argument, NULL, ARG_VOLATILE          },
                 {}
         };
 
@@ -276,12 +282,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+hD:u:bL:M:jS:Z:qi:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "+hD:u:bL:M:jS:Z:qi:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -386,7 +393,7 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_CAPABILITY:
                 case ARG_DROP_CAPABILITY: {
-                        char *state, *word;
+                        const char *state, *word;
                         size_t length;
 
                         FOREACH_WORD_SEPARATOR(word, length, optarg, ",", state) {
@@ -559,13 +566,31 @@ static int parse_argv(int argc, char *argv[]) {
 
                         break;
 
+                case ARG_VOLATILE:
+
+                        if (!optarg)
+                                arg_volatile = VOLATILE_YES;
+                        else {
+                                r = parse_boolean(optarg);
+                                if (r < 0) {
+                                        if (streq(optarg, "state"))
+                                                arg_volatile = VOLATILE_STATE;
+                                        else {
+                                                log_error("Failed to parse --volatile= argument: %s", optarg);
+                                                return r;
+                                        }
+                                } else
+                                        arg_volatile = r ? VOLATILE_YES : VOLATILE_NO;
+                        }
+
+                        break;
+
                 case '?':
                         return -EINVAL;
 
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (arg_share_system)
                 arg_register = false;
@@ -585,6 +610,11 @@ static int parse_argv(int argc, char *argv[]) {
                 return -EINVAL;
         }
 
+        if (arg_volatile != VOLATILE_NO && arg_read_only) {
+                log_error("Cannot combine --read-only with --volatile. Note that --volatile already implies a read-only base hierarchy.");
+                return -EINVAL;
+        }
+
         arg_retain = (arg_retain | plus | (arg_private_network ? 1ULL << CAP_NET_ADMIN : 0)) & ~minus;
 
         return 1;
@@ -645,7 +675,18 @@ static int mount_all(const char *dest) {
                 if (mount_table[k].what && t > 0)
                         continue;
 
-                mkdir_p(where, 0755);
+                t = mkdir_p(where, 0755);
+                if (t < 0) {
+                        if (mount_table[k].fatal) {
+                               log_error("Failed to create directory %s: %s", where, strerror(-t));
+
+                                if (r == 0)
+                                        r = t;
+                        } else
+                               log_warning("Failed to create directory %s: %s", where, strerror(-t));
+
+                        continue;
+                }
 
 #ifdef HAVE_SELINUX
                 if (arg_selinux_apifs_context &&
@@ -664,13 +705,15 @@ static int mount_all(const char *dest) {
                           where,
                           mount_table[k].type,
                           mount_table[k].flags,
-                          o) < 0 &&
-                    mount_table[k].fatal) {
+                          o) < 0) {
 
-                        log_error("mount(%s) failed: %m", where);
+                        if (mount_table[k].fatal) {
+                                log_error("mount(%s) failed: %m", where);
 
-                        if (r == 0)
-                                r = -errno;
+                                if (r == 0)
+                                        r = -errno;
+                        } else
+                                log_warning("mount(%s) failed: %m", where);
                 }
         }
 
@@ -712,16 +755,36 @@ static int mount_binds(const char *dest, char **l, bool ro) {
                 }
 
                 /* Create the mount point, but be conservative -- refuse to create block
-                * and char devices. */
-                if (S_ISDIR(source_st.st_mode))
-                        mkdir_label(where, 0755);
-                else if (S_ISFIFO(source_st.st_mode))
-                        mkfifo(where, 0644);
-                else if (S_ISSOCK(source_st.st_mode))
-                        mknod(where, 0644 | S_IFSOCK, 0);
-                else if (S_ISREG(source_st.st_mode))
-                        touch(where);
-                else {
+                 * and char devices. */
+                if (S_ISDIR(source_st.st_mode)) {
+                        r = mkdir_label(where, 0755);
+                        if (r < 0) {
+                                log_error("Failed to create mount point %s: %s", where, strerror(-r));
+
+                                return r;
+                        }
+                } else if (S_ISFIFO(source_st.st_mode)) {
+                        r = mkfifo(where, 0644);
+                        if (r < 0 && errno != EEXIST) {
+                                log_error("Failed to create mount point %s: %m", where);
+
+                                return -errno;
+                        }
+                } else if (S_ISSOCK(source_st.st_mode)) {
+                        r = mknod(where, 0644 | S_IFSOCK, 0);
+                        if (r < 0 && errno != EEXIST) {
+                                log_error("Failed to create mount point %s: %m", where);
+
+                                return -errno;
+                        }
+                } else if (S_ISREG(source_st.st_mode)) {
+                        r = touch(where);
+                        if (r < 0) {
+                                log_error("Failed to create mount point %s: %s", where, strerror(-r));
+
+                                return r;
+                        }
+                } else {
                         log_error("Refusing to create mountpoint for file: %s", *x);
                         return -ENOTSUP;
                 }
@@ -748,12 +811,18 @@ static int mount_tmpfs(const char *dest) {
 
         STRV_FOREACH_PAIR(i, o, arg_tmpfs) {
                 _cleanup_free_ char *where = NULL;
+                int r;
 
                 where = strappend(dest, *i);
                 if (!where)
                         return log_oom();
 
-                mkdir_label(where, 0755);
+                r = mkdir_label(where, 0755);
+                if (r < 0) {
+                        log_error("creating mount point for tmpfs %s failed: %s", where, strerror(-r));
+
+                        return r;
+                }
 
                 if (mount("tmpfs", where, "tmpfs", MS_NODEV|MS_STRICTATIME, *o) < 0) {
                         log_error("tmpfs mount to %s failed: %m", where);
@@ -796,7 +865,6 @@ static int setup_timezone(const char *dest) {
                 if (!y)
                         y = path_startswith(q, "/usr/share/zoneinfo/");
 
-
                 /* Already pointing to the right place? Then do nothing .. */
                 if (y && streq(y, z))
                         return 0;
@@ -815,7 +883,20 @@ static int setup_timezone(const char *dest) {
         if (!what)
                 return log_oom();
 
-        unlink(where);
+        r = mkdir_parents(where, 0755);
+        if (r < 0) {
+                log_error("Failed to create directory for timezone info %s in container: %s", where, strerror(-r));
+
+                return 0;
+        }
+
+        r = unlink(where);
+        if (r < 0 && errno != ENOENT) {
+                log_error("Failed to remove existing timezone info %s in container: %m", where);
+
+                return 0;
+        }
+
         if (symlink(what, where) < 0) {
                 log_error("Failed to correct timezone of container: %m");
                 return 0;
@@ -826,6 +907,7 @@ static int setup_timezone(const char *dest) {
 
 static int setup_resolv_conf(const char *dest) {
         _cleanup_free_ char *where = NULL;
+        int r;
 
         assert(dest);
 
@@ -839,11 +921,126 @@ static int setup_resolv_conf(const char *dest) {
 
         /* We don't really care for the results of this really. If it
          * fails, it fails, but meh... */
-        copy_file("/etc/resolv.conf", where, O_TRUNC|O_NOFOLLOW, 0644);
+        r = mkdir_parents(where, 0755);
+        if (r < 0) {
+                log_warning("Failed to create parent directory for resolv.conf %s: %s", where, strerror(-r));
+
+                return 0;
+        }
+
+        r = copy_file("/etc/resolv.conf", where, O_TRUNC|O_NOFOLLOW, 0644);
+        if (r < 0) {
+                log_warning("Failed to copy /etc/resolv.conf to %s: %s", where, strerror(-r));
+
+                return 0;
+        }
+
+        return 0;
+}
+
+static int setup_volatile_state(const char *directory) {
+        const char *p;
+        int r;
+
+        assert(directory);
+
+        if (arg_volatile != VOLATILE_STATE)
+                return 0;
+
+        /* --volatile=state means we simply overmount /var
+           with a tmpfs, and the rest read-only. */
+
+        r = bind_remount_recursive(directory, true);
+        if (r < 0) {
+                log_error("Failed to remount %s read-only: %s", directory, strerror(-r));
+                return r;
+        }
+
+        p = strappenda(directory, "/var");
+        r = mkdir(p, 0755);
+        if (r < 0 && errno != EEXIST) {
+                log_error("Failed to create %s: %m", directory);
+                return -errno;
+        }
+
+        if (mount("tmpfs", p, "tmpfs", MS_STRICTATIME, "mode=755") < 0) {
+                log_error("Failed to mount tmpfs to /var: %m");
+                return -errno;
+        }
 
         return 0;
 }
 
+static int setup_volatile(const char *directory) {
+        bool tmpfs_mounted = false, bind_mounted = false;
+        char template[] = "/tmp/nspawn-volatile-XXXXXX";
+        const char *f, *t;
+        int r;
+
+        assert(directory);
+
+        if (arg_volatile != VOLATILE_YES)
+                return 0;
+
+        /* --volatile=yes means we mount a tmpfs to the root dir, and
+           the original /usr to use inside it, and that read-only. */
+
+        if (!mkdtemp(template)) {
+                log_error("Failed to create temporary directory: %m");
+                return -errno;
+        }
+
+        if (mount("tmpfs", template, "tmpfs", MS_STRICTATIME, "mode=755") < 0) {
+                log_error("Failed to mount tmpfs for root directory: %m");
+                r = -errno;
+                goto fail;
+        }
+
+        tmpfs_mounted = true;
+
+        f = strappenda(directory, "/usr");
+        t = strappenda(template, "/usr");
+
+        r = mkdir(t, 0755);
+        if (r < 0 && errno != EEXIST) {
+                log_error("Failed to create %s: %m", t);
+                r = -errno;
+                goto fail;
+        }
+
+        if (mount(f, t, "bind", MS_BIND|MS_REC, NULL) < 0) {
+                log_error("Failed to create /usr bind mount: %m");
+                r = -errno;
+                goto fail;
+        }
+
+        bind_mounted = true;
+
+        r = bind_remount_recursive(t, true);
+        if (r < 0) {
+                log_error("Failed to remount %s read-only: %s", t, strerror(-r));
+                goto fail;
+        }
+
+        if (mount(template, directory, NULL, MS_MOVE, NULL) < 0) {
+                log_error("Failed to move root mount: %m");
+                r = -errno;
+                goto fail;
+        }
+
+        rmdir(template);
+
+        return 0;
+
+fail:
+        if (bind_mounted)
+                umount(t);
+        if (tmpfs_mounted)
+                umount(template);
+        rmdir(template);
+        return r;
+}
+
 static char* id128_format_as_uuid(sd_id128_t id, char s[37]) {
 
         snprintf(s, 37,
@@ -904,7 +1101,8 @@ static int copy_devnodes(const char *dest) {
                 "full\0"
                 "random\0"
                 "urandom\0"
-                "tty\0";
+                "tty\0"
+                "net/tun\0";
 
         const char *d;
         int r = 0;
@@ -935,10 +1133,17 @@ static int copy_devnodes(const char *dest) {
                         log_error("%s is not a char or block device, cannot copy", from);
                         return -EIO;
 
-                } else if (mknod(to, st.st_mode, st.st_rdev) < 0) {
+                } else {
+                        r = mkdir_parents(to, 0775);
+                        if (r < 0) {
+                                log_error("Failed to create parent directory of %s: %s", to, strerror(-r));
+                                return -r;
+                        }
 
-                        log_error("mknod(%s) failed: %m", dest);
-                        return  -errno;
+                        if (mknod(to, st.st_mode, st.st_rdev) < 0) {
+                                log_error("mknod(%s) failed: %m", dest);
+                                return  -errno;
+                        }
                 }
         }
 
@@ -1084,7 +1289,7 @@ static int setup_hostname(void) {
         if (arg_share_system)
                 return 0;
 
-        if (sethostname(arg_machine, strlen(arg_machine)) < 0)
+        if (sethostname_idempotent(arg_machine) < 0)
                 return -errno;
 
         return 0;
@@ -1169,7 +1374,7 @@ static int setup_journal(const char *directory) {
 
                         r = mkdir_p(q, 0755);
                         if (r < 0)
-                                log_warning("failed to create directory %s: %m", q);
+                                log_warning("Failed to create directory %s: %m", q);
                         return 0;
                 }
 
@@ -1204,7 +1409,7 @@ static int setup_journal(const char *directory) {
 
                 r = mkdir_p(q, 0755);
                 if (r < 0)
-                        log_warning("failed to create directory %s: %m", q);
+                        log_warning("Failed to create directory %s: %m", q);
                 return 0;
         }
 
@@ -1259,9 +1464,9 @@ static int drop_capabilities(void) {
         return capability_bounding_set_drop(~arg_retain, false);
 }
 
-static int register_machine(pid_t pid) {
+static int register_machine(pid_t pid, int local_ifindex) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         if (!arg_register)
@@ -1279,16 +1484,17 @@ static int register_machine(pid_t pid) {
                                 "org.freedesktop.machine1",
                                 "/org/freedesktop/machine1",
                                 "org.freedesktop.machine1.Manager",
-                                "RegisterMachine",
+                                "RegisterMachineWithNetwork",
                                 &error,
                                 NULL,
-                                "sayssus",
+                                "sayssusai",
                                 arg_machine,
                                 SD_BUS_MESSAGE_APPEND_ID128(arg_uuid),
                                 "nspawn",
                                 "container",
                                 (uint32_t) pid,
-                                strempty(arg_directory));
+                                strempty(arg_directory),
+                                local_ifindex > 0 ? 1 : 0, local_ifindex);
         } else {
                 _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
 
@@ -1298,7 +1504,7 @@ static int register_machine(pid_t pid) {
                                 "org.freedesktop.machine1",
                                 "/org/freedesktop/machine1",
                                 "org.freedesktop.machine1.Manager",
-                                "CreateMachine");
+                                "CreateMachineWithNetwork");
                 if (r < 0) {
                         log_error("Failed to create message: %s", strerror(-r));
                         return r;
@@ -1306,13 +1512,14 @@ static int register_machine(pid_t pid) {
 
                 r = sd_bus_message_append(
                                 m,
-                                "sayssus",
+                                "sayssusai",
                                 arg_machine,
                                 SD_BUS_MESSAGE_APPEND_ID128(arg_uuid),
                                 "nspawn",
                                 "container",
                                 (uint32_t) pid,
-                                strempty(arg_directory));
+                                strempty(arg_directory),
+                                local_ifindex > 0 ? 1 : 0, local_ifindex);
                 if (r < 0) {
                         log_error("Failed to append message arguments: %s", strerror(-r));
                         return r;
@@ -1338,7 +1545,7 @@ static int register_machine(pid_t pid) {
                         return r;
                 }
 
-                r = sd_bus_message_append(m, "(sv)", "DeviceAllow", "a(ss)", 10,
+                r = sd_bus_message_append(m, "(sv)", "DeviceAllow", "a(ss)", 11,
                                           /* Allow the container to
                                            * access and create the API
                                            * device nodes, so that
@@ -1351,6 +1558,7 @@ static int register_machine(pid_t pid) {
                                           "/dev/random", "rwm",
                                           "/dev/urandom", "rwm",
                                           "/dev/tty", "rwm",
+                                          "/dev/net/tun", "rwm",
                                           /* Allow the container
                                            * access to ptys. However,
                                            * do not permit the
@@ -1394,7 +1602,7 @@ static int register_machine(pid_t pid) {
 static int terminate_machine(pid_t pid) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
         _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         const char *path;
         int r;
 
@@ -1479,9 +1687,10 @@ static int reset_audit_loginuid(void) {
         return 0;
 }
 
-#define HASH_KEY SD_ID128_MAKE(c3,c4,f9,19,b5,57,b2,1c,e6,cf,14,27,03,9c,ee,a2)
+#define HOST_HASH_KEY SD_ID128_MAKE(1a,37,6f,c7,46,ec,45,0b,ad,a3,d5,31,06,60,5d,b1)
+#define CONTAINER_HASH_KEY SD_ID128_MAKE(c3,c4,f9,19,b5,57,b2,1c,e6,cf,14,27,03,9c,ee,a2)
 
-static int get_mac(struct ether_addr *mac) {
+static int generate_mac(struct ether_addr *mac, sd_id128_t hash_key) {
         int r;
 
         uint8_t result[8];
@@ -1503,7 +1712,7 @@ static int get_mac(struct ether_addr *mac) {
 
         /* Let's hash the host machine ID plus the container name. We
          * use a fixed, but originally randomly created hash key here. */
-        siphash24(result, v, sz, HASH_KEY.bytes);
+        siphash24(result, v, sz, hash_key.bytes);
 
         assert_cc(ETH_ALEN <= sizeof(result));
         memcpy(mac->ether_addr_octet, result, ETH_ALEN);
@@ -1515,11 +1724,11 @@ static int get_mac(struct ether_addr *mac) {
         return 0;
 }
 
-static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ]) {
+static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ], int *ifi) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
         _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
-        struct ether_addr mac;
-        int r;
+        struct ether_addr mac_host, mac_container;
+        int r, i;
 
         if (!arg_private_network)
                 return 0;
@@ -1529,15 +1738,18 @@ static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ]) {
 
         /* Use two different interface name prefixes depending whether
          * we are in bridge mode or not. */
-        if (arg_network_bridge)
-                memcpy(iface_name, "vb-", 3);
-        else
-                memcpy(iface_name, "ve-", 3);
-        strncpy(iface_name+3, arg_machine, IFNAMSIZ - 3);
+        snprintf(iface_name, IFNAMSIZ - 1, "%s-%s",
+                 arg_network_bridge ? "vb" : "ve", arg_machine);
+
+        r = generate_mac(&mac_container, CONTAINER_HASH_KEY);
+        if (r < 0) {
+                log_error("Failed to generate predictable MAC address for container side");
+                return r;
+        }
 
-        r = get_mac(&mac);
+        r = generate_mac(&mac_host, HOST_HASH_KEY);
         if (r < 0) {
-                log_error("Failed to generate predictable MAC address for host0");
+                log_error("Failed to generate predictable MAC address for host side");
                 return r;
         }
 
@@ -1559,6 +1771,12 @@ static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ]) {
                 return r;
         }
 
+        r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, &mac_host);
+        if (r < 0) {
+                log_error("Failed to add netlink MAC address: %s", strerror(-r));
+                return r;
+        }
+
         r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
         if (r < 0) {
                 log_error("Failed to open netlink container: %s", strerror(-r));
@@ -1583,7 +1801,7 @@ static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ]) {
                 return r;
         }
 
-        r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, &mac);
+        r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, &mac_container);
         if (r < 0) {
                 log_error("Failed to add netlink MAC address: %s", strerror(-r));
                 return r;
@@ -1619,10 +1837,18 @@ static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ]) {
                 return r;
         }
 
+        i = (int) if_nametoindex(iface_name);
+        if (i <= 0) {
+                log_error("Failed to resolve interface %s: %m", iface_name);
+                return -errno;
+        }
+
+        *ifi = i;
+
         return 0;
 }
 
-static int setup_bridge(const char veth_name[]) {
+static int setup_bridge(const char veth_name[], int *ifi) {
         _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
         _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
         int r, bridge;
@@ -1642,6 +1868,8 @@ static int setup_bridge(const char veth_name[]) {
                 return -errno;
         }
 
+        *ifi = bridge;
+
         r = sd_rtnl_open(&rtnl, 0);
         if (r < 0) {
                 log_error("Failed to connect to netlink: %s", strerror(-r));
@@ -1739,7 +1967,7 @@ static int move_network_interfaces(pid_t pid) {
                 if (ifi < 0)
                         return ifi;
 
-                r = sd_rtnl_message_new_link(rtnl, &m, RTM_NEWLINK, ifi);
+                r = sd_rtnl_message_new_link(rtnl, &m, RTM_SETLINK, ifi);
                 if (r < 0) {
                         log_error("Failed to allocate netlink message: %s", strerror(-r));
                         return r;
@@ -2388,20 +2616,27 @@ static int mount_devices(
 
 static void loop_remove(int nr, int *image_fd) {
         _cleanup_close_ int control = -1;
+        int r;
 
         if (nr < 0)
                 return;
 
         if (image_fd && *image_fd >= 0) {
-                ioctl(*image_fd, LOOP_CLR_FD);
+                r = ioctl(*image_fd, LOOP_CLR_FD);
+                if (r < 0)
+                        log_warning("Failed to close loop image: %m");
                 *image_fd = safe_close(*image_fd);
         }
 
         control = open("/dev/loop-control", O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK);
-        if (control < 0)
+        if (control < 0) {
+                log_warning("Failed to open /dev/loop-control: %m");
                 return;
+        }
 
-        ioctl(control, LOOP_CTL_REMOVE, nr);
+        r = ioctl(control, LOOP_CTL_REMOVE, nr);
+        if (r < 0)
+                log_warning("Failed to remove loop %d: %m", nr);
 }
 
 static int spawn_getent(const char *database, const char *key, pid_t *rpid) {
@@ -2462,7 +2697,8 @@ static int spawn_getent(const char *database, const char *key, pid_t *rpid) {
 }
 
 static int change_uid_gid(char **_home) {
-        char line[LINE_MAX], *w, *x, *state, *u, *g, *h;
+        char line[LINE_MAX], *x, *u, *g, *h;
+        const char *word, *state;
         _cleanup_free_ uid_t *uids = NULL;
         _cleanup_free_ char *home = NULL;
         _cleanup_fclose_ FILE *f = NULL;
@@ -2612,10 +2848,10 @@ static int change_uid_gid(char **_home) {
         x += strcspn(x, WHITESPACE);
         x += strspn(x, WHITESPACE);
 
-        FOREACH_WORD(w, l, x, state) {
+        FOREACH_WORD(word, l, x, state) {
                 char c[l+1];
 
-                memcpy(c, w, l);
+                memcpy(c, word, l);
                 c[l] = 0;
 
                 if (!GREEDY_REALLOC(uids, sz, n_uids+1))
@@ -2868,7 +3104,11 @@ int main(int argc, char *argv[]) {
                         goto finish;
                 }
 
-                r = dissect_image(image_fd, &root_device, &root_device_rw, &home_device, &home_device_rw, &srv_device, &srv_device_rw, &secondary);
+                r = dissect_image(image_fd,
+                                  &root_device, &root_device_rw,
+                                  &home_device, &home_device_rw,
+                                  &srv_device, &srv_device_rw,
+                                  &secondary);
                 if (r < 0)
                         goto finish;
         }
@@ -2919,7 +3159,9 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
-        sd_notify(0, "READY=1");
+        sd_notify(false,
+                  "READY=1\n"
+                  "STATUS=Container running.");
 
         assert_se(sigemptyset(&mask) == 0);
         assert_se(sigemptyset(&mask_chld) == 0);
@@ -2929,12 +3171,18 @@ int main(int argc, char *argv[]) {
 
         for (;;) {
                 ContainerStatus container_status;
-                int eventfds[2] = { -1, -1 };
+                _cleanup_(barrier_destroy) Barrier barrier = BARRIER_NULL;
                 struct sigaction sa = {
                         .sa_handler = nop_handler,
                         .sa_flags = SA_NOCLDSTOP,
                 };
 
+                r = barrier_create(&barrier);
+                if (r < 0) {
+                        log_error("Cannot initialize IPC barrier: %s", strerror(-r));
+                        goto finish;
+                }
+
                 /* Child can be killed before execv(), so handle SIGCHLD
                  * in order to interrupt parent's blocking calls and
                  * give it a chance to call wait() and terminate. */
@@ -2950,9 +3198,9 @@ int main(int argc, char *argv[]) {
                         goto finish;
                 }
 
-                pid = clone_with_eventfd(SIGCHLD|CLONE_NEWNS|
-                                         (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)|
-                                         (arg_private_network ? CLONE_NEWNET : 0), eventfds);
+                pid = syscall(__NR_clone, SIGCHLD|CLONE_NEWNS|
+                                          (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)|
+                                          (arg_private_network ? CLONE_NEWNET : 0), NULL);
                 if (pid < 0) {
                         if (errno == EINVAL)
                                 log_error("clone() failed, do you have namespace support enabled in your kernel? (You need UTS, IPC, PID and NET namespacing built in): %m");
@@ -2981,6 +3229,8 @@ int main(int argc, char *argv[]) {
                         };
                         char **env_use;
 
+                        barrier_set_role(&barrier, BARRIER_CHILD);
+
                         envp[n_env] = strv_find_prefix(environ, "TERM=");
                         if (envp[n_env])
                                 n_env ++;
@@ -2994,9 +3244,7 @@ int main(int argc, char *argv[]) {
                         kmsg_socket_pair[0] = safe_close(kmsg_socket_pair[0]);
 
                         reset_all_signal_handlers();
-
-                        assert_se(sigemptyset(&mask) == 0);
-                        assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
+                        reset_signal_mask();
 
                         k = open_terminal(console, O_RDWR);
                         if (k != STDIN_FILENO) {
@@ -3006,26 +3254,26 @@ int main(int argc, char *argv[]) {
                                 }
 
                                 log_error("Failed to open console: %s", strerror(-k));
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (dup2(STDIN_FILENO, STDOUT_FILENO) != STDOUT_FILENO ||
                             dup2(STDIN_FILENO, STDERR_FILENO) != STDERR_FILENO) {
                                 log_error("Failed to duplicate console: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (setsid() < 0) {
                                 log_error("setsid() failed: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (reset_audit_loginuid() < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (prctl(PR_SET_PDEATHSIG, SIGKILL) < 0) {
                                 log_error("PR_SET_PDEATHSIG failed: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         /* Mark everything as slave, so that we still
@@ -3033,108 +3281,109 @@ int main(int argc, char *argv[]) {
                          * propagate mounts to the real root. */
                         if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL) < 0) {
                                 log_error("MS_SLAVE|MS_REC failed: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (mount_devices(arg_directory,
                                           root_device, root_device_rw,
                                           home_device, home_device_rw,
                                           srv_device, srv_device_rw) < 0)
-                                goto child_fail;
-
-                        r = base_filesystem_create(arg_directory);
-                        if (r < 0) {
-                                log_error("Failed to create the base filesystem: %s", strerror(-r));
-                                goto child_fail;
-                        }
+                                _exit(EXIT_FAILURE);
 
                         /* Turn directory into bind mount */
                         if (mount(arg_directory, arg_directory, "bind", MS_BIND|MS_REC, NULL) < 0) {
                                 log_error("Failed to make bind mount: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
+                        r = setup_volatile(arg_directory);
+                        if (r < 0)
+                                _exit(EXIT_FAILURE);
+
+                        if (setup_volatile_state(arg_directory) < 0)
+                                _exit(EXIT_FAILURE);
+
+                        r = base_filesystem_create(arg_directory);
+                        if (r < 0)
+                                _exit(EXIT_FAILURE);
+
                         if (arg_read_only) {
                                 k = bind_remount_recursive(arg_directory, true);
                                 if (k < 0) {
                                         log_error("Failed to make tree read-only: %s", strerror(-k));
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
                         }
 
                         if (mount_all(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (copy_devnodes(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (setup_ptmx(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         dev_setup(arg_directory);
 
                         if (setup_seccomp() < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (setup_dev_console(arg_directory, console) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (setup_kmsg(arg_directory, kmsg_socket_pair[1]) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         kmsg_socket_pair[1] = safe_close(kmsg_socket_pair[1]);
 
                         if (setup_boot_id(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (setup_timezone(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (setup_resolv_conf(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (setup_journal(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (mount_binds(arg_directory, arg_bind, false) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (mount_binds(arg_directory, arg_bind_ro, true) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (mount_tmpfs(arg_directory) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if (setup_kdbus(arg_directory, kdbus_domain) < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         /* Tell the parent that we are ready, and that
                          * it can cgroupify us to that we lack access
                          * to certain devices and resources. */
-                        r = eventfd_send_state(eventfds[1],
-                                               EVENTFD_CHILD_SUCCEEDED);
-                        eventfds[1] = safe_close(eventfds[1]);
-                        if (r < 0)
-                                goto child_fail;
+                        barrier_place(&barrier);
 
                         if (chdir(arg_directory) < 0) {
                                 log_error("chdir(%s) failed: %m", arg_directory);
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (mount(arg_directory, "/", NULL, MS_MOVE, NULL) < 0) {
                                 log_error("mount(MS_MOVE) failed: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (chroot(".") < 0) {
                                 log_error("chroot() failed: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (chdir("/") < 0) {
                                 log_error("chdir() failed: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         umask(0022);
@@ -3144,18 +3393,18 @@ int main(int argc, char *argv[]) {
 
                         if (drop_capabilities() < 0) {
                                 log_error("drop_capabilities() failed: %m");
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         r = change_uid_gid(&home);
                         if (r < 0)
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
 
                         if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
                             (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
                             (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) {
                                 log_oom();
-                                goto child_fail;
+                                _exit(EXIT_FAILURE);
                         }
 
                         if (!sd_id128_equal(arg_uuid, SD_ID128_NULL)) {
@@ -3163,7 +3412,7 @@ int main(int argc, char *argv[]) {
 
                                 if (asprintf((char**)(envp + n_env++), "container_uuid=%s", id128_format_as_uuid(arg_uuid, as_uuid)) < 0) {
                                         log_oom();
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
                         }
 
@@ -3171,13 +3420,13 @@ int main(int argc, char *argv[]) {
                                 k = fdset_cloexec(fds, false);
                                 if (k < 0) {
                                         log_error("Failed to unset O_CLOEXEC for file descriptors.");
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
 
                                 if ((asprintf((char **)(envp + n_env++), "LISTEN_FDS=%u", n_fd_passed) < 0) ||
                                     (asprintf((char **)(envp + n_env++), "LISTEN_PID=1") < 0)) {
                                         log_oom();
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
                         }
 
@@ -3186,12 +3435,12 @@ int main(int argc, char *argv[]) {
                         if (arg_personality != 0xffffffffLU) {
                                 if (personality(arg_personality) < 0) {
                                         log_error("personality() failed: %m");
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
                         } else if (secondary) {
                                 if (personality(PER_LINUX32) < 0) {
                                         log_error("personality() failed: %m");
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
                         }
 
@@ -3199,7 +3448,7 @@ int main(int argc, char *argv[]) {
                         if (arg_selinux_context)
                                 if (setexeccon((security_context_t) arg_selinux_context) < 0) {
                                         log_error("setexeccon(\"%s\") failed: %m", arg_selinux_context);
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
 #endif
 
@@ -3209,7 +3458,7 @@ int main(int argc, char *argv[]) {
                                 n = strv_env_merge(2, envp, arg_setenv);
                                 if (!n) {
                                         log_oom();
-                                        goto child_fail;
+                                        _exit(EXIT_FAILURE);
                                 }
 
                                 env_use = n;
@@ -3217,10 +3466,8 @@ int main(int argc, char *argv[]) {
                                 env_use = (char**) envp;
 
                         /* Wait until the parent is ready with the setup, too... */
-                        r = eventfd_parent_succeeded(eventfds[0]);
-                        eventfds[0] = safe_close(eventfds[0]);
-                        if (r < 0)
-                                goto child_fail;
+                        if (!barrier_place_and_sync(&barrier))
+                                _exit(EXIT_FAILURE);
 
                         if (arg_boot) {
                                 char **a;
@@ -3249,42 +3496,26 @@ int main(int argc, char *argv[]) {
                         }
 
                         log_error("execv() failed: %m");
-
-                child_fail:
-                        /* Tell the parent that the setup failed, so he
-                         * can clean up resources and terminate. */
-                        if (eventfds[1] != -1)
-                                eventfd_send_state(eventfds[1],
-                                                   EVENTFD_CHILD_FAILED);
                         _exit(EXIT_FAILURE);
                 }
 
+                barrier_set_role(&barrier, BARRIER_PARENT);
                 fdset_free(fds);
                 fds = NULL;
 
-                /* Wait for the child event:
-                 * If EVENTFD_CHILD_FAILED, the child will terminate soon.
-                 * If EVENTFD_CHILD_SUCCEEDED, the child is reporting that
-                 * it is ready with all it needs to do with priviliges.
-                 * After we got the notification we can make the process
-                 * join its cgroup which might limit what it can do */
-                r = eventfd_child_succeeded(eventfds[1]);
-                eventfds[1] = safe_close(eventfds[1]);
-
-                if (r >= 0) {
-                        r = register_machine(pid);
-                        if (r < 0)
-                                goto finish;
+                /* wait for child-setup to be done */
+                if (barrier_place_and_sync(&barrier)) {
+                        int ifi = 0;
 
                         r = move_network_interfaces(pid);
                         if (r < 0)
                                 goto finish;
 
-                        r = setup_veth(pid, veth_name);
+                        r = setup_veth(pid, veth_name, &ifi);
                         if (r < 0)
                                 goto finish;
 
-                        r = setup_bridge(veth_name);
+                        r = setup_bridge(veth_name, &ifi);
                         if (r < 0)
                                 goto finish;
 
@@ -3292,6 +3523,10 @@ int main(int argc, char *argv[]) {
                         if (r < 0)
                                 goto finish;
 
+                        r = register_machine(pid, ifi);
+                        if (r < 0)
+                                goto finish;
+
                         /* Block SIGCHLD here, before notifying child.
                          * process_pty() will handle it with the other signals. */
                         r = sigprocmask(SIG_BLOCK, &mask_chld, NULL);
@@ -3306,10 +3541,7 @@ int main(int argc, char *argv[]) {
                         /* Notify the child that the parent is ready with all
                          * its setup, and that the child can now hand over
                          * control to the code to run inside the container. */
-                        r = eventfd_send_state(eventfds[0], EVENTFD_PARENT_SUCCEEDED);
-                        eventfds[0] = safe_close(eventfds[0]);
-                        if (r < 0)
-                                goto finish;
+                        barrier_place(&barrier);
 
                         k = process_pty(master, &mask, arg_boot ? pid : 0, SIGRTMIN+3);
                         if (k < 0) {
@@ -3360,6 +3592,10 @@ int main(int argc, char *argv[]) {
         }
 
 finish:
+        sd_notify(false,
+                  "STOPPING=1\n"
+                  "STATUS=Terminating...");
+
         loop_remove(loop_nr, &image_fd);
 
         if (pid > 0)
diff --git a/src/nss-myhostname/ifconf.h b/src/nss-myhostname/ifconf.h
deleted file mode 100644 (file)
index cd598d2..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#pragma once
-
-/***
-  This file is part of systemd.
-
-  Copyright 2008-2011 Lennart Poettering
-
-  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/>.
-***/
-
-#include <inttypes.h>
-#include <sys/types.h>
-#include <assert.h>
-#include <sys/socket.h>
-
-struct address {
-        unsigned char family;
-        uint8_t address[16];
-        unsigned char scope;
-        int ifindex;
-};
-
-#define _public_ __attribute__ ((visibility("default")))
-#define _hidden_ __attribute__ ((visibility("hidden")))
-
-int ifconf_acquire_addresses(struct address **_list, unsigned *_n_list) _hidden_;
-
-static inline size_t PROTO_ADDRESS_SIZE(int proto) {
-        assert(proto == AF_INET || proto == AF_INET6);
-
-        return proto == AF_INET6 ? 16 : 4;
-}
-
-static inline int address_compare(const void *_a, const void *_b) {
-        const struct address *a = _a, *b = _b;
-
-        /* Order lowest scope first, IPv4 before IPv6, lowest interface index first */
-
-        if (a->scope < b->scope)
-                return -1;
-        if (a->scope > b->scope)
-                return 1;
-
-        if (a->family == AF_INET && b->family == AF_INET6)
-                return -1;
-        if (a->family == AF_INET6 && b->family == AF_INET)
-                return 1;
-
-        if (a->ifindex < b->ifindex)
-                return -1;
-        if (a->ifindex > b->ifindex)
-                return 1;
-
-        return 0;
-}
diff --git a/src/nss-myhostname/netlink.c b/src/nss-myhostname/netlink.c
deleted file mode 100644 (file)
index b4a464c..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2008-2011 Lennart Poettering
-  Copyright 2014 Tom Gundersen
-
-  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/>.
-***/
-
-#include "sd-rtnl.h"
-#include "rtnl-util.h"
-#include "macro.h"
-
-#include "ifconf.h"
-
-int ifconf_acquire_addresses(struct address **_list, unsigned *_n_list) {
-        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
-        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
-        sd_rtnl_message *m;
-        _cleanup_free_ struct address *list = NULL;
-        struct address *new_list = NULL;
-        unsigned n_list = 0;
-        int r;
-
-        r = sd_rtnl_open(&rtnl, 0);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_message_new_addr(rtnl, &req, RTM_GETADDR, 0, AF_UNSPEC);
-        if (r < 0)
-                return r;
-
-        r = sd_rtnl_call(rtnl, req, 0, &reply);
-        if (r < 0)
-                return r;
-        m = reply;
-
-        do {
-                uint16_t type;
-                unsigned char scope;
-                unsigned char flags;
-                unsigned char family;
-                int ifindex;
-                union {
-                        struct in_addr in;
-                        struct in6_addr in6;
-                } address;
-
-                r = sd_rtnl_message_get_errno(m);
-                if (r < 0)
-                        return r;
-
-                r = sd_rtnl_message_get_type(m, &type);
-                if (r < 0)
-                        return r;
-
-                if (type != RTM_NEWADDR)
-                        continue;
-
-                r = sd_rtnl_message_addr_get_scope(m, &scope);
-                if (r < 0)
-                        return r;
-
-                if (scope == RT_SCOPE_HOST || scope == RT_SCOPE_NOWHERE)
-                        continue;
-
-                r = sd_rtnl_message_addr_get_flags(m, &flags);
-                if (r < 0)
-                        return r;
-
-                if (flags & IFA_F_DEPRECATED)
-                        continue;
-
-                r = sd_rtnl_message_addr_get_family(m, &family);
-                if (r < 0)
-                        return r;
-
-                switch (family) {
-                case AF_INET:
-                        r = sd_rtnl_message_read_in_addr(m, IFA_LOCAL, &address.in);
-                        if (r < 0) {
-                                r = sd_rtnl_message_read_in_addr(m, IFA_ADDRESS, &address.in);
-                                if (r < 0)
-                                        continue;
-                        }
-                        break;
-                case AF_INET6:
-                        r = sd_rtnl_message_read_in6_addr(m, IFA_LOCAL, &address.in6);
-                        if (r < 0) {
-                                r = sd_rtnl_message_read_in6_addr(m, IFA_ADDRESS, &address.in6);
-                                if (r < 0)
-                                        continue;
-                        }
-                        break;
-                default:
-                        continue;
-                }
-
-                r = sd_rtnl_message_addr_get_ifindex(m, &ifindex);
-                if (r < 0)
-                        return r;
-
-                new_list = realloc(list, (n_list+1) * sizeof(struct address));
-                if (!new_list)
-                        return -ENOMEM;
-                else
-                        list = new_list;
-
-                assert_cc(sizeof(address) <= 16);
-
-                list[n_list].family = family;
-                list[n_list].scope = scope;
-                memcpy(list[n_list].address, &address, sizeof(address));
-                list[n_list].ifindex = ifindex;
-
-                n_list++;
-
-        } while ((m = sd_rtnl_message_next(m)));
-
-        if (n_list)
-                qsort(list, n_list, sizeof(struct address), address_compare);
-
-        *_n_list = n_list;
-        *_list = list;
-        list = NULL;
-
-        return 0;
-}
index 60e256d54fc0b5c3d5f1ada27d7a8b23ac489bf4..86e7be2aa132d4ca9e9ecc8590d41e63022e6a23 100644 (file)
 #include <stdlib.h>
 #include <arpa/inet.h>
 
-#include "ifconf.h"
+#include "local-addresses.h"
 #include "macro.h"
-
-/* Ensure that glibc's assert is used. We cannot use assert from macro.h, as
- * libnss_myhostname will be linked into arbitrary programs which will, in turn
- * attempt to write to the journal via log_dispatch() */
-#include <assert.h>
+#include "nss-util.h"
+#include "util.h"
 
 /* We use 127.0.0.2 as IPv4 address. This has the advantage over
  * 127.0.0.1 that it can be translated back to the local hostname. For
 #define LOCALADDRESS_IPV6 &in6addr_loopback
 #define LOOPBACK_INTERFACE "lo"
 
-enum nss_status _nss_myhostname_gethostbyname4_r(
-                const char *name,
-                struct gaih_addrtuple **pat,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop,
-                int32_t *ttlp) _public_;
-
-enum nss_status _nss_myhostname_gethostbyname3_r(
-                const char *name,
-                int af,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop,
-                int32_t *ttlp,
-                char **canonp) _public_;
-
-enum nss_status _nss_myhostname_gethostbyname2_r(
-                const char *name,
-                int af,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop) _public_;
-
-enum nss_status _nss_myhostname_gethostbyname_r(
-                const char *name,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop) _public_;
-
-enum nss_status _nss_myhostname_gethostbyaddr2_r(
-                const void* addr, socklen_t len,
-                int af,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop,
-                int32_t *ttlp) _public_;
-
-enum nss_status _nss_myhostname_gethostbyaddr_r(
-                const void* addr, socklen_t len,
-                int af,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop) _public_;
+NSS_GETHOSTBYNAME_PROTOTYPES(myhostname);
+NSS_GETHOSTBYADDR_PROTOTYPES(myhostname);
 
 enum nss_status _nss_myhostname_gethostbyname4_r(
                 const char *name,
@@ -98,39 +54,47 @@ enum nss_status _nss_myhostname_gethostbyname4_r(
                 int *errnop, int *h_errnop,
                 int32_t *ttlp) {
 
-        unsigned lo_ifi;
-        char hn[HOST_NAME_MAX+1] = {};
+        struct gaih_addrtuple *r_tuple, *r_tuple_prev = NULL;
+        _cleanup_free_ struct local_address *addresses = NULL;
+        _cleanup_free_ char *hn = NULL;
         const char *canonical = NULL;
+        int n_addresses = 0, lo_ifi;
+        uint32_t local_address_ipv4;
+        struct local_address *a;
         size_t l, idx, ms;
         char *r_name;
-        struct gaih_addrtuple *r_tuple, *r_tuple_prev = NULL;
-        struct address *addresses = NULL, *a;
-        unsigned n_addresses = 0, n;
-        uint32_t local_address_ipv4;
+        unsigned n;
+
+        assert(name);
+        assert(pat);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
 
-        if (strcasecmp(name, "localhost") == 0) {
+        if (is_localhost(name)) {
                 /* We respond to 'localhost', so that /etc/hosts
                  * is optional */
 
                 canonical = "localhost";
                 local_address_ipv4 = htonl(INADDR_LOOPBACK);
         } else {
-                /* We respond to our local host name */
-
-                if (gethostname(hn, sizeof(hn)-1) < 0) {
-                        *errnop = errno;
+                hn = gethostname_malloc();
+                if (!hn) {
+                        *errnop = ENOMEM;
                         *h_errnop = NO_RECOVERY;
-                        return NSS_STATUS_UNAVAIL;
+                        return NSS_STATUS_TRYAGAIN;
                 }
 
-                if (strcasecmp(name, hn) != 0) {
+                /* We respond to our local host name, our our hostname suffixed with a single dot. */
+                if (!streq(name, hn) && !streq_ptr(startswith(name, hn), ".")) {
                         *errnop = ENOENT;
                         *h_errnop = HOST_NOT_FOUND;
                         return NSS_STATUS_NOTFOUND;
                 }
 
-                /* If this fails, n_addresses is 0. Which is fine */
-                ifconf_acquire_addresses(&addresses, &n_addresses);
+                n_addresses = local_addresses(NULL, 0, &addresses);
+                if (n_addresses < 0)
+                        n_addresses = 0;
 
                 canonical = hn;
                 local_address_ipv4 = LOCALADDRESS_IPV4;
@@ -140,11 +104,10 @@ enum nss_status _nss_myhostname_gethostbyname4_r(
         lo_ifi = n_addresses <= 0 ? if_nametoindex(LOOPBACK_INTERFACE) : 0;
 
         l = strlen(canonical);
-        ms = ALIGN(l+1)+ALIGN(sizeof(struct gaih_addrtuple))*(n_addresses > 0 ? n_addresses : 2);
+        ms = ALIGN(l+1) + ALIGN(sizeof(struct gaih_addrtuple)) * (n_addresses > 0 ? n_addresses : 2);
         if (buflen < ms) {
                 *errnop = ENOMEM;
                 *h_errnop = NO_RECOVERY;
-                free(addresses);
                 return NSS_STATUS_TRYAGAIN;
         }
 
@@ -178,13 +141,13 @@ enum nss_status _nss_myhostname_gethostbyname4_r(
         }
 
         /* Fourth, fill actual addresses in, but in backwards order */
-        for (a = addresses + n_addresses - 1, n = 0; n < n_addresses; n++, a--) {
+        for (a = addresses + n_addresses - 1, n = 0; (int) n < n_addresses; n++, a--) {
                 r_tuple = (struct gaih_addrtuple*) (buffer + idx);
                 r_tuple->next = r_tuple_prev;
                 r_tuple->name = r_name;
                 r_tuple->family = a->family;
                 r_tuple->scopeid = a->ifindex;
-                memcpy(r_tuple->addr, a->address, 16);
+                memcpy(r_tuple->addr, &a->address, 16);
 
                 idx += ALIGN(sizeof(struct gaih_addrtuple));
                 r_tuple_prev = r_tuple;
@@ -202,7 +165,10 @@ enum nss_status _nss_myhostname_gethostbyname4_r(
         if (ttlp)
                 *ttlp = 0;
 
-        free(addresses);
+        /* Explicitly reset all error variables */
+        *errnop = 0;
+        *h_errnop = NETDB_SUCCESS;
+        h_errno = 0;
 
         return NSS_STATUS_SUCCESS;
 }
@@ -210,7 +176,7 @@ enum nss_status _nss_myhostname_gethostbyname4_r(
 static enum nss_status fill_in_hostent(
                 const char *canonical, const char *additional,
                 int af,
-                struct address *addresses, unsigned n_addresses,
+                struct local_address *addresses, unsigned n_addresses,
                 uint32_t local_address_ipv4,
                 struct hostent *result,
                 char *buffer, size_t buflen,
@@ -218,13 +184,18 @@ static enum nss_status fill_in_hostent(
                 int32_t *ttlp,
                 char **canonp) {
 
-        size_t l_canonical, l_additional, idx, ms;
+        size_t l_canonical, l_additional, idx, ms, alen;
         char *r_addr, *r_name, *r_aliases, *r_alias = NULL, *r_addr_list;
-        size_t alen;
-        struct address *a;
+        struct local_address *a;
         unsigned n, c;
 
-        alen = PROTO_ADDRESS_SIZE(af);
+        assert(canonical);
+        assert(result);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
+
+        alen = FAMILY_ADDRESS_SIZE(af);
 
         for (a = addresses, n = 0, c = 0; n < n_addresses; a++, n++)
                 if (af == a->family)
@@ -234,15 +205,14 @@ static enum nss_status fill_in_hostent(
         l_additional = additional ? strlen(additional) : 0;
         ms = ALIGN(l_canonical+1)+
                 (additional ? ALIGN(l_additional+1) : 0) +
-                sizeof(char*)+
+                sizeof(char*) +
                 (additional ? sizeof(char*) : 0) +
-                (c > 0 ? c : 1)*ALIGN(alen)+
-                (c > 0 ? c+1 : 2)*sizeof(char*);
+                (c > 0 ? c : 1) * ALIGN(alen) +
+                (c > 0 ? c+1 : 2) * sizeof(char*);
 
         if (buflen < ms) {
                 *errnop = ENOMEM;
                 *h_errnop = NO_RECOVERY;
-                free(addresses);
                 return NSS_STATUS_TRYAGAIN;
         }
 
@@ -277,7 +247,7 @@ static enum nss_status fill_in_hostent(
                         if (af != a->family)
                                 continue;
 
-                        memcpy(r_addr + i*ALIGN(alen), a->address, alen);
+                        memcpy(r_addr + i*ALIGN(alen), &a->address, alen);
                         i++;
                 }
 
@@ -295,24 +265,18 @@ static enum nss_status fill_in_hostent(
         /* Fourth, add address pointer array */
         r_addr_list = buffer + idx;
         if (c > 0) {
-                unsigned i = 0;
-
-                for (a = addresses, n = 0; n < n_addresses; a++, n++) {
-                        if (af != a->family)
-                                continue;
+                unsigned i;
 
-                        ((char**) r_addr_list)[i] = (r_addr + i*ALIGN(alen));
-                        i++;
-                }
+                for (i = 0; i < c; i++)
+                        ((char**) r_addr_list)[i] = r_addr + i*ALIGN(alen);
 
-                assert(i == c);
-                ((char**) r_addr_list)[c] = NULL;
-                idx += (c+1)*sizeof(char*);
+                ((char**) r_addr_list)[i] = NULL;
+                idx += (c+1) * sizeof(char*);
 
         } else {
                 ((char**) r_addr_list)[0] = r_addr;
                 ((char**) r_addr_list)[1] = NULL;
-                idx += 2*sizeof(char*);
+                idx += 2 * sizeof(char*);
         }
 
         /* Verify the size matches */
@@ -330,7 +294,10 @@ static enum nss_status fill_in_hostent(
         if (canonp)
                 *canonp = r_name;
 
-        free(addresses);
+        /* Explicitly reset all error variables */
+        *errnop = 0;
+        *h_errnop = NETDB_SUCCESS;
+        h_errno = 0;
 
         return NSS_STATUS_SUCCESS;
 }
@@ -344,11 +311,17 @@ enum nss_status _nss_myhostname_gethostbyname3_r(
                 int32_t *ttlp,
                 char **canonp) {
 
-        char hn[HOST_NAME_MAX+1] = {};
-        struct address *addresses = NULL;
-        unsigned n_addresses = 0;
+        _cleanup_free_ struct local_address *addresses = NULL;
         const char *canonical, *additional = NULL;
+        _cleanup_free_ char *hn = NULL;
         uint32_t local_address_ipv4;
+        int n_addresses = 0;
+
+        assert(name);
+        assert(host);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
 
         if (af == AF_UNSPEC)
                 af = AF_INET;
@@ -359,23 +332,26 @@ enum nss_status _nss_myhostname_gethostbyname3_r(
                 return NSS_STATUS_UNAVAIL;
         }
 
-        if (strcasecmp(name, "localhost") == 0) {
+        if (is_localhost(name)) {
                 canonical = "localhost";
                 local_address_ipv4 = htonl(INADDR_LOOPBACK);
         } else {
-                if (gethostname(hn, sizeof(hn)-1) < 0) {
-                        *errnop = errno;
+                hn = gethostname_malloc();
+                if (!hn) {
+                        *errnop = ENOMEM;
                         *h_errnop = NO_RECOVERY;
-                        return NSS_STATUS_UNAVAIL;
+                        return NSS_STATUS_TRYAGAIN;
                 }
 
-                if (strcasecmp(name, hn) != 0) {
+                if (!streq(name, hn) && !streq_ptr(startswith(name, hn), ".")) {
                         *errnop = ENOENT;
                         *h_errnop = HOST_NOT_FOUND;
                         return NSS_STATUS_NOTFOUND;
                 }
 
-                ifconf_acquire_addresses(&addresses, &n_addresses);
+                n_addresses = local_addresses(NULL, 0, &addresses);
+                if (n_addresses < 0)
+                        n_addresses = 0;
 
                 canonical = hn;
                 additional = n_addresses <= 0 && af == AF_INET6 ? "localhost" : NULL;
@@ -394,39 +370,6 @@ enum nss_status _nss_myhostname_gethostbyname3_r(
                         canonp);
 }
 
-enum nss_status _nss_myhostname_gethostbyname2_r(
-                const char *name,
-                int af,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop) {
-
-        return _nss_myhostname_gethostbyname3_r(
-                        name,
-                        af,
-                        host,
-                        buffer, buflen,
-                        errnop, h_errnop,
-                        NULL,
-                        NULL);
-}
-
-enum nss_status _nss_myhostname_gethostbyname_r(
-                const char *name,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop) {
-
-        return _nss_myhostname_gethostbyname3_r(
-                        name,
-                        AF_UNSPEC,
-                        host,
-                        buffer, buflen,
-                        errnop, h_errnop,
-                        NULL,
-                        NULL);
-}
-
 enum nss_status _nss_myhostname_gethostbyaddr2_r(
                 const void* addr, socklen_t len,
                 int af,
@@ -435,14 +378,27 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r(
                 int *errnop, int *h_errnop,
                 int32_t *ttlp) {
 
-        char hn[HOST_NAME_MAX+1] = {};
-        struct address *addresses = NULL;
-        struct address *a;
-        unsigned n_addresses = 0, n;
-        uint32_t local_address_ipv4 = LOCALADDRESS_IPV4;
         const char *canonical = NULL, *additional = NULL;
+        uint32_t local_address_ipv4 = LOCALADDRESS_IPV4;
+        _cleanup_free_ struct local_address *addresses = NULL;
+        _cleanup_free_ char *hn = NULL;
+        int n_addresses = 0;
+        struct local_address *a;
+        unsigned n;
+
+        assert(addr);
+        assert(host);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
+
+        if (!IN_SET(af, AF_INET, AF_INET6)) {
+                *errnop = EAFNOSUPPORT;
+                *h_errnop = NO_DATA;
+                return NSS_STATUS_UNAVAIL;
+        }
 
-        if (len != PROTO_ADDRESS_SIZE(af)) {
+        if (len != FAMILY_ADDRESS_SIZE(af)) {
                 *errnop = EINVAL;
                 *h_errnop = NO_RECOVERY;
                 return NSS_STATUS_UNAVAIL;
@@ -459,45 +415,40 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r(
                         goto found;
                 }
 
-        } else if (af == AF_INET6) {
+        } else {
+                assert(af == AF_INET6);
 
                 if (memcmp(addr, LOCALADDRESS_IPV6, 16) == 0) {
                         additional = "localhost";
                         goto found;
                 }
 
-        } else {
-                *errnop = EAFNOSUPPORT;
-                *h_errnop = NO_DATA;
-                return NSS_STATUS_UNAVAIL;
         }
 
-        ifconf_acquire_addresses(&addresses, &n_addresses);
+        n_addresses = local_addresses(NULL, 0, &addresses);
+        if (n_addresses < 0)
+                n_addresses = 0;
 
-        for (a = addresses, n = 0; n < n_addresses; n++, a++) {
+        for (a = addresses, n = 0; (int) n < n_addresses; n++, a++) {
                 if (af != a->family)
                         continue;
 
-                if (memcmp(addr, a->address, PROTO_ADDRESS_SIZE(af)) == 0)
+                if (memcmp(addr, &a->address, FAMILY_ADDRESS_SIZE(af)) == 0)
                         goto found;
         }
 
         *errnop = ENOENT;
         *h_errnop = HOST_NOT_FOUND;
 
-        free(addresses);
-
         return NSS_STATUS_NOTFOUND;
 
 found:
         if (!canonical) {
-                if (gethostname(hn, sizeof(hn)-1) < 0) {
-                        *errnop = errno;
+                hn = gethostname_malloc();
+                if (!hn) {
+                        *errnop = ENOMEM;
                         *h_errnop = NO_RECOVERY;
-
-                        free(addresses);
-
-                        return NSS_STATUS_UNAVAIL;
+                        return NSS_STATUS_TRYAGAIN;
                 }
 
                 canonical = hn;
@@ -516,18 +467,5 @@ found:
 
 }
 
-enum nss_status _nss_myhostname_gethostbyaddr_r(
-                const void* addr, socklen_t len,
-                int af,
-                struct hostent *host,
-                char *buffer, size_t buflen,
-                int *errnop, int *h_errnop) {
-
-        return _nss_myhostname_gethostbyaddr2_r(
-                        addr, len,
-                        af,
-                        host,
-                        buffer, buflen,
-                        errnop, h_errnop,
-                        NULL);
-}
+NSS_GETHOSTBYNAME_FALLBACKS(myhostname);
+NSS_GETHOSTBYADDR_FALLBACKS(myhostname);
diff --git a/src/nss-myhostname/nss-myhostname.sym b/src/nss-myhostname/nss-myhostname.sym
new file mode 100644 (file)
index 0000000..78646c3
--- /dev/null
@@ -0,0 +1,19 @@
+/***
+  This file is part of systemd.
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+***/
+
+{
+global:
+        _nss_myhostname_gethostbyname_r;
+        _nss_myhostname_gethostbyname2_r;
+        _nss_myhostname_gethostbyname3_r;
+        _nss_myhostname_gethostbyname4_r;
+        _nss_myhostname_gethostbyaddr_r;
+        _nss_myhostname_gethostbyaddr2_r;
+local: *;
+};
diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
new file mode 100644 (file)
index 0000000..9476ad1
--- /dev/null
@@ -0,0 +1,383 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <nss.h>
+#include <netdb.h>
+
+#include "sd-bus.h"
+#include "sd-login.h"
+#include "macro.h"
+#include "util.h"
+#include "nss-util.h"
+#include "bus-util.h"
+#include "in-addr-util.h"
+
+NSS_GETHOSTBYNAME_PROTOTYPES(mymachines);
+
+static int count_addresses(sd_bus_message *m, int af, unsigned *ret) {
+        unsigned c = 0;
+        int r;
+
+        assert(m);
+        assert(ret);
+
+        while ((r = sd_bus_message_enter_container(m, 'r', "iay")) > 0) {
+                int family;
+
+                r = sd_bus_message_read(m, "i", &family);
+                if (r < 0)
+                        return r;
+
+                r = sd_bus_message_skip(m, "ay");
+                if (r < 0)
+                        return r;
+
+                r = sd_bus_message_exit_container(m);
+                if (r < 0)
+                        return r;
+
+                if (af != AF_UNSPEC && family != af)
+                        continue;
+
+                c ++;
+        }
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_rewind(m, false);
+        if (r < 0)
+                return r;
+
+        *ret = c;
+        return 0;
+}
+
+enum nss_status _nss_mymachines_gethostbyname4_r(
+                const char *name,
+                struct gaih_addrtuple **pat,
+                char *buffer, size_t buflen,
+                int *errnop, int *h_errnop,
+                int32_t *ttlp) {
+
+        struct gaih_addrtuple *r_tuple, *r_tuple_first = NULL;
+        _cleanup_bus_message_unref_ sd_bus_message* reply = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        _cleanup_free_ int *ifindices = NULL;
+        _cleanup_free_ char *class = NULL;
+        size_t l, ms, idx;
+        unsigned i = 0, c = 0;
+        char *r_name;
+        int n_ifindices, r;
+
+        assert(name);
+        assert(pat);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
+
+        r = sd_machine_get_class(name, &class);
+        if (r < 0)
+                goto fail;
+        if (!streq(class, "container")) {
+                r = -ENOTTY;
+                goto fail;
+        }
+
+        n_ifindices = sd_machine_get_ifindices(name, &ifindices);
+        if (n_ifindices < 0) {
+                r = n_ifindices;
+                goto fail;
+        }
+
+        r = sd_bus_open_system(&bus);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_call_method(bus,
+                               "org.freedesktop.machine1",
+                               "/org/freedesktop/machine1",
+                               "org.freedesktop.machine1.Manager",
+                               "GetMachineAddresses",
+                               NULL,
+                               &reply,
+                               "s", name);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_enter_container(reply, 'a', "(iay)");
+        if (r < 0)
+                goto fail;
+
+        r = count_addresses(reply, AF_UNSPEC, &c);
+        if (r < 0)
+                goto fail;
+
+        if (c <= 0) {
+                *errnop = ESRCH;
+                *h_errnop = HOST_NOT_FOUND;
+                return NSS_STATUS_NOTFOUND;
+        }
+
+        l = strlen(name);
+        ms = ALIGN(l+1) + ALIGN(sizeof(struct gaih_addrtuple)) * c;
+        if (buflen < ms) {
+                *errnop = ENOMEM;
+                *h_errnop = TRY_AGAIN;
+                return NSS_STATUS_TRYAGAIN;
+        }
+
+        /* First, append name */
+        r_name = buffer;
+        memcpy(r_name, name, l+1);
+        idx = ALIGN(l+1);
+
+        /* Second, append addresses */
+        r_tuple_first = (struct gaih_addrtuple*) (buffer + idx);
+        while ((r = sd_bus_message_enter_container(reply, 'r', "iay")) > 0) {
+                int family;
+                const void *a;
+                size_t sz;
+
+                r = sd_bus_message_read(reply, "i", &family);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_read_array(reply, 'y', &a, &sz);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        goto fail;
+
+                if (!IN_SET(family, AF_INET, AF_INET6)) {
+                        r = -EAFNOSUPPORT;
+                        goto fail;
+                }
+
+                if (sz != FAMILY_ADDRESS_SIZE(family)) {
+                        r = -EINVAL;
+                        goto fail;
+                }
+
+                r_tuple = (struct gaih_addrtuple*) (buffer + idx);
+                r_tuple->next = i == c-1 ? NULL : (struct gaih_addrtuple*) ((char*) r_tuple + ALIGN(sizeof(struct gaih_addrtuple)));
+                r_tuple->name = r_name;
+                r_tuple->family = family;
+                r_tuple->scopeid = n_ifindices == 1 ? ifindices[0] : 0;
+                memcpy(r_tuple->addr, a, sz);
+
+                idx += ALIGN(sizeof(struct gaih_addrtuple));
+                i++;
+        }
+
+        assert(i == c);
+
+        r = sd_bus_message_exit_container(reply);
+        if (r < 0)
+                goto fail;
+
+        assert(idx == ms);
+
+        if (*pat)
+                **pat = *r_tuple_first;
+        else
+                *pat = r_tuple_first;
+
+        if (ttlp)
+                *ttlp = 0;
+
+        /* Explicitly reset all error variables */
+        *errnop = 0;
+        *h_errnop = NETDB_SUCCESS;
+        h_errno = 0;
+
+        return NSS_STATUS_SUCCESS;
+
+fail:
+        *errnop = -r;
+        *h_errnop = NO_DATA;
+        return NSS_STATUS_UNAVAIL;
+}
+
+enum nss_status _nss_mymachines_gethostbyname3_r(
+                const char *name,
+                int af,
+                struct hostent *result,
+                char *buffer, size_t buflen,
+                int *errnop, int *h_errnop,
+                int32_t *ttlp,
+                char **canonp) {
+
+        _cleanup_bus_message_unref_ sd_bus_message* reply = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        _cleanup_free_ char *class = NULL;
+        unsigned c = 0, i = 0;
+        char *r_name, *r_aliases, *r_addr, *r_addr_list;
+        size_t l, idx, ms, alen;
+        int r;
+
+        assert(name);
+        assert(result);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
+
+        if (af == AF_UNSPEC)
+                af = AF_INET;
+
+        if (af != AF_INET && af != AF_INET6) {
+                r = -EAFNOSUPPORT;
+                goto fail;
+        }
+
+        r = sd_machine_get_class(name, &class);
+        if (r < 0)
+                goto fail;
+        if (!streq(class, "container")) {
+                r = -ENOTTY;
+                goto fail;
+        }
+
+        r = sd_bus_open_system(&bus);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_call_method(bus,
+                               "org.freedesktop.machine1",
+                               "/org/freedesktop/machine1",
+                               "org.freedesktop.machine1.Manager",
+                               "GetMachineAddresses",
+                               NULL,
+                               &reply,
+                               "s", name);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_enter_container(reply, 'a', "(iay)");
+        if (r < 0)
+                goto fail;
+
+        r = count_addresses(reply, af, &c);
+        if (r < 0)
+                goto fail;
+
+        if (c <= 0) {
+                *errnop = ENOENT;
+                *h_errnop = HOST_NOT_FOUND;
+                return NSS_STATUS_NOTFOUND;
+        }
+
+        alen = FAMILY_ADDRESS_SIZE(af);
+        l = strlen(name);
+
+        ms = ALIGN(l+1) + c * ALIGN(alen) + (c+2) * sizeof(char*);
+
+        if (buflen < ms) {
+                *errnop = ENOMEM;
+                *h_errnop = NO_RECOVERY;
+                return NSS_STATUS_TRYAGAIN;
+        }
+
+        /* First, append name */
+        r_name = buffer;
+        memcpy(r_name, name, l+1);
+        idx = ALIGN(l+1);
+
+        /* Second, create aliases array */
+        r_aliases = buffer + idx;
+        ((char**) r_aliases)[0] = NULL;
+        idx += sizeof(char*);
+
+        /* Third, append addresses */
+        r_addr = buffer + idx;
+        while ((r = sd_bus_message_enter_container(reply, 'r', "iay")) > 0) {
+                int family;
+                const void *a;
+                size_t sz;
+
+                r = sd_bus_message_read(reply, "i", &family);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_read_array(reply, 'y', &a, &sz);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        goto fail;
+
+                if (family != af)
+                        continue;
+
+                if (sz != alen) {
+                        r = -EINVAL;
+                        goto fail;
+                }
+
+                memcpy(r_addr + i*ALIGN(alen), a, alen);
+                i++;
+        }
+
+        assert(i == c);
+        idx += c * ALIGN(alen);
+
+        r = sd_bus_message_exit_container(reply);
+        if (r < 0)
+                goto fail;
+
+        /* Third, append address pointer array */
+        r_addr_list = buffer + idx;
+        for (i = 0; i < c; i++)
+                ((char**) r_addr_list)[i] = r_addr + i*ALIGN(alen);
+
+        ((char**) r_addr_list)[i] = NULL;
+        idx += (c+1) * sizeof(char*);
+
+        assert(idx == ms);
+
+        result->h_name = r_name;
+        result->h_aliases = (char**) r_aliases;
+        result->h_addrtype = af;
+        result->h_length = alen;
+        result->h_addr_list = (char**) r_addr_list;
+
+        if (ttlp)
+                *ttlp = 0;
+
+        if (canonp)
+                *canonp = r_name;
+
+        /* Explicitly reset all error variables */
+        *errnop = 0;
+        *h_errnop = NETDB_SUCCESS;
+        h_errno = 0;
+
+        return NSS_STATUS_SUCCESS;
+
+fail:
+        *errnop = -r;
+        *h_errnop = NO_DATA;
+        return NSS_STATUS_UNAVAIL;
+}
+
+NSS_GETHOSTBYNAME_FALLBACKS(mymachines)
diff --git a/src/nss-mymachines/nss-mymachines.sym b/src/nss-mymachines/nss-mymachines.sym
new file mode 100644 (file)
index 0000000..f80b51c
--- /dev/null
@@ -0,0 +1,17 @@
+/***
+  This file is part of systemd.
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+***/
+
+{
+global:
+        _nss_mymachines_gethostbyname_r;
+        _nss_mymachines_gethostbyname2_r;
+        _nss_mymachines_gethostbyname3_r;
+        _nss_mymachines_gethostbyname4_r;
+local: *;
+};
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
new file mode 100644 (file)
index 0000000..6a029a3
--- /dev/null
@@ -0,0 +1,712 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <limits.h>
+#include <nss.h>
+#include <sys/types.h>
+#include <netdb.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <net/if.h>
+#include <stdlib.h>
+#include <arpa/inet.h>
+#include <dlfcn.h>
+
+#include "sd-bus.h"
+#include "bus-util.h"
+#include "bus-errors.h"
+#include "macro.h"
+#include "nss-util.h"
+#include "util.h"
+#include "in-addr-util.h"
+
+NSS_GETHOSTBYNAME_PROTOTYPES(resolve);
+NSS_GETHOSTBYADDR_PROTOTYPES(resolve);
+
+#define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC)
+
+typedef void (*voidfunc_t)(void);
+
+static voidfunc_t find_fallback(const char *module, const char *symbol) {
+        void *dl;
+
+        /* Try to find a fallback NSS module symbol */
+
+        dl = dlopen(module, RTLD_LAZY|RTLD_NODELETE);
+        if (!dl)
+                return NULL;
+
+        return dlsym(dl, symbol);
+}
+
+static bool bus_error_shall_fallback(sd_bus_error *e) {
+        return sd_bus_error_has_name(e, SD_BUS_ERROR_SERVICE_UNKNOWN) ||
+               sd_bus_error_has_name(e, SD_BUS_ERROR_NAME_HAS_NO_OWNER) ||
+               sd_bus_error_has_name(e, SD_BUS_ERROR_NO_REPLY) ||
+               sd_bus_error_has_name(e, SD_BUS_ERROR_ACCESS_DENIED);
+}
+
+static int count_addresses(sd_bus_message *m, int af, const char **canonical) {
+        int c = 0, r, ifindex;
+
+        assert(m);
+        assert(canonical);
+
+        r = sd_bus_message_read(m, "i", &ifindex);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_enter_container(m, 'a', "(iay)");
+        if (r < 0)
+                return r;
+
+        while ((r = sd_bus_message_enter_container(m, 'r', "iay")) > 0) {
+                int family;
+
+                r = sd_bus_message_read(m, "i", &family);
+                if (r < 0)
+                        return r;
+
+                r = sd_bus_message_skip(m, "ay");
+                if (r < 0)
+                        return r;
+
+                r = sd_bus_message_exit_container(m);
+                if (r < 0)
+                        return r;
+
+                if (af != AF_UNSPEC && family != af)
+                        continue;
+
+                c ++;
+        }
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_exit_container(m);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_read(m, "s", canonical);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_rewind(m, true);
+        if (r < 0)
+                return r;
+
+        return c;
+}
+
+enum nss_status _nss_resolve_gethostbyname4_r(
+                const char *name,
+                struct gaih_addrtuple **pat,
+                char *buffer, size_t buflen,
+                int *errnop, int *h_errnop,
+                int32_t *ttlp) {
+
+        _cleanup_bus_message_unref_ sd_bus_message *req = NULL, *reply = NULL;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        struct gaih_addrtuple *r_tuple, *r_tuple_first = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        const char *canonical = NULL;
+        size_t l, ms, idx;
+        char *r_name;
+        int c, r, i = 0, ifindex;
+
+        assert(name);
+        assert(pat);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
+
+        r = sd_bus_open_system(&bus);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_new_method_call(
+                        bus,
+                        &req,
+                        "org.freedesktop.resolve1",
+                        "/org/freedesktop/resolve1",
+                        "org.freedesktop.resolve1.Manager",
+                        "ResolveHostname");
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_set_auto_start(req, false);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_append(req, "isit", 0, name, AF_UNSPEC, (uint64_t) 0);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_call(bus, req, DNS_CALL_TIMEOUT_USEC, &error, &reply);
+        if (r < 0) {
+                if (sd_bus_error_has_name(&error, _BUS_ERROR_DNS "NXDOMAIN")) {
+                        *errnop = ESRCH;
+                        *h_errnop = HOST_NOT_FOUND;
+                        return NSS_STATUS_NOTFOUND;
+                }
+
+                if (bus_error_shall_fallback(&error)) {
+
+                        enum nss_status (*fallback)(
+                                        const char *name,
+                                        struct gaih_addrtuple **pat,
+                                        char *buffer, size_t buflen,
+                                        int *errnop, int *h_errnop,
+                                        int32_t *ttlp);
+
+                        fallback = (enum nss_status (*)(const char *name,
+                                                        struct gaih_addrtuple **pat,
+                                                        char *buffer, size_t buflen,
+                                                        int *errnop, int *h_errnop,
+                                                        int32_t *ttlp))
+                                find_fallback("libnss_dns.so.2", "_nss_dns_gethostbyname4_r");
+                        if (fallback)
+                                return fallback(name, pat, buffer, buflen, errnop, h_errnop, ttlp);
+                }
+
+                *errnop = -r;
+                *h_errnop = NO_RECOVERY;
+                return NSS_STATUS_UNAVAIL;
+        }
+
+        c = count_addresses(reply, AF_UNSPEC, &canonical);
+        if (c < 0) {
+                r = c;
+                goto fail;
+        }
+        if (c == 0) {
+                *errnop = ESRCH;
+                *h_errnop = HOST_NOT_FOUND;
+                return NSS_STATUS_NOTFOUND;
+        }
+
+        if (isempty(canonical))
+                canonical = name;
+
+        l = strlen(canonical);
+        ms = ALIGN(l+1) + ALIGN(sizeof(struct gaih_addrtuple)) * c;
+        if (buflen < ms) {
+                *errnop = ENOMEM;
+                *h_errnop = TRY_AGAIN;
+                return NSS_STATUS_TRYAGAIN;
+        }
+
+        /* First, append name */
+        r_name = buffer;
+        memcpy(r_name, canonical, l+1);
+        idx = ALIGN(l+1);
+
+        /* Second, append addresses */
+        r_tuple_first = (struct gaih_addrtuple*) (buffer + idx);
+
+        r = sd_bus_message_read(reply, "i", &ifindex);
+        if (r < 0)
+                goto fail;
+
+        if (ifindex < 0) {
+                r = -EINVAL;
+                goto fail;
+        }
+
+        r = sd_bus_message_enter_container(reply, 'a', "(iay)");
+        if (r < 0)
+                goto fail;
+
+        while ((r = sd_bus_message_enter_container(reply, 'r', "iay")) > 0) {
+                int family;
+                const void *a;
+                size_t sz;
+
+                r = sd_bus_message_read(reply, "i", &family);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_read_array(reply, 'y', &a, &sz);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        goto fail;
+
+                if (!IN_SET(family, AF_INET, AF_INET6))
+                        continue;
+
+                if (sz != FAMILY_ADDRESS_SIZE(family)) {
+                        r = -EINVAL;
+                        goto fail;
+                }
+
+                r_tuple = (struct gaih_addrtuple*) (buffer + idx);
+                r_tuple->next = i == c-1 ? NULL : (struct gaih_addrtuple*) ((char*) r_tuple + ALIGN(sizeof(struct gaih_addrtuple)));
+                r_tuple->name = r_name;
+                r_tuple->family = family;
+                r_tuple->scopeid = ifindex;
+                memcpy(r_tuple->addr, a, sz);
+
+                idx += ALIGN(sizeof(struct gaih_addrtuple));
+                i++;
+        }
+        if (r < 0)
+                goto fail;
+
+        assert(i == c);
+        assert(idx == ms);
+
+        if (*pat)
+                **pat = *r_tuple_first;
+        else
+                *pat = r_tuple_first;
+
+        if (ttlp)
+                *ttlp = 0;
+
+        /* Explicitly reset all error variables */
+        *errnop = 0;
+        *h_errnop = NETDB_SUCCESS;
+        h_errno = 0;
+
+        return NSS_STATUS_SUCCESS;
+
+fail:
+        *errnop = -r;
+        *h_errnop = NO_DATA;
+        return NSS_STATUS_UNAVAIL;
+}
+
+enum nss_status _nss_resolve_gethostbyname3_r(
+                const char *name,
+                int af,
+                struct hostent *result,
+                char *buffer, size_t buflen,
+                int *errnop, int *h_errnop,
+                int32_t *ttlp,
+                char **canonp) {
+
+        _cleanup_bus_message_unref_ sd_bus_message *req = NULL, *reply = NULL;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        char *r_name, *r_aliases, *r_addr, *r_addr_list;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        size_t l, idx, ms, alen;
+        const char *canonical;
+        int c, r, i = 0, ifindex;
+
+        assert(name);
+        assert(result);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
+
+        if (af == AF_UNSPEC)
+                af = AF_INET;
+
+        if (af != AF_INET && af != AF_INET6) {
+                r = -EAFNOSUPPORT;
+                goto fail;
+        }
+
+        r = sd_bus_open_system(&bus);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_new_method_call(
+                        bus,
+                        &req,
+                        "org.freedesktop.resolve1",
+                        "/org/freedesktop/resolve1",
+                        "org.freedesktop.resolve1.Manager",
+                        "ResolveHostname");
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_set_auto_start(req, false);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_append(req, "isit", 0, name, af, (uint64_t) 0);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_call(bus, req, DNS_CALL_TIMEOUT_USEC, &error, &reply);
+        if (r < 0) {
+                if (sd_bus_error_has_name(&error, _BUS_ERROR_DNS "NXDOMAIN")) {
+                        *errnop = ESRCH;
+                        *h_errnop = HOST_NOT_FOUND;
+                        return NSS_STATUS_NOTFOUND;
+                }
+
+                if (bus_error_shall_fallback(&error)) {
+
+                        enum nss_status (*fallback)(
+                                        const char *name,
+                                        int af,
+                                        struct hostent *result,
+                                        char *buffer, size_t buflen,
+                                        int *errnop, int *h_errnop,
+                                        int32_t *ttlp,
+                                        char **canonp);
+
+                        fallback =  (enum nss_status (*)(const char *name,
+                                                         int af,
+                                                         struct hostent *result,
+                                                         char *buffer, size_t buflen,
+                                                         int *errnop, int *h_errnop,
+                                                         int32_t *ttlp,
+                                                         char **canonp))
+                                find_fallback("libnss_dns.so.2", "_nss_dns_gethostbyname3_r");
+                        if (fallback)
+                                return fallback(name, af, result, buffer, buflen, errnop, h_errnop, ttlp, canonp);
+                }
+
+                *errnop = -r;
+                *h_errnop = NO_RECOVERY;
+                return NSS_STATUS_UNAVAIL;
+        }
+
+        c = count_addresses(reply, af, &canonical);
+        if (c < 0) {
+                r = c;
+                goto fail;
+        }
+        if (c == 0) {
+                *errnop = ESRCH;
+                *h_errnop = HOST_NOT_FOUND;
+                return NSS_STATUS_NOTFOUND;
+        }
+
+        if (isempty(canonical))
+                canonical = name;
+
+        alen = FAMILY_ADDRESS_SIZE(af);
+        l = strlen(canonical);
+
+        ms = ALIGN(l+1) + c * ALIGN(alen) + (c+2) * sizeof(char*);
+
+        if (buflen < ms) {
+                *errnop = ENOMEM;
+                *h_errnop = TRY_AGAIN;
+                return NSS_STATUS_TRYAGAIN;
+        }
+
+        /* First, append name */
+        r_name = buffer;
+        memcpy(r_name, canonical, l+1);
+        idx = ALIGN(l+1);
+
+        /* Second, create empty aliases array */
+        r_aliases = buffer + idx;
+        ((char**) r_aliases)[0] = NULL;
+        idx += sizeof(char*);
+
+        /* Third, append addresses */
+        r_addr = buffer + idx;
+
+        r = sd_bus_message_read(reply, "i", &ifindex);
+        if (r < 0)
+                goto fail;
+
+        if (ifindex < 0) {
+                r = -EINVAL;
+                goto fail;
+        }
+
+        r = sd_bus_message_enter_container(reply, 'a', "(iay)");
+        if (r < 0)
+                goto fail;
+
+        while ((r = sd_bus_message_enter_container(reply, 'r', "iay")) > 0) {
+                int family;
+                const void *a;
+                size_t sz;
+
+                r = sd_bus_message_read(reply, "i", &family);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_read_array(reply, 'y', &a, &sz);
+                if (r < 0)
+                        goto fail;
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        goto fail;
+
+                if (family != af)
+                        continue;
+
+                if (sz != alen) {
+                        r = -EINVAL;
+                        goto fail;
+                }
+
+                memcpy(r_addr + i*ALIGN(alen), a, alen);
+                i++;
+        }
+        if (r < 0)
+                goto fail;
+
+        assert(i == c);
+        idx += c * ALIGN(alen);
+
+        /* Fourth, append address pointer array */
+        r_addr_list = buffer + idx;
+        for (i = 0; i < c; i++)
+                ((char**) r_addr_list)[i] = r_addr + i*ALIGN(alen);
+
+        ((char**) r_addr_list)[i] = NULL;
+        idx += (c+1) * sizeof(char*);
+
+        assert(idx == ms);
+
+        result->h_name = r_name;
+        result->h_aliases = (char**) r_aliases;
+        result->h_addrtype = af;
+        result->h_length = alen;
+        result->h_addr_list = (char**) r_addr_list;
+
+        /* Explicitly reset all error variables */
+        *errnop = 0;
+        *h_errnop = NETDB_SUCCESS;
+        h_errno = 0;
+
+        if (ttlp)
+                *ttlp = 0;
+
+        if (canonp)
+                *canonp = r_name;
+
+        return NSS_STATUS_SUCCESS;
+
+fail:
+        *errnop = -r;
+        *h_errnop = NO_DATA;
+        return NSS_STATUS_UNAVAIL;
+}
+
+enum nss_status _nss_resolve_gethostbyaddr2_r(
+                const void* addr, socklen_t len,
+                int af,
+                struct hostent *result,
+                char *buffer, size_t buflen,
+                int *errnop, int *h_errnop,
+                int32_t *ttlp) {
+
+        _cleanup_bus_message_unref_ sd_bus_message *req = NULL, *reply = NULL;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        char *r_name, *r_aliases, *r_addr, *r_addr_list;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        unsigned c = 0, i = 0;
+        size_t ms = 0, idx;
+        const char *n;
+        int r, ifindex;
+
+        assert(addr);
+        assert(result);
+        assert(buffer);
+        assert(errnop);
+        assert(h_errnop);
+
+        if (!IN_SET(af, AF_INET, AF_INET6)) {
+                *errnop = EAFNOSUPPORT;
+                *h_errnop = NO_DATA;
+                return NSS_STATUS_UNAVAIL;
+        }
+
+        if (len != FAMILY_ADDRESS_SIZE(af)) {
+                *errnop = EINVAL;
+                *h_errnop = NO_RECOVERY;
+                return NSS_STATUS_UNAVAIL;
+        }
+
+        r = sd_bus_open_system(&bus);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_new_method_call(
+                        bus,
+                        &req,
+                        "org.freedesktop.resolve1",
+                        "/org/freedesktop/resolve1",
+                        "org.freedesktop.resolve1.Manager",
+                        "ResolveAddress");
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_set_auto_start(req, false);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_append(req, "ii", 0, af);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_append_array(req, 'y', addr, len);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_append(req, "t", (uint64_t) 0);
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_call(bus, req, DNS_CALL_TIMEOUT_USEC, &error, &reply);
+        if (r < 0) {
+                if (sd_bus_error_has_name(&error, _BUS_ERROR_DNS "NXDOMAIN")) {
+                        *errnop = ESRCH;
+                        *h_errnop = HOST_NOT_FOUND;
+                        return NSS_STATUS_NOTFOUND;
+                }
+
+                if (bus_error_shall_fallback(&error)) {
+
+                        enum nss_status (*fallback)(
+                                        const void* addr, socklen_t len,
+                                        int af,
+                                        struct hostent *result,
+                                        char *buffer, size_t buflen,
+                                        int *errnop, int *h_errnop,
+                                        int32_t *ttlp);
+
+                        fallback = (enum nss_status (*)(
+                                        const void* addr, socklen_t len,
+                                        int af,
+                                        struct hostent *result,
+                                        char *buffer, size_t buflen,
+                                        int *errnop, int *h_errnop,
+                                        int32_t *ttlp))
+                                find_fallback("libnss_dns.so.2", "_nss_dns_gethostbyaddr2_r");
+
+                        if (fallback)
+                                return fallback(addr, len, af, result, buffer, buflen, errnop, h_errnop, ttlp);
+                }
+
+                *errnop = -r;
+                *h_errnop = NO_RECOVERY;
+                return NSS_STATUS_UNAVAIL;
+        }
+
+        r = sd_bus_message_read(reply, "i", &ifindex);
+        if (r < 0)
+                goto fail;
+
+        if (ifindex < 0) {
+                r = -EINVAL;
+                goto fail;
+        }
+
+        r = sd_bus_message_enter_container(reply, 'a', "s");
+        if (r < 0)
+                goto fail;
+
+        while ((r = sd_bus_message_read(reply, "s", &n)) > 0) {
+                c++;
+                ms += ALIGN(strlen(n) + 1);
+        }
+        if (r < 0)
+                goto fail;
+
+        r = sd_bus_message_rewind(reply, false);
+        if (r < 0)
+                return r;
+
+        if (c <= 0) {
+                *errnop = ESRCH;
+                *h_errnop = HOST_NOT_FOUND;
+                return NSS_STATUS_NOTFOUND;
+        }
+
+        ms += ALIGN(len) +              /* the address */
+              2 * sizeof(char*) +       /* pointers to the address, plus trailing NULL */
+              c * sizeof(char*);        /* pointers to aliases, plus trailing NULL */
+
+        if (buflen < ms) {
+                *errnop = ENOMEM;
+                *h_errnop = TRY_AGAIN;
+                return NSS_STATUS_TRYAGAIN;
+        }
+
+        /* First, place address */
+        r_addr = buffer;
+        memcpy(r_addr, addr, len);
+        idx = ALIGN(len);
+
+        /* Second, place address list */
+        r_addr_list = buffer + idx;
+        ((char**) r_addr_list)[0] = r_addr;
+        ((char**) r_addr_list)[1] = NULL;
+        idx += sizeof(char*) * 2;
+
+        /* Third, reserve space for the aliases array */
+        r_aliases = buffer + idx;
+        idx += sizeof(char*) * c;
+
+        /* Fourth, place aliases */
+        i = 0;
+        r_name = buffer + idx;
+        while ((r = sd_bus_message_read(reply, "s", &n)) > 0) {
+                char *p;
+                size_t l;
+
+                l = strlen(n);
+                p = buffer + idx;
+                memcpy(p, n, l+1);
+
+                if (i > 1)
+                        ((char**) r_aliases)[i-1] = p;
+                i++;
+
+                idx += ALIGN(l+1);
+        }
+        if (r < 0)
+                goto fail;
+
+        ((char**) r_aliases)[c-1] = NULL;
+        assert(idx == ms);
+
+        result->h_name = r_name;
+        result->h_aliases = (char**) r_aliases;
+        result->h_addrtype = af;
+        result->h_length = len;
+        result->h_addr_list = (char**) r_addr_list;
+
+        if (ttlp)
+                *ttlp = 0;
+
+        /* Explicitly reset all error variables */
+        *errnop = 0;
+        *h_errnop = NETDB_SUCCESS;
+        h_errno = 0;
+
+        return NSS_STATUS_SUCCESS;
+
+fail:
+        *errnop = -r;
+        *h_errnop = NO_DATA;
+        return NSS_STATUS_UNAVAIL;
+}
+
+NSS_GETHOSTBYNAME_FALLBACKS(resolve);
+NSS_GETHOSTBYADDR_FALLBACKS(resolve);
diff --git a/src/nss-resolve/nss-resolve.sym b/src/nss-resolve/nss-resolve.sym
new file mode 100644 (file)
index 0000000..df8dff2
--- /dev/null
@@ -0,0 +1,19 @@
+/***
+  This file is part of systemd.
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+***/
+
+{
+global:
+        _nss_resolve_gethostbyname_r;
+        _nss_resolve_gethostbyname2_r;
+        _nss_resolve_gethostbyname3_r;
+        _nss_resolve_gethostbyname4_r;
+        _nss_resolve_gethostbyaddr_r;
+        _nss_resolve_gethostbyaddr2_r;
+local: *;
+};
index c2936e0bca130e00c10f172a83e211d81351fdb4..37f2571faba8d7bc2dc26c518547709c7f8d2a6d 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <stdio.h>
 #include <getopt.h>
-#include <error.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -77,18 +76,6 @@ static const char* const path_table[_SD_PATH_MAX] = {
         [SD_PATH_SEARCH_CONFIGURATION] = "search-configuration",
 };
 
-static int help(void) {
-
-        printf("%s [OPTIONS...] [NAME...]\n\n"
-               "Show system and user paths.\n\n"
-               "  -h --help             Show this help\n"
-               "     --version          Show package version\n"
-               "     --suffix=SUFFIX    Suffix to append to paths\n",
-               program_invocation_short_name);
-
-        return 0;
-}
-
 static int list_homes(void) {
         uint64_t i = 0;
         int r = 0;
@@ -135,6 +122,15 @@ static int print_home(const char *n) {
         return -ENOTSUP;
 }
 
+static void help(void) {
+        printf("%s [OPTIONS...] [NAME...]\n\n"
+               "Show system and user paths.\n\n"
+               "  -h --help             Show this help\n"
+               "     --version          Show package version\n"
+               "     --suffix=SUFFIX    Suffix to append to paths\n",
+               program_invocation_short_name);
+}
+
 static int parse_argv(int argc, char *argv[]) {
 
         enum {
@@ -154,12 +150,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -176,7 +173,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
index 7756a7880d2f788ebdcca6bdeeb2174667b7aa8d..65cfec7ce8a804d163f58871b11e535f38c7189e 100644 (file)
@@ -29,7 +29,7 @@
 #include <assert.h>
 #include <sys/socket.h>
 
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-daemon.h"
 #include "pyutil.h"
 #include "macro.h"
 
index cbc661d837ad45c6786c2826dd465161547ba6e1..456e4a2796bbad2bd8ece51cfeaa033fe0460b2d 100644 (file)
@@ -25,7 +25,7 @@
 #include "util.h"
 
 #define SD_JOURNAL_SUPPRESS_LOCATION
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 PyDoc_STRVAR(journal_sendv__doc__,
              "sendv('FIELD=value', 'FIELD=value', ...) -> None\n\n"
index 9a19a10219a0c1d93c7494d2538d00d51ffbda08..3a561269a781c30e36c25d49e03d10a46757d948 100644 (file)
@@ -25,7 +25,7 @@
 #include <time.h>
 #include <stdio.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "pyutil.h"
 #include "macro.h"
@@ -313,7 +313,7 @@ PyDoc_STRVAR(Reader___exit____doc__,
              "Part of the context manager protocol.\n"
              "Closes the journal.\n");
 static PyObject* Reader___exit__(Reader *self, PyObject *args) {
-        return Reader_close(self, args);
+        return Reader_close(self, NULL);
 }
 
 PyDoc_STRVAR(Reader_next__doc__,
index 6dadf7b2fd14d3770a73e9ccbf6a239afa702eb3..5ec7309a54a94bef1857d2bf4715ff98c0dff065 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <Python.h>
 
-#include <systemd/sd-messages.h>
+#include "systemd/sd-messages.h"
 
 #include "pyutil.h"
 #include "log.h"
diff --git a/src/readahead/readahead-analyze.c b/src/readahead/readahead-analyze.c
deleted file mode 100644 (file)
index 76db3cb..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Auke Kok <auke-jan.h.kok@intel.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/>.
-***/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <unistd.h>
-#include <inttypes.h>
-#include <linux/limits.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-
-#include "readahead-common.h"
-
-int main_analyze(const char *pack_path) {
-        char line[LINE_MAX];
-        _cleanup_fclose_ FILE *pack = NULL;
-        int a;
-        int missing = 0;
-        size_t tsize = 0;
-
-        if (!pack_path)
-                pack_path = "/.readahead";
-
-        pack = fopen(pack_path, "re");
-        if (!pack) {
-                log_error("Pack file missing.");
-                goto fail;
-        }
-
-        if (!fgets(line, sizeof(line), pack)) {
-                log_error("Pack file corrupt.");
-                goto fail;
-        }
-
-        char_array_0(line);
-
-        if (!endswith(line, READAHEAD_PACK_FILE_VERSION)) {
-                log_error("Pack file version incompatible with this parser.");
-                goto fail;
-        }
-
-        if ((a = getc(pack)) == EOF) {
-                log_error("Pack file corrupt.");
-                goto fail;
-        }
-
-        fputs("   pct  sections     size: path\n"
-              "   ===  ========     ====: ====\n", stdout);
-
-        for (;;) {
-                char path[PATH_MAX];
-                struct stat st;
-                uint64_t inode;
-                int pages = 0;
-                int sections = 0;
-
-                if (!fgets(path, sizeof(path), pack))
-                        break; /* done */
-
-                path[strlen(path)-1] = 0;
-
-                if (fread(&inode, sizeof(inode), 1, pack) != 1) {
-                        log_error("Pack file corrupt.");
-                        goto fail;
-                }
-
-                for (;;) {
-                        uint32_t b, c;
-
-                        if (fread(&b, sizeof(b), 1, pack) != 1  ||
-                            fread(&c, sizeof(c), 1, pack) != 1) {
-                                log_error("Pack file corrupt.");
-                                goto fail;
-                        }
-                        if ((b == 0) && (c == 0))
-                                break;
-
-                        /* Uncomment this to get all the chunks separately
-                           printf(" %d: %d %d\n", sections, b, c);
-                         */
-
-                        pages += (c - b);
-                        sections++;
-                }
-
-                if (stat(path, &st) == 0) {
-                        off_t size;
-
-                        if (sections == 0)
-                                size = st.st_size;
-                        else
-                                size = pages * page_size();
-
-                        tsize += size;
-
-                        printf("  %4jd%% (%2d) %12jd: %s\n",
-                               (intmax_t) (sections && st.st_size ? size * 100 / st.st_size : 100),
-                               sections ? sections : 1,
-                               (intmax_t) size,
-                               path);
-                } else {
-                        printf("  %4dp (%2d) %12s: %s (MISSING)\n",
-                                sections ? pages : -1,
-                                sections ? sections : 1,
-                                "???",
-                                path);
-                        missing++;
-                }
-
-        }
-
-        printf("\nHOST:    %s"
-               "TYPE:    %c\n"
-               "MISSING: %d\n"
-               "TOTAL:   %zu\n",
-               line,
-               a,
-               missing,
-               tsize);
-
-        return EXIT_SUCCESS;
-
-fail:
-        return EXIT_FAILURE;
-}
diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
deleted file mode 100644 (file)
index c1afd0d..0000000
+++ /dev/null
@@ -1,650 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  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/>.
-***/
-
-#include <errno.h>
-#include <inttypes.h>
-#include <fcntl.h>
-#include <linux/limits.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <linux/fanotify.h>
-#include <sys/signalfd.h>
-#include <sys/poll.h>
-#include <sys/mman.h>
-#include <linux/fs.h>
-#include <linux/fiemap.h>
-#include <sys/ioctl.h>
-#include <sys/vfs.h>
-#include <getopt.h>
-#include <sys/inotify.h>
-#include <math.h>
-
-#ifdef HAVE_LINUX_BTRFS_H
-#include <linux/btrfs.h>
-#endif
-
-#ifdef HAVE_FANOTIFY_INIT
-#include <sys/fanotify.h>
-#endif
-
-#include <systemd/sd-daemon.h>
-
-#include "missing.h"
-#include "util.h"
-#include "set.h"
-#include "ioprio.h"
-#include "readahead-common.h"
-#include "virt.h"
-
-/* fixme:
- *
- * - detect ssd on btrfs/lvm...
- * - read ahead directories
- * - gzip?
- * - remount rw?
- * - handle files where nothing is in mincore
- * - does ioprio_set work with fadvise()?
- */
-
-static ReadaheadShared *shared = NULL;
-static usec_t starttime;
-
-/* Avoid collisions with the NULL pointer */
-#define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1)
-#define PTR_TO_SECTOR(p) (PTR_TO_ULONG(p)-1)
-
-static int btrfs_defrag(int fd) {
-        struct btrfs_ioctl_vol_args data = { .fd = fd };
-
-        return ioctl(fd, BTRFS_IOC_DEFRAG, &data);
-}
-
-static int pack_file(FILE *pack, const char *fn, bool on_btrfs) {
-        struct stat st;
-        void *start = MAP_FAILED;
-        uint8_t *vec;
-        uint32_t b, c;
-        uint64_t inode;
-        size_t l, pages;
-        bool mapped;
-        int r = 0, fd = -1, k;
-
-        assert(pack);
-        assert(fn);
-
-        fd = open(fn, O_RDONLY|O_CLOEXEC|O_NOATIME|O_NOCTTY|O_NOFOLLOW);
-        if (fd < 0) {
-
-                if (errno == ENOENT)
-                        return 0;
-
-                if (errno == EPERM || errno == EACCES)
-                        return 0;
-
-                log_warning("open(%s) failed: %m", fn);
-                r = -errno;
-                goto finish;
-        }
-
-        k = file_verify(fd, fn, arg_file_size_max, &st);
-        if (k <= 0) {
-                r = k;
-                goto finish;
-        }
-
-        if (on_btrfs)
-                btrfs_defrag(fd);
-
-        l = PAGE_ALIGN(st.st_size);
-        start = mmap(NULL, l, PROT_READ, MAP_SHARED, fd, 0);
-        if (start == MAP_FAILED) {
-                log_warning("mmap(%s) failed: %m", fn);
-                r = -errno;
-                goto finish;
-        }
-
-        pages = l / page_size();
-        vec = alloca0(pages);
-        if (mincore(start, l, vec) < 0) {
-                log_warning("mincore(%s) failed: %m", fn);
-                r = -errno;
-                goto finish;
-        }
-
-        fputs(fn, pack);
-        fputc('\n', pack);
-
-        /* Store the inode, so that we notice when the file is deleted */
-        inode = (uint64_t) st.st_ino;
-        fwrite(&inode, sizeof(inode), 1, pack);
-
-        mapped = false;
-        for (c = 0; c < pages; c++) {
-                bool new_mapped = !!(vec[c] & 1);
-
-                if (!mapped && new_mapped)
-                        b = c;
-                else if (mapped && !new_mapped) {
-                        fwrite(&b, sizeof(b), 1, pack);
-                        fwrite(&c, sizeof(c), 1, pack);
-
-                        log_debug("%s: page %u to %u", fn, b, c);
-                }
-
-                mapped = new_mapped;
-        }
-
-        /* We don't write any range data if we should read the entire file */
-        if (mapped && b > 0) {
-                fwrite(&b, sizeof(b), 1, pack);
-                fwrite(&c, sizeof(c), 1, pack);
-
-                log_debug("%s: page %u to %u", fn, b, c);
-        }
-
-        /* End marker */
-        b = 0;
-        fwrite(&b, sizeof(b), 1, pack);
-        fwrite(&b, sizeof(b), 1, pack);
-
-finish:
-        if (start != MAP_FAILED)
-                munmap(start, l);
-
-        safe_close(fd);
-
-        return r;
-}
-
-static unsigned long fd_first_block(int fd) {
-        struct {
-                struct fiemap fiemap;
-                struct fiemap_extent extent;
-        } data = {
-                .fiemap.fm_length = ~0ULL,
-                .fiemap.fm_extent_count = 1,
-        };
-
-        if (ioctl(fd, FS_IOC_FIEMAP, &data) < 0)
-                return 0;
-
-        if (data.fiemap.fm_mapped_extents <= 0)
-                return 0;
-
-        if (data.fiemap.fm_extents[0].fe_flags & FIEMAP_EXTENT_UNKNOWN)
-                return 0;
-
-        return (unsigned long) data.fiemap.fm_extents[0].fe_physical;
-}
-
-struct item {
-        const char *path;
-        unsigned long block;
-        unsigned long bin;
-};
-
-static int qsort_compare(const void *a, const void *b) {
-        const struct item *i, *j;
-
-        i = a;
-        j = b;
-
-        /* sort by bin first */
-        if (i->bin < j->bin)
-                return -1;
-        if (i->bin > j->bin)
-                return 1;
-
-        /* then sort by sector */
-        if (i->block < j->block)
-                return -1;
-        if (i->block > j->block)
-                return 1;
-
-        return strcmp(i->path, j->path);
-}
-
-static int collect(const char *root) {
-        enum {
-                FD_FANOTIFY,  /* Get the actual fs events */
-                FD_SIGNAL,
-                FD_INOTIFY,   /* We get notifications to quit early via this fd */
-                _FD_MAX
-        };
-        struct pollfd pollfd[_FD_MAX] = {};
-        int fanotify_fd = -1, signal_fd = -1, inotify_fd = -1, r = 0;
-        pid_t my_pid;
-        Hashmap *files = NULL;
-        Iterator i;
-        char *p, *q;
-        sigset_t mask;
-        FILE *pack = NULL;
-        char *pack_fn_new = NULL, *pack_fn = NULL;
-        bool on_ssd, on_btrfs;
-        struct statfs sfs;
-        usec_t not_after;
-        uint64_t previous_block_readahead;
-        bool previous_block_readahead_set = false;
-
-        assert(root);
-
-        if (asprintf(&pack_fn, "%s/.readahead", root) < 0) {
-                r = log_oom();
-                goto finish;
-        }
-
-        starttime = now(CLOCK_MONOTONIC);
-
-        /* If there's no pack file yet we lower the kernel readahead
-         * so that mincore() is accurate. If there is a pack file
-         * already we assume it is accurate enough so that kernel
-         * readahead is never triggered. */
-        previous_block_readahead_set =
-                access(pack_fn, F_OK) < 0 &&
-                block_get_readahead(root, &previous_block_readahead) >= 0 &&
-                block_set_readahead(root, 8*1024) >= 0;
-
-        if (ioprio_set(IOPRIO_WHO_PROCESS, getpid(), IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)) < 0)
-                log_warning("Failed to set IDLE IO priority class: %m");
-
-        assert_se(sigemptyset(&mask) == 0);
-        sigset_add_many(&mask, SIGINT, SIGTERM, -1);
-        assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
-
-        if ((signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC)) < 0) {
-                log_error("signalfd(): %m");
-                r = -errno;
-                goto finish;
-        }
-
-        files = hashmap_new(string_hash_func, string_compare_func);
-        if (!files) {
-                log_error("Failed to allocate set.");
-                r = -ENOMEM;
-                goto finish;
-        }
-
-        fanotify_fd = fanotify_init(FAN_CLOEXEC|FAN_NONBLOCK, O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_NOATIME);
-        if (fanotify_fd < 0)  {
-                log_error("Failed to create fanotify object: %m");
-                r = -errno;
-                goto finish;
-        }
-
-        if (fanotify_mark(fanotify_fd, FAN_MARK_ADD|FAN_MARK_MOUNT, FAN_OPEN, AT_FDCWD, root) < 0) {
-                log_error("Failed to mark %s: %m", root);
-                r = -errno;
-                goto finish;
-        }
-
-        inotify_fd = open_inotify();
-        if (inotify_fd < 0) {
-                r = inotify_fd;
-                goto finish;
-        }
-
-        not_after = now(CLOCK_MONOTONIC) + arg_timeout;
-
-        my_pid = getpid();
-
-        pollfd[FD_FANOTIFY].fd = fanotify_fd;
-        pollfd[FD_FANOTIFY].events = POLLIN;
-        pollfd[FD_SIGNAL].fd = signal_fd;
-        pollfd[FD_SIGNAL].events = POLLIN;
-        pollfd[FD_INOTIFY].fd = inotify_fd;
-        pollfd[FD_INOTIFY].events = POLLIN;
-
-        sd_notify(0,
-                  "READY=1\n"
-                  "STATUS=Collecting readahead data");
-
-        log_debug("Collecting...");
-
-        if (access("/run/systemd/readahead/cancel", F_OK) >= 0) {
-                log_debug("Collection canceled");
-                r = -ECANCELED;
-                goto finish;
-        }
-
-        if (access("/run/systemd/readahead/done", F_OK) >= 0) {
-                log_debug("Got termination request");
-                goto done;
-        }
-
-        for (;;) {
-                union {
-                        struct fanotify_event_metadata metadata;
-                        char buffer[4096];
-                } data;
-                ssize_t n;
-                struct fanotify_event_metadata *m;
-                usec_t t;
-                int h;
-
-                if (hashmap_size(files) > arg_files_max) {
-                        log_debug("Reached maximum number of read ahead files, ending collection.");
-                        break;
-                }
-
-                t = now(CLOCK_MONOTONIC);
-                if (t >= not_after) {
-                        log_debug("Reached maximum collection time, ending collection.");
-                        break;
-                }
-
-                if ((h = poll(pollfd, _FD_MAX, (int) ((not_after - t) / USEC_PER_MSEC))) < 0) {
-
-                        if (errno == EINTR)
-                                continue;
-
-                        log_error("poll(): %m");
-                        r = -errno;
-                        goto finish;
-                }
-
-                if (h == 0) {
-                        log_debug("Reached maximum collection time, ending collection.");
-                        break;
-                }
-
-                if (pollfd[FD_SIGNAL].revents) {
-                        log_debug("Got signal.");
-                        break;
-                }
-
-                if (pollfd[FD_INOTIFY].revents) {
-                        uint8_t inotify_buffer[sizeof(struct inotify_event) + FILENAME_MAX];
-                        struct inotify_event *e;
-
-                        if ((n = read(inotify_fd, &inotify_buffer, sizeof(inotify_buffer))) < 0) {
-                                if (errno == EINTR || errno == EAGAIN)
-                                        continue;
-
-                                log_error("Failed to read inotify event: %m");
-                                r = -errno;
-                                goto finish;
-                        }
-
-                        e = (struct inotify_event*) inotify_buffer;
-                        while (n > 0) {
-                                size_t step;
-
-                                if ((e->mask & IN_CREATE) && streq(e->name, "cancel")) {
-                                        log_debug("Collection canceled");
-                                        r = -ECANCELED;
-                                        goto finish;
-                                }
-
-                                if ((e->mask & IN_CREATE) && streq(e->name, "done")) {
-                                        log_debug("Got termination request");
-                                        goto done;
-                                }
-
-                                step = sizeof(struct inotify_event) + e->len;
-                                assert(step <= (size_t) n);
-
-                                e = (struct inotify_event*) ((uint8_t*) e + step);
-                                n -= step;
-                        }
-                }
-
-                n = read(fanotify_fd, &data, sizeof(data));
-                if (n < 0) {
-
-                        if (errno == EINTR || errno == EAGAIN)
-                                continue;
-
-                        /* fanotify sometimes returns EACCES on read()
-                         * where it shouldn't. For now let's just
-                         * ignore it here (which is safe), but
-                         * eventually this should be
-                         * dropped when the kernel is fixed.
-                         *
-                         * https://bugzilla.redhat.com/show_bug.cgi?id=707577 */
-                        if (errno == EACCES)
-                                continue;
-
-                        log_error("Failed to read event: %m");
-                        r = -errno;
-                        goto finish;
-                }
-
-                for (m = &data.metadata; FAN_EVENT_OK(m, n); m = FAN_EVENT_NEXT(m, n)) {
-                        char fn[sizeof("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
-                        int k;
-
-                        if (m->fd < 0)
-                                goto next_iteration;
-
-                        if (m->pid == my_pid)
-                                goto next_iteration;
-
-                        __sync_synchronize();
-                        if (m->pid == shared->replay)
-                                goto next_iteration;
-
-                        snprintf(fn, sizeof(fn), "/proc/self/fd/%i", m->fd);
-                        k = readlink_malloc(fn, &p);
-                        if (k >= 0) {
-                                if (startswith(p, "/tmp") ||
-                                    endswith(p, " (deleted)") ||
-                                    hashmap_get(files, p))
-                                        /* Not interesting, or
-                                         * already read */
-                                        free(p);
-                                else {
-                                        unsigned long ul;
-                                        usec_t entrytime;
-                                        struct item *entry;
-
-                                        entry = new0(struct item, 1);
-                                        if (!entry) {
-                                                r = log_oom();
-                                                goto finish;
-                                        }
-
-                                        ul = fd_first_block(m->fd);
-
-                                        entrytime = now(CLOCK_MONOTONIC);
-
-                                        entry->block = ul;
-                                        entry->path = strdup(p);
-                                        if (!entry->path) {
-                                                free(entry);
-                                                r = log_oom();
-                                                goto finish;
-                                        }
-                                        entry->bin = (entrytime - starttime) / 2000000;
-
-                                        k = hashmap_put(files, p, entry);
-                                        if (k < 0) {
-                                                log_warning("hashmap_put() failed: %s", strerror(-k));
-                                                free(p);
-                                        }
-                                }
-
-                        } else
-                                log_warning("readlink(%s) failed: %s", fn, strerror(-k));
-
-                next_iteration:
-                        safe_close(m->fd);
-                }
-        }
-
-done:
-        fanotify_fd = safe_close(fanotify_fd);
-
-        log_debug("Writing Pack File...");
-
-        on_ssd = fs_on_ssd(root) > 0;
-        log_debug("On SSD: %s", yes_no(on_ssd));
-
-        on_btrfs = statfs(root, &sfs) >= 0 && F_TYPE_EQUAL(sfs.f_type, BTRFS_SUPER_MAGIC);
-        log_debug("On btrfs: %s", yes_no(on_btrfs));
-
-        if (asprintf(&pack_fn_new, "%s/.readahead.new", root) < 0) {
-                r = log_oom();
-                goto finish;
-        }
-
-        pack = fopen(pack_fn_new, "we");
-        if (!pack) {
-                log_error("Failed to open pack file: %m");
-                r = -errno;
-                goto finish;
-        }
-
-        fputs(CANONICAL_HOST READAHEAD_PACK_FILE_VERSION, pack);
-        putc(on_ssd ? 'S' : 'R', pack);
-
-        if (on_ssd || on_btrfs) {
-
-                /* On SSD or on btrfs, just write things out in the
-                 * order the files were accessed. */
-
-                HASHMAP_FOREACH_KEY(q, p, files, i)
-                        pack_file(pack, p, on_btrfs);
-        } else {
-                unsigned n;
-
-                /* On rotating media, order things by the block
-                 * numbers */
-
-                log_debug("Ordering...");
-
-                n = hashmap_size(files);
-                if (n) {
-                        _cleanup_free_ struct item *ordered;
-                        struct item *j;
-                        unsigned k;
-
-                        ordered = new(struct item, n);
-                        if (!ordered) {
-                                r = log_oom();
-                                goto finish;
-                        }
-
-                        j = ordered;
-                        HASHMAP_FOREACH_KEY(q, p, files, i) {
-                                memcpy(j, q, sizeof(struct item));
-                                j++;
-                        }
-
-                        assert(ordered + n == j);
-
-                        qsort(ordered, n, sizeof(struct item), qsort_compare);
-
-                        for (k = 0; k < n; k++)
-                                pack_file(pack, ordered[k].path, on_btrfs);
-                } else
-                        log_warning("No pack files");
-        }
-
-        log_debug("Finalizing...");
-
-        fflush(pack);
-
-        if (ferror(pack)) {
-                log_error("Failed to write pack file.");
-                r = -EIO;
-                goto finish;
-        }
-
-        if (rename(pack_fn_new, pack_fn) < 0) {
-                log_error("Failed to rename readahead file: %m");
-                r = -errno;
-                goto finish;
-        }
-
-        fclose(pack);
-        pack = NULL;
-
-        log_debug("Done.");
-
-finish:
-        safe_close(fanotify_fd);
-        safe_close(signal_fd);
-        safe_close(inotify_fd);
-
-        if (pack) {
-                fclose(pack);
-                unlink(pack_fn_new);
-        }
-        free(pack_fn_new);
-        free(pack_fn);
-
-        while ((p = hashmap_steal_first_key(files)))
-                free(p);
-
-        hashmap_free(files);
-
-        if (previous_block_readahead_set) {
-                uint64_t bytes;
-
-                /* Restore the original kernel readahead setting if we
-                 * changed it, and nobody has overwritten it since
-                 * yet. */
-                if (block_get_readahead(root, &bytes) >= 0 && bytes == 8*1024)
-                        block_set_readahead(root, previous_block_readahead);
-        }
-
-        return r;
-}
-
-int main_collect(const char *root) {
-
-        if (!root)
-                root = "/";
-
-        /* Skip this step on read-only media. Note that we check the
-         * underlying block device here, not he read-only flag of the
-         * file system on top, since that one is most likely mounted
-         * read-only anyway at boot, even if the underlying block
-         * device is theoretically writable. */
-        if (fs_on_read_only(root) > 0) {
-                log_info("Disabling readahead collector due to read-only media.");
-                return EXIT_SUCCESS;
-        }
-
-        if (!enough_ram()) {
-                log_info("Disabling readahead collector due to low memory.");
-                return EXIT_SUCCESS;
-        }
-
-        shared = shared_get();
-        if (!shared)
-                return EXIT_FAILURE;
-
-        shared->collect = getpid();
-        __sync_synchronize();
-
-        if (collect(root) < 0)
-                return EXIT_FAILURE;
-
-        return EXIT_SUCCESS;
-}
diff --git a/src/readahead/readahead-common.c b/src/readahead/readahead-common.c
deleted file mode 100644 (file)
index 3ca48a7..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  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/>.
-***/
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/sysinfo.h>
-#include <sys/inotify.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <unistd.h>
-
-#include "log.h"
-#include "readahead-common.h"
-#include "util.h"
-#include "missing.h"
-#include "fileio.h"
-#include "libudev.h"
-#include "udev-util.h"
-
-int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st) {
-        assert(fd >= 0);
-        assert(fn);
-        assert(st);
-
-        if (fstat(fd, st) < 0) {
-                log_warning("fstat(%s) failed: %m", fn);
-                return -errno;
-        }
-
-        if (!S_ISREG(st->st_mode)) {
-                log_debug("Not preloading special file %s", fn);
-                return 0;
-        }
-
-        if (st->st_size <= 0 || st->st_size > file_size_max) {
-                assert_cc(sizeof(st->st_size) == 8);
-                log_debug("Not preloading file %s with size out of bounds %"PRIu64,
-                          fn, st->st_size);
-                return 0;
-        }
-
-        return 1;
-}
-
-int fs_on_ssd(const char *p) {
-        struct stat st;
-        _cleanup_udev_unref_ struct udev *udev = NULL;
-        _cleanup_udev_device_unref_ struct udev_device *udev_device = NULL;
-        struct udev_device *look_at = NULL;
-        const char *devtype, *rotational, *model, *id;
-        int r;
-
-        assert(p);
-
-        if (stat(p, &st) < 0)
-                return -errno;
-
-        if (major(st.st_dev) == 0) {
-                _cleanup_fclose_ FILE *f = NULL;
-                int mount_id;
-                union file_handle_union h = { .handle.handle_bytes = MAX_HANDLE_SZ, };
-
-                /* Might be btrfs, which exposes "ssd" as mount flag if it is on ssd.
-                 *
-                 * We first determine the mount ID here, if we can,
-                 * and then lookup the mount ID in mountinfo to find
-                 * the mount options. */
-
-                r = name_to_handle_at(AT_FDCWD, p, &h.handle, &mount_id, AT_SYMLINK_FOLLOW);
-                if (r < 0)
-                        return false;
-
-                f = fopen("/proc/self/mountinfo", "re");
-                if (!f)
-                        return false;
-
-                for (;;) {
-                        char line[LINE_MAX], *e;
-                        _cleanup_free_ char *opts = NULL;
-                        int mid;
-
-                        if (!fgets(line, sizeof(line), f))
-                                return false;
-
-                        truncate_nl(line);
-
-                        if (sscanf(line, "%i", &mid) != 1)
-                                continue;
-
-                        if (mid != mount_id)
-                                continue;
-
-                        e = strstr(line, " - ");
-                        if (!e)
-                                continue;
-
-                        if (sscanf(e+3, "%*s %*s %ms", &opts) != 1)
-                                continue;
-
-                        if (streq(opts, "ssd") || startswith(opts, "ssd,") || endswith(opts, ",ssd") || strstr(opts, ",ssd,"))
-                                return true;
-                }
-
-                return false;
-        }
-
-        udev = udev_new();
-        if (!udev)
-                return -ENOMEM;
-
-        udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev);
-        if (!udev_device)
-                return false;
-
-        devtype = udev_device_get_property_value(udev_device, "DEVTYPE");
-        if (devtype && streq(devtype, "partition"))
-                look_at = udev_device_get_parent(udev_device);
-        else
-                look_at = udev_device;
-
-        if (!look_at)
-                return false;
-
-        /* First, try high-level property */
-        id = udev_device_get_property_value(look_at, "ID_SSD");
-        if (id)
-                return streq(id, "1");
-
-        /* Second, try kernel attribute */
-        rotational = udev_device_get_sysattr_value(look_at, "queue/rotational");
-        if (rotational)
-                return streq(rotational, "0");
-
-        /* Finally, fallback to heuristics */
-        look_at = udev_device_get_parent(look_at);
-        if (!look_at)
-                return false;
-
-        model = udev_device_get_sysattr_value(look_at, "model");
-        if (model)
-                return !!strstr(model, "SSD");
-
-        return false;
-}
-
-int fs_on_read_only(const char *p) {
-        struct stat st;
-        _cleanup_udev_unref_ struct udev *udev = NULL;
-        _cleanup_udev_device_unref_ struct udev_device *udev_device = NULL;
-        const char *read_only;
-
-        assert(p);
-
-        if (stat(p, &st) < 0)
-                return -errno;
-
-        if (major(st.st_dev) == 0)
-                return false;
-
-        udev = udev_new();
-        if (!udev)
-                return -ENOMEM;
-
-        udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev);
-        if (!udev_device)
-                return false;
-
-        read_only = udev_device_get_sysattr_value(udev_device, "ro");
-        if (read_only)
-                return streq(read_only, "1");
-
-        return false;
-}
-
-bool enough_ram(void) {
-        struct sysinfo si;
-
-        assert_se(sysinfo(&si) >= 0);
-
-        /* Enable readahead only with at least 128MB memory */
-        return si.totalram > 127 * 1024*1024 / si.mem_unit;
-}
-
-static void mkdirs(void) {
-        if (mkdir("/run/systemd", 0755) && errno != EEXIST)
-                log_warning("Failed to create /run/systemd: %m");
-        if (mkdir("/run/systemd/readahead", 0755) && errno != EEXIST)
-                log_warning("Failed to create /run/systemd: %m");
-}
-
-int open_inotify(void) {
-        int fd;
-
-        fd = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
-        if (fd < 0) {
-                log_error("Failed to create inotify handle: %m");
-                return -errno;
-        }
-
-        mkdirs();
-
-        if (inotify_add_watch(fd, "/run/systemd/readahead", IN_CREATE) < 0) {
-                log_error("Failed to watch /run/systemd/readahead: %m");
-                safe_close(fd);
-                return -errno;
-        }
-
-        return fd;
-}
-
-ReadaheadShared *shared_get(void) {
-        _cleanup_close_ int fd = -1;
-        ReadaheadShared *m = NULL;
-
-        mkdirs();
-
-        fd = open("/run/systemd/readahead/shared", O_CREAT|O_RDWR|O_CLOEXEC, 0644);
-        if (fd < 0) {
-                log_error("Failed to create shared memory segment: %m");
-                return NULL;
-        }
-
-        if (ftruncate(fd, sizeof(ReadaheadShared)) < 0) {
-                log_error("Failed to truncate shared memory segment: %m");
-                return NULL;
-        }
-
-        m = mmap(NULL, sizeof(ReadaheadShared), PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0);
-        if (m == MAP_FAILED) {
-                log_error("Failed to mmap shared memory segment: %m");
-                return NULL;
-        }
-
-        return m;
-}
-
-/* We use 20K instead of the more human digestable 16K here. Why?
-   Simply so that it is more unlikely that users end up picking this
-   value too so that we can recognize better whether the user changed
-   the value while we had it temporarily bumped. */
-#define BUMP_REQUEST_NR (20*1024u)
-
-int block_bump_request_nr(const char *p) {
-        struct stat st;
-        uint64_t u;
-        char *ap = NULL, *line = NULL;
-        int r;
-        dev_t d;
-
-        assert(p);
-
-        if (stat(p, &st) < 0)
-                return -errno;
-
-        if (major(st.st_dev) == 0)
-                return 0;
-
-        d = st.st_dev;
-        block_get_whole_disk(d, &d);
-
-        if (asprintf(&ap, "/sys/dev/block/%u:%u/queue/nr_requests", major(d), minor(d)) < 0) {
-                r= -ENOMEM;
-                goto finish;
-        }
-
-        r = read_one_line_file(ap, &line);
-        if (r < 0) {
-                if (r == -ENOENT)
-                        r = 0;
-                goto finish;
-        }
-
-        r = safe_atou64(line, &u);
-        if (r >= 0 && u >= BUMP_REQUEST_NR) {
-                r = 0;
-                goto finish;
-        }
-
-        free(line);
-        line = NULL;
-
-        if (asprintf(&line, "%u", BUMP_REQUEST_NR) < 0) {
-                r = -ENOMEM;
-                goto finish;
-        }
-
-        r = write_string_file(ap, line);
-        if (r < 0)
-                goto finish;
-
-        log_info("Bumped block_nr parameter of %u:%u to %u. This is a temporary hack and should be removed one day.", major(d), minor(d), BUMP_REQUEST_NR);
-        r = 1;
-
-finish:
-        free(ap);
-        free(line);
-
-        return r;
-}
-
-int block_get_readahead(const char *p, uint64_t *bytes) {
-        struct stat st;
-        char *ap = NULL, *line = NULL;
-        int r;
-        dev_t d;
-        uint64_t u;
-
-        assert(p);
-        assert(bytes);
-
-        if (stat(p, &st) < 0)
-                return -errno;
-
-        if (major(st.st_dev) == 0)
-                return 0;
-
-        d = st.st_dev;
-        block_get_whole_disk(d, &d);
-
-        if (asprintf(&ap, "/sys/dev/block/%u:%u/bdi/read_ahead_kb", major(d), minor(d)) < 0) {
-                r = -ENOMEM;
-                goto finish;
-        }
-
-        r = read_one_line_file(ap, &line);
-        if (r < 0)
-                goto finish;
-
-        r = safe_atou64(line, &u);
-        if (r < 0)
-                goto finish;
-
-        *bytes = u * 1024ULL;
-
-finish:
-        free(ap);
-        free(line);
-
-        return r;
-}
-
-int block_set_readahead(const char *p, uint64_t bytes) {
-        struct stat st;
-        char *ap = NULL, *line = NULL;
-        int r;
-        dev_t d;
-
-        assert(p);
-        assert(bytes);
-
-        if (stat(p, &st) < 0)
-                return -errno;
-
-        if (major(st.st_dev) == 0)
-                return 0;
-
-        d = st.st_dev;
-        block_get_whole_disk(d, &d);
-
-        if (asprintf(&ap, "/sys/dev/block/%u:%u/bdi/read_ahead_kb", major(d), minor(d)) < 0) {
-                r = -ENOMEM;
-                goto finish;
-        }
-
-        if (asprintf(&line, "%llu", bytes / 1024ULL) < 0) {
-                r = -ENOMEM;
-                goto finish;
-        }
-
-        r = write_string_file(ap, line);
-        if (r < 0)
-                goto finish;
-
-finish:
-        free(ap);
-        free(line);
-
-        return r;
-}
diff --git a/src/readahead/readahead-common.h b/src/readahead/readahead-common.h
deleted file mode 100644 (file)
index b34f3aa..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#pragma once
-
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  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/>.
-***/
-
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "macro.h"
-#include "util.h"
-
-#define READAHEAD_FILE_SIZE_MAX (10*1024*1024)
-
-#define READAHEAD_PACK_FILE_VERSION ";VERSION=2\n"
-
-extern unsigned arg_files_max;
-extern off_t arg_file_size_max;
-extern usec_t arg_timeout;
-
-int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st);
-
-int fs_on_ssd(const char *p);
-int fs_on_read_only(const char *p);
-
-bool enough_ram(void);
-
-int open_inotify(void);
-
-typedef struct ReadaheadShared {
-        pid_t collect;
-        pid_t replay;
-} _packed_ ReadaheadShared;
-
-ReadaheadShared *shared_get(void);
-
-int block_bump_request_nr(const char *p);
-
-int block_get_readahead(const char *p, uint64_t *bytes);
-int block_set_readahead(const char *p, uint64_t bytes);
-
-int main_collect(const char *root);
-int main_replay(const char *root);
-int main_analyze(const char *pack_path);
diff --git a/src/readahead/readahead-replay.c b/src/readahead/readahead-replay.c
deleted file mode 100644 (file)
index f46dc3b..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-
-  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/>.
-***/
-
-#include <errno.h>
-#include <inttypes.h>
-#include <fcntl.h>
-#include <linux/limits.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <sys/inotify.h>
-
-#include <systemd/sd-daemon.h>
-
-#include "missing.h"
-#include "util.h"
-#include "set.h"
-#include "ioprio.h"
-#include "readahead-common.h"
-#include "virt.h"
-
-static ReadaheadShared *shared = NULL;
-
-static int unpack_file(FILE *pack) {
-        _cleanup_close_ int fd = -1;
-        char fn[PATH_MAX];
-        bool any = false;
-        struct stat st;
-        uint64_t inode;
-
-        assert(pack);
-
-        if (!fgets(fn, sizeof(fn), pack))
-                return 0;
-
-        char_array_0(fn);
-        truncate_nl(fn);
-
-        fd = open(fn, O_RDONLY|O_CLOEXEC|O_NOATIME|O_NOCTTY|O_NOFOLLOW);
-        if (fd < 0) {
-                if (errno != ENOENT && errno != EPERM && errno != EACCES && errno != ELOOP)
-                        log_warning("open(%s) failed: %m", fn);
-
-        } else if (file_verify(fd, fn, arg_file_size_max, &st) <= 0)
-                fd = safe_close(fd);
-
-        if (fread(&inode, sizeof(inode), 1, pack) != 1) {
-                log_error("Premature end of pack file.");
-                return -EIO;
-        }
-
-        if (fd >= 0) {
-                /* If the inode changed the file got deleted, so just
-                 * ignore this entry */
-                if (st.st_ino != (uint64_t) inode)
-                        fd = safe_close(fd);
-        }
-
-        for (;;) {
-                uint32_t b, c;
-
-                if (fread(&b, sizeof(b), 1, pack) != 1 ||
-                    fread(&c, sizeof(c), 1, pack) != 1) {
-                        log_error("Premature end of pack file.");
-                        return -EIO;
-                }
-
-                if (b == 0 && c == 0)
-                        break;
-
-                if (c <= b) {
-                        log_error("Invalid pack file.");
-                        return -EIO;
-                }
-
-                log_debug("%s: page %u to %u", fn, b, c);
-
-                any = true;
-
-                if (fd >= 0) {
-                        if (posix_fadvise(fd, b * page_size(), (c - b) * page_size(), POSIX_FADV_WILLNEED) < 0) {
-                                log_warning("posix_fadvise() failed: %m");
-                                return -errno;
-                        }
-                }
-        }
-
-        if (!any && fd >= 0) {
-                /* if no range is encoded in the pack file this is
-                 * intended to mean that the whole file shall be
-                 * read */
-
-                if (posix_fadvise(fd, 0, st.st_size, POSIX_FADV_WILLNEED) < 0) {
-                        log_warning("posix_fadvise() failed: %m");
-                        return -errno;
-                }
-        }
-
-        return 0;
-}
-
-static int replay(const char *root) {
-        _cleanup_close_ int inotify_fd = -1;
-        _cleanup_free_ char *pack_fn = NULL;
-        _cleanup_fclose_ FILE *pack = NULL;
-        bool on_ssd, ready = false;
-        char line[LINE_MAX];
-        int prio, c;
-
-        assert(root);
-
-        block_bump_request_nr(root);
-
-        if (asprintf(&pack_fn, "%s/.readahead", root) < 0)
-                return log_oom();
-
-        pack = fopen(pack_fn, "re");
-        if (!pack) {
-                if (errno == ENOENT) {
-                        log_debug("No pack file found.");
-                        return 0;
-                }
-
-                log_error("Failed to open pack file: %m");
-                return -errno;
-        }
-
-        posix_fadvise(fileno(pack), 0, 0, POSIX_FADV_WILLNEED);
-
-        inotify_fd = open_inotify();
-        if (inotify_fd < 0)
-                return inotify_fd;
-
-        if (!fgets(line, sizeof(line), pack)) {
-                log_error("Premature end of pack file.");
-                return -EIO;
-        }
-
-        char_array_0(line);
-
-        if (!streq(line, CANONICAL_HOST READAHEAD_PACK_FILE_VERSION)) {
-                log_debug("Pack file host or version type mismatch.");
-                goto done;
-        }
-
-        c = getc(pack);
-        if (c == EOF) {
-                log_debug("Premature end of pack file.");
-                return -EIO;
-        }
-
-        /* We do not retest SSD here, so that we can start replaying
-         * before udev is up.*/
-        on_ssd = c == 'S';
-        log_debug("On SSD: %s", yes_no(on_ssd));
-
-        if (on_ssd)
-                prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0);
-        else
-                /* We are not using RT here, since we'd starve IO that
-                we didn't record (which is for example blkid, since
-                its disk accesses go directly to the block device and
-                are thus not visible in fallocate) to death. However,
-                we do ask for an IO prio that is slightly higher than
-                the default (which is BE. 4) */
-                prio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 2);
-
-        if (ioprio_set(IOPRIO_WHO_PROCESS, getpid(), prio) < 0)
-                log_warning("Failed to set IDLE IO priority class: %m");
-
-        sd_notify(0, "STATUS=Replaying readahead data");
-
-        log_debug("Replaying...");
-
-        if (access("/run/systemd/readahead/noreplay", F_OK) >= 0) {
-                log_debug("Got termination request");
-                goto done;
-        }
-
-        while (!feof(pack) && !ferror(pack)) {
-                uint8_t inotify_buffer[sizeof(struct inotify_event) + FILENAME_MAX];
-                int k;
-                ssize_t n;
-
-                n = read(inotify_fd, &inotify_buffer, sizeof(inotify_buffer));
-                if (n < 0) {
-                        if (errno != EINTR && errno != EAGAIN) {
-                                log_error("Failed to read inotify event: %m");
-                                return -errno;
-                        }
-                } else {
-                        struct inotify_event *e = (struct inotify_event*) inotify_buffer;
-
-                        while (n > 0) {
-                                size_t step;
-
-                                if ((e->mask & IN_CREATE) && streq(e->name, "noreplay")) {
-                                        log_debug("Got termination request");
-                                        goto done;
-                                }
-
-                                step = sizeof(struct inotify_event) + e->len;
-                                assert(step <= (size_t) n);
-
-                                e = (struct inotify_event*) ((uint8_t*) e + step);
-                                n -= step;
-                        }
-                }
-
-                k = unpack_file(pack);
-                if (k < 0)
-                        return k;
-
-                if (!ready) {
-                        /* We delay the ready notification until we
-                         * queued at least one read */
-                        sd_notify(0, "READY=1");
-                        ready = true;
-                }
-        }
-
-done:
-        if (ferror(pack)) {
-                log_error("Failed to read pack file.");
-                return -EIO;
-        }
-
-        if (!ready)
-                sd_notify(0, "READY=1");
-
-        log_debug("Done.");
-        return 0;
-}
-
-int main_replay(const char *root) {
-
-        if (!root)
-                root = "/";
-
-        if (!enough_ram()) {
-                log_info("Disabling readahead replay due to low memory.");
-                return EXIT_SUCCESS;
-        }
-
-        shared = shared_get();
-        if (!shared)
-                return EXIT_FAILURE;
-
-        shared->replay = getpid();
-        __sync_synchronize();
-
-        if (replay(root) < 0)
-                return EXIT_FAILURE;
-
-        return EXIT_SUCCESS;
-}
diff --git a/src/readahead/readahead.c b/src/readahead/readahead.c
deleted file mode 100644 (file)
index 73cf538..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2012 Lennart Poettering
-
-  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/>.
-***/
-
-#include <stdio.h>
-#include <getopt.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-
-#include "util.h"
-#include "def.h"
-#include "build.h"
-#include "readahead-common.h"
-
-unsigned arg_files_max = 16*1024;
-off_t arg_file_size_max = READAHEAD_FILE_SIZE_MAX;
-usec_t arg_timeout = 2*USEC_PER_MINUTE;
-
-static int help(void) {
-
-        printf("%s [OPTIONS...] collect [DIRECTORY]\n\n"
-               "Collect read-ahead data on early boot.\n\n"
-               "  -h --help                 Show this help\n"
-               "     --version              Show package version\n"
-               "     --files-max=INT        Maximum number of files to read ahead\n"
-               "     --file-size-max=BYTES  Maximum size of files to read ahead\n"
-               "     --timeout=USEC         Maximum time to spend collecting data\n\n\n",
-               program_invocation_short_name);
-
-        printf("%s [OPTIONS...] replay [DIRECTORY]\n\n"
-               "Replay collected read-ahead data on early boot.\n\n"
-               "  -h --help                 Show this help\n"
-               "     --version              Show package version\n"
-               "     --file-size-max=BYTES  Maximum size of files to read ahead\n\n\n",
-               program_invocation_short_name);
-
-        printf("%s [OPTIONS...] analyze [PACK FILE]\n\n"
-               "Analyze collected read-ahead data.\n\n"
-               "  -h --help                 Show this help\n"
-               "     --version              Show package version\n",
-               program_invocation_short_name);
-
-        return 0;
-}
-
-static int parse_argv(int argc, char *argv[]) {
-
-        enum {
-                ARG_VERSION = 0x100,
-                ARG_FILES_MAX,
-                ARG_FILE_SIZE_MAX,
-                ARG_TIMEOUT
-        };
-
-        static const struct option options[] = {
-                { "help",          no_argument,       NULL, 'h'                },
-                { "version",       no_argument,       NULL, ARG_VERSION        },
-                { "files-max",     required_argument, NULL, ARG_FILES_MAX      },
-                { "file-size-max", required_argument, NULL, ARG_FILE_SIZE_MAX  },
-                { "timeout",       required_argument, NULL, ARG_TIMEOUT        },
-                {}
-        };
-
-        int c;
-
-        assert(argc >= 0);
-        assert(argv);
-
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
-
-                switch (c) {
-
-                case 'h':
-                        return help();
-
-                case ARG_VERSION:
-                        puts(PACKAGE_STRING);
-                        puts(SYSTEMD_FEATURES);
-                        return 0;
-
-                case ARG_FILES_MAX:
-                        if (safe_atou(optarg, &arg_files_max) < 0 || arg_files_max <= 0) {
-                                log_error("Failed to parse maximum number of files %s.", optarg);
-                                return -EINVAL;
-                        }
-                        break;
-
-                case ARG_FILE_SIZE_MAX: {
-                        unsigned long long ull;
-
-                        if (safe_atollu(optarg, &ull) < 0 || ull <= 0) {
-                                log_error("Failed to parse maximum file size %s.", optarg);
-                                return -EINVAL;
-                        }
-
-                        arg_file_size_max = (off_t) ull;
-                        break;
-                }
-
-                case ARG_TIMEOUT:
-                        if (parse_sec(optarg, &arg_timeout) < 0 || arg_timeout <= 0) {
-                                log_error("Failed to parse timeout %s.", optarg);
-                                return -EINVAL;
-                        }
-
-                        break;
-
-                case '?':
-                        return -EINVAL;
-
-                default:
-                        assert_not_reached("Unhandled option");
-                }
-        }
-
-        if (optind != argc-1 &&
-            optind != argc-2) {
-                help();
-                return -EINVAL;
-        }
-
-        return 1;
-}
-
-int main(int argc, char *argv[]) {
-        int r;
-
-        log_set_target(LOG_TARGET_SAFE);
-        log_parse_environment();
-        log_open();
-
-        umask(0022);
-
-        r = parse_argv(argc, argv);
-        if (r <= 0)
-                return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
-
-        if (streq(argv[optind], "collect"))
-                return main_collect(argv[optind+1]);
-        else if (streq(argv[optind], "replay"))
-                return main_replay(argv[optind+1]);
-        else if (streq(argv[optind], "analyze"))
-                return main_analyze(argv[optind+1]);
-
-        log_error("Unknown verb %s.", argv[optind]);
-        return EXIT_FAILURE;
-}
diff --git a/src/readahead/sd-readahead.c b/src/readahead/sd-readahead.c
deleted file mode 100644 (file)
index 675d82c..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  Copyright 2010 Lennart Poettering
-
-  Permission is hereby granted, free of charge, to any person
-  obtaining a copy of this software and associated documentation files
-  (the "Software"), to deal in the Software without restriction,
-  including without limitation the rights to use, copy, modify, merge,
-  publish, distribute, sublicense, and/or sell copies of the Software,
-  and to permit persons to whom the Software is furnished to do so,
-  subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be
-  included in all copies or substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-***/
-
-#ifndef _GNU_SOURCE
-#  define _GNU_SOURCE
-#endif
-
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <string.h>
-
-#include "sd-readahead.h"
-
-#if (__GNUC__ >= 4)
-#  ifdef SD_EXPORT_SYMBOLS
-/* Export symbols */
-#    define _sd_export_ __attribute__ ((visibility("default")))
-#  else
-/* Don't export the symbols */
-#    define _sd_export_ __attribute__ ((visibility("hidden")))
-#  endif
-#else
-#  define _sd_export_
-#endif
-
-static int touch(const char *path) {
-
-#if !defined(DISABLE_SYSTEMD) && defined(__linux__)
-        int fd;
-
-        mkdir("/run/systemd", 0755);
-        mkdir("/run/systemd/readahead", 0755);
-
-        fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666);
-        if (fd < 0)
-                return -errno;
-
-        for (;;) {
-                if (close(fd) >= 0)
-                        break;
-
-                if (errno != EINTR)
-                        return -errno;
-        }
-
-#endif
-        return 0;
-}
-
-_sd_export_ int sd_readahead(const char *action) {
-
-        if (!action)
-                return -EINVAL;
-
-        if (strcmp(action, "cancel") == 0)
-                return touch("/run/systemd/readahead/cancel");
-        else if (strcmp(action, "done") == 0)
-                return touch("/run/systemd/readahead/done");
-        else if (strcmp(action, "noreplay") == 0)
-                return touch("/run/systemd/readahead/noreplay");
-
-        return -EINVAL;
-}
diff --git a/src/readahead/test-ssd.c b/src/readahead/test-ssd.c
deleted file mode 100644 (file)
index 808faf3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
-  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/>.
-***/
-
-#include "readahead-common.h"
-
-int main(int argc, char *argv[]) {
-        int i;
-
-        for (i = 1; i < argc; i++) {
-                char *name = argv[i];
-                int r;
-
-                r = fs_on_ssd(name);
-                if (r < 0) {
-                        log_error("%s: %s", name, strerror(-r));
-                        return EXIT_FAILURE;
-                }
-
-                log_info("%s: %s", name, r ? "SSD" : "---");
-        }
-
-        return EXIT_SUCCESS;
-}
index 847637a12ca3988e9f3970e2407e4a82bc54570a..cd7cfe7a474a3aa73405cb2179bbd0b2b2eea593 100644 (file)
@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        pids = hashmap_new(trivial_hash_func, trivial_compare_func);
+        pids = hashmap_new(NULL);
         if (!pids) {
                 log_error("Failed to allocate set");
                 goto finish;
index c730216b73c6aacf4d17536078357f1586d63f6e..73c2d1bbdfbbf34ccab6ff2e584e7b55ff7eb39c 100644 (file)
@@ -53,7 +53,7 @@ static int send_on_socket(int fd, const char *socket_name, const void *packet, s
 
         if (sendto(fd, packet, size, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0) {
                 log_error("Failed to send: %m");
-                return -1;
+                return -errno;
         }
 
         return 0;
diff --git a/src/resolve-host/resolve-host.c b/src/resolve-host/resolve-host.c
new file mode 100644 (file)
index 0000000..49049d2
--- /dev/null
@@ -0,0 +1,643 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <getopt.h>
+
+#include "sd-bus.h"
+#include "bus-util.h"
+#include "bus-error.h"
+#include "bus-errors.h"
+#include "in-addr-util.h"
+#include "af-list.h"
+#include "build.h"
+
+#include "resolved-dns-packet.h"
+#include "resolved-def.h"
+
+#define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC)
+
+static int arg_family = AF_UNSPEC;
+static int arg_ifindex = 0;
+static int arg_type = 0;
+static uint16_t arg_class = 0;
+static bool arg_legend = true;
+static uint64_t arg_flags = 0;
+
+static void print_source(int ifindex, uint64_t flags) {
+
+        if (!arg_legend)
+                return;
+
+        if (ifindex <= 0 && flags == 0)
+                return;
+
+        fputs("\n-- Information acquired via", stdout);
+
+        if (flags != 0)
+                printf(" protocol%s%s%s",
+                       flags & SD_RESOLVED_DNS ? " DNS" :"",
+                       flags & SD_RESOLVED_LLMNR_IPV4 ? " LLMNR/IPv4" : "",
+                       flags & SD_RESOLVED_LLMNR_IPV6 ? " LLMNR/IPv6" : "");
+
+        if (ifindex > 0) {
+                char ifname[IF_NAMESIZE] = "";
+                printf(" interface %s", strna(if_indextoname(ifindex, ifname)));
+        }
+
+        fputc('.', stdout);
+        fputc('\n', stdout);
+}
+
+static int resolve_host(sd_bus *bus, const char *name) {
+
+        _cleanup_bus_message_unref_ sd_bus_message *req = NULL, *reply = NULL;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        const char *canonical = NULL;
+        unsigned c = 0;
+        int r, ifindex;
+        uint64_t flags;
+
+        assert(name);
+
+        log_debug("Resolving %s (family %s, ifindex %i).", name, af_to_name(arg_family) ?: "*", arg_ifindex);
+
+        r = sd_bus_message_new_method_call(
+                        bus,
+                        &req,
+                        "org.freedesktop.resolve1",
+                        "/org/freedesktop/resolve1",
+                        "org.freedesktop.resolve1.Manager",
+                        "ResolveHostname");
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_set_auto_start(req, false);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_append(req, "isit", arg_ifindex, name, arg_family, arg_flags);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_call(bus, req, DNS_CALL_TIMEOUT_USEC, &error, &reply);
+        if (r < 0) {
+                log_error("%s: resolve call failed: %s", name, bus_error_message(&error, r));
+                return r;
+        }
+
+        r = sd_bus_message_read(reply, "i", &ifindex);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_enter_container(reply, 'a', "(iay)");
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        while ((r = sd_bus_message_enter_container(reply, 'r', "iay")) > 0) {
+                const void *a;
+                int family;
+                size_t sz;
+                _cleanup_free_ char *pretty = NULL;
+                char ifname[IF_NAMESIZE] = "";
+
+                r = sd_bus_message_read(reply, "i", &family);
+                if (r < 0)
+                        return bus_log_parse_error(r);
+
+                r = sd_bus_message_read_array(reply, 'y', &a, &sz);
+                if (r < 0)
+                        return bus_log_parse_error(r);
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        return bus_log_parse_error(r);
+
+                if (!IN_SET(family, AF_INET, AF_INET6)) {
+                        log_debug("%s: skipping entry with family %d (%s)", name, family, af_to_name(family) ?: "unknown");
+                        continue;
+                }
+
+                if (sz != FAMILY_ADDRESS_SIZE(family)) {
+                        log_error("%s: systemd-resolved returned address of invalid size %zu for family %s",
+                                  name, sz, af_to_name(family) ?: "unknown");
+                        continue;
+                }
+
+                if (ifindex > 0) {
+                        char *t;
+
+                        t = if_indextoname(ifindex, ifname);
+                        if (!t) {
+                                log_error("Failed to resolve interface name for index %i", ifindex);
+                                continue;
+                        }
+                }
+
+                r = in_addr_to_string(family, a, &pretty);
+                if (r < 0) {
+                        log_error("%s: failed to print address: %s", name, strerror(-r));
+                        continue;
+                }
+
+                printf("%*s%s %s%s%s\n",
+                       (int) strlen(name), c == 0 ? name : "", c == 0 ? ":" : " ",
+                       pretty,
+                       isempty(ifname) ? "" : "%", ifname);
+
+                c++;
+        }
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_exit_container(reply);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_read(reply, "st", &canonical, &flags);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        if (!streq(name, canonical)) {
+                printf("%*s%s (%s)\n",
+                       (int) strlen(name), c == 0 ? name : "", c == 0 ? ":" : " ",
+                       canonical);
+        }
+
+        if (c == 0) {
+                log_error("%s: no addresses found", name);
+                return -ESRCH;
+        }
+
+        print_source(ifindex, flags);
+
+        return 0;
+}
+
+static int resolve_address(sd_bus *bus, int family, const union in_addr_union *address, int ifindex) {
+        _cleanup_bus_message_unref_ sd_bus_message *req = NULL, *reply = NULL;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_free_ char *pretty = NULL;
+        char ifname[IF_NAMESIZE] = "";
+        uint64_t flags;
+        unsigned c = 0;
+        const char *n;
+        int r;
+
+        assert(bus);
+        assert(IN_SET(family, AF_INET, AF_INET6));
+        assert(address);
+
+        r = in_addr_to_string(family, address, &pretty);
+        if (r < 0)
+                return log_oom();
+
+        if (ifindex > 0) {
+                char *t;
+
+                t = if_indextoname(ifindex, ifname);
+                if (!t) {
+                        log_error("Failed to resolve interface name for index %i", ifindex);
+                        return -errno;
+                }
+        }
+
+        log_debug("Resolving %s%s%s.", pretty, isempty(ifname) ? "" : "%", ifname);
+
+        r = sd_bus_message_new_method_call(
+                        bus,
+                        &req,
+                        "org.freedesktop.resolve1",
+                        "/org/freedesktop/resolve1",
+                        "org.freedesktop.resolve1.Manager",
+                        "ResolveAddress");
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_set_auto_start(req, false);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_append(req, "ii", ifindex, family);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_append_array(req, 'y', address, FAMILY_ADDRESS_SIZE(family));
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_append(req, "t", arg_flags);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_call(bus, req, DNS_CALL_TIMEOUT_USEC, &error, &reply);
+        if (r < 0) {
+                log_error("%s: resolve call failed: %s", pretty, bus_error_message(&error, r));
+                return r;
+        }
+
+        r = sd_bus_message_read(reply, "i", &ifindex);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_enter_container(reply, 'a', "s");
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        while ((r = sd_bus_message_read(reply, "s", &n)) > 0) {
+
+                printf("%*s%s%s%s %s\n",
+                       (int) strlen(pretty), c == 0 ? pretty : "",
+                       isempty(ifname) ? "" : "%", ifname,
+                       c == 0 ? ":" : " ",
+                       n);
+
+                c++;
+        }
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_exit_container(reply);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_read(reply, "t", &flags);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        if (c == 0) {
+                log_error("%s: no names found", pretty);
+                return -ESRCH;
+        }
+
+        print_source(ifindex, flags);
+
+        return 0;
+}
+
+static int parse_address(const char *s, int *family, union in_addr_union *address, int *ifindex) {
+        const char *percent, *a;
+        int ifi = 0;
+        int r;
+
+        percent = strchr(s, '%');
+        if (percent) {
+                r = safe_atoi(percent+1, &ifi);
+                if (r < 0 || ifi <= 0) {
+                        ifi = if_nametoindex(percent+1);
+                        if (ifi <= 0)
+                                return -EINVAL;
+                }
+
+                a = strndupa(s, percent - s);
+        } else
+                a = s;
+
+        r = in_addr_from_string_auto(a, family, address);
+        if (r < 0)
+                return r;
+
+        *ifindex = ifi;
+        return 0;
+}
+
+static int resolve_record(sd_bus *bus, const char *name) {
+
+        _cleanup_bus_message_unref_ sd_bus_message *req = NULL, *reply = NULL;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        unsigned n = 0;
+        uint64_t flags;
+        int r, ifindex;
+
+        assert(name);
+
+        log_debug("Resolving %s %s %s.", name, dns_class_to_string(arg_class), dns_type_to_string(arg_type));
+
+        r = sd_bus_message_new_method_call(
+                        bus,
+                        &req,
+                        "org.freedesktop.resolve1",
+                        "/org/freedesktop/resolve1",
+                        "org.freedesktop.resolve1.Manager",
+                        "ResolveRecord");
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_set_auto_start(req, false);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        assert((uint16_t) arg_type == arg_type);
+        r = sd_bus_message_append(req, "isqqt", arg_ifindex, name, arg_class, arg_type, arg_flags);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_call(bus, req, DNS_CALL_TIMEOUT_USEC, &error, &reply);
+        if (r < 0) {
+                log_error("%s: resolve call failed: %s", name, bus_error_message(&error, r));
+                return r;
+        }
+
+        r = sd_bus_message_read(reply, "i", &ifindex);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_enter_container(reply, 'a', "(qqay)");
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        while ((r = sd_bus_message_enter_container(reply, 'r', "qqay")) > 0) {
+                _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
+                _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+                _cleanup_free_ char *s = NULL;
+                uint16_t c, t;
+                const void *d;
+                size_t l;
+
+                r = sd_bus_message_read(reply, "qq", &c, &t);
+                if (r < 0)
+                        return bus_log_parse_error(r);
+
+                r = sd_bus_message_read_array(reply, 'y', &d, &l);
+                if (r < 0)
+                        return bus_log_parse_error(r);
+
+                r = sd_bus_message_exit_container(reply);
+                if (r < 0)
+                        return bus_log_parse_error(r);
+
+                r = dns_packet_new(&p, DNS_PROTOCOL_DNS, 0);
+                if (r < 0)
+                        return log_oom();
+
+                r = dns_packet_append_blob(p, d, l, NULL);
+                if (r < 0)
+                        return log_oom();
+
+                r = dns_packet_read_rr(p, &rr, NULL);
+                if (r < 0) {
+                        log_error("Failed to parse RR.");
+                        return r;
+                }
+
+                r = dns_resource_record_to_string(rr, &s);
+                if (r < 0) {
+                        log_error("Failed to format RR.");
+                        return r;
+                }
+
+                printf("%s\n", s);
+                n++;
+        }
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_exit_container(reply);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        r = sd_bus_message_read(reply, "t", &flags);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        if (n == 0) {
+                log_error("%s: no records found", name);
+                return -ESRCH;
+        }
+
+        print_source(ifindex, flags);
+
+        return 0;
+}
+
+static void help_dns_types(void) {
+        int i;
+        const char *t;
+
+        if (arg_legend)
+                puts("Known dns types:");
+        for (i = 0; i < _DNS_TYPE_MAX; i++) {
+                t = dns_type_to_string(i);
+                if (t)
+                        puts(t);
+        }
+}
+
+static void help_dns_classes(void) {
+        int i;
+        const char *t;
+
+        if (arg_legend)
+                puts("Known dns classes:");
+        for (i = 0; i < _DNS_CLASS_MAX; i++) {
+                t = dns_class_to_string(i);
+                if (t)
+                        puts(t);
+        }
+}
+
+static void help(void) {
+        printf("%s [OPTIONS...]\n\n"
+               "Resolve IPv4 or IPv6 addresses.\n\n"
+               "  -h --help               Show this help\n"
+               "     --version            Show package version\n"
+               "  -4                      Resolve IPv4 addresses\n"
+               "  -6                      Resolve IPv6 addresses\n"
+               "  -i INTERFACE            Look on interface\n"
+               "  -p --protocol=PROTOCOL  Look via protocol\n"
+               "  -t --type=TYPE          Query RR with DNS type\n"
+               "  -c --class=CLASS        Query RR with DNS class\n"
+               "     --legend[=BOOL]      Do [not] print column headers\n"
+               , program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_LEGEND,
+        };
+
+        static const struct option options[] = {
+                { "help",      no_argument,       NULL, 'h'           },
+                { "version",   no_argument,       NULL, ARG_VERSION   },
+                { "type",      required_argument, NULL, 't'           },
+                { "class",     required_argument, NULL, 'c'           },
+                { "legend", optional_argument,    NULL, ARG_LEGEND    },
+                { "protocol",  required_argument, NULL, 'p'           },
+                {}
+        };
+
+        int c, r;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "h46i:t:c:p:", options, NULL)) >= 0)
+                switch(c) {
+
+                case 'h':
+                        help();
+                        return 0; /* done */;
+
+                case ARG_VERSION:
+                        puts(PACKAGE_STRING);
+                        puts(SYSTEMD_FEATURES);
+                        return 0 /* done */;
+
+                case '4':
+                        arg_family = AF_INET;
+                        break;
+
+                case '6':
+                        arg_family = AF_INET6;
+                        break;
+
+                case 'i':
+                        arg_ifindex = if_nametoindex(optarg);
+                        if (arg_ifindex <= 0) {
+                                log_error("Unknown interfaces %s: %m", optarg);
+                                return -errno;
+                        }
+                        break;
+
+                case 't':
+                        if (streq(optarg, "help")) {
+                                help_dns_types();
+                                return 0;
+                        }
+
+                        arg_type = dns_type_from_string(optarg);
+                        if (arg_type < 0) {
+                                log_error("Failed to parse RR record type %s", optarg);
+                                return arg_type;
+                        }
+                        assert(arg_type > 0 && (uint16_t) arg_type == arg_type);
+
+                        break;
+
+                case 'c':
+                        if (streq(optarg, "help")) {
+                                help_dns_classes();
+                                return 0;
+                        }
+
+                        r = dns_class_from_string(optarg, &arg_class);
+                        if (r < 0) {
+                                log_error("Failed to parse RR record class %s", optarg);
+                                return r;
+                        }
+
+                        break;
+
+                case ARG_LEGEND:
+                        if (optarg) {
+                                r = parse_boolean(optarg);
+                                if (r < 0) {
+                                        log_error("Failed to parse --legend= argument");
+                                        return r;
+                                }
+
+                                arg_legend = !!r;
+                        } else
+                                arg_legend = false;
+                        break;
+
+                case 'p':
+                        if (streq(optarg, "dns"))
+                                arg_flags |= SD_RESOLVED_DNS;
+                        else if (streq(optarg, "llmnr"))
+                                arg_flags |= SD_RESOLVED_LLMNR;
+                        else if (streq(optarg, "llmnr-ipv4"))
+                                arg_flags |= SD_RESOLVED_LLMNR_IPV4;
+                        else if (streq(optarg, "llmnr-ipv6"))
+                                arg_flags |= SD_RESOLVED_LLMNR_IPV6;
+                        else {
+                                log_error("Unknown protocol specifier: %s", optarg);
+                                return -EINVAL;
+                        }
+
+                        break;
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unhandled option");
+                }
+
+        if (arg_type == 0 && arg_class != 0) {
+                log_error("--class= may only be used in conjunction with --type=");
+                return -EINVAL;
+        }
+
+        if (arg_type != 0 && arg_class == 0)
+                arg_class = DNS_CLASS_IN;
+
+        return 1 /* work to do */;
+}
+
+int main(int argc, char **argv) {
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
+        int r;
+
+        log_parse_environment();
+        log_open();
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto finish;
+
+        if (optind >= argc) {
+                log_error("No arguments passed");
+                r = -EINVAL;
+                goto finish;
+        }
+
+        r = sd_bus_open_system(&bus);
+        if (r < 0) {
+                log_error("sd_bus_open_system: %s", strerror(-r));
+                goto finish;
+        }
+
+        while (argv[optind]) {
+                int family, ifindex, k;
+                union in_addr_union a;
+
+                if (arg_type != 0)
+                        k = resolve_record(bus, argv[optind]);
+                else {
+                        k = parse_address(argv[optind], &family, &a, &ifindex);
+                        if (k >= 0)
+                                k = resolve_address(bus, family, &a, ifindex);
+                        else
+                                k = resolve_host(bus, argv[optind]);
+                }
+
+                if (r == 0)
+                        r = k;
+
+                optind++;
+        }
+
+finish:
+        return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/resolve/dns-type.c b/src/resolve/dns-type.c
new file mode 100644 (file)
index 0000000..a3e7408
--- /dev/null
@@ -0,0 +1,45 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include "dns-type.h"
+
+typedef const struct {
+        uint16_t type;
+        const char *name;
+} dns_type;
+
+static const struct dns_type_name *
+lookup_dns_type (register const char *str, register unsigned int len);
+
+#include "dns_type-from-name.h"
+#include "dns_type-to-name.h"
+
+int dns_type_from_string(const char *s) {
+        const struct dns_type_name *sc;
+
+        assert(s);
+
+        sc = lookup_dns_type(s, strlen(s));
+        if (!sc)
+                return _DNS_TYPE_INVALID;
+
+        return sc->id;
+}
diff --git a/src/resolve/dns-type.h b/src/resolve/dns-type.h
new file mode 100644 (file)
index 0000000..86951d2
--- /dev/null
@@ -0,0 +1,120 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#pragma once
+
+#include "macro.h"
+
+const char *dns_type_to_string(int type);
+int dns_type_from_string(const char *s);
+
+/* DNS record types, taken from
+ * http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml.
+ */
+enum {
+        /* Normal records */
+        DNS_TYPE_A          = 0x01,
+        DNS_TYPE_NS,
+        DNS_TYPE_MD,
+        DNS_TYPE_MF,
+        DNS_TYPE_CNAME,
+        DNS_TYPE_SOA,
+        DNS_TYPE_MB,
+        DNS_TYPE_MG,
+        DNS_TYPE_MR,
+        DNS_TYPE_NULL,
+        DNS_TYPE_WKS,
+        DNS_TYPE_PTR,
+        DNS_TYPE_HINFO,
+        DNS_TYPE_MINFO,
+        DNS_TYPE_MX,
+        DNS_TYPE_TXT,
+        DNS_TYPE_RP,
+        DNS_TYPE_AFSDB,
+        DNS_TYPE_X25,
+        DNS_TYPE_ISDN,
+        DNS_TYPE_RT,
+        DNS_TYPE_NSAP,
+        DNS_TYPE_NSAP_PTR,
+        DNS_TYPE_SIG,
+        DNS_TYPE_KEY,
+        DNS_TYPE_PX,
+        DNS_TYPE_GPOS,
+        DNS_TYPE_AAAA,
+        DNS_TYPE_LOC,
+        DNS_TYPE_NXT,
+        DNS_TYPE_EID,
+        DNS_TYPE_NIMLOC,
+        DNS_TYPE_SRV,
+        DNS_TYPE_ATMA,
+        DNS_TYPE_NAPTR,
+        DNS_TYPE_KX,
+        DNS_TYPE_CERT,
+        DNS_TYPE_A6,
+        DNS_TYPE_DNAME,
+        DNS_TYPE_SINK,
+        DNS_TYPE_OPT,          /* EDNS0 option */
+        DNS_TYPE_APL,
+        DNS_TYPE_DS,
+        DNS_TYPE_SSHFP,
+        DNS_TYPE_IPSECKEY,
+        DNS_TYPE_RRSIG,
+        DNS_TYPE_NSEC,
+        DNS_TYPE_DNSKEY,
+        DNS_TYPE_DHCID,
+        DNS_TYPE_NSEC3,
+        DNS_TYPE_NSEC3PARAM,
+        DNS_TYPE_TLSA,
+
+        DNS_TYPE_HIP        = 0x37,
+        DNS_TYPE_NINFO,
+        DNS_TYPE_RKEY,
+        DNS_TYPE_TALINK,
+        DNS_TYPE_CDS,
+        DNS_TYPE_CDNSKEY,
+
+        DNS_TYPE_SPF        = 0x63,
+        DNS_TYPE_NID,
+        DNS_TYPE_L32,
+        DNS_TYPE_L64,
+        DNS_TYPE_LP,
+        DNS_TYPE_EUI48,
+        DNS_TYPE_EUI64,
+
+        DNS_TYPE_TKEY       = 0xF9,
+        DNS_TYPE_TSIG,
+        DNS_TYPE_IXFR,
+        DNS_TYPE_AXFR,
+        DNS_TYPE_MAILB,
+        DNS_TYPE_MAILA,
+        DNS_TYPE_ANY,
+        DNS_TYPE_URI,
+        DNS_TYPE_CAA,
+        DNS_TYPE_TA         = 0x8000,
+        DNS_TYPE_DLV,
+
+        _DNS_TYPE_MAX,
+        _DNS_TYPE_INVALID = -1
+};
+
+assert_cc(DNS_TYPE_SSHFP == 44);
+assert_cc(DNS_TYPE_TLSA == 52);
+assert_cc(DNS_TYPE_ANY == 255);
diff --git a/src/resolve/dns_type-from-name.gperf b/src/resolve/dns_type-from-name.gperf
new file mode 100644 (file)
index 0000000..720dd48
--- /dev/null
@@ -0,0 +1,79 @@
+struct dns_type_name { const char* name; int id; };
+%null-strings
+%%
+A, DNS_TYPE_A
+NS, DNS_TYPE_NS
+MD, DNS_TYPE_MD
+MF, DNS_TYPE_MF
+CNAME, DNS_TYPE_CNAME
+SOA, DNS_TYPE_SOA
+MB, DNS_TYPE_MB
+MG, DNS_TYPE_MG
+MR, DNS_TYPE_MR
+NULL, DNS_TYPE_NULL
+WKS, DNS_TYPE_WKS
+PTR, DNS_TYPE_PTR
+HINFO, DNS_TYPE_HINFO
+MINFO, DNS_TYPE_MINFO
+MX, DNS_TYPE_MX
+TXT, DNS_TYPE_TXT
+RP, DNS_TYPE_RP
+AFSDB, DNS_TYPE_AFSDB
+X25, DNS_TYPE_X25
+ISDN, DNS_TYPE_ISDN
+RT, DNS_TYPE_RT
+NSAP, DNS_TYPE_NSAP
+NSAP_PTR, DNS_TYPE_NSAP_PTR
+SIG, DNS_TYPE_SIG
+KEY, DNS_TYPE_KEY
+PX, DNS_TYPE_PX
+GPOS, DNS_TYPE_GPOS
+AAAA, DNS_TYPE_AAAA
+LOC, DNS_TYPE_LOC
+NXT, DNS_TYPE_NXT
+EID, DNS_TYPE_EID
+NIMLOC, DNS_TYPE_NIMLOC
+SRV, DNS_TYPE_SRV
+ATMA, DNS_TYPE_ATMA
+NAPTR, DNS_TYPE_NAPTR
+KX, DNS_TYPE_KX
+CERT, DNS_TYPE_CERT
+A6, DNS_TYPE_A6
+DNAME, DNS_TYPE_DNAME
+SINK, DNS_TYPE_SINK
+OPT, DNS_TYPE_OPT
+APL, DNS_TYPE_APL
+DS, DNS_TYPE_DS
+SSHFP, DNS_TYPE_SSHFP
+IPSECKEY, DNS_TYPE_IPSECKEY
+RRSIG, DNS_TYPE_RRSIG
+NSEC, DNS_TYPE_NSEC
+DNSKEY, DNS_TYPE_DNSKEY
+DHCID, DNS_TYPE_DHCID
+NSEC3, DNS_TYPE_NSEC3
+NSEC3PARAM, DNS_TYPE_NSEC3PARAM
+TLSA, DNS_TYPE_TLSA
+HIP, DNS_TYPE_HIP
+NINFO, DNS_TYPE_NINFO
+RKEY, DNS_TYPE_RKEY
+TALINK, DNS_TYPE_TALINK
+CDS, DNS_TYPE_CDS
+CDNSKEY, DNS_TYPE_CDNSKEY
+SPF, DNS_TYPE_SPF
+NID, DNS_TYPE_NID
+L32, DNS_TYPE_L32
+L64, DNS_TYPE_L64
+LP, DNS_TYPE_LP
+EUI48, DNS_TYPE_EUI48
+EUI64, DNS_TYPE_EUI64
+TKEY, DNS_TYPE_TKEY
+TSIG, DNS_TYPE_TSIG
+IXFR, DNS_TYPE_IXFR
+AXFR, DNS_TYPE_AXFR
+MAILB, DNS_TYPE_MAILB
+MAILA, DNS_TYPE_MAILA
+ANY, DNS_TYPE_ANY
+URI, DNS_TYPE_URI
+CAA, DNS_TYPE_CAA
+TA, DNS_TYPE_TA
+DLV, DNS_TYPE_DLV
diff --git a/src/resolve/dns_type-from-name.h b/src/resolve/dns_type-from-name.h
new file mode 100644 (file)
index 0000000..641f9fe
--- /dev/null
@@ -0,0 +1,283 @@
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: gperf -L ANSI-C -t --ignore-case -N lookup_dns_type -H hash_dns_type_name -p -C  */
+/* Computed positions: -k'1-2,$' */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646.  */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#endif
+
+struct dns_type_name { const char* name; int id; };
+
+#define TOTAL_KEYWORDS 76
+#define MIN_WORD_LENGTH 1
+#define MAX_WORD_LENGTH 10
+#define MIN_HASH_VALUE 7
+#define MAX_HASH_VALUE 193
+/* maximum key range = 187, duplicates = 0 */
+
+#ifndef GPERF_DOWNCASE
+#define GPERF_DOWNCASE 1
+static unsigned char gperf_downcase[256] =
+  {
+      0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,
+     15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,
+     30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,
+     45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,
+     60,  61,  62,  63,  64,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106,
+    107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+    122,  91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104,
+    105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+    120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+    135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+    150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+    165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+    180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+    195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+    210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+    225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+    240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+    255
+  };
+#endif
+
+#ifndef GPERF_CASE_STRCMP
+#define GPERF_CASE_STRCMP 1
+static int
+gperf_case_strcmp (register const char *s1, register const char *s2)
+{
+  for (;;)
+    {
+      unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
+      unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
+      if (c1 != 0 && c1 == c2)
+        continue;
+      return (int)c1 - (int)c2;
+    }
+}
+#endif
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash_dns_type_name (register const char *str, register unsigned int len)
+{
+  static const unsigned char asso_values[] =
+    {
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+       15,  15,  10,  90,  15, 194,   0, 194, 194, 194,
+      194, 194, 194, 194, 194,   5,  25,  25,  30,  25,
+       45,  60,  55,  10, 194,  30,  85,  15,  10,  80,
+        5, 194,   5,   5,   0,  85,   5,  70,  20,  25,
+      194, 194, 194, 194, 194, 194, 194,   5,  25,  25,
+       30,  25,  45,  60,  55,  10, 194,  30,  85,  15,
+       10,  80,   5, 194,   5,   5,   0,  85,   5,  70,
+       20,  25, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
+      194, 194, 194, 194, 194, 194
+    };
+  register int hval = len;
+
+  switch (hval)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[1]];
+      /*FALLTHROUGH*/
+      case 1:
+        hval += asso_values[(unsigned char)str[0]];
+        break;
+    }
+  return hval + asso_values[(unsigned char)str[len - 1]];
+}
+
+#ifdef __GNUC__
+__inline
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+__attribute__ ((__gnu_inline__))
+#endif
+#endif
+const struct dns_type_name *
+lookup_dns_type (register const char *str, register unsigned int len)
+{
+  static const struct dns_type_name wordlist[] =
+    {
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0},
+      {"RT", DNS_TYPE_RT},
+      {(char*)0}, {(char*)0}, {(char*)0},
+      {"A", DNS_TYPE_A},
+      {"TA", DNS_TYPE_TA},
+      {"PTR", DNS_TYPE_PTR},
+      {"ATMA", DNS_TYPE_ATMA},
+      {(char*)0}, {(char*)0},
+      {"RP", DNS_TYPE_RP},
+      {"SRV", DNS_TYPE_SRV},
+      {"AAAA", DNS_TYPE_AAAA},
+      {"SSHFP", DNS_TYPE_SSHFP},
+      {(char*)0},
+      {"NS", DNS_TYPE_NS},
+      {"TXT", DNS_TYPE_TXT},
+      {"NSAP", DNS_TYPE_NSAP},
+      {"NAPTR", DNS_TYPE_NAPTR},
+      {(char*)0},
+      {"MR", DNS_TYPE_MR},
+      {"NSAP_PTR", DNS_TYPE_NSAP_PTR},
+      {"ISDN", DNS_TYPE_ISDN},
+      {"MAILA", DNS_TYPE_MAILA},
+      {(char*)0}, {(char*)0},
+      {"NXT", DNS_TYPE_NXT},
+      {"AXFR", DNS_TYPE_AXFR},
+      {"NSEC3", DNS_TYPE_NSEC3},
+      {(char*)0},
+      {"A6", DNS_TYPE_A6},
+      {"CAA", DNS_TYPE_CAA},
+      {"IXFR", DNS_TYPE_IXFR},
+      {"NSEC3PARAM", DNS_TYPE_NSEC3PARAM},
+      {"TALINK", DNS_TYPE_TALINK},
+      {"DS", DNS_TYPE_DS},
+      {"ANY", DNS_TYPE_ANY},
+      {"NSEC", DNS_TYPE_NSEC},
+      {(char*)0}, {(char*)0},
+      {"PX", DNS_TYPE_PX},
+      {"IPSECKEY", DNS_TYPE_IPSECKEY},
+      {"SINK", DNS_TYPE_SINK},
+      {"MAILB", DNS_TYPE_MAILB},
+      {"NIMLOC", DNS_TYPE_NIMLOC},
+      {(char*)0},
+      {"NID", DNS_TYPE_NID},
+      {"CERT", DNS_TYPE_CERT},
+      {(char*)0}, {(char*)0},
+      {"MX", DNS_TYPE_MX},
+      {"SPF", DNS_TYPE_SPF},
+      {"TKEY", DNS_TYPE_TKEY},
+      {(char*)0}, {(char*)0}, {(char*)0},
+      {"CDS", DNS_TYPE_CDS},
+      {"RKEY", DNS_TYPE_RKEY},
+      {"CNAME", DNS_TYPE_CNAME},
+      {(char*)0},
+      {"MB", DNS_TYPE_MB},
+      {"EID", DNS_TYPE_EID},
+      {"TSIG", DNS_TYPE_TSIG},
+      {"DNAME", DNS_TYPE_DNAME},
+      {"DNSKEY", DNS_TYPE_DNSKEY},
+      {"KX", DNS_TYPE_KX},
+      {"HIP", DNS_TYPE_HIP},
+      {"GPOS", DNS_TYPE_GPOS},
+      {"RRSIG", DNS_TYPE_RRSIG},
+      {(char*)0},
+      {"MD", DNS_TYPE_MD},
+      {"SIG", DNS_TYPE_SIG},
+      {(char*)0},
+      {"AFSDB", DNS_TYPE_AFSDB},
+      {(char*)0}, {(char*)0},
+      {"KEY", DNS_TYPE_KEY},
+      {(char*)0}, {(char*)0}, {(char*)0},
+      {"CDNSKEY", DNS_TYPE_CDNSKEY},
+      {"OPT", DNS_TYPE_OPT},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {"SOA", DNS_TYPE_SOA},
+      {"TLSA", DNS_TYPE_TLSA},
+      {(char*)0}, {(char*)0},
+      {"LP", DNS_TYPE_LP},
+      {"APL", DNS_TYPE_APL},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {"URI", DNS_TYPE_URI},
+      {(char*)0},
+      {"NINFO", DNS_TYPE_NINFO},
+      {(char*)0},
+      {"MF", DNS_TYPE_MF},
+      {"WKS", DNS_TYPE_WKS},
+      {(char*)0},
+      {"MINFO", DNS_TYPE_MINFO},
+      {(char*)0}, {(char*)0},
+      {"L64", DNS_TYPE_L64},
+      {(char*)0},
+      {"EUI48", DNS_TYPE_EUI48},
+      {(char*)0}, {(char*)0},
+      {"L32", DNS_TYPE_L32},
+      {(char*)0},
+      {"DHCID", DNS_TYPE_DHCID},
+      {(char*)0}, {(char*)0},
+      {"DLV", DNS_TYPE_DLV},
+      {(char*)0},
+      {"EUI64", DNS_TYPE_EUI64},
+      {(char*)0}, {(char*)0},
+      {"X25", DNS_TYPE_X25},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {"MG", DNS_TYPE_MG},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {"HINFO", DNS_TYPE_HINFO},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0},
+      {"NULL", DNS_TYPE_NULL},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {"LOC", DNS_TYPE_LOC}
+    };
+
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash_dns_type_name (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register const char *s = wordlist[key].name;
+
+          if (s && (((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strcmp (str, s))
+            return &wordlist[key];
+        }
+    }
+  return 0;
+}
diff --git a/src/resolve/dns_type-to-name.h b/src/resolve/dns_type-to-name.h
new file mode 100644 (file)
index 0000000..da5dd37
--- /dev/null
@@ -0,0 +1,83 @@
+const char *dns_type_to_string(int type) {
+       switch(type) {
+        case DNS_TYPE_A: return "A";
+        case DNS_TYPE_NS: return "NS";
+        case DNS_TYPE_MD: return "MD";
+        case DNS_TYPE_MF: return "MF";
+        case DNS_TYPE_CNAME: return "CNAME";
+        case DNS_TYPE_SOA: return "SOA";
+        case DNS_TYPE_MB: return "MB";
+        case DNS_TYPE_MG: return "MG";
+        case DNS_TYPE_MR: return "MR";
+        case DNS_TYPE_NULL: return "NULL";
+        case DNS_TYPE_WKS: return "WKS";
+        case DNS_TYPE_PTR: return "PTR";
+        case DNS_TYPE_HINFO: return "HINFO";
+        case DNS_TYPE_MINFO: return "MINFO";
+        case DNS_TYPE_MX: return "MX";
+        case DNS_TYPE_TXT: return "TXT";
+        case DNS_TYPE_RP: return "RP";
+        case DNS_TYPE_AFSDB: return "AFSDB";
+        case DNS_TYPE_X25: return "X25";
+        case DNS_TYPE_ISDN: return "ISDN";
+        case DNS_TYPE_RT: return "RT";
+        case DNS_TYPE_NSAP: return "NSAP";
+        case DNS_TYPE_NSAP_PTR: return "NSAP-PTR";
+        case DNS_TYPE_SIG: return "SIG";
+        case DNS_TYPE_KEY: return "KEY";
+        case DNS_TYPE_PX: return "PX";
+        case DNS_TYPE_GPOS: return "GPOS";
+        case DNS_TYPE_AAAA: return "AAAA";
+        case DNS_TYPE_LOC: return "LOC";
+        case DNS_TYPE_NXT: return "NXT";
+        case DNS_TYPE_EID: return "EID";
+        case DNS_TYPE_NIMLOC: return "NIMLOC";
+        case DNS_TYPE_SRV: return "SRV";
+        case DNS_TYPE_ATMA: return "ATMA";
+        case DNS_TYPE_NAPTR: return "NAPTR";
+        case DNS_TYPE_KX: return "KX";
+        case DNS_TYPE_CERT: return "CERT";
+        case DNS_TYPE_A6: return "A6";
+        case DNS_TYPE_DNAME: return "DNAME";
+        case DNS_TYPE_SINK: return "SINK";
+        case DNS_TYPE_OPT: return "OPT";
+        case DNS_TYPE_APL: return "APL";
+        case DNS_TYPE_DS: return "DS";
+        case DNS_TYPE_SSHFP: return "SSHFP";
+        case DNS_TYPE_IPSECKEY: return "IPSECKEY";
+        case DNS_TYPE_RRSIG: return "RRSIG";
+        case DNS_TYPE_NSEC: return "NSEC";
+        case DNS_TYPE_DNSKEY: return "DNSKEY";
+        case DNS_TYPE_DHCID: return "DHCID";
+        case DNS_TYPE_NSEC3: return "NSEC3";
+        case DNS_TYPE_NSEC3PARAM: return "NSEC3PARAM";
+        case DNS_TYPE_TLSA: return "TLSA";
+        case DNS_TYPE_HIP: return "HIP";
+        case DNS_TYPE_NINFO: return "NINFO";
+        case DNS_TYPE_RKEY: return "RKEY";
+        case DNS_TYPE_TALINK: return "TALINK";
+        case DNS_TYPE_CDS: return "CDS";
+        case DNS_TYPE_CDNSKEY: return "CDNSKEY";
+        case DNS_TYPE_SPF: return "SPF";
+        case DNS_TYPE_NID: return "NID";
+        case DNS_TYPE_L32: return "L32";
+        case DNS_TYPE_L64: return "L64";
+        case DNS_TYPE_LP: return "LP";
+        case DNS_TYPE_EUI48: return "EUI48";
+        case DNS_TYPE_EUI64: return "EUI64";
+        case DNS_TYPE_TKEY: return "TKEY";
+        case DNS_TYPE_TSIG: return "TSIG";
+        case DNS_TYPE_IXFR: return "IXFR";
+        case DNS_TYPE_AXFR: return "AXFR";
+        case DNS_TYPE_MAILB: return "MAILB";
+        case DNS_TYPE_MAILA: return "MAILA";
+        case DNS_TYPE_ANY: return "ANY";
+        case DNS_TYPE_URI: return "URI";
+        case DNS_TYPE_CAA: return "CAA";
+        case DNS_TYPE_TA: return "TA";
+        case DNS_TYPE_DLV: return "DLV";
+
+default: return NULL;
+       }
+}
+
diff --git a/src/resolve/org.freedesktop.resolve1.conf b/src/resolve/org.freedesktop.resolve1.conf
new file mode 100644 (file)
index 0000000..25b0977
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0"?> <!--*-nxml-*-->
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<!--
+  This file is part of systemd.
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+-->
+
+<busconfig>
+
+        <policy user="systemd-resolve">
+                <allow own="org.freedesktop.resolve1"/>
+                <allow send_destination="org.freedesktop.resolve1"/>
+                <allow receive_sender="org.freedesktop.resolve1"/>
+        </policy>
+
+        <policy context="default">
+                <allow send_destination="org.freedesktop.resolve1"/>
+                <allow receive_sender="org.freedesktop.resolve1"/>
+        </policy>
+
+</busconfig>
diff --git a/src/resolve/org.freedesktop.resolve1.service b/src/resolve/org.freedesktop.resolve1.service
new file mode 100644 (file)
index 0000000..7ac5c32
--- /dev/null
@@ -0,0 +1,12 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[D-BUS Service]
+Name=org.freedesktop.resolve1
+Exec=/bin/false
+User=root
+SystemdService=dbus-org.freedesktop.resolve1.service
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
new file mode 100644 (file)
index 0000000..0029023
--- /dev/null
@@ -0,0 +1,761 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "bus-errors.h"
+#include "bus-util.h"
+
+#include "resolved-dns-domain.h"
+#include "resolved-bus.h"
+#include "resolved-def.h"
+
+static int reply_query_state(DnsQuery *q) {
+        _cleanup_free_ char *ip = NULL;
+        const char *name;
+        int r;
+
+        if (q->request_hostname)
+                name = q->request_hostname;
+        else {
+                r = in_addr_to_string(q->request_family, &q->request_address, &ip);
+                if (r < 0)
+                        return r;
+
+                name = ip;
+        }
+
+        switch (q->state) {
+
+        case DNS_TRANSACTION_NO_SERVERS:
+                return sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
+
+        case DNS_TRANSACTION_TIMEOUT:
+                return sd_bus_reply_method_errorf(q->request, SD_BUS_ERROR_TIMEOUT, "Query timed out");
+
+        case DNS_TRANSACTION_ATTEMPTS_MAX_REACHED:
+                return sd_bus_reply_method_errorf(q->request, SD_BUS_ERROR_TIMEOUT, "All attempts to contact name servers or networks failed");
+
+        case DNS_TRANSACTION_INVALID_REPLY:
+                return sd_bus_reply_method_errorf(q->request, BUS_ERROR_INVALID_REPLY, "Received invalid reply");
+
+        case DNS_TRANSACTION_RESOURCES:
+                return sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_RESOURCES, "Not enough resources");
+
+        case DNS_TRANSACTION_ABORTED:
+                return sd_bus_reply_method_errorf(q->request, BUS_ERROR_ABORTED, "Query aborted");
+
+        case DNS_TRANSACTION_FAILURE: {
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+
+                if (q->answer_rcode == DNS_RCODE_NXDOMAIN)
+                        sd_bus_error_setf(&error, _BUS_ERROR_DNS "NXDOMAIN", "'%s' not found", name);
+                else {
+                        const char *rc, *n;
+                        char p[3]; /* the rcode is 4 bits long */
+
+                        rc = dns_rcode_to_string(q->answer_rcode);
+                        if (!rc) {
+                                sprintf(p, "%i", q->answer_rcode);
+                                rc = p;
+                        }
+
+                        n = strappenda(_BUS_ERROR_DNS, rc);
+                        sd_bus_error_setf(&error, n, "Could not resolve '%s', server or network returned error %s", name, rc);
+                }
+
+                return sd_bus_reply_method_error(q->request, &error);
+        }
+
+        case DNS_TRANSACTION_NULL:
+        case DNS_TRANSACTION_PENDING:
+        case DNS_TRANSACTION_SUCCESS:
+        default:
+                assert_not_reached("Impossible state");
+        }
+}
+
+static int append_address(sd_bus_message *reply, DnsResourceRecord *rr) {
+        int r;
+
+        assert(reply);
+        assert(rr);
+
+        r = sd_bus_message_open_container(reply, 'r', "iay");
+        if (r < 0)
+                return r;
+
+        if (rr->key->type == DNS_TYPE_A) {
+                r = sd_bus_message_append(reply, "i", AF_INET);
+                if (r < 0)
+                        return r;
+
+                r = sd_bus_message_append_array(reply, 'y', &rr->a.in_addr, sizeof(struct in_addr));
+
+        } else if (rr->key->type == DNS_TYPE_AAAA) {
+                r = sd_bus_message_append(reply, "i", AF_INET6);
+                if (r < 0)
+                        return r;
+
+                r = sd_bus_message_append_array(reply, 'y', &rr->aaaa.in6_addr, sizeof(struct in6_addr));
+        } else
+                return -EAFNOSUPPORT;
+
+        if (r < 0)
+                return r;
+
+        r = sd_bus_message_close_container(reply);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static void bus_method_resolve_hostname_complete(DnsQuery *q) {
+        _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *cname = NULL, *canonical = NULL;
+        _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
+        unsigned added = 0, i;
+        int r;
+
+        assert(q);
+
+        if (q->state != DNS_TRANSACTION_SUCCESS) {
+                r = reply_query_state(q);
+                goto finish;
+        }
+
+        r = sd_bus_message_new_method_return(q->request, &reply);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_append(reply, "i", q->answer_ifindex);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_open_container(reply, 'a', "(iay)");
+        if (r < 0)
+                goto finish;
+
+        if (q->answer) {
+                answer = dns_answer_ref(q->answer);
+
+                for (i = 0; i < answer->n_rrs; i++) {
+                        r = dns_question_matches_rr(q->question, answer->rrs[i]);
+                        if (r < 0)
+                                goto finish;
+                        if (r == 0) {
+                                /* Hmm, if this is not an address record,
+                                   maybe it's a cname? If so, remember this */
+                                r = dns_question_matches_cname(q->question, answer->rrs[i]);
+                                if (r < 0)
+                                        goto finish;
+                                if (r > 0)
+                                        cname = dns_resource_record_ref(answer->rrs[i]);
+
+                                continue;
+                        }
+
+                        r = append_address(reply, answer->rrs[i]);
+                        if (r < 0)
+                                goto finish;
+
+                        if (!canonical)
+                                canonical = dns_resource_record_ref(answer->rrs[i]);
+
+                        added ++;
+                }
+        }
+
+        if (added <= 0) {
+                if (!cname) {
+                        r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_SUCH_RR, "'%s' does not have any RR of requested type", q->request_hostname);
+                        goto finish;
+                }
+
+                /* This has a cname? Then update the query with the
+                 * new cname. */
+                r = dns_query_cname_redirect(q, cname->cname.name);
+                if (r < 0) {
+                        if (r == -ELOOP)
+                                r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_CNAME_LOOP, "CNAME loop on '%s'", q->request_hostname);
+                        else
+                                r = sd_bus_reply_method_errno(q->request, -r, NULL);
+
+                        goto finish;
+                }
+
+                /* Before we restart the query, let's see if any of
+                 * the RRs we already got already answers our query */
+                for (i = 0; i < answer->n_rrs; i++) {
+                        r = dns_question_matches_rr(q->question, answer->rrs[i]);
+                        if (r < 0)
+                                goto finish;
+                        if (r == 0)
+                                continue;
+
+                        r = append_address(reply, answer->rrs[i]);
+                        if (r < 0)
+                                goto finish;
+
+                        if (!canonical)
+                                canonical = dns_resource_record_ref(answer->rrs[i]);
+
+                        added++;
+                }
+
+                /* If we didn't find anything, then let's restart the
+                 * query, this time with the cname */
+                if (added <= 0) {
+                        r = dns_query_go(q);
+                        if (r == -ESRCH) {
+                                r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
+                                goto finish;
+                        }
+                        if (r < 0) {
+                                r = sd_bus_reply_method_errno(q->request, -r, NULL);
+                                goto finish;
+                        }
+
+                        return;
+                }
+        }
+
+        r = sd_bus_message_close_container(reply);
+        if (r < 0)
+                goto finish;
+
+        /* Return the precise spelling and uppercasing reported by the server */
+        assert(canonical);
+        r = sd_bus_message_append(reply, "st", DNS_RESOURCE_KEY_NAME(canonical->key), SD_RESOLVED_FLAGS_MAKE(q->answer_protocol, q->answer_family));
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_send(q->manager->bus, reply, NULL);
+
+finish:
+        if (r < 0) {
+                log_error("Failed to send hostname reply: %s", strerror(-r));
+                sd_bus_reply_method_errno(q->request, -r, NULL);
+        }
+
+        dns_query_free(q);
+}
+
+static int check_ifindex_flags(int ifindex, uint64_t *flags, sd_bus_error *error) {
+        assert(flags);
+
+        if (ifindex < 0)
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid interface index");
+
+        if (*flags & ~SD_RESOLVED_FLAGS_ALL)
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid flags parameter");
+
+        if (*flags == 0)
+                *flags = SD_RESOLVED_FLAGS_DEFAULT;
+
+        return 0;
+}
+
+static int bus_method_resolve_hostname(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
+        Manager *m = userdata;
+        const char *hostname;
+        int family, ifindex;
+        uint64_t flags;
+        DnsQuery *q;
+        int r;
+
+        assert(bus);
+        assert(message);
+        assert(m);
+
+        r = sd_bus_message_read(message, "isit", &ifindex, &hostname, &family, &flags);
+        if (r < 0)
+                return r;
+
+        if (!IN_SET(family, AF_INET, AF_INET6, AF_UNSPEC))
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown address family %i", family);
+
+        r = dns_name_normalize(hostname, NULL);
+        if (r < 0)
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid hostname '%s'", hostname);
+
+        r = check_ifindex_flags(ifindex, &flags, error);
+        if (r < 0)
+                return r;
+
+        question = dns_question_new(family == AF_UNSPEC ? 2 : 1);
+        if (!question)
+                return -ENOMEM;
+
+        if (family != AF_INET6) {
+                _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+
+                key = dns_resource_key_new(DNS_CLASS_IN, DNS_TYPE_A, hostname);
+                if (!key)
+                        return -ENOMEM;
+
+                r = dns_question_add(question, key);
+                if (r < 0)
+                        return r;
+        }
+
+        if (family != AF_INET) {
+                _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+
+                key = dns_resource_key_new(DNS_CLASS_IN, DNS_TYPE_AAAA, hostname);
+                if (!key)
+                        return -ENOMEM;
+
+                r = dns_question_add(question, key);
+                if (r < 0)
+                        return r;
+        }
+
+        r = dns_query_new(m, &q, question, ifindex, flags);
+        if (r < 0)
+                return r;
+
+        q->request = sd_bus_message_ref(message);
+        q->request_family = family;
+        q->request_hostname = hostname;
+        q->complete = bus_method_resolve_hostname_complete;
+
+        r = dns_query_bus_track(q, bus, message);
+        if (r < 0)
+                return r;
+
+        r = dns_query_go(q);
+        if (r < 0) {
+                dns_query_free(q);
+
+                if (r == -ESRCH)
+                        sd_bus_error_setf(error, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
+
+                return r;
+        }
+
+        return 1;
+}
+
+static void bus_method_resolve_address_complete(DnsQuery *q) {
+        _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
+        unsigned added = 0, i;
+        int r;
+
+        assert(q);
+
+        if (q->state != DNS_TRANSACTION_SUCCESS) {
+                r = reply_query_state(q);
+                goto finish;
+        }
+
+        r = sd_bus_message_new_method_return(q->request, &reply);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_append(reply, "i", q->answer_ifindex);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_open_container(reply, 'a', "s");
+        if (r < 0)
+                goto finish;
+
+        if (q->answer) {
+                answer = dns_answer_ref(q->answer);
+
+                for (i = 0; i < answer->n_rrs; i++) {
+                        r = dns_question_matches_rr(q->question, answer->rrs[i]);
+                        if (r < 0)
+                                goto finish;
+                        if (r == 0)
+                                continue;
+
+                        r = sd_bus_message_append(reply, "s", answer->rrs[i]->ptr.name);
+                        if (r < 0)
+                                goto finish;
+
+                        added ++;
+                }
+        }
+
+        if (added <= 0) {
+                _cleanup_free_ char *ip = NULL;
+
+                in_addr_to_string(q->request_family, &q->request_address, &ip);
+
+                r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_SUCH_RR, "Address '%s' does not have any RR of requested type", ip);
+                goto finish;
+        }
+
+        r = sd_bus_message_close_container(reply);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_append(reply, "t", SD_RESOLVED_FLAGS_MAKE(q->answer_protocol, q->answer_family));
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_send(q->manager->bus, reply, NULL);
+
+finish:
+        if (r < 0) {
+                log_error("Failed to send address reply: %s", strerror(-r));
+                sd_bus_reply_method_errno(q->request, -r, NULL);
+        }
+
+        dns_query_free(q);
+}
+
+static int bus_method_resolve_address(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+        _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
+        _cleanup_free_ char *reverse = NULL;
+        Manager *m = userdata;
+        int family, ifindex;
+        uint64_t flags;
+        const void *d;
+        DnsQuery *q;
+        size_t sz;
+        int r;
+
+        assert(bus);
+        assert(message);
+        assert(m);
+
+        r = sd_bus_message_read(message, "ii", &ifindex, &family);
+        if (r < 0)
+                return r;
+
+        if (!IN_SET(family, AF_INET, AF_INET6))
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown address family %i", family);
+
+        r = sd_bus_message_read_array(message, 'y', &d, &sz);
+        if (r < 0)
+                return r;
+
+        if (sz != FAMILY_ADDRESS_SIZE(family))
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid address size");
+
+        r = sd_bus_message_read(message, "t", &flags);
+        if (r < 0)
+                return r;
+
+        r = check_ifindex_flags(ifindex, &flags, error);
+        if (r < 0)
+                return r;
+
+        r = dns_name_reverse(family, d, &reverse);
+        if (r < 0)
+                return r;
+
+        question = dns_question_new(1);
+        if (!question)
+                return -ENOMEM;
+
+        key = dns_resource_key_new_consume(DNS_CLASS_IN, DNS_TYPE_PTR, reverse);
+        if (!key)
+                return -ENOMEM;
+
+        reverse = NULL;
+
+        r = dns_question_add(question, key);
+        if (r < 0)
+                return r;
+
+        r = dns_query_new(m, &q, question, ifindex, flags);
+        if (r < 0)
+                return r;
+
+        q->request = sd_bus_message_ref(message);
+        q->request_family = family;
+        memcpy(&q->request_address, d, sz);
+        q->complete = bus_method_resolve_address_complete;
+
+        r = dns_query_bus_track(q, bus, message);
+        if (r < 0)
+                return r;
+
+        r = dns_query_go(q);
+        if (r < 0) {
+                dns_query_free(q);
+
+                if (r == -ESRCH)
+                        sd_bus_error_setf(error, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
+
+                return r;
+        }
+
+        return 1;
+}
+
+static void bus_method_resolve_record_complete(DnsQuery *q) {
+        _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
+        unsigned added = 0, i;
+        int r;
+
+        assert(q);
+
+        if (q->state != DNS_TRANSACTION_SUCCESS) {
+                r = reply_query_state(q);
+                goto finish;
+        }
+
+        r = sd_bus_message_new_method_return(q->request, &reply);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_append(reply, "i", q->answer_ifindex);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_open_container(reply, 'a', "(qqay)");
+        if (r < 0)
+                goto finish;
+
+        if (q->answer) {
+                answer = dns_answer_ref(q->answer);
+
+                for (i = 0; i < answer->n_rrs; i++) {
+                        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+                        size_t start;
+
+                        r = dns_question_matches_rr(q->question, answer->rrs[i]);
+                        if (r < 0)
+                                goto finish;
+                        if (r == 0)
+                                continue;
+
+                        r = dns_packet_new(&p, DNS_PROTOCOL_DNS, 0);
+                        if (r < 0)
+                                goto finish;
+
+                        r = dns_packet_append_rr(p, answer->rrs[i], &start);
+                        if (r < 0)
+                                goto finish;
+
+                        r = sd_bus_message_open_container(reply, 'r', "qqay");
+                        if (r < 0)
+                                goto finish;
+
+                        r = sd_bus_message_append(reply, "qq", answer->rrs[i]->key->class, answer->rrs[i]->key->type);
+                        if (r < 0)
+                                goto finish;
+
+                        r = sd_bus_message_append_array(reply, 'y', DNS_PACKET_DATA(p) + start, p->size - start);
+                        if (r < 0)
+                                goto finish;
+
+                        r = sd_bus_message_close_container(reply);
+                        if (r < 0)
+                                goto finish;
+
+                        added ++;
+                }
+        }
+
+        if (added <= 0) {
+                r = sd_bus_reply_method_errorf(q->request, BUS_ERROR_NO_SUCH_RR, "Name '%s' does not have any RR of the requested type", q->request_hostname);
+                goto finish;
+        }
+
+        r = sd_bus_message_close_container(reply);
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_message_append(reply, "t", SD_RESOLVED_FLAGS_MAKE(q->answer_protocol, q->answer_family));
+        if (r < 0)
+                goto finish;
+
+        r = sd_bus_send(q->manager->bus, reply, NULL);
+
+finish:
+        if (r < 0) {
+                log_error("Failed to send record reply: %s", strerror(-r));
+                sd_bus_reply_method_errno(q->request, -r, NULL);
+        }
+
+        dns_query_free(q);
+}
+
+static int bus_method_resolve_record(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+        _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
+        Manager *m = userdata;
+        uint16_t class, type;
+        const char *name;
+        int r, ifindex;
+        uint64_t flags;
+        DnsQuery *q;
+
+        assert(bus);
+        assert(message);
+        assert(m);
+
+        r = sd_bus_message_read(message, "isqqt", &ifindex, &name, &class, &type, &flags);
+        if (r < 0)
+                return r;
+
+        r = dns_name_normalize(name, NULL);
+        if (r < 0)
+                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid name '%s'", name);
+
+        r = check_ifindex_flags(ifindex, &flags, error);
+        if (r < 0)
+                return r;
+
+        question = dns_question_new(1);
+        if (!question)
+                return -ENOMEM;
+
+        key = dns_resource_key_new(class, type, name);
+        if (!key)
+                return -ENOMEM;
+
+        r = dns_question_add(question, key);
+        if (r < 0)
+                return r;
+
+        r = dns_query_new(m, &q, question, ifindex, flags);
+        if (r < 0)
+                return r;
+
+        q->request = sd_bus_message_ref(message);
+        q->request_hostname = name;
+        q->complete = bus_method_resolve_record_complete;
+
+        r = dns_query_bus_track(q, bus, message);
+        if (r < 0)
+                return r;
+
+        r = dns_query_go(q);
+        if (r < 0) {
+                dns_query_free(q);
+
+                if (r == -ESRCH)
+                        sd_bus_error_setf(error, BUS_ERROR_NO_NAME_SERVERS, "No appropriate name servers or networks for name found");
+
+                return r;
+        }
+
+        return 1;
+}
+
+static const sd_bus_vtable resolve_vtable[] = {
+        SD_BUS_VTABLE_START(0),
+        SD_BUS_METHOD("ResolveHostname", "isit", "ia(iay)st", bus_method_resolve_hostname, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("ResolveAddress", "iiayt", "iast", bus_method_resolve_address, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("ResolveRecord", "isqqt", "ia(qqay)t", bus_method_resolve_record, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_VTABLE_END,
+};
+
+static int on_bus_retry(sd_event_source *s, usec_t usec, void *userdata) {
+        Manager *m = userdata;
+
+        assert(s);
+        assert(m);
+
+        m->bus_retry_event_source = sd_event_source_unref(m->bus_retry_event_source);
+
+        manager_connect_bus(m);
+        return 0;
+}
+
+static int match_prepare_for_sleep(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *ret_error) {
+        Manager *m = userdata;
+        int b, r;
+
+        assert(bus);
+        assert(bus);
+
+        r = sd_bus_message_read(message, "b", &b);
+        if (r < 0) {
+                log_debug("Failed to parse PrepareForSleep signal: %s", strerror(-r));
+                return 0;
+        }
+
+        if (b)
+                return 0;
+
+        log_debug("Coming back from suspend, verifying all RRs...");
+
+        manager_verify_all(m);
+        return 0;
+}
+
+int manager_connect_bus(Manager *m) {
+        int r;
+
+        assert(m);
+
+        if (m->bus)
+                return 0;
+
+        r = sd_bus_default_system(&m->bus);
+        if (r < 0) {
+                /* We failed to connect? Yuck, we must be in early
+                 * boot. Let's try in 5s again. As soon as we have
+                 * kdbus we can stop doing this... */
+
+                log_debug("Failed to connect to bus, trying again in 5s: %s", strerror(-r));
+
+                r = sd_event_add_time(m->event, &m->bus_retry_event_source, CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + 5*USEC_PER_SEC, 0, on_bus_retry, m);
+                if (r < 0) {
+                        log_error("Failed to install bus reconnect time event: %s", strerror(-r));
+                        return r;
+                }
+
+                return 0;
+        }
+
+        r = sd_bus_add_object_vtable(m->bus, NULL, "/org/freedesktop/resolve1", "org.freedesktop.resolve1.Manager", resolve_vtable, m);
+        if (r < 0) {
+                log_error("Failed to register object: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_bus_request_name(m->bus, "org.freedesktop.resolve1", 0);
+        if (r < 0) {
+                log_error("Failed to register name: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_bus_attach_event(m->bus, m->event, 0);
+        if (r < 0) {
+                log_error("Failed to attach bus to event loop: %s", strerror(-r));
+                return r;
+        }
+
+        r = sd_bus_add_match(m->bus, &m->prepare_for_sleep_slot,
+                             "type='signal',"
+                             "sender='org.freedesktop.login1',"
+                             "interface='org.freedesktop.login1.Manager',"
+                             "member='PrepareForSleep',"
+                             "path='/org/freedesktop/login1'",
+                             match_prepare_for_sleep,
+                             m);
+        if (r < 0)
+                log_error("Failed to add match for PrepareForSleep: %s", strerror(-r));
+
+        return 0;
+}
diff --git a/src/resolve/resolved-bus.h b/src/resolve/resolved-bus.h
new file mode 100644 (file)
index 0000000..1e72891
--- /dev/null
@@ -0,0 +1,26 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "resolved-manager.h"
+
+int manager_connect_bus(Manager *m);
diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c
new file mode 100644 (file)
index 0000000..63e87f8
--- /dev/null
@@ -0,0 +1,154 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+ ***/
+
+#include "conf-parser.h"
+
+#include "resolved-conf.h"
+
+int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string) {
+        const char *word, *state;
+        size_t length;
+        DnsServer *first;
+        int r;
+
+        assert(m);
+        assert(string);
+
+        first = type == DNS_SERVER_FALLBACK ? m->fallback_dns_servers : m->dns_servers;
+
+        FOREACH_WORD_QUOTED(word, length, string, state) {
+                char buffer[length+1];
+                int family;
+                union in_addr_union addr;
+                bool found = false;
+                DnsServer *s;
+
+                memcpy(buffer, word, length);
+                buffer[length] = 0;
+
+                r = in_addr_from_string_auto(buffer, &family, &addr);
+                if (r < 0) {
+                        log_warning("Ignoring invalid DNS address '%s'", buffer);
+                        continue;
+                }
+
+                /* Filter out duplicates */
+                LIST_FOREACH(servers, s, first)
+                        if (s->family == family && in_addr_equal(family, &s->address, &addr)) {
+                                found = true;
+                                break;
+                        }
+
+                if (found)
+                        continue;
+
+                r = dns_server_new(m, NULL, type, NULL, family, &addr);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+int config_parse_dnsv(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        Manager *m = userdata;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(m);
+
+        if (isempty(rvalue))
+                /* Empty assignment means clear the list */
+                manager_flush_dns_servers(m, ltype);
+        else {
+                /* Otherwise add to the list */
+                r = manager_parse_dns_server(m, ltype, rvalue);
+                if (r < 0) {
+                        log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to parse DNS server string '%s'. Ignoring.", rvalue);
+                        return 0;
+                }
+        }
+
+        /* If we have a manual setting, then we stop reading
+         * /etc/resolv.conf */
+        if (ltype == DNS_SERVER_SYSTEM)
+                m->read_resolv_conf = false;
+
+        return 0;
+}
+
+int config_parse_support(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        Manager *m = userdata;
+        Support support, *v = data;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(m);
+
+        support = support_from_string(rvalue);
+        if (support < 0) {
+                r = parse_boolean(rvalue);
+                if (r < 0) {
+                        log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to parse support level '%s'. Ignoring.", rvalue);
+                        return 0;
+                }
+
+                support = r ? SUPPORT_YES : SUPPORT_NO;
+        }
+
+        *v = support;
+        return 0;
+}
+
+int manager_parse_config_file(Manager *m) {
+        assert(m);
+
+        return config_parse(NULL, "/etc/systemd/resolved.conf", NULL,
+                            "Resolve\0",
+                            config_item_perf_lookup, resolved_gperf_lookup,
+                            false, false, true, m);
+}
diff --git a/src/resolve/resolved-conf.h b/src/resolve/resolved-conf.h
new file mode 100644 (file)
index 0000000..b3dbea7
--- /dev/null
@@ -0,0 +1,32 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#include "resolved-manager.h"
+
+int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string);
+int manager_parse_config_file(Manager *m);
+
+const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, unsigned length);
+
+int config_parse_dnsv(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_support(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/resolve/resolved-def.h b/src/resolve/resolved-def.h
new file mode 100644 (file)
index 0000000..086d111
--- /dev/null
@@ -0,0 +1,30 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#define SD_RESOLVED_DNS           ((uint64_t) 1)
+#define SD_RESOLVED_LLMNR_IPV4    ((uint64_t) 2)
+#define SD_RESOLVED_LLMNR_IPV6    ((uint64_t) 4)
+#define SD_RESOLVED_LLMNR         (SD_RESOLVED_LLMNR_IPV4|SD_RESOLVED_LLMNR_IPV6)
+
+#define SD_RESOLVED_FLAGS_ALL     (SD_RESOLVED_DNS|SD_RESOLVED_LLMNR_IPV4|SD_RESOLVED_LLMNR_IPV6)
+#define SD_RESOLVED_FLAGS_DEFAULT SD_RESOLVED_FLAGS_ALL
diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c
new file mode 100644 (file)
index 0000000..7c4ab18
--- /dev/null
@@ -0,0 +1,238 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "resolved-dns-answer.h"
+#include "resolved-dns-domain.h"
+
+DnsAnswer *dns_answer_new(unsigned n) {
+        DnsAnswer *a;
+
+        assert(n > 0);
+
+        a = malloc0(offsetof(DnsAnswer, rrs) + sizeof(DnsResourceRecord*) * n);
+        if (!a)
+                return NULL;
+
+        a->n_ref = 1;
+        a->n_allocated = n;
+
+        return a;
+}
+
+DnsAnswer *dns_answer_ref(DnsAnswer *a) {
+        if (!a)
+                return NULL;
+
+        assert(a->n_ref > 0);
+        a->n_ref++;
+        return a;
+}
+
+DnsAnswer *dns_answer_unref(DnsAnswer *a) {
+        if (!a)
+                return NULL;
+
+        assert(a->n_ref > 0);
+
+        if (a->n_ref == 1) {
+                unsigned i;
+
+                for (i = 0; i < a->n_rrs; i++)
+                        dns_resource_record_unref(a->rrs[i]);
+
+                free(a);
+        } else
+                a->n_ref--;
+
+        return NULL;
+}
+
+int dns_answer_add(DnsAnswer *a, DnsResourceRecord *rr) {
+        unsigned i;
+        int r;
+
+        assert(a);
+        assert(rr);
+
+        for (i = 0; i < a->n_rrs; i++) {
+                r = dns_resource_record_equal(a->rrs[i], rr);
+                if (r < 0)
+                        return r;
+                if (r > 0) {
+                        /* Entry already exists, keep the entry with
+                         * the higher RR, or the one with TTL 0 */
+
+                        if (rr->ttl == 0 || (rr->ttl > a->rrs[i]->ttl && a->rrs[i]->ttl != 0)) {
+                                dns_resource_record_ref(rr);
+                                dns_resource_record_unref(a->rrs[i]);
+                                a->rrs[i] = rr;
+                        }
+
+                        return 0;
+                }
+        }
+
+        if (a->n_rrs >= a->n_allocated)
+                return -ENOSPC;
+
+        a->rrs[a->n_rrs++] = dns_resource_record_ref(rr);
+        return 1;
+}
+
+int dns_answer_add_soa(DnsAnswer *a, const char *name, uint32_t ttl) {
+        _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *soa = NULL;
+
+        soa = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_SOA, name);
+        if (!soa)
+                return -ENOMEM;
+
+        soa->ttl = ttl;
+
+        soa->soa.mname = strdup(name);
+        if (!soa->soa.mname)
+                return -ENOMEM;
+
+        soa->soa.rname = strappend("root.", name);
+        if (!soa->soa.rname)
+                return -ENOMEM;
+
+        soa->soa.serial = 1;
+        soa->soa.refresh = 1;
+        soa->soa.retry = 1;
+        soa->soa.expire = 1;
+        soa->soa.minimum = ttl;
+
+        return dns_answer_add(a, soa);
+}
+
+int dns_answer_contains(DnsAnswer *a, DnsResourceKey *key) {
+        unsigned i;
+        int r;
+
+        assert(a);
+        assert(key);
+
+        for (i = 0; i < a->n_rrs; i++) {
+                r = dns_resource_key_match_rr(key, a->rrs[i]);
+                if (r < 0)
+                        return r;
+                if (r > 0)
+                        return 1;
+        }
+
+        return 0;
+}
+
+int dns_answer_find_soa(DnsAnswer *a, DnsResourceKey *key, DnsResourceRecord **ret) {
+        unsigned i;
+
+        assert(a);
+        assert(key);
+        assert(ret);
+
+        /* For a SOA record we can never find a matching SOA record */
+        if (key->type == DNS_TYPE_SOA)
+                return 0;
+
+        for (i = 0; i < a->n_rrs; i++) {
+
+                if (a->rrs[i]->key->class != DNS_CLASS_IN)
+                        continue;
+
+                if (a->rrs[i]->key->type != DNS_TYPE_SOA)
+                        continue;
+
+                if (dns_name_endswith(DNS_RESOURCE_KEY_NAME(key), DNS_RESOURCE_KEY_NAME(a->rrs[i]->key))) {
+                        *ret = a->rrs[i];
+                        return 1;
+                }
+        }
+
+        return 0;
+}
+
+DnsAnswer *dns_answer_merge(DnsAnswer *a, DnsAnswer *b) {
+        _cleanup_(dns_answer_unrefp) DnsAnswer *ret = NULL;
+        DnsAnswer *k;
+        unsigned i;
+        int r;
+
+        if (a && (!b || b->n_rrs <= 0))
+                return dns_answer_ref(a);
+        if ((!a || a->n_rrs <= 0) && b)
+                return dns_answer_ref(b);
+
+        ret = dns_answer_new((a ? a->n_rrs : 0) + (b ? b->n_rrs : 0));
+        if (!ret)
+                return NULL;
+
+        if (a) {
+                for (i = 0; i < a->n_rrs; i++) {
+                        r = dns_answer_add(ret, a->rrs[i]);
+                        if (r < 0)
+                                return NULL;
+                }
+        }
+
+        if (b) {
+                for (i = 0; i < b->n_rrs; i++) {
+                        r = dns_answer_add(ret, b->rrs[i]);
+                        if (r < 0)
+                                return NULL;
+                }
+        }
+
+        k = ret;
+        ret = NULL;
+
+        return k;
+}
+
+void dns_answer_order_by_scope(DnsAnswer *a, bool prefer_link_local) {
+        DnsResourceRecord **rrs;
+        unsigned i, start, end;
+        assert(a);
+
+        if (a->n_rrs <= 1)
+                return;
+
+        start = 0;
+        end = a->n_rrs-1;
+
+        /* RFC 4795, Section 2.6 suggests we should order entries
+         * depending on whether the sender is a link-local address. */
+
+        rrs = newa(DnsResourceRecord*, a->n_rrs);
+        for (i = 0; i < a->n_rrs; i++) {
+
+                if (a->rrs[i]->key->class == DNS_CLASS_IN &&
+                    ((a->rrs[i]->key->type == DNS_TYPE_A && in_addr_is_link_local(AF_INET, (union in_addr_union*) &a->rrs[i]->a.in_addr) != prefer_link_local) ||
+                     (a->rrs[i]->key->type == DNS_TYPE_AAAA && in_addr_is_link_local(AF_INET6, (union in_addr_union*) &a->rrs[i]->aaaa.in6_addr) != prefer_link_local)))
+                        /* Order address records that are are not preferred to the end of the array */
+                        rrs[end--] = a->rrs[i];
+                else
+                        /* Order all other records to the beginning of the array */
+                        rrs[start++] = a->rrs[i];
+        }
+
+        assert(start == end+1);
+        memcpy(a->rrs, rrs, sizeof(DnsResourceRecord*) * a->n_rrs);
+}
diff --git a/src/resolve/resolved-dns-answer.h b/src/resolve/resolved-dns-answer.h
new file mode 100644 (file)
index 0000000..af3e462
--- /dev/null
@@ -0,0 +1,48 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+typedef struct DnsAnswer DnsAnswer;
+
+#include "resolved-dns-rr.h"
+
+/* A simple array of resource records */
+
+struct DnsAnswer {
+        unsigned n_ref;
+        unsigned n_rrs, n_allocated;
+        DnsResourceRecord* rrs[0];
+};
+
+DnsAnswer *dns_answer_new(unsigned n);
+DnsAnswer *dns_answer_ref(DnsAnswer *a);
+DnsAnswer *dns_answer_unref(DnsAnswer *a);
+
+int dns_answer_add(DnsAnswer *a, DnsResourceRecord *rr);
+int dns_answer_add_soa(DnsAnswer *a, const char *name, uint32_t ttl);
+int dns_answer_contains(DnsAnswer *a, DnsResourceKey *key);
+int dns_answer_find_soa(DnsAnswer *a, DnsResourceKey *key, DnsResourceRecord **ret);
+
+DnsAnswer *dns_answer_merge(DnsAnswer *a, DnsAnswer *b);
+void dns_answer_order_by_scope(DnsAnswer *a, bool prefer_link_local);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsAnswer*, dns_answer_unref);
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c
new file mode 100644 (file)
index 0000000..33ca4d1
--- /dev/null
@@ -0,0 +1,564 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "resolved-dns-cache.h"
+#include "resolved-dns-packet.h"
+
+/* Never cache more than 1K entries */
+#define CACHE_MAX 1024
+
+/* We never keep any item longer than 10min in our cache */
+#define CACHE_TTL_MAX_USEC (10 * USEC_PER_MINUTE)
+
+typedef enum DnsCacheItemType DnsCacheItemType;
+typedef struct DnsCacheItem DnsCacheItem;
+
+enum DnsCacheItemType {
+        DNS_CACHE_POSITIVE,
+        DNS_CACHE_NODATA,
+        DNS_CACHE_NXDOMAIN,
+};
+
+struct DnsCacheItem {
+        DnsResourceKey *key;
+        DnsResourceRecord *rr;
+        usec_t until;
+        DnsCacheItemType type;
+        unsigned prioq_idx;
+        int owner_family;
+        union in_addr_union owner_address;
+        LIST_FIELDS(DnsCacheItem, by_key);
+};
+
+static void dns_cache_item_free(DnsCacheItem *i) {
+        if (!i)
+                return;
+
+        dns_resource_record_unref(i->rr);
+        dns_resource_key_unref(i->key);
+        free(i);
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsCacheItem*, dns_cache_item_free);
+
+static void dns_cache_item_remove_and_free(DnsCache *c, DnsCacheItem *i) {
+        DnsCacheItem *first;
+
+        assert(c);
+
+        if (!i)
+                return;
+
+        first = hashmap_get(c->by_key, i->key);
+        LIST_REMOVE(by_key, first, i);
+
+        if (first)
+                assert_se(hashmap_replace(c->by_key, first->key, first) >= 0);
+        else
+                hashmap_remove(c->by_key, i->key);
+
+        prioq_remove(c->by_expiry, i, &i->prioq_idx);
+
+        dns_cache_item_free(i);
+}
+
+void dns_cache_flush(DnsCache *c) {
+        DnsCacheItem *i;
+
+        assert(c);
+
+        while ((i = hashmap_first(c->by_key)))
+                dns_cache_item_remove_and_free(c, i);
+
+        assert(hashmap_size(c->by_key) == 0);
+        assert(prioq_size(c->by_expiry) == 0);
+
+        hashmap_free(c->by_key);
+        c->by_key = NULL;
+
+        prioq_free(c->by_expiry);
+        c->by_expiry = NULL;
+}
+
+static void dns_cache_remove(DnsCache *c, DnsResourceKey *key) {
+        DnsCacheItem *i;
+
+        assert(c);
+        assert(key);
+
+        while ((i = hashmap_get(c->by_key, key)))
+                dns_cache_item_remove_and_free(c, i);
+}
+
+static void dns_cache_make_space(DnsCache *c, unsigned add) {
+        assert(c);
+
+        if (add <= 0)
+                return;
+
+        /* Makes space for n new entries. Note that we actually allow
+         * the cache to grow beyond CACHE_MAX, but only when we shall
+         * add more RRs to the cache than CACHE_MAX at once. In that
+         * case the cache will be emptied completely otherwise. */
+
+        for (;;) {
+                _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+                DnsCacheItem *i;
+
+                if (prioq_size(c->by_expiry) <= 0)
+                        break;
+
+                if (prioq_size(c->by_expiry) + add < CACHE_MAX)
+                        break;
+
+                i = prioq_peek(c->by_expiry);
+                assert(i);
+
+                /* Take an extra reference to the key so that it
+                 * doesn't go away in the middle of the remove call */
+                key = dns_resource_key_ref(i->key);
+                dns_cache_remove(c, key);
+        }
+}
+
+void dns_cache_prune(DnsCache *c) {
+        usec_t t = 0;
+
+        assert(c);
+
+        /* Remove all entries that are past their TTL */
+
+        for (;;) {
+                _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+                DnsCacheItem *i;
+
+                i = prioq_peek(c->by_expiry);
+                if (!i)
+                        break;
+
+                if (t <= 0)
+                        t = now(CLOCK_BOOTTIME);
+
+                if (i->until > t)
+                        break;
+
+                /* Take an extra reference to the key so that it
+                 * doesn't go away in the middle of the remove call */
+                key = dns_resource_key_ref(i->key);
+                dns_cache_remove(c, key);
+        }
+}
+
+static int dns_cache_item_prioq_compare_func(const void *a, const void *b) {
+        const DnsCacheItem *x = a, *y = b;
+
+        if (x->until < y->until)
+                return -1;
+        if (x->until > y->until)
+                return 1;
+        return 0;
+}
+
+static int dns_cache_init(DnsCache *c) {
+        int r;
+
+        assert(c);
+
+        r = prioq_ensure_allocated(&c->by_expiry, dns_cache_item_prioq_compare_func);
+        if (r < 0)
+                return r;
+
+        r = hashmap_ensure_allocated(&c->by_key, &dns_resource_key_hash_ops);
+        if (r < 0)
+                return r;
+
+        return r;
+}
+
+static int dns_cache_link_item(DnsCache *c, DnsCacheItem *i) {
+        DnsCacheItem *first;
+        int r;
+
+        assert(c);
+        assert(i);
+
+        r = prioq_put(c->by_expiry, i, &i->prioq_idx);
+        if (r < 0)
+                return r;
+
+        first = hashmap_get(c->by_key, i->key);
+        if (first) {
+                LIST_PREPEND(by_key, first, i);
+                assert_se(hashmap_replace(c->by_key, first->key, first) >= 0);
+        } else {
+                r = hashmap_put(c->by_key, i->key, i);
+                if (r < 0) {
+                        prioq_remove(c->by_expiry, i, &i->prioq_idx);
+                        return r;
+                }
+        }
+
+        return 0;
+}
+
+static DnsCacheItem* dns_cache_get(DnsCache *c, DnsResourceRecord *rr) {
+        DnsCacheItem *i;
+
+        assert(c);
+        assert(rr);
+
+        LIST_FOREACH(by_key, i, hashmap_get(c->by_key, rr->key))
+                if (i->rr && dns_resource_record_equal(i->rr, rr) > 0)
+                        return i;
+
+        return NULL;
+}
+
+static void dns_cache_item_update_positive(DnsCache *c, DnsCacheItem *i, DnsResourceRecord *rr, usec_t timestamp) {
+        assert(c);
+        assert(i);
+        assert(rr);
+
+        i->type = DNS_CACHE_POSITIVE;
+
+        if (!i->by_key_prev) {
+                /* We are the first item in the list, we need to
+                 * update the key used in the hashmap */
+
+                assert_se(hashmap_replace(c->by_key, rr->key, i) >= 0);
+        }
+
+        dns_resource_record_ref(rr);
+        dns_resource_record_unref(i->rr);
+        i->rr = rr;
+
+        dns_resource_key_unref(i->key);
+        i->key = dns_resource_key_ref(rr->key);
+
+        i->until = timestamp + MIN(rr->ttl * USEC_PER_SEC, CACHE_TTL_MAX_USEC);
+
+        prioq_reshuffle(c->by_expiry, i, &i->prioq_idx);
+}
+
+static int dns_cache_put_positive(
+                DnsCache *c,
+                DnsResourceRecord *rr,
+                usec_t timestamp,
+                int owner_family,
+                const union in_addr_union *owner_address) {
+
+        _cleanup_(dns_cache_item_freep) DnsCacheItem *i = NULL;
+        DnsCacheItem *existing;
+        int r;
+
+        assert(c);
+        assert(rr);
+        assert(owner_address);
+
+        /* New TTL is 0? Delete the entry... */
+        if (rr->ttl <= 0) {
+                dns_cache_remove(c, rr->key);
+                return 0;
+        }
+
+        if (rr->key->class == DNS_CLASS_ANY)
+                return 0;
+        if (rr->key->type == DNS_TYPE_ANY)
+                return 0;
+
+        /* Entry exists already? Update TTL and timestamp */
+        existing = dns_cache_get(c, rr);
+        if (existing) {
+                dns_cache_item_update_positive(c, existing, rr, timestamp);
+                return 0;
+        }
+
+        /* Otherwise, add the new RR */
+        r = dns_cache_init(c);
+        if (r < 0)
+                return r;
+
+        dns_cache_make_space(c, 1);
+
+        i = new0(DnsCacheItem, 1);
+        if (!i)
+                return -ENOMEM;
+
+        i->type = DNS_CACHE_POSITIVE;
+        i->key = dns_resource_key_ref(rr->key);
+        i->rr = dns_resource_record_ref(rr);
+        i->until = timestamp + MIN(i->rr->ttl * USEC_PER_SEC, CACHE_TTL_MAX_USEC);
+        i->prioq_idx = PRIOQ_IDX_NULL;
+        i->owner_family = owner_family;
+        i->owner_address = *owner_address;
+
+        r = dns_cache_link_item(c, i);
+        if (r < 0)
+                return r;
+
+        i = NULL;
+        return 0;
+}
+
+static int dns_cache_put_negative(
+                DnsCache *c,
+                DnsResourceKey *key,
+                int rcode,
+                usec_t timestamp,
+                uint32_t soa_ttl,
+                int owner_family,
+                const union in_addr_union *owner_address) {
+
+        _cleanup_(dns_cache_item_freep) DnsCacheItem *i = NULL;
+        int r;
+
+        assert(c);
+        assert(key);
+        assert(owner_address);
+
+        dns_cache_remove(c, key);
+
+        if (key->class == DNS_CLASS_ANY)
+                return 0;
+        if (key->type == DNS_TYPE_ANY)
+                return 0;
+        if (soa_ttl <= 0)
+                return 0;
+
+        if (!IN_SET(rcode, DNS_RCODE_SUCCESS, DNS_RCODE_NXDOMAIN))
+                return 0;
+
+        r = dns_cache_init(c);
+        if (r < 0)
+                return r;
+
+        dns_cache_make_space(c, 1);
+
+        i = new0(DnsCacheItem, 1);
+        if (!i)
+                return -ENOMEM;
+
+        i->type = rcode == DNS_RCODE_SUCCESS ? DNS_CACHE_NODATA : DNS_CACHE_NXDOMAIN;
+        i->key = dns_resource_key_ref(key);
+        i->until = timestamp + MIN(soa_ttl * USEC_PER_SEC, CACHE_TTL_MAX_USEC);
+        i->prioq_idx = PRIOQ_IDX_NULL;
+        i->owner_family = owner_family;
+        i->owner_address = *owner_address;
+
+        r = dns_cache_link_item(c, i);
+        if (r < 0)
+                return r;
+
+        i = NULL;
+        return 0;
+}
+
+int dns_cache_put(
+                DnsCache *c,
+                DnsQuestion *q,
+                int rcode,
+                DnsAnswer *answer,
+                unsigned max_rrs,
+                usec_t timestamp,
+                int owner_family,
+                const union in_addr_union *owner_address) {
+
+        unsigned i;
+        int r;
+
+        assert(c);
+        assert(q);
+
+        /* First, delete all matching old RRs, so that we only keep
+         * complete by_key in place. */
+        for (i = 0; i < q->n_keys; i++)
+                dns_cache_remove(c, q->keys[i]);
+
+        if (!answer)
+                return 0;
+
+        for (i = 0; i < answer->n_rrs; i++)
+                dns_cache_remove(c, answer->rrs[i]->key);
+
+        /* We only care for positive replies and NXDOMAINs, on all
+         * other replies we will simply flush the respective entries,
+         * and that's it */
+
+        if (!IN_SET(rcode, DNS_RCODE_SUCCESS, DNS_RCODE_NXDOMAIN))
+                return 0;
+
+        /* Make some space for our new entries */
+        dns_cache_make_space(c, answer->n_rrs + q->n_keys);
+
+        if (timestamp <= 0)
+                timestamp = now(CLOCK_BOOTTIME);
+
+        /* Second, add in positive entries for all contained RRs */
+        for (i = 0; i < MIN(max_rrs, answer->n_rrs); i++) {
+                r = dns_cache_put_positive(c, answer->rrs[i], timestamp, owner_family, owner_address);
+                if (r < 0)
+                        goto fail;
+        }
+
+        /* Third, add in negative entries for all keys with no RR */
+        for (i = 0; i < q->n_keys; i++) {
+                DnsResourceRecord *soa = NULL;
+
+                r = dns_answer_contains(answer, q->keys[i]);
+                if (r < 0)
+                        goto fail;
+                if (r > 0)
+                        continue;
+
+                r = dns_answer_find_soa(answer, q->keys[i], &soa);
+                if (r < 0)
+                        goto fail;
+                if (r == 0)
+                        continue;
+
+                r = dns_cache_put_negative(c, q->keys[i], rcode, timestamp, MIN(soa->soa.minimum, soa->ttl), owner_family, owner_address);
+                if (r < 0)
+                        goto fail;
+        }
+
+        return 0;
+
+fail:
+        /* Adding all RRs failed. Let's clean up what we already
+         * added, just in case */
+
+        for (i = 0; i < q->n_keys; i++)
+                dns_cache_remove(c, q->keys[i]);
+        for (i = 0; i < answer->n_rrs; i++)
+                dns_cache_remove(c, answer->rrs[i]->key);
+
+        return r;
+}
+
+int dns_cache_lookup(DnsCache *c, DnsQuestion *q, int *rcode, DnsAnswer **ret) {
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
+        unsigned i, n = 0;
+        int r;
+        bool nxdomain = false;
+
+        assert(c);
+        assert(q);
+        assert(rcode);
+        assert(ret);
+
+        if (q->n_keys <= 0) {
+                *ret = NULL;
+                *rcode = 0;
+                return 0;
+        }
+
+        for (i = 0; i < q->n_keys; i++) {
+                DnsCacheItem *j;
+
+                if (q->keys[i]->type == DNS_TYPE_ANY ||
+                    q->keys[i]->class == DNS_CLASS_ANY) {
+                        /* If we have ANY lookups we simply refresh */
+                        *ret = NULL;
+                        *rcode = 0;
+                        return 0;
+                }
+
+                j = hashmap_get(c->by_key, q->keys[i]);
+                if (!j) {
+                        /* If one question cannot be answered we need to refresh */
+                        *ret = NULL;
+                        *rcode = 0;
+                        return 0;
+                }
+
+                LIST_FOREACH(by_key, j, j) {
+                        if (j->rr)
+                                n++;
+                        else if (j->type == DNS_CACHE_NXDOMAIN)
+                                nxdomain = true;
+                }
+        }
+
+        if (n <= 0) {
+                *ret = NULL;
+                *rcode = nxdomain ? DNS_RCODE_NXDOMAIN : DNS_RCODE_SUCCESS;
+                return 1;
+        }
+
+        answer = dns_answer_new(n);
+        if (!answer)
+                return -ENOMEM;
+
+        for (i = 0; i < q->n_keys; i++) {
+                DnsCacheItem *j;
+
+                j = hashmap_get(c->by_key, q->keys[i]);
+                LIST_FOREACH(by_key, j, j) {
+                        if (j->rr) {
+                                r = dns_answer_add(answer, j->rr);
+                                if (r < 0)
+                                        return r;
+                        }
+                }
+        }
+
+        *ret = answer;
+        *rcode = DNS_RCODE_SUCCESS;
+        answer = NULL;
+
+        return n;
+}
+
+int dns_cache_check_conflicts(DnsCache *cache, DnsResourceRecord *rr, int owner_family, const union in_addr_union *owner_address) {
+        DnsCacheItem *i, *first;
+        bool same_owner = true;
+
+        assert(cache);
+        assert(rr);
+
+        dns_cache_prune(cache);
+
+        /* See if there's a cache entry for the same key. If there
+         * isn't there's no conflict */
+        first = hashmap_get(cache->by_key, rr->key);
+        if (!first)
+                return 0;
+
+        /* See if the RR key is owned by the same owner, if so, there
+         * isn't a conflict either */
+        LIST_FOREACH(by_key, i, first) {
+                if (i->owner_family != owner_family ||
+                    !in_addr_equal(owner_family, &i->owner_address, owner_address)) {
+                        same_owner = false;
+                        break;
+                }
+        }
+        if (same_owner)
+                return 0;
+
+        /* See if there's the exact same RR in the cache. If yes, then
+         * there's no conflict. */
+        if (dns_cache_get(cache, rr))
+                return 0;
+
+        /* There's a conflict */
+        return 1;
+}
diff --git a/src/resolve/resolved-dns-cache.h b/src/resolve/resolved-dns-cache.h
new file mode 100644 (file)
index 0000000..e92280c
--- /dev/null
@@ -0,0 +1,46 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <sys/types.h>
+
+#include "hashmap.h"
+#include "prioq.h"
+#include "time-util.h"
+#include "list.h"
+
+typedef struct DnsCache {
+        Hashmap *by_key;
+        Prioq *by_expiry;
+} DnsCache;
+
+#include "resolved-dns-rr.h"
+#include "resolved-dns-question.h"
+#include "resolved-dns-answer.h"
+
+void dns_cache_flush(DnsCache *c);
+void dns_cache_prune(DnsCache *c);
+
+int dns_cache_put(DnsCache *c, DnsQuestion *q, int rcode, DnsAnswer *answer, unsigned max_rrs, usec_t timestamp, int owner_family, const union in_addr_union *owner_address);
+int dns_cache_lookup(DnsCache *c, DnsQuestion *q, int *rcode, DnsAnswer **answer);
+
+int dns_cache_check_conflicts(DnsCache *cache, DnsResourceRecord *rr, int owner_family, const union in_addr_union *owner_address);
diff --git a/src/resolve/resolved-dns-domain.c b/src/resolve/resolved-dns-domain.c
new file mode 100644 (file)
index 0000000..e1eb3dd
--- /dev/null
@@ -0,0 +1,613 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+ ***/
+
+#ifdef HAVE_LIBIDN
+#include <idna.h>
+#include <stringprep.h>
+#endif
+
+#include "resolved-dns-domain.h"
+
+int dns_label_unescape(const char **name, char *dest, size_t sz) {
+        const char *n;
+        char *d;
+        int r = 0;
+
+        assert(name);
+        assert(*name);
+        assert(dest);
+
+        n = *name;
+        d = dest;
+
+        for (;;) {
+                if (*n == '.') {
+                        n++;
+                        break;
+                }
+
+                if (*n == 0)
+                        break;
+
+                if (sz <= 0)
+                        return -ENOSPC;
+
+                if (r >= DNS_LABEL_MAX)
+                        return -EINVAL;
+
+                if (*n == '\\') {
+                        /* Escaped character */
+
+                        n++;
+
+                        if (*n == 0)
+                                /* Ending NUL */
+                                return -EINVAL;
+
+                        else if (*n == '\\' || *n == '.') {
+                                /* Escaped backslash or dot */
+                                *(d++) = *(n++);
+                                sz--;
+                                r++;
+
+                        } else if (n[0] >= '0' && n[0] <= '9') {
+                                unsigned k;
+
+                                /* Escaped literal ASCII character */
+
+                                if (!(n[1] >= '0' && n[1] <= '9') ||
+                                    !(n[2] >= '0' && n[2] <= '9'))
+                                        return -EINVAL;
+
+                                k = ((unsigned) (n[0] - '0') * 100) +
+                                        ((unsigned) (n[1] - '0') * 10) +
+                                        ((unsigned) (n[2] - '0'));
+
+                                /* Don't allow CC characters or anything that doesn't fit in 8bit */
+                                if (k < ' ' || k > 255 || k == 127)
+                                        return -EINVAL;
+
+                                *(d++) = (char) k;
+                                sz--;
+                                r++;
+
+                                n += 3;
+                        } else
+                                return -EINVAL;
+
+                } else if ((uint8_t) *n >= (uint8_t) ' ' && *n != 127) {
+
+                        /* Normal character */
+                        *(d++) = *(n++);
+                        sz--;
+                        r++;
+                } else
+                        return -EINVAL;
+        }
+
+        /* Empty label that is not at the end? */
+        if (r == 0 && *n)
+                return -EINVAL;
+
+        if (sz >= 1)
+                *d = 0;
+
+        *name = n;
+        return r;
+}
+
+int dns_label_escape(const char *p, size_t l, char **ret) {
+        _cleanup_free_ char *s = NULL;
+        char *q;
+        int r;
+
+        assert(p);
+        assert(ret);
+
+        if (l > DNS_LABEL_MAX)
+                return -EINVAL;
+
+        s = malloc(l * 4 + 1);
+        if (!s)
+                return -ENOMEM;
+
+        q = s;
+        while (l > 0) {
+
+                if (*p == '.' || *p == '\\') {
+
+                        /* Dot or backslash */
+                        *(q++) = '\\';
+                        *(q++) = *p;
+
+                } else if (*p == '_' ||
+                           *p == '-' ||
+                           (*p >= '0' && *p <= '9') ||
+                           (*p >= 'a' && *p <= 'z') ||
+                           (*p >= 'A' && *p <= 'Z')) {
+
+                        /* Proper character */
+                        *(q++) = *p;
+                } else if ((uint8_t) *p >= (uint8_t) ' ' && *p != 127) {
+
+                        /* Everything else */
+                        *(q++) = '\\';
+                        *(q++) = '0' + (char) ((uint8_t) *p / 100);
+                        *(q++) = '0' + (char) (((uint8_t) *p / 10) % 10);
+                        *(q++) = '0' + (char) ((uint8_t) *p % 10);
+
+                } else
+                        return -EINVAL;
+
+                p++;
+                l--;
+        }
+
+        *q = 0;
+        *ret = s;
+        r = q - s;
+        s = NULL;
+
+        return r;
+}
+
+int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max) {
+#ifdef HAVE_LIBIDN
+        _cleanup_free_ uint32_t *input = NULL;
+        size_t input_size;
+        const char *p;
+        bool contains_8bit = false;
+
+        assert(encoded);
+        assert(decoded);
+        assert(decoded_max >= DNS_LABEL_MAX);
+
+        if (encoded_size <= 0)
+                return 0;
+
+        for (p = encoded; p < encoded + encoded_size; p++)
+                if ((uint8_t) *p > 127)
+                        contains_8bit = true;
+
+        if (!contains_8bit)
+                return 0;
+
+        input = stringprep_utf8_to_ucs4(encoded, encoded_size, &input_size);
+        if (!input)
+                return -ENOMEM;
+
+        if (idna_to_ascii_4i(input, input_size, decoded, 0) != 0)
+                return -EINVAL;
+
+        return strlen(decoded);
+#else
+        return 0;
+#endif
+}
+
+int dns_label_undo_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max) {
+#ifdef HAVE_LIBIDN
+        size_t input_size, output_size;
+        _cleanup_free_ uint32_t *input = NULL;
+        _cleanup_free_ char *result = NULL;
+        uint32_t *output = NULL;
+        size_t w;
+
+        /* To be invoked after unescaping */
+
+        assert(encoded);
+        assert(decoded);
+
+        if (encoded_size < sizeof(IDNA_ACE_PREFIX)-1)
+                return 0;
+
+        if (memcmp(encoded, IDNA_ACE_PREFIX, sizeof(IDNA_ACE_PREFIX) -1) != 0)
+                return 0;
+
+        input = stringprep_utf8_to_ucs4(encoded, encoded_size, &input_size);
+        if (!input)
+                return -ENOMEM;
+
+        output_size = input_size;
+        output = newa(uint32_t, output_size);
+
+        idna_to_unicode_44i(input, input_size, output, &output_size, 0);
+
+        result = stringprep_ucs4_to_utf8(output, output_size, NULL, &w);
+        if (!result)
+                return -ENOMEM;
+        if (w <= 0)
+                return 0;
+        if (w+1 > decoded_max)
+                return -EINVAL;
+
+        memcpy(decoded, result, w+1);
+        return w;
+#else
+        return 0;
+#endif
+}
+
+int dns_name_normalize(const char *s, char **_ret) {
+        _cleanup_free_ char *ret = NULL;
+        size_t n = 0, allocated = 0;
+        const char *p = s;
+        bool first = true;
+        int r;
+
+        assert(s);
+
+        for (;;) {
+                _cleanup_free_ char *t = NULL;
+                char label[DNS_LABEL_MAX];
+                int k;
+
+                r = dns_label_unescape(&p, label, sizeof(label));
+                if (r < 0)
+                        return r;
+                if (r == 0) {
+                        if (*p != 0)
+                                return -EINVAL;
+                        break;
+                }
+
+                k = dns_label_undo_idna(label, r, label, sizeof(label));
+                if (k < 0)
+                        return k;
+                if (k > 0)
+                        r = k;
+
+                r = dns_label_escape(label, r, &t);
+                if (r < 0)
+                        return r;
+
+                if (!GREEDY_REALLOC(ret, allocated, n + !first + strlen(t) + 1))
+                        return -ENOMEM;
+
+                if (!first)
+                        ret[n++] = '.';
+                else
+                        first = false;
+
+                memcpy(ret + n, t, r);
+                n += r;
+        }
+
+        if (n > DNS_NAME_MAX)
+                return -EINVAL;
+
+        if (!GREEDY_REALLOC(ret, allocated, n + 1))
+                return -ENOMEM;
+
+        ret[n] = 0;
+
+        if (_ret) {
+                *_ret = ret;
+                ret = NULL;
+        }
+
+        return 0;
+}
+
+unsigned long dns_name_hash_func(const void *s, const uint8_t hash_key[HASH_KEY_SIZE]) {
+        const char *p = s;
+        unsigned long ul = hash_key[0];
+        int r;
+
+        assert(p);
+
+        while (*p) {
+                char label[DNS_LABEL_MAX+1];
+                int k;
+
+                r = dns_label_unescape(&p, label, sizeof(label));
+                if (r < 0)
+                        break;
+
+                k = dns_label_undo_idna(label, r, label, sizeof(label));
+                if (k < 0)
+                        break;
+                if (k > 0)
+                        r = k;
+
+                label[r] = 0;
+                ascii_strlower(label);
+
+                ul = ul * hash_key[1] + ul + string_hash_func(label, hash_key);
+        }
+
+        return ul;
+}
+
+int dns_name_compare_func(const void *a, const void *b) {
+        const char *x = a, *y = b;
+        int r, q, k, w;
+
+        assert(a);
+        assert(b);
+
+        for (;;) {
+                char la[DNS_LABEL_MAX+1], lb[DNS_LABEL_MAX+1];
+
+                if (*x == 0 && *y == 0)
+                        return 0;
+
+                r = dns_label_unescape(&x, la, sizeof(la));
+                q = dns_label_unescape(&y, lb, sizeof(lb));
+                if (r < 0 || q < 0)
+                        return r - q;
+
+                k = dns_label_undo_idna(la, r, la, sizeof(la));
+                w = dns_label_undo_idna(lb, q, lb, sizeof(lb));
+                if (k < 0 || w < 0)
+                        return k - w;
+                if (k > 0)
+                        r = k;
+                if (w > 0)
+                        r = w;
+
+                la[r] = lb[q] = 0;
+                r = strcasecmp(la, lb);
+                if (r != 0)
+                        return r;
+        }
+}
+
+const struct hash_ops dns_name_hash_ops = {
+        .hash = dns_name_hash_func,
+        .compare = dns_name_compare_func
+};
+
+int dns_name_equal(const char *x, const char *y) {
+        int r, q, k, w;
+
+        assert(x);
+        assert(y);
+
+        for (;;) {
+                char la[DNS_LABEL_MAX+1], lb[DNS_LABEL_MAX+1];
+
+                if (*x == 0 && *y == 0)
+                        return true;
+
+                r = dns_label_unescape(&x, la, sizeof(la));
+                if (r < 0)
+                        return r;
+
+                k = dns_label_undo_idna(la, r, la, sizeof(la));
+                if (k < 0)
+                        return k;
+                if (k > 0)
+                        r = k;
+
+                q = dns_label_unescape(&y, lb, sizeof(lb));
+                if (q < 0)
+                        return q;
+                w = dns_label_undo_idna(lb, q, lb, sizeof(lb));
+                if (w < 0)
+                        return w;
+                if (w > 0)
+                        q = w;
+
+                la[r] = lb[q] = 0;
+                if (strcasecmp(la, lb))
+                        return false;
+        }
+}
+
+int dns_name_endswith(const char *name, const char *suffix) {
+        const char *n, *s, *saved_n = NULL;
+        int r, q, k, w;
+
+        assert(name);
+        assert(suffix);
+
+        n = name;
+        s = suffix;
+
+        for (;;) {
+                char ln[DNS_LABEL_MAX+1], ls[DNS_LABEL_MAX+1];
+
+                r = dns_label_unescape(&n, ln, sizeof(ln));
+                if (r < 0)
+                        return r;
+                k = dns_label_undo_idna(ln, r, ln, sizeof(ln));
+                if (k < 0)
+                        return k;
+                if (k > 0)
+                        r = k;
+
+                if (!saved_n)
+                        saved_n = n;
+
+                q = dns_label_unescape(&s, ls, sizeof(ls));
+                if (q < 0)
+                        return q;
+                w = dns_label_undo_idna(ls, q, ls, sizeof(ls));
+                if (w < 0)
+                        return w;
+                if (w > 0)
+                        q = w;
+
+                if (r == 0 && q == 0)
+                        return true;
+                if (r == 0 && saved_n == n)
+                        return false;
+
+                ln[r] = ls[q] = 0;
+
+                if (r != q || strcasecmp(ln, ls)) {
+
+                        /* Not the same, let's jump back, and try with the next label again */
+                        s = suffix;
+                        n = saved_n;
+                        saved_n = NULL;
+                }
+        }
+}
+
+int dns_name_reverse(int family, const union in_addr_union *a, char **ret) {
+        const uint8_t *p;
+        int r;
+
+        assert(a);
+        assert(ret);
+
+        p = (const uint8_t*) a;
+
+        if (family == AF_INET)
+                r = asprintf(ret, "%u.%u.%u.%u.in-addr.arpa", p[3], p[2], p[1], p[0]);
+        else if (family == AF_INET6)
+                r = asprintf(ret, "%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.%c.ip6.arpa",
+                             hexchar(p[15] & 0xF), hexchar(p[15] >> 4), hexchar(p[14] & 0xF), hexchar(p[14] >> 4),
+                             hexchar(p[13] & 0xF), hexchar(p[13] >> 4), hexchar(p[12] & 0xF), hexchar(p[12] >> 4),
+                             hexchar(p[11] & 0xF), hexchar(p[11] >> 4), hexchar(p[10] & 0xF), hexchar(p[10] >> 4),
+                             hexchar(p[ 9] & 0xF), hexchar(p[ 9] >> 4), hexchar(p[ 8] & 0xF), hexchar(p[ 8] >> 4),
+                             hexchar(p[ 7] & 0xF), hexchar(p[ 7] >> 4), hexchar(p[ 6] & 0xF), hexchar(p[ 6] >> 4),
+                             hexchar(p[ 5] & 0xF), hexchar(p[ 5] >> 4), hexchar(p[ 4] & 0xF), hexchar(p[ 4] >> 4),
+                             hexchar(p[ 3] & 0xF), hexchar(p[ 3] >> 4), hexchar(p[ 2] & 0xF), hexchar(p[ 2] >> 4),
+                             hexchar(p[ 1] & 0xF), hexchar(p[ 1] >> 4), hexchar(p[ 0] & 0xF), hexchar(p[ 0] >> 4));
+        else
+                return -EAFNOSUPPORT;
+        if (r < 0)
+                return -ENOMEM;
+
+        return 0;
+}
+
+int dns_name_address(const char *p, int *family, union in_addr_union *address) {
+        int r;
+
+        assert(p);
+        assert(family);
+        assert(address);
+
+        r = dns_name_endswith(p, "in-addr.arpa");
+        if (r < 0)
+                return r;
+        if (r > 0) {
+                uint8_t a[4];
+                unsigned i;
+
+                for (i = 0; i < ELEMENTSOF(a); i++) {
+                        char label[DNS_LABEL_MAX+1];
+
+                        r = dns_label_unescape(&p, label, sizeof(label));
+                        if (r < 0)
+                                return r;
+                        if (r == 0)
+                                return -EINVAL;
+                        if (r > 3)
+                                return -EINVAL;
+
+                        r = safe_atou8(label, &a[i]);
+                        if (r < 0)
+                                return r;
+                }
+
+                r = dns_name_equal(p, "in-addr.arpa");
+                if (r <= 0)
+                        return r;
+
+                *family = AF_INET;
+                address->in.s_addr = htobe32(((uint32_t) a[3] << 24) |
+                                             ((uint32_t) a[2] << 16) |
+                                             ((uint32_t) a[1] << 8) |
+                                              (uint32_t) a[0]);
+
+                return 1;
+        }
+
+        r = dns_name_endswith(p, "ip6.arpa");
+        if (r < 0)
+                return r;
+        if (r > 0) {
+                struct in6_addr a;
+                unsigned i;
+
+                for (i = 0; i < ELEMENTSOF(a.s6_addr); i++) {
+                        char label[DNS_LABEL_MAX+1];
+                        int x, y;
+
+                        r = dns_label_unescape(&p, label, sizeof(label));
+                        if (r <= 0)
+                                return r;
+                        if (r != 1)
+                                return -EINVAL;
+                        x = unhexchar(label[0]);
+                        if (x < 0)
+                                return -EINVAL;
+
+                        r = dns_label_unescape(&p, label, sizeof(label));
+                        if (r <= 0)
+                                return r;
+                        if (r != 1)
+                                return -EINVAL;
+                        y = unhexchar(label[0]);
+                        if (y < 0)
+                                return -EINVAL;
+
+                        a.s6_addr[ELEMENTSOF(a.s6_addr) - i - 1] = (uint8_t) y << 4 | (uint8_t) x;
+                }
+
+                r = dns_name_equal(p, "ip6.arpa");
+                if (r <= 0)
+                        return r;
+
+                *family = AF_INET6;
+                address->in6 = a;
+                return 1;
+        }
+
+        return 0;
+}
+
+int dns_name_root(const char *name) {
+        char label[DNS_LABEL_MAX+1];
+        int r;
+
+        assert(name);
+
+        r = dns_label_unescape(&name, label, sizeof(label));
+        if (r < 0)
+                return r;
+
+        return r == 0 && *name == 0;
+}
+
+int dns_name_single_label(const char *name) {
+        char label[DNS_LABEL_MAX+1];
+        int r;
+
+        assert(name);
+
+        r = dns_label_unescape(&name, label, sizeof(label));
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return 0;
+
+        r = dns_label_unescape(&name, label, sizeof(label));
+        if (r < 0)
+                return r;
+
+        return r == 0 && *name == 0;
+}
diff --git a/src/resolve/resolved-dns-domain.h b/src/resolve/resolved-dns-domain.h
new file mode 100644 (file)
index 0000000..0888a78
--- /dev/null
@@ -0,0 +1,49 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+ ***/
+
+#include <sys/types.h>
+
+#include "hashmap.h"
+#include "in-addr-util.h"
+
+#define DNS_LABEL_MAX 63
+#define DNS_NAME_MAX 255
+
+int dns_label_unescape(const char **name, char *dest, size_t sz);
+int dns_label_escape(const char *p, size_t l, char **ret);
+
+int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max);
+int dns_label_undo_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max);
+
+int dns_name_normalize(const char *s, char **_ret);
+
+unsigned long dns_name_hash_func(const void *s, const uint8_t hash_key[HASH_KEY_SIZE]);
+int dns_name_compare_func(const void *a, const void *b);
+extern const struct hash_ops dns_name_hash_ops;
+
+int dns_name_equal(const char *x, const char *y);
+int dns_name_endswith(const char *name, const char *suffix);
+
+int dns_name_reverse(int family, const union in_addr_union *a, char **ret);
+int dns_name_address(const char *p, int *family, union in_addr_union *a);
+
+int dns_name_root(const char *name);
+int dns_name_single_label(const char *name);
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
new file mode 100644 (file)
index 0000000..7375f77
--- /dev/null
@@ -0,0 +1,1461 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+ ***/
+
+#include "utf8.h"
+#include "util.h"
+#include "strv.h"
+#include "resolved-dns-domain.h"
+#include "resolved-dns-packet.h"
+
+int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
+        DnsPacket *p;
+        size_t a;
+
+        assert(ret);
+
+        if (mtu <= 0)
+                a = DNS_PACKET_SIZE_START;
+        else
+                a = mtu;
+
+        if (a < DNS_PACKET_HEADER_SIZE)
+                a = DNS_PACKET_HEADER_SIZE;
+
+        /* round up to next page size */
+        a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
+
+        /* make sure we never allocate more than useful */
+        if (a > DNS_PACKET_SIZE_MAX)
+                a = DNS_PACKET_SIZE_MAX;
+
+        p = malloc0(ALIGN(sizeof(DnsPacket)) + a);
+        if (!p)
+                return -ENOMEM;
+
+        p->size = p->rindex = DNS_PACKET_HEADER_SIZE;
+        p->allocated = a;
+        p->protocol = protocol;
+        p->n_ref = 1;
+
+        *ret = p;
+
+        return 0;
+}
+
+int dns_packet_new_query(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
+        DnsPacket *p;
+        DnsPacketHeader *h;
+        int r;
+
+        assert(ret);
+
+        r = dns_packet_new(&p, protocol, mtu);
+        if (r < 0)
+                return r;
+
+        h = DNS_PACKET_HEADER(p);
+
+        if (protocol == DNS_PROTOCOL_LLMNR)
+                h->flags = htobe16(DNS_PACKET_MAKE_FLAGS(0 /* qr */,
+                                                         0 /* opcode */,
+                                                         0 /* c */,
+                                                         0 /* tc */,
+                                                         0 /* t */,
+                                                         0 /* ra */,
+                                                         0 /* ad */,
+                                                         0 /* cd */,
+                                                         0 /* rcode */));
+        else
+                h->flags = htobe16(DNS_PACKET_MAKE_FLAGS(0 /* qr */,
+                                                         0 /* opcode */,
+                                                         0 /* aa */,
+                                                         0 /* tc */,
+                                                         1 /* rd (ask for recursion) */,
+                                                         0 /* ra */,
+                                                         0 /* ad */,
+                                                         0 /* cd */,
+                                                         0 /* rcode */));
+
+        *ret = p;
+        return 0;
+}
+
+DnsPacket *dns_packet_ref(DnsPacket *p) {
+
+        if (!p)
+                return NULL;
+
+        assert(p->n_ref > 0);
+        p->n_ref++;
+        return p;
+}
+
+static void dns_packet_free(DnsPacket *p) {
+        char *s;
+
+        assert(p);
+
+        dns_question_unref(p->question);
+        dns_answer_unref(p->answer);
+
+        while ((s = hashmap_steal_first_key(p->names)))
+                free(s);
+        hashmap_free(p->names);
+
+        free(p->_data);
+        free(p);
+}
+
+DnsPacket *dns_packet_unref(DnsPacket *p) {
+        if (!p)
+                return NULL;
+
+        assert(p->n_ref > 0);
+
+        if (p->n_ref == 1)
+                dns_packet_free(p);
+        else
+                p->n_ref--;
+
+        return NULL;
+}
+
+int dns_packet_validate(DnsPacket *p) {
+        assert(p);
+
+        if (p->size < DNS_PACKET_HEADER_SIZE)
+                return -EBADMSG;
+
+        if (p->size > DNS_PACKET_SIZE_MAX)
+                return -EBADMSG;
+
+        return 1;
+}
+
+int dns_packet_validate_reply(DnsPacket *p) {
+        int r;
+
+        assert(p);
+
+        r = dns_packet_validate(p);
+        if (r < 0)
+                return r;
+
+        if (DNS_PACKET_QR(p) != 1)
+                return 0;
+
+        if (DNS_PACKET_OPCODE(p) != 0)
+                return -EBADMSG;
+
+        /* RFC 4795, Section 2.1.1. says to discard all replies with QDCOUNT != 1 */
+        if (p->protocol == DNS_PROTOCOL_LLMNR &&
+            DNS_PACKET_QDCOUNT(p) != 1)
+                return -EBADMSG;
+
+        return 1;
+}
+
+int dns_packet_validate_query(DnsPacket *p) {
+        int r;
+
+        assert(p);
+
+        r = dns_packet_validate(p);
+        if (r < 0)
+                return r;
+
+        if (DNS_PACKET_QR(p) != 0)
+                return 0;
+
+        if (DNS_PACKET_OPCODE(p) != 0)
+                return -EBADMSG;
+
+        if (DNS_PACKET_TC(p))
+                return -EBADMSG;
+
+        /* RFC 4795, Section 2.1.1. says to discard all queries with QDCOUNT != 1 */
+        if (p->protocol == DNS_PROTOCOL_LLMNR &&
+            DNS_PACKET_QDCOUNT(p) != 1)
+                return -EBADMSG;
+
+        /* RFC 4795, Section 2.1.1. says to discard all queries with ANCOUNT != 0 */
+        if (DNS_PACKET_ANCOUNT(p) > 0)
+                return -EBADMSG;
+
+        /* RFC 4795, Section 2.1.1. says to discard all queries with NSCOUNT != 0 */
+        if (DNS_PACKET_NSCOUNT(p) > 0)
+                return -EBADMSG;
+
+        return 1;
+}
+
+static int dns_packet_extend(DnsPacket *p, size_t add, void **ret, size_t *start) {
+        assert(p);
+
+        if (p->size + add > p->allocated) {
+                size_t a;
+
+                a = PAGE_ALIGN((p->size + add) * 2);
+                if (a > DNS_PACKET_SIZE_MAX)
+                        a = DNS_PACKET_SIZE_MAX;
+
+                if (p->size + add > a)
+                        return -EMSGSIZE;
+
+                if (p->_data) {
+                        void *d;
+
+                        d = realloc(p->_data, a);
+                        if (!d)
+                                return -ENOMEM;
+
+                        p->_data = d;
+                } else {
+                        p->_data = malloc(a);
+                        if (!p->_data)
+                                return -ENOMEM;
+
+                        memcpy(p->_data, (uint8_t*) p + ALIGN(sizeof(DnsPacket)), p->size);
+                        memzero((uint8_t*) p->_data + p->size, a - p->size);
+                }
+
+                p->allocated = a;
+        }
+
+        if (start)
+                *start = p->size;
+
+        if (ret)
+                *ret = (uint8_t*) DNS_PACKET_DATA(p) + p->size;
+
+        p->size += add;
+        return 0;
+}
+
+static void dns_packet_truncate(DnsPacket *p, size_t sz) {
+        Iterator i;
+        char *s;
+        void *n;
+
+        assert(p);
+
+        if (p->size <= sz)
+                return;
+
+        HASHMAP_FOREACH_KEY(s, n, p->names, i) {
+
+                if (PTR_TO_SIZE(n) < sz)
+                        continue;
+
+                hashmap_remove(p->names, s);
+                free(s);
+        }
+
+        p->size = sz;
+}
+
+int dns_packet_append_blob(DnsPacket *p, const void *d, size_t l, size_t *start) {
+        void *q;
+        int r;
+
+        assert(p);
+
+        r = dns_packet_extend(p, l, &q, start);
+        if (r < 0)
+                return r;
+
+        memcpy(q, d, l);
+        return 0;
+}
+
+int dns_packet_append_uint8(DnsPacket *p, uint8_t v, size_t *start) {
+        void *d;
+        int r;
+
+        assert(p);
+
+        r = dns_packet_extend(p, sizeof(uint8_t), &d, start);
+        if (r < 0)
+                return r;
+
+        ((uint8_t*) d)[0] = v;
+
+        return 0;
+}
+
+int dns_packet_append_uint16(DnsPacket *p, uint16_t v, size_t *start) {
+        void *d;
+        int r;
+
+        assert(p);
+
+        r = dns_packet_extend(p, sizeof(uint16_t), &d, start);
+        if (r < 0)
+                return r;
+
+        ((uint8_t*) d)[0] = (uint8_t) (v >> 8);
+        ((uint8_t*) d)[1] = (uint8_t) v;
+
+        return 0;
+}
+
+int dns_packet_append_uint32(DnsPacket *p, uint32_t v, size_t *start) {
+        void *d;
+        int r;
+
+        assert(p);
+
+        r = dns_packet_extend(p, sizeof(uint32_t), &d, start);
+        if (r < 0)
+                return r;
+
+        ((uint8_t*) d)[0] = (uint8_t) (v >> 24);
+        ((uint8_t*) d)[1] = (uint8_t) (v >> 16);
+        ((uint8_t*) d)[2] = (uint8_t) (v >> 8);
+        ((uint8_t*) d)[3] = (uint8_t) v;
+
+        return 0;
+}
+
+int dns_packet_append_string(DnsPacket *p, const char *s, size_t *start) {
+        void *d;
+        size_t l;
+        int r;
+
+        assert(p);
+        assert(s);
+
+        l = strlen(s);
+        if (l > 255)
+                return -E2BIG;
+
+        r = dns_packet_extend(p, 1 + l, &d, start);
+        if (r < 0)
+                return r;
+
+        ((uint8_t*) d)[0] = (uint8_t) l;
+        memcpy(((uint8_t*) d) + 1, s, l);
+
+        return 0;
+}
+
+int dns_packet_append_label(DnsPacket *p, const char *d, size_t l, size_t *start) {
+        void *w;
+        int r;
+
+        assert(p);
+        assert(d);
+
+        if (l > DNS_LABEL_MAX)
+                return -E2BIG;
+
+        r = dns_packet_extend(p, 1 + l, &w, start);
+        if (r < 0)
+                return r;
+
+        ((uint8_t*) w)[0] = (uint8_t) l;
+        memcpy(((uint8_t*) w) + 1, d, l);
+
+        return 0;
+}
+
+int dns_packet_append_name(DnsPacket *p, const char *name,
+                           bool allow_compression, size_t *start) {
+        size_t saved_size;
+        int r;
+
+        assert(p);
+        assert(name);
+
+        saved_size = p->size;
+
+        while (*name) {
+                _cleanup_free_ char *s = NULL;
+                char label[DNS_LABEL_MAX];
+                size_t n = 0;
+                int k;
+
+                if (allow_compression)
+                        n = PTR_TO_SIZE(hashmap_get(p->names, name));
+                if (n > 0) {
+                        assert(n < p->size);
+
+                        if (n < 0x4000) {
+                                r = dns_packet_append_uint16(p, 0xC000 | n, NULL);
+                                if (r < 0)
+                                        goto fail;
+
+                                goto done;
+                        }
+                }
+
+                s = strdup(name);
+                if (!s) {
+                        r = -ENOMEM;
+                        goto fail;
+                }
+
+                r = dns_label_unescape(&name, label, sizeof(label));
+                if (r < 0)
+                        goto fail;
+
+                if (p->protocol == DNS_PROTOCOL_DNS)
+                        k = dns_label_apply_idna(label, r, label, sizeof(label));
+                else
+                        k = dns_label_undo_idna(label, r, label, sizeof(label));
+                if (k < 0) {
+                        r = k;
+                        goto fail;
+                }
+                if (k > 0)
+                        r = k;
+
+                r = dns_packet_append_label(p, label, r, &n);
+                if (r < 0)
+                        goto fail;
+
+                if (allow_compression) {
+                        r = hashmap_ensure_allocated(&p->names, &dns_name_hash_ops);
+                        if (r < 0)
+                                goto fail;
+
+                        r = hashmap_put(p->names, s, SIZE_TO_PTR(n));
+                        if (r < 0)
+                                goto fail;
+
+                        s = NULL;
+                }
+        }
+
+        r = dns_packet_append_uint8(p, 0, NULL);
+        if (r < 0)
+                return r;
+
+done:
+        if (start)
+                *start = saved_size;
+
+        return 0;
+
+fail:
+        dns_packet_truncate(p, saved_size);
+        return r;
+}
+
+int dns_packet_append_key(DnsPacket *p, const DnsResourceKey *k, size_t *start) {
+        size_t saved_size;
+        int r;
+
+        assert(p);
+        assert(k);
+
+        saved_size = p->size;
+
+        r = dns_packet_append_name(p, DNS_RESOURCE_KEY_NAME(k), true, NULL);
+        if (r < 0)
+                goto fail;
+
+        r = dns_packet_append_uint16(p, k->type, NULL);
+        if (r < 0)
+                goto fail;
+
+        r = dns_packet_append_uint16(p, k->class, NULL);
+        if (r < 0)
+                goto fail;
+
+        if (start)
+                *start = saved_size;
+
+        return 0;
+
+fail:
+        dns_packet_truncate(p, saved_size);
+        return r;
+}
+
+int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, size_t *start) {
+        size_t saved_size, rdlength_offset, end, rdlength;
+        int r;
+
+        assert(p);
+        assert(rr);
+
+        saved_size = p->size;
+
+        r = dns_packet_append_key(p, rr->key, NULL);
+        if (r < 0)
+                goto fail;
+
+        r = dns_packet_append_uint32(p, rr->ttl, NULL);
+        if (r < 0)
+                goto fail;
+
+        /* Initially we write 0 here */
+        r = dns_packet_append_uint16(p, 0, &rdlength_offset);
+        if (r < 0)
+                goto fail;
+
+        switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) {
+
+        case DNS_TYPE_SRV:
+                r = dns_packet_append_uint16(p, rr->srv.priority, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint16(p, rr->srv.weight, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint16(p, rr->srv.port, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_name(p, rr->srv.name, true, NULL);
+                break;
+
+        case DNS_TYPE_PTR:
+        case DNS_TYPE_NS:
+        case DNS_TYPE_CNAME:
+        case DNS_TYPE_DNAME:
+                r = dns_packet_append_name(p, rr->ptr.name, true, NULL);
+                break;
+
+        case DNS_TYPE_HINFO:
+                r = dns_packet_append_string(p, rr->hinfo.cpu, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_string(p, rr->hinfo.os, NULL);
+                break;
+
+        case DNS_TYPE_SPF: /* exactly the same as TXT */
+        case DNS_TYPE_TXT: {
+                char **s;
+
+                STRV_FOREACH(s, rr->txt.strings) {
+                        r = dns_packet_append_string(p, *s, NULL);
+                        if (r < 0)
+                                goto fail;
+                }
+
+                r = 0;
+                break;
+        }
+
+        case DNS_TYPE_A:
+                r = dns_packet_append_blob(p, &rr->a.in_addr, sizeof(struct in_addr), NULL);
+                break;
+
+        case DNS_TYPE_AAAA:
+                r = dns_packet_append_blob(p, &rr->aaaa.in6_addr, sizeof(struct in6_addr), NULL);
+                break;
+
+        case DNS_TYPE_SOA:
+                r = dns_packet_append_name(p, rr->soa.mname, true, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_name(p, rr->soa.rname, true, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->soa.serial, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->soa.refresh, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->soa.retry, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->soa.expire, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->soa.minimum, NULL);
+                break;
+
+        case DNS_TYPE_MX:
+                r = dns_packet_append_uint16(p, rr->mx.priority, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_name(p, rr->mx.exchange, true, NULL);
+                break;
+
+        case DNS_TYPE_LOC:
+                r = dns_packet_append_uint8(p, rr->loc.version, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->loc.size, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->loc.horiz_pre, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->loc.vert_pre, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->loc.latitude, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->loc.longitude, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->loc.altitude, NULL);
+                break;
+
+        case DNS_TYPE_SSHFP:
+                r = dns_packet_append_uint8(p, rr->sshfp.algorithm, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->sshfp.fptype, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_blob(p, rr->sshfp.key, rr->sshfp.key_size, NULL);
+                break;
+
+        case DNS_TYPE_DNSKEY:
+                r = dns_packet_append_uint16(p, dnskey_to_flags(rr), NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, 3u, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->dnskey.algorithm, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_blob(p, rr->dnskey.key, rr->dnskey.key_size, NULL);
+                break;
+
+        case DNS_TYPE_RRSIG:
+                r = dns_packet_append_uint16(p, rr->rrsig.type_covered, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->rrsig.algorithm, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->rrsig.labels, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->rrsig.original_ttl, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->rrsig.expiration, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint32(p, rr->rrsig.inception, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_uint8(p, rr->rrsig.key_tag, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_name(p, rr->rrsig.signer, false, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_append_blob(p, rr->rrsig.signature, rr->rrsig.signature_size, NULL);
+                break;
+
+        case _DNS_TYPE_INVALID: /* unparseable */
+        default:
+
+                r = dns_packet_append_blob(p, rr->generic.data, rr->generic.size, NULL);
+                break;
+        }
+        if (r < 0)
+                goto fail;
+
+        /* Let's calculate the actual data size and update the field */
+        rdlength = p->size - rdlength_offset - sizeof(uint16_t);
+        if (rdlength > 0xFFFF) {
+                r = ENOSPC;
+                goto fail;
+        }
+
+        end = p->size;
+        p->size = rdlength_offset;
+        r = dns_packet_append_uint16(p, rdlength, NULL);
+        if (r < 0)
+                goto fail;
+        p->size = end;
+
+        if (start)
+                *start = saved_size;
+
+        return 0;
+
+fail:
+        dns_packet_truncate(p, saved_size);
+        return r;
+}
+
+
+int dns_packet_read(DnsPacket *p, size_t sz, const void **ret, size_t *start) {
+        assert(p);
+
+        if (p->rindex + sz > p->size)
+                return -EMSGSIZE;
+
+        if (ret)
+                *ret = (uint8_t*) DNS_PACKET_DATA(p) + p->rindex;
+
+        if (start)
+                *start = p->rindex;
+
+        p->rindex += sz;
+        return 0;
+}
+
+void dns_packet_rewind(DnsPacket *p, size_t idx) {
+        assert(p);
+        assert(idx <= p->size);
+        assert(idx >= DNS_PACKET_HEADER_SIZE);
+
+        p->rindex = idx;
+}
+
+int dns_packet_read_blob(DnsPacket *p, void *d, size_t sz, size_t *start) {
+        const void *q;
+        int r;
+
+        assert(p);
+        assert(d);
+
+        r = dns_packet_read(p, sz, &q, start);
+        if (r < 0)
+                return r;
+
+        memcpy(d, q, sz);
+        return 0;
+}
+
+int dns_packet_read_uint8(DnsPacket *p, uint8_t *ret, size_t *start) {
+        const void *d;
+        int r;
+
+        assert(p);
+
+        r = dns_packet_read(p, sizeof(uint8_t), &d, start);
+        if (r < 0)
+                return r;
+
+        *ret = ((uint8_t*) d)[0];
+        return 0;
+}
+
+int dns_packet_read_uint16(DnsPacket *p, uint16_t *ret, size_t *start) {
+        const void *d;
+        int r;
+
+        assert(p);
+
+        r = dns_packet_read(p, sizeof(uint16_t), &d, start);
+        if (r < 0)
+                return r;
+
+        *ret = (((uint16_t) ((uint8_t*) d)[0]) << 8) |
+                ((uint16_t) ((uint8_t*) d)[1]);
+        return 0;
+}
+
+int dns_packet_read_uint32(DnsPacket *p, uint32_t *ret, size_t *start) {
+        const void *d;
+        int r;
+
+        assert(p);
+
+        r = dns_packet_read(p, sizeof(uint32_t), &d, start);
+        if (r < 0)
+                return r;
+
+        *ret = (((uint32_t) ((uint8_t*) d)[0]) << 24) |
+               (((uint32_t) ((uint8_t*) d)[1]) << 16) |
+               (((uint32_t) ((uint8_t*) d)[2]) << 8) |
+                ((uint32_t) ((uint8_t*) d)[3]);
+
+        return 0;
+}
+
+int dns_packet_read_string(DnsPacket *p, char **ret, size_t *start) {
+        size_t saved_rindex;
+        const void *d;
+        char *t;
+        uint8_t c;
+        int r;
+
+        assert(p);
+
+        saved_rindex = p->rindex;
+
+        r = dns_packet_read_uint8(p, &c, NULL);
+        if (r < 0)
+                goto fail;
+
+        r = dns_packet_read(p, c, &d, NULL);
+        if (r < 0)
+                goto fail;
+
+        if (memchr(d, 0, c)) {
+                r = -EBADMSG;
+                goto fail;
+        }
+
+        t = strndup(d, c);
+        if (!t) {
+                r = -ENOMEM;
+                goto fail;
+        }
+
+        if (!utf8_is_valid(t)) {
+                free(t);
+                r = -EBADMSG;
+                goto fail;
+        }
+
+        *ret = t;
+
+        if (start)
+                *start = saved_rindex;
+
+        return 0;
+
+fail:
+        dns_packet_rewind(p, saved_rindex);
+        return r;
+}
+
+int dns_packet_read_name(DnsPacket *p, char **_ret,
+                         bool allow_compression, size_t *start) {
+        size_t saved_rindex, after_rindex = 0;
+        _cleanup_free_ char *ret = NULL;
+        size_t n = 0, allocated = 0;
+        bool first = true;
+        int r;
+
+        assert(p);
+        assert(_ret);
+
+        saved_rindex = p->rindex;
+
+        for (;;) {
+                uint8_t c, d;
+
+                r = dns_packet_read_uint8(p, &c, NULL);
+                if (r < 0)
+                        goto fail;
+
+                if (c == 0)
+                        /* End of name */
+                        break;
+                else if (c <= 63) {
+                        _cleanup_free_ char *t = NULL;
+                        const char *label;
+
+                        /* Literal label */
+                        r = dns_packet_read(p, c, (const void**) &label, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        r = dns_label_escape(label, c, &t);
+                        if (r < 0)
+                                goto fail;
+
+                        if (!GREEDY_REALLOC(ret, allocated, n + !first + strlen(t) + 1)) {
+                                r = -ENOMEM;
+                                goto fail;
+                        }
+
+                        if (!first)
+                                ret[n++] = '.';
+                        else
+                                first = false;
+
+                        memcpy(ret + n, t, r);
+                        n += r;
+                        continue;
+                } else if (allow_compression && (c & 0xc0) == 0xc0) {
+                        uint16_t ptr;
+
+                        /* Pointer */
+                        r = dns_packet_read_uint8(p, &d, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        ptr = (uint16_t) (c & ~0xc0) << 8 | (uint16_t) d;
+                        if (ptr < DNS_PACKET_HEADER_SIZE || ptr >= saved_rindex) {
+                                r = -EBADMSG;
+                                goto fail;
+                        }
+
+                        if (after_rindex == 0)
+                                after_rindex = p->rindex;
+
+                        p->rindex = ptr;
+                } else
+                        goto fail;
+        }
+
+        if (!GREEDY_REALLOC(ret, allocated, n + 1)) {
+                r = -ENOMEM;
+                goto fail;
+        }
+
+        ret[n] = 0;
+
+        if (after_rindex != 0)
+                p->rindex= after_rindex;
+
+        *_ret = ret;
+        ret = NULL;
+
+        if (start)
+                *start = saved_rindex;
+
+        return 0;
+
+fail:
+        dns_packet_rewind(p, saved_rindex);
+        return r;
+}
+
+int dns_packet_read_key(DnsPacket *p, DnsResourceKey **ret, size_t *start) {
+        _cleanup_free_ char *name = NULL;
+        uint16_t class, type;
+        DnsResourceKey *key;
+        size_t saved_rindex;
+        int r;
+
+        assert(p);
+        assert(ret);
+
+        saved_rindex = p->rindex;
+
+        r = dns_packet_read_name(p, &name, true, NULL);
+        if (r < 0)
+                goto fail;
+
+        r = dns_packet_read_uint16(p, &type, NULL);
+        if (r < 0)
+                goto fail;
+
+        r = dns_packet_read_uint16(p, &class, NULL);
+        if (r < 0)
+                goto fail;
+
+        key = dns_resource_key_new_consume(class, type, name);
+        if (!key) {
+                r = -ENOMEM;
+                goto fail;
+        }
+
+        name = NULL;
+        *ret = key;
+
+        if (start)
+                *start = saved_rindex;
+
+        return 0;
+fail:
+        dns_packet_rewind(p, saved_rindex);
+        return r;
+}
+
+static int dns_packet_read_public_key(DnsPacket *p, size_t length,
+                                      void **dp, size_t *lengthp,
+                                      size_t *start) {
+        int r;
+        const void *d;
+        void *d2;
+
+        r = dns_packet_read(p, length, &d, NULL);
+        if (r < 0)
+                return r;
+
+        d2 = memdup(d, length);
+        if (!d2)
+                return -ENOMEM;
+
+        *dp = d2;
+        *lengthp = length;
+        return 0;
+}
+
+static bool loc_size_ok(uint8_t size) {
+        uint8_t m = size >> 4, e = size & 0xF;
+
+        return m <= 9 && e <= 9 && (m > 0 || e == 0);
+}
+
+static int dnskey_parse_flags(DnsResourceRecord *rr, uint16_t flags) {
+        assert(rr);
+
+        if (flags & ~(DNSKEY_FLAG_SEP | DNSKEY_FLAG_ZONE_KEY))
+                return -EBADMSG;
+
+        rr->dnskey.zone_key_flag = flags & DNSKEY_FLAG_ZONE_KEY;
+        rr->dnskey.sep_flag = flags & DNSKEY_FLAG_SEP;
+        return 0;
+}
+
+int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, size_t *start) {
+        _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
+        _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+        size_t saved_rindex, offset;
+        uint16_t rdlength;
+        const void *d;
+        int r;
+
+        assert(p);
+        assert(ret);
+
+        saved_rindex = p->rindex;
+
+        r = dns_packet_read_key(p, &key, NULL);
+        if (r < 0)
+                goto fail;
+
+        if (key->class == DNS_CLASS_ANY ||
+            key->type == DNS_TYPE_ANY) {
+                r = -EBADMSG;
+                goto fail;
+        }
+
+        rr = dns_resource_record_new(key);
+        if (!rr) {
+                r = -ENOMEM;
+                goto fail;
+        }
+
+        r = dns_packet_read_uint32(p, &rr->ttl, NULL);
+        if (r < 0)
+                goto fail;
+
+        r = dns_packet_read_uint16(p, &rdlength, NULL);
+        if (r < 0)
+                goto fail;
+
+        if (p->rindex + rdlength > p->size) {
+                r = -EBADMSG;
+                goto fail;
+        }
+
+        offset = p->rindex;
+
+        switch (rr->key->type) {
+
+        case DNS_TYPE_SRV:
+                r = dns_packet_read_uint16(p, &rr->srv.priority, NULL);
+                if (r < 0)
+                        goto fail;
+                r = dns_packet_read_uint16(p, &rr->srv.weight, NULL);
+                if (r < 0)
+                        goto fail;
+                r = dns_packet_read_uint16(p, &rr->srv.port, NULL);
+                if (r < 0)
+                        goto fail;
+                r = dns_packet_read_name(p, &rr->srv.name, true, NULL);
+                break;
+
+        case DNS_TYPE_PTR:
+        case DNS_TYPE_NS:
+        case DNS_TYPE_CNAME:
+        case DNS_TYPE_DNAME:
+                r = dns_packet_read_name(p, &rr->ptr.name, true, NULL);
+                break;
+
+        case DNS_TYPE_HINFO:
+                r = dns_packet_read_string(p, &rr->hinfo.cpu, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_string(p, &rr->hinfo.os, NULL);
+                break;
+
+        case DNS_TYPE_SPF: /* exactly the same as TXT */
+        case DNS_TYPE_TXT: {
+                char *s;
+
+                while (p->rindex < offset + rdlength) {
+                        r = dns_packet_read_string(p, &s, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        r = strv_consume(&rr->txt.strings, s);
+                        if (r < 0)
+                                goto fail;
+                }
+
+                r = 0;
+                break;
+        }
+
+        case DNS_TYPE_A:
+                r = dns_packet_read_blob(p, &rr->a.in_addr, sizeof(struct in_addr), NULL);
+                break;
+
+        case DNS_TYPE_AAAA:
+                r = dns_packet_read_blob(p, &rr->aaaa.in6_addr, sizeof(struct in6_addr), NULL);
+                break;
+
+        case DNS_TYPE_SOA:
+                r = dns_packet_read_name(p, &rr->soa.mname, true, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_name(p, &rr->soa.rname, true, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->soa.serial, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->soa.refresh, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->soa.retry, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->soa.expire, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->soa.minimum, NULL);
+                break;
+
+        case DNS_TYPE_MX:
+                r = dns_packet_read_uint16(p, &rr->mx.priority, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_name(p, &rr->mx.exchange, true, NULL);
+                break;
+
+        case DNS_TYPE_LOC: {
+                uint8_t t;
+                size_t pos;
+
+                r = dns_packet_read_uint8(p, &t, &pos);
+                if (r < 0)
+                        goto fail;
+
+                if (t == 0) {
+                        rr->loc.version = t;
+
+                        r = dns_packet_read_uint8(p, &rr->loc.size, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        if (!loc_size_ok(rr->loc.size)) {
+                                r = -EBADMSG;
+                                goto fail;
+                        }
+
+                        r = dns_packet_read_uint8(p, &rr->loc.horiz_pre, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        if (!loc_size_ok(rr->loc.horiz_pre)) {
+                                r = -EBADMSG;
+                                goto fail;
+                        }
+
+                        r = dns_packet_read_uint8(p, &rr->loc.vert_pre, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        if (!loc_size_ok(rr->loc.vert_pre)) {
+                                r = -EBADMSG;
+                                goto fail;
+                        }
+
+                        r = dns_packet_read_uint32(p, &rr->loc.latitude, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        r = dns_packet_read_uint32(p, &rr->loc.longitude, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        r = dns_packet_read_uint32(p, &rr->loc.altitude, NULL);
+                        if (r < 0)
+                                goto fail;
+
+                        break;
+                } else {
+                        dns_packet_rewind(p, pos);
+                        rr->unparseable = true;
+                        goto unparseable;
+                }
+        }
+
+        case DNS_TYPE_SSHFP:
+                r = dns_packet_read_uint8(p, &rr->sshfp.algorithm, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint8(p, &rr->sshfp.fptype, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_public_key(p, rdlength - 2,
+                                               &rr->sshfp.key, &rr->sshfp.key_size,
+                                               NULL);
+                break;
+
+        case DNS_TYPE_DNSKEY: {
+                uint16_t flags;
+                uint8_t proto;
+
+                r = dns_packet_read_uint16(p, &flags, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dnskey_parse_flags(rr, flags);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint8(p, &proto, NULL);
+                if (r < 0)
+                        goto fail;
+
+                /* protocol is required to be always 3 */
+                if (proto != 3) {
+                        r = -EBADMSG;
+                        goto fail;
+                }
+
+                r = dns_packet_read_uint8(p, &rr->dnskey.algorithm, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_public_key(p, rdlength - 4,
+                                               &rr->dnskey.key, &rr->dnskey.key_size,
+                                               NULL);
+                break;
+        }
+
+        case DNS_TYPE_RRSIG:
+                r = dns_packet_read_uint16(p, &rr->rrsig.type_covered, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint8(p, &rr->rrsig.algorithm, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint8(p, &rr->rrsig.labels, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->rrsig.original_ttl, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->rrsig.expiration, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint32(p, &rr->rrsig.inception, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_uint16(p, &rr->rrsig.key_tag, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_name(p, &rr->rrsig.signer, false, NULL);
+                if (r < 0)
+                        goto fail;
+
+                r = dns_packet_read_public_key(p, offset + rdlength - p->rindex,
+                                               &rr->rrsig.signature, &rr->rrsig.signature_size,
+                                               NULL);
+                break;
+
+        default:
+        unparseable:
+                r = dns_packet_read(p, rdlength, &d, NULL);
+                if (r < 0)
+                        goto fail;
+
+                rr->generic.data = memdup(d, rdlength);
+                if (!rr->generic.data) {
+                        r = -ENOMEM;
+                        goto fail;
+                }
+
+                rr->generic.size = rdlength;
+                break;
+        }
+        if (r < 0)
+                goto fail;
+        if (p->rindex != offset + rdlength) {
+                r = -EBADMSG;
+                goto fail;
+        }
+
+        *ret = rr;
+        rr = NULL;
+
+        if (start)
+                *start = saved_rindex;
+
+        return 0;
+fail:
+        dns_packet_rewind(p, saved_rindex);
+        return r;
+}
+
+int dns_packet_extract(DnsPacket *p) {
+        _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
+        size_t saved_rindex;
+        unsigned n, i;
+        int r;
+
+        if (p->extracted)
+                return 0;
+
+        saved_rindex = p->rindex;
+        dns_packet_rewind(p, DNS_PACKET_HEADER_SIZE);
+
+        n = DNS_PACKET_QDCOUNT(p);
+        if (n > 0) {
+                question = dns_question_new(n);
+                if (!question) {
+                        r = -ENOMEM;
+                        goto finish;
+                }
+
+                for (i = 0; i < n; i++) {
+                        _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+
+                        r = dns_packet_read_key(p, &key, NULL);
+                        if (r < 0)
+                                goto finish;
+
+                        r = dns_question_add(question, key);
+                        if (r < 0)
+                                goto finish;
+                }
+        }
+
+        n = DNS_PACKET_RRCOUNT(p);
+        if (n > 0) {
+                answer = dns_answer_new(n);
+                if (!answer) {
+                        r = -ENOMEM;
+                        goto finish;
+                }
+
+                for (i = 0; i < n; i++) {
+                        _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
+
+                        r = dns_packet_read_rr(p, &rr, NULL);
+                        if (r < 0)
+                                goto finish;
+
+                        r = dns_answer_add(answer, rr);
+                        if (r < 0)
+                                goto finish;
+                }
+        }
+
+        p->question = question;
+        question = NULL;
+
+        p->answer = answer;
+        answer = NULL;
+
+        p->extracted = true;
+
+        r = 0;
+
+finish:
+        p->rindex = saved_rindex;
+        return r;
+}
+
+static const char* const dns_rcode_table[_DNS_RCODE_MAX_DEFINED] = {
+        [DNS_RCODE_SUCCESS] = "SUCCESS",
+        [DNS_RCODE_FORMERR] = "FORMERR",
+        [DNS_RCODE_SERVFAIL] = "SERVFAIL",
+        [DNS_RCODE_NXDOMAIN] = "NXDOMAIN",
+        [DNS_RCODE_NOTIMP] = "NOTIMP",
+        [DNS_RCODE_REFUSED] = "REFUSED",
+        [DNS_RCODE_YXDOMAIN] = "YXDOMAIN",
+        [DNS_RCODE_YXRRSET] = "YRRSET",
+        [DNS_RCODE_NXRRSET] = "NXRRSET",
+        [DNS_RCODE_NOTAUTH] = "NOTAUTH",
+        [DNS_RCODE_NOTZONE] = "NOTZONE",
+        [DNS_RCODE_BADVERS] = "BADVERS",
+        [DNS_RCODE_BADKEY] = "BADKEY",
+        [DNS_RCODE_BADTIME] = "BADTIME",
+        [DNS_RCODE_BADMODE] = "BADMODE",
+        [DNS_RCODE_BADNAME] = "BADNAME",
+        [DNS_RCODE_BADALG] = "BADALG",
+        [DNS_RCODE_BADTRUNC] = "BADTRUNC",
+};
+DEFINE_STRING_TABLE_LOOKUP(dns_rcode, int);
+
+static const char* const dns_protocol_table[_DNS_PROTOCOL_MAX] = {
+        [DNS_PROTOCOL_DNS] = "dns",
+        [DNS_PROTOCOL_MDNS] = "mdns",
+        [DNS_PROTOCOL_LLMNR] = "llmnr",
+};
+DEFINE_STRING_TABLE_LOOKUP(dns_protocol, DnsProtocol);
+
+static const char* const dnssec_algorithm_table[_DNSSEC_ALGORITHM_MAX_DEFINED] = {
+        [DNSSEC_ALGORITHM_RSAMD5]     = "RSAMD5",
+        [DNSSEC_ALGORITHM_DH]         = "DH",
+        [DNSSEC_ALGORITHM_DSA]        = "DSA",
+        [DNSSEC_ALGORITHM_ECC]        = "ECC",
+        [DNSSEC_ALGORITHM_RSASHA1]    = "RSASHA1",
+        [DNSSEC_ALGORITHM_INDIRECT]   = "INDIRECT",
+        [DNSSEC_ALGORITHM_PRIVATEDNS] = "PRIVATEDNS",
+        [DNSSEC_ALGORITHM_PRIVATEOID] = "PRIVATEOID",
+};
+DEFINE_STRING_TABLE_LOOKUP(dnssec_algorithm, int);
diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
new file mode 100644 (file)
index 0000000..561dd3a
--- /dev/null
@@ -0,0 +1,236 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+ ***/
+
+#include <inttypes.h>
+
+#include "macro.h"
+#include "sparse-endian.h"
+#include "hashmap.h"
+#include "in-addr-util.h"
+
+typedef struct DnsPacketHeader DnsPacketHeader;
+typedef struct DnsPacket DnsPacket;
+
+#include "resolved-dns-rr.h"
+#include "resolved-dns-question.h"
+#include "resolved-dns-answer.h"
+#include "resolved-def.h"
+
+typedef enum DnsProtocol {
+        DNS_PROTOCOL_DNS,
+        DNS_PROTOCOL_MDNS,
+        DNS_PROTOCOL_LLMNR,
+        _DNS_PROTOCOL_MAX,
+        _DNS_PROTOCOL_INVALID = -1
+} DnsProtocol;
+
+struct DnsPacketHeader {
+        uint16_t id;
+        be16_t flags;
+        be16_t qdcount;
+        be16_t ancount;
+        be16_t nscount;
+        be16_t arcount;
+};
+
+#define DNS_PACKET_HEADER_SIZE sizeof(DnsPacketHeader)
+
+/* The various DNS protocols deviate in how large a packet can grow,
+   but the TCP transport has a 16bit size field, hence that appears to
+   be the absolute maximum. */
+#define DNS_PACKET_SIZE_MAX 0xFFFF
+
+/* RFC 1035 say 512 is the maximum, for classic unicast DNS */
+#define DNS_PACKET_UNICAST_SIZE_MAX 512
+
+#define DNS_PACKET_SIZE_START 512
+
+struct DnsPacket {
+        int n_ref;
+        DnsProtocol protocol;
+        size_t size, allocated, rindex;
+        void *_data; /* don't access directly, use DNS_PACKET_DATA()! */
+        Hashmap *names; /* For name compression */
+
+        /* Parsed data */
+        DnsQuestion *question;
+        DnsAnswer *answer;
+
+        /* Packet reception meta data */
+        int ifindex;
+        int family, ipproto;
+        union in_addr_union sender, destination;
+        uint16_t sender_port, destination_port;
+        uint32_t ttl;
+
+        bool extracted;
+};
+
+static inline uint8_t* DNS_PACKET_DATA(DnsPacket *p) {
+        if (_unlikely_(!p))
+                return NULL;
+
+        if (p->_data)
+                return p->_data;
+
+        return ((uint8_t*) p) + ALIGN(sizeof(DnsPacket));
+}
+
+#define DNS_PACKET_HEADER(p) ((DnsPacketHeader*) DNS_PACKET_DATA(p))
+#define DNS_PACKET_ID(p) DNS_PACKET_HEADER(p)->id
+#define DNS_PACKET_QR(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 15) & 1)
+#define DNS_PACKET_OPCODE(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 11) & 15)
+#define DNS_PACKET_RCODE(p) (be16toh(DNS_PACKET_HEADER(p)->flags) & 15)
+#define DNS_PACKET_TC(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 9) & 1)
+#define DNS_PACKET_C(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 10) & 1)
+#define DNS_PACKET_T(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 8) & 1)
+#define DNS_PACKET_QDCOUNT(p) be16toh(DNS_PACKET_HEADER(p)->qdcount)
+#define DNS_PACKET_ANCOUNT(p) be16toh(DNS_PACKET_HEADER(p)->ancount)
+#define DNS_PACKET_NSCOUNT(p) be16toh(DNS_PACKET_HEADER(p)->nscount)
+#define DNS_PACKET_ARCOUNT(p) be16toh(DNS_PACKET_HEADER(p)->arcount)
+
+#define DNS_PACKET_MAKE_FLAGS(qr, opcode, aa, tc, rd, ra, ad, cd, rcode) \
+        (((uint16_t) !!qr << 15) |  \
+         ((uint16_t) (opcode & 15) << 11) | \
+         ((uint16_t) !!aa << 10) | \
+         ((uint16_t) !!tc << 9) | \
+         ((uint16_t) !!rd << 8) | \
+         ((uint16_t) !!ra << 7) | \
+         ((uint16_t) !!ad << 5) | \
+         ((uint16_t) !!cd << 4) | \
+         ((uint16_t) (rcode & 15)))
+
+static inline unsigned DNS_PACKET_RRCOUNT(DnsPacket *p) {
+        return
+                (unsigned) DNS_PACKET_ANCOUNT(p) +
+                (unsigned) DNS_PACKET_NSCOUNT(p) +
+                (unsigned) DNS_PACKET_ARCOUNT(p);
+}
+
+int dns_packet_new(DnsPacket **p, DnsProtocol protocol, size_t mtu);
+int dns_packet_new_query(DnsPacket **p, DnsProtocol protocol, size_t mtu);
+
+DnsPacket *dns_packet_ref(DnsPacket *p);
+DnsPacket *dns_packet_unref(DnsPacket *p);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsPacket*, dns_packet_unref);
+
+int dns_packet_validate(DnsPacket *p);
+int dns_packet_validate_reply(DnsPacket *p);
+int dns_packet_validate_query(DnsPacket *p);
+
+int dns_packet_append_blob(DnsPacket *p, const void *d, size_t sz, size_t *start);
+int dns_packet_append_uint8(DnsPacket *p, uint8_t v, size_t *start);
+int dns_packet_append_uint16(DnsPacket *p, uint16_t v, size_t *start);
+int dns_packet_append_uint32(DnsPacket *p, uint32_t v, size_t *start);
+int dns_packet_append_string(DnsPacket *p, const char *s, size_t *start);
+int dns_packet_append_label(DnsPacket *p, const char *s, size_t l, size_t *start);
+int dns_packet_append_name(DnsPacket *p, const char *name,
+                           bool allow_compression, size_t *start);
+int dns_packet_append_key(DnsPacket *p, const DnsResourceKey *key, size_t *start);
+int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, size_t *start);
+
+int dns_packet_read(DnsPacket *p, size_t sz, const void **ret, size_t *start);
+int dns_packet_read_blob(DnsPacket *p, void *d, size_t sz, size_t *start);
+int dns_packet_read_uint8(DnsPacket *p, uint8_t *ret, size_t *start);
+int dns_packet_read_uint16(DnsPacket *p, uint16_t *ret, size_t *start);
+int dns_packet_read_uint32(DnsPacket *p, uint32_t *ret, size_t *start);
+int dns_packet_read_string(DnsPacket *p, char **ret, size_t *start);
+int dns_packet_read_name(DnsPacket *p, char **ret,
+                         bool allow_compression, size_t *start);
+int dns_packet_read_key(DnsPacket *p, DnsResourceKey **ret, size_t *start);
+int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, size_t *start);
+
+void dns_packet_rewind(DnsPacket *p, size_t idx);
+
+int dns_packet_skip_question(DnsPacket *p);
+int dns_packet_extract(DnsPacket *p);
+
+enum {
+        DNS_RCODE_SUCCESS = 0,
+        DNS_RCODE_FORMERR = 1,
+        DNS_RCODE_SERVFAIL = 2,
+        DNS_RCODE_NXDOMAIN = 3,
+        DNS_RCODE_NOTIMP = 4,
+        DNS_RCODE_REFUSED = 5,
+        DNS_RCODE_YXDOMAIN = 6,
+        DNS_RCODE_YXRRSET = 7,
+        DNS_RCODE_NXRRSET = 8,
+        DNS_RCODE_NOTAUTH = 9,
+        DNS_RCODE_NOTZONE = 10,
+        DNS_RCODE_BADVERS = 16,
+        DNS_RCODE_BADSIG = 16, /* duplicate value! */
+        DNS_RCODE_BADKEY = 17,
+        DNS_RCODE_BADTIME = 18,
+        DNS_RCODE_BADMODE = 19,
+        DNS_RCODE_BADNAME = 20,
+        DNS_RCODE_BADALG = 21,
+        DNS_RCODE_BADTRUNC = 22,
+        _DNS_RCODE_MAX_DEFINED
+};
+
+const char* dns_rcode_to_string(int i) _const_;
+int dns_rcode_from_string(const char *s) _pure_;
+
+const char* dns_protocol_to_string(DnsProtocol p) _const_;
+DnsProtocol dns_protocol_from_string(const char *s) _pure_;
+
+#define LLMNR_MULTICAST_IPV4_ADDRESS ((struct in_addr) { .s_addr = htobe32(224U << 24 | 252U) })
+#define LLMNR_MULTICAST_IPV6_ADDRESS ((struct in6_addr) { .s6_addr = { 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03 } })
+
+#define DNSKEY_FLAG_ZONE_KEY (1u << 8)
+#define DNSKEY_FLAG_SEP      (1u << 0)
+
+static inline uint16_t dnskey_to_flags(const DnsResourceRecord *rr) {
+        return (rr->dnskey.zone_key_flag * DNSKEY_FLAG_ZONE_KEY |
+                rr->dnskey.sep_flag * DNSKEY_FLAG_SEP);
+}
+
+/* http://tools.ietf.org/html/rfc4034#appendix-A.1 */
+enum {
+        DNSSEC_ALGORITHM_RSAMD5 = 1,
+        DNSSEC_ALGORITHM_DH,
+        DNSSEC_ALGORITHM_DSA,
+        DNSSEC_ALGORITHM_ECC,
+        DNSSEC_ALGORITHM_RSASHA1,
+        DNSSEC_ALGORITHM_INDIRECT = 252,
+        DNSSEC_ALGORITHM_PRIVATEDNS,
+        DNSSEC_ALGORITHM_PRIVATEOID,
+        _DNSSEC_ALGORITHM_MAX_DEFINED
+};
+
+const char* dnssec_algorithm_to_string(int i) _const_;
+int dnssec_algorithm_from_string(const char *s) _pure_;
+
+static inline uint64_t SD_RESOLVED_FLAGS_MAKE(DnsProtocol protocol, int family) {
+
+        /* Converts a protocol + family into a flags field as used in queries */
+
+        if (protocol == DNS_PROTOCOL_DNS)
+                return SD_RESOLVED_DNS;
+
+        if (protocol == DNS_PROTOCOL_LLMNR)
+                return family == AF_INET6 ? SD_RESOLVED_LLMNR_IPV6 : SD_RESOLVED_LLMNR_IPV4;
+
+        return 0;
+}
diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c
new file mode 100644 (file)
index 0000000..f0483c9
--- /dev/null
@@ -0,0 +1,489 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "af-list.h"
+
+#include "resolved-dns-query.h"
+#include "resolved-dns-domain.h"
+
+/* How long to wait for the query in total */
+#define QUERY_TIMEOUT_USEC (30 * USEC_PER_SEC)
+
+#define CNAME_MAX 8
+#define QUERIES_MAX 2048
+
+static void dns_query_stop(DnsQuery *q) {
+        DnsTransaction *t;
+
+        assert(q);
+
+        q->timeout_event_source = sd_event_source_unref(q->timeout_event_source);
+
+        while ((t = set_steal_first(q->transactions))) {
+                set_remove(t->queries, q);
+                dns_transaction_gc(t);
+        }
+}
+
+DnsQuery *dns_query_free(DnsQuery *q) {
+        if (!q)
+                return NULL;
+
+        dns_query_stop(q);
+        set_free(q->transactions);
+
+        dns_question_unref(q->question);
+        dns_answer_unref(q->answer);
+
+        sd_bus_message_unref(q->request);
+        sd_bus_track_unref(q->bus_track);
+
+        if (q->manager) {
+                LIST_REMOVE(queries, q->manager->dns_queries, q);
+                q->manager->n_dns_queries--;
+        }
+
+        free(q);
+
+        return NULL;
+}
+
+int dns_query_new(Manager *m, DnsQuery **ret, DnsQuestion *question, int ifindex, uint64_t flags) {
+        _cleanup_(dns_query_freep) DnsQuery *q = NULL;
+        unsigned i;
+        int r;
+
+        assert(m);
+        assert(question);
+
+        r = dns_question_is_valid(question);
+        if (r < 0)
+                return r;
+
+        if (m->n_dns_queries >= QUERIES_MAX)
+                return -EBUSY;
+
+        q = new0(DnsQuery, 1);
+        if (!q)
+                return -ENOMEM;
+
+        q->question = dns_question_ref(question);
+        q->ifindex = ifindex;
+        q->flags = flags;
+
+        for (i = 0; i < question->n_keys; i++) {
+                _cleanup_free_ char *p;
+
+                r = dns_resource_key_to_string(question->keys[i], &p);
+                if (r < 0)
+                        return r;
+
+                log_debug("Looking up RR for %s", p);
+        }
+
+        LIST_PREPEND(queries, m->dns_queries, q);
+        m->n_dns_queries++;
+        q->manager = m;
+
+        if (ret)
+                *ret = q;
+        q = NULL;
+
+        return 0;
+}
+
+static void dns_query_complete(DnsQuery *q, DnsTransactionState state) {
+        assert(q);
+        assert(!IN_SET(state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING));
+        assert(IN_SET(q->state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING));
+
+        /* Note that this call might invalidate the query. Callers
+         * should hence not attempt to access the query or transaction
+         * after calling this function. */
+
+        q->state = state;
+
+        dns_query_stop(q);
+        if (q->complete)
+                q->complete(q);
+}
+
+static int on_query_timeout(sd_event_source *s, usec_t usec, void *userdata) {
+        DnsQuery *q = userdata;
+
+        assert(s);
+        assert(q);
+
+        dns_query_complete(q, DNS_TRANSACTION_TIMEOUT);
+        return 0;
+}
+
+static int dns_query_add_transaction(DnsQuery *q, DnsScope *s, DnsResourceKey *key) {
+        _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
+        DnsTransaction *t;
+        int r;
+
+        assert(q);
+        assert(s);
+
+        r = set_ensure_allocated(&q->transactions, NULL);
+        if (r < 0)
+                return r;
+
+        if (key) {
+                question = dns_question_new(1);
+                if (!question)
+                        return -ENOMEM;
+
+                r = dns_question_add(question, key);
+                if (r < 0)
+                        return r;
+        } else
+                question = dns_question_ref(q->question);
+
+        t = dns_scope_find_transaction(s, question, true);
+        if (!t) {
+                r = dns_transaction_new(&t, s, question);
+                if (r < 0)
+                        return r;
+        }
+
+        r = set_ensure_allocated(&t->queries, NULL);
+        if (r < 0)
+                goto gc;
+
+        r = set_put(t->queries, q);
+        if (r < 0)
+                goto gc;
+
+        r = set_put(q->transactions, t);
+        if (r < 0) {
+                set_remove(t->queries, q);
+                goto gc;
+        }
+
+        return 0;
+
+gc:
+        dns_transaction_gc(t);
+        return r;
+}
+
+static int dns_query_add_transaction_split(DnsQuery *q, DnsScope *s) {
+        int r;
+
+        assert(q);
+        assert(s);
+
+        if (s->protocol == DNS_PROTOCOL_MDNS) {
+                r = dns_query_add_transaction(q, s, NULL);
+                if (r < 0)
+                        return r;
+        } else {
+                unsigned i;
+
+                /* On DNS and LLMNR we can only send a single
+                 * question per datagram, hence issue multiple
+                 * transactions. */
+
+                for (i = 0; i < q->question->n_keys; i++) {
+                        r = dns_query_add_transaction(q, s, q->question->keys[i]);
+                        if (r < 0)
+                                return r;
+                }
+        }
+
+        return 0;
+}
+
+int dns_query_go(DnsQuery *q) {
+        DnsScopeMatch found = DNS_SCOPE_NO;
+        DnsScope *s, *first = NULL;
+        DnsTransaction *t;
+        const char *name;
+        Iterator i;
+        int r;
+
+        assert(q);
+
+        if (q->state != DNS_TRANSACTION_NULL)
+                return 0;
+
+        assert(q->question);
+        assert(q->question->n_keys > 0);
+
+        name = DNS_RESOURCE_KEY_NAME(q->question->keys[0]);
+
+        LIST_FOREACH(scopes, s, q->manager->dns_scopes) {
+                DnsScopeMatch match;
+
+                match = dns_scope_good_domain(s, q->ifindex, q->flags, name);
+                if (match < 0)
+                        return match;
+
+                if (match == DNS_SCOPE_NO)
+                        continue;
+
+                found = match;
+
+                if (match == DNS_SCOPE_YES) {
+                        first = s;
+                        break;
+                } else {
+                        assert(match == DNS_SCOPE_MAYBE);
+
+                        if (!first)
+                                first = s;
+                }
+        }
+
+        if (found == DNS_SCOPE_NO)
+                return -ESRCH;
+
+        r = dns_query_add_transaction_split(q, first);
+        if (r < 0)
+                goto fail;
+
+        LIST_FOREACH(scopes, s, first->scopes_next) {
+                DnsScopeMatch match;
+
+                match = dns_scope_good_domain(s, q->ifindex, q->flags, name);
+                if (match < 0)
+                        goto fail;
+
+                if (match != found)
+                        continue;
+
+                r = dns_query_add_transaction_split(q, s);
+                if (r < 0)
+                        goto fail;
+        }
+
+        q->answer = dns_answer_unref(q->answer);
+        q->answer_ifindex = 0;
+        q->answer_rcode = 0;
+        q->answer_family = AF_UNSPEC;
+        q->answer_protocol = _DNS_PROTOCOL_INVALID;
+
+        r = sd_event_add_time(
+                        q->manager->event,
+                        &q->timeout_event_source,
+                        clock_boottime_or_monotonic(),
+                        now(clock_boottime_or_monotonic()) + QUERY_TIMEOUT_USEC, 0,
+                        on_query_timeout, q);
+        if (r < 0)
+                goto fail;
+
+        q->state = DNS_TRANSACTION_PENDING;
+        q->block_ready++;
+
+        /* Start the transactions that are not started yet */
+        SET_FOREACH(t, q->transactions, i) {
+                if (t->state != DNS_TRANSACTION_NULL)
+                        continue;
+
+                r = dns_transaction_go(t);
+                if (r < 0)
+                        goto fail;
+        }
+
+        q->block_ready--;
+        dns_query_ready(q);
+
+        return 1;
+
+fail:
+        dns_query_stop(q);
+        return r;
+}
+
+void dns_query_ready(DnsQuery *q) {
+        DnsTransaction *t;
+        DnsTransactionState state = DNS_TRANSACTION_NO_SERVERS;
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL;
+        int rcode = 0;
+        DnsScope *scope = NULL;
+        bool pending = false;
+        Iterator i;
+
+        assert(q);
+        assert(IN_SET(q->state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING));
+
+        /* Note that this call might invalidate the query. Callers
+         * should hence not attempt to access the query or transaction
+         * after calling this function, unless the block_ready
+         * counter was explicitly bumped before doing so. */
+
+        if (q->block_ready > 0)
+                return;
+
+        SET_FOREACH(t, q->transactions, i) {
+
+                /* If we found a successful answer, ignore all answers from other scopes */
+                if (state == DNS_TRANSACTION_SUCCESS && t->scope != scope)
+                        continue;
+
+                /* One of the transactions is still going on, let's maybe wait for it */
+                if (IN_SET(t->state, DNS_TRANSACTION_PENDING, DNS_TRANSACTION_NULL)) {
+                        pending = true;
+                        continue;
+                }
+
+                /* One of the transactions is successful, let's use
+                 * it, and copy its data out */
+                if (t->state == DNS_TRANSACTION_SUCCESS) {
+                        DnsAnswer *a;
+
+                        if (t->received) {
+                                rcode = DNS_PACKET_RCODE(t->received);
+                                a = t->received->answer;
+                        } else {
+                                rcode = t->cached_rcode;
+                                a = t->cached;
+                        }
+
+                        if (state == DNS_TRANSACTION_SUCCESS) {
+                                DnsAnswer *merged;
+
+                                merged = dns_answer_merge(answer, a);
+                                if (!merged) {
+                                        dns_query_complete(q, DNS_TRANSACTION_RESOURCES);
+                                        return;
+                                }
+
+                                dns_answer_unref(answer);
+                                answer = merged;
+                        } else {
+                                dns_answer_unref(answer);
+                                answer = dns_answer_ref(a);
+                        }
+
+                        scope = t->scope;
+                        state = DNS_TRANSACTION_SUCCESS;
+                        continue;
+                }
+
+                /* One of the transactions has failed, let's see
+                 * whether we find anything better, but if not, return
+                 * its response data */
+                if (state != DNS_TRANSACTION_SUCCESS && t->state == DNS_TRANSACTION_FAILURE) {
+                        DnsAnswer *a;
+
+                        if (t->received) {
+                                rcode = DNS_PACKET_RCODE(t->received);
+                                a = t->received->answer;
+                        } else {
+                                rcode = t->cached_rcode;
+                                a = t->cached;
+                        }
+
+                        dns_answer_unref(answer);
+                        answer = dns_answer_ref(a);
+
+                        scope = t->scope;
+                        state = DNS_TRANSACTION_FAILURE;
+                        continue;
+                }
+
+                if (state == DNS_TRANSACTION_NO_SERVERS && t->state != DNS_TRANSACTION_NO_SERVERS)
+                        state = t->state;
+        }
+
+        if (pending) {
+
+                /* If so far we weren't successful, and there's
+                 * something still pending, then wait for it */
+                if (state != DNS_TRANSACTION_SUCCESS)
+                        return;
+
+                /* If we already were successful, then only wait for
+                 * other transactions on the same scope to finish. */
+                SET_FOREACH(t, q->transactions, i) {
+                        if (t->scope == scope && IN_SET(t->state, DNS_TRANSACTION_PENDING, DNS_TRANSACTION_NULL))
+                                return;
+                }
+        }
+
+        if (IN_SET(state, DNS_TRANSACTION_SUCCESS, DNS_TRANSACTION_FAILURE)) {
+                q->answer = dns_answer_ref(answer);
+                q->answer_rcode = rcode;
+                q->answer_ifindex = (scope && scope->link) ? scope->link->ifindex : 0;
+                q->answer_protocol = scope ? scope->protocol : _DNS_PROTOCOL_INVALID;
+                q->answer_family = scope ? scope->family : AF_UNSPEC;
+        }
+
+        dns_query_complete(q, state);
+}
+
+int dns_query_cname_redirect(DnsQuery *q, const char *name) {
+        _cleanup_(dns_question_unrefp) DnsQuestion *nq = NULL;
+        int r;
+
+        assert(q);
+
+        if (q->n_cname_redirects > CNAME_MAX)
+                return -ELOOP;
+
+        r = dns_question_cname_redirect(q->question, name, &nq);
+        if (r < 0)
+                return r;
+
+        dns_question_unref(q->question);
+        q->question = nq;
+        nq = NULL;
+
+        q->n_cname_redirects++;
+
+        dns_query_stop(q);
+        q->state = DNS_TRANSACTION_NULL;
+
+        return 0;
+}
+
+static int on_bus_track(sd_bus_track *t, void *userdata) {
+        DnsQuery *q = userdata;
+
+        assert(t);
+        assert(q);
+
+        log_debug("Client of active query vanished, aborting query.");
+        dns_query_complete(q, DNS_TRANSACTION_ABORTED);
+        return 0;
+}
+
+int dns_query_bus_track(DnsQuery *q, sd_bus *bus, sd_bus_message *m) {
+        int r;
+
+        assert(q);
+        assert(m);
+
+        if (!q->bus_track) {
+                r = sd_bus_track_new(bus, &q->bus_track, on_bus_track, q);
+                if (r < 0)
+                        return r;
+        }
+
+        r = sd_bus_track_add_sender(q->bus_track, m);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
diff --git a/src/resolve/resolved-dns-query.h b/src/resolve/resolved-dns-query.h
new file mode 100644 (file)
index 0000000..13b3ee4
--- /dev/null
@@ -0,0 +1,86 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <inttypes.h>
+
+#include "sd-bus.h"
+#include "util.h"
+#include "set.h"
+
+typedef struct DnsQuery DnsQuery;
+
+#include "resolved-dns-scope.h"
+#include "resolved-dns-rr.h"
+#include "resolved-dns-question.h"
+#include "resolved-dns-answer.h"
+#include "resolved-dns-stream.h"
+#include "resolved-dns-transaction.h"
+#include "resolved-manager.h"
+
+struct DnsQuery {
+        Manager *manager;
+        DnsQuestion *question;
+
+        uint64_t flags;
+        int ifindex;
+
+        DnsTransactionState state;
+        unsigned n_cname_redirects;
+
+        sd_event_source *timeout_event_source;
+
+        /* Discovered data */
+        DnsAnswer *answer;
+        int answer_ifindex;
+        int answer_family;
+        DnsProtocol answer_protocol;
+        int answer_rcode;
+
+        /* Bus client information */
+        sd_bus_message *request;
+        int request_family;
+        const char *request_hostname;
+        union in_addr_union request_address;
+
+        /* Completion callback */
+        void (*complete)(DnsQuery* q);
+        unsigned block_ready;
+
+        Set *transactions;
+
+        sd_bus_track *bus_track;
+
+        LIST_FIELDS(DnsQuery, queries);
+};
+
+int dns_query_new(Manager *m, DnsQuery **q, DnsQuestion *question, int family, uint64_t flags);
+DnsQuery *dns_query_free(DnsQuery *q);
+
+int dns_query_go(DnsQuery *q);
+void dns_query_ready(DnsQuery *q);
+
+int dns_query_cname_redirect(DnsQuery *q, const char *name);
+
+int dns_query_bus_track(DnsQuery *q, sd_bus *bus, sd_bus_message *m);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuery*, dns_query_free);
diff --git a/src/resolve/resolved-dns-question.c b/src/resolve/resolved-dns-question.c
new file mode 100644 (file)
index 0000000..45bcbbf
--- /dev/null
@@ -0,0 +1,274 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "resolved-dns-question.h"
+#include "resolved-dns-domain.h"
+
+DnsQuestion *dns_question_new(unsigned n) {
+        DnsQuestion *q;
+
+        assert(n > 0);
+
+        q = malloc0(offsetof(DnsQuestion, keys) + sizeof(DnsResourceKey*) * n);
+        if (!q)
+                return NULL;
+
+        q->n_ref = 1;
+        q->n_allocated = n;
+
+        return q;
+}
+
+DnsQuestion *dns_question_ref(DnsQuestion *q) {
+        if (!q)
+                return NULL;
+
+        assert(q->n_ref > 0);
+        q->n_ref++;
+        return q;
+}
+
+DnsQuestion *dns_question_unref(DnsQuestion *q) {
+        if (!q)
+                return NULL;
+
+        assert(q->n_ref > 0);
+
+        if (q->n_ref == 1) {
+                unsigned i;
+
+                for (i = 0; i < q->n_keys; i++)
+                        dns_resource_key_unref(q->keys[i]);
+                free(q);
+        } else
+                q->n_ref--;
+
+        return  NULL;
+}
+
+int dns_question_add(DnsQuestion *q, DnsResourceKey *key) {
+        unsigned i;
+        int r;
+
+        assert(q);
+        assert(key);
+
+        for (i = 0; i < q->n_keys; i++) {
+                r = dns_resource_key_equal(q->keys[i], key);
+                if (r < 0)
+                        return r;
+                if (r > 0)
+                        return 0;
+        }
+
+        if (q->n_keys >= q->n_allocated)
+                return -ENOSPC;
+
+        q->keys[q->n_keys++] = dns_resource_key_ref(key);
+        return 0;
+}
+
+int dns_question_matches_rr(DnsQuestion *q, DnsResourceRecord *rr) {
+        unsigned i;
+        int r;
+
+        assert(q);
+        assert(rr);
+
+        for (i = 0; i < q->n_keys; i++) {
+                r = dns_resource_key_match_rr(q->keys[i], rr);
+                if (r != 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+int dns_question_matches_cname(DnsQuestion *q, DnsResourceRecord *rr) {
+        unsigned i;
+        int r;
+
+        assert(q);
+        assert(rr);
+
+        for (i = 0; i < q->n_keys; i++) {
+                r = dns_resource_key_match_cname(q->keys[i], rr);
+                if (r != 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+int dns_question_is_valid(DnsQuestion *q) {
+        const char *name;
+        unsigned i;
+        int r;
+
+        assert(q);
+
+        if (q->n_keys <= 0)
+                return 0;
+
+        if (q->n_keys > 65535)
+                return 0;
+
+        name = DNS_RESOURCE_KEY_NAME(q->keys[0]);
+        if (!name)
+                return 0;
+
+        /* Check that all keys in this question bear the same name */
+        for (i = 1; i < q->n_keys; i++) {
+                assert(q->keys[i]);
+
+                r = dns_name_equal(DNS_RESOURCE_KEY_NAME(q->keys[i]), name);
+                if (r <= 0)
+                        return r;
+        }
+
+        return 1;
+}
+
+int dns_question_is_superset(DnsQuestion *q, DnsQuestion *other) {
+        unsigned j;
+        int r;
+
+        assert(q);
+        assert(other);
+
+        /* Checks if all keys in "other" are also contained in "q" */
+
+        for (j = 0; j < other->n_keys; j++) {
+                DnsResourceKey *b = other->keys[j];
+                bool found = false;
+                unsigned i;
+
+                for (i = 0; i < q->n_keys; i++) {
+                        DnsResourceKey *a = q->keys[i];
+
+                        r = dns_name_equal(DNS_RESOURCE_KEY_NAME(a), DNS_RESOURCE_KEY_NAME(b));
+                        if (r < 0)
+                                return r;
+
+                        if (r == 0)
+                                continue;
+
+                        if (a->class != b->class && a->class != DNS_CLASS_ANY)
+                                continue;
+
+                        if (a->type != b->type && a->type != DNS_TYPE_ANY)
+                                continue;
+
+                        found = true;
+                        break;
+                }
+
+                if (!found)
+                        return 0;
+        }
+
+        return 1;
+}
+
+int dns_question_cname_redirect(DnsQuestion *q, const char *name, DnsQuestion **ret) {
+        _cleanup_(dns_question_unrefp) DnsQuestion *n = NULL;
+        bool same = true;
+        unsigned i;
+        int r;
+
+        assert(q);
+        assert(name);
+        assert(ret);
+
+        for (i = 0; i < q->n_keys; i++) {
+                r = dns_name_equal(DNS_RESOURCE_KEY_NAME(q->keys[i]), name);
+                if (r < 0)
+                        return r;
+
+                if (r == 0) {
+                        same = false;
+                        break;
+                }
+        }
+
+        if (same) {
+                /* Shortcut, the names are already right */
+                *ret = dns_question_ref(q);
+                return 0;
+        }
+
+        n = dns_question_new(q->n_keys);
+        if (!n)
+                return -ENOMEM;
+
+        /* Create a new question, and patch in the new name */
+        for (i = 0; i < q->n_keys; i++) {
+                _cleanup_(dns_resource_key_unrefp) DnsResourceKey *k = NULL;
+
+                k = dns_resource_key_new(q->keys[i]->class, q->keys[i]->type, name);
+                if (!k)
+                        return -ENOMEM;
+
+                r = dns_question_add(n, k);
+                if (r < 0)
+                        return r;
+        }
+
+        *ret = n;
+        n = NULL;
+
+        return 1;
+}
+
+int dns_question_endswith(DnsQuestion *q, const char *suffix) {
+        unsigned i;
+
+        assert(q);
+        assert(suffix);
+
+        for (i = 0; i < q->n_keys; i++) {
+                int k;
+
+                k = dns_name_endswith(DNS_RESOURCE_KEY_NAME(q->keys[i]), suffix);
+                if (k <= 0)
+                        return k;
+        }
+
+        return 1;
+}
+
+int dns_question_extract_reverse_address(DnsQuestion *q, int *family, union in_addr_union *address) {
+        unsigned i;
+
+        assert(q);
+        assert(family);
+        assert(address);
+
+        for (i = 0; i < q->n_keys; i++) {
+                int k;
+
+                k = dns_name_address(DNS_RESOURCE_KEY_NAME(q->keys[i]), family, address);
+                if (k != 0)
+                        return k;
+        }
+
+        return 0;
+}
diff --git a/src/resolve/resolved-dns-question.h b/src/resolve/resolved-dns-question.h
new file mode 100644 (file)
index 0000000..4ba2fe9
--- /dev/null
@@ -0,0 +1,52 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+typedef struct DnsQuestion DnsQuestion;
+
+#include "resolved-dns-rr.h"
+
+/* A simple array of resources keys */
+
+struct DnsQuestion {
+        unsigned n_ref;
+        unsigned n_keys, n_allocated;
+        DnsResourceKey* keys[0];
+};
+
+DnsQuestion *dns_question_new(unsigned n);
+DnsQuestion *dns_question_ref(DnsQuestion *q);
+DnsQuestion *dns_question_unref(DnsQuestion *q);
+
+int dns_question_add(DnsQuestion *q, DnsResourceKey *key);
+
+int dns_question_matches_rr(DnsQuestion *q, DnsResourceRecord *rr);
+int dns_question_matches_cname(DnsQuestion *q, DnsResourceRecord *rr);
+int dns_question_is_valid(DnsQuestion *q);
+int dns_question_is_superset(DnsQuestion *q, DnsQuestion *other);
+
+int dns_question_cname_redirect(DnsQuestion *q, const char *name, DnsQuestion **ret);
+
+int dns_question_endswith(DnsQuestion *q, const char *suffix);
+int dns_question_extract_reverse_address(DnsQuestion *q, int *family, union in_addr_union *address);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuestion*, dns_question_unref);
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
new file mode 100644 (file)
index 0000000..fd5ecf4
--- /dev/null
@@ -0,0 +1,704 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <math.h>
+
+#include "strv.h"
+
+#include "resolved-dns-domain.h"
+#include "resolved-dns-rr.h"
+#include "resolved-dns-packet.h"
+#include "dns-type.h"
+
+DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *name) {
+        DnsResourceKey *k;
+        size_t l;
+
+        assert(name);
+
+        l = strlen(name);
+        k = malloc0(sizeof(DnsResourceKey) + l + 1);
+        if (!k)
+                return NULL;
+
+        k->n_ref = 1;
+        k->class = class;
+        k->type = type;
+
+        strcpy((char*) k + sizeof(DnsResourceKey), name);
+
+        return k;
+}
+
+DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char *name) {
+        DnsResourceKey *k;
+
+        assert(name);
+
+        k = new0(DnsResourceKey, 1);
+        if (!k)
+                return NULL;
+
+        k->n_ref = 1;
+        k->class = class;
+        k->type = type;
+        k->_name = name;
+
+        return k;
+}
+
+DnsResourceKey* dns_resource_key_ref(DnsResourceKey *k) {
+
+        if (!k)
+                return NULL;
+
+        assert(k->n_ref > 0);
+        k->n_ref++;
+
+        return k;
+}
+
+DnsResourceKey* dns_resource_key_unref(DnsResourceKey *k) {
+        if (!k)
+                return NULL;
+
+        assert(k->n_ref > 0);
+
+        if (k->n_ref == 1) {
+                free(k->_name);
+                free(k);
+        } else
+                k->n_ref--;
+
+        return NULL;
+}
+
+int dns_resource_key_equal(const DnsResourceKey *a, const DnsResourceKey *b) {
+        int r;
+
+        r = dns_name_equal(DNS_RESOURCE_KEY_NAME(a), DNS_RESOURCE_KEY_NAME(b));
+        if (r <= 0)
+                return r;
+
+        if (a->class != b->class)
+                return 0;
+
+        if (a->type != b->type)
+                return 0;
+
+        return 1;
+}
+
+int dns_resource_key_match_rr(const DnsResourceKey *key, const DnsResourceRecord *rr) {
+        assert(key);
+        assert(rr);
+
+        if (rr->key->class != key->class && key->class != DNS_CLASS_ANY)
+                return 0;
+
+        if (rr->key->type != key->type && key->type != DNS_TYPE_ANY)
+                return 0;
+
+        return dns_name_equal(DNS_RESOURCE_KEY_NAME(rr->key), DNS_RESOURCE_KEY_NAME(key));
+}
+
+int dns_resource_key_match_cname(const DnsResourceKey *key, const DnsResourceRecord *rr) {
+        assert(key);
+        assert(rr);
+
+        if (rr->key->class != key->class && key->class != DNS_CLASS_ANY)
+                return 0;
+
+        if (rr->key->type != DNS_TYPE_CNAME)
+                return 0;
+
+        return dns_name_equal(DNS_RESOURCE_KEY_NAME(rr->key), DNS_RESOURCE_KEY_NAME(key));
+}
+
+static unsigned long dns_resource_key_hash_func(const void *i, const uint8_t hash_key[HASH_KEY_SIZE]) {
+        const DnsResourceKey *k = i;
+        unsigned long ul;
+
+        ul = dns_name_hash_func(DNS_RESOURCE_KEY_NAME(k), hash_key);
+        ul = ul * hash_key[0] + ul + k->class;
+        ul = ul * hash_key[1] + ul + k->type;
+
+        return ul;
+}
+
+static int dns_resource_key_compare_func(const void *a, const void *b) {
+        const DnsResourceKey *x = a, *y = b;
+        int ret;
+
+        ret = dns_name_compare_func(DNS_RESOURCE_KEY_NAME(x), DNS_RESOURCE_KEY_NAME(y));
+        if (ret != 0)
+                return ret;
+
+        if (x->type < y->type)
+                return -1;
+        if (x->type > y->type)
+                return 1;
+
+        if (x->class < y->class)
+                return -1;
+        if (x->class > y->class)
+                return 1;
+
+        return 0;
+}
+
+const struct hash_ops dns_resource_key_hash_ops = {
+        .hash = dns_resource_key_hash_func,
+        .compare = dns_resource_key_compare_func
+};
+
+int dns_resource_key_to_string(const DnsResourceKey *key, char **ret) {
+        char cbuf[DECIMAL_STR_MAX(uint16_t)], tbuf[DECIMAL_STR_MAX(uint16_t)];
+        const char *c, *t;
+        char *s;
+
+        c = dns_class_to_string(key->class);
+        if (!c) {
+                sprintf(cbuf, "%i", key->class);
+                c = cbuf;
+        }
+
+        t = dns_type_to_string(key->type);
+        if (!t){
+                sprintf(tbuf, "%i", key->type);
+                t = tbuf;
+        }
+
+        if (asprintf(&s, "%s %s %-5s", DNS_RESOURCE_KEY_NAME(key), c, t) < 0)
+                return -ENOMEM;
+
+        *ret = s;
+        return 0;
+}
+
+DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key) {
+        DnsResourceRecord *rr;
+
+        rr = new0(DnsResourceRecord, 1);
+        if (!rr)
+                return NULL;
+
+        rr->n_ref = 1;
+        rr->key = dns_resource_key_ref(key);
+
+        return rr;
+}
+
+DnsResourceRecord* dns_resource_record_new_full(uint16_t class, uint16_t type, const char *name) {
+        _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+
+        key = dns_resource_key_new(class, type, name);
+        if (!key)
+                return NULL;
+
+        return dns_resource_record_new(key);
+}
+
+DnsResourceRecord* dns_resource_record_ref(DnsResourceRecord *rr) {
+        if (!rr)
+                return NULL;
+
+        assert(rr->n_ref > 0);
+        rr->n_ref++;
+
+        return rr;
+}
+
+DnsResourceRecord* dns_resource_record_unref(DnsResourceRecord *rr) {
+        if (!rr)
+                return NULL;
+
+        assert(rr->n_ref > 0);
+
+        if (rr->n_ref > 1) {
+                rr->n_ref--;
+                return NULL;
+        }
+
+        if (rr->key) {
+                switch(rr->key->type) {
+
+                case DNS_TYPE_SRV:
+                        free(rr->srv.name);
+                        break;
+
+                case DNS_TYPE_PTR:
+                case DNS_TYPE_NS:
+                case DNS_TYPE_CNAME:
+                case DNS_TYPE_DNAME:
+                        free(rr->ptr.name);
+                        break;
+
+                case DNS_TYPE_HINFO:
+                        free(rr->hinfo.cpu);
+                        free(rr->hinfo.os);
+                        break;
+
+                case DNS_TYPE_TXT:
+                case DNS_TYPE_SPF:
+                        strv_free(rr->txt.strings);
+                        break;
+
+                case DNS_TYPE_SOA:
+                        free(rr->soa.mname);
+                        free(rr->soa.rname);
+                        break;
+
+                case DNS_TYPE_MX:
+                        free(rr->mx.exchange);
+                        break;
+
+                case DNS_TYPE_SSHFP:
+                        free(rr->sshfp.key);
+                        break;
+
+                case DNS_TYPE_DNSKEY:
+                        free(rr->dnskey.key);
+                        break;
+
+                case DNS_TYPE_RRSIG:
+                        free(rr->rrsig.signer);
+                        free(rr->rrsig.signature);
+                        break;
+
+                case DNS_TYPE_LOC:
+                case DNS_TYPE_A:
+                case DNS_TYPE_AAAA:
+                        break;
+
+                default:
+                        free(rr->generic.data);
+                }
+
+                dns_resource_key_unref(rr->key);
+        }
+
+        free(rr);
+
+        return NULL;
+}
+
+int dns_resource_record_new_reverse(DnsResourceRecord **ret, int family, const union in_addr_union *address, const char *hostname) {
+        _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+        _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
+        _cleanup_free_ char *ptr = NULL;
+        int r;
+
+        assert(ret);
+        assert(address);
+        assert(hostname);
+
+        r = dns_name_reverse(family, address, &ptr);
+        if (r < 0)
+                return r;
+
+        key = dns_resource_key_new_consume(DNS_CLASS_IN, DNS_TYPE_PTR, ptr);
+        if (!key)
+                return -ENOMEM;
+
+        ptr = NULL;
+
+        rr = dns_resource_record_new(key);
+        if (!rr)
+                return -ENOMEM;
+
+        rr->ptr.name = strdup(hostname);
+        if (!rr->ptr.name)
+                return -ENOMEM;
+
+        *ret = rr;
+        rr = NULL;
+
+        return 0;
+}
+
+int dns_resource_record_equal(const DnsResourceRecord *a, const DnsResourceRecord *b) {
+        int r;
+
+        assert(a);
+        assert(b);
+
+        r = dns_resource_key_equal(a->key, b->key);
+        if (r <= 0)
+                return r;
+
+        if (a->unparseable != b->unparseable)
+                return 0;
+
+        switch (a->unparseable ? _DNS_TYPE_INVALID : a->key->type) {
+
+        case DNS_TYPE_SRV:
+                r = dns_name_equal(a->srv.name, b->srv.name);
+                if (r <= 0)
+                        return r;
+
+                return a->srv.priority == b->srv.priority &&
+                       a->srv.weight == b->srv.weight &&
+                       a->srv.port == b->srv.port;
+
+        case DNS_TYPE_PTR:
+        case DNS_TYPE_NS:
+        case DNS_TYPE_CNAME:
+        case DNS_TYPE_DNAME:
+                return dns_name_equal(a->ptr.name, b->ptr.name);
+
+        case DNS_TYPE_HINFO:
+                return strcaseeq(a->hinfo.cpu, b->hinfo.cpu) &&
+                       strcaseeq(a->hinfo.os, b->hinfo.os);
+
+        case DNS_TYPE_SPF: /* exactly the same as TXT */
+        case DNS_TYPE_TXT: {
+                int i;
+
+                for (i = 0; a->txt.strings[i] || b->txt.strings[i]; i++)
+                        if (!streq_ptr(a->txt.strings[i], b->txt.strings[i]))
+                                return false;
+                return true;
+        }
+
+        case DNS_TYPE_A:
+                return memcmp(&a->a.in_addr, &b->a.in_addr, sizeof(struct in_addr)) == 0;
+
+        case DNS_TYPE_AAAA:
+                return memcmp(&a->aaaa.in6_addr, &b->aaaa.in6_addr, sizeof(struct in6_addr)) == 0;
+
+        case DNS_TYPE_SOA:
+                r = dns_name_equal(a->soa.mname, b->soa.mname);
+                if (r <= 0)
+                        return r;
+                r = dns_name_equal(a->soa.rname, b->soa.rname);
+                if (r <= 0)
+                        return r;
+
+                return a->soa.serial  == b->soa.serial &&
+                       a->soa.refresh == b->soa.refresh &&
+                       a->soa.retry   == b->soa.retry &&
+                       a->soa.expire  == b->soa.expire &&
+                       a->soa.minimum == b->soa.minimum;
+
+        case DNS_TYPE_MX:
+                if (a->mx.priority != b->mx.priority)
+                        return 0;
+
+                return dns_name_equal(a->mx.exchange, b->mx.exchange);
+
+        case DNS_TYPE_LOC:
+                assert(a->loc.version == b->loc.version);
+
+                return a->loc.size == b->loc.size &&
+                       a->loc.horiz_pre == b->loc.horiz_pre &&
+                       a->loc.vert_pre == b->loc.vert_pre &&
+                       a->loc.latitude == b->loc.latitude &&
+                       a->loc.longitude == b->loc.longitude &&
+                       a->loc.altitude == b->loc.altitude;
+
+        case DNS_TYPE_SSHFP:
+                return a->sshfp.algorithm == b->sshfp.algorithm &&
+                       a->sshfp.fptype == b->sshfp.fptype &&
+                       a->sshfp.key_size == b->sshfp.key_size &&
+                       memcmp(a->sshfp.key, b->sshfp.key, a->sshfp.key_size) == 0;
+
+        case DNS_TYPE_DNSKEY:
+                return a->dnskey.zone_key_flag == b->dnskey.zone_key_flag &&
+                       a->dnskey.sep_flag == b->dnskey.sep_flag &&
+                       a->dnskey.algorithm == b->dnskey.algorithm &&
+                       a->dnskey.key_size == b->dnskey.key_size &&
+                       memcmp(a->dnskey.key, b->dnskey.key, a->dnskey.key_size) == 0;
+
+        case DNS_TYPE_RRSIG:
+                /* do the fast comparisons first */
+                if (a->rrsig.type_covered != b->rrsig.type_covered ||
+                    a->rrsig.algorithm != b->rrsig.algorithm ||
+                    a->rrsig.labels != b->rrsig.labels ||
+                    a->rrsig.original_ttl != b->rrsig.original_ttl ||
+                    a->rrsig.expiration != b->rrsig.expiration ||
+                    a->rrsig.inception != b->rrsig.inception ||
+                    a->rrsig.key_tag != b->rrsig.key_tag ||
+                    a->rrsig.signature_size != b->rrsig.signature_size ||
+                    memcmp(a->rrsig.signature, b->rrsig.signature, a->rrsig.signature_size) != 0)
+                        return false;
+
+                return dns_name_equal(a->rrsig.signer, b->rrsig.signer);
+
+        default:
+                return a->generic.size == b->generic.size &&
+                        memcmp(a->generic.data, b->generic.data, a->generic.size) == 0;
+        }
+}
+
+static char* format_location(uint32_t latitude, uint32_t longitude, uint32_t altitude,
+                             uint8_t size, uint8_t horiz_pre, uint8_t vert_pre) {
+        char *s;
+        char NS = latitude >= 1U<<31 ? 'N' : 'S';
+        char EW = longitude >= 1U<<31 ? 'E' : 'W';
+
+        int lat = latitude >= 1U<<31 ? (int) (latitude - (1U<<31)) : (int) ((1U<<31) - latitude);
+        int lon = longitude >= 1U<<31 ? (int) (longitude - (1U<<31)) : (int) ((1U<<31) - longitude);
+        double alt = altitude >= 10000000u ? altitude - 10000000u : -(double)(10000000u - altitude);
+        double siz = (size >> 4) * exp10((double) (size & 0xF));
+        double hor = (horiz_pre >> 4) * exp10((double) (horiz_pre & 0xF));
+        double ver = (vert_pre >> 4) * exp10((double) (vert_pre & 0xF));
+
+        if (asprintf(&s, "%d %d %.3f %c %d %d %.3f %c %.2fm %.2fm %.2fm %.2fm",
+                     (lat / 60000 / 60),
+                     (lat / 60000) % 60,
+                     (lat % 60000) / 1000.,
+                     NS,
+                     (lon / 60000 / 60),
+                     (lon / 60000) % 60,
+                     (lon % 60000) / 1000.,
+                     EW,
+                     alt / 100.,
+                     siz / 100.,
+                     hor / 100.,
+                     ver / 100.) < 0)
+                return NULL;
+
+        return s;
+}
+
+int dns_resource_record_to_string(const DnsResourceRecord *rr, char **ret) {
+        _cleanup_free_ char *k = NULL, *t = NULL;
+        char *s;
+        int r;
+
+        assert(rr);
+
+        r = dns_resource_key_to_string(rr->key, &k);
+        if (r < 0)
+                return r;
+
+        switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) {
+
+        case DNS_TYPE_SRV:
+                r = asprintf(&s, "%s %u %u %u %s",
+                             k,
+                             rr->srv.priority,
+                             rr->srv.weight,
+                             rr->srv.port,
+                             strna(rr->srv.name));
+                if (r < 0)
+                        return -ENOMEM;
+                break;
+
+        case DNS_TYPE_PTR:
+        case DNS_TYPE_NS:
+        case DNS_TYPE_CNAME:
+        case DNS_TYPE_DNAME:
+                s = strjoin(k, " ", rr->ptr.name, NULL);
+                if (!s)
+                        return -ENOMEM;
+
+                break;
+
+        case DNS_TYPE_HINFO:
+                s = strjoin(k, " ", rr->hinfo.cpu, " ", rr->hinfo.os, NULL);
+                if (!s)
+                        return -ENOMEM;
+                break;
+
+        case DNS_TYPE_SPF: /* exactly the same as TXT */
+        case DNS_TYPE_TXT:
+                t = strv_join_quoted(rr->txt.strings);
+                if (!t)
+                        return -ENOMEM;
+
+                s = strjoin(k, " ", t, NULL);
+                if (!s)
+                        return -ENOMEM;
+
+                break;
+
+        case DNS_TYPE_A: {
+                _cleanup_free_ char *x = NULL;
+
+                r = in_addr_to_string(AF_INET, (const union in_addr_union*) &rr->a.in_addr, &x);
+                if (r < 0)
+                        return r;
+
+                s = strjoin(k, " ", x, NULL);
+                if (!s)
+                        return -ENOMEM;
+                break;
+        }
+
+        case DNS_TYPE_AAAA:
+                r = in_addr_to_string(AF_INET6, (const union in_addr_union*) &rr->aaaa.in6_addr, &t);
+                if (r < 0)
+                        return r;
+
+                s = strjoin(k, " ", t, NULL);
+                if (!s)
+                        return -ENOMEM;
+                break;
+
+        case DNS_TYPE_SOA:
+                r = asprintf(&s, "%s %s %s %u %u %u %u %u",
+                             k,
+                             strna(rr->soa.mname),
+                             strna(rr->soa.rname),
+                             rr->soa.serial,
+                             rr->soa.refresh,
+                             rr->soa.retry,
+                             rr->soa.expire,
+                             rr->soa.minimum);
+                if (r < 0)
+                        return -ENOMEM;
+                break;
+
+        case DNS_TYPE_MX:
+                r = asprintf(&s, "%s %u %s",
+                             k,
+                             rr->mx.priority,
+                             rr->mx.exchange);
+                if (r < 0)
+                        return -ENOMEM;
+                break;
+
+        case DNS_TYPE_LOC:
+                assert(rr->loc.version == 0);
+
+                t = format_location(rr->loc.latitude,
+                                    rr->loc.longitude,
+                                    rr->loc.altitude,
+                                    rr->loc.size,
+                                    rr->loc.horiz_pre,
+                                    rr->loc.vert_pre);
+                if (!t)
+                        return -ENOMEM;
+
+                s = strjoin(k, " ", t, NULL);
+                if (!s)
+                        return -ENOMEM;
+                break;
+
+        case DNS_TYPE_SSHFP:
+                t = hexmem(rr->sshfp.key, rr->sshfp.key_size);
+                if (!t)
+                        return -ENOMEM;
+
+                r = asprintf(&s, "%s %u %u %s",
+                             k,
+                             rr->sshfp.algorithm,
+                             rr->sshfp.fptype,
+                             t);
+                if (r < 0)
+                        return -ENOMEM;
+                break;
+
+        case DNS_TYPE_DNSKEY: {
+                const char *alg;
+
+                alg = dnssec_algorithm_to_string(rr->dnskey.algorithm);
+
+                t = hexmem(rr->dnskey.key, rr->dnskey.key_size);
+                if (!t)
+                        return -ENOMEM;
+
+                r = asprintf(&s, "%s %u 3 %.*s%.*u %s",
+                             k,
+                             dnskey_to_flags(rr),
+                             alg ? -1 : 0, alg,
+                             alg ? 0 : 1, alg ? 0u : (unsigned) rr->dnskey.algorithm,
+                             t);
+                if (r < 0)
+                        return -ENOMEM;
+                break;
+        }
+
+        case DNS_TYPE_RRSIG: {
+                const char *type, *alg;
+
+                type = dns_type_to_string(rr->rrsig.type_covered);
+                alg = dnssec_algorithm_to_string(rr->rrsig.algorithm);
+
+                t = hexmem(rr->rrsig.signature, rr->rrsig.signature_size);
+                if (!t)
+                        return -ENOMEM;
+
+                /* TYPE?? follows
+                 * http://tools.ietf.org/html/rfc3597#section-5 */
+
+                r = asprintf(&s, "%s %s%.*u %.*s%.*u %u %u %u %u %u %s %s",
+                             k,
+                             type ?: "TYPE",
+                             type ? 0 : 1, type ? 0u : (unsigned) rr->rrsig.type_covered,
+                             alg ? -1 : 0, alg,
+                             alg ? 0 : 1, alg ? 0u : (unsigned) rr->rrsig.algorithm,
+                             rr->rrsig.labels,
+                             rr->rrsig.original_ttl,
+                             rr->rrsig.expiration,
+                             rr->rrsig.inception,
+                             rr->rrsig.key_tag,
+                             rr->rrsig.signer,
+                             t);
+                if (r < 0)
+                        return -ENOMEM;
+                break;
+        }
+
+        default:
+                t = hexmem(rr->generic.data, rr->generic.size);
+                if (!t)
+                        return -ENOMEM;
+
+                s = strjoin(k, " ", t, NULL);
+                if (!s)
+                        return -ENOMEM;
+                break;
+        }
+
+        *ret = s;
+        return 0;
+}
+
+const char *dns_class_to_string(uint16_t class) {
+
+        switch (class) {
+
+        case DNS_CLASS_IN:
+                return "IN";
+
+        case DNS_CLASS_ANY:
+                return "ANY";
+        }
+
+        return NULL;
+}
+
+int dns_class_from_string(const char *s, uint16_t *class) {
+        assert(s);
+        assert(class);
+
+        if (strcaseeq(s, "IN"))
+                *class = DNS_CLASS_IN;
+        else if (strcaseeq(s, "ANY"))
+                *class = DNS_TYPE_ANY;
+        else
+                return -EINVAL;
+
+        return 0;
+}
diff --git a/src/resolve/resolved-dns-rr.h b/src/resolve/resolved-dns-rr.h
new file mode 100644 (file)
index 0000000..9d9a89d
--- /dev/null
@@ -0,0 +1,177 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+ ***/
+
+#include <inttypes.h>
+#include <netinet/in.h>
+
+#include "util.h"
+#include "hashmap.h"
+#include "in-addr-util.h"
+#include "dns-type.h"
+
+typedef struct DnsResourceKey DnsResourceKey;
+typedef struct DnsResourceRecord DnsResourceRecord;
+
+/* DNS record classes, see RFC 1035 */
+enum {
+        DNS_CLASS_IN   = 0x01,
+        DNS_CLASS_ANY  = 0xFF,
+        _DNS_CLASS_MAX,
+        _DNS_CLASS_INVALID = -1
+};
+
+struct DnsResourceKey {
+        unsigned n_ref;
+        uint16_t class, type;
+        char *_name; /* don't access directy, use DNS_RESOURCE_KEY_NAME()! */
+};
+
+struct DnsResourceRecord {
+        unsigned n_ref;
+        DnsResourceKey *key;
+        uint32_t ttl;
+        bool unparseable;
+        union {
+                struct {
+                        void *data;
+                        uint16_t size;
+                } generic;
+
+                struct {
+                        uint16_t priority;
+                        uint16_t weight;
+                        uint16_t port;
+                        char *name;
+                } srv;
+
+                struct {
+                        char *name;
+                } ptr, ns, cname, dname;
+
+                struct {
+                        char *cpu;
+                        char *os;
+                } hinfo;
+
+                struct {
+                        char **strings;
+                } txt, spf;
+
+                struct {
+                        struct in_addr in_addr;
+                } a;
+
+                struct {
+                        struct in6_addr in6_addr;
+                } aaaa;
+
+                struct {
+                        char *mname;
+                        char *rname;
+                        uint32_t serial;
+                        uint32_t refresh;
+                        uint32_t retry;
+                        uint32_t expire;
+                        uint32_t minimum;
+                } soa;
+
+                struct {
+                        uint16_t priority;
+                        char *exchange;
+                } mx;
+
+                struct {
+                        uint8_t version;
+                        uint8_t size;
+                        uint8_t horiz_pre;
+                        uint8_t vert_pre;
+                        uint32_t latitude;
+                        uint32_t longitude;
+                        uint32_t altitude;
+                } loc;
+
+                struct {
+                        uint8_t algorithm;
+                        uint8_t fptype;
+                        void *key;
+                        size_t key_size;
+                } sshfp;
+
+                /* http://tools.ietf.org/html/rfc4034#section-2.1 */
+                struct {
+                        bool zone_key_flag:1;
+                        bool sep_flag:1;
+                        uint8_t algorithm;
+                        void* key;
+                        size_t key_size;
+                } dnskey;
+
+                /* http://tools.ietf.org/html/rfc4034#section-3.1 */
+                struct {
+                        uint16_t type_covered;
+                        uint8_t algorithm;
+                        uint8_t labels;
+                        uint32_t original_ttl;
+                        uint32_t expiration;
+                        uint32_t inception;
+                        uint16_t key_tag;
+                        char *signer;
+                        void *signature;
+                        size_t signature_size;
+                } rrsig;
+        };
+};
+
+static inline const char* DNS_RESOURCE_KEY_NAME(const DnsResourceKey *key) {
+        if (_unlikely_(!key))
+                return NULL;
+
+        if (key->_name)
+                return key->_name;
+
+        return (char*) key + sizeof(DnsResourceKey);
+}
+
+DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *name);
+DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char *name);
+DnsResourceKey* dns_resource_key_ref(DnsResourceKey *key);
+DnsResourceKey* dns_resource_key_unref(DnsResourceKey *key);
+int dns_resource_key_equal(const DnsResourceKey *a, const DnsResourceKey *b);
+int dns_resource_key_match_rr(const DnsResourceKey *key, const DnsResourceRecord *rr);
+int dns_resource_key_match_cname(const DnsResourceKey *key, const DnsResourceRecord *rr);
+int dns_resource_key_to_string(const DnsResourceKey *key, char **ret);
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceKey*, dns_resource_key_unref);
+
+DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key);
+DnsResourceRecord* dns_resource_record_new_full(uint16_t class, uint16_t type, const char *name);
+DnsResourceRecord* dns_resource_record_ref(DnsResourceRecord *rr);
+DnsResourceRecord* dns_resource_record_unref(DnsResourceRecord *rr);
+int dns_resource_record_new_reverse(DnsResourceRecord **ret, int family, const union in_addr_union *address, const char *name);
+int dns_resource_record_equal(const DnsResourceRecord *a, const DnsResourceRecord *b);
+int dns_resource_record_to_string(const DnsResourceRecord *rr, char **ret);
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceRecord*, dns_resource_record_unref);
+
+const char *dns_class_to_string(uint16_t type);
+int dns_class_from_string(const char *name, uint16_t *class);
+
+extern const struct hash_ops dns_resource_key_hash_ops;
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
new file mode 100644 (file)
index 0000000..1664b13
--- /dev/null
@@ -0,0 +1,797 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <netinet/tcp.h>
+
+#include "missing.h"
+#include "strv.h"
+#include "socket-util.h"
+#include "af-list.h"
+#include "resolved-dns-domain.h"
+#include "resolved-dns-scope.h"
+
+#define MULTICAST_RATELIMIT_INTERVAL_USEC (1*USEC_PER_SEC)
+#define MULTICAST_RATELIMIT_BURST 1000
+
+int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol protocol, int family) {
+        DnsScope *s;
+
+        assert(m);
+        assert(ret);
+
+        s = new0(DnsScope, 1);
+        if (!s)
+                return -ENOMEM;
+
+        s->manager = m;
+        s->link = l;
+        s->protocol = protocol;
+        s->family = family;
+
+        LIST_PREPEND(scopes, m->dns_scopes, s);
+
+        dns_scope_llmnr_membership(s, true);
+
+        log_debug("New scope on link %s, protocol %s, family %s", l ? l->name : "*", dns_protocol_to_string(protocol), family == AF_UNSPEC ? "*" : af_to_name(family));
+
+        /* Enforce ratelimiting for the multicast protocols */
+        RATELIMIT_INIT(s->ratelimit, MULTICAST_RATELIMIT_INTERVAL_USEC, MULTICAST_RATELIMIT_BURST);
+
+        *ret = s;
+        return 0;
+}
+
+DnsScope* dns_scope_free(DnsScope *s) {
+        DnsTransaction *t;
+        DnsResourceRecord *rr;
+
+        if (!s)
+                return NULL;
+
+        log_debug("Removing scope on link %s, protocol %s, family %s", s->link ? s->link->name : "*", dns_protocol_to_string(s->protocol), s->family == AF_UNSPEC ? "*" : af_to_name(s->family));
+
+        dns_scope_llmnr_membership(s, false);
+
+        while ((t = s->transactions)) {
+
+                /* Abort the transaction, but make sure it is not
+                 * freed while we still look at it */
+
+                t->block_gc++;
+                dns_transaction_complete(t, DNS_TRANSACTION_ABORTED);
+                t->block_gc--;
+
+                dns_transaction_free(t);
+        }
+
+        while ((rr = ordered_hashmap_steal_first(s->conflict_queue)))
+                dns_resource_record_unref(rr);
+
+        ordered_hashmap_free(s->conflict_queue);
+        sd_event_source_unref(s->conflict_event_source);
+
+        dns_cache_flush(&s->cache);
+        dns_zone_flush(&s->zone);
+
+        LIST_REMOVE(scopes, s->manager->dns_scopes, s);
+        strv_free(s->domains);
+        free(s);
+
+        return NULL;
+}
+
+DnsServer *dns_scope_get_dns_server(DnsScope *s) {
+        assert(s);
+
+        if (s->protocol != DNS_PROTOCOL_DNS)
+                return NULL;
+
+        if (s->link)
+                return link_get_dns_server(s->link);
+        else
+                return manager_get_dns_server(s->manager);
+}
+
+void dns_scope_next_dns_server(DnsScope *s) {
+        assert(s);
+
+        if (s->protocol != DNS_PROTOCOL_DNS)
+                return;
+
+        if (s->link)
+                link_next_dns_server(s->link);
+        else
+                manager_next_dns_server(s->manager);
+}
+
+int dns_scope_emit(DnsScope *s, DnsPacket *p) {
+        union in_addr_union addr;
+        int ifindex = 0, r;
+        int family;
+        uint16_t port;
+        uint32_t mtu;
+        int fd;
+
+        assert(s);
+        assert(p);
+        assert(p->protocol == s->protocol);
+
+        if (s->link) {
+                mtu = s->link->mtu;
+                ifindex = s->link->ifindex;
+        } else
+                mtu = manager_find_mtu(s->manager);
+
+        if (s->protocol == DNS_PROTOCOL_DNS) {
+                DnsServer *srv;
+
+                if (DNS_PACKET_QDCOUNT(p) > 1)
+                        return -ENOTSUP;
+
+                srv = dns_scope_get_dns_server(s);
+                if (!srv)
+                        return -ESRCH;
+
+                family = srv->family;
+                addr = srv->address;
+                port = 53;
+
+                if (p->size > DNS_PACKET_UNICAST_SIZE_MAX)
+                        return -EMSGSIZE;
+
+                if (p->size > mtu)
+                        return -EMSGSIZE;
+
+                if (family == AF_INET)
+                        fd = manager_dns_ipv4_fd(s->manager);
+                else if (family == AF_INET6)
+                        fd = manager_dns_ipv6_fd(s->manager);
+                else
+                        return -EAFNOSUPPORT;
+                if (fd < 0)
+                        return fd;
+
+        } else if (s->protocol == DNS_PROTOCOL_LLMNR) {
+
+                if (DNS_PACKET_QDCOUNT(p) > 1)
+                        return -ENOTSUP;
+
+                if (!ratelimit_test(&s->ratelimit))
+                        return -EBUSY;
+
+                family = s->family;
+                port = 5355;
+
+                if (family == AF_INET) {
+                        addr.in = LLMNR_MULTICAST_IPV4_ADDRESS;
+                        fd = manager_llmnr_ipv4_udp_fd(s->manager);
+                } else if (family == AF_INET6) {
+                        addr.in6 = LLMNR_MULTICAST_IPV6_ADDRESS;
+                        fd = manager_llmnr_ipv6_udp_fd(s->manager);
+                } else
+                        return -EAFNOSUPPORT;
+                if (fd < 0)
+                        return fd;
+        } else
+                return -EAFNOSUPPORT;
+
+        r = manager_send(s->manager, fd, ifindex, family, &addr, port, p);
+        if (r < 0)
+                return r;
+
+        return 1;
+}
+
+int dns_scope_tcp_socket(DnsScope *s, int family, const union in_addr_union *address, uint16_t port) {
+        _cleanup_close_ int fd = -1;
+        union sockaddr_union sa = {};
+        socklen_t salen;
+        static const int one = 1;
+        int ret, r;
+
+        assert(s);
+        assert((family == AF_UNSPEC) == !address);
+
+        if (family == AF_UNSPEC) {
+                DnsServer *srv;
+
+                srv = dns_scope_get_dns_server(s);
+                if (!srv)
+                        return -ESRCH;
+
+                sa.sa.sa_family = srv->family;
+                if (srv->family == AF_INET) {
+                        sa.in.sin_port = htobe16(port);
+                        sa.in.sin_addr = srv->address.in;
+                        salen = sizeof(sa.in);
+                } else if (srv->family == AF_INET6) {
+                        sa.in6.sin6_port = htobe16(port);
+                        sa.in6.sin6_addr = srv->address.in6;
+                        sa.in6.sin6_scope_id = s->link ? s->link->ifindex : 0;
+                        salen = sizeof(sa.in6);
+                } else
+                        return -EAFNOSUPPORT;
+        } else {
+                sa.sa.sa_family = family;
+
+                if (family == AF_INET) {
+                        sa.in.sin_port = htobe16(port);
+                        sa.in.sin_addr = address->in;
+                        salen = sizeof(sa.in);
+                } else if (family == AF_INET6) {
+                        sa.in6.sin6_port = htobe16(port);
+                        sa.in6.sin6_addr = address->in6;
+                        sa.in6.sin6_scope_id = s->link ? s->link->ifindex : 0;
+                        salen = sizeof(sa.in6);
+                } else
+                        return -EAFNOSUPPORT;
+        }
+
+        fd = socket(sa.sa.sa_family, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (fd < 0)
+                return -errno;
+
+        r = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
+        if (r < 0)
+                return -errno;
+
+        if (s->link) {
+                uint32_t ifindex = htobe32(s->link->ifindex);
+
+                if (sa.sa.sa_family == AF_INET) {
+                        r = setsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, sizeof(ifindex));
+                        if (r < 0)
+                                return -errno;
+                } else if (sa.sa.sa_family == AF_INET6) {
+                        r = setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_IF, &ifindex, sizeof(ifindex));
+                        if (r < 0)
+                                return -errno;
+                }
+        }
+
+        if (s->protocol == DNS_PROTOCOL_LLMNR) {
+                /* RFC 4795, section 2.5 requires the TTL to be set to 1 */
+
+                if (sa.sa.sa_family == AF_INET) {
+                        r = setsockopt(fd, IPPROTO_IP, IP_TTL, &one, sizeof(one));
+                        if (r < 0)
+                                return -errno;
+                } else if (sa.sa.sa_family == AF_INET6) {
+                        r = setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &one, sizeof(one));
+                        if (r < 0)
+                                return -errno;
+                }
+        }
+
+        r = connect(fd, &sa.sa, salen);
+        if (r < 0 && errno != EINPROGRESS)
+                return -errno;
+
+        ret = fd;
+        fd = -1;
+
+        return ret;
+}
+
+DnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, const char *domain) {
+        char **i;
+
+        assert(s);
+        assert(domain);
+
+        if (ifindex != 0 && (!s->link || s->link->ifindex != ifindex))
+                return DNS_SCOPE_NO;
+
+        if ((SD_RESOLVED_FLAGS_MAKE(s->protocol, s->family) & flags) == 0)
+                return DNS_SCOPE_NO;
+
+        STRV_FOREACH(i, s->domains)
+                if (dns_name_endswith(domain, *i) > 0)
+                        return DNS_SCOPE_YES;
+
+        if (dns_name_root(domain) != 0)
+                return DNS_SCOPE_NO;
+
+        if (is_localhost(domain))
+                return DNS_SCOPE_NO;
+
+        if (s->protocol == DNS_PROTOCOL_DNS) {
+                if (dns_name_endswith(domain, "254.169.in-addr.arpa") == 0 &&
+                    dns_name_endswith(domain, "0.8.e.f.ip6.arpa") == 0 &&
+                    dns_name_single_label(domain) == 0)
+                        return DNS_SCOPE_MAYBE;
+
+                return DNS_SCOPE_NO;
+        }
+
+        if (s->protocol == DNS_PROTOCOL_MDNS) {
+                if (dns_name_endswith(domain, "254.169.in-addr.arpa") > 0 ||
+                    dns_name_endswith(domain, "0.8.e.f.ip6.arpa") > 0 ||
+                    (dns_name_endswith(domain, "local") > 0 && dns_name_equal(domain, "local") == 0))
+                        return DNS_SCOPE_MAYBE;
+
+                return DNS_SCOPE_NO;
+        }
+
+        if (s->protocol == DNS_PROTOCOL_LLMNR) {
+                if (dns_name_endswith(domain, "in-addr.arpa") > 0 ||
+                    dns_name_endswith(domain, "ip6.arpa") > 0 ||
+                    dns_name_single_label(domain) > 0)
+                        return DNS_SCOPE_MAYBE;
+
+                return DNS_SCOPE_NO;
+        }
+
+        assert_not_reached("Unknown scope protocol");
+}
+
+int dns_scope_good_key(DnsScope *s, DnsResourceKey *key) {
+        assert(s);
+        assert(key);
+
+        if (s->protocol == DNS_PROTOCOL_DNS)
+                return true;
+
+        /* On mDNS and LLMNR, send A and AAAA queries only on the
+         * respective scopes */
+
+        if (s->family == AF_INET && key->class == DNS_CLASS_IN && key->type == DNS_TYPE_AAAA)
+                return false;
+
+        if (s->family == AF_INET6 && key->class == DNS_CLASS_IN && key->type == DNS_TYPE_A)
+                return false;
+
+        return true;
+}
+
+int dns_scope_llmnr_membership(DnsScope *s, bool b) {
+        int fd;
+
+        assert(s);
+
+        if (s->protocol != DNS_PROTOCOL_LLMNR)
+                return 0;
+
+        assert(s->link);
+
+        if (s->family == AF_INET) {
+                struct ip_mreqn mreqn = {
+                        .imr_multiaddr = LLMNR_MULTICAST_IPV4_ADDRESS,
+                        .imr_ifindex = s->link->ifindex,
+                };
+
+                fd = manager_llmnr_ipv4_udp_fd(s->manager);
+                if (fd < 0)
+                        return fd;
+
+                /* Always first try to drop membership before we add
+                 * one. This is necessary on some devices, such as
+                 * veth. */
+                if (b)
+                        setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn));
+
+                if (setsockopt(fd, IPPROTO_IP, b ? IP_ADD_MEMBERSHIP : IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn)) < 0)
+                        return -errno;
+
+        } else if (s->family == AF_INET6) {
+                struct ipv6_mreq mreq = {
+                        .ipv6mr_multiaddr = LLMNR_MULTICAST_IPV6_ADDRESS,
+                        .ipv6mr_interface = s->link->ifindex,
+                };
+
+                fd = manager_llmnr_ipv6_udp_fd(s->manager);
+                if (fd < 0)
+                        return fd;
+
+                if (b)
+                        setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
+
+                if (setsockopt(fd, IPPROTO_IPV6, b ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
+                        return -errno;
+        } else
+                return -EAFNOSUPPORT;
+
+        return 0;
+}
+
+int dns_scope_good_dns_server(DnsScope *s, int family, const union in_addr_union *address) {
+        assert(s);
+        assert(address);
+
+        if (s->protocol != DNS_PROTOCOL_DNS)
+                return 1;
+
+        if (s->link)
+                return !!link_find_dns_server(s->link,  family, address);
+        else
+                return !!manager_find_dns_server(s->manager, family, address);
+}
+
+static int dns_scope_make_reply_packet(
+                DnsScope *s,
+                uint16_t id,
+                int rcode,
+                DnsQuestion *q,
+                DnsAnswer *answer,
+                DnsAnswer *soa,
+                bool tentative,
+                DnsPacket **ret) {
+
+        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+        unsigned i;
+        int r;
+
+        assert(s);
+        assert(ret);
+
+        if ((!q || q->n_keys <= 0)
+            && (!answer || answer->n_rrs <= 0)
+            && (!soa || soa->n_rrs <= 0))
+                return -EINVAL;
+
+        r = dns_packet_new(&p, s->protocol, 0);
+        if (r < 0)
+                return r;
+
+        DNS_PACKET_HEADER(p)->id = id;
+        DNS_PACKET_HEADER(p)->flags = htobe16(DNS_PACKET_MAKE_FLAGS(
+                                                              1 /* qr */,
+                                                              0 /* opcode */,
+                                                              0 /* c */,
+                                                              0 /* tc */,
+                                                              tentative,
+                                                              0 /* (ra) */,
+                                                              0 /* (ad) */,
+                                                              0 /* (cd) */,
+                                                              rcode));
+
+        if (q) {
+                for (i = 0; i < q->n_keys; i++) {
+                        r = dns_packet_append_key(p, q->keys[i], NULL);
+                        if (r < 0)
+                                return r;
+                }
+
+                DNS_PACKET_HEADER(p)->qdcount = htobe16(q->n_keys);
+        }
+
+        if (answer) {
+                for (i = 0; i < answer->n_rrs; i++) {
+                        r = dns_packet_append_rr(p, answer->rrs[i], NULL);
+                        if (r < 0)
+                                return r;
+                }
+
+                DNS_PACKET_HEADER(p)->ancount = htobe16(answer->n_rrs);
+        }
+
+        if (soa) {
+                for (i = 0; i < soa->n_rrs; i++) {
+                        r = dns_packet_append_rr(p, soa->rrs[i], NULL);
+                        if (r < 0)
+                                return r;
+                }
+
+                DNS_PACKET_HEADER(p)->arcount = htobe16(soa->n_rrs);
+        }
+
+        *ret = p;
+        p = NULL;
+
+        return 0;
+}
+
+static void dns_scope_verify_conflicts(DnsScope *s, DnsPacket *p) {
+        unsigned n;
+
+        assert(s);
+        assert(p);
+
+        if (p->question)
+                for (n = 0; n < p->question->n_keys; n++)
+                        dns_zone_verify_conflicts(&s->zone, p->question->keys[n]);
+        if (p->answer)
+                for (n = 0; n < p->answer->n_rrs; n++)
+                        dns_zone_verify_conflicts(&s->zone, p->answer->rrs[n]->key);
+}
+
+void dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p) {
+        _cleanup_(dns_packet_unrefp) DnsPacket *reply = NULL;
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL, *soa = NULL;
+        bool tentative = false;
+        int r, fd;
+
+        assert(s);
+        assert(p);
+
+        if (p->protocol != DNS_PROTOCOL_LLMNR)
+                return;
+
+        if (p->ipproto == IPPROTO_UDP) {
+                /* Don't accept UDP queries directed to anything but
+                 * the LLMNR multicast addresses. See RFC 4795,
+                 * section 2.5.*/
+
+                if (p->family == AF_INET && !in_addr_equal(AF_INET, &p->destination, (union in_addr_union*) &LLMNR_MULTICAST_IPV4_ADDRESS))
+                        return;
+
+                if (p->family == AF_INET6 && !in_addr_equal(AF_INET6, &p->destination, (union in_addr_union*) &LLMNR_MULTICAST_IPV6_ADDRESS))
+                        return;
+        }
+
+        r = dns_packet_extract(p);
+        if (r < 0) {
+                log_debug("Failed to extract resources from incoming packet: %s", strerror(-r));
+                return;
+        }
+
+        if (DNS_PACKET_C(p)) {
+                /* Somebody notified us about a possible conflict */
+                dns_scope_verify_conflicts(s, p);
+                return;
+        }
+
+        r = dns_zone_lookup(&s->zone, p->question, &answer, &soa, &tentative);
+        if (r < 0) {
+                log_debug("Failed to lookup key: %s", strerror(-r));
+                return;
+        }
+        if (r == 0)
+                return;
+
+        if (answer)
+                dns_answer_order_by_scope(answer, in_addr_is_link_local(p->family, &p->sender) > 0);
+
+        r = dns_scope_make_reply_packet(s, DNS_PACKET_ID(p), DNS_RCODE_SUCCESS, p->question, answer, soa, tentative, &reply);
+        if (r < 0) {
+                log_debug("Failed to build reply packet: %s", strerror(-r));
+                return;
+        }
+
+        if (stream)
+                r = dns_stream_write_packet(stream, reply);
+        else {
+                if (!ratelimit_test(&s->ratelimit))
+                        return;
+
+                if (p->family == AF_INET)
+                        fd = manager_llmnr_ipv4_udp_fd(s->manager);
+                else if (p->family == AF_INET6)
+                        fd = manager_llmnr_ipv6_udp_fd(s->manager);
+                else {
+                        log_debug("Unknown protocol");
+                        return;
+                }
+                if (fd < 0) {
+                        log_debug("Failed to get reply socket: %s", strerror(-fd));
+                        return;
+                }
+
+                /* Note that we always immediately reply to all LLMNR
+                 * requests, and do not wait any time, since we
+                 * verified uniqueness for all records. Also see RFC
+                 * 4795, Section 2.7 */
+
+                r = manager_send(s->manager, fd, p->ifindex, p->family, &p->sender, p->sender_port, reply);
+        }
+
+        if (r < 0) {
+                log_debug("Failed to send reply packet: %s", strerror(-r));
+                return;
+        }
+}
+
+DnsTransaction *dns_scope_find_transaction(DnsScope *scope, DnsQuestion *question, bool cache_ok) {
+        DnsTransaction *t;
+
+        assert(scope);
+        assert(question);
+
+        /* Try to find an ongoing transaction that is a equal or a
+         * superset of the specified question */
+
+        LIST_FOREACH(transactions_by_scope, t, scope->transactions) {
+
+                /* Refuse reusing transactions that completed based on
+                 * cached data instead of a real packet, if that's
+                 * requested. */
+                if (!cache_ok &&
+                    IN_SET(t->state, DNS_TRANSACTION_SUCCESS, DNS_TRANSACTION_FAILURE) &&
+                    !t->received)
+                        continue;
+
+                if (dns_question_is_superset(t->question, question) > 0)
+                        return t;
+        }
+
+        return NULL;
+}
+
+static int dns_scope_make_conflict_packet(
+                DnsScope *s,
+                DnsResourceRecord *rr,
+                DnsPacket **ret) {
+
+        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+        int r;
+
+        assert(s);
+        assert(rr);
+        assert(ret);
+
+        r = dns_packet_new(&p, s->protocol, 0);
+        if (r < 0)
+                return r;
+
+        DNS_PACKET_HEADER(p)->flags = htobe16(DNS_PACKET_MAKE_FLAGS(
+                                                              0 /* qr */,
+                                                              0 /* opcode */,
+                                                              1 /* conflict */,
+                                                              0 /* tc */,
+                                                              0 /* t */,
+                                                              0 /* (ra) */,
+                                                              0 /* (ad) */,
+                                                              0 /* (cd) */,
+                                                              0));
+        random_bytes(&DNS_PACKET_HEADER(p)->id, sizeof(uint16_t));
+        DNS_PACKET_HEADER(p)->qdcount = htobe16(1);
+        DNS_PACKET_HEADER(p)->arcount = htobe16(1);
+
+        r = dns_packet_append_key(p, rr->key, NULL);
+        if (r < 0)
+                return r;
+
+        r = dns_packet_append_rr(p, rr, NULL);
+        if (r < 0)
+                return r;
+
+        *ret = p;
+        p = NULL;
+
+        return 0;
+}
+
+static int on_conflict_dispatch(sd_event_source *es, usec_t usec, void *userdata) {
+        DnsScope *scope = userdata;
+        int r;
+
+        assert(es);
+        assert(scope);
+
+        scope->conflict_event_source = sd_event_source_unref(scope->conflict_event_source);
+
+        for (;;) {
+                _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
+                _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+
+                rr = ordered_hashmap_steal_first(scope->conflict_queue);
+                if (!rr)
+                        break;
+
+                r = dns_scope_make_conflict_packet(scope, rr, &p);
+                if (r < 0) {
+                        log_error("Failed to make conflict packet: %s", strerror(-r));
+                        return 0;
+                }
+
+                r = dns_scope_emit(scope, p);
+                if (r < 0)
+                        log_debug("Failed to send conflict packet: %s", strerror(-r));
+        }
+
+        return 0;
+}
+
+int dns_scope_notify_conflict(DnsScope *scope, DnsResourceRecord *rr) {
+        usec_t jitter;
+        int r;
+
+        assert(scope);
+        assert(rr);
+
+        /* We don't send these queries immediately. Instead, we queue
+         * them, and send them after some jitter delay. */
+        r = ordered_hashmap_ensure_allocated(&scope->conflict_queue, &dns_resource_key_hash_ops);
+        if (r < 0) {
+                log_oom();
+                return r;
+        }
+
+        /* We only place one RR per key in the conflict
+         * messages, not all of them. That should be enough to
+         * indicate where there might be a conflict */
+        r = ordered_hashmap_put(scope->conflict_queue, rr->key, rr);
+        if (r == -EEXIST || r == 0)
+                return 0;
+        if (r < 0) {
+                log_debug("Failed to queue conflicting RR: %s", strerror(-r));
+                return r;
+        }
+
+        dns_resource_record_ref(rr);
+
+        if (scope->conflict_event_source)
+                return 0;
+
+        random_bytes(&jitter, sizeof(jitter));
+        jitter %= LLMNR_JITTER_INTERVAL_USEC;
+
+        r = sd_event_add_time(scope->manager->event,
+                              &scope->conflict_event_source,
+                              clock_boottime_or_monotonic(),
+                              now(clock_boottime_or_monotonic()) + jitter,
+                              LLMNR_JITTER_INTERVAL_USEC,
+                              on_conflict_dispatch, scope);
+        if (r < 0) {
+                log_debug("Failed to add conflict dispatch event: %s", strerror(-r));
+                return r;
+        }
+
+        return 0;
+}
+
+void dns_scope_check_conflicts(DnsScope *scope, DnsPacket *p) {
+        unsigned i;
+        int r;
+
+        assert(scope);
+        assert(p);
+
+        if (p->protocol != DNS_PROTOCOL_LLMNR)
+                return;
+
+        if (DNS_PACKET_RRCOUNT(p) <= 0)
+                return;
+
+        if (DNS_PACKET_C(p) != 0)
+                return;
+
+        if (DNS_PACKET_T(p) != 0)
+                return;
+
+        if (manager_our_packet(scope->manager, p))
+                return;
+
+        r = dns_packet_extract(p);
+        if (r < 0) {
+                log_debug("Failed to extract packet: %s", strerror(-r));
+                return;
+        }
+
+        log_debug("Checking for conflicts...");
+
+        for (i = 0; i < p->answer->n_rrs; i++) {
+
+                /* Check for conflicts against the local zone. If we
+                 * found one, we won't check any further */
+                r = dns_zone_check_conflicts(&scope->zone, p->answer->rrs[i]);
+                if (r != 0)
+                        continue;
+
+                /* Check for conflicts against the local cache. If so,
+                 * send out an advisory query, to inform everybody */
+                r = dns_cache_check_conflicts(&scope->cache, p->answer->rrs[i], p->family, &p->sender);
+                if (r <= 0)
+                        continue;
+
+                dns_scope_notify_conflict(scope, p->answer->rrs[i]);
+        }
+}
diff --git a/src/resolve/resolved-dns-scope.h b/src/resolve/resolved-dns-scope.h
new file mode 100644 (file)
index 0000000..f05648e
--- /dev/null
@@ -0,0 +1,88 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "list.h"
+
+typedef struct DnsScope DnsScope;
+
+#include "resolved-dns-server.h"
+#include "resolved-dns-packet.h"
+#include "resolved-dns-query.h"
+#include "resolved-dns-cache.h"
+#include "resolved-dns-zone.h"
+#include "resolved-dns-stream.h"
+#include "resolved-manager.h"
+#include "resolved-link.h"
+
+typedef enum DnsScopeMatch {
+        DNS_SCOPE_NO,
+        DNS_SCOPE_MAYBE,
+        DNS_SCOPE_YES,
+        _DNS_SCOPE_MATCH_MAX,
+        _DNS_SCOPE_INVALID = -1
+} DnsScopeMatch;
+
+struct DnsScope {
+        Manager *manager;
+
+        DnsProtocol protocol;
+        int family;
+
+        Link *link;
+
+        char **domains;
+
+        DnsCache cache;
+        DnsZone zone;
+
+        OrderedHashmap *conflict_queue;
+        sd_event_source *conflict_event_source;
+
+        RateLimit ratelimit;
+
+        LIST_HEAD(DnsTransaction, transactions);
+
+        LIST_FIELDS(DnsScope, scopes);
+};
+
+int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol p, int family);
+DnsScope* dns_scope_free(DnsScope *s);
+
+int dns_scope_emit(DnsScope *s, DnsPacket *p);
+int dns_scope_tcp_socket(DnsScope *s, int family, const union in_addr_union *address, uint16_t port);
+
+DnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, const char *domain);
+int dns_scope_good_key(DnsScope *s, DnsResourceKey *key);
+int dns_scope_good_dns_server(DnsScope *s, int family, const union in_addr_union *address);
+
+DnsServer *dns_scope_get_dns_server(DnsScope *s);
+void dns_scope_next_dns_server(DnsScope *s);
+
+int dns_scope_llmnr_membership(DnsScope *s, bool b);
+
+void dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p);
+
+DnsTransaction *dns_scope_find_transaction(DnsScope *scope, DnsQuestion *question, bool cache_ok);
+
+int dns_scope_notify_conflict(DnsScope *scope, DnsResourceRecord *rr);
+void dns_scope_check_conflicts(DnsScope *scope, DnsPacket *p);
diff --git a/src/resolve/resolved-dns-server.c b/src/resolve/resolved-dns-server.c
new file mode 100644 (file)
index 0000000..caf06fe
--- /dev/null
@@ -0,0 +1,127 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "siphash24.h"
+
+#include "resolved-dns-server.h"
+
+int dns_server_new(
+                Manager *m,
+                DnsServer **ret,
+                DnsServerType type,
+                Link *l,
+                int family,
+                const union in_addr_union *in_addr) {
+
+        DnsServer *s, *tail;
+
+        assert(m);
+        assert((type == DNS_SERVER_LINK) == !!l);
+        assert(in_addr);
+
+        s = new0(DnsServer, 1);
+        if (!s)
+                return -ENOMEM;
+
+        s->type = type;
+        s->family = family;
+        s->address = *in_addr;
+
+        if (type == DNS_SERVER_LINK) {
+                LIST_FIND_TAIL(servers, l->dns_servers, tail);
+                LIST_INSERT_AFTER(servers, l->dns_servers, tail, s);
+                s->link = l;
+        } else if (type == DNS_SERVER_SYSTEM) {
+                LIST_FIND_TAIL(servers, m->dns_servers, tail);
+                LIST_INSERT_AFTER(servers, m->dns_servers, tail, s);
+        } else if (type == DNS_SERVER_FALLBACK) {
+                LIST_FIND_TAIL(servers, m->fallback_dns_servers, tail);
+                LIST_INSERT_AFTER(servers, m->fallback_dns_servers, tail, s);
+        } else
+                assert_not_reached("Unknown server type");
+
+        s->manager = m;
+
+        /* A new DNS server that isn't fallback is added and the one
+         * we used so far was a fallback one? Then let's try to pick
+         * the new one */
+        if (type != DNS_SERVER_FALLBACK &&
+            m->current_dns_server &&
+            m->current_dns_server->type == DNS_SERVER_FALLBACK)
+                manager_set_dns_server(m, NULL);
+
+        if (ret)
+                *ret = s;
+
+        return 0;
+}
+
+DnsServer* dns_server_free(DnsServer *s)  {
+        if (!s)
+                return NULL;
+
+        if (s->manager) {
+                if (s->type == DNS_SERVER_LINK)
+                        LIST_REMOVE(servers, s->link->dns_servers, s);
+                else if (s->type == DNS_SERVER_SYSTEM)
+                        LIST_REMOVE(servers, s->manager->dns_servers, s);
+                else if (s->type == DNS_SERVER_FALLBACK)
+                        LIST_REMOVE(servers, s->manager->fallback_dns_servers, s);
+                else
+                        assert_not_reached("Unknown server type");
+
+                if (s->manager->current_dns_server == s)
+                        manager_set_dns_server(s->manager, NULL);
+        }
+
+        if (s->link && s->link->current_dns_server == s)
+                link_set_dns_server(s->link, NULL);
+
+        free(s);
+
+        return NULL;
+}
+
+static unsigned long dns_server_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
+        const DnsServer *s = p;
+        uint64_t u;
+
+        siphash24((uint8_t*) &u, &s->address, FAMILY_ADDRESS_SIZE(s->family), hash_key);
+        u = u * hash_key[0] + u + s->family;
+
+        return u;
+}
+
+static int dns_server_compare_func(const void *a, const void *b) {
+        const DnsServer *x = a, *y = b;
+
+        if (x->family < y->family)
+                return -1;
+        if (x->family > y->family)
+                return 1;
+
+        return memcmp(&x->address, &y->address, FAMILY_ADDRESS_SIZE(x->family));
+}
+
+const struct hash_ops dns_server_hash_ops = {
+        .hash = dns_server_hash_func,
+        .compare = dns_server_compare_func
+};
diff --git a/src/resolve/resolved-dns-server.h b/src/resolve/resolved-dns-server.h
new file mode 100644 (file)
index 0000000..a438a27
--- /dev/null
@@ -0,0 +1,63 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "in-addr-util.h"
+
+typedef struct DnsServer DnsServer;
+typedef enum DnsServerSource DnsServerSource;
+
+typedef enum DnsServerType {
+        DNS_SERVER_SYSTEM,
+        DNS_SERVER_FALLBACK,
+        DNS_SERVER_LINK,
+} DnsServerType;
+
+#include "resolved-manager.h"
+#include "resolved-link.h"
+
+struct DnsServer {
+        Manager *manager;
+
+        DnsServerType type;
+
+        Link *link;
+
+        int family;
+        union in_addr_union address;
+
+        bool marked:1;
+
+        LIST_FIELDS(DnsServer, servers);
+};
+
+int dns_server_new(
+                Manager *m,
+                DnsServer **s,
+                DnsServerType type,
+                Link *l,
+                int family,
+                const union in_addr_union *address);
+
+DnsServer* dns_server_free(DnsServer *s);
+
+extern const struct hash_ops dns_server_hash_ops;
diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c
new file mode 100644 (file)
index 0000000..3690679
--- /dev/null
@@ -0,0 +1,402 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <netinet/tcp.h>
+
+#include "missing.h"
+#include "resolved-dns-stream.h"
+
+#define DNS_STREAM_TIMEOUT_USEC (10 * USEC_PER_SEC)
+#define DNS_STREAMS_MAX 128
+
+static void dns_stream_stop(DnsStream *s) {
+        assert(s);
+
+        s->io_event_source = sd_event_source_unref(s->io_event_source);
+        s->timeout_event_source = sd_event_source_unref(s->timeout_event_source);
+        s->fd = safe_close(s->fd);
+}
+
+static int dns_stream_update_io(DnsStream *s) {
+        int f = 0;
+
+        assert(s);
+
+        if (s->write_packet && s->n_written < sizeof(s->write_size) + s->write_packet->size)
+                f |= EPOLLOUT;
+        if (!s->read_packet || s->n_read < sizeof(s->read_size) + s->read_packet->size)
+                f |= EPOLLIN;
+
+        return sd_event_source_set_io_events(s->io_event_source, f);
+}
+
+static int dns_stream_complete(DnsStream *s, int error) {
+        assert(s);
+
+        dns_stream_stop(s);
+
+        if (s->complete)
+                s->complete(s, error);
+        else
+                dns_stream_free(s);
+
+        return 0;
+}
+
+static int dns_stream_identify(DnsStream *s) {
+        union {
+                struct cmsghdr header; /* For alignment */
+                uint8_t buffer[CMSG_SPACE(MAXSIZE(struct in_pktinfo, struct in6_pktinfo))
+                               + EXTRA_CMSG_SPACE /* kernel appears to require extra space */];
+        } control;
+        struct msghdr mh = {};
+        struct cmsghdr *cmsg;
+        socklen_t sl;
+        int r;
+
+        assert(s);
+
+        if (s->identified)
+                return 0;
+
+        /* Query the local side */
+        s->local_salen = sizeof(s->local);
+        r = getsockname(s->fd, &s->local.sa, &s->local_salen);
+        if (r < 0)
+                return -errno;
+        if (s->local.sa.sa_family == AF_INET6 && s->ifindex <= 0)
+                s->ifindex = s->local.in6.sin6_scope_id;
+
+        /* Query the remote side */
+        s->peer_salen = sizeof(s->peer);
+        r = getpeername(s->fd, &s->peer.sa, &s->peer_salen);
+        if (r < 0)
+                return -errno;
+        if (s->peer.sa.sa_family == AF_INET6 && s->ifindex <= 0)
+                s->ifindex = s->peer.in6.sin6_scope_id;
+
+        /* Check consistency */
+        assert(s->peer.sa.sa_family == s->local.sa.sa_family);
+        assert(IN_SET(s->peer.sa.sa_family, AF_INET, AF_INET6));
+
+        /* Query connection meta information */
+        sl = sizeof(control);
+        if (s->peer.sa.sa_family == AF_INET) {
+                r = getsockopt(s->fd, IPPROTO_IP, IP_PKTOPTIONS, &control, &sl);
+                if (r < 0)
+                        return -errno;
+        } else if (s->peer.sa.sa_family == AF_INET6) {
+
+                r = getsockopt(s->fd, IPPROTO_IPV6, IPV6_2292PKTOPTIONS, &control, &sl);
+                if (r < 0)
+                        return -errno;
+        } else
+                return -EAFNOSUPPORT;
+
+        mh.msg_control = &control;
+        mh.msg_controllen = sl;
+        for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg)) {
+
+                if (cmsg->cmsg_level == IPPROTO_IPV6) {
+                        assert(s->peer.sa.sa_family == AF_INET6);
+
+                        switch (cmsg->cmsg_type) {
+
+                        case IPV6_PKTINFO: {
+                                struct in6_pktinfo *i = (struct in6_pktinfo*) CMSG_DATA(cmsg);
+
+                                if (s->ifindex <= 0)
+                                        s->ifindex = i->ipi6_ifindex;
+                                break;
+                        }
+
+                        case IPV6_HOPLIMIT:
+                                s->ttl = *(int *) CMSG_DATA(cmsg);
+                                break;
+                        }
+
+                } else if (cmsg->cmsg_level == IPPROTO_IP) {
+                        assert(s->peer.sa.sa_family == AF_INET);
+
+                        switch (cmsg->cmsg_type) {
+
+                        case IP_PKTINFO: {
+                                struct in_pktinfo *i = (struct in_pktinfo*) CMSG_DATA(cmsg);
+
+                                if (s->ifindex <= 0)
+                                        s->ifindex = i->ipi_ifindex;
+                                break;
+                        }
+
+                        case IP_TTL:
+                                s->ttl = *(int *) CMSG_DATA(cmsg);
+                                break;
+                        }
+                }
+        }
+
+        /* The Linux kernel sets the interface index to the loopback
+         * device if the connection came from the local host since it
+         * avoids the routing table in such a case. Let's unset the
+         * interface index in such a case. */
+        if (s->ifindex == LOOPBACK_IFINDEX)
+                s->ifindex = 0;
+
+        /* If we don't know the interface index still, we look for the
+         * first local interface with a matching address. Yuck! */
+        if (s->ifindex <= 0)
+                s->ifindex = manager_find_ifindex(s->manager, s->local.sa.sa_family, s->local.sa.sa_family == AF_INET ? (union in_addr_union*) &s->local.in.sin_addr : (union in_addr_union*)  &s->local.in6.sin6_addr);
+
+        if (s->protocol == DNS_PROTOCOL_LLMNR && s->ifindex > 0) {
+                uint32_t ifindex = htobe32(s->ifindex);
+
+                /* Make sure all packets for this connection are sent on the same interface */
+                if (s->local.sa.sa_family == AF_INET) {
+                        r = setsockopt(s->fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, sizeof(ifindex));
+                        if (r < 0)
+                                log_debug("Failed to invoke IP_UNICAST_IF: %m");
+                } else if (s->local.sa.sa_family == AF_INET6) {
+                        r = setsockopt(s->fd, IPPROTO_IPV6, IPV6_UNICAST_IF, &ifindex, sizeof(ifindex));
+                        if (r < 0)
+                                log_debug("Failed to invoke IPV6_UNICAST_IF: %m");
+                }
+        }
+
+        s->identified = true;
+
+        return 0;
+}
+
+static int on_stream_timeout(sd_event_source *es, usec_t usec, void *userdata) {
+        DnsStream *s = userdata;
+
+        assert(s);
+
+        return dns_stream_complete(s, ETIMEDOUT);
+}
+
+static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *userdata) {
+        DnsStream *s = userdata;
+        int r;
+
+        assert(s);
+
+        r = dns_stream_identify(s);
+        if (r < 0)
+                return dns_stream_complete(s, -r);
+
+        if ((revents & EPOLLOUT) &&
+            s->write_packet &&
+            s->n_written < sizeof(s->write_size) + s->write_packet->size) {
+
+                struct iovec iov[2];
+                ssize_t ss;
+
+                iov[0].iov_base = &s->write_size;
+                iov[0].iov_len = sizeof(s->write_size);
+                iov[1].iov_base = DNS_PACKET_DATA(s->write_packet);
+                iov[1].iov_len = s->write_packet->size;
+
+                IOVEC_INCREMENT(iov, 2, s->n_written);
+
+                ss = writev(fd, iov, 2);
+                if (ss < 0) {
+                        if (errno != EINTR && errno != EAGAIN)
+                                return dns_stream_complete(s, errno);
+                } else
+                        s->n_written += ss;
+
+                /* Are we done? If so, disable the event source for EPOLLOUT */
+                if (s->n_written >= sizeof(s->write_size) + s->write_packet->size) {
+                        r = dns_stream_update_io(s);
+                        if (r < 0)
+                                return dns_stream_complete(s, -r);
+                }
+        }
+
+        if ((revents & (EPOLLIN|EPOLLHUP|EPOLLRDHUP)) &&
+            (!s->read_packet ||
+             s->n_read < sizeof(s->read_size) + s->read_packet->size)) {
+
+                if (s->n_read < sizeof(s->read_size)) {
+                        ssize_t ss;
+
+                        ss = read(fd, (uint8_t*) &s->read_size + s->n_read, sizeof(s->read_size) - s->n_read);
+                        if (ss < 0) {
+                                if (errno != EINTR && errno != EAGAIN)
+                                        return dns_stream_complete(s, errno);
+                        } else if (ss == 0)
+                                return dns_stream_complete(s, ECONNRESET);
+                        else
+                                s->n_read += ss;
+                }
+
+                if (s->n_read >= sizeof(s->read_size)) {
+
+                        if (be16toh(s->read_size) < DNS_PACKET_HEADER_SIZE)
+                                return dns_stream_complete(s, EBADMSG);
+
+                        if (s->n_read < sizeof(s->read_size) + be16toh(s->read_size)) {
+                                ssize_t ss;
+
+                                if (!s->read_packet) {
+                                        r = dns_packet_new(&s->read_packet, s->protocol, be16toh(s->read_size));
+                                        if (r < 0)
+                                                return dns_stream_complete(s, -r);
+
+                                        s->read_packet->size = be16toh(s->read_size);
+                                        s->read_packet->ipproto = IPPROTO_TCP;
+                                        s->read_packet->family = s->peer.sa.sa_family;
+                                        s->read_packet->ttl = s->ttl;
+                                        s->read_packet->ifindex = s->ifindex;
+
+                                        if (s->read_packet->family == AF_INET) {
+                                                s->read_packet->sender.in = s->peer.in.sin_addr;
+                                                s->read_packet->sender_port = be16toh(s->peer.in.sin_port);
+                                                s->read_packet->destination.in = s->local.in.sin_addr;
+                                                s->read_packet->destination_port = be16toh(s->local.in.sin_port);
+                                        } else {
+                                                assert(s->read_packet->family == AF_INET6);
+                                                s->read_packet->sender.in6 = s->peer.in6.sin6_addr;
+                                                s->read_packet->sender_port = be16toh(s->peer.in6.sin6_port);
+                                                s->read_packet->destination.in6 = s->local.in6.sin6_addr;
+                                                s->read_packet->destination_port = be16toh(s->local.in6.sin6_port);
+
+                                                if (s->read_packet->ifindex == 0)
+                                                        s->read_packet->ifindex = s->peer.in6.sin6_scope_id;
+                                                if (s->read_packet->ifindex == 0)
+                                                        s->read_packet->ifindex = s->local.in6.sin6_scope_id;
+                                        }
+                                }
+
+                                ss = read(fd,
+                                          (uint8_t*) DNS_PACKET_DATA(s->read_packet) + s->n_read - sizeof(s->read_size),
+                                          sizeof(s->read_size) + be16toh(s->read_size) - s->n_read);
+                                if (ss < 0) {
+                                        if (errno != EINTR && errno != EAGAIN)
+                                                return dns_stream_complete(s, errno);
+                                } else if (ss == 0)
+                                        return dns_stream_complete(s, ECONNRESET);
+                                else
+                                        s->n_read += ss;
+                        }
+
+                        /* Are we done? If so, disable the event source for EPOLLIN */
+                        if (s->n_read >= sizeof(s->read_size) + be16toh(s->read_size)) {
+                                r = dns_stream_update_io(s);
+                                if (r < 0)
+                                        return dns_stream_complete(s, -r);
+
+                                /* If there's a packet handler
+                                 * installed, call that. Note that
+                                 * this is optional... */
+                                if (s->on_packet)
+                                        return s->on_packet(s);
+                        }
+                }
+        }
+
+        if ((s->write_packet && s->n_written >= sizeof(s->write_size) + s->write_packet->size) &&
+            (s->read_packet && s->n_read >= sizeof(s->read_size) + s->read_packet->size))
+                return dns_stream_complete(s, 0);
+
+        return 0;
+}
+
+DnsStream *dns_stream_free(DnsStream *s) {
+        if (!s)
+                return NULL;
+
+        dns_stream_stop(s);
+
+        if (s->manager) {
+                LIST_REMOVE(streams, s->manager->dns_streams, s);
+                s->manager->n_dns_streams--;
+        }
+
+        dns_packet_unref(s->write_packet);
+        dns_packet_unref(s->read_packet);
+
+        free(s);
+
+        return 0;
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsStream*, dns_stream_free);
+
+int dns_stream_new(Manager *m, DnsStream **ret, DnsProtocol protocol, int fd) {
+        static const int one = 1;
+        _cleanup_(dns_stream_freep) DnsStream *s = NULL;
+        int r;
+
+        assert(m);
+        assert(fd >= 0);
+
+        if (m->n_dns_streams > DNS_STREAMS_MAX)
+                return -EBUSY;
+
+        s = new0(DnsStream, 1);
+        if (!s)
+                return -ENOMEM;
+
+        s->fd = -1;
+        s->protocol = protocol;
+
+        r = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
+        if (r < 0)
+                return -errno;
+
+        r = sd_event_add_io(m->event, &s->io_event_source, fd, EPOLLIN, on_stream_io, s);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_time(
+                        m->event,
+                        &s->timeout_event_source,
+                        clock_boottime_or_monotonic(),
+                        now(clock_boottime_or_monotonic()) + DNS_STREAM_TIMEOUT_USEC, 0,
+                        on_stream_timeout, s);
+        if (r < 0)
+                return r;
+
+        LIST_PREPEND(streams, m->dns_streams, s);
+        s->manager = m;
+        s->fd = fd;
+        m->n_dns_streams++;
+
+        *ret = s;
+        s = NULL;
+
+        return 0;
+}
+
+int dns_stream_write_packet(DnsStream *s, DnsPacket *p) {
+        assert(s);
+
+        if (s->write_packet)
+                return -EBUSY;
+
+        s->write_packet = dns_packet_ref(p);
+        s->write_size = htobe16(p->size);
+        s->n_written = 0;
+
+        return dns_stream_update_io(s);
+}
diff --git a/src/resolve/resolved-dns-stream.h b/src/resolve/resolved-dns-stream.h
new file mode 100644 (file)
index 0000000..46eae31
--- /dev/null
@@ -0,0 +1,64 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "socket-util.h"
+
+typedef struct DnsStream DnsStream;
+
+#include "resolved-dns-packet.h"
+#include "resolved-dns-transaction.h"
+#include "resolved-manager.h"
+
+struct DnsStream {
+        Manager *manager;
+
+        DnsProtocol protocol;
+
+        int fd;
+        union sockaddr_union peer;
+        socklen_t peer_salen;
+        union sockaddr_union local;
+        socklen_t local_salen;
+        int ifindex;
+        uint32_t ttl;
+        bool identified;
+
+        sd_event_source *io_event_source;
+        sd_event_source *timeout_event_source;
+
+        be16_t write_size, read_size;
+        DnsPacket *write_packet, *read_packet;
+        size_t n_written, n_read;
+
+        int (*on_packet)(DnsStream *s);
+        int (*complete)(DnsStream *s, int error);
+
+        DnsTransaction *transaction;
+
+        LIST_FIELDS(DnsStream, streams);
+};
+
+int dns_stream_new(Manager *m, DnsStream **s, DnsProtocol protocol, int fd);
+DnsStream *dns_stream_free(DnsStream *s);
+
+int dns_stream_write_packet(DnsStream *s, DnsPacket *p);
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
new file mode 100644 (file)
index 0000000..74b0634
--- /dev/null
@@ -0,0 +1,619 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "af-list.h"
+
+#include "resolved-dns-transaction.h"
+
+DnsTransaction* dns_transaction_free(DnsTransaction *t) {
+        DnsQuery *q;
+        DnsZoneItem *i;
+
+        if (!t)
+                return NULL;
+
+        sd_event_source_unref(t->timeout_event_source);
+
+        dns_question_unref(t->question);
+        dns_packet_unref(t->sent);
+        dns_packet_unref(t->received);
+        dns_answer_unref(t->cached);
+
+        dns_stream_free(t->stream);
+
+        if (t->scope) {
+                LIST_REMOVE(transactions_by_scope, t->scope->transactions, t);
+
+                if (t->id != 0)
+                        hashmap_remove(t->scope->manager->dns_transactions, UINT_TO_PTR(t->id));
+        }
+
+        while ((q = set_steal_first(t->queries)))
+                set_remove(q->transactions, t);
+        set_free(t->queries);
+
+        while ((i = set_steal_first(t->zone_items)))
+                i->probe_transaction = NULL;
+        set_free(t->zone_items);
+
+        free(t);
+        return NULL;
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsTransaction*, dns_transaction_free);
+
+void dns_transaction_gc(DnsTransaction *t) {
+        assert(t);
+
+        if (t->block_gc > 0)
+                return;
+
+        if (set_isempty(t->queries) && set_isempty(t->zone_items))
+                dns_transaction_free(t);
+}
+
+int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsQuestion *q) {
+        _cleanup_(dns_transaction_freep) DnsTransaction *t = NULL;
+        int r;
+
+        assert(ret);
+        assert(s);
+        assert(q);
+
+        r = hashmap_ensure_allocated(&s->manager->dns_transactions, NULL);
+        if (r < 0)
+                return r;
+
+        t = new0(DnsTransaction, 1);
+        if (!t)
+                return -ENOMEM;
+
+        t->question = dns_question_ref(q);
+
+        do
+                random_bytes(&t->id, sizeof(t->id));
+        while (t->id == 0 ||
+               hashmap_get(s->manager->dns_transactions, UINT_TO_PTR(t->id)));
+
+        r = hashmap_put(s->manager->dns_transactions, UINT_TO_PTR(t->id), t);
+        if (r < 0) {
+                t->id = 0;
+                return r;
+        }
+
+        LIST_PREPEND(transactions_by_scope, s->transactions, t);
+        t->scope = s;
+
+        if (ret)
+                *ret = t;
+
+        t = NULL;
+
+        return 0;
+}
+
+static void dns_transaction_stop(DnsTransaction *t) {
+        assert(t);
+
+        t->timeout_event_source = sd_event_source_unref(t->timeout_event_source);
+        t->stream = dns_stream_free(t->stream);
+}
+
+static void dns_transaction_tentative(DnsTransaction *t, DnsPacket *p) {
+        _cleanup_free_ char *pretty = NULL;
+        DnsZoneItem *z;
+
+        assert(t);
+        assert(p);
+
+        if (manager_our_packet(t->scope->manager, p) != 0)
+                return;
+
+        in_addr_to_string(p->family, &p->sender, &pretty);
+
+        log_debug("Transaction on scope %s on %s/%s got tentative packet from %s",
+                  dns_protocol_to_string(t->scope->protocol),
+                  t->scope->link ? t->scope->link->name : "*",
+                  t->scope->family == AF_UNSPEC ? "*" : af_to_name(t->scope->family),
+                  pretty);
+
+        /* RFC 4795, Section 4.1 says that the peer with the
+         * lexicographically smaller IP address loses */
+        if (memcmp(&p->sender, &p->destination, FAMILY_ADDRESS_SIZE(p->family)) >= 0) {
+                log_debug("Peer has lexicographically larger IP address and thus lost in the conflict.");
+                return;
+        }
+
+        log_debug("We have the lexicographically larger IP address and thus lost in the conflict.");
+
+        t->block_gc++;
+        while ((z = set_first(t->zone_items))) {
+                /* First, make sure the zone item drops the reference
+                 * to us */
+                dns_zone_item_probe_stop(z);
+
+                /* Secondly, report this as conflict, so that we might
+                 * look for a different hostname */
+                dns_zone_item_conflict(z);
+        }
+        t->block_gc--;
+
+        dns_transaction_gc(t);
+}
+
+void dns_transaction_complete(DnsTransaction *t, DnsTransactionState state) {
+        DnsQuery *q;
+        DnsZoneItem *z;
+        Iterator i;
+
+        assert(t);
+        assert(!IN_SET(state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING));
+
+        if (!IN_SET(t->state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING))
+                return;
+
+        /* Note that this call might invalidate the query. Callers
+         * should hence not attempt to access the query or transaction
+         * after calling this function. */
+
+        log_debug("Transaction on scope %s on %s/%s now complete with <%s>",
+                  dns_protocol_to_string(t->scope->protocol),
+                  t->scope->link ? t->scope->link->name : "*",
+                  t->scope->family == AF_UNSPEC ? "*" : af_to_name(t->scope->family),
+                  dns_transaction_state_to_string(state));
+
+        t->state = state;
+
+        dns_transaction_stop(t);
+
+        /* Notify all queries that are interested, but make sure the
+         * transaction isn't freed while we are still looking at it */
+        t->block_gc++;
+        SET_FOREACH(q, t->queries, i)
+                dns_query_ready(q);
+        SET_FOREACH(z, t->zone_items, i)
+                dns_zone_item_ready(z);
+        t->block_gc--;
+
+        dns_transaction_gc(t);
+}
+
+static int on_stream_complete(DnsStream *s, int error) {
+        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+        DnsTransaction *t;
+
+        assert(s);
+        assert(s->transaction);
+
+        /* Copy the data we care about out of the stream before we
+         * destroy it. */
+        t = s->transaction;
+        p = dns_packet_ref(s->read_packet);
+
+        t->stream = dns_stream_free(t->stream);
+
+        if (error != 0) {
+                dns_transaction_complete(t, DNS_TRANSACTION_RESOURCES);
+                return 0;
+        }
+
+        if (dns_packet_validate_reply(p) <= 0) {
+                log_debug("Invalid LLMNR TCP packet.");
+                dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
+                return 0;
+        }
+
+        dns_scope_check_conflicts(t->scope, p);
+
+        t->block_gc++;
+        dns_transaction_process_reply(t, p);
+        t->block_gc--;
+
+        /* If the response wasn't useful, then complete the transition now */
+        if (t->state == DNS_TRANSACTION_PENDING)
+                dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
+
+        return 0;
+}
+
+static int dns_transaction_open_tcp(DnsTransaction *t) {
+        _cleanup_close_ int fd = -1;
+        int r;
+
+        assert(t);
+
+        if (t->stream)
+                return 0;
+
+        if (t->scope->protocol == DNS_PROTOCOL_DNS)
+                fd = dns_scope_tcp_socket(t->scope, AF_UNSPEC, NULL, 53);
+        else if (t->scope->protocol == DNS_PROTOCOL_LLMNR) {
+
+                /* When we already received a query to this (but it was truncated), send to its sender address */
+                if (t->received)
+                        fd = dns_scope_tcp_socket(t->scope, t->received->family, &t->received->sender, t->received->sender_port);
+                else {
+                        union in_addr_union address;
+                        int family;
+
+                        /* Otherwise, try to talk to the owner of a
+                         * the IP address, in case this is a reverse
+                         * PTR lookup */
+                        r = dns_question_extract_reverse_address(t->question, &family, &address);
+                        if (r < 0)
+                                return r;
+                        if (r == 0)
+                                return -EINVAL;
+
+                        fd = dns_scope_tcp_socket(t->scope, family, &address, 5355);
+                }
+        } else
+                return -EAFNOSUPPORT;
+
+        if (fd < 0)
+                return fd;
+
+        r = dns_stream_new(t->scope->manager, &t->stream, t->scope->protocol, fd);
+        if (r < 0)
+                return r;
+
+        fd = -1;
+
+        r = dns_stream_write_packet(t->stream, t->sent);
+        if (r < 0) {
+                t->stream = dns_stream_free(t->stream);
+                return r;
+        }
+
+        t->received = dns_packet_unref(t->received);
+        t->stream->complete = on_stream_complete;
+        t->stream->transaction = t;
+
+        /* The interface index is difficult to determine if we are
+         * connecting to the local host, hence fill this in right away
+         * instead of determining it from the socket */
+        if (t->scope->link)
+                t->stream->ifindex = t->scope->link->ifindex;
+
+        return 0;
+}
+
+void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) {
+        int r;
+
+        assert(t);
+        assert(p);
+        assert(t->state == DNS_TRANSACTION_PENDING);
+
+        /* Note that this call might invalidate the query. Callers
+         * should hence not attempt to access the query or transaction
+         * after calling this function. */
+
+        if (t->scope->protocol == DNS_PROTOCOL_LLMNR) {
+                assert(t->scope->link);
+
+                /* For LLMNR we will not accept any packets from other
+                 * interfaces */
+
+                if (p->ifindex != t->scope->link->ifindex)
+                        return;
+
+                if (p->family != t->scope->family)
+                        return;
+
+                /* Tentative packets are not full responses but still
+                 * useful for identifying uniqueness conflicts during
+                 * probing. */
+                if (DNS_PACKET_T(p)) {
+                        dns_transaction_tentative(t, p);
+                        return;
+                }
+        }
+
+        if (t->scope->protocol == DNS_PROTOCOL_DNS) {
+
+                /* For DNS we are fine with accepting packets on any
+                 * interface, but the source IP address must be one of
+                 * a valid DNS server */
+
+                if (!dns_scope_good_dns_server(t->scope, p->family, &p->sender))
+                        return;
+
+                if (p->sender_port != 53)
+                        return;
+        }
+
+        if (t->received != p) {
+                dns_packet_unref(t->received);
+                t->received = dns_packet_ref(p);
+        }
+
+        if (p->ipproto == IPPROTO_TCP) {
+                if (DNS_PACKET_TC(p)) {
+                        /* Truncated via TCP? Somebody must be fucking with us */
+                        dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
+                        return;
+                }
+
+                if (DNS_PACKET_ID(p) != t->id) {
+                        /* Not the reply to our query? Somebody must be fucking with us */
+                        dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
+                        return;
+                }
+        }
+
+        if (DNS_PACKET_TC(p)) {
+                /* Response was truncated, let's try again with good old TCP */
+                r = dns_transaction_open_tcp(t);
+                if (r == -ESRCH) {
+                        /* No servers found? Damn! */
+                        dns_transaction_complete(t, DNS_TRANSACTION_NO_SERVERS);
+                        return;
+                }
+                if (r < 0) {
+                        /* On LLMNR, if we cannot connect to the host,
+                         * we immediately give up */
+                        if (t->scope->protocol == DNS_PROTOCOL_LLMNR) {
+                                dns_transaction_complete(t, DNS_TRANSACTION_RESOURCES);
+                                return;
+                        }
+
+                        /* On DNS, couldn't send? Try immediately again, with a new server */
+                        dns_scope_next_dns_server(t->scope);
+
+                        r = dns_transaction_go(t);
+                        if (r < 0) {
+                                dns_transaction_complete(t, DNS_TRANSACTION_RESOURCES);
+                                return;
+                        }
+
+                        return;
+                }
+        }
+
+        /* Parse and update the cache */
+        r = dns_packet_extract(p);
+        if (r < 0) {
+                dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
+                return;
+        }
+
+        /* According to RFC 4795, section 2.9. only the RRs from the answer section shall be cached */
+        dns_cache_put(&t->scope->cache, p->question, DNS_PACKET_RCODE(p), p->answer, DNS_PACKET_ANCOUNT(p), 0, p->family, &p->sender);
+
+        if (DNS_PACKET_RCODE(p) == DNS_RCODE_SUCCESS)
+                dns_transaction_complete(t, DNS_TRANSACTION_SUCCESS);
+        else
+                dns_transaction_complete(t, DNS_TRANSACTION_FAILURE);
+}
+
+static int on_transaction_timeout(sd_event_source *s, usec_t usec, void *userdata) {
+        DnsTransaction *t = userdata;
+        int r;
+
+        assert(s);
+        assert(t);
+
+        /* Timeout reached? Try again, with a new server */
+        dns_scope_next_dns_server(t->scope);
+
+        r = dns_transaction_go(t);
+        if (r < 0)
+                dns_transaction_complete(t, DNS_TRANSACTION_RESOURCES);
+
+        return 0;
+}
+
+static int dns_transaction_make_packet(DnsTransaction *t) {
+        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+        unsigned n, added = 0;
+        int r;
+
+        assert(t);
+
+        if (t->sent)
+                return 0;
+
+        r = dns_packet_new_query(&p, t->scope->protocol, 0);
+        if (r < 0)
+                return r;
+
+        for (n = 0; n < t->question->n_keys; n++) {
+                r = dns_scope_good_key(t->scope, t->question->keys[n]);
+                if (r < 0)
+                        return r;
+                if (r == 0)
+                        continue;
+
+                r = dns_packet_append_key(p, t->question->keys[n], NULL);
+                if (r < 0)
+                        return r;
+
+                added++;
+        }
+
+        if (added <= 0)
+                return -EDOM;
+
+        DNS_PACKET_HEADER(p)->qdcount = htobe16(added);
+        DNS_PACKET_HEADER(p)->id = t->id;
+
+        t->sent = p;
+        p = NULL;
+
+        return 0;
+}
+
+int dns_transaction_go(DnsTransaction *t) {
+        bool had_stream;
+        int r;
+
+        assert(t);
+
+        had_stream = !!t->stream;
+
+        dns_transaction_stop(t);
+
+        log_debug("Excercising transaction on scope %s on %s/%s",
+                  dns_protocol_to_string(t->scope->protocol),
+                  t->scope->link ? t->scope->link->name : "*",
+                  t->scope->family == AF_UNSPEC ? "*" : af_to_name(t->scope->family));
+
+        if (t->n_attempts >= TRANSACTION_ATTEMPTS_MAX(t->scope->protocol)) {
+                dns_transaction_complete(t, DNS_TRANSACTION_ATTEMPTS_MAX_REACHED);
+                return 0;
+        }
+
+        if (t->scope->protocol == DNS_PROTOCOL_LLMNR && had_stream) {
+                /* If we already tried via a stream, then we don't
+                 * retry on LLMNR. See RFC 4795, Section 2.7. */
+                dns_transaction_complete(t, DNS_TRANSACTION_ATTEMPTS_MAX_REACHED);
+                return 0;
+        }
+
+        t->n_attempts++;
+        t->received = dns_packet_unref(t->received);
+        t->cached = dns_answer_unref(t->cached);
+        t->cached_rcode = 0;
+
+        /* Check the cache, but only if this transaction is not used
+         * for probing or verifying a zone item. */
+        if (set_isempty(t->zone_items)) {
+
+                /* Before trying the cache, let's make sure we figured out a
+                 * server to use. Should this cause a change of server this
+                 * might flush the cache. */
+                dns_scope_get_dns_server(t->scope);
+
+                /* Let's then prune all outdated entries */
+                dns_cache_prune(&t->scope->cache);
+
+                r = dns_cache_lookup(&t->scope->cache, t->question, &t->cached_rcode, &t->cached);
+                if (r < 0)
+                        return r;
+                if (r > 0) {
+                        log_debug("Cache hit!");
+                        if (t->cached_rcode == DNS_RCODE_SUCCESS)
+                                dns_transaction_complete(t, DNS_TRANSACTION_SUCCESS);
+                        else
+                                dns_transaction_complete(t, DNS_TRANSACTION_FAILURE);
+                        return 0;
+                }
+        }
+
+        if (t->scope->protocol == DNS_PROTOCOL_LLMNR && !t->initial_jitter) {
+                usec_t jitter;
+
+                /* RFC 4795 Section 2.7 suggests all queries should be
+                 * delayed by a random time from 0 to JITTER_INTERVAL. */
+
+                t->initial_jitter = true;
+
+                random_bytes(&jitter, sizeof(jitter));
+                jitter %= LLMNR_JITTER_INTERVAL_USEC;
+
+                r = sd_event_add_time(
+                                t->scope->manager->event,
+                                &t->timeout_event_source,
+                                clock_boottime_or_monotonic(),
+                                now(clock_boottime_or_monotonic()) + jitter,
+                                LLMNR_JITTER_INTERVAL_USEC,
+                                on_transaction_timeout, t);
+                if (r < 0)
+                        return r;
+
+                t->n_attempts = 0;
+                t->state = DNS_TRANSACTION_PENDING;
+
+                log_debug("Delaying LLMNR transaction for " USEC_FMT "us.", jitter);
+                return 0;
+        }
+
+        log_debug("Cache miss!");
+
+        /* Otherwise, we need to ask the network */
+        r = dns_transaction_make_packet(t);
+        if (r == -EDOM) {
+                /* Not the right request to make on this network?
+                 * (i.e. an A request made on IPv6 or an AAAA request
+                 * made on IPv4, on LLMNR or mDNS.) */
+                dns_transaction_complete(t, DNS_TRANSACTION_NO_SERVERS);
+                return 0;
+        }
+        if (r < 0)
+                return r;
+
+        if (t->scope->protocol == DNS_PROTOCOL_LLMNR &&
+            (dns_question_endswith(t->question, "in-addr.arpa") > 0 ||
+             dns_question_endswith(t->question, "ip6.arpa") > 0)) {
+
+                /* RFC 4795, Section 2.4. says reverse lookups shall
+                 * always be made via TCP on LLMNR */
+                r = dns_transaction_open_tcp(t);
+        } else {
+                /* Try via UDP, and if that fails due to large size try via TCP */
+                r = dns_scope_emit(t->scope, t->sent);
+                if (r == -EMSGSIZE)
+                        r = dns_transaction_open_tcp(t);
+        }
+        if (r == -ESRCH) {
+                /* No servers to send this to? */
+                dns_transaction_complete(t, DNS_TRANSACTION_NO_SERVERS);
+                return 0;
+        }
+        if (r < 0) {
+                if (t->scope->protocol != DNS_PROTOCOL_DNS) {
+                        dns_transaction_complete(t, DNS_TRANSACTION_RESOURCES);
+                        return 0;
+                }
+
+                /* Couldn't send? Try immediately again, with a new server */
+                dns_scope_next_dns_server(t->scope);
+
+                return dns_transaction_go(t);
+        }
+
+        r = sd_event_add_time(
+                        t->scope->manager->event,
+                        &t->timeout_event_source,
+                        clock_boottime_or_monotonic(),
+                        now(clock_boottime_or_monotonic()) + TRANSACTION_TIMEOUT_USEC(t->scope->protocol), 0,
+                        on_transaction_timeout, t);
+        if (r < 0)
+                return r;
+
+        t->state = DNS_TRANSACTION_PENDING;
+        return 1;
+}
+
+static const char* const dns_transaction_state_table[_DNS_TRANSACTION_STATE_MAX] = {
+        [DNS_TRANSACTION_NULL] = "null",
+        [DNS_TRANSACTION_PENDING] = "pending",
+        [DNS_TRANSACTION_FAILURE] = "failure",
+        [DNS_TRANSACTION_SUCCESS] = "success",
+        [DNS_TRANSACTION_NO_SERVERS] = "no-servers",
+        [DNS_TRANSACTION_TIMEOUT] = "timeout",
+        [DNS_TRANSACTION_ATTEMPTS_MAX_REACHED] = "attempts-max-reached",
+        [DNS_TRANSACTION_INVALID_REPLY] = "invalid-reply",
+        [DNS_TRANSACTION_RESOURCES] = "resources",
+        [DNS_TRANSACTION_ABORTED] = "aborted",
+};
+DEFINE_STRING_TABLE_LOOKUP(dns_transaction_state, DnsTransactionState);
diff --git a/src/resolve/resolved-dns-transaction.h b/src/resolve/resolved-dns-transaction.h
new file mode 100644 (file)
index 0000000..182fb77
--- /dev/null
@@ -0,0 +1,110 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+typedef struct DnsTransaction DnsTransaction;
+typedef enum DnsTransactionState DnsTransactionState;
+
+enum DnsTransactionState {
+        DNS_TRANSACTION_NULL,
+        DNS_TRANSACTION_PENDING,
+        DNS_TRANSACTION_FAILURE,
+        DNS_TRANSACTION_SUCCESS,
+        DNS_TRANSACTION_NO_SERVERS,
+        DNS_TRANSACTION_TIMEOUT,
+        DNS_TRANSACTION_ATTEMPTS_MAX_REACHED,
+        DNS_TRANSACTION_INVALID_REPLY,
+        DNS_TRANSACTION_RESOURCES,
+        DNS_TRANSACTION_ABORTED,
+        _DNS_TRANSACTION_STATE_MAX,
+        _DNS_TRANSACTION_STATE_INVALID = -1
+};
+
+#include "resolved-dns-scope.h"
+#include "resolved-dns-rr.h"
+#include "resolved-dns-packet.h"
+#include "resolved-dns-question.h"
+#include "resolved-dns-answer.h"
+#include "resolved-dns-stream.h"
+
+struct DnsTransaction {
+        DnsScope *scope;
+
+        DnsQuestion *question;
+
+        DnsTransactionState state;
+        uint16_t id;
+
+        bool initial_jitter;
+
+        DnsPacket *sent, *received;
+        DnsAnswer *cached;
+        int cached_rcode;
+
+        sd_event_source *timeout_event_source;
+        unsigned n_attempts;
+
+        /* TCP connection logic, if we need it */
+        DnsStream *stream;
+
+        /* Queries this transaction is referenced by and that shall be
+         * notified about this specific transaction completing. */
+        Set *queries;
+
+        /* Zone items this transaction is referenced by and that shall
+         * be notified about completion. */
+        Set *zone_items;
+
+        unsigned block_gc;
+
+        LIST_FIELDS(DnsTransaction, transactions_by_scope);
+};
+
+int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsQuestion *q);
+DnsTransaction* dns_transaction_free(DnsTransaction *t);
+
+void dns_transaction_gc(DnsTransaction *t);
+int dns_transaction_go(DnsTransaction *t);
+
+void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p);
+void dns_transaction_complete(DnsTransaction *t, DnsTransactionState state);
+
+const char* dns_transaction_state_to_string(DnsTransactionState p) _const_;
+DnsTransactionState dns_transaction_state_from_string(const char *s) _pure_;
+
+/* After how much time to repeat classic DNS requests */
+#define DNS_TRANSACTION_TIMEOUT_USEC (5 * USEC_PER_SEC)
+
+/* After how much time to repeat LLMNR requests, see RFC 4795 Section 7 */
+#define LLMNR_TRANSACTION_TIMEOUT_USEC (1 * USEC_PER_SEC)
+
+/* LLMNR Jitter interval, see RFC 4795 Section 7 */
+#define LLMNR_JITTER_INTERVAL_USEC (100 * USEC_PER_MSEC)
+
+/* Maximum attempts to send DNS requests, across all DNS servers */
+#define DNS_TRANSACTION_ATTEMPTS_MAX 8
+
+/* Maximum attempts to send LLMNR requests, see RFC 4795 Section 2.7 */
+#define LLMNR_TRANSACTION_ATTEMPTS_MAX 3
+
+#define TRANSACTION_TIMEOUT_USEC(p) (p == DNS_PROTOCOL_LLMNR ? LLMNR_TRANSACTION_TIMEOUT_USEC : DNS_TRANSACTION_TIMEOUT_USEC)
+#define TRANSACTION_ATTEMPTS_MAX(p) (p == DNS_PROTOCOL_LLMNR ? LLMNR_TRANSACTION_ATTEMPTS_MAX : DNS_TRANSACTION_ATTEMPTS_MAX)
diff --git a/src/resolve/resolved-dns-zone.c b/src/resolve/resolved-dns-zone.c
new file mode 100644 (file)
index 0000000..8098ff5
--- /dev/null
@@ -0,0 +1,648 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "list.h"
+
+#include "resolved-dns-zone.h"
+#include "resolved-dns-domain.h"
+#include "resolved-dns-packet.h"
+
+/* Never allow more than 1K entries */
+#define ZONE_MAX 1024
+
+void dns_zone_item_probe_stop(DnsZoneItem *i) {
+        DnsTransaction *t;
+        assert(i);
+
+        if (!i->probe_transaction)
+                return;
+
+        t = i->probe_transaction;
+        i->probe_transaction = NULL;
+
+        set_remove(t->zone_items, i);
+        dns_transaction_gc(t);
+}
+
+static void dns_zone_item_free(DnsZoneItem *i) {
+        if (!i)
+                return;
+
+        dns_zone_item_probe_stop(i);
+        dns_resource_record_unref(i->rr);
+
+        free(i);
+}
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(DnsZoneItem*, dns_zone_item_free);
+
+static void dns_zone_item_remove_and_free(DnsZone *z, DnsZoneItem *i) {
+        DnsZoneItem *first;
+
+        assert(z);
+
+        if (!i)
+                return;
+
+        first = hashmap_get(z->by_key, i->rr->key);
+        LIST_REMOVE(by_key, first, i);
+        if (first)
+                assert_se(hashmap_replace(z->by_key, first->rr->key, first) >= 0);
+        else
+                hashmap_remove(z->by_key, i->rr->key);
+
+        first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key));
+        LIST_REMOVE(by_name, first, i);
+        if (first)
+                assert_se(hashmap_replace(z->by_name, DNS_RESOURCE_KEY_NAME(first->rr->key), first) >= 0);
+        else
+                hashmap_remove(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key));
+
+        dns_zone_item_free(i);
+}
+
+void dns_zone_flush(DnsZone *z) {
+        DnsZoneItem *i;
+
+        assert(z);
+
+        while ((i = hashmap_first(z->by_key)))
+                dns_zone_item_remove_and_free(z, i);
+
+        assert(hashmap_size(z->by_key) == 0);
+        assert(hashmap_size(z->by_name) == 0);
+
+        hashmap_free(z->by_key);
+        z->by_key = NULL;
+
+        hashmap_free(z->by_name);
+        z->by_name = NULL;
+}
+
+static DnsZoneItem* dns_zone_get(DnsZone *z, DnsResourceRecord *rr) {
+        DnsZoneItem *i;
+
+        assert(z);
+        assert(rr);
+
+        LIST_FOREACH(by_key, i, hashmap_get(z->by_key, rr->key))
+                if (dns_resource_record_equal(i->rr, rr) > 0)
+                        return i;
+
+        return NULL;
+}
+
+void dns_zone_remove_rr(DnsZone *z, DnsResourceRecord *rr) {
+        DnsZoneItem *i;
+
+        assert(z);
+        assert(rr);
+
+        i = dns_zone_get(z, rr);
+        if (i)
+                dns_zone_item_remove_and_free(z, i);
+}
+
+static int dns_zone_init(DnsZone *z) {
+        int r;
+
+        assert(z);
+
+        r = hashmap_ensure_allocated(&z->by_key, &dns_resource_key_hash_ops);
+        if (r < 0)
+                return r;
+
+        r = hashmap_ensure_allocated(&z->by_name, &dns_name_hash_ops);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int dns_zone_link_item(DnsZone *z, DnsZoneItem *i) {
+        DnsZoneItem *first;
+        int r;
+
+        first = hashmap_get(z->by_key, i->rr->key);
+        if (first) {
+                LIST_PREPEND(by_key, first, i);
+                assert_se(hashmap_replace(z->by_key, first->rr->key, first) >= 0);
+        } else {
+                r = hashmap_put(z->by_key, i->rr->key, i);
+                if (r < 0)
+                        return r;
+        }
+
+        first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key));
+        if (first) {
+                LIST_PREPEND(by_name, first, i);
+                assert_se(hashmap_replace(z->by_name, DNS_RESOURCE_KEY_NAME(first->rr->key), first) >= 0);
+        } else {
+                r = hashmap_put(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key), i);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+static int dns_zone_item_probe_start(DnsZoneItem *i)  {
+        _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
+        _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
+        DnsTransaction *t;
+        int r;
+
+        assert(i);
+
+        if (i->probe_transaction)
+                return 0;
+
+        key = dns_resource_key_new(i->rr->key->class, DNS_TYPE_ANY, DNS_RESOURCE_KEY_NAME(i->rr->key));
+        if (!key)
+                return -ENOMEM;
+
+        question = dns_question_new(1);
+        if (!question)
+                return -ENOMEM;
+
+        r = dns_question_add(question, key);
+        if (r < 0)
+                return r;
+
+        t = dns_scope_find_transaction(i->scope, question, false);
+        if (!t) {
+                r = dns_transaction_new(&t, i->scope, question);
+                if (r < 0)
+                        return r;
+        }
+
+        r = set_ensure_allocated(&t->zone_items, NULL);
+        if (r < 0)
+                goto gc;
+
+        r = set_put(t->zone_items, i);
+        if (r < 0)
+                goto gc;
+
+        i->probe_transaction = t;
+
+        if (t->state == DNS_TRANSACTION_NULL) {
+
+                i->block_ready++;
+                r = dns_transaction_go(t);
+                i->block_ready--;
+
+                if (r < 0) {
+                        dns_zone_item_probe_stop(i);
+                        return r;
+                }
+        }
+
+        dns_zone_item_ready(i);
+
+        return 0;
+
+gc:
+        dns_transaction_gc(t);
+        return r;
+}
+
+int dns_zone_put(DnsZone *z, DnsScope *s, DnsResourceRecord *rr, bool probe) {
+        _cleanup_(dns_zone_item_freep) DnsZoneItem *i = NULL;
+        DnsZoneItem *existing;
+        int r;
+
+        assert(z);
+        assert(s);
+        assert(rr);
+
+        if (rr->key->class == DNS_CLASS_ANY)
+                return -EINVAL;
+        if (rr->key->type == DNS_TYPE_ANY)
+                return -EINVAL;
+
+        existing = dns_zone_get(z, rr);
+        if (existing)
+                return 0;
+
+        r = dns_zone_init(z);
+        if (r < 0)
+                return r;
+
+        i = new0(DnsZoneItem, 1);
+        if (!i)
+                return -ENOMEM;
+
+        i->scope = s;
+        i->rr = dns_resource_record_ref(rr);
+        i->probing_enabled = probe;
+
+        r = dns_zone_link_item(z, i);
+        if (r < 0)
+                return r;
+
+        if (probe) {
+                DnsZoneItem *first, *j;
+                bool established = false;
+
+                /* Check if there's already an RR with the same name
+                 * established. If so, it has been probed already, and
+                 * we don't ned to probe again. */
+
+                LIST_FIND_HEAD(by_name, i, first);
+                LIST_FOREACH(by_name, j, first) {
+                        if (i == j)
+                                continue;
+
+                        if (j->state == DNS_ZONE_ITEM_ESTABLISHED)
+                                established = true;
+                }
+
+                if (established)
+                        i->state = DNS_ZONE_ITEM_ESTABLISHED;
+                else {
+                        i->state = DNS_ZONE_ITEM_PROBING;
+
+                        r = dns_zone_item_probe_start(i);
+                        if (r < 0) {
+                                dns_zone_item_remove_and_free(z, i);
+                                i = NULL;
+                                return r;
+                        }
+                }
+        } else
+                i->state = DNS_ZONE_ITEM_ESTABLISHED;
+
+        i = NULL;
+        return 0;
+}
+
+int dns_zone_lookup(DnsZone *z, DnsQuestion *q, DnsAnswer **ret_answer, DnsAnswer **ret_soa, bool *ret_tentative) {
+        _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL, *soa = NULL;
+        unsigned i, n_answer = 0, n_soa = 0;
+        bool tentative = true;
+        int r;
+
+        assert(z);
+        assert(q);
+        assert(ret_answer);
+        assert(ret_soa);
+
+        if (q->n_keys <= 0) {
+                *ret_answer = NULL;
+                *ret_soa = NULL;
+
+                if (ret_tentative)
+                        *ret_tentative = false;
+
+                return 0;
+        }
+
+        /* First iteration, count what we have */
+        for (i = 0; i < q->n_keys; i++) {
+                DnsZoneItem *j, *first;
+
+                if (q->keys[i]->type == DNS_TYPE_ANY ||
+                    q->keys[i]->class == DNS_CLASS_ANY) {
+                        bool found = false, added = false;
+                        int k;
+
+                        /* If this is a generic match, then we have to
+                         * go through the list by the name and look
+                         * for everything manually */
+
+                        first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(q->keys[i]));
+                        LIST_FOREACH(by_name, j, first) {
+                                if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING))
+                                        continue;
+
+                                found = true;
+
+                                k = dns_resource_key_match_rr(q->keys[i], j->rr);
+                                if (k < 0)
+                                        return k;
+                                if (k > 0) {
+                                        n_answer++;
+                                        added = true;
+                                }
+
+                        }
+
+                        if (found && !added)
+                                n_soa++;
+
+                } else {
+                        bool found = false;
+
+                        /* If this is a specific match, then look for
+                         * the right key immediately */
+
+                        first = hashmap_get(z->by_key, q->keys[i]);
+                        LIST_FOREACH(by_key, j, first) {
+                                if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING))
+                                        continue;
+
+                                found = true;
+                                n_answer++;
+                        }
+
+                        if (!found) {
+                                first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(q->keys[i]));
+                                LIST_FOREACH(by_name, j, first) {
+                                        if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING))
+                                                continue;
+
+                                        n_soa++;
+                                        break;
+                                }
+                        }
+                }
+        }
+
+        if (n_answer <= 0 && n_soa <= 0) {
+                *ret_answer = NULL;
+                *ret_soa = NULL;
+
+                if (ret_tentative)
+                        *ret_tentative = false;
+
+                return 0;
+        }
+
+        if (n_answer > 0) {
+                answer = dns_answer_new(n_answer);
+                if (!answer)
+                        return -ENOMEM;
+        }
+
+        if (n_soa > 0) {
+                soa = dns_answer_new(n_soa);
+                if (!soa)
+                        return -ENOMEM;
+        }
+
+        /* Second iteration, actually add the RRs to the answers */
+        for (i = 0; i < q->n_keys; i++) {
+                DnsZoneItem *j, *first;
+
+                if (q->keys[i]->type == DNS_TYPE_ANY ||
+                    q->keys[i]->class == DNS_CLASS_ANY) {
+                        bool found = false, added = false;
+                        int k;
+
+                        first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(q->keys[i]));
+                        LIST_FOREACH(by_name, j, first) {
+                                if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING))
+                                        continue;
+
+                                found = true;
+
+                                if (j->state != DNS_ZONE_ITEM_PROBING)
+                                        tentative = false;
+
+                                k = dns_resource_key_match_rr(q->keys[i], j->rr);
+                                if (k < 0)
+                                        return k;
+                                if (k > 0) {
+                                        r = dns_answer_add(answer, j->rr);
+                                        if (r < 0)
+                                                return r;
+
+                                        added = true;
+                                }
+                        }
+
+                        if (found && !added) {
+                                r = dns_answer_add_soa(soa, DNS_RESOURCE_KEY_NAME(q->keys[i]), LLMNR_DEFAULT_TTL);
+                                if (r < 0)
+                                        return r;
+                        }
+                } else {
+                        bool found = false;
+
+                        first = hashmap_get(z->by_key, q->keys[i]);
+                        LIST_FOREACH(by_key, j, first) {
+                                if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING))
+                                        continue;
+
+                                found = true;
+
+                                if (j->state != DNS_ZONE_ITEM_PROBING)
+                                        tentative = false;
+
+                                r = dns_answer_add(answer, j->rr);
+                                if (r < 0)
+                                        return r;
+                        }
+
+                        if (!found) {
+                                bool add_soa = false;
+
+                                first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(q->keys[i]));
+                                LIST_FOREACH(by_name, j, first) {
+                                        if (!IN_SET(j->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING))
+                                                continue;
+
+                                        if (j->state != DNS_ZONE_ITEM_PROBING)
+                                                tentative = false;
+
+                                        add_soa = true;
+                                }
+
+                                if (add_soa) {
+                                        r = dns_answer_add_soa(soa, DNS_RESOURCE_KEY_NAME(q->keys[i]), LLMNR_DEFAULT_TTL);
+                                        if (r < 0)
+                                                return r;
+                                }
+                        }
+                }
+        }
+
+        *ret_answer = answer;
+        answer = NULL;
+
+        *ret_soa = soa;
+        soa = NULL;
+
+        if (ret_tentative)
+                *ret_tentative = tentative;
+
+        return 1;
+}
+
+void dns_zone_item_conflict(DnsZoneItem *i) {
+        _cleanup_free_ char *pretty = NULL;
+
+        assert(i);
+
+        if (!IN_SET(i->state, DNS_ZONE_ITEM_PROBING, DNS_ZONE_ITEM_VERIFYING, DNS_ZONE_ITEM_ESTABLISHED))
+                return;
+
+        dns_resource_record_to_string(i->rr, &pretty);
+        log_info("Detected conflict on %s", strna(pretty));
+
+        dns_zone_item_probe_stop(i);
+
+        /* Withdraw the conflict item */
+        i->state = DNS_ZONE_ITEM_WITHDRAWN;
+
+        /* Maybe change the hostname */
+        if (dns_name_equal(i->scope->manager->hostname, DNS_RESOURCE_KEY_NAME(i->rr->key)) > 0)
+                manager_next_hostname(i->scope->manager);
+}
+
+void dns_zone_item_ready(DnsZoneItem *i) {
+        _cleanup_free_ char *pretty = NULL;
+
+        assert(i);
+        assert(i->probe_transaction);
+
+        if (i->block_ready > 0)
+                return;
+
+        if (IN_SET(i->probe_transaction->state, DNS_TRANSACTION_NULL, DNS_TRANSACTION_PENDING))
+                return;
+
+        if (i->probe_transaction->state == DNS_TRANSACTION_SUCCESS) {
+                bool we_lost = false;
+
+                /* The probe got a successful reply. If we so far
+                 * weren't established we just give up. If we already
+                 * were established, and the peer has the
+                 * lexicographically larger IP address we continue
+                 * and defend it. */
+
+                if (!IN_SET(i->state, DNS_ZONE_ITEM_ESTABLISHED, DNS_ZONE_ITEM_VERIFYING)) {
+                        log_debug("Got a successful probe for not yet established RR, we lost.");
+                        we_lost = true;
+                } else {
+                        assert(i->probe_transaction->received);
+                        we_lost = memcmp(&i->probe_transaction->received->sender, &i->probe_transaction->received->destination, FAMILY_ADDRESS_SIZE(i->probe_transaction->received->family)) < 0;
+                        if (we_lost)
+                                log_debug("Got a successful probe reply for an established RR, and we have a lexicographically larger IP address and thus lost.");
+                }
+
+                if (we_lost) {
+                        dns_zone_item_conflict(i);
+                        return;
+                }
+
+                log_debug("Got a successful probe reply, but peer has lexicographically lower IP address and thus lost.");
+        }
+
+        dns_resource_record_to_string(i->rr, &pretty);
+        log_debug("Record %s successfully probed.", strna(pretty));
+
+        dns_zone_item_probe_stop(i);
+        i->state = DNS_ZONE_ITEM_ESTABLISHED;
+}
+
+static int dns_zone_item_verify(DnsZoneItem *i) {
+        _cleanup_free_ char *pretty = NULL;
+        int r;
+
+        assert(i);
+
+        if (i->state != DNS_ZONE_ITEM_ESTABLISHED)
+                return 0;
+
+        dns_resource_record_to_string(i->rr, &pretty);
+        log_debug("Verifying RR %s", strna(pretty));
+
+        i->state = DNS_ZONE_ITEM_VERIFYING;
+        r = dns_zone_item_probe_start(i);
+        if (r < 0) {
+                log_error("Failed to start probing for verifying RR: %s", strerror(-r));
+                i->state = DNS_ZONE_ITEM_ESTABLISHED;
+                return r;
+        }
+
+        return 0;
+}
+
+int dns_zone_check_conflicts(DnsZone *zone, DnsResourceRecord *rr) {
+        DnsZoneItem *i, *first;
+        int c = 0;
+
+        assert(zone);
+        assert(rr);
+
+        /* This checks whether a response RR we received from somebody
+         * else is one that we actually thought was uniquely ours. If
+         * so, we'll verify our RRs. */
+
+        /* No conflict if we don't have the name at all. */
+        first = hashmap_get(zone->by_name, DNS_RESOURCE_KEY_NAME(rr->key));
+        if (!first)
+                return 0;
+
+        /* No conflict if we have the exact same RR */
+        if (dns_zone_get(zone, rr))
+                return 0;
+
+        /* OK, somebody else has RRs for the same name. Yuck! Let's
+         * start probing again */
+
+        LIST_FOREACH(by_name, i, first) {
+                if (dns_resource_record_equal(i->rr, rr))
+                        continue;
+
+                dns_zone_item_verify(i);
+                c++;
+        }
+
+        return c;
+}
+
+int dns_zone_verify_conflicts(DnsZone *zone, DnsResourceKey *key) {
+        DnsZoneItem *i, *first;
+        int c = 0;
+
+        assert(zone);
+
+        /* Somebody else notified us about a possible conflict. Let's
+         * verify if that's true. */
+
+        first = hashmap_get(zone->by_name, DNS_RESOURCE_KEY_NAME(key));
+        if (!first)
+                return 0;
+
+        LIST_FOREACH(by_name, i, first) {
+                dns_zone_item_verify(i);
+                c++;
+        }
+
+        return c;
+}
+
+void dns_zone_verify_all(DnsZone *zone) {
+        DnsZoneItem *i;
+        Iterator iterator;
+
+        assert(zone);
+
+        HASHMAP_FOREACH(i, zone->by_key, iterator) {
+                DnsZoneItem *j;
+
+                LIST_FOREACH(by_key, j, i)
+                        dns_zone_item_verify(j);
+        }
+}
diff --git a/src/resolve/resolved-dns-zone.h b/src/resolve/resolved-dns-zone.h
new file mode 100644 (file)
index 0000000..7185126
--- /dev/null
@@ -0,0 +1,80 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "hashmap.h"
+
+typedef struct DnsZone {
+        Hashmap *by_key;
+        Hashmap *by_name;
+} DnsZone;
+
+typedef struct DnsZoneItem DnsZoneItem;
+typedef enum DnsZoneItemState DnsZoneItemState;
+
+#include "resolved-dns-rr.h"
+#include "resolved-dns-question.h"
+#include "resolved-dns-answer.h"
+#include "resolved-dns-transaction.h"
+
+/* RFC 4795 Section 2.8. suggests a TTL of 30s by default */
+#define LLMNR_DEFAULT_TTL (30)
+
+enum DnsZoneItemState {
+        DNS_ZONE_ITEM_PROBING,
+        DNS_ZONE_ITEM_ESTABLISHED,
+        DNS_ZONE_ITEM_VERIFYING,
+        DNS_ZONE_ITEM_WITHDRAWN,
+};
+
+struct DnsZoneItem {
+        DnsScope *scope;
+        DnsResourceRecord *rr;
+
+        DnsZoneItemState state;
+
+        unsigned block_ready;
+
+        bool probing_enabled;
+
+        LIST_FIELDS(DnsZoneItem, by_key);
+        LIST_FIELDS(DnsZoneItem, by_name);
+
+        DnsTransaction *probe_transaction;
+};
+
+void dns_zone_flush(DnsZone *z);
+
+int dns_zone_put(DnsZone *z, DnsScope *s, DnsResourceRecord *rr, bool probe);
+void dns_zone_remove_rr(DnsZone *z, DnsResourceRecord *rr);
+
+int dns_zone_lookup(DnsZone *z, DnsQuestion *q, DnsAnswer **answer, DnsAnswer **soa, bool *tentative);
+
+void dns_zone_item_conflict(DnsZoneItem *i);
+void dns_zone_item_ready(DnsZoneItem *i);
+
+int dns_zone_check_conflicts(DnsZone *zone, DnsResourceRecord *rr);
+int dns_zone_verify_conflicts(DnsZone *zone, DnsResourceKey *key);
+
+void dns_zone_verify_all(DnsZone *zone);
+
+void dns_zone_item_probe_stop(DnsZoneItem *i);
index 71e998051a88cca8af4b470d72050f6642d1de3b..8e78fbf06abe02e5215dad3825f83189f3db4226 100644 (file)
@@ -1,7 +1,7 @@
 %{
 #include <stddef.h>
 #include "conf-parser.h"
-#include "resolved.h"
+#include "resolved-conf.h"
 %}
 struct ConfigPerfItem;
 %null_strings
@@ -14,4 +14,6 @@ struct ConfigPerfItem;
 %struct-type
 %includes
 %%
-Resolve.DNS,                    config_parse_dnsv,     0, offsetof(Manager, fallback_dns)
+Resolve.DNS,          config_parse_dnsv,    DNS_SERVER_SYSTEM,   0
+Resolve.FallbackDNS,  config_parse_dnsv,    DNS_SERVER_FALLBACK, 0
+Resolve.LLMNR,        config_parse_support, 0,                   offsetof(Manager, llmnr_support)
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
new file mode 100644 (file)
index 0000000..4def672
--- /dev/null
@@ -0,0 +1,552 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <net/if.h>
+
+#include "sd-network.h"
+#include "strv.h"
+#include "missing.h"
+#include "resolved-link.h"
+
+int link_new(Manager *m, Link **ret, int ifindex) {
+        _cleanup_(link_freep) Link *l = NULL;
+        int r;
+
+        assert(m);
+        assert(ifindex > 0);
+
+        r = hashmap_ensure_allocated(&m->links, NULL);
+        if (r < 0)
+                return r;
+
+        l = new0(Link, 1);
+        if (!l)
+                return -ENOMEM;
+
+        l->ifindex = ifindex;
+        l->llmnr_support = SUPPORT_YES;
+
+        r = hashmap_put(m->links, INT_TO_PTR(ifindex), l);
+        if (r < 0)
+                return r;
+
+        l->manager = m;
+
+        if (ret)
+                *ret = l;
+        l = NULL;
+
+        return 0;
+}
+
+Link *link_free(Link *l) {
+
+        if (!l)
+                return NULL;
+
+        while (l->addresses)
+                link_address_free(l->addresses);
+
+        if (l->manager)
+                hashmap_remove(l->manager->links, INT_TO_PTR(l->ifindex));
+
+        dns_scope_free(l->unicast_scope);
+        dns_scope_free(l->llmnr_ipv4_scope);
+        dns_scope_free(l->llmnr_ipv6_scope);
+
+        while (l->dns_servers)
+                dns_server_free(l->dns_servers);
+
+        free(l);
+        return NULL;
+}
+
+static void link_allocate_scopes(Link *l) {
+        int r;
+
+        assert(l);
+
+        if (l->dns_servers) {
+                if (!l->unicast_scope) {
+                        r = dns_scope_new(l->manager, &l->unicast_scope, l, DNS_PROTOCOL_DNS, AF_UNSPEC);
+                        if (r < 0)
+                                log_warning("Failed to allocate DNS scope: %s", strerror(-r));
+                }
+        } else
+                l->unicast_scope = dns_scope_free(l->unicast_scope);
+
+        if (link_relevant(l, AF_INET) &&
+            l->llmnr_support != SUPPORT_NO &&
+            l->manager->llmnr_support != SUPPORT_NO) {
+                if (!l->llmnr_ipv4_scope) {
+                        r = dns_scope_new(l->manager, &l->llmnr_ipv4_scope, l, DNS_PROTOCOL_LLMNR, AF_INET);
+                        if (r < 0)
+                                log_warning("Failed to allocate LLMNR IPv4 scope: %s", strerror(-r));
+                }
+        } else
+                l->llmnr_ipv4_scope = dns_scope_free(l->llmnr_ipv4_scope);
+
+        if (link_relevant(l, AF_INET6) &&
+            l->llmnr_support != SUPPORT_NO &&
+            l->manager->llmnr_support != SUPPORT_NO &&
+            socket_ipv6_is_supported()) {
+                if (!l->llmnr_ipv6_scope) {
+                        r = dns_scope_new(l->manager, &l->llmnr_ipv6_scope, l, DNS_PROTOCOL_LLMNR, AF_INET6);
+                        if (r < 0)
+                                log_warning("Failed to allocate LLMNR IPv6 scope: %s", strerror(-r));
+                }
+        } else
+                l->llmnr_ipv6_scope = dns_scope_free(l->llmnr_ipv6_scope);
+}
+
+void link_add_rrs(Link *l, bool force_remove) {
+        LinkAddress *a;
+
+        LIST_FOREACH(addresses, a, l->addresses)
+                link_address_add_rrs(a, force_remove);
+}
+
+int link_update_rtnl(Link *l, sd_rtnl_message *m) {
+        const char *n = NULL;
+        int r;
+
+        assert(l);
+        assert(m);
+
+        r = sd_rtnl_message_link_get_flags(m, &l->flags);
+        if (r < 0)
+                return r;
+
+        sd_rtnl_message_read_u32(m, IFLA_MTU, &l->mtu);
+
+        if (sd_rtnl_message_read_string(m, IFLA_IFNAME, &n) >= 0) {
+                strncpy(l->name, n, sizeof(l->name)-1);
+                char_array_0(l->name);
+        }
+
+        link_allocate_scopes(l);
+        link_add_rrs(l, false);
+
+        return 0;
+}
+
+static int link_update_dns_servers(Link *l) {
+        _cleanup_strv_free_ char **nameservers = NULL;
+        char **nameserver;
+        DnsServer *s, *nx;
+        int r;
+
+        assert(l);
+
+        r = sd_network_link_get_dns(l->ifindex, &nameservers);
+        if (r < 0)
+                goto clear;
+
+        LIST_FOREACH(servers, s, l->dns_servers)
+                s->marked = true;
+
+        STRV_FOREACH(nameserver, nameservers) {
+                union in_addr_union a;
+                int family;
+
+                r = in_addr_from_string_auto(*nameserver, &family, &a);
+                if (r < 0)
+                        goto clear;
+
+                s = link_find_dns_server(l, family, &a);
+                if (s)
+                        s->marked = false;
+                else {
+                        r = dns_server_new(l->manager, NULL, DNS_SERVER_LINK, l, family, &a);
+                        if (r < 0)
+                                goto clear;
+                }
+        }
+
+        LIST_FOREACH_SAFE(servers, s, nx, l->dns_servers)
+                if (s->marked)
+                        dns_server_free(s);
+
+        return 0;
+
+clear:
+        while (l->dns_servers)
+                dns_server_free(l->dns_servers);
+
+        return r;
+}
+
+static int link_update_llmnr_support(Link *l) {
+        _cleanup_free_ char *b = NULL;
+        int r;
+
+        assert(l);
+
+        r = sd_network_link_get_llmnr(l->ifindex, &b);
+        if (r < 0)
+                goto clear;
+
+        r = parse_boolean(b);
+        if (r < 0) {
+                if (streq(b, "resolve"))
+                        l->llmnr_support = SUPPORT_RESOLVE;
+                else
+                        goto clear;
+
+        } else if (r > 0)
+                l->llmnr_support = SUPPORT_YES;
+        else
+                l->llmnr_support = SUPPORT_NO;
+
+        return 0;
+
+clear:
+        l->llmnr_support = SUPPORT_YES;
+        return r;
+}
+
+static int link_update_domains(Link *l) {
+        int r;
+
+        if (!l->unicast_scope)
+                return 0;
+
+        strv_free(l->unicast_scope->domains);
+        l->unicast_scope->domains = NULL;
+
+        r = sd_network_link_get_domains(l->ifindex,
+                                        &l->unicast_scope->domains);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+int link_update_monitor(Link *l) {
+        assert(l);
+
+        link_update_dns_servers(l);
+        link_update_llmnr_support(l);
+        link_allocate_scopes(l);
+        link_update_domains(l);
+        link_add_rrs(l, false);
+
+        return 0;
+}
+
+bool link_relevant(Link *l, int family) {
+        _cleanup_free_ char *state = NULL;
+        LinkAddress *a;
+
+        assert(l);
+
+        /* A link is relevant if it isn't a loopback or pointopoint
+         * device, has a link beat, can do multicast and has at least
+         * one relevant IP address */
+
+        if (l->flags & (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_DORMANT))
+                return false;
+
+        if ((l->flags & (IFF_UP|IFF_LOWER_UP|IFF_MULTICAST)) != (IFF_UP|IFF_LOWER_UP|IFF_MULTICAST))
+                return false;
+
+        sd_network_link_get_operational_state(l->ifindex, &state);
+        if (state && !STR_IN_SET(state, "unknown", "degraded", "routable"))
+                return false;
+
+        LIST_FOREACH(addresses, a, l->addresses)
+                if (a->family == family && link_address_relevant(a))
+                        return true;
+
+        return false;
+}
+
+LinkAddress *link_find_address(Link *l, int family, const union in_addr_union *in_addr) {
+        LinkAddress *a;
+
+        assert(l);
+
+        LIST_FOREACH(addresses, a, l->addresses)
+                if (a->family == family && in_addr_equal(family, &a->in_addr, in_addr))
+                        return a;
+
+        return NULL;
+}
+
+DnsServer* link_find_dns_server(Link *l, int family, const union in_addr_union *in_addr) {
+        DnsServer *s;
+
+        assert(l);
+
+        LIST_FOREACH(servers, s, l->dns_servers)
+                if (s->family == family && in_addr_equal(family, &s->address, in_addr))
+                        return s;
+        return NULL;
+}
+
+DnsServer* link_set_dns_server(Link *l, DnsServer *s) {
+        assert(l);
+
+        if (l->current_dns_server == s)
+                return s;
+
+        if (s) {
+                _cleanup_free_ char *ip = NULL;
+
+                in_addr_to_string(s->family, &s->address, &ip);
+                log_info("Switching to DNS server %s for interface %s.", strna(ip), l->name);
+        }
+
+        l->current_dns_server = s;
+
+        if (l->unicast_scope)
+                dns_cache_flush(&l->unicast_scope->cache);
+
+        return s;
+}
+
+DnsServer *link_get_dns_server(Link *l) {
+        assert(l);
+
+        if (!l->current_dns_server)
+                link_set_dns_server(l, l->dns_servers);
+
+        return l->current_dns_server;
+}
+
+void link_next_dns_server(Link *l) {
+        assert(l);
+
+        if (!l->current_dns_server)
+                return;
+
+        if (l->current_dns_server->servers_next) {
+                link_set_dns_server(l, l->current_dns_server->servers_next);
+                return;
+        }
+
+        link_set_dns_server(l, l->dns_servers);
+}
+
+int link_address_new(Link *l, LinkAddress **ret, int family, const union in_addr_union *in_addr) {
+        LinkAddress *a;
+
+        assert(l);
+        assert(in_addr);
+
+        a = new0(LinkAddress, 1);
+        if (!a)
+                return -ENOMEM;
+
+        a->family = family;
+        a->in_addr = *in_addr;
+
+        a->link = l;
+        LIST_PREPEND(addresses, l->addresses, a);
+
+        if (ret)
+                *ret = a;
+
+        return 0;
+}
+
+LinkAddress *link_address_free(LinkAddress *a) {
+        if (!a)
+                return NULL;
+
+        if (a->link) {
+                LIST_REMOVE(addresses, a->link->addresses, a);
+
+                if (a->llmnr_address_rr) {
+                        if (a->family == AF_INET && a->link->llmnr_ipv4_scope)
+                                dns_zone_remove_rr(&a->link->llmnr_ipv4_scope->zone, a->llmnr_address_rr);
+                        else if (a->family == AF_INET6 && a->link->llmnr_ipv6_scope)
+                                dns_zone_remove_rr(&a->link->llmnr_ipv6_scope->zone, a->llmnr_address_rr);
+                }
+
+                if (a->llmnr_ptr_rr) {
+                        if (a->family == AF_INET && a->link->llmnr_ipv4_scope)
+                                dns_zone_remove_rr(&a->link->llmnr_ipv4_scope->zone, a->llmnr_ptr_rr);
+                        else if (a->family == AF_INET6 && a->link->llmnr_ipv6_scope)
+                                dns_zone_remove_rr(&a->link->llmnr_ipv6_scope->zone, a->llmnr_ptr_rr);
+                }
+        }
+
+        dns_resource_record_unref(a->llmnr_address_rr);
+        dns_resource_record_unref(a->llmnr_ptr_rr);
+
+        free(a);
+        return NULL;
+}
+
+void link_address_add_rrs(LinkAddress *a, bool force_remove) {
+        int r;
+
+        assert(a);
+
+        if (a->family == AF_INET) {
+
+                if (!force_remove &&
+                    link_address_relevant(a) &&
+                    a->link->llmnr_ipv4_scope &&
+                    a->link->llmnr_support == SUPPORT_YES &&
+                    a->link->manager->llmnr_support == SUPPORT_YES) {
+
+                        if (!a->link->manager->host_ipv4_key) {
+                                a->link->manager->host_ipv4_key = dns_resource_key_new(DNS_CLASS_IN, DNS_TYPE_A, a->link->manager->hostname);
+                                if (!a->link->manager->host_ipv4_key) {
+                                        r = -ENOMEM;
+                                        goto fail;
+                                }
+                        }
+
+                        if (!a->llmnr_address_rr) {
+                                a->llmnr_address_rr = dns_resource_record_new(a->link->manager->host_ipv4_key);
+                                if (!a->llmnr_address_rr) {
+                                        r = -ENOMEM;
+                                        goto fail;
+                                }
+
+                                a->llmnr_address_rr->a.in_addr = a->in_addr.in;
+                                a->llmnr_address_rr->ttl = LLMNR_DEFAULT_TTL;
+                        }
+
+                        if (!a->llmnr_ptr_rr) {
+                                r = dns_resource_record_new_reverse(&a->llmnr_ptr_rr, a->family, &a->in_addr, a->link->manager->hostname);
+                                if (r < 0)
+                                        goto fail;
+
+                                a->llmnr_ptr_rr->ttl = LLMNR_DEFAULT_TTL;
+                        }
+
+                        r = dns_zone_put(&a->link->llmnr_ipv4_scope->zone, a->link->llmnr_ipv4_scope, a->llmnr_address_rr, true);
+                        if (r < 0)
+                                log_warning("Failed to add A record to LLMNR zone: %s", strerror(-r));
+
+                        r = dns_zone_put(&a->link->llmnr_ipv4_scope->zone, a->link->llmnr_ipv4_scope, a->llmnr_ptr_rr, false);
+                        if (r < 0)
+                                log_warning("Failed to add IPv6 PTR record to LLMNR zone: %s", strerror(-r));
+                } else {
+                        if (a->llmnr_address_rr) {
+                                if (a->link->llmnr_ipv4_scope)
+                                        dns_zone_remove_rr(&a->link->llmnr_ipv4_scope->zone, a->llmnr_address_rr);
+                                a->llmnr_address_rr = dns_resource_record_unref(a->llmnr_address_rr);
+                        }
+
+                        if (a->llmnr_ptr_rr) {
+                                if (a->link->llmnr_ipv4_scope)
+                                        dns_zone_remove_rr(&a->link->llmnr_ipv4_scope->zone, a->llmnr_ptr_rr);
+                                a->llmnr_ptr_rr = dns_resource_record_unref(a->llmnr_ptr_rr);
+                        }
+                }
+        }
+
+        if (a->family == AF_INET6) {
+
+                if (!force_remove &&
+                    link_address_relevant(a) &&
+                    a->link->llmnr_ipv6_scope &&
+                    a->link->llmnr_support == SUPPORT_YES &&
+                    a->link->manager->llmnr_support == SUPPORT_YES) {
+
+                        if (!a->link->manager->host_ipv6_key) {
+                                a->link->manager->host_ipv6_key = dns_resource_key_new(DNS_CLASS_IN, DNS_TYPE_AAAA, a->link->manager->hostname);
+                                if (!a->link->manager->host_ipv6_key) {
+                                        r = -ENOMEM;
+                                        goto fail;
+                                }
+                        }
+
+                        if (!a->llmnr_address_rr) {
+                                a->llmnr_address_rr = dns_resource_record_new(a->link->manager->host_ipv6_key);
+                                if (!a->llmnr_address_rr) {
+                                        r = -ENOMEM;
+                                        goto fail;
+                                }
+
+                                a->llmnr_address_rr->aaaa.in6_addr = a->in_addr.in6;
+                                a->llmnr_address_rr->ttl = LLMNR_DEFAULT_TTL;
+                        }
+
+                        if (!a->llmnr_ptr_rr) {
+                                r = dns_resource_record_new_reverse(&a->llmnr_ptr_rr, a->family, &a->in_addr, a->link->manager->hostname);
+                                if (r < 0)
+                                        goto fail;
+
+                                a->llmnr_ptr_rr->ttl = LLMNR_DEFAULT_TTL;
+                        }
+
+                        r = dns_zone_put(&a->link->llmnr_ipv6_scope->zone, a->link->llmnr_ipv6_scope, a->llmnr_address_rr, true);
+                        if (r < 0)
+                                log_warning("Failed to add AAAA record to LLMNR zone: %s", strerror(-r));
+
+                        r = dns_zone_put(&a->link->llmnr_ipv6_scope->zone, a->link->llmnr_ipv6_scope, a->llmnr_ptr_rr, false);
+                        if (r < 0)
+                                log_warning("Failed to add IPv6 PTR record to LLMNR zone: %s", strerror(-r));
+                } else {
+                        if (a->llmnr_address_rr) {
+                                if (a->link->llmnr_ipv6_scope)
+                                        dns_zone_remove_rr(&a->link->llmnr_ipv6_scope->zone, a->llmnr_address_rr);
+                                a->llmnr_address_rr = dns_resource_record_unref(a->llmnr_address_rr);
+                        }
+
+                        if (a->llmnr_ptr_rr) {
+                                if (a->link->llmnr_ipv6_scope)
+                                        dns_zone_remove_rr(&a->link->llmnr_ipv6_scope->zone, a->llmnr_ptr_rr);
+                                a->llmnr_ptr_rr = dns_resource_record_unref(a->llmnr_ptr_rr);
+                        }
+                }
+        }
+
+        return;
+
+fail:
+        log_debug("Failed to update address RRs: %s", strerror(-r));
+}
+
+int link_address_update_rtnl(LinkAddress *a, sd_rtnl_message *m) {
+        int r;
+        assert(a);
+        assert(m);
+
+        r = sd_rtnl_message_addr_get_flags(m, &a->flags);
+        if (r < 0)
+                return r;
+
+        sd_rtnl_message_addr_get_scope(m, &a->scope);
+
+        link_allocate_scopes(a->link);
+        link_add_rrs(a->link, false);
+
+        return 0;
+}
+
+bool link_address_relevant(LinkAddress *a) {
+        assert(a);
+
+        if (a->flags & (IFA_F_DEPRECATED|IFA_F_TENTATIVE))
+                return false;
+
+        if (IN_SET(a->scope, RT_SCOPE_HOST, RT_SCOPE_NOWHERE))
+                return false;
+
+        return true;
+}
diff --git a/src/resolve/resolved-link.h b/src/resolve/resolved-link.h
new file mode 100644 (file)
index 0000000..4f0702e
--- /dev/null
@@ -0,0 +1,91 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <net/if.h>
+
+#include "in-addr-util.h"
+#include "ratelimit.h"
+
+typedef struct Link Link;
+typedef struct LinkAddress LinkAddress;
+
+#include "resolved-dns-server.h"
+#include "resolved-dns-scope.h"
+#include "resolved-dns-rr.h"
+#include "resolved-manager.h"
+
+struct LinkAddress {
+        Link *link;
+
+        int family;
+        union in_addr_union in_addr;
+
+        unsigned char flags, scope;
+
+        DnsResourceRecord *llmnr_address_rr;
+        DnsResourceRecord *llmnr_ptr_rr;
+
+        LIST_FIELDS(LinkAddress, addresses);
+};
+
+struct Link {
+        Manager *manager;
+
+        int ifindex;
+        unsigned flags;
+
+        LIST_HEAD(LinkAddress, addresses);
+
+        LIST_HEAD(DnsServer, dns_servers);
+        DnsServer *current_dns_server;
+
+        Support llmnr_support;
+
+        DnsScope *unicast_scope;
+        DnsScope *llmnr_ipv4_scope;
+        DnsScope *llmnr_ipv6_scope;
+
+        char name[IF_NAMESIZE];
+        uint32_t mtu;
+};
+
+int link_new(Manager *m, Link **ret, int ifindex);
+Link *link_free(Link *l);
+int link_update_rtnl(Link *l, sd_rtnl_message *m);
+int link_update_monitor(Link *l);
+bool link_relevant(Link *l, int family);
+LinkAddress* link_find_address(Link *l, int family, const union in_addr_union *in_addr);
+void link_add_rrs(Link *l, bool force_remove);
+
+DnsServer* link_set_dns_server(Link *l, DnsServer *s);
+DnsServer* link_find_dns_server(Link *l, int family, const union in_addr_union *in_addr);
+DnsServer* link_get_dns_server(Link *l);
+void link_next_dns_server(Link *l);
+
+int link_address_new(Link *l, LinkAddress **ret, int family, const union in_addr_union *in_addr);
+LinkAddress *link_address_free(LinkAddress *a);
+int link_address_update_rtnl(LinkAddress *a, sd_rtnl_message *m);
+bool link_address_relevant(LinkAddress *l);
+void link_address_add_rrs(LinkAddress *a, bool force_remove);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);
index 3ed0603f9b2f9b26ac3bd42c462424916df70093..c4a5b08773995b26b7c123f66f40fc703b52f6e5 100644 (file)
 
 #include <arpa/inet.h>
 #include <resolv.h>
-#include <linux/if.h>
+#include <net/if.h>
+#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <netinet/in.h>
 
-#include "resolved.h"
+#include "rtnl-util.h"
 #include "event-util.h"
 #include "network-util.h"
-#include "sd-dhcp-lease.h"
-#include "dhcp-lease-internal.h"
 #include "network-internal.h"
 #include "conf-parser.h"
+#include "socket-util.h"
+#include "af-list.h"
+#include "utf8.h"
+#include "fileio-label.h"
 
-static int set_fallback_dns(Manager *m, const char *string) {
-        char *word, *state;
-        size_t length;
-        int r;
+#include "resolved-dns-domain.h"
+#include "resolved-conf.h"
+#include "resolved-bus.h"
+#include "resolved-manager.h"
+
+#define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC)
+
+static int manager_process_link(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) {
+        Manager *m = userdata;
+        uint16_t type;
+        Link *l;
+        int ifindex, r;
 
+        assert(rtnl);
         assert(m);
-        assert(string);
+        assert(mm);
 
-        FOREACH_WORD_QUOTED(word, length, string, state) {
-                _cleanup_free_ Address *address = NULL;
-                Address *tail;
-                _cleanup_free_ char *addrstr = NULL;
+        r = sd_rtnl_message_get_type(mm, &type);
+        if (r < 0)
+                goto fail;
 
-                address = new0(Address, 1);
-                if (!address)
-                        return -ENOMEM;
+        r = sd_rtnl_message_link_get_ifindex(mm, &ifindex);
+        if (r < 0)
+                goto fail;
 
-                addrstr = strndup(word, length);
-                if (!addrstr)
-                        return -ENOMEM;
+        l = hashmap_get(m->links, INT_TO_PTR(ifindex));
 
-                r = net_parse_inaddr(addrstr, &address->family, &address->in_addr);
-                if (r < 0) {
-                        log_debug("Ignoring invalid DNS address '%s'", addrstr);
-                        continue;
+        switch (type) {
+
+        case RTM_NEWLINK:{
+                bool is_new = !l;
+
+                if (!l) {
+                        r = link_new(m, &l, ifindex);
+                        if (r < 0)
+                                goto fail;
+                }
+
+                r = link_update_rtnl(l, mm);
+                if (r < 0)
+                        goto fail;
+
+                r = link_update_monitor(l);
+                if (r < 0)
+                        goto fail;
+
+                if (is_new)
+                        log_debug("Found new link %i/%s", ifindex, l->name);
+
+                break;
+        }
+
+        case RTM_DELLINK:
+                if (l) {
+                        log_debug("Removing link %i/%s", l->ifindex, l->name);
+                        link_free(l);
                 }
 
-                LIST_FIND_TAIL(addresses, m->fallback_dns, tail);
-                LIST_INSERT_AFTER(addresses, m->fallback_dns, tail, address);
-                address = NULL;
+                break;
         }
 
         return 0;
-}
 
-int config_parse_dnsv(
-                const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
+fail:
+        log_warning("Failed to process RTNL link message: %s", strerror(-r));
+        return 0;
+}
 
+static int manager_process_address(sd_rtnl *rtnl, sd_rtnl_message *mm, void *userdata) {
         Manager *m = userdata;
-        Address *address;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
+        union in_addr_union address;
+        uint16_t type;
+        int r, ifindex, family;
+        LinkAddress *a;
+        Link *l;
+
+        assert(rtnl);
+        assert(mm);
         assert(m);
 
-        while ((address = m->fallback_dns)) {
-                LIST_REMOVE(addresses, m->fallback_dns, address);
-                free(address);
+        r = sd_rtnl_message_get_type(mm, &type);
+        if (r < 0)
+                goto fail;
+
+        r = sd_rtnl_message_addr_get_ifindex(mm, &ifindex);
+        if (r < 0)
+                goto fail;
+
+        l = hashmap_get(m->links, INT_TO_PTR(ifindex));
+        if (!l)
+                return 0;
+
+        r = sd_rtnl_message_addr_get_family(mm, &family);
+        if (r < 0)
+                goto fail;
+
+        switch (family) {
+
+        case AF_INET:
+                r = sd_rtnl_message_read_in_addr(mm, IFA_LOCAL, &address.in);
+                if (r < 0) {
+                        r = sd_rtnl_message_read_in_addr(mm, IFA_ADDRESS, &address.in);
+                        if (r < 0)
+                                goto fail;
+                }
+
+                break;
+
+        case AF_INET6:
+                r = sd_rtnl_message_read_in6_addr(mm, IFA_LOCAL, &address.in6);
+                if (r < 0) {
+                        r = sd_rtnl_message_read_in6_addr(mm, IFA_ADDRESS, &address.in6);
+                        if (r < 0)
+                                goto fail;
+                }
+
+                break;
+
+        default:
+                return 0;
+        }
+
+        a = link_find_address(l, family, &address);
+
+        switch (type) {
+
+        case RTM_NEWADDR:
+
+                if (!a) {
+                        r = link_address_new(l, &a, family, &address);
+                        if (r < 0)
+                                return r;
+                }
+
+                r = link_address_update_rtnl(a, mm);
+                if (r < 0)
+                        return r;
+
+                break;
+
+        case RTM_DELADDR:
+                if (a)
+                        link_address_free(a);
+                break;
         }
 
-        set_fallback_dns(m, rvalue);
+        return 0;
 
+fail:
+        log_warning("Failed to process RTNL address message: %s", strerror(-r));
         return 0;
 }
 
-static int manager_parse_config_file(Manager *m) {
-        static const char fn[] = "/etc/systemd/resolved.conf";
-        _cleanup_fclose_ FILE *f = NULL;
+static int manager_rtnl_listen(Manager *m) {
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL;
+        sd_rtnl_message *i;
         int r;
 
         assert(m);
 
-        f = fopen(fn, "re");
-        if (!f) {
-                if (errno == ENOENT)
-                        return 0;
+        /* First, subscibe to interfaces coming and going */
+        r = sd_rtnl_open(&m->rtnl, 3, RTNLGRP_LINK, RTNLGRP_IPV4_IFADDR, RTNLGRP_IPV6_IFADDR);
+        if (r < 0)
+                return r;
 
-                log_warning("Failed to open configuration file %s: %m", fn);
-                return -errno;
-        }
+        r = sd_rtnl_attach_event(m->rtnl, m->event, 0);
+        if (r < 0)
+                return r;
 
-        r = config_parse(NULL, fn, f, "Resolve\0", config_item_perf_lookup,
-                         (void*) resolved_gperf_lookup, false, false, m);
+        r = sd_rtnl_add_match(m->rtnl, RTM_NEWLINK, manager_process_link, m);
         if (r < 0)
-                log_warning("Failed to parse configuration file: %s", strerror(-r));
+                return r;
 
-        return r;
-}
+        r = sd_rtnl_add_match(m->rtnl, RTM_DELLINK, manager_process_link, m);
+        if (r < 0)
+                return r;
 
-int manager_new(Manager **ret) {
-        _cleanup_manager_free_ Manager *m = NULL;
-        int r;
+        r = sd_rtnl_add_match(m->rtnl, RTM_NEWADDR, manager_process_address, m);
+        if (r < 0)
+                return r;
 
-        m = new0(Manager, 1);
-        if (!m)
-                return -ENOMEM;
+        r = sd_rtnl_add_match(m->rtnl, RTM_DELADDR, manager_process_address, m);
+        if (r < 0)
+                return r;
 
-        r = set_fallback_dns(m, DNS_SERVERS);
+        /* Then, enumerate all links */
+        r = sd_rtnl_message_new_link(m->rtnl, &req, RTM_GETLINK, 0);
         if (r < 0)
                 return r;
 
-        r = manager_parse_config_file(m);
+        r = sd_rtnl_message_request_dump(req, true);
         if (r < 0)
                 return r;
 
-        r = sd_event_default(&m->event);
+        r = sd_rtnl_call(m->rtnl, req, 0, &reply);
         if (r < 0)
                 return r;
 
-        sd_event_add_signal(m->event, NULL, SIGTERM, NULL,  NULL);
-        sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+        for (i = reply; i; i = sd_rtnl_message_next(i)) {
+                r = manager_process_link(m->rtnl, i, m);
+                if (r < 0)
+                        return r;
+        }
 
-        sd_event_set_watchdog(m->event, true);
+        req = sd_rtnl_message_unref(req);
+        reply = sd_rtnl_message_unref(reply);
 
-        *ret = m;
-        m = NULL;
+        /* Finally, enumerate all addresses, too */
+        r = sd_rtnl_message_new_addr(m->rtnl, &req, RTM_GETADDR, 0, AF_UNSPEC);
+        if (r < 0)
+                return r;
 
-        return 0;
+        r = sd_rtnl_message_request_dump(req, true);
+        if (r < 0)
+                return r;
+
+        r = sd_rtnl_call(m->rtnl, req, 0, &reply);
+        if (r < 0)
+                return r;
+
+        for (i = reply; i; i = sd_rtnl_message_next(i)) {
+                r = manager_process_address(m->rtnl, i, m);
+                if (r < 0)
+                        return r;
+        }
+
+        return r;
 }
 
-void manager_free(Manager *m) {
-        Address *address;
+static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        Manager *m = userdata;
+        Iterator i;
+        Link *l;
+        int r;
 
-        if (!m)
-                return;
+        assert(m);
 
-        sd_event_unref(m->event);
+        sd_network_monitor_flush(m->network_monitor);
 
-        while ((address = m->fallback_dns)) {
-                LIST_REMOVE(addresses, m->fallback_dns, address);
-                free(address);
+        HASHMAP_FOREACH(l, m->links, i) {
+                r = link_update_monitor(l);
+                if (r < 0)
+                        log_warning("Failed to update monitor information for %i: %s", l->ifindex, strerror(-r));
         }
 
-        free(m);
+        r = manager_write_resolv_conf(m);
+        if (r < 0)
+                log_warning("Could not update resolv.conf: %s", strerror(-r));
+
+        return 0;
 }
 
-static void append_dns(FILE *f, void *dns, unsigned char family, unsigned *count) {
-        char buf[INET6_ADDRSTRLEN];
-        const char *address;
+static int manager_network_monitor_listen(Manager *m) {
+        int r, fd, events;
 
-        assert(f);
-        assert(dns);
-        assert(count);
+        assert(m);
 
-        address = inet_ntop(family, dns, buf, INET6_ADDRSTRLEN);
-        if (!address) {
-                log_warning("Invalid DNS address. Ignoring.");
-                return;
+        r = sd_network_monitor_new(&m->network_monitor, NULL);
+        if (r < 0)
+                return r;
+
+        fd = sd_network_monitor_get_fd(m->network_monitor);
+        if (fd < 0)
+                return fd;
+
+        events = sd_network_monitor_get_events(m->network_monitor);
+        if (events < 0)
+                return events;
+
+        r = sd_event_add_io(m->event, &m->network_event_source, fd, events, &on_network_event, m);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int determine_hostname(char **ret) {
+        _cleanup_free_ char *h = NULL, *n = NULL;
+        int r;
+
+        assert(ret);
+
+        h = gethostname_malloc();
+        if (!h)
+                return log_oom();
+
+        if (!utf8_is_valid(h)) {
+                log_error("System hostname is not UTF-8 clean.");
+                return -EINVAL;
         }
 
-        if (*count == MAXNS)
-                fputs("# Too many DNS servers configured, the following entries "
-                      "may be ignored\n", f);
+        r = dns_name_normalize(h, &n);
+        if (r < 0) {
+                log_error("System hostname '%s' cannot be normalized.", h);
+                return r;
+        }
 
-        fprintf(f, "nameserver %s\n", address);
+        *ret = n;
+        n = NULL;
 
-        (*count) ++;
+        return 0;
 }
 
-int manager_update_resolv_conf(Manager *m) {
-        const char *path = "/run/systemd/resolve/resolv.conf";
-        _cleanup_free_ char *temp_path = NULL;
-        _cleanup_fclose_ FILE *f = NULL;
-         _cleanup_free_ unsigned *indices = NULL;
-        Address *address;
-        unsigned count = 0;
-        int n, r, i;
+static int on_hostname_change(sd_event_source *es, int fd, uint32_t revents, void *userdata) {
+        _cleanup_free_ char *h = NULL;
+        Manager *m = userdata;
+        int r;
 
         assert(m);
 
-        r = fopen_temporary(path, &f, &temp_path);
+        r = determine_hostname(&h);
         if (r < 0)
-                return r;
-
-        fchmod(fileno(f), 0644);
+                return 0; /* ignore invalid hostnames */
 
-        fputs("# This file is managed by systemd-resolved(8). Do not edit.\n#\n"
-              "# Third party programs must not access this file directly, but\n"
-              "# only through the symlink at /etc/resolv.conf. To manage\n"
-              "# resolv.conf(5) in a different way, replace the symlink by a\n"
-              "# static file or a different symlink.\n\n", f);
+        if (streq(h, m->hostname))
+                return 0;
 
-        n = sd_network_get_ifindices(&indices);
-        if (n < 0)
-                n = 0;
-
-        for (i = 0; i < n; i++) {
-                _cleanup_dhcp_lease_unref_ sd_dhcp_lease *lease = NULL;
-                struct in_addr *nameservers;
-                struct in6_addr *nameservers6;
-                size_t nameservers_size;
-
-                r = sd_network_dhcp_use_dns(indices[i]);
-                if (r > 0) {
-                        r = sd_network_get_dhcp_lease(indices[i], &lease);
-                        if (r >= 0) {
-                                r = sd_dhcp_lease_get_dns(lease, &nameservers, &nameservers_size);
-                                if (r >= 0) {
-                                        unsigned j;
-
-                                        for (j = 0; j < nameservers_size; j++)
-                                                append_dns(f, &nameservers[j], AF_INET, &count);
-                                }
-                        }
-                }
+        log_info("System hostname changed to '%s'.", h);
+        free(m->hostname);
+        m->hostname = h;
+        h = NULL;
 
-                r = sd_network_get_dns(indices[i], &nameservers, &nameservers_size);
-                if (r >= 0) {
-                        unsigned j;
+        manager_refresh_rrs(m);
 
-                        for (j = 0; j < nameservers_size; j++)
-                                append_dns(f, &nameservers[j], AF_INET, &count);
+        return 0;
+}
 
-                        free(nameservers);
-                }
+static int manager_watch_hostname(Manager *m) {
+        int r;
 
-                r = sd_network_get_dns6(indices[i], &nameservers6, &nameservers_size);
-                if (r >= 0) {
-                        unsigned j;
+        assert(m);
 
-                        for (j = 0; j < nameservers_size; j++)
-                                append_dns(f, &nameservers6[j], AF_INET6, &count);
+        m->hostname_fd = open("/proc/sys/kernel/hostname", O_RDONLY|O_CLOEXEC|O_NDELAY|O_NOCTTY);
+        if (m->hostname_fd < 0) {
+                log_warning("Failed to watch hostname: %m");
+                return 0;
+        }
 
-                        free(nameservers6);
+        r = sd_event_add_io(m->event, &m->hostname_event_source, m->hostname_fd, 0, on_hostname_change, m);
+        if (r < 0) {
+                if (r == -EPERM)
+                        /* kernels prior to 3.2 don't support polling this file. Ignore the failure. */
+                        m->hostname_fd = safe_close(m->hostname_fd);
+                else {
+                        log_error("Failed to add hostname event source: %s", strerror(-r));
+                        return r;
                 }
         }
 
-        LIST_FOREACH(addresses, address, m->fallback_dns)
-                append_dns(f, &address->in_addr, address->family, &count);
+        r = determine_hostname(&m->hostname);
+        if (r < 0) {
+                log_info("Defaulting to hostname 'linux'.");
+                m->hostname = strdup("linux");
+                if (!m->hostname)
+                        return log_oom();
+        } else
+                log_info("Using system hostname '%s'.", m->hostname);
+
+        return 0;
+}
+
+static void manager_llmnr_stop(Manager *m) {
+        assert(m);
 
-        fflush(f);
+        m->llmnr_ipv4_udp_event_source = sd_event_source_unref(m->llmnr_ipv4_udp_event_source);
+        m->llmnr_ipv4_udp_fd = safe_close(m->llmnr_ipv4_udp_fd);
 
-        if (ferror(f) || rename(temp_path, path) < 0) {
-                r = -errno;
-                unlink(path);
-                unlink(temp_path);
-                return r;
-        }
+        m->llmnr_ipv6_udp_event_source = sd_event_source_unref(m->llmnr_ipv6_udp_event_source);
+        m->llmnr_ipv6_udp_fd = safe_close(m->llmnr_ipv6_udp_fd);
 
-        return 0;
+        m->llmnr_ipv4_tcp_event_source = sd_event_source_unref(m->llmnr_ipv4_tcp_event_source);
+        m->llmnr_ipv4_tcp_fd = safe_close(m->llmnr_ipv4_tcp_fd);
+
+        m->llmnr_ipv6_tcp_event_source = sd_event_source_unref(m->llmnr_ipv6_tcp_event_source);
+        m->llmnr_ipv6_tcp_fd = safe_close(m->llmnr_ipv6_tcp_fd);
 }
 
-static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t revents,
-                                         void *userdata) {
-        Manager *m = userdata;
+static int manager_llmnr_start(Manager *m) {
         int r;
 
         assert(m);
 
-        r = manager_update_resolv_conf(m);
+        if (m->llmnr_support == SUPPORT_NO)
+                return 0;
+
+        r = manager_llmnr_ipv4_udp_fd(m);
+        if (r == -EADDRINUSE)
+                goto eaddrinuse;
         if (r < 0)
-                log_warning("Could not update resolv.conf: %s", strerror(-r));
+                return r;
 
-        sd_network_monitor_flush(m->network_monitor);
+        r = manager_llmnr_ipv4_tcp_fd(m);
+        if (r == -EADDRINUSE)
+                goto eaddrinuse;
+        if (r < 0)
+                return r;
+
+        if (socket_ipv6_is_supported()) {
+                r = manager_llmnr_ipv6_udp_fd(m);
+                if (r == -EADDRINUSE)
+                        goto eaddrinuse;
+                if (r < 0)
+                        return r;
+
+                r = manager_llmnr_ipv6_tcp_fd(m);
+                if (r == -EADDRINUSE)
+                        goto eaddrinuse;
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+
+eaddrinuse:
+        log_warning("There appears to be another LLMNR responder running. Turning off LLMNR support.");
+        m->llmnr_support = SUPPORT_NO;
+        manager_llmnr_stop(m);
 
         return 0;
 }
 
-int manager_network_monitor_listen(Manager *m) {
-        _cleanup_event_source_unref_ sd_event_source *event_source = NULL;
-        _cleanup_network_monitor_unref_ sd_network_monitor *monitor = NULL;
-        int r, fd, events;
+int manager_new(Manager **ret) {
+        _cleanup_(manager_freep) Manager *m = NULL;
+        int r;
+
+        assert(ret);
 
-        r = sd_network_monitor_new(NULL, &monitor);
+        m = new0(Manager, 1);
+        if (!m)
+                return -ENOMEM;
+
+        m->dns_ipv4_fd = m->dns_ipv6_fd = -1;
+        m->llmnr_ipv4_udp_fd = m->llmnr_ipv6_udp_fd = -1;
+        m->llmnr_ipv4_tcp_fd = m->llmnr_ipv6_tcp_fd = -1;
+        m->hostname_fd = -1;
+
+        m->llmnr_support = SUPPORT_YES;
+        m->read_resolv_conf = true;
+
+        r = manager_parse_dns_server(m, DNS_SERVER_FALLBACK, DNS_SERVERS);
         if (r < 0)
                 return r;
 
-        fd = sd_network_monitor_get_fd(monitor);
-        if (fd < 0)
-                return fd;
+        r = sd_event_default(&m->event);
+        if (r < 0)
+                return r;
 
-        events = sd_network_monitor_get_events(monitor);
-        if (events < 0)
-                return events;
+        sd_event_add_signal(m->event, NULL, SIGTERM, NULL,  NULL);
+        sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+
+        sd_event_set_watchdog(m->event, true);
+
+        r = manager_watch_hostname(m);
+        if (r < 0)
+                return r;
+
+        r = dns_scope_new(m, &m->unicast_scope, NULL, DNS_PROTOCOL_DNS, AF_UNSPEC);
+        if (r < 0)
+                return r;
+
+        r = manager_network_monitor_listen(m);
+        if (r < 0)
+                return r;
+
+        r = manager_rtnl_listen(m);
+        if (r < 0)
+                return r;
 
-        r = sd_event_add_io(m->event, &event_source, fd, events,
-                            &manager_network_event_handler, m);
+        r = manager_connect_bus(m);
         if (r < 0)
                 return r;
 
-        m->network_monitor = monitor;
-        m->network_event_source = event_source;
-        monitor = NULL;
-        event_source = NULL;
+        *ret = m;
+        m = NULL;
+
+        return 0;
+}
+
+int manager_start(Manager *m) {
+        int r;
+
+        assert(m);
+
+        r = manager_llmnr_start(m);
+        if (r < 0)
+                return r;
 
         return 0;
 }
+
+Manager *manager_free(Manager *m) {
+        Link *l;
+
+        if (!m)
+                return NULL;
+
+        while ((l = hashmap_first(m->links)))
+               link_free(l);
+
+        while (m->dns_queries)
+                dns_query_free(m->dns_queries);
+
+        dns_scope_free(m->unicast_scope);
+
+        manager_flush_dns_servers(m, DNS_SERVER_SYSTEM);
+        manager_flush_dns_servers(m, DNS_SERVER_FALLBACK);
+
+        hashmap_free(m->links);
+        hashmap_free(m->dns_transactions);
+
+        sd_event_source_unref(m->network_event_source);
+        sd_network_monitor_unref(m->network_monitor);
+
+        sd_event_source_unref(m->dns_ipv4_event_source);
+        sd_event_source_unref(m->dns_ipv6_event_source);
+        safe_close(m->dns_ipv4_fd);
+        safe_close(m->dns_ipv6_fd);
+
+        manager_llmnr_stop(m);
+
+        sd_bus_slot_unref(m->prepare_for_sleep_slot);
+        sd_event_source_unref(m->bus_retry_event_source);
+        sd_bus_unref(m->bus);
+
+        sd_event_unref(m->event);
+
+        dns_resource_key_unref(m->host_ipv4_key);
+        dns_resource_key_unref(m->host_ipv6_key);
+
+        safe_close(m->hostname_fd);
+        sd_event_source_unref(m->hostname_event_source);
+        free(m->hostname);
+
+        free(m);
+
+        return NULL;
+}
+
+int manager_read_resolv_conf(Manager *m) {
+        _cleanup_fclose_ FILE *f = NULL;
+        struct stat st, own;
+        char line[LINE_MAX];
+        DnsServer *s, *nx;
+        usec_t t;
+        int r;
+
+        assert(m);
+
+        /* Reads the system /etc/resolv.conf, if it exists and is not
+         * symlinked to our own resolv.conf instance */
+
+        if (!m->read_resolv_conf)
+                return 0;
+
+        r = stat("/etc/resolv.conf", &st);
+        if (r < 0) {
+                if (errno != ENOENT)
+                        log_warning("Failed to open /etc/resolv.conf: %m");
+                r = -errno;
+                goto clear;
+        }
+
+        /* Have we already seen the file? */
+        t = timespec_load(&st.st_mtim);
+        if (t == m->resolv_conf_mtime)
+                return 0;
+
+        m->resolv_conf_mtime = t;
+
+        /* Is it symlinked to our own file? */
+        if (stat("/run/systemd/resolve/resolv.conf", &own) >= 0 &&
+            st.st_dev == own.st_dev &&
+            st.st_ino == own.st_ino) {
+                r = 0;
+                goto clear;
+        }
+
+        f = fopen("/etc/resolv.conf", "re");
+        if (!f) {
+                if (errno != ENOENT)
+                        log_warning("Failed to open /etc/resolv.conf: %m");
+                r = -errno;
+                goto clear;
+        }
+
+        if (fstat(fileno(f), &st) < 0) {
+                log_error("Failed to stat open file: %m");
+                r = -errno;
+                goto clear;
+        }
+
+        LIST_FOREACH(servers, s, m->dns_servers)
+                s->marked = true;
+
+        FOREACH_LINE(line, f, r = -errno; goto clear) {
+                union in_addr_union address;
+                int family;
+                char *l;
+                const char *a;
+
+                truncate_nl(line);
+
+                l = strstrip(line);
+                if (*l == '#' || *l == ';')
+                        continue;
+
+                a = first_word(l, "nameserver");
+                if (!a)
+                        continue;
+
+                r = in_addr_from_string_auto(a, &family, &address);
+                if (r < 0) {
+                        log_warning("Failed to parse name server %s.", a);
+                        continue;
+                }
+
+                LIST_FOREACH(servers, s, m->dns_servers)
+                        if (s->family == family && in_addr_equal(family, &s->address, &address) > 0)
+                                break;
+
+                if (s)
+                        s->marked = false;
+                else {
+                        r = dns_server_new(m, NULL, DNS_SERVER_SYSTEM, NULL, family, &address);
+                        if (r < 0)
+                                goto clear;
+                }
+        }
+
+        LIST_FOREACH_SAFE(servers, s, nx, m->dns_servers)
+                if (s->marked)
+                        dns_server_free(s);
+
+        return 0;
+
+clear:
+        while (m->dns_servers)
+                dns_server_free(m->dns_servers);
+
+        return r;
+}
+
+static void write_resolv_conf_server(DnsServer *s, FILE *f, unsigned *count) {
+        _cleanup_free_ char *t  = NULL;
+        int r;
+
+        assert(s);
+        assert(f);
+        assert(count);
+
+        r = in_addr_to_string(s->family, &s->address, &t);
+        if (r < 0) {
+                log_warning("Invalid DNS address. Ignoring: %s", strerror(-r));
+                return;
+        }
+
+        if (*count == MAXNS)
+                fputs("# Too many DNS servers configured, the following entries may be ignored.\n", f);
+
+        fprintf(f, "nameserver %s\n", t);
+        (*count) ++;
+}
+
+static void write_resolv_conf_search(const char *domain, FILE *f,
+                                     unsigned *count, unsigned *length) {
+        assert(domain);
+        assert(f);
+        assert(length);
+
+        if (*count >= MAXDNSRCH ||
+            *length + strlen(domain) > 256) {
+                if (*count == MAXDNSRCH)
+                        fputs(" # Too many search domains configured, remaining ones ignored.", f);
+                if (*length <= 256)
+                        fputs(" # Total length of all search domains is too long, remaining ones ignored.", f);
+
+                return;
+        }
+
+        fprintf(f, " %s", domain);
+
+        (*length) += strlen(domain);
+        (*count) ++;
+}
+
+static int write_resolv_conf_contents(FILE *f, Set *dns, Set *domains) {
+        Iterator i;
+
+        fputs("# This file is managed by systemd-resolved(8). Do not edit.\n#\n"
+              "# Third party programs must not access this file directly, but\n"
+              "# only through the symlink at /etc/resolv.conf. To manage\n"
+              "# resolv.conf(5) in a different way, replace the symlink by a\n"
+              "# static file or a different symlink.\n\n", f);
+
+        if (set_isempty(dns))
+                fputs("# No DNS servers known.\n", f);
+        else {
+                DnsServer *s;
+                unsigned count = 0;
+
+                SET_FOREACH(s, dns, i)
+                        write_resolv_conf_server(s, f, &count);
+        }
+
+        if (!set_isempty(domains)) {
+                unsigned length = 0, count = 0;
+                char *domain;
+
+                fputs("search", f);
+                SET_FOREACH(domain, domains, i)
+                        write_resolv_conf_search(domain, f, &count, &length);
+                fputs("\n", f);
+        }
+
+        return fflush_and_check(f);
+}
+
+
+int manager_write_resolv_conf(Manager *m) {
+        static const char path[] = "/run/systemd/resolve/resolv.conf";
+        _cleanup_free_ char *temp_path = NULL;
+        _cleanup_fclose_ FILE *f = NULL;
+        _cleanup_set_free_ Set *dns = NULL, *domains = NULL;
+        DnsServer *s;
+        Iterator i;
+        Link *l;
+        int r;
+
+        assert(m);
+
+        /* Read the system /etc/resolv.conf first */
+        manager_read_resolv_conf(m);
+
+        /* Add the full list to a set, to filter out duplicates */
+        dns = set_new(&dns_server_hash_ops);
+        if (!dns)
+                return -ENOMEM;
+
+        domains = set_new(&dns_name_hash_ops);
+        if (!domains)
+                return -ENOMEM;
+
+        /* First add the system-wide servers */
+        LIST_FOREACH(servers, s, m->dns_servers) {
+                r = set_put(dns, s);
+                if (r == -EEXIST)
+                        continue;
+                if (r < 0)
+                        return r;
+        }
+
+        /* Then, add the per-link servers and domains */
+        HASHMAP_FOREACH(l, m->links, i) {
+                char **domain;
+
+                LIST_FOREACH(servers, s, l->dns_servers) {
+                        r = set_put(dns, s);
+                        if (r == -EEXIST)
+                                continue;
+                        if (r < 0)
+                                return r;
+                }
+
+                if (!l->unicast_scope)
+                        continue;
+
+                STRV_FOREACH(domain, l->unicast_scope->domains) {
+                        r = set_put(domains, *domain);
+                        if (r == -EEXIST)
+                                continue;
+                        if (r < 0)
+                                return r;
+                }
+        }
+
+        /* If we found nothing, add the fallback servers */
+        if (set_isempty(dns)) {
+                LIST_FOREACH(servers, s, m->fallback_dns_servers) {
+                        r = set_put(dns, s);
+                        if (r == -EEXIST)
+                                continue;
+                        if (r < 0)
+                                return r;
+                }
+        }
+
+        r = fopen_temporary_label(path, path, &f, &temp_path);
+        if (r < 0)
+                return r;
+
+        fchmod(fileno(f), 0644);
+
+        r = write_resolv_conf_contents(f, dns, domains);
+        if (r < 0)
+                goto fail;
+
+        if (rename(temp_path, path) < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        return 0;
+
+fail:
+        unlink(path);
+        unlink(temp_path);
+        return r;
+}
+
+int manager_recv(Manager *m, int fd, DnsProtocol protocol, DnsPacket **ret) {
+        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+        union {
+                struct cmsghdr header; /* For alignment */
+                uint8_t buffer[CMSG_SPACE(MAXSIZE(struct in_pktinfo, struct in6_pktinfo))
+                               + CMSG_SPACE(int) /* ttl/hoplimit */
+                               + EXTRA_CMSG_SPACE /* kernel appears to require extra buffer space */];
+        } control;
+        union sockaddr_union sa;
+        struct msghdr mh = {};
+        struct cmsghdr *cmsg;
+        struct iovec iov;
+        int ms = 0, r;
+        ssize_t l;
+
+        assert(m);
+        assert(fd >= 0);
+        assert(ret);
+
+        r = ioctl(fd, FIONREAD, &ms);
+        if (r < 0)
+                return -errno;
+        if (ms < 0)
+                return -EIO;
+
+        r = dns_packet_new(&p, protocol, ms);
+        if (r < 0)
+                return r;
+
+        iov.iov_base = DNS_PACKET_DATA(p);
+        iov.iov_len = p->allocated;
+
+        mh.msg_name = &sa.sa;
+        mh.msg_namelen = sizeof(sa);
+        mh.msg_iov = &iov;
+        mh.msg_iovlen = 1;
+        mh.msg_control = &control;
+        mh.msg_controllen = sizeof(control);
+
+        l = recvmsg(fd, &mh, 0);
+        if (l < 0) {
+                if (errno == EAGAIN || errno == EINTR)
+                        return 0;
+
+                return -errno;
+        }
+
+        if (l <= 0)
+                return -EIO;
+
+        assert(!(mh.msg_flags & MSG_CTRUNC));
+        assert(!(mh.msg_flags & MSG_TRUNC));
+
+        p->size = (size_t) l;
+
+        p->family = sa.sa.sa_family;
+        p->ipproto = IPPROTO_UDP;
+        if (p->family == AF_INET) {
+                p->sender.in = sa.in.sin_addr;
+                p->sender_port = be16toh(sa.in.sin_port);
+        } else if (p->family == AF_INET6) {
+                p->sender.in6 = sa.in6.sin6_addr;
+                p->sender_port = be16toh(sa.in6.sin6_port);
+                p->ifindex = sa.in6.sin6_scope_id;
+        } else
+                return -EAFNOSUPPORT;
+
+        for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg)) {
+
+                if (cmsg->cmsg_level == IPPROTO_IPV6) {
+                        assert(p->family == AF_INET6);
+
+                        switch (cmsg->cmsg_type) {
+
+                        case IPV6_PKTINFO: {
+                                struct in6_pktinfo *i = (struct in6_pktinfo*) CMSG_DATA(cmsg);
+
+                                if (p->ifindex <= 0)
+                                        p->ifindex = i->ipi6_ifindex;
+
+                                p->destination.in6 = i->ipi6_addr;
+                                break;
+                        }
+
+                        case IPV6_HOPLIMIT:
+                                p->ttl = *(int *) CMSG_DATA(cmsg);
+                                break;
+
+                        }
+                } else if (cmsg->cmsg_level == IPPROTO_IP) {
+                        assert(p->family == AF_INET);
+
+                        switch (cmsg->cmsg_type) {
+
+                        case IP_PKTINFO: {
+                                struct in_pktinfo *i = (struct in_pktinfo*) CMSG_DATA(cmsg);
+
+                                if (p->ifindex <= 0)
+                                        p->ifindex = i->ipi_ifindex;
+
+                                p->destination.in = i->ipi_addr;
+                                break;
+                        }
+
+                        case IP_TTL:
+                                p->ttl = *(int *) CMSG_DATA(cmsg);
+                                break;
+                        }
+                }
+        }
+
+        /* The Linux kernel sets the interface index to the loopback
+         * device if the packet came from the local host since it
+         * avoids the routing table in such a case. Let's unset the
+         * interface index in such a case. */
+        if (p->ifindex == LOOPBACK_IFINDEX)
+                p->ifindex = 0;
+
+        /* If we don't know the interface index still, we look for the
+         * first local interface with a matching address. Yuck! */
+        if (p->ifindex <= 0)
+                p->ifindex = manager_find_ifindex(m, p->family, &p->destination);
+
+        *ret = p;
+        p = NULL;
+
+        return 1;
+}
+
+static int on_dns_packet(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+        DnsTransaction *t = NULL;
+        Manager *m = userdata;
+        int r;
+
+        r = manager_recv(m, fd, DNS_PROTOCOL_DNS, &p);
+        if (r <= 0)
+                return r;
+
+        if (dns_packet_validate_reply(p) > 0) {
+                t = hashmap_get(m->dns_transactions, UINT_TO_PTR(DNS_PACKET_ID(p)));
+                if (!t)
+                        return 0;
+
+                dns_transaction_process_reply(t, p);
+
+        } else
+                log_debug("Invalid DNS packet.");
+
+        return 0;
+}
+
+int manager_dns_ipv4_fd(Manager *m) {
+        const int one = 1;
+        int r;
+
+        assert(m);
+
+        if (m->dns_ipv4_fd >= 0)
+                return m->dns_ipv4_fd;
+
+        m->dns_ipv4_fd = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (m->dns_ipv4_fd < 0)
+                return -errno;
+
+        r = setsockopt(m->dns_ipv4_fd, IPPROTO_IP, IP_PKTINFO, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = sd_event_add_io(m->event, &m->dns_ipv4_event_source, m->dns_ipv4_fd, EPOLLIN, on_dns_packet, m);
+        if (r < 0)
+                goto fail;
+
+        return m->dns_ipv4_fd;
+
+fail:
+        m->dns_ipv4_fd = safe_close(m->dns_ipv4_fd);
+        return r;
+}
+
+int manager_dns_ipv6_fd(Manager *m) {
+        const int one = 1;
+        int r;
+
+        assert(m);
+
+        if (m->dns_ipv6_fd >= 0)
+                return m->dns_ipv6_fd;
+
+        m->dns_ipv6_fd = socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (m->dns_ipv6_fd < 0)
+                return -errno;
+
+        r = setsockopt(m->dns_ipv6_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = sd_event_add_io(m->event, &m->dns_ipv6_event_source, m->dns_ipv6_fd, EPOLLIN, on_dns_packet, m);
+        if (r < 0)
+                goto fail;
+
+        return m->dns_ipv6_fd;
+
+fail:
+        m->dns_ipv6_fd = safe_close(m->dns_ipv6_fd);
+        return r;
+}
+
+static int sendmsg_loop(int fd, struct msghdr *mh, int flags) {
+        int r;
+
+        assert(fd >= 0);
+        assert(mh);
+
+        for (;;) {
+                if (sendmsg(fd, mh, flags) >= 0)
+                        return 0;
+
+                if (errno == EINTR)
+                        continue;
+
+                if (errno != EAGAIN)
+                        return -errno;
+
+                r = fd_wait_for_event(fd, POLLOUT, SEND_TIMEOUT_USEC);
+                if (r < 0)
+                        return r;
+                if (r == 0)
+                        return -ETIMEDOUT;
+        }
+}
+
+static int manager_ipv4_send(Manager *m, int fd, int ifindex, const struct in_addr *addr, uint16_t port, DnsPacket *p) {
+        union sockaddr_union sa = {
+                .in.sin_family = AF_INET,
+        };
+        union {
+                struct cmsghdr header; /* For alignment */
+                uint8_t buffer[CMSG_SPACE(sizeof(struct in_pktinfo))];
+        } control;
+        struct msghdr mh = {};
+        struct iovec iov;
+
+        assert(m);
+        assert(fd >= 0);
+        assert(addr);
+        assert(port > 0);
+        assert(p);
+
+        iov.iov_base = DNS_PACKET_DATA(p);
+        iov.iov_len = p->size;
+
+        sa.in.sin_addr = *addr;
+        sa.in.sin_port = htobe16(port),
+
+        mh.msg_iov = &iov;
+        mh.msg_iovlen = 1;
+        mh.msg_name = &sa.sa;
+        mh.msg_namelen = sizeof(sa.in);
+
+        if (ifindex > 0) {
+                struct cmsghdr *cmsg;
+                struct in_pktinfo *pi;
+
+                zero(control);
+
+                mh.msg_control = &control;
+                mh.msg_controllen = CMSG_LEN(sizeof(struct in_pktinfo));
+
+                cmsg = CMSG_FIRSTHDR(&mh);
+                cmsg->cmsg_len = mh.msg_controllen;
+                cmsg->cmsg_level = IPPROTO_IP;
+                cmsg->cmsg_type = IP_PKTINFO;
+
+                pi = (struct in_pktinfo*) CMSG_DATA(cmsg);
+                pi->ipi_ifindex = ifindex;
+        }
+
+        return sendmsg_loop(fd, &mh, 0);
+}
+
+static int manager_ipv6_send(Manager *m, int fd, int ifindex, const struct in6_addr *addr, uint16_t port, DnsPacket *p) {
+        union sockaddr_union sa = {
+                .in6.sin6_family = AF_INET6,
+        };
+        union {
+                struct cmsghdr header; /* For alignment */
+                uint8_t buffer[CMSG_SPACE(sizeof(struct in6_pktinfo))];
+        } control;
+        struct msghdr mh = {};
+        struct iovec iov;
+
+        assert(m);
+        assert(fd >= 0);
+        assert(addr);
+        assert(port > 0);
+        assert(p);
+
+        iov.iov_base = DNS_PACKET_DATA(p);
+        iov.iov_len = p->size;
+
+        sa.in6.sin6_addr = *addr;
+        sa.in6.sin6_port = htobe16(port),
+        sa.in6.sin6_scope_id = ifindex;
+
+        mh.msg_iov = &iov;
+        mh.msg_iovlen = 1;
+        mh.msg_name = &sa.sa;
+        mh.msg_namelen = sizeof(sa.in6);
+
+        if (ifindex > 0) {
+                struct cmsghdr *cmsg;
+                struct in6_pktinfo *pi;
+
+                zero(control);
+
+                mh.msg_control = &control;
+                mh.msg_controllen = CMSG_LEN(sizeof(struct in6_pktinfo));
+
+                cmsg = CMSG_FIRSTHDR(&mh);
+                cmsg->cmsg_len = mh.msg_controllen;
+                cmsg->cmsg_level = IPPROTO_IPV6;
+                cmsg->cmsg_type = IPV6_PKTINFO;
+
+                pi = (struct in6_pktinfo*) CMSG_DATA(cmsg);
+                pi->ipi6_ifindex = ifindex;
+        }
+
+        return sendmsg_loop(fd, &mh, 0);
+}
+
+int manager_send(Manager *m, int fd, int ifindex, int family, const union in_addr_union *addr, uint16_t port, DnsPacket *p) {
+        assert(m);
+        assert(fd >= 0);
+        assert(addr);
+        assert(port > 0);
+        assert(p);
+
+        log_debug("Sending %s packet with id %u on interface %i/%s", DNS_PACKET_QR(p) ? "response" : "query", DNS_PACKET_ID(p), ifindex, af_to_name(family));
+
+        if (family == AF_INET)
+                return manager_ipv4_send(m, fd, ifindex, &addr->in, port, p);
+        else if (family == AF_INET6)
+                return manager_ipv6_send(m, fd, ifindex, &addr->in6, port, p);
+
+        return -EAFNOSUPPORT;
+}
+
+DnsServer* manager_find_dns_server(Manager *m, int family, const union in_addr_union *in_addr) {
+        DnsServer *s;
+
+        assert(m);
+        assert(in_addr);
+
+        LIST_FOREACH(servers, s, m->dns_servers)
+                if (s->family == family && in_addr_equal(family, &s->address, in_addr) > 0)
+                        return s;
+
+        LIST_FOREACH(servers, s, m->fallback_dns_servers)
+                if (s->family == family && in_addr_equal(family, &s->address, in_addr) > 0)
+                        return s;
+
+        return NULL;
+}
+
+DnsServer *manager_set_dns_server(Manager *m, DnsServer *s) {
+        assert(m);
+
+        if (m->current_dns_server == s)
+                return s;
+
+        if (s) {
+                _cleanup_free_ char *ip = NULL;
+
+                in_addr_to_string(s->family, &s->address, &ip);
+                log_info("Switching to system DNS server %s.", strna(ip));
+        }
+
+        m->current_dns_server = s;
+
+        if (m->unicast_scope)
+                dns_cache_flush(&m->unicast_scope->cache);
+
+        return s;
+}
+
+DnsServer *manager_get_dns_server(Manager *m) {
+        Link *l;
+        assert(m);
+
+        /* Try to read updates resolv.conf */
+        manager_read_resolv_conf(m);
+
+        if (!m->current_dns_server)
+                manager_set_dns_server(m, m->dns_servers);
+
+        if (!m->current_dns_server) {
+                bool found = false;
+                Iterator i;
+
+                /* No DNS servers configured, let's see if there are
+                 * any on any links. If not, we use the fallback
+                 * servers */
+
+                HASHMAP_FOREACH(l, m->links, i)
+                        if (l->dns_servers) {
+                                found = true;
+                                break;
+                        }
+
+                if (!found)
+                        manager_set_dns_server(m, m->fallback_dns_servers);
+        }
+
+        return m->current_dns_server;
+}
+
+void manager_next_dns_server(Manager *m) {
+        assert(m);
+
+        /* If there's currently no DNS server set, then the next
+         * manager_get_dns_server() will find one */
+        if (!m->current_dns_server)
+                return;
+
+        /* Change to the next one */
+        if (m->current_dns_server->servers_next) {
+                manager_set_dns_server(m, m->current_dns_server->servers_next);
+                return;
+        }
+
+        /* If there was no next one, then start from the beginning of
+         * the list */
+        if (m->current_dns_server->type == DNS_SERVER_FALLBACK)
+                manager_set_dns_server(m, m->fallback_dns_servers);
+        else
+                manager_set_dns_server(m, m->dns_servers);
+}
+
+uint32_t manager_find_mtu(Manager *m) {
+        uint32_t mtu = 0;
+        Link *l;
+        Iterator i;
+
+        /* If we don't know on which link a DNS packet would be
+         * delivered, let's find the largest MTU that works on all
+         * interfaces we know of */
+
+        HASHMAP_FOREACH(l, m->links, i) {
+                if (l->mtu <= 0)
+                        continue;
+
+                if (mtu <= 0 || l->mtu < mtu)
+                        mtu = l->mtu;
+        }
+
+        return mtu;
+}
+
+static int on_llmnr_packet(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
+        DnsTransaction *t = NULL;
+        Manager *m = userdata;
+        DnsScope *scope;
+        int r;
+
+        r = manager_recv(m, fd, DNS_PROTOCOL_LLMNR, &p);
+        if (r <= 0)
+                return r;
+
+        scope = manager_find_scope(m, p);
+        if (!scope) {
+                log_warning("Got LLMNR UDP packet on unknown scope. Ignoring.");
+                return 0;
+        }
+
+        if (dns_packet_validate_reply(p) > 0) {
+                log_debug("Got reply packet for id %u", DNS_PACKET_ID(p));
+
+                dns_scope_check_conflicts(scope, p);
+
+                t = hashmap_get(m->dns_transactions, UINT_TO_PTR(DNS_PACKET_ID(p)));
+                if (t)
+                        dns_transaction_process_reply(t, p);
+
+        } else if (dns_packet_validate_query(p) > 0)  {
+                log_debug("Got query packet for id %u", DNS_PACKET_ID(p));
+
+                dns_scope_process_query(scope, NULL, p);
+        } else
+                log_debug("Invalid LLMNR UDP packet.");
+
+        return 0;
+}
+
+int manager_llmnr_ipv4_udp_fd(Manager *m) {
+        union sockaddr_union sa = {
+                .in.sin_family = AF_INET,
+                .in.sin_port = htobe16(5355),
+        };
+        static const int one = 1, pmtu = IP_PMTUDISC_DONT, ttl = 255;
+        int r;
+
+        assert(m);
+
+        if (m->llmnr_ipv4_udp_fd >= 0)
+                return m->llmnr_ipv4_udp_fd;
+
+        m->llmnr_ipv4_udp_fd = socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (m->llmnr_ipv4_udp_fd < 0)
+                return -errno;
+
+        /* RFC 4795, section 2.5 recommends setting the TTL of UDP packets to 255. */
+        r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_PKTINFO, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_RECVTTL, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        /* Disable Don't-Fragment bit in the IP header */
+        r = setsockopt(m->llmnr_ipv4_udp_fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = bind(m->llmnr_ipv4_udp_fd, &sa.sa, sizeof(sa.in));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = sd_event_add_io(m->event, &m->llmnr_ipv4_udp_event_source, m->llmnr_ipv4_udp_fd, EPOLLIN, on_llmnr_packet, m);
+        if (r < 0)
+                goto fail;
+
+        return m->llmnr_ipv4_udp_fd;
+
+fail:
+        m->llmnr_ipv4_udp_fd = safe_close(m->llmnr_ipv4_udp_fd);
+        return r;
+}
+
+int manager_llmnr_ipv6_udp_fd(Manager *m) {
+        union sockaddr_union sa = {
+                .in6.sin6_family = AF_INET6,
+                .in6.sin6_port = htobe16(5355),
+        };
+        static const int one = 1, ttl = 255;
+        int r;
+
+        assert(m);
+
+        if (m->llmnr_ipv6_udp_fd >= 0)
+                return m->llmnr_ipv6_udp_fd;
+
+        m->llmnr_ipv6_udp_fd = socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (m->llmnr_ipv6_udp_fd < 0)
+                return -errno;
+
+        r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        /* RFC 4795, section 2.5 recommends setting the TTL of UDP packets to 255. */
+        r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &ttl, sizeof(ttl));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_udp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_udp_fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = bind(m->llmnr_ipv6_udp_fd, &sa.sa, sizeof(sa.in6));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = sd_event_add_io(m->event, &m->llmnr_ipv6_udp_event_source, m->llmnr_ipv6_udp_fd, EPOLLIN, on_llmnr_packet, m);
+        if (r < 0)  {
+                r = -errno;
+                goto fail;
+        }
+
+        return m->llmnr_ipv6_udp_fd;
+
+fail:
+        m->llmnr_ipv6_udp_fd = safe_close(m->llmnr_ipv6_udp_fd);
+        return r;
+}
+
+static int on_llmnr_stream_packet(DnsStream *s) {
+        DnsScope *scope;
+
+        assert(s);
+
+        scope = manager_find_scope(s->manager, s->read_packet);
+        if (!scope) {
+                log_warning("Got LLMNR TCP packet on unknown scope. Ignroing.");
+                return 0;
+        }
+
+        if (dns_packet_validate_query(s->read_packet) > 0) {
+                log_debug("Got query packet for id %u", DNS_PACKET_ID(s->read_packet));
+
+                dns_scope_process_query(scope, s, s->read_packet);
+
+                /* If no reply packet was set, we free the stream */
+                if (s->write_packet)
+                        return 0;
+        } else
+                log_debug("Invalid LLMNR TCP packet.");
+
+        dns_stream_free(s);
+        return 0;
+}
+
+static int on_llmnr_stream(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        DnsStream *stream;
+        Manager *m = userdata;
+        int cfd, r;
+
+        cfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC);
+        if (cfd < 0) {
+                if (errno == EAGAIN || errno == EINTR)
+                        return 0;
+
+                return -errno;
+        }
+
+        r = dns_stream_new(m, &stream, DNS_PROTOCOL_LLMNR, cfd);
+        if (r < 0) {
+                safe_close(cfd);
+                return r;
+        }
+
+        stream->on_packet = on_llmnr_stream_packet;
+        return 0;
+}
+
+int manager_llmnr_ipv4_tcp_fd(Manager *m) {
+        union sockaddr_union sa = {
+                .in.sin_family = AF_INET,
+                .in.sin_port = htobe16(5355),
+        };
+        static const int one = 1, pmtu = IP_PMTUDISC_DONT;
+        int r;
+
+        assert(m);
+
+        if (m->llmnr_ipv4_tcp_fd >= 0)
+                return m->llmnr_ipv4_tcp_fd;
+
+        m->llmnr_ipv4_tcp_fd = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (m->llmnr_ipv4_tcp_fd < 0)
+                return -errno;
+
+        /* RFC 4795, section 2.5. requires setting the TTL of TCP streams to 1 */
+        r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_TTL, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_PKTINFO, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_RECVTTL, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        /* Disable Don't-Fragment bit in the IP header */
+        r = setsockopt(m->llmnr_ipv4_tcp_fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = bind(m->llmnr_ipv4_tcp_fd, &sa.sa, sizeof(sa.in));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = listen(m->llmnr_ipv4_tcp_fd, SOMAXCONN);
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = sd_event_add_io(m->event, &m->llmnr_ipv4_tcp_event_source, m->llmnr_ipv4_tcp_fd, EPOLLIN, on_llmnr_stream, m);
+        if (r < 0)
+                goto fail;
+
+        return m->llmnr_ipv4_tcp_fd;
+
+fail:
+        m->llmnr_ipv4_tcp_fd = safe_close(m->llmnr_ipv4_tcp_fd);
+        return r;
+}
+
+int manager_llmnr_ipv6_tcp_fd(Manager *m) {
+        union sockaddr_union sa = {
+                .in6.sin6_family = AF_INET6,
+                .in6.sin6_port = htobe16(5355),
+        };
+        static const int one = 1;
+        int r;
+
+        assert(m);
+
+        if (m->llmnr_ipv6_tcp_fd >= 0)
+                return m->llmnr_ipv6_tcp_fd;
+
+        m->llmnr_ipv6_tcp_fd = socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (m->llmnr_ipv6_tcp_fd < 0)
+                return -errno;
+
+        /* RFC 4795, section 2.5. requires setting the TTL of TCP streams to 1 */
+        r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_tcp_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = setsockopt(m->llmnr_ipv6_tcp_fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &one, sizeof(one));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = bind(m->llmnr_ipv6_tcp_fd, &sa.sa, sizeof(sa.in6));
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = listen(m->llmnr_ipv6_tcp_fd, SOMAXCONN);
+        if (r < 0) {
+                r = -errno;
+                goto fail;
+        }
+
+        r = sd_event_add_io(m->event, &m->llmnr_ipv6_tcp_event_source, m->llmnr_ipv6_tcp_fd, EPOLLIN, on_llmnr_stream, m);
+        if (r < 0)  {
+                r = -errno;
+                goto fail;
+        }
+
+        return m->llmnr_ipv6_tcp_fd;
+
+fail:
+        m->llmnr_ipv6_tcp_fd = safe_close(m->llmnr_ipv6_tcp_fd);
+        return r;
+}
+
+int manager_find_ifindex(Manager *m, int family, const union in_addr_union *in_addr) {
+        LinkAddress *a;
+
+        assert(m);
+
+        a = manager_find_link_address(m, family, in_addr);
+        if (a)
+                return a->link->ifindex;
+
+        return 0;
+}
+
+void manager_refresh_rrs(Manager *m) {
+        Iterator i;
+        Link *l;
+
+        assert(m);
+
+        m->host_ipv4_key = dns_resource_key_unref(m->host_ipv4_key);
+        m->host_ipv6_key = dns_resource_key_unref(m->host_ipv6_key);
+
+        HASHMAP_FOREACH(l, m->links, i) {
+                link_add_rrs(l, true);
+                link_add_rrs(l, false);
+        }
+}
+
+int manager_next_hostname(Manager *m) {
+        const char *p;
+        uint64_t u, a;
+        char *h;
+
+        assert(m);
+
+        p = strchr(m->hostname, 0);
+        assert(p);
+
+        while (p > m->hostname) {
+                if (!strchr("0123456789", p[-1]))
+                        break;
+
+                p--;
+        }
+
+        if (*p == 0 || safe_atou64(p, &u) < 0 || u <= 0)
+                u = 1;
+
+        /* Add a random number to the old value. This way we can avoid
+         * that two hosts pick the same hostname, win on IPv4 and lose
+         * on IPv6 (or vice versa), and pick the same hostname
+         * replacement hostname, ad infinitum. We still want the
+         * numbers to go up monotonically, hence we just add a random
+         * value 1..10 */
+
+        random_bytes(&a, sizeof(a));
+        u += 1 + a % 10;
+
+        if (asprintf(&h, "%.*s%" PRIu64, (int) (p - m->hostname), m->hostname, u) < 0)
+                return -ENOMEM;
+
+        log_info("Hostname conflict, changing published hostname from '%s' to '%s'.", m->hostname, h);
+
+        free(m->hostname);
+        m->hostname = h;
+
+        manager_refresh_rrs(m);
+
+        return 0;
+}
+
+LinkAddress* manager_find_link_address(Manager *m, int family, const union in_addr_union *in_addr) {
+        Iterator i;
+        Link *l;
+
+        assert(m);
+
+        HASHMAP_FOREACH(l, m->links, i) {
+                LinkAddress *a;
+
+                a = link_find_address(l, family, in_addr);
+                if (a)
+                        return a;
+        }
+
+        return NULL;
+}
+
+bool manager_our_packet(Manager *m, DnsPacket *p) {
+        assert(m);
+        assert(p);
+
+        return !!manager_find_link_address(m, p->family, &p->sender);
+}
+
+DnsScope* manager_find_scope(Manager *m, DnsPacket *p) {
+        Link *l;
+
+        assert(m);
+        assert(p);
+
+        l = hashmap_get(m->links, INT_TO_PTR(p->ifindex));
+        if (!l)
+                return NULL;
+
+        if (p->protocol == DNS_PROTOCOL_LLMNR) {
+                if (p->family == AF_INET)
+                        return l->llmnr_ipv4_scope;
+                else if (p->family == AF_INET6)
+                        return l->llmnr_ipv6_scope;
+        }
+
+        return NULL;
+}
+
+void manager_verify_all(Manager *m) {
+        DnsScope *s;
+
+        assert(m);
+
+        LIST_FOREACH(scopes, s, m->dns_scopes)
+                dns_zone_verify_all(&s->zone);
+}
+
+void manager_flush_dns_servers(Manager *m, DnsServerType t) {
+        assert(m);
+
+        if (t == DNS_SERVER_SYSTEM)
+                while (m->dns_servers)
+                        dns_server_free(m->dns_servers);
+
+        if (t == DNS_SERVER_FALLBACK)
+                while (m->fallback_dns_servers)
+                        dns_server_free(m->fallback_dns_servers);
+}
+
+static const char* const support_table[_SUPPORT_MAX] = {
+        [SUPPORT_NO] = "no",
+        [SUPPORT_YES] = "yes",
+        [SUPPORT_RESOLVE] = "resolve",
+};
+DEFINE_STRING_TABLE_LOOKUP(support, Support);
diff --git a/src/resolve/resolved-manager.h b/src/resolve/resolved-manager.h
new file mode 100644 (file)
index 0000000..1151029
--- /dev/null
@@ -0,0 +1,160 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Tom Gundersen <teg@jklm.no>
+
+  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/>.
+***/
+
+#include "sd-event.h"
+#include "sd-network.h"
+#include "sd-rtnl.h"
+#include "util.h"
+#include "list.h"
+#include "in-addr-util.h"
+#include "hashmap.h"
+
+typedef struct Manager Manager;
+typedef enum Support Support;
+
+enum Support {
+        SUPPORT_NO,
+        SUPPORT_YES,
+        SUPPORT_RESOLVE,
+        _SUPPORT_MAX,
+        _SUPPORT_INVALID = -1
+};
+
+#include "resolved-dns-query.h"
+#include "resolved-dns-server.h"
+#include "resolved-dns-scope.h"
+#include "resolved-dns-stream.h"
+#include "resolved-link.h"
+
+struct Manager {
+        sd_event *event;
+
+        Support llmnr_support;
+
+        /* Network */
+        Hashmap *links;
+
+        sd_rtnl *rtnl;
+        sd_event_source *rtnl_event_source;
+
+        sd_network_monitor *network_monitor;
+        sd_event_source *network_event_source;
+
+        /* DNS query management */
+        Hashmap *dns_transactions;
+        LIST_HEAD(DnsQuery, dns_queries);
+        unsigned n_dns_queries;
+
+        LIST_HEAD(DnsStream, dns_streams);
+        unsigned n_dns_streams;
+
+        /* Unicast dns */
+        int dns_ipv4_fd;
+        int dns_ipv6_fd;
+
+        sd_event_source *dns_ipv4_event_source;
+        sd_event_source *dns_ipv6_event_source;
+
+        LIST_HEAD(DnsServer, dns_servers);
+        LIST_HEAD(DnsServer, fallback_dns_servers);
+        DnsServer *current_dns_server;
+
+        bool read_resolv_conf;
+        usec_t resolv_conf_mtime;
+
+        LIST_HEAD(DnsScope, dns_scopes);
+        DnsScope *unicast_scope;
+
+        /* LLMNR */
+        int llmnr_ipv4_udp_fd;
+        int llmnr_ipv6_udp_fd;
+        int llmnr_ipv4_tcp_fd;
+        int llmnr_ipv6_tcp_fd;
+
+        sd_event_source *llmnr_ipv4_udp_event_source;
+        sd_event_source *llmnr_ipv6_udp_event_source;
+        sd_event_source *llmnr_ipv4_tcp_event_source;
+        sd_event_source *llmnr_ipv6_tcp_event_source;
+
+        /* dbus */
+        sd_bus *bus;
+        sd_event_source *bus_retry_event_source;
+
+        /* The hostname we publish on LLMNR and mDNS */
+        char *hostname;
+        DnsResourceKey *host_ipv4_key;
+        DnsResourceKey *host_ipv6_key;
+
+        /* Watch the system hostname */
+        int hostname_fd;
+        sd_event_source *hostname_event_source;
+
+        /* Watch for system suspends */
+        sd_bus_slot *prepare_for_sleep_slot;
+};
+
+/* Manager */
+
+int manager_new(Manager **ret);
+Manager* manager_free(Manager *m);
+
+int manager_start(Manager *m);
+int manager_read_resolv_conf(Manager *m);
+int manager_write_resolv_conf(Manager *m);
+
+DnsServer *manager_set_dns_server(Manager *m, DnsServer *s);
+DnsServer *manager_find_dns_server(Manager *m, int family, const union in_addr_union *in_addr);
+DnsServer *manager_get_dns_server(Manager *m);
+void manager_next_dns_server(Manager *m);
+
+uint32_t manager_find_mtu(Manager *m);
+
+int manager_send(Manager *m, int fd, int ifindex, int family, const union in_addr_union *addr, uint16_t port, DnsPacket *p);
+int manager_recv(Manager *m, int fd, DnsProtocol protocol, DnsPacket **ret);
+
+int manager_dns_ipv4_fd(Manager *m);
+int manager_dns_ipv6_fd(Manager *m);
+int manager_llmnr_ipv4_udp_fd(Manager *m);
+int manager_llmnr_ipv6_udp_fd(Manager *m);
+int manager_llmnr_ipv4_tcp_fd(Manager *m);
+int manager_llmnr_ipv6_tcp_fd(Manager *m);
+
+int manager_find_ifindex(Manager *m, int family, const union in_addr_union *in_addr);
+LinkAddress* manager_find_link_address(Manager *m, int family, const union in_addr_union *in_addr);
+
+void manager_refresh_rrs(Manager *m);
+int manager_next_hostname(Manager *m);
+
+bool manager_our_packet(Manager *m, DnsPacket *p);
+DnsScope* manager_find_scope(Manager *m, DnsPacket *p);
+
+void manager_verify_all(Manager *m);
+
+void manager_flush_dns_servers(Manager *m, DnsServerType t);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
+
+#define EXTRA_CMSG_SPACE 1024
+
+const char* support_to_string(Support p) _const_;
+int support_from_string(const char *s) _pure_;
index f61b70f46b6814743c80f20424d8d76ba1901da5..7d258c9470b3faf8f4bd623118ad128df5eced00 100644 (file)
 
 #include "sd-event.h"
 #include "sd-daemon.h"
-
-#include "resolved.h"
-
 #include "mkdir.h"
+#include "label.h"
 #include "capability.h"
 
+#include "resolved-manager.h"
+#include "resolved-conf.h"
+
 int main(int argc, char *argv[]) {
-        _cleanup_manager_free_ Manager *m = NULL;
+        _cleanup_(manager_freep) Manager *m = NULL;
         const char *user = "systemd-resolve";
         uid_t uid;
         gid_t gid;
@@ -38,52 +39,61 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
-        umask(0022);
-
         if (argc != 1) {
                 log_error("This program takes no arguments.");
                 r = -EINVAL;
-                goto out;
+                goto finish;
+        }
+
+        umask(0022);
+
+        r = mac_selinux_init(NULL);
+        if (r < 0) {
+                log_error("SELinux setup failed: %s", strerror(-r));
+                goto finish;
         }
 
         r = get_user_creds(&user, &uid, &gid, NULL, NULL);
         if (r < 0) {
                 log_error("Cannot resolve user name %s: %s", user, strerror(-r));
-                goto out;
+                goto finish;
         }
 
         /* Always create the directory where resolv.conf will live */
         r = mkdir_safe_label("/run/systemd/resolve", 0755, uid, gid);
         if (r < 0) {
-                log_error("Could not create runtime directory: %s",
-                          strerror(-r));
-                goto out;
+                log_error("Could not create runtime directory: %s", strerror(-r));
+                goto finish;
         }
 
         r = drop_privileges(uid, gid, 0);
         if (r < 0)
-                goto out;
+                goto finish;
+
+        assert_se(sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, -1) == 0);
 
         r = manager_new(&m);
         if (r < 0) {
                 log_error("Could not create manager: %s", strerror(-r));
-                goto out;
+                goto finish;
         }
 
-        r = manager_network_monitor_listen(m);
-        if (r < 0) {
-                log_error("Could not listen for network events: %s", strerror(-r));
-                goto out;
-        }
+        r = manager_parse_config_file(m);
+        if (r < 0)
+                log_warning("Failed to parse configuration file: %s", strerror(-r));
 
-        /* write out default resolv.conf to avoid a
-         * dangling symlink */
-        r = manager_update_resolv_conf(m);
+        r = manager_start(m);
         if (r < 0) {
-                log_error("Could not create resolv.conf: %s", strerror(-r));
-                goto out;
+                log_error("Failed to start manager: %s", strerror(-r));
+                goto finish;
         }
 
+        /* Write finish default resolv.conf to avoid a dangling
+         * symlink */
+        r = manager_write_resolv_conf(m);
+        if (r < 0)
+                log_warning("Could not create resolv.conf: %s", strerror(-r));
+
         sd_notify(false,
                   "READY=1\n"
                   "STATUS=Processing requests...");
@@ -91,11 +101,14 @@ int main(int argc, char *argv[]) {
         r = sd_event_loop(m->event);
         if (r < 0) {
                 log_error("Event loop failed: %s", strerror(-r));
-                goto out;
+                goto finish;
         }
 
-out:
+        sd_event_get_exit_code(m->event, &r);
+
+finish:
         sd_notify(false,
+                  "STOPPIN=1\n"
                   "STATUS=Shutting down...");
 
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
index a2391954aa63bc34cdee6d1ca91435f3c4e87513..c8263d67f459c52d9fab2c6fc931719ba799e0f1 100644 (file)
@@ -8,4 +8,6 @@
 # See resolved.conf(5) for details
 
 [Resolve]
-#DNS=@DNS_SERVERS@
+#DNS=
+#FallbackDNS=@DNS_SERVERS@
+#LLMNR=yes
diff --git a/src/resolve/resolved.h b/src/resolve/resolved.h
deleted file mode 100644 (file)
index 984edc7..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2013 Tom Gundersen <teg@jklm.no>
-
-  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/>.
-***/
-
-#pragma once
-
-#include "sd-event.h"
-#include "sd-network.h"
-
-#include "util.h"
-#include "list.h"
-
-typedef struct Address Address;
-typedef struct Manager Manager;
-
-struct Address {
-        unsigned char family;
-
-        union {
-                struct in_addr in;
-                struct in6_addr in6;
-        } in_addr;
-
-        LIST_FIELDS(Address, addresses);
-};
-
-struct Manager {
-        sd_event *event;
-
-        LIST_HEAD(Address, fallback_dns);
-
-        /* network */
-        sd_event_source *network_event_source;
-        sd_network_monitor *network_monitor;
-};
-
-/* Manager */
-
-int manager_new(Manager **ret);
-void manager_free(Manager *m);
-
-int manager_update_resolv_conf(Manager *m);
-int manager_network_monitor_listen(Manager *m);
-
-DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
-#define _cleanup_manager_free_ _cleanup_(manager_freep)
-
-const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, unsigned length);
-
-int config_parse_dnsv(const char *unit, const char *filename, unsigned line,
-                     const char *section, unsigned section_line, const char *lvalue,
-                     int ltype, const char *rvalue, void *data, void *userdata);
diff --git a/src/resolve/test-dns-domain.c b/src/resolve/test-dns-domain.c
new file mode 100644 (file)
index 0000000..dfe2a44
--- /dev/null
@@ -0,0 +1,192 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+ ***/
+
+#include "log.h"
+#include "resolved-dns-domain.h"
+
+static void test_dns_label_unescape_one(const char *what, const char *expect, size_t buffer_sz, int ret) {
+        char buffer[buffer_sz];
+        int r;
+
+        r = dns_label_unescape(&what, buffer, buffer_sz);
+        assert_se(r == ret);
+
+        if (r < 0)
+                return;
+
+        assert_se(streq(buffer, expect));
+}
+
+static void test_dns_label_unescape(void) {
+        test_dns_label_unescape_one("hallo", "hallo", 6, 5);
+        test_dns_label_unescape_one("hallo", "hallo", 4, -ENOSPC);
+        test_dns_label_unescape_one("", "", 10, 0);
+        test_dns_label_unescape_one("hallo\\.foobar", "hallo.foobar", 20, 12);
+        test_dns_label_unescape_one("hallo.foobar", "hallo", 10, 5);
+        test_dns_label_unescape_one("hallo\n.foobar", "hallo", 20, -EINVAL);
+        test_dns_label_unescape_one("hallo\\", "hallo", 20, -EINVAL);
+        test_dns_label_unescape_one("hallo\\032 ", "hallo  ", 20, 7);
+        test_dns_label_unescape_one(".", "", 20, 0);
+        test_dns_label_unescape_one("..", "", 20, -EINVAL);
+        test_dns_label_unescape_one(".foobar", "", 20, -EINVAL);
+        test_dns_label_unescape_one("foobar.", "foobar", 20, 6);
+}
+
+static void test_dns_label_escape_one(const char *what, size_t l, const char *expect, int ret) {
+        _cleanup_free_ char *t = NULL;
+        int r;
+
+        r = dns_label_escape(what, l, &t);
+        assert(r == ret);
+
+        if (r < 0)
+                return;
+
+        assert_se(streq_ptr(expect, t));
+}
+
+static void test_dns_label_escape(void) {
+        test_dns_label_escape_one("", 0, "", 0);
+        test_dns_label_escape_one("hallo", 5, "hallo", 5);
+        test_dns_label_escape_one("hallo", 6, NULL, -EINVAL);
+        test_dns_label_escape_one("hallo hallo.foobar,waldi", 24, "hallo\\032hallo\\.foobar\\044waldi", 31);
+}
+
+static void test_dns_name_normalize_one(const char *what, const char *expect, int ret) {
+        _cleanup_free_ char *t = NULL;
+        int r;
+
+        r = dns_name_normalize(what, &t);
+        assert_se(r == ret);
+
+        if (r < 0)
+                return;
+
+        assert_se(streq_ptr(expect, t));
+}
+
+static void test_dns_name_normalize(void) {
+        test_dns_name_normalize_one("", "", 0);
+        test_dns_name_normalize_one("f", "f", 0);
+        test_dns_name_normalize_one("f.waldi", "f.waldi", 0);
+        test_dns_name_normalize_one("f \\032.waldi", "f\\032\\032.waldi", 0);
+        test_dns_name_normalize_one("\\000", NULL, -EINVAL);
+        test_dns_name_normalize_one("..", NULL, -EINVAL);
+        test_dns_name_normalize_one(".foobar", NULL, -EINVAL);
+        test_dns_name_normalize_one("foobar.", "foobar", 0);
+        test_dns_name_normalize_one(".", "", 0);
+}
+
+static void test_dns_name_equal_one(const char *a, const char *b, int ret) {
+        int r;
+
+        r = dns_name_equal(a, b);
+        assert_se(r == ret);
+
+        r = dns_name_equal(b, a);
+        assert_se(r == ret);
+}
+
+static void test_dns_name_equal(void) {
+        test_dns_name_equal_one("", "", true);
+        test_dns_name_equal_one("x", "x", true);
+        test_dns_name_equal_one("x", "x.", true);
+        test_dns_name_equal_one("abc.def", "abc.def", true);
+        test_dns_name_equal_one("abc.def", "ABC.def", true);
+        test_dns_name_equal_one("abc.def", "CBA.def", false);
+        test_dns_name_equal_one("", "xxx", false);
+        test_dns_name_equal_one("ab", "a", false);
+        test_dns_name_equal_one("\\000", "xxxx", -EINVAL);
+        test_dns_name_equal_one(".", "", true);
+        test_dns_name_equal_one(".", ".", true);
+        test_dns_name_equal_one("..", "..", -EINVAL);
+}
+
+static void test_dns_name_endswith_one(const char *a, const char *b, int ret) {
+        assert_se(dns_name_endswith(a, b) == ret);
+}
+
+static void test_dns_name_endswith(void) {
+        test_dns_name_endswith_one("", "", true);
+        test_dns_name_endswith_one("", "xxx", false);
+        test_dns_name_endswith_one("xxx", "", true);
+        test_dns_name_endswith_one("x", "x", true);
+        test_dns_name_endswith_one("x", "y", false);
+        test_dns_name_endswith_one("x.y", "y", true);
+        test_dns_name_endswith_one("x.y", "Y", true);
+        test_dns_name_endswith_one("x.y", "x", false);
+        test_dns_name_endswith_one("x.y.z", "Z", true);
+        test_dns_name_endswith_one("x.y.z", "y.Z", true);
+        test_dns_name_endswith_one("x.y.z", "x.y.Z", true);
+        test_dns_name_endswith_one("x.y.z", "waldo", false);
+        test_dns_name_endswith_one("x.y.z.u.v.w", "y.z", false);
+        test_dns_name_endswith_one("x.y.z.u.v.w", "u.v.w", true);
+        test_dns_name_endswith_one("x.y\001.z", "waldo", -EINVAL);
+}
+
+static void test_dns_name_root(void) {
+        assert_se(dns_name_root("") == true);
+        assert_se(dns_name_root(".") == true);
+        assert_se(dns_name_root("xxx") == false);
+        assert_se(dns_name_root("xxx.") == false);
+        assert_se(dns_name_root("..") == -EINVAL);
+}
+
+static void test_dns_name_single_label(void) {
+        assert_se(dns_name_single_label("") == false);
+        assert_se(dns_name_single_label(".") == false);
+        assert_se(dns_name_single_label("..") == -EINVAL);
+        assert_se(dns_name_single_label("x") == true);
+        assert_se(dns_name_single_label("x.") == true);
+        assert_se(dns_name_single_label("xx.yy") == false);
+}
+
+static void test_dns_name_reverse_one(const char *address, const char *name) {
+        _cleanup_free_ char *p = NULL;
+        union in_addr_union a, b;
+        int familya, familyb;
+
+        assert_se(in_addr_from_string_auto(address, &familya, &a) >= 0);
+        assert_se(dns_name_reverse(familya, &a, &p) >= 0);
+        assert_se(streq(p, name));
+        assert_se(dns_name_address(p, &familyb, &b) > 0);
+        assert_se(familya == familyb);
+        assert_se(in_addr_equal(familya, &a, &b));
+}
+
+static void test_dns_name_reverse(void) {
+        test_dns_name_reverse_one("47.11.8.15", "15.8.11.47.in-addr.arpa");
+        test_dns_name_reverse_one("fe80::47", "7.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa");
+}
+
+int main(int argc, char *argv[]) {
+
+        test_dns_label_unescape();
+        test_dns_label_escape();
+        test_dns_name_normalize();
+        test_dns_name_equal();
+        test_dns_name_endswith();
+        test_dns_name_root();
+        test_dns_name_single_label();
+        test_dns_name_reverse();
+
+        return 0;
+}
index 9d5527b29c6cf209b6e12ac7a0b4dc66d16a4327..e3b62939c7328e0b6f68f8cbeaea6b6994205bfe 100644 (file)
@@ -48,8 +48,7 @@ static bool arg_nice_set = false;
 static char **arg_environment = NULL;
 static char **arg_property = NULL;
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] COMMAND [ARGS...]\n\n"
                "Run the specified command in a transient scope or service unit.\n\n"
                "  -h --help                 Show this help\n"
@@ -70,8 +69,6 @@ static int help(void) {
                "     --nice=NICE            Nice level\n"
                "     --setenv=NAME=VALUE    Set environment\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -119,12 +116,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+hrH:M:p:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "+hrH:M:p:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -215,7 +213,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind >= argc) {
                 log_error("Command line to execute required.");
@@ -335,11 +332,11 @@ static int start_transient_service(
         _cleanup_free_ char *name = NULL;
         int r;
 
-        if (arg_unit)
+        if (arg_unit) {
                 name = unit_name_mangle_with_suffix(arg_unit, MANGLE_NOGLOB, ".service");
-        else
-                asprintf(&name, "run-"PID_FMT".service", getpid());
-        if (!name)
+                if (!name)
+                        return log_oom();
+        } else if (asprintf(&name, "run-"PID_FMT".service", getpid()) < 0)
                 return log_oom();
 
         r = message_start_transient_unit_new(bus, name, &m);
@@ -471,11 +468,11 @@ static int start_transient_scope(
 
         assert(bus);
 
-        if (arg_unit)
+        if (arg_unit) {
                 name = unit_name_mangle_with_suffix(arg_unit, MANGLE_NOGLOB, ".scope");
-        else
-                asprintf(&name, "run-"PID_FMT".scope", getpid());
-        if (!name)
+                if (!name)
+                        return log_oom();
+        } else if (asprintf(&name, "run-"PID_FMT".scope", getpid()) < 0)
                 return log_oom();
 
         r = message_start_transient_unit_new(bus, name, &m);
@@ -565,7 +562,7 @@ static int start_transient_scope(
 
 int main(int argc, char* argv[]) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         _cleanup_free_ char *description = NULL, *command = NULL;
         int r;
 
index 2b85da1e4a2907557157d525bd1acc3feeef9f9b..c14843da49b74c43439f1815574493df34f0cd65 100644 (file)
 #include "fileio.h"
 #include "apparmor-util.h"
 
-static int use_apparmor_cached = -1;
+bool mac_apparmor_use(void) {
+        static int cached_use = -1;
 
-bool use_apparmor(void) {
-
-        if (use_apparmor_cached < 0) {
+        if (cached_use < 0) {
                 _cleanup_free_ char *p = NULL;
 
-                use_apparmor_cached =
+                cached_use =
                         read_one_line_file("/sys/module/apparmor/parameters/enabled", &p) >= 0 &&
                         parse_boolean(p) > 0;
         }
 
-        return use_apparmor_cached;
+        return cached_use;
 }
index 4b056a1aaed353de6b9ca92263080f96861b65ed..a3d1b3b066f1e25662d294b5e9909c2b52bd11bc 100644 (file)
@@ -23,4 +23,4 @@
 
 #include <stdbool.h>
 
-bool use_apparmor(void);
+bool mac_apparmor_use(void);
index 7dd049a36a513e435a35ab70deceda6ab813f5b1..dc45f3589d010c7129f6909f3f0911081c8fef81 100644 (file)
@@ -115,7 +115,6 @@ Architecture uname_architecture(void) {
 #elif defined(__tilegx__)
                 { "tilegx",     ARCHITECTURE_TILEGX   },
 #elif defined(__cris__)
-                { "cris",       ARCHITECTURE_CRIS     },
                 { "crisv32",    ARCHITECTURE_CRIS     },
 #else
 #error "Please register your architecture here!"
@@ -154,7 +153,9 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
         [ARCHITECTURE_SPARC] = "sparc",
         [ARCHITECTURE_SPARC64] = "sparc64",
         [ARCHITECTURE_MIPS] = "mips",
+        [ARCHITECTURE_MIPS_LE] = "mips-le",
         [ARCHITECTURE_MIPS64] = "mips64",
+        [ARCHITECTURE_MIPS64_LE] = "mips64-le",
         [ARCHITECTURE_ALPHA] = "alpha",
         [ARCHITECTURE_ARM] = "arm",
         [ARCHITECTURE_ARM_BE] = "arm-be",
index 4821d5d289f9dda0d6f961c39093bded046be09a..353d49bedf02b314602bfdd4a21af63ae0dfef8b 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <endian.h>
+
 #include "util.h"
 
 /* A cleaned up architecture definition. We don't want to get lost in
  * processor features, models, generations or even ABIs. Hence we
  * focus on general family, and distuignish word width and
- * endianess. */
+ * endianness. */
 
 typedef enum Architecture {
         ARCHITECTURE_X86 = 0,
@@ -80,15 +82,15 @@ Architecture uname_architecture(void);
 #  define native_architecture() ARCHITECTURE_X86
 #  define LIB_ARCH_TUPLE "i386-linux-gnu"
 #elif defined(__powerpc64__)
-#  if defined(WORDS_BIGENDIAN)
+#  if __BYTE_ORDER == __BIG_ENDIAN
 #    define native_architecture() ARCHITECTURE_PPC64
 #    define LIB_ARCH_TUPLE "ppc64-linux-gnu"
 #  else
 #    define native_architecture() ARCHITECTURE_PPC64_LE
-#    error "Missing LIB_ARCH_TUPLE for PPC64LE"
+#    define LIB_ARCH_TUPLE  "powerpc64le-linux-gnu"
 #  endif
 #elif defined(__powerpc__)
-#  if defined(WORDS_BIGENDIAN)
+#  if __BYTE_ORDER == __BIG_ENDIAN
 #    define native_architecture() ARCHITECTURE_PPC
 #    define LIB_ARCH_TUPLE "powerpc-linux-gnu"
 #  else
@@ -117,7 +119,7 @@ Architecture uname_architecture(void);
 #  define native_architecture() ARCHITECTURE_SPARC
 #  define LIB_ARCH_TUPLE "sparc-linux-gnu"
 #elif defined(__mips64__)
-#  if defined(WORDS_BIGENDIAN)
+#  if __BYTE_ORDER == __BIG_ENDIAN
 #    define native_architecture() ARCHITECTURE_MIPS64
 #    error "Missing LIB_ARCH_TUPLE for MIPS64"
 #  else
@@ -125,7 +127,7 @@ Architecture uname_architecture(void);
 #    error "Missing LIB_ARCH_TUPLE for MIPS64_LE"
 #  endif
 #elif defined(__mips__)
-#  if defined(WORDS_BIGENDIAN)
+#  if __BYTE_ORDER == __BIG_ENDIAN
 #    define native_architecture() ARCHITECTURE_MIPS
 #    define LIB_ARCH_TUPLE "mips-linux-gnu"
 #  else
@@ -136,7 +138,7 @@ Architecture uname_architecture(void);
 #  define native_architecture() ARCHITECTURE_ALPHA
 #  define LIB_ARCH_TUPLE "alpha-linux-gnu"
 #elif defined(__aarch64__)
-#  if defined(WORDS_BIGENDIAN)
+#  if __BYTE_ORDER == __BIG_ENDIAN
 #    define native_architecture() ARCHITECTURE_ARM64_BE
 #    define LIB_ARCH_TUPLE "aarch64_be-linux-gnu"
 #  else
@@ -144,7 +146,7 @@ Architecture uname_architecture(void);
 #    define LIB_ARCH_TUPLE "aarch64-linux-gnu"
 #  endif
 #elif defined(__arm__)
-#  if defined(WORDS_BIGENDIAN)
+#  if __BYTE_ORDER == __BIG_ENDIAN
 #    define native_architecture() ARCHITECTURE_ARM_BE
 #    if defined(__ARM_EABI__)
 #      if defined(__ARM_PCS_VFP)
diff --git a/src/shared/arphrd-list.c b/src/shared/arphrd-list.c
new file mode 100644 (file)
index 0000000..6e113ef
--- /dev/null
@@ -0,0 +1,59 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <net/if_arp.h>
+#include <sys/socket.h>
+#include <string.h>
+
+#include "util.h"
+#include "arphrd-list.h"
+
+static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
+
+#include "arphrd-to-name.h"
+#include "arphrd-from-name.h"
+
+const char *arphrd_to_name(int id) {
+
+        if (id <= 0)
+                return NULL;
+
+        if (id >= (int) ELEMENTSOF(arphrd_names))
+                return NULL;
+
+        return arphrd_names[id];
+}
+
+int arphrd_from_name(const char *name) {
+        const struct arphrd_name *sc;
+
+        assert(name);
+
+        sc = lookup_arphrd(name, strlen(name));
+        if (!sc)
+                return 0;
+
+        return sc->id;
+}
+
+int arphrd_max(void) {
+        return ELEMENTSOF(arphrd_names);
+}
diff --git a/src/shared/arphrd-list.h b/src/shared/arphrd-list.h
new file mode 100644 (file)
index 0000000..5ca182c
--- /dev/null
@@ -0,0 +1,27 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+const char *arphrd_to_name(int id);
+int arphrd_from_name(const char *name);
+
+int arphrd_max(void);
index 5997a03fb25529459543079003c2515ded088f22..94a27f9010cca4924761187a92d43513e1deee8c 100644 (file)
@@ -52,6 +52,7 @@ static void backspace_chars(int ttyfd, size_t p) {
 int ask_password_tty(
                 const char *message,
                 usec_t until,
+                bool echo,
                 const char *flag_file,
                 char **_passphrase) {
 
@@ -218,7 +219,7 @@ int ask_password_tty(
                         passphrase[p++] = c;
 
                         if (!silent_mode && ttyfd >= 0)
-                                loop_write(ttyfd, "*", 1, false);
+                                loop_write(ttyfd, echo ? &c : "*", 1, false);
 
                         dirty = true;
                 }
@@ -270,7 +271,7 @@ static int create_socket(char **name) {
 
         if (r < 0) {
                 r = -errno;
-                log_error("bind() failed: %m");
+                log_error("bind(%s) failed: %m", sa.un.sun_path);
                 goto fail;
         }
 
@@ -300,6 +301,7 @@ int ask_password_agent(
                 const char *icon,
                 const char *id,
                 usec_t until,
+                bool echo,
                 bool accept_cached,
                 char ***_passphrases) {
 
@@ -362,10 +364,12 @@ int ask_password_agent(
                 "PID="PID_FMT"\n"
                 "Socket=%s\n"
                 "AcceptCached=%i\n"
+                "Echo=%i\n"
                 "NotAfter="USEC_FMT"\n",
                 getpid(),
                 socket_name,
                 accept_cached ? 1 : 0,
+                echo ? 1 : 0,
                 until);
 
         if (message)
@@ -550,7 +554,7 @@ int ask_password_auto(const char *message, const char *icon, const char *id,
                 int r;
                 char *s = NULL, **l = NULL;
 
-                r = ask_password_tty(message, until, NULL, &s);
+                r = ask_password_tty(message, until, false, NULL, &s);
                 if (r < 0)
                         return r;
 
@@ -561,5 +565,5 @@ int ask_password_auto(const char *message, const char *icon, const char *id,
                 *_passphrases = l;
                 return r;
         } else
-                return ask_password_agent(message, icon, id, until, accept_cached, _passphrases);
+                return ask_password_agent(message, icon, id, until, false, accept_cached, _passphrases);
 }
index 3839a2df0f5b2f76554c9e760c84e9fd5d1b60fa..704ee6e1b443522a84fdabc6ba92a0237dbc2a17 100644 (file)
 
 #include "util.h"
 
-int ask_password_tty(const char *message, usec_t until, const char *flag_file, char **_passphrase);
+int ask_password_tty(const char *message, usec_t until, bool echo, const char *flag_file, char **_passphrase);
 
 int ask_password_agent(const char *message, const char *icon, const char *id,
-                       usec_t until, bool accept_cached, char ***_passphrases);
+                       usec_t until, bool echo, bool accept_cached, char ***_passphrases);
 
 int ask_password_auto(const char *message, const char *icon, const char *id,
                       usec_t until, bool accept_cached, char ***_passphrases);
index 3876deda70c9954eefa3c43ba5915b3471a4a48f..115901e637f18e532c381c1f40ceb3bcaff7ff2a 100644 (file)
@@ -73,7 +73,7 @@ int asynchronous_sync(void) {
 }
 
 static void *close_thread(void *p) {
-        safe_close(PTR_TO_INT(p));
+        assert_se(close_nointr(PTR_TO_INT(p)) != -EBADF);
         return NULL;
 }
 
@@ -86,9 +86,13 @@ int asynchronous_close(int fd) {
          * but it doesn't, so we work around it, and hide this as a
          * far away as we can. */
 
-        r = asynchronous_job(close_thread, INT_TO_PTR(fd));
-        if (r < 0)
-                safe_close(fd);
+        if (fd >= 0) {
+                PROTECT_ERRNO;
+
+                r = asynchronous_job(close_thread, INT_TO_PTR(fd));
+                if (r < 0)
+                         assert_se(close_nointr(fd) != -EBADF);
+        }
 
         return -1;
 }
diff --git a/src/shared/barrier.c b/src/shared/barrier.c
new file mode 100644 (file)
index 0000000..f65363a
--- /dev/null
@@ -0,0 +1,419 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <poll.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/eventfd.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "barrier.h"
+#include "macro.h"
+#include "util.h"
+
+/**
+ * Barriers
+ * This barrier implementation provides a simple synchronization method based
+ * on file-descriptors that can safely be used between threads and processes. A
+ * barrier object contains 2 shared counters based on eventfd. Both processes
+ * can now place barriers and wait for the other end to reach a random or
+ * specific barrier.
+ * Barriers are numbered, so you can either wait for the other end to reach any
+ * barrier or the last barrier that you placed. This way, you can use barriers
+ * for one-way *and* full synchronization. Note that even-though barriers are
+ * numbered, these numbers are internal and recycled once both sides reached the
+ * same barrier (implemented as a simple signed counter). It is thus not
+ * possible to address barriers by their ID.
+ *
+ * Barrier-API: Both ends can place as many barriers via barrier_place() as
+ * they want and each pair of barriers on both sides will be implicitly linked.
+ * Each side can use the barrier_wait/sync_*() family of calls to wait for the
+ * other side to place a specific barrier. barrier_wait_next() waits until the
+ * other side calls barrier_place(). No links between the barriers are
+ * considered and this simply serves as most basic asynchronous barrier.
+ * barrier_sync_next() is like barrier_wait_next() and waits for the other side
+ * to place their next barrier via barrier_place(). However, it only waits for
+ * barriers that are linked to a barrier we already placed. If the other side
+ * already placed more barriers than we did, barrier_sync_next() returns
+ * immediately.
+ * barrier_sync() extends barrier_sync_next() and waits until the other end
+ * placed as many barriers via barrier_place() as we did. If they already placed
+ * as many as we did (or more), it returns immediately.
+ *
+ * Additionally to basic barriers, an abortion event is available.
+ * barrier_abort() places an abortion event that cannot be undone. An abortion
+ * immediately cancels all placed barriers and replaces them. Any running and
+ * following wait/sync call besides barrier_wait_abortion() will immediately
+ * return false on both sides (otherwise, they always return true).
+ * barrier_abort() can be called multiple times on both ends and will be a
+ * no-op if already called on this side.
+ * barrier_wait_abortion() can be used to wait for the other side to call
+ * barrier_abort() and is the only wait/sync call that does not return
+ * immediately if we aborted outself. It only returns once the other side
+ * called barrier_abort().
+ *
+ * Barriers can be used for in-process and inter-process synchronization.
+ * However, for in-process synchronization you could just use mutexes.
+ * Therefore, main target is IPC and we require both sides to *not* share the FD
+ * table. If that's given, barriers provide target tracking: If the remote side
+ * exit()s, an abortion event is implicitly queued on the other side. This way,
+ * a sync/wait call will be woken up if the remote side crashed or exited
+ * unexpectedly. However, note that these abortion events are only queued if the
+ * barrier-queue has been drained. Therefore, it is safe to place a barrier and
+ * exit. The other side can safely wait on the barrier even though the exit
+ * queued an abortion event. Usually, the abortion event would overwrite the
+ * barrier, however, that's not true for exit-abortion events. Those are only
+ * queued if the barrier-queue is drained (thus, the receiving side has placed
+ * more barriers than the remote side).
+ */
+
+/**
+ * barrier_create() - Initialize a barrier object
+ * @obj: barrier to initialize
+ *
+ * This initializes a barrier object. The caller is responsible of allocating
+ * the memory and keeping it valid. The memory does not have to be zeroed
+ * beforehand.
+ * Two eventfd objects are allocated for each barrier. If allocation fails, an
+ * error is returned.
+ *
+ * If this function fails, the barrier is reset to an invalid state so it is
+ * safe to call barrier_destroy() on the object regardless whether the
+ * initialization succeeded or not.
+ *
+ * The caller is responsible to destroy the object via barrier_destroy() before
+ * releasing the underlying memory.
+ *
+ * Returns: 0 on success, negative error code on failure.
+ */
+int barrier_create(Barrier *b) {
+        _cleanup_(barrier_destroyp) Barrier *staging = b;
+        int r;
+
+        assert(b);
+
+        b->me = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+        if (b->me < 0)
+                return -errno;
+
+        b->them = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+        if (b->them < 0)
+                return -errno;
+
+        r = pipe2(b->pipe, O_CLOEXEC | O_NONBLOCK);
+        if (r < 0)
+                return -errno;
+
+        staging = NULL;
+        return 0;
+}
+
+/**
+ * barrier_destroy() - Destroy a barrier object
+ * @b: barrier to destroy or NULL
+ *
+ * This destroys a barrier object that has previously been passed to
+ * barrier_create(). The object is released and reset to invalid
+ * state. Therefore, it is safe to call barrier_destroy() multiple
+ * times or even if barrier_create() failed. However, barrier must be
+ * always initalized with BARRIER_NULL.
+ *
+ * If @b is NULL, this is a no-op.
+ */
+void barrier_destroy(Barrier *b) {
+        if (!b)
+                return;
+
+        b->me = safe_close(b->me);
+        b->them = safe_close(b->them);
+        safe_close_pair(b->pipe);
+        b->barriers = 0;
+}
+
+/**
+ * barrier_set_role() - Set the local role of the barrier
+ * @b: barrier to operate on
+ * @role: role to set on the barrier
+ *
+ * This sets the roles on a barrier object. This is needed to know
+ * which side of the barrier you're on. Usually, the parent creates
+ * the barrier via barrier_create() and then calls fork() or clone().
+ * Therefore, the FDs are duplicated and the child retains the same
+ * barrier object.
+ *
+ * Both sides need to call barrier_set_role() after fork() or clone()
+ * are done. If this is not done, barriers will not work correctly.
+ *
+ * Note that barriers could be supported without fork() or clone(). However,
+ * this is currently not needed so it hasn't been implemented.
+ */
+void barrier_set_role(Barrier *b, unsigned int role) {
+        int fd;
+
+        assert(b);
+        assert(role == BARRIER_PARENT || role == BARRIER_CHILD);
+        /* make sure this is only called once */
+        assert(b->pipe[1] >= 0 && b->pipe[1] >= 0);
+
+        if (role == BARRIER_PARENT)
+                b->pipe[1] = safe_close(b->pipe[1]);
+        else {
+                b->pipe[0] = safe_close(b->pipe[0]);
+
+                /* swap me/them for children */
+                fd = b->me;
+                b->me = b->them;
+                b->them = fd;
+        }
+}
+
+/* places barrier; returns false if we aborted, otherwise true */
+static bool barrier_write(Barrier *b, uint64_t buf) {
+        ssize_t len;
+
+        /* prevent new sync-points if we already aborted */
+        if (barrier_i_aborted(b))
+                return false;
+
+        do {
+                len = write(b->me, &buf, sizeof(buf));
+        } while (len < 0 && IN_SET(errno, EAGAIN, EINTR));
+
+        if (len != sizeof(buf))
+                goto error;
+
+        /* lock if we aborted */
+        if (buf >= (uint64_t)BARRIER_ABORTION) {
+                if (barrier_they_aborted(b))
+                        b->barriers = BARRIER_WE_ABORTED;
+                else
+                        b->barriers = BARRIER_I_ABORTED;
+        } else if (!barrier_is_aborted(b))
+                b->barriers += buf;
+
+        return !barrier_i_aborted(b);
+
+error:
+        /* If there is an unexpected error, we have to make this fatal. There
+         * is no way we can recover from sync-errors. Therefore, we close the
+         * pipe-ends and treat this as abortion. The other end will notice the
+         * pipe-close and treat it as abortion, too. */
+
+        safe_close_pair(b->pipe);
+        b->barriers = BARRIER_WE_ABORTED;
+        return false;
+}
+
+/* waits for barriers; returns false if they aborted, otherwise true */
+static bool barrier_read(Barrier *b, int64_t comp) {
+        if (barrier_they_aborted(b))
+                return false;
+
+        while (b->barriers > comp) {
+                struct pollfd pfd[2] = {
+                        { .fd = b->pipe[0] >= 0 ? b->pipe[0] : b->pipe[1],
+                          .events = POLLHUP },
+                        { .fd = b->them,
+                          .events = POLLIN }};
+                uint64_t buf;
+                int r;
+
+                r = poll(pfd, 2, -1);
+                if (r < 0 && IN_SET(errno, EAGAIN, EINTR))
+                        continue;
+                else if (r < 0)
+                        goto error;
+
+                if (pfd[1].revents) {
+                        ssize_t len;
+
+                        /* events on @them signal new data for us */
+                        len = read(b->them, &buf, sizeof(buf));
+                        if (len < 0 && IN_SET(errno, EAGAIN, EINTR))
+                                continue;
+
+                        if (len != sizeof(buf))
+                                goto error;
+                } else if (pfd[0].revents & (POLLHUP | POLLERR | POLLNVAL))
+                        /* POLLHUP on the pipe tells us the other side exited.
+                         * We treat this as implicit abortion. But we only
+                         * handle it if there's no event on the eventfd. This
+                         * guarantees that exit-abortions do not overwrite real
+                         * barriers. */
+                        buf = BARRIER_ABORTION;
+                else
+                        continue;
+
+                /* lock if they aborted */
+                if (buf >= (uint64_t)BARRIER_ABORTION) {
+                        if (barrier_i_aborted(b))
+                                b->barriers = BARRIER_WE_ABORTED;
+                        else
+                                b->barriers = BARRIER_THEY_ABORTED;
+                } else if (!barrier_is_aborted(b))
+                        b->barriers -= buf;
+        }
+
+        return !barrier_they_aborted(b);
+
+error:
+        /* If there is an unexpected error, we have to make this fatal. There
+         * is no way we can recover from sync-errors. Therefore, we close the
+         * pipe-ends and treat this as abortion. The other end will notice the
+         * pipe-close and treat it as abortion, too. */
+
+        safe_close_pair(b->pipe);
+        b->barriers = BARRIER_WE_ABORTED;
+        return false;
+}
+
+/**
+ * barrier_place() - Place a new barrier
+ * @b: barrier object
+ *
+ * This places a new barrier on the barrier object. If either side already
+ * aborted, this is a no-op and returns "false". Otherwise, the barrier is
+ * placed and this returns "true".
+ *
+ * Returns: true if barrier was placed, false if either side aborted.
+ */
+bool barrier_place(Barrier *b) {
+        assert(b);
+
+        if (barrier_is_aborted(b))
+                return false;
+
+        barrier_write(b, BARRIER_SINGLE);
+        return true;
+}
+
+/**
+ * barrier_abort() - Abort the synchronization
+ * @b: barrier object to abort
+ *
+ * This aborts the barrier-synchronization. If barrier_abort() was already
+ * called on this side, this is a no-op. Otherwise, the barrier is put into the
+ * ABORT-state and will stay there. The other side is notified about the
+ * abortion. Any following attempt to place normal barriers or to wait on normal
+ * barriers will return immediately as "false".
+ *
+ * You can wait for the other side to call barrier_abort(), too. Use
+ * barrier_wait_abortion() for that.
+ *
+ * Returns: false if the other side already aborted, true otherwise.
+ */
+bool barrier_abort(Barrier *b) {
+        assert(b);
+
+        barrier_write(b, BARRIER_ABORTION);
+        return !barrier_they_aborted(b);
+}
+
+/**
+ * barrier_wait_next() - Wait for the next barrier of the other side
+ * @b: barrier to operate on
+ *
+ * This waits until the other side places its next barrier. This is independent
+ * of any barrier-links and just waits for any next barrier of the other side.
+ *
+ * If either side aborted, this returns false.
+ *
+ * Returns: false if either side aborted, true otherwise.
+ */
+bool barrier_wait_next(Barrier *b) {
+        assert(b);
+
+        if (barrier_is_aborted(b))
+                return false;
+
+        barrier_read(b, b->barriers - 1);
+        return !barrier_is_aborted(b);
+}
+
+/**
+ * barrier_wait_abortion() - Wait for the other side to abort
+ * @b: barrier to operate on
+ *
+ * This waits until the other side called barrier_abort(). This can be called
+ * regardless whether the local side already called barrier_abort() or not.
+ *
+ * If the other side has already aborted, this returns immediately.
+ *
+ * Returns: false if the local side aborted, true otherwise.
+ */
+bool barrier_wait_abortion(Barrier *b) {
+        assert(b);
+
+        barrier_read(b, BARRIER_THEY_ABORTED);
+        return !barrier_i_aborted(b);
+}
+
+/**
+ * barrier_sync_next() - Wait for the other side to place a next linked barrier
+ * @b: barrier to operate on
+ *
+ * This is like barrier_wait_next() and waits for the other side to call
+ * barrier_place(). However, this only waits for linked barriers. That means, if
+ * the other side already placed more barriers than (or as much as) we did, this
+ * returns immediately instead of waiting.
+ *
+ * If either side aborted, this returns false.
+ *
+ * Returns: false if either side aborted, true otherwise.
+ */
+bool barrier_sync_next(Barrier *b) {
+        assert(b);
+
+        if (barrier_is_aborted(b))
+                return false;
+
+        barrier_read(b, MAX((int64_t)0, b->barriers - 1));
+        return !barrier_is_aborted(b);
+}
+
+/**
+ * barrier_sync() - Wait for the other side to place as many barriers as we did
+ * @b: barrier to operate on
+ *
+ * This is like barrier_sync_next() but waits for the other side to call
+ * barrier_place() as often as we did (in total). If they already placed as much
+ * as we did (or more), this returns immediately instead of waiting.
+ *
+ * If either side aborted, this returns false.
+ *
+ * Returns: false if either side aborted, true otherwise.
+ */
+bool barrier_sync(Barrier *b) {
+        assert(b);
+
+        if (barrier_is_aborted(b))
+                return false;
+
+        barrier_read(b, 0);
+        return !barrier_is_aborted(b);
+}
diff --git a/src/shared/barrier.h b/src/shared/barrier.h
new file mode 100644 (file)
index 0000000..c55e311
--- /dev/null
@@ -0,0 +1,96 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "macro.h"
+#include "util.h"
+
+/* See source file for an API description. */
+
+typedef struct Barrier Barrier;
+
+enum {
+        BARRIER_SINGLE                  = 1LL,
+        BARRIER_ABORTION                = INT64_MAX,
+
+        /* bias values to store state; keep @WE < @THEY < @I */
+        BARRIER_BIAS                    = INT64_MIN,
+        BARRIER_WE_ABORTED              = BARRIER_BIAS + 1LL,
+        BARRIER_THEY_ABORTED            = BARRIER_BIAS + 2LL,
+        BARRIER_I_ABORTED               = BARRIER_BIAS + 3LL,
+};
+
+enum {
+        BARRIER_PARENT,
+        BARRIER_CHILD,
+};
+
+struct Barrier {
+        int me;
+        int them;
+        int pipe[2];
+        int64_t barriers;
+};
+
+#define BARRIER_NULL {-1, -1, {-1, -1}, 0}
+
+int barrier_create(Barrier *obj);
+void barrier_destroy(Barrier *b);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Barrier*, barrier_destroy);
+
+void barrier_set_role(Barrier *b, unsigned int role);
+
+bool barrier_place(Barrier *b);
+bool barrier_abort(Barrier *b);
+
+bool barrier_wait_next(Barrier *b);
+bool barrier_wait_abortion(Barrier *b);
+bool barrier_sync_next(Barrier *b);
+bool barrier_sync(Barrier *b);
+
+static inline bool barrier_i_aborted(Barrier *b) {
+        return b->barriers == BARRIER_I_ABORTED || b->barriers == BARRIER_WE_ABORTED;
+}
+
+static inline bool barrier_they_aborted(Barrier *b) {
+        return b->barriers == BARRIER_THEY_ABORTED || b->barriers == BARRIER_WE_ABORTED;
+}
+
+static inline bool barrier_we_aborted(Barrier *b) {
+        return b->barriers == BARRIER_WE_ABORTED;
+}
+
+static inline bool barrier_is_aborted(Barrier *b) {
+        return b->barriers == BARRIER_I_ABORTED || b->barriers == BARRIER_THEY_ABORTED || b->barriers == BARRIER_WE_ABORTED;
+}
+
+static inline bool barrier_place_and_sync(Barrier *b) {
+        barrier_place(b);
+        return barrier_sync(b);
+}
index daaeaca515dea0dbc11055d5f6eccafe755d9408..4c65a495d3596a6732b0499ad0739aeee57322fa 100644 (file)
@@ -42,12 +42,13 @@ typedef struct BaseFilesystem {
 } BaseFilesystem;
 
 static const BaseFilesystem table[] = {
-        { "bin",      0, "usr/bin",                             NULL },
-        { "lib",      0, "usr/lib",                             NULL },
-        { "root",  0755, NULL,                                  NULL },
-        { "sbin",     0, "usr/sbin",                            NULL },
+        { "bin",      0, "usr/bin\0",                  NULL },
+        { "lib",      0, "usr/lib\0",                  NULL },
+        { "root",  0755, NULL,                         NULL },
+        { "sbin",     0, "usr/sbin\0",                 NULL },
 #if defined(__i386__) || defined(__x86_64__)
-        { "lib64",    0, "usr/lib/x86_64-linux-gnu\0usr/lib64", "ld-linux-x86-64.so.2" },
+        { "lib64",    0, "usr/lib/x86_64-linux-gnu\0"
+                         "usr/lib64\0",                "ld-linux-x86-64.so.2" },
 #endif
 };
 
@@ -57,16 +58,17 @@ int base_filesystem_create(const char *root) {
         int r;
 
         fd = open(root, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
-        if (fd < 0)
+        if (fd < 0) {
+                log_error("Failed to open root file system: %m");
                 return -errno;
+        }
 
         for (i = 0; i < ELEMENTSOF(table); i ++) {
-                if (table[i].target) {
-                        const char *target = NULL;
-                        const char *s;
+                if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                        continue;
 
-                        if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
-                                continue;
+                if (table[i].target) {
+                        const char *target = NULL, *s;
 
                         /* check if one of the targets exists */
                         NULSTR_FOREACH(s, table[i].target) {
index 48a2b4ef1bc2b268281ad8a841f713d5b957edcc..504ab1f796ad4c00e3f87ecc7d8090071bfb0058 100644 (file)
 #define BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED "org.freedesktop.timedate1.AutomaticTimeSyncEnabled"
 
 #define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess"
+
+#define BUS_ERROR_NO_NAME_SERVERS "org.freedesktop.resolve1.NoNameServers"
+#define BUS_ERROR_INVALID_REPLY "org.freedesktop.resolve1.InvalidReply"
+#define BUS_ERROR_NO_SUCH_RR "org.freedesktop.resolve1.NoSuchRR"
+#define BUS_ERROR_NO_RESOURCES "org.freedesktop.resolve1.NoResources"
+#define BUS_ERROR_CNAME_LOOP "org.freedesktop.resolve1.CNameLoop"
+#define BUS_ERROR_ABORTED "org.freedesktop.resolve1.Aborted"
+#define _BUS_ERROR_DNS "org.freedesktop.resolve1.DnsError."
index 69b742723295c5df91c03464fd70593d6bd97612..7efcf7b371870d09e3891a83b018bd28de10c55f 100644 (file)
@@ -35,7 +35,9 @@ static void free_chain(CalendarComponent *c) {
 }
 
 void calendar_spec_free(CalendarSpec *c) {
-        assert(c);
+
+        if (!c)
+                return;
 
         free_chain(c->year);
         free_chain(c->month);
@@ -472,7 +474,7 @@ static int const_chain(int value, CalendarComponent **c) {
 
         cc->value = value;
         cc->repeat = 0;
-        cc->next = NULL;
+        cc->next = *c;
 
         *c = cc;
 
@@ -653,7 +655,12 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
         if (!c)
                 return -ENOMEM;
 
-        if (strcaseeq(p, "hourly")) {
+        if (strcaseeq(p, "minutely")) {
+                r = const_chain(0, &c->second);
+                if (r < 0)
+                        goto fail;
+
+        } else if (strcaseeq(p, "hourly")) {
                 r = const_chain(0, &c->minute);
                 if (r < 0)
                         goto fail;
@@ -686,7 +693,10 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
                 if (r < 0)
                         goto fail;
 
-        } else if (strcaseeq(p, "anually") || strcaseeq(p, "yearly")) {
+        } else if (strcaseeq(p, "annually") ||
+                   strcaseeq(p, "yearly") ||
+                   strcaseeq(p, "anually") /* backwards compatibility */ ) {
+
                 r = const_chain(1, &c->month);
                 if (r < 0)
                         goto fail;
@@ -717,6 +727,57 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
                 if (r < 0)
                         goto fail;
 
+        } else if (strcaseeq(p, "quarterly")) {
+
+                r = const_chain(1, &c->month);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(4, &c->month);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(7, &c->month);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(10, &c->month);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(1, &c->day);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->hour);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->minute);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->second);
+                if (r < 0)
+                        goto fail;
+
+        } else if (strcaseeq(p, "biannually") ||
+                   strcaseeq(p, "bi-annually") ||
+                   strcaseeq(p, "semiannually") ||
+                   strcaseeq(p, "semi-annually")) {
+
+                r = const_chain(1, &c->month);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(7, &c->month);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(1, &c->day);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->hour);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->minute);
+                if (r < 0)
+                        goto fail;
+                r = const_chain(0, &c->second);
+                if (r < 0)
+                        goto fail;
+
         } else {
                 r = parse_weekdays(&p, c);
                 if (r < 0)
index c1c4d409ae5ee6bcc30d5d743473417861dbc6e4..da8e8852260a106248e1e1955152fe3e350ca069 100644 (file)
@@ -161,7 +161,7 @@ int cg_kill(const char *controller, const char *path, int sig, bool sigcont, boo
          * tasks list, to properly handle forking processes */
 
         if (!s) {
-                s = allocated_set = set_new(trivial_hash_func, trivial_compare_func);
+                s = allocated_set = set_new(NULL);
                 if (!s)
                         return -ENOMEM;
         }
@@ -239,7 +239,7 @@ int cg_kill_recursive(const char *controller, const char *path, int sig, bool si
         assert(sig >= 0);
 
         if (!s) {
-                s = allocated_set = set_new(trivial_hash_func, trivial_compare_func);
+                s = allocated_set = set_new(NULL);
                 if (!s)
                         return -ENOMEM;
         }
@@ -290,7 +290,7 @@ int cg_migrate(const char *cfrom, const char *pfrom, const char *cto, const char
         assert(cto);
         assert(pto);
 
-        s = set_new(trivial_hash_func, trivial_compare_func);
+        s = set_new(NULL);
         if (!s)
                 return -ENOMEM;
 
@@ -643,7 +643,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
 
         snprintf(c, sizeof(c), PID_FMT"\n", pid);
 
-        return write_string_file(fs, c);
+        return write_string_file_no_create(fs, c);
 }
 
 int cg_attach_fallback(const char *controller, const char *path, pid_t pid) {
@@ -753,9 +753,9 @@ int cg_pid_get_path(const char *controller, pid_t pid, char **path) {
         cs = strlen(controller);
 
         FOREACH_LINE(line, f, return -errno) {
-                char *l, *p, *w, *e;
+                char *l, *p, *e;
                 size_t k;
-                char *state;
+                const char *word, *state;
                 bool found = false;
 
                 truncate_nl(line);
@@ -771,16 +771,16 @@ int cg_pid_get_path(const char *controller, pid_t pid, char **path) {
 
                 *e = 0;
 
-                FOREACH_WORD_SEPARATOR(w, k, l, ",", state) {
+                FOREACH_WORD_SEPARATOR(word, k, l, ",", state) {
 
-                        if (k == cs && memcmp(w, controller, cs) == 0) {
+                        if (k == cs && memcmp(word, controller, cs) == 0) {
                                 found = true;
                                 break;
                         }
 
                         if (k == 5 + cs &&
-                            memcmp(w, "name=", 5) == 0 &&
-                            memcmp(w+5, controller, cs) == 0) {
+                            memcmp(word, "name=", 5) == 0 &&
+                            memcmp(word+5, controller, cs) == 0) {
                                 found = true;
                                 break;
                         }
@@ -817,7 +817,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
 
         sc = strstrip(contents);
         if (sc[0] == 0) {
-                r = write_string_file(fs, agent);
+                r = write_string_file_no_create(fs, agent);
                 if (r < 0)
                         return r;
         } else if (!streq(sc, agent))
@@ -837,7 +837,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
 
         sc = strstrip(contents);
         if (streq(sc, "0")) {
-                r = write_string_file(fs, "1");
+                r = write_string_file_no_create(fs, "1");
                 if (r < 0)
                         return r;
 
@@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-        r = write_string_file(fs, "0");
+        r = write_string_file_no_create(fs, "0");
         if (r < 0)
                 return r;
 
@@ -869,7 +869,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-        r = write_string_file(fs, "");
+        r = write_string_file_no_create(fs, "");
         if (r < 0)
                 return r;
 
@@ -1306,9 +1306,8 @@ int cg_pid_get_machine_name(pid_t pid, char **machine) {
 }
 
 int cg_path_get_session(const char *path, char **session) {
-        const char *e, *n, *x;
+        const char *e, *n, *x, *y;
         char *s;
-        size_t l;
 
         assert(path);
 
@@ -1325,17 +1324,14 @@ int cg_path_get_session(const char *path, char **session) {
         x = startswith(s, "session-");
         if (!x)
                 return -ENOENT;
-        if (!endswith(x, ".scope"))
-                return -ENOENT;
-
-        l = strlen(x);
-        if (l <= 6)
+        y = endswith(x, ".scope");
+        if (!y || x == y)
                 return -ENOENT;
 
         if (session) {
                 char *r;
 
-                r = strndup(x, l - 6);
+                r = strndup(x, y - x);
                 if (!r)
                         return -ENOMEM;
 
@@ -1591,7 +1587,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
         if (r < 0)
                 return r;
 
-        return write_string_file(p, value);
+        return write_string_file_no_create(p, value);
 }
 
 static const char mask_names[] =
index e66db63ba01263eaac26339bb13294f8e0382e4c..fc49393c72aa6601d1fc369066fbf09485a8ca71 100644 (file)
@@ -124,9 +124,10 @@ int clock_set_timezone(int *min) {
         tz.tz_dsttime = 0; /* DST_NONE*/
 
         /*
-         * If the hardware clock does not run in UTC, but in local time:
-         * The very first time we set the kernel's timezone, it will warp
-         * the clock so that it runs in UTC instead of local time.
+         * If the RTC does not run in UTC but in local time, the very first
+         * call to settimeofday() will set the kernel's timezone and will warp the
+         * system clock, so that it runs in UTC instead of the local time we
+         * have read from the RTC.
          */
         if (settimeofday(tv_null, &tz) < 0)
                 return -errno;
@@ -135,7 +136,7 @@ int clock_set_timezone(int *min) {
         return 0;
 }
 
-int clock_reset_timezone(void) {
+int clock_reset_timewarp(void) {
         const struct timeval *tv_null = NULL;
         struct timezone tz;
 
@@ -143,9 +144,9 @@ int clock_reset_timezone(void) {
         tz.tz_dsttime = 0; /* DST_NONE*/
 
         /*
-         * The very first time we set the kernel's timezone, it will warp
-         * the clock. Do a dummy call here, so the time warping is sealed
-         * and we set only the timezone with the next call.
+         * The very first call to settimeofday() does time warp magic. Do a
+         * dummy call here, so the time warping is sealed and all later calls
+         * behave as expected.
          */
         if (settimeofday(tv_null, &tz) < 0)
                 return -errno;
index 4deeac773600ec06a641dfb2271c9c37faa3c985..7ed371a958cecef3e58f6beb0b1c2807f3ca98f7 100644 (file)
@@ -23,6 +23,6 @@
 
 int clock_is_localtime(void);
 int clock_set_timezone(int *min);
-int clock_reset_timezone(void);
+int clock_reset_timewarp(void);
 int clock_get_hwclock(struct tm *tm);
 int clock_set_hwclock(const struct tm *tm);
index 7b89b0fbafe1e3eebd1832ca01f79e5f4c9f99b0..ff4a8ecd15dfd69bfcc8a2220f514c115048d5d1 100644 (file)
@@ -26,7 +26,7 @@
 #include <sys/statvfs.h>
 #include <fnmatch.h>
 
-#include <systemd/sd-id128.h>
+#include "systemd/sd-id128.h"
 #include "util.h"
 #include "condition-util.h"
 #include "virt.h"
@@ -74,7 +74,8 @@ void condition_free_list(Condition *first) {
 }
 
 bool condition_test_kernel_command_line(Condition *c) {
-        char *line, *w, *state, *word = NULL;
+        char *line, *word = NULL;
+        const char *w, *state;
         bool equal;
         int r;
         size_t l, pl;
@@ -113,6 +114,8 @@ bool condition_test_kernel_command_line(Condition *c) {
                 }
 
         }
+        if (!isempty(state))
+                log_warning("Trailing garbage and the end of kernel commandline, ignoring.");
 
         free(word);
         free(line);
@@ -257,6 +260,7 @@ static const char* const condition_type_table[_CONDITION_TYPE_MAX] = {
         [CONDITION_AC_POWER] = "ConditionACPower",
         [CONDITION_ARCHITECTURE] = "ConditionArchitecture",
         [CONDITION_NEEDS_UPDATE] = "ConditionNeedsUpdate",
+        [CONDITION_FIRST_BOOT] = "ConditionFirstBoot",
         [CONDITION_NULL] = "ConditionNull"
 };
 
index 0b09f83f90969dc2fc731f5e38be7cf76b67359d..047fdbfd86c4b080ade435b1b8756549ca6faeaf 100644 (file)
@@ -45,6 +45,7 @@ typedef enum ConditionType {
         CONDITION_AC_POWER,
         CONDITION_ARCHITECTURE,
         CONDITION_NEEDS_UPDATE,
+        CONDITION_FIRST_BOOT,
         CONDITION_NULL,
         _CONDITION_TYPE_MAX,
         _CONDITION_TYPE_INVALID = -1
index c72a099b5a1bb5b6805e2f11f651bab3ab1786e5..e6ee97a978472662236732c99f48583ae03e817b 100644 (file)
@@ -109,7 +109,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const
         if (!path_strv_resolve_uniq(dirs, root))
                 return -ENOMEM;
 
-        fh = hashmap_new(string_hash_func, string_compare_func);
+        fh = hashmap_new(&string_hash_ops);
         if (!fh)
                 return -ENOMEM;
 
index 158e9efd4cecb260bb15426379fa468e9c8dfe7b..ee6de653e13286220202f067485e2e70cdbeea1c 100644 (file)
@@ -76,7 +76,7 @@ int log_syntax_internal(const char *unit, int level,
 }
 
 int config_item_table_lookup(
-                void *table,
+                const void *table,
                 const char *section,
                 const char *lvalue,
                 ConfigParserCallback *func,
@@ -84,7 +84,7 @@ int config_item_table_lookup(
                 void **data,
                 void *userdata) {
 
-        ConfigTableItem *t;
+        const ConfigTableItem *t;
 
         assert(table);
         assert(lvalue);
@@ -110,7 +110,7 @@ int config_item_table_lookup(
 }
 
 int config_item_perf_lookup(
-                void *table,
+                const void *table,
                 const char *section,
                 const char *lvalue,
                 ConfigParserCallback *func,
@@ -154,7 +154,7 @@ static int next_assignment(const char *unit,
                            const char *filename,
                            unsigned line,
                            ConfigItemLookup lookup,
-                           void *table,
+                           const void *table,
                            const char *section,
                            unsigned section_line,
                            const char *lvalue,
@@ -199,7 +199,7 @@ static int parse_line(const char* unit,
                       unsigned line,
                       const char *sections,
                       ConfigItemLookup lookup,
-                      void *table,
+                      const void *table,
                       bool relaxed,
                       bool allow_include,
                       char **section,
@@ -245,7 +245,7 @@ static int parse_line(const char* unit,
                 if (!fn)
                         return -ENOMEM;
 
-                return config_parse(unit, fn, NULL, sections, lookup, table, relaxed, false, userdata);
+                return config_parse(unit, fn, NULL, sections, lookup, table, relaxed, false, false, userdata);
         }
 
         if (*l == '[') {
@@ -323,9 +323,10 @@ int config_parse(const char *unit,
                  FILE *f,
                  const char *sections,
                  ConfigItemLookup lookup,
-                 void *table,
+                 const void *table,
                  bool relaxed,
                  bool allow_include,
+                 bool warn,
                  void *userdata) {
 
         _cleanup_free_ char *section = NULL, *continuation = NULL;
@@ -340,7 +341,11 @@ int config_parse(const char *unit,
         if (!f) {
                 f = ours = fopen(filename, "re");
                 if (!f) {
-                        log_full(errno == ENOENT ? LOG_DEBUG : LOG_ERR, "Failed to open configuration file '%s': %m", filename);
+                        /* Only log on request, except for ENOENT,
+                         * since we return 0 to the caller. */
+                        if (warn || errno == ENOENT)
+                                log_full(errno == ENOENT ? LOG_DEBUG : LOG_ERR,
+                                         "Failed to open configuration file '%s': %m", filename);
                         return errno == ENOENT ? 0 : -errno;
                 }
         }
@@ -363,8 +368,11 @@ int config_parse(const char *unit,
 
                 if (continuation) {
                         c = strappend(continuation, l);
-                        if (!c)
+                        if (!c) {
+                                if (warn)
+                                        log_oom();
                                 return -ENOMEM;
+                        }
 
                         free(continuation);
                         continuation = NULL;
@@ -386,8 +394,11 @@ int config_parse(const char *unit,
                                 continuation = c;
                         else {
                                 continuation = strdup(l);
-                                if (!continuation)
+                                if (!continuation) {
+                                        if (warn)
+                                                log_oom();
                                         return -ENOMEM;
+                                }
                         }
 
                         continue;
@@ -408,8 +419,12 @@ int config_parse(const char *unit,
                                userdata);
                 free(c);
 
-                if (r < 0)
+                if (r < 0) {
+                        if (warn)
+                                log_warning("Failed to parse file '%s': %s",
+                                            filename, strerror(-r));
                         return r;
+                }
         }
 
         return 0;
@@ -660,7 +675,8 @@ int config_parse_strv(const char *unit,
                       void *data,
                       void *userdata) {
 
-        char *** sv = data, *w, *state;
+        char ***sv = data;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -685,15 +701,16 @@ int config_parse_strv(const char *unit,
                 return 0;
         }
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 char *n;
 
-                n = strndup(w, l);
+                n = strndup(word, l);
                 if (!n)
                         return log_oom();
 
                 if (!utf8_is_valid(n)) {
                         log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
+                        free(n);
                         continue;
                 }
 
@@ -701,6 +718,9 @@ int config_parse_strv(const char *unit,
                 if (r < 0)
                         return log_oom();
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
index 9d166de9c75ee521589a086495270b3920d13406..62f2a01e5e6862294a27a5e64c08fc60401d9ef6 100644 (file)
@@ -65,7 +65,7 @@ typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_and_lv
 
 /* Prototype for a generic high-level lookup function */
 typedef int (*ConfigItemLookup)(
-                void *table,
+                const void *table,
                 const char *section,
                 const char *lvalue,
                 ConfigParserCallback *func,
@@ -75,20 +75,21 @@ typedef int (*ConfigItemLookup)(
 
 /* Linear table search implementation of ConfigItemLookup, based on
  * ConfigTableItem arrays */
-int config_item_table_lookup(void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata);
+int config_item_table_lookup(const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata);
 
 /* gperf implementation of ConfigItemLookup, based on gperf
  * ConfigPerfItem tables */
-int config_item_perf_lookup(void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata);
+int config_item_perf_lookup(const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata);
 
 int config_parse(const char *unit,
                  const char *filename,
                  FILE *f,
                  const char *sections,  /* nulstr */
                  ConfigItemLookup lookup,
-                 void *table,
+                 const void *table,
                  bool relaxed,
                  bool allow_include,
+                 bool warn,
                  void *userdata);
 
 /* Generic parsers */
@@ -168,8 +169,9 @@ int log_syntax_internal(const char *unit, int level,
                      void *data,                                               \
                      void *userdata) {                                         \
                                                                                \
-                type **enums = data, *xs, x, *ys;                              \
-                char *w, *state;                                               \
+                type **enums = data, x, *ys;                                   \
+                _cleanup_free_ type *xs = NULL;                                \
+                const char *word, *state;                                      \
                 size_t l, i = 0;                                               \
                                                                                \
                 assert(filename);                                              \
@@ -178,12 +180,16 @@ int log_syntax_internal(const char *unit, int level,
                 assert(data);                                                  \
                                                                                \
                 xs = new0(type, 1);                                            \
+                if(!xs)                                                        \
+                        return -ENOMEM;                                        \
+                                                                               \
                 *xs = invalid;                                                 \
                                                                                \
-                FOREACH_WORD(w, l, rvalue, state) {                            \
+                FOREACH_WORD(word, l, rvalue, state) {                         \
                         _cleanup_free_ char *en = NULL;                        \
+                        type *new_xs;                                          \
                                                                                \
-                        en = strndup(w, l);                                    \
+                        en = strndup(word, l);                                 \
                         if (!en)                                               \
                                 return -ENOMEM;                                \
                                                                                \
@@ -207,13 +213,18 @@ int log_syntax_internal(const char *unit, int level,
                                 continue;                                      \
                                                                                \
                         *(xs + i) = x;                                         \
-                        xs = realloc(xs, (++i + 1) * sizeof(type));            \
-                        if (!xs)                                               \
+                        new_xs = realloc(xs, (++i + 1) * sizeof(type));        \
+                        if (new_xs)                                            \
+                                xs = new_xs;                                   \
+                        else                                                   \
                                 return -ENOMEM;                                \
+                                                                               \
                         *(xs + i) = invalid;                                   \
                 }                                                              \
                                                                                \
                 free(*enums);                                                  \
                 *enums = xs;                                                   \
+                xs = NULL;                                                     \
+                                                                               \
                 return 0;                                                      \
         }
index a52853cfd19850f41221e819994c278e218eb75a..92394e818317e5f9cccd28a49c7f39def47bffab 100644 (file)
 #define UNIX_USER_BUS_FMT "unix:path=%s/bus"
 #define KERNEL_USER_BUS_FMT "kernel:path=/dev/kdbus/"UID_FMT"-user/bus"
 
+#define PLYMOUTH_SOCKET {                                       \
+                .un.sun_family = AF_UNIX,                       \
+                .un.sun_path = "\0/org/freedesktop/plymouthd",  \
+        }
+
 #ifndef TTY_GID
 #define TTY_GID 5
 #endif
index 1a565d54708c2ea475b8f5c9bff184fc72c48594..e8b0810d231ddf879339197b7fa8e42830abb873 100644 (file)
 #include "util.h"
 #include "label.h"
 
-static int symlink_and_label(const char *old_path, const char *new_path) {
-        int r;
-
-        assert(old_path);
-        assert(new_path);
-
-        r = label_context_set(new_path, S_IFLNK);
-        if (r < 0)
-                return r;
-
-        if (symlink(old_path, new_path) < 0)
-                r = -errno;
-
-        label_context_clear();
-
-        return r;
-}
-
 int dev_setup(const char *prefix) {
         const char *j, *k;
 
@@ -75,9 +57,9 @@ int dev_setup(const char *prefix) {
                         if (!link_name)
                                 return -ENOMEM;
 
-                        symlink_and_label(j, link_name);
+                        symlink_label(j, link_name);
                 } else
-                        symlink_and_label(j, k);
+                        symlink_label(j, k);
         }
 
         return 0;
index 98373750996eb073a91f93ae6893a9e8690bbda9..73e9edd29dc91f7a5b8822abe40961afacd9c26c 100644 (file)
@@ -41,7 +41,7 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len) {
         size_t i, j;
 
         if (str == NULL || str_enc == NULL)
-                return -1;
+                return -EINVAL;
 
         for (i = 0, j = 0; str[i] != '\0'; i++) {
                 int seqlen;
@@ -70,5 +70,5 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len) {
         str_enc[j] = '\0';
         return 0;
 err:
-        return -1;
+        return -EINVAL;
 }
index 27a2b2953fb450d8261724ae3e478f628fbed936..9c9742d0e4d580ebc27b50ca9140e1869d5d83fd 100644 (file)
@@ -21,6 +21,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "macro.h"
+
 int drop_in_file(const char *dir, const char *unit, unsigned level,
                  const char *name, char **_p, char **_q);
 
@@ -28,4 +30,4 @@ int write_drop_in(const char *dir, const char *unit, unsigned level,
                   const char *name, const char *data);
 
 int write_drop_in_format(const char *dir, const char *unit, unsigned level,
-                         const char *name, const char *format, ...);
+                         const char *name, const char *format, ...) _printf_(5, 6);
index f18f5c4b16aa4b81057c5e2cbb96f0968f26e1a8..a3195745276f603f8ce80bc21518bfcbbc1f6f5c 100644 (file)
@@ -330,7 +330,7 @@ static int boot_id_hex(const char s[4]) {
                 else if (s[i] >= 'A' && s[i] <= 'F')
                         id |= (s[i] - 'A' + 10) << (3 - i) * 4;
                 else
-                        return -1;
+                        return -EINVAL;
 
         return id;
 }
index b2e45531ab7ec0131e102075bc9b09397dfe0fb1..d90b878d1920e56b7a455443be3cc3448d4d17c5 100644 (file)
@@ -28,6 +28,7 @@
 #include "util.h"
 #include "env-util.h"
 #include "def.h"
+#include "unit.h"
 
 #define VALID_CHARS_ENV_NAME                    \
         DIGITS LETTERS                          \
@@ -78,7 +79,9 @@ bool env_value_is_valid(const char *e) {
         if (!utf8_is_valid(e))
                 return false;
 
-        if (string_has_cc(e))
+        /* bash allows tabs in environment variables, and so should
+         * we */
+        if (string_has_cc(e, "\t"))
                 return false;
 
         /* POSIX says the overall size of the environment block cannot
@@ -412,7 +415,7 @@ char *strv_env_get(char **l, const char *name) {
         return strv_env_get_n(l, name, strlen(name));
 }
 
-char **strv_env_clean_log(char **e, const char *message) {
+char **strv_env_clean_log(char **e, const char *unit_id, const char *message) {
         char **p, **q;
         int k = 0;
 
@@ -422,7 +425,7 @@ char **strv_env_clean_log(char **e, const char *message) {
 
                 if (!env_assignment_is_valid(*p)) {
                         if (message)
-                                log_error("Ignoring invalid environment '%s': %s", *p, message);
+                                log_error_unit(unit_id, "Ignoring invalid environment '%s': %s", *p, message);
                         free(*p);
                         continue;
                 }
@@ -449,5 +452,5 @@ char **strv_env_clean_log(char **e, const char *message) {
 }
 
 char **strv_env_clean(char **e) {
-        return strv_env_clean_log(e, NULL);
+        return strv_env_clean_log(e, NULL, NULL);
 }
index c0b1e382af6e76bf5cb0a9e8a95e5b7277279405..3c6f9d743f270dfa476c43055202e6568c6a1d3c 100644 (file)
@@ -30,7 +30,7 @@ bool env_assignment_is_valid(const char *e);
 
 bool strv_env_is_valid(char **e);
 char **strv_env_clean(char **l);
-char **strv_env_clean_log(char **e, const char *message);
+char **strv_env_clean_log(char **e, const char *unit_id, const char *message);
 
 bool strv_env_name_or_assignment_is_valid(char **l);
 
diff --git a/src/shared/eventfd-util.c b/src/shared/eventfd-util.c
deleted file mode 100644 (file)
index 27b7cf7..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Djalal Harouni
-
-  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/>.
-***/
-
-#include <assert.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/eventfd.h>
-#include <sys/syscall.h>
-
-#include "eventfd-util.h"
-#include "util.h"
-
-
-/*
- * Use this to create processes that need to setup a full context
- * and sync it with their parents using cheap mechanisms.
- *
- * This will create two blocking eventfd(s). A pair for the parent and
- * the other for the child so they can be used as a notify mechanism.
- * Each process will gets its copy of the parent and child eventfds.
- *
- * This is useful in case:
- * 1) If the parent fails or dies, the child must die.
- * 2) Child will install PR_SET_PDEATHSIG as soon as possible.
- * 3) Parent and child need to sync using less resources.
- * 4) If parent is not able to install a SIGCHLD handler:
- *    parent will wait using a blocking eventfd_read() or
- *    eventfd_child_succeeded() call on the child eventfd.
- *
- *    * If the child setup succeeded, child should notify with an
- *      EVENTFD_CHILD_SUCCEEDED, parent will continue.
- *    * If the child setup failed, child should notify with an
- *      EVENTFD_CHILD_FAILED before any _exit(). This avoids blocking
- *      the parent.
- *
- * 5) If parent is able to install a SIGCHLD handler:
- *    An empty signal handler without SA_RESTART will do it, since the
- *    blocking eventfd_read() or eventfd_parent_succeeded() of the
- *    parent will be interrupted by SIGCHLD and the call will fail with
- *    EINTR. This is useful in case the child dies abnormaly and did
- *    not have a chance to notify its parent using EVENTFD_CHILD_FAILED.
- *
- * 6) Call wait*() in the main instead of the signal handler in order
- *    to: 1) reduce side effects and 2) have a better handling for
- *    child termination in order to reduce various race conditions.
- *
- *
- * The return value of clone_with_eventfd() is the same of clone().
- * On success the eventfds[] will contain the two eventfd(s). These
- * file descriptors can be closed later with safe_close(). On failure,
- * a negative value is returned in the caller's context, and errno will
- * be set appropriately.
- *
- * Extra preliminary work:
- * 1) Child can wait before starting its setup by using the
- *    eventfd_recv_start() call on the parent eventfd, in that case the
- *    parent must notify with EVENTFD_START, after doing any preliminary
- *    work.
- *
- * Note: this function depends on systemd internal functions
- * safe_close() and it should be used only by direct binaries, no
- * libraries.
- */
-pid_t clone_with_eventfd(int flags, int eventfds[2]) {
-        pid_t pid;
-
-        assert(eventfds);
-
-        eventfds[0] = eventfd(EVENTFD_INIT, EFD_CLOEXEC);
-        if (eventfds[0] < 0)
-                return -1;
-
-        eventfds[1] = eventfd(EVENTFD_INIT, EFD_CLOEXEC);
-        if (eventfds[1] < 0)
-                goto err_eventfd0;
-
-        pid = syscall(__NR_clone, flags, NULL);
-        if (pid < 0)
-                goto err_eventfd1;
-
-        return pid;
-
-err_eventfd1:
-        eventfds[1] = safe_close(eventfds[1]);
-err_eventfd0:
-        eventfds[0] = safe_close(eventfds[0]);
-        return -1;
-}
-
-int eventfd_send_state(int efd, eventfd_t s) {
-        return eventfd_write(efd, s);
-}
-
-/*
- * Receive an eventfd state on the eventfd file descriptor.
- *
- * If the third argument is set to a value other than zero, then this
- * function will compare the received value with this argument and set
- * the return value.
- *
- * On success return 0. On error, -1 will be returned, and errno will
- * be set appropriately.
- */
-int eventfd_recv_state(int efd, eventfd_t *e, eventfd_t s) {
-        int ret;
-
-        ret = eventfd_read(efd, e);
-        if (ret < 0)
-                return ret;
-        else if (s != 0 && *e != s) {
-                errno = EINVAL;
-                return -1;
-        }
-
-        return 0;
-}
-
-/*
- * Receive the EVENTFD_START state on the eventfd file descriptor.
- *
- * On Success return 0. On error, -1 will be returned, and errno will
- * be set appropriately.
- */
-int eventfd_recv_start(int efd) {
-        eventfd_t e = EVENTFD_INIT;
-        return eventfd_recv_state(efd, &e, EVENTFD_START);
-}
-
-/*
- * Receive the EVENTFD_PARENT_SUCCEEDED state on the eventfd file
- * descriptor.
- *
- * On Success return 0. On error, -1 will be returned, and errno will
- * be set appropriately.
- */
-int eventfd_parent_succeeded(int efd) {
-        eventfd_t e = EVENTFD_INIT;
-        return eventfd_recv_state(efd, &e, EVENTFD_PARENT_SUCCEEDED);
-}
-
-/*
- * Receive the EVENTFD_CHILD_SUCCEEDED state on the eventfd file
- * descriptor.
- *
- * On Success return 0. On error, -1 will be returned, and errno will
- * be set appropriately.
- */
-int eventfd_child_succeeded(int efd) {
-        eventfd_t e = EVENTFD_INIT;
-        return eventfd_recv_state(efd, &e, EVENTFD_CHILD_SUCCEEDED);
-}
diff --git a/src/shared/eventfd-util.h b/src/shared/eventfd-util.h
deleted file mode 100644 (file)
index 0120f04..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#pragma once
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Djalal Harouni
-
-  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/>.
-***/
-
-#include <sys/types.h>
-#include <sys/eventfd.h>
-
-enum {
-        EVENTFD_INIT,
-        EVENTFD_START,
-        EVENTFD_PARENT_SUCCEEDED,
-        EVENTFD_PARENT_FAILED,
-        EVENTFD_CHILD_SUCCEEDED,
-        EVENTFD_CHILD_FAILED,
-};
-
-pid_t clone_with_eventfd(int flags, int eventfds[2]);
-
-int eventfd_send_state(int efd, eventfd_t s);
-int eventfd_recv_state(int efd, eventfd_t *e, eventfd_t s);
-
-int eventfd_recv_start(int efd);
-int eventfd_parent_succeeded(int efd);
-int eventfd_child_succeeded(int efd);
index f3434f7ccc3b5264952eed25b9e43f6a7118a4d7..5c73b4d3c0d1384c27e6edf748d8fa2cf162d357 100644 (file)
@@ -148,6 +148,9 @@ const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) {
 
                 case EXIT_MAKE_STARTER:
                         return "MAKE_STARTER";
+
+                case EXIT_BUS_ENDPOINT:
+                        return "BUS_ENDPOINT";
                 }
         }
 
index 7438508e4d8561c1f38705c2745f4df8385f1213..f719580426bd4d973078ffa3c88c42a62a489ee9 100644 (file)
@@ -39,7 +39,7 @@ typedef enum ExitStatus {
          * use them here under the assumption that they hence are
          * unused by init scripts.
          *
-         * http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html */
+         * http://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html */
 
         EXIT_CHDIR = 200,
         EXIT_NICE,
@@ -77,6 +77,7 @@ typedef enum ExitStatus {
         EXIT_RUNTIME_DIRECTORY,
         EXIT_MAKE_STARTER,
         EXIT_CHOWN,
+        EXIT_BUS_ENDPOINT,
 } ExitStatus;
 
 typedef enum ExitStatusLevel {
index d2ea665016b54b49f48d8496af7fa96911560723..37cbd8526cdedc024bf0734178571f5b4a040c95 100644 (file)
@@ -38,7 +38,7 @@
 #define PTR_TO_FD(p) (PTR_TO_INT(p)-1)
 
 FDSet *fdset_new(void) {
-        return MAKE_FDSET(set_new(trivial_hash_func, trivial_compare_func));
+        return MAKE_FDSET(set_new(NULL));
 }
 
 void fdset_free(FDSet *s) {
index 0711826e85915fc067e96550667a68ac70fdda09..294c9e6badd47b71568a5a173222211cd36fb829 100644 (file)
 
 #include "fileio-label.h"
 #include "label.h"
+#include "util.h"
 
 int write_string_file_atomic_label(const char *fn, const char *line) {
         int r;
 
-        r = label_context_set(fn, S_IFREG);
-        if (r  < 0)
+        r = mac_selinux_create_file_prepare(fn, S_IFREG);
+        if (r < 0)
                 return r;
 
-        write_string_file_atomic(fn, line);
+        r = write_string_file_atomic(fn, line);
 
-        label_context_clear();
+        mac_selinux_create_file_clear();
 
         return r;
 }
@@ -43,13 +44,28 @@ int write_string_file_atomic_label(const char *fn, const char *line) {
 int write_env_file_label(const char *fname, char **l) {
         int r;
 
-        r = label_context_set(fname, S_IFREG);
-        if (r  < 0)
+        r = mac_selinux_create_file_prepare(fname, S_IFREG);
+        if (r < 0)
                 return r;
 
-        write_env_file(fname, l);
+        r = write_env_file(fname, l);
 
-        label_context_clear();
+        mac_selinux_create_file_clear();
+
+        return r;
+}
+
+int fopen_temporary_label(const char *target,
+                          const char *path, FILE **f, char **temp_path) {
+        int r;
+
+        r = mac_selinux_create_file_prepare(target, S_IFREG);
+        if (r < 0)
+                return r;
+
+        r = fopen_temporary(path, f, temp_path);
+
+        mac_selinux_create_file_clear();
 
         return r;
 }
index fce4fe0d73eb12045b17310e95139cb86bae21c4..25fa351be276eb26475cb9f9ce16910f555b9195 100644 (file)
@@ -27,3 +27,5 @@
 
 int write_string_file_atomic_label(const char *fn, const char *line);
 int write_env_file_label(const char *fname, char **l);
+int fopen_temporary_label(const char *target,
+                          const char *path, FILE **f, char **temp_path);
index fb1c1bcf9f8c05ba245bddb30e28d4c83922f5fc..38028b972ed2ed0e34ac10139e2bd0e8125fb599 100644 (file)
@@ -58,6 +58,28 @@ int write_string_file(const char *fn, const char *line) {
         return write_string_stream(f, line);
 }
 
+int write_string_file_no_create(const char *fn, const char *line) {
+        _cleanup_fclose_ FILE *f = NULL;
+        int fd;
+
+        assert(fn);
+        assert(line);
+
+        /* We manually build our own version of fopen(..., "we") that
+         * without O_CREAT */
+        fd = open(fn, O_WRONLY|O_CLOEXEC|O_NOCTTY);
+        if (fd < 0)
+                return -errno;
+
+        f = fdopen(fd, "we");
+        if (!f) {
+                safe_close(fd);
+                return -errno;
+        }
+
+        return write_string_stream(f, line);
+}
+
 int write_string_file_atomic(const char *fn, const char *line) {
         _cleanup_fclose_ FILE *f = NULL;
         _cleanup_free_ char *p = NULL;
@@ -274,8 +296,9 @@ static int parse_env_file_internal(
                 const char *fname,
                 const char *newline,
                 int (*push) (const char *filename, unsigned line,
-                             const char *key, char *value, void *userdata),
-                void *userdata) {
+                             const char *key, char *value, void *userdata, int *n_pushed),
+                void *userdata,
+                int *n_pushed) {
 
         _cleanup_free_ char *contents = NULL, *key = NULL;
         size_t key_alloc = 0, n_key = 0, value_alloc = 0, n_value = 0, last_value_whitespace = (size_t) -1, last_key_whitespace = (size_t) -1;
@@ -364,7 +387,7 @@ static int parse_env_file_internal(
                                 if (last_key_whitespace != (size_t) -1)
                                         key[last_key_whitespace] = 0;
 
-                                r = push(fname, line, key, value, userdata);
+                                r = push(fname, line, key, value, userdata, n_pushed);
                                 if (r < 0)
                                         goto fail;
 
@@ -409,7 +432,7 @@ static int parse_env_file_internal(
                                 if (last_key_whitespace != (size_t) -1)
                                         key[last_key_whitespace] = 0;
 
-                                r = push(fname, line, key, value, userdata);
+                                r = push(fname, line, key, value, userdata, n_pushed);
                                 if (r < 0)
                                         goto fail;
 
@@ -544,7 +567,7 @@ static int parse_env_file_internal(
                 if (last_key_whitespace != (size_t) -1)
                         key[last_key_whitespace] = 0;
 
-                r = push(fname, line, key, value, userdata);
+                r = push(fname, line, key, value, userdata, n_pushed);
                 if (r < 0)
                         goto fail;
         }
@@ -559,7 +582,8 @@ fail:
 static int parse_env_file_push(
                 const char *filename, unsigned line,
                 const char *key, char *value,
-                void *userdata) {
+                void *userdata,
+                int *n_pushed) {
 
         const char *k;
         va_list aq, *ap = userdata;
@@ -591,6 +615,10 @@ static int parse_env_file_push(
                         va_end(aq);
                         free(*v);
                         *v = value;
+
+                        if (n_pushed)
+                                (*n_pushed)++;
+
                         return 1;
                 }
         }
@@ -606,22 +634,23 @@ int parse_env_file(
                 const char *newline, ...) {
 
         va_list ap;
-        int r;
+        int r, n_pushed = 0;
 
         if (!newline)
                 newline = NEWLINE;
 
         va_start(ap, newline);
-        r = parse_env_file_internal(NULL, fname, newline, parse_env_file_push, &ap);
+        r = parse_env_file_internal(NULL, fname, newline, parse_env_file_push, &ap, &n_pushed);
         va_end(ap);
 
-        return r;
+        return r < 0 ? r : n_pushed;
 }
 
 static int load_env_file_push(
                 const char *filename, unsigned line,
                 const char *key, char *value,
-                void *userdata) {
+                void *userdata,
+                int *n_pushed) {
         char ***m = userdata;
         char *p;
         int r;
@@ -648,6 +677,9 @@ static int load_env_file_push(
         if (r < 0)
                 return r;
 
+        if (n_pushed)
+                (*n_pushed)++;
+
         free(value);
         return 0;
 }
@@ -659,7 +691,7 @@ int load_env_file(FILE *f, const char *fname, const char *newline, char ***rl) {
         if (!newline)
                 newline = NEWLINE;
 
-        r = parse_env_file_internal(f, fname, newline, load_env_file_push, &m);
+        r = parse_env_file_internal(f, fname, newline, load_env_file_push, &m, NULL);
         if (r < 0) {
                 strv_free(m);
                 return r;
@@ -672,7 +704,8 @@ int load_env_file(FILE *f, const char *fname, const char *newline, char ***rl) {
 static int load_env_file_push_pairs(
                 const char *filename, unsigned line,
                 const char *key, char *value,
-                void *userdata) {
+                void *userdata,
+                int *n_pushed) {
         char ***m = userdata;
         int r;
 
@@ -704,6 +737,9 @@ static int load_env_file_push_pairs(
                         return r;
         }
 
+        if (n_pushed)
+                (*n_pushed)++;
+
         return 0;
 }
 
@@ -714,7 +750,7 @@ int load_env_file_pairs(FILE *f, const char *fname, const char *newline, char **
         if (!newline)
                 newline = NEWLINE;
 
-        r = parse_env_file_internal(f, fname, newline, load_env_file_push_pairs, &m);
+        r = parse_env_file_internal(f, fname, newline, load_env_file_push_pairs, &m, NULL);
         if (r < 0) {
                 strv_free(m);
                 return r;
@@ -738,11 +774,11 @@ static void write_env_var(FILE *f, const char *v) {
         p++;
         fwrite(v, 1, p-v, f);
 
-        if (string_has_cc(p) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
+        if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE SHELL_NEED_QUOTES)) {
                 fputc('\"', f);
 
                 for (; *p; p++) {
-                        if (strchr("\'\"\\`$", *p))
+                        if (strchr(SHELL_NEED_ESCAPE, *p))
                                 fputc('\\', f);
 
                         fputc(*p, f);
@@ -756,35 +792,31 @@ static void write_env_var(FILE *f, const char *v) {
 }
 
 int write_env_file(const char *fname, char **l) {
-        char **i;
-        _cleanup_free_ char *p = NULL;
         _cleanup_fclose_ FILE *f = NULL;
+        _cleanup_free_ char *p = NULL;
+        char **i;
         int r;
 
+        assert(fname);
+
         r = fopen_temporary(fname, &f, &p);
         if (r < 0)
                 return r;
 
         fchmod_umask(fileno(f), 0644);
 
-        errno = 0;
         STRV_FOREACH(i, l)
                 write_env_var(f, *i);
 
-        fflush(f);
+        r = fflush_and_check(f);
+        if (r >= 0) {
+                if (rename(p, fname) >= 0)
+                        return 0;
 
-        if (ferror(f))
-                r = errno ? -errno : -EIO;
-        else {
-                if (rename(p, fname) < 0)
-                        r = -errno;
-                else
-                        r = 0;
+                r = -errno;
         }
 
-        if (r < 0)
-                unlink(p);
-
+        unlink(p);
         return r;
 }
 
index 5122a9a4de9387084e8e37bde0d61078400a468c..c256915799a927334f5e1d9351bf5327707a23ed 100644 (file)
@@ -27,6 +27,7 @@
 
 int write_string_stream(FILE *f, const char *line);
 int write_string_file(const char *fn, const char *line);
+int write_string_file_no_create(const char *fn, const char *line);
 int write_string_file_atomic(const char *fn, const char *line);
 
 int read_one_line_file(const char *fn, char **line);
index 5d5b6a0a61cc3b5d30caecd07fc6685fa9e97637..414470be1c4a1ecf8029c60bb711ac93ea0a802e 100644 (file)
@@ -125,7 +125,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher
                 char *prefix, *postfix;
 
                 prefix = strndupa(opts, start - opts - (start != opts));
-                postfix = timeout + len + (timeout[len] != '\0');
+                postfix = timeout + len + (start == opts && timeout[len] != '\0');
                 *filtered = strjoin(prefix, *postfix ? postfix : NULL, NULL);
                 if (!*filtered)
                         return log_oom();
@@ -148,7 +148,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher
 
         return write_drop_in_format(dir, unit, 50, "device-timeout",
                                     "# Automatically generated by %s\n\n"
-                                    "[Unit]\nJobTimeoutSec=%u",
+                                    "[Unit]\nJobTimeoutSec=" USEC_FMT,
                                     program_invocation_short_name,
                                     u / USEC_PER_SEC);
 }
index 64090e0e9baaa3a8fc78bd03d33ae5f95304d2e7..ef3444f6eaffccb3ba60be00d2a625b05811ab68 100644 (file)
@@ -19,6 +19,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <endian.h>
+
 #include "sd-id128.h"
 
 /* We only support root disk discovery for x86, x86-64 and ARM for
 #  define GPT_ROOT_NATIVE GPT_ROOT_X86
 #endif
 
-#if defined(__aarch64__) && !defined(WORDS_BIGENDIAN)
+#if defined(__aarch64__) && (__BYTE_ORDER != __BIG_ENDIAN)
 #  define GPT_ROOT_NATIVE GPT_ROOT_ARM_64
 #  define GPT_ROOT_SECONDARY GPT_ROOT_ARM
-#elif defined(__arm__) && !defined(WORDS_BIGENDIAN)
+#elif defined(__arm__) && (__BYTE_ORDER != __BIG_ENDIAN)
 #  define GPT_ROOT_NATIVE GPT_ROOT_ARM
 #endif
 
index 5c3efa8dd3d671c202dc7bab2b024328795736dd..6f5f8204dd3dd0d2c733862edaa0b48662af3595 100644 (file)
@@ -28,6 +28,7 @@
 #include "hashmap.h"
 #include "macro.h"
 #include "siphash24.h"
+#include "mempool.h"
 
 #define INITIAL_N_BUCKETS 31
 
@@ -39,8 +40,7 @@ struct hashmap_entry {
 };
 
 struct Hashmap {
-        hash_func_t hash_func;
-        compare_func_t compare_func;
+        const struct hash_ops *hash_ops;
 
         struct hashmap_entry *iterate_list_head, *iterate_list_tail;
 
@@ -51,82 +51,21 @@ struct Hashmap {
         bool from_pool:1;
 };
 
-struct pool {
-        struct pool *next;
-        unsigned n_tiles;
-        unsigned n_used;
+struct hashmap_tile {
+        Hashmap h;
+        struct hashmap_entry *initial_buckets[INITIAL_N_BUCKETS];
 };
 
-static struct pool *first_hashmap_pool = NULL;
-static void *first_hashmap_tile = NULL;
-
-static struct pool *first_entry_pool = NULL;
-static void *first_entry_tile = NULL;
-
-static void* allocate_tile(struct pool **first_pool, void **first_tile, size_t tile_size, unsigned at_least) {
-        unsigned i;
-
-        /* When a tile is released we add it to the list and simply
-         * place the next pointer at its offset 0. */
-
-        assert(tile_size >= sizeof(void*));
-        assert(at_least > 0);
-
-        if (*first_tile) {
-                void *r;
-
-                r = *first_tile;
-                *first_tile = * (void**) (*first_tile);
-                return r;
-        }
-
-        if (_unlikely_(!*first_pool) || _unlikely_((*first_pool)->n_used >= (*first_pool)->n_tiles)) {
-                unsigned n;
-                size_t size;
-                struct pool *p;
-
-                n = *first_pool ? (*first_pool)->n_tiles : 0;
-                n = MAX(at_least, n * 2);
-                size = PAGE_ALIGN(ALIGN(sizeof(struct pool)) + n*tile_size);
-                n = (size - ALIGN(sizeof(struct pool))) / tile_size;
-
-                p = malloc(size);
-                if (!p)
-                        return NULL;
-
-                p->next = *first_pool;
-                p->n_tiles = n;
-                p->n_used = 0;
-
-                *first_pool = p;
-        }
-
-        i = (*first_pool)->n_used++;
-
-        return ((uint8_t*) (*first_pool)) + ALIGN(sizeof(struct pool)) + i*tile_size;
-}
-
-static void deallocate_tile(void **first_tile, void *p) {
-        * (void**) p = *first_tile;
-        *first_tile = p;
-}
+static DEFINE_MEMPOOL(hashmap_pool, struct hashmap_tile, 8);
+static DEFINE_MEMPOOL(hashmap_entry_pool, struct hashmap_entry, 64);
 
 #ifdef VALGRIND
 
-static void drop_pool(struct pool *p) {
-        while (p) {
-                struct pool *n;
-                n = p->next;
-                free(p);
-                p = n;
-        }
-}
-
-__attribute__((destructor)) static void cleanup_pool(void) {
+__attribute__((destructor)) static void cleanup_pools(void) {
         /* Be nice to valgrind */
 
-        drop_pool(first_hashmap_pool);
-        drop_pool(first_entry_pool);
+        mempool_drop(&hashmap_entry_pool);
+        mempool_drop(&hashmap_pool);
 }
 
 #endif
@@ -141,6 +80,11 @@ int string_compare_func(const void *a, const void *b) {
         return strcmp(a, b);
 }
 
+const struct hash_ops string_hash_ops = {
+        .hash = string_hash_func,
+        .compare = string_compare_func
+};
+
 unsigned long trivial_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
         uint64_t u;
         siphash24((uint8_t*) &u, &p, sizeof(p), hash_key);
@@ -151,6 +95,11 @@ int trivial_compare_func(const void *a, const void *b) {
         return a < b ? -1 : (a > b ? 1 : 0);
 }
 
+const struct hash_ops trivial_hash_ops = {
+        .hash = trivial_hash_func,
+        .compare = trivial_compare_func
+};
+
 unsigned long uint64_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
         uint64_t u;
         siphash24((uint8_t*) &u, p, sizeof(uint64_t), hash_key);
@@ -164,8 +113,33 @@ int uint64_compare_func(const void *_a, const void *_b) {
         return a < b ? -1 : (a > b ? 1 : 0);
 }
 
+const struct hash_ops uint64_hash_ops = {
+        .hash = uint64_hash_func,
+        .compare = uint64_compare_func
+};
+
+#if SIZEOF_DEV_T != 8
+unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
+        uint64_t u;
+        siphash24((uint8_t*) &u, p, sizeof(dev_t), hash_key);
+        return (unsigned long) u;
+}
+
+int devt_compare_func(const void *_a, const void *_b) {
+        dev_t a, b;
+        a = *(const dev_t*) _a;
+        b = *(const dev_t*) _b;
+        return a < b ? -1 : (a > b ? 1 : 0);
+}
+
+const struct hash_ops devt_hash_ops = {
+        .hash = devt_hash_func,
+        .compare = devt_compare_func
+};
+#endif
+
 static unsigned bucket_hash(Hashmap *h, const void *p) {
-        return (unsigned) (h->hash_func(p, h->hash_key) % h->n_buckets);
+        return (unsigned) (h->hash_ops->hash(p, h->hash_key) % h->n_buckets);
 }
 
 static void get_hash_key(uint8_t hash_key[HASH_KEY_SIZE], bool reuse_is_ok) {
@@ -187,36 +161,34 @@ static void get_hash_key(uint8_t hash_key[HASH_KEY_SIZE], bool reuse_is_ok) {
         memcpy(hash_key, current, sizeof(current));
 }
 
-Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) {
+Hashmap *hashmap_new(const struct hash_ops *hash_ops) {
         bool b;
+        struct hashmap_tile *ht;
         Hashmap *h;
-        size_t size;
 
         b = is_main_thread();
 
-        size = ALIGN(sizeof(Hashmap)) + INITIAL_N_BUCKETS * sizeof(struct hashmap_entry*);
-
         if (b) {
-                h = allocate_tile(&first_hashmap_pool, &first_hashmap_tile, size, 8);
-                if (!h)
+                ht = mempool_alloc_tile(&hashmap_pool);
+                if (!ht)
                         return NULL;
 
-                memzero(h, size);
+                memzero(ht, sizeof(struct hashmap_tile));
         } else {
-                h = malloc0(size);
+                ht = malloc0(sizeof(struct hashmap_tile));
 
-                if (!h)
+                if (!ht)
                         return NULL;
         }
 
-        h->hash_func = hash_func ? hash_func : trivial_hash_func;
-        h->compare_func = compare_func ? compare_func : trivial_compare_func;
+        h = &ht->h;
+        h->hash_ops = hash_ops ? hash_ops : &trivial_hash_ops;
 
         h->n_buckets = INITIAL_N_BUCKETS;
         h->n_entries = 0;
         h->iterate_list_head = h->iterate_list_tail = NULL;
 
-        h->buckets = (struct hashmap_entry**) ((uint8_t*) h + ALIGN(sizeof(Hashmap)));
+        h->buckets = ht->initial_buckets;
 
         h->from_pool = b;
 
@@ -225,7 +197,7 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) {
         return h;
 }
 
-int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_func_t compare_func) {
+int hashmap_ensure_allocated(Hashmap **h, const struct hash_ops *hash_ops) {
         Hashmap *q;
 
         assert(h);
@@ -233,7 +205,7 @@ int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_func_t
         if (*h)
                 return 0;
 
-        q = hashmap_new(hash_func, compare_func);
+        q = hashmap_new(hash_ops);
         if (!q)
                 return -ENOMEM;
 
@@ -306,7 +278,7 @@ static void remove_entry(Hashmap *h, struct hashmap_entry *e) {
         unlink_entry(h, e, hash);
 
         if (h->from_pool)
-                deallocate_tile(&first_entry_tile, e);
+                mempool_free_tile(&hashmap_entry_pool, e);
         else
                 free(e);
 }
@@ -324,7 +296,7 @@ void hashmap_free(Hashmap*h) {
                 free(h->buckets);
 
         if (h->from_pool)
-                deallocate_tile(&first_hashmap_tile, h);
+                mempool_free_tile(&hashmap_pool, container_of(h, struct hashmap_tile, h));
         else
                 free(h);
 }
@@ -391,29 +363,37 @@ static struct hashmap_entry *hash_scan(Hashmap *h, unsigned hash, const void *ke
         assert(hash < h->n_buckets);
 
         for (e = h->buckets[hash]; e; e = e->bucket_next)
-                if (h->compare_func(e->key, key) == 0)
+                if (h->hash_ops->compare(e->key, key) == 0)
                         return e;
 
         return NULL;
 }
 
-static bool resize_buckets(Hashmap *h) {
+static int resize_buckets(Hashmap *h, unsigned entries_add) {
         struct hashmap_entry **n, *i;
-        unsigned m;
+        unsigned m, new_n_entries, new_n_buckets;
         uint8_t nkey[HASH_KEY_SIZE];
 
         assert(h);
 
-        if (_likely_(h->n_entries*4 < h->n_buckets*3))
-                return false;
+        new_n_entries = h->n_entries + entries_add;
+
+        /* overflow? */
+        if (_unlikely_(new_n_entries < entries_add || new_n_entries > UINT_MAX / 4))
+                return -ENOMEM;
+
+        new_n_buckets = new_n_entries * 4 / 3;
+
+        if (_likely_(new_n_buckets <= h->n_buckets))
+                return 0;
 
-        /* Increase by four */
-        m = (h->n_entries+1)*4-1;
+        /* Increase by four at least */
+        m = MAX((h->n_entries+1)*4-1, new_n_buckets);
 
         /* If we hit OOM we simply risk packed hashmaps... */
         n = new0(struct hashmap_entry*, m);
         if (!n)
-                return false;
+                return -ENOMEM;
 
         /* Let's use a different randomized hash key for the
          * extension, so that people cannot guess what we are using
@@ -423,7 +403,7 @@ static bool resize_buckets(Hashmap *h) {
         for (i = h->iterate_list_head; i; i = i->iterate_next) {
                 unsigned long old_bucket, new_bucket;
 
-                old_bucket = h->hash_func(i->key, h->hash_key) % h->n_buckets;
+                old_bucket = h->hash_ops->hash(i->key, h->hash_key) % h->n_buckets;
 
                 /* First, drop from old bucket table */
                 if (i->bucket_next)
@@ -435,7 +415,7 @@ static bool resize_buckets(Hashmap *h) {
                         h->buckets[old_bucket] = i->bucket_next;
 
                 /* Then, add to new backet table */
-                new_bucket = h->hash_func(i->key, nkey)  % m;
+                new_bucket = h->hash_ops->hash(i->key, nkey) % m;
 
                 i->bucket_next = n[new_bucket];
                 i->bucket_previous = NULL;
@@ -452,28 +432,19 @@ static bool resize_buckets(Hashmap *h) {
 
         memcpy(h->hash_key, nkey, HASH_KEY_SIZE);
 
-        return true;
+        return 1;
 }
 
-int hashmap_put(Hashmap *h, const void *key, void *value) {
-        struct hashmap_entry *e;
-        unsigned hash;
-
-        assert(h);
+static int __hashmap_put(Hashmap *h, const void *key, void *value, unsigned hash) {
+        /* For when we know no such entry exists yet */
 
-        hash = bucket_hash(h, key);
-        e = hash_scan(h, hash, key);
-        if (e) {
-                if (e->value == value)
-                        return 0;
-                return -EEXIST;
-        }
+        struct hashmap_entry *e;
 
-        if (resize_buckets(h))
+        if (resize_buckets(h, 1) > 0)
                 hash = bucket_hash(h, key);
 
         if (h->from_pool)
-                e = allocate_tile(&first_entry_pool, &first_entry_tile, sizeof(struct hashmap_entry), 64U);
+                e = mempool_alloc_tile(&hashmap_entry_pool);
         else
                 e = new(struct hashmap_entry, 1);
 
@@ -488,6 +459,23 @@ int hashmap_put(Hashmap *h, const void *key, void *value) {
         return 1;
 }
 
+int hashmap_put(Hashmap *h, const void *key, void *value) {
+        struct hashmap_entry *e;
+        unsigned hash;
+
+        assert(h);
+
+        hash = bucket_hash(h, key);
+        e = hash_scan(h, hash, key);
+        if (e) {
+                if (e->value == value)
+                        return 0;
+                return -EEXIST;
+        }
+
+        return __hashmap_put(h, key, value, hash);
+}
+
 int hashmap_replace(Hashmap *h, const void *key, void *value) {
         struct hashmap_entry *e;
         unsigned hash;
@@ -502,7 +490,7 @@ int hashmap_replace(Hashmap *h, const void *key, void *value) {
                 return 0;
         }
 
-        return hashmap_put(h, key, value);
+        return __hashmap_put(h, key, value, hash);
 }
 
 int hashmap_update(Hashmap *h, const void *key, void *value) {
@@ -720,59 +708,6 @@ at_end:
         return NULL;
 }
 
-void *hashmap_iterate_backwards(Hashmap *h, Iterator *i, const void **key) {
-        struct hashmap_entry *e;
-
-        assert(i);
-
-        if (!h)
-                goto at_beginning;
-
-        if (*i == ITERATOR_FIRST)
-                goto at_beginning;
-
-        if (*i == ITERATOR_LAST && !h->iterate_list_tail)
-                goto at_beginning;
-
-        e = *i == ITERATOR_LAST ? h->iterate_list_tail : (struct hashmap_entry*) *i;
-
-        if (e->iterate_previous)
-                *i = (Iterator) e->iterate_previous;
-        else
-                *i = ITERATOR_FIRST;
-
-        if (key)
-                *key = e->key;
-
-        return e->value;
-
-at_beginning:
-        *i = ITERATOR_FIRST;
-
-        if (key)
-                *key = NULL;
-
-        return NULL;
-}
-
-void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i) {
-        unsigned hash;
-        struct hashmap_entry *e;
-
-        if (!h)
-                return NULL;
-
-        hash = bucket_hash(h, key);
-
-        e = hash_scan(h, hash, key);
-        if (!e)
-                return NULL;
-
-        *i = (Iterator) e;
-
-        return e->value;
-}
-
 void* hashmap_first(Hashmap *h) {
 
         if (!h)
@@ -795,17 +730,6 @@ void* hashmap_first_key(Hashmap *h) {
         return (void*) h->iterate_list_head->key;
 }
 
-void* hashmap_last(Hashmap *h) {
-
-        if (!h)
-                return NULL;
-
-        if (!h->iterate_list_tail)
-                return NULL;
-
-        return h->iterate_list_tail->value;
-}
-
 void* hashmap_steal_first(Hashmap *h) {
         void *data;
 
@@ -879,16 +803,28 @@ int hashmap_merge(Hashmap *h, Hashmap *other) {
         return 0;
 }
 
-void hashmap_move(Hashmap *h, Hashmap *other) {
+int hashmap_reserve(Hashmap *h, unsigned entries_add) {
+        int r;
+
+        assert(h);
+
+        r = resize_buckets(h, entries_add);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+int hashmap_move(Hashmap *h, Hashmap *other) {
         struct hashmap_entry *e, *n;
 
         assert(h);
 
         /* The same as hashmap_merge(), but every new item from other
-         * is moved to h. This function is guaranteed to succeed. */
+         * is moved to h. */
 
         if (!other)
-                return;
+                return 0;
 
         for (e = other->iterate_list_head; e; e = n) {
                 unsigned h_hash, other_hash;
@@ -903,21 +839,23 @@ void hashmap_move(Hashmap *h, Hashmap *other) {
                 unlink_entry(other, e, other_hash);
                 link_entry(h, e, h_hash);
         }
+
+        return 0;
 }
 
 int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key) {
         unsigned h_hash, other_hash;
         struct hashmap_entry *e;
 
-        if (!other)
-                return 0;
-
         assert(h);
 
         h_hash = bucket_hash(h, key);
         if (hash_scan(h, h_hash, key))
                 return -EEXIST;
 
+        if (!other)
+                return -ENOENT;
+
         other_hash = bucket_hash(other, key);
         e = hash_scan(other, other_hash, key);
         if (!e)
@@ -934,7 +872,7 @@ Hashmap *hashmap_copy(Hashmap *h) {
 
         assert(h);
 
-        copy = hashmap_new(h->hash_func, h->compare_func);
+        copy = hashmap_new(h->hash_ops);
         if (!copy)
                 return NULL;
 
@@ -968,7 +906,6 @@ void *hashmap_next(Hashmap *h, const void *key) {
         unsigned hash;
         struct hashmap_entry *e;
 
-        assert(h);
         assert(key);
 
         if (!h)
index bfad970078d01328e08e9c6141d37b1212212167..65fb3c0ee984d591c327db56f26b89eeb27046cc 100644 (file)
@@ -34,6 +34,7 @@
 #define HASH_KEY_SIZE 16
 
 typedef struct Hashmap Hashmap;
+typedef struct OrderedHashmap OrderedHashmap;
 typedef struct _IteratorStruct _IteratorStruct;
 typedef _IteratorStruct* Iterator;
 
@@ -43,75 +44,214 @@ typedef _IteratorStruct* Iterator;
 typedef unsigned long (*hash_func_t)(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]);
 typedef int (*compare_func_t)(const void *a, const void *b);
 
+struct hash_ops {
+        hash_func_t hash;
+        compare_func_t compare;
+};
+
 unsigned long string_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) _pure_;
 int string_compare_func(const void *a, const void *b) _pure_;
+extern const struct hash_ops string_hash_ops;
 
 /* This will compare the passed pointers directly, and will not
  * dereference them. This is hence not useful for strings or
  * suchlike. */
 unsigned long trivial_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) _pure_;
 int trivial_compare_func(const void *a, const void *b) _const_;
+extern const struct hash_ops trivial_hash_ops;
 
+/* 32bit values we can always just embedd in the pointer itself, but
+ * in order to support 32bit archs we need store 64bit values
+ * indirectly, since they don't fit in a pointer. */
 unsigned long uint64_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) _pure_;
 int uint64_compare_func(const void *a, const void *b) _pure_;
+extern const struct hash_ops uint64_hash_ops;
+
+/* On some archs dev_t is 32bit, and on others 64bit. And sometimes
+ * it's 64bit on 32bit archs, and sometimes 32bit on 64bit archs. Yuck! */
+#if SIZEOF_DEV_T != 8
+unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) _pure_;
+int devt_compare_func(const void *a, const void *b) _pure_;
+extern const struct hash_ops devt_hash_ops = {
+        .hash = devt_hash_func,
+        .compare = devt_compare_func
+};
+#else
+#define devt_hash_func uint64_hash_func
+#define devt_compare_func uint64_compare_func
+#define devt_hash_ops uint64_hash_ops
+#endif
 
-Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func);
+Hashmap *hashmap_new(const struct hash_ops *hash_ops);
+static inline OrderedHashmap *ordered_hashmap_new(const struct hash_ops *hash_ops) {
+        return (OrderedHashmap*) hashmap_new(hash_ops);
+}
 void hashmap_free(Hashmap *h);
+static inline void ordered_hashmap_free(OrderedHashmap *h) {
+        hashmap_free((Hashmap*) h);
+}
 void hashmap_free_free(Hashmap *h);
+static inline void ordered_hashmap_free_free(OrderedHashmap *h) {
+        hashmap_free_free((Hashmap*) h);
+}
 void hashmap_free_free_free(Hashmap *h);
+static inline void ordered_hashmap_free_free_free(OrderedHashmap *h) {
+        hashmap_free_free_free((Hashmap*) h);
+}
 Hashmap *hashmap_copy(Hashmap *h);
-int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_func_t compare_func);
+static inline OrderedHashmap *ordered_hashmap_copy(OrderedHashmap *h) {
+        return (OrderedHashmap*) hashmap_copy((Hashmap*) h);
+}
+int hashmap_ensure_allocated(Hashmap **h, const struct hash_ops *hash_ops);
+static inline int ordered_hashmap_ensure_allocated(OrderedHashmap **h, const struct hash_ops *hash_ops) {
+        return hashmap_ensure_allocated((Hashmap**) h, hash_ops);
+}
 
 int hashmap_put(Hashmap *h, const void *key, void *value);
+static inline int ordered_hashmap_put(OrderedHashmap *h, const void *key, void *value) {
+        return hashmap_put((Hashmap*) h, key, value);
+}
 int hashmap_update(Hashmap *h, const void *key, void *value);
+static inline int ordered_hashmap_update(OrderedHashmap *h, const void *key, void *value) {
+        return hashmap_update((Hashmap*) h, key, value);
+}
 int hashmap_replace(Hashmap *h, const void *key, void *value);
+static inline int ordered_hashmap_replace(OrderedHashmap *h, const void *key, void *value) {
+        return hashmap_replace((Hashmap*) h, key, value);
+}
 void *hashmap_get(Hashmap *h, const void *key);
+static inline void *ordered_hashmap_get(OrderedHashmap *h, const void *key) {
+        return hashmap_get((Hashmap*) h, key);
+}
 void *hashmap_get2(Hashmap *h, const void *key, void **rkey);
+static inline void *ordered_hashmap_get2(OrderedHashmap *h, const void *key, void **rkey) {
+        return hashmap_get2((Hashmap*) h, key, rkey);
+}
 bool hashmap_contains(Hashmap *h, const void *key);
+static inline bool ordered_hashmap_contains(OrderedHashmap *h, const void *key) {
+        return hashmap_contains((Hashmap*) h, key);
+}
 void *hashmap_remove(Hashmap *h, const void *key);
+static inline void *ordered_hashmap_remove(OrderedHashmap *h, const void *key) {
+        return hashmap_remove((Hashmap*) h, key);
+}
 void *hashmap_remove2(Hashmap *h, const void *key, void **rkey);
+static inline void *ordered_hashmap_remove2(OrderedHashmap *h, const void *key, void **rkey) {
+        return hashmap_remove2((Hashmap*) h, key, rkey);
+}
 void *hashmap_remove_value(Hashmap *h, const void *key, void *value);
+static inline void *ordered_hashmap_remove_value(OrderedHashmap *h, const void *key, void *value) {
+        return hashmap_remove_value((Hashmap*) h, key, value);
+}
 int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, void *value);
+static inline int ordered_hashmap_remove_and_put(OrderedHashmap *h, const void *old_key, const void *new_key, void *value) {
+        return hashmap_remove_and_put((Hashmap*) h, old_key, new_key, value);
+}
 int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_key, void *value);
+static inline int ordered_hashmap_remove_and_replace(OrderedHashmap *h, const void *old_key, const void *new_key, void *value) {
+        return hashmap_remove_and_replace((Hashmap*) h, old_key, new_key, value);
+}
 
 int hashmap_merge(Hashmap *h, Hashmap *other);
-void hashmap_move(Hashmap *h, Hashmap *other);
+static inline int ordered_hashmap_merge(OrderedHashmap *h, OrderedHashmap *other) {
+        return hashmap_merge((Hashmap*) h, (Hashmap*) other);
+}
+int hashmap_reserve(Hashmap *h, unsigned entries_add);
+static inline int ordered_hashmap_reserve(OrderedHashmap *h, unsigned entries_add) {
+        return hashmap_reserve((Hashmap*) h, entries_add);
+}
+int hashmap_move(Hashmap *h, Hashmap *other);
+static inline int ordered_hashmap_move(OrderedHashmap *h, OrderedHashmap *other) {
+        return hashmap_move((Hashmap*) h, (Hashmap*) other);
+}
 int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key);
+static inline int ordered_hashmap_move_one(OrderedHashmap *h, OrderedHashmap *other, const void *key) {
+        return hashmap_move_one((Hashmap*) h, (Hashmap*) other, key);
+}
 
 unsigned hashmap_size(Hashmap *h) _pure_;
+static inline unsigned ordered_hashmap_size(OrderedHashmap *h) {
+        return hashmap_size((Hashmap*) h);
+}
 bool hashmap_isempty(Hashmap *h) _pure_;
+static inline bool ordered_hashmap_isempty(OrderedHashmap *h) {
+        return hashmap_isempty((Hashmap*) h);
+}
 unsigned hashmap_buckets(Hashmap *h) _pure_;
+static inline unsigned ordered_hashmap_buckets(OrderedHashmap *h) {
+        return hashmap_buckets((Hashmap*) h);
+}
 
 void *hashmap_iterate(Hashmap *h, Iterator *i, const void **key);
-void *hashmap_iterate_backwards(Hashmap *h, Iterator *i, const void **key);
-void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i);
+static inline void *ordered_hashmap_iterate(OrderedHashmap *h, Iterator *i, const void **key) {
+        return hashmap_iterate((Hashmap*) h, i, key);
+}
 
 void hashmap_clear(Hashmap *h);
+static inline void ordered_hashmap_clear(OrderedHashmap *h) {
+        hashmap_clear((Hashmap*) h);
+}
 void hashmap_clear_free(Hashmap *h);
+static inline void ordered_hashmap_clear_free(OrderedHashmap *h) {
+        hashmap_clear_free((Hashmap*) h);
+}
 void hashmap_clear_free_free(Hashmap *h);
+static inline void ordered_hashmap_clear_free_free(OrderedHashmap *h) {
+        hashmap_clear_free_free((Hashmap*) h);
+}
 
 void *hashmap_steal_first(Hashmap *h);
+static inline void *ordered_hashmap_steal_first(OrderedHashmap *h) {
+        return hashmap_steal_first((Hashmap*) h);
+}
 void *hashmap_steal_first_key(Hashmap *h);
+static inline void *ordered_hashmap_steal_first_key(OrderedHashmap *h) {
+        return hashmap_steal_first_key((Hashmap*) h);
+}
 void *hashmap_first(Hashmap *h) _pure_;
+static inline void *ordered_hashmap_first(OrderedHashmap *h) {
+        return hashmap_first((Hashmap*) h);
+}
 void *hashmap_first_key(Hashmap *h) _pure_;
-void *hashmap_last(Hashmap *h) _pure_;
+static inline void *ordered_hashmap_first_key(OrderedHashmap *h) {
+        return hashmap_first_key((Hashmap*) h);
+}
 
 void *hashmap_next(Hashmap *h, const void *key);
+static inline void *ordered_hashmap_next(OrderedHashmap *h, const void *key) {
+        return hashmap_next((Hashmap*) h, key);
+}
 
 char **hashmap_get_strv(Hashmap *h);
+static inline char **ordered_hashmap_get_strv(OrderedHashmap *h) {
+        return hashmap_get_strv((Hashmap*) h);
+}
 
 #define HASHMAP_FOREACH(e, h, i) \
         for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (e); (e) = hashmap_iterate((h), &(i), NULL))
 
+#define ORDERED_HASHMAP_FOREACH(e, h, i) \
+        for ((i) = ITERATOR_FIRST, (e) = ordered_hashmap_iterate((h), &(i), NULL); \
+             (e); \
+             (e) = ordered_hashmap_iterate((h), &(i), NULL))
+
 #define HASHMAP_FOREACH_KEY(e, k, h, i) \
         for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (e); (e) = hashmap_iterate((h), &(i), (const void**) &(k)))
 
-#define HASHMAP_FOREACH_BACKWARDS(e, h, i) \
-        for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (e); (e) = hashmap_iterate_backwards((h), &(i), NULL))
+#define ORDERED_HASHMAP_FOREACH_KEY(e, k, h, i) \
+        for ((i) = ITERATOR_FIRST, (e) = ordered_hashmap_iterate((h), &(i), (const void**) &(k)); \
+             (e); \
+             (e) = ordered_hashmap_iterate((h), &(i), (const void**) &(k)))
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free);
 DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free);
 DEFINE_TRIVIAL_CLEANUP_FUNC(Hashmap*, hashmap_free_free_free);
+DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedHashmap*, ordered_hashmap_free);
+DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedHashmap*, ordered_hashmap_free_free);
+DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedHashmap*, ordered_hashmap_free_free_free);
 #define _cleanup_hashmap_free_ _cleanup_(hashmap_freep)
 #define _cleanup_hashmap_free_free_ _cleanup_(hashmap_free_freep)
 #define _cleanup_hashmap_free_free_free_ _cleanup_(hashmap_free_free_freep)
+#define _cleanup_ordered_hashmap_free_ _cleanup_(ordered_hashmap_freep)
+#define _cleanup_ordered_hashmap_free_free_ _cleanup_(ordered_hashmap_free_freep)
+#define _cleanup_ordered_hashmap_free_free_free_ _cleanup_(ordered_hashmap_free_free_freep)
diff --git a/src/shared/in-addr-util.c b/src/shared/in-addr-util.c
new file mode 100644 (file)
index 0000000..5fbee6c
--- /dev/null
@@ -0,0 +1,293 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <arpa/inet.h>
+
+#include "in-addr-util.h"
+
+int in_addr_is_null(int family, const union in_addr_union *u) {
+        assert(u);
+
+        if (family == AF_INET)
+                return u->in.s_addr == 0;
+
+        if (family == AF_INET6)
+                return
+                        u->in6.s6_addr32[0] == 0 &&
+                        u->in6.s6_addr32[1] == 0 &&
+                        u->in6.s6_addr32[2] == 0 &&
+                        u->in6.s6_addr32[3] == 0;
+
+        return -EAFNOSUPPORT;
+}
+
+int in_addr_is_link_local(int family, const union in_addr_union *u) {
+        assert(u);
+
+        if (family == AF_INET)
+                return (be32toh(u->in.s_addr) & 0xFFFF0000) == (169U << 24 | 254U << 16);
+
+        if (family == AF_INET6)
+                return IN6_IS_ADDR_LINKLOCAL(&u->in6);
+
+        return -EAFNOSUPPORT;
+}
+
+int in_addr_equal(int family, const union in_addr_union *a, const union in_addr_union *b) {
+        assert(a);
+        assert(b);
+
+        if (family == AF_INET)
+                return a->in.s_addr == b->in.s_addr;
+
+        if (family == AF_INET6)
+                return
+                        a->in6.s6_addr32[0] == b->in6.s6_addr32[0] &&
+                        a->in6.s6_addr32[1] == b->in6.s6_addr32[1] &&
+                        a->in6.s6_addr32[2] == b->in6.s6_addr32[2] &&
+                        a->in6.s6_addr32[3] == b->in6.s6_addr32[3];
+
+        return -EAFNOSUPPORT;
+}
+
+int in_addr_prefix_intersect(
+                int family,
+                const union in_addr_union *a,
+                unsigned aprefixlen,
+                const union in_addr_union *b,
+                unsigned bprefixlen) {
+
+        unsigned m;
+
+        assert(a);
+        assert(b);
+
+        /* Checks whether there are any addresses that are in both
+         * networks */
+
+        m = MIN(aprefixlen, bprefixlen);
+
+        if (family == AF_INET) {
+                uint32_t x, nm;
+
+                x = be32toh(a->in.s_addr ^ b->in.s_addr);
+                nm = (m == 0) ? 0 : 0xFFFFFFFFUL << (32 - m);
+
+                return (x & nm) == 0;
+        }
+
+        if (family == AF_INET6) {
+                unsigned i;
+
+                if (m > 128)
+                        m = 128;
+
+                for (i = 0; i < 16; i++) {
+                        uint8_t x, nm;
+
+                        x = a->in6.s6_addr[i] ^ b->in6.s6_addr[i];
+
+                        if (m < 8)
+                                nm = 0xFF << (8 - m);
+                        else
+                                nm = 0xFF;
+
+                        if ((x & nm) != 0)
+                                return 0;
+
+                        if (m > 8)
+                                m -= 8;
+                        else
+                                m = 0;
+                }
+
+                return 1;
+        }
+
+        return -EAFNOSUPPORT;
+}
+
+int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefixlen) {
+        assert(u);
+
+        /* Increases the network part of an address by one. Returns
+         * positive it that succeeds, or 0 if this overflows. */
+
+        if (prefixlen <= 0)
+                return 0;
+
+        if (family == AF_INET) {
+                uint32_t c, n;
+
+                if (prefixlen > 32)
+                        prefixlen = 32;
+
+                c = be32toh(u->in.s_addr);
+                n = c + (1UL << (32 - prefixlen));
+                if (n < c)
+                        return 0;
+                n &= 0xFFFFFFFFUL << (32 - prefixlen);
+
+                u->in.s_addr = htobe32(n);
+                return 1;
+        }
+
+        if (family == AF_INET6) {
+                struct in6_addr add = {}, result;
+                uint8_t overflow = 0;
+                unsigned i;
+
+                if (prefixlen > 128)
+                        prefixlen = 128;
+
+                /* First calculate what we have to add */
+                add.s6_addr[(prefixlen-1) / 8] = 1 << (7 - (prefixlen-1) % 8);
+
+                for (i = 16; i > 0; i--) {
+                        unsigned j = i - 1;
+
+                        result.s6_addr[j] = u->in6.s6_addr[j] + add.s6_addr[j] + overflow;
+                        overflow = (result.s6_addr[j] < u->in6.s6_addr[j]);
+                }
+
+                if (overflow)
+                        return 0;
+
+                u->in6 = result;
+                return 1;
+        }
+
+        return -EAFNOSUPPORT;
+}
+
+int in_addr_to_string(int family, const union in_addr_union *u, char **ret) {
+        char *x;
+        size_t l;
+
+        assert(u);
+        assert(ret);
+
+        if (family == AF_INET)
+                l = INET_ADDRSTRLEN;
+        else if (family == AF_INET6)
+                l = INET6_ADDRSTRLEN;
+        else
+                return -EAFNOSUPPORT;
+
+        x = new(char, l);
+        if (!x)
+                return -ENOMEM;
+
+        errno = 0;
+        if (!inet_ntop(family, u, x, l)) {
+                free(x);
+                return errno ? -errno : -EINVAL;
+        }
+
+        *ret = x;
+        return 0;
+}
+
+int in_addr_from_string(int family, const char *s, union in_addr_union *ret) {
+
+        assert(s);
+        assert(ret);
+
+        if (!IN_SET(family, AF_INET, AF_INET6))
+                return -EAFNOSUPPORT;
+
+        errno = 0;
+        if (inet_pton(family, s, ret) <= 0)
+                return errno ? -errno : -EINVAL;
+
+        return 0;
+}
+
+int in_addr_from_string_auto(const char *s, int *family, union in_addr_union *ret) {
+        int r;
+
+        assert(s);
+        assert(family);
+        assert(ret);
+
+        r = in_addr_from_string(AF_INET, s, ret);
+        if (r >= 0) {
+                *family = AF_INET;
+                return 0;
+        }
+
+        r = in_addr_from_string(AF_INET6, s, ret);
+        if (r >= 0) {
+                *family = AF_INET6;
+                return 0;
+        }
+
+        return -EINVAL;
+}
+
+unsigned in_addr_netmask_to_prefixlen(const struct in_addr *addr) {
+        assert(addr);
+
+        return 32 - u32ctz(be32toh(addr->s_addr));
+}
+
+int in_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen) {
+        uint32_t address;
+
+        assert(addr);
+        assert(addr->s_addr != INADDR_ANY);
+        assert(prefixlen);
+
+        address = be32toh(addr->s_addr);
+
+        if ((address >> 31) == 0x0)
+                /* class A, leading bits: 0 */
+                *prefixlen = 8;
+        else if ((address >> 30) == 0x2)
+                /* class B, leading bits 10 */
+                *prefixlen = 16;
+        else if ((address >> 29) == 0x6)
+                /* class C, leading bits 110 */
+                *prefixlen = 24;
+        else
+                /* class D or E, no default prefixlen */
+                return -ERANGE;
+
+        return 0;
+}
+
+int in_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask) {
+        unsigned char prefixlen;
+        int r;
+
+        assert(addr);
+        assert(mask);
+
+        r = in_addr_default_prefixlen(addr, &prefixlen);
+        if (r < 0)
+                return r;
+
+        assert(prefixlen > 0 && prefixlen < 32);
+
+        mask->s_addr = htobe32((0xffffffff << (32 - prefixlen)) & 0xffffffff);
+
+        return 0;
+}
diff --git a/src/shared/in-addr-util.h b/src/shared/in-addr-util.h
new file mode 100644 (file)
index 0000000..8da030c
--- /dev/null
@@ -0,0 +1,49 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <netinet/in.h>
+
+#include "macro.h"
+#include "util.h"
+
+union in_addr_union {
+        struct in_addr in;
+        struct in6_addr in6;
+};
+
+int in_addr_is_null(int family, const union in_addr_union *u);
+int in_addr_is_link_local(int family, const union in_addr_union *u);
+int in_addr_equal(int family, const union in_addr_union *a, const union in_addr_union *b);
+int in_addr_prefix_intersect(int family, const union in_addr_union *a, unsigned aprefixlen, const union in_addr_union *b, unsigned bprefixlen);
+int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefixlen);
+int in_addr_to_string(int family, const union in_addr_union *u, char **ret);
+int in_addr_from_string(int family, const char *s, union in_addr_union *ret);
+int in_addr_from_string_auto(const char *s, int *family, union in_addr_union *ret);
+unsigned in_addr_netmask_to_prefixlen(const struct in_addr *addr);
+int in_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen);
+int in_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask);
+
+static inline size_t FAMILY_ADDRESS_SIZE(int family) {
+        assert(family == AF_INET || family == AF_INET6);
+        return family == AF_INET6 ? 16 : 4;
+}
index 190c554347ac200f3d9462e82d94552e002fb5e5..035b44cc520fe6aa118caa142c8333e17f5bfb03 100644 (file)
 #include "special.h"
 
 typedef struct {
-        Hashmap *will_install;
-        Hashmap *have_installed;
+        OrderedHashmap *will_install;
+        OrderedHashmap *have_installed;
 } InstallContext;
 
-#define _cleanup_install_context_done_ _cleanup_(install_context_done)
-
 static int in_search_path(const char *path, char **search) {
         _cleanup_free_ char *parent = NULL;
         int r;
@@ -88,15 +86,10 @@ static int get_config_path(UnitFileScope scope, bool runtime, const char *root_d
 
         case UNIT_FILE_SYSTEM:
 
-                if (root_dir && runtime)
-                        asprintf(&p, "%s/run/systemd/system", root_dir);
-                else if (runtime)
-                        p = strdup("/run/systemd/system");
-                else if (root_dir)
-                        asprintf(&p, "%s/%s", root_dir, SYSTEM_CONFIG_UNIT_PATH);
+                if (runtime)
+                        p = path_join(root_dir, "/run/systemd/system", NULL);
                 else
-                        p = strdup(SYSTEM_CONFIG_UNIT_PATH);
-
+                        p = path_join(root_dir, SYSTEM_CONFIG_UNIT_PATH, NULL);
                 break;
 
         case UNIT_FILE_GLOBAL:
@@ -112,10 +105,14 @@ static int get_config_path(UnitFileScope scope, bool runtime, const char *root_d
 
         case UNIT_FILE_USER:
 
-                if (root_dir || runtime)
+                if (root_dir)
                         return -EINVAL;
 
-                r = user_config_home(&p);
+                if (runtime)
+                        r = user_runtime_dir(&p);
+                else
+                        r = user_config_home(&p);
+
                 if (r <= 0)
                         return r < 0 ? r : -ENOENT;
 
@@ -186,7 +183,7 @@ static int mark_symlink_for_removal(
 
         assert(p);
 
-        r = set_ensure_allocated(remove_symlinks_to, string_hash_func, string_compare_func);
+        r = set_ensure_allocated(remove_symlinks_to, &string_hash_ops);
         if (r < 0)
                 return r;
 
@@ -534,36 +531,33 @@ static int find_symlinks_in_scope(
                 UnitFileState *state) {
 
         int r;
-        _cleanup_free_ char *path2 = NULL;
+        _cleanup_free_ char *path = NULL;
         bool same_name_link_runtime = false, same_name_link = false;
 
         assert(scope >= 0);
         assert(scope < _UNIT_FILE_SCOPE_MAX);
         assert(name);
 
-        if (scope == UNIT_FILE_SYSTEM || scope == UNIT_FILE_GLOBAL) {
-                _cleanup_free_ char *path = NULL;
 
-                /* First look in runtime config path */
-                r = get_config_path(scope, true, root_dir, &path);
-                if (r < 0)
-                        return r;
+        /* First look in runtime config path */
+        r = get_config_path(scope, true, root_dir, &path);
+        if (r < 0)
+                return r;
 
-                r = find_symlinks(name, path, &same_name_link_runtime);
-                if (r < 0)
-                        return r;
-                else if (r > 0) {
-                        *state = UNIT_FILE_ENABLED_RUNTIME;
-                        return r;
-                }
+        r = find_symlinks(name, path, &same_name_link_runtime);
+        if (r < 0)
+                return r;
+        else if (r > 0) {
+                *state = UNIT_FILE_ENABLED_RUNTIME;
+                return r;
         }
 
         /* Then look in the normal config path */
-        r = get_config_path(scope, false, root_dir, &path2);
+        r = get_config_path(scope, false, root_dir, &path);
         if (r < 0)
                 return r;
 
-        r = find_symlinks(name, path2, &same_name_link);
+        r = find_symlinks(name, path, &same_name_link);
         if (r < 0)
                 return r;
         else if (r > 0) {
@@ -850,16 +844,16 @@ static void install_info_free(InstallInfo *i) {
         free(i);
 }
 
-static void install_info_hashmap_free(Hashmap *m) {
+static void install_info_hashmap_free(OrderedHashmap *m) {
         InstallInfo *i;
 
         if (!m)
                 return;
 
-        while ((i = hashmap_steal_first(m)))
+        while ((i = ordered_hashmap_steal_first(m)))
                 install_info_free(i);
 
-        hashmap_free(m);
+        ordered_hashmap_free(m);
 }
 
 static void install_context_done(InstallContext *c) {
@@ -887,11 +881,11 @@ static int install_info_add(
         if (!unit_name_is_valid(name, TEMPLATE_VALID))
                 return -EINVAL;
 
-        if (hashmap_get(c->have_installed, name) ||
-            hashmap_get(c->will_install, name))
+        if (ordered_hashmap_get(c->have_installed, name) ||
+            ordered_hashmap_get(c->will_install, name))
                 return 0;
 
-        r = hashmap_ensure_allocated(&c->will_install, string_hash_func, string_compare_func);
+        r = ordered_hashmap_ensure_allocated(&c->will_install, &string_hash_ops);
         if (r < 0)
                 return r;
 
@@ -913,7 +907,7 @@ static int install_info_add(
                 }
         }
 
-        r = hashmap_put(c->will_install, i->name, i);
+        r = ordered_hashmap_put(c->will_install, i->name, i);
         if (r < 0)
                 goto fail;
 
@@ -951,20 +945,19 @@ static int config_parse_also(
                 void *data,
                 void *userdata) {
 
-        char *w;
         size_t l;
-        char *state;
+        const char *word, *state;
         InstallContext *c = data;
 
         assert(filename);
         assert(lvalue);
         assert(rvalue);
 
-        FOREACH_WORD_QUOTED(w, l, rvalue, state) {
+        FOREACH_WORD_QUOTED(word, l, rvalue, state) {
                 _cleanup_free_ char *n;
                 int r;
 
-                n = strndup(w, l);
+                n = strndup(word, l);
                 if (!n)
                         return -ENOMEM;
 
@@ -972,6 +965,9 @@ static int config_parse_also(
                 if (r < 0)
                         return r;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -1030,8 +1026,10 @@ static int config_parse_default_instance(
         if (r < 0)
                 return r;
 
-        if (!unit_instance_is_valid(printed))
+        if (!unit_instance_is_valid(printed)) {
+                free(printed);
                 return -EINVAL;
+        }
 
         free(i->default_instance);
         i->default_instance = printed;
@@ -1044,7 +1042,8 @@ static int unit_file_load(
                 InstallInfo *info,
                 const char *path,
                 const char *root_dir,
-                bool allow_symlink) {
+                bool allow_symlink,
+                bool load) {
 
         const ConfigTableItem items[] = {
                 { "Install", "Alias",           config_parse_strv,             0, &info->aliases           },
@@ -1064,7 +1063,12 @@ static int unit_file_load(
         assert(path);
 
         if (!isempty(root_dir))
-                path = strappenda3(root_dir, "/", path);
+                path = strappenda(root_dir, "/", path);
+
+        if (!load) {
+                r = access(path, F_OK) ? -errno : 0;
+                return r;
+        }
 
         fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY|(allow_symlink ? 0 : O_NOFOLLOW));
         if (fd < 0)
@@ -1076,7 +1080,10 @@ static int unit_file_load(
                 return -ENOMEM;
         }
 
-        r = config_parse(NULL, path, f, NULL, config_item_table_lookup, (void*) items, true, true, info);
+        r = config_parse(NULL, path, f,
+                         NULL,
+                         config_item_table_lookup, items,
+                         true, true, false, info);
         if (r < 0)
                 return r;
 
@@ -1091,7 +1098,8 @@ static int unit_file_search(
                 InstallInfo *info,
                 LookupPaths *paths,
                 const char *root_dir,
-                bool allow_symlink) {
+                bool allow_symlink,
+                bool load) {
 
         char **p;
         int r;
@@ -1101,7 +1109,7 @@ static int unit_file_search(
         assert(paths);
 
         if (info->path)
-                return unit_file_load(c, info, info->path, root_dir, allow_symlink);
+                return unit_file_load(c, info, info->path, root_dir, allow_symlink, load);
 
         assert(info->name);
 
@@ -1112,7 +1120,7 @@ static int unit_file_search(
                 if (!path)
                         return -ENOMEM;
 
-                r = unit_file_load(c, info, path, root_dir, allow_symlink);
+                r = unit_file_load(c, info, path, root_dir, allow_symlink, load);
                 if (r >= 0) {
                         info->path = path;
                         path = NULL;
@@ -1141,7 +1149,7 @@ static int unit_file_search(
                         if (!path)
                                 return -ENOMEM;
 
-                        r = unit_file_load(c, info, path, root_dir, allow_symlink);
+                        r = unit_file_load(c, info, path, root_dir, allow_symlink, load);
                         if (r >= 0) {
                                 info->path = path;
                                 path = NULL;
@@ -1161,7 +1169,7 @@ static int unit_file_can_install(
                 const char *name,
                 bool allow_symlink) {
 
-        _cleanup_install_context_done_ InstallContext c = {};
+        _cleanup_(install_context_done) InstallContext c = {};
         InstallInfo *i;
         int r;
 
@@ -1172,9 +1180,9 @@ static int unit_file_can_install(
         if (r < 0)
                 return r;
 
-        assert_se(i = hashmap_first(c.will_install));
+        assert_se(i = ordered_hashmap_first(c.will_install));
 
-        r = unit_file_search(&c, i, paths, root_dir, allow_symlink);
+        r = unit_file_search(&c, i, paths, root_dir, allow_symlink, true);
 
         if (r >= 0)
                 r =
@@ -1387,21 +1395,27 @@ static int install_context_apply(
                 unsigned *n_changes) {
 
         InstallInfo *i;
-        int r = 0, q;
+        int r, q;
 
         assert(c);
         assert(paths);
         assert(config_path);
 
-        while ((i = hashmap_first(c->will_install))) {
+        if (!ordered_hashmap_isempty(c->will_install)) {
+                r = ordered_hashmap_ensure_allocated(&c->have_installed, &string_hash_ops);
+                if (r < 0)
+                        return r;
 
-                q = hashmap_ensure_allocated(&c->have_installed, string_hash_func, string_compare_func);
-                if (q < 0)
-                        return q;
+                r = ordered_hashmap_reserve(c->have_installed, ordered_hashmap_size(c->will_install));
+                if (r < 0)
+                        return r;
+        }
 
-                assert_se(hashmap_move_one(c->have_installed, c->will_install, i->name) == 0);
+        r = 0;
+        while ((i = ordered_hashmap_first(c->will_install))) {
+                assert_se(ordered_hashmap_move_one(c->have_installed, c->will_install, i->name) == 0);
 
-                q = unit_file_search(c, i, paths, root_dir, false);
+                q = unit_file_search(c, i, paths, root_dir, false, true);
                 if (q < 0) {
                         if (r >= 0)
                                 r = q;
@@ -1426,7 +1440,7 @@ static int install_context_mark_for_removal(
                 const char *root_dir) {
 
         InstallInfo *i;
-        int r = 0, q;
+        int r, q;
 
         assert(c);
         assert(paths);
@@ -1434,15 +1448,21 @@ static int install_context_mark_for_removal(
 
         /* Marks all items for removal */
 
-        while ((i = hashmap_first(c->will_install))) {
+        if (!ordered_hashmap_isempty(c->will_install)) {
+                r = ordered_hashmap_ensure_allocated(&c->have_installed, &string_hash_ops);
+                if (r < 0)
+                        return r;
 
-                q = hashmap_ensure_allocated(&c->have_installed, string_hash_func, string_compare_func);
-                if (q < 0)
-                        return q;
+                r = ordered_hashmap_reserve(c->have_installed, ordered_hashmap_size(c->will_install));
+                if (r < 0)
+                        return r;
+        }
 
-                assert_se(hashmap_move_one(c->have_installed, c->will_install, i->name) == 0);
+        r = 0;
+        while ((i = ordered_hashmap_first(c->will_install))) {
+                assert_se(ordered_hashmap_move_one(c->have_installed, c->will_install, i->name) == 0);
 
-                q = unit_file_search(c, i, paths, root_dir, false);
+                q = unit_file_search(c, i, paths, root_dir, false, true);
                 if (q == -ENOENT) {
                         /* do nothing */
                 } else if (q < 0) {
@@ -1488,6 +1508,89 @@ static int install_context_mark_for_removal(
         return r;
 }
 
+int unit_file_add_dependency(
+                UnitFileScope scope,
+                bool runtime,
+                const char *root_dir,
+                char **files,
+                char *target,
+                UnitDependency dep,
+                bool force,
+                UnitFileChange **changes,
+                unsigned *n_changes) {
+
+        _cleanup_lookup_paths_free_ LookupPaths paths = {};
+        _cleanup_(install_context_done) InstallContext c = {};
+        _cleanup_free_ char *config_path = NULL;
+        char **i;
+        int r;
+        InstallInfo *info;
+
+        assert(scope >= 0);
+        assert(scope < _UNIT_FILE_SCOPE_MAX);
+
+        r = lookup_paths_init_from_scope(&paths, scope, root_dir);
+        if (r < 0)
+                return r;
+
+        r = get_config_path(scope, runtime, root_dir, &config_path);
+        if (r < 0)
+                return r;
+
+        STRV_FOREACH(i, files) {
+                UnitFileState state;
+
+                state = unit_file_get_state(scope, root_dir, *i);
+                if (state < 0) {
+                        log_error("Failed to get unit file state for %s: %s", *i, strerror(-state));
+                        return state;
+                }
+
+                if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
+                        log_error("Failed to enable unit: Unit %s is masked", *i);
+                        return -ENOTSUP;
+                }
+
+                r = install_info_add_auto(&c, *i);
+                if (r < 0)
+                        return r;
+        }
+
+        if (!ordered_hashmap_isempty(c.will_install)) {
+                r = ordered_hashmap_ensure_allocated(&c.have_installed, &string_hash_ops);
+                if (r < 0)
+                        return r;
+
+                r = ordered_hashmap_reserve(c.have_installed, ordered_hashmap_size(c.will_install));
+                if (r < 0)
+                        return r;
+        }
+
+        while ((info = ordered_hashmap_first(c.will_install))) {
+                assert_se(ordered_hashmap_move_one(c.have_installed, c.will_install, info->name) == 0);
+
+                r = unit_file_search(&c, info, &paths, root_dir, false, false);
+                if (r < 0)
+                        return r;
+
+                if (dep == UNIT_WANTS)
+                        r = strv_extend(&info->wanted_by, target);
+                else if (dep == UNIT_REQUIRES)
+                        r = strv_extend(&info->required_by, target);
+                else
+                        r = -EINVAL;
+
+                if (r < 0)
+                        return r;
+
+                r = install_info_apply(info, &paths, config_path, root_dir, force, changes, n_changes);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
 int unit_file_enable(
                 UnitFileScope scope,
                 bool runtime,
@@ -1498,7 +1601,7 @@ int unit_file_enable(
                 unsigned *n_changes) {
 
         _cleanup_lookup_paths_free_ LookupPaths paths = {};
-        _cleanup_install_context_done_ InstallContext c = {};
+        _cleanup_(install_context_done) InstallContext c = {};
         char **i;
         _cleanup_free_ char *config_path = NULL;
         int r;
@@ -1515,6 +1618,19 @@ int unit_file_enable(
                 return r;
 
         STRV_FOREACH(i, files) {
+                UnitFileState state;
+
+                state = unit_file_get_state(scope, root_dir, *i);
+                if (state < 0) {
+                        log_error("Failed to get unit file state for %s: %s", *i, strerror(-state));
+                        return state;
+                }
+
+                if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
+                        log_error("Failed to enable unit: Unit %s is masked", *i);
+                        return -ENOTSUP;
+                }
+
                 r = install_info_add_auto(&c, *i);
                 if (r < 0)
                         return r;
@@ -1537,7 +1653,7 @@ int unit_file_disable(
                 unsigned *n_changes) {
 
         _cleanup_lookup_paths_free_ LookupPaths paths = {};
-        _cleanup_install_context_done_ InstallContext c = {};
+        _cleanup_(install_context_done) InstallContext c = {};
         char **i;
         _cleanup_free_ char *config_path = NULL;
         _cleanup_set_free_free_ Set *remove_symlinks_to = NULL;
@@ -1563,7 +1679,7 @@ int unit_file_disable(
         r = install_context_mark_for_removal(&c, &paths, &remove_symlinks_to, config_path, root_dir);
 
         q = remove_marked_symlinks(remove_symlinks_to, config_path, changes, n_changes, files);
-        if (r == 0)
+        if (r >= 0)
                 r = q;
 
         return r;
@@ -1597,7 +1713,7 @@ int unit_file_set_default(
                 unsigned *n_changes) {
 
         _cleanup_lookup_paths_free_ LookupPaths paths = {};
-        _cleanup_install_context_done_ InstallContext c = {};
+        _cleanup_(install_context_done) InstallContext c = {};
         _cleanup_free_ char *config_path = NULL;
         char *path;
         int r;
@@ -1622,9 +1738,9 @@ int unit_file_set_default(
         if (r < 0)
                 return r;
 
-        assert_se(i = hashmap_first(c.will_install));
+        assert_se(i = ordered_hashmap_first(c.will_install));
 
-        r = unit_file_search(&c, i, &paths, root_dir, false);
+        r = unit_file_search(&c, i, &paths, root_dir, false, true);
         if (r < 0)
                 return r;
 
@@ -1658,11 +1774,7 @@ int unit_file_get_default(
                 _cleanup_free_ char *path = NULL, *tmp = NULL;
                 char *n;
 
-                if (isempty(root_dir))
-                        path = strappend(*p, "/" SPECIAL_DEFAULT_TARGET);
-                else
-                        path = strjoin(root_dir, "/", *p, "/" SPECIAL_DEFAULT_TARGET, NULL);
-
+                path = path_join(root_dir, *p, SPECIAL_DEFAULT_TARGET);
                 if (!path)
                         return -ENOMEM;
 
@@ -1719,15 +1831,12 @@ UnitFileState unit_file_get_state(
                 free(path);
                 path = NULL;
 
-                if (root_dir)
-                        asprintf(&path, "%s/%s/%s", root_dir, *i, name);
-                else
-                        asprintf(&path, "%s/%s", *i, name);
+                path = path_join(root_dir, *i, name);
                 if (!path)
                         return -ENOMEM;
 
                 if (root_dir)
-                        partial = path + strlen(root_dir) + 1;
+                        partial = path + strlen(root_dir);
                 else
                         partial = path;
 
@@ -1866,7 +1975,7 @@ int unit_file_preset(
                 UnitFileChange **changes,
                 unsigned *n_changes) {
 
-        _cleanup_install_context_done_ InstallContext plus = {}, minus = {};
+        _cleanup_(install_context_done) InstallContext plus = {}, minus = {};
         _cleanup_lookup_paths_free_ LookupPaths paths = {};
         _cleanup_free_ char *config_path = NULL;
         char **i;
@@ -1874,7 +1983,7 @@ int unit_file_preset(
 
         assert(scope >= 0);
         assert(scope < _UNIT_FILE_SCOPE_MAX);
-        assert(mode < _UNIT_FILE_PRESET_MODE_MAX);
+        assert(mode < _UNIT_FILE_PRESET_MAX);
 
         r = lookup_paths_init_from_scope(&paths, scope, root_dir);
         if (r < 0)
@@ -1934,7 +2043,7 @@ int unit_file_preset_all(
                 UnitFileChange **changes,
                 unsigned *n_changes) {
 
-        _cleanup_install_context_done_ InstallContext plus = {}, minus = {};
+        _cleanup_(install_context_done) InstallContext plus = {}, minus = {};
         _cleanup_lookup_paths_free_ LookupPaths paths = {};
         _cleanup_free_ char *config_path = NULL;
         char **i;
@@ -1942,7 +2051,7 @@ int unit_file_preset_all(
 
         assert(scope >= 0);
         assert(scope < _UNIT_FILE_SCOPE_MAX);
-        assert(mode < _UNIT_FILE_PRESET_MODE_MAX);
+        assert(mode < _UNIT_FILE_PRESET_MAX);
 
         r = lookup_paths_init_from_scope(&paths, scope, root_dir);
         if (r < 0)
@@ -1954,17 +2063,11 @@ int unit_file_preset_all(
 
         STRV_FOREACH(i, paths.unit_path) {
                 _cleanup_closedir_ DIR *d = NULL;
-                _cleanup_free_ char *buf = NULL;
-                const char *units_dir;
+                _cleanup_free_ char *units_dir;
 
-                if (!isempty(root_dir)) {
-                        buf = strjoin(root_dir, "/", *i, NULL);
-                        if (!buf)
-                                return -ENOMEM;
-
-                        units_dir = buf;
-                } else
-                        units_dir = *i;
+                units_dir = path_join(root_dir, *i, NULL);
+                if (!units_dir)
+                        return -ENOMEM;
 
                 d = opendir(units_dir);
                 if (!d) {
@@ -2032,14 +2135,15 @@ int unit_file_preset_all(
         return r;
 }
 
-static void unitfilelist_free(UnitFileList **f) {
-        if (!*f)
+static void unit_file_list_free_one(UnitFileList *f) {
+        if (!f)
                 return;
 
-        free((*f)->path);
-        free(*f);
+        free(f->path);
+        free(f);
 }
-#define _cleanup_unitfilelist_free_ _cleanup_(unitfilelist_free)
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(UnitFileList*, unit_file_list_free_one);
 
 int unit_file_get_list(
                 UnitFileScope scope,
@@ -2057,23 +2161,23 @@ int unit_file_get_list(
         if (root_dir && scope != UNIT_FILE_SYSTEM)
                 return -EINVAL;
 
+        if (root_dir) {
+                r = access(root_dir, F_OK);
+                if (r < 0)
+                        return -errno;
+        }
+
         r = lookup_paths_init_from_scope(&paths, scope, root_dir);
         if (r < 0)
                 return r;
 
         STRV_FOREACH(i, paths.unit_path) {
                 _cleanup_closedir_ DIR *d = NULL;
-                _cleanup_free_ char *buf = NULL;
-                const char *units_dir;
+                _cleanup_free_ char *units_dir;
 
-                if (!isempty(root_dir)) {
-                        buf = strjoin(root_dir, "/", *i, NULL);
-                        if (!buf)
-                                return -ENOMEM;
-
-                        units_dir = buf;
-                } else
-                        units_dir = *i;
+                units_dir = path_join(root_dir, *i, NULL);
+                if (!units_dir)
+                        return -ENOMEM;
 
                 d = opendir(units_dir);
                 if (!d) {
@@ -2084,8 +2188,9 @@ int unit_file_get_list(
                 }
 
                 for (;;) {
-                        _cleanup_unitfilelist_free_ UnitFileList *f = NULL;
+                        _cleanup_(unit_file_list_free_onep) UnitFileList *f = NULL;
                         struct dirent *de;
+                        _cleanup_free_ char *path = NULL;
 
                         errno = 0;
                         de = readdir(d);
@@ -2135,7 +2240,11 @@ int unit_file_get_list(
                                 goto found;
                         }
 
-                        r = unit_file_can_install(&paths, root_dir, f->path, true);
+                        path = path_make_absolute(de->d_name, *i);
+                        if (!path)
+                                return -ENOMEM;
+
+                        r = unit_file_can_install(&paths, root_dir, path, true);
                         if (r == -EINVAL ||  /* Invalid setting? */
                             r == -EBADMSG || /* Invalid format? */
                             r == -ENOENT     /* Included file not found? */)
@@ -2179,7 +2288,7 @@ static const char* const unit_file_change_type_table[_UNIT_FILE_CHANGE_TYPE_MAX]
 
 DEFINE_STRING_TABLE_LOOKUP(unit_file_change_type, UnitFileChangeType);
 
-static const char* const unit_file_preset_mode_table[_UNIT_FILE_PRESET_MODE_MAX] = {
+static const char* const unit_file_preset_mode_table[_UNIT_FILE_PRESET_MAX] = {
         [UNIT_FILE_PRESET_FULL] = "full",
         [UNIT_FILE_PRESET_ENABLE_ONLY] = "enable-only",
         [UNIT_FILE_PRESET_DISABLE_ONLY] = "disable-only",
index 91ce192a4f04692e4bc6852ee6a85cfff47fdf9e..c0b4df69d5fe3167dc02efc95e16bb26acebc60d 100644 (file)
@@ -22,6 +22,7 @@
 ***/
 
 #include "hashmap.h"
+#include "unit-name.h"
 
 typedef enum UnitFileScope {
         UNIT_FILE_SYSTEM,
@@ -49,7 +50,7 @@ typedef enum UnitFilePresetMode {
         UNIT_FILE_PRESET_FULL,
         UNIT_FILE_PRESET_ENABLE_ONLY,
         UNIT_FILE_PRESET_DISABLE_ONLY,
-        _UNIT_FILE_PRESET_MODE_MAX,
+        _UNIT_FILE_PRESET_MAX,
         _UNIT_FILE_PRESET_INVALID = -1
 } UnitFilePresetMode;
 
@@ -93,6 +94,7 @@ int unit_file_mask(UnitFileScope scope, bool runtime, const char *root_dir, char
 int unit_file_unmask(UnitFileScope scope, bool runtime, const char *root_dir, char **files, UnitFileChange **changes, unsigned *n_changes);
 int unit_file_set_default(UnitFileScope scope, const char *root_dir, const char *file, bool force, UnitFileChange **changes, unsigned *n_changes);
 int unit_file_get_default(UnitFileScope scope, const char *root_dir, char **name);
+int unit_file_add_dependency(UnitFileScope scope, bool runtime, const char *root_dir, char **files, char *target, UnitDependency dep, bool force, UnitFileChange **changes, unsigned *n_changes);
 
 UnitFileState unit_file_get_state(UnitFileScope scope, const char *root_dir, const char *filename);
 
index 25a8b361b7c9c86e23139976e16acc910f717342..0af41afa77eff1a1a892d58d5683e5852f9661b0 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <errno.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/xattr.h>
-#ifdef HAVE_SELINUX
-#include <selinux/selinux.h>
-#include <selinux/label.h>
-#endif
-
 #include "label.h"
-#include "strv.h"
 #include "util.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "smack-util.h"
-
-#ifdef HAVE_SELINUX
-static struct selabel_handle *label_hnd = NULL;
-#endif
-
-static int smack_relabel_in_dev(const char *path) {
-        int r = 0;
-
-#ifdef HAVE_SMACK
-        struct stat sb;
-        const char *label;
-
-        /*
-         * Path must be in /dev and must exist
-         */
-        if (!path_startswith(path, "/dev"))
-                return 0;
-
-        r = lstat(path, &sb);
-        if (r < 0)
-                return -errno;
-
-        /*
-         * Label directories and character devices "*".
-         * Label symlinks "_".
-         * Don't change anything else.
-         */
-        if (S_ISDIR(sb.st_mode))
-                label = SMACK_STAR_LABEL;
-        else if (S_ISLNK(sb.st_mode))
-                label = SMACK_FLOOR_LABEL;
-        else if (S_ISCHR(sb.st_mode))
-                label = SMACK_STAR_LABEL;
-        else
-                return 0;
-
-        r = setxattr(path, "security.SMACK64", label, strlen(label), 0);
-        if (r < 0) {
-                log_error("Smack relabeling \"%s\" %m", path);
-                return -errno;
-        }
-#endif
-
-        return r;
-}
-
-int label_init(const char *prefix) {
-        int r = 0;
-
-#ifdef HAVE_SELINUX
-        usec_t before_timestamp, after_timestamp;
-        struct mallinfo before_mallinfo, after_mallinfo;
-
-        if (!use_selinux())
-                return 0;
-
-        if (label_hnd)
-                return 0;
-
-        before_mallinfo = mallinfo();
-        before_timestamp = now(CLOCK_MONOTONIC);
-
-        if (prefix) {
-                struct selinux_opt options[] = {
-                        { .type = SELABEL_OPT_SUBSET, .value = prefix },
-                };
-
-                label_hnd = selabel_open(SELABEL_CTX_FILE, options, ELEMENTSOF(options));
-        } else
-                label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
-
-        if (!label_hnd) {
-                log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG,
-                         "Failed to initialize SELinux context: %m");
-                r = security_getenforce() == 1 ? -errno : 0;
-        } else  {
-                char timespan[FORMAT_TIMESPAN_MAX];
-                int l;
-
-                after_timestamp = now(CLOCK_MONOTONIC);
-                after_mallinfo = mallinfo();
-
-                l = after_mallinfo.uordblks > before_mallinfo.uordblks ? after_mallinfo.uordblks - before_mallinfo.uordblks : 0;
-
-                log_debug("Successfully loaded SELinux database in %s, size on heap is %iK.",
-                          format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0),
-                          (l+1023)/1024);
-        }
-#endif
-
-        return r;
-}
-
-static int label_fix_selinux(const char *path, bool ignore_enoent, bool ignore_erofs) {
-        int r = 0;
-
-#ifdef HAVE_SELINUX
-        struct stat st;
-        security_context_t fcon;
-
-        if (!label_hnd)
-                return 0;
-
-        r = lstat(path, &st);
-        if (r == 0) {
-                r = selabel_lookup_raw(label_hnd, &fcon, path, st.st_mode);
-
-                /* If there's no label to set, then exit without warning */
-                if (r < 0 && errno == ENOENT)
-                        return 0;
-
-                if (r == 0) {
-                        r = lsetfilecon(path, fcon);
-                        freecon(fcon);
-
-                        /* If the FS doesn't support labels, then exit without warning */
-                        if (r < 0 && errno == ENOTSUP)
-                                return 0;
-                }
-        }
-
-        if (r < 0) {
-                /* Ignore ENOENT in some cases */
-                if (ignore_enoent && errno == ENOENT)
-                        return 0;
-
-                if (ignore_erofs && errno == EROFS)
-                        return 0;
-
-                log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG,
-                         "Unable to fix label of %s: %m", path);
-                r = security_getenforce() == 1 ? -errno : 0;
-        }
-#endif
-
-        return r;
-}
 
 int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
-        int r = 0;
-
-        if (use_selinux()) {
-                r = label_fix_selinux(path, ignore_enoent, ignore_erofs);
-                if (r < 0)
-                        return r;
-        }
-
-        if (use_smack()) {
-                r = smack_relabel_in_dev(path);
-                if (r < 0)
-                        return r;
-        }
-
-        return r;
-}
-
-void label_finish(void) {
-
-#ifdef HAVE_SELINUX
-        if (!use_selinux())
-                return;
-
-        if (label_hnd)
-                selabel_close(label_hnd);
-#endif
-}
-
-int label_get_create_label_from_exe(const char *exe, char **label) {
+        int r, q;
 
-        int r = 0;
+        r = mac_selinux_fix(path, ignore_enoent, ignore_erofs);
+        q = mac_smack_fix(path, ignore_enoent, ignore_erofs);
 
-#ifdef HAVE_SELINUX
-        security_context_t mycon = NULL, fcon = NULL;
-        security_class_t sclass;
-
-        if (!use_selinux()) {
-                *label = NULL;
-                return 0;
-        }
-
-        r = getcon(&mycon);
-        if (r < 0)
-                goto fail;
-
-        r = getfilecon(exe, &fcon);
         if (r < 0)
-                goto fail;
-
-        sclass = string_to_security_class("process");
-        r = security_compute_create(mycon, fcon, sclass, (security_context_t *) label);
-        if (r == 0)
-                log_debug("SELinux Socket context for %s will be set to %s", exe, *label);
-
-fail:
-        if (r < 0 && security_getenforce() == 1)
-                r = -errno;
-
-        freecon(mycon);
-        freecon(fcon);
-#endif
-
-        return r;
-}
-
-int label_context_set(const char *path, mode_t mode) {
-        int r = 0;
-
-#ifdef HAVE_SELINUX
-        security_context_t filecon = NULL;
-
-        if (!use_selinux() || !label_hnd)
-                return 0;
-
-        r = selabel_lookup_raw(label_hnd, &filecon, path, mode);
-        if (r < 0 && errno != ENOENT)
-                r = -errno;
-        else if (r == 0) {
-                r = setfscreatecon(filecon);
-                if (r < 0) {
-                        log_error("Failed to set SELinux file context on %s: %m", path);
-                        r = -errno;
-                }
-
-                freecon(filecon);
-        }
-
-        if (r < 0 && security_getenforce() == 0)
-                r = 0;
-#endif
-
-        return r;
-}
-
-int label_socket_set(const char *label) {
-
-#ifdef HAVE_SELINUX
-        if (!use_selinux())
-                return 0;
-
-        if (setsockcreatecon((security_context_t) label) < 0) {
-                log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG,
-                         "Failed to set SELinux context (%s) on socket: %m", label);
-
-                if (security_getenforce() == 1)
-                        return -errno;
-        }
-#endif
+                return r;
+        if (q < 0)
+                return q;
 
         return 0;
 }
 
-void label_context_clear(void) {
-
-#ifdef HAVE_SELINUX
-        PROTECT_ERRNO;
-
-        if (!use_selinux())
-                return;
-
-        setfscreatecon(NULL);
-#endif
-}
-
-void label_socket_clear(void) {
-
-#ifdef HAVE_SELINUX
-        PROTECT_ERRNO;
-
-        if (!use_selinux())
-                return;
-
-        setsockcreatecon(NULL);
-#endif
-}
-
-void label_free(const char *label) {
-
-#ifdef HAVE_SELINUX
-        if (!use_selinux())
-                return;
-
-        freecon((security_context_t) label);
-#endif
-}
-
-static int label_mkdir_selinux(const char *path, mode_t mode) {
-        int r = 0;
-
-#ifdef HAVE_SELINUX
-        /* Creates a directory and labels it according to the SELinux policy */
-        security_context_t fcon = NULL;
-
-        if (!label_hnd)
-                return 0;
-
-        if (path_is_absolute(path))
-                r = selabel_lookup_raw(label_hnd, &fcon, path, S_IFDIR);
-        else {
-                _cleanup_free_ char *newpath;
-
-                newpath = path_make_absolute_cwd(path);
-                if (!newpath)
-                        return -ENOMEM;
-
-                r = selabel_lookup_raw(label_hnd, &fcon, newpath, S_IFDIR);
-        }
-
-        if (r == 0)
-                r = setfscreatecon(fcon);
-
-        if (r < 0 && errno != ENOENT) {
-                log_error("Failed to set security context %s for %s: %m", fcon, path);
+int mkdir_label(const char *path, mode_t mode) {
+        int r;
 
-                if (security_getenforce() == 1) {
-                        r = -errno;
-                        goto finish;
-                }
-        }
+        assert(path);
 
-        r = mkdir(path, mode);
+        r = mac_selinux_create_file_prepare(path, S_IFDIR);
         if (r < 0)
-                r = -errno;
-
-finish:
-        setfscreatecon(NULL);
-        freecon(fcon);
-#endif
-
-        return r;
-}
+                return r;
 
-int label_mkdir(const char *path, mode_t mode) {
-        int r;
-
-        if (use_selinux()) {
-                r = label_mkdir_selinux(path, mode);
-                if (r < 0)
-                        return r;
-        }
-
-        if (use_smack()) {
-                r = mkdir(path, mode);
-                if (r < 0 && errno != EEXIST)
-                        return -errno;
+        if (mkdir(path, mode) < 0)
+                r = -errno;
 
-                r = smack_relabel_in_dev(path);
-                if (r < 0)
-                        return r;
-        }
+        mac_selinux_create_file_clear();
 
-        r = mkdir(path, mode);
-        if (r < 0 && errno != EEXIST)
-                return -errno;
+        if (r < 0)
+                return r;
 
-        return 0;
+        return mac_smack_fix(path, false, false);
 }
 
-int label_bind(int fd, const struct sockaddr *addr, socklen_t addrlen) {
-
-        /* Binds a socket and label its file system object according to the SELinux policy */
-
-#ifdef HAVE_SELINUX
-        security_context_t fcon = NULL;
-        const struct sockaddr_un *un;
-        char *path;
+int symlink_label(const char *old_path, const char *new_path) {
         int r;
 
-        assert(fd >= 0);
-        assert(addr);
-        assert(addrlen >= sizeof(sa_family_t));
-
-        if (!use_selinux() || !label_hnd)
-                goto skipped;
-
-        /* Filter out non-local sockets */
-        if (addr->sa_family != AF_UNIX)
-                goto skipped;
-
-        /* Filter out anonymous sockets */
-        if (addrlen < sizeof(sa_family_t) + 1)
-                goto skipped;
+        assert(old_path);
+        assert(new_path);
 
-        /* Filter out abstract namespace sockets */
-        un = (const struct sockaddr_un*) addr;
-        if (un->sun_path[0] == 0)
-                goto skipped;
-
-        path = strndupa(un->sun_path, addrlen - offsetof(struct sockaddr_un, sun_path));
-
-        if (path_is_absolute(path))
-                r = selabel_lookup_raw(label_hnd, &fcon, path, S_IFSOCK);
-        else {
-                _cleanup_free_ char *newpath;
-
-                newpath = path_make_absolute_cwd(path);
-                if (!newpath)
-                        return -ENOMEM;
-
-                r = selabel_lookup_raw(label_hnd, &fcon, newpath, S_IFSOCK);
-        }
-
-        if (r == 0)
-                r = setfscreatecon(fcon);
-
-        if (r < 0 && errno != ENOENT) {
-                log_error("Failed to set security context %s for %s: %m", fcon, path);
-
-                if (security_getenforce() == 1) {
-                        r = -errno;
-                        goto finish;
-                }
-        }
-
-        r = bind(fd, addr, addrlen);
+        r = mac_selinux_create_file_prepare(new_path, S_IFLNK);
         if (r < 0)
-                r = -errno;
-
-finish:
-        setfscreatecon(NULL);
-        freecon(fcon);
-
-        return r;
+                return r;
 
-skipped:
-#endif
-        return bind(fd, addr, addrlen) < 0 ? -errno : 0;
-}
+        if (symlink(old_path, new_path) < 0)
+                r = -errno;
 
-int label_apply(const char *path, const char *label) {
-        int r = 0;
+        mac_selinux_create_file_clear();
 
-#ifdef HAVE_SELINUX
-        if (!use_selinux())
-                return 0;
+        if (r < 0)
+                return r;
 
-        r = setfilecon(path, (char *)label);
-#endif
-        return r;
+        return mac_smack_fix(new_path, false, false);
 }
index 72948205f6bcf2caf92eb52fb907934461cdc2c8..3428a8bb7a4a50ec7b99524528c9d3f6c92d53d8 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <sys/types.h>
-#include <stdbool.h>
-#include <sys/socket.h>
-
-int label_init(const char *prefix);
-void label_finish(void);
+#include "selinux-util.h"
+#include "smack-util.h"
 
 int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
 
-int label_socket_set(const char *label);
-void label_socket_clear(void);
-
-int label_context_set(const char *path, mode_t mode);
-void label_context_clear(void);
-
-void label_free(const char *label);
-
-int label_get_create_label_from_exe(const char *exe, char **label);
-
-int label_mkdir(const char *path, mode_t mode);
-
-int label_bind(int fd, const struct sockaddr *addr, socklen_t addrlen);
-
-int label_apply(const char *path, const char *label);
-
-int label_write_one_line_file_atomic(const char *fn, const char *line);
-int label_write_env_file(const char *fname, char **l);
-int label_fopen_temporary(const char *path, FILE **_f, char **_temp_path);
+int mkdir_label(const char *path, mode_t mode);
+int symlink_label(const char *old_path, const char *new_path);
diff --git a/src/shared/linux/fanotify.h b/src/shared/linux/fanotify.h
deleted file mode 100644 (file)
index 63531a6..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef _LINUX_FANOTIFY_H
-#define _LINUX_FANOTIFY_H
-
-#include <linux/types.h>
-
-/* the following events that user-space can register for */
-#define FAN_ACCESS             0x00000001      /* File was accessed */
-#define FAN_MODIFY             0x00000002      /* File was modified */
-#define FAN_CLOSE_WRITE                0x00000008      /* Unwrittable file closed */
-#define FAN_CLOSE_NOWRITE      0x00000010      /* Writtable file closed */
-#define FAN_OPEN               0x00000020      /* File was opened */
-
-#define FAN_EVENT_ON_CHILD     0x08000000      /* interested in child events */
-
-/* FIXME currently Q's have no limit.... */
-#define FAN_Q_OVERFLOW         0x00004000      /* Event queued overflowed */
-
-#define FAN_OPEN_PERM          0x00010000      /* File open in perm check */
-#define FAN_ACCESS_PERM                0x00020000      /* File accessed in perm check */
-
-/* helper events */
-#define FAN_CLOSE              (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */
-
-/* flags used for fanotify_init() */
-#define FAN_CLOEXEC            0x00000001
-#define FAN_NONBLOCK           0x00000002
-
-#define FAN_ALL_INIT_FLAGS     (FAN_CLOEXEC | FAN_NONBLOCK)
-
-/* flags used for fanotify_modify_mark() */
-#define FAN_MARK_ADD           0x00000001
-#define FAN_MARK_REMOVE                0x00000002
-#define FAN_MARK_DONT_FOLLOW   0x00000004
-#define FAN_MARK_ONLYDIR       0x00000008
-#define FAN_MARK_MOUNT         0x00000010
-#define FAN_MARK_IGNORED_MASK  0x00000020
-#define FAN_MARK_IGNORED_SURV_MODIFY   0x00000040
-#define FAN_MARK_FLUSH         0x00000080
-
-#define FAN_ALL_MARK_FLAGS     (FAN_MARK_ADD |\
-                                FAN_MARK_REMOVE |\
-                                FAN_MARK_DONT_FOLLOW |\
-                                FAN_MARK_ONLYDIR |\
-                                FAN_MARK_MOUNT |\
-                                FAN_MARK_IGNORED_MASK |\
-                                FAN_MARK_IGNORED_SURV_MODIFY)
-
-/*
- * All of the events - we build the list by hand so that we can add flags in
- * the future and not break backward compatibility.  Apps will get only the
- * events that they originally wanted.  Be sure to add new events here!
- */
-#define FAN_ALL_EVENTS (FAN_ACCESS |\
-                       FAN_MODIFY |\
-                       FAN_CLOSE |\
-                       FAN_OPEN)
-
-/*
- * All events which require a permission response from userspace
- */
-#define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\
-                            FAN_ACCESS_PERM)
-
-#define FAN_ALL_OUTGOING_EVENTS        (FAN_ALL_EVENTS |\
-                                FAN_ALL_PERM_EVENTS |\
-                                FAN_Q_OVERFLOW)
-
-#define FANOTIFY_METADATA_VERSION      2
-
-struct fanotify_event_metadata {
-       __u32 event_len;
-       __u32 vers;
-       __u64 mask;
-       __s32 fd;
-       __s32 pid;
-} __attribute__ ((packed));
-
-struct fanotify_response {
-       __s32 fd;
-       __u32 response;
-} __attribute__ ((packed));
-
-/* Legit userspace responses to a _PERM event */
-#define FAN_ALLOW      0x01
-#define FAN_DENY       0x02
-
-/* Helper functions to deal with fanotify_event_metadata buffers */
-#define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata))
-
-#define FAN_EVENT_NEXT(meta, len) ((len) -= (meta)->event_len, \
-                                  (struct fanotify_event_metadata*)(((char *)(meta)) + \
-                                  (meta)->event_len))
-
-#define FAN_EVENT_OK(meta, len)        ((long)(len) >= (long)FAN_EVENT_METADATA_LEN && \
-                               (long)(meta)->event_len >= (long)FAN_EVENT_METADATA_LEN && \
-                               (long)(meta)->event_len <= (long)(len))
-
-#endif /* _LINUX_FANOTIFY_H */
diff --git a/src/shared/locale-util.c b/src/shared/locale-util.c
new file mode 100644 (file)
index 0000000..9addb05
--- /dev/null
@@ -0,0 +1,224 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <sys/mman.h>
+
+#include "set.h"
+#include "util.h"
+#include "utf8.h"
+#include "strv.h"
+
+#include "locale-util.h"
+
+static int add_locales_from_archive(Set *locales) {
+        /* Stolen from glibc... */
+
+        struct locarhead {
+                uint32_t magic;
+                /* Serial number.  */
+                uint32_t serial;
+                /* Name hash table.  */
+                uint32_t namehash_offset;
+                uint32_t namehash_used;
+                uint32_t namehash_size;
+                /* String table.  */
+                uint32_t string_offset;
+                uint32_t string_used;
+                uint32_t string_size;
+                /* Table with locale records.  */
+                uint32_t locrectab_offset;
+                uint32_t locrectab_used;
+                uint32_t locrectab_size;
+                /* MD5 sum hash table.  */
+                uint32_t sumhash_offset;
+                uint32_t sumhash_used;
+                uint32_t sumhash_size;
+        };
+
+        struct namehashent {
+                /* Hash value of the name.  */
+                uint32_t hashval;
+                /* Offset of the name in the string table.  */
+                uint32_t name_offset;
+                /* Offset of the locale record.  */
+                uint32_t locrec_offset;
+        };
+
+        const struct locarhead *h;
+        const struct namehashent *e;
+        const void *p = MAP_FAILED;
+        _cleanup_close_ int fd = -1;
+        size_t sz = 0;
+        struct stat st;
+        unsigned i;
+        int r;
+
+        fd = open("/usr/lib/locale/locale-archive", O_RDONLY|O_NOCTTY|O_CLOEXEC);
+        if (fd < 0)
+                return errno == ENOENT ? 0 : -errno;
+
+        if (fstat(fd, &st) < 0)
+                return -errno;
+
+        if (!S_ISREG(st.st_mode))
+                return -EBADMSG;
+
+        if (st.st_size < (off_t) sizeof(struct locarhead))
+                return -EBADMSG;
+
+        p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
+        if (p == MAP_FAILED)
+                return -errno;
+
+        h = (const struct locarhead *) p;
+        if (h->magic != 0xde020109 ||
+            h->namehash_offset + h->namehash_size > st.st_size ||
+            h->string_offset + h->string_size > st.st_size ||
+            h->locrectab_offset + h->locrectab_size > st.st_size ||
+            h->sumhash_offset + h->sumhash_size > st.st_size) {
+                r = -EBADMSG;
+                goto finish;
+        }
+
+        e = (const struct namehashent*) ((const uint8_t*) p + h->namehash_offset);
+        for (i = 0; i < h->namehash_size; i++) {
+                char *z;
+
+                if (e[i].locrec_offset == 0)
+                        continue;
+
+                if (!utf8_is_valid((char*) p + e[i].name_offset))
+                        continue;
+
+                z = strdup((char*) p + e[i].name_offset);
+                if (!z) {
+                        r = -ENOMEM;
+                        goto finish;
+                }
+
+                r = set_consume(locales, z);
+                if (r < 0)
+                        goto finish;
+        }
+
+        r = 0;
+
+ finish:
+        if (p != MAP_FAILED)
+                munmap((void*) p, sz);
+
+        return r;
+}
+
+static int add_locales_from_libdir (Set *locales) {
+        _cleanup_closedir_ DIR *dir = NULL;
+        struct dirent *entry;
+        int r;
+
+        dir = opendir("/usr/lib/locale");
+        if (!dir)
+                return errno == ENOENT ? 0 : -errno;
+
+        FOREACH_DIRENT(entry, dir, return -errno) {
+                char *z;
+
+                if (entry->d_type != DT_DIR)
+                        continue;
+
+                z = strdup(entry->d_name);
+                if (!z)
+                        return -ENOMEM;
+
+                r = set_consume(locales, z);
+                if (r < 0 && r != -EEXIST)
+                        return r;
+        }
+
+        return 0;
+}
+
+int get_locales(char ***ret) {
+        _cleanup_set_free_ Set *locales = NULL;
+        _cleanup_strv_free_ char **l = NULL;
+        int r;
+
+        locales = set_new(&string_hash_ops);
+        if (!locales)
+                return -ENOMEM;
+
+        r = add_locales_from_archive(locales);
+        if (r < 0 && r != -ENOENT)
+                return r;
+
+        r = add_locales_from_libdir(locales);
+        if (r < 0)
+                return r;
+
+        l = set_get_strv(locales);
+        if (!l)
+                return -ENOMEM;
+
+        strv_sort(l);
+
+        *ret = l;
+        l = NULL;
+
+        return 0;
+}
+
+bool locale_is_valid(const char *name) {
+
+        if (isempty(name))
+                return false;
+
+        if (strlen(name) >= 128)
+                return false;
+
+        if (!utf8_is_valid(name))
+                return false;
+
+        if (!filename_is_safe(name))
+                return false;
+
+        if (!string_is_safe(name))
+                return false;
+
+        return true;
+}
+
+static const char * const locale_variable_table[_VARIABLE_LC_MAX] = {
+        [VARIABLE_LANG] = "LANG",
+        [VARIABLE_LANGUAGE] = "LANGUAGE",
+        [VARIABLE_LC_CTYPE] = "LC_CTYPE",
+        [VARIABLE_LC_NUMERIC] = "LC_NUMERIC",
+        [VARIABLE_LC_TIME] = "LC_TIME",
+        [VARIABLE_LC_COLLATE] = "LC_COLLATE",
+        [VARIABLE_LC_MONETARY] = "LC_MONETARY",
+        [VARIABLE_LC_MESSAGES] = "LC_MESSAGES",
+        [VARIABLE_LC_PAPER] = "LC_PAPER",
+        [VARIABLE_LC_NAME] = "LC_NAME",
+        [VARIABLE_LC_ADDRESS] = "LC_ADDRESS",
+        [VARIABLE_LC_TELEPHONE] = "LC_TELEPHONE",
+        [VARIABLE_LC_MEASUREMENT] = "LC_MEASUREMENT",
+        [VARIABLE_LC_IDENTIFICATION] = "LC_IDENTIFICATION"
+};
+
+DEFINE_STRING_TABLE_LOOKUP(locale_variable, LocaleVariable);
diff --git a/src/shared/locale-util.h b/src/shared/locale-util.h
new file mode 100644 (file)
index 0000000..d7a3e4f
--- /dev/null
@@ -0,0 +1,50 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+typedef enum LocaleVariable {
+        /* We don't list LC_ALL here on purpose. People should be
+         * using LANG instead. */
+
+        VARIABLE_LANG,
+        VARIABLE_LANGUAGE,
+        VARIABLE_LC_CTYPE,
+        VARIABLE_LC_NUMERIC,
+        VARIABLE_LC_TIME,
+        VARIABLE_LC_COLLATE,
+        VARIABLE_LC_MONETARY,
+        VARIABLE_LC_MESSAGES,
+        VARIABLE_LC_PAPER,
+        VARIABLE_LC_NAME,
+        VARIABLE_LC_ADDRESS,
+        VARIABLE_LC_TELEPHONE,
+        VARIABLE_LC_MEASUREMENT,
+        VARIABLE_LC_IDENTIFICATION,
+        _VARIABLE_LC_MAX,
+        _VARIABLE_LC_INVALID = -1
+} LocaleVariable;
+
+int get_locales(char ***l);
+bool locale_is_valid(const char *name);
+
+const char* locale_variable_to_string(LocaleVariable i) _const_;
+LocaleVariable locale_variable_from_string(const char *s) _pure_;
index 9039db34964dc5230aaaa2c357b644026b491292..26c604afd81fb8a258fb0ef435fae06b0b56313f 100644 (file)
@@ -51,6 +51,8 @@ static bool syslog_is_stream = false;
 static bool show_color = false;
 static bool show_location = false;
 
+static bool upgrade_syslog_to_journal = false;
+
 /* Akin to glibc's __abort_msg; which is private and we hence cannot
  * use here. */
 static char *log_abort_msg = NULL;
@@ -267,6 +269,13 @@ void log_set_target(LogTarget target) {
         assert(target >= 0);
         assert(target < _LOG_TARGET_MAX);
 
+        if (upgrade_syslog_to_journal) {
+                if (target == LOG_TARGET_SYSLOG)
+                        target = LOG_TARGET_JOURNAL;
+                else if (target == LOG_TARGET_SYSLOG_OR_KMSG)
+                        target = LOG_TARGET_JOURNAL_OR_KMSG;
+        }
+
         log_target = target;
 }
 
@@ -862,41 +871,62 @@ int log_set_max_level_from_string(const char *e) {
         return 0;
 }
 
-void log_parse_environment(void) {
-        _cleanup_free_ char *line = NULL;
-        const char *e;
-        int r;
+static int parse_proc_cmdline_item(const char *key, const char *value) {
 
-        r = proc_cmdline(&line);
-        if (r < 0)
-                log_warning("Failed to read /proc/cmdline. Ignoring: %s", strerror(-r));
-        else if (r > 0) {
-                char *w, *state;
-                size_t l;
+        /*
+         * The systemd.log_xyz= settings are parsed by all tools, and
+         * so is "debug".
+         *
+         * However, "quiet" is only parsed by PID 1!
+         */
 
-                FOREACH_WORD_QUOTED(w, l, line, state) {
-                        if (l == 5 && startswith(w, "debug")) {
-                                log_set_max_level(LOG_DEBUG);
-                                break;
-                        }
-                }
+        if (streq(key, "debug") && !value)
+                log_set_max_level(LOG_DEBUG);
+
+        else if (streq(key, "systemd.log_target") && value) {
+
+                if (log_set_target_from_string(value) < 0)
+                        log_warning("Failed to parse log target '%s'. Ignoring.", value);
+
+        } else if (streq(key, "systemd.log_level") && value) {
+
+                if (log_set_max_level_from_string(value) < 0)
+                        log_warning("Failed to parse log level '%s'. Ignoring.", value);
+
+        } else if (streq(key, "systemd.log_color") && value) {
+
+                if (log_show_color_from_string(value) < 0)
+                        log_warning("Failed to parse log color setting '%s'. Ignoring.", value);
+
+        } else if (streq(key, "systemd.log_location") && value) {
+
+                if (log_show_location_from_string(value) < 0)
+                        log_warning("Failed to parse log location setting '%s'. Ignoring.", value);
         }
 
+        return 0;
+}
+
+void log_parse_environment(void) {
+        const char *e;
+
+        parse_proc_cmdline(parse_proc_cmdline_item);
+
         e = secure_getenv("SYSTEMD_LOG_TARGET");
         if (e && log_set_target_from_string(e) < 0)
-                log_warning("Failed to parse log target %s. Ignoring.", e);
+                log_warning("Failed to parse log target '%s'. Ignoring.", e);
 
         e = secure_getenv("SYSTEMD_LOG_LEVEL");
         if (e && log_set_max_level_from_string(e) < 0)
-                log_warning("Failed to parse log level %s. Ignoring.", e);
+                log_warning("Failed to parse log level '%s'. Ignoring.", e);
 
         e = secure_getenv("SYSTEMD_LOG_COLOR");
         if (e && log_show_color_from_string(e) < 0)
-                log_warning("Failed to parse bool %s. Ignoring.", e);
+                log_warning("Failed to parse bool '%s'. Ignoring.", e);
 
         e = secure_getenv("SYSTEMD_LOG_LOCATION");
         if (e && log_show_location_from_string(e) < 0)
-                log_warning("Failed to parse bool %s. Ignoring.", e);
+                log_warning("Failed to parse bool '%s'. Ignoring.", e);
 }
 
 LogTarget log_get_target(void) {
@@ -982,3 +1012,7 @@ void log_received_signal(int level, const struct signalfd_siginfo *si) {
                          signal_to_string(si->ssi_signo));
 
 }
+
+void log_set_upgrade_syslog_to_journal(bool b) {
+        upgrade_syslog_to_journal = b;
+}
index 794af7be6af64aa004424d01131e558d418546bc..a3e23a855cf570e5db94ef6151a807324bb648ae 100644 (file)
@@ -157,6 +157,12 @@ do { \
 #define log_warning(...) log_full(LOG_WARNING, __VA_ARGS__)
 #define log_error(...)   log_full(LOG_ERR,     __VA_ARGS__)
 
+#ifdef LOG_TRACE
+#  define log_trace(...) log_debug(__VA_ARGS__)
+#else
+#  define log_trace(...) do {} while(0)
+#endif
+
 #define log_struct(level, ...) log_struct_internal(level, __FILE__, __LINE__, __func__, __VA_ARGS__)
 
 #define log_oom() log_oom_internal(__FILE__, __LINE__, __func__)
@@ -172,3 +178,5 @@ LogTarget log_target_from_string(const char *s) _pure_;
 #define MESSAGE_ID(x) "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(x)
 
 void log_received_signal(int level, const struct signalfd_siginfo *si);
+
+void log_set_upgrade_syslog_to_journal(bool b);
index 8edf4087c68f337ab76aed2c85f9d9a9dd0448e7..04e1165191068b7494730fa99ebe49d2734200c9 100644 (file)
@@ -311,8 +311,10 @@ static int output_short(
                 uint64_t x;
                 time_t t;
                 struct tm tm;
+                struct tm *(*gettime_r)(const time_t *, struct tm *);
 
                 r = -ENOENT;
+                gettime_r = (flags & OUTPUT_UTC) ? gmtime_r : localtime_r;
 
                 if (realtime)
                         r = safe_atou64(realtime, &x);
@@ -329,17 +331,17 @@ static int output_short(
 
                 switch(mode) {
                 case OUTPUT_SHORT_ISO:
-                        r = strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z", localtime_r(&t, &tm));
+                        r = strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z", gettime_r(&t, &tm));
                         break;
                 case OUTPUT_SHORT_PRECISE:
-                        r = strftime(buf, sizeof(buf), "%b %d %H:%M:%S", localtime_r(&t, &tm));
+                        r = strftime(buf, sizeof(buf), "%b %d %H:%M:%S", gettime_r(&t, &tm));
                         if (r > 0) {
                                 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
                                          ".%06llu", (unsigned long long) (x % USEC_PER_SEC));
                         }
                         break;
                 default:
-                        r = strftime(buf, sizeof(buf), "%b %d %H:%M:%S", localtime_r(&t, &tm));
+                        r = strftime(buf, sizeof(buf), "%b %d %H:%M:%S", gettime_r(&t, &tm));
                 }
 
                 if (r <= 0) {
@@ -445,6 +447,8 @@ static int output_verbose(
         }
 
         fprintf(f, "%s [%s]\n",
+                flags & OUTPUT_UTC ?
+                format_timestamp_us_utc(ts, sizeof(ts), realtime) :
                 format_timestamp_us(ts, sizeof(ts), realtime),
                 cursor);
 
@@ -695,7 +699,7 @@ static int output_json(
                         sd_id128_to_string(boot_id, sid));
         }
 
-        h = hashmap_new(string_hash_func, string_compare_func);
+        h = hashmap_new(&string_hash_ops);
         if (!h)
                 return -ENOMEM;
 
@@ -1032,7 +1036,7 @@ static int show_journal(FILE *f,
                 if (!(flags & OUTPUT_FOLLOW))
                         break;
 
-                r = sd_journal_wait(j, (usec_t) -1);
+                r = sd_journal_wait(j, USEC_INFINITY);
                 if (r < 0)
                         goto finish;
 
@@ -1151,7 +1155,7 @@ static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) {
         assert(machine);
         assert(boot_id);
 
-        if (!filename_is_safe(machine))
+        if (!machine_name_is_valid(machine))
                 return -EINVAL;
 
         r = container_get_leader(machine, &pid);
index 3a99160f1eec91ba468dcbec071c09fa75257602..187ee595fbafeccc3c2ef26ac60671964cae81bb 100644 (file)
@@ -25,7 +25,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
 
 #include "util.h"
 #include "output-mode.h"
index 32cf714857809b5ec591cd484c9e1c0671654529..9ee332c8dfaf74c4e0a0b8b2b0350d8db7446a98 100644 (file)
@@ -79,7 +79,8 @@
 #define XCONCATENATE(x, y) x ## y
 #define CONCATENATE(x, y) XCONCATENATE(x, y)
 
-#define UNIQUE(prefix) CONCATENATE(prefix, __LINE__)
+#define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq))
+#define UNIQ __COUNTER__
 
 /* Rounds up */
 
@@ -124,52 +125,77 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
  * @ptr: the pointer to the member.
  * @type: the type of the container struct this is embedded in.
  * @member: the name of the member within the struct.
- *
  */
-#define container_of(ptr, type, member)                                 \
+#define container_of(ptr, type, member) __container_of(UNIQ, (ptr), type, member)
+#define __container_of(uniq, ptr, type, member)                         \
         __extension__ ({                                                \
-                        const typeof( ((type *)0)->member ) *__mptr = (ptr); \
-                        (type *)( (char *)__mptr - offsetof(type,member) ); \
-                })
+                const typeof( ((type*)0)->member ) *UNIQ_T(A, uniq) = (ptr); \
+                (type*)( (char *)UNIQ_T(A, uniq) - offsetof(type,member) ); \
+        })
 
 #undef MAX
-#define MAX(a,b)                                 \
-        __extension__ ({                         \
-                        typeof(a) _a = (a);      \
-                        typeof(b) _b = (b);      \
-                        _a > _b ? _a : _b;       \
-                })
+#define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b))
+#define __MAX(aq, a, bq, b)                             \
+        __extension__ ({                                \
+                const typeof(a) UNIQ_T(A, aq) = (a);    \
+                const typeof(b) UNIQ_T(B, bq) = (b);    \
+                UNIQ_T(A,aq) > UNIQ_T(B,bq) ? UNIQ_T(A,aq) : UNIQ_T(B,bq); \
+        })
 
-#define MAX3(x,y,z)                              \
-        __extension__ ({                         \
-                        typeof(x) _c = MAX(x,y); \
-                        MAX(_c, z);              \
+/* evaluates to (void) if _A or _B are not constant or of different types */
+#define CONST_MAX(_A, _B) \
+        __extension__ (__builtin_choose_expr(                           \
+                __builtin_constant_p(_A) &&                             \
+                __builtin_constant_p(_B) &&                             \
+                __builtin_types_compatible_p(typeof(_A), typeof(_B)),   \
+                ((_A) > (_B)) ? (_A) : (_B),                            \
+                (void)0))
+
+/* takes two types and returns the size of the larger one */
+#define MAXSIZE(A, B) (sizeof(union _packed_ { typeof(A) a; typeof(B) b; }))
+
+#define MAX3(x,y,z)                                     \
+        __extension__ ({                                \
+                        const typeof(x) _c = MAX(x,y);  \
+                        MAX(_c, z);                     \
                 })
 
 #undef MIN
-#define MIN(a,b)                                \
-        __extension__ ({                        \
-                        typeof(a) _a = (a);     \
-                        typeof(b) _b = (b);     \
-                        _a < _b ? _a : _b;      \
-                })
+#define MIN(a, b) __MIN(UNIQ, (a), UNIQ, (b))
+#define __MIN(aq, a, bq, b)                             \
+        __extension__ ({                                \
+                const typeof(a) UNIQ_T(A, aq) = (a);    \
+                const typeof(b) UNIQ_T(B, bq) = (b);    \
+                UNIQ_T(A,aq) < UNIQ_T(B,bq) ? UNIQ_T(A,aq) : UNIQ_T(B,bq); \
+        })
 
-#define LESS_BY(A,B)                            \
-        __extension__ ({                        \
-                        typeof(A) _A = (A);     \
-                        typeof(B) _B = (B);     \
-                        _A > _B ? _A - _B : 0;  \
+#define MIN3(x,y,z)                                     \
+        __extension__ ({                                \
+                        const typeof(x) _c = MIN(x,y);  \
+                        MIN(_c, z);                     \
                 })
 
-#ifndef CLAMP
-#define CLAMP(x, low, high)                                             \
+#define LESS_BY(a, b) __LESS_BY(UNIQ, (a), UNIQ, (b))
+#define __LESS_BY(aq, a, bq, b)                         \
+        __extension__ ({                                \
+                const typeof(a) UNIQ_T(A, aq) = (a);    \
+                const typeof(b) UNIQ_T(B, bq) = (b);    \
+                UNIQ_T(A,aq) > UNIQ_T(B,bq) ? UNIQ_T(A,aq) - UNIQ_T(B,bq) : 0; \
+        })
+
+#undef CLAMP
+#define CLAMP(x, low, high) __CLAMP(UNIQ, (x), UNIQ, (low), UNIQ, (high))
+#define __CLAMP(xq, x, lowq, low, highq, high)                          \
         __extension__ ({                                                \
-                        typeof(x) _x = (x);                             \
-                        typeof(low) _low = (low);                       \
-                        typeof(high) _high = (high);                    \
-                        ((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \
-                })
-#endif
+                const typeof(x) UNIQ_T(X,xq) = (x);                     \
+                const typeof(low) UNIQ_T(LOW,lowq) = (low);             \
+                const typeof(high) UNIQ_T(HIGH,highq) = (high);         \
+                        UNIQ_T(X,xq) > UNIQ_T(HIGH,highq) ?             \
+                                UNIQ_T(HIGH,highq) :                    \
+                                UNIQ_T(X,xq) < UNIQ_T(LOW,lowq) ?       \
+                                        UNIQ_T(LOW,lowq) :              \
+                                        UNIQ_T(X,xq);                   \
+        })
 
 #define assert_se(expr)                                                 \
         do {                                                            \
@@ -201,7 +227,7 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
 #else
 #define assert_cc(expr)                                                 \
         DISABLE_WARNING_DECLARATION_AFTER_STATEMENT;                    \
-        struct UNIQUE(_assert_struct_) {                                \
+        struct CONCATENATE(_assert_struct_, __LINE__) {                 \
                 char x[(expr) ? 0 : -1];                                \
         };                                                              \
         REENABLE_WARNING
@@ -235,6 +261,9 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
 #define PTR_TO_UINT64(p) ((uint64_t) ((uintptr_t) (p)))
 #define UINT64_TO_PTR(u) ((void *) ((uintptr_t) (u)))
 
+#define PTR_TO_SIZE(p) ((size_t) ((uintptr_t) (p)))
+#define SIZE_TO_PTR(u) ((void *) ((uintptr_t) (u)))
+
 #define memzero(x,l) (memset((x), 0, (l)))
 #define zero(x) (memzero(&(x), sizeof(x)))
 
diff --git a/src/shared/memfd.c b/src/shared/memfd.c
new file mode 100644 (file)
index 0000000..162c12f
--- /dev/null
@@ -0,0 +1,221 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Lennart Poettering
+
+  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/>.
+***/
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+
+#ifdef HAVE_LINUX_MEMFD_H
+#  include <linux/memfd.h>
+#endif
+
+#include "util.h"
+#include "bus-label.h"
+#include "memfd.h"
+#include "utf8.h"
+#include "missing.h"
+
+int memfd_new(const char *name) {
+        _cleanup_free_ char *g = NULL;
+        int fd;
+
+        if (!name) {
+                char pr[17] = {};
+
+                /* If no name is specified we generate one. We include
+                 * a hint indicating our library implementation, and
+                 * add the thread name to it */
+
+                assert_se(prctl(PR_GET_NAME, (unsigned long) pr) >= 0);
+
+                if (isempty(pr))
+                        name = "sd";
+                else {
+                        _cleanup_free_ char *e = NULL;
+
+                        e = utf8_escape_invalid(pr);
+                        if (!e)
+                                return -ENOMEM;
+
+                        g = strappend("sd-", e);
+                        if (!g)
+                                return -ENOMEM;
+
+                        name = g;
+                }
+        }
+
+        fd = memfd_create(name, MFD_ALLOW_SEALING);
+        if (fd < 0)
+                return -errno;
+
+        return fd;
+}
+
+int memfd_map(int fd, uint64_t offset, size_t size, void **p) {
+        void *q;
+        int sealed;
+
+        assert(fd >= 0);
+        assert(size > 0);
+        assert(p);
+
+        sealed = memfd_get_sealed(fd);
+        if (sealed < 0)
+                return sealed;
+
+        if (sealed)
+                q = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, offset);
+        else
+                q = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset);
+
+        if (q == MAP_FAILED)
+                return -errno;
+
+        *p = q;
+        return 0;
+}
+
+int memfd_set_sealed(int fd) {
+        int r;
+
+        assert(fd >= 0);
+
+        r = fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
+        if (r < 0)
+                return -errno;
+
+        return 0;
+}
+
+int memfd_get_sealed(int fd) {
+        int r;
+
+        assert(fd >= 0);
+
+        r = fcntl(fd, F_GET_SEALS);
+        if (r < 0)
+                return -errno;
+
+        return (r & (F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE)) ==
+                    (F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE);
+}
+
+int memfd_get_size(int fd, uint64_t *sz) {
+        struct stat stat;
+        int r;
+
+        assert(fd >= 0);
+        assert(sz);
+
+        r = fstat(fd, &stat);
+        if (r < 0)
+                return -errno;
+
+        *sz = stat.st_size;
+        return 0;
+}
+
+int memfd_set_size(int fd, uint64_t sz) {
+        int r;
+
+        assert(fd >= 0);
+
+        r = ftruncate(fd, sz);
+        if (r < 0)
+                return -errno;
+
+        return 0;
+}
+
+int memfd_new_and_map(const char *name, size_t sz, void **p) {
+        _cleanup_close_ int fd = -1;
+        int r;
+
+        assert(sz > 0);
+        assert(p);
+
+        fd = memfd_new(name);
+        if (fd < 0)
+                return fd;
+
+        r = memfd_set_size(fd, sz);
+        if (r < 0)
+                return r;
+
+        r = memfd_map(fd, 0, sz, p);
+        if (r < 0)
+                return r;
+
+        r = fd;
+        fd = -1;
+
+        return r;
+}
+
+int memfd_get_name(int fd, char **name) {
+        char path[sizeof("/proc/self/fd/") + DECIMAL_STR_MAX(int)], buf[FILENAME_MAX+1], *e;
+        const char *delim, *end;
+        _cleanup_free_ char *n = NULL;
+        ssize_t k;
+
+        assert(fd >= 0);
+        assert(name);
+
+        sprintf(path, "/proc/self/fd/%i", fd);
+
+        k = readlink(path, buf, sizeof(buf));
+        if (k < 0)
+                return -errno;
+
+        if ((size_t) k >= sizeof(buf))
+                return -E2BIG;
+
+        buf[k] = 0;
+
+        delim = strstr(buf, ":[");
+        if (!delim)
+                return -EIO;
+
+        delim = strchr(delim + 2, ':');
+        if (!delim)
+                return -EIO;
+
+        delim++;
+
+        end = strchr(delim, ']');
+        if (!end)
+                return -EIO;
+
+        n = strndup(delim, end - delim);
+        if (!n)
+                return -ENOMEM;
+
+        e = utf8_escape_invalid(n);
+        if (!e)
+                return -ENOMEM;
+
+        *name = e;
+
+        return 0;
+}
diff --git a/src/shared/memfd.h b/src/shared/memfd.h
new file mode 100644 (file)
index 0000000..8f02b0f
--- /dev/null
@@ -0,0 +1,42 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Lennart Poettering
+
+  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/>.
+***/
+
+#include <inttypes.h>
+#include <sys/types.h>
+#include <stdio.h>
+
+#include "macro.h"
+#include "util.h"
+
+int memfd_new(const char *name);
+int memfd_new_and_map(const char *name, size_t sz, void **p);
+
+int memfd_map(int fd, uint64_t offset, size_t size, void **p);
+
+int memfd_set_sealed(int fd);
+int memfd_get_sealed(int fd);
+
+int memfd_get_size(int fd, uint64_t *sz);
+int memfd_set_size(int fd, uint64_t sz);
+
+int memfd_get_name(int fd, char **name);
diff --git a/src/shared/mempool.c b/src/shared/mempool.c
new file mode 100644 (file)
index 0000000..b39a37f
--- /dev/null
@@ -0,0 +1,94 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2010-2014 Lennart Poettering
+  Copyright 2014 Michal Schmidt
+
+  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/>.
+***/
+
+#include "mempool.h"
+#include "macro.h"
+#include "util.h"
+
+struct pool {
+        struct pool *next;
+        unsigned n_tiles;
+        unsigned n_used;
+};
+
+void* mempool_alloc_tile(struct mempool *mp) {
+        unsigned i;
+
+        /* When a tile is released we add it to the list and simply
+         * place the next pointer at its offset 0. */
+
+        assert(mp->tile_size >= sizeof(void*));
+        assert(mp->at_least > 0);
+
+        if (mp->freelist) {
+                void *r;
+
+                r = mp->freelist;
+                mp->freelist = * (void**) mp->freelist;
+                return r;
+        }
+
+        if (_unlikely_(!mp->first_pool) ||
+            _unlikely_(mp->first_pool->n_used >= mp->first_pool->n_tiles)) {
+                unsigned n;
+                size_t size;
+                struct pool *p;
+
+                n = mp->first_pool ? mp->first_pool->n_tiles : 0;
+                n = MAX(mp->at_least, n * 2);
+                size = PAGE_ALIGN(ALIGN(sizeof(struct pool)) + n*mp->tile_size);
+                n = (size - ALIGN(sizeof(struct pool))) / mp->tile_size;
+
+                p = malloc(size);
+                if (!p)
+                        return NULL;
+
+                p->next = mp->first_pool;
+                p->n_tiles = n;
+                p->n_used = 0;
+
+                mp->first_pool = p;
+        }
+
+        i = mp->first_pool->n_used++;
+
+        return ((uint8_t*) mp->first_pool) + ALIGN(sizeof(struct pool)) + i*mp->tile_size;
+}
+
+void mempool_free_tile(struct mempool *mp, void *p) {
+        * (void**) p = mp->freelist;
+        mp->freelist = p;
+}
+
+#ifdef VALGRIND
+
+void mempool_drop(struct mempool *mp) {
+        struct pool *p = mp->first_pool;
+        while (p) {
+                struct pool *n;
+                n = p->next;
+                free(p);
+                p = n;
+        }
+}
+
+#endif
diff --git a/src/shared/mempool.h b/src/shared/mempool.h
new file mode 100644 (file)
index 0000000..8b0bf38
--- /dev/null
@@ -0,0 +1,48 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2011-2014 Lennart Poettering
+  Copyright 2014 Michal Schmidt
+
+  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/>.
+***/
+
+#include <stddef.h>
+
+struct pool;
+
+struct mempool {
+        struct pool *first_pool;
+        void *freelist;
+        size_t tile_size;
+        unsigned at_least;
+};
+
+void* mempool_alloc_tile(struct mempool *mp);
+void mempool_free_tile(struct mempool *mp, void *p);
+
+#define DEFINE_MEMPOOL(pool_name, tile_type, alloc_at_least) \
+struct mempool pool_name = { \
+        .tile_size = sizeof(tile_type), \
+        .at_least = alloc_at_least, \
+}
+
+
+#ifdef VALGRIND
+void mempool_drop(struct mempool *mp);
+#endif
index f129f0b2d3b78b302571e3569ab5a2ef8aae03ae..bb4f8f23a8c2d7138de00e9067fa833b0a47b8b9 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/input.h>
 #include <linux/if_link.h>
 #include <linux/loop.h>
-#include <linux/if_link.h>
 
 #ifdef HAVE_AUDIT
 #include <libaudit.h>
 #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
 #endif
 
+#ifndef F_ADD_SEALS
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+
+#define F_SEAL_SEAL     0x0001  /* prevent further seals from being set */
+#define F_SEAL_SHRINK   0x0002  /* prevent file from shrinking */
+#define F_SEAL_GROW     0x0004  /* prevent file from growing */
+#define F_SEAL_WRITE    0x0008  /* prevent writes */
+#endif
+
+#ifndef MFD_ALLOW_SEALING
+#define MFD_ALLOW_SEALING 0x0002ULL
+#endif
+
 #ifndef IP_FREEBIND
 #define IP_FREEBIND 15
 #endif
@@ -103,66 +116,27 @@ static inline int pivot_root(const char *new_root, const char *put_old) {
 #endif
 
 #ifdef __x86_64__
-#  ifndef __NR_fanotify_init
-#    define __NR_fanotify_init 300
+#  ifndef __NR_memfd_create
+#    define __NR_memfd_create 319
 #  endif
-#  ifndef __NR_fanotify_mark
-#    define __NR_fanotify_mark 301
+#elif defined __arm__
+#  ifndef __NR_memfd_create
+#    define __NR_memfd_create 385
 #  endif
 #elif defined _MIPS_SIM
-#  if _MIPS_SIM == _MIPS_SIM_ABI32
-#    ifndef __NR_fanotify_init
-#      define __NR_fanotify_init 4336
-#    endif
-#    ifndef __NR_fanotify_mark
-#      define __NR_fanotify_mark 4337
-#    endif
-#  elif _MIPS_SIM == _MIPS_SIM_NABI32
-#    ifndef __NR_fanotify_init
-#      define __NR_fanotify_init 6300
-#    endif
-#    ifndef __NR_fanotify_mark
-#      define __NR_fanotify_mark 6301
-#    endif
-#  elif _MIPS_SIM == _MIPS_SIM_ABI64
-#    ifndef __NR_fanotify_init
-#      define __NR_fanotify_init 5295
-#    endif
-#    ifndef __NR_fanotify_mark
-#      define __NR_fanotify_mark 5296
-#    endif
+#  ifndef __NR_memfd_create
+#    warning "__NR_memfd_create not yet defined for MIPS"
+#    define __NR_memfd_create 0xffffffff
 #  endif
 #else
-#  ifndef __NR_fanotify_init
-#    define __NR_fanotify_init 338
+#  ifndef __NR_memfd_create
+#    define __NR_memfd_create 356
 #  endif
-#  ifndef __NR_fanotify_mark
-#    define __NR_fanotify_mark 339
-#  endif
-#endif
-
-#ifndef HAVE_FANOTIFY_INIT
-static inline int fanotify_init(unsigned int flags, unsigned int event_f_flags) {
-        return syscall(__NR_fanotify_init, flags, event_f_flags);
-}
 #endif
 
-#ifndef HAVE_FANOTIFY_MARK
-static inline int fanotify_mark(int fanotify_fd, unsigned int flags, uint64_t mask,
-                                int dfd, const char *pathname) {
-#if defined _MIPS_SIM && _MIPS_SIM == _MIPS_SIM_ABI32 || defined __powerpc__ && !defined __powerpc64__ \
-    || defined __arm__ && !defined __aarch64__
-        union {
-                uint64_t _64;
-                uint32_t _32[2];
-        } _mask;
-        _mask._64 = mask;
-
-        return syscall(__NR_fanotify_mark, fanotify_fd, flags,
-                       _mask._32[0], _mask._32[1], dfd, pathname);
-#else
-        return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, pathname);
-#endif
+#ifndef HAVE_MEMFD_CREATE
+static inline int memfd_create(const char *name, unsigned int flags) {
+        return syscall(__NR_memfd_create, name, flags);
 }
 #endif
 
@@ -210,7 +184,8 @@ struct btrfs_ioctl_fs_info_args {
 #endif
 
 #ifndef BTRFS_IOC_DEFRAG
-#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, struct btrfs_ioctl_vol_args)
+#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
+                                 struct btrfs_ioctl_vol_args)
 #endif
 
 #ifndef BTRFS_IOC_DEV_INFO
@@ -220,7 +195,12 @@ struct btrfs_ioctl_fs_info_args {
 
 #ifndef BTRFS_IOC_FS_INFO
 #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \
-                               struct btrfs_ioctl_fs_info_args)
+                                 struct btrfs_ioctl_fs_info_args)
+#endif
+
+#ifndef BTRFS_IOC_DEVICES_READY
+#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \
+                                 struct btrfs_ioctl_vol_args)
 #endif
 
 #ifndef BTRFS_SUPER_MAGIC
@@ -371,6 +351,27 @@ static inline int setns(int fd, int nstype) {
 #define LOOP_CTL_GET_FREE 0x4C82
 #endif
 
+#if !HAVE_DECL_IFLA_MACVLAN_FLAGS
+#define IFLA_MACVLAN_UNSPEC 0
+#define IFLA_MACVLAN_MODE 1
+#define IFLA_MACVLAN_FLAGS 2
+#define __IFLA_MACVLAN_MAX 3
+
+#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
+#endif
+
+#if !HAVE_DECL_IFLA_VTI_REMOTE
+#define IFLA_VTI_UNSPEC 0
+#define IFLA_VTI_LINK 1
+#define IFLA_VTI_IKEY 2
+#define IFLA_VTI_OKEY 3
+#define IFLA_VTI_LOCAL 4
+#define IFLA_VTI_REMOTE 5
+#define __IFLA_VTI_MAX 6
+
+#define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1)
+#endif
+
 #if !HAVE_DECL_IFLA_PHYS_PORT_ID
 #undef IFLA_PROMISCUITY
 #define IFLA_PROMISCUITY 30
@@ -478,3 +479,60 @@ static inline int setns(int fd, int nstype) {
 
 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
 #endif
+
+#ifndef IPV6_UNICAST_IF
+#define IPV6_UNICAST_IF 76
+#endif
+
+#ifndef IFF_MULTI_QUEUE
+#define IFF_MULTI_QUEUE 0x100
+#endif
+
+#ifndef IFF_LOWER_UP
+#define IFF_LOWER_UP 0x10000
+#endif
+
+#ifndef IFF_DORMANT
+#define IFF_DORMANT 0x20000
+#endif
+
+#ifndef BOND_XMIT_POLICY_ENCAP23
+#define BOND_XMIT_POLICY_ENCAP23 3
+#endif
+
+#ifndef BOND_XMIT_POLICY_ENCAP34
+#define BOND_XMIT_POLICY_ENCAP34 4
+#endif
+
+#ifndef NET_ADDR_RANDOM
+#  define NET_ADDR_RANDOM 1
+#endif
+
+#ifndef NET_NAME_ENUM
+#  define NET_NAME_ENUM 1
+#endif
+
+#ifndef NET_NAME_PREDICTABLE
+#  define NET_NAME_PREDICTABLE 2
+#endif
+
+#ifndef NET_NAME_USER
+#  define NET_NAME_USER 3
+#endif
+
+#ifndef NET_NAME_RENAMED
+#  define NET_NAME_RENAMED 4
+#endif
+
+#ifndef BPF_XOR
+#  define BPF_XOR 0xa0
+#endif
+
+/* Note that LOOPBACK_IFINDEX is currently not exported by the
+ * kernel/glibc, but hardcoded internally by the kernel.  However, as
+ * it is exported to userspace indirectly via rtnetlink and the
+ * ioctls, and made use of widely we define it here too, in a way that
+ * is compatible with the kernel's internal definition. */
+#ifndef LOOPBACK_IFINDEX
+#define LOOPBACK_IFINDEX 1
+#endif
index 4ee6251bcdf055cf4ab73802ca3447456d5364b4..ee11ac06ff6b88c4289ccc415dee64b32c27865d 100644 (file)
 #include "path-util.h"
 #include "mkdir.h"
 
-int mkdir_label(const char *path, mode_t mode) {
-        return label_mkdir(path, mode);
-}
-
 int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) {
-        return mkdir_safe_internal(path, mode, uid, gid, label_mkdir);
+        return mkdir_safe_internal(path, mode, uid, gid, mkdir_label);
 }
 
 int mkdir_parents_label(const char *path, mode_t mode) {
-        return mkdir_parents_internal(NULL, path, mode, label_mkdir);
-}
-
-int mkdir_parents_prefix_label(const char *prefix, const char *path, mode_t mode) {
-        return mkdir_parents_internal(prefix, path, mode, label_mkdir);
+        return mkdir_parents_internal(NULL, path, mode, mkdir_label);
 }
 
 int mkdir_p_label(const char *path, mode_t mode) {
-        return mkdir_p_internal(NULL, path, mode, label_mkdir);
+        return mkdir_p_internal(NULL, path, mode, mkdir_label);
 }
index f941efb401809333240dbef8e0eeefdbc3919cee..ef3f494cc8b71d5fc1bda70c5fd5f7eb24f010dd 100644 (file)
@@ -58,20 +58,6 @@ int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid) {
         return mkdir_safe_internal(path, mode, uid, gid, mkdir);
 }
 
-int is_dir(const char* path, bool follow) {
-        struct stat st;
-
-        if (follow) {
-                if (stat(path, &st) < 0)
-                        return -errno;
-        } else {
-                if (lstat(path, &st) < 0)
-                        return -errno;
-        }
-
-        return S_ISDIR(st.st_mode);
-}
-
 int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir) {
         const char *p, *e;
         int r;
@@ -144,7 +130,3 @@ int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, mkdir_fu
 int mkdir_p(const char *path, mode_t mode) {
         return mkdir_p_internal(NULL, path, mode, mkdir);
 }
-
-int mkdir_p_prefix(const char *prefix, const char *path, mode_t mode) {
-        return mkdir_p_internal(prefix, path, mode, mkdir);
-}
index d15ede60646b6269988d3431a5ec0efd4c333fed..e317df300eeb7cccaaf38058e93207bb7250491a 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
 #include <sys/types.h>
 
 int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid);
 int mkdir_parents(const char *path, mode_t mode);
 int mkdir_p(const char *path, mode_t mode);
-int mkdir_p_prefix(const char *prefix, const char *path, mode_t mode);
 
-/* selinux versions */
-int mkdir_label(const char *path, mode_t mode);
+/* mandatory access control(MAC) versions */
 int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid);
 int mkdir_parents_label(const char *path, mode_t mode);
 int mkdir_p_label(const char *path, mode_t mode);
-int mkdir_parents_prefix_label(const char *prefix, const char *path, mode_t mode);
 
 /* internally used */
 typedef int (*mkdir_func_t)(const char *pathname, mode_t mode);
 int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir);
 int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir);
 int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir);
-int is_dir(const char *path, bool is_dir);
diff --git a/src/shared/nss-util.h b/src/shared/nss-util.h
new file mode 100644 (file)
index 0000000..230a986
--- /dev/null
@@ -0,0 +1,128 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <nss.h>
+#include <netdb.h>
+#include <resolv.h>
+
+#define NSS_GETHOSTBYNAME_PROTOTYPES(module)            \
+enum nss_status _nss_##module##_gethostbyname4_r(       \
+                const char *name,                       \
+                struct gaih_addrtuple **pat,            \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop,             \
+                int32_t *ttlp) _public_;                \
+enum nss_status _nss_##module##_gethostbyname3_r(       \
+                const char *name,                       \
+                int af,                                 \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop,             \
+                int32_t *ttlp,                          \
+                char **canonp) _public_;                \
+enum nss_status _nss_##module##_gethostbyname2_r(       \
+                const char *name,                       \
+                int af,                                 \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop) _public_;   \
+enum nss_status _nss_##module##_gethostbyname_r(        \
+                const char *name,                       \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop) _public_
+
+#define NSS_GETHOSTBYADDR_PROTOTYPES(module)            \
+enum nss_status _nss_##module##_gethostbyaddr2_r(       \
+                const void* addr, socklen_t len,        \
+                int af,                                 \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop,             \
+                int32_t *ttlp) _public_;                \
+enum nss_status _nss_##module##_gethostbyaddr_r(        \
+                const void* addr, socklen_t len,        \
+                int af,                                 \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop) _public_
+
+#define NSS_GETHOSTBYNAME_FALLBACKS(module)             \
+enum nss_status _nss_##module##_gethostbyname2_r(       \
+                const char *name,                       \
+                int af,                                 \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop) {           \
+        return _nss_##module##_gethostbyname3_r(        \
+                        name,                           \
+                        af,                             \
+                        host,                           \
+                        buffer, buflen,                 \
+                        errnop, h_errnop,               \
+                        NULL,                           \
+                        NULL);                          \
+}                                                       \
+enum nss_status _nss_##module##_gethostbyname_r(        \
+                const char *name,                       \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop) {           \
+        enum nss_status ret = NSS_STATUS_NOTFOUND;      \
+                                                        \
+        if (_res.options & RES_USE_INET6)               \
+                ret = _nss_##module##_gethostbyname3_r( \
+                        name,                           \
+                        AF_INET6,                       \
+                        host,                           \
+                        buffer, buflen,                 \
+                        errnop, h_errnop,               \
+                        NULL,                           \
+                        NULL);                          \
+        if (ret == NSS_STATUS_NOTFOUND)                 \
+                ret = _nss_##module##_gethostbyname3_r( \
+                        name,                           \
+                        AF_INET,                        \
+                        host,                           \
+                        buffer, buflen,                 \
+                        errnop, h_errnop,               \
+                        NULL,                           \
+                        NULL);                          \
+       return ret;                                      \
+}
+
+#define NSS_GETHOSTBYADDR_FALLBACKS(module)             \
+enum nss_status _nss_##module##_gethostbyaddr_r(        \
+                const void* addr, socklen_t len,        \
+                int af,                                 \
+                struct hostent *host,                   \
+                char *buffer, size_t buflen,            \
+                int *errnop, int *h_errnop) {           \
+        return _nss_##module##_gethostbyaddr2_r(        \
+                        addr, len,                      \
+                        af,                             \
+                        host,                           \
+                        buffer, buflen,                 \
+                        errnop, h_errnop,               \
+                        NULL);                          \
+}
index ac1bb0123b5fbcff4845b46211387c0307dc3e1c..81d7f05d91e2aaebdac5251ab2af7fcc036afe82 100644 (file)
@@ -44,4 +44,5 @@ typedef enum OutputFlags {
         OUTPUT_COLOR          = 1 << 4,
         OUTPUT_CATALOG        = 1 << 5,
         OUTPUT_BEGIN_NEWLINE  = 1 << 6,
+        OUTPUT_UTC            = 1 << 7,
 } OutputFlags;
index 002e3aa37356c7b0f556dd635bcacade31c7d502..54790947ba7d82eb678e73b1d99fd888bbe6094b 100644 (file)
@@ -150,3 +150,56 @@ void pager_close(void) {
 bool pager_have(void) {
         return pager_pid > 0;
 }
+
+int show_man_page(const char *desc, bool null_stdio) {
+        const char *args[4] = { "man", NULL, NULL, NULL };
+        char *e = NULL;
+        pid_t pid;
+        size_t k;
+        int r;
+        siginfo_t status;
+
+        k = strlen(desc);
+
+        if (desc[k-1] == ')')
+                e = strrchr(desc, '(');
+
+        if (e) {
+                char *page = NULL, *section = NULL;
+
+                page = strndupa(desc, e - desc);
+                section = strndupa(e + 1, desc + k - e - 2);
+
+                args[1] = section;
+                args[2] = page;
+        } else
+                args[1] = desc;
+
+        pid = fork();
+        if (pid < 0) {
+                log_error("Failed to fork: %m");
+                return -errno;
+        }
+
+        if (pid == 0) {
+                /* Child */
+                if (null_stdio) {
+                        r = make_null_stdio();
+                        if (r < 0) {
+                                log_error("Failed to kill stdio: %s", strerror(-r));
+                                _exit(EXIT_FAILURE);
+                        }
+                }
+
+                execvp(args[0], (char**) args);
+                log_error("Failed to execute man: %m");
+                _exit(EXIT_FAILURE);
+        }
+
+        r = wait_for_terminate(pid, &status);
+        if (r < 0)
+                return r;
+
+        log_debug("Exit code %i status %i", status.si_code, status.si_status);
+        return status.si_status;
+}
index 03dca8bc03e8331513c6365d3e9d1358e2745cf3..67446170d0337d7f853d26e6c0c4b30c475be1a3 100644 (file)
@@ -28,3 +28,5 @@
 int pager_open(bool jump_to_end);
 void pager_close(void);
 bool pager_have(void) _pure_;
+
+int show_man_page(const char *page, bool null_stdio);
index e0aaf4431fbd8f53789760085e5643c4f568d5db..8f75a8e83290db85540d544d82af45c4343e2852 100644 (file)
 #include "path-util.h"
 #include "path-lookup.h"
 
-static const char* const systemd_running_as_table[_SYSTEMD_RUNNING_AS_MAX] = {
-        [SYSTEMD_SYSTEM] = "system",
-        [SYSTEMD_USER] = "user"
-};
-
-DEFINE_STRING_TABLE_LOOKUP(systemd_running_as, SystemdRunningAs);
-
 int user_config_home(char **config_home) {
         const char *e;
         char *r;
@@ -68,6 +61,23 @@ int user_config_home(char **config_home) {
         return 0;
 }
 
+int user_runtime_dir(char **runtime_dir) {
+        const char *e;
+        char *r;
+
+        e = getenv("XDG_RUNTIME_DIR");
+        if (e) {
+                r = strappend(e, "/systemd/user");
+                if (!r)
+                        return -ENOMEM;
+
+                *runtime_dir = r;
+                return 1;
+        }
+
+        return 0;
+}
+
 static char** user_dirs(
                 const char *generator,
                 const char *generator_early,
@@ -76,10 +86,11 @@ static char** user_dirs(
         const char * const config_unit_paths[] = {
                 USER_CONFIG_UNIT_PATH,
                 "/etc/systemd/user",
-                "/run/systemd/user",
                 NULL
         };
 
+        const char * const runtime_unit_path = "/run/systemd/user";
+
         const char * const data_unit_paths[] = {
                 "/usr/local/lib/systemd/user",
                 "/usr/local/share/systemd/user",
@@ -90,7 +101,7 @@ static char** user_dirs(
         };
 
         const char *home, *e;
-        _cleanup_free_ char *config_home = NULL, *data_home = NULL;
+        _cleanup_free_ char *config_home = NULL, *runtime_dir = NULL, *data_home = NULL;
         _cleanup_strv_free_ char **config_dirs = NULL, **data_dirs = NULL;
         char **r = NULL;
 
@@ -106,6 +117,9 @@ static char** user_dirs(
         if (user_config_home(&config_home) < 0)
                 goto fail;
 
+        if (user_runtime_dir(&runtime_dir) < 0)
+                goto fail;
+
         home = getenv("HOME");
 
         e = getenv("XDG_CONFIG_DIRS");
@@ -125,26 +139,8 @@ static char** user_dirs(
                         goto fail;
 
         } else if (home) {
-                _cleanup_free_ char *data_home_parent = NULL;
-
                 if (asprintf(&data_home, "%s/.local/share/systemd/user", home) < 0)
                         goto fail;
-
-                /* There is really no need for two unit dirs in $HOME,
-                 * except to be fully compliant with the XDG spec. We
-                 * now try to link the two dirs, so that we can
-                 * minimize disk seeks a little. Further down we'll
-                 * then filter out this link, if it is actually is
-                 * one. */
-
-                if (path_get_parent(data_home, &data_home_parent) >= 0) {
-                        _cleanup_free_ char *config_home_relative = NULL;
-
-                        if (path_make_relative(data_home_parent, config_home, &config_home_relative) >= 0) {
-                                mkdir_parents_label(data_home, 0777);
-                                (void) symlink(config_home_relative, data_home);
-                        }
-                }
         }
 
         e = getenv("XDG_DATA_DIRS");
@@ -173,6 +169,13 @@ static char** user_dirs(
         if (strv_extend_strv(&r, (char**) config_unit_paths) < 0)
                 goto fail;
 
+        if (runtime_dir)
+                if (strv_extend(&r, runtime_dir) < 0)
+                        goto fail;
+
+        if (strv_extend(&r, runtime_unit_path) < 0)
+                goto fail;
+
         if (generator)
                 if (strv_extend(&r, generator) < 0)
                         goto fail;
@@ -212,6 +215,7 @@ int lookup_paths_init(
                 const char *generator_late) {
 
         const char *e;
+        bool append = false; /* Add items from SYSTEMD_UNIT_PATH before normal directories */
 
         assert(p);
 
@@ -219,69 +223,76 @@ int lookup_paths_init(
          * vars */
         e = getenv("SYSTEMD_UNIT_PATH");
         if (e) {
+                if (endswith(e, ":")) {
+                        e = strndupa(e, strlen(e) - 1);
+                        append = true;
+                }
+
+                /* FIXME: empty components in other places should be
+                 * rejected. */
+
                 p->unit_path = path_split_and_make_absolute(e);
                 if (!p->unit_path)
                         return -ENOMEM;
         } else
                 p->unit_path = NULL;
 
-        if (strv_isempty(p->unit_path)) {
-                /* Nothing is set, so let's figure something out. */
-                strv_free(p->unit_path);
+        if (!p->unit_path || append) {
+                /* Let's figure something out. */
+
+                _cleanup_strv_free_ char **unit_path;
+                int r;
 
                 /* For the user units we include share/ in the search
-                 * path in order to comply with the XDG basedir
-                 * spec. For the system stuff we avoid such
-                 * nonsense. OTOH we include /lib in the search path
-                 * for the system stuff but avoid it for user
-                 * stuff. */
+                 * path in order to comply with the XDG basedir spec.
+                 * For the system stuff we avoid such nonsense. OTOH
+                 * we include /lib in the search path for the system
+                 * stuff but avoid it for user stuff. */
 
                 if (running_as == SYSTEMD_USER) {
-
                         if (personal)
-                                p->unit_path = user_dirs(generator, generator_early, generator_late);
+                                unit_path = user_dirs(generator, generator_early, generator_late);
                         else
-                                p->unit_path = strv_new(
-                                                /* If you modify this you also want to modify
-                                                 * systemduserunitpath= in systemd.pc.in, and
-                                                 * the arrays in user_dirs() above! */
-                                                STRV_IFNOTNULL(generator_early),
-                                                USER_CONFIG_UNIT_PATH,
-                                                "/etc/systemd/user",
-                                                "/run/systemd/user",
-                                                STRV_IFNOTNULL(generator),
-                                                "/usr/local/lib/systemd/user",
-                                                "/usr/local/share/systemd/user",
-                                                USER_DATA_UNIT_PATH,
-                                                "/usr/lib/systemd/user",
-                                                "/usr/share/systemd/user",
-                                                STRV_IFNOTNULL(generator_late),
-                                                NULL);
-
-                        if (!p->unit_path)
-                                return -ENOMEM;
-
-                } else {
-                        p->unit_path = strv_new(
+                                unit_path = strv_new(
                                         /* If you modify this you also want to modify
-                                         * systemdsystemunitpath= in systemd.pc.in! */
+                                         * systemduserunitpath= in systemd.pc.in, and
+                                         * the arrays in user_dirs() above! */
                                         STRV_IFNOTNULL(generator_early),
-                                        SYSTEM_CONFIG_UNIT_PATH,
-                                        "/etc/systemd/system",
-                                        "/run/systemd/system",
+                                        USER_CONFIG_UNIT_PATH,
+                                        "/etc/systemd/user",
+                                        "/run/systemd/user",
                                         STRV_IFNOTNULL(generator),
-                                        "/usr/local/lib/systemd/system",
-                                        SYSTEM_DATA_UNIT_PATH,
-                                        "/usr/lib/systemd/system",
-#ifdef HAVE_SPLIT_USR
-                                        "/lib/systemd/system",
-#endif
+                                        "/usr/local/lib/systemd/user",
+                                        "/usr/local/share/systemd/user",
+                                        USER_DATA_UNIT_PATH,
+                                        "/usr/lib/systemd/user",
+                                        "/usr/share/systemd/user",
                                         STRV_IFNOTNULL(generator_late),
                                         NULL);
+                } else
+                        unit_path = strv_new(
+                                /* If you modify this you also want to modify
+                                 * systemdsystemunitpath= in systemd.pc.in! */
+                                STRV_IFNOTNULL(generator_early),
+                                SYSTEM_CONFIG_UNIT_PATH,
+                                "/etc/systemd/system",
+                                "/run/systemd/system",
+                                STRV_IFNOTNULL(generator),
+                                "/usr/local/lib/systemd/system",
+                                SYSTEM_DATA_UNIT_PATH,
+                                "/usr/lib/systemd/system",
+#ifdef HAVE_SPLIT_USR
+                                "/lib/systemd/system",
+#endif
+                                STRV_IFNOTNULL(generator_late),
+                                NULL);
 
-                        if (!p->unit_path)
-                                return -ENOMEM;
-                }
+                if (!unit_path)
+                        return -ENOMEM;
+
+                r = strv_extend_strv(&p->unit_path, unit_path);
+                if (r < 0)
+                        return r;
         }
 
         if (!path_strv_resolve_uniq(p->unit_path, root_dir))
index 4c77bee39382d614ddfb77ddb220604f32c65c01..b8a0aace83ad8c0a83e78a1c98233de9f5969d4b 100644 (file)
@@ -38,12 +38,8 @@ typedef enum SystemdRunningAs {
         _SYSTEMD_RUNNING_AS_INVALID = -1
 } SystemdRunningAs;
 
-#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)
-
-const char* systemd_running_as_to_string(SystemdRunningAs i) _const_;
-SystemdRunningAs systemd_running_as_from_string(const char *s) _pure_;
-
 int user_config_home(char **config_home);
+int user_runtime_dir(char **runtime_dir);
 
 int lookup_paths_init(LookupPaths *p,
                       SystemdRunningAs running_as,
@@ -53,3 +49,5 @@ int lookup_paths_init(LookupPaths *p,
                       const char *generator_early,
                       const char *generator_late);
 void lookup_paths_free(LookupPaths *p);
+
+#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free)
index e68d3677a7a1b46fa4f7bfb66791f97f0f3dd028..67566bc76b2c8a0ad54b357ea41c0ad3736b49f2 100644 (file)
@@ -435,6 +435,22 @@ bool path_equal(const char *a, const char *b) {
         }
 }
 
+char* path_join(const char *root, const char *path, const char *rest) {
+        assert(path);
+
+        if (!isempty(root))
+                return strjoin(root, "/",
+                               path[0] == '/' ? path+1 : path,
+                               rest ? "/" : NULL,
+                               rest && rest[0] == '/' ? rest+1 : rest,
+                               NULL);
+        else
+                return strjoin(path,
+                               rest ? "/" : NULL,
+                               rest && rest[0] == '/' ? rest+1 : rest,
+                               NULL);
+}
+
 int path_is_mount_point(const char *t, bool allow_symlink) {
 
         union file_handle_union h = {
@@ -517,7 +533,16 @@ int path_is_read_only_fs(const char *path) {
         if (statvfs(path, &st) < 0)
                 return -errno;
 
-        return !!(st.f_flag & ST_RDONLY);
+        if (st.f_flag & ST_RDONLY)
+                return true;
+
+        /* On NFS, statvfs() might not reflect whether we can actually
+         * write to the remote share. Let's try again with
+         * access(W_OK) which is more reliable, at least sometimes. */
+        if (access(path, W_OK) < 0 && errno == EROFS)
+                return true;
+
+        return false;
 }
 
 int path_is_os_tree(const char *path) {
@@ -558,7 +583,7 @@ int find_binary(const char *name, char **filename) {
                 return 0;
         } else {
                 const char *path;
-                char *state, *w;
+                const char *word, *state;
                 size_t l;
 
                 /**
@@ -569,10 +594,10 @@ int find_binary(const char *name, char **filename) {
                 if (!path)
                         path = DEFAULT_PATH;
 
-                FOREACH_WORD_SEPARATOR(w, l, path, ":", state) {
+                FOREACH_WORD_SEPARATOR(word, l, path, ":", state) {
                         _cleanup_free_ char *p = NULL;
 
-                        if (asprintf(&p, "%.*s/%s", (int) l, w, name) < 0)
+                        if (asprintf(&p, "%.*s/%s", (int) l, word, name) < 0)
                                 return -ENOMEM;
 
                         if (access(p, X_OK) < 0)
@@ -636,7 +661,7 @@ int fsck_exists(const char *fstype) {
         if (r < 0)
                 return r;
 
-        /* An fsck that is linked to /bin/true is a non-existant
+        /* An fsck that is linked to /bin/true is a non-existent
          * fsck */
 
         r = readlink_malloc(p, &d);
index 976d2b26d09575190d7d0f4a8d880709dd375d94..8d171a57ec0ae8053568f904ed222d90aac02dc8 100644 (file)
@@ -45,6 +45,7 @@ int path_make_relative(const char *from_dir, const char *to_path, char **_r);
 char* path_kill_slashes(char *path);
 char* path_startswith(const char *path, const char *prefix) _pure_;
 bool path_equal(const char *a, const char *b) _pure_;
+char* path_join(const char *root, const char *path, const char *rest);
 
 char** path_strv_make_absolute_cwd(char **l);
 char** path_strv_resolve(char **l, const char *prefix);
@@ -64,8 +65,8 @@ int fsck_exists(const char *fstype);
  * the tree, to root. Also returns "" (and not "/"!) for the root
  * directory. Excludes the specified directory itself */
 #define PATH_FOREACH_PREFIX(prefix, path) \
-        for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); streq(prefix, "/") ? NULL : strrchr(prefix, '/'); }); _slash && !(*_slash = 0); _slash = strrchr((prefix), '/'))
+        for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); streq(prefix, "/") ? NULL : strrchr(prefix, '/'); }); _slash && ((*_slash = 0), true); _slash = strrchr((prefix), '/'))
 
 /* Same as PATH_FOREACH_PREFIX but also includes the specified path itself */
 #define PATH_FOREACH_PREFIX_MORE(prefix, path) \
-        for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); if (streq(prefix, "/")) prefix[0] = 0; strrchr(prefix, 0); }); _slash && !(*_slash = 0); _slash = strrchr((prefix), '/'))
+        for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); if (streq(prefix, "/")) prefix[0] = 0; strrchr(prefix, 0); }); _slash && ((*_slash = 0), true); _slash = strrchr((prefix), '/'))
diff --git a/src/shared/pty.c b/src/shared/pty.c
new file mode 100644 (file)
index 0000000..52a426c
--- /dev/null
@@ -0,0 +1,641 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+/*
+ * PTY
+ * A PTY object represents a single PTY connection between a master and a
+ * child. The child process is fork()ed so the caller controls what program
+ * will be run.
+ *
+ * Programs like /bin/login tend to perform a vhangup() on their TTY
+ * before running the login procedure. This also causes the pty master
+ * to get a EPOLLHUP event as long as no client has the TTY opened.
+ * This means, we cannot use the TTY connection as reliable way to track
+ * the client. Instead, we _must_ rely on the PID of the client to track
+ * them.
+ * However, this has the side effect that if the client forks and the
+ * parent exits, we loose them and restart the client. But this seems to
+ * be the expected behavior so we implement it here.
+ *
+ * Unfortunately, epoll always polls for EPOLLHUP so as long as the
+ * vhangup() is ongoing, we will _always_ get EPOLLHUP and cannot sleep.
+ * This gets worse if the client closes the TTY but doesn't exit.
+ * Therefore, the fd must be edge-triggered in the epoll-set so we
+ * only get the events once they change.
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <linux/ioctl.h>
+#include <signal.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/epoll.h>
+#include <sys/eventfd.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <sys/wait.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include "barrier.h"
+#include "macro.h"
+#include "pty.h"
+#include "ring.h"
+#include "util.h"
+
+#define PTY_BUFSIZE 4096
+
+enum {
+        PTY_ROLE_UNKNOWN,
+        PTY_ROLE_PARENT,
+        PTY_ROLE_CHILD,
+};
+
+struct Pty {
+        unsigned long ref;
+        Barrier barrier;
+        int fd;
+        pid_t child;
+        sd_event_source *fd_source;
+        sd_event_source *child_source;
+
+        char in_buf[PTY_BUFSIZE];
+        Ring out_buf;
+
+        pty_event_t event_fn;
+        void *event_fn_userdata;
+
+        bool needs_requeue : 1;
+        unsigned int role : 2;
+};
+
+int pty_new(Pty **out) {
+        _pty_unref_ Pty *pty = NULL;
+        int r;
+
+        assert_return(out, -EINVAL);
+
+        pty = new0(Pty, 1);
+        if (!pty)
+                return -ENOMEM;
+
+        pty->ref = 1;
+        pty->fd = -1;
+        pty->barrier = (Barrier) BARRIER_NULL;
+
+        pty->fd = posix_openpt(O_RDWR | O_NOCTTY | O_CLOEXEC | O_NONBLOCK);
+        if (pty->fd < 0)
+                return -errno;
+
+        /*
+         * The slave-node is initialized to uid/gid of the caller of
+         * posix_openpt(). Only if devpts is mounted with fixed uid/gid this is
+         * skipped. In that case, grantpt() can overwrite these, but then you
+         * have to be root to use chown() (or a pt_chown helper has to be
+         * present). In those cases grantpt() really does something,
+         * otherwise it's a no-op. We call grantpt() here to try supporting
+         * those cases, even though no-one uses that, I guess. If you need other
+         * access-rights, set them yourself after this call returns (no, this is
+         * not racy, it looks racy, but races regarding your own UID are never
+         * important as an attacker could ptrace you; and the slave-pty is also
+         * still locked).
+         */
+        r = grantpt(pty->fd);
+        if (r < 0)
+                return -errno;
+
+        r = barrier_create(&pty->barrier);
+        if (r < 0)
+                return r;
+
+        *out = pty;
+        pty = NULL;
+        return 0;
+}
+
+Pty *pty_ref(Pty *pty) {
+        if (!pty || pty->ref < 1)
+                return NULL;
+
+        ++pty->ref;
+        return pty;
+}
+
+Pty *pty_unref(Pty *pty) {
+        if (!pty || pty->ref < 1 || --pty->ref > 0)
+                return NULL;
+
+        pty_close(pty);
+        pty->child_source = sd_event_source_unref(pty->child_source);
+        barrier_destroy(&pty->barrier);
+        ring_clear(&pty->out_buf);
+        free(pty);
+
+        return NULL;
+}
+
+Barrier *pty_get_barrier(Pty *pty) {
+        assert(pty);
+        return &pty->barrier;
+}
+
+bool pty_is_unknown(Pty *pty) {
+        return pty && pty->role == PTY_ROLE_UNKNOWN;
+}
+
+bool pty_is_parent(Pty *pty) {
+        return pty && pty->role == PTY_ROLE_PARENT;
+}
+
+bool pty_is_child(Pty *pty) {
+        return pty && pty->role == PTY_ROLE_CHILD;
+}
+
+bool pty_has_child(Pty *pty) {
+        return pty_is_parent(pty) && pty->child > 0;
+}
+
+pid_t pty_get_child(Pty *pty) {
+        return pty_has_child(pty) ? pty->child : -ECHILD;
+}
+
+bool pty_is_open(Pty *pty) {
+        return pty && pty->fd >= 0;
+}
+
+int pty_get_fd(Pty *pty) {
+        assert_return(pty, -EINVAL);
+
+        return pty_is_open(pty) ? pty->fd : -EPIPE;
+}
+
+int pty_make_child(Pty *pty) {
+        char slave_name[1024];
+        int r, fd;
+
+        assert_return(pty, -EINVAL);
+        assert_return(pty_is_unknown(pty), -EALREADY);
+
+        r = ptsname_r(pty->fd, slave_name, sizeof(slave_name));
+        if (r < 0)
+                return -errno;
+
+        fd = open(slave_name, O_RDWR | O_CLOEXEC | O_NOCTTY);
+        if (fd < 0)
+                return -errno;
+
+        safe_close(pty->fd);
+        pty->fd = fd;
+        pty->child = getpid();
+        pty->role = PTY_ROLE_CHILD;
+        barrier_set_role(&pty->barrier, BARRIER_CHILD);
+
+        return 0;
+}
+
+int pty_make_parent(Pty *pty, pid_t child) {
+        assert_return(pty, -EINVAL);
+        assert_return(pty_is_unknown(pty), -EALREADY);
+
+        pty->child = child;
+        pty->role = PTY_ROLE_PARENT;
+
+        return 0;
+}
+
+int pty_unlock(Pty *pty) {
+        assert_return(pty, -EINVAL);
+        assert_return(pty_is_unknown(pty) || pty_is_parent(pty), -EINVAL);
+        assert_return(pty_is_open(pty), -ENODEV);
+
+        return unlockpt(pty->fd) < 0 ? -errno : 0;
+}
+
+int pty_setup_child(Pty *pty) {
+        struct termios attr;
+        pid_t pid;
+        int r;
+
+        assert_return(pty, -EINVAL);
+        assert_return(pty_is_child(pty), -EINVAL);
+        assert_return(pty_is_open(pty), -EALREADY);
+
+        r = sigprocmask_many(SIG_SETMASK, -1);
+        if (r < 0)
+                return r;
+
+        r = reset_all_signal_handlers();
+        if (r < 0)
+                return r;
+
+        pid = setsid();
+        if (pid < 0 && errno != EPERM)
+                return -errno;
+
+        r = ioctl(pty->fd, TIOCSCTTY, 0);
+        if (r < 0)
+                return -errno;
+
+        r = tcgetattr(pty->fd, &attr);
+        if (r < 0)
+                return -errno;
+
+        /* erase character should be normal backspace, PLEASEEE! */
+        attr.c_cc[VERASE] = 010;
+        /* always set UTF8 flag */
+        attr.c_iflag |= IUTF8;
+
+        r = tcsetattr(pty->fd, TCSANOW, &attr);
+        if (r < 0)
+                return -errno;
+
+        if (dup2(pty->fd, STDIN_FILENO) != STDIN_FILENO ||
+            dup2(pty->fd, STDOUT_FILENO) != STDOUT_FILENO ||
+            dup2(pty->fd, STDERR_FILENO) != STDERR_FILENO)
+                return -errno;
+
+        /* only close FD if it's not a std-fd */
+        pty->fd = (pty->fd > 2) ? safe_close(pty->fd) : -1;
+
+        return 0;
+}
+
+void pty_close(Pty *pty) {
+        if (!pty_is_open(pty))
+                return;
+
+        pty->fd_source = sd_event_source_unref(pty->fd_source);
+        pty->fd = safe_close(pty->fd);
+}
+
+/*
+ * Drain input-queue and dispatch data via the event-handler. Returns <0 on
+ * error, 0 if queue is empty and 1 if we couldn't empty the input queue fast
+ * enough and there's still data left.
+ */
+static int pty_dispatch_read(Pty *pty) {
+        unsigned int i;
+        ssize_t len;
+        int r;
+
+        /*
+         * We're edge-triggered, means we need to read the whole queue. This,
+         * however, might cause us to stall if the writer is faster than we
+         * are. Therefore, try reading as much as 8 times (32KiB) and only
+         * bail out then.
+         */
+
+        for (i = 0; i < 8; ++i) {
+                len = read(pty->fd, pty->in_buf, sizeof(pty->in_buf) - 1);
+                if (len < 0) {
+                        if (errno == EINTR)
+                                continue;
+
+                        return (errno == EAGAIN) ? 0 : -errno;
+                } else if (len == 0) {
+                        continue;
+                }
+
+                /* set terminating zero for debugging safety */
+                pty->in_buf[len] = 0;
+                r = pty->event_fn(pty, pty->event_fn_userdata, PTY_DATA, pty->in_buf, len);
+                if (r < 0)
+                        return r;
+        }
+
+        /* still data left, make sure we're queued again */
+        pty->needs_requeue = true;
+
+        return 1;
+}
+
+/*
+ * Drain output-queue by writing data to the pty. Returns <0 on error, 0 if the
+ * output queue is empty now and 1 if we couldn't empty the output queue fast
+ * enough and there's still data left.
+ */
+static int pty_dispatch_write(Pty *pty) {
+        struct iovec vec[2];
+        unsigned int i;
+        ssize_t len;
+        size_t num;
+
+        /*
+         * Same as pty_dispatch_read(), we're edge-triggered so we need to call
+         * write() until either all data is written or it returns EAGAIN. We
+         * call it twice and if it still writes successfully, we reschedule.
+         */
+
+        for (i = 0; i < 2; ++i) {
+                num = ring_peek(&pty->out_buf, vec);
+                if (num < 1)
+                        return 0;
+
+                len = writev(pty->fd, vec, (int)num);
+                if (len < 0) {
+                        if (errno == EINTR)
+                                continue;
+
+                        return (errno == EAGAIN) ? 1 : -errno;
+                } else if (len == 0) {
+                        continue;
+                }
+
+                ring_pull(&pty->out_buf, (size_t)len);
+        }
+
+        /* still data left, make sure we're queued again */
+        if (ring_get_size(&pty->out_buf) > 0) {
+                pty->needs_requeue = true;
+                return 1;
+        }
+
+        return 0;
+}
+
+static int pty_fd_fn(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
+        Pty *pty = userdata;
+        int r_hup = 0, r_write = 0, r_read = 0, r;
+
+        /*
+         * Whenever we encounter I/O errors, we have to make sure to drain the
+         * input queue first, before we handle any HUP. A child might send us
+         * a message and immediately close the queue. We must not handle the
+         * HUP first or we loose data.
+         * Therefore, if we read a message successfully, we always return
+         * success and wait for the next event-loop iteration. Furthermore,
+         * whenever there is a write-error, we must try reading from the input
+         * queue even if EPOLLIN is not set. The input might have arrived in
+         * between epoll_wait() and write(). Therefore, write-errors are only
+         * ever handled if the input-queue is empty. In all other cases they
+         * are ignored until either reading fails or the input queue is empty.
+         */
+
+        if (revents & (EPOLLHUP | EPOLLERR))
+                r_hup = -EPIPE;
+
+        if (revents & EPOLLOUT)
+                r_write = pty_dispatch_write(pty);
+
+        /* Awesome! Kernel signals HUP without IN but queues are not empty.. */
+        if ((revents & EPOLLIN) || r_hup < 0 || r_write < 0) {
+                r_read = pty_dispatch_read(pty);
+                if (r_read > 0)
+                        return 0; /* still data left to fetch next round */
+        }
+
+        if (r_hup < 0 || r_write < 0 || r_read < 0) {
+                /* PTY closed and input-queue drained */
+                pty_close(pty);
+                r = pty->event_fn(pty, pty->event_fn_userdata, PTY_HUP, NULL, 0);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+static int pty_fd_prepare_fn(sd_event_source *source, void *userdata) {
+        Pty *pty = userdata;
+        int r;
+
+        if (pty->needs_requeue) {
+                /*
+                 * We're edge-triggered. In case we couldn't handle all events
+                 * or in case new write-data is queued, we set needs_requeue.
+                 * Before going asleep, we set the io-events *again*. sd-event
+                 * notices that we're edge-triggered and forwards the call to
+                 * the kernel even if the events didn't change. The kernel will
+                 * check the events and re-queue us on the ready queue in case
+                 * an event is pending.
+                 */
+                r = sd_event_source_set_io_events(source, EPOLLHUP | EPOLLERR | EPOLLIN | EPOLLOUT | EPOLLET);
+                if (r >= 0)
+                        pty->needs_requeue = false;
+        }
+
+        return 0;
+}
+
+static int pty_child_fn(sd_event_source *source, const siginfo_t *si, void *userdata) {
+        Pty *pty = userdata;
+        int r;
+
+        pty->child = 0;
+
+        r = pty->event_fn(pty, pty->event_fn_userdata, PTY_CHILD, si, sizeof(*si));
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+int pty_attach_event(Pty *pty, sd_event *event, pty_event_t event_fn, void *event_fn_userdata) {
+        int r;
+
+        assert_return(pty, -EINVAL);
+        assert_return(event, -EINVAL);
+        assert_return(event_fn, -EINVAL);
+        assert_return(pty_is_parent(pty), -EINVAL);
+
+        pty_detach_event(pty);
+
+        if (pty_is_open(pty)) {
+                r = sd_event_add_io(event,
+                                    &pty->fd_source,
+                                    pty->fd,
+                                    EPOLLHUP | EPOLLERR | EPOLLIN | EPOLLOUT | EPOLLET,
+                                    pty_fd_fn,
+                                    pty);
+                if (r < 0)
+                        goto error;
+
+                r = sd_event_source_set_prepare(pty->fd_source, pty_fd_prepare_fn);
+                if (r < 0)
+                        goto error;
+        }
+
+        if (pty_has_child(pty)) {
+                r = sd_event_add_child(event,
+                                       &pty->child_source,
+                                       pty->child,
+                                       WEXITED,
+                                       pty_child_fn,
+                                       pty);
+                if (r < 0)
+                        goto error;
+        }
+
+        pty->event_fn = event_fn;
+        pty->event_fn_userdata = event_fn_userdata;
+
+        return 0;
+
+error:
+        pty_detach_event(pty);
+        return r;
+}
+
+void pty_detach_event(Pty *pty) {
+        if (!pty)
+                return;
+
+        pty->child_source = sd_event_source_unref(pty->child_source);
+        pty->fd_source = sd_event_source_unref(pty->fd_source);
+        pty->event_fn = NULL;
+        pty->event_fn_userdata = NULL;
+}
+
+int pty_write(Pty *pty, const void *buf, size_t size) {
+        bool was_empty;
+        int r;
+
+        assert_return(pty, -EINVAL);
+        assert_return(pty_is_open(pty), -ENODEV);
+        assert_return(pty_is_parent(pty), -ENODEV);
+
+        if (size < 1)
+                return 0;
+
+        /*
+         * Push @buf[0..@size] into the output ring-buffer. In case the
+         * ring-buffer wasn't empty beforehand, we're already waiting for
+         * EPOLLOUT and we're done. If it was empty, we have to re-queue the
+         * FD for EPOLLOUT as we're edge-triggered and wouldn't get any new
+         * EPOLLOUT event.
+         */
+
+        was_empty = ring_get_size(&pty->out_buf) < 1;
+
+        r = ring_push(&pty->out_buf, buf, size);
+        if (r < 0)
+                return r;
+
+        if (was_empty)
+                pty->needs_requeue = true;
+
+        return 0;
+}
+
+int pty_signal(Pty *pty, int sig) {
+        assert_return(pty, -EINVAL);
+        assert_return(pty_is_open(pty), -ENODEV);
+        assert_return(pty_is_parent(pty), -ENODEV);
+
+        return ioctl(pty->fd, TIOCSIG, sig) < 0 ? -errno : 0;
+}
+
+int pty_resize(Pty *pty, unsigned short term_width, unsigned short term_height) {
+        struct winsize ws;
+
+        assert_return(pty, -EINVAL);
+        assert_return(pty_is_open(pty), -ENODEV);
+        assert_return(pty_is_parent(pty), -ENODEV);
+
+        zero(ws);
+        ws.ws_col = term_width;
+        ws.ws_row = term_height;
+
+        /*
+         * This will send SIGWINCH to the pty slave foreground process group.
+         * We will also get one, but we don't need it.
+         */
+        return ioctl(pty->fd, TIOCSWINSZ, &ws) < 0 ? -errno : 0;
+}
+
+pid_t pty_fork(Pty **out, sd_event *event, pty_event_t event_fn, void *event_fn_userdata, unsigned short initial_term_width, unsigned short initial_term_height) {
+        _pty_unref_ Pty *pty = NULL;
+        int r;
+        pid_t pid;
+
+        assert_return(out, -EINVAL);
+        assert_return((event && event_fn) || (!event && !event_fn), -EINVAL);
+
+        r = pty_new(&pty);
+        if (r < 0)
+                return r;
+
+        r = pty_unlock(pty);
+        if (r < 0)
+                return r;
+
+        pid = fork();
+        if (pid < 0)
+                return -errno;
+
+        if (pid == 0) {
+                /* child */
+
+                r = pty_make_child(pty);
+                if (r < 0)
+                        _exit(-r);
+
+                r = pty_setup_child(pty);
+                if (r < 0)
+                        _exit(-r);
+
+                /* sync with parent */
+                if (!barrier_place_and_sync(&pty->barrier))
+                        _exit(1);
+
+                /* fallthrough and return the child's PTY object */
+        } else {
+                /* parent */
+
+                r = pty_make_parent(pty, pid);
+                if (r < 0)
+                        goto parent_error;
+
+                r = pty_resize(pty, initial_term_width, initial_term_height);
+                if (r < 0)
+                        goto parent_error;
+
+                if (event) {
+                        r = pty_attach_event(pty, event, event_fn, event_fn_userdata);
+                        if (r < 0)
+                                goto parent_error;
+                }
+
+                /* sync with child */
+                if (!barrier_place_and_sync(&pty->barrier)) {
+                        r = -ECHILD;
+                        goto parent_error;
+                }
+
+                /* fallthrough and return the parent's PTY object */
+        }
+
+        *out = pty;
+        pty = NULL;
+        return pid;
+
+parent_error:
+        barrier_abort(&pty->barrier);
+        waitpid(pty->child, NULL, 0);
+        pty->child = 0;
+        return r;
+}
diff --git a/src/shared/pty.h b/src/shared/pty.h
new file mode 100644 (file)
index 0000000..a87ceb5
--- /dev/null
@@ -0,0 +1,77 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "barrier.h"
+#include "macro.h"
+#include "sd-event.h"
+#include "util.h"
+
+typedef struct Pty Pty;
+
+enum {
+        PTY_CHILD,
+        PTY_HUP,
+        PTY_DATA,
+};
+
+typedef int (*pty_event_t) (Pty *pty, void *userdata, unsigned int event, const void *ptr, size_t size);
+
+int pty_new(Pty **out);
+Pty *pty_ref(Pty *pty);
+Pty *pty_unref(Pty *pty);
+
+#define _pty_unref_ _cleanup_(pty_unrefp)
+DEFINE_TRIVIAL_CLEANUP_FUNC(Pty*, pty_unref);
+
+Barrier *pty_get_barrier(Pty *pty);
+
+bool pty_is_unknown(Pty *pty);
+bool pty_is_parent(Pty *pty);
+bool pty_is_child(Pty *pty);
+bool pty_has_child(Pty *pty);
+pid_t pty_get_child(Pty *pty);
+
+bool pty_is_open(Pty *pty);
+int pty_get_fd(Pty *pty);
+
+int pty_make_child(Pty *pty);
+int pty_make_parent(Pty *pty, pid_t child);
+int pty_unlock(Pty *pty);
+int pty_setup_child(Pty *pty);
+void pty_close(Pty *pty);
+
+int pty_attach_event(Pty *pty, sd_event *event, pty_event_t event_fn, void *event_fn_userdata);
+void pty_detach_event(Pty *pty);
+
+int pty_write(Pty *pty, const void *buf, size_t size);
+int pty_signal(Pty *pty, int sig);
+int pty_resize(Pty *pty, unsigned short term_width, unsigned short term_height);
+
+pid_t pty_fork(Pty **out, sd_event *event, pty_event_t event_fn, void *event_fn_userdata, unsigned short initial_term_width, unsigned short initial_term_height);
index 8ae61234c7fb2a08729955676bd2999d0331ae7f..309075e348e53ef21dd59c9f959cac73098237ca 100644 (file)
 
 #define RING_MASK(_r, _v) ((_v) & ((_r)->size - 1))
 
-void ring_flush(struct ring *r) {
+void ring_flush(Ring *r) {
         assert(r);
 
         r->start = 0;
         r->used = 0;
 }
 
-void ring_clear(struct ring *r) {
+void ring_clear(Ring *r) {
+        assert(r);
+
         free(r->buf);
         zero(*r);
 }
@@ -53,7 +55,7 @@ void ring_clear(struct ring *r) {
  *         size_t iov_len;
  *     };
  */
-size_t ring_peek(struct ring *r, struct iovec *vec) {
+size_t ring_peek(Ring *r, struct iovec *vec) {
         assert(r);
 
         if (r->used == 0) {
@@ -80,7 +82,7 @@ size_t ring_peek(struct ring *r, struct iovec *vec) {
  * at most @size bytes. If the ring buffer size is smaller, copy less bytes and
  * return the number of bytes copied.
  */
-size_t ring_copy(struct ring *r, void *buf, size_t size) {
+size_t ring_copy(Ring *r, void *buf, size_t size) {
         size_t l;
 
         assert(r);
@@ -106,7 +108,7 @@ size_t ring_copy(struct ring *r, void *buf, size_t size) {
  * Resize ring-buffer to size @nsize. @nsize must be a power-of-2, otherwise
  * ring operations will behave incorrectly.
  */
-static int ring_resize(struct ring *r, size_t nsize) {
+static int ring_resize(Ring *r, size_t nsize) {
         uint8_t *buf;
         size_t l;
 
@@ -140,7 +142,7 @@ static int ring_resize(struct ring *r, size_t nsize) {
  * resizes the buffer if it is too small. It returns -ENOMEM on OOM and 0 on
  * success.
  */
-static int ring_grow(struct ring *r, size_t add) {
+static int ring_grow(Ring *r, size_t add) {
         size_t need;
 
         assert(r);
@@ -165,7 +167,7 @@ static int ring_grow(struct ring *r, size_t add) {
  * Push @len bytes from @u8 into the ring buffer. The buffer is resized if it
  * is too small. -ENOMEM is returned on OOM, 0 on success.
  */
-int ring_push(struct ring *r, const void *u8, size_t size) {
+int ring_push(Ring *r, const void *u8, size_t size) {
         int err;
         size_t pos, l;
 
@@ -197,7 +199,7 @@ int ring_push(struct ring *r, const void *u8, size_t size) {
  * Remove @len bytes from the start of the ring-buffer. Note that we protect
  * against overflows so removing more bytes than available is safe.
  */
-void ring_pull(struct ring *r, size_t size) {
+void ring_pull(Ring *r, size_t size) {
         assert(r);
 
         if (size > r->used)
index 6b12530e31104ddf106cec76ed9e348fbac681fb..1210aabdf68762a2431844358f888573e71a9126 100644 (file)
@@ -27,7 +27,9 @@
 #include <string.h>
 #include <sys/uio.h>
 
-struct ring {
+typedef struct Ring Ring;
+
+struct Ring {
         uint8_t *buf;           /* buffer or NULL */
         size_t size;            /* actual size of @buf */
         size_t start;           /* start position of ring */
@@ -35,25 +37,25 @@ struct ring {
 };
 
 /* flush buffer so it is empty again */
-void ring_flush(struct ring *r);
+void ring_flush(Ring *r);
 
 /* flush buffer, free allocated data and reset to initial state */
-void ring_clear(struct ring *r);
+void ring_clear(Ring *r);
 
 /* get pointers to buffer data and their length */
-size_t ring_peek(struct ring *r, struct iovec *vec);
+size_t ring_peek(Ring *r, struct iovec *vec);
 
 /* copy data into external linear buffer */
-size_t ring_copy(struct ring *r, void *buf, size_t size);
+size_t ring_copy(Ring *r, void *buf, size_t size);
 
 /* push data to the end of the buffer */
-int ring_push(struct ring *r, const void *u8, size_t size);
+int ring_push(Ring *r, const void *u8, size_t size);
 
 /* pull data from the front of the buffer */
-void ring_pull(struct ring *r, size_t size);
+void ring_pull(Ring *r, size_t size);
 
 /* return size of occupied buffer in bytes */
-static inline size_t ring_get_size(struct ring *r)
+static inline size_t ring_get_size(Ring *r)
 {
         return r->used;
 }
index 026ae5a9e85b2f8e793f80e3a05fbf939d8134ec..1eddd17d2797ff797254aab1faf43c34f58affb4 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <sys/un.h>
+
+#ifdef HAVE_SELINUX
+#include <selinux/selinux.h>
+#include <selinux/label.h>
+#include <selinux/context.h>
+#endif
+
+#include "strv.h"
+#include "path-util.h"
 #include "selinux-util.h"
 
 #ifdef HAVE_SELINUX
+DEFINE_TRIVIAL_CLEANUP_FUNC(security_context_t, freecon);
+DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free);
 
-#include <selinux/selinux.h>
+#define _cleanup_security_context_free_ _cleanup_(freeconp)
+#define _cleanup_context_free_ _cleanup_(context_freep)
 
-static int use_selinux_cached = -1;
+static int cached_use = -1;
+static struct selabel_handle *label_hnd = NULL;
 
-bool use_selinux(void) {
+#define log_enforcing(...) log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG, __VA_ARGS__)
+#endif
 
-        if (use_selinux_cached < 0)
-                use_selinux_cached = is_selinux_enabled() > 0;
+bool mac_selinux_use(void) {
+#ifdef HAVE_SELINUX
+        if (cached_use < 0)
+                cached_use = is_selinux_enabled() > 0;
 
-        return use_selinux_cached;
+        return cached_use;
+#else
+        return false;
+#endif
 }
 
-void retest_selinux(void) {
-        use_selinux_cached = -1;
+void mac_selinux_retest(void) {
+#ifdef HAVE_SELINUX
+        cached_use = -1;
+#endif
 }
 
-#else
+int mac_selinux_init(const char *prefix) {
+        int r = 0;
 
-bool use_selinux(void) {
-        return false;
+#ifdef HAVE_SELINUX
+        usec_t before_timestamp, after_timestamp;
+        struct mallinfo before_mallinfo, after_mallinfo;
+
+        if (!mac_selinux_use())
+                return 0;
+
+        if (label_hnd)
+                return 0;
+
+        before_mallinfo = mallinfo();
+        before_timestamp = now(CLOCK_MONOTONIC);
+
+        if (prefix) {
+                struct selinux_opt options[] = {
+                        { .type = SELABEL_OPT_SUBSET, .value = prefix },
+                };
+
+                label_hnd = selabel_open(SELABEL_CTX_FILE, options, ELEMENTSOF(options));
+        } else
+                label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
+
+        if (!label_hnd) {
+                log_enforcing("Failed to initialize SELinux context: %m");
+                r = security_getenforce() == 1 ? -errno : 0;
+        } else  {
+                char timespan[FORMAT_TIMESPAN_MAX];
+                int l;
+
+                after_timestamp = now(CLOCK_MONOTONIC);
+                after_mallinfo = mallinfo();
+
+                l = after_mallinfo.uordblks > before_mallinfo.uordblks ? after_mallinfo.uordblks - before_mallinfo.uordblks : 0;
+
+                log_debug("Successfully loaded SELinux database in %s, size on heap is %iK.",
+                          format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0),
+                          (l+1023)/1024);
+        }
+#endif
+
+        return r;
+}
+
+void mac_selinux_finish(void) {
+
+#ifdef HAVE_SELINUX
+        if (!label_hnd)
+                return;
+
+        selabel_close(label_hnd);
+#endif
+}
+
+int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
+
+#ifdef HAVE_SELINUX
+        struct stat st;
+        int r;
+
+        assert(path);
+
+        /* if mac_selinux_init() wasn't called before we are a NOOP */
+        if (!label_hnd)
+                return 0;
+
+        r = lstat(path, &st);
+        if (r >= 0) {
+                _cleanup_security_context_free_ security_context_t fcon = NULL;
+
+                r = selabel_lookup_raw(label_hnd, &fcon, path, st.st_mode);
+
+                /* If there's no label to set, then exit without warning */
+                if (r < 0 && errno == ENOENT)
+                        return 0;
+
+                if (r >= 0) {
+                        r = lsetfilecon(path, fcon);
+
+                        /* If the FS doesn't support labels, then exit without warning */
+                        if (r < 0 && errno == ENOTSUP)
+                                return 0;
+                }
+        }
+
+        if (r < 0) {
+                /* Ignore ENOENT in some cases */
+                if (ignore_enoent && errno == ENOENT)
+                        return 0;
+
+                if (ignore_erofs && errno == EROFS)
+                        return 0;
+
+                log_enforcing("Unable to fix SELinux security context of %s: %m", path);
+                if (security_getenforce() == 1)
+                        return -errno;
+        }
+#endif
+
+        return 0;
+}
+
+int mac_selinux_apply(const char *path, const char *label) {
+
+#ifdef HAVE_SELINUX
+        assert(path);
+        assert(label);
+
+        if (!mac_selinux_use())
+                return 0;
+
+        if (setfilecon(path, (security_context_t) label) < 0) {
+                log_enforcing("Failed to set SELinux security context %s on path %s: %m", label, path);
+                if (security_getenforce() == 1)
+                        return -errno;
+        }
+#endif
+        return 0;
+}
+
+int mac_selinux_get_create_label_from_exe(const char *exe, char **label) {
+        int r = -EOPNOTSUPP;
+
+#ifdef HAVE_SELINUX
+        _cleanup_security_context_free_ security_context_t mycon = NULL, fcon = NULL;
+        security_class_t sclass;
+
+        assert(exe);
+        assert(label);
+
+        if (!mac_selinux_use())
+                return -EOPNOTSUPP;
+
+        r = getcon(&mycon);
+        if (r < 0)
+                return -errno;
+
+        r = getfilecon(exe, &fcon);
+        if (r < 0)
+                return -errno;
+
+        sclass = string_to_security_class("process");
+        r = security_compute_create(mycon, fcon, sclass, (security_context_t *) label);
+        if (r < 0)
+                return -errno;
+#endif
+
+        return r;
+}
+
+int mac_selinux_get_our_label(char **label) {
+        int r = -EOPNOTSUPP;
+
+        assert(label);
+
+#ifdef HAVE_SELINUX
+        if (!mac_selinux_use())
+                return -EOPNOTSUPP;
+
+        r = getcon(label);
+        if (r < 0)
+                return -errno;
+#endif
+
+        return r;
+}
+
+int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, char **label) {
+        int r = -EOPNOTSUPP;
+
+#ifdef HAVE_SELINUX
+        _cleanup_security_context_free_ security_context_t mycon = NULL, peercon = NULL, fcon = NULL;
+        _cleanup_context_free_ context_t pcon = NULL, bcon = NULL;
+        security_class_t sclass;
+        const char *range = NULL;
+
+        assert(socket_fd >= 0);
+        assert(exe);
+        assert(label);
+
+        if (!mac_selinux_use())
+                return -EOPNOTSUPP;
+
+        r = getcon(&mycon);
+        if (r < 0)
+                return -errno;
+
+        r = getpeercon(socket_fd, &peercon);
+        if (r < 0)
+                return -errno;
+
+        r = getexeccon(&fcon);
+        if (r < 0)
+                return -errno;
+
+        if (!fcon) {
+                /* If there is no context set for next exec let's use context
+                   of target executable */
+                r = getfilecon(exe, &fcon);
+                if (r < 0)
+                        return -errno;
+        }
+
+        bcon = context_new(mycon);
+        if (!bcon)
+                return -ENOMEM;
+
+        pcon = context_new(peercon);
+        if (!pcon)
+                return -ENOMEM;
+
+        range = context_range_get(pcon);
+        if (!range)
+                return -errno;
+
+        r = context_range_set(bcon, range);
+        if (r)
+                return -errno;
+
+        freecon(mycon);
+        mycon = strdup(context_str(bcon));
+        if (!mycon)
+                return -ENOMEM;
+
+        sclass = string_to_security_class("process");
+        r = security_compute_create(mycon, fcon, sclass, (security_context_t *) label);
+        if (r < 0)
+                return -errno;
+#endif
+
+        return r;
+}
+
+void mac_selinux_free(char *label) {
+
+#ifdef HAVE_SELINUX
+        if (!mac_selinux_use())
+                return;
+
+        freecon((security_context_t) label);
+#endif
+}
+
+int mac_selinux_create_file_prepare(const char *path, mode_t mode) {
+        int r = 0;
+
+#ifdef HAVE_SELINUX
+        _cleanup_security_context_free_ security_context_t filecon = NULL;
+
+        assert(path);
+
+        if (!label_hnd)
+                return 0;
+
+        if (path_is_absolute(path))
+                r = selabel_lookup_raw(label_hnd, &filecon, path, mode);
+        else {
+                _cleanup_free_ char *newpath;
+
+                newpath = path_make_absolute_cwd(path);
+                if (!newpath)
+                        return -ENOMEM;
+
+                r = selabel_lookup_raw(label_hnd, &filecon, newpath, mode);
+        }
+
+        if (r < 0 && errno != ENOENT)
+                r = -errno;
+        else if (r == 0) {
+                r = setfscreatecon(filecon);
+                if (r < 0) {
+                        log_enforcing("Failed to set SELinux security context %s for %s: %m", filecon, path);
+                        r = -errno;
+                }
+        }
+
+        if (r < 0 && security_getenforce() == 0)
+                r = 0;
+#endif
+
+        return r;
+}
+
+void mac_selinux_create_file_clear(void) {
+
+#ifdef HAVE_SELINUX
+        PROTECT_ERRNO;
+
+        if (!mac_selinux_use())
+                return;
+
+        setfscreatecon(NULL);
+#endif
 }
 
-void retest_selinux(void) {
+int mac_selinux_create_socket_prepare(const char *label) {
+
+#ifdef HAVE_SELINUX
+        if (!mac_selinux_use())
+                return 0;
+
+        assert(label);
+
+        if (setsockcreatecon((security_context_t) label) < 0) {
+                log_enforcing("Failed to set SELinux security context %s for sockets: %m", label);
+
+                if (security_getenforce() == 1)
+                        return -errno;
+        }
+#endif
+
+        return 0;
+}
+
+void mac_selinux_create_socket_clear(void) {
+
+#ifdef HAVE_SELINUX
+        PROTECT_ERRNO;
+
+        if (!mac_selinux_use())
+                return;
+
+        setsockcreatecon(NULL);
+#endif
 }
 
+int mac_selinux_bind(int fd, const struct sockaddr *addr, socklen_t addrlen) {
+
+        /* Binds a socket and label its file system object according to the SELinux policy */
+
+#ifdef HAVE_SELINUX
+        _cleanup_security_context_free_ security_context_t fcon = NULL;
+        const struct sockaddr_un *un;
+        char *path;
+        int r;
+
+        assert(fd >= 0);
+        assert(addr);
+        assert(addrlen >= sizeof(sa_family_t));
+
+        if (!label_hnd)
+                goto skipped;
+
+        /* Filter out non-local sockets */
+        if (addr->sa_family != AF_UNIX)
+                goto skipped;
+
+        /* Filter out anonymous sockets */
+        if (addrlen < sizeof(sa_family_t) + 1)
+                goto skipped;
+
+        /* Filter out abstract namespace sockets */
+        un = (const struct sockaddr_un*) addr;
+        if (un->sun_path[0] == 0)
+                goto skipped;
+
+        path = strndupa(un->sun_path, addrlen - offsetof(struct sockaddr_un, sun_path));
+
+        if (path_is_absolute(path))
+                r = selabel_lookup_raw(label_hnd, &fcon, path, S_IFSOCK);
+        else {
+                _cleanup_free_ char *newpath;
+
+                newpath = path_make_absolute_cwd(path);
+                if (!newpath)
+                        return -ENOMEM;
+
+                r = selabel_lookup_raw(label_hnd, &fcon, newpath, S_IFSOCK);
+        }
+
+        if (r == 0)
+                r = setfscreatecon(fcon);
+
+        if (r < 0 && errno != ENOENT) {
+                log_enforcing("Failed to set SELinux security context %s for %s: %m", fcon, path);
+
+                if (security_getenforce() == 1) {
+                        r = -errno;
+                        goto finish;
+                }
+        }
+
+        r = bind(fd, addr, addrlen);
+        if (r < 0)
+                r = -errno;
+
+finish:
+        setfscreatecon(NULL);
+        return r;
+
+skipped:
 #endif
+        return bind(fd, addr, addrlen) < 0 ? -errno : 0;
+}
index 4b8120274166bdfb5f826d1be08eeffd431c7c4d..7ff8c607b4380766c078e0a08a234336c8f037bc 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <sys/socket.h>
+#include <stdio.h>
 #include <stdbool.h>
 
-bool use_selinux(void);
-void retest_selinux(void);
+bool mac_selinux_use(void);
+void mac_selinux_retest(void);
+
+int mac_selinux_init(const char *prefix);
+void mac_selinux_finish(void);
+
+int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
+int mac_selinux_apply(const char *path, const char *label);
+
+int mac_selinux_get_create_label_from_exe(const char *exe, char **label);
+int mac_selinux_get_our_label(char **label);
+int mac_selinux_get_child_mls_label(int socket_fd, const char *exec, char **label);
+void mac_selinux_free(char *label);
+
+int mac_selinux_create_file_prepare(const char *path, mode_t mode);
+void mac_selinux_create_file_clear(void);
+
+int mac_selinux_create_socket_prepare(const char *label);
+void mac_selinux_create_socket_clear(void);
+
+int mac_selinux_bind(int fd, const struct sockaddr *addr, socklen_t addrlen);
index 5a4bf11bdfda45b01d4ef63ad9220c127c2daa99..84ab82a701738c08d567f9508953e56b1c94c929 100644 (file)
 
 #include "set.h"
 #include "hashmap.h"
+#include "strv.h"
 
 #define MAKE_SET(h) ((Set*) (h))
 #define MAKE_HASHMAP(s) ((Hashmap*) (s))
 
 /* For now this is not much more than a wrapper around a hashmap */
 
-Set *set_new(hash_func_t hash_func, compare_func_t compare_func) {
-        return MAKE_SET(hashmap_new(hash_func, compare_func));
+Set *set_new(const struct hash_ops *hash_ops) {
+        return MAKE_SET(hashmap_new(hash_ops));
 }
 
 void set_free(Set* s) {
@@ -41,8 +42,8 @@ void set_free_free(Set *s) {
         hashmap_free_free(MAKE_HASHMAP(s));
 }
 
-int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func) {
-        return hashmap_ensure_allocated((Hashmap**) s, hash_func, compare_func);
+int set_ensure_allocated(Set **s, const struct hash_ops *hash_ops) {
+        return hashmap_ensure_allocated((Hashmap**) s, hash_ops);
 }
 
 int set_put(Set *s, void *value) {
@@ -59,6 +60,39 @@ int set_consume(Set *s, void *value) {
         return r;
 }
 
+int set_put_strdup(Set *s, const char *p) {
+        char *c;
+        int r;
+
+        assert(s);
+        assert(p);
+
+        c = strdup(p);
+        if (!c)
+                return -ENOMEM;
+
+        r = set_consume(s, c);
+        if (r == -EEXIST)
+                return 0;
+
+        return r;
+}
+
+int set_put_strdupv(Set *s, char **l) {
+        int n = 0, r;
+        char **i;
+
+        STRV_FOREACH(i, l) {
+                r = set_put_strdup(s, *i);
+                if (r < 0)
+                        return r;
+
+                n += r;
+        }
+
+        return n;
+}
+
 int set_replace(Set *s, void *value) {
         return hashmap_replace(MAKE_HASHMAP(s), value, value);
 }
@@ -91,14 +125,6 @@ void *set_iterate(Set *s, Iterator *i) {
         return hashmap_iterate(MAKE_HASHMAP(s), i, NULL);
 }
 
-void *set_iterate_backwards(Set *s, Iterator *i) {
-        return hashmap_iterate_backwards(MAKE_HASHMAP(s), i, NULL);
-}
-
-void *set_iterate_skip(Set *s, void *value, Iterator *i) {
-        return hashmap_iterate_skip(MAKE_HASHMAP(s), value, i);
-}
-
 void *set_steal_first(Set *s) {
         return hashmap_steal_first(MAKE_HASHMAP(s));
 }
@@ -107,15 +133,15 @@ void* set_first(Set *s) {
         return hashmap_first(MAKE_HASHMAP(s));
 }
 
-void* set_last(Set *s) {
-        return hashmap_last(MAKE_HASHMAP(s));
-}
-
 int set_merge(Set *s, Set *other) {
         return hashmap_merge(MAKE_HASHMAP(s), MAKE_HASHMAP(other));
 }
 
-void set_move(Set *s, Set *other) {
+int set_reserve(Set *s, unsigned entries_add) {
+        return hashmap_reserve(MAKE_HASHMAP(s), entries_add);
+}
+
+int set_move(Set *s, Set *other) {
         return hashmap_move(MAKE_HASHMAP(s), MAKE_HASHMAP(other));
 }
 
index 5612478d4e88ecf7cb3d25633a2a9b07c93a4946..d2622d17eaedd5e62bdaa4369c78fb60d7716532 100644 (file)
 
 typedef struct Set Set;
 
-Set *set_new(hash_func_t hash_func, compare_func_t compare_func);
+Set *set_new(const struct hash_ops *hash_ops);
 void set_free(Set* s);
 void set_free_free(Set *s);
 
 Set* set_copy(Set *s);
-int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func);
+int set_ensure_allocated(Set **s, const struct hash_ops *hash_ops);
 
 int set_put(Set *s, void *value);
 int set_consume(Set *s, void *value);
+int set_put_strdup(Set *s, const char *p);
+int set_put_strdupv(Set *s, char **l);
 int set_replace(Set *s, void *value);
 void *set_get(Set *s, void *value);
 bool set_contains(Set *s, void *value);
@@ -48,31 +50,26 @@ void *set_remove(Set *s, void *value);
 int set_remove_and_put(Set *s, void *old_value, void *new_value);
 
 int set_merge(Set *s, Set *other);
-void set_move(Set *s, Set *other);
+int set_reserve(Set *s, unsigned entries_add);
+int set_move(Set *s, Set *other);
 int set_move_one(Set *s, Set *other, void *value);
 
 unsigned set_size(Set *s);
 bool set_isempty(Set *s);
 
 void *set_iterate(Set *s, Iterator *i);
-void *set_iterate_backwards(Set *s, Iterator *i);
-void *set_iterate_skip(Set *s, void *value, Iterator *i);
 
 void set_clear(Set *s);
 void set_clear_free(Set *s);
 
 void *set_steal_first(Set *s);
 void* set_first(Set *s);
-void* set_last(Set *s);
 
 char **set_get_strv(Set *s);
 
 #define SET_FOREACH(e, s, i) \
         for ((i) = ITERATOR_FIRST, (e) = set_iterate((s), &(i)); (e); (e) = set_iterate((s), &(i)))
 
-#define SET_FOREACH_BACKWARDS(e, s, i) \
-        for ((i) = ITERATOR_LAST, (e) = set_iterate_backwards((s), &(i)); (e); (e) = set_iterate_backwards((s), &(i)))
-
 DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free);
 DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free_free);
 #define _cleanup_set_free_ _cleanup_(set_freep)
index 867e4edaa2e79978b963594e30feee6deff594e5..d8de644a92cd692bf4a25937fec932bbbe297646 100644 (file)
@@ -48,19 +48,9 @@ int parse_sleep_config(const char *verb, char ***_modes, char ***_states) {
                 {}
         };
 
-        int r;
-        _cleanup_fclose_ FILE *f;
-
-        f = fopen(PKGSYSCONFDIR "/sleep.conf", "re");
-        if (!f)
-                log_full(errno == ENOENT ? LOG_DEBUG: LOG_WARNING,
-                         "Failed to open configuration file " PKGSYSCONFDIR "/sleep.conf: %m");
-        else {
-                r = config_parse(NULL, PKGSYSCONFDIR "/sleep.conf", f, "Sleep\0",
-                                 config_item_table_lookup, (void*) items, false, false, NULL);
-                if (r < 0)
-                        log_warning("Failed to parse configuration file: %s", strerror(-r));
-        }
+        config_parse(NULL, PKGSYSCONFDIR "/sleep.conf", NULL,
+                     "Sleep\0",
+                     config_item_table_lookup, items, false, false, true, NULL);
 
         if (streq(verb, "suspend")) {
                 /* empty by default */
@@ -108,7 +98,7 @@ int parse_sleep_config(const char *verb, char ***_modes, char ***_states) {
 }
 
 int can_sleep_state(char **types) {
-        char *w, *state, **type;
+        char **type;
         int r;
         _cleanup_free_ char *p = NULL;
 
@@ -124,11 +114,12 @@ int can_sleep_state(char **types) {
                 return false;
 
         STRV_FOREACH(type, types) {
+                const char *word, *state;
                 size_t l, k;
 
                 k = strlen(*type);
-                FOREACH_WORD_SEPARATOR(w, l, p, WHITESPACE, state)
-                        if (l == k && memcmp(w, *type, l) == 0)
+                FOREACH_WORD_SEPARATOR(word, l, p, WHITESPACE, state)
+                        if (l == k && memcmp(word, *type, l) == 0)
                                 return true;
         }
 
@@ -136,7 +127,7 @@ int can_sleep_state(char **types) {
 }
 
 int can_sleep_disk(char **types) {
-        char *w, *state, **type;
+        char **type;
         int r;
         _cleanup_free_ char *p = NULL;
 
@@ -152,14 +143,18 @@ int can_sleep_disk(char **types) {
                 return false;
 
         STRV_FOREACH(type, types) {
+                const char *word, *state;
                 size_t l, k;
 
                 k = strlen(*type);
-                FOREACH_WORD_SEPARATOR(w, l, p, WHITESPACE, state) {
-                        if (l == k && memcmp(w, *type, l) == 0)
+                FOREACH_WORD_SEPARATOR(word, l, p, WHITESPACE, state) {
+                        if (l == k && memcmp(word, *type, l) == 0)
                                 return true;
 
-                        if (l == k + 2 && w[0] == '[' && memcmp(w + 1, *type, l - 2) == 0 && w[l-1] == ']')
+                        if (l == k + 2 &&
+                            word[0] == '[' &&
+                            memcmp(word + 1, *type, l - 2) == 0 &&
+                            word[l-1] == ']')
                                 return true;
                 }
         }
index 8f83562bf6804701775fed4970b6073c9a510d97..a8dccd1554f7fe36ffd4ea433cb7ce508970d84f 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <unistd.h>
-#include <string.h>
 #include <sys/xattr.h>
 
+#include "util.h"
+#include "path-util.h"
 #include "smack-util.h"
 
-bool use_smack(void) {
+#define SMACK_FLOOR_LABEL "_"
+#define SMACK_STAR_LABEL  "*"
+
+bool mac_smack_use(void) {
 #ifdef HAVE_SMACK
-        static int use_smack_cached = -1;
+        static int cached_use = -1;
 
-        if (use_smack_cached < 0)
-                use_smack_cached = access("/sys/fs/smackfs/", F_OK) >= 0;
+        if (cached_use < 0)
+                cached_use = access("/sys/fs/smackfs/", F_OK) >= 0;
 
-        return use_smack_cached;
+        return cached_use;
 #else
         return false;
 #endif
+}
+
+int mac_smack_apply(const char *path, const char *label) {
+        int r = 0;
 
+        assert(path);
+
+#ifdef HAVE_SMACK
+        if (!mac_smack_use())
+                return 0;
+
+        if (label)
+                r = lsetxattr(path, "security.SMACK64", label, strlen(label), 0);
+        else
+                r = lremovexattr(path, "security.SMACK64");
+        if (r < 0)
+                return -errno;
+#endif
+
+        return r;
 }
 
-int smack_label_path(const char *path, const char *label) {
+int mac_smack_apply_fd(int fd, const char *label) {
+        int r = 0;
+
+        assert(fd >= 0);
+
 #ifdef HAVE_SMACK
-        if (!use_smack())
+        if (!mac_smack_use())
                 return 0;
 
         if (label)
-                return setxattr(path, "security.SMACK64", label, strlen(label), 0);
+                r = fsetxattr(fd, "security.SMACK64", label, strlen(label), 0);
         else
-                return lremovexattr(path, "security.SMACK64");
-#else
-        return 0;
+                r = fremovexattr(fd, "security.SMACK64");
+        if (r < 0)
+                return -errno;
 #endif
+
+        return r;
 }
 
-int smack_label_fd(int fd, const char *label) {
+int mac_smack_apply_ip_out_fd(int fd, const char *label) {
+        int r = 0;
+
+        assert(fd >= 0);
+
 #ifdef HAVE_SMACK
-        if (!use_smack())
+        if (!mac_smack_use())
                 return 0;
 
-        return fsetxattr(fd, "security.SMACK64", label, strlen(label), 0);
-#else
-        return 0;
+        if (label)
+                r = fsetxattr(fd, "security.SMACK64IPOUT", label, strlen(label), 0);
+        else
+                r = fremovexattr(fd, "security.SMACK64IPOUT");
+        if (r < 0)
+                return -errno;
 #endif
+
+        return r;
 }
 
-int smack_label_ip_out_fd(int fd, const char *label) {
+int mac_smack_apply_ip_in_fd(int fd, const char *label) {
+        int r = 0;
+
+        assert(fd >= 0);
+
 #ifdef HAVE_SMACK
-        if (!use_smack())
+        if (!mac_smack_use())
                 return 0;
 
-        return fsetxattr(fd, "security.SMACK64IPOUT", label, strlen(label), 0);
-#else
-        return 0;
+        if (label)
+                r = fsetxattr(fd, "security.SMACK64IPIN", label, strlen(label), 0);
+        else
+                r = fremovexattr(fd, "security.SMACK64IPIN");
+        if (r < 0)
+                return -errno;
 #endif
+
+        return r;
 }
 
-int smack_label_ip_in_fd(int fd, const char *label) {
+int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
+        int r = 0;
+
 #ifdef HAVE_SMACK
-        if (!use_smack())
+        struct stat st;
+
+        assert(path);
+
+        if (!mac_smack_use())
                 return 0;
 
-        return fsetxattr(fd, "security.SMACK64IPIN", label, strlen(label), 0);
-#else
-        return 0;
+        /*
+         * Path must be in /dev and must exist
+         */
+        if (!path_startswith(path, "/dev"))
+                return 0;
+
+        r = lstat(path, &st);
+        if (r >= 0) {
+                const char *label;
+
+                /*
+                 * Label directories and character devices "*".
+                 * Label symlinks "_".
+                 * Don't change anything else.
+                 */
+
+                if (S_ISDIR(st.st_mode))
+                        label = SMACK_STAR_LABEL;
+                else if (S_ISLNK(st.st_mode))
+                        label = SMACK_FLOOR_LABEL;
+                else if (S_ISCHR(st.st_mode))
+                        label = SMACK_STAR_LABEL;
+                else
+                        return 0;
+
+                r = lsetxattr(path, "security.SMACK64", label, strlen(label), 0);
+
+                /* If the FS doesn't support labels, then exit without warning */
+                if (r < 0 && errno == ENOTSUP)
+                        return 0;
+        }
+
+        if (r < 0) {
+                /* Ignore ENOENT in some cases */
+                if (ignore_enoent && errno == ENOENT)
+                        return 0;
+
+                if (ignore_erofs && errno == EROFS)
+                        return 0;
+
+                log_debug("Unable to fix SMACK label of %s: %m", path);
+                r = -errno;
+        }
 #endif
+
+        return r;
 }
index 7370ae32b36c28e6beb638512c2bc343d984f9f2..68778da38b69dd56851f1eeb4f4c0b1f68637433 100644 (file)
 
 #include <stdbool.h>
 
-#define SMACK_FLOOR_LABEL "_"
-#define SMACK_STAR_LABEL  "*"
+bool mac_smack_use(void);
 
-bool use_smack(void);
+int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
 
-int smack_label_path(const char *path, const char *label);
-int smack_label_fd(int fd, const char *label);
-int smack_label_ip_in_fd(int fd, const char *label);
-int smack_label_ip_out_fd(int fd, const char *label);
+int mac_smack_apply(const char *path, const char *label);
+int mac_smack_apply_fd(int fd, const char *label);
+int mac_smack_apply_ip_in_fd(int fd, const char *label);
+int mac_smack_apply_ip_out_fd(int fd, const char *label);
index eb09779b334aafe29f866a6a92236e44a803ac62..47d9488d564c463ee3fe55b13c029f4c6da1866b 100644 (file)
@@ -64,7 +64,7 @@ int socket_address_listen(
                 return -EAFNOSUPPORT;
 
         if (label) {
-                r = label_socket_set(label);
+                r = mac_selinux_create_socket_prepare(label);
                 if (r < 0)
                         return r;
         }
@@ -73,7 +73,7 @@ int socket_address_listen(
         r = fd < 0 ? -errno : 0;
 
         if (label)
-                label_socket_clear();
+                mac_selinux_create_socket_clear();
 
         if (r < 0)
                 return r;
@@ -119,7 +119,7 @@ int socket_address_listen(
                 /* Include the original umask in our mask */
                 umask(~socket_mode | old_mask);
 
-                r = label_bind(fd, &a->sockaddr.sa, a->size);
+                r = mac_selinux_bind(fd, &a->sockaddr.sa, a->size);
 
                 if (r < 0 && errno == EADDRINUSE) {
                         /* Unlink and try again */
@@ -150,7 +150,8 @@ int make_socket_fd(int log_level, const char* address, int flags) {
 
         r = socket_address_parse(&a, address);
         if (r < 0) {
-                log_error("Failed to parse socket: %s", strerror(-r));
+                log_error("Failed to parse socket address \"%s\": %s",
+                          address, strerror(-r));
                 return r;
         }
 
@@ -166,7 +167,7 @@ int make_socket_fd(int log_level, const char* address, int flags) {
                 }
 
                 if (fd < 0)
-                        log_error("Failed to listen on %s: %s", p, strerror(-r));
+                        log_error("Failed to listen on %s: %s", p, strerror(-fd));
                 else
                         log_full(log_level, "Listening on %s", p);
         }
index 6f4979853eae0967852097d9f0a28f5fe9f4bb2d..911dbfe55a409445f585fbc1d1d7b6ffe585b2eb 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/stat.h>
 #include <stddef.h>
 #include <sys/ioctl.h>
+#include <netdb.h>
 
 #include "macro.h"
 #include "util.h"
@@ -425,11 +426,11 @@ bool socket_ipv6_is_supported(void) {
         _cleanup_free_ char *l = NULL;
 
         if (access("/sys/module/ipv6", F_OK) != 0)
-                return 0;
+                return false;
 
         /* If we can't check "disable" parameter, assume enabled */
         if (read_one_line_file("/sys/module/ipv6/parameters/disable", &l) < 0)
-                return 1;
+                return true;
 
         /* If module was loaded with disable=1 no IPv6 available */
         return l[0] == '0';
@@ -574,13 +575,12 @@ int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_
 
 int getpeername_pretty(int fd, char **ret) {
         union sockaddr_union sa;
-        socklen_t salen;
+        socklen_t salen = sizeof(sa);
         int r;
 
         assert(fd >= 0);
         assert(ret);
 
-        salen = sizeof(sa);
         if (getpeername(fd, &sa.sa, &salen) < 0)
                 return -errno;
 
@@ -608,12 +608,11 @@ int getpeername_pretty(int fd, char **ret) {
 
 int getsockname_pretty(int fd, char **ret) {
         union sockaddr_union sa;
-        socklen_t salen;
+        socklen_t salen = sizeof(sa);
 
         assert(fd >= 0);
         assert(ret);
 
-        salen = sizeof(sa);
         if (getsockname(fd, &sa.sa, &salen) < 0)
                 return -errno;
 
@@ -625,206 +624,62 @@ int getsockname_pretty(int fd, char **ret) {
         return sockaddr_pretty(&sa.sa, salen, false, ret);
 }
 
-int socket_address_unlink(SocketAddress *a) {
-        assert(a);
-
-        if (socket_address_family(a) != AF_UNIX)
-                return 0;
-
-        if (a->sockaddr.un.sun_path[0] == 0)
-                return 0;
-
-        if (unlink(a->sockaddr.un.sun_path) < 0)
-                return -errno;
-
-        return 1;
-}
-
-int in_addr_null(unsigned family, union in_addr_union *u) {
-        assert(u);
-
-        if (family == AF_INET)
-                return u->in.s_addr == 0;
-
-        if (family == AF_INET6)
-                return
-                        u->in6.s6_addr32[0] == 0 &&
-                        u->in6.s6_addr32[1] == 0 &&
-                        u->in6.s6_addr32[2] == 0 &&
-                        u->in6.s6_addr32[3] == 0;
-
-        return -EAFNOSUPPORT;
-}
-
-
-int in_addr_equal(unsigned family, union in_addr_union *a, union in_addr_union *b) {
-        assert(a);
-        assert(b);
-
-        if (family == AF_INET)
-                return a->in.s_addr == b->in.s_addr;
-
-        if (family == AF_INET6)
-                return
-                        a->in6.s6_addr32[0] == b->in6.s6_addr32[0] &&
-                        a->in6.s6_addr32[1] == b->in6.s6_addr32[1] &&
-                        a->in6.s6_addr32[2] == b->in6.s6_addr32[2] &&
-                        a->in6.s6_addr32[3] == b->in6.s6_addr32[3];
-
-        return -EAFNOSUPPORT;
-}
-
-int in_addr_prefix_intersect(
-                unsigned family,
-                const union in_addr_union *a,
-                unsigned aprefixlen,
-                const union in_addr_union *b,
-                unsigned bprefixlen) {
-
-        unsigned m;
-
-        assert(a);
-        assert(b);
-
-        /* Checks whether there are any addresses that are in both
-         * networks */
-
-        m = MIN(aprefixlen, bprefixlen);
-
-        if (family == AF_INET) {
-                uint32_t x, nm;
-
-                x = be32toh(a->in.s_addr ^ b->in.s_addr);
-                nm = (m == 0) ? 0 : 0xFFFFFFFFUL << (32 - m);
-
-                return (x & nm) == 0;
-        }
-
-        if (family == AF_INET6) {
-                unsigned i;
-
-                if (m > 128)
-                        m = 128;
-
-                for (i = 0; i < 16; i++) {
-                        uint8_t x, nm;
-
-                        x = a->in6.s6_addr[i] ^ b->in6.s6_addr[i];
-
-                        if (m < 8)
-                                nm = 0xFF << (8 - m);
-                        else
-                                nm = 0xFF;
-
-                        if ((x & nm) != 0)
-                                return 0;
-
-                        if (m > 8)
-                                m -= 8;
-                        else
-                                m = 0;
-                }
-
-                return 1;
-        }
-
-        return -EAFNOSUPPORT;
-}
-
-int in_addr_prefix_next(unsigned family, union in_addr_union *u, unsigned prefixlen) {
-        assert(u);
-
-        /* Increases the network part of an address by one. Returns
-         * positive it that succeeds, or 0 if this overflows. */
-
-        if (prefixlen <= 0)
-                return 0;
-
-        if (family == AF_INET) {
-                uint32_t c, n;
-
-                if (prefixlen > 32)
-                        prefixlen = 32;
-
-                c = be32toh(u->in.s_addr);
-                n = c + (1UL << (32 - prefixlen));
-                if (n < c)
-                        return 0;
-                n &= 0xFFFFFFFFUL << (32 - prefixlen);
-
-                u->in.s_addr = htobe32(n);
-                return 1;
-        }
-
-        if (family == AF_INET6) {
-                struct in6_addr add = {}, result;
-                uint8_t overflow = 0;
-                unsigned i;
-
-                if (prefixlen > 128)
-                        prefixlen = 128;
+int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret) {
+        int r;
+        char host[NI_MAXHOST], *ret;
 
-                /* First calculate what we have to add */
-                add.s6_addr[(prefixlen-1) / 8] = 1 << (7 - (prefixlen-1) % 8);
+        assert(_ret);
 
-                for (i = 16; i > 0; i--) {
-                        unsigned j = i - 1;
+        r = getnameinfo(&sa->sa, salen, host, sizeof(host), NULL, 0,
+                        NI_IDN|NI_IDN_USE_STD3_ASCII_RULES);
+        if (r != 0) {
+                int saved_errno = errno;
 
-                        result.s6_addr[j] = u->in6.s6_addr[j] + add.s6_addr[j] + overflow;
-                        overflow = (result.s6_addr[j] < u->in6.s6_addr[j]);
+                r = sockaddr_pretty(&sa->sa, salen, true, &ret);
+                if (r < 0) {
+                        log_error("sockadd_pretty() failed: %s", strerror(-r));
+                        return r;
                 }
 
-                if (overflow)
-                        return 0;
-
-                u->in6 = result;
-                return 1;
+                log_debug("getnameinfo(%s) failed: %s", ret, strerror(saved_errno));
+        } else {
+                ret = strdup(host);
+                if (!ret)
+                        return log_oom();
         }
 
-        return -EAFNOSUPPORT;
+        *_ret = ret;
+        return 0;
 }
 
-int in_addr_to_string(unsigned family, const union in_addr_union *u, char **ret) {
-        char *x;
-        size_t l;
+int getnameinfo_pretty(int fd, char **ret) {
+        union sockaddr_union sa;
+        socklen_t salen = sizeof(sa);
 
-        assert(u);
+        assert(fd >= 0);
         assert(ret);
 
-        if (family == AF_INET)
-                l = INET_ADDRSTRLEN;
-        else if (family == AF_INET6)
-                l = INET6_ADDRSTRLEN;
-        else
-                return -EAFNOSUPPORT;
-
-        x = new(char, l);
-        if (!x)
-                return -ENOMEM;
-
-        errno = 0;
-        if (!inet_ntop(family, u, x, l)) {
-                free(x);
-                return errno ? -errno : -EINVAL;
+        if (getsockname(fd, &sa.sa, &salen) < 0) {
+                log_error("getsockname(%d) failed: %m", fd);
+                return -errno;
         }
 
-        *ret = x;
-        return 0;
+        return socknameinfo_pretty(&sa, salen, ret);
 }
 
-int in_addr_from_string(unsigned family, const char *s, union in_addr_union *ret) {
+int socket_address_unlink(SocketAddress *a) {
+        assert(a);
 
-        assert(s);
-        assert(ret);
+        if (socket_address_family(a) != AF_UNIX)
+                return 0;
 
-        if (!IN_SET(family, AF_INET, AF_INET6))
-                return -EAFNOSUPPORT;
+        if (a->sockaddr.un.sun_path[0] == 0)
+                return 0;
 
-        errno = 0;
-        if (inet_pton(family, s, ret) <= 0)
-                return errno ? -errno : -EINVAL;
+        if (unlink(a->sockaddr.un.sun_path) < 0)
+                return -errno;
 
-        return 0;
+        return 1;
 }
 
 static const char* const netlink_family_table[] = {
@@ -856,3 +711,38 @@ static const char* const socket_address_bind_ipv6_only_table[_SOCKET_ADDRESS_BIN
 };
 
 DEFINE_STRING_TABLE_LOOKUP(socket_address_bind_ipv6_only, SocketAddressBindIPv6Only);
+
+bool sockaddr_equal(const union sockaddr_union *a, const union sockaddr_union *b) {
+        assert(a);
+        assert(b);
+
+        if (a->sa.sa_family != b->sa.sa_family)
+                return false;
+
+        if (a->sa.sa_family == AF_INET)
+                return a->in.sin_addr.s_addr == b->in.sin_addr.s_addr;
+
+        if (a->sa.sa_family == AF_INET6)
+                return memcmp(&a->in6.sin6_addr, &b->in6.sin6_addr, sizeof(a->in6.sin6_addr)) == 0;
+
+        return false;
+}
+
+char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]) {
+        assert(addr);
+        assert(buffer);
+
+        /* Like ether_ntoa() but uses %02x instead of %x to print
+         * ethernet addresses, which makes them look less funny. Also,
+         * doesn't use a static buffer. */
+
+        sprintf(buffer, "%02x:%02x:%02x:%02x:%02x:%02x",
+                addr->ether_addr_octet[0],
+                addr->ether_addr_octet[1],
+                addr->ether_addr_octet[2],
+                addr->ether_addr_octet[3],
+                addr->ether_addr_octet[4],
+                addr->ether_addr_octet[5]);
+
+        return buffer;
+}
index 25c4a7e4f96a05e996c921e6af167fd7ec08610a..07d0aff72b3a95d7776781abc9c28d281fd3f998 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <netinet/ether.h>
 #include <sys/un.h>
 #include <asm/types.h>
 #include <linux/netlink.h>
@@ -41,11 +42,6 @@ union sockaddr_union {
         struct sockaddr_ll ll;
 };
 
-union in_addr_union {
-        struct in_addr in;
-        struct in6_addr in6;
-};
-
 typedef struct SocketAddress {
         union sockaddr_union sockaddr;
 
@@ -106,15 +102,17 @@ int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_
 int getpeername_pretty(int fd, char **ret);
 int getsockname_pretty(int fd, char **ret);
 
+int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret);
+int getnameinfo_pretty(int fd, char **ret);
+
 const char* socket_address_bind_ipv6_only_to_string(SocketAddressBindIPv6Only b) _const_;
 SocketAddressBindIPv6Only socket_address_bind_ipv6_only_from_string(const char *s) _pure_;
 
 int netlink_family_to_string_alloc(int b, char **s);
 int netlink_family_from_string(const char *s) _pure_;
 
-int in_addr_null(unsigned family, union in_addr_union *u);
-int in_addr_equal(unsigned family, union in_addr_union *a, union in_addr_union *b);
-int in_addr_prefix_intersect(unsigned family, const union in_addr_union *a, unsigned aprefixlen, const union in_addr_union *b, unsigned bprefixlen);
-int in_addr_prefix_next(unsigned family, union in_addr_union *u, unsigned prefixlen);
-int in_addr_to_string(unsigned family, const union in_addr_union *u, char **ret);
-int in_addr_from_string(unsigned family, const char *s, union in_addr_union *ret);
+bool sockaddr_equal(const union sockaddr_union *a, const union sockaddr_union *b);
+
+#define ETHER_ADDR_TO_STRING_MAX (3*6)
+
+char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]);
index eb4dbf361560299c13d68a8be0c12db1bb39a741..c913fda8c55b71a3b1020f2f00652ceebaba4da3 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef SPARSE_ENDIAN_H
 #define SPARSE_ENDIAN_H
 
+#include <byteswap.h>
 #include <endian.h>
 #include <stdint.h>
 
index fccf1e9173b709ffc6bb7fd7402ef8f9103ba1b4..29b01db19a41a7dafd4f16dadb7041ba6d17bf9b 100644 (file)
@@ -67,7 +67,7 @@ int polkit_agent_open(void) {
                 log_error("Failed to fork TTY ask password agent: %s", strerror(-r));
         else
                 /* Wait until the agent closes the fd */
-                fd_wait_for_event(pipe_fd[0], POLLHUP, (usec_t) -1);
+                fd_wait_for_event(pipe_fd[0], POLLHUP, USEC_INFINITY);
 
         safe_close(pipe_fd[0]);
 
index 2fe5db55584cb8aa1daf1db9a01565d034e19b4e..b045047d36afac59ef3e95176c0d5b8706afcb87 100644 (file)
 #define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target"
 #define SPECIAL_SWAP_TARGET "swap.target"
 #define SPECIAL_NETWORK_ONLINE_TARGET "network-online.target"
+#define SPECIAL_TIME_SYNC_TARGET "time-sync.target"       /* LSB's $time */
 #define SPECIAL_BASIC_TARGET "basic.target"
 
 /* LSB compatibility */
 #define SPECIAL_NETWORK_TARGET "network.target"           /* LSB's $network */
 #define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target"     /* LSB's $named */
 #define SPECIAL_RPCBIND_TARGET "rpcbind.target"           /* LSB's $portmap */
-#define SPECIAL_TIME_SYNC_TARGET "time-sync.target"       /* LSB's $time */
 
 /*
  * Rules regarding adding further high level targets like the above:
index b4c476eff27df9858698ad4f52e66210b6696bb7..00857e40a7a3b500865c9516a2bc69fd25a8432e 100644 (file)
@@ -52,6 +52,23 @@ char *strv_find_prefix(char **l, const char *name) {
         return NULL;
 }
 
+char *strv_find_startswith(char **l, const char *name) {
+        char **i, *e;
+
+        assert(name);
+
+        /* Like strv_find_prefix, but actually returns only the
+         * suffix, not the whole item */
+
+        STRV_FOREACH(i, l) {
+                e = startswith(*i, name);
+                if (e)
+                        return e;
+        }
+
+        return NULL;
+}
+
 void strv_free(char **l) {
         char **k;
 
@@ -201,8 +218,7 @@ int strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
 }
 
 char **strv_split(const char *s, const char *separator) {
-        char *state;
-        char *w;
+        const char *word, *state;
         size_t l;
         unsigned n, i;
         char **r;
@@ -210,7 +226,7 @@ char **strv_split(const char *s, const char *separator) {
         assert(s);
 
         n = 0;
-        FOREACH_WORD_SEPARATOR(w, l, s, separator, state)
+        FOREACH_WORD_SEPARATOR(word, l, s, separator, state)
                 n++;
 
         r = new(char*, n+1);
@@ -218,8 +234,8 @@ char **strv_split(const char *s, const char *separator) {
                 return NULL;
 
         i = 0;
-        FOREACH_WORD_SEPARATOR(w, l, s, separator, state) {
-                r[i] = strndup(w, l);
+        FOREACH_WORD_SEPARATOR(word, l, s, separator, state) {
+                r[i] = strndup(word, l);
                 if (!r[i]) {
                         strv_free(r);
                         return NULL;
@@ -232,9 +248,8 @@ char **strv_split(const char *s, const char *separator) {
         return r;
 }
 
-char **strv_split_quoted(const char *s) {
-        char *state;
-        char *w;
+int strv_split_quoted(char ***t, const char *s) {
+        const char *word, *state;
         size_t l;
         unsigned n, i;
         char **r;
@@ -242,25 +257,29 @@ char **strv_split_quoted(const char *s) {
         assert(s);
 
         n = 0;
-        FOREACH_WORD_QUOTED(w, l, s, state)
+        FOREACH_WORD_QUOTED(word, l, s, state)
                 n++;
+        if (!isempty(state))
+                /* bad syntax */
+                return -EINVAL;
 
         r = new(char*, n+1);
         if (!r)
-                return NULL;
+                return -ENOMEM;
 
         i = 0;
-        FOREACH_WORD_QUOTED(w, l, s, state) {
-                r[i] = cunescape_length(w, l);
+        FOREACH_WORD_QUOTED(word, l, s, state) {
+                r[i] = cunescape_length(word, l);
                 if (!r[i]) {
                         strv_free(r);
-                        return NULL;
+                        return -ENOMEM;
                 }
                 i++;
         }
 
         r[i] = NULL;
-        return r;
+        *t = r;
+        return 0;
 }
 
 char **strv_split_newlines(const char *s) {
@@ -361,13 +380,19 @@ char *strv_join_quoted(char **l) {
 
 int strv_push(char ***l, char *value) {
         char **c;
-        unsigned n;
+        unsigned n, m;
 
         if (!value)
                 return 0;
 
         n = strv_length(*l);
-        c = realloc(*l, sizeof(char*) * (n + 2));
+
+        /* increase and check for overflow */
+        m = n + 2;
+        if (m < n)
+                return -ENOMEM;
+
+        c = realloc_multiply(*l, sizeof(char*), m);
         if (!c)
                 return -ENOMEM;
 
@@ -380,13 +405,19 @@ int strv_push(char ***l, char *value) {
 
 int strv_push_prepend(char ***l, char *value) {
         char **c;
-        unsigned n, i;
+        unsigned n, m, i;
 
         if (!value)
                 return 0;
 
         n = strv_length(*l);
-        c = new(char*, n + 2);
+
+        /* increase and check for overflow */
+        m = n + 2;
+        if (m < n)
+                return -ENOMEM;
+
+        c = new(char*, m);
         if (!c)
                 return -ENOMEM;
 
index 3034073d3288e5a28871769b4561b4d53d70837c..9c9633c515f04db60488461c810c89af7cffe927 100644 (file)
@@ -28,6 +28,7 @@
 
 char *strv_find(char **l, const char *name) _pure_;
 char *strv_find_prefix(char **l, const char *name) _pure_;
+char *strv_find_startswith(char **l, const char *name) _pure_;
 
 void strv_free(char **l);
 DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free);
@@ -62,7 +63,7 @@ static inline bool strv_isempty(char * const *l) {
 }
 
 char **strv_split(const char *s, const char *separator);
-char **strv_split_quoted(const char *s);
+int strv_split_quoted(char ***t, const char *s);
 char **strv_split_newlines(const char *s);
 
 char *strv_join(char **l, const char *separator);
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
new file mode 100644 (file)
index 0000000..bac0e5c
--- /dev/null
@@ -0,0 +1,162 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2012 Harald Hoyer, Lennart Poettering
+
+  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/>.
+***/
+
+#include <sys/stat.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/mount.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include "util.h"
+#include "path-util.h"
+#include "switch-root.h"
+#include "mkdir.h"
+#include "base-filesystem.h"
+#include "missing.h"
+
+int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,  unsigned long mountflags) {
+
+        /*  Don't try to unmount/move the old "/", there's no way to do it. */
+        static const char move_mounts[] =
+                "/dev\0"
+                "/proc\0"
+                "/sys\0"
+                "/run\0";
+
+        _cleanup_close_ int old_root_fd = -1;
+        struct stat new_root_stat;
+        bool old_root_remove;
+        const char *i, *temporary_old_root;
+        int r;
+
+        if (path_equal(new_root, "/"))
+                return 0;
+
+        temporary_old_root = strappenda(new_root, oldroot);
+        mkdir_p_label(temporary_old_root, 0755);
+
+        old_root_remove = in_initrd();
+
+        if (stat(new_root, &new_root_stat) < 0) {
+                log_error("Failed to stat directory %s: %m", new_root);
+                return -errno;
+        }
+
+        /* Work-around for kernel design: the kernel refuses switching
+         * root if any file systems are mounted MS_SHARED. Hence
+         * remount them MS_PRIVATE here as a work-around.
+         *
+         * https://bugzilla.redhat.com/show_bug.cgi?id=847418 */
+        if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0)
+                log_warning("Failed to make \"/\" private mount: %m");
+
+        NULSTR_FOREACH(i, move_mounts) {
+                char new_mount[PATH_MAX];
+                struct stat sb;
+
+                snprintf(new_mount, sizeof(new_mount), "%s%s", new_root, i);
+                char_array_0(new_mount);
+
+                mkdir_p_label(new_mount, 0755);
+
+                if ((stat(new_mount, &sb) < 0) ||
+                    sb.st_dev != new_root_stat.st_dev) {
+
+                        /* Mount point seems to be mounted already or
+                         * stat failed. Unmount the old mount
+                         * point. */
+                        if (umount2(i, MNT_DETACH) < 0)
+                                log_warning("Failed to unmount %s: %m", i);
+                        continue;
+                }
+
+                if (mount(i, new_mount, NULL, mountflags, NULL) < 0) {
+                        if (mountflags & MS_MOVE) {
+                                log_error("Failed to move mount %s to %s, forcing unmount: %m", i, new_mount);
+
+                                if (umount2(i, MNT_FORCE) < 0)
+                                        log_warning("Failed to unmount %s: %m", i);
+                        }
+                        if (mountflags & MS_BIND)
+                                log_error("Failed to bind mount %s to %s: %m", i, new_mount);
+
+                }
+        }
+
+        r = base_filesystem_create(new_root);
+        if (r < 0) {
+                log_error("Failed to create the base filesystem: %s", strerror(-r));
+                return r;
+        }
+
+        if (chdir(new_root) < 0) {
+                log_error("Failed to change directory to %s: %m", new_root);
+                return -errno;
+        }
+
+        if (old_root_remove) {
+                old_root_fd = open("/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY|O_DIRECTORY);
+                if (old_root_fd < 0)
+                        log_warning("Failed to open root directory: %m");
+        }
+
+        /* We first try a pivot_root() so that we can umount the old
+         * root dir. In many cases (i.e. where rootfs is /), that's
+         * not possible however, and hence we simply overmount root */
+        if (pivot_root(new_root, temporary_old_root) >= 0) {
+
+                /* Immediately get rid of the old root, if detach_oldroot is set.
+                 * Since we are running off it we need to do this lazily. */
+                if (detach_oldroot && umount2(oldroot, MNT_DETACH) < 0)
+                        log_error("Failed to lazily umount old root dir %s, %s: %m",
+                                  oldroot,
+                                  errno == ENOENT ? "ignoring" : "leaving it around");
+
+        } else if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0) {
+                log_error("Failed to mount moving %s to /: %m", new_root);
+                return -errno;
+        }
+
+        if (chroot(".") < 0) {
+                log_error("Failed to change root: %m");
+                return -errno;
+        }
+
+        if (chdir("/") < 0) {
+                log_error("Failed to change directory: %m");
+                return -errno;
+        }
+
+        if (old_root_fd >= 0) {
+                struct stat rb;
+
+                if (fstat(old_root_fd, &rb) < 0)
+                        log_warning("Failed to stat old root directory, leaving: %m");
+                else {
+                        rm_rf_children(old_root_fd, false, false, &rb);
+                        old_root_fd = -1;
+                }
+        }
+
+        return 0;
+}
diff --git a/src/shared/switch-root.h b/src/shared/switch-root.h
new file mode 100644 (file)
index 0000000..adf893a
--- /dev/null
@@ -0,0 +1,24 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2012 Harald Hoyer, Lennart Poettering
+
+  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/>.
+***/
+
+int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, unsigned long mountflags);
index 3261302077d4cb1765fa9f477103bd7cd4d80043..74f1716fe08ee9af42fc7bd1c6f7bdcd1ceef840 100644 (file)
@@ -40,12 +40,14 @@ static inline void _test_table(const char *name,
                         rev = reverse("--no-such--value----");
 
                 printf("%s: %d → %s → %d\n", name, i, val, rev);
-                if (i >= 0 && i < size ?
-                    sparse ? rev != i && rev != -1 : val == NULL || rev != i :
-                    val != NULL || rev != -1)
-                        exit(EXIT_FAILURE);
+                assert_se(!(i >= 0 && i < size ?
+                            sparse ? rev != i && rev != -1 : val == NULL || rev != i :
+                            val != NULL || rev != -1));
         }
 }
 
 #define test_table(lower, upper) \
         _test_table(STRINGIFY(lower), lower##_to_string, lower##_from_string, _##upper##_MAX, false)
+
+#define test_table_sparse(lower, upper) \
+        _test_table(STRINGIFY(lower), lower##_to_string, lower##_from_string, _##upper##_MAX, true)
index ceca2fafae2f027288b5bc0677726a176e6b3784..6195b110176a3f05001a5d0c5d2c02a1795eddac 100644 (file)
@@ -207,8 +207,8 @@ read_again:
                 if (type_idxs[i] >= num_types)
                         return -EINVAL;
 
-        if (BYTE_ORDER == BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4
-                                     : sizeof(time_t) == 4 || trans_width == 4) {
+        if (__BYTE_ORDER == __BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4
+                                         : sizeof(time_t) == 4 || trans_width == 4) {
                 /* Decode the transition times, stored as 4-byte integers in
                    network (big-endian) byte order.  We work from the end of
                    the array so as not to clobber the next element to be
@@ -216,7 +216,7 @@ read_again:
                 i = num_transitions;
                 while (i-- > 0)
                         transitions[i] = decode((char *)transitions + i * 4);
-        } else if (BYTE_ORDER != BIG_ENDIAN && sizeof(time_t) == 8) {
+        } else if (__BYTE_ORDER != __BIG_ENDIAN && sizeof(time_t) == 8) {
                 /* Decode the transition times, stored as 8-byte integers in
                    network (big-endian) byte order.  */
                 for (i = 0; i < num_transitions; ++i)
index 8e5de77757fa587a7e3db4db985104e4877b5f18..d3404afd55f140aeb16316890ef53b758e8d2291 100644 (file)
 #include <time.h>
 #include <string.h>
 #include <sys/timex.h>
+#include <sys/timerfd.h>
 
 #include "util.h"
 #include "time-util.h"
+#include "strv.h"
 
 usec_t now(clockid_t clock_id) {
         struct timespec ts;
@@ -47,25 +49,20 @@ dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u) {
         int64_t delta;
         assert(ts);
 
-        if (u == (usec_t) -1) {
-                ts->realtime = ts->monotonic = (usec_t) -1;
+        if (u == USEC_INFINITY || u <= 0) {
+                ts->realtime = ts->monotonic = u;
                 return ts;
         }
 
         ts->realtime = u;
 
-        if (u == 0)
-                ts->monotonic = 0;
-        else {
-                delta = (int64_t) now(CLOCK_REALTIME) - (int64_t) u;
-
-                ts->monotonic = now(CLOCK_MONOTONIC);
+        delta = (int64_t) now(CLOCK_REALTIME) - (int64_t) u;
+        ts->monotonic = now(CLOCK_MONOTONIC);
 
-                if ((int64_t) ts->monotonic > delta)
-                        ts->monotonic -= delta;
-                else
-                        ts->monotonic = 0;
-        }
+        if ((int64_t) ts->monotonic > delta)
+                ts->monotonic -= delta;
+        else
+                ts->monotonic = 0;
 
         return ts;
 }
@@ -74,8 +71,8 @@ dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u) {
         int64_t delta;
         assert(ts);
 
-        if (u == (usec_t) -1) {
-                ts->realtime = ts->monotonic = (usec_t) -1;
+        if (u == USEC_INFINITY) {
+                ts->realtime = ts->monotonic = USEC_INFINITY;
                 return ts;
         }
 
@@ -96,10 +93,10 @@ usec_t timespec_load(const struct timespec *ts) {
 
         if (ts->tv_sec == (time_t) -1 &&
             ts->tv_nsec == (long) -1)
-                return (usec_t) -1;
+                return USEC_INFINITY;
 
         if ((usec_t) ts->tv_sec > (UINT64_MAX - (ts->tv_nsec / NSEC_PER_USEC)) / USEC_PER_SEC)
-                return (usec_t) -1;
+                return USEC_INFINITY;
 
         return
                 (usec_t) ts->tv_sec * USEC_PER_SEC +
@@ -109,7 +106,7 @@ usec_t timespec_load(const struct timespec *ts) {
 struct timespec *timespec_store(struct timespec *ts, usec_t u)  {
         assert(ts);
 
-        if (u == (usec_t) -1) {
+        if (u == USEC_INFINITY) {
                 ts->tv_sec = (time_t) -1;
                 ts->tv_nsec = (long) -1;
                 return ts;
@@ -126,10 +123,10 @@ usec_t timeval_load(const struct timeval *tv) {
 
         if (tv->tv_sec == (time_t) -1 &&
             tv->tv_usec == (suseconds_t) -1)
-                return (usec_t) -1;
+                return USEC_INFINITY;
 
         if ((usec_t) tv->tv_sec > (UINT64_MAX - tv->tv_usec) / USEC_PER_SEC)
-                return (usec_t) -1;
+                return USEC_INFINITY;
 
         return
                 (usec_t) tv->tv_sec * USEC_PER_SEC +
@@ -139,7 +136,7 @@ usec_t timeval_load(const struct timeval *tv) {
 struct timeval *timeval_store(struct timeval *tv, usec_t u) {
         assert(tv);
 
-        if (u == (usec_t) -1) {
+        if (u == USEC_INFINITY) {
                 tv->tv_sec = (time_t) -1;
                 tv->tv_usec = (suseconds_t) -1;
         } else {
@@ -150,36 +147,51 @@ struct timeval *timeval_store(struct timeval *tv, usec_t u) {
         return tv;
 }
 
-char *format_timestamp(char *buf, size_t l, usec_t t) {
+static char *format_timestamp_internal(char *buf, size_t l, usec_t t, bool utc) {
         struct tm tm;
         time_t sec;
 
         assert(buf);
         assert(l > 0);
 
-        if (t <= 0 || t == (usec_t) -1)
+        if (t <= 0 || t == USEC_INFINITY)
                 return NULL;
 
         sec = (time_t) (t / USEC_PER_SEC);
 
-        if (strftime(buf, l, "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm)) <= 0)
+        if (utc)
+                gmtime_r(&sec, &tm);
+        else
+                localtime_r(&sec, &tm);
+        if (strftime(buf, l, "%a %Y-%m-%d %H:%M:%S %Z", &tm) <= 0)
                 return NULL;
 
         return buf;
 }
 
-char *format_timestamp_us(char *buf, size_t l, usec_t t) {
+char *format_timestamp(char *buf, size_t l, usec_t t) {
+        return format_timestamp_internal(buf, l, t, false);
+}
+
+char *format_timestamp_utc(char *buf, size_t l, usec_t t) {
+        return format_timestamp_internal(buf, l, t, true);
+}
+
+static char *format_timestamp_internal_us(char *buf, size_t l, usec_t t, bool utc) {
         struct tm tm;
         time_t sec;
 
         assert(buf);
         assert(l > 0);
 
-        if (t <= 0 || t == (usec_t) -1)
+        if (t <= 0 || t == USEC_INFINITY)
                 return NULL;
 
         sec = (time_t) (t / USEC_PER_SEC);
-        localtime_r(&sec, &tm);
+        if (utc)
+                gmtime_r(&sec, &tm);
+        else
+                localtime_r(&sec, &tm);
 
         if (strftime(buf, l, "%a %Y-%m-%d %H:%M:%S", &tm) <= 0)
                 return NULL;
@@ -190,15 +202,22 @@ char *format_timestamp_us(char *buf, size_t l, usec_t t) {
         return buf;
 }
 
+char *format_timestamp_us(char *buf, size_t l, usec_t t) {
+        return format_timestamp_internal_us(buf, l, t, false);
+}
+
+char *format_timestamp_us_utc(char *buf, size_t l, usec_t t) {
+        return format_timestamp_internal_us(buf, l, t, true);
+}
+
 char *format_timestamp_relative(char *buf, size_t l, usec_t t) {
         const char *s;
         usec_t n, d;
 
-        n = now(CLOCK_REALTIME);
-
-        if (t <= 0 || (t == (usec_t) -1))
+        if (t <= 0 || t == USEC_INFINITY)
                 return NULL;
 
+        n = now(CLOCK_REALTIME);
         if (n > t) {
                 d = n - t;
                 s = "ago";
@@ -277,11 +296,14 @@ char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
         assert(buf);
         assert(l > 0);
 
-        if (t == (usec_t) -1)
-                return NULL;
+        if (t == USEC_INFINITY) {
+                strncpy(p, "infinity", l-1);
+                p[l-1] = 0;
+                return p;
+        }
 
         if (t <= 0) {
-                snprintf(p, l, "0");
+                strncpy(p, "0", l-1);
                 p[l-1] = 0;
                 return p;
         }
@@ -626,7 +648,7 @@ int parse_sec(const char *t, usec_t *usec) {
                 { "", USEC_PER_SEC }, /* default is sec */
         };
 
-        const char *p;
+        const char *p, *s;
         usec_t r = 0;
         bool something = false;
 
@@ -634,6 +656,18 @@ int parse_sec(const char *t, usec_t *usec) {
         assert(usec);
 
         p = t;
+
+        p += strspn(p, WHITESPACE);
+        s = startswith(p, "infinity");
+        if (s) {
+                s += strspn(s, WHITESPACE);
+                if (*s != 0)
+                        return -EINVAL;
+
+                *usec = USEC_INFINITY;
+                return 0;
+        }
+
         for (;;) {
                 long long l, z = 0;
                 char *e;
@@ -739,7 +773,7 @@ int parse_nsec(const char *t, nsec_t *nsec) {
                 { "", 1ULL }, /* default is nsec */
         };
 
-        const char *p;
+        const char *p, *s;
         nsec_t r = 0;
         bool something = false;
 
@@ -747,6 +781,18 @@ int parse_nsec(const char *t, nsec_t *nsec) {
         assert(nsec);
 
         p = t;
+
+        p += strspn(p, WHITESPACE);
+        s = startswith(p, "infinity");
+        if (s) {
+                s += strspn(s, WHITESPACE);
+                if (!*s != 0)
+                        return -EINVAL;
+
+                *nsec = NSEC_INFINITY;
+                return 0;
+        }
+
         for (;;) {
                 long long l, z = 0;
                 char *e;
@@ -826,3 +872,123 @@ bool ntp_synced(void) {
 
         return true;
 }
+
+int get_timezones(char ***ret) {
+        _cleanup_fclose_ FILE *f = NULL;
+        _cleanup_strv_free_ char **zones = NULL;
+        size_t n_zones = 0, n_allocated = 0;
+
+        assert(ret);
+
+        zones = strv_new("UTC", NULL);
+        if (!zones)
+                return -ENOMEM;
+
+        n_allocated = 2;
+        n_zones = 1;
+
+        f = fopen("/usr/share/zoneinfo/zone.tab", "re");
+        if (f) {
+                char l[LINE_MAX];
+
+                FOREACH_LINE(l, f, return -errno) {
+                        char *p, *w;
+                        size_t k;
+
+                        p = strstrip(l);
+
+                        if (isempty(p) || *p == '#')
+                                continue;
+
+                        /* Skip over country code */
+                        p += strcspn(p, WHITESPACE);
+                        p += strspn(p, WHITESPACE);
+
+                        /* Skip over coordinates */
+                        p += strcspn(p, WHITESPACE);
+                        p += strspn(p, WHITESPACE);
+
+                        /* Found timezone name */
+                        k = strcspn(p, WHITESPACE);
+                        if (k <= 0)
+                                continue;
+
+                        w = strndup(p, k);
+                        if (!w)
+                                return -ENOMEM;
+
+                        if (!GREEDY_REALLOC(zones, n_allocated, n_zones + 2)) {
+                                free(w);
+                                return -ENOMEM;
+                        }
+
+                        zones[n_zones++] = w;
+                        zones[n_zones] = NULL;
+                }
+
+                strv_sort(zones);
+
+        } else if (errno != ENOENT)
+                return -errno;
+
+        *ret = zones;
+        zones = NULL;
+
+        return 0;
+}
+
+bool timezone_is_valid(const char *name) {
+        bool slash = false;
+        const char *p, *t;
+        struct stat st;
+
+        if (!name || *name == 0 || *name == '/')
+                return false;
+
+        for (p = name; *p; p++) {
+                if (!(*p >= '0' && *p <= '9') &&
+                    !(*p >= 'a' && *p <= 'z') &&
+                    !(*p >= 'A' && *p <= 'Z') &&
+                    !(*p == '-' || *p == '_' || *p == '+' || *p == '/'))
+                        return false;
+
+                if (*p == '/') {
+
+                        if (slash)
+                                return false;
+
+                        slash = true;
+                } else
+                        slash = false;
+        }
+
+        if (slash)
+                return false;
+
+        t = strappenda("/usr/share/zoneinfo/", name);
+        if (stat(t, &st) < 0)
+                return false;
+
+        if (!S_ISREG(st.st_mode))
+                return false;
+
+        return true;
+}
+
+clockid_t clock_boottime_or_monotonic(void) {
+        static clockid_t clock = -1;
+        int fd;
+
+        if (clock != -1)
+                return clock;
+
+        fd = timerfd_create(CLOCK_BOOTTIME, TFD_NONBLOCK|TFD_CLOEXEC);
+        if (fd < 0)
+                clock = CLOCK_MONOTONIC;
+        else {
+                safe_close(fd);
+                clock = CLOCK_BOOTTIME;
+        }
+
+        return clock;
+}
index 34ba6c11be3d284eda7576ad35dcb49f7de6207a..b55a660bb006c140d5387d95c27bee8b603a22d2 100644 (file)
@@ -37,31 +37,36 @@ typedef struct dual_timestamp {
         usec_t monotonic;
 } dual_timestamp;
 
-#define MSEC_PER_SEC  ((usec_t) 1000ULL)
+#define USEC_INFINITY ((usec_t) -1)
+#define NSEC_INFINITY ((nsec_t) -1)
+
+#define MSEC_PER_SEC  1000ULL
 #define USEC_PER_SEC  ((usec_t) 1000000ULL)
 #define USEC_PER_MSEC ((usec_t) 1000ULL)
-#define NSEC_PER_SEC  ((usec_t) 1000000000ULL)
-#define NSEC_PER_MSEC ((usec_t) 1000000ULL)
-#define NSEC_PER_USEC ((usec_t) 1000ULL)
+#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
+#define NSEC_PER_MSEC ((nsec_t) 1000000ULL)
+#define NSEC_PER_USEC ((nsec_t) 1000ULL)
 
 #define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
-#define NSEC_PER_MINUTE ((usec_t) (60ULL*NSEC_PER_SEC))
+#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
 #define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
-#define NSEC_PER_HOUR ((usec_t) (60ULL*NSEC_PER_MINUTE))
+#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
 #define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
-#define NSEC_PER_DAY ((usec_t) (24ULL*NSEC_PER_HOUR))
+#define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
 #define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY))
-#define NSEC_PER_WEEK ((usec_t) (7ULL*NSEC_PER_DAY))
+#define NSEC_PER_WEEK ((nsec_t) (7ULL*NSEC_PER_DAY))
 #define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC))
-#define NSEC_PER_MONTH ((usec_t) (2629800ULL*NSEC_PER_SEC))
+#define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC))
 #define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC))
-#define NSEC_PER_YEAR ((usec_t) (31557600ULL*NSEC_PER_SEC))
+#define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC))
 
 #define FORMAT_TIMESTAMP_MAX ((4*4+1)+11+9+4+1) /* weekdays can be unicode */
 #define FORMAT_TIMESTAMP_WIDTH 28 /* when outputting, assume this width */
 #define FORMAT_TIMESTAMP_RELATIVE_MAX 256
 #define FORMAT_TIMESPAN_MAX 64
 
+#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
+
 #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 })
 
 usec_t now(clockid_t clock);
@@ -71,8 +76,8 @@ dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u);
 dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u);
 
 static inline bool dual_timestamp_is_set(dual_timestamp *ts) {
-        return ((ts->realtime > 0 && ts->realtime != (usec_t) -1) ||
-                (ts->monotonic > 0 && ts->monotonic != (usec_t) -1));
+        return ((ts->realtime > 0 && ts->realtime != USEC_INFINITY) ||
+                (ts->monotonic > 0 && ts->monotonic != USEC_INFINITY));
 }
 
 usec_t timespec_load(const struct timespec *ts) _pure_;
@@ -82,7 +87,9 @@ usec_t timeval_load(const struct timeval *tv) _pure_;
 struct timeval *timeval_store(struct timeval *tv, usec_t u);
 
 char *format_timestamp(char *buf, size_t l, usec_t t);
+char *format_timestamp_utc(char *buf, size_t l, usec_t t);
 char *format_timestamp_us(char *buf, size_t l, usec_t t);
+char *format_timestamp_us_utc(char *buf, size_t l, usec_t t);
 char *format_timestamp_relative(char *buf, size_t l, usec_t t);
 char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy);
 
@@ -95,3 +102,8 @@ int parse_sec(const char *t, usec_t *usec);
 int parse_nsec(const char *t, nsec_t *nsec);
 
 bool ntp_synced(void);
+
+int get_timezones(char ***l);
+bool timezone_is_valid(const char *name);
+
+clockid_t clock_boottime_or_monotonic(void);
diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
new file mode 100644 (file)
index 0000000..74c3be4
--- /dev/null
@@ -0,0 +1,205 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include "util.h"
+#include "uid-range.h"
+
+static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
+        assert(range);
+
+        return range->start <= start + nr &&
+                range->start + range->nr >= start;
+}
+
+static void uid_range_coalesce(UidRange **p, unsigned *n) {
+        unsigned i, j;
+
+        assert(p);
+        assert(n);
+
+        for (i = 0; i < *n; i++) {
+                for (j = i + 1; j < *n; j++) {
+                        UidRange *x = (*p)+i, *y = (*p)+j;
+
+                        if (uid_range_intersect(x, y->start, y->nr)) {
+                                uid_t begin, end;
+
+                                begin = MIN(x->start, y->start);
+                                end = MAX(x->start + x->nr, y->start + y->nr);
+
+                                x->start = begin;
+                                x->nr = end - begin;
+
+                                if (*n > j+1)
+                                        memmove(y, y+1, sizeof(UidRange) * (*n - j -1));
+
+                                (*n) --;
+                                j--;
+                        }
+                }
+        }
+
+}
+
+static int uid_range_compare(const void *a, const void *b) {
+        const UidRange *x = a, *y = b;
+
+        if (x->start < y->start)
+                return -1;
+        if (x->start > y->start)
+                return 1;
+
+        if (x->nr < y->nr)
+                return -1;
+        if (x->nr > y->nr)
+                return 1;
+
+        return 0;
+}
+
+int uid_range_add(UidRange **p, unsigned *n, uid_t start, uid_t nr) {
+        bool found = false;
+        UidRange *x;
+        unsigned i;
+
+        assert(p);
+        assert(n);
+
+        if (nr <= 0)
+                return 0;
+
+        for (i = 0; i < *n; i++) {
+                x = (*p) + i;
+                if (uid_range_intersect(x, start, nr)) {
+                        found = true;
+                        break;
+                }
+        }
+
+        if (found) {
+                uid_t begin, end;
+
+                begin = MIN(x->start, start);
+                end = MAX(x->start + x->nr, start + nr);
+
+                x->start = begin;
+                x->nr = end - begin;
+        } else {
+                UidRange *t;
+
+                t = realloc(*p, sizeof(UidRange) * (*n + 1));
+                if (!t)
+                        return -ENOMEM;
+
+                *p = t;
+                x = t + ((*n) ++);
+
+                x->start = start;
+                x->nr = nr;
+        }
+
+        qsort(*p, *n, sizeof(UidRange), uid_range_compare);
+        uid_range_coalesce(p, n);
+
+        return *n;
+}
+
+int uid_range_add_str(UidRange **p, unsigned *n, const char *s) {
+        uid_t start, nr;
+        const char *t;
+        int r;
+
+        assert(p);
+        assert(n);
+        assert(s);
+
+        t = strchr(s, '-');
+        if (t) {
+                char *b;
+                uid_t end;
+
+                b = strndupa(s, t - s);
+                r = parse_uid(b, &start);
+                if (r < 0)
+                        return r;
+
+                r = parse_uid(t+1, &end);
+                if (r < 0)
+                        return r;
+
+                if (end < start)
+                        return -EINVAL;
+
+                nr = end - start + 1;
+        } else {
+                r = parse_uid(s, &start);
+                if (r < 0)
+                        return r;
+
+                nr = 1;
+        }
+
+        return uid_range_add(p, n, start, nr);
+}
+
+int uid_range_next_lower(const UidRange *p, unsigned n, uid_t *uid) {
+        uid_t closest = (uid_t) -1, candidate;
+        unsigned i;
+
+        assert(p);
+        assert(uid);
+
+        candidate = *uid - 1;
+
+        for (i = 0; i < n; i++) {
+                uid_t begin, end;
+
+                begin = p[i].start;
+                end = p[i].start + p[i].nr - 1;
+
+                if (candidate >= begin && candidate <= end) {
+                        *uid = candidate;
+                        return 1;
+                }
+
+                if (end < candidate)
+                        closest = end;
+        }
+
+        if (closest == (uid_t) -1)
+                return -EBUSY;
+
+        *uid = closest;
+        return 1;
+}
+
+bool uid_range_contains(const UidRange *p, unsigned n, uid_t uid) {
+        unsigned i;
+
+        assert(p);
+        assert(uid);
+
+        for (i = 0; i < n; i++)
+                if (uid >= p[i].start && uid < p[i].start + p[i].nr)
+                        return true;
+
+        return false;
+}
diff --git a/src/shared/uid-range.h b/src/shared/uid-range.h
new file mode 100644 (file)
index 0000000..d3dac8d
--- /dev/null
@@ -0,0 +1,34 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <sys/types.h>
+
+typedef struct UidRange {
+        uid_t start, nr;
+} UidRange;
+
+int uid_range_add(UidRange **p, unsigned *n, uid_t start, uid_t nr);
+int uid_range_add_str(UidRange **p, unsigned *n, const char *s);
+
+int uid_range_next_lower(const UidRange *p, unsigned n, uid_t *uid);
+bool uid_range_contains(const UidRange *p, unsigned n, uid_t uid);
index a2d62d31513285e16aa88802238698211fff1dd3..2ef85450e7096e008b04c8b7603fd52fbea8e418 100644 (file)
@@ -592,3 +592,32 @@ int build_subslice(const char *slice, const char*name, char **subslice) {
         *subslice = ret;
         return 0;
 }
+
+static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = {
+        [UNIT_REQUIRES] = "Requires",
+        [UNIT_REQUIRES_OVERRIDABLE] = "RequiresOverridable",
+        [UNIT_REQUISITE] = "Requisite",
+        [UNIT_REQUISITE_OVERRIDABLE] = "RequisiteOverridable",
+        [UNIT_WANTS] = "Wants",
+        [UNIT_BINDS_TO] = "BindsTo",
+        [UNIT_PART_OF] = "PartOf",
+        [UNIT_REQUIRED_BY] = "RequiredBy",
+        [UNIT_REQUIRED_BY_OVERRIDABLE] = "RequiredByOverridable",
+        [UNIT_WANTED_BY] = "WantedBy",
+        [UNIT_BOUND_BY] = "BoundBy",
+        [UNIT_CONSISTS_OF] = "ConsistsOf",
+        [UNIT_CONFLICTS] = "Conflicts",
+        [UNIT_CONFLICTED_BY] = "ConflictedBy",
+        [UNIT_BEFORE] = "Before",
+        [UNIT_AFTER] = "After",
+        [UNIT_ON_FAILURE] = "OnFailure",
+        [UNIT_TRIGGERS] = "Triggers",
+        [UNIT_TRIGGERED_BY] = "TriggeredBy",
+        [UNIT_PROPAGATES_RELOAD_TO] = "PropagatesReloadTo",
+        [UNIT_RELOAD_PROPAGATED_FROM] = "ReloadPropagatedFrom",
+        [UNIT_JOINS_NAMESPACE_OF] = "JoinsNamespaceOf",
+        [UNIT_REFERENCES] = "References",
+        [UNIT_REFERENCED_BY] = "ReferencedBy",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(unit_dependency, UnitDependency);
index d06d2b23537708bd394751b217afbb5443fdbff1..daeb56a860d8b0cd1b4c883a118a42347e15da75 100644 (file)
@@ -29,6 +29,7 @@
 
 typedef enum UnitType UnitType;
 typedef enum UnitLoadState UnitLoadState;
+typedef enum UnitDependency UnitDependency;
 
 enum UnitType {
         UNIT_SERVICE = 0,
@@ -59,6 +60,53 @@ enum UnitLoadState {
         _UNIT_LOAD_STATE_INVALID = -1
 };
 
+enum UnitDependency {
+        /* Positive dependencies */
+        UNIT_REQUIRES,
+        UNIT_REQUIRES_OVERRIDABLE,
+        UNIT_REQUISITE,
+        UNIT_REQUISITE_OVERRIDABLE,
+        UNIT_WANTS,
+        UNIT_BINDS_TO,
+        UNIT_PART_OF,
+
+        /* Inverse of the above */
+        UNIT_REQUIRED_BY,             /* inverse of 'requires' and 'requisite' is 'required_by' */
+        UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable' and 'requisite_overridable' is 'soft_required_by' */
+        UNIT_WANTED_BY,               /* inverse of 'wants' */
+        UNIT_BOUND_BY,                /* inverse of 'binds_to' */
+        UNIT_CONSISTS_OF,             /* inverse of 'part_of' */
+
+        /* Negative dependencies */
+        UNIT_CONFLICTS,               /* inverse of 'conflicts' is 'conflicted_by' */
+        UNIT_CONFLICTED_BY,
+
+        /* Order */
+        UNIT_BEFORE,                  /* inverse of 'before' is 'after' and vice versa */
+        UNIT_AFTER,
+
+        /* On Failure */
+        UNIT_ON_FAILURE,
+
+        /* Triggers (i.e. a socket triggers a service) */
+        UNIT_TRIGGERS,
+        UNIT_TRIGGERED_BY,
+
+        /* Propagate reloads */
+        UNIT_PROPAGATES_RELOAD_TO,
+        UNIT_RELOAD_PROPAGATED_FROM,
+
+        /* Joins namespace of */
+        UNIT_JOINS_NAMESPACE_OF,
+
+        /* Reference information for GC logic */
+        UNIT_REFERENCES,              /* Inverse of 'references' is 'referenced_by' */
+        UNIT_REFERENCED_BY,
+
+        _UNIT_DEPENDENCY_MAX,
+        _UNIT_DEPENDENCY_INVALID = -1
+};
+
 const char *unit_type_to_string(UnitType i) _const_;
 UnitType unit_type_from_string(const char *s) _pure_;
 
@@ -112,3 +160,6 @@ char *unit_name_mangle(const char *name, enum unit_name_mangle allow_globs);
 char *unit_name_mangle_with_suffix(const char *name, enum unit_name_mangle allow_globs, const char *suffix);
 
 int build_subslice(const char *slice, const char*name, char **subslice);
+
+const char *unit_dependency_to_string(UnitDependency i) _const_;
+UnitDependency unit_dependency_from_string(const char *s) _pure_;
index c559c13678d62b7cd275f05721febe73b5205924..9353559b76d1dc9b4212045565c57e229e7d0b16 100644 (file)
@@ -80,8 +80,11 @@ static bool is_unicode_control(uint32_t ch) {
 
 /* count of characters used to encode one unicode char */
 static int utf8_encoded_expected_len(const char *str) {
-        unsigned char c = (unsigned char)str[0];
+        unsigned char c;
 
+        assert(str);
+
+        c = (unsigned char) str[0];
         if (c < 0x80)
                 return 1;
         if ((c & 0xe0) == 0xc0)
@@ -94,16 +97,18 @@ static int utf8_encoded_expected_len(const char *str) {
                 return 5;
         if ((c & 0xfe) == 0xfc)
                 return 6;
+
         return 0;
 }
 
 /* decode one unicode char */
 int utf8_encoded_to_unichar(const char *str) {
-        int unichar;
-        int len;
-        int i;
+        int unichar, len, i;
+
+        assert(str);
 
         len = utf8_encoded_expected_len(str);
+
         switch (len) {
         case 1:
                 return (int)str[0];
@@ -123,12 +128,12 @@ int utf8_encoded_to_unichar(const char *str) {
                 unichar = (int)str[0] & 0x01;
                 break;
         default:
-                return -1;
+                return -EINVAL;
         }
 
         for (i = 1; i < len; i++) {
                 if (((int)str[i] & 0xc0) != 0x80)
-                        return -1;
+                        return -EINVAL;
                 unichar <<= 6;
                 unichar |= (int)str[i] & 0x3f;
         }
@@ -142,10 +147,14 @@ bool utf8_is_printable_newline(const char* str, size_t length, bool newline) {
         assert(str);
 
         for (p = (const uint8_t*) str; length;) {
-                int encoded_len = utf8_encoded_valid_unichar((const char *)p);
-                int val = utf8_encoded_to_unichar((const char*)p);
+                int encoded_len, val;
+
+                encoded_len = utf8_encoded_valid_unichar((const char *) p);
+                val = utf8_encoded_to_unichar((const char*) p);
 
-                if (encoded_len < 0 || val < 0 || is_unicode_control(val) ||
+                if (encoded_len < 0 ||
+                    val < 0 ||
+                    is_unicode_control(val) ||
                     (!newline && val == '\n'))
                         return false;
 
@@ -165,7 +174,6 @@ const char *utf8_is_valid(const char *str) {
                 int len;
 
                 len = utf8_encoded_valid_unichar((const char *)p);
-
                 if (len < 0)
                         return NULL;
 
@@ -196,6 +204,7 @@ char *utf8_escape_invalid(const char *str) {
                         str += 1;
                 }
         }
+
         *s = '\0';
 
         return p;
@@ -251,6 +260,7 @@ char *utf16_to_utf8(const void *s, size_t length) {
 
 /* expected size used to encode one unicode char */
 static int utf8_unichar_to_encoded_len(int unichar) {
+
         if (unichar < 0x80)
                 return 1;
         if (unichar < 0x800)
@@ -261,18 +271,19 @@ static int utf8_unichar_to_encoded_len(int unichar) {
                 return 4;
         if (unichar < 0x4000000)
                 return 5;
+
         return 6;
 }
 
 /* validate one encoded unicode char and return its length */
 int utf8_encoded_valid_unichar(const char *str) {
-        int len;
-        int unichar;
-        int i;
+        int len, unichar, i;
+
+        assert(str);
 
         len = utf8_encoded_expected_len(str);
         if (len == 0)
-                return -1;
+                return -EINVAL;
 
         /* ascii is valid */
         if (len == 1)
@@ -281,17 +292,17 @@ int utf8_encoded_valid_unichar(const char *str) {
         /* check if expected encoded chars are available */
         for (i = 0; i < len; i++)
                 if ((str[i] & 0x80) != 0x80)
-                        return -1;
+                        return -EINVAL;
 
         unichar = utf8_encoded_to_unichar(str);
 
         /* check if encoded length matches encoded value */
         if (utf8_unichar_to_encoded_len(unichar) != len)
-                return -1;
+                return -EINVAL;
 
         /* check if value has valid range */
         if (!is_unicode_valid(unichar))
-                return -1;
+                return -EINVAL;
 
         return len;
 }
index 3d875c72b360d7d1f0e04376c6957c45ed7abd71..4143f6d643ebca2cb02c105ba0504d1a55d9f72d 100644 (file)
@@ -140,48 +140,59 @@ char* endswith(const char *s, const char *postfix) {
         return (char*) s + sl - pl;
 }
 
-bool first_word(const char *s, const char *word) {
+char* first_word(const char *s, const char *word) {
         size_t sl, wl;
+        const char *p;
 
         assert(s);
         assert(word);
 
+        /* Checks if the string starts with the specified word, either
+         * followed by NUL or by whitespace. Returns a pointer to the
+         * NUL or the first character after the whitespace. */
+
         sl = strlen(s);
         wl = strlen(word);
 
         if (sl < wl)
-                return false;
+                return NULL;
 
         if (wl == 0)
-                return true;
+                return (char*) s;
 
         if (memcmp(s, word, wl) != 0)
-                return false;
+                return NULL;
+
+        p = s + wl;
+        if (*p == 0)
+                return (char*) p;
+
+        if (!strchr(WHITESPACE, *p))
+                return NULL;
 
-        return s[wl] == 0 ||
-                strchr(WHITESPACE, s[wl]);
+        p += strspn(p, WHITESPACE);
+        return (char*) p;
 }
 
 int close_nointr(int fd) {
-        int r;
-
         assert(fd >= 0);
-        r = close(fd);
-        if (r >= 0)
-                return r;
-        else if (errno == EINTR)
-                /*
-                 * Just ignore EINTR; a retry loop is the wrong
-                 * thing to do on Linux.
-                 *
-                 * http://lkml.indiana.edu/hypermail/linux/kernel/0509.1/0877.html
-                 * https://bugzilla.gnome.org/show_bug.cgi?id=682819
-                 * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR
-                 * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain
-                 */
+
+        if (close(fd) >= 0)
                 return 0;
-        else
-                return -errno;
+
+        /*
+         * Just ignore EINTR; a retry loop is the wrong thing to do on
+         * Linux.
+         *
+         * http://lkml.indiana.edu/hypermail/linux/kernel/0509.1/0877.html
+         * https://bugzilla.gnome.org/show_bug.cgi?id=682819
+         * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR
+         * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain
+         */
+        if (errno == EINTR)
+                return 0;
+
+        return -errno;
 }
 
 int safe_close(int fd) {
@@ -231,9 +242,9 @@ int unlink_noerrno(const char *path) {
 int parse_boolean(const char *v) {
         assert(v);
 
-        if (streq(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || strcaseeq(v, "on"))
+        if (streq(v, "1") || strcaseeq(v, "yes") || strcaseeq(v, "y") || strcaseeq(v, "true") || strcaseeq(v, "t") || strcaseeq(v, "on"))
                 return 1;
-        else if (streq(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || strcaseeq(v, "off"))
+        else if (streq(v, "0") || strcaseeq(v, "no") || strcaseeq(v, "n") || strcaseeq(v, "false") || strcaseeq(v, "f") || strcaseeq(v, "off"))
                 return 0;
 
         return -EINVAL;
@@ -332,6 +343,26 @@ int safe_atoi(const char *s, int *ret_i) {
         return 0;
 }
 
+int safe_atou8(const char *s, uint8_t *ret) {
+        char *x = NULL;
+        unsigned long l;
+
+        assert(s);
+        assert(ret);
+
+        errno = 0;
+        l = strtoul(s, &x, 0);
+
+        if (!x || x == s || *x || errno)
+                return errno > 0 ? -errno : -EINVAL;
+
+        if ((unsigned long) (uint8_t) l != l)
+                return -ERANGE;
+
+        *ret = (uint8_t) l;
+        return 0;
+}
+
 int safe_atollu(const char *s, long long unsigned *ret_llu) {
         char *x = NULL;
         unsigned long long l;
@@ -395,37 +426,50 @@ static size_t strcspn_escaped(const char *s, const char *reject) {
                 else if (s[n] == '\\')
                         escaped = true;
                 else if (strchr(reject, s[n]))
-                        return n;
+                        break;
         }
-        return n;
+        /* if s ends in \, return index of previous char */
+        return n - escaped;
 }
 
 /* Split a string into words. */
-char *split(const char *c, size_t *l, const char *separator, bool quoted, char **state) {
-        char *current;
+const char* split(const char **state, size_t *l, const char *separator, bool quoted) {
+        const char *current;
 
-        current = *state ? *state : (char*) c;
+        current = *state;
 
-        if (!*current || *c == 0)
+        if (!*current) {
+                assert(**state == '\0');
                 return NULL;
+        }
 
         current += strspn(current, separator);
-        if (!*current)
+        if (!*current) {
+                *state = current;
                 return NULL;
+        }
 
         if (quoted && strchr("\'\"", *current)) {
-                char quotechar = *(current++);
-                *l = strcspn_escaped(current, (char[]){quotechar, '\0'});
-                *state = current+*l+1;
+                char quotechars[2] = {*current, '\0'};
+
+                *l = strcspn_escaped(current + 1, quotechars);
+                if (current[*l + 1] == '\0' ||
+                    (current[*l + 2] && !strchr(separator, current[*l + 2]))) {
+                        /* right quote missing or garbage at the end*/
+                        *state = current;
+                        return NULL;
+                }
+                assert(current[*l + 1] == quotechars[0]);
+                *state = current++ + *l + 2;
         } else if (quoted) {
                 *l = strcspn_escaped(current, separator);
-                *state = current+*l;
+                *state = current + *l;
         } else {
                 *l = strcspn(current, separator);
-                *state = current+*l;
+                *state = current + *l;
         }
 
-        return (char*) current;
+        return current;
 }
 
 int get_parent_of_pid(pid_t pid, pid_t *_ppid) {
@@ -893,7 +937,7 @@ int readlink_and_canonicalize(const char *p, char **r) {
 }
 
 int reset_all_signal_handlers(void) {
-        int sig;
+        int sig, r = 0;
 
         for (sig = 1; sig < _NSIG; sig++) {
                 struct sigaction sa = {
@@ -901,16 +945,29 @@ int reset_all_signal_handlers(void) {
                         .sa_flags = SA_RESTART,
                 };
 
+                /* These two cannot be caught... */
                 if (sig == SIGKILL || sig == SIGSTOP)
                         continue;
 
                 /* On Linux the first two RT signals are reserved by
                  * glibc, and sigaction() will return EINVAL for them. */
                 if ((sigaction(sig, &sa, NULL) < 0))
-                        if (errno != EINVAL)
-                                return -errno;
+                        if (errno != EINVAL && r == 0)
+                                r = -errno;
         }
 
+        return r;
+}
+
+int reset_signal_mask(void) {
+        sigset_t ss;
+
+        if (sigemptyset(&ss) < 0)
+                return -errno;
+
+        if (sigprocmask(SIG_SETMASK, &ss, NULL) < 0)
+                return -errno;
+
         return 0;
 }
 
@@ -1038,7 +1095,7 @@ int unhexchar(char c) {
         if (c >= 'A' && c <= 'F')
                 return c - 'A' + 10;
 
-        return -1;
+        return -EINVAL;
 }
 
 char *hexmem(const void *p, size_t l) {
@@ -1093,7 +1150,7 @@ int unoctchar(char c) {
         if (c >= '0' && c <= '7')
                 return c - '0';
 
-        return -1;
+        return -EINVAL;
 }
 
 char decchar(int x) {
@@ -1105,7 +1162,7 @@ int undecchar(char c) {
         if (c >= '0' && c <= '9')
                 return c - '0';
 
-        return -1;
+        return -EINVAL;
 }
 
 char *cescape(const char *s) {
@@ -1197,7 +1254,7 @@ char *cunescape_length_with_prefix(const char *s, size_t length, const char *pre
 
         r = new(char, pl+length+1);
         if (!r)
-                return r;
+                return NULL;
 
         if (prefix)
                 memcpy(r, prefix, pl);
@@ -1377,6 +1434,7 @@ _pure_ static bool ignore_file_allow_backup(const char *filename) {
                 endswith(filename, ".rpmorig") ||
                 endswith(filename, ".dpkg-old") ||
                 endswith(filename, ".dpkg-new") ||
+                endswith(filename, ".dpkg-tmp") ||
                 endswith(filename, ".swp");
 }
 
@@ -1581,7 +1639,7 @@ int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
                 if (tcsetattr(fileno(f), TCSADRAIN, &new_termios) >= 0) {
                         size_t k;
 
-                        if (t != (usec_t) -1) {
+                        if (t != USEC_INFINITY) {
                                 if (fd_wait_for_event(fileno(f), POLLIN, t) <= 0) {
                                         tcsetattr(fileno(f), TCSADRAIN, &old_termios);
                                         return -ETIMEDOUT;
@@ -1603,13 +1661,14 @@ int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
                 }
         }
 
-        if (t != (usec_t) -1) {
+        if (t != USEC_INFINITY) {
                 if (fd_wait_for_event(fileno(f), POLLIN, t) <= 0)
                         return -ETIMEDOUT;
         }
 
+        errno = 0;
         if (!fgets(line, sizeof(line), f))
-                return -EIO;
+                return errno ? -errno : -EIO;
 
         truncate_nl(line);
 
@@ -1623,7 +1682,7 @@ int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
         return 0;
 }
 
-int ask(char *ret, const char *replies, const char *text, ...) {
+int ask_char(char *ret, const char *replies, const char *text, ...) {
         int r;
 
         assert(ret);
@@ -1647,7 +1706,7 @@ int ask(char *ret, const char *replies, const char *text, ...) {
 
                 fflush(stdout);
 
-                r = read_one_char(stdin, &c, (usec_t) -1, &need_nl);
+                r = read_one_char(stdin, &c, USEC_INFINITY, &need_nl);
                 if (r < 0) {
 
                         if (r == -EBADMSG) {
@@ -1671,6 +1730,49 @@ int ask(char *ret, const char *replies, const char *text, ...) {
         }
 }
 
+int ask_string(char **ret, const char *text, ...) {
+        assert(ret);
+        assert(text);
+
+        for (;;) {
+                char line[LINE_MAX];
+                va_list ap;
+
+                if (on_tty())
+                        fputs(ANSI_HIGHLIGHT_ON, stdout);
+
+                va_start(ap, text);
+                vprintf(text, ap);
+                va_end(ap);
+
+                if (on_tty())
+                        fputs(ANSI_HIGHLIGHT_OFF, stdout);
+
+                fflush(stdout);
+
+                errno = 0;
+                if (!fgets(line, sizeof(line), stdin))
+                        return errno ? -errno : -EIO;
+
+                if (!endswith(line, "\n"))
+                        putchar('\n');
+                else {
+                        char *s;
+
+                        if (isempty(line))
+                                continue;
+
+                        truncate_nl(line);
+                        s = strdup(line);
+                        if (!s)
+                                return -ENOMEM;
+
+                        *ret = s;
+                        return 0;
+                }
+        }
+}
+
 int reset_terminal_fd(int fd, bool switch_to_text) {
         struct termios termios;
         int r = 0;
@@ -1776,9 +1878,6 @@ int open_terminal(const char *name, int mode) {
                 c++;
         }
 
-        if (fd < 0)
-                return -errno;
-
         r = isatty(fd);
         if (r < 0) {
                 safe_close(fd);
@@ -1854,11 +1953,11 @@ int acquire_terminal(
          * on the same tty as an untrusted user this should not be a
          * problem. (Which he probably should not do anyway.) */
 
-        if (timeout != (usec_t) -1)
+        if (timeout != USEC_INFINITY)
                 ts = now(CLOCK_MONOTONIC);
 
         if (!fail && !force) {
-                notify = inotify_init1(IN_CLOEXEC | (timeout != (usec_t) -1 ? IN_NONBLOCK : 0));
+                notify = inotify_init1(IN_CLOEXEC | (timeout != USEC_INFINITY ? IN_NONBLOCK : 0));
                 if (notify < 0) {
                         r = -errno;
                         goto fail;
@@ -1922,7 +2021,7 @@ int acquire_terminal(
                         ssize_t l;
                         struct inotify_event *e;
 
-                        if (timeout != (usec_t) -1) {
+                        if (timeout != USEC_INFINITY) {
                                 usec_t n;
 
                                 n = now(CLOCK_MONOTONIC);
@@ -1975,7 +2074,7 @@ int acquire_terminal(
                  * ended our handle will be dead. It's important that
                  * we do this after sleeping, so that we don't enter
                  * an endless loop. */
-                safe_close(fd);
+                fd = safe_close(fd);
         }
 
         safe_close(notify);
@@ -1994,12 +2093,14 @@ fail:
 }
 
 int release_terminal(void) {
-        int r = 0;
-        struct sigaction sa_old, sa_new = {
+        static const struct sigaction sa_new = {
                 .sa_handler = SIG_IGN,
                 .sa_flags = SA_RESTART,
         };
-        _cleanup_close_ int fd;
+
+        _cleanup_close_ int fd = -1;
+        struct sigaction sa_old;
+        int r = 0;
 
         fd = open("/dev/tty", O_RDWR|O_NOCTTY|O_NDELAY|O_CLOEXEC);
         if (fd < 0)
@@ -2104,7 +2205,7 @@ ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) {
                          * and expect that any error/EOF is reported
                          * via read() */
 
-                        fd_wait_for_event(fd, POLLIN, (usec_t) -1);
+                        fd_wait_for_event(fd, POLLIN, USEC_INFINITY);
                         continue;
                 }
 
@@ -2139,7 +2240,7 @@ ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) {
                          * and expect that any error/EOF is reported
                          * via write() */
 
-                        fd_wait_for_event(fd, POLLOUT, (usec_t) -1);
+                        fd_wait_for_event(fd, POLLOUT, USEC_INFINITY);
                         continue;
                 }
 
@@ -2500,7 +2601,7 @@ bool hostname_is_set(void) {
         return !isempty(u.nodename) && !streq(u.nodename, "(none)");
 }
 
-static char *lookup_uid(uid_t uid) {
+char *lookup_uid(uid_t uid) {
         long bufsize;
         char *name;
         _cleanup_free_ char *buf = NULL;
@@ -2966,7 +3067,7 @@ int status_vprintf(const char *status, bool ellipse, bool ephemeral, const char
                 if (emax < 3)
                         emax = 3;
 
-                e = ellipsize(s, emax, 75);
+                e = ellipsize(s, emax, 50);
                 if (e) {
                         free(s);
                         s = e;
@@ -3086,12 +3187,13 @@ fail:
 }
 
 char **replace_env_argv(char **argv, char **env) {
-        char **r, **i;
+        char **ret, **i;
         unsigned k = 0, l = 0;
 
         l = strv_length(argv);
 
-        if (!(r = new(char*, l+1)))
+        ret = new(char*, l+1);
+        if (!ret)
                 return NULL;
 
         STRV_FOREACH(i, argv) {
@@ -3104,10 +3206,12 @@ char **replace_env_argv(char **argv, char **env) {
 
                         e = strv_env_get(env, *i+1);
                         if (e) {
+                                int r;
 
-                                if (!(m = strv_split_quoted(e))) {
-                                        r[k] = NULL;
-                                        strv_free(r);
+                                r = strv_split_quoted(&m, e);
+                                if (r < 0) {
+                                        ret[k] = NULL;
+                                        strv_free(ret);
                                         return NULL;
                                 }
                         } else
@@ -3116,16 +3220,17 @@ char **replace_env_argv(char **argv, char **env) {
                         q = strv_length(m);
                         l = l + q - 1;
 
-                        if (!(w = realloc(r, sizeof(char*) * (l+1)))) {
-                                r[k] = NULL;
-                                strv_free(r);
+                        w = realloc(ret, sizeof(char*) * (l+1));
+                        if (!w) {
+                                ret[k] = NULL;
+                                strv_free(ret);
                                 strv_free(m);
                                 return NULL;
                         }
 
-                        r = w;
+                        ret = w;
                         if (m) {
-                                memcpy(r + k, m, q * sizeof(char*));
+                                memcpy(ret + k, m, q * sizeof(char*));
                                 free(m);
                         }
 
@@ -3134,14 +3239,16 @@ char **replace_env_argv(char **argv, char **env) {
                 }
 
                 /* If ${FOO} appears as part of a word, replace it by the variable as-is */
-                if (!(r[k++] = replace_env(*i, env))) {
-                        strv_free(r);
+                ret[k] = replace_env(*i, env);
+                if (!ret[k]) {
+                        strv_free(ret);
                         return NULL;
                 }
+                k++;
         }
 
-        r[k] = NULL;
-        return r;
+        ret[k] = NULL;
+        return ret;
 }
 
 int fd_columns(int fd) {
@@ -3166,7 +3273,7 @@ unsigned columns(void) {
         c = 0;
         e = getenv("COLUMNS");
         if (e)
-                safe_atoi(e, &c);
+                (void) safe_atoi(e, &c);
 
         if (c <= 0)
                 c = fd_columns(STDOUT_FILENO);
@@ -3200,7 +3307,7 @@ unsigned lines(void) {
         l = 0;
         e = getenv("LINES");
         if (e)
-                safe_atou(e, &l);
+                (void) safe_atou(e, &l);
 
         if (l <= 0)
                 l = fd_lines(STDOUT_FILENO);
@@ -3384,7 +3491,7 @@ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi
                         return -errno;
         }
 
-        if (stamp != (usec_t) -1) {
+        if (stamp != USEC_INFINITY) {
                 struct timespec ts[2];
 
                 timespec_store(&ts[0], stamp);
@@ -3399,7 +3506,7 @@ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi
 }
 
 int touch(const char *path) {
-        return touch_file(path, false, (usec_t) -1, (uid_t) -1, (gid_t) -1, 0);
+        return touch_file(path, false, USEC_INFINITY, (uid_t) -1, (gid_t) -1, 0);
 }
 
 char *unquote(const char *s, const char* quotes) {
@@ -3560,6 +3667,17 @@ int null_or_empty_path(const char *fn) {
         return null_or_empty(&st);
 }
 
+int null_or_empty_fd(int fd) {
+        struct stat st;
+
+        assert(fd >= 0);
+
+        if (fstat(fd, &st) < 0)
+                return -errno;
+
+        return null_or_empty(&st);
+}
+
 DIR *xopendirat(int fd, const char *name, int flags) {
         int nfd;
         DIR *d;
@@ -3769,16 +3887,13 @@ void execute_directory(const char *directory, DIR *d, usec_t timeout, char *argv
                 _cleanup_hashmap_free_free_ Hashmap *pids = NULL;
                 _cleanup_closedir_ DIR *_d = NULL;
                 struct dirent *de;
-                sigset_t ss;
 
                 /* We fork this all off from a child process so that
                  * we can somewhat cleanly make use of SIGALRM to set
                  * a time limit */
 
                 reset_all_signal_handlers();
-
-                assert_se(sigemptyset(&ss) == 0);
-                assert_se(sigprocmask(SIG_SETMASK, &ss, NULL) == 0);
+                reset_signal_mask();
 
                 assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
@@ -3793,7 +3908,7 @@ void execute_directory(const char *directory, DIR *d, usec_t timeout, char *argv
                         }
                 }
 
-                pids = hashmap_new(NULL, NULL);
+                pids = hashmap_new(NULL);
                 if (!pids) {
                         log_oom();
                         _exit(EXIT_FAILURE);
@@ -3806,7 +3921,8 @@ void execute_directory(const char *directory, DIR *d, usec_t timeout, char *argv
                         if (!dirent_is_file(de))
                                 continue;
 
-                        if (asprintf(&path, "%s/%s", directory, de->d_name) < 0) {
+                        path = strjoin(directory, "/", de->d_name, NULL);
+                        if (!path) {
                                 log_oom();
                                 _exit(EXIT_FAILURE);
                         }
@@ -3832,7 +3948,6 @@ void execute_directory(const char *directory, DIR *d, usec_t timeout, char *argv
                                 _exit(EXIT_FAILURE);
                         }
 
-
                         log_debug("Spawned %s as " PID_FMT ".", path, pid);
 
                         r = hashmap_put(pids, UINT_TO_PTR(pid), path);
@@ -3848,7 +3963,7 @@ void execute_directory(const char *directory, DIR *d, usec_t timeout, char *argv
                  * timout. We simply rely on SIGALRM as default action
                  * terminating the process, and turn on alarm(). */
 
-                if (timeout != (usec_t) -1)
+                if (timeout != USEC_INFINITY)
                         alarm((timeout + USEC_PER_SEC - 1) / USEC_PER_SEC);
 
                 while (!hashmap_isempty(pids)) {
@@ -4018,7 +4133,7 @@ int fd_wait_for_event(int fd, int event, usec_t t) {
         struct timespec ts;
         int r;
 
-        r = ppoll(&pollfd, 1, t == (usec_t) -1 ? NULL : timespec_store(&ts, t), NULL);
+        r = ppoll(&pollfd, 1, t == USEC_INFINITY ? NULL : timespec_store(&ts, t), NULL);
         if (r < 0)
                 return -errno;
 
@@ -4848,7 +4963,7 @@ int signal_from_string(const char *s) {
                 if (signo > 0 && signo < _NSIG)
                         return signo;
         }
-        return -1;
+        return -EINVAL;
 }
 
 bool kexec_loaded(void) {
@@ -4863,24 +4978,6 @@ bool kexec_loaded(void) {
        return loaded;
 }
 
-int strdup_or_null(const char *a, char **b) {
-        char *c;
-
-        assert(b);
-
-        if (!a) {
-                *b = NULL;
-                return 0;
-        }
-
-        c = strdup(a);
-        if (!c)
-                return -ENOMEM;
-
-        *b = c;
-        return 0;
-}
-
 int prot_from_flags(int flags) {
 
         switch (flags & O_ACCMODE) {
@@ -4984,9 +5081,9 @@ int fd_inc_rcvbuf(int fd, size_t n) {
 }
 
 int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *path, ...) {
-        pid_t parent_pid, agent_pid;
-        int fd;
         bool stdout_is_tty, stderr_is_tty;
+        pid_t parent_pid, agent_pid;
+        sigset_t ss, saved_ss;
         unsigned n, i;
         va_list ap;
         char **l;
@@ -4994,16 +5091,25 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa
         assert(pid);
         assert(path);
 
-        parent_pid = getpid();
-
         /* Spawns a temporary TTY agent, making sure it goes away when
          * we go away */
 
+        parent_pid = getpid();
+
+        /* First we temporarily block all signals, so that the new
+         * child has them blocked initially. This way, we can be sure
+         * that SIGTERMs are not lost we might send to the agent. */
+        assert_se(sigfillset(&ss) >= 0);
+        assert_se(sigprocmask(SIG_SETMASK, &ss, &saved_ss) >= 0);
+
         agent_pid = fork();
-        if (agent_pid < 0)
+        if (agent_pid < 0) {
+                assert_se(sigprocmask(SIG_SETMASK, &saved_ss, NULL) >= 0);
                 return -errno;
+        }
 
         if (agent_pid != 0) {
+                assert_se(sigprocmask(SIG_SETMASK, &saved_ss, NULL) >= 0);
                 *pid = agent_pid;
                 return 0;
         }
@@ -5014,8 +5120,14 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa
         if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)
                 _exit(EXIT_FAILURE);
 
+        /* Make sure we actually can kill the agent, if we need to, in
+         * case somebody invoked us from a shell script that trapped
+         * SIGTERM or so... */
+        reset_all_signal_handlers();
+        reset_signal_mask();
+
         /* Check whether our parent died before we were able
-         * to set the death signal */
+         * to set the death signal and unblock the signals */
         if (getppid() != parent_pid)
                 _exit(EXIT_SUCCESS);
 
@@ -5026,6 +5138,8 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa
         stderr_is_tty = isatty(STDERR_FILENO);
 
         if (!stdout_is_tty || !stderr_is_tty) {
+                int fd;
+
                 /* Detach from stdout/stderr. and reopen
                  * /dev/tty for them. This is important to
                  * ensure that when systemctl is started via
@@ -5217,7 +5331,7 @@ int make_console_stdio(void) {
 
         /* Make /dev/console the controlling terminal and stdin/stdout/stderr */
 
-        fd = acquire_terminal("/dev/console", false, true, true, (usec_t) -1);
+        fd = acquire_terminal("/dev/console", false, true, true, USEC_INFINITY);
         if (fd < 0) {
                 log_error("Failed to acquire terminal: %s", strerror(-fd));
                 return fd;
@@ -5349,13 +5463,14 @@ bool filename_is_safe(const char *p) {
 bool string_is_safe(const char *p) {
         const char *t;
 
-        assert(p);
+        if (!p)
+                return false;
 
         for (t = p; *t; t++) {
                 if (*t > 0 && *t < ' ')
                         return false;
 
-                if (strchr("\\\"\'", *t))
+                if (strchr("\\\"\'\0x7f", *t))
                         return false;
         }
 
@@ -5363,18 +5478,25 @@ bool string_is_safe(const char *p) {
 }
 
 /**
- * Check if a string contains control characters.
- * Spaces and tabs are not considered control characters.
+ * Check if a string contains control characters. If 'ok' is non-NULL
+ * it may be a string containing additional CCs to be considered OK.
  */
-bool string_has_cc(const char *p) {
+bool string_has_cc(const char *p, const char *ok) {
         const char *t;
 
         assert(p);
 
-        for (t = p; *t; t++)
-                if (*t > 0 && *t < ' ' && *t != '\t')
+        for (t = p; *t; t++) {
+                if (ok && strchr(ok, *t))
+                        continue;
+
+                if (*t > 0 && *t < ' ')
                         return true;
 
+                if (*t == 127)
+                        return true;
+        }
+
         return false;
 }
 
@@ -5975,7 +6097,7 @@ int split_pair(const char *s, const char *sep, char **l, char **r) {
 
 int shall_restore_state(void) {
         _cleanup_free_ char *line = NULL;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -5987,12 +6109,12 @@ int shall_restore_state(void) {
 
         r = 1;
 
-        FOREACH_WORD_QUOTED(w, l, line, state) {
+        FOREACH_WORD_QUOTED(word, l, line, state) {
                 const char *e;
                 char n[l+1];
                 int k;
 
-                memcpy(n, w, l);
+                memcpy(n, word, l);
                 n[l] = 0;
 
                 e = startswith(n, "systemd.restore_state=");
@@ -6036,7 +6158,7 @@ int proc_cmdline(char **ret) {
 
 int parse_proc_cmdline(int (*parse_item)(const char *key, const char *value)) {
         _cleanup_free_ char *line = NULL;
-        char *w, *state;
+        const char *w, *state;
         size_t l;
         int r;
 
@@ -6569,7 +6691,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 
         path_kill_slashes(cleaned);
 
-        done = set_new(string_hash_func, string_compare_func);
+        done = set_new(&string_hash_ops);
         if (!done)
                 return -ENOMEM;
 
@@ -6579,7 +6701,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
                 bool top_autofs = false;
                 char *x;
 
-                todo = set_new(string_hash_func, string_compare_func);
+                todo = set_new(&string_hash_ops);
                 if (!todo)
                         return -ENOMEM;
 
@@ -6752,13 +6874,324 @@ char *tempfn_random(const char *p) {
 bool is_localhost(const char *hostname) {
         assert(hostname);
 
-        /* This tries to identify local hostnames described in RFC6761
-         * plus the redhatism of .localdomain */
+        /* This tries to identify local host and domain names
+         * described in RFC6761 plus the redhatism of .localdomain */
 
         return streq(hostname, "localhost") ||
                streq(hostname, "localhost.") ||
+               streq(hostname, "localdomain.") ||
+               streq(hostname, "localdomain") ||
                endswith(hostname, ".localhost") ||
                endswith(hostname, ".localhost.") ||
                endswith(hostname, ".localdomain") ||
                endswith(hostname, ".localdomain.");
 }
+
+int take_password_lock(const char *root) {
+
+        struct flock flock = {
+                .l_type = F_WRLCK,
+                .l_whence = SEEK_SET,
+                .l_start = 0,
+                .l_len = 0,
+        };
+
+        const char *path;
+        int fd, r;
+
+        /* This is roughly the same as lckpwdf(), but not as awful. We
+         * don't want to use alarm() and signals, hence we implement
+         * our own trivial version of this.
+         *
+         * Note that shadow-utils also takes per-database locks in
+         * addition to lckpwdf(). However, we don't given that they
+         * are redundant as they they invoke lckpwdf() first and keep
+         * it during everything they do. The per-database locks are
+         * awfully racy, and thus we just won't do them. */
+
+        if (root)
+                path = strappenda(root, "/etc/.pwd.lock");
+        else
+                path = "/etc/.pwd.lock";
+
+        fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0600);
+        if (fd < 0)
+                return -errno;
+
+        r = fcntl(fd, F_SETLKW, &flock);
+        if (r < 0) {
+                safe_close(fd);
+                return -errno;
+        }
+
+        return fd;
+}
+
+int is_symlink(const char *path) {
+        struct stat info;
+
+        if (lstat(path, &info) < 0)
+                return -errno;
+
+        return !!S_ISLNK(info.st_mode);
+}
+
+int is_dir(const char* path, bool follow) {
+        struct stat st;
+
+        if (follow) {
+                if (stat(path, &st) < 0)
+                        return -errno;
+        } else {
+                if (lstat(path, &st) < 0)
+                        return -errno;
+        }
+
+        return !!S_ISDIR(st.st_mode);
+}
+
+int unquote_first_word(const char **p, char **ret) {
+        _cleanup_free_ char *s = NULL;
+        size_t allocated = 0, sz = 0;
+
+        enum {
+                START,
+                VALUE,
+                VALUE_ESCAPE,
+                SINGLE_QUOTE,
+                SINGLE_QUOTE_ESCAPE,
+                DOUBLE_QUOTE,
+                DOUBLE_QUOTE_ESCAPE,
+                SPACE,
+        } state = START;
+
+        assert(p);
+        assert(*p);
+        assert(ret);
+
+        /* Parses the first word of a string, and returns it in
+         * *ret. Removes all quotes in the process. When parsing fails
+         * (because of an uneven number of quotes or similar), leaves
+         * the pointer *p at the first invalid character. */
+
+        for (;;) {
+                char c = **p;
+
+                switch (state) {
+
+                case START:
+                        if (c == 0)
+                                goto finish;
+                        else if (strchr(WHITESPACE, c))
+                                break;
+
+                        state = VALUE;
+                        /* fallthrough */
+
+                case VALUE:
+                        if (c == 0)
+                                goto finish;
+                        else if (c == '\'')
+                                state = SINGLE_QUOTE;
+                        else if (c == '\\')
+                                state = VALUE_ESCAPE;
+                        else if (c == '\"')
+                                state = DOUBLE_QUOTE;
+                        else if (strchr(WHITESPACE, c))
+                                state = SPACE;
+                        else {
+                                if (!GREEDY_REALLOC(s, allocated, sz+2))
+                                        return -ENOMEM;
+
+                                s[sz++] = c;
+                        }
+
+                        break;
+
+                case VALUE_ESCAPE:
+                        if (c == 0)
+                                return -EINVAL;
+
+                        if (!GREEDY_REALLOC(s, allocated, sz+2))
+                                return -ENOMEM;
+
+                        s[sz++] = c;
+                        state = VALUE;
+
+                        break;
+
+                case SINGLE_QUOTE:
+                        if (c == 0)
+                                return -EINVAL;
+                        else if (c == '\'')
+                                state = VALUE;
+                        else if (c == '\\')
+                                state = SINGLE_QUOTE_ESCAPE;
+                        else {
+                                if (!GREEDY_REALLOC(s, allocated, sz+2))
+                                        return -ENOMEM;
+
+                                s[sz++] = c;
+                        }
+
+                        break;
+
+                case SINGLE_QUOTE_ESCAPE:
+                        if (c == 0)
+                                return -EINVAL;
+
+                        if (!GREEDY_REALLOC(s, allocated, sz+2))
+                                return -ENOMEM;
+
+                        s[sz++] = c;
+                        state = SINGLE_QUOTE;
+                        break;
+
+                case DOUBLE_QUOTE:
+                        if (c == 0)
+                                return -EINVAL;
+                        else if (c == '\"')
+                                state = VALUE;
+                        else if (c == '\\')
+                                state = DOUBLE_QUOTE_ESCAPE;
+                        else {
+                                if (!GREEDY_REALLOC(s, allocated, sz+2))
+                                        return -ENOMEM;
+
+                                s[sz++] = c;
+                        }
+
+                        break;
+
+                case DOUBLE_QUOTE_ESCAPE:
+                        if (c == 0)
+                                return -EINVAL;
+
+                        if (!GREEDY_REALLOC(s, allocated, sz+2))
+                                return -ENOMEM;
+
+                        s[sz++] = c;
+                        state = DOUBLE_QUOTE;
+                        break;
+
+                case SPACE:
+                        if (c == 0)
+                                goto finish;
+                        if (!strchr(WHITESPACE, c))
+                                goto finish;
+
+                        break;
+                }
+
+                (*p) ++;
+        }
+
+finish:
+        if (!s) {
+                *ret = NULL;
+                return 0;
+        }
+
+        s[sz] = 0;
+        *ret = s;
+        s = NULL;
+
+        return 1;
+}
+
+int unquote_many_words(const char **p, ...) {
+        va_list ap;
+        char **l;
+        int n = 0, i, c, r;
+
+        /* Parses a number of words from a string, stripping any
+         * quotes if necessary. */
+
+        assert(p);
+
+        /* Count how many words are expected */
+        va_start(ap, p);
+        for (;;) {
+                if (!va_arg(ap, char **))
+                        break;
+                n++;
+        }
+        va_end(ap);
+
+        if (n <= 0)
+                return 0;
+
+        /* Read all words into a temporary array */
+        l = newa0(char*, n);
+        for (c = 0; c < n; c++) {
+
+                r = unquote_first_word(p, &l[c]);
+                if (r < 0) {
+                        int j;
+
+                        for (j = 0; j < c; j++)
+                                free(l[j]);
+
+                        return r;
+                }
+
+                if (r == 0)
+                        break;
+        }
+
+        /* If we managed to parse all words, return them in the passed
+         * in parameters */
+        va_start(ap, p);
+        for (i = 0; i < n; i++) {
+                char **v;
+
+                v = va_arg(ap, char **);
+                assert(v);
+
+                *v = l[i];
+        }
+        va_end(ap);
+
+        return c;
+}
+
+int free_and_strdup(char **p, const char *s) {
+        char *t;
+
+        assert(p);
+
+        /* Replaces a string pointer with an strdup()ed new string,
+         * possibly freeing the old one. */
+
+        if (s) {
+                t = strdup(s);
+                if (!t)
+                        return -ENOMEM;
+        } else
+                t = NULL;
+
+        free(*p);
+        *p = t;
+
+        return 0;
+}
+
+int sethostname_idempotent(const char *s) {
+        int r;
+        char buf[HOST_NAME_MAX + 1] = {};
+
+        assert(s);
+
+        r = gethostname(buf, sizeof(buf));
+        if (r < 0)
+                return -errno;
+
+        if (streq(buf, s))
+                return 0;
+
+        r = sethostname(s, strlen(s));
+        if (r < 0)
+                return -errno;
+
+        return 1;
+}
index e23069c016837ea1cde76d01dbd60cf3d0c8e382..35584467c15df5b87eac8b6ad15bd45065281979 100644 (file)
@@ -69,7 +69,7 @@
 
 #if SIZEOF_TIME_T == 8
 #  define PRI_TIME PRIu64
-#elif SIZEOF_GID_T == 4
+#elif SIZEOF_TIME_T == 4
 #  define PRI_TIME PRIu32
 #else
 #  error Unknown time_t size
@@ -84,6 +84,7 @@
 #endif
 
 #include "macro.h"
+#include "missing.h"
 #include "time-util.h"
 
 /* What is interpreted as whitespace? */
 #define COMMENTS   "#;"
 #define GLOB_CHARS "*?["
 
+/* What characters are special in the shell? */
+/* must be escaped outside and inside double-quotes */
+#define SHELL_NEED_ESCAPE "\"\\`$"
+/* can be escaped or double-quoted */
+#define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;"
+
 #define FORMAT_BYTES_MAX 8
 
 #define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
@@ -121,6 +128,8 @@ bool streq_ptr(const char *a, const char *b) _pure_;
 
 #define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
 
+#define newa0(t, n) ((t*) alloca0(sizeof(t)*(n)))
+
 #define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n)))
 
 #define malloc0(n) (calloc((n), 1))
@@ -149,21 +158,29 @@ static inline bool isempty(const char *p) {
         return !p || !p[0];
 }
 
-static inline const char *startswith(const char *s, const char *prefix) {
-        if (strncmp(s, prefix, strlen(prefix)) == 0)
-                return s + strlen(prefix);
+static inline char *startswith(const char *s, const char *prefix) {
+        size_t l;
+
+        l = strlen(prefix);
+        if (strncmp(s, prefix, l) == 0)
+                return (char*) s + l;
+
         return NULL;
 }
 
-static inline const char *startswith_no_case(const char *s, const char *prefix) {
-        if (strncasecmp(s, prefix, strlen(prefix)) == 0)
-                return s + strlen(prefix);
+static inline char *startswith_no_case(const char *s, const char *prefix) {
+        size_t l;
+
+        l = strlen(prefix);
+        if (strncasecmp(s, prefix, l) == 0)
+                return (char*) s + l;
+
         return NULL;
 }
 
 char *endswith(const char *s, const char *postfix) _pure_;
 
-bool first_word(const char *s, const char *word) _pure_;
+char *first_word(const char *s, const char *word) _pure_;
 
 int close_nointr(int fd);
 int safe_close(int fd);
@@ -186,7 +203,9 @@ int safe_atolli(const char *s, long long int *ret_i);
 
 int safe_atod(const char *s, double *ret_d);
 
-#if __WORDSIZE == 32
+int safe_atou8(const char *s, uint8_t *ret);
+
+#if LONG_MAX == INT_MAX
 static inline int safe_atolu(const char *s, unsigned long *ret_u) {
         assert_cc(sizeof(unsigned long) == sizeof(unsigned));
         return safe_atou(s, (unsigned*) ret_u);
@@ -226,7 +245,7 @@ static inline int safe_atoi64(const char *s, int64_t *ret_i) {
         return safe_atolli(s, (long long int*) ret_i);
 }
 
-char *split(const char *c, size_t *l, const char *separator, bool quoted, char **state);
+const char* split(const char **state, size_t *l, const char *separator, bool quoted);
 
 #define FOREACH_WORD(word, length, s, state)                            \
         _FOREACH_WORD(word, length, s, WHITESPACE, false, state)
@@ -237,11 +256,8 @@ char *split(const char *c, size_t *l, const char *separator, bool quoted, char *
 #define FOREACH_WORD_QUOTED(word, length, s, state)                     \
         _FOREACH_WORD(word, length, s, WHITESPACE, true, state)
 
-#define FOREACH_WORD_SEPARATOR_QUOTED(word, length, s, separator, state)       \
-        _FOREACH_WORD(word, length, s, separator, true, state)
-
 #define _FOREACH_WORD(word, length, s, separator, quoted, state)        \
-        for ((state) = NULL, (word) = split((s), &(length), (separator), (quoted), &(state)); (word); (word) = split((s), &(length), (separator), (quoted), &(state)))
+        for ((state) = (s), (word) = split(&(state), &(length), (separator), (quoted)); (word); (word) = split(&(state), &(length), (separator), (quoted)))
 
 pid_t get_parent_of_pid(pid_t pid, pid_t *ppid);
 int get_starttime_of_pid(pid_t pid, unsigned long long *st);
@@ -258,6 +274,7 @@ int readlink_and_make_absolute(const char *p, char **r);
 int readlink_and_canonicalize(const char *p, char **r);
 
 int reset_all_signal_handlers(void);
+int reset_signal_mask(void);
 
 char *strstrip(char *s);
 char *delete_chars(char *s, const char *bad);
@@ -382,7 +399,8 @@ bool fstype_is_network(const char *fstype);
 int chvt(int vt);
 
 int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl);
-int ask(char *ret, const char *replies, const char *text, ...) _printf_(3, 4);
+int ask_char(char *ret, const char *replies, const char *text, ...) _printf_(3, 4);
+int ask_string(char **ret, const char *text, ...) _printf_(2, 3);
 
 int reset_terminal_fd(int fd, bool switch_to_text);
 int reset_terminal(const char *name);
@@ -414,6 +432,7 @@ int sigprocmask_many(int how, ...);
 
 bool hostname_is_set(void);
 
+char* lookup_uid(uid_t uid);
 char* gethostname_malloc(void);
 char* getlogname_malloc(void);
 char* getusername_malloc(void);
@@ -492,6 +511,7 @@ noreturn void freeze(void);
 
 bool null_or_empty(struct stat *st) _pure_;
 int null_or_empty_path(const char *fn);
+int null_or_empty_fd(int fd);
 
 DIR *xopendirat(int dirfd, const char *name, int flags);
 
@@ -563,8 +583,6 @@ int block_get_whole_disk(dev_t d, dev_t *ret);
 
 int file_is_priv_sticky(const char *p);
 
-int strdup_or_null(const char *a, char **b);
-
 #define NULSTR_FOREACH(i, l)                                    \
         for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)
 
@@ -692,7 +710,7 @@ _alloc_(2, 3) static inline void *memdup_multiply(const void *p, size_t a, size_
 bool filename_is_safe(const char *p) _pure_;
 bool path_is_safe(const char *p) _pure_;
 bool string_is_safe(const char *p) _pure_;
-bool string_has_cc(const char *p) _pure_;
+bool string_has_cc(const char *p, const char *ok) _pure_;
 
 /**
  * Check if a string contains any glob patterns.
@@ -834,29 +852,35 @@ int unlink_noerrno(const char *path);
                 (void *) memset(_new_, 0, _len_);       \
         })
 
-#define strappenda(a, b)                                \
-        ({                                              \
-                const char *_a_ = (a), *_b_ = (b);      \
-                char *_c_;                              \
-                size_t _x_, _y_;                        \
-                _x_ = strlen(_a_);                      \
-                _y_ = strlen(_b_);                      \
-                _c_ = alloca(_x_ + _y_ + 1);            \
-                strcpy(stpcpy(_c_, _a_), _b_);          \
-                _c_;                                    \
+#define alloca_align(size, align)                                       \
+        ({                                                              \
+                void *_ptr_;                                            \
+                size_t _mask_ = (align) - 1;                            \
+                _ptr_ = alloca((size) + _mask_);                        \
+                (void*)(((uintptr_t)_ptr_ + _mask_) & ~_mask_);         \
         })
 
-#define strappenda3(a, b, c)                                    \
-        ({                                                      \
-                const char *_a_ = (a), *_b_ = (b), *_c_ = (c);  \
-                char *_d_;                                      \
-                size_t _x_, _y_, _z_;                           \
-                _x_ = strlen(_a_);                              \
-                _y_ = strlen(_b_);                              \
-                _z_ = strlen(_c_);                              \
-                _d_ = alloca(_x_ + _y_ + _z_ + 1);              \
-                strcpy(stpcpy(stpcpy(_d_, _a_), _b_), _c_);     \
-                _d_;                                            \
+#define alloca0_align(size, align)                                      \
+        ({                                                              \
+                void *_new_;                                            \
+                size_t _size_ = (size);                                 \
+                _new_ = alloca_align(_size_, (align));                  \
+                (void*)memset(_new_, 0, _size_);                        \
+        })
+
+#define strappenda(a, ...)                                       \
+        ({                                                       \
+                int _len = strlen(a);                            \
+                unsigned _i;                                     \
+                char *_d_, *_p_;                                 \
+                const char *_appendees_[] = { __VA_ARGS__ };     \
+                for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \
+                        _len += strlen(_appendees_[_i]);         \
+                _d_ = alloca(_len + 1);                          \
+                _p_ = stpcpy(_d_, a);                            \
+                for (_i = 0; _i < ELEMENTSOF(_appendees_); _i++) \
+                        _p_ = stpcpy(_p_, _appendees_[_i]);      \
+                _d_;                                             \
         })
 
 #define procfs_file_alloca(pid, field)                                  \
@@ -963,3 +987,15 @@ char *tempfn_xxxxxx(const char *p);
 char *tempfn_random(const char *p);
 
 bool is_localhost(const char *hostname);
+
+int take_password_lock(const char *root);
+
+int is_symlink(const char *path);
+int is_dir(const char *path, bool follow);
+
+int unquote_first_word(const char **p, char **ret);
+int unquote_many_words(const char **p, ...) _sentinel_;
+
+int free_and_strdup(char **p, const char *s);
+
+int sethostname_idempotent(const char *s);
index 30a0c031f3f08908de7313a62cce39f7141f3b16..31f13ec808c0c5567ac421b4fb3ada62cf812ede 100644 (file)
@@ -92,8 +92,6 @@ int utmp_get_runlevel(int *runlevel, int *previous) {
 static void init_timestamp(struct utmpx *store, usec_t t) {
         assert(store);
 
-        zero(*store);
-
         if (t <= 0)
                 t = now(CLOCK_REALTIME);
 
@@ -143,7 +141,7 @@ static int write_entry_wtmp(const struct utmpx *store) {
         assert(store);
 
         /* wtmp is a simple append-only file where each entry is
-        simply appended to the end; i.e. basically a log. */
+        simply appended to the end; i.e. basically a log. */
 
         errno = 0;
         updwtmpx(_PATH_WTMPX, store);
@@ -172,7 +170,7 @@ static int write_entry_both(const struct utmpx *store) {
 }
 
 int utmp_put_shutdown(void) {
-        struct utmpx store;
+        struct utmpx store = {};
 
         init_entry(&store, 0);
 
@@ -183,7 +181,7 @@ int utmp_put_shutdown(void) {
 }
 
 int utmp_put_reboot(usec_t t) {
-        struct utmpx store;
+        struct utmpx store = {};
 
         init_entry(&store, t);
 
@@ -206,16 +204,17 @@ _pure_ static const char *sanitize_id(const char *id) {
 }
 
 int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line) {
-        struct utmpx store;
+        struct utmpx store = {
+                .ut_type = INIT_PROCESS,
+                .ut_pid = pid,
+                .ut_session = sid,
+        };
 
         assert(id);
 
         init_timestamp(&store, 0);
 
-        store.ut_type = INIT_PROCESS;
-        store.ut_pid = pid;
-        store.ut_session = sid;
-
+        /* ut_id needs only be nul-terminated if it is shorter than sizeof(ut_id) */
         strncpy(store.ut_id, sanitize_id(id), sizeof(store.ut_id));
 
         if (line)
@@ -225,14 +224,15 @@ int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line
 }
 
 int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
-        struct utmpx lookup, store, store_wtmp, *found;
+        struct utmpx lookup = {
+                .ut_type = INIT_PROCESS /* looks for DEAD_PROCESS, LOGIN_PROCESS, USER_PROCESS, too */
+        }, store, store_wtmp, *found;
 
         assert(id);
 
         setutxent();
 
-        zero(lookup);
-        lookup.ut_type = INIT_PROCESS; /* looks for DEAD_PROCESS, LOGIN_PROCESS, USER_PROCESS, too */
+        /* ut_id needs only be nul-terminated if it is shorter than sizeof(ut_id) */
         strncpy(lookup.ut_id, sanitize_id(id), sizeof(lookup.ut_id));
 
         found = getutxid(&lookup);
@@ -260,7 +260,7 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
 
 
 int utmp_put_runlevel(int runlevel, int previous) {
-        struct utmpx store;
+        struct utmpx store = {};
         int r;
 
         assert(runlevel > 0);
index 040a16e7465f8792440a7ad6d98c5e5fe797e1ab..87d004e615f78fd433abf110dc4644c0cb9240af 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "util.h"
 
+#ifdef HAVE_UTMP
 int utmp_get_runlevel(int *runlevel, int *previous);
 
 int utmp_put_shutdown(void);
@@ -33,3 +34,30 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status);
 int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line);
 
 int utmp_wall(const char *message, const char *username, bool (*match_tty)(const char *tty));
+
+#else /* HAVE_UTMP */
+
+static inline int utmp_get_runlevel(int *runlevel, int *previous) {
+        return -ESRCH;
+}
+static inline int utmp_put_shutdown(void) {
+        return 0;
+}
+static inline int utmp_put_reboot(usec_t timestamp) {
+        return 0;
+}
+static inline int utmp_put_runlevel(int runlevel, int previous) {
+        return 0;
+}
+static inline int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
+        return 0;
+}
+static inline int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line) {
+        return 0;
+}
+static inline int utmp_wall(const char *message, const char *username,
+                bool (*match_tty)(const char *tty)) {
+        return 0;
+}
+
+#endif /* HAVE_UTMP */
index 774915f4be7ddf863c9be0fb9418b67bb8583b45..f9c4e67c74c86c7198b4dba66803f2bd2431e881 100644 (file)
@@ -173,7 +173,7 @@ int detect_vm(const char **id) {
                         if (streq(cap, "control_d"))
                                 break;
 
-                if (!i)  {
+                if (!cap)  {
                         _id = "xen";
                         r = 1;
                 }
@@ -220,6 +220,23 @@ int detect_vm(const char **id) {
                 goto finish;
         }
 
+#if defined(__s390__)
+        {
+                _cleanup_free_ char *t = NULL;
+
+                r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t);
+                if (r >= 0) {
+                        if (streq(t, "z/VM"))
+                                _id = "zvm";
+                        else
+                                _id = "kvm";
+                        r = 1;
+
+                        goto finish;
+                }
+        }
+#endif
+
         r = 0;
 
 finish:
@@ -293,6 +310,8 @@ int detect_container(const char **id) {
                 _id = "lxc-libvirt";
         else if (streq(e, "systemd-nspawn"))
                 _id = "systemd-nspawn";
+        else if (streq(e, "docker"))
+                _id = "docker";
         else
                 _id = "other";
 
index ba9ad9be97aab488835c3e29443c33badf75f05f..7d188d98e821892a1ef09ef9d55517a129551a61 100644 (file)
@@ -29,7 +29,7 @@
 #include "log.h"
 
 static int watchdog_fd = -1;
-static usec_t watchdog_timeout = (usec_t) -1;
+static usec_t watchdog_timeout = USEC_INFINITY;
 
 static int update_timeout(void) {
         int r;
@@ -37,7 +37,7 @@ static int update_timeout(void) {
         if (watchdog_fd < 0)
                 return 0;
 
-        if (watchdog_timeout == (usec_t) -1)
+        if (watchdog_timeout == USEC_INFINITY)
                 return 0;
         else if (watchdog_timeout == 0) {
                 int flags;
@@ -104,7 +104,7 @@ int watchdog_set_timeout(usec_t *usec) {
 
         /* If we didn't open the watchdog yet and didn't get any
          * explicit timeout value set, don't do anything */
-        if (watchdog_fd < 0 && watchdog_timeout == (usec_t) -1)
+        if (watchdog_fd < 0 && watchdog_timeout == USEC_INFINITY)
                 return 0;
 
         if (watchdog_fd < 0)
index 25427d6416370fd8fe1250179e6ad81d2de2c960..0f008a6100b475b121641e395e7bb3174d47db90 100644 (file)
@@ -30,8 +30,8 @@
 #include <fcntl.h>
 #include <stddef.h>
 
-#include <systemd/sd-daemon.h>
-#include <systemd/sd-shutdown.h>
+#include "systemd/sd-daemon.h"
+#include "systemd/sd-shutdown.h"
 
 #include "log.h"
 #include "macro.h"
@@ -52,8 +52,8 @@ static int read_packet(int fd, union shutdown_buffer *_b) {
         union shutdown_buffer b; /* We maintain our own copy here, in
                                   * order not to corrupt the last message */
         struct iovec iovec = {
-                iovec.iov_base = &b,
-                iovec.iov_len = sizeof(b) - 1,
+                .iov_base = &b,
+                .iov_len = sizeof(b) - 1,
         };
         union {
                 struct cmsghdr cmsghdr;
@@ -456,6 +456,7 @@ finish:
         }
 
         sd_notify(false,
+                  "STOPPING=\n"
                   "STATUS=Exiting...");
 
         return r;
index 5adbea5956ba75963374ece1b93fe5139c86563d..ca00eea4ab76f105b357381925a7bb552ee1e7f7 100644 (file)
@@ -134,8 +134,7 @@ static int execute(char **modes, char **states) {
         return r;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s COMMAND\n\n"
                "Suspend the system, hibernate the system, or both.\n\n"
                "Commands:\n"
@@ -144,10 +143,7 @@ static int help(void) {
                "  suspend              Suspend the system\n"
                "  hibernate            Hibernate the system\n"
                "  hybrid-sleep         Both hibernate and suspend the system\n"
-               , program_invocation_short_name
-               );
-
-        return 0;
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -166,10 +162,11 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+h", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
                 switch(c) {
                 case 'h':
-                        return help();
+                        help();
+                        return 0; /* done */
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
index b791305dc50657c905dd0d3dec22345c95fe884f..3041903757648e53eb2c5bcdf5d4cee7b54cea10 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <netdb.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <unistd.h>
@@ -125,7 +125,7 @@ static int connection_create_pipes(Connection *c, int buffer[2], size_t *sz) {
                 return -errno;
         }
 
-        fcntl(buffer[0], F_SETPIPE_SZ, BUFFER_SIZE);
+        (void) fcntl(buffer[0], F_SETPIPE_SZ, BUFFER_SIZE);
 
         r = fcntl(buffer[0], F_GETPIPE_SZ);
         if (r < 0) {
@@ -473,7 +473,7 @@ static int add_connection_socket(Context *context, int fd) {
                 return 0;
         }
 
-        r = set_ensure_allocated(&context->connections, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&context->connections, NULL);
         if (r < 0) {
                 log_oom();
                 return 0;
@@ -543,7 +543,7 @@ static int add_listen_socket(Context *context, int fd) {
         assert(context);
         assert(fd >= 0);
 
-        r = set_ensure_allocated(&context->listen, trivial_hash_func, trivial_compare_func);
+        r = set_ensure_allocated(&context->listen, NULL);
         if (r < 0) {
                 log_oom();
                 return r;
@@ -589,17 +589,13 @@ static int add_listen_socket(Context *context, int fd) {
         return 0;
 }
 
-static int help(void) {
-
-        printf("%s [HOST:PORT]\n"
-               "%s [SOCKET]\n\n"
+static void help(void) {
+        printf("%1$s [HOST:PORT]\n"
+               "%1$s [SOCKET]\n\n"
                "Bidirectionally proxy local sockets to another (possibly remote) socket.\n\n"
                "  -h --help              Show this help\n"
                "     --version           Show package version\n",
-               program_invocation_short_name,
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -620,12 +616,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -638,7 +635,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind >= argc) {
                 log_error("Not enough parameters.");
index 06defa5b7cdf69c567a360f16fd0fbe4ccddf44d..809e59b71fdb6acd8a184e2f52a5fca7d2c092ce 100644 (file)
@@ -214,16 +214,13 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
         return r;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n"
                "Applies kernel sysctl settings.\n\n"
                "  -h --help             Show this help\n"
                "     --version          Show package version\n"
-               "     --prefix=PATH      Only apply rules that apply to paths with the specified prefix\n",
-               program_invocation_short_name);
-
-        return 0;
+               "     --prefix=PATH      Only apply rules with the specified prefix\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -245,12 +242,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -260,11 +258,19 @@ static int parse_argv(int argc, char *argv[]) {
                 case ARG_PREFIX: {
                         char *p;
 
-                        for (p = optarg; *p; p++)
-                                if (*p == '.')
-                                        *p = '/';
-
-                        if (strv_extend(&arg_prefixes, optarg) < 0)
+                        /* We used to require people to specify absolute paths
+                         * in /proc/sys in the past. This is kinda useless, but
+                         * we need to keep compatibility. We now support any
+                         * sysctl name available. */
+                        normalize_sysctl(optarg);
+                        if (startswith(optarg, "/proc/sys"))
+                                p = strdup(optarg);
+                        else
+                                p = strappend("/proc/sys/", optarg);
+
+                        if (!p)
+                                return log_oom();
+                        if (strv_consume(&arg_prefixes, p) < 0)
                                 return log_oom();
 
                         break;
@@ -276,7 +282,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -295,7 +300,7 @@ int main(int argc, char *argv[]) {
 
         umask(0022);
 
-        sysctl_options = hashmap_new(string_hash_func, string_compare_func);
+        sysctl_options = hashmap_new(&string_hash_ops);
         if (!sysctl_options) {
                 r = log_oom();
                 goto finish;
index 03720f411d7b41fc4cdebc09b5ed8bb8308c1e25..28eaa6a8475ebebcadf27c27f5ec7c4ac08e0490 100644 (file)
@@ -137,23 +137,6 @@ static unsigned arg_lines = 10;
 static OutputMode arg_output = OUTPUT_SHORT;
 static bool arg_plain = false;
 
-static const struct {
-        const char *verb;
-        const char *method;
-} unit_actions[] = {
-        { "start",                 "StartUnit" },
-        { "stop",                  "StopUnit" },
-        { "condstop",              "StopUnit" },
-        { "reload",                "ReloadUnit" },
-        { "restart",               "RestartUnit" },
-        { "try-restart",           "TryRestartUnit" },
-        { "condrestart",           "TryRestartUnit" },
-        { "reload-or-restart",     "ReloadOrRestartUnit" },
-        { "reload-or-try-restart", "ReloadOrTryRestartUnit" },
-        { "condreload",            "ReloadOrTryRestartUnit" },
-        { "force-reload",          "ReloadOrTryRestartUnit" }
-};
-
 static bool original_stdout_is_tty;
 
 static int daemon_reload(sd_bus *bus, char **args);
@@ -456,7 +439,7 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
                 }
 
                 if (circle_len > 0)
-                        printf("%s%s%s", on_circle, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : "  ", off_circle);
+                        printf("%s%s%s ", on_circle, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : " ", off_circle);
 
                 printf("%s%-*s%s %s%-*s%s %s%-*s %-*s%s %-*s",
                        on_active, id_len, id, off_active,
@@ -594,7 +577,7 @@ static int get_unit_list_recursive(
         assert(_unit_infos);
         assert(_machines);
 
-        replies = set_new(NULL, NULL);
+        replies = set_new(NULL);
         if (!replies)
                 return log_oom();
 
@@ -617,7 +600,7 @@ static int get_unit_list_recursive(
                         return r;
 
                 STRV_FOREACH(i, machines) {
-                        _cleanup_bus_unref_ sd_bus *container = NULL;
+                        _cleanup_bus_close_unref_ sd_bus *container = NULL;
                         int k;
 
                         r = sd_bus_open_system_container(&container, *i);
@@ -1142,7 +1125,7 @@ static usec_t calc_next_elapse(dual_timestamp *nw, dual_timestamp *next) {
         assert(nw);
         assert(next);
 
-        if (next->monotonic != (usec_t) -1 && next->monotonic > 0) {
+        if (next->monotonic != USEC_INFINITY && next->monotonic > 0) {
                 usec_t converted;
 
                 if (next->monotonic > nw->monotonic)
@@ -1150,7 +1133,7 @@ static usec_t calc_next_elapse(dual_timestamp *nw, dual_timestamp *next) {
                 else
                         converted = nw->realtime - (nw->monotonic - next->monotonic);
 
-                if (next->realtime != (usec_t) -1 && next->realtime > 0)
+                if (next->realtime != USEC_INFINITY && next->realtime > 0)
                         next_elapse = MIN(converted, next->realtime);
                 else
                         next_elapse = converted;
@@ -1338,7 +1321,7 @@ static int list_unit_files(sd_bus *bus, char **args) {
                 Iterator i;
                 unsigned n_units;
 
-                h = hashmap_new(string_hash_func, string_compare_func);
+                h = hashmap_new(&string_hash_ops);
                 if (!h)
                         return log_oom();
 
@@ -1350,8 +1333,9 @@ static int list_unit_files(sd_bus *bus, char **args) {
                 }
 
                 n_units = hashmap_size(h);
+
                 units = new(UnitFileList, n_units);
-                if (!units) {
+                if (!units && n_units > 0) {
                         unit_file_list_free(h);
                         return log_oom();
                 }
@@ -1407,14 +1391,13 @@ static int list_unit_files(sd_bus *bus, char **args) {
                         return bus_log_parse_error(r);
         }
 
-        if (c > 0) {
-                qsort(units, c, sizeof(UnitFileList), compare_unit_file_list);
-                output_unit_file_list(units, c);
-        }
+        qsort_safe(units, c, sizeof(UnitFileList), compare_unit_file_list);
+        output_unit_file_list(units, c);
 
-        if (avoid_bus())
+        if (avoid_bus()) {
                 for (unit = units; unit < units + c; unit++)
                         free(unit->path);
+        }
 
         return 0;
 }
@@ -1688,7 +1671,7 @@ static int compare_machine_info(const void *a, const void *b) {
 }
 
 static int get_machine_properties(sd_bus *bus, struct machine_info *mi) {
-        _cleanup_bus_unref_ sd_bus *container = NULL;
+        _cleanup_bus_close_unref_ sd_bus *container = NULL;
         int r;
 
         assert(mi);
@@ -1982,18 +1965,28 @@ static int set_default(sd_bus *bus, char **args) {
 
                 r = 0;
         } else {
-                _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
+                _cleanup_bus_message_unref_ sd_bus_message *reply = NULL, *m = NULL;
                 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
 
-                r = sd_bus_call_method(
+                r = sd_bus_message_new_method_call(
                                 bus,
+                                &m,
                                 "org.freedesktop.systemd1",
                                 "/org/freedesktop/systemd1",
                                 "org.freedesktop.systemd1.Manager",
-                                "SetDefaultTarget",
-                                &error,
-                                &reply,
-                                "sb", unit, true);
+                                "SetDefaultTarget");
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_message_append(m, "sb", unit, 1);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_call(bus, m, 0, &error, &reply);
                 if (r < 0) {
                         log_error("Failed to set default target: %s", bus_error_message(&error, -r));
                         return r;
@@ -2160,6 +2153,7 @@ static int list_jobs(sd_bus *bus, char **args) {
 static int cancel_job(sd_bus *bus, char **args) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
         char **name;
+        int r = 0;
 
         assert(args);
 
@@ -2167,31 +2161,43 @@ static int cancel_job(sd_bus *bus, char **args) {
                 return daemon_reload(bus, args);
 
         STRV_FOREACH(name, args+1) {
+                _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
                 uint32_t id;
-                int r;
+                int q;
 
-                r = safe_atou32(*name, &id);
-                if (r < 0) {
-                        log_error("Failed to parse job id \"%s\": %s", *name, strerror(-r));
-                        return r;
+                q = safe_atou32(*name, &id);
+                if (q < 0) {
+                        log_error("Failed to parse job id \"%s\": %s", *name, strerror(-q));
+                        return q;
                 }
 
-                r = sd_bus_call_method(
+                q = sd_bus_message_new_method_call(
                                 bus,
+                                &m,
                                 "org.freedesktop.systemd1",
                                 "/org/freedesktop/systemd1",
                                 "org.freedesktop.systemd1.Manager",
-                                "CancelJob",
-                                &error,
-                                NULL,
-                                "u", id);
-                if (r < 0) {
-                        log_error("Failed to cancel job %u: %s", (unsigned) id, bus_error_message(&error, r));
-                        return r;
+                                "CancelJob");
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (q < 0)
+                        return bus_log_create_error(1);
+
+                q = sd_bus_message_append(m, "u", id);
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_call(bus, m, 0, &error, NULL);
+                if (q < 0) {
+                        log_error("Failed to cancel job %"PRIu32": %s", id, bus_error_message(&error, q));
+                        if (r == 0)
+                                r = q;
                 }
         }
 
-        return 0;
+        return r;
 }
 
 static int need_daemon_reload(sd_bus *bus, const char *unit) {
@@ -2350,9 +2356,19 @@ static int check_wait_response(WaitData *d) {
                 else if (streq(d->result, "canceled"))
                         log_error("Job for %s canceled.", strna(d->name));
                 else if (streq(d->result, "dependency"))
-                        log_error("A dependency job for %s failed. See 'journalctl -xn' for details.", strna(d->name));
-                else if (!streq(d->result, "done") && !streq(d->result, "skipped"))
-                        log_error("Job for %s failed. See 'systemctl status %s' and 'journalctl -xn' for details.", strna(d->name), strna(d->name));
+                        log_error("A dependency job for %s failed. See 'journalctl -xe' for details.", strna(d->name));
+                else if (!streq(d->result, "done") && !streq(d->result, "skipped")) {
+                        if (d->name) {
+                                bool quotes;
+
+                                quotes = chars_intersect(d->name, SHELL_NEED_QUOTES);
+
+                                log_error("Job for %s failed. See \"systemctl status %s%s%s\" and \"journalctl -xe\" for details.",
+                                          d->name,
+                                          quotes ? "'" : "", d->name, quotes ? "'" : "");
+                        } else
+                                log_error("Job failed. See \"journalctl -xe\" for details.");
+                }
         }
 
         if (streq(d->result, "timeout"))
@@ -2382,7 +2398,7 @@ static int wait_for_jobs(sd_bus *bus, Set *s) {
         while (!set_isempty(s)) {
                 q = bus_process_wait(bus);
                 if (q < 0) {
-                        log_error("Failed to wait for response: %s", strerror(-r));
+                        log_error("Failed to wait for response: %s", strerror(-q));
                         return q;
                 }
 
@@ -2529,6 +2545,23 @@ static int check_triggering_units(
         return 0;
 }
 
+static const struct {
+        const char *verb;
+        const char *method;
+} unit_actions[] = {
+        { "start",                 "StartUnit" },
+        { "stop",                  "StopUnit" },
+        { "condstop",              "StopUnit" },
+        { "reload",                "ReloadUnit" },
+        { "restart",               "RestartUnit" },
+        { "try-restart",           "TryRestartUnit" },
+        { "condrestart",           "TryRestartUnit" },
+        { "reload-or-restart",     "ReloadOrRestartUnit" },
+        { "reload-or-try-restart", "ReloadOrTryRestartUnit" },
+        { "condreload",            "ReloadOrTryRestartUnit" },
+        { "force-reload",          "ReloadOrTryRestartUnit" }
+};
+
 static const char *verb_to_method(const char *verb) {
        uint i;
 
@@ -2557,7 +2590,7 @@ static int start_unit_one(
                 sd_bus_error *error,
                 Set *s) {
 
-        _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL, *reply = NULL;
         const char *path;
         int r;
 
@@ -2567,15 +2600,26 @@ static int start_unit_one(
         assert(error);
 
         log_debug("Calling manager for %s on %s, %s", method, name, mode);
-        r = sd_bus_call_method(
+
+        r = sd_bus_message_new_method_call(
                         bus,
+                        &m,
                         "org.freedesktop.systemd1",
                         "/org/freedesktop/systemd1",
                         "org.freedesktop.systemd1.Manager",
-                        method,
-                        error,
-                        &reply,
-                        "ss", name, mode);
+                        method);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_append(m, "ss", name, mode);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_call(bus, m, 0, error, &reply);
         if (r < 0) {
                 const char *verb;
 
@@ -2694,7 +2738,7 @@ static enum action verb_to_action(const char *verb) {
 static int start_unit(sd_bus *bus, char **args) {
         _cleanup_set_free_free_ Set *s = NULL;
         _cleanup_strv_free_ char **names = NULL;
-        const char *method, *mode, *one_name;
+        const char *method, *mode, *one_name, *suffix = NULL;
         char **name;
         int r = 0;
 
@@ -2707,8 +2751,11 @@ static int start_unit(sd_bus *bus, char **args) {
                 method = verb_to_method(args[0]);
                 action = verb_to_action(args[0]);
 
-                mode = streq(args[0], "isolate") ? "isolate" :
-                       action_table[action].mode ?: arg_job_mode;
+                if (streq(args[0], "isolate")) {
+                        mode = "isolate";
+                        suffix = ".target";
+                } else
+                        mode = action_table[action].mode ?: arg_job_mode;
 
                 one_name = action_table[action].target;
         } else {
@@ -2724,7 +2771,7 @@ static int start_unit(sd_bus *bus, char **args) {
         if (one_name)
                 names = strv_new(one_name, NULL);
         else {
-                r = expand_names(bus, args + 1, NULL, &names);
+                r = expand_names(bus, args + 1, suffix, &names);
                 if (r < 0)
                         log_error("Failed to expand names: %s", strerror(-r));
         }
@@ -2736,7 +2783,7 @@ static int start_unit(sd_bus *bus, char **args) {
                         return r;
                 }
 
-                s = set_new(string_hash_func, string_compare_func);
+                s = set_new(&string_hash_ops);
                 if (!s)
                         return log_oom();
         }
@@ -2814,7 +2861,7 @@ static int reboot_with_logind(sd_bus *bus, enum action a) {
                         method,
                         &error,
                         NULL,
-                        "b", true);
+                        "b", arg_ask_password);
         if (r < 0)
                 log_error("Failed to execute operation: %s", bus_error_message(&error, r));
 
@@ -3037,18 +3084,29 @@ static int kill_unit(sd_bus *bus, char **args) {
                 log_error("Failed to expand names: %s", strerror(-r));
 
         STRV_FOREACH(name, names) {
-                q = sd_bus_call_method(
+                _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+
+                q = sd_bus_message_new_method_call(
                                 bus,
+                                &m,
                                 "org.freedesktop.systemd1",
                                 "/org/freedesktop/systemd1",
                                 "org.freedesktop.systemd1.Manager",
-                                "KillUnit",
-                                &error,
-                                NULL,
-                                "ssi", *names, arg_kill_who, arg_signal);
+                                "KillUnit");
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_message_append(m, "ssi", *names, arg_kill_who, arg_signal);
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_call(bus, m, 0, &error, NULL);
                 if (q < 0) {
-                        log_error("Failed to kill unit %s: %s",
-                                  *names, bus_error_message(&error, r));
+                        log_error("Failed to kill unit %s: %s", *names, bus_error_message(&error, q));
                         if (r == 0)
                                 r = q;
                 }
@@ -3170,6 +3228,7 @@ typedef struct UnitStatusInfo {
         const char *status_text;
         const char *pid_file;
         bool running:1;
+        int status_errno;
 
         usec_t start_timestamp;
         usec_t exit_timestamp;
@@ -3398,7 +3457,7 @@ static void print_status_info(
 
         if (i->main_pid > 0 || i->control_pid > 0) {
                 if (i->main_pid > 0) {
-                        printf(" Main PID: %u", (unsigned) i->main_pid);
+                        printf(" Main PID: "PID_FMT, i->main_pid);
 
                         if (i->running) {
                                 _cleanup_free_ char *comm = NULL;
@@ -3429,7 +3488,7 @@ static void print_status_info(
                 if (i->control_pid > 0) {
                         _cleanup_free_ char *c = NULL;
 
-                        printf(" %8s: %u", i->main_pid ? "" : " Control", (unsigned) i->control_pid);
+                        printf(" %8s: "PID_FMT, i->main_pid ? "" : " Control", i->control_pid);
 
                         get_process_comm(i->control_pid, &c);
                         if (c)
@@ -3441,6 +3500,8 @@ static void print_status_info(
 
         if (i->status_text)
                 printf("   Status: \"%s\"\n", i->status_text);
+        if (i->status_errno > 0)
+                printf("    Error: %i (%s)\n", i->status_errno, strerror(i->status_errno));
 
         if (i->control_group &&
             (i->main_pid > 0 || i->control_pid > 0 ||
@@ -3500,50 +3561,11 @@ static void show_unit_help(UnitStatusInfo *i) {
                 return;
         }
 
-        STRV_FOREACH(p, i->documentation) {
-
-                if (startswith(*p, "man:")) {
-                        const char *args[4] = { "man", NULL, NULL, NULL };
-                        _cleanup_free_ char *page = NULL, *section = NULL;
-                        char *e = NULL;
-                        pid_t pid;
-                        size_t k;
-
-                        k = strlen(*p);
-
-                        if ((*p)[k-1] == ')')
-                                e = strrchr(*p, '(');
-
-                        if (e) {
-                                page = strndup((*p) + 4, e - *p - 4);
-                                section = strndup(e + 1, *p + k - e - 2);
-                                if (!page || !section) {
-                                        log_oom();
-                                        return;
-                                }
-
-                                args[1] = section;
-                                args[2] = page;
-                        } else
-                                args[1] = *p + 4;
-
-                        pid = fork();
-                        if (pid < 0) {
-                                log_error("Failed to fork: %m");
-                                continue;
-                        }
-
-                        if (pid == 0) {
-                                /* Child */
-                                execvp(args[0], (char**) args);
-                                log_error("Failed to execute man: %m");
-                                _exit(EXIT_FAILURE);
-                        }
-
-                        wait_for_terminate(pid, NULL);
-                } else
+        STRV_FOREACH(p, i->documentation)
+                if (startswith(*p, "man:"))
+                        show_man_page(*p + 4, false);
+                else
                         log_info("Can't show: %s", *p);
-        }
 }
 
 static int status_property(const char *name, sd_bus_message *m, UnitStatusInfo *i, const char *contents) {
@@ -3661,6 +3683,8 @@ static int status_property(const char *name, sd_bus_message *m, UnitStatusInfo *
                         i->exit_code = (int) j;
                 else if (streq(name, "ExecMainStatus"))
                         i->exit_status = (int) j;
+                else if (streq(name, "StatusErrno"))
+                        i->status_errno = (int) j;
 
                 break;
         }
@@ -3852,7 +3876,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
                                 return bus_log_parse_error(r);
 
                         if (u > 0)
-                                printf("%s=%u\n", name, (unsigned) u);
+                                printf("%s=%"PRIu32"\n", name, u);
                         else if (arg_all)
                                 printf("%s=\n", name);
 
@@ -4023,14 +4047,14 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
 
                                 tt = strv_join(info.argv, " ");
 
-                                printf("%s={ path=%s ; argv[]=%s ; ignore_errors=%s ; start_time=[%s] ; stop_time=[%s] ; pid=%u ; code=%s ; status=%i%s%s }\n",
+                                printf("%s={ path=%s ; argv[]=%s ; ignore_errors=%s ; start_time=[%s] ; stop_time=[%s] ; pid="PID_FMT" ; code=%s ; status=%i%s%s }\n",
                                        name,
                                        strna(info.path),
                                        strna(tt),
                                        yes_no(info.ignore),
                                        strna(format_timestamp(timestamp1, sizeof(timestamp1), info.start_timestamp)),
                                        strna(format_timestamp(timestamp2, sizeof(timestamp2), info.exit_timestamp)),
-                                       (unsigned) info. pid,
+                                       info.pid,
                                        sigchld_code_to_string(info.code),
                                        info.status,
                                        info.code == CLD_EXITED ? "" : "/",
@@ -4473,7 +4497,6 @@ static int show(sd_bus *bus, char **args) {
 }
 
 static int cat(sd_bus *bus, char **args) {
-        _cleanup_free_ char *unit = NULL;
         _cleanup_strv_free_ char **names = NULL;
         char **name;
         bool first = true;
@@ -4491,7 +4514,7 @@ static int cat(sd_bus *bus, char **args) {
         STRV_FOREACH(name, names) {
                 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
                 _cleanup_strv_free_ char **dropin_paths = NULL;
-                _cleanup_free_ char *fragment_path = NULL;
+                _cleanup_free_ char *fragment_path = NULL, *unit = NULL;
                 char **path;
 
                 unit = unit_dbus_path_from_name(*name);
@@ -4583,6 +4606,10 @@ static int set_property(sd_bus *bus, char **args) {
         if (r < 0)
                 return bus_log_create_error(r);
 
+        r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+        if (r < 0)
+                return bus_log_create_error(r);
+
         n = unit_name_mangle(args[1], MANGLE_NOGLOB);
         if (!n)
                 return log_oom();
@@ -4624,7 +4651,7 @@ static int set_property(sd_bus *bus, char **args) {
 
 static int snapshot(sd_bus *bus, char **args) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-        _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL, *reply = NULL;
         _cleanup_free_ char *n = NULL, *id = NULL;
         const char *path;
         int r;
@@ -4636,15 +4663,25 @@ static int snapshot(sd_bus *bus, char **args) {
         if (!n)
                 return log_oom();
 
-        r = sd_bus_call_method(
+        r = sd_bus_message_new_method_call(
                         bus,
+                        &m,
                         "org.freedesktop.systemd1",
                         "/org/freedesktop/systemd1",
                         "org.freedesktop.systemd1.Manager",
-                        "CreateSnapshot",
-                        &error,
-                        &reply,
-                        "sb", n, false);
+                        "CreateSnapshot");
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_message_append(m, "sb", n, false);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_call(bus, m, 0, &error, &reply);
         if (r < 0) {
                 log_error("Failed to create snapshot: %s", bus_error_message(&error, r));
                 return r;
@@ -4677,7 +4714,7 @@ static int delete_snapshot(sd_bus *bus, char **args) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
         _cleanup_strv_free_ char **names = NULL;
         char **name;
-        int r, q;
+        int r;
 
         assert(args);
 
@@ -4686,18 +4723,30 @@ static int delete_snapshot(sd_bus *bus, char **args) {
                 log_error("Failed to expand names: %s", strerror(-r));
 
         STRV_FOREACH(name, names) {
-                q = sd_bus_call_method(
+                _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+                int q;
+
+                q = sd_bus_message_new_method_call(
                                 bus,
+                                &m,
                                 "org.freedesktop.systemd1",
                                 "/org/freedesktop/systemd1",
                                 "org.freedesktop.systemd1.Manager",
-                                "RemoveSnapshot",
-                                &error,
-                                NULL,
-                                "s", *name);
+                                "RemoveSnapshot");
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_message_append(m, "s", *name);
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_call(bus, m, 0, &error, NULL);
                 if (q < 0) {
-                        log_error("Failed to remove snapshot %s: %s",
-                                  *name, bus_error_message(&error, r));
+                        log_error("Failed to remove snapshot %s: %s", *name, bus_error_message(&error, q));
                         if (r == 0)
                                 r = q;
                 }
@@ -4708,6 +4757,7 @@ static int delete_snapshot(sd_bus *bus, char **args) {
 
 static int daemon_reload(sd_bus *bus, char **args) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
         const char *method;
         int r;
 
@@ -4731,16 +4781,21 @@ static int daemon_reload(sd_bus *bus, char **args) {
                                     /* "daemon-reload" */ "Reload";
         }
 
-        r = sd_bus_call_method(
+        r = sd_bus_message_new_method_call(
                         bus,
+                        &m,
                         "org.freedesktop.systemd1",
                         "/org/freedesktop/systemd1",
                         "org.freedesktop.systemd1.Manager",
-                        method,
-                        &error,
-                        NULL,
-                        NULL);
+                        method);
+        if (r < 0)
+                return bus_log_create_error(r);
 
+        r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+        if (r < 0)
+                return bus_log_create_error(r);
+
+        r = sd_bus_call(bus, m, 0, &error, NULL);
         if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL)
                 /* There's always a fallback possible for
                  * legacy actions. */
@@ -4769,18 +4824,29 @@ static int reset_failed(sd_bus *bus, char **args) {
                 log_error("Failed to expand names: %s", strerror(-r));
 
         STRV_FOREACH(name, names) {
-                q = sd_bus_call_method(
+                _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+
+                q = sd_bus_message_new_method_call(
                                 bus,
+                                &m,
                                 "org.freedesktop.systemd1",
                                 "/org/freedesktop/systemd1",
                                 "org.freedesktop.systemd1.Manager",
-                                "ResetFailedUnit",
-                                &error,
-                                NULL,
-                                "s", *name);
+                                "ResetFailedUnit");
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_message_append(m, "s", *name);
+                if (q < 0)
+                        return bus_log_create_error(q);
+
+                q = sd_bus_call(bus, m, 0, &error, NULL);
                 if (q < 0) {
-                        log_error("Failed to reset failed state of unit %s: %s",
-                                  *name, bus_error_message(&error, r));
+                        log_error("Failed to reset failed state of unit %s: %s", *name, bus_error_message(&error, q));
                         if (r == 0)
                                 r = q;
                 }
@@ -4861,7 +4927,7 @@ static int switch_root(sd_bus *bus, char **args) {
                 const char *root_systemd_path = NULL, *root_init_path = NULL;
 
                 root_systemd_path = strappenda(root, "/" SYSTEMD_BINARY_PATH);
-                root_init_path = strappenda3(root, "/", init);
+                root_init_path = strappenda(root, "/", init);
 
                 /* If the passed init is actually the same as the
                  * systemd binary, then let's suppress it. */
@@ -4911,6 +4977,10 @@ static int set_environment(sd_bus *bus, char **args) {
         if (r < 0)
                 return bus_log_create_error(r);
 
+        r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+        if (r < 0)
+                return bus_log_create_error(r);
+
         r = sd_bus_message_append_strv(m, args + 1);
         if (r < 0)
                 return bus_log_create_error(r);
@@ -4942,6 +5012,10 @@ static int import_environment(sd_bus *bus, char **args) {
         if (r < 0)
                 return bus_log_create_error(r);
 
+        r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+        if (r < 0)
+                return bus_log_create_error(r);
+
         if (strv_isempty(args + 1))
                 r = sd_bus_message_append_strv(m, environ);
         else {
@@ -5032,15 +5106,9 @@ static int enable_sysv_units(const char *verb, char **args) {
                 STRV_FOREACH(k, paths.unit_path) {
                         _cleanup_free_ char *path = NULL;
 
-                        if (!isempty(arg_root))
-                                asprintf(&path, "%s/%s/%s", arg_root, *k, name);
-                        else
-                                asprintf(&path, "%s/%s", *k, name);
-
-                        if (!path) {
-                                r = log_oom();
-                                goto finish;
-                        }
+                        path = path_join(arg_root, *k, name);
+                        if (!path)
+                                return log_oom();
 
                         found_native = access(path, F_OK) >= 0;
                         if (found_native)
@@ -5050,14 +5118,9 @@ static int enable_sysv_units(const char *verb, char **args) {
                 if (found_native)
                         continue;
 
-                if (!isempty(arg_root))
-                        asprintf(&p, "%s/" SYSTEM_SYSVINIT_PATH "/%s", arg_root, name);
-                else
-                        asprintf(&p, SYSTEM_SYSVINIT_PATH "/%s", name);
-                if (!p) {
-                        r = log_oom();
-                        goto finish;
-                }
+                p = path_join(arg_root, SYSTEM_SYSVINIT_PATH, name);
+                if (!p)
+                        return log_oom();
 
                 p[strlen(p) - strlen(".service")] = 0;
                 found_sysv = access(p, F_OK) >= 0;
@@ -5079,18 +5142,15 @@ static int enable_sysv_units(const char *verb, char **args) {
                 argv[c] = NULL;
 
                 l = strv_join((char**)argv, " ");
-                if (!l) {
-                        r = log_oom();
-                        goto finish;
-                }
+                if (!l)
+                        return log_oom();
 
                 log_info("Executing %s", l);
 
                 pid = fork();
                 if (pid < 0) {
                         log_error("Failed to fork: %m");
-                        r = -errno;
-                        goto finish;
+                        return -errno;
                 } else if (pid == 0) {
                         /* Child */
 
@@ -5101,8 +5161,7 @@ static int enable_sysv_units(const char *verb, char **args) {
                 j = wait_for_terminate(pid, &status);
                 if (j < 0) {
                         log_error("Failed to wait for child: %s", strerror(-r));
-                        r = j;
-                        goto finish;
+                        return j;
                 }
 
                 if (status.si_code == CLD_EXITED) {
@@ -5116,17 +5175,12 @@ static int enable_sysv_units(const char *verb, char **args) {
                                                 puts("disabled");
                                 }
 
-                        } else if (status.si_status != 0) {
-                                r = -EINVAL;
-                                goto finish;
-                        }
-                } else {
-                        r = -EPROTO;
-                        goto finish;
-                }
+                        } else if (status.si_status != 0)
+                                return -EINVAL;
+                } else
+                        return -EPROTO;
         }
 
-finish:
         /* Drop all SysV units */
         for (f = 0, t = 0; args[f]; f++) {
 
@@ -5273,6 +5327,10 @@ static int enable_unit(sd_bus *bus, char **args) {
                 if (r < 0)
                         return bus_log_create_error(r);
 
+                r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
                 r = sd_bus_message_append_strv(m, names);
                 if (r < 0)
                         return bus_log_create_error(r);
@@ -5333,6 +5391,92 @@ finish:
         return r;
 }
 
+static int add_dependency(sd_bus *bus, char **args) {
+        _cleanup_strv_free_ char **names = NULL;
+        _cleanup_free_ char *target = NULL;
+        const char *verb = args[0];
+        UnitDependency dep;
+        int r = 0;
+
+        if (!args[1])
+                return 0;
+
+        target = unit_name_mangle_with_suffix(args[1], MANGLE_NOGLOB, ".target");
+        if (!target)
+                return log_oom();
+
+        r = mangle_names(args+2, &names);
+        if (r < 0)
+                return r;
+
+        if (streq(verb, "add-wants"))
+                dep = UNIT_WANTS;
+        else if (streq(verb, "add-requires"))
+                dep = UNIT_REQUIRES;
+        else
+                assert_not_reached("Unknown verb");
+
+        if (!bus || avoid_bus()) {
+                UnitFileChange *changes = NULL;
+                unsigned n_changes = 0;
+
+                r = unit_file_add_dependency(arg_scope, arg_runtime, arg_root, names, target, dep, arg_force, &changes, &n_changes);
+
+                if (r < 0) {
+                        log_error("Can't add dependency: %s", strerror(-r));
+                        return r;
+                }
+
+                if (!arg_quiet)
+                        dump_unit_file_changes(changes, n_changes);
+
+                unit_file_changes_free(changes, n_changes);
+
+        } else {
+                _cleanup_bus_message_unref_ sd_bus_message *reply = NULL, *m = NULL;
+                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+
+                r = sd_bus_message_new_method_call(
+                                bus,
+                                &m,
+                                "org.freedesktop.systemd1",
+                                "/org/freedesktop/systemd1",
+                                "org.freedesktop.systemd1.Manager",
+                                "AddDependencyUnitFiles");
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_message_append_strv(m, names);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_message_append(m, "ssbb", target, unit_dependency_to_string(dep), arg_runtime, arg_force);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_call(bus, m, 0, &error, &reply);
+                if (r < 0) {
+                        log_error("Failed to execute operation: %s", bus_error_message(&error, r));
+                        return r;
+                }
+
+                r = deserialize_and_dump_unit_file_changes(reply);
+                if (r < 0)
+                        return r;
+
+                if (!arg_no_reload)
+                        r = daemon_reload(bus, args);
+                else
+                        r = 0;
+        }
+
+        return r;
+}
+
 static int preset_all(sd_bus *bus, char **args) {
         UnitFileChange *changes = NULL;
         unsigned n_changes = 0;
@@ -5352,21 +5496,33 @@ static int preset_all(sd_bus *bus, char **args) {
                 r = 0;
 
         } else {
-                _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
+                _cleanup_bus_message_unref_ sd_bus_message *m = NULL, *reply = NULL;
                 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
 
-                r = sd_bus_call_method(
+                r = sd_bus_message_new_method_call(
                                 bus,
+                                &m,
                                 "org.freedesktop.systemd1",
                                 "/org/freedesktop/systemd1",
                                 "org.freedesktop.systemd1.Manager",
-                                "PresetAllUnitFiles",
-                                &error,
-                                &reply,
+                                "PresetAllUnitFiles");
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_message_append(
+                                m,
                                 "sbb",
                                 unit_file_preset_mode_to_string(arg_preset_mode),
                                 arg_runtime,
                                 arg_force);
+                if (r < 0)
+                        return bus_log_create_error(r);
+
+                r = sd_bus_call(bus, m, 0, &error, &reply);
                 if (r < 0) {
                         log_error("Failed to execute operation: %s", bus_error_message(&error, r));
                         return r;
@@ -5486,7 +5642,7 @@ static int is_system_running(sd_bus *bus, char **args) {
         return streq(state, "running") ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
-static int systemctl_help(void) {
+static void systemctl_help(void) {
 
         pager_open_if_enabled();
 
@@ -5578,6 +5734,10 @@ static int systemctl_help(void) {
                "  unmask NAME...                  Unmask one or more units\n"
                "  link PATH...                    Link one or more units files into\n"
                "                                  the search path\n"
+               "  add-wants TARGET NAME...        Add 'Wants' dependency for the target\n"
+               "                                  on specified one or more units\n"
+               "  add-requires TARGET NAME...     Add 'Requires' dependency for the target\n"
+               "                                  on specified one or more units\n"
                "  get-default                     Get the name of the default target\n"
                "  set-default NAME                Set the default target\n\n"
                "Machine Commands:\n"
@@ -5611,12 +5771,9 @@ static int systemctl_help(void) {
                "  hibernate                       Hibernate the system\n"
                "  hybrid-sleep                    Hibernate and suspend the system\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
-static int halt_help(void) {
-
+static void halt_help(void) {
         printf("%s [OPTIONS...]%s\n\n"
                "%s the system.\n\n"
                "     --help      Show this help\n"
@@ -5632,12 +5789,9 @@ static int halt_help(void) {
                arg_action == ACTION_REBOOT   ? "Reboot" :
                arg_action == ACTION_POWEROFF ? "Power off" :
                                                "Halt");
-
-        return 0;
 }
 
-static int shutdown_help(void) {
-
+static void shutdown_help(void) {
         printf("%s [OPTIONS...] [TIME] [WALL...]\n\n"
                "Shut down the system.\n\n"
                "     --help      Show this help\n"
@@ -5649,12 +5803,9 @@ static int shutdown_help(void) {
                "     --no-wall   Don't send wall message before halt/power-off/reboot\n"
                "  -c             Cancel a pending shutdown\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
-static int telinit_help(void) {
-
+static void telinit_help(void) {
         printf("%s [OPTIONS...] {COMMAND}\n\n"
                "Send control commands to the init daemon.\n\n"
                "     --help      Show this help\n"
@@ -5667,32 +5818,26 @@ static int telinit_help(void) {
                "  q, Q           Reload init daemon configuration\n"
                "  u, U           Reexecute init daemon\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
-static int runlevel_help(void) {
-
+static void runlevel_help(void) {
         printf("%s [OPTIONS...]\n\n"
                "Prints the previous and current runlevel of the init system.\n\n"
                "     --help      Show this help\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
-static int help_types(void) {
+static void help_types(void) {
         int i;
         const char *t;
 
-        puts("Available unit types:");
+        if (!arg_no_legend)
+                puts("Available unit types:");
         for (i = 0; i < _UNIT_TYPE_MAX; i++) {
                 t = unit_type_to_string(i);
                 if (t)
                         puts(t);
         }
-
-        return 0;
 }
 
 static int systemctl_parse_argv(int argc, char *argv[]) {
@@ -5774,12 +5919,13 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "ht:p:alqfs:H:M:n:o:ir", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "ht:p:alqfs:H:M:n:o:ir", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return systemctl_help();
+                        systemctl_help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -5787,7 +5933,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                         return 0;
 
                 case 't': {
-                        char *word, *state;
+                        const char *word, *state;
                         size_t size;
 
                         FOREACH_WORD_SEPARATOR(word, size, optarg, ",", state) {
@@ -5836,7 +5982,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                                 if (!arg_properties)
                                         return log_oom();
                         } else {
-                                char *word, *state;
+                                const char *word, *state;
                                 size_t size;
 
                                 FOREACH_WORD_SEPARATOR(word, size, optarg, ",", state) {
@@ -6006,7 +6152,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_STATE: {
-                        char *word, *state;
+                        const char *word, *state;
                         size_t size;
 
                         FOREACH_WORD_SEPARATOR(word, size, optarg, ",", state) {
@@ -6047,7 +6193,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (arg_transport != BUS_TRANSPORT_LOCAL && arg_scope != UNIT_FILE_SYSTEM) {
                 log_error("Cannot access user instance remotely.");
@@ -6087,11 +6232,12 @@ static int halt_parse_argv(int argc, char *argv[]) {
                 if (runlevel == '0' || runlevel == '6')
                         arg_force = 2;
 
-        while ((c = getopt_long(argc, argv, "pfwdnih", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "pfwdnih", options, NULL)) >= 0)
                 switch (c) {
 
                 case ARG_HELP:
-                        return halt_help();
+                        halt_help();
+                        return 0;
 
                 case ARG_HALT:
                         arg_action = ACTION_HALT;
@@ -6134,7 +6280,6 @@ static int halt_parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (arg_action == ACTION_REBOOT && (argc == optind || argc == optind + 1)) {
                 r = update_reboot_param_file(argc == optind + 1 ? argv[optind] : NULL);
@@ -6219,11 +6364,12 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "HPrhkt:afFc", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "HPrhkt:afFc", options, NULL)) >= 0)
                 switch (c) {
 
                 case ARG_HELP:
-                        return shutdown_help();
+                        shutdown_help();
+                        return 0;
 
                 case 'H':
                         arg_action = ACTION_HALT;
@@ -6272,7 +6418,6 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (argc > optind && arg_action != ACTION_CANCEL_SHUTDOWN) {
                 r = parse_time_spec(argv[optind], &arg_when);
@@ -6333,11 +6478,12 @@ static int telinit_parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0)
                 switch (c) {
 
                 case ARG_HELP:
-                        return telinit_help();
+                        telinit_help();
+                        return 0;
 
                 case ARG_NO_WALL:
                         arg_no_wall = true;
@@ -6349,10 +6495,10 @@ static int telinit_parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind >= argc) {
-                telinit_help();
+                log_error("%s: required argument missing.",
+                          program_invocation_short_name);
                 return -EINVAL;
         }
 
@@ -6398,11 +6544,12 @@ static int runlevel_parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0)
                 switch (c) {
 
                 case ARG_HELP:
-                        return runlevel_help();
+                        runlevel_help();
+                        return 0;
 
                 case '?':
                         return -EINVAL;
@@ -6410,7 +6557,6 @@ static int runlevel_parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind < argc) {
                 log_error("Too many arguments.");
@@ -6602,6 +6748,8 @@ static int systemctl_main(sd_bus *bus, int argc, char *argv[], int bus_error) {
                 { "get-default",           EQUAL, 1, get_default,      NOBUS },
                 { "set-property",          MORE,  3, set_property      },
                 { "is-system-running",     EQUAL, 1, is_system_running },
+                { "add-wants",             MORE,  3, add_dependency,        NOBUS },
+                { "add-requires",          MORE,  3, add_dependency,        NOBUS },
                 {}
         }, *verb = verbs;
 
@@ -6896,7 +7044,7 @@ static int runlevel_main(void) {
 }
 
 int main(int argc, char*argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");
index 439a77961e9caf179297a5e2a41ea62e30a028c9..5185a48b31ea422bfcf01ad415c489f5103c0711 100644 (file)
@@ -96,6 +96,8 @@ enum {
 #define SD_BUS_ERROR_INCONSISTENT_MESSAGE       "org.freedesktop.DBus.Error.InconsistentMessage"
 #define SD_BUS_ERROR_MATCH_RULE_NOT_FOUND       "org.freedesktop.DBus.Error.MatchRuleNotFound"
 #define SD_BUS_ERROR_MATCH_RULE_INVALID         "org.freedesktop.DBus.Error.MatchRuleInvalid"
+#define SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED \
+                                                "org.freedesktop.DBus.Error.InteractiveAuthorizationRequired"
 
 _SD_END_DECLARATIONS;
 
index 79566d2109920989691420a4488c4faf172d0bbc..18acfc2ad7ededbb04521c0b5a384c948164601c 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "sd-id128.h"
 #include "sd-event.h"
-#include "sd-memfd.h"
 #include "_sd-common.h"
 
 _SD_BEGIN_DECLARATIONS;
@@ -132,7 +131,7 @@ sd_bus *sd_bus_unref(sd_bus *bus);
 int sd_bus_is_open(sd_bus *bus);
 int sd_bus_can_send(sd_bus *bus, char type);
 int sd_bus_get_server_id(sd_bus *bus, sd_id128_t *peer);
-int sd_bus_get_peer_creds(sd_bus *bus, uint64_t creds_mask, sd_bus_creds **ret);
+int sd_bus_get_owner_creds(sd_bus *bus, uint64_t creds_mask, sd_bus_creds **ret);
 int sd_bus_get_name(sd_bus *bus, const char **name);
 int sd_bus_get_tid(sd_bus *bus, pid_t *tid);
 
@@ -148,8 +147,10 @@ int sd_bus_process(sd_bus *bus, sd_bus_message **r);
 int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_message **r);
 int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec);
 int sd_bus_flush(sd_bus *bus);
-sd_bus_message* sd_bus_get_current_message(sd_bus *bus);
 sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus);
+sd_bus_message* sd_bus_get_current_message(sd_bus *bus);
+sd_bus_message_handler_t sd_bus_get_current_handler(sd_bus *bus);
+void* sd_bus_get_current_userdata(sd_bus *bus);
 
 int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority);
 int sd_bus_detach_event(sd_bus *bus);
@@ -175,6 +176,8 @@ void *sd_bus_slot_get_userdata(sd_bus_slot *slot);
 void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata);
 
 sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot);
+sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot *bus);
+void *sd_bus_slot_get_current_userdata(sd_bus_slot *slot);
 
 /* Message object */
 
@@ -192,9 +195,11 @@ sd_bus_message* sd_bus_message_unref(sd_bus_message *m);
 int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type);
 int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie);
 int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie);
+int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
+
 int sd_bus_message_get_expect_reply(sd_bus_message *m);
 int sd_bus_message_get_auto_start(sd_bus_message *m);
-int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
+int sd_bus_message_get_allow_interactive_authorization(sd_bus_message *m);
 
 const char *sd_bus_message_get_signature(sd_bus_message *m, int complete);
 const char *sd_bus_message_get_path(sd_bus_message *m);
@@ -218,6 +223,8 @@ int sd_bus_message_is_method_error(sd_bus_message *m, const char *name);
 
 int sd_bus_message_set_expect_reply(sd_bus_message *m, int b);
 int sd_bus_message_set_auto_start(sd_bus_message *m, int b);
+int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *m, int b);
+
 int sd_bus_message_set_destination(sd_bus_message *m, const char *destination);
 int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority);
 
@@ -226,10 +233,10 @@ int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p);
 int sd_bus_message_append_array(sd_bus_message *m, char type, const void *ptr, size_t size);
 int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr);
 int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const struct iovec *iov, unsigned n);
-int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, sd_memfd *memfd);
+int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, int memfd);
 int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s);
 int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iovec *iov, unsigned n);
-int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd* memfd);
+int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd);
 int sd_bus_message_append_strv(sd_bus_message *m, char **l);
 int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents);
 int sd_bus_message_close_container(sd_bus_message *m);
@@ -253,8 +260,8 @@ int sd_bus_get_unique_name(sd_bus *bus, const char **unique);
 int sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags);
 int sd_bus_release_name(sd_bus *bus, const char *name);
 int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatable); /* free the results */
-int sd_bus_get_owner(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **creds); /* unref the result! */
-int sd_bus_get_owner_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine);
+int sd_bus_get_name_creds(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **creds); /* unref the result! */
+int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine);
 
 /* Convenience calls */
 
@@ -282,6 +289,7 @@ int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char **in
 int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_;
 
 int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds);
+int sd_bus_query_sender_privilege(sd_bus_message *call, int capability);
 
 /* Credential handling */
 
index c3ea0592f69844e5668b6a501cbe5815620ea2d0..7416f82193d07cf7a5681bfa98f26abc310d8993 100644 (file)
 
 enum {
         DHCP_EVENT_STOP                         = 0,
-        DHCP_EVENT_NO_LEASE                     = 1,
-        DHCP_EVENT_IP_ACQUIRE                   = 2,
-        DHCP_EVENT_IP_CHANGE                    = 3,
-        DHCP_EVENT_EXPIRED                      = 4,
-        DHCP_EVENT_RENEW                        = 5,
+        DHCP_EVENT_IP_ACQUIRE                   = 1,
+        DHCP_EVENT_IP_CHANGE                    = 2,
+        DHCP_EVENT_EXPIRED                      = 3,
+        DHCP_EVENT_RENEW                        = 4,
 };
 
 typedef struct sd_dhcp_client sd_dhcp_client;
@@ -48,10 +47,13 @@ int sd_dhcp_client_set_callback(sd_dhcp_client *client, sd_dhcp_client_cb_t cb,
 int sd_dhcp_client_set_request_option(sd_dhcp_client *client, uint8_t option);
 int sd_dhcp_client_set_request_address(sd_dhcp_client *client,
                                        const struct in_addr *last_address);
+int sd_dhcp_client_set_request_broadcast(sd_dhcp_client *client, int broadcast);
 int sd_dhcp_client_set_index(sd_dhcp_client *client, int interface_index);
-int sd_dhcp_client_set_mac(sd_dhcp_client *client,
-                           const struct ether_addr *addr);
+int sd_dhcp_client_set_mac(sd_dhcp_client *client, const uint8_t *addr,
+                           size_t addr_len, uint16_t arp_type);
+int sd_dhcp_client_set_mtu(sd_dhcp_client *client, uint32_t mtu);
 int sd_dhcp_client_set_hostname(sd_dhcp_client *client, const char *hostname);
+int sd_dhcp_client_set_vendor_class_identifier(sd_dhcp_client *client, const char *vci);
 int sd_dhcp_client_get_lease(sd_dhcp_client *client, sd_dhcp_lease **ret);
 
 int sd_dhcp_client_stop(sd_dhcp_client *client);
index c15744d6c1d401addf5bb303917d09ede94c190a..a3728a702f8f6a4be34458f2d0429b1742589a0a 100644 (file)
@@ -31,17 +31,19 @@ struct sd_dhcp_route;
 
 sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease);
 sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease);
+
 int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
 int sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime);
 int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr);
 int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr);
 int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr);
 int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_addr *addr);
-int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size);
-int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, struct in_addr **addr, size_t *addr_size);
+int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr);
+int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr);
 int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu);
 int sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainname);
 int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname);
 int sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_path);
-int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, struct sd_dhcp_route **routes, size_t *routes_size);
+int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, struct sd_dhcp_route **routesgn);
+
 #endif
index 01595d39d1ed384dde7624ee347466e24e3bb4c1..9af3b6532d952125da52c547beb0f10637f4b43b 100644 (file)
@@ -44,6 +44,8 @@ bool sd_dhcp_server_is_running(sd_dhcp_server *server);
 int sd_dhcp_server_start(sd_dhcp_server *server);
 int sd_dhcp_server_stop(sd_dhcp_server *server);
 
-int sd_dhcp_server_set_address(sd_dhcp_server *server, struct in_addr *address);
+int sd_dhcp_server_set_address(sd_dhcp_server *server, struct in_addr *address, unsigned char prefixlen);
 int sd_dhcp_server_set_lease_pool(sd_dhcp_server *server, struct in_addr *start, size_t size);
+
+int sd_dhcp_server_forcerenew(sd_dhcp_server *server);
 #endif
index 93edcc41fcaa95168e8edd53e9b633ca053e82f5..c7f168fe214c44b043275477dc1ba4c69c09bdba 100644 (file)
@@ -43,8 +43,10 @@ int sd_dhcp6_client_set_callback(sd_dhcp6_client *client,
                                  sd_dhcp6_client_cb_t cb, void *userdata);
 
 int sd_dhcp6_client_set_index(sd_dhcp6_client *client, int interface_index);
-int sd_dhcp6_client_set_mac(sd_dhcp6_client *client,
-                            const struct ether_addr *mac_addr);
+int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr,
+                            size_t addr_len, uint16_t arp_type);
+int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *duid,
+                             size_t duid_len);
 int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client,
                                        uint16_t option);
 
index 5d9b3be6c7db59c17a209ee2c66296d476eae34e..0dbdcdf2a58a82801b3ffd140326aa37c7fc3707 100644 (file)
@@ -52,6 +52,8 @@ enum {
 
 enum {
         SD_EVENT_PASSIVE,
+        SD_EVENT_PREPARED,
+        SD_EVENT_PENDING,
         SD_EVENT_RUNNING,
         SD_EVENT_EXITING,
         SD_EVENT_FINISHED
@@ -84,12 +86,16 @@ int sd_event_add_defer(sd_event *e, sd_event_source **s, sd_event_handler_t call
 int sd_event_add_post(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata);
 int sd_event_add_exit(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata);
 
+int sd_event_prepare(sd_event *e);
+int sd_event_wait(sd_event *e, uint64_t timeout);
+int sd_event_dispatch(sd_event *e);
 int sd_event_run(sd_event *e, uint64_t timeout);
 int sd_event_loop(sd_event *e);
 int sd_event_exit(sd_event *e, int code);
 
 int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec);
 
+int sd_event_get_fd(sd_event *e);
 int sd_event_get_state(sd_event *e);
 int sd_event_get_tid(sd_event *e, pid_t *tid);
 int sd_event_get_exit_code(sd_event *e, int *code);
@@ -103,6 +109,8 @@ sd_event *sd_event_source_get_event(sd_event_source *s);
 void* sd_event_source_get_userdata(sd_event_source *s);
 void* sd_event_source_set_userdata(sd_event_source *s, void *userdata);
 
+int sd_event_source_set_name(sd_event_source *s, const char *name);
+int sd_event_source_get_name(sd_event_source *s, const char **name);
 int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback);
 int sd_event_source_get_pending(sd_event_source *s);
 int sd_event_source_get_priority(sd_event_source *s, int64_t *priority);
index dad459a7e8ea1209d54ddfed44c3b11a57e3abe9..64b882724c00fe224deb877a20ff4a49e84a0f99 100644 (file)
@@ -147,6 +147,9 @@ int sd_session_get_type(const char *session, char **type);
 /* Determine the class of this session, i.e. one of "user", "greeter" or "lock-screen". */
 int sd_session_get_class(const char *session, char **clazz);
 
+/* Determine the desktop brand of this session, i.e. something like "GNOME", "KDE" or "systemd-console". */
+int sd_session_get_desktop(const char *session, char **desktop);
+
 /* Determine the X11 display of this session. */
 int sd_session_get_display(const char *session, char **display);
 
@@ -181,6 +184,9 @@ int sd_seat_can_graphical(const char *seat);
 /* Return the class of machine */
 int sd_machine_get_class(const char *machine, char **clazz);
 
+/* Return the list if host-side network interface indices of a machine */
+int sd_machine_get_ifindices(const char *machine, int **ifindices);
+
 /* Get all seats, store in *seats. Returns the number of seats. If
  * seats is NULL, this only returns the number of seats. */
 int sd_get_seats(char ***seats);
diff --git a/src/systemd/sd-memfd.h b/src/systemd/sd-memfd.h
deleted file mode 100644 (file)
index 753ed68..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#ifndef foosdmemfdhfoo
-#define foosdmemfdhfoo
-
-/***
-  This file is part of systemd.
-
-  Copyright 2013 Lennart Poettering
-
-  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/>.
-***/
-
-#include <inttypes.h>
-#include <sys/types.h>
-#include <stdio.h>
-
-#include "_sd-common.h"
-
-_SD_BEGIN_DECLARATIONS;
-
-typedef struct sd_memfd sd_memfd;
-
-int sd_memfd_new(sd_memfd **m, const char *name);
-int sd_memfd_new_from_fd(sd_memfd **m, int fd);
-int sd_memfd_new_and_map(sd_memfd **m, const char *name, size_t sz, void **p);
-
-void sd_memfd_free(sd_memfd *m);
-
-int sd_memfd_get_fd(sd_memfd *m);
-int sd_memfd_dup_fd(sd_memfd *n);
-int sd_memfd_get_file(sd_memfd *m, FILE **f);
-
-int sd_memfd_map(sd_memfd *m, uint64_t offset, size_t size, void **p);
-
-int sd_memfd_set_sealed(sd_memfd *m, int b);
-int sd_memfd_get_sealed(sd_memfd *m);
-
-int sd_memfd_get_size(sd_memfd *m, uint64_t *sz);
-int sd_memfd_set_size(sd_memfd *m, uint64_t sz);
-
-int sd_memfd_get_name(sd_memfd *m, char **name);
-
-_SD_END_DECLARATIONS;
-
-#endif
index 7d05086be65d0ee6253ab9f31893b8b7fdc992b0..bb699409306329a35b4969f071bb4abffcceb08e 100644 (file)
@@ -26,8 +26,6 @@
 #include <sys/types.h>
 #include <inttypes.h>
 
-#include "sd-dhcp-lease.h"
-
 #include "_sd-common.h"
 
 /*
 
 _SD_BEGIN_DECLARATIONS;
 
-/* Get state from ifindex.
- * Possible states: failed, configuring, configured
+/* Get overall operational state
+ * Possible states: down, up, dormant, carrier, degraded, routable
  * Possible return codes:
- *   -ENODATA: networkd is not aware of the link
- *   -EUNATCH: networkd is not managing this link
- *   -EBUSY: udev is still processing the link, networkd does not yet know if it will manage it
+ *   -ENODATA: networkd is not aware of any links
  */
-int sd_network_get_link_state(unsigned index, char **state);
+int sd_network_get_operational_state(char **state);
 
-/* Get operatinal state from ifindex.
- * Possible states: unknown, dormant, carrier, degraded, routable
+/* Get DNS entries for all links. These are string representations of
+ * IP addresses */
+int sd_network_get_dns(char ***dns);
+
+/* Get NTP entries for all links. These are domain names or string
+ * representations of IP addresses */
+int sd_network_get_ntp(char ***ntp);
+
+/* Get the search/routing domains for all links. */
+int sd_network_get_domains(char ***domains);
+
+/* Get setup state from ifindex.
+ * Possible states:
+ *   pending: udev is still processing the link, we don't yet know if we will manage it
+ *   failed: networkd failed to manage the link
+ *   configuring: in the process of retrieving configuration or configuring the link
+ *   configured: link configured successfully
+ *   unmanaged: networkd is not handling the link
+ *   linger: the link is gone, but has not yet been dropped by networkd
  * Possible return codes:
  *   -ENODATA: networkd is not aware of the link
  */
-int sd_network_get_link_operational_state(unsigned index, char **state);
-
-/* Get overall opeartional state
- * Possible states: unknown, dormant, carrier, degraded, routable
+int sd_network_link_get_setup_state(int ifindex, char **state);
+
+/* Get operational state from ifindex.
+ * Possible states:
+ *   off: the device is powered down
+ *   no-carrier: the device is powered up, but it does not yet have a carrier
+ *   dormant: the device has a carrier, but is not yet ready for normal traffic
+ *   carrier: the link has a carrier
+ *   degraded: the link has carrier and addresses valid on the local link configured
+ *   routable: the link has carrier and routable address configured
  * Possible return codes:
- *   -ENODATA: networkd is not aware of any links
+ *   -ENODATA: networkd is not aware of the link
  */
-int sd_network_get_operational_state(char **state);
-
-/* Returns true if link exists and is loopback, and false otherwise */
-int sd_network_link_is_loopback(unsigned index);
-
-/* Get DHCPv4 lease from ifindex. */
-int sd_network_get_dhcp_lease(unsigned index, sd_dhcp_lease **ret);
-
-/* Returns true if link is configured to respect DNS entries received by DHCP */
-int sd_network_dhcp_use_dns(unsigned index);
+int sd_network_link_get_operational_state(int ifindex, char **state);
 
-/* Returns true if link is configured to respect NTP entries received by DHCP */
-int sd_network_dhcp_use_ntp(unsigned index);
+/* Get path to .network file applied to link */
+int sd_network_link_get_network_file(int ifindex, char **filename);
 
-/* Get IPv4 DNS entries statically configured for the link */
-int sd_network_get_dns(unsigned index, struct in_addr **addr, size_t *addr_size);
+/* Get DNS entries for a given link. These are string representations of
+ * IP addresses */
+int sd_network_link_get_dns(int ifindex, char ***addr);
 
-/* Get IPv4 NTP entries statically configured for the link */
-int sd_network_get_ntp(unsigned index, struct in_addr **addr, size_t *addr_size);
+/* Get NTP entries for a given link. These are domain names or string
+ * representations of IP addresses */
+int sd_network_link_get_ntp(int ifindex, char ***addr);
 
-/* Get IPv6 DNS entries statically configured for the link */
-int sd_network_get_dns6(unsigned index, struct in6_addr **addr, size_t *addr_size);
+/* Indicates whether or not LLMNR should be enabled for the link
+ * Possible levels of support: yes, no, resolve
+ * Possible return codes:
+ *   -ENODATA: networkd is not aware of the link
+ */
+int sd_network_link_get_llmnr(int ifindex, char **llmnr);
 
-/* Get IPv6 NTP entries statically configured for the link */
-int sd_network_get_ntp6(unsigned index, struct in6_addr **addr, size_t *addr_size);
+/* Get the DNS domain names for a given link. */
+int sd_network_link_get_domains(int ifindex, char ***domains);
 
-/* Get all network interfaces' indices, and store them in *indices. Returns
- * the number of indices. If indices is NULL, only returns the number of indices. */
-int sd_network_get_ifindices(unsigned **indices);
+/* Returns whether or not domains that don't match any link should be resolved
+ * on this link. 1 for yes, 0 for no and negative value for error */
+int sd_network_link_get_wildcard_domain(int ifindex);
 
 /* Monitor object */
 typedef struct sd_network_monitor sd_network_monitor;
 
 /* Create a new monitor. Category must be NULL, "links" or "leases". */
-int sd_network_monitor_new(const char *category, sd_network_monitor **ret);
+int sd_network_monitor_new(sd_network_monitor **ret, const char *category);
 
 /* Destroys the passed monitor. Returns NULL. */
 sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m);
diff --git a/src/systemd/sd-readahead.h b/src/systemd/sd-readahead.h
deleted file mode 100644 (file)
index bb30f9a..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#ifndef foosdreadaheadhfoo
-#define foosdreadaheadhfoo
-
-/***
-  Copyright 2010 Lennart Poettering
-
-  Permission is hereby granted, free of charge, to any person
-  obtaining a copy of this software and associated documentation files
-  (the "Software"), to deal in the Software without restriction,
-  including without limitation the rights to use, copy, modify, merge,
-  publish, distribute, sublicense, and/or sell copies of the Software,
-  and to permit persons to whom the Software is furnished to do so,
-  subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be
-  included in all copies or substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-***/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-  Reference implementation of a few boot read-ahead-related
-  interfaces. These interfaces are trivial to implement. To simplify
-  porting, we provide this reference implementation. Applications are
-  welcome to reimplement the algorithms described here if they do not
-  want to include these two source files.
-
-  You may compile this with -DDISABLE_SYSTEMD to disable systemd
-  support. This makes all calls NOPs.
-
-  Because this is drop-in code, we don't want any of our symbols to be
-  exported in any case. Hence, we declare hidden visibility for all of
-  them.
-
-  You may find an up-to-date version of these source files online:
-
-  http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h
-  http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c
-
-  This should compile on non-Linux systems too, but all functions
-  will become NOPs.
-
-  See sd-readahead(3) for more information.
-*/
-
-/*
-  Controls on-going disk read-ahead operations during boot-up. The argument
-  must be one of the following strings: "cancel", "done", or "noreplay".
-
-  cancel = terminate read-ahead data collection, and drop collected information
-  done = terminate read-ahead data collection, and keep collected information
-  noreplay = terminate read-ahead replay
-*/
-int sd_readahead(const char *action);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index b5aa634d05e48344d121fb514b502c94866871b9..1e7eb811d1a9680beb4c39aad84bfdd02e3710ba 100644 (file)
@@ -68,11 +68,11 @@ int sd_rtnl_detach_event(sd_rtnl *nl);
 
 /* messages */
 int sd_rtnl_message_new_link(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t msg_type, int index);
-int sd_rtnl_message_new_addr_update(sd_rtnl *rtnl, sd_rtnl_message **ret, int index, unsigned char family);
+int sd_rtnl_message_new_addr_update(sd_rtnl *rtnl, sd_rtnl_message **ret, int index, int family);
 int sd_rtnl_message_new_addr(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t msg_type, int index,
-                             unsigned char family);
+                             int family);
 int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret, uint16_t nlmsg_type,
-                              unsigned char rtm_family);
+                              int rtm_family, unsigned char rtm_protocol);
 
 sd_rtnl_message *sd_rtnl_message_ref(sd_rtnl_message *m);
 sd_rtnl_message *sd_rtnl_message_unref(sd_rtnl_message *m);
@@ -85,7 +85,7 @@ int sd_rtnl_message_is_broadcast(sd_rtnl_message *m);
 int sd_rtnl_message_addr_set_prefixlen(sd_rtnl_message *m, unsigned char prefixlen);
 int sd_rtnl_message_addr_set_scope(sd_rtnl_message *m, unsigned char scope);
 int sd_rtnl_message_addr_set_flags(sd_rtnl_message *m, unsigned char flags);
-int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, unsigned char *family);
+int sd_rtnl_message_addr_get_family(sd_rtnl_message *m, int *family);
 int sd_rtnl_message_addr_get_prefixlen(sd_rtnl_message *m, unsigned char *prefixlen);
 int sd_rtnl_message_addr_get_scope(sd_rtnl_message *m, unsigned char *scope);
 int sd_rtnl_message_addr_get_flags(sd_rtnl_message *m, unsigned char *flags);
@@ -95,6 +95,7 @@ int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsigned
 int sd_rtnl_message_link_set_type(sd_rtnl_message *m, unsigned type);
 int sd_rtnl_message_link_get_ifindex(sd_rtnl_message *m, int *ifindex);
 int sd_rtnl_message_link_get_flags(sd_rtnl_message *m, unsigned *flags);
+int sd_rtnl_message_link_get_type(sd_rtnl_message *m, unsigned *type);
 
 int sd_rtnl_message_route_set_dst_prefixlen(sd_rtnl_message *m, unsigned char prefixlen);
 int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope);
@@ -112,7 +113,7 @@ int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type);
 int sd_rtnl_message_open_container_union(sd_rtnl_message *m, unsigned short type, const char *key);
 int sd_rtnl_message_close_container(sd_rtnl_message *m);
 
-int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, char **data);
+int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, const char **data);
 int sd_rtnl_message_read_u8(sd_rtnl_message *m, unsigned short type, uint8_t *data);
 int sd_rtnl_message_read_u16(sd_rtnl_message *m, unsigned short type, uint16_t *data);
 int sd_rtnl_message_read_u32(sd_rtnl_message *m, unsigned short type, uint32_t *data);
index 1209a5a8b411aeed49b6a2e70156b3d3ad1617a8..9b9be96a0a8368ec05df4951cb9380266634d389 100644 (file)
@@ -23,7 +23,9 @@
 #include <pwd.h>
 #include <grp.h>
 #include <shadow.h>
+#include <gshadow.h>
 #include <getopt.h>
+#include <utmp.h>
 
 #include "util.h"
 #include "hashmap.h"
 #include "conf-files.h"
 #include "copy.h"
 #include "utf8.h"
+#include "label.h"
+#include "fileio-label.h"
+#include "uid-range.h"
 
 typedef enum ItemType {
         ADD_USER = 'u',
         ADD_GROUP = 'g',
         ADD_MEMBER = 'm',
+        ADD_RANGE = 'r',
 } ItemType;
 typedef struct Item {
         ItemType type;
@@ -47,6 +53,7 @@ typedef struct Item {
         char *uid_path;
         char *gid_path;
         char *description;
+        char *home;
 
         gid_t gid;
         uid_t uid;
@@ -61,6 +68,8 @@ typedef struct Item {
 static char *arg_root = NULL;
 
 static const char conf_file_dirs[] =
+        "/etc/sysusers.d\0"
+        "/run/sysusers.d\0"
         "/usr/local/lib/sysusers.d\0"
         "/usr/lib/sysusers.d\0"
 #ifdef HAVE_SPLIT_USR
@@ -75,8 +84,9 @@ static Hashmap *members = NULL;
 static Hashmap *database_uid = NULL, *database_user = NULL;
 static Hashmap *database_gid = NULL, *database_group = NULL;
 
-static uid_t search_uid = SYSTEM_UID_MAX;
-static gid_t search_gid = SYSTEM_GID_MAX;
+static uid_t search_uid = (uid_t) -1;
+static UidRange *uid_range = NULL;
+static unsigned n_uid_range = 0;
 
 #define UID_TO_PTR(u) (ULONG_TO_PTR(u+1))
 #define PTR_TO_UID(u) ((uid_t) (PTR_TO_ULONG(u)-1))
@@ -97,11 +107,11 @@ static int load_user_database(void) {
         if (!f)
                 return errno == ENOENT ? 0 : -errno;
 
-        r = hashmap_ensure_allocated(&database_user, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&database_user, &string_hash_ops);
         if (r < 0)
                 return r;
 
-        r = hashmap_ensure_allocated(&database_uid, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&database_uid, NULL);
         if (r < 0)
                 return r;
 
@@ -149,11 +159,11 @@ static int load_group_database(void) {
         if (!f)
                 return errno == ENOENT ? 0 : -errno;
 
-        r = hashmap_ensure_allocated(&database_group, string_hash_func, string_compare_func);
+        r = hashmap_ensure_allocated(&database_group, &string_hash_ops);
         if (r < 0)
                 return r;
 
-        r = hashmap_ensure_allocated(&database_gid, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&database_gid, NULL);
         if (r < 0)
                 return r;
 
@@ -190,8 +200,9 @@ static int load_group_database(void) {
         return 0;
 }
 
-static int make_backup(const char *x) {
-        _cleanup_close_ int src = -1, dst = -1;
+static int make_backup(const char *target, const char *x) {
+        _cleanup_close_ int src = -1;
+        _cleanup_fclose_ FILE *dst = NULL;
         char *backup, *temp;
         struct timespec ts[2];
         struct stat st;
@@ -208,30 +219,30 @@ static int make_backup(const char *x) {
         if (fstat(src, &st) < 0)
                 return -errno;
 
-        temp = strappenda(x, ".XXXXXX");
-        dst = mkostemp_safe(temp, O_WRONLY|O_CLOEXEC|O_NOCTTY);
-        if (dst < 0)
-                return dst;
+        r = fopen_temporary_label(target, x, &dst, &temp);
+        if (r < 0)
+                return r;
 
-        r = copy_bytes(src, dst, (off_t) -1);
+        r = copy_bytes(src, fileno(dst), (off_t) -1);
         if (r < 0)
                 goto fail;
 
+        /* Don't fail on chmod() or chown(). If it stays owned by us
+         * and/or unreadable by others, then it isn't too bad... */
+
+        backup = strappenda(x, "-");
+
         /* Copy over the access mask */
-        if (fchmod(dst, st.st_mode & 07777) < 0) {
-                r = -errno;
-                goto fail;
-        }
+        if (fchmod(fileno(dst), st.st_mode & 07777) < 0)
+                log_warning("Failed to change mode on %s: %m", backup);
 
-        /* Don't fail on chmod(). If it stays owned by us, then it
-         * isn't too bad... */
-        fchown(dst, st.st_uid, st.st_gid);
+        if (fchown(fileno(dst), st.st_uid, st.st_gid)< 0)
+                log_warning("Failed to change ownership of %s: %m", backup);
 
         ts[0] = st.st_atim;
         ts[1] = st.st_mtim;
-        futimens(dst, ts);
+        futimens(fileno(dst), ts);
 
-        backup = strappenda(x, "-");
         if (rename(temp, backup) < 0)
                 goto fail;
 
@@ -292,24 +303,72 @@ static int putgrent_with_members(const struct group *gr, FILE *group) {
         return 0;
 }
 
+static int putsgent_with_members(const struct sgrp *sg, FILE *gshadow) {
+        char **a;
+
+        assert(sg);
+        assert(gshadow);
+
+        a = hashmap_get(members, sg->sg_namp);
+        if (a) {
+                _cleanup_strv_free_ char **l = NULL;
+                bool added = false;
+                char **i;
+
+                l = strv_copy(sg->sg_mem);
+                if (!l)
+                        return -ENOMEM;
+
+                STRV_FOREACH(i, a) {
+                        if (strv_find(l, *i))
+                                continue;
+
+                        if (strv_extend(&l, *i) < 0)
+                                return -ENOMEM;
+
+                        added = true;
+                }
+
+                if (added) {
+                        struct sgrp t;
+
+                        strv_uniq(l);
+                        strv_sort(l);
+
+                        t = *sg;
+                        t.sg_mem = l;
+
+                        errno = 0;
+                        if (putsgent(&t, gshadow) != 0)
+                                return errno ? -errno : -EIO;
+
+                        return 1;
+                }
+        }
+
+        errno = 0;
+        if (putsgent(sg, gshadow) != 0)
+                return errno ? -errno : -EIO;
+
+        return 0;
+}
+
 static int write_files(void) {
 
-        _cleanup_fclose_ FILE *passwd = NULL, *group = NULL;
-        _cleanup_free_ char *passwd_tmp = NULL, *group_tmp = NULL;
-        const char *passwd_path = NULL, *group_path = NULL;
+        _cleanup_fclose_ FILE *passwd = NULL, *group = NULL, *shadow = NULL, *gshadow = NULL;
+        _cleanup_free_ char *passwd_tmp = NULL, *group_tmp = NULL, *shadow_tmp = NULL, *gshadow_tmp = NULL;
+        const char *passwd_path = NULL, *group_path = NULL, *shadow_path = NULL, *gshadow_path = NULL;
         bool group_changed = false;
         Iterator iterator;
         Item *i;
         int r;
 
-        /* We don't patch /etc/shadow or /etc/gshadow here, since we
-         * only create user accounts without passwords anyway. */
-
         if (hashmap_size(todo_gids) > 0 || hashmap_size(members) > 0) {
                 _cleanup_fclose_ FILE *original = NULL;
 
+                /* First we update the actual group list file */
                 group_path = fix_root("/etc/group");
-                r = fopen_temporary(group_path, &group, &group_tmp);
+                r = fopen_temporary_label("/etc/group", group_path, &group, &group_tmp);
                 if (r < 0)
                         goto finish;
 
@@ -346,7 +405,6 @@ static int write_files(void) {
                                 r = putgrent_with_members(gr, group);
                                 if (r < 0)
                                         goto finish;
-
                                 if (r > 0)
                                         group_changed = true;
 
@@ -379,13 +437,79 @@ static int write_files(void) {
                 r = fflush_and_check(group);
                 if (r < 0)
                         goto finish;
+
+                if (original) {
+                        fclose(original);
+                        original = NULL;
+                }
+
+                /* OK, now also update the shadow file for the group list */
+                gshadow_path = fix_root("/etc/gshadow");
+                r = fopen_temporary_label("/etc/gshadow", gshadow_path, &gshadow, &gshadow_tmp);
+                if (r < 0)
+                        goto finish;
+
+                if (fchmod(fileno(gshadow), 0000) < 0) {
+                        r = -errno;
+                        goto finish;
+                }
+
+                original = fopen(gshadow_path, "re");
+                if (original) {
+                        struct sgrp *sg;
+
+                        errno = 0;
+                        while ((sg = fgetsgent(original))) {
+
+                                i = hashmap_get(groups, sg->sg_namp);
+                                if (i && i->todo_group) {
+                                        r = -EEXIST;
+                                        goto finish;
+                                }
+
+                                r = putsgent_with_members(sg, gshadow);
+                                if (r < 0)
+                                        goto finish;
+                                if (r > 0)
+                                        group_changed = true;
+
+                                errno = 0;
+                        }
+                        if (!IN_SET(errno, 0, ENOENT)) {
+                                r = -errno;
+                                goto finish;
+                        }
+
+                } else if (errno != ENOENT) {
+                        r = -errno;
+                        goto finish;
+                }
+
+                HASHMAP_FOREACH(i, todo_gids, iterator) {
+                        struct sgrp n = {
+                                .sg_namp = i->name,
+                                .sg_passwd = (char*) "!!",
+                        };
+
+                        r = putsgent_with_members(&n, gshadow);
+                        if (r < 0)
+                                goto finish;
+
+                        group_changed = true;
+                }
+
+                r = fflush_and_check(gshadow);
+                if (r < 0)
+                        goto finish;
         }
 
         if (hashmap_size(todo_uids) > 0) {
                 _cleanup_fclose_ FILE *original = NULL;
+                long lstchg;
 
+                /* First we update the user database itself */
                 passwd_path = fix_root("/etc/passwd");
-                r = fopen_temporary(passwd_path, &passwd, &passwd_tmp);
+                r = fopen_temporary_label("/etc/passwd", passwd_path, &passwd, &passwd_tmp);
                 if (r < 0)
                         goto finish;
 
@@ -436,19 +560,19 @@ static int write_files(void) {
                                 .pw_uid = i->uid,
                                 .pw_gid = i->gid,
                                 .pw_gecos = i->description,
+
+                                /* "x" means the password is stored in
+                                 * the shadow file */
                                 .pw_passwd = (char*) "x",
-                        };
 
-                        /* Initialize the home directory and the shell
-                         * to nologin, with one exception: for root we
-                         * patch in something special */
-                        if (i->uid == 0) {
-                                n.pw_shell = (char*) "/bin/sh";
-                                n.pw_dir = (char*) "/root";
-                        } else {
-                                n.pw_shell = (char*) "/sbin/nologin";
-                                n.pw_dir = (char*) "/";
-                        }
+                                /* We default to the root directory as home */
+                                .pw_dir = i->home ? i->home : (char*) "/",
+
+                                /* Initialize the shell to nologin,
+                                 * with one exception: for root we
+                                 * patch in something special */
+                                .pw_shell = i->uid == 0 ? (char*) "/bin/sh" : (char*) "/sbin/nologin",
+                        };
 
                         errno = 0;
                         if (putpwent(&n, passwd) != 0) {
@@ -460,30 +584,124 @@ static int write_files(void) {
                 r = fflush_and_check(passwd);
                 if (r < 0)
                         goto finish;
-        }
 
-        /* Make a backup of the old files */
-        if (group && group_changed) {
-                r = make_backup(group_path);
+                if (original) {
+                        fclose(original);
+                        original = NULL;
+                }
+
+                /* The we update the shadow database */
+                shadow_path = fix_root("/etc/shadow");
+                r = fopen_temporary_label("/etc/shadow", shadow_path, &shadow, &shadow_tmp);
+                if (r < 0)
+                        goto finish;
+
+                if (fchmod(fileno(shadow), 0000) < 0) {
+                        r = -errno;
+                        goto finish;
+                }
+
+                original = fopen(shadow_path, "re");
+                if (original) {
+                        struct spwd *sp;
+
+                        errno = 0;
+                        while ((sp = fgetspent(original))) {
+
+                                i = hashmap_get(users, sp->sp_namp);
+                                if (i && i->todo_user) {
+                                        r = -EEXIST;
+                                        goto finish;
+                                }
+
+                                errno = 0;
+                                if (putspent(sp, shadow) < 0) {
+                                        r = errno ? -errno : -EIO;
+                                        goto finish;
+                                }
+
+                                errno = 0;
+                        }
+                        if (!IN_SET(errno, 0, ENOENT)) {
+                                r = -errno;
+                                goto finish;
+                        }
+                } else if (errno != ENOENT) {
+                        r = -errno;
+                        goto finish;
+                }
+
+                lstchg = (long) (now(CLOCK_REALTIME) / USEC_PER_DAY);
+                HASHMAP_FOREACH(i, todo_uids, iterator) {
+                        struct spwd n = {
+                                .sp_namp = i->name,
+                                .sp_pwdp = (char*) "!!",
+                                .sp_lstchg = lstchg,
+                                .sp_min = -1,
+                                .sp_max = -1,
+                                .sp_warn = -1,
+                                .sp_inact = -1,
+                                .sp_expire = -1,
+                                .sp_flag = (unsigned long) -1, /* this appears to be what everybody does ... */
+                        };
+
+                        errno = 0;
+                        if (putspent(&n, shadow) != 0) {
+                                r = errno ? -errno : -EIO;
+                                goto finish;
+                        }
+                }
+
+                r = fflush_and_check(shadow);
                 if (r < 0)
                         goto finish;
         }
 
+        /* Make a backup of the old files */
+        if (group_changed) {
+                if (group) {
+                        r = make_backup("/etc/group", group_path);
+                        if (r < 0)
+                                goto finish;
+                }
+                if (gshadow) {
+                        r = make_backup("/etc/gshadow", gshadow_path);
+                        if (r < 0)
+                                goto finish;
+                }
+        }
+
         if (passwd) {
-                r = make_backup(passwd_path);
+                r = make_backup("/etc/passwd", passwd_path);
+                if (r < 0)
+                        goto finish;
+        }
+        if (shadow) {
+                r = make_backup("/etc/shadow", shadow_path);
                 if (r < 0)
                         goto finish;
         }
 
         /* And make the new files count */
-        if (group && group_changed) {
-                if (rename(group_tmp, group_path) < 0) {
-                        r = -errno;
-                        goto finish;
+        if (group_changed) {
+                if (group) {
+                        if (rename(group_tmp, group_path) < 0) {
+                                r = -errno;
+                                goto finish;
+                        }
+
+                        free(group_tmp);
+                        group_tmp = NULL;
                 }
+                if (gshadow) {
+                        if (rename(gshadow_tmp, gshadow_path) < 0) {
+                                r = -errno;
+                                goto finish;
+                        }
 
-                free(group_tmp);
-                group_tmp = NULL;
+                        free(gshadow_tmp);
+                        gshadow_tmp = NULL;
+                }
         }
 
         if (passwd) {
@@ -495,14 +713,27 @@ static int write_files(void) {
                 free(passwd_tmp);
                 passwd_tmp = NULL;
         }
+        if (shadow) {
+                if (rename(shadow_tmp, shadow_path) < 0) {
+                        r = -errno;
+                        goto finish;
+                }
+
+                free(shadow_tmp);
+                shadow_tmp = NULL;
+        }
 
         r = 0;
 
 finish:
         if (passwd_tmp)
                 unlink(passwd_tmp);
+        if (shadow_tmp)
+                unlink(shadow_tmp);
         if (group_tmp)
                 unlink(group_tmp);
+        if (gshadow_tmp)
+                unlink(gshadow_tmp);
 
         return r;
 }
@@ -565,8 +796,8 @@ static int root_stat(const char *p, struct stat *st) {
 static int read_id_from_file(Item *i, uid_t *_uid, gid_t *_gid) {
         struct stat st;
         bool found_uid = false, found_gid = false;
-        uid_t uid;
-        gid_t gid;
+        uid_t uid = 0;
+        gid_t gid = 0;
 
         assert(i);
 
@@ -688,7 +919,7 @@ static int add_user(Item *i) {
 
                 if (read_id_from_file(i, &c, NULL) > 0) {
 
-                        if (c <= 0 || c > SYSTEM_UID_MAX)
+                        if (c <= 0 || !uid_range_contains(uid_range, n_uid_range, c))
                                 log_debug("User ID " UID_FMT " of file not suitable for %s.", c, i->name);
                         else {
                                 r = uid_is_ok(c, i->name);
@@ -719,7 +950,12 @@ static int add_user(Item *i) {
 
         /* And if that didn't work either, let's try to find a free one */
         if (!i->uid_set) {
-                for (; search_uid > 0; search_uid--) {
+                for (;;) {
+                        r = uid_range_next_lower(uid_range, n_uid_range, &search_uid);
+                        if (r < 0) {
+                                log_error("No free user ID available for %s.", i->name);
+                                return r;
+                        }
 
                         r = uid_is_ok(search_uid, i->name);
                         if (r < 0) {
@@ -729,18 +965,11 @@ static int add_user(Item *i) {
                                 break;
                 }
 
-                if (search_uid <= 0) {
-                        log_error("No free user ID available for %s.", i->name);
-                        return -E2BIG;
-                }
-
                 i->uid_set = true;
                 i->uid = search_uid;
-
-                search_uid--;
         }
 
-        r = hashmap_ensure_allocated(&todo_uids, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&todo_uids, NULL);
         if (r < 0)
                 return log_oom();
 
@@ -855,7 +1084,7 @@ static int add_group(Item *i) {
 
                 if (read_id_from_file(i, NULL, &c) > 0) {
 
-                        if (c <= 0 || c > SYSTEM_GID_MAX)
+                        if (c <= 0 || !uid_range_contains(uid_range, n_uid_range, c))
                                 log_debug("Group ID " GID_FMT " of file not suitable for %s.", c, i->name);
                         else {
                                 r = gid_is_ok(c);
@@ -873,8 +1102,15 @@ static int add_group(Item *i) {
 
         /* And if that didn't work either, let's try to find a free one */
         if (!i->gid_set) {
-                for (; search_gid > 0; search_gid--) {
-                        r = gid_is_ok(search_gid);
+                for (;;) {
+                        /* We look for new GIDs in the UID pool! */
+                        r = uid_range_next_lower(uid_range, n_uid_range, &search_uid);
+                        if (r < 0) {
+                                log_error("No free group ID available for %s.", i->name);
+                                return r;
+                        }
+
+                        r = gid_is_ok(search_uid);
                         if (r < 0) {
                                 log_error("Failed to verify gid " GID_FMT ": %s", i->gid, strerror(-r));
                                 return r;
@@ -882,18 +1118,11 @@ static int add_group(Item *i) {
                                 break;
                 }
 
-                if (search_gid <= 0) {
-                        log_error("No free group ID available for %s.", i->name);
-                        return -E2BIG;
-                }
-
                 i->gid_set = true;
-                i->gid = search_gid;
-
-                search_gid--;
+                i->gid = search_uid;
         }
 
-        r = hashmap_ensure_allocated(&todo_gids, trivial_hash_func, trivial_compare_func);
+        r = hashmap_ensure_allocated(&todo_gids, NULL);
         if (r < 0)
                 return log_oom();
 
@@ -981,7 +1210,7 @@ static int add_implicit(void) {
                 if (!i) {
                         _cleanup_(item_freep) Item *j = NULL;
 
-                        r = hashmap_ensure_allocated(&groups, string_hash_func, string_compare_func);
+                        r = hashmap_ensure_allocated(&groups, &string_hash_ops);
                         if (r < 0)
                                 return log_oom();
 
@@ -1008,7 +1237,7 @@ static int add_implicit(void) {
                         if (!i) {
                                 _cleanup_(item_freep) Item *j = NULL;
 
-                                r = hashmap_ensure_allocated(&users, string_hash_func, string_compare_func);
+                                r = hashmap_ensure_allocated(&users, &string_hash_ops);
                                 if (r < 0)
                                         return log_oom();
 
@@ -1065,6 +1294,9 @@ static bool item_equal(Item *a, Item *b) {
         if (a->gid_set && a->gid != b->gid)
                 return false;
 
+        if (!streq_ptr(a->home, b->home))
+                return false;
+
         return true;
 }
 
@@ -1072,7 +1304,7 @@ static bool valid_user_group_name(const char *u) {
         const char *i;
         long sz;
 
-        if (isempty(u) < 0)
+        if (isempty(u))
                 return false;
 
         if (!(u[0] >= 'a' && u[0] <= 'z') &&
@@ -1095,15 +1327,49 @@ static bool valid_user_group_name(const char *u) {
         if ((size_t) (i-u) > (size_t) sz)
                 return false;
 
+        if ((size_t) (i-u) > UT_NAMESIZE - 1)
+                return false;
+
         return true;
 }
 
 static bool valid_gecos(const char *d) {
 
+        if (!d)
+                return false;
+
         if (!utf8_is_valid(d))
                 return false;
 
-        if (strpbrk(d, ":\n"))
+        if (string_has_cc(d, NULL))
+                return false;
+
+        /* Colons are used as field separators, and hence not OK */
+        if (strchr(d, ':'))
+                return false;
+
+        return true;
+}
+
+static bool valid_home(const char *p) {
+
+        if (isempty(p))
+                return false;
+
+        if (!utf8_is_valid(p))
+                return false;
+
+        if (string_has_cc(p, NULL))
+                return false;
+
+        if (!path_is_absolute(p))
+                return false;
+
+        if (!path_is_safe(p))
+                return false;
+
+        /* Colons are used as field separators, and hence not OK */
+        if (strchr(p, ':'))
                 return false;
 
         return true;
@@ -1119,76 +1385,146 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                 {}
         };
 
-        _cleanup_free_ char *action = NULL, *name = NULL, *id = NULL, *resolved_name = NULL;
+        _cleanup_free_ char *action = NULL, *name = NULL, *id = NULL, *resolved_name = NULL, *resolved_id = NULL, *description = NULL, *home = NULL;
         _cleanup_(item_freep) Item *i = NULL;
         Item *existing;
         Hashmap *h;
-        int r, n = -1;
+        int r;
+        const char *p;
 
         assert(fname);
         assert(line >= 1);
         assert(buffer);
 
-        r = sscanf(buffer,
-                   "%ms %ms %ms %n",
-                   &action,
-                   &name,
-                   &id,
-                   &n);
-        if (r < 2) {
+        /* Parse columns */
+        p = buffer;
+        r = unquote_many_words(&p, &action, &name, &id, &description, &home, NULL);
+        if (r < 0) {
                 log_error("[%s:%u] Syntax error.", fname, line);
-                return -EIO;
+                return r;
+        }
+        if (r < 2) {
+                log_error("[%s:%u] Missing action and name columns.", fname, line);
+                return -EINVAL;
+        }
+        if (*p != 0) {
+                log_error("[%s:%u] Trailing garbage.", fname, line);
+                return -EINVAL;
         }
 
+        /* Verify action */
         if (strlen(action) != 1) {
                 log_error("[%s:%u] Unknown modifier '%s'", fname, line, action);
                 return -EINVAL;
         }
 
-        if (!IN_SET(action[0], ADD_USER, ADD_GROUP, ADD_MEMBER)) {
+        if (!IN_SET(action[0], ADD_USER, ADD_GROUP, ADD_MEMBER, ADD_RANGE)) {
                 log_error("[%s:%u] Unknown command command type '%c'.", fname, line, action[0]);
                 return -EBADMSG;
         }
 
-        r = specifier_printf(name, specifier_table, NULL, &resolved_name);
-        if (r < 0) {
-                log_error("[%s:%u] Failed to replace specifiers: %s", fname, line, name);
-                return r;
+        /* Verify name */
+        if (isempty(name) || streq(name, "-")) {
+                free(name);
+                name = NULL;
         }
 
-        if (!valid_user_group_name(resolved_name)) {
-                log_error("[%s:%u] '%s' is not a valid user or group name.", fname, line, resolved_name);
-                return -EINVAL;
+        if (name) {
+                r = specifier_printf(name, specifier_table, NULL, &resolved_name);
+                if (r < 0) {
+                        log_error("[%s:%u] Failed to replace specifiers: %s", fname, line, name);
+                        return r;
+                }
+
+                if (!valid_user_group_name(resolved_name)) {
+                        log_error("[%s:%u] '%s' is not a valid user or group name.", fname, line, resolved_name);
+                        return -EINVAL;
+                }
         }
 
-        if (n >= 0) {
-                n += strspn(buffer+n, WHITESPACE);
+        /* Verify id */
+        if (isempty(id) || streq(id, "-")) {
+                free(id);
+                id = NULL;
+        }
 
-                if (STR_IN_SET(buffer + n, "", "-"))
-                        n = -1;
+        if (id) {
+                r = specifier_printf(id, specifier_table, NULL, &resolved_id);
+                if (r < 0) {
+                        log_error("[%s:%u] Failed to replace specifiers: %s", fname, line, name);
+                        return r;
+                }
+        }
+
+        /* Verify description */
+        if (isempty(description) || streq(description, "-")) {
+                free(description);
+                description = NULL;
+        }
+
+        if (description) {
+                if (!valid_gecos(description)) {
+                        log_error("[%s:%u] '%s' is not a valid GECOS field.", fname, line, description);
+                        return -EINVAL;
+                }
+        }
+
+        /* Verify home */
+        if (isempty(home) || streq(home, "-")) {
+                free(home);
+                home = NULL;
+        }
+
+        if (home) {
+                if (!valid_home(home)) {
+                        log_error("[%s:%u] '%s' is not a valid home directory field.", fname, line, home);
+                        return -EINVAL;
+                }
         }
 
         switch (action[0]) {
 
-        case ADD_MEMBER: {
-                _cleanup_free_ char *resolved_id = NULL;
-                char **l;
+        case ADD_RANGE:
+                if (resolved_name) {
+                        log_error("[%s:%u] Lines of type 'r' don't take a name field.", fname, line);
+                        return -EINVAL;
+                }
 
-                r = hashmap_ensure_allocated(&members, string_hash_func, string_compare_func);
-                if (r < 0)
-                        return log_oom();
+                if (!resolved_id) {
+                        log_error("[%s:%u] Lines of type 'r' require a ID range in the third field.", fname, line);
+                        return -EINVAL;
+                }
 
-                /* Try to extend an existing member or group item */
+                if (description) {
+                        log_error("[%s:%u] Lines of type 'r' don't take a GECOS field.", fname, line);
+                        return -EINVAL;
+                }
 
-                if (!id || streq(id, "-")) {
-                        log_error("[%s:%u] Lines of type 'm' require a group name in the third field.", fname, line);
+                if (home) {
+                        log_error("[%s:%u] Lines of type 'r' don't take a home directory field.", fname, line);
                         return -EINVAL;
                 }
 
-                r = specifier_printf(id, specifier_table, NULL, &resolved_id);
+                r = uid_range_add_str(&uid_range, &n_uid_range, resolved_id);
                 if (r < 0) {
-                        log_error("[%s:%u] Failed to replace specifiers: %s", fname, line, name);
-                        return r;
+                        log_error("[%s:%u] Invalid UID range %s.", fname, line, resolved_id);
+                        return -EINVAL;
+                }
+
+                return 0;
+
+        case ADD_MEMBER: {
+                char **l;
+
+                /* Try to extend an existing member or group item */
+                if (!name) {
+                        log_error("[%s:%u] Lines of type 'm' require a user name in the second field.", fname, line);
+                        return -EINVAL;
+                }
+
+                if (!resolved_id) {
+                        log_error("[%s:%u] Lines of type 'm' require a group name in the third field.", fname, line);
+                        return -EINVAL;
                 }
 
                 if (!valid_user_group_name(resolved_id)) {
@@ -1196,11 +1532,20 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                         return -EINVAL;
                 }
 
-                if (n >= 0) {
+                if (description) {
                         log_error("[%s:%u] Lines of type 'm' don't take a GECOS field.", fname, line);
                         return -EINVAL;
                 }
 
+                if (home) {
+                        log_error("[%s:%u] Lines of type 'm' don't take a home directory field.", fname, line);
+                        return -EINVAL;
+                }
+
+                r = hashmap_ensure_allocated(&members, &string_hash_ops);
+                if (r < 0)
+                        return log_oom();
+
                 l = hashmap_get(members, resolved_id);
                 if (l) {
                         /* A list for this group name already exists, let's append to it */
@@ -1234,7 +1579,12 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
         }
 
         case ADD_USER:
-                r = hashmap_ensure_allocated(&users, string_hash_func, string_compare_func);
+                if (!name) {
+                        log_error("[%s:%u] Lines of type 'u' require a user name in the second field.", fname, line);
+                        return -EINVAL;
+                }
+
+                r = hashmap_ensure_allocated(&users, &string_hash_ops);
                 if (r < 0)
                         return log_oom();
 
@@ -1242,17 +1592,14 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                 if (!i)
                         return log_oom();
 
-                if (id && !streq(id, "-")) {
-
-                        if (path_is_absolute(id)) {
-                                i->uid_path = strdup(id);
-                                if (!i->uid_path)
-                                        return log_oom();
+                if (resolved_id) {
+                        if (path_is_absolute(resolved_id)) {
+                                i->uid_path = resolved_id;
+                                resolved_id = NULL;
 
                                 path_kill_slashes(i->uid_path);
-
                         } else {
-                                r = parse_uid(id, &i->uid);
+                                r = parse_uid(resolved_id, &i->uid);
                                 if (r < 0) {
                                         log_error("Failed to parse UID: %s", id);
                                         return -EBADMSG;
@@ -1262,44 +1609,47 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                         }
                 }
 
-                if (n >= 0) {
-                        i->description = unquote(buffer+n, "\"");
-                        if (!i->description)
-                                return log_oom();
+                i->description = description;
+                description = NULL;
 
-                        if (!valid_gecos(i->description)) {
-                                log_error("[%s:%u] '%s' is not a valid GECOS field.", fname, line, i->description);
-                                return -EINVAL;
-                        }
-                }
+                i->home = home;
+                home = NULL;
 
                 h = users;
                 break;
 
         case ADD_GROUP:
-                r = hashmap_ensure_allocated(&groups, string_hash_func, string_compare_func);
-                if (r < 0)
-                        return log_oom();
+                if (!name) {
+                        log_error("[%s:%u] Lines of type 'g' require a user name in the second field.", fname, line);
+                        return -EINVAL;
+                }
 
-                if (n >= 0) {
+                if (description) {
                         log_error("[%s:%u] Lines of type 'g' don't take a GECOS field.", fname, line);
                         return -EINVAL;
                 }
 
+                if (home) {
+                        log_error("[%s:%u] Lines of type 'g' don't take a home directory field.", fname, line);
+                        return -EINVAL;
+                }
+
+                r = hashmap_ensure_allocated(&groups, &string_hash_ops);
+                if (r < 0)
+                        return log_oom();
+
                 i = new0(Item, 1);
                 if (!i)
                         return log_oom();
 
-                if (id && !streq(id, "-")) {
-
-                        if (path_is_absolute(id)) {
-                                i->gid_path = strdup(id);
-                                if (!i->gid_path)
-                                        return log_oom();
+                if (resolved_id) {
+                        if (path_is_absolute(resolved_id)) {
+                                i->gid_path = resolved_id;
+                                resolved_id = NULL;
 
                                 path_kill_slashes(i->gid_path);
                         } else {
-                                r = parse_gid(id, &i->gid);
+                                r = parse_gid(resolved_id, &i->gid);
                                 if (r < 0) {
                                         log_error("Failed to parse GID: %s", id);
                                         return -EBADMSG;
@@ -1309,9 +1659,11 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                         }
                 }
 
-
                 h = groups;
                 break;
+
+        default:
+                return -EBADMSG;
         }
 
         i->type = action[0];
@@ -1337,20 +1689,27 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
 }
 
 static int read_config_file(const char *fn, bool ignore_enoent) {
-        _cleanup_fclose_ FILE *f = NULL;
+        _cleanup_fclose_ FILE *rf = NULL;
+        FILE *f = NULL;
         char line[LINE_MAX];
         unsigned v = 0;
-        int r;
+        int r = 0;
 
         assert(fn);
 
-        r = search_and_fopen_nulstr(fn, "re", arg_root, conf_file_dirs, &f);
-        if (r < 0) {
-                if (ignore_enoent && r == -ENOENT)
-                        return 0;
+        if (streq(fn, "-"))
+                f = stdin;
+        else {
+                r = search_and_fopen_nulstr(fn, "re", arg_root, conf_file_dirs, &rf);
+                if (r < 0) {
+                        if (ignore_enoent && r == -ENOENT)
+                                return 0;
 
-                log_error("Failed to open '%s', ignoring: %s", fn, strerror(-r));
-                return r;
+                        log_error("Failed to open '%s', ignoring: %s", fn, strerror(-r));
+                        return r;
+                }
+
+                f = rf;
         }
 
         FOREACH_LINE(line, f, break) {
@@ -1377,42 +1736,6 @@ static int read_config_file(const char *fn, bool ignore_enoent) {
         return r;
 }
 
-static int take_lock(void) {
-
-        struct flock flock = {
-                .l_type = F_WRLCK,
-                .l_whence = SEEK_SET,
-                .l_start = 0,
-                .l_len = 0,
-        };
-
-        const char *path;
-        int fd, r;
-
-        /* This is roughly the same as lckpwdf(), but not as awful. We
-         * don't want to use alarm() and signals, hence we implement
-         * our own trivial version of this.
-         *
-         * Note that shadow-utils also takes per-database locks in
-         * addition to lckpwdf(). However, we don't given that they
-         * are redundant as they they invoke lckpwdf() first and keep
-         * it during everything they do. The per-database locks are
-         * awfully racy, and thus we just won't do them. */
-
-        path = fix_root("/etc/.pwd.lock");
-        fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0600);
-        if (fd < 0)
-                return -errno;
-
-        r = fcntl(fd, F_SETLKW, &flock);
-        if (r < 0) {
-                safe_close(fd);
-                return -errno;
-        }
-
-        return fd;
-}
-
 static void free_database(Hashmap *by_name, Hashmap *by_id) {
         char *name;
 
@@ -1434,16 +1757,13 @@ static void free_database(Hashmap *by_name, Hashmap *by_id) {
         hashmap_free(by_id);
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n"
                "Creates system user accounts.\n\n"
                "  -h --help                 Show this help\n"
                "     --version              Show package version\n"
-               "     --root=PATH            Operate on an alternate filesystem root\n",
-               program_invocation_short_name);
-
-        return 0;
+               "     --root=PATH            Operate on an alternate filesystem root\n"
+               , program_invocation_short_name);
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -1465,12 +1785,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -1492,7 +1813,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -1515,7 +1835,11 @@ int main(int argc, char *argv[]) {
 
         umask(0022);
 
-        r = 0;
+        r = mac_selinux_init(NULL);
+        if (r < 0) {
+                log_error("SELinux setup failed: %s", strerror(-r));
+                goto finish;
+        }
 
         if (optind < argc) {
                 int j;
@@ -1542,11 +1866,20 @@ int main(int argc, char *argv[]) {
                 }
         }
 
+        if (!uid_range) {
+                /* Default to default range of 1..SYSTEMD_UID_MAX */
+                r = uid_range_add(&uid_range, &n_uid_range, 1, SYSTEM_UID_MAX);
+                if (r < 0) {
+                        log_oom();
+                        goto finish;
+                }
+        }
+
         r = add_implicit();
         if (r < 0)
                 goto finish;
 
-        lock = take_lock();
+        lock = take_password_lock(arg_root);
         if (lock < 0) {
                 log_error("Failed to take lock: %s", strerror(-lock));
                 goto finish;
index 52062793844ae192ebe6e8bbe56dc6b18a915a33..6e4cdd694e5a877957d8e7bb980e531eea861ab0 100644 (file)
@@ -31,7 +31,6 @@
 #include "path-util.h"
 #include "path-lookup.h"
 #include "log.h"
-#include "strv.h"
 #include "unit.h"
 #include "unit-name.h"
 #include "special.h"
@@ -114,9 +113,9 @@ static int add_symlink(const char *service, const char *where) {
 }
 
 static int generate_unit_file(SysvStub *s) {
-        char *unit;
         char **p;
         _cleanup_fclose_ FILE *f = NULL;
+        _cleanup_free_ char *unit = NULL;
         _cleanup_free_ char *before = NULL;
         _cleanup_free_ char *after = NULL;
         _cleanup_free_ char *wants = NULL;
@@ -442,15 +441,15 @@ static int load_sysv(SysvStub *s) {
                 } else if (state == LSB || state == LSB_DESCRIPTION) {
 
                         if (startswith_no_case(t, "Provides:")) {
-                                char *i, *w;
+                                const char *word, *state_;
                                 size_t z;
 
                                 state = LSB;
 
-                                FOREACH_WORD_QUOTED(w, z, t+9, i) {
+                                FOREACH_WORD_QUOTED(word, z, t+9, state_) {
                                         _cleanup_free_ char *n = NULL, *m = NULL;
 
-                                        n = strndup(w, z);
+                                        n = strndup(word, z);
                                         if (!n)
                                                 return -ENOMEM;
 
@@ -482,6 +481,11 @@ static int load_sysv(SysvStub *s) {
                                                 r = strv_extend(&s->wants, m);
                                                 if (r < 0)
                                                         return log_oom();
+                                                if (streq(m, SPECIAL_NETWORK_ONLINE_TARGET)) {
+                                                        r = strv_extend(&s->before, SPECIAL_NETWORK_TARGET);
+                                                        if (r < 0)
+                                                                return log_oom();
+                                                }
                                         }
 
                                         if (r < 0)
@@ -489,21 +493,25 @@ static int load_sysv(SysvStub *s) {
                                                                "[%s:%u] Failed to add LSB Provides name %s, ignoring: %s",
                                                                s->path, line, m, strerror(-r));
                                 }
+                                if (!isempty(state_))
+                                        log_error_unit(s->name,
+                                                       "[%s:%u] Trailing garbage in Provides, ignoring.",
+                                                       s->path, line);
 
                         } else if (startswith_no_case(t, "Required-Start:") ||
                                    startswith_no_case(t, "Should-Start:") ||
                                    startswith_no_case(t, "X-Start-Before:") ||
                                    startswith_no_case(t, "X-Start-After:")) {
-                                char *i, *w;
+                                const char *word, *state_;
                                 size_t z;
 
                                 state = LSB;
 
-                                FOREACH_WORD_QUOTED(w, z, strchr(t, ':')+1, i) {
+                                FOREACH_WORD_QUOTED(word, z, strchr(t, ':')+1, state_) {
                                         _cleanup_free_ char *n = NULL, *m = NULL;
                                         bool is_before;
 
-                                        n = strndup(w, z);
+                                        n = strndup(word, z);
                                         if (!n)
                                                 return -ENOMEM;
 
@@ -547,6 +555,11 @@ static int load_sysv(SysvStub *s) {
                                                                "[%s:%u] Failed to add dependency on %s, ignoring: %s",
                                                                s->path, line, m, strerror(-r));
                                 }
+                                if (!isempty(state_))
+                                        log_error_unit(s->name,
+                                                       "[%s:%u] Trailing garbage in %*s, ignoring.",
+                                                       s->path, line,
+                                                       (int)(strchr(t, ':') - t), t);
 
                         } else if (startswith_no_case(t, "Description:")) {
                                 char *d, *j;
@@ -796,9 +809,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
                                         goto finish;
                                 }
 
-                                if (hashmap_contains(all_services, name))
-                                        service = hashmap_get(all_services, name);
-                                else {
+                                service = hashmap_get(all_services, name);
+                                if (!service){
                                         log_warning("Could not find init script for %s", name);
                                         continue;
                                 }
@@ -810,8 +822,7 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
                                                         MAX(a*10 + b, service->sysv_start_priority);
                                         }
 
-                                        r = set_ensure_allocated(&runlevel_services[i],
-                                                                 trivial_hash_func, trivial_compare_func);
+                                        r = set_ensure_allocated(&runlevel_services[i], NULL);
                                         if (r < 0)
                                                 goto finish;
 
@@ -822,8 +833,7 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
                                 } else if (de->d_name[0] == 'K' &&
                                            (rcnd_table[i].type == RUNLEVEL_DOWN)) {
 
-                                        r = set_ensure_allocated(&shutdown_services,
-                                                                 trivial_hash_func, trivial_compare_func);
+                                        r = set_ensure_allocated(&shutdown_services, NULL);
                                         if (r < 0)
                                                 goto finish;
 
@@ -891,7 +901,7 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        all_services = hashmap_new(string_hash_func, string_compare_func);
+        all_services = hashmap_new(&string_hash_ops);
         if (!all_services) {
                 log_oom();
                 return EXIT_FAILURE;
index c1c535b45dfbf677e3ac1b7dd5723914146edd26..401e68551e101904dae92fd23d88bb13d3da3581 100644 (file)
@@ -46,5 +46,7 @@ int main(int argc, char *argv[]) {
         assert_se(fcntl(fd, F_GETFD) == -1);
         assert_se(test_async);
 
+        unlink(name);
+
         return 0;
 }
diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c
new file mode 100644 (file)
index 0000000..cb75f73
--- /dev/null
@@ -0,0 +1,465 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+/*
+ * IPC barrier tests
+ * These tests verify the correct behavior of the IPC Barrier implementation.
+ * Note that the tests use alarm-timers to verify dead-locks and timeouts. These
+ * might not work on slow machines where 20ms are too short to perform specific
+ * operations (though, very unlikely). In case that turns out true, we have to
+ * increase it at the slightly cost of lengthen test-duration on other machines.
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include "barrier.h"
+#include "def.h"
+#include "util.h"
+
+/* 20ms to test deadlocks; All timings use multiples of this constant as
+ * alarm/sleep timers. If this timeout is too small for slow machines to perform
+ * the requested operations, we have to increase it. On an i7 this works fine
+ * with 1ms base-time, so 20ms should be just fine for everyone. */
+#define BASE_TIME (20 * USEC_PER_MSEC)
+
+static void set_alarm(usec_t usecs) {
+        struct itimerval v = { };
+
+        timeval_store(&v.it_value, usecs);
+        assert_se(setitimer(ITIMER_REAL, &v, NULL) >= 0);
+}
+
+static void sleep_for(usec_t usecs) {
+        /* stupid usleep() might fail if >1000000 */
+        assert_se(usecs < USEC_PER_SEC);
+        usleep(usecs);
+}
+
+#define TEST_BARRIER(_FUNCTION, _CHILD_CODE, _WAIT_CHILD, _PARENT_CODE, _WAIT_PARENT)  \
+        static void _FUNCTION(void) {                                   \
+                Barrier b = BARRIER_NULL;                               \
+                pid_t pid1, pid2;                                       \
+                                                                        \
+                assert_se(barrier_create(&b) >= 0);                     \
+                assert_se(b.me > 0);                                    \
+                assert_se(b.them > 0);                                  \
+                assert_se(b.pipe[0] > 0);                               \
+                assert_se(b.pipe[1] > 0);                               \
+                                                                        \
+                pid1 = fork();                                          \
+                assert_se(pid1 >= 0);                                   \
+                if (pid1 == 0) {                                        \
+                        barrier_set_role(&b, BARRIER_CHILD);            \
+                        { _CHILD_CODE; }                                \
+                        exit(42);                                       \
+                }                                                       \
+                                                                        \
+                pid2 = fork();                                          \
+                assert_se(pid2 >= 0);                                   \
+                if (pid2 == 0) {                                        \
+                        barrier_set_role(&b, BARRIER_PARENT);           \
+                        { _PARENT_CODE; }                               \
+                        exit(42);                                       \
+                }                                                       \
+                                                                        \
+                barrier_destroy(&b);                                    \
+                set_alarm(999999);                                      \
+                { _WAIT_CHILD; }                                        \
+                { _WAIT_PARENT; }                                       \
+                set_alarm(0);                                           \
+        }
+
+#define TEST_BARRIER_WAIT_SUCCESS(_pid) \
+                ({                                                      \
+                        int pidr, status;                               \
+                        pidr = waitpid(_pid, &status, 0);               \
+                        assert_se(pidr == _pid);                        \
+                        assert_se(WIFEXITED(status));                   \
+                        assert_se(WEXITSTATUS(status) == 42);           \
+                })
+
+#define TEST_BARRIER_WAIT_ALARM(_pid) \
+                ({                                                      \
+                        int pidr, status;                               \
+                        pidr = waitpid(_pid, &status, 0);               \
+                        assert_se(pidr == _pid);                        \
+                        assert_se(WIFSIGNALED(status));                 \
+                        assert_se(WTERMSIG(status) == SIGALRM);         \
+                })
+
+/*
+ * Test basic sync points
+ * This places a barrier in both processes and waits synchronously for them.
+ * The timeout makes sure the sync works as expected. The sleep_for() on one side
+ * makes sure the exit of the parent does not overwrite previous barriers. Due
+ * to the sleep_for(), we know that the parent already exited, thus there's a
+ * pending HUP on the pipe. However, the barrier_sync() prefers reads on the
+ * eventfd, thus we can safely wait on the barrier.
+ */
+TEST_BARRIER(test_barrier_sync,
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                sleep_for(BASE_TIME * 2);
+                assert_se(barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test wait_next()
+ * This places a barrier in the parent and syncs on it. The child sleeps while
+ * the parent places the barrier and then waits for a barrier. The wait will
+ * succeed as the child hasn't read the parent's barrier, yet. The following
+ * barrier and sync synchronize the exit.
+ */
+TEST_BARRIER(test_barrier_wait_next,
+        ({
+                sleep_for(BASE_TIME);
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_wait_next(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                set_alarm(BASE_TIME * 4);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test wait_next() multiple times
+ * This places two barriers in the parent and waits for the child to exit. The
+ * child sleeps 20ms so both barriers _should_ be in place. It then waits for
+ * the parent to place the next barrier twice. The first call will fetch both
+ * barriers and return. However, the second call will stall as the parent does
+ * not place a 3rd barrier (the sleep caught two barriers). wait_next() is does
+ * not look at barrier-links so this stall is expected. Thus this test times
+ * out.
+ */
+TEST_BARRIER(test_barrier_wait_next_twice,
+        ({
+                sleep_for(BASE_TIME);
+                set_alarm(BASE_TIME);
+                assert_se(barrier_wait_next(&b));
+                assert_se(barrier_wait_next(&b));
+                assert_se(0);
+        }),
+        TEST_BARRIER_WAIT_ALARM(pid1),
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+                sleep_for(BASE_TIME * 4);
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test wait_next() with local barriers
+ * This is the same as test_barrier_wait_next_twice, but places local barriers
+ * between both waits. This does not have any effect on the wait so it times out
+ * like the other test.
+ */
+TEST_BARRIER(test_barrier_wait_next_twice_local,
+        ({
+                sleep_for(BASE_TIME);
+                set_alarm(BASE_TIME);
+                assert_se(barrier_wait_next(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_wait_next(&b));
+                assert_se(0);
+        }),
+        TEST_BARRIER_WAIT_ALARM(pid1),
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+                sleep_for(BASE_TIME * 4);
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test wait_next() with sync_next()
+ * This is again the same as test_barrier_wait_next_twice but uses a
+ * synced wait as the second wait. This works just fine because the local state
+ * has no barriers placed, therefore, the remote is always in sync.
+ */
+TEST_BARRIER(test_barrier_wait_next_twice_sync,
+        ({
+                sleep_for(BASE_TIME);
+                set_alarm(BASE_TIME);
+                assert_se(barrier_wait_next(&b));
+                assert_se(barrier_sync_next(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test wait_next() with sync_next() and local barriers
+ * This is again the same as test_barrier_wait_next_twice_local but uses a
+ * synced wait as the second wait. This works just fine because the local state
+ * is in sync with the remote.
+ */
+TEST_BARRIER(test_barrier_wait_next_twice_local_sync,
+        ({
+                sleep_for(BASE_TIME);
+                set_alarm(BASE_TIME);
+                assert_se(barrier_wait_next(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync_next(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test sync_next() and sync()
+ * This tests sync_*() synchronizations and makes sure they work fine if the
+ * local state is behind the remote state.
+ */
+TEST_BARRIER(test_barrier_sync_next,
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_sync_next(&b));
+                assert_se(barrier_sync(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync_next(&b));
+                assert_se(barrier_sync_next(&b));
+                assert_se(barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                set_alarm(BASE_TIME * 10);
+                sleep_for(BASE_TIME);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test sync_next() and sync() with local barriers
+ * This tests timeouts if sync_*() is used if local barriers are placed but the
+ * remote didn't place any.
+ */
+TEST_BARRIER(test_barrier_sync_next_local,
+        ({
+                set_alarm(BASE_TIME);
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync_next(&b));
+                assert_se(0);
+        }),
+        TEST_BARRIER_WAIT_ALARM(pid1),
+        ({
+                sleep_for(BASE_TIME * 2);
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test sync_next() and sync() with local barriers and abortion
+ * This is the same as test_barrier_sync_next_local but aborts the sync in the
+ * parent. Therefore, the sync_next() succeeds just fine due to the abortion.
+ */
+TEST_BARRIER(test_barrier_sync_next_local_abort,
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                assert_se(!barrier_sync_next(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                assert_se(barrier_abort(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test matched wait_abortion()
+ * This runs wait_abortion() with remote abortion.
+ */
+TEST_BARRIER(test_barrier_wait_abortion,
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_wait_abortion(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                assert_se(barrier_abort(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test unmatched wait_abortion()
+ * This runs wait_abortion() without any remote abortion going on. It thus must
+ * timeout.
+ */
+TEST_BARRIER(test_barrier_wait_abortion_unmatched,
+        ({
+                set_alarm(BASE_TIME);
+                assert_se(barrier_wait_abortion(&b));
+                assert_se(0);
+        }),
+        TEST_BARRIER_WAIT_ALARM(pid1),
+        ({
+                sleep_for(BASE_TIME * 2);
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test matched wait_abortion() with local abortion
+ * This runs wait_abortion() with local and remote abortion.
+ */
+TEST_BARRIER(test_barrier_wait_abortion_local,
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_abort(&b));
+                assert_se(!barrier_wait_abortion(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                assert_se(barrier_abort(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test unmatched wait_abortion() with local abortion
+ * This runs wait_abortion() with only local abortion. This must time out.
+ */
+TEST_BARRIER(test_barrier_wait_abortion_local_unmatched,
+        ({
+                set_alarm(BASE_TIME);
+                assert_se(barrier_abort(&b));
+                assert_se(!barrier_wait_abortion(&b));
+                assert_se(0);
+        }),
+        TEST_BARRIER_WAIT_ALARM(pid1),
+        ({
+                sleep_for(BASE_TIME * 2);
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test child exit
+ * Place barrier and sync with the child. The child only exits()s, which should
+ * cause an implicit abortion and wake the parent.
+ */
+TEST_BARRIER(test_barrier_exit,
+        ({
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                set_alarm(BASE_TIME * 10);
+                assert_se(barrier_place(&b));
+                assert_se(!barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+/*
+ * Test child exit with sleep
+ * Same as test_barrier_exit but verifies the test really works due to the
+ * child-exit. We add a usleep() which triggers the alarm in the parent and
+ * causes the test to time out.
+ */
+TEST_BARRIER(test_barrier_no_exit,
+        ({
+                sleep_for(BASE_TIME * 2);
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                set_alarm(BASE_TIME);
+                assert_se(barrier_place(&b));
+                assert_se(!barrier_sync(&b));
+        }),
+        TEST_BARRIER_WAIT_ALARM(pid2));
+
+/*
+ * Test pending exit against sync
+ * The parent places a barrier *and* exits. The 20ms wait in the child
+ * guarantees both are pending. However, our logic prefers pending barriers over
+ * pending exit-abortions (unlike normal abortions), thus the wait_next() must
+ * succeed, same for the sync_next() as our local barrier-count is smaller than
+ * the remote. Once we place a barrier our count is equal, so the sync still
+ * succeeds. Only if we place one more barrier, we're ahead of the remote, thus
+ * we will fail due to HUP on the pipe.
+ */
+TEST_BARRIER(test_barrier_pending_exit,
+        ({
+                set_alarm(BASE_TIME * 4);
+                sleep_for(BASE_TIME * 2);
+                assert_se(barrier_wait_next(&b));
+                assert_se(barrier_sync_next(&b));
+                assert_se(barrier_place(&b));
+                assert_se(barrier_sync_next(&b));
+                assert_se(barrier_place(&b));
+                assert_se(!barrier_sync_next(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid1),
+        ({
+                assert_se(barrier_place(&b));
+        }),
+        TEST_BARRIER_WAIT_SUCCESS(pid2));
+
+int main(int argc, char *argv[]) {
+        log_parse_environment();
+        log_open();
+
+        test_barrier_sync();
+        test_barrier_wait_next();
+        test_barrier_wait_next_twice();
+        test_barrier_wait_next_twice_sync();
+        test_barrier_wait_next_twice_local();
+        test_barrier_wait_next_twice_local_sync();
+        test_barrier_sync_next();
+        test_barrier_sync_next_local();
+        test_barrier_sync_next_local_abort();
+        test_barrier_wait_abortion();
+        test_barrier_wait_abortion_unmatched();
+        test_barrier_wait_abortion_local();
+        test_barrier_wait_abortion_local_unmatched();
+        test_barrier_exit();
+        test_barrier_no_exit();
+        test_barrier_pending_exit();
+
+        return 0;
+}
index 21b002438871215daa23b054775f0e98d562d7ba..87e1da1258a703444a0988e48d3c875d91e7ac0f 100644 (file)
@@ -77,6 +77,10 @@ int main(int argc, char* argv[]) {
         test_one("daily", "*-*-* 00:00:00");
         test_one("monthly", "*-*-01 00:00:00");
         test_one("weekly", "Mon *-*-* 00:00:00");
+        test_one("minutely", "*-*-* *:*:00");
+        test_one("quarterly", "*-01,04,07,10-01 00:00:00");
+        test_one("semi-annually", "*-01,07-01 00:00:00");
+        test_one("annually", "*-01-01 00:00:00");
         test_one("*:2/3", "*-*-* *:02/3:00");
 
         assert_se(calendar_spec_from_string("test", &c) < 0);
index 4d60859513b774a660bcd83d35ab66ee9275d100..9e9de23e0eec3c887134a8bf8f28e1100fe07ab3 100644 (file)
@@ -37,16 +37,15 @@ static int test_cgroup_mask(void) {
         FILE *serial = NULL;
         FDSet *fdset = NULL;
         int r;
-        const char *dir = TEST_DIR;
 
         /* Prepare the manager. */
-        assert_se(set_unit_path(dir) >= 0);
-        r = manager_new(SYSTEMD_USER, &m);
+        assert_se(set_unit_path(TEST_DIR) >= 0);
+        r = manager_new(SYSTEMD_USER, true, &m);
         if (r == -EPERM || r == -EACCES) {
                 puts("manager_new: Permission denied. Skipping test.");
                 return EXIT_TEST_SKIP;
         }
-        assert(r >= 0);
+        assert_se(r >= 0);
         assert_se(manager_startup(m, serial, fdset) >= 0);
 
         /* Load units and verify hierarchy. */
@@ -55,48 +54,48 @@ static int test_cgroup_mask(void) {
         assert_se(manager_load_unit(m, "daughter.service", NULL, NULL, &daughter) >= 0);
         assert_se(manager_load_unit(m, "grandchild.service", NULL, NULL, &grandchild) >= 0);
         assert_se(manager_load_unit(m, "parent-deep.slice", NULL, NULL, &parent_deep) >= 0);
-        assert(parent->load_state == UNIT_LOADED);
-        assert(son->load_state == UNIT_LOADED);
-        assert(daughter->load_state == UNIT_LOADED);
-        assert(grandchild->load_state == UNIT_LOADED);
-        assert(parent_deep->load_state == UNIT_LOADED);
-        assert(UNIT_DEREF(son->slice) == parent);
-        assert(UNIT_DEREF(daughter->slice) == parent);
-        assert(UNIT_DEREF(parent_deep->slice) == parent);
-        assert(UNIT_DEREF(grandchild->slice) == parent_deep);
+        assert_se(parent->load_state == UNIT_LOADED);
+        assert_se(son->load_state == UNIT_LOADED);
+        assert_se(daughter->load_state == UNIT_LOADED);
+        assert_se(grandchild->load_state == UNIT_LOADED);
+        assert_se(parent_deep->load_state == UNIT_LOADED);
+        assert_se(UNIT_DEREF(son->slice) == parent);
+        assert_se(UNIT_DEREF(daughter->slice) == parent);
+        assert_se(UNIT_DEREF(parent_deep->slice) == parent);
+        assert_se(UNIT_DEREF(grandchild->slice) == parent_deep);
         root = UNIT_DEREF(parent->slice);
 
         /* Verify per-unit cgroups settings. */
-        assert(unit_get_cgroup_mask(son) == (CGROUP_CPU | CGROUP_CPUACCT));
-        assert(unit_get_cgroup_mask(daughter) == 0);
-        assert(unit_get_cgroup_mask(grandchild) == 0);
-        assert(unit_get_cgroup_mask(parent_deep) == CGROUP_MEMORY);
-        assert(unit_get_cgroup_mask(parent) == CGROUP_BLKIO);
-        assert(unit_get_cgroup_mask(root) == 0);
+        assert_se(unit_get_cgroup_mask(son) == (CGROUP_CPU | CGROUP_CPUACCT));
+        assert_se(unit_get_cgroup_mask(daughter) == 0);
+        assert_se(unit_get_cgroup_mask(grandchild) == 0);
+        assert_se(unit_get_cgroup_mask(parent_deep) == CGROUP_MEMORY);
+        assert_se(unit_get_cgroup_mask(parent) == CGROUP_BLKIO);
+        assert_se(unit_get_cgroup_mask(root) == 0);
 
         /* Verify aggregation of member masks */
-        assert(unit_get_members_mask(son) == 0);
-        assert(unit_get_members_mask(daughter) == 0);
-        assert(unit_get_members_mask(grandchild) == 0);
-        assert(unit_get_members_mask(parent_deep) == 0);
-        assert(unit_get_members_mask(parent) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY));
-        assert(unit_get_members_mask(root) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY));
+        assert_se(unit_get_members_mask(son) == 0);
+        assert_se(unit_get_members_mask(daughter) == 0);
+        assert_se(unit_get_members_mask(grandchild) == 0);
+        assert_se(unit_get_members_mask(parent_deep) == 0);
+        assert_se(unit_get_members_mask(parent) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY));
+        assert_se(unit_get_members_mask(root) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY));
 
         /* Verify aggregation of sibling masks. */
-        assert(unit_get_siblings_mask(son) == (CGROUP_CPU | CGROUP_CPUACCT));
-        assert(unit_get_siblings_mask(daughter) == (CGROUP_CPU | CGROUP_CPUACCT));
-        assert(unit_get_siblings_mask(grandchild) == 0);
-        assert(unit_get_siblings_mask(parent_deep) == (CGROUP_CPU | CGROUP_CPUACCT));
-        assert(unit_get_siblings_mask(parent) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO));
-        assert(unit_get_siblings_mask(root) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO));
+        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(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));
 
         /* Verify aggregation of target masks. */
-        assert(unit_get_target_mask(son) == (CGROUP_CPU | CGROUP_CPUACCT));
-        assert(unit_get_target_mask(daughter) == (CGROUP_CPU | CGROUP_CPUACCT));
-        assert(unit_get_target_mask(grandchild) == 0);
-        assert(unit_get_target_mask(parent_deep) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY));
-        assert(unit_get_target_mask(parent) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY));
-        assert(unit_get_target_mask(root) == (CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY));
+        assert_se(unit_get_target_mask(son) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY) & m->cgroup_supported));
+        assert_se(unit_get_target_mask(daughter) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY) & m->cgroup_supported));
+        assert_se(unit_get_target_mask(grandchild) == 0);
+        assert_se(unit_get_target_mask(parent_deep) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_MEMORY) & m->cgroup_supported));
+        assert_se(unit_get_target_mask(parent) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY) & m->cgroup_supported));
+        assert_se(unit_get_target_mask(root) == ((CGROUP_CPU | CGROUP_CPUACCT | CGROUP_BLKIO | CGROUP_MEMORY) & m->cgroup_supported));
 
         manager_free(m);
 
index fda8bcc5c5f023641074daa18e15f7769c0bb836..68c526ae82385109eced8c71fd3cac55778692ca 100644 (file)
@@ -106,7 +106,8 @@ static void check_p_g_s(const char *path, int code, const char *result) {
 static void test_path_get_session(void) {
         check_p_g_s("/user.slice/user-1000.slice/session-2.scope/foobar.service", 0, "2");
         check_p_g_s("/session-3.scope", 0, "3");
-        check_p_g_s("", -ENOENT, 0);
+        check_p_g_s("/session-.scope", -ENOENT, NULL);
+        check_p_g_s("", -ENOENT, NULL);
 }
 
 static void check_p_g_o_u(const char *path, int code, uid_t result) {
index 2a0ce27206ead3b0492bd29ed0b14b468b468fb5..46642f92fe89635054035557a12b0c5b884f01fd 100644 (file)
@@ -79,8 +79,8 @@ int main(int argc, char*argv[]) {
         assert_se(cg_delete(SYSTEMD_CGROUP_CONTROLLER, "/test-a") >= 0);
 
         assert_se(cg_split_spec("foobar:/", &c, &p) == 0);
-        assert(streq(c, "foobar"));
-        assert(streq(p, "/"));
+        assert_se(streq(c, "foobar"));
+        assert_se(streq(p, "/"));
         free(c);
         free(p);
 
@@ -92,13 +92,13 @@ int main(int argc, char*argv[]) {
         assert_se(cg_split_spec("fo/obar:/", &c, &p) < 0);
 
         assert_se(cg_split_spec("/", &c, &p) >= 0);
-        assert(c == NULL);
-        assert(streq(p, "/"));
+        assert_se(c == NULL);
+        assert_se(streq(p, "/"));
         free(p);
 
         assert_se(cg_split_spec("foo", &c, &p) >= 0);
-        assert(streq(c, "foo"));
-        assert(p == NULL);
+        assert_se(streq(c, "foo"));
+        assert_se(p == NULL);
         free(c);
 
         return 0;
diff --git a/src/test/test-condition-util.c b/src/test/test-condition-util.c
new file mode 100644 (file)
index 0000000..35ee916
--- /dev/null
@@ -0,0 +1,107 @@
+/***
+  This file is part of systemd
+
+  Copyright 2014 Ronny Chevalier
+
+  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/>.
+***/
+
+#include "condition-util.h"
+#include "macro.h"
+#include "util.h"
+#include "log.h"
+#include "architecture.h"
+#include "systemd/sd-id128.h"
+
+static void test_condition_test_ac_power(void) {
+        Condition *condition;
+
+        condition = condition_new(CONDITION_AC_POWER, "true", false, false);
+        assert_se(condition_test_ac_power(condition) == on_ac_power());
+        condition_free(condition);
+
+        condition = condition_new(CONDITION_AC_POWER, "false", false, false);
+        assert_se(condition_test_ac_power(condition) != on_ac_power());
+        condition_free(condition);
+
+        condition = condition_new(CONDITION_AC_POWER, "false", false, true);
+        assert_se(condition_test_ac_power(condition) == on_ac_power());
+        condition_free(condition);
+}
+
+static void test_condition_test_host(void) {
+        Condition *condition;
+        sd_id128_t id;
+        int r;
+        char sid[SD_ID128_STRING_MAX];
+        _cleanup_free_ char *hostname = NULL;
+
+        r = sd_id128_get_machine(&id);
+        assert_se(r >= 0);
+        assert_se(sd_id128_to_string(id, sid));
+
+        condition = condition_new(CONDITION_HOST, sid, false, false);
+        assert_se(condition_test_host(condition));
+        condition_free(condition);
+
+        condition = condition_new(CONDITION_HOST, "garbage value jjjjjjjjjjjjjj", false, false);
+        assert_se(!condition_test_host(condition));
+        condition_free(condition);
+
+        condition = condition_new(CONDITION_HOST, sid, false, true);
+        assert_se(!condition_test_host(condition));
+        condition_free(condition);
+
+        hostname = gethostname_malloc();
+        assert_se(hostname);
+
+        condition = condition_new(CONDITION_HOST, hostname, false, false);
+        assert_se(condition_test_host(condition));
+        condition_free(condition);
+}
+
+static void test_condition_test_architecture(void) {
+        Condition *condition;
+        Architecture a;
+        const char *sa;
+
+        a = uname_architecture();
+        assert_se(a >= 0);
+
+        sa = architecture_to_string(a);
+        assert_se(sa);
+
+        condition = condition_new(CONDITION_ARCHITECTURE, sa, false, false);
+        assert_se(condition_test_architecture(condition));
+        condition_free(condition);
+
+        condition = condition_new(CONDITION_ARCHITECTURE, "garbage value", false, false);
+        assert_se(!condition_test_architecture(condition));
+        condition_free(condition);
+
+        condition = condition_new(CONDITION_ARCHITECTURE, sa, false, true);
+        assert_se(!condition_test_architecture(condition));
+        condition_free(condition);
+}
+
+int main(int argc, char *argv[]) {
+        log_parse_environment();
+        log_open();
+
+        test_condition_test_ac_power();
+        test_condition_test_host();
+        test_condition_test_architecture();
+
+        return 0;
+}
index 3215f0c560c3635a1b576a0131b2726311f00425..7e0ac754d160a65798ba4eb01fb971ef125ed0f0 100644 (file)
 
 #include <unistd.h>
 
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-daemon.h"
 
 int main(int argc, char*argv[]) {
 
-        sd_notify(0, "STATUS=Starting up");
+        sd_notify(0,
+                  "STATUS=Starting up");
+        sleep(5);
+
+        sd_notify(0,
+                  "STATUS=Running\n"
+                  "READY=1");
+        sleep(5);
+
+        sd_notify(0,
+                  "STATUS=Reloading\n"
+                  "RELOADING=1");
         sleep(5);
+
         sd_notify(0,
                   "STATUS=Running\n"
                   "READY=1");
-        sleep(10);
-        sd_notify(0, "STATUS=Quitting");
+        sleep(5);
+
+        sd_notify(0,
+                  "STATUS=Quitting\n"
+                  "STOPPING=1");
+        sleep(5);
 
         return 0;
 }
index 0586b78b6d5e4d2a87fc92a04a1cbfb3ea5ee483..00b569080ccaa04809882b70af82e7e93197c6de 100644 (file)
@@ -28,7 +28,8 @@ static void test_one(const char *p) {
         char buf[FORMAT_TIMESTAMP_MAX], buf_relative[FORMAT_TIMESTAMP_RELATIVE_MAX];
 
         assert_se(parse_timestamp(p, &t) >= 0);
-        log_info("%s", format_timestamp(buf, sizeof(buf), t));
+        format_timestamp(buf, sizeof(buf), t);
+        log_info("%s", buf);
 
         /* Chop off timezone */
         *strrchr(buf, ' ') = 0;
@@ -36,7 +37,8 @@ static void test_one(const char *p) {
         assert_se(parse_timestamp(buf, &q) >= 0);
         assert_se(q == t);
 
-        log_info("%s", strna(format_timestamp_relative(buf_relative, sizeof(buf_relative), t)));
+        format_timestamp_relative(buf_relative, sizeof(buf_relative), t);
+        log_info("%s", strna(buf_relative));
         assert_se(parse_timestamp(buf, &q) >= 0);
 }
 
index 0f3862226a16124b43e5173e4d9a8f95bf3bac2b..6acd394c677e7721e1a786442e4aa282a002f1fc 100644 (file)
 #include <unistd.h>
 
 #include "manager.h"
+#include "bus-util.h"
 
 int main(int argc, char *argv[]) {
+        _cleanup_bus_error_free_ sd_bus_error err = SD_BUS_ERROR_NULL;
         Manager *m = NULL;
         Unit *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL, *g = NULL, *h = NULL;
+        FILE *serial = NULL;
+        FDSet *fdset = NULL;
         Job *j;
-
-        assert_se(set_unit_path("test") >= 0);
-
-        assert_se(manager_new(SYSTEMD_SYSTEM, &m) >= 0);
+        int r;
+
+        /* prepare the test */
+        assert_se(set_unit_path(TEST_DIR) >= 0);
+        r = manager_new(SYSTEMD_USER, true, &m);
+        if (IN_SET(r, -EPERM, -EACCES, -EADDRINUSE, -EHOSTDOWN, -ENOENT)) {
+                printf("Skipping test: manager_new: %s", strerror(-r));
+                return EXIT_TEST_SKIP;
+        }
+        assert_se(r >= 0);
+        assert_se(manager_startup(m, serial, fdset) >= 0);
 
         printf("Load1:\n");
         assert_se(manager_load_unit(m, "a.service", NULL, NULL, &a) >= 0);
@@ -42,7 +53,10 @@ int main(int argc, char *argv[]) {
         manager_dump_units(m, stdout, "\t");
 
         printf("Test1: (Trivial)\n");
-        assert_se(manager_add_job(m, JOB_START, c, JOB_REPLACE, false, NULL, &j) == 0);
+        r = manager_add_job(m, JOB_START, c, JOB_REPLACE, false, &err, &j);
+        if (sd_bus_error_is_set(&err))
+                log_error("error: %s: %s", err.name, err.message);
+        assert_se(r == 0);
         manager_dump_jobs(m, stdout, "\t");
 
         printf("Load2:\n");
index 3b77415c3a65304f857029c81f53da0ce4fee373..91df7eb6631fe2ee26e0921a51e7f44c97e3f4b5 100644 (file)
@@ -126,12 +126,41 @@ static void test_fdset_remove(void) {
         unlink(name);
 }
 
+static void test_fdset_iterate(void) {
+        int fd = -1;
+        FDSet *fdset = NULL;
+        char name[] = "/tmp/test-fdset_iterate.XXXXXX";
+        Iterator i;
+        int c = 0;
+        int a;
+
+        fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
+        assert_se(fd >= 0);
+
+        fdset = fdset_new();
+        assert_se(fdset);
+        assert_se(fdset_put(fdset, fd) >= 0);
+        assert_se(fdset_put(fdset, fd) >= 0);
+        assert_se(fdset_put(fdset, fd) >= 0);
+
+        FDSET_FOREACH(a, fdset, i) {
+                c++;
+                assert_se(a == fd);
+        }
+        assert_se(c == 1);
+
+        fdset_free(fdset);
+
+        unlink(name);
+}
+
 int main(int argc, char *argv[]) {
         test_fdset_new_fill();
         test_fdset_put_dup();
         test_fdset_cloexec();
         test_fdset_close_others();
         test_fdset_remove();
+        test_fdset_iterate();
 
         return 0;
 }
index 1de59fa573634d361341956fc4a24358fbac2b43..7e7b4ac45d37660f40e69c1296266cb15a4600b8 100644 (file)
@@ -90,7 +90,7 @@ static void test_parse_env_file(void) {
         assert_se(streq_ptr(a[9], "ten="));
         assert_se(a[10] == NULL);
 
-        strv_env_clean_log(a, "test");
+        strv_env_clean_log(a, NULL, "test");
 
         k = 0;
         STRV_FOREACH(i, b) {
@@ -246,25 +246,25 @@ static void test_status_field(void) {
 
         r = get_status_field("/proc/meminfo", "MemTotal:", &p);
         if (r != -ENOENT) {
-                assert(r == 0);
+                assert_se(r == 0);
                 puts(p);
                 assert_se(safe_atollu(p, &total) == 0);
         }
 
         r = get_status_field("/proc/meminfo", "\nBuffers:", &s);
         if (r != -ENOENT) {
-                assert(r == 0);
+                assert_se(r == 0);
                 puts(s);
                 assert_se(safe_atollu(s, &buffers) == 0);
         }
 
-        if (p && t)
-                assert(buffers < total);
+        if (p)
+                assert_se(buffers < total);
 
         /* Seccomp should be a good test for field full of zeros. */
         r = get_status_field("/proc/meminfo", "\nSeccomp:", &z);
         if (r != -ENOENT) {
-                assert(r == 0);
+                assert_se(r == 0);
                 puts(z);
                 assert_se(safe_atollu(z, &buffers) == 0);
         }
@@ -283,13 +283,78 @@ static void test_capeff(void) {
                 if (r == -ENOENT || r == -EPERM)
                         return;
 
-                assert(r == 0);
-                assert(*capeff);
+                assert_se(r == 0);
+                assert_se(*capeff);
                 p = capeff[strspn(capeff, DIGITS "abcdefABCDEF")];
-                assert(!p || isspace(p));
+                assert_se(!p || isspace(p));
         }
 }
 
+static void test_write_string_stream(void) {
+        char fn[] = "/tmp/test-write_string_stream-XXXXXX";
+        _cleanup_fclose_ FILE *f = NULL;
+        int fd;
+        char buf[64];
+
+        fd = mkostemp_safe(fn, O_RDWR);
+        assert_se(fd >= 0);
+
+        f = fdopen(fd, "r");
+        assert_se(f);
+        assert_se(write_string_stream(f, "boohoo") < 0);
+
+        f = freopen(fn, "r+", f);
+        assert_se(f);
+
+        assert_se(write_string_stream(f, "boohoo") == 0);
+        rewind(f);
+
+        assert_se(fgets(buf, sizeof(buf), f));
+        assert_se(streq(buf, "boohoo\n"));
+
+        unlink(fn);
+}
+
+static void test_write_string_file(void) {
+        char fn[] = "/tmp/test-write_string_file-XXXXXX";
+        char buf[64] = {};
+        _cleanup_close_ int fd;
+
+        fd = mkostemp_safe(fn, O_RDWR);
+        assert_se(fd >= 0);
+
+        assert_se(write_string_file(fn, "boohoo") == 0);
+
+        assert_se(read(fd, buf, sizeof(buf)) == 7);
+        assert_se(streq(buf, "boohoo\n"));
+
+        unlink(fn);
+}
+
+static void test_sendfile_full(void) {
+        char in_fn[] = "/tmp/test-sendfile_full-XXXXXX";
+        char out_fn[] = "/tmp/test-sendfile_full-XXXXXX";
+        _cleanup_close_ int in_fd, out_fd;
+        char text[] = "boohoo\nfoo\n\tbar\n";
+        char buf[64] = {0};
+
+        in_fd = mkostemp_safe(in_fn, O_RDWR);
+        assert_se(in_fd >= 0);
+        out_fd = mkostemp_safe(out_fn, O_RDWR);
+        assert_se(out_fd >= 0);
+
+        assert_se(write_string_file(in_fn, text) == 0);
+        assert_se(sendfile_full(out_fd, "/a/file/which/does/not/exist/i/guess") < 0);
+        assert_se(sendfile_full(out_fd, in_fn) == sizeof(text) - 1);
+        assert_se(lseek(out_fd, SEEK_SET, 0) == 0);
+
+        assert_se(read(out_fd, buf, sizeof(buf)) == sizeof(text) - 1);
+        assert_se(streq(buf, text));
+
+        unlink(in_fn);
+        unlink(out_fn);
+}
+
 int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
@@ -299,6 +364,9 @@ int main(int argc, char *argv[]) {
         test_executable_is_script();
         test_status_field();
         test_capeff();
+        test_write_string_stream();
+        test_write_string_file();
+        test_sendfile_full();
 
         return 0;
 }
diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c
new file mode 100644 (file)
index 0000000..ce686b6
--- /dev/null
@@ -0,0 +1,844 @@
+/***
+  This file is part of systemd
+
+  Copyright 2013 Daniel Buch
+
+  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/>.
+***/
+
+#include "strv.h"
+#include "util.h"
+#include "hashmap.h"
+
+void test_hashmap_funcs(void);
+
+static void test_hashmap_replace(void) {
+        Hashmap *m;
+        char *val1, *val2, *val3, *val4, *val5, *r;
+
+        m = hashmap_new(&string_hash_ops);
+
+        val1 = strdup("val1");
+        assert_se(val1);
+        val2 = strdup("val2");
+        assert_se(val2);
+        val3 = strdup("val3");
+        assert_se(val3);
+        val4 = strdup("val4");
+        assert_se(val4);
+        val5 = strdup("val5");
+        assert_se(val5);
+
+        hashmap_put(m, "key 1", val1);
+        hashmap_put(m, "key 2", val2);
+        hashmap_put(m, "key 3", val3);
+        hashmap_put(m, "key 4", val4);
+
+        hashmap_replace(m, "key 3", val1);
+        r = hashmap_get(m, "key 3");
+        assert_se(streq(r, "val1"));
+
+        hashmap_replace(m, "key 5", val5);
+        r = hashmap_get(m, "key 5");
+        assert_se(streq(r, "val5"));
+
+        free(val1);
+        free(val2);
+        free(val3);
+        free(val4);
+        free(val5);
+        hashmap_free(m);
+}
+
+static void test_hashmap_copy(void) {
+        Hashmap *m, *copy;
+        char *val1, *val2, *val3, *val4, *r;
+
+        val1 = strdup("val1");
+        assert_se(val1);
+        val2 = strdup("val2");
+        assert_se(val2);
+        val3 = strdup("val3");
+        assert_se(val3);
+        val4 = strdup("val4");
+        assert_se(val4);
+
+        m = hashmap_new(&string_hash_ops);
+
+        hashmap_put(m, "key 1", val1);
+        hashmap_put(m, "key 2", val2);
+        hashmap_put(m, "key 3", val3);
+        hashmap_put(m, "key 4", val4);
+
+        copy = hashmap_copy(m);
+
+        r = hashmap_get(copy, "key 1");
+        assert_se(streq(r, "val1"));
+        r = hashmap_get(copy, "key 2");
+        assert_se(streq(r, "val2"));
+        r = hashmap_get(copy, "key 3");
+        assert_se(streq(r, "val3"));
+        r = hashmap_get(copy, "key 4");
+        assert_se(streq(r, "val4"));
+
+        hashmap_free_free(copy);
+        hashmap_free(m);
+}
+
+static void test_hashmap_get_strv(void) {
+        Hashmap *m;
+        char **strv;
+        char *val1, *val2, *val3, *val4;
+
+        val1 = strdup("val1");
+        assert_se(val1);
+        val2 = strdup("val2");
+        assert_se(val2);
+        val3 = strdup("val3");
+        assert_se(val3);
+        val4 = strdup("val4");
+        assert_se(val4);
+
+        m = hashmap_new(&string_hash_ops);
+
+        hashmap_put(m, "key 1", val1);
+        hashmap_put(m, "key 2", val2);
+        hashmap_put(m, "key 3", val3);
+        hashmap_put(m, "key 4", val4);
+
+        strv = hashmap_get_strv(m);
+
+#ifndef ORDERED
+        strv = strv_sort(strv);
+#endif
+
+        assert_se(streq(strv[0], "val1"));
+        assert_se(streq(strv[1], "val2"));
+        assert_se(streq(strv[2], "val3"));
+        assert_se(streq(strv[3], "val4"));
+
+        strv_free(strv);
+
+        hashmap_free(m);
+}
+
+static void test_hashmap_move_one(void) {
+        Hashmap *m, *n;
+        char *val1, *val2, *val3, *val4, *r;
+
+        val1 = strdup("val1");
+        assert_se(val1);
+        val2 = strdup("val2");
+        assert_se(val2);
+        val3 = strdup("val3");
+        assert_se(val3);
+        val4 = strdup("val4");
+        assert_se(val4);
+
+        m = hashmap_new(&string_hash_ops);
+        n = hashmap_new(&string_hash_ops);
+
+        hashmap_put(m, "key 1", val1);
+        hashmap_put(m, "key 2", val2);
+        hashmap_put(m, "key 3", val3);
+        hashmap_put(m, "key 4", val4);
+
+        assert_se(hashmap_move_one(n, NULL, "key 3") == -ENOENT);
+        assert_se(hashmap_move_one(n, m, "key 5") == -ENOENT);
+        assert_se(hashmap_move_one(n, m, "key 3") == 0);
+        assert_se(hashmap_move_one(n, m, "key 4") == 0);
+
+        r = hashmap_get(n, "key 3");
+        assert_se(r && streq(r, "val3"));
+        r = hashmap_get(n, "key 4");
+        assert_se(r && streq(r, "val4"));
+        r = hashmap_get(m, "key 3");
+        assert_se(!r);
+
+        assert_se(hashmap_move_one(n, m, "key 3") == -EEXIST);
+
+        hashmap_free_free(m);
+        hashmap_free_free(n);
+}
+
+static void test_hashmap_move(void) {
+        Hashmap *m, *n;
+        char *val1, *val2, *val3, *val4, *r;
+
+        val1 = strdup("val1");
+        assert_se(val1);
+        val2 = strdup("val2");
+        assert_se(val2);
+        val3 = strdup("val3");
+        assert_se(val3);
+        val4 = strdup("val4");
+        assert_se(val4);
+
+        m = hashmap_new(&string_hash_ops);
+        n = hashmap_new(&string_hash_ops);
+
+        hashmap_put(n, "key 1", strdup(val1));
+        hashmap_put(m, "key 1", val1);
+        hashmap_put(m, "key 2", val2);
+        hashmap_put(m, "key 3", val3);
+        hashmap_put(m, "key 4", val4);
+
+        assert(hashmap_move(n, NULL) == 0);
+        assert(hashmap_move(n, m) == 0);
+
+        assert_se(hashmap_size(m) == 1);
+        r = hashmap_get(m, "key 1");
+        assert_se(r && streq(r, "val1"));
+
+        r = hashmap_get(n, "key 1");
+        assert_se(r && streq(r, "val1"));
+        r = hashmap_get(n, "key 2");
+        assert_se(r && streq(r, "val2"));
+        r = hashmap_get(n, "key 3");
+        assert_se(r && streq(r, "val3"));
+        r = hashmap_get(n, "key 4");
+        assert_se(r && streq(r, "val4"));
+
+        hashmap_free_free(m);
+        hashmap_free_free(n);
+}
+
+static void test_hashmap_update(void) {
+        Hashmap *m;
+        char *val1, *val2, *r;
+
+        m = hashmap_new(&string_hash_ops);
+        val1 = strdup("old_value");
+        assert_se(val1);
+        val2 = strdup("new_value");
+        assert_se(val2);
+
+        hashmap_put(m, "key 1", val1);
+        r = hashmap_get(m, "key 1");
+        assert_se(streq(r, "old_value"));
+
+        assert_se(hashmap_update(m, "key 2", val2) == -ENOENT);
+        r = hashmap_get(m, "key 1");
+        assert_se(streq(r, "old_value"));
+
+        assert_se(hashmap_update(m, "key 1", val2) == 0);
+        r = hashmap_get(m, "key 1");
+        assert_se(streq(r, "new_value"));
+
+        free(val1);
+        free(val2);
+        hashmap_free(m);
+}
+
+static void test_hashmap_put(void) {
+        Hashmap *m = NULL;
+        int valid_hashmap_put;
+        void *val1 = (void*) "val 1";
+
+        hashmap_ensure_allocated(&m, &string_hash_ops);
+        assert_se(m);
+
+        valid_hashmap_put = hashmap_put(m, "key 1", val1);
+        assert_se(valid_hashmap_put == 1);
+        assert_se(hashmap_put(m, "key 1", val1) == 0);
+        assert_se(hashmap_put(m, "key 1", (void *)"val 2") == -EEXIST);
+
+        hashmap_free(m);
+}
+
+static void test_hashmap_remove(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+        char *r;
+
+        r = hashmap_remove(NULL, "key 1");
+        assert_se(r == NULL);
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        r = hashmap_remove(m, "no such key");
+        assert_se(r == NULL);
+
+        hashmap_put(m, "key 1", (void*) "val 1");
+        hashmap_put(m, "key 2", (void*) "val 2");
+
+        r = hashmap_remove(m, "key 1");
+        assert_se(streq(r, "val 1"));
+
+        r = hashmap_get(m, "key 2");
+        assert_se(streq(r, "val 2"));
+        assert_se(!hashmap_get(m, "key 1"));
+}
+
+static void test_hashmap_remove2(void) {
+        _cleanup_hashmap_free_free_free_ Hashmap *m = NULL;
+        char key1[] = "key 1";
+        char key2[] = "key 2";
+        char val1[] = "val 1";
+        char val2[] = "val 2";
+        void *r, *r2;
+
+        r = hashmap_remove2(NULL, "key 1", &r2);
+        assert_se(r == NULL);
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        r = hashmap_remove2(m, "no such key", &r2);
+        assert_se(r == NULL);
+
+        hashmap_put(m, strdup(key1), strdup(val1));
+        hashmap_put(m, strdup(key2), strdup(val2));
+
+        r = hashmap_remove2(m, key1, &r2);
+        assert_se(streq(r, val1));
+        assert_se(streq(r2, key1));
+        free(r);
+        free(r2);
+
+        r = hashmap_get(m, key2);
+        assert_se(streq(r, val2));
+        assert_se(!hashmap_get(m, key1));
+}
+
+static void test_hashmap_remove_value(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+        char *r;
+
+        r = hashmap_remove_value(NULL, "key 1", (void*) "val 1");
+        assert_se(r == NULL);
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        r = hashmap_remove_value(m, "key 1", (void*) "val 1");
+        assert_se(r == NULL);
+
+        hashmap_put(m, "key 1", (void*) "val 1");
+        hashmap_put(m, "key 2", (void*) "val 2");
+
+        r = hashmap_remove_value(m, "key 1", (void*) "val 1");
+        assert_se(streq(r, "val 1"));
+
+        r = hashmap_get(m, "key 2");
+        assert_se(streq(r, "val 2"));
+        assert_se(!hashmap_get(m, "key 1"));
+
+        r = hashmap_remove_value(m, "key 2", (void*) "val 1");
+        assert_se(r == NULL);
+
+        r = hashmap_get(m, "key 2");
+        assert_se(streq(r, "val 2"));
+        assert_se(!hashmap_get(m, "key 1"));
+}
+
+static void test_hashmap_remove_and_put(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+        int valid;
+        char *r;
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        valid = hashmap_remove_and_put(m, "invalid key", "new key", NULL);
+        assert_se(valid == -ENOENT);
+
+        valid = hashmap_put(m, "key 1", (void*) (const char *) "val 1");
+        assert_se(valid == 1);
+
+        valid = hashmap_remove_and_put(NULL, "key 1", "key 2", (void*) (const char *) "val 2");
+        assert_se(valid == -ENOENT);
+
+        valid = hashmap_remove_and_put(m, "key 1", "key 2", (void*) (const char *) "val 2");
+        assert_se(valid == 0);
+
+        r = hashmap_get(m, "key 2");
+        assert_se(streq(r, "val 2"));
+        assert_se(!hashmap_get(m, "key 1"));
+
+        valid = hashmap_put(m, "key 3", (void*) (const char *) "val 3");
+        assert_se(valid == 1);
+        valid = hashmap_remove_and_put(m, "key 3", "key 2", (void*) (const char *) "val 2");
+        assert_se(valid == -EEXIST);
+}
+
+static void test_hashmap_remove_and_replace(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+        int valid;
+        void *key1 = UINT_TO_PTR(1);
+        void *key2 = UINT_TO_PTR(2);
+        void *key3 = UINT_TO_PTR(3);
+        void *r;
+
+        m = hashmap_new(&trivial_hash_ops);
+        assert_se(m);
+
+        valid = hashmap_remove_and_replace(m, key1, key2, NULL);
+        assert_se(valid == -ENOENT);
+
+        valid = hashmap_put(m, key1, key1);
+        assert_se(valid == 1);
+
+        valid = hashmap_remove_and_replace(NULL, key1, key2, key2);
+        assert_se(valid == -ENOENT);
+
+        valid = hashmap_remove_and_replace(m, key1, key2, key2);
+        assert_se(valid == 0);
+
+        r = hashmap_get(m, key2);
+        assert_se(r == key2);
+        assert_se(!hashmap_get(m, key1));
+
+        valid = hashmap_put(m, key3, key3);
+        assert_se(valid == 1);
+        valid = hashmap_remove_and_replace(m, key3, key2, key2);
+        assert_se(valid == 0);
+        r = hashmap_get(m, key2);
+        assert_se(r == key2);
+        assert_se(!hashmap_get(m, key3));
+}
+
+static void test_hashmap_ensure_allocated(void) {
+        Hashmap *m;
+        int valid_hashmap;
+
+        m = hashmap_new(&string_hash_ops);
+
+        valid_hashmap = hashmap_ensure_allocated(&m, &string_hash_ops);
+        assert_se(valid_hashmap == 0);
+
+        assert_se(m);
+        hashmap_free(m);
+}
+
+static void test_hashmap_foreach_key(void) {
+        Hashmap *m;
+        Iterator i;
+        bool key_found[] = { false, false, false, false };
+        const char *s;
+        const char *key;
+        static const char key_table[] =
+                "key 1\0"
+                "key 2\0"
+                "key 3\0"
+                "key 4\0";
+
+        m = hashmap_new(&string_hash_ops);
+
+        NULSTR_FOREACH(key, key_table)
+                hashmap_put(m, key, (void*) (const char*) "my dummy val");
+
+        HASHMAP_FOREACH_KEY(s, key, m, i) {
+                if (!key_found[0] && streq(key, "key 1"))
+                        key_found[0] = true;
+                else if (!key_found[1] && streq(key, "key 2"))
+                        key_found[1] = true;
+                else if (!key_found[2] && streq(key, "key 3"))
+                        key_found[2] = true;
+                else if (!key_found[3] && streq(key, "fail"))
+                        key_found[3] = true;
+        }
+
+        assert_se(m);
+        assert_se(key_found[0] && key_found[1] && key_found[2] && !key_found[3]);
+
+        hashmap_free(m);
+}
+
+static void test_hashmap_foreach(void) {
+        Hashmap *m;
+        Iterator i;
+        bool value_found[] = { false, false, false, false };
+        char *val1, *val2, *val3, *val4, *s;
+        unsigned count;
+
+        val1 = strdup("my val1");
+        assert_se(val1);
+        val2 = strdup("my val2");
+        assert_se(val2);
+        val3 = strdup("my val3");
+        assert_se(val3);
+        val4 = strdup("my val4");
+        assert_se(val4);
+
+        m = NULL;
+
+        count = 0;
+        HASHMAP_FOREACH(s, m, i)
+                count++;
+        assert_se(count == 0);
+
+        m = hashmap_new(&string_hash_ops);
+
+        count = 0;
+        HASHMAP_FOREACH(s, m, i)
+                count++;
+        assert_se(count == 0);
+
+        hashmap_put(m, "Key 1", val1);
+        hashmap_put(m, "Key 2", val2);
+        hashmap_put(m, "Key 3", val3);
+        hashmap_put(m, "Key 4", val4);
+
+        HASHMAP_FOREACH(s, m, i) {
+                if (!value_found[0] && streq(s, val1))
+                        value_found[0] = true;
+                else if (!value_found[1] && streq(s, val2))
+                        value_found[1] = true;
+                else if (!value_found[2] && streq(s, val3))
+                        value_found[2] = true;
+                else if (!value_found[3] && streq(s, val4))
+                        value_found[3] = true;
+        }
+
+        assert_se(m);
+        assert_se(value_found[0] && value_found[1] && value_found[2] && value_found[3]);
+
+        hashmap_free_free(m);
+}
+
+static void test_hashmap_merge(void) {
+        Hashmap *m;
+        Hashmap *n;
+        char *val1, *val2, *val3, *val4, *r;
+
+        val1 = strdup("my val1");
+        assert_se(val1);
+        val2 = strdup("my val2");
+        assert_se(val2);
+        val3 = strdup("my val3");
+        assert_se(val3);
+        val4 = strdup("my val4");
+        assert_se(val4);
+
+        n = hashmap_new(&string_hash_ops);
+        m = hashmap_new(&string_hash_ops);
+
+        hashmap_put(m, "Key 1", val1);
+        hashmap_put(m, "Key 2", val2);
+        hashmap_put(n, "Key 3", val3);
+        hashmap_put(n, "Key 4", val4);
+
+        assert_se(hashmap_merge(m, n) == 0);
+        r = hashmap_get(m, "Key 3");
+        assert_se(r && streq(r, "my val3"));
+        r = hashmap_get(m, "Key 4");
+        assert_se(r && streq(r, "my val4"));
+
+        assert_se(n);
+        assert_se(m);
+        hashmap_free(n);
+        hashmap_free_free(m);
+}
+
+static void test_hashmap_contains(void) {
+        Hashmap *m;
+        char *val1;
+
+        val1 = strdup("my val");
+        assert_se(val1);
+
+        m = hashmap_new(&string_hash_ops);
+
+        assert_se(!hashmap_contains(m, "Key 1"));
+        hashmap_put(m, "Key 1", val1);
+        assert_se(hashmap_contains(m, "Key 1"));
+        assert_se(!hashmap_contains(m, "Key 2"));
+
+        assert_se(!hashmap_contains(NULL, "Key 1"));
+
+        assert_se(m);
+        hashmap_free_free(m);
+}
+
+static void test_hashmap_isempty(void) {
+        Hashmap *m;
+        char *val1;
+
+        val1 = strdup("my val");
+        assert_se(val1);
+
+        m = hashmap_new(&string_hash_ops);
+
+        assert_se(hashmap_isempty(m));
+        hashmap_put(m, "Key 1", val1);
+        assert_se(!hashmap_isempty(m));
+
+        assert_se(m);
+        hashmap_free_free(m);
+}
+
+static void test_hashmap_size(void) {
+        Hashmap *m;
+        char *val1, *val2, *val3, *val4;
+
+        val1 = strdup("my val");
+        assert_se(val1);
+        val2 = strdup("my val");
+        assert_se(val2);
+        val3 = strdup("my val");
+        assert_se(val3);
+        val4 = strdup("my val");
+        assert_se(val4);
+
+        assert_se(hashmap_size(NULL) == 0);
+        assert_se(hashmap_buckets(NULL) == 0);
+
+        m = hashmap_new(&string_hash_ops);
+
+        hashmap_put(m, "Key 1", val1);
+        hashmap_put(m, "Key 2", val2);
+        hashmap_put(m, "Key 3", val3);
+        hashmap_put(m, "Key 4", val4);
+
+        assert_se(m);
+        assert_se(hashmap_size(m) == 4);
+        assert_se(hashmap_buckets(m) >= 4);
+        hashmap_free_free(m);
+}
+
+static void test_hashmap_get(void) {
+        Hashmap *m;
+        char *r;
+        char *val;
+
+        val = strdup("my val");
+        assert_se(val);
+
+        r = hashmap_get(NULL, "Key 1");
+        assert_se(r == NULL);
+
+        m = hashmap_new(&string_hash_ops);
+
+        hashmap_put(m, "Key 1", val);
+
+        r = hashmap_get(m, "Key 1");
+        assert_se(streq(r, val));
+
+        r = hashmap_get(m, "no such key");
+        assert_se(r == NULL);
+
+        assert_se(m);
+        hashmap_free_free(m);
+}
+
+static void test_hashmap_get2(void) {
+        Hashmap *m;
+        char *r;
+        char *val;
+        char key_orig[] = "Key 1";
+        void *key_copy;
+
+        val = strdup("my val");
+        assert_se(val);
+
+        key_copy = strdup(key_orig);
+        assert_se(key_copy);
+
+        r = hashmap_get2(NULL, key_orig, &key_copy);
+        assert_se(r == NULL);
+
+        m = hashmap_new(&string_hash_ops);
+
+        hashmap_put(m, key_copy, val);
+        key_copy = NULL;
+
+        r = hashmap_get2(m, key_orig, &key_copy);
+        assert_se(streq(r, val));
+        assert_se(key_orig != key_copy);
+        assert_se(streq(key_orig, key_orig));
+
+        r = hashmap_get2(m, "no such key", NULL);
+        assert_se(r == NULL);
+
+        assert_se(m);
+        hashmap_free_free_free(m);
+}
+
+static unsigned long crippled_hashmap_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) {
+        return trivial_hash_func(p, hash_key) & 0xff;
+}
+
+static const struct hash_ops crippled_hashmap_ops = {
+        .hash = crippled_hashmap_func,
+        .compare = trivial_compare_func,
+};
+
+static void test_hashmap_many(void) {
+        Hashmap *h;
+        unsigned i, j;
+        void *v, *k;
+        static const struct {
+                const struct hash_ops *ops;
+                unsigned n_entries;
+        } tests[] = {
+                { .ops = NULL,                  .n_entries = 1 << 20 },
+                { .ops = &crippled_hashmap_ops, .n_entries = 1 << 11 },
+        };
+
+
+        for (j = 0; j < ELEMENTSOF(tests); j++) {
+                assert_se(h = hashmap_new(tests[j].ops));
+
+                for (i = 1; i < tests[j].n_entries*3; i+=3) {
+                        assert_se(hashmap_put(h, UINT_TO_PTR(i), UINT_TO_PTR(i)) >= 0);
+                        assert_se(PTR_TO_UINT(hashmap_get(h, UINT_TO_PTR(i))) == i);
+                }
+
+                for (i = 1; i < tests[j].n_entries*3; i++)
+                        assert_se(hashmap_contains(h, UINT_TO_PTR(i)) == (i % 3 == 1));
+
+                log_info("%u <= %u * 0.75 = %g", hashmap_size(h), hashmap_buckets(h), hashmap_buckets(h) * 0.75);
+
+                assert_se(hashmap_size(h) <= hashmap_buckets(h) * 0.75);
+                assert_se(hashmap_size(h) == tests[j].n_entries);
+
+                while (!hashmap_isempty(h)) {
+                        k = hashmap_first_key(h);
+                        v = hashmap_remove(h, k);
+                        assert_se(v == k);
+                }
+
+                hashmap_free(h);
+        }
+}
+
+static void test_hashmap_first(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        assert_se(!hashmap_first(m));
+        assert_se(hashmap_put(m, "key 1", (void*) "val 1") == 1);
+        assert_se(streq(hashmap_first(m), "val 1"));
+        assert_se(hashmap_put(m, "key 2", (void*) "val 2") == 1);
+#ifdef ORDERED
+        assert_se(streq(hashmap_first(m), "val 1"));
+        assert_se(hashmap_remove(m, "key 1"));
+        assert_se(streq(hashmap_first(m), "val 2"));
+#endif
+}
+
+static void test_hashmap_first_key(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        assert_se(!hashmap_first_key(m));
+        assert_se(hashmap_put(m, "key 1", NULL) == 1);
+        assert_se(streq(hashmap_first_key(m), "key 1"));
+        assert_se(hashmap_put(m, "key 2", NULL) == 1);
+#ifdef ORDERED
+        assert_se(streq(hashmap_first_key(m), "key 1"));
+        assert_se(hashmap_remove(m, "key 1") == NULL);
+        assert_se(streq(hashmap_first_key(m), "key 2"));
+#endif
+}
+
+static void test_hashmap_steal_first_key(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        assert_se(!hashmap_steal_first_key(m));
+        assert_se(hashmap_put(m, "key 1", NULL) == 1);
+        assert_se(streq(hashmap_steal_first_key(m), "key 1"));
+
+        assert_se(hashmap_isempty(m));
+}
+
+static void test_hashmap_steal_first(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+        int seen[3] = {};
+        char *val;
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        assert_se(hashmap_put(m, "key 1", (void*) "1") == 1);
+        assert_se(hashmap_put(m, "key 2", (void*) "22") == 1);
+        assert_se(hashmap_put(m, "key 3", (void*) "333") == 1);
+
+        while ((val = hashmap_steal_first(m)))
+                seen[strlen(val) - 1]++;
+
+        assert_se(seen[0] == 1 && seen[1] == 1 && seen[2] == 1);
+
+        assert_se(hashmap_isempty(m));
+}
+
+static void test_hashmap_clear_free_free(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+
+        m = hashmap_new(&string_hash_ops);
+        assert_se(m);
+
+        assert_se(hashmap_put(m, strdup("key 1"), NULL) == 1);
+        assert_se(hashmap_put(m, strdup("key 2"), NULL) == 1);
+        assert_se(hashmap_put(m, strdup("key 3"), NULL) == 1);
+
+        hashmap_clear_free_free(m);
+        assert_se(hashmap_isempty(m));
+}
+
+static void test_hashmap_reserve(void) {
+        _cleanup_hashmap_free_ Hashmap *m = NULL;
+
+        m = hashmap_new(&string_hash_ops);
+
+        assert_se(hashmap_reserve(m, 1) == 0);
+        assert_se(hashmap_buckets(m) < 1000);
+        assert_se(hashmap_reserve(m, 1000) == 0);
+        assert_se(hashmap_buckets(m) >= 1000);
+        assert_se(hashmap_isempty(m));
+
+        assert_se(hashmap_put(m, "key 1", (void*) "val 1") == 1);
+
+        assert_se(hashmap_reserve(m, UINT_MAX) == -ENOMEM);
+        assert_se(hashmap_reserve(m, UINT_MAX - 1) == -ENOMEM);
+}
+
+void test_hashmap_funcs(void) {
+        test_hashmap_copy();
+        test_hashmap_get_strv();
+        test_hashmap_move_one();
+        test_hashmap_move();
+        test_hashmap_replace();
+        test_hashmap_update();
+        test_hashmap_put();
+        test_hashmap_remove();
+        test_hashmap_remove2();
+        test_hashmap_remove_value();
+        test_hashmap_remove_and_put();
+        test_hashmap_remove_and_replace();
+        test_hashmap_ensure_allocated();
+        test_hashmap_foreach();
+        test_hashmap_foreach_key();
+        test_hashmap_contains();
+        test_hashmap_merge();
+        test_hashmap_isempty();
+        test_hashmap_get();
+        test_hashmap_get2();
+        test_hashmap_size();
+        test_hashmap_many();
+        test_hashmap_first();
+        test_hashmap_first_key();
+        test_hashmap_steal_first_key();
+        test_hashmap_steal_first();
+        test_hashmap_clear_free_free();
+        test_hashmap_reserve();
+}
index ccef61f55c1bb4ca9e75e6b56da873f65d470cd9..6900da9e89b2bd64712e3f00bf2e4b53e079d7fa 100644 (file)
 #include "util.h"
 #include "hashmap.h"
 
-static void test_hashmap_replace(void) {
-        Hashmap *m;
-        char *val1, *val2, *val3, *val4, *val5, *r;
+void test_hashmap_funcs(void);
+void test_ordered_hashmap_funcs(void);
 
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        val1 = strdup("val1");
-        assert_se(val1);
-        val2 = strdup("val2");
-        assert_se(val2);
-        val3 = strdup("val3");
-        assert_se(val3);
-        val4 = strdup("val4");
-        assert_se(val4);
-        val5 = strdup("val5");
-        assert_se(val5);
-
-        hashmap_put(m, "key 1", val1);
-        hashmap_put(m, "key 2", val2);
-        hashmap_put(m, "key 3", val3);
-        hashmap_put(m, "key 4", val4);
-
-        hashmap_replace(m, "key 3", val1);
-        r = hashmap_get(m, "key 3");
-        assert_se(streq(r, "val1"));
-
-        hashmap_replace(m, "key 5", val5);
-        r = hashmap_get(m, "key 5");
-        assert_se(streq(r, "val5"));
-
-        free(val1);
-        free(val2);
-        free(val3);
-        free(val4);
-        free(val5);
-        hashmap_free(m);
-}
-
-static void test_hashmap_copy(void) {
-        Hashmap *m, *copy;
-        char *val1, *val2, *val3, *val4, *r;
-
-        val1 = strdup("val1");
-        assert_se(val1);
-        val2 = strdup("val2");
-        assert_se(val2);
-        val3 = strdup("val3");
-        assert_se(val3);
-        val4 = strdup("val4");
-        assert_se(val4);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        hashmap_put(m, "key 1", val1);
-        hashmap_put(m, "key 2", val2);
-        hashmap_put(m, "key 3", val3);
-        hashmap_put(m, "key 4", val4);
-
-        copy = hashmap_copy(m);
-
-        r = hashmap_get(copy, "key 1");
-        assert_se(streq(r, "val1"));
-        r = hashmap_get(copy, "key 2");
-        assert_se(streq(r, "val2"));
-        r = hashmap_get(copy, "key 3");
-        assert_se(streq(r, "val3"));
-        r = hashmap_get(copy, "key 4");
-        assert_se(streq(r, "val4"));
-
-        hashmap_free_free(copy);
-        hashmap_free(m);
-}
-
-static void test_hashmap_get_strv(void) {
-        Hashmap *m;
-        char **strv;
-        char *val1, *val2, *val3, *val4;
-
-        val1 = strdup("val1");
-        assert_se(val1);
-        val2 = strdup("val2");
-        assert_se(val2);
-        val3 = strdup("val3");
-        assert_se(val3);
-        val4 = strdup("val4");
-        assert_se(val4);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        hashmap_put(m, "key 1", val1);
-        hashmap_put(m, "key 2", val2);
-        hashmap_put(m, "key 3", val3);
-        hashmap_put(m, "key 4", val4);
-
-        strv = hashmap_get_strv(m);
-
-        assert_se(streq(strv[0], "val1"));
-        assert_se(streq(strv[1], "val2"));
-        assert_se(streq(strv[2], "val3"));
-        assert_se(streq(strv[3], "val4"));
-
-        strv_free(strv);
-
-        hashmap_free(m);
-}
-
-static void test_hashmap_move_one(void) {
-        Hashmap *m, *n;
+static void test_ordered_hashmap_next(void) {
+        OrderedHashmap *m;
         char *val1, *val2, *val3, *val4, *r;
 
+        m = ordered_hashmap_new(&string_hash_ops);
         val1 = strdup("val1");
         assert_se(val1);
         val2 = strdup("val2");
@@ -141,437 +39,25 @@ static void test_hashmap_move_one(void) {
         val4 = strdup("val4");
         assert_se(val4);
 
-        m = hashmap_new(string_hash_func, string_compare_func);
-        n = hashmap_new(string_hash_func, string_compare_func);
+        ordered_hashmap_put(m, "key 1", val1);
+        ordered_hashmap_put(m, "key 2", val2);
+        ordered_hashmap_put(m, "key 3", val3);
+        ordered_hashmap_put(m, "key 4", val4);
 
-        hashmap_put(m, "key 1", val1);
-        hashmap_put(m, "key 2", val2);
-        hashmap_put(m, "key 3", val3);
-        hashmap_put(m, "key 4", val4);
-
-        hashmap_move_one(n, m, "key 3");
-        hashmap_move_one(n, m, "key 4");
-
-        r = hashmap_get(n, "key 3");
-        assert_se(r && streq(r, "val3"));
-        r = hashmap_get(n, "key 4");
-        assert_se(r && streq(r, "val4"));
-        r = hashmap_get(m, "key 3");
-        assert_se(!r);
-
-
-        hashmap_free_free(m);
-        hashmap_free_free(n);
-}
-
-static void test_hashmap_next(void) {
-        Hashmap *m;
-        char *val1, *val2, *val3, *val4, *r;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        val1 = strdup("val1");
-        assert_se(val1);
-        val2 = strdup("val2");
-        assert_se(val2);
-        val3 = strdup("val3");
-        assert_se(val3);
-        val4 = strdup("val4");
-        assert_se(val4);
-
-        hashmap_put(m, "key 1", val1);
-        hashmap_put(m, "key 2", val2);
-        hashmap_put(m, "key 3", val3);
-        hashmap_put(m, "key 4", val4);
-
-        r = hashmap_next(m, "key 1");
+        r = ordered_hashmap_next(m, "key 1");
         assert_se(streq(r, val2));
-        r = hashmap_next(m, "key 2");
+        r = ordered_hashmap_next(m, "key 2");
         assert_se(streq(r, val3));
-        r = hashmap_next(m, "key 3");
+        r = ordered_hashmap_next(m, "key 3");
         assert_se(streq(r, val4));
-        r = hashmap_next(m, "key 4");
+        r = ordered_hashmap_next(m, "key 4");
+        assert_se(!r);
+        r = ordered_hashmap_next(NULL, "key 1");
+        assert_se(!r);
+        r = ordered_hashmap_next(m, "key 5");
         assert_se(!r);
 
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_update(void) {
-        Hashmap *m;
-        char *val1, *val2, *r;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        val1 = strdup("old_value");
-        assert_se(val1);
-        val2 = strdup("new_value");
-        assert_se(val2);
-
-        hashmap_put(m, "key 1", val1);
-        r = hashmap_get(m, "key 1");
-        assert_se(streq(r, "old_value"));
-
-        hashmap_update(m, "key 1", val2);
-        r = hashmap_get(m, "key 1");
-        assert_se(streq(r, "new_value"));
-
-        free(val1);
-        free(val2);
-        hashmap_free(m);
-}
-
-static void test_hashmap_put(void) {
-        Hashmap *m;
-        int valid_hashmap_put;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        valid_hashmap_put = hashmap_put(m, "key 1", (void*) (const char *) "val 1");
-        assert_se(valid_hashmap_put == 1);
-
-        assert_se(m);
-        hashmap_free(m);
-}
-
-static void test_hashmap_remove_and_put(void) {
-        _cleanup_hashmap_free_ Hashmap *m = NULL;
-        int valid;
-        char *r;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        assert_se(m);
-
-        valid = hashmap_remove_and_put(m, "unvalid key", "new key", NULL);
-        assert_se(valid < 0);
-
-        valid = hashmap_put(m, "key 1", (void*) (const char *) "val 1");
-        assert_se(valid == 1);
-        valid = hashmap_remove_and_put(m, "key 1", "key 2", (void*) (const char *) "val 2");
-        assert_se(valid == 0);
-
-        r = hashmap_get(m, "key 2");
-        assert_se(streq(r, "val 2"));
-        assert_se(!hashmap_get(m, "key 1"));
-
-        valid = hashmap_put(m, "key 3", (void*) (const char *) "val 3");
-        assert_se(valid == 1);
-        valid = hashmap_remove_and_put(m, "key 3", "key 2", (void*) (const char *) "val 2");
-        assert_se(valid < 0);
-}
-
-static void test_hashmap_ensure_allocated(void) {
-        Hashmap *m;
-        int valid_hashmap;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        valid_hashmap = hashmap_ensure_allocated(&m, string_hash_func, string_compare_func);
-        assert_se(valid_hashmap == 0);
-
-        assert_se(m);
-        hashmap_free(m);
-}
-
-static void test_hashmap_foreach_key(void) {
-        Hashmap *m;
-        Iterator i;
-        bool key_found[] = { false, false, false, false };
-        const char *s;
-        const char *key;
-        static const char key_table[] =
-                "key 1\0"
-                "key 2\0"
-                "key 3\0"
-                "key 4\0";
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        NULSTR_FOREACH(key, key_table)
-                hashmap_put(m, key, (void*) (const char*) "my dummy val");
-
-        HASHMAP_FOREACH_KEY(s, key, m, i) {
-                if (!key_found[0] && streq(key, "key 1"))
-                        key_found[0] = true;
-                else if (!key_found[1] && streq(key, "key 2"))
-                        key_found[1] = true;
-                else if (!key_found[2] && streq(key, "key 3"))
-                        key_found[2] = true;
-                else if (!key_found[3] && streq(key, "fail"))
-                        key_found[3] = true;
-        }
-
-        assert_se(m);
-        assert_se(key_found[0] && key_found[1] && key_found[2] && !key_found[3]);
-
-        hashmap_free(m);
-}
-
-static void test_hashmap_foreach(void) {
-        Hashmap *m;
-        Iterator i;
-        bool value_found[] = { false, false, false, false };
-        char *val1, *val2, *val3, *val4, *s;
-
-        val1 = strdup("my val1");
-        assert_se(val1);
-        val2 = strdup("my val2");
-        assert_se(val2);
-        val3 = strdup("my val3");
-        assert_se(val3);
-        val4 = strdup("my val4");
-        assert_se(val4);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        hashmap_put(m, "Key 1", val1);
-        hashmap_put(m, "Key 2", val2);
-        hashmap_put(m, "Key 3", val3);
-        hashmap_put(m, "Key 4", val4);
-
-        HASHMAP_FOREACH(s, m, i) {
-                if (!value_found[0] && streq(s, val1))
-                        value_found[0] = true;
-                else if (!value_found[1] && streq(s, val2))
-                        value_found[1] = true;
-                else if (!value_found[2] && streq(s, val3))
-                        value_found[2] = true;
-                else if (!value_found[3] && streq(s, val4))
-                        value_found[3] = true;
-        }
-
-        assert_se(m);
-        assert_se(value_found[0] && value_found[1] && value_found[2] && value_found[3]);
-
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_foreach_backwards(void) {
-        Hashmap *m;
-        Iterator i;
-        char *val1, *val2, *val3, *val4, *s;
-        bool value_found[] = { false, false, false, false };
-
-        val1 = strdup("my val1");
-        assert_se(val1);
-        val2 = strdup("my val2");
-        assert_se(val2);
-        val3 = strdup("my val3");
-        assert_se(val3);
-        val4 = strdup("my val4");
-        assert_se(val4);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        hashmap_put(m, "Key 1", val1);
-        hashmap_put(m, "Key 2", val2);
-        hashmap_put(m, "Key 3", val3);
-        hashmap_put(m, "Key 4", val4);
-
-        HASHMAP_FOREACH_BACKWARDS(s, m, i) {
-                if (!value_found[0] && streq(s, val1))
-                        value_found[0] = true;
-                else if (!value_found[1] && streq(s, val2))
-                        value_found[1] = true;
-                else if (!value_found[2] && streq(s, val3))
-                        value_found[2] = true;
-                else if (!value_found[3] && streq(s, val4))
-                        value_found[3] = true;
-        }
-
-        assert_se(m);
-        assert_se(value_found[0] && value_found[1] && value_found[2] && value_found[3]);
-
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_merge(void) {
-        Hashmap *m;
-        Hashmap *n;
-        char *val1, *val2, *val3, *val4, *r;
-
-        val1 = strdup("my val1");
-        assert_se(val1);
-        val2 = strdup("my val2");
-        assert_se(val2);
-        val3 = strdup("my val3");
-        assert_se(val3);
-        val4 = strdup("my val4");
-        assert_se(val4);
-
-        n = hashmap_new(string_hash_func, string_compare_func);
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        hashmap_put(m, "Key 1", val1);
-        hashmap_put(m, "Key 2", val2);
-        hashmap_put(n, "Key 3", val3);
-        hashmap_put(n, "Key 4", val4);
-
-        assert_se(hashmap_merge(m, n) == 0);
-        r = hashmap_get(m, "Key 3");
-        assert_se(r && streq(r, "my val3"));
-        r = hashmap_get(m, "Key 4");
-        assert_se(r && streq(r, "my val4"));
-
-        assert_se(n);
-        assert_se(m);
-        hashmap_free(n);
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_contains(void) {
-        Hashmap *m;
-        char *val1;
-
-        val1 = strdup("my val");
-        assert_se(val1);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        assert_se(!hashmap_contains(m, "Key 1"));
-        hashmap_put(m, "Key 1", val1);
-        assert_se(hashmap_contains(m, "Key 1"));
-
-        assert_se(m);
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_isempty(void) {
-        Hashmap *m;
-        char *val1;
-
-        val1 = strdup("my val");
-        assert_se(val1);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        assert_se(hashmap_isempty(m));
-        hashmap_put(m, "Key 1", val1);
-        assert_se(!hashmap_isempty(m));
-
-        assert_se(m);
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_size(void) {
-        Hashmap *m;
-        char *val1, *val2, *val3, *val4;
-
-        val1 = strdup("my val");
-        assert_se(val1);
-        val2 = strdup("my val");
-        assert_se(val2);
-        val3 = strdup("my val");
-        assert_se(val3);
-        val4 = strdup("my val");
-        assert_se(val4);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        hashmap_put(m, "Key 1", val1);
-        hashmap_put(m, "Key 2", val2);
-        hashmap_put(m, "Key 3", val3);
-        hashmap_put(m, "Key 4", val4);
-
-        assert_se(m);
-        assert_se(hashmap_size(m) == 4);
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_get(void) {
-        Hashmap *m;
-        char *r;
-        char *val;
-
-        val = strdup("my val");
-        assert_se(val);
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-
-        hashmap_put(m, "Key 1", val);
-
-        r = hashmap_get(m, "Key 1");
-        assert_se(streq(r, val));
-
-        assert_se(m);
-        hashmap_free_free(m);
-}
-
-static void test_hashmap_many(void) {
-        Hashmap *h;
-        unsigned i;
-
-#define N_ENTRIES 100000
-
-        assert_se(h = hashmap_new(NULL, NULL));
-
-        for (i = 1; i < N_ENTRIES*3; i+=3) {
-                assert_se(hashmap_put(h, UINT_TO_PTR(i), UINT_TO_PTR(i)) >= 0);
-                assert_se(PTR_TO_UINT(hashmap_get(h, UINT_TO_PTR(i))) == i);
-        }
-
-        for (i = 1; i < N_ENTRIES*3; i++)
-                assert_se(hashmap_contains(h, UINT_TO_PTR(i)) == (i % 3 == 1));
-
-        log_info("%u <= %u * 0.75 = %g", hashmap_size(h), hashmap_buckets(h), hashmap_buckets(h) * 0.75);
-
-        assert_se(hashmap_size(h) <= hashmap_buckets(h) * 0.75);
-        assert_se(hashmap_size(h) == N_ENTRIES);
-
-        hashmap_free(h);
-}
-
-static void test_hashmap_first_key(void) {
-        _cleanup_hashmap_free_ Hashmap *m = NULL;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        assert_se(m);
-
-        assert_se(!hashmap_first_key(m));
-        assert_se(hashmap_put(m, "key 1", NULL) == 1);
-        assert_se(streq(hashmap_first_key(m), "key 1"));
-        assert_se(hashmap_put(m, "key 2", NULL) == 1);
-        assert_se(streq(hashmap_first_key(m), "key 1"));
-        assert_se(hashmap_remove(m, "key 1") == NULL);
-        assert_se(streq(hashmap_first_key(m), "key 2"));
-}
-
-static void test_hashmap_last(void) {
-        _cleanup_hashmap_free_ Hashmap *m = NULL;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        assert_se(m);
-
-        assert_se(!hashmap_last(m));
-        assert_se(hashmap_put(m, "key 1", (void *) (const char *) "val 1") == 1);
-        assert_se(streq(hashmap_last(m), "val 1"));
-        assert_se(hashmap_put(m, "key 2", (void *) (const char *) "bar") == 1);
-        assert_se(streq(hashmap_last(m), "bar"));
-        assert_se(hashmap_remove(m, "key 2"));
-        assert_se(streq(hashmap_last(m), "val 1"));
-}
-
-static void test_hashmap_steal_first_key(void) {
-        _cleanup_hashmap_free_ Hashmap *m = NULL;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        assert_se(m);
-
-        assert_se(!hashmap_steal_first_key(m));
-        assert_se(hashmap_put(m, "key 1", NULL) == 1);
-        assert_se(streq(hashmap_steal_first_key(m), "key 1"));
-
-        assert_se(hashmap_isempty(m));
-}
-
-static void test_hashmap_clear_free_free(void) {
-        _cleanup_hashmap_free_ Hashmap *m = NULL;
-
-        m = hashmap_new(string_hash_func, string_compare_func);
-        assert_se(m);
-
-        assert_se(hashmap_put(m, strdup("key 1"), NULL) == 1);
-        assert_se(hashmap_put(m, strdup("key 2"), NULL) == 1);
-        assert_se(hashmap_put(m, strdup("key 3"), NULL) == 1);
-
-        hashmap_clear_free_free(m);
-        assert_se(hashmap_isempty(m));
+        ordered_hashmap_free_free(m);
 }
 
 static void test_uint64_compare_func(void) {
@@ -594,28 +80,10 @@ static void test_string_compare_func(void) {
 }
 
 int main(int argc, const char *argv[]) {
-        test_hashmap_copy();
-        test_hashmap_get_strv();
-        test_hashmap_move_one();
-        test_hashmap_next();
-        test_hashmap_replace();
-        test_hashmap_update();
-        test_hashmap_put();
-        test_hashmap_remove_and_put();
-        test_hashmap_ensure_allocated();
-        test_hashmap_foreach();
-        test_hashmap_foreach_backwards();
-        test_hashmap_foreach_key();
-        test_hashmap_contains();
-        test_hashmap_merge();
-        test_hashmap_isempty();
-        test_hashmap_get();
-        test_hashmap_size();
-        test_hashmap_many();
-        test_hashmap_first_key();
-        test_hashmap_last();
-        test_hashmap_steal_first_key();
-        test_hashmap_clear_free_free();
+        test_hashmap_funcs();
+        test_ordered_hashmap_funcs();
+
+        test_ordered_hashmap_next();
         test_uint64_compare_func();
         test_trivial_compare_func();
         test_string_compare_func();
index 7b92758174b978e7aad651a4e6aad0feb6fb7ab9..a6a0cd77a1dce3475818f05c3d8d8a5b73f69d74 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <string.h>
 
-#include <systemd/sd-id128.h>
+#include "systemd/sd-id128.h"
 
 #include "util.h"
 #include "macro.h"
index 099eb401d7e55301af642526ff7faa23e3d1f164..467970b0075729228ba3b71bf969dc4813b7ef62 100644 (file)
@@ -31,7 +31,7 @@
 static void dump_changes(UnitFileChange *c, unsigned n) {
         unsigned i;
 
-        assert(n == 0 || c);
+        assert_se(n == 0 || c);
 
         for (i = 0; i < n; i++) {
                 if (c[i].type == UNIT_FILE_UNLINK)
@@ -51,7 +51,7 @@ int main(int argc, char* argv[]) {
         UnitFileChange *changes = NULL;
         unsigned n_changes = 0;
 
-        h = hashmap_new(string_hash_func, string_compare_func);
+        h = hashmap_new(&string_hash_ops);
         r = unit_file_get_list(UNIT_FILE_SYSTEM, NULL, h);
         assert_se(r == 0);
 
index 10663744362a1511a85e53431feace7abc7864bb..1d9d49b2283a02165c23f95c7e8457a4196fc15f 100644 (file)
@@ -52,29 +52,29 @@ int main(int argc, char*argv[]) {
                                 merged_ab = (job_type_merge_and_collapse(&ab, b, u) >= 0);
 
                                 if (!job_type_is_mergeable(a, b)) {
-                                        assert(!merged_ab);
+                                        assert_se(!merged_ab);
                                         printf("Not mergeable: %s + %s\n", job_type_to_string(a), job_type_to_string(b));
                                         continue;
                                 }
 
-                                assert(merged_ab);
+                                assert_se(merged_ab);
                                 printf("%s + %s = %s\n", job_type_to_string(a), job_type_to_string(b), job_type_to_string(ab));
 
                                 for (c = 0; c < _JOB_TYPE_MAX_MERGING; c++) {
 
                                         /* Verify transitivity of mergeability of job types */
-                                        assert(!job_type_is_mergeable(a, b) ||
+                                        assert_se(!job_type_is_mergeable(a, b) ||
                                                !job_type_is_mergeable(b, c) ||
                                                job_type_is_mergeable(a, c));
 
                                         /* Verify that merged entries can be merged with the same entries
                                          * they can be merged with separately */
-                                        assert(!job_type_is_mergeable(a, c) || job_type_is_mergeable(ab, c));
-                                        assert(!job_type_is_mergeable(b, c) || job_type_is_mergeable(ab, c));
+                                        assert_se(!job_type_is_mergeable(a, c) || job_type_is_mergeable(ab, c));
+                                        assert_se(!job_type_is_mergeable(b, c) || job_type_is_mergeable(ab, c));
 
                                         /* Verify that if a merged with b is not mergeable with c, then
                                          * either a or b is not mergeable with c either. */
-                                        assert(job_type_is_mergeable(ab, c) || !job_type_is_mergeable(a, c) || !job_type_is_mergeable(b, c));
+                                        assert_se(job_type_is_mergeable(ab, c) || !job_type_is_mergeable(a, c) || !job_type_is_mergeable(b, c));
 
                                         bc = b;
                                         if (job_type_merge_and_collapse(&bc, c, u) >= 0) {
@@ -82,16 +82,16 @@ int main(int argc, char*argv[]) {
                                                 /* Verify associativity */
 
                                                 ab_c = ab;
-                                                assert(job_type_merge_and_collapse(&ab_c, c, u) == 0);
+                                                assert_se(job_type_merge_and_collapse(&ab_c, c, u) == 0);
 
                                                 bc_a = bc;
-                                                assert(job_type_merge_and_collapse(&bc_a, a, u) == 0);
+                                                assert_se(job_type_merge_and_collapse(&bc_a, a, u) == 0);
 
                                                 a_bc = a;
-                                                assert(job_type_merge_and_collapse(&a_bc, bc, u) == 0);
+                                                assert_se(job_type_merge_and_collapse(&a_bc, bc, u) == 0);
 
-                                                assert(ab_c == bc_a);
-                                                assert(ab_c == a_bc);
+                                                assert_se(ab_c == bc_a);
+                                                assert_se(ab_c == a_bc);
 
                                                 printf("%s + %s + %s = %s\n", job_type_to_string(a), job_type_to_string(b), job_type_to_string(c), job_type_to_string(ab_c));
                                         }
index f5c8bc768d9745396a1cda2a7b8a6e6d38a91ec9..a51814df95f99d3e202ecdd2be626012b1bb91cf 100644 (file)
@@ -1,3 +1,4 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 /***
   This file is part of systemd.
 
@@ -24,7 +25,6 @@
 #include <errno.h>
 #include <string.h>
 #include <getopt.h>
-#include <syslog.h>
 #include <fcntl.h>
 #include <sys/epoll.h>
 
@@ -407,7 +407,7 @@ static void test_hwdb(struct udev *udev, const char *modalias) {
         printf("\n");
 
         hwdb = udev_hwdb_unref(hwdb);
-        assert(hwdb == NULL);
+        assert_se(hwdb == NULL);
 }
 
 int main(int argc, char *argv[]) {
@@ -423,6 +423,7 @@ int main(int argc, char *argv[]) {
         const char *syspath = "/devices/virtual/mem/null";
         const char *subsystem = NULL;
         char path[1024];
+        int c;
 
         udev = udev_new();
         printf("context: %p\n", udev);
@@ -433,34 +434,38 @@ int main(int argc, char *argv[]) {
         udev_set_log_fn(udev, log_fn);
         printf("set log: %p\n", log_fn);
 
-        for (;;) {
-                int option;
 
-                option = getopt_long(argc, argv, "+p:s:dhV", options, NULL);
-                if (option == -1)
-                        break;
+        while ((c = getopt_long(argc, argv, "p:s:dhV", options, NULL)) >= 0)
+                switch (c) {
 
-                switch (option) {
                 case 'p':
                         syspath = optarg;
                         break;
+
                 case 's':
                         subsystem = optarg;
                         break;
+
                 case 'd':
                         if (udev_get_log_priority(udev) < LOG_INFO)
                                 udev_set_log_priority(udev, LOG_INFO);
                         break;
+
                 case 'h':
                         printf("--debug --syspath= --subsystem= --help\n");
                         goto out;
+
                 case 'V':
                         printf("%s\n", VERSION);
                         goto out;
-                default:
+
+                case '?':
                         goto out;
+
+                default:
+                        assert_not_reached("Unhandled option code.");
                 }
-        }
+
 
         /* add sys path if needed */
         if (!startswith(syspath, "/sys")) {
index acad725899aa5686b5d842c83f4e6c293886bc7b..7714e49ad9f04b9450f13cb85198e94c163ce81a 100644 (file)
@@ -59,6 +59,7 @@ int main(int argc, char *argv[]) {
                             (char **) inaccessible,
                             tmp_dir,
                             var_tmp_dir,
+                            NULL,
                             true,
                             PROTECT_HOME_NO,
                             PROTECT_SYSTEM_NO,
index 19462c357183cd3563916a63d997aea18fb341e5..63d64b28b0d390c04915bb663ce075d44ef52920 100644 (file)
@@ -79,35 +79,35 @@ static void test_path(void) {
                 char p2[] = "//aaa/.////ccc";
                 char p3[] = "/./";
 
-                assert(path_equal(path_kill_slashes(p1), "aaa/bbb/ccc"));
-                assert(path_equal(path_kill_slashes(p2), "/aaa/./ccc"));
-                assert(path_equal(path_kill_slashes(p3), "/./"));
+                assert_se(path_equal(path_kill_slashes(p1), "aaa/bbb/ccc"));
+                assert_se(path_equal(path_kill_slashes(p2), "/aaa/./ccc"));
+                assert_se(path_equal(path_kill_slashes(p3), "/./"));
         }
 }
 
 static void test_find_binary(const char *self) {
         char *p;
 
-        assert(find_binary("/bin/sh", &p) == 0);
+        assert_se(find_binary("/bin/sh", &p) == 0);
         puts(p);
-        assert(streq(p, "/bin/sh"));
+        assert_se(streq(p, "/bin/sh"));
         free(p);
 
-        assert(find_binary(self, &p) == 0);
+        assert_se(find_binary(self, &p) == 0);
         puts(p);
-        assert(endswith(p, "/test-path-util"));
-        assert(path_is_absolute(p));
+        assert_se(endswith(p, "/test-path-util"));
+        assert_se(path_is_absolute(p));
         free(p);
 
-        assert(find_binary("sh", &p) == 0);
+        assert_se(find_binary("sh", &p) == 0);
         puts(p);
-        assert(endswith(p, "/sh"));
-        assert(path_is_absolute(p));
+        assert_se(endswith(p, "/sh"));
+        assert_se(path_is_absolute(p));
         free(p);
 
-        assert(find_binary("xxxx-xxxx", &p) == -ENOENT);
+        assert_se(find_binary("xxxx-xxxx", &p) == -ENOENT);
 
-        assert(find_binary("/some/dir/xxxx-xxxx", &p) == -ENOENT);
+        assert_se(find_binary("/some/dir/xxxx-xxxx", &p) == -ENOENT);
 }
 
 static void test_prefixes(void) {
@@ -156,12 +156,33 @@ static void test_prefixes(void) {
 
         b = false;
         PATH_FOREACH_PREFIX_MORE(s, "") {
-                assert(!b);
-                assert(streq(s, ""));
+                assert_se(!b);
+                assert_se(streq(s, ""));
                 b = true;
         }
 }
 
+static void test_path_join(void) {
+
+#define test_join(root, path, rest, expected) {  \
+                _cleanup_free_ char *z = NULL;   \
+                z = path_join(root, path, rest); \
+                assert_se(streq(z, expected));   \
+        }
+
+        test_join("/root", "/a/b", "/c", "/root/a/b/c");
+        test_join("/root", "a/b", "c", "/root/a/b/c");
+        test_join("/root", "/a/b", "c", "/root/a/b/c");
+        test_join("/root", "/", "c", "/root//c");
+        test_join("/root", "/", NULL, "/root/");
+
+        test_join(NULL, "/a/b", "/c", "/a/b/c");
+        test_join(NULL, "a/b", "c", "a/b/c");
+        test_join(NULL, "/a/b", "c", "/a/b/c");
+        test_join(NULL, "/", "c", "//c");
+        test_join(NULL, "/", NULL, "/");
+}
+
 static void test_fsck_exists(void) {
         /* Ensure we use a sane default for PATH. */
         unsetenv("PATH");
@@ -178,10 +199,10 @@ static void test_make_relative(void) {
         assert_se(path_make_relative("some/relative/path", "/some/path", &result) < 0);
         assert_se(path_make_relative("/some/path", "some/relative/path", &result) < 0);
 
-#define test(from_dir, to_path, expected) {                     \
-                path_make_relative(from_dir, to_path, &result); \
-                assert_se(streq(result, expected));             \
-                free(result);                                   \
+#define test(from_dir, to_path, expected) {                \
+                _cleanup_free_ char *z = NULL;             \
+                path_make_relative(from_dir, to_path, &z); \
+                assert_se(streq(z, expected));             \
         }
 
         test("/", "/", ".");
@@ -225,6 +246,7 @@ int main(int argc, char **argv) {
         test_path();
         test_find_binary(argv[0]);
         test_prefixes();
+        test_path_join();
         test_fsck_exists();
         test_make_relative();
         test_strv_resolve();
index cdb1e4ad52df3768253b957373ff9954b5f7f3ba..dfedc9b8dce32000886baec72ddd75a85edcb249 100644 (file)
@@ -98,6 +98,11 @@ static unsigned long test_hash(const void *a, const uint8_t hash_key[HASH_KEY_SI
         return (unsigned long) u;
 }
 
+static const struct hash_ops test_hash_ops = {
+        .hash = test_hash,
+        .compare = test_compare
+};
+
 static void test_struct(void) {
         Prioq *q;
         Set *s;
@@ -109,7 +114,7 @@ static void test_struct(void) {
         q = prioq_new(test_compare);
         assert_se(q);
 
-        s = set_new(test_hash, test_compare);
+        s = set_new(&test_hash_ops);
         assert_se(s);
 
         for (i = 0; i < SET_SIZE; i++) {
diff --git a/src/test/test-pty.c b/src/test/test-pty.c
new file mode 100644 (file)
index 0000000..ed23e9f
--- /dev/null
@@ -0,0 +1,143 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 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/>.
+***/
+
+#include <errno.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include "def.h"
+#include "pty.h"
+#include "util.h"
+
+static const char sndmsg[] = "message\n";
+static const char rcvmsg[] = "message\r\n";
+static char rcvbuf[128];
+static size_t rcvsiz = 0;
+static sd_event *event;
+
+static void run_child(Pty *pty) {
+        ssize_t r, l;
+        char buf[512];
+
+        r = read(0, buf, sizeof(buf));
+        assert_se((size_t)r == strlen(sndmsg));
+        assert_se(!strncmp(buf, sndmsg, r));
+
+        l = write(1, buf, r);
+        assert_se(l == r);
+}
+
+static int pty_fn(Pty *pty, void *userdata, unsigned int ev, const void *ptr, size_t size) {
+        switch (ev) {
+        case PTY_DATA:
+                assert_se(rcvsiz < strlen(rcvmsg) * 2);
+                assert_se(rcvsiz + size < sizeof(rcvbuf));
+
+                memcpy(&rcvbuf[rcvsiz], ptr, size);
+                rcvsiz += size;
+
+                if (rcvsiz >= strlen(rcvmsg) * 2) {
+                        assert_se(rcvsiz == strlen(rcvmsg) * 2);
+                        assert_se(!memcmp(rcvbuf, rcvmsg, strlen(rcvmsg)));
+                        assert_se(!memcmp(&rcvbuf[strlen(rcvmsg)], rcvmsg, strlen(rcvmsg)));
+                }
+
+                break;
+        case PTY_HUP:
+                /* This is guaranteed to appear _after_ the input queues are
+                 * drained! */
+                assert_se(rcvsiz == strlen(rcvmsg) * 2);
+                break;
+        case PTY_CHILD:
+                /* this may appear at any time */
+                break;
+        default:
+                assert_se(0);
+                break;
+        }
+
+        /* if we got HUP _and_ CHILD, exit */
+        if (pty_get_fd(pty) < 0 && pty_get_child(pty) < 0)
+                sd_event_exit(event, 0);
+
+        return 0;
+}
+
+static void run_parent(Pty *pty) {
+        int r;
+
+        /* write message to pty, ECHO mode guarantees that we get it back
+         * twice: once via ECHO, once from the run_child() fn */
+        assert_se(pty_write(pty, sndmsg, strlen(sndmsg)) >= 0);
+
+        r = sd_event_loop(event);
+        assert_se(r >= 0);
+}
+
+static void test_pty(void) {
+        pid_t pid;
+        Pty *pty;
+
+        rcvsiz = 0;
+        memset(rcvbuf, 0, sizeof(rcvbuf));
+
+        assert_se(sd_event_default(&event) >= 0);
+
+        pid = pty_fork(&pty, event, pty_fn, NULL, 80, 25);
+        assert_se(pid >= 0);
+
+        if (pid == 0) {
+                /* child */
+                run_child(pty);
+                exit(0);
+        }
+
+        /* parent */
+        run_parent(pty);
+
+        /* Make sure the PTY recycled the child; yeah, this is racy if the
+         * PID was already reused; but that seems fine for a test. */
+        assert_se(waitpid(pid, NULL, WNOHANG) < 0 && errno == ECHILD);
+
+        pty_unref(pty);
+        sd_event_unref(event);
+}
+
+int main(int argc, char *argv[]) {
+        unsigned int i;
+
+        log_parse_environment();
+        log_open();
+
+        assert_se(sigprocmask_many(SIG_BLOCK, SIGCHLD, -1) >= 0);
+
+        /* Oh, there're ugly races in the TTY layer regarding HUP vs IN. Turns
+         * out they appear only 10% of the time. I fixed all of them and
+         * don't see them, anymore. But lets be safe and run this 1000 times
+         * so we catch any new ones, in case they appear again. */
+        for (i = 0; i < 1000; ++i)
+                test_pty();
+
+        return 0;
+}
index 880815811cad056dc17e3044f51057a26504fb10..5e4efdbde9a4c53bc3846513fc3fc11391d97c4a 100644 (file)
@@ -31,7 +31,7 @@
 
 static void test_ring(void) {
         static const char buf[8192];
-        struct ring r;
+        Ring r;
         size_t l;
         struct iovec vec[2];
         int s;
index e984ee420375478b828d075d00e1156301511d71..6b3128d3b7956f3e852406cb463fd143f26197f7 100644 (file)
@@ -31,16 +31,15 @@ int main(int argc, char *argv[]) {
         FILE *serial = NULL;
         FDSet *fdset = NULL;
         int r;
-        const char *dir = TEST_DIR;
 
         /* prepare the test */
-        assert_se(set_unit_path(dir) >= 0);
-        r = manager_new(SYSTEMD_USER, &m);
-        if (r == -EPERM || r == -EACCES || r == -EADDRINUSE || r == -EHOSTDOWN) {
+        assert_se(set_unit_path(TEST_DIR) >= 0);
+        r = manager_new(SYSTEMD_USER, true, &m);
+        if (IN_SET(r, -EPERM, -EACCES, -EADDRINUSE, -EHOSTDOWN, -ENOENT)) {
                 printf("Skipping test: manager_new: %s", strerror(-r));
                 return EXIT_TEST_SKIP;
         }
-        assert(r >= 0);
+        assert_se(r >= 0);
         assert_se(manager_startup(m, serial, fdset) >= 0);
 
         /* load idle ok */
diff --git a/src/test/test-set.c b/src/test/test-set.c
new file mode 100644 (file)
index 0000000..e280c89
--- /dev/null
@@ -0,0 +1,47 @@
+/***
+  This file is part of systemd
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  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/>.
+***/
+
+#include "util.h"
+#include "set.h"
+
+static void test_set_steal_first(void) {
+        _cleanup_set_free_ Set *m = NULL;
+        int seen[3] = {};
+        char *val;
+
+        m = set_new(&string_hash_ops);
+        assert_se(m);
+
+        assert_se(set_put(m, (void*) "1") == 1);
+        assert_se(set_put(m, (void*) "22") == 1);
+        assert_se(set_put(m, (void*) "333") == 1);
+
+        while ((val = set_steal_first(m)))
+                seen[strlen(val) - 1]++;
+
+        assert_se(seen[0] == 1 && seen[1] == 1 && seen[2] == 1);
+
+        assert_se(set_isempty(m));
+}
+
+int main(int argc, const char *argv[]) {
+        test_set_steal_first();
+
+        return 0;
+}
index 9f42dbf4e9e5a9c86eb21a4045cb6a6a555a263d..c2c728bcde9a33547e99aaa79dd82644f9171b1d 100644 (file)
 ***/
 
 #include "socket-util.h"
+#include "in-addr-util.h"
 #include "util.h"
 #include "macro.h"
 #include "log.h"
+#include "async.h"
 
 static void test_socket_address_parse(void) {
         SocketAddress a;
@@ -138,6 +140,24 @@ static void test_socket_address_get_path(void) {
         assert_se(streq(socket_address_get_path(&a), "/foo/bar"));
 }
 
+static void test_socket_address_is(void) {
+        SocketAddress a;
+
+        assert_se(socket_address_parse(&a, "192.168.1.1:8888") >= 0);
+        assert_se(socket_address_is(&a, "192.168.1.1:8888", SOCK_STREAM));
+        assert_se(!socket_address_is(&a, "route", SOCK_STREAM));
+        assert_se(!socket_address_is(&a, "192.168.1.1:8888", SOCK_RAW));
+}
+
+static void test_socket_address_is_netlink(void) {
+        SocketAddress a;
+
+        assert_se(socket_address_parse_netlink(&a, "route 10") >= 0);
+        assert_se(socket_address_is_netlink(&a, "route 10"));
+        assert_se(!socket_address_is_netlink(&a, "192.168.1.1:8888"));
+        assert_se(!socket_address_is_netlink(&a, "route 1"));
+}
+
 static void test_in_addr_prefix_intersect_one(unsigned f, const char *a, unsigned apl, const char *b, unsigned bpl, int result) {
         union in_addr_union ua, ub;
 
@@ -211,6 +231,86 @@ static void test_in_addr_prefix_next(void) {
 
 }
 
+static void *connect_thread(void *arg) {
+        union sockaddr_union *sa = arg;
+        _cleanup_close_ int fd = -1;
+
+        fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
+        assert_se(fd >= 0);
+
+        assert_se(connect(fd, &sa->sa, sizeof(sa->in)) == 0);
+
+        return NULL;
+}
+
+static void test_nameinfo_pretty(void) {
+        _cleanup_free_ char *stdin_name = NULL, *localhost = NULL;
+
+        union sockaddr_union s = {
+                .in.sin_family = AF_INET,
+                .in.sin_port = 0,
+                .in.sin_addr.s_addr = htonl(INADDR_ANY),
+        };
+        int r;
+
+        union sockaddr_union c = {};
+        socklen_t slen = sizeof(c.in), clen = sizeof(c.in);
+
+        _cleanup_close_ int sfd = -1, cfd = -1;
+        r = getnameinfo_pretty(STDIN_FILENO, &stdin_name);
+        log_info("No connection remote: %s", strerror(-r));
+
+        assert_se(r < 0);
+
+        sfd = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0);
+        assert_se(sfd >= 0);
+
+        assert_se(bind(sfd, &s.sa, sizeof(s.in)) == 0);
+
+        /* find out the port number */
+        assert_se(getsockname(sfd, &s.sa, &slen) == 0);
+
+        assert_se(listen(sfd, 1) == 0);
+
+        assert_se(asynchronous_job(connect_thread, &s) == 0);
+
+        log_debug("Accepting new connection on fd:%d", sfd);
+        cfd = accept4(sfd, &c.sa, &clen, SOCK_CLOEXEC);
+        assert_se(cfd >= 0);
+
+        r = getnameinfo_pretty(cfd, &localhost);
+        log_info("Connection from %s", localhost);
+        assert_se(r == 0);
+}
+
+static void test_sockaddr_equal(void) {
+        union sockaddr_union a = {
+                .in.sin_family = AF_INET,
+                .in.sin_port = 0,
+                .in.sin_addr.s_addr = htonl(INADDR_ANY),
+        };
+        union sockaddr_union b = {
+                .in.sin_family = AF_INET,
+                .in.sin_port = 0,
+                .in.sin_addr.s_addr = htonl(INADDR_ANY),
+        };
+        union sockaddr_union c = {
+                .in.sin_family = AF_INET,
+                .in.sin_port = 0,
+                .in.sin_addr.s_addr = htonl(1234),
+        };
+        union sockaddr_union d = {
+                .in6.sin6_family = AF_INET6,
+                .in6.sin6_port = 0,
+                .in6.sin6_addr = IN6ADDR_ANY_INIT,
+        };
+        assert_se(sockaddr_equal(&a, &a));
+        assert_se(sockaddr_equal(&a, &b));
+        assert_se(sockaddr_equal(&d, &d));
+        assert_se(!sockaddr_equal(&a, &c));
+        assert_se(!sockaddr_equal(&b, &c));
+}
+
 int main(int argc, char *argv[]) {
 
         log_set_max_level(LOG_DEBUG);
@@ -219,9 +319,15 @@ int main(int argc, char *argv[]) {
         test_socket_address_parse_netlink();
         test_socket_address_equal();
         test_socket_address_get_path();
+        test_socket_address_is();
+        test_socket_address_is_netlink();
 
         test_in_addr_prefix_intersect();
         test_in_addr_prefix_next();
 
+        test_nameinfo_pretty();
+
+        test_sockaddr_equal();
+
         return 0;
 }
index 3334e0bf6cd98d72d1239b3ae164d904688d623b..43cb92b74b38874e3a19153e5dc147203c369e93 100644 (file)
@@ -48,39 +48,39 @@ static void test_strbuf(void) {
         /* check the content of the buffer directly */
         l = strv_parse_nulstr(sb->buf, sb->len);
 
-        assert(streq(l[0], "")); /* root*/
-        assert(streq(l[1], "waldo"));
-        assert(streq(l[2], "foo"));
-        assert(streq(l[3], "bar"));
-        assert(streq(l[4], "waldorf"));
+        assert_se(streq(l[0], "")); /* root*/
+        assert_se(streq(l[1], "waldo"));
+        assert_se(streq(l[2], "foo"));
+        assert_se(streq(l[3], "bar"));
+        assert_se(streq(l[4], "waldorf"));
 
-        assert(sb->nodes_count == 5); /* root + 4 non-duplicates */
-        assert(sb->dedup_count == 3);
-        assert(sb->in_count == 7);
+        assert_se(sb->nodes_count == 5); /* root + 4 non-duplicates */
+        assert_se(sb->dedup_count == 3);
+        assert_se(sb->in_count == 7);
 
-        assert(sb->in_len == 29);    /* length of all strings added */
-        assert(sb->dedup_len == 11); /* length of all strings duplicated */
-        assert(sb->len == 23);       /* buffer length: in - dedup + \0 for each node */
+        assert_se(sb->in_len == 29);    /* length of all strings added */
+        assert_se(sb->dedup_len == 11); /* length of all strings duplicated */
+        assert_se(sb->len == 23);       /* buffer length: in - dedup + \0 for each node */
 
         /* check the returned offsets and the respective content in the buffer */
-        assert(a == 1);
-        assert(b == 7);
-        assert(c == 11);
-        assert(d == 1);
-        assert(e == 2);
-        assert(f == 4);
-        assert(g == 15);
-
-        assert(streq(sb->buf + a, "waldo"));
-        assert(streq(sb->buf + b, "foo"));
-        assert(streq(sb->buf + c, "bar"));
-        assert(streq(sb->buf + d, "waldo"));
-        assert(streq(sb->buf + e, "aldo"));
-        assert(streq(sb->buf + f, "do"));
-        assert(streq(sb->buf + g, "waldorf"));
+        assert_se(a == 1);
+        assert_se(b == 7);
+        assert_se(c == 11);
+        assert_se(d == 1);
+        assert_se(e == 2);
+        assert_se(f == 4);
+        assert_se(g == 15);
+
+        assert_se(streq(sb->buf + a, "waldo"));
+        assert_se(streq(sb->buf + b, "foo"));
+        assert_se(streq(sb->buf + c, "bar"));
+        assert_se(streq(sb->buf + d, "waldo"));
+        assert_se(streq(sb->buf + e, "aldo"));
+        assert_se(streq(sb->buf + f, "do"));
+        assert_se(streq(sb->buf + g, "waldorf"));
 
         strbuf_complete(sb);
-        assert(sb->root == NULL);
+        assert_se(sb->root == NULL);
 
         strbuf_cleanup(sb);
 }
index 24ed681482ec240c8eb0a9c9c687a92853ee49bc..bbfe306d7d0478a426d6cf93a810e371ebfba9a6 100644 (file)
@@ -141,6 +141,7 @@ static void test_strv_quote_unquote(const char* const *split, const char *quoted
         _cleanup_free_ char *p;
         _cleanup_strv_free_ char **s;
         char **t;
+        int r;
 
         p = strv_join_quoted((char **)split);
         assert_se(p);
@@ -148,7 +149,8 @@ static void test_strv_quote_unquote(const char* const *split, const char *quoted
         assert_se(p);
         assert_se(streq(p, quoted));
 
-        s = strv_split_quoted(quoted);
+        r = strv_split_quoted(&s, quoted);
+        assert_se(r == 0);
         assert_se(s);
         STRV_FOREACH(t, s) {
                 assert_se(*t);
@@ -157,13 +159,19 @@ static void test_strv_quote_unquote(const char* const *split, const char *quoted
         }
 }
 
-static void test_strv_quote_unquote2(const char *quoted, const char ** list) {
+static void test_strv_unquote(const char *quoted, const char **list) {
         _cleanup_strv_free_ char **s;
+        _cleanup_free_ char *j;
         unsigned i = 0;
         char **t;
+        int r;
 
-        s = strv_split_quoted(quoted);
+        r = strv_split_quoted(&s, quoted);
+        assert_se(r == 0);
         assert_se(s);
+        j = strv_join(s, " | ");
+        assert_se(j);
+        puts(j);
 
         STRV_FOREACH(t, s)
                 assert_se(streq(list[i++], *t));
@@ -171,6 +179,15 @@ static void test_strv_quote_unquote2(const char *quoted, const char ** list) {
         assert_se(list[i] == NULL);
 }
 
+static void test_invalid_unquote(const char *quoted) {
+        char **s = NULL;
+        int r;
+
+        r = strv_split_quoted(&s, quoted);
+        assert_se(s == NULL);
+        assert_se(r == -EINVAL);
+}
+
 static void test_strv_split(void) {
         char **s;
         unsigned i = 0;
@@ -179,7 +196,7 @@ static void test_strv_split(void) {
 
         l = strv_split(str, ",");
 
-        assert(l);
+        assert_se(l);
 
         STRV_FOREACH(s, l) {
                 assert_se(streq(*s, input_table_multiple[i++]));
@@ -194,7 +211,7 @@ static void test_strv_split_newlines(void) {
 
         l = strv_split_newlines(str);
 
-        assert(l);
+        assert_se(l);
 
         STRV_FOREACH(s, l) {
                 assert_se(streq(*s, input_table_multiple[i++]));
@@ -414,17 +431,25 @@ int main(int argc, char *argv[]) {
         test_strv_quote_unquote(input_table_quotes, QUOTES_STRING);
         test_strv_quote_unquote(input_table_spaces, SPACES_STRING);
 
-        test_strv_quote_unquote2("    foo=bar     \"waldo\"    zzz    ", (const char*[]) { "foo=bar", "waldo", "zzz", NULL });
-        test_strv_quote_unquote2("", (const char*[]) { NULL });
-        test_strv_quote_unquote2(" ", (const char*[]) { NULL });
-        test_strv_quote_unquote2("   ", (const char*[]) { NULL });
-        test_strv_quote_unquote2("   x", (const char*[]) { "x", NULL });
-        test_strv_quote_unquote2("x   ", (const char*[]) { "x", NULL });
-        test_strv_quote_unquote2("  x   ", (const char*[]) { "x", NULL });
-        test_strv_quote_unquote2("  \"x\"   ", (const char*[]) { "x", NULL });
-        test_strv_quote_unquote2("  \'x\'   ", (const char*[]) { "x", NULL });
-        test_strv_quote_unquote2("  \'x\"\'   ", (const char*[]) { "x\"", NULL });
-        test_strv_quote_unquote2("  \"x\'\"   ", (const char*[]) { "x\'", NULL });
+        test_strv_unquote("    foo=bar     \"waldo\"    zzz    ", (const char*[]) { "foo=bar", "waldo", "zzz", NULL });
+        test_strv_unquote("", (const char*[]) { NULL });
+        test_strv_unquote(" ", (const char*[]) { NULL });
+        test_strv_unquote("   ", (const char*[]) { NULL });
+        test_strv_unquote("   x", (const char*[]) { "x", NULL });
+        test_strv_unquote("x   ", (const char*[]) { "x", NULL });
+        test_strv_unquote("  x   ", (const char*[]) { "x", NULL });
+        test_strv_unquote("  \"x\"   ", (const char*[]) { "x", NULL });
+        test_strv_unquote("  'x'   ", (const char*[]) { "x", NULL });
+        test_strv_unquote("  'x\"'   ", (const char*[]) { "x\"", NULL });
+        test_strv_unquote("  \"x'\"   ", (const char*[]) { "x'", NULL });
+        test_strv_unquote("a  '--b=c \"d e\"'", (const char*[]) { "a", "--b=c \"d e\"", NULL });
+
+        test_invalid_unquote("a  --b='c \"d e\"'");
+        test_invalid_unquote("a  --b='c \"d e\" '");
+        test_invalid_unquote("a  --b='c \"d e\"garbage");
+        test_invalid_unquote("'");
+        test_invalid_unquote("\"");
+        test_invalid_unquote("'x'y");
 
         test_strv_split();
         test_strv_split_newlines();
index b7b70d4c157fbeec062cfb949ed0a00292a7002e..cb2309210fcfa6e29f2ee55012e2056197e79b7c 100644 (file)
@@ -38,8 +38,8 @@ static void test_strpcpy(void) {
         space_left = strpcpy(&s, space_left, "r");
         space_left = strpcpy(&s, space_left, "foo");
 
-        assert(streq(target, "12345hey hey heywaldobar"));
-        assert(space_left == 0);
+        assert_se(streq(target, "12345hey hey heywaldobar"));
+        assert_se(space_left == 0);
 }
 
 static void test_strpcpyf(void) {
@@ -51,8 +51,8 @@ static void test_strpcpyf(void) {
         space_left = strpcpyf(&s, space_left, "space left: %zd. ", space_left);
         space_left = strpcpyf(&s, space_left, "foo%s", "bar");
 
-        assert(streq(target, "space left: 25. foobar"));
-        assert(space_left == 3);
+        assert_se(streq(target, "space left: 25. foobar"));
+        assert_se(space_left == 3);
 }
 
 static void test_strpcpyl(void) {
@@ -64,8 +64,8 @@ static void test_strpcpyl(void) {
         space_left = strpcpyl(&s, space_left, "waldo", " test", " waldo. ", NULL);
         space_left = strpcpyl(&s, space_left, "Banana", NULL);
 
-        assert(streq(target, "waldo test waldo. Banana"));
-        assert(space_left == 1);
+        assert_se(streq(target, "waldo test waldo. Banana"));
+        assert_se(space_left == 1);
 }
 
 static void test_strscpy(void) {
@@ -75,8 +75,8 @@ static void test_strscpy(void) {
         space_left = sizeof(target);
         space_left = strscpy(target, space_left, "12345");
 
-        assert(streq(target, "12345"));
-        assert(space_left == 20);
+        assert_se(streq(target, "12345"));
+        assert_se(space_left == 20);
 }
 
 static void test_strscpyl(void) {
@@ -86,8 +86,8 @@ static void test_strscpyl(void) {
         space_left = sizeof(target);
         space_left = strscpyl(target, space_left, "12345", "waldo", "waldo", NULL);
 
-        assert(streq(target, "12345waldowaldo"));
-        assert(space_left == 10);
+        assert_se(streq(target, "12345waldowaldo"));
+        assert_se(space_left == 10);
 }
 
 int main(int argc, char *argv[]) {
index fb751d13bd94376e629bba969a7fc0280f968aff..907958e46166842a14209ad0da206d084cbd47dc 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "automount.h"
 #include "cgroup.h"
+#include "compress.h"
 #include "condition.h"
 #include "device.h"
 #include "execute.h"
 #include "unit-name.h"
 #include "unit.h"
 #include "util.h"
+#include "architecture.h"
+#include "link-config.h"
+#include "bus-policy.h"
+#include "journald-server.h"
 
 #include "test-tables.h"
 
 int main(int argc, char **argv) {
+        test_table(architecture, ARCHITECTURE);
         test_table(automount_result, AUTOMOUNT_RESULT);
         test_table(automount_state, AUTOMOUNT_STATE);
+        test_table(bus_policy_access, BUS_POLICY_ACCESS);
+        test_table(busname_result, BUSNAME_RESULT);
+        test_table(busname_state, BUSNAME_STATE);
         test_table(cgroup_device_policy, CGROUP_DEVICE_POLICY);
         test_table(condition_type, CONDITION_TYPE);
         test_table(device_state, DEVICE_STATE);
         test_table(exec_input, EXEC_INPUT);
         test_table(exec_output, EXEC_OUTPUT);
+        test_table(failure_action, FAILURE_ACTION);
         test_table(job_mode, JOB_MODE);
         test_table(job_result, JOB_RESULT);
         test_table(job_state, JOB_STATE);
@@ -61,14 +71,22 @@ int main(int argc, char **argv) {
         test_table(kill_mode, KILL_MODE);
         test_table(kill_who, KILL_WHO);
         test_table(log_target, LOG_TARGET);
+        test_table(mac_policy, MACPOLICY);
+        test_table(manager_state, MANAGER_STATE);
         test_table(mount_exec_command, MOUNT_EXEC_COMMAND);
         test_table(mount_result, MOUNT_RESULT);
         test_table(mount_state, MOUNT_STATE);
+        test_table(name_policy, NAMEPOLICY);
         test_table(notify_access, NOTIFY_ACCESS);
         test_table(output_mode, OUTPUT_MODE);
         test_table(path_result, PATH_RESULT);
         test_table(path_state, PATH_STATE);
         test_table(path_type, PATH_TYPE);
+        test_table(policy_item_class, POLICY_ITEM_CLASS);
+        test_table(policy_item_type, POLICY_ITEM_TYPE);
+        test_table(protect_home, PROTECT_HOME);
+        test_table(protect_system, PROTECT_SYSTEM);
+        test_table(rlimit, RLIMIT);
         test_table(scope_result, SCOPE_RESULT);
         test_table(scope_state, SCOPE_STATE);
         test_table(service_exec_command, SERVICE_EXEC_COMMAND);
@@ -82,11 +100,11 @@ int main(int argc, char **argv) {
         test_table(socket_exec_command, SOCKET_EXEC_COMMAND);
         test_table(socket_result, SOCKET_RESULT);
         test_table(socket_state, SOCKET_STATE);
-        test_table(failure_action, SERVICE_FAILURE_ACTION);
+        test_table(split_mode, SPLIT);
+        test_table(storage, STORAGE);
         test_table(swap_exec_command, SWAP_EXEC_COMMAND);
         test_table(swap_result, SWAP_RESULT);
         test_table(swap_state, SWAP_STATE);
-        test_table(systemd_running_as, SYSTEMD_RUNNING_AS);
         test_table(target_state, TARGET_STATE);
         test_table(timer_base, TIMER_BASE);
         test_table(timer_result, TIMER_RESULT);
@@ -94,9 +112,12 @@ int main(int argc, char **argv) {
         test_table(unit_active_state, UNIT_ACTIVE_STATE);
         test_table(unit_dependency, UNIT_DEPENDENCY);
         test_table(unit_file_change_type, UNIT_FILE_CHANGE_TYPE);
+        test_table(unit_file_preset_mode, UNIT_FILE_PRESET);
         test_table(unit_file_state, UNIT_FILE_STATE);
         test_table(unit_load_state, UNIT_LOAD_STATE);
         test_table(unit_type, UNIT_TYPE);
 
+        test_table_sparse(object_compressed, OBJECT_COMPRESSED);
+
         return EXIT_SUCCESS;
 }
index 7c29f96a341a747cd7faf61b44c4f714a310fd79..8cfc4cc4fe4aa7e29c847e630de1b3c7b996f57d 100644 (file)
@@ -20,6 +20,7 @@
 ***/
 
 #include "time-util.h"
+#include "strv.h"
 
 static void test_parse_sec(void) {
         usec_t u;
@@ -42,12 +43,18 @@ static void test_parse_sec(void) {
         assert_se(u == 2500 * USEC_PER_MSEC);
         assert_se(parse_sec(".7", &u) >= 0);
         assert_se(u == 700 * USEC_PER_MSEC);
+        assert_se(parse_sec("infinity", &u) >= 0);
+        assert_se(u == USEC_INFINITY);
+        assert_se(parse_sec(" infinity ", &u) >= 0);
+        assert_se(u == USEC_INFINITY);
 
         assert_se(parse_sec(" xyz ", &u) < 0);
         assert_se(parse_sec("", &u) < 0);
         assert_se(parse_sec(" . ", &u) < 0);
         assert_se(parse_sec(" 5. ", &u) < 0);
         assert_se(parse_sec(".s ", &u) < 0);
+        assert_se(parse_sec(" infinity .7", &u) < 0);
+        assert_se(parse_sec(".3 infinity", &u) < 0);
 }
 
 static void test_parse_nsec(void) {
@@ -124,6 +131,26 @@ static void test_format_timespan(usec_t accuracy) {
         test_format_timespan_one(986087, accuracy);
         test_format_timespan_one(500 * USEC_PER_MSEC, accuracy);
         test_format_timespan_one(9*USEC_PER_YEAR/5 - 23, accuracy);
+        test_format_timespan_one(USEC_INFINITY, accuracy);
+}
+
+static void test_timezone_is_valid(void) {
+        assert_se(timezone_is_valid("Europe/Berlin"));
+        assert_se(timezone_is_valid("Australia/Sydney"));
+        assert_se(!timezone_is_valid("Europe/Do not exist"));
+}
+
+static void test_get_timezones(void) {
+        _cleanup_strv_free_ char **zones = NULL;
+        int r;
+        char **zone;
+
+        r = get_timezones(&zones);
+        assert_se(r == 0);
+
+        STRV_FOREACH(zone, zones) {
+                assert_se(timezone_is_valid(*zone));
+        }
 }
 
 int main(int argc, char *argv[]) {
@@ -132,5 +159,8 @@ int main(int argc, char *argv[]) {
         test_format_timespan(1);
         test_format_timespan(USEC_PER_MSEC);
         test_format_timespan(USEC_PER_SEC);
+        test_timezone_is_valid();
+        test_get_timezones();
+
         return 0;
 }
index 565f0f8b40f391d164416ba31c86c72862086d36..84050c6fa4a010a70a5b74d9b2a98034570378ee 100644 (file)
@@ -35,13 +35,13 @@ int main(int argc, char** argv) {
         _cleanup_free_ char *cmd, *cmd2;
 
         fd = open_tmpfile(p, O_RDWR|O_CLOEXEC);
-        assert(fd >= 0);
+        assert_se(fd >= 0);
 
         assert_se(asprintf(&cmd, "ls -l /proc/"PID_FMT"/fd/%d", getpid(), fd) > 0);
         system(cmd);
 
         fd2 = mkostemp_safe(pattern, O_RDWR|O_CLOEXEC);
-        assert(fd >= 0);
+        assert_se(fd >= 0);
         assert_se(unlink(pattern) == 0);
 
         assert_se(asprintf(&cmd2, "ls -l /proc/"PID_FMT"/fd/%d", getpid(), fd2) > 0);
index b057cc8c0f98fa4eb05c9357127cbd85734d2ecc..8a51473419da1989341118364cb5d23f7f5fe846 100644 (file)
@@ -26,7 +26,6 @@
 #include <ctype.h>
 #include <errno.h>
 #include <unistd.h>
-#include <syslog.h>
 #include <grp.h>
 #include <sched.h>
 #include <sys/mount.h>
@@ -80,7 +79,6 @@ out:
         return err;
 }
 
-
 int main(int argc, char *argv[]) {
         _cleanup_udev_unref_ struct udev *udev = NULL;
         _cleanup_udev_event_unref_ struct udev_event *event = NULL;
@@ -101,7 +99,7 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
 
         log_debug("version %s", VERSION);
-        label_init("/dev");
+        mac_selinux_init("/dev");
 
         sigprocmask(SIG_SETMASK, NULL, &sigmask_orig);
 
@@ -151,16 +149,16 @@ int main(int argc, char *argv[]) {
                         mknod(udev_device_get_devnode(dev), mode, udev_device_get_devnum(dev));
                 } else {
                         unlink(udev_device_get_devnode(dev));
-                        util_delete_path(udev, udev_device_get_devnode(dev));
+                        rmdir_parents(udev_device_get_devnode(dev), "/");
                 }
         }
 
-        udev_event_execute_rules(event, rules, &sigmask_orig);
-        udev_event_execute_run(event, NULL);
+        udev_event_execute_rules(event, 3 * USEC_PER_SEC, USEC_PER_SEC, rules, &sigmask_orig);
+        udev_event_execute_run(event, 3 * USEC_PER_SEC, USEC_PER_SEC, NULL);
 out:
         if (event != NULL && event->fd_signal >= 0)
                 close(event->fd_signal);
-        label_finish();
+        mac_selinux_finish();
 
         return err ? EXIT_FAILURE : EXIT_SUCCESS;
 }
diff --git a/src/test/test-uid-range.c b/src/test/test-uid-range.c
new file mode 100644 (file)
index 0000000..06b4d43
--- /dev/null
@@ -0,0 +1,91 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Lennart Poettering
+
+  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/>.
+***/
+
+#include <stddef.h>
+
+#include "util.h"
+#include "uid-range.h"
+
+int main(int argc, char *argv[]) {
+        _cleanup_free_ UidRange *p = NULL;
+        unsigned n = 0;
+        uid_t search;
+
+        assert_se(uid_range_add_str(&p, &n, "500-999") >= 0);
+        assert_se(n == 1);
+        assert_se(p[0].start == 500);
+        assert_se(p[0].nr == 500);
+
+        assert_se(!uid_range_contains(p, n, 499));
+        assert_se(uid_range_contains(p, n, 500));
+        assert_se(uid_range_contains(p, n, 999));
+        assert_se(!uid_range_contains(p, n, 1000));
+
+        search = (uid_t) -1;
+        assert_se(uid_range_next_lower(p, n, &search));
+        assert_se(search == 999);
+        assert_se(uid_range_next_lower(p, n, &search));
+        assert_se(search == 998);
+        search = 501;
+        assert_se(uid_range_next_lower(p, n, &search));
+        assert_se(search == 500);
+        assert_se(uid_range_next_lower(p, n, &search) == -EBUSY);
+
+        assert_se(uid_range_add_str(&p, &n, "1000") >= 0);
+        assert_se(n == 1);
+        assert_se(p[0].start == 500);
+        assert_se(p[0].nr == 501);
+
+        assert_se(uid_range_add_str(&p, &n, "30-40") >= 0);
+        assert_se(n == 2);
+        assert_se(p[0].start == 30);
+        assert_se(p[0].nr == 11);
+        assert_se(p[1].start == 500);
+        assert_se(p[1].nr == 501);
+
+        assert_se(uid_range_add_str(&p, &n, "60-70") >= 0);
+        assert_se(n == 3);
+        assert_se(p[0].start == 30);
+        assert_se(p[0].nr == 11);
+        assert_se(p[1].start == 60);
+        assert_se(p[1].nr == 11);
+        assert_se(p[2].start == 500);
+        assert_se(p[2].nr == 501);
+
+        assert_se(uid_range_add_str(&p, &n, "20-2000") >= 0);
+        assert_se(n == 1);
+        assert_se(p[0].start == 20);
+        assert_se(p[0].nr == 1981);
+
+        assert_se(uid_range_add_str(&p, &n, "2002") >= 0);
+        assert_se(n == 2);
+        assert_se(p[0].start == 20);
+        assert_se(p[0].nr == 1981);
+        assert_se(p[1].start == 2002);
+        assert_se(p[1].nr == 1);
+
+        assert_se(uid_range_add_str(&p, &n, "2001") >= 0);
+        assert_se(n == 1);
+        assert_se(p[0].start == 20);
+        assert_se(p[0].nr == 1983);
+
+        return 0;
+}
index 34865729f29c0b97748f3a4cd6398c58d7f0f608..03b3e259399c019c75c7fb3e8ffa08e48fb12c46 100644 (file)
@@ -44,8 +44,8 @@ static int test_unit_file_get_set(void) {
         Iterator i;
         UnitFileList *p;
 
-        h = hashmap_new(string_hash_func, string_compare_func);
-        assert(h);
+        h = hashmap_new(&string_hash_ops);
+        assert_se(h);
 
         r = unit_file_get_list(UNIT_FILE_SYSTEM, NULL, h);
 
@@ -231,18 +231,18 @@ static void test_load_env_file_1(void) {
         _cleanup_close_ int fd;
 
         fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
-        assert(fd >= 0);
+        assert_se(fd >= 0);
         assert_se(write(fd, env_file_1, sizeof(env_file_1)) == sizeof(env_file_1));
 
         r = load_env_file(NULL, name, NULL, &data);
-        assert(r == 0);
-        assert(streq(data[0], "a=a"));
-        assert(streq(data[1], "b=bc"));
-        assert(streq(data[2], "d=def"));
-        assert(streq(data[3], "g=g "));
-        assert(streq(data[4], "h=h"));
-        assert(streq(data[5], "i=i"));
-        assert(data[6] == NULL);
+        assert_se(r == 0);
+        assert_se(streq(data[0], "a=a"));
+        assert_se(streq(data[1], "b=bc"));
+        assert_se(streq(data[2], "d=def"));
+        assert_se(streq(data[3], "g=g "));
+        assert_se(streq(data[4], "h=h"));
+        assert_se(streq(data[5], "i=i"));
+        assert_se(data[6] == NULL);
         unlink(name);
 }
 
@@ -254,13 +254,13 @@ static void test_load_env_file_2(void) {
         _cleanup_close_ int fd;
 
         fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
-        assert(fd >= 0);
+        assert_se(fd >= 0);
         assert_se(write(fd, env_file_2, sizeof(env_file_2)) == sizeof(env_file_2));
 
         r = load_env_file(NULL, name, NULL, &data);
-        assert(r == 0);
-        assert(streq(data[0], "a=a"));
-        assert(data[1] == NULL);
+        assert_se(r == 0);
+        assert_se(streq(data[0], "a=a"));
+        assert_se(data[1] == NULL);
         unlink(name);
 }
 
@@ -272,12 +272,12 @@ static void test_load_env_file_3(void) {
         _cleanup_close_ int fd;
 
         fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
-        assert(fd >= 0);
+        assert_se(fd >= 0);
         assert_se(write(fd, env_file_3, sizeof(env_file_3)) == sizeof(env_file_3));
 
         r = load_env_file(NULL, name, NULL, &data);
-        assert(r == 0);
-        assert(data == NULL);
+        assert_se(r == 0);
+        assert_se(data == NULL);
         unlink(name);
 }
 
@@ -288,15 +288,15 @@ static void test_load_env_file_4(void) {
         int r;
 
         fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
-        assert(fd >= 0);
+        assert_se(fd >= 0);
         assert_se(write(fd, env_file_4, sizeof(env_file_4)) == sizeof(env_file_4));
 
         r = load_env_file(NULL, name, NULL, &data);
-        assert(r == 0);
-        assert(streq(data[0], "HWMON_MODULES=coretemp f71882fg"));
-        assert(streq(data[1], "MODULE_0=coretemp"));
-        assert(streq(data[2], "MODULE_1=f71882fg"));
-        assert(data[3] == NULL);
+        assert_se(r == 0);
+        assert_se(streq(data[0], "HWMON_MODULES=coretemp f71882fg"));
+        assert_se(streq(data[1], "MODULE_0=coretemp"));
+        assert_se(streq(data[2], "MODULE_1=f71882fg"));
+        assert_se(data[3] == NULL);
         unlink(name);
 }
 
@@ -329,11 +329,11 @@ static void test_install_printf(void) {
                 memzero(i.name, strlen(i.name));                        \
                 memzero(i.path, strlen(i.path));                        \
                 memzero(i.user, strlen(i.user));                        \
-                assert(d1 && d2 && d3);                                 \
+                assert_se(d1 && d2 && d3);                                 \
                 if (result) {                                           \
                         printf("%s\n", t);                              \
-                        assert(streq(t, result));                       \
-                } else assert(t == NULL);                               \
+                        assert_se(streq(t, result));                       \
+                } else assert_se(t == NULL);                               \
                 strcpy(i.name, d1);                                     \
                 strcpy(i.path, d2);                                     \
                 strcpy(i.user, d3);                                     \
index db728bcefb352e05925d83188c548aaf99378498..256e820c224ee85c5c5f688a5b3142515800885f 100644 (file)
@@ -43,7 +43,7 @@ static void test_replacements(void) {
                 _cleanup_free_ char *t =                           \
                         unit_name_replace_instance(pattern, repl); \
                 puts(t);                                           \
-                assert(streq(t, expected));                        \
+                assert_se(streq(t, expected));                        \
         }
 
         expect("foo@.service", "waldo", "foo@waldo.service");
@@ -64,7 +64,7 @@ static void test_replacements(void) {
                 puts(t);                                           \
                 k = unit_name_to_path(t);                          \
                 puts(k);                                           \
-                assert(streq(k, expected ? expected : path));      \
+                assert_se(streq(k, expected ? expected : path));      \
         }
 
         expect("/waldo", ".mount", NULL);
@@ -80,7 +80,7 @@ static void test_replacements(void) {
                 _cleanup_free_ char *t =                                     \
                         unit_name_from_path_instance(pattern, path, suffix); \
                 puts(t);                                                     \
-                assert(streq(t, expected));                                  \
+                assert_se(streq(t, expected));                                  \
         }
 
         expect("waldo", "/waldo", ".mount", "waldo@waldo.mount");
@@ -125,12 +125,12 @@ static int test_unit_printf(void) {
         assert_se((root = getpwnam("root")));
         assert_se(asprintf(&root_uid, "%d", (int) root->pw_uid) > 0);
 
-        r = manager_new(SYSTEMD_USER, &m);
+        r = manager_new(SYSTEMD_USER, true, &m);
         if (r == -EPERM || r == -EACCES || r == -EADDRINUSE) {
                 puts("manager_new: Permission denied. Skipping test.");
                 return EXIT_TEST_SKIP;
         }
-        assert(r == 0);
+        assert_se(r == 0);
 
 #define expect(unit, pattern, expected)                                 \
         {                                                               \
@@ -139,9 +139,9 @@ static int test_unit_printf(void) {
                 assert_se(unit_full_printf(unit, pattern, &t) >= 0);    \
                 printf("result: %s\nexpect: %s\n", t, expected);        \
                 if ((e = endswith(expected, "*")))                      \
-                        assert(strncmp(t, e, e-expected));              \
+                        assert_se(strncmp(t, e, e-expected));              \
                 else                                                    \
-                        assert(streq(t, expected));                     \
+                        assert_se(streq(t, expected));                     \
         }
 
         assert_se(setenv("USER", "root", 1) == 0);
index 44921bd15668045f9448c9446f466157ecbcdb14..de6a2a0d89da39771e248a8969f7b14779c0ab84 100644 (file)
@@ -26,6 +26,8 @@
 #include <locale.h>
 #include <errno.h>
 #include <signal.h>
+#include <math.h>
+#include <sys/wait.h>
 
 #include "util.h"
 #include "mkdir.h"
@@ -69,6 +71,79 @@ static void test_align_power2(void) {
         }
 }
 
+static void test_max(void) {
+        static const struct {
+                int a;
+                int b[CONST_MAX(10, 100)];
+        } val1 = {
+                .a = CONST_MAX(10, 100),
+        };
+        int d = 0;
+
+        assert_cc(sizeof(val1.b) == sizeof(int) * 100);
+
+        /* CONST_MAX returns (void) instead of a value if the passed arguments
+         * are not of the same type or not constant expressions. */
+        assert_cc(__builtin_types_compatible_p(typeof(CONST_MAX(1, 10)), int));
+        assert_cc(__builtin_types_compatible_p(typeof(CONST_MAX(1, 1U)), void));
+
+        assert_se(val1.a == 100);
+        assert_se(MAX(++d, 0) == 1);
+        assert_se(d == 1);
+
+        assert_cc(MAXSIZE(char[3], uint16_t) == 3);
+        assert_cc(MAXSIZE(char[3], uint32_t) == 4);
+        assert_cc(MAXSIZE(char, long) == sizeof(long));
+
+        assert_se(MAX(-5, 5) == 5);
+        assert_se(MAX(5, 5) == 5);
+        assert_se(MAX(MAX(1, MAX(2, MAX(3, 4))), 5) == 5);
+        assert_se(MAX(MAX(1, MAX(2, MAX(3, 2))), 1) == 3);
+        assert_se(MAX(MIN(1, MIN(2, MIN(3, 4))), 5) == 5);
+        assert_se(MAX(MAX(1, MIN(2, MIN(3, 2))), 1) == 2);
+        assert_se(LESS_BY(8, 4) == 4);
+        assert_se(LESS_BY(8, 8) == 0);
+        assert_se(LESS_BY(4, 8) == 0);
+        assert_se(LESS_BY(16, LESS_BY(8, 4)) == 12);
+        assert_se(LESS_BY(4, LESS_BY(8, 4)) == 0);
+        assert_se(CLAMP(-5, 0, 1) == 0);
+        assert_se(CLAMP(5, 0, 1) == 1);
+        assert_se(CLAMP(5, -10, 1) == 1);
+        assert_se(CLAMP(5, -10, 10) == 5);
+        assert_se(CLAMP(CLAMP(0, -10, 10), CLAMP(-5, 10, 20), CLAMP(100, -5, 20)) == 10);
+}
+
+static void test_container_of(void) {
+        struct mytype {
+                uint8_t pad1[3];
+                uint64_t v1;
+                uint8_t pad2[2];
+                uint32_t v2;
+        } _packed_ myval = { };
+
+        assert_cc(sizeof(myval) == 17);
+        assert_se(container_of(&myval.v1, struct mytype, v1) == &myval);
+        assert_se(container_of(&myval.v2, struct mytype, v2) == &myval);
+        assert_se(container_of(&container_of(&myval.v2,
+                                             struct mytype,
+                                             v2)->v1,
+                               struct mytype,
+                               v1) == &myval);
+}
+
+static void test_alloca(void) {
+        static const uint8_t zero[997] = { };
+        char *t;
+
+        t = alloca_align(17, 512);
+        assert_se(!((uintptr_t)t & 0xff));
+        memzero(t, 17);
+
+        t = alloca0_align(997, 1024);
+        assert_se(!((uintptr_t)t & 0x1ff));
+        assert_se(!memcmp(t, zero, 997));
+}
+
 static void test_first_word(void) {
         assert_se(first_word("Hello", ""));
         assert_se(first_word("Hello", "Hello"));
@@ -129,6 +204,7 @@ static void test_parse_boolean(void) {
 
         assert_se(parse_boolean("garbage") < 0);
         assert_se(parse_boolean("") < 0);
+        assert_se(parse_boolean("full") < 0);
 }
 
 static void test_parse_pid(void) {
@@ -155,7 +231,7 @@ static void test_parse_pid(void) {
 
         pid = 65; /* pid is left unchanged on ERANGE. Set to known arbitrary value. */
         r = parse_pid("0xFFFFFFFFFFFFFFFFF", &pid);
-        assert(r == -ERANGE);
+        assert_se(r == -ERANGE);
         assert_se(pid == 65);
 }
 
@@ -190,7 +266,7 @@ static void test_safe_atod(void) {
 
         r = safe_atod("0.2244", &d);
         assert_se(r == 0);
-        assert_se(abs(d - 0.2244) < 0.000001);
+        assert_se(fabs(d - 0.2244) < 0.000001);
 
         r = safe_atod("0,5", &d);
         assert_se(r == -EINVAL);
@@ -200,24 +276,25 @@ static void test_safe_atod(void) {
         assert_se(*e == ',');
 
         /* Check if this really is locale independent */
-        setlocale(LC_NUMERIC, "de_DE.utf8");
+        if (setlocale(LC_NUMERIC, "de_DE.utf8")) {
 
-        r = safe_atod("0.2244", &d);
-        assert_se(r == 0);
-        assert_se(abs(d - 0.2244) < 0.000001);
+                r = safe_atod("0.2244", &d);
+                assert_se(r == 0);
+                assert_se(fabs(d - 0.2244) < 0.000001);
 
-        r = safe_atod("0,5", &d);
-        assert_se(r == -EINVAL);
+                r = safe_atod("0,5", &d);
+                assert_se(r == -EINVAL);
 
-        errno = 0;
-        assert_se(abs(strtod("0,5", &e) - 0.5) < 0.00001);
+                errno = 0;
+                assert_se(fabs(strtod("0,5", &e) - 0.5) < 0.00001);
+        }
 
         /* And check again, reset */
-        setlocale(LC_NUMERIC, "C");
+        assert_se(setlocale(LC_NUMERIC, "C"));
 
         r = safe_atod("0.2244", &d);
         assert_se(r == 0);
-        assert_se(abs(d - 0.2244) < 0.000001);
+        assert_se(fabs(d - 0.2244) < 0.000001);
 
         r = safe_atod("0,5", &d);
         assert_se(r == -EINVAL);
@@ -310,7 +387,7 @@ static void test_cunescape(void) {
 }
 
 static void test_foreach_word(void) {
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         int i = 0;
         const char test[] = "test abc d\te   f   ";
@@ -324,13 +401,12 @@ static void test_foreach_word(void) {
                 NULL
         };
 
-        FOREACH_WORD(w, l, test, state) {
-                assert_se(strneq(expected[i++], w, l));
-        }
+        FOREACH_WORD(word, l, test, state)
+                assert_se(strneq(expected[i++], word, l));
 }
 
 static void test_foreach_word_quoted(void) {
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         int i = 0;
         const char test[] = "test a b c 'd' e '' '' hhh '' '' \"a b c\"";
@@ -351,13 +427,14 @@ static void test_foreach_word_quoted(void) {
         };
 
         printf("<%s>\n", test);
-        FOREACH_WORD_QUOTED(w, l, test, state) {
+        FOREACH_WORD_QUOTED(word, l, test, state) {
                 _cleanup_free_ char *t = NULL;
 
-                assert_se(t = strndup(w, l));
-                assert_se(strneq(expected[i++], w, l));
+                assert_se(t = strndup(word, l));
+                assert_se(strneq(expected[i++], word, l));
                 printf("<%s>\n", t);
         }
+        assert_se(isempty(state));
 }
 
 static void test_default_term_for_tty(void) {
@@ -389,26 +466,26 @@ static void test_memdup_multiply(void) {
 }
 
 static void test_hostname_is_valid(void) {
-        assert(hostname_is_valid("foobar"));
-        assert(hostname_is_valid("foobar.com"));
-        assert(!hostname_is_valid("fööbar"));
-        assert(!hostname_is_valid(""));
-        assert(!hostname_is_valid("."));
-        assert(!hostname_is_valid(".."));
-        assert(!hostname_is_valid("foobar."));
-        assert(!hostname_is_valid(".foobar"));
-        assert(!hostname_is_valid("foo..bar"));
-        assert(!hostname_is_valid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
+        assert_se(hostname_is_valid("foobar"));
+        assert_se(hostname_is_valid("foobar.com"));
+        assert_se(!hostname_is_valid("fööbar"));
+        assert_se(!hostname_is_valid(""));
+        assert_se(!hostname_is_valid("."));
+        assert_se(!hostname_is_valid(".."));
+        assert_se(!hostname_is_valid("foobar."));
+        assert_se(!hostname_is_valid(".foobar"));
+        assert_se(!hostname_is_valid("foo..bar"));
+        assert_se(!hostname_is_valid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
 }
 
 static void test_u64log2(void) {
-        assert(u64log2(0) == 0);
-        assert(u64log2(8) == 3);
-        assert(u64log2(9) == 3);
-        assert(u64log2(15) == 3);
-        assert(u64log2(16) == 4);
-        assert(u64log2(1024*1024) == 20);
-        assert(u64log2(1024*1024+5) == 20);
+        assert_se(u64log2(0) == 0);
+        assert_se(u64log2(8) == 3);
+        assert_se(u64log2(9) == 3);
+        assert_se(u64log2(15) == 3);
+        assert_se(u64log2(16) == 4);
+        assert_se(u64log2(1024*1024) == 20);
+        assert_se(u64log2(1024*1024+5) == 20);
 }
 
 static void test_get_process_comm(void) {
@@ -455,7 +532,7 @@ static void test_get_process_comm(void) {
         log_info("pid1 gid: "GID_FMT, g);
         assert_se(g == 0);
 
-        assert(get_ctty_devnr(1, &h) == -ENOENT);
+        assert_se(get_ctty_devnr(1, &h) == -ENOENT);
 
         getenv_for_pid(1, "PATH", &i);
         log_info("pid1 $PATH: '%s'", strna(i));
@@ -467,7 +544,7 @@ static void test_protect_errno(void) {
                 PROTECT_ERRNO;
                 errno = 11;
         }
-        assert(errno == 12);
+        assert_se(errno == 12);
 }
 
 static void test_parse_size(void) {
@@ -652,12 +729,12 @@ static void test_writing_tmpfile(void) {
         printf("tmpfile: %s", name);
 
         r = writev(fd, iov, 3);
-        assert(r >= 0);
+        assert_se(r >= 0);
 
         r = read_full_file(name, &contents, &size);
-        assert(r == 0);
+        assert_se(r == 0);
         printf("contents: %s", contents);
-        assert(streq(contents, "abc\n" ALPHANUMERICAL "\n"));
+        assert_se(streq(contents, "abc\n" ALPHANUMERICAL "\n"));
 
         unlink(name);
 }
@@ -731,6 +808,20 @@ static void test_filename_is_safe(void) {
         assert_se(filename_is_safe("o.o"));
 }
 
+static void test_string_has_cc(void) {
+        assert_se(string_has_cc("abc\1", NULL));
+        assert_se(string_has_cc("abc\x7f", NULL));
+        assert_se(string_has_cc("abc\x7f", NULL));
+        assert_se(string_has_cc("abc\t\x7f", "\t"));
+        assert_se(string_has_cc("abc\t\x7f", "\t"));
+        assert_se(string_has_cc("\x7f", "\t"));
+        assert_se(string_has_cc("\x7f", "\t\a"));
+
+        assert_se(!string_has_cc("abc\t\t", "\t"));
+        assert_se(!string_has_cc("abc\t\t\a", "\t\a"));
+        assert_se(!string_has_cc("a\ab\tc", "\t\a"));
+}
+
 static void test_ascii_strlower(void) {
         char a[] = "AabBcC Jk Ii Od LKJJJ kkd LK";
         assert_se(streq(ascii_strlower(a), "aabbcc jk ii od lkjjj kkd lk"));
@@ -765,11 +856,27 @@ static void test_is_valid_documentation_url(void) {
 }
 
 static void test_file_in_same_dir(void) {
-        assert_se(streq(file_in_same_dir("/", "a"), "/a"));
-        assert_se(streq(file_in_same_dir("/", "/a"), "/a"));
-        assert_se(streq(file_in_same_dir("", "a"), "a"));
-        assert_se(streq(file_in_same_dir("a/", "a"), "a/a"));
-        assert_se(streq(file_in_same_dir("bar/foo", "bar"), "bar/bar"));
+        char *t;
+
+        t = file_in_same_dir("/", "a");
+        assert_se(streq(t, "/a"));
+        free(t);
+
+        t = file_in_same_dir("/", "/a");
+        assert_se(streq(t, "/a"));
+        free(t);
+
+        t = file_in_same_dir("", "a");
+        assert_se(streq(t, "a"));
+        free(t);
+
+        t = file_in_same_dir("a/", "a");
+        assert_se(streq(t, "a/a"));
+        free(t);
+
+        t = file_in_same_dir("bar/foo", "bar");
+        assert_se(streq(t, "bar/bar"));
+        free(t);
 }
 
 static void test_endswith(void) {
@@ -820,7 +927,7 @@ static void test_readlink_and_make_absolute(void) {
         char name_alias[] = "/tmp/test-readlink_and_make_absolute-alias";
         char *r = NULL;
 
-        assert(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
+        assert_se(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
         assert_se(touch(name) >= 0);
 
         assert_se(symlink(name, name_alias) >= 0);
@@ -840,11 +947,11 @@ static void test_readlink_and_make_absolute(void) {
 }
 
 static void test_read_one_char(void) {
+        _cleanup_fclose_ FILE *file = NULL;
         char r;
         bool need_nl;
         char name[] = "/tmp/test-read_one_char.XXXXXX";
-        _cleanup_close_ int fd = -1;
-        FILE *file;
+        int fd;
 
         fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
         assert_se(fd >= 0);
@@ -891,12 +998,294 @@ static void test_strshorten(void) {
         assert_se(strlen(strshorten(s, 0)) == 0);
 }
 
+static void test_strappenda(void) {
+        char *actual;
+
+        actual = strappenda("", "foo", "bar");
+        assert_se(streq(actual, "foobar"));
+
+        actual = strappenda("foo", "bar", "baz");
+        assert_se(streq(actual, "foobarbaz"));
+
+        actual = strappenda("foo", "", "bar", "baz");
+        assert_se(streq(actual, "foobarbaz"));
+}
+
+static void test_is_symlink(void) {
+        char name[] = "/tmp/test-is_symlink.XXXXXX";
+        char name_link[] = "/tmp/test-is_symlink.link";
+        _cleanup_close_ int fd = -1;
+
+        fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
+        assert_se(fd >= 0);
+        assert_se(symlink(name, name_link) >= 0);
+
+        assert_se(is_symlink(name) == 0);
+        assert_se(is_symlink(name_link) == 1);
+        assert_se(is_symlink("/a/file/which/does/not/exist/i/guess") < 0);
+
+
+        unlink(name);
+        unlink(name_link);
+}
+
+static void test_pid_is_unwaited(void) {
+        pid_t pid;
+
+        pid = fork();
+        assert_se(pid >= 0);
+        if (pid == 0) {
+                _exit(EXIT_SUCCESS);
+        } else {
+                int status;
+
+                waitpid(pid, &status, 0);
+                assert_se(!pid_is_unwaited(pid));
+        }
+        assert_se(pid_is_unwaited(getpid()));
+        assert_se(!pid_is_unwaited(-1));
+}
+
+static void test_pid_is_alive(void) {
+        pid_t pid;
+
+        pid = fork();
+        assert_se(pid >= 0);
+        if (pid == 0) {
+                _exit(EXIT_SUCCESS);
+        } else {
+                int status;
+
+                waitpid(pid, &status, 0);
+                assert_se(!pid_is_alive(pid));
+        }
+        assert_se(pid_is_alive(getpid()));
+        assert_se(!pid_is_alive(-1));
+}
+
+static void test_search_and_fopen(void) {
+        const char *dirs[] = {"/tmp/foo/bar", "/tmp", NULL};
+        char name[] = "/tmp/test-search_and_fopen.XXXXXX";
+        int fd = -1;
+        int r;
+        FILE *f;
+
+        fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
+        assert_se(fd >= 0);
+        close(fd);
+
+        r = search_and_fopen(basename(name), "r", NULL, dirs, &f);
+        assert_se(r >= 0);
+        fclose(f);
+
+        r = search_and_fopen(name, "r", NULL, dirs, &f);
+        assert_se(r >= 0);
+        fclose(f);
+
+        r = search_and_fopen(basename(name), "r", "/", dirs, &f);
+        assert_se(r >= 0);
+        fclose(f);
+
+        r = search_and_fopen("/a/file/which/does/not/exist/i/guess", "r", NULL, dirs, &f);
+        assert_se(r < 0);
+        r = search_and_fopen("afilewhichdoesnotexistiguess", "r", NULL, dirs, &f);
+        assert_se(r < 0);
+
+        r = unlink(name);
+        assert_se(r == 0);
+
+        r = search_and_fopen(basename(name), "r", NULL, dirs, &f);
+        assert_se(r < 0);
+}
+
+
+static void test_search_and_fopen_nulstr(void) {
+        const char dirs[] = "/tmp/foo/bar\0/tmp\0";
+        char name[] = "/tmp/test-search_and_fopen.XXXXXX";
+        int fd = -1;
+        int r;
+        FILE *f;
+
+        fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
+        assert_se(fd >= 0);
+        close(fd);
+
+        r = search_and_fopen_nulstr(basename(name), "r", NULL, dirs, &f);
+        assert_se(r >= 0);
+        fclose(f);
+
+        r = search_and_fopen_nulstr(name, "r", NULL, dirs, &f);
+        assert_se(r >= 0);
+        fclose(f);
+
+        r = search_and_fopen_nulstr("/a/file/which/does/not/exist/i/guess", "r", NULL, dirs, &f);
+        assert_se(r < 0);
+        r = search_and_fopen_nulstr("afilewhichdoesnotexistiguess", "r", NULL, dirs, &f);
+        assert_se(r < 0);
+
+        r = unlink(name);
+        assert_se(r == 0);
+
+        r = search_and_fopen_nulstr(basename(name), "r", NULL, dirs, &f);
+        assert_se(r < 0);
+}
+
+static void test_glob_exists(void) {
+        char name[] = "/tmp/test-glob_exists.XXXXXX";
+        int fd = -1;
+        int r;
+
+        fd = mkostemp_safe(name, O_RDWR|O_CLOEXEC);
+        assert_se(fd >= 0);
+        close(fd);
+
+        r = glob_exists("/tmp/test-glob_exists*");
+        assert_se(r == 1);
+
+        r = unlink(name);
+        assert_se(r == 0);
+        r = glob_exists("/tmp/test-glob_exists*");
+        assert_se(r == 0);
+}
+
+static void test_execute_directory(void) {
+        char name[] = "/tmp/test-execute_directory/script1";
+        char name2[] = "/tmp/test-execute_directory/script2";
+        char name3[] = "/tmp/test-execute_directory/useless";
+        char tempdir[] = "/tmp/test-execute_directory/";
+
+        assert_se(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
+        assert_se(write_string_file(name, "#!/bin/sh\necho 'Executing '$0\ntouch /tmp/test-execute_directory/it_works") == 0);
+        assert_se(write_string_file(name2, "#!/bin/sh\necho 'Executing '$0\ntouch /tmp/test-execute_directory/it_works2") == 0);
+        assert_se(chmod(name, 0755) == 0);
+        assert_se(chmod(name2, 0755) == 0);
+        assert_se(touch(name3) >= 0);
+
+        execute_directory(tempdir, NULL, DEFAULT_TIMEOUT_USEC, NULL);
+        assert_se(access("/tmp/test-execute_directory/it_works", F_OK) >= 0);
+        assert_se(access("/tmp/test-execute_directory/it_works2", F_OK) >= 0);
+
+        rm_rf_dangerous(tempdir, false, true, false);
+}
+
+static void test_unquote_first_word(void) {
+        const char *p, *original;
+        char *t;
+
+        p = original = "foobar waldo";
+        assert_se(unquote_first_word(&p, &t) > 0);
+        assert_se(streq(t, "foobar"));
+        free(t);
+        assert_se(p == original + 7);
+
+        assert_se(unquote_first_word(&p, &t) > 0);
+        assert_se(streq(t, "waldo"));
+        free(t);
+        assert_se(p == original + 12);
+
+        assert_se(unquote_first_word(&p, &t) == 0);
+        assert_se(!t);
+        assert_se(p == original + 12);
+
+        p = original = "\"foobar\" \'waldo\'";
+        assert_se(unquote_first_word(&p, &t) > 0);
+        assert_se(streq(t, "foobar"));
+        free(t);
+        assert_se(p == original + 9);
+
+        assert_se(unquote_first_word(&p, &t) > 0);
+        assert_se(streq(t, "waldo"));
+        free(t);
+        assert_se(p == original + 16);
+
+        assert_se(unquote_first_word(&p, &t) == 0);
+        assert_se(!t);
+        assert_se(p == original + 16);
+
+        p = original = "\"";
+        assert_se(unquote_first_word(&p, &t) == -EINVAL);
+        assert_se(p == original + 1);
+
+        p = original = "\'";
+        assert_se(unquote_first_word(&p, &t) == -EINVAL);
+        assert_se(p == original + 1);
+
+        p = original = "yay\'foo\'bar";
+        assert_se(unquote_first_word(&p, &t) > 0);
+        assert_se(streq(t, "yayfoobar"));
+        free(t);
+        assert_se(p == original + 11);
+
+        p = original = "   foobar   ";
+        assert_se(unquote_first_word(&p, &t) > 0);
+        assert_se(streq(t, "foobar"));
+        free(t);
+        assert_se(p == original + 12);
+}
+
+static void test_unquote_many_words(void) {
+        const char *p, *original;
+        char *a, *b, *c;
+
+        p = original = "foobar waldi piep";
+        assert_se(unquote_many_words(&p, &a, &b, &c, NULL) == 3);
+        assert_se(p == original + 17);
+        assert_se(streq_ptr(a, "foobar"));
+        assert_se(streq_ptr(b, "waldi"));
+        assert_se(streq_ptr(c, "piep"));
+        free(a);
+        free(b);
+        free(c);
+
+        p = original = "'foobar' wa\"ld\"i   ";
+        assert_se(unquote_many_words(&p, &a, &b, &c, NULL) == 2);
+        assert_se(p == original + 19);
+        assert_se(streq_ptr(a, "foobar"));
+        assert_se(streq_ptr(b, "waldi"));
+        assert_se(streq_ptr(c, NULL));
+        free(a);
+        free(b);
+
+        p = original = "";
+        assert_se(unquote_many_words(&p, &a, &b, &c, NULL) == 0);
+        assert_se(p == original);
+        assert_se(streq_ptr(a, NULL));
+        assert_se(streq_ptr(b, NULL));
+        assert_se(streq_ptr(c, NULL));
+
+        p = original = "  ";
+        assert_se(unquote_many_words(&p, &a, &b, &c, NULL) == 0);
+        assert_se(p == original+2);
+        assert_se(streq_ptr(a, NULL));
+        assert_se(streq_ptr(b, NULL));
+        assert_se(streq_ptr(c, NULL));
+
+        p = original = "foobar";
+        assert_se(unquote_many_words(&p, NULL) == 0);
+        assert_se(p == original);
+
+        p = original = "foobar waldi";
+        assert_se(unquote_many_words(&p, &a, NULL) == 1);
+        assert_se(p == original+7);
+        assert_se(streq_ptr(a, "foobar"));
+        free(a);
+
+        p = original = "     foobar    ";
+        assert_se(unquote_many_words(&p, &a, NULL) == 1);
+        assert_se(p == original+15);
+        assert_se(streq_ptr(a, "foobar"));
+        free(a);
+}
+
 int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
         test_streq_ptr();
         test_align_power2();
+        test_max();
+        test_container_of();
+        test_alloca();
         test_first_word();
         test_close_many();
         test_parse_boolean();
@@ -937,6 +1326,7 @@ int main(int argc, char *argv[]) {
         test_log2i();
         test_foreach_string();
         test_filename_is_safe();
+        test_string_has_cc();
         test_ascii_strlower();
         test_files_same();
         test_is_valid_documentation_url();
@@ -948,6 +1338,16 @@ int main(int argc, char *argv[]) {
         test_read_one_char();
         test_ignore_signals();
         test_strshorten();
+        test_strappenda();
+        test_is_symlink();
+        test_pid_is_unwaited();
+        test_pid_is_alive();
+        test_search_and_fopen();
+        test_search_and_fopen_nulstr();
+        test_glob_exists();
+        test_execute_directory();
+        test_unquote_first_word();
+        test_unquote_many_words();
 
         return 0;
 }
diff --git a/src/timedate/org.freedesktop.timedate1.policy b/src/timedate/org.freedesktop.timedate1.policy
deleted file mode 100644 (file)
index ab26b4b..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
-        "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
-        <vendor>The systemd Project</vendor>
-        <vendor_url>http://www.freedesktop.org/wiki/Software/systemd</vendor_url>
-
-        <action id="org.freedesktop.timedate1.set-time">
-                <description>Set system time</description>
-                <description xml:lang="de">Die Systemzeit festlegen</description>
-                <description xml:lang="el">Ορισμός ώρας συστήματος</description>
-                <description xml:lang="fr">Définir l'heure du système</description>
-                <description xml:lang="it">Configura l'orario di sistema</description>
-                <description xml:lang="pl">Ustawienie czasu systemu</description>
-                <description xml:lang="ru">Настроить системное время</description>
-                <message>Authentication is required to set the system time.</message>
-                <message xml:lang="de">Legitimierung ist zum Festlegen der Systemzeit notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ορίσετε την ώρα του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour définir l'heure du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per configurare l'orario di sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ustawić czas systemu.</message>
-                <message xml:lang="ru">Чтобы настроить системное время, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.timedate1.set-timezone org.freedesktop.timedate1.set-ntp</annotate>
-        </action>
-
-        <action id="org.freedesktop.timedate1.set-timezone">
-                <description>Set system timezone</description>
-                <description xml:lang="de">Die Systemzeitzone festlegen</description>
-                <description xml:lang="el">Ορισμός ζώνης ώρας συστήματος</description>
-                <description xml:lang="fr">Définir le fuseau horaire du système</description>
-                <description xml:lang="it">Configura il fuso orario di sistema</description>
-                <description xml:lang="pl">Ustawienie strefy czasowej systemu</description>
-                <description xml:lang="ru">Настроить часовой пояс</description>
-                <message>Authentication is required to set the system timezone.</message>
-                <message xml:lang="de">Legitimierung ist zum Festlegen der Systemzeitzone notwendig.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ορίσετε την ώρα ζώνης του συστήματος.</message>
-                <message xml:lang="fr">Authentification requise pour définir le fuseau horaire du système.</message>
-                <message xml:lang="it">Autenticazione richiesta per configurare il fuso orario di sistema.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby ustawić strefę czasową systemu.</message>
-                <message xml:lang="ru">Чтобы настроить часовой пояс, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.timedate1.set-local-rtc">
-                <description>Set RTC to local timezone or UTC</description>
-                <description xml:lang="de">Echtzeituhr auf lokale Zeitzone oder UTC setzen</description>
-                <description xml:lang="el">Ορισμός RTC στην τοπική ζώνη ώρας ή UTC</description>
-                <description xml:lang="fr">Positionner l'horloge matérielle à l'heure locale ou sur le temps universel coordonné (UTC)</description>
-                <description xml:lang="it">Configura l'orologio di sistema (RTC) al fuso orario locale o al tempo civile (UTC)</description>
-                <description xml:lang="pl">Ustawienie RTC na lokalną strefę czasową lub strefę UTC</description>
-                <description xml:lang="ru">Установить аппаратные часы по местному времени или по Гринвичу</description>
-                <message>Authentication is required to control whether the RTC stores the local or UTC time.</message>
-                <message xml:lang="de">Legitimierung ist notwendig zum Festlegen, ob die Echtzeituhr auf lokale Zeitzone oder UTC eingestellt ist.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ελέγξετε αν το RTC αποθηκεύει την τοπική ή την ώρα UTC.</message>
-                <message xml:lang="fr">Authentification requise pour positionner l'horloge matérielle à l'heure locale ou sur le temps universel coordonné (UTC).</message>
-                <message xml:lang="it">Autenticazione richiesta per verificare se l'orologio di sistema (RTC) è configurato all'orario locale o al tempo civile (UTC).</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby kontrolować, czy RTC przechowuje czas lokalny lub czas UTC.</message>
-                <message xml:lang="ru">Чтобы контролировать, установлены аппаратные часы по местному времени или по Гринвичу, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-        <action id="org.freedesktop.timedate1.set-ntp">
-                <description>Turn network time synchronization on or off</description>
-                <description xml:lang="de">Netzwerkzeitabgeich ein- oder ausschalten</description>
-                <description xml:lang="el">Ενεργοποίηση/Απενεργοποίηση συγχρονισμού ώρας δικτύου</description>
-                <description xml:lang="fr">Activer ou désactiver la synchronisation de l'heure avec le réseau</description>
-                <description xml:lang="it">Abilita o meno la sincronizzazione dell'orario in rete</description>
-                <description xml:lang="pl">Włączenie lub wyłączenie synchronizacji czasu przez sieć</description>
-                <description xml:lang="ru">Включить или выключить синхронизацию времени по сети</description>
-                <message>Authentication is required to control whether network time synchronization shall be enabled.</message>
-                <message xml:lang="de">Legitimierung ist zum Festlegen, ob Netzwerkzeitabgeich eingeschaltet sein soll, erforderlich.</message>
-                <message xml:lang="el">Απαιτείται πιστοποίηση για να ελέγξετε αν ο συγχρονισμός ώρας δικτύου θα ενεργοποιηθεί.</message>
-                <message xml:lang="fr">Authentification requise pour activer ou désactiver la synchronisation de l'heure avec le réseau.</message>
-                <message xml:lang="it">Autenticazione richiesta per verificare se la sincronizzazione dell'orario in rete debba essere attivata.</message>
-                <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby kontrolować, czy włączyć synchronizację czasu przez sieć.</message>
-                <message xml:lang="ru">Чтобы включить или выключить синхронизацию времени по сети, необходимо пройти аутентификацию.</message>
-                <defaults>
-                        <allow_any>auth_admin_keep</allow_any>
-                        <allow_inactive>auth_admin_keep</allow_inactive>
-                        <allow_active>auth_admin_keep</allow_active>
-                </defaults>
-        </action>
-
-</policyconfig>
\ No newline at end of file
index a8769e41809cb485cae4fc895047c343d0c63aa8..0ba32d31c4015e186598d6e3a518f2b5291a0c5f 100644 (file)
@@ -203,9 +203,10 @@ static void print_status_info(const StatusInfo *i) {
 
         if (i->rtc_local)
                 fputs("\n" ANSI_HIGHLIGHT_ON
-                      "Warning: The RTC is configured to maintain time in the local time zone. This\n"
-                      "         mode is not fully supported and will create various problems with time\n"
-                      "         zone changes and daylight saving time adjustments. If at all possible, use\n"
+                      "Warning: The system is configured to read the RTC time in the local time zone. This\n"
+                      "         mode can not be fully supported. It will create various problems with time\n"
+                      "         zone changes and daylight saving time adjustments. The RTC time is never updated,\n"
+                      "         it relies on external facilities to maintain it. If at all possible, use\n"
                       "         RTC in UTC by calling 'timedatectl set-local-rtc 0'" ANSI_HIGHLIGHT_OFF ".\n", stdout);
 }
 
@@ -355,76 +356,25 @@ static int set_ntp(sd_bus *bus, char **args, unsigned n) {
 }
 
 static int list_timezones(sd_bus *bus, char **args, unsigned n) {
-        _cleanup_fclose_ FILE *f = NULL;
         _cleanup_strv_free_ char **zones = NULL;
-        size_t n_zones = 0;
+        int r;
 
         assert(args);
         assert(n == 1);
 
-        f = fopen("/usr/share/zoneinfo/zone.tab", "re");
-        if (!f) {
-                log_error("Failed to open time zone database: %m");
-                return -errno;
-        }
-
-        for (;;) {
-                char l[LINE_MAX], *p, **z, *w;
-                size_t k;
-
-                if (!fgets(l, sizeof(l), f)) {
-                        if (feof(f))
-                                break;
-
-                        log_error("Failed to read time zone database: %m");
-                        return -errno;
-                }
-
-                p = strstrip(l);
-
-                if (isempty(p) || *p == '#')
-                        continue;
-
-                /* Skip over country code */
-                p += strcspn(p, WHITESPACE);
-                p += strspn(p, WHITESPACE);
-
-                /* Skip over coordinates */
-                p += strcspn(p, WHITESPACE);
-                p += strspn(p, WHITESPACE);
-
-                /* Found timezone name */
-                k = strcspn(p, WHITESPACE);
-                if (k <= 0)
-                        continue;
-
-                w = strndup(p, k);
-                if (!w)
-                        return log_oom();
-
-                z = realloc(zones, sizeof(char*) * (n_zones + 2));
-                if (!z) {
-                        free(w);
-                        return log_oom();
-                }
-
-                zones = z;
-                zones[n_zones++] = w;
+        r = get_timezones(&zones);
+        if (r < 0) {
+                log_error("Failed to read list of time zones: %s", strerror(-r));
+                return r;
         }
 
-        if (zones)
-                zones[n_zones] = NULL;
-
         pager_open_if_enabled();
-
-        strv_sort(zones);
         strv_print(zones);
 
         return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] COMMAND ...\n\n"
                "Query or change system time and date settings.\n\n"
                "  -h --help                Show this help message\n"
@@ -442,8 +392,6 @@ static int help(void) {
                "  set-local-rtc BOOL       Control whether RTC is in local time\n"
                "  set-ntp BOOL             Control whether NTP is enabled\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -471,12 +419,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hH:M:", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -511,7 +460,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         return 1;
 }
@@ -597,7 +545,7 @@ static int timedatectl_main(sd_bus *bus, int argc, char *argv[]) {
 }
 
 int main(int argc, char *argv[]) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         setlocale(LC_ALL, "");
index 204031fe776bdea110707843e8a6039829db1582..8880812b49ffcfd523d4671f80f822bd5945c60a 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
+#include <sys/capability.h>
 
 #include "sd-id128.h"
 #include "sd-messages.h"
@@ -51,59 +52,11 @@ typedef struct Context {
         Hashmap *polkit_registry;
 } Context;
 
-static void context_free(Context *c, sd_bus *bus) {
+static void context_free(Context *c) {
         assert(c);
 
         free(c->zone);
-        bus_verify_polkit_async_registry_free(bus, c->polkit_registry);
-}
-
-static bool valid_timezone(const char *name) {
-        const char *p;
-        char *t;
-        bool slash = false;
-        int r;
-        struct stat st;
-
-        assert(name);
-
-        if (*name == '/' || *name == 0)
-                return false;
-
-        for (p = name; *p; p++) {
-                if (!(*p >= '0' && *p <= '9') &&
-                    !(*p >= 'a' && *p <= 'z') &&
-                    !(*p >= 'A' && *p <= 'Z') &&
-                    !(*p == '-' || *p == '_' || *p == '+' || *p == '/'))
-                        return false;
-
-                if (*p == '/') {
-
-                        if (slash)
-                                return false;
-
-                        slash = true;
-                } else
-                        slash = false;
-        }
-
-        if (slash)
-                return false;
-
-        t = strappend("/usr/share/zoneinfo/", name);
-        if (!t)
-                return false;
-
-        r = stat(t, &st);
-        free(t);
-
-        if (r < 0)
-                return false;
-
-        if (!S_ISREG(st.st_mode))
-                return false;
-
-        return true;
+        bus_verify_polkit_async_registry_free(c->polkit_registry);
 }
 
 static int context_read_data(Context *c) {
@@ -223,215 +176,149 @@ static int context_write_data_local_rtc(Context *c) {
                 }
         }
 
-        label_init("/etc");
+        mac_selinux_init("/etc");
         return write_string_file_atomic_label("/etc/adjtime", w);
 }
 
-static char** get_ntp_services(void) {
-        _cleanup_strv_free_ char **r = NULL, **files = NULL;
-        char **i;
-        int k;
-
-        k = conf_files_list(&files, ".list", NULL,
-                            "/etc/systemd/ntp-units.d",
-                            "/run/systemd/ntp-units.d",
-                            "/usr/local/lib/systemd/ntp-units.d",
-                            "/usr/lib/systemd/ntp-units.d",
-                            NULL);
-        if (k < 0)
-                return NULL;
-
-        STRV_FOREACH(i, files) {
-                _cleanup_fclose_ FILE *f;
-
-                f = fopen(*i, "re");
-                if (!f)
-                        continue;
-
-                for (;;) {
-                        char line[PATH_MAX], *l;
-
-                        if (!fgets(line, sizeof(line), f)) {
-                                if (ferror(f))
-                                        log_error("Failed to read NTP unit file: %m");
-
-                                break;
-                        }
-
-                        l = strstrip(line);
-                        if (l[0] == 0 || l[0] == '#')
-                                continue;
-
-                        if (strv_extend(&r, l) < 0) {
-                                log_oom();
-                                return NULL;
-                        }
-                }
-        }
-
-        i = r;
-        r = NULL; /* avoid cleanup */
-
-        return strv_uniq(i);
-}
-
 static int context_read_ntp(Context *c, sd_bus *bus) {
-        _cleanup_strv_free_ char **l;
-        char **i;
+        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+        sd_bus_message *reply = NULL;
+        const char *s;
         int r;
 
         assert(c);
         assert(bus);
 
-        l = get_ntp_services();
-        STRV_FOREACH(i, l) {
-                _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-                sd_bus_message *reply = NULL;
-                const char *s;
-
-                r = sd_bus_call_method(
-                                bus,
-                                "org.freedesktop.systemd1",
-                                "/org/freedesktop/systemd1",
-                                "org.freedesktop.systemd1.Manager",
-                                "GetUnitFileState",
-                                &error,
-                                &reply,
-                                "s",
-                                *i);
-
-                if (r < 0) {
-                        /* This implementation does not exist. Try the next one. */
-                        if (sd_bus_error_has_name(&error, SD_BUS_ERROR_FILE_NOT_FOUND))
-                                continue;
+        r = sd_bus_call_method(
+                        bus,
+                        "org.freedesktop.systemd1",
+                        "/org/freedesktop/systemd1",
+                        "org.freedesktop.systemd1.Manager",
+                        "GetUnitFileState",
+                        &error,
+                        &reply,
+                        "s",
+                        "systemd-timesyncd.service");
 
-                        return r;
-                }
+        if (r < 0) {
+                if (sd_bus_error_has_name(&error, SD_BUS_ERROR_FILE_NOT_FOUND) ||
+                    sd_bus_error_has_name(&error, "org.freedesktop.systemd1.LoadFailed") ||
+                    sd_bus_error_has_name(&error, "org.freedesktop.systemd1.NoSuchUnit"))
+                        return 0;
 
-                r = sd_bus_message_read(reply, "s", &s);
-                if (r < 0)
-                        return r;
+                return r;
+        }
 
-                c->can_ntp = true;
-                c->use_ntp = STR_IN_SET(s, "enabled", "enabled-runtime");
+        r = sd_bus_message_read(reply, "s", &s);
+        if (r < 0)
+                return r;
 
-                return 0;
-        }
+        c->can_ntp = true;
+        c->use_ntp = STR_IN_SET(s, "enabled", "enabled-runtime");
 
         return 0;
 }
 
 static int context_start_ntp(Context *c, sd_bus *bus, sd_bus_error *error) {
-        _cleanup_strv_free_ char **l = NULL;
-        char **i;
         int r;
 
         assert(c);
         assert(bus);
         assert(error);
 
-        l = get_ntp_services();
-        STRV_FOREACH(i, l) {
-
-                if (c->use_ntp)
-                        r = sd_bus_call_method(
-                                        bus,
-                                        "org.freedesktop.systemd1",
-                                        "/org/freedesktop/systemd1",
-                                        "org.freedesktop.systemd1.Manager",
-                                        "StartUnit",
-                                        error,
-                                        NULL,
-                                        "ss", *i, "replace");
-                else
-                        r = sd_bus_call_method(
-                                        bus,
-                                        "org.freedesktop.systemd1",
-                                        "/org/freedesktop/systemd1",
-                                        "org.freedesktop.systemd1.Manager",
-                                        "StopUnit",
-                                        error,
-                                        NULL,
-                                        "ss", *i, "replace");
-
-                if (r < 0) {
-                        if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND) ||
-                            sd_bus_error_has_name(error, "org.freedesktop.systemd1.LoadFailed") ||
-                            sd_bus_error_has_name(error, "org.freedesktop.systemd1.NoSuchUnit")) {
-                                /* This implementation does not exist. Try the next one. */
-                                sd_bus_error_free(error);
-                                continue;
-                        }
+        if (c->use_ntp)
+                r = sd_bus_call_method(
+                                bus,
+                                "org.freedesktop.systemd1",
+                                "/org/freedesktop/systemd1",
+                                "org.freedesktop.systemd1.Manager",
+                                "StartUnit",
+                                error,
+                                NULL,
+                                "ss",
+                                "systemd-timesyncd.service",
+                                "replace");
+        else
+                r = sd_bus_call_method(
+                                bus,
+                                "org.freedesktop.systemd1",
+                                "/org/freedesktop/systemd1",
+                                "org.freedesktop.systemd1.Manager",
+                                "StopUnit",
+                                error,
+                                NULL,
+                                "ss",
+                                "systemd-timesyncd.service",
+                                "replace");
 
-                        return r;
+        if (r < 0) {
+                if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND) ||
+                    sd_bus_error_has_name(error, "org.freedesktop.systemd1.LoadFailed") ||
+                    sd_bus_error_has_name(error, "org.freedesktop.systemd1.NoSuchUnit")) {
+                        sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
+                        return -ENOTSUP;
                 }
 
-                return 1;
+                return r;
         }
 
-        sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
-        return -ENOTSUP;
+        return 0;
 }
 
 static int context_enable_ntp(Context*c, sd_bus *bus, sd_bus_error *error) {
-        _cleanup_strv_free_ char **l = NULL;
-        char **i;
         int r;
 
         assert(c);
         assert(bus);
         assert(error);
 
-        l = get_ntp_services();
-        STRV_FOREACH(i, l) {
-                if (c->use_ntp)
-                        r = sd_bus_call_method(
-                                        bus,
-                                        "org.freedesktop.systemd1",
-                                        "/org/freedesktop/systemd1",
-                                        "org.freedesktop.systemd1.Manager",
-                                        "EnableUnitFiles",
-                                        error,
-                                        NULL,
-                                        "asbb", 1, *i, false, true);
-                else
-                        r = sd_bus_call_method(
-                                        bus,
-                                        "org.freedesktop.systemd1",
-                                        "/org/freedesktop/systemd1",
-                                        "org.freedesktop.systemd1.Manager",
-                                        "DisableUnitFiles",
-                                        error,
-                                        NULL,
-                                        "asb", 1, *i, false);
-
-                if (r < 0) {
-                        if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND)) {
-                                /* This implementation does not exist. Try the next one. */
-                                sd_bus_error_free(error);
-                                continue;
-                        }
-
-                        return r;
-                }
-
+        if (c->use_ntp)
                 r = sd_bus_call_method(
                                 bus,
                                 "org.freedesktop.systemd1",
                                 "/org/freedesktop/systemd1",
                                 "org.freedesktop.systemd1.Manager",
-                                "Reload",
+                                "EnableUnitFiles",
                                 error,
                                 NULL,
-                                NULL);
-                if (r < 0)
-                        return r;
+                                "asbb", 1,
+                                "systemd-timesyncd.service",
+                                false, true);
+        else
+                r = sd_bus_call_method(
+                                bus,
+                                "org.freedesktop.systemd1",
+                                "/org/freedesktop/systemd1",
+                                "org.freedesktop.systemd1.Manager",
+                                "DisableUnitFiles",
+                                error,
+                                NULL,
+                                "asb", 1,
+                                "systemd-timesyncd.service",
+                                false);
 
-                return 1;
+        if (r < 0) {
+                if (sd_bus_error_has_name(error, SD_BUS_ERROR_FILE_NOT_FOUND)) {
+                        sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
+                        return -ENOTSUP;
+                }
+
+                return r;
         }
 
-        sd_bus_error_set_const(error, "org.freedesktop.timedate1.NoNTPSupport", "NTP not supported.");
-        return -ENOTSUP;
+        r = sd_bus_call_method(
+                        bus,
+                        "org.freedesktop.systemd1",
+                        "/org/freedesktop/systemd1",
+                        "org.freedesktop.systemd1.Manager",
+                        "Reload",
+                        error,
+                        NULL,
+                        NULL);
+        if (r < 0)
+                return r;
+
+        return 0;
 }
 
 static int property_get_rtc_time(
@@ -502,13 +389,13 @@ static int method_set_timezone(sd_bus *bus, sd_bus_message *m, void *userdata, s
         if (r < 0)
                 return r;
 
-        if (!valid_timezone(z))
+        if (!timezone_is_valid(z))
                 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid time zone '%s'", z);
 
         if (streq_ptr(z, c->zone))
                 return sd_bus_reply_method_return(m, NULL);
 
-        r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.timedate1.set-timezone", interactive, error, method_set_timezone, c);
+        r = bus_verify_polkit_async(m, CAP_SYS_TIME, "org.freedesktop.timedate1.set-timezone", interactive, &c->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -569,7 +456,7 @@ static int method_set_local_rtc(sd_bus *bus, sd_bus_message *m, void *userdata,
         if (lrtc == c->local_rtc)
                 return sd_bus_reply_method_return(m, NULL);
 
-        r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.timedate1.set-local-rtc", interactive, error, method_set_local_rtc, c);
+        r = bus_verify_polkit_async(m, CAP_SYS_TIME, "org.freedesktop.timedate1.set-local-rtc", interactive, &c->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -674,7 +561,7 @@ static int method_set_time(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bu
         } else
                 timespec_store(&ts, (usec_t) utc);
 
-        r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.timedate1.set-time", interactive, error, method_set_time, c);
+        r = bus_verify_polkit_async(m, CAP_SYS_TIME, "org.freedesktop.timedate1.set-time", interactive, &c->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -714,7 +601,7 @@ static int method_set_ntp(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus
         if ((bool)ntp == c->use_ntp)
                 return sd_bus_reply_method_return(m, NULL);
 
-        r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.timedate1.set-ntp", interactive, error, method_set_ntp, c);
+        r = bus_verify_polkit_async(m, CAP_SYS_TIME, "org.freedesktop.timedate1.set-ntp", interactive, &c->polkit_registry, error);
         if (r < 0)
                 return r;
         if (r == 0)
@@ -737,8 +624,6 @@ static int method_set_ntp(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bus
         return sd_bus_reply_method_return(m, NULL);
 }
 
-#include <sys/capability.h>
-
 static const sd_bus_vtable timedate_vtable[] = {
         SD_BUS_VTABLE_START(0),
         SD_BUS_PROPERTY("Timezone", "s", NULL, offsetof(Context, zone), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
@@ -756,7 +641,7 @@ static const sd_bus_vtable timedate_vtable[] = {
 };
 
 static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         assert(c);
@@ -796,7 +681,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
 int main(int argc, char *argv[]) {
         Context context = {};
         _cleanup_event_unref_ sd_event *event = NULL;
-        _cleanup_bus_unref_ sd_bus *bus = NULL;
+        _cleanup_bus_close_unref_ sd_bus *bus = NULL;
         int r;
 
         log_set_target(LOG_TARGET_AUTO);
@@ -842,7 +727,7 @@ int main(int argc, char *argv[]) {
         }
 
 finish:
-        context_free(&context, bus);
+        context_free(&context);
 
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
diff --git a/src/timesync/90-systemd.list b/src/timesync/90-systemd.list
deleted file mode 100644 (file)
index d5959ad..0000000
+++ /dev/null
@@ -1 +0,0 @@
-systemd-timesyncd.service
diff --git a/src/timesync/timesyncd-conf.c b/src/timesync/timesyncd-conf.c
new file mode 100644 (file)
index 0000000..4c2dcdb
--- /dev/null
@@ -0,0 +1,104 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Kay Sievers, Lennart Poettering
+
+  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/>.
+***/
+
+#include "in-addr-util.h"
+
+#include "timesyncd-manager.h"
+#include "timesyncd-server.h"
+#include "timesyncd-conf.h"
+
+int manager_parse_server_string(Manager *m, ServerType type, const char *string) {
+        const char *word, *state;
+        size_t length;
+        ServerName *first;
+        int r;
+
+        assert(m);
+        assert(string);
+
+        first = type == SERVER_FALLBACK ? m->fallback_servers : m->system_servers;
+
+        FOREACH_WORD_QUOTED(word, length, string, state) {
+                char buffer[length+1];
+                bool found = false;
+                ServerName *n;
+
+                memcpy(buffer, word, length);
+                buffer[length] = 0;
+
+                /* Filter out duplicates */
+                LIST_FOREACH(names, n, first)
+                        if (streq_ptr(n->string, buffer)) {
+                                found = true;
+                                break;
+                        }
+
+                if (found)
+                        continue;
+
+                r = server_name_new(m, NULL, type, buffer);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+int config_parse_servers(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        Manager *m = userdata;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+
+        if (isempty(rvalue))
+                manager_flush_server_names(m, ltype);
+        else {
+                r = manager_parse_server_string(m, ltype, rvalue);
+                if (r < 0) {
+                        log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to parse NTP server string '%s'. Ignoring.", rvalue);
+                        return 0;
+                }
+        }
+
+        return 0;
+}
+
+int manager_parse_config_file(Manager *m) {
+        assert(m);
+
+        return config_parse(NULL, "/etc/systemd/timesyncd.conf", NULL,
+                            "Time\0",
+                            config_item_perf_lookup, timesyncd_gperf_lookup,
+                            false, false, true, m);
+}
diff --git a/src/timesync/timesyncd-conf.h b/src/timesync/timesyncd-conf.h
new file mode 100644 (file)
index 0000000..56466fe
--- /dev/null
@@ -0,0 +1,34 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Kay Sievers, Lennart Poettering
+
+  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/>.
+***/
+
+#include "conf-parser.h"
+
+#include "timesyncd-manager.h"
+
+const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, unsigned length);
+
+int manager_parse_server_string(Manager *m, ServerType type, const char *string);
+
+int config_parse_servers(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+
+int manager_parse_config_file(Manager *m);
index 887dc68b5062ba06961e1c1a2254b1f2ef3159c2..29a2cfeef699a12aef1d1fbfd95ed41847660320 100644 (file)
@@ -1,7 +1,7 @@
 %{
 #include <stddef.h>
 #include "conf-parser.h"
-#include "timesyncd.h"
+#include "timesyncd-conf.h"
 %}
 struct ConfigPerfItem;
 %null_strings
@@ -14,4 +14,6 @@ struct ConfigPerfItem;
 %struct-type
 %includes
 %%
-Time.Servers,                    config_parse_servers,      0, 0
+Time.NTP,           config_parse_servers, SERVER_SYSTEM,   0
+Time.Servers,       config_parse_servers, SERVER_SYSTEM,   0
+Time.FallbackNTP,   config_parse_servers, SERVER_FALLBACK, 0
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
new file mode 100644 (file)
index 0000000..3ae01eb
--- /dev/null
@@ -0,0 +1,1165 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Kay Sievers, Lennart Poettering
+
+  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/>.
+***/
+
+#include <stdlib.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <time.h>
+#include <math.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <sys/timerfd.h>
+#include <sys/timex.h>
+#include <sys/socket.h>
+#include <resolv.h>
+#include <sys/prctl.h>
+#include <sys/types.h>
+#include <grp.h>
+
+#include "missing.h"
+#include "util.h"
+#include "sparse-endian.h"
+#include "log.h"
+#include "socket-util.h"
+#include "list.h"
+#include "ratelimit.h"
+#include "strv.h"
+#include "conf-parser.h"
+#include "sd-daemon.h"
+#include "event-util.h"
+#include "network-util.h"
+#include "clock-util.h"
+#include "capability.h"
+#include "mkdir.h"
+#include "timesyncd-conf.h"
+#include "timesyncd-manager.h"
+#include "time-util.h"
+
+#ifndef ADJ_SETOFFSET
+#define ADJ_SETOFFSET                   0x0100  /* add 'time' to current time */
+#endif
+
+/* expected accuracy of time synchronization; used to adjust the poll interval */
+#define NTP_ACCURACY_SEC                0.2
+
+/*
+ * "A client MUST NOT under any conditions use a poll interval less
+ * than 15 seconds."
+ */
+#define NTP_POLL_INTERVAL_MIN_SEC       32
+#define NTP_POLL_INTERVAL_MAX_SEC       2048
+
+/*
+ * Maximum delta in seconds which the system clock is gradually adjusted
+ * (slew) to approach the network time. Deltas larger that this are set by
+ * letting the system time jump. The kernel's limit for adjtime is 0.5s.
+ */
+#define NTP_MAX_ADJUST                  0.4
+
+/* NTP protocol, packet header */
+#define NTP_LEAP_PLUSSEC                1
+#define NTP_LEAP_MINUSSEC               2
+#define NTP_LEAP_NOTINSYNC              3
+#define NTP_MODE_CLIENT                 3
+#define NTP_MODE_SERVER                 4
+#define NTP_FIELD_LEAP(f)               (((f) >> 6) & 3)
+#define NTP_FIELD_VERSION(f)            (((f) >> 3) & 7)
+#define NTP_FIELD_MODE(f)               ((f) & 7)
+#define NTP_FIELD(l, v, m)              (((l) << 6) | ((v) << 3) | (m))
+
+/* Maximum acceptable root distance in seconds. */
+#define NTP_MAX_ROOT_DISTANCE           5.0
+
+/* Maximum number of missed replies before selecting another source. */
+#define NTP_MAX_MISSED_REPLIES          2
+
+/*
+ * "NTP timestamps are represented as a 64-bit unsigned fixed-point number,
+ * in seconds relative to 0h on 1 January 1900."
+ */
+#define OFFSET_1900_1970        2208988800UL
+
+#define RETRY_USEC (30*USEC_PER_SEC)
+#define RATELIMIT_INTERVAL_USEC (10*USEC_PER_SEC)
+#define RATELIMIT_BURST 10
+
+#define TIMEOUT_USEC (10*USEC_PER_SEC)
+
+struct ntp_ts {
+        be32_t sec;
+        be32_t frac;
+} _packed_;
+
+struct ntp_ts_short {
+        be16_t sec;
+        be16_t frac;
+} _packed_;
+
+struct ntp_msg {
+        uint8_t field;
+        uint8_t stratum;
+        int8_t poll;
+        int8_t precision;
+        struct ntp_ts_short root_delay;
+        struct ntp_ts_short root_dispersion;
+        char refid[4];
+        struct ntp_ts reference_time;
+        struct ntp_ts origin_time;
+        struct ntp_ts recv_time;
+        struct ntp_ts trans_time;
+} _packed_;
+
+static int manager_arm_timer(Manager *m, usec_t next);
+static int manager_clock_watch_setup(Manager *m);
+
+static double ntp_ts_short_to_d(const struct ntp_ts_short *ts) {
+        return be16toh(ts->sec) + (be16toh(ts->frac) / 65536.0);
+}
+
+static double ntp_ts_to_d(const struct ntp_ts *ts) {
+        return be32toh(ts->sec) + ((double)be32toh(ts->frac) / UINT_MAX);
+}
+
+static double ts_to_d(const struct timespec *ts) {
+        return ts->tv_sec + (1.0e-9 * ts->tv_nsec);
+}
+
+static double square(double d) {
+        return d * d;
+}
+
+static int manager_timeout(sd_event_source *source, usec_t usec, void *userdata) {
+        _cleanup_free_ char *pretty = NULL;
+        Manager *m = userdata;
+
+        assert(m);
+        assert(m->current_server_name);
+        assert(m->current_server_address);
+
+        server_address_pretty(m->current_server_address, &pretty);
+        log_info("Timed out waiting for reply from %s (%s).", strna(pretty), m->current_server_name->string);
+
+        return manager_connect(m);
+}
+
+static int manager_send_request(Manager *m) {
+        _cleanup_free_ char *pretty = NULL;
+        struct ntp_msg ntpmsg = {
+                /*
+                 * "The client initializes the NTP message header, sends the request
+                 * to the server, and strips the time of day from the Transmit
+                 * Timestamp field of the reply.  For this purpose, all the NTP
+                 * header fields are set to 0, except the Mode, VN, and optional
+                 * Transmit Timestamp fields."
+                 */
+                .field = NTP_FIELD(0, 4, NTP_MODE_CLIENT),
+        };
+        ssize_t len;
+        int r;
+
+        assert(m);
+        assert(m->current_server_name);
+        assert(m->current_server_address);
+
+        m->event_timeout = sd_event_source_unref(m->event_timeout);
+
+        /*
+         * Set transmit timestamp, remember it; the server will send that back
+         * as the origin timestamp and we have an indication that this is the
+         * matching answer to our request.
+         *
+         * The actual value does not matter, We do not care about the correct
+         * NTP UINT_MAX fraction; we just pass the plain nanosecond value.
+         */
+        assert_se(clock_gettime(clock_boottime_or_monotonic(), &m->trans_time_mon) >= 0);
+        assert_se(clock_gettime(CLOCK_REALTIME, &m->trans_time) >= 0);
+        ntpmsg.trans_time.sec = htobe32(m->trans_time.tv_sec + OFFSET_1900_1970);
+        ntpmsg.trans_time.frac = htobe32(m->trans_time.tv_nsec);
+
+        server_address_pretty(m->current_server_address, &pretty);
+
+        len = sendto(m->server_socket, &ntpmsg, sizeof(ntpmsg), MSG_DONTWAIT, &m->current_server_address->sockaddr.sa, m->current_server_address->socklen);
+        if (len == sizeof(ntpmsg)) {
+                m->pending = true;
+                log_debug("Sent NTP request to %s (%s).", strna(pretty), m->current_server_name->string);
+        } else {
+                log_debug("Sending NTP request to %s (%s) failed: %m", strna(pretty), m->current_server_name->string);
+                return manager_connect(m);
+        }
+
+        /* re-arm timer with increasing timeout, in case the packets never arrive back */
+        if (m->retry_interval > 0) {
+                if (m->retry_interval < NTP_POLL_INTERVAL_MAX_SEC * USEC_PER_SEC)
+                        m->retry_interval *= 2;
+        } else
+                m->retry_interval = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
+
+        r = manager_arm_timer(m, m->retry_interval);
+        if (r < 0) {
+                log_error("Failed to rearm timer: %s", strerror(-r));
+                return r;
+        }
+
+        m->missed_replies++;
+        if (m->missed_replies > NTP_MAX_MISSED_REPLIES) {
+                r = sd_event_add_time(
+                                m->event,
+                                &m->event_timeout,
+                                clock_boottime_or_monotonic(),
+                                now(clock_boottime_or_monotonic()) + TIMEOUT_USEC, 0,
+                                manager_timeout, m);
+                if (r < 0) {
+                        log_error("Failed to arm timeout timer: %s", strerror(-r));
+                        return r;
+                }
+        }
+
+        return 0;
+}
+
+static int manager_timer(sd_event_source *source, usec_t usec, void *userdata) {
+        Manager *m = userdata;
+
+        assert(m);
+
+        return manager_send_request(m);
+}
+
+static int manager_arm_timer(Manager *m, usec_t next) {
+        int r;
+
+        assert(m);
+        assert(m->event_receive);
+
+        if (next == 0) {
+                m->event_timer = sd_event_source_unref(m->event_timer);
+                return 0;
+        }
+
+        if (m->event_timer) {
+                r = sd_event_source_set_time(m->event_timer, now(clock_boottime_or_monotonic()) + next);
+                if (r < 0)
+                        return r;
+
+                return sd_event_source_set_enabled(m->event_timer, SD_EVENT_ONESHOT);
+        }
+
+        return sd_event_add_time(
+                        m->event,
+                        &m->event_timer,
+                        clock_boottime_or_monotonic(),
+                        now(clock_boottime_or_monotonic()) + next, 0,
+                        manager_timer, m);
+}
+
+static int manager_clock_watch(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
+        Manager *m = userdata;
+
+        assert(m);
+
+        /* rearm timer */
+        manager_clock_watch_setup(m);
+
+        /* skip our own jumps */
+        if (m->jumped) {
+                m->jumped = false;
+                return 0;
+        }
+
+        /* resync */
+        log_info("System time changed. Resyncing.");
+        m->poll_resync = true;
+
+        return manager_send_request(m);
+}
+
+/* wake up when the system time changes underneath us */
+static int manager_clock_watch_setup(Manager *m) {
+
+        struct itimerspec its = {
+                .it_value.tv_sec = TIME_T_MAX
+        };
+
+        int r;
+
+        assert(m);
+
+        m->event_clock_watch = sd_event_source_unref(m->event_clock_watch);
+        safe_close(m->clock_watch_fd);
+
+        m->clock_watch_fd = timerfd_create(CLOCK_REALTIME, TFD_NONBLOCK|TFD_CLOEXEC);
+        if (m->clock_watch_fd < 0) {
+                log_error("Failed to create timerfd: %m");
+                return -errno;
+        }
+
+        if (timerfd_settime(m->clock_watch_fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) < 0) {
+                log_error("Failed to set up timerfd: %m");
+                return -errno;
+        }
+
+        r = sd_event_add_io(m->event, &m->event_clock_watch, m->clock_watch_fd, EPOLLIN, manager_clock_watch, m);
+        if (r < 0) {
+                log_error("Failed to create clock watch event source: %s", strerror(-r));
+                return r;
+        }
+
+        return 0;
+}
+
+static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
+        struct timex tmx = {};
+        int r;
+
+        assert(m);
+
+        /*
+         * For small deltas, tell the kernel to gradually adjust the system
+         * clock to the NTP time, larger deltas are just directly set.
+         */
+        if (fabs(offset) < NTP_MAX_ADJUST) {
+                tmx.modes = ADJ_STATUS | ADJ_NANO | ADJ_OFFSET | ADJ_TIMECONST | ADJ_MAXERROR | ADJ_ESTERROR;
+                tmx.status = STA_PLL;
+                tmx.offset = offset * NSEC_PER_SEC;
+                tmx.constant = log2i(m->poll_interval_usec / USEC_PER_SEC) - 4;
+                tmx.maxerror = 0;
+                tmx.esterror = 0;
+                log_debug("  adjust (slew): %+.3f sec\n", offset);
+        } else {
+                tmx.modes = ADJ_STATUS | ADJ_NANO | ADJ_SETOFFSET;
+
+                /* ADJ_NANO uses nanoseconds in the microseconds field */
+                tmx.time.tv_sec = (long)offset;
+                tmx.time.tv_usec = (offset - tmx.time.tv_sec) * NSEC_PER_SEC;
+
+                /* the kernel expects -0.3s as {-1, 7000.000.000} */
+                if (tmx.time.tv_usec < 0) {
+                        tmx.time.tv_sec  -= 1;
+                        tmx.time.tv_usec += NSEC_PER_SEC;
+                }
+
+                m->jumped = true;
+                log_debug("  adjust (jump): %+.3f sec\n", offset);
+        }
+
+        /*
+         * An unset STA_UNSYNC will enable the kernel's 11-minute mode,
+         * which syncs the system time periodically to the RTC.
+         *
+         * In case the RTC runs in local time, never touch the RTC,
+         * we have no way to properly handle daylight saving changes and
+         * mobile devices moving between time zones.
+         */
+        if (m->rtc_local_time)
+                tmx.status |= STA_UNSYNC;
+
+        switch (leap_sec) {
+        case 1:
+                tmx.status |= STA_INS;
+                break;
+        case -1:
+                tmx.status |= STA_DEL;
+                break;
+        }
+
+        r = clock_adjtime(CLOCK_REALTIME, &tmx);
+        if (r < 0)
+                return r;
+
+        touch("/var/lib/systemd/clock");
+
+        m->drift_ppm = tmx.freq / 65536;
+
+        log_debug("  status       : %04i %s\n"
+                  "  time now     : %li.%03llu\n"
+                  "  constant     : %li\n"
+                  "  offset       : %+.3f sec\n"
+                  "  freq offset  : %+li (%i ppm)\n",
+                  tmx.status, tmx.status & STA_UNSYNC ? "unsync" : "sync",
+                  tmx.time.tv_sec, (unsigned long long) (tmx.time.tv_usec / NSEC_PER_MSEC),
+                  tmx.constant,
+                  (double)tmx.offset / NSEC_PER_SEC,
+                  tmx.freq, m->drift_ppm);
+
+        return 0;
+}
+
+static bool manager_sample_spike_detection(Manager *m, double offset, double delay) {
+        unsigned int i, idx_cur, idx_new, idx_min;
+        double jitter;
+        double j;
+
+        assert(m);
+
+        m->packet_count++;
+
+        /* ignore initial sample */
+        if (m->packet_count == 1)
+                return false;
+
+        /* store the current data in our samples array */
+        idx_cur = m->samples_idx;
+        idx_new = (idx_cur + 1) % ELEMENTSOF(m->samples);
+        m->samples_idx = idx_new;
+        m->samples[idx_new].offset = offset;
+        m->samples[idx_new].delay = delay;
+
+        /* calculate new jitter value from the RMS differences relative to the lowest delay sample */
+        jitter = m->samples_jitter;
+        for (idx_min = idx_cur, i = 0; i < ELEMENTSOF(m->samples); i++)
+                if (m->samples[i].delay > 0 && m->samples[i].delay < m->samples[idx_min].delay)
+                        idx_min = i;
+
+        j = 0;
+        for (i = 0; i < ELEMENTSOF(m->samples); i++)
+                j += square(m->samples[i].offset - m->samples[idx_min].offset);
+        m->samples_jitter = sqrt(j / (ELEMENTSOF(m->samples) - 1));
+
+        /* ignore samples when resyncing */
+        if (m->poll_resync)
+                return false;
+
+        /* always accept offset if we are farther off than the round-trip delay */
+        if (fabs(offset) > delay)
+                return false;
+
+        /* we need a few samples before looking at them */
+        if (m->packet_count < 4)
+                return false;
+
+        /* do not accept anything worse than the maximum possible error of the best sample */
+        if (fabs(offset) > m->samples[idx_min].delay)
+                return true;
+
+        /* compare the difference between the current offset to the previous offset and jitter */
+        return fabs(offset - m->samples[idx_cur].offset) > 3 * jitter;
+}
+
+static void manager_adjust_poll(Manager *m, double offset, bool spike) {
+        assert(m);
+
+        if (m->poll_resync) {
+                m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
+                m->poll_resync = false;
+                return;
+        }
+
+        /* set to minimal poll interval */
+        if (!spike && fabs(offset) > NTP_ACCURACY_SEC) {
+                m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
+                return;
+        }
+
+        /* increase polling interval */
+        if (fabs(offset) < NTP_ACCURACY_SEC * 0.25) {
+                if (m->poll_interval_usec < NTP_POLL_INTERVAL_MAX_SEC * USEC_PER_SEC)
+                        m->poll_interval_usec *= 2;
+                return;
+        }
+
+        /* decrease polling interval */
+        if (spike || fabs(offset) > NTP_ACCURACY_SEC * 0.75) {
+                if (m->poll_interval_usec > NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC)
+                        m->poll_interval_usec /= 2;
+                return;
+        }
+}
+
+static int manager_receive_response(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
+        Manager *m = userdata;
+        struct ntp_msg ntpmsg;
+
+        struct iovec iov = {
+                .iov_base = &ntpmsg,
+                .iov_len = sizeof(ntpmsg),
+        };
+        union {
+                struct cmsghdr cmsghdr;
+                uint8_t buf[CMSG_SPACE(sizeof(struct timeval))];
+        } control;
+        union sockaddr_union server_addr;
+        struct msghdr msghdr = {
+                .msg_iov = &iov,
+                .msg_iovlen = 1,
+                .msg_control = &control,
+                .msg_controllen = sizeof(control),
+                .msg_name = &server_addr,
+                .msg_namelen = sizeof(server_addr),
+        };
+        struct cmsghdr *cmsg;
+        struct timespec *recv_time;
+        ssize_t len;
+        double origin, receive, trans, dest;
+        double delay, offset;
+        double root_distance;
+        bool spike;
+        int leap_sec;
+        int r;
+
+        assert(source);
+        assert(m);
+
+        if (revents & (EPOLLHUP|EPOLLERR)) {
+                log_warning("Server connection returned error.");
+                return manager_connect(m);
+        }
+
+        len = recvmsg(fd, &msghdr, MSG_DONTWAIT);
+        if (len < 0) {
+                if (errno == EAGAIN)
+                        return 0;
+
+                log_warning("Error receiving message. Disconnecting.");
+                return manager_connect(m);
+        }
+
+        if (iov.iov_len < sizeof(struct ntp_msg)) {
+                log_warning("Invalid response from server. Disconnecting.");
+                return manager_connect(m);
+        }
+
+        if (!m->current_server_name ||
+            !m->current_server_address ||
+            !sockaddr_equal(&server_addr, &m->current_server_address->sockaddr)) {
+                log_debug("Response from unknown server.");
+                return 0;
+        }
+
+        recv_time = NULL;
+        for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
+                if (cmsg->cmsg_level != SOL_SOCKET)
+                        continue;
+
+                switch (cmsg->cmsg_type) {
+                case SCM_TIMESTAMPNS:
+                        recv_time = (struct timespec *) CMSG_DATA(cmsg);
+                        break;
+                }
+        }
+        if (!recv_time) {
+                log_error("Invalid packet timestamp.");
+                return -EINVAL;
+        }
+
+        if (!m->pending) {
+                log_debug("Unexpected reply. Ignoring.");
+                return 0;
+        }
+
+        m->missed_replies = 0;
+
+        /* check our "time cookie" (we just stored nanoseconds in the fraction field) */
+        if (be32toh(ntpmsg.origin_time.sec) != m->trans_time.tv_sec + OFFSET_1900_1970 ||
+            be32toh(ntpmsg.origin_time.frac) != m->trans_time.tv_nsec) {
+                log_debug("Invalid reply; not our transmit time. Ignoring.");
+                return 0;
+        }
+
+        m->event_timeout = sd_event_source_unref(m->event_timeout);
+
+        if (be32toh(ntpmsg.recv_time.sec) < TIME_EPOCH + OFFSET_1900_1970 ||
+            be32toh(ntpmsg.trans_time.sec) < TIME_EPOCH + OFFSET_1900_1970) {
+                log_debug("Invalid reply, returned times before epoch. Ignoring.");
+                return manager_connect(m);
+        }
+
+        if (NTP_FIELD_LEAP(ntpmsg.field) == NTP_LEAP_NOTINSYNC ||
+            ntpmsg.stratum == 0 || ntpmsg.stratum >= 16) {
+                log_debug("Server is not synchronized. Disconnecting.");
+                return manager_connect(m);
+        }
+
+        if (!IN_SET(NTP_FIELD_VERSION(ntpmsg.field), 3, 4)) {
+                log_debug("Response NTPv%d. Disconnecting.", NTP_FIELD_VERSION(ntpmsg.field));
+                return manager_connect(m);
+        }
+
+        if (NTP_FIELD_MODE(ntpmsg.field) != NTP_MODE_SERVER) {
+                log_debug("Unsupported mode %d. Disconnecting.", NTP_FIELD_MODE(ntpmsg.field));
+                return manager_connect(m);
+        }
+
+        root_distance = ntp_ts_short_to_d(&ntpmsg.root_delay) / 2 + ntp_ts_short_to_d(&ntpmsg.root_dispersion);
+        if (root_distance > NTP_MAX_ROOT_DISTANCE) {
+                log_debug("Server has too large root distance. Disconnecting.");
+                return manager_connect(m);
+        }
+
+        /* valid packet */
+        m->pending = false;
+        m->retry_interval = 0;
+
+        /* announce leap seconds */
+        if (NTP_FIELD_LEAP(ntpmsg.field) & NTP_LEAP_PLUSSEC)
+                leap_sec = 1;
+        else if (NTP_FIELD_LEAP(ntpmsg.field) & NTP_LEAP_MINUSSEC)
+                leap_sec = -1;
+        else
+                leap_sec = 0;
+
+        /*
+         * "Timestamp Name          ID   When Generated
+         *  ------------------------------------------------------------
+         *  Originate Timestamp     T1   time request sent by client
+         *  Receive Timestamp       T2   time request received by server
+         *  Transmit Timestamp      T3   time reply sent by server
+         *  Destination Timestamp   T4   time reply received by client
+         *
+         *  The round-trip delay, d, and system clock offset, t, are defined as:
+         *  d = (T4 - T1) - (T3 - T2)     t = ((T2 - T1) + (T3 - T4)) / 2"
+         */
+        origin = ts_to_d(&m->trans_time) + OFFSET_1900_1970;
+        receive = ntp_ts_to_d(&ntpmsg.recv_time);
+        trans = ntp_ts_to_d(&ntpmsg.trans_time);
+        dest = ts_to_d(recv_time) + OFFSET_1900_1970;
+
+        offset = ((receive - origin) + (trans - dest)) / 2;
+        delay = (dest - origin) - (trans - receive);
+
+        spike = manager_sample_spike_detection(m, offset, delay);
+
+        manager_adjust_poll(m, offset, spike);
+
+        log_debug("NTP response:\n"
+                  "  leap         : %u\n"
+                  "  version      : %u\n"
+                  "  mode         : %u\n"
+                  "  stratum      : %u\n"
+                  "  precision    : %.6f sec (%d)\n"
+                  "  root distance: %.6f sec\n"
+                  "  reference    : %.4s\n"
+                  "  origin       : %.3f\n"
+                  "  receive      : %.3f\n"
+                  "  transmit     : %.3f\n"
+                  "  dest         : %.3f\n"
+                  "  offset       : %+.3f sec\n"
+                  "  delay        : %+.3f sec\n"
+                  "  packet count : %"PRIu64"\n"
+                  "  jitter       : %.3f%s\n"
+                  "  poll interval: " USEC_FMT "\n",
+                  NTP_FIELD_LEAP(ntpmsg.field),
+                  NTP_FIELD_VERSION(ntpmsg.field),
+                  NTP_FIELD_MODE(ntpmsg.field),
+                  ntpmsg.stratum,
+                  exp2(ntpmsg.precision), ntpmsg.precision,
+                  root_distance,
+                  ntpmsg.stratum == 1 ? ntpmsg.refid : "n/a",
+                  origin - OFFSET_1900_1970,
+                  receive - OFFSET_1900_1970,
+                  trans - OFFSET_1900_1970,
+                  dest - OFFSET_1900_1970,
+                  offset, delay,
+                  m->packet_count,
+                  m->samples_jitter, spike ? " spike" : "",
+                  m->poll_interval_usec / USEC_PER_SEC);
+
+        if (!spike) {
+                m->sync = true;
+                r = manager_adjust_clock(m, offset, leap_sec);
+                if (r < 0)
+                        log_error("Failed to call clock_adjtime(): %m");
+        }
+
+        log_info("interval/delta/delay/jitter/drift " USEC_FMT "s/%+.3fs/%.3fs/%.3fs/%+ippm%s",
+                 m->poll_interval_usec / USEC_PER_SEC, offset, delay, m->samples_jitter, m->drift_ppm,
+                 spike ? " (ignored)" : "");
+
+        r = manager_arm_timer(m, m->poll_interval_usec);
+        if (r < 0) {
+                log_error("Failed to rearm timer: %s", strerror(-r));
+                return r;
+        }
+
+        return 0;
+}
+
+static int manager_listen_setup(Manager *m) {
+        union sockaddr_union addr = {};
+        static const int tos = IPTOS_LOWDELAY;
+        static const int on = 1;
+        int r;
+
+        assert(m);
+
+        assert(m->server_socket < 0);
+        assert(!m->event_receive);
+        assert(m->current_server_address);
+
+        addr.sa.sa_family = m->current_server_address->sockaddr.sa.sa_family;
+
+        m->server_socket = socket(addr.sa.sa_family, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+        if (m->server_socket < 0)
+                return -errno;
+
+        r = bind(m->server_socket, &addr.sa, m->current_server_address->socklen);
+        if (r < 0)
+                return -errno;
+
+        r = setsockopt(m->server_socket, SOL_SOCKET, SO_TIMESTAMPNS, &on, sizeof(on));
+        if (r < 0)
+                return -errno;
+
+        (void) setsockopt(m->server_socket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
+
+        return sd_event_add_io(m->event, &m->event_receive, m->server_socket, EPOLLIN, manager_receive_response, m);
+}
+
+static int manager_begin(Manager *m) {
+        _cleanup_free_ char *pretty = NULL;
+        int r;
+
+        assert(m);
+        assert_return(m->current_server_name, -EHOSTUNREACH);
+        assert_return(m->current_server_address, -EHOSTUNREACH);
+
+        m->missed_replies = NTP_MAX_MISSED_REPLIES;
+        if (m->poll_interval_usec == 0)
+                m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
+
+        server_address_pretty(m->current_server_address, &pretty);
+        log_info("Using NTP server %s (%s).", strna(pretty), m->current_server_name->string);
+        sd_notifyf(false, "STATUS=Using Time Server %s (%s).", strna(pretty), m->current_server_name->string);
+
+        r = manager_listen_setup(m);
+        if (r < 0) {
+                log_warning("Failed to setup connection socket: %s", strerror(-r));
+                return r;
+        }
+
+        r = manager_clock_watch_setup(m);
+        if (r < 0)
+                return r;
+
+        return manager_send_request(m);
+}
+
+void manager_set_server_name(Manager *m, ServerName *n) {
+        assert(m);
+
+        if (m->current_server_name == n)
+                return;
+
+        m->current_server_name = n;
+        m->current_server_address = NULL;
+
+        manager_disconnect(m);
+
+        if (n)
+                log_debug("Selected server %s.", n->string);
+}
+
+void manager_set_server_address(Manager *m, ServerAddress *a) {
+        assert(m);
+
+        if (m->current_server_address == a)
+                return;
+
+        m->current_server_address = a;
+        /* If a is NULL, we are just clearing the address, without
+         * changing the name. Keep the existing name in that case. */
+        if (a)
+                m->current_server_name = a->name;
+
+        manager_disconnect(m);
+
+        if (a) {
+                _cleanup_free_ char *pretty = NULL;
+                server_address_pretty(a, &pretty);
+                log_debug("Selected address %s of server %s.", strna(pretty), a->name->string);
+        }
+}
+
+static int manager_resolve_handler(sd_resolve_query *q, int ret, const struct addrinfo *ai, void *userdata) {
+        Manager *m = userdata;
+        int r;
+
+        assert(q);
+        assert(m);
+        assert(m->current_server_name);
+
+        m->resolve_query = sd_resolve_query_unref(m->resolve_query);
+
+        if (ret != 0) {
+                log_debug("Failed to resolve %s: %s", m->current_server_name->string, gai_strerror(ret));
+
+                /* Try next host */
+                return manager_connect(m);
+        }
+
+        for (; ai; ai = ai->ai_next) {
+                _cleanup_free_ char *pretty = NULL;
+                ServerAddress *a;
+
+                assert(ai->ai_addr);
+                assert(ai->ai_addrlen >= offsetof(struct sockaddr, sa_data));
+
+                if (!IN_SET(ai->ai_addr->sa_family, AF_INET, AF_INET6)) {
+                        log_warning("Unsuitable address protocol for %s", m->current_server_name->string);
+                        continue;
+                }
+
+                r = server_address_new(m->current_server_name, &a, (const union sockaddr_union*) ai->ai_addr, ai->ai_addrlen);
+                if (r < 0) {
+                        log_error("Failed to add server address: %s", strerror(-r));
+                        return r;
+                }
+
+                server_address_pretty(a, &pretty);
+                log_debug("Resolved address %s for %s.", pretty, m->current_server_name->string);
+        }
+
+        if (!m->current_server_name->addresses) {
+                log_error("Failed to find suitable address for host %s.", m->current_server_name->string);
+
+                /* Try next host */
+                return manager_connect(m);
+        }
+
+        manager_set_server_address(m, m->current_server_name->addresses);
+
+        return manager_begin(m);
+}
+
+static int manager_retry_connect(sd_event_source *source, usec_t usec, void *userdata) {
+        Manager *m = userdata;
+
+        assert(m);
+
+        return manager_connect(m);
+}
+
+int manager_connect(Manager *m) {
+        int r;
+
+        assert(m);
+
+        manager_disconnect(m);
+
+        m->event_retry = sd_event_source_unref(m->event_retry);
+        if (!ratelimit_test(&m->ratelimit)) {
+                log_debug("Slowing down attempts to contact servers.");
+
+                r = sd_event_add_time(m->event, &m->event_retry, clock_boottime_or_monotonic(), now(clock_boottime_or_monotonic()) + RETRY_USEC, 0, manager_retry_connect, m);
+                if (r < 0) {
+                        log_error("Failed to create retry timer: %s", strerror(-r));
+                        return r;
+                }
+
+                return 0;
+        }
+
+        /* If we already are operating on some address, switch to the
+         * next one. */
+        if (m->current_server_address && m->current_server_address->addresses_next)
+                manager_set_server_address(m, m->current_server_address->addresses_next);
+        else {
+                struct addrinfo hints = {
+                        .ai_flags = AI_NUMERICSERV|AI_ADDRCONFIG,
+                        .ai_socktype = SOCK_DGRAM,
+                };
+
+                /* Hmm, we are through all addresses, let's look for the next host instead */
+                if (m->current_server_name && m->current_server_name->names_next)
+                        manager_set_server_name(m, m->current_server_name->names_next);
+                else {
+                        ServerName *f;
+                        bool restart = true;
+
+                        /* Our current server name list is exhausted,
+                         * let's find the next one to iterate. First
+                         * we try the system list, then the link list.
+                         * After having processed the link list we
+                         * jump back to the system list. However, if
+                         * both lists are empty, we change to the
+                         * fallback list. */
+                        if (!m->current_server_name || m->current_server_name->type == SERVER_LINK) {
+                                f = m->system_servers;
+                                if (!f)
+                                        f = m->link_servers;
+                        } else {
+                                f = m->link_servers;
+                                if (!f)
+                                        f = m->system_servers;
+                                else
+                                        restart = false;
+                        }
+
+                        if (!f)
+                                f = m->fallback_servers;
+
+                        if (!f) {
+                                manager_set_server_name(m, NULL);
+                                log_debug("No server found.");
+                                return 0;
+                        }
+
+                        if (restart && !m->exhausted_servers && m->poll_interval_usec) {
+                                log_debug("Waiting after exhausting servers.");
+                                r = sd_event_add_time(m->event, &m->event_retry, clock_boottime_or_monotonic(), now(clock_boottime_or_monotonic()) + m->poll_interval_usec, 0, manager_retry_connect, m);
+                                if (r < 0) {
+                                        log_error("Failed to create retry timer: %s", strerror(-r));
+                                        return r;
+                                }
+
+                                m->exhausted_servers = true;
+
+                                /* Increase the polling interval */
+                                if (m->poll_interval_usec < NTP_POLL_INTERVAL_MAX_SEC * USEC_PER_SEC)
+                                        m->poll_interval_usec *= 2;
+
+                                return 0;
+                        }
+
+                        m->exhausted_servers = false;
+
+                        manager_set_server_name(m, f);
+                }
+
+                /* Tell the resolver to reread /etc/resolv.conf, in
+                 * case it changed. */
+                res_init();
+
+                /* Flush out any previously resolved addresses */
+                server_name_flush_addresses(m->current_server_name);
+
+                log_debug("Resolving %s...", m->current_server_name->string);
+
+                r = sd_resolve_getaddrinfo(m->resolve, &m->resolve_query, m->current_server_name->string, "123", &hints, manager_resolve_handler, m);
+                if (r < 0) {
+                        log_error("Failed to create resolver: %s", strerror(-r));
+                        return r;
+                }
+
+                return 1;
+        }
+
+        r = manager_begin(m);
+        if (r < 0)
+                return r;
+
+        return 1;
+}
+
+void manager_disconnect(Manager *m) {
+        assert(m);
+
+        m->resolve_query = sd_resolve_query_unref(m->resolve_query);
+
+        m->event_timer = sd_event_source_unref(m->event_timer);
+
+        m->event_receive = sd_event_source_unref(m->event_receive);
+        m->server_socket = safe_close(m->server_socket);
+
+        m->event_clock_watch = sd_event_source_unref(m->event_clock_watch);
+        m->clock_watch_fd = safe_close(m->clock_watch_fd);
+
+        m->event_timeout = sd_event_source_unref(m->event_timeout);
+
+        sd_notifyf(false, "STATUS=Idle.");
+}
+
+void manager_flush_server_names(Manager  *m, ServerType t) {
+        assert(m);
+
+        if (t == SERVER_SYSTEM)
+                while (m->system_servers)
+                        server_name_free(m->system_servers);
+
+        if (t == SERVER_LINK)
+                while (m->link_servers)
+                        server_name_free(m->link_servers);
+
+        if (t == SERVER_FALLBACK)
+                while (m->fallback_servers)
+                        server_name_free(m->fallback_servers);
+}
+
+void manager_free(Manager *m) {
+        if (!m)
+                return;
+
+        manager_disconnect(m);
+        manager_flush_server_names(m, SERVER_SYSTEM);
+        manager_flush_server_names(m, SERVER_LINK);
+        manager_flush_server_names(m, SERVER_FALLBACK);
+
+        sd_event_source_unref(m->event_retry);
+
+        sd_event_source_unref(m->network_event_source);
+        sd_network_monitor_unref(m->network_monitor);
+
+        sd_resolve_unref(m->resolve);
+        sd_event_unref(m->event);
+
+        free(m);
+}
+
+static int manager_network_read_link_servers(Manager *m) {
+        _cleanup_strv_free_ char **ntp = NULL;
+        ServerName *n, *nx;
+        char **i;
+        int r;
+
+        assert(m);
+
+        r = sd_network_get_ntp(&ntp);
+        if (r < 0)
+                goto clear;
+
+        LIST_FOREACH(names, n, m->link_servers)
+                n->marked = true;
+
+        STRV_FOREACH(i, ntp) {
+                bool found = false;
+
+                LIST_FOREACH(names, n, m->link_servers)
+                        if (streq(n->string, *i)) {
+                                n->marked = false;
+                                found = true;
+                                break;
+                        }
+
+                if (!found) {
+                        r = server_name_new(m, NULL, SERVER_LINK, *i);
+                        if (r < 0)
+                                goto clear;
+                }
+        }
+
+        LIST_FOREACH_SAFE(names, n, nx, m->link_servers)
+                if (n->marked)
+                        server_name_free(n);
+
+        return 0;
+
+clear:
+        manager_flush_server_names(m, SERVER_LINK);
+        return r;
+}
+
+static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        Manager *m = userdata;
+        bool connected, online;
+        int r;
+
+        assert(m);
+
+        sd_network_monitor_flush(m->network_monitor);
+
+        manager_network_read_link_servers(m);
+
+        /* check if the machine is online */
+        online = network_is_online();
+
+        /* check if the client is currently connected */
+        connected = m->server_socket >= 0 || m->resolve_query || m->exhausted_servers;
+
+        if (connected && !online) {
+                log_info("No network connectivity, watching for changes.");
+                manager_disconnect(m);
+
+        } else if (!connected && online) {
+                log_info("Network configuration changed, trying to establish connection.");
+
+                if (m->current_server_address)
+                        r = manager_begin(m);
+                else
+                        r = manager_connect(m);
+                if (r < 0)
+                        return r;
+        }
+
+        return 0;
+}
+
+static int manager_network_monitor_listen(Manager *m) {
+        int r, fd, events;
+
+        assert(m);
+
+        r = sd_network_monitor_new(&m->network_monitor, NULL);
+        if (r < 0)
+                return r;
+
+        fd = sd_network_monitor_get_fd(m->network_monitor);
+        if (fd < 0)
+                return fd;
+
+        events = sd_network_monitor_get_events(m->network_monitor);
+        if (events < 0)
+                return events;
+
+        r = sd_event_add_io(m->event, &m->network_event_source, fd, events, manager_network_event_handler, m);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+int manager_new(Manager **ret) {
+        _cleanup_(manager_freep) Manager *m = NULL;
+        int r;
+
+        assert(ret);
+
+        m = new0(Manager, 1);
+        if (!m)
+                return -ENOMEM;
+
+        m->server_socket = m->clock_watch_fd = -1;
+
+        RATELIMIT_INIT(m->ratelimit, RATELIMIT_INTERVAL_USEC, RATELIMIT_BURST);
+
+        r = manager_parse_server_string(m, SERVER_FALLBACK, NTP_SERVERS);
+        if (r < 0)
+                return r;
+
+        r = sd_event_default(&m->event);
+        if (r < 0)
+                return r;
+
+        sd_event_add_signal(m->event, NULL, SIGTERM, NULL,  NULL);
+        sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+
+        sd_event_set_watchdog(m->event, true);
+
+        r = sd_resolve_default(&m->resolve);
+        if (r < 0)
+                return r;
+
+        r = sd_resolve_attach_event(m->resolve, m->event, 0);
+        if (r < 0)
+                return r;
+
+        r = manager_network_monitor_listen(m);
+        if (r < 0)
+                return r;
+
+        manager_network_read_link_servers(m);
+
+        *ret = m;
+        m = NULL;
+
+        return 0;
+}
diff --git a/src/timesync/timesyncd-manager.h b/src/timesync/timesyncd-manager.h
new file mode 100644 (file)
index 0000000..c7efdc5
--- /dev/null
@@ -0,0 +1,105 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Kay Sievers, Lennart Poettering
+
+  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/>.
+***/
+
+#include "sd-event.h"
+#include "sd-resolve.h"
+#include "sd-network.h"
+#include "list.h"
+#include "socket-util.h"
+#include "ratelimit.h"
+
+typedef struct Manager Manager;
+
+#include "timesyncd-server.h"
+
+struct Manager {
+        sd_event *event;
+        sd_resolve *resolve;
+
+        LIST_HEAD(ServerName, system_servers);
+        LIST_HEAD(ServerName, link_servers);
+        LIST_HEAD(ServerName, fallback_servers);
+
+        RateLimit ratelimit;
+        bool exhausted_servers;
+
+        /* network */
+        sd_event_source *network_event_source;
+        sd_network_monitor *network_monitor;
+
+        /* peer */
+        sd_resolve_query *resolve_query;
+        sd_event_source *event_receive;
+        ServerName *current_server_name;
+        ServerAddress *current_server_address;
+        int server_socket;
+        int missed_replies;
+        uint64_t packet_count;
+        sd_event_source *event_timeout;
+
+        /* last sent packet */
+        struct timespec trans_time_mon;
+        struct timespec trans_time;
+        usec_t retry_interval;
+        bool pending;
+
+        /* poll timer */
+        sd_event_source *event_timer;
+        usec_t poll_interval_usec;
+        bool poll_resync;
+
+        /* history data */
+        struct {
+                double offset;
+                double delay;
+        } samples[8];
+        unsigned int samples_idx;
+        double samples_jitter;
+
+        /* last change */
+        bool jumped;
+        bool sync;
+        int drift_ppm;
+
+        /* watch for time changes */
+        sd_event_source *event_clock_watch;
+        int clock_watch_fd;
+
+        /* Retry connections */
+        sd_event_source *event_retry;
+
+        /* RTC runs in local time, leave it alone */
+        bool rtc_local_time;
+};
+
+int manager_new(Manager **ret);
+void manager_free(Manager *m);
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
+
+void manager_set_server_name(Manager *m, ServerName *n);
+void manager_set_server_address(Manager *m, ServerAddress *a);
+void manager_flush_server_names(Manager *m, ServerType t);
+
+int manager_connect(Manager *m);
+void manager_disconnect(Manager *m);
diff --git a/src/timesync/timesyncd-server.c b/src/timesync/timesyncd-server.c
new file mode 100644 (file)
index 0000000..ec3fe1f
--- /dev/null
@@ -0,0 +1,151 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Kay Sievers, Lennart Poettering
+
+  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/>.
+***/
+
+#include "timesyncd-server.h"
+
+int server_address_new(
+                ServerName *n,
+                ServerAddress **ret,
+                const union sockaddr_union *sockaddr,
+                socklen_t socklen) {
+
+        ServerAddress *a, *tail;
+
+        assert(n);
+        assert(sockaddr);
+        assert(socklen >= offsetof(struct sockaddr, sa_data));
+        assert(socklen <= sizeof(union sockaddr_union));
+
+        a = new0(ServerAddress, 1);
+        if (!a)
+                return -ENOMEM;
+
+        memcpy(&a->sockaddr, sockaddr, socklen);
+        a->socklen = socklen;
+
+        LIST_FIND_TAIL(addresses, n->addresses, tail);
+        LIST_INSERT_AFTER(addresses, n->addresses, tail, a);
+        a->name = n;
+
+        if (ret)
+                *ret = a;
+
+        return 0;
+}
+
+ServerAddress* server_address_free(ServerAddress *a) {
+        if (!a)
+                return NULL;
+
+        if (a->name) {
+                LIST_REMOVE(addresses, a->name->addresses, a);
+
+                if (a->name->manager && a->name->manager->current_server_address == a)
+                        manager_set_server_address(a->name->manager, NULL);
+        }
+
+        free(a);
+        return NULL;
+}
+
+int server_name_new(
+                Manager *m,
+                ServerName **ret,
+                ServerType type,
+                const char *string) {
+
+        ServerName *n, *tail;
+
+        assert(m);
+        assert(string);
+
+        n = new0(ServerName, 1);
+        if (!n)
+                return -ENOMEM;
+
+        n->type = type;
+        n->string = strdup(string);
+        if (!n->string) {
+                free(n);
+                return -ENOMEM;
+        }
+
+        if (type == SERVER_SYSTEM) {
+                LIST_FIND_TAIL(names, m->system_servers, tail);
+                LIST_INSERT_AFTER(names, m->system_servers, tail, n);
+        } else if (type == SERVER_LINK) {
+                LIST_FIND_TAIL(names, m->link_servers, tail);
+                LIST_INSERT_AFTER(names, m->link_servers, tail, n);
+        } else if (type == SERVER_FALLBACK) {
+                LIST_FIND_TAIL(names, m->fallback_servers, tail);
+                LIST_INSERT_AFTER(names, m->fallback_servers, tail, n);
+        } else
+                assert_not_reached("Unknown server type");
+
+        n->manager = m;
+
+        if (type != SERVER_FALLBACK &&
+            m->current_server_name &&
+            m->current_server_name->type == SERVER_FALLBACK)
+                manager_set_server_name(m, NULL);
+
+        log_debug("Added new server %s.", string);
+
+        if (ret)
+                *ret = n;
+
+        return 0;
+}
+
+ServerName *server_name_free(ServerName *n) {
+        if (!n)
+                return NULL;
+
+        server_name_flush_addresses(n);
+
+        if (n->manager) {
+                if (n->type == SERVER_SYSTEM)
+                        LIST_REMOVE(names, n->manager->system_servers, n);
+                else if (n->type == SERVER_LINK)
+                        LIST_REMOVE(names, n->manager->link_servers, n);
+                else if (n->type == SERVER_FALLBACK)
+                        LIST_REMOVE(names, n->manager->fallback_servers, n);
+                else
+                        assert_not_reached("Unknown server type");
+
+                if (n->manager->current_server_name == n)
+                        manager_set_server_name(n->manager, NULL);
+        }
+
+        log_debug("Removed server %s.", n->string);
+
+        free(n->string);
+        free(n);
+
+        return NULL;
+}
+
+void server_name_flush_addresses(ServerName *n) {
+        assert(n);
+
+        while (n->addresses)
+                server_address_free(n->addresses);
+}
diff --git a/src/timesync/timesyncd-server.h b/src/timesync/timesyncd-server.h
new file mode 100644 (file)
index 0000000..243b44a
--- /dev/null
@@ -0,0 +1,67 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Kay Sievers, Lennart Poettering
+
+  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/>.
+***/
+
+#include "socket-util.h"
+#include "list.h"
+
+typedef struct ServerAddress ServerAddress;
+typedef struct ServerName ServerName;
+
+typedef enum ServerType {
+        SERVER_SYSTEM,
+        SERVER_FALLBACK,
+        SERVER_LINK,
+} ServerType;
+
+#include "timesyncd-manager.h"
+
+struct ServerAddress {
+        ServerName *name;
+
+        union sockaddr_union sockaddr;
+        socklen_t socklen;
+
+        LIST_FIELDS(ServerAddress, addresses);
+};
+
+struct ServerName {
+        Manager *manager;
+
+        ServerType type;
+        char *string;
+
+        bool marked:1;
+
+        LIST_HEAD(ServerAddress, addresses);
+        LIST_FIELDS(ServerName, names);
+};
+
+int server_address_new(ServerName *n, ServerAddress **ret, const union sockaddr_union *sockaddr, socklen_t socklen);
+ServerAddress* server_address_free(ServerAddress *a);
+static inline int server_address_pretty(ServerAddress *a, char **pretty) {
+        return sockaddr_pretty(&a->sockaddr.sa, a->socklen, true, pretty);
+}
+
+int server_name_new(Manager *m, ServerName **ret, ServerType type,const char *string);
+ServerName *server_name_free(ServerName *n);
+void server_name_flush_addresses(ServerName *n);
index 27f6b2d22628e33172f53ebcf0b7044c75484245..ee3bc99ae042d97dec49060317b96381f8e36392 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <time.h>
-#include <math.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <sys/timerfd.h>
-#include <sys/timex.h>
-#include <sys/socket.h>
-#include <resolv.h>
-#include <sys/prctl.h>
-#include <sys/types.h>
-#include <grp.h>
-
-#include "missing.h"
-#include "util.h"
-#include "sparse-endian.h"
-#include "log.h"
-#include "socket-util.h"
-#include "list.h"
-#include "ratelimit.h"
-#include "strv.h"
-#include "conf-parser.h"
 #include "sd-event.h"
-#include "sd-resolve.h"
 #include "sd-daemon.h"
-#include "sd-network.h"
-#include "event-util.h"
-#include "network-util.h"
-#include "clock-util.h"
-#include "capability.h"
 #include "mkdir.h"
-#include "timesyncd.h"
-
-#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
-
-#ifndef ADJ_SETOFFSET
-#define ADJ_SETOFFSET                   0x0100  /* add 'time' to current time */
-#endif
-
-/* expected accuracy of time synchronization; used to adjust the poll interval */
-#define NTP_ACCURACY_SEC                0.2
-
-/*
- * "A client MUST NOT under any conditions use a poll interval less
- * than 15 seconds."
- */
-#define NTP_POLL_INTERVAL_MIN_SEC       32
-#define NTP_POLL_INTERVAL_MAX_SEC       2048
-
-/*
- * Maximum delta in seconds which the system clock is gradually adjusted
- * (slew) to approach the network time. Deltas larger that this are set by
- * letting the system time jump. The kernel's limit for adjtime is 0.5s.
- */
-#define NTP_MAX_ADJUST                  0.4
-
-/* NTP protocol, packet header */
-#define NTP_LEAP_PLUSSEC                1
-#define NTP_LEAP_MINUSSEC               2
-#define NTP_LEAP_NOTINSYNC              3
-#define NTP_MODE_CLIENT                 3
-#define NTP_MODE_SERVER                 4
-#define NTP_FIELD_LEAP(f)               (((f) >> 6) & 3)
-#define NTP_FIELD_VERSION(f)            (((f) >> 3) & 7)
-#define NTP_FIELD_MODE(f)               ((f) & 7)
-#define NTP_FIELD(l, v, m)              (((l) << 6) | ((v) << 3) | (m))
-
-/*
- * "NTP timestamps are represented as a 64-bit unsigned fixed-point number,
- * in seconds relative to 0h on 1 January 1900."
- */
-#define OFFSET_1900_1970        2208988800UL
-
-#define RETRY_USEC (30*USEC_PER_SEC)
-#define RATELIMIT_INTERVAL_USEC (10*USEC_PER_SEC)
-#define RATELIMIT_BURST 10
-
-#define TIMEOUT_USEC (10*USEC_PER_SEC)
-
-struct ntp_ts {
-        be32_t sec;
-        be32_t frac;
-} _packed_;
-
-struct ntp_ts_short {
-        be16_t sec;
-        be16_t frac;
-} _packed_;
-
-struct ntp_msg {
-        uint8_t field;
-        uint8_t stratum;
-        int8_t poll;
-        int8_t precision;
-        struct ntp_ts_short root_delay;
-        struct ntp_ts_short root_dispersion;
-        char refid[4];
-        struct ntp_ts reference_time;
-        struct ntp_ts origin_time;
-        struct ntp_ts recv_time;
-        struct ntp_ts trans_time;
-} _packed_;
-
-static void manager_free(Manager *m);
-DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
-#define _cleanup_manager_free_ _cleanup_(manager_freep)
-
-static int manager_arm_timer(Manager *m, usec_t next);
-static int manager_clock_watch_setup(Manager *m);
-static int manager_connect(Manager *m);
-static void manager_disconnect(Manager *m);
-
-static double ntp_ts_to_d(const struct ntp_ts *ts) {
-        return be32toh(ts->sec) + ((double)be32toh(ts->frac) / UINT_MAX);
-}
-
-static double ts_to_d(const struct timespec *ts) {
-        return ts->tv_sec + (1.0e-9 * ts->tv_nsec);
-}
-
-static double tv_to_d(const struct timeval *tv) {
-        return tv->tv_sec + (1.0e-6 * tv->tv_usec);
-}
+#include "capability.h"
+#include "clock-util.h"
+#include "network-util.h"
 
-static double square(double d) {
-        return d * d;
-}
+#include "timesyncd-manager.h"
+#include "timesyncd-conf.h"
 
 static int load_clock_timestamp(uid_t uid, gid_t gid) {
         _cleanup_close_ int fd = -1;
@@ -202,1012 +79,13 @@ static int load_clock_timestamp(uid_t uid, gid_t gid) {
         return 0;
 }
 
-static int manager_timeout(sd_event_source *source, usec_t usec, void *userdata) {
-        _cleanup_free_ char *pretty = NULL;
-        Manager *m = userdata;
-
-        assert(m);
-        assert(m->current_server_name);
-        assert(m->current_server_address);
-
-        sockaddr_pretty(&m->current_server_address->sockaddr.sa, m->current_server_address->socklen, true, &pretty);
-        log_info("Timed out waiting for reply from %s (%s).", strna(pretty), m->current_server_name->string);
-
-        return manager_connect(m);
-}
-
-static int manager_send_request(Manager *m) {
-        _cleanup_free_ char *pretty = NULL;
-        struct ntp_msg ntpmsg = {
-                /*
-                 * "The client initializes the NTP message header, sends the request
-                 * to the server, and strips the time of day from the Transmit
-                 * Timestamp field of the reply.  For this purpose, all the NTP
-                 * header fields are set to 0, except the Mode, VN, and optional
-                 * Transmit Timestamp fields."
-                 */
-                .field = NTP_FIELD(0, 4, NTP_MODE_CLIENT),
-        };
-        ssize_t len;
-        int r;
-
-        assert(m);
-        assert(m->current_server_name);
-        assert(m->current_server_address);
-
-        m->event_timeout = sd_event_source_unref(m->event_timeout);
-
-        /*
-         * Set transmit timestamp, remember it; the server will send that back
-         * as the origin timestamp and we have an indication that this is the
-         * matching answer to our request.
-         *
-         * The actual value does not matter, We do not care about the correct
-         * NTP UINT_MAX fraction; we just pass the plain nanosecond value.
-         */
-        assert_se(clock_gettime(CLOCK_MONOTONIC, &m->trans_time_mon) >= 0);
-        assert_se(clock_gettime(CLOCK_REALTIME, &m->trans_time) >= 0);
-        ntpmsg.trans_time.sec = htobe32(m->trans_time.tv_sec + OFFSET_1900_1970);
-        ntpmsg.trans_time.frac = htobe32(m->trans_time.tv_nsec);
-
-        sockaddr_pretty(&m->current_server_address->sockaddr.sa, m->current_server_address->socklen, true, &pretty);
-
-        len = sendto(m->server_socket, &ntpmsg, sizeof(ntpmsg), MSG_DONTWAIT, &m->current_server_address->sockaddr.sa, m->current_server_address->socklen);
-        if (len == sizeof(ntpmsg)) {
-                m->pending = true;
-                log_debug("Sent NTP request to %s (%s).", strna(pretty), m->current_server_name->string);
-        } else {
-                log_debug("Sending NTP request to %s (%s) failed: %m", strna(pretty), m->current_server_name->string);
-                return manager_connect(m);
-        }
-
-        /* re-arm timer with increasing timeout, in case the packets never arrive back */
-        if (m->retry_interval > 0) {
-                if (m->retry_interval < NTP_POLL_INTERVAL_MAX_SEC * USEC_PER_SEC)
-                        m->retry_interval *= 2;
-        } else
-                m->retry_interval = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
-
-        r = manager_arm_timer(m, m->retry_interval);
-        if (r < 0) {
-                log_error("Failed to rearm timer: %s", strerror(-r));
-                return r;
-        }
-
-        r = sd_event_add_time(
-                        m->event,
-                        &m->event_timeout,
-                        CLOCK_MONOTONIC,
-                        now(CLOCK_MONOTONIC) + TIMEOUT_USEC, 0,
-                        manager_timeout, m);
-        if (r < 0) {
-                log_error("Failed to arm timeout timer: %s", strerror(-r));
-                return r;
-        }
-
-        return 0;
-}
-
-static int manager_timer(sd_event_source *source, usec_t usec, void *userdata) {
-        Manager *m = userdata;
-
-        assert(m);
-
-        return manager_send_request(m);
-}
-
-static int manager_arm_timer(Manager *m, usec_t next) {
-        int r;
-
-        assert(m);
-        assert(m->event_receive);
-
-        if (next == 0) {
-                m->event_timer = sd_event_source_unref(m->event_timer);
-                return 0;
-        }
-
-        if (m->event_timer) {
-                r = sd_event_source_set_time(m->event_timer, now(CLOCK_MONOTONIC) + next);
-                if (r < 0)
-                        return r;
-
-                return sd_event_source_set_enabled(m->event_timer, SD_EVENT_ONESHOT);
-        }
-
-        return sd_event_add_time(
-                        m->event,
-                        &m->event_timer,
-                        CLOCK_MONOTONIC,
-                        now(CLOCK_MONOTONIC) + next, 0,
-                        manager_timer, m);
-}
-
-static int manager_clock_watch(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
-        Manager *m = userdata;
-
-        assert(m);
-
-        /* rearm timer */
-        manager_clock_watch_setup(m);
-
-        /* skip our own jumps */
-        if (m->jumped) {
-                m->jumped = false;
-                return 0;
-        }
-
-        /* resync */
-        log_info("System time changed. Resyncing.");
-        m->poll_resync = true;
-        return manager_send_request(m);
-}
-
-/* wake up when the system time changes underneath us */
-static int manager_clock_watch_setup(Manager *m) {
-
-        struct itimerspec its = {
-                .it_value.tv_sec = TIME_T_MAX
-        };
-
-        int r;
-
-        assert(m);
-
-        m->event_clock_watch = sd_event_source_unref(m->event_clock_watch);
-        safe_close(m->clock_watch_fd);
-
-        m->clock_watch_fd = timerfd_create(CLOCK_REALTIME, TFD_NONBLOCK|TFD_CLOEXEC);
-        if (m->clock_watch_fd < 0) {
-                log_error("Failed to create timerfd: %m");
-                return -errno;
-        }
-
-        if (timerfd_settime(m->clock_watch_fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) < 0) {
-                log_error("Failed to set up timerfd: %m");
-                return -errno;
-        }
-
-        r = sd_event_add_io(m->event, &m->event_clock_watch, m->clock_watch_fd, EPOLLIN, manager_clock_watch, m);
-        if (r < 0) {
-                log_error("Failed to create clock watch event source: %s", strerror(-r));
-                return r;
-        }
-
-        return 0;
-}
-
-static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
-        struct timex tmx = {};
-        int r;
-
-        assert(m);
-
-        /*
-         * For small deltas, tell the kernel to gradually adjust the system
-         * clock to the NTP time, larger deltas are just directly set.
-         *
-         * Clear STA_UNSYNC, it will enable the kernel's 11-minute mode, which
-         * syncs the system time periodically to the hardware clock.
-         */
-        if (fabs(offset) < NTP_MAX_ADJUST) {
-                tmx.modes = ADJ_STATUS | ADJ_NANO | ADJ_OFFSET | ADJ_TIMECONST | ADJ_MAXERROR | ADJ_ESTERROR;
-                tmx.status = STA_PLL;
-                tmx.offset = offset * NSEC_PER_SEC;
-                tmx.constant = log2i(m->poll_interval_usec / USEC_PER_SEC) - 4;
-                tmx.maxerror = 0;
-                tmx.esterror = 0;
-                log_debug("  adjust (slew): %+.3f sec\n", offset);
-        } else {
-                tmx.modes = ADJ_SETOFFSET | ADJ_NANO;
-
-                /* ADJ_NANO uses nanoseconds in the microseconds field */
-                tmx.time.tv_sec = (long)offset;
-                tmx.time.tv_usec = (offset - tmx.time.tv_sec) * NSEC_PER_SEC;
-
-                /* the kernel expects -0.3s as {-1, 7000.000.000} */
-                if (tmx.time.tv_usec < 0) {
-                        tmx.time.tv_sec  -= 1;
-                        tmx.time.tv_usec += NSEC_PER_SEC;
-                }
-
-                m->jumped = true;
-                log_debug("  adjust (jump): %+.3f sec\n", offset);
-        }
-
-        switch (leap_sec) {
-        case 1:
-                tmx.status |= STA_INS;
-                break;
-        case -1:
-                tmx.status |= STA_DEL;
-                break;
-        }
-
-        r = clock_adjtime(CLOCK_REALTIME, &tmx);
-        if (r < 0)
-                return r;
-
-        touch("/var/lib/systemd/clock");
-
-        m->drift_ppm = tmx.freq / 65536;
-
-        log_debug("  status       : %04i %s\n"
-                  "  time now     : %li.%03llu\n"
-                  "  constant     : %li\n"
-                  "  offset       : %+.3f sec\n"
-                  "  freq offset  : %+li (%i ppm)\n",
-                  tmx.status, tmx.status & STA_UNSYNC ? "" : "sync",
-                  tmx.time.tv_sec, (unsigned long long) (tmx.time.tv_usec / NSEC_PER_MSEC),
-                  tmx.constant,
-                  (double)tmx.offset / NSEC_PER_SEC,
-                  tmx.freq, m->drift_ppm);
-
-        return 0;
-}
-
-static bool manager_sample_spike_detection(Manager *m, double offset, double delay) {
-        unsigned int i, idx_cur, idx_new, idx_min;
-        double jitter;
-        double j;
-
-        assert(m);
-
-        m->packet_count++;
-
-        /* ignore initial sample */
-        if (m->packet_count == 1)
-                return false;
-
-        /* store the current data in our samples array */
-        idx_cur = m->samples_idx;
-        idx_new = (idx_cur + 1) % ELEMENTSOF(m->samples);
-        m->samples_idx = idx_new;
-        m->samples[idx_new].offset = offset;
-        m->samples[idx_new].delay = delay;
-
-        /* calculate new jitter value from the RMS differences relative to the lowest delay sample */
-        jitter = m->samples_jitter;
-        for (idx_min = idx_cur, i = 0; i < ELEMENTSOF(m->samples); i++)
-                if (m->samples[i].delay > 0 && m->samples[i].delay < m->samples[idx_min].delay)
-                        idx_min = i;
-
-        j = 0;
-        for (i = 0; i < ELEMENTSOF(m->samples); i++)
-                j += square(m->samples[i].offset - m->samples[idx_min].offset);
-        m->samples_jitter = sqrt(j / (ELEMENTSOF(m->samples) - 1));
-
-        /* ignore samples when resyncing */
-        if (m->poll_resync)
-                return false;
-
-        /* always accept offset if we are farther off than the round-trip delay */
-        if (fabs(offset) > delay)
-                return false;
-
-        /* we need a few samples before looking at them */
-        if (m->packet_count < 4)
-                return false;
-
-        /* do not accept anything worse than the maximum possible error of the best sample */
-        if (fabs(offset) > m->samples[idx_min].delay)
-                return true;
-
-        /* compare the difference between the current offset to the previous offset and jitter */
-        return fabs(offset - m->samples[idx_cur].offset) > 3 * jitter;
-}
-
-static void manager_adjust_poll(Manager *m, double offset, bool spike) {
-        assert(m);
-
-        if (m->poll_resync) {
-                m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
-                m->poll_resync = false;
-                return;
-        }
-
-        /* set to minimal poll interval */
-        if (!spike && fabs(offset) > NTP_ACCURACY_SEC) {
-                m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
-                return;
-        }
-
-        /* increase polling interval */
-        if (fabs(offset) < NTP_ACCURACY_SEC * 0.25) {
-                if (m->poll_interval_usec < NTP_POLL_INTERVAL_MAX_SEC * USEC_PER_SEC)
-                        m->poll_interval_usec *= 2;
-                return;
-        }
-
-        /* decrease polling interval */
-        if (spike || fabs(offset) > NTP_ACCURACY_SEC * 0.75) {
-                if (m->poll_interval_usec > NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC)
-                        m->poll_interval_usec /= 2;
-                return;
-        }
-}
-
-static bool sockaddr_equal(union sockaddr_union *a, union sockaddr_union *b) {
-        assert(a);
-        assert(b);
-
-        if (a->sa.sa_family != b->sa.sa_family)
-                return false;
-
-        if (a->sa.sa_family == AF_INET)
-                return a->in.sin_addr.s_addr == b->in.sin_addr.s_addr;
-
-        if (a->sa.sa_family == AF_INET6)
-                return memcmp(&a->in6.sin6_addr, &b->in6.sin6_addr, sizeof(a->in6.sin6_addr)) == 0;
-
-        return false;
-}
-
-static int manager_receive_response(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
-        Manager *m = userdata;
-        struct ntp_msg ntpmsg;
-
-        struct iovec iov = {
-                .iov_base = &ntpmsg,
-                .iov_len = sizeof(ntpmsg),
-        };
-        union {
-                struct cmsghdr cmsghdr;
-                uint8_t buf[CMSG_SPACE(sizeof(struct timeval))];
-        } control;
-        union sockaddr_union server_addr;
-        struct msghdr msghdr = {
-                .msg_iov = &iov,
-                .msg_iovlen = 1,
-                .msg_control = &control,
-                .msg_controllen = sizeof(control),
-                .msg_name = &server_addr,
-                .msg_namelen = sizeof(server_addr),
-        };
-        struct cmsghdr *cmsg;
-        struct timespec now_ts;
-        struct timeval *recv_time;
-        ssize_t len;
-        double origin, receive, trans, dest;
-        double delay, offset;
-        bool spike;
-        int leap_sec;
-        int r;
-
-        assert(source);
-        assert(m);
-
-        if (revents & (EPOLLHUP|EPOLLERR)) {
-                log_warning("Server connection returned error.");
-                return manager_connect(m);
-        }
-
-        len = recvmsg(fd, &msghdr, MSG_DONTWAIT);
-        if (len < 0) {
-                if (errno == EAGAIN)
-                        return 0;
-
-                log_warning("Error receiving message. Disconnecting.");
-                return manager_connect(m);
-        }
-
-        if (iov.iov_len < sizeof(struct ntp_msg)) {
-                log_warning("Invalid response from server. Disconnecting.");
-                return manager_connect(m);
-        }
-
-        if (!m->current_server_name ||
-            !m->current_server_address ||
-            !sockaddr_equal(&server_addr, &m->current_server_address->sockaddr)) {
-                log_debug("Response from unknown server.");
-                return 0;
-        }
-
-        recv_time = NULL;
-        for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
-                if (cmsg->cmsg_level != SOL_SOCKET)
-                        continue;
-
-                switch (cmsg->cmsg_type) {
-                case SCM_TIMESTAMP:
-                        recv_time = (struct timeval *) CMSG_DATA(cmsg);
-                        break;
-                }
-        }
-        if (!recv_time) {
-                log_error("Invalid packet timestamp.");
-                return -EINVAL;
-        }
-
-        if (!m->pending) {
-                log_debug("Unexpected reply. Ignoring.");
-                return 0;
-        }
-
-        /* check our "time cookie" (we just stored nanoseconds in the fraction field) */
-        if (be32toh(ntpmsg.origin_time.sec) != m->trans_time.tv_sec + OFFSET_1900_1970 ||
-            be32toh(ntpmsg.origin_time.frac) != m->trans_time.tv_nsec) {
-                log_debug("Invalid reply; not our transmit time. Ignoring.");
-                return 0;
-        }
-
-        m->event_timeout = sd_event_source_unref(m->event_timeout);
-
-        if (be32toh(ntpmsg.recv_time.sec) < TIME_EPOCH + OFFSET_1900_1970 ||
-            be32toh(ntpmsg.trans_time.sec) < TIME_EPOCH + OFFSET_1900_1970) {
-                log_debug("Invalid reply, returned times before epoch. Ignoring.");
-                return manager_connect(m);
-        }
-
-        if (NTP_FIELD_LEAP(ntpmsg.field) == NTP_LEAP_NOTINSYNC) {
-                log_debug("Server is not synchronized. Disconnecting.");
-                return manager_connect(m);
-        }
-
-        if (!IN_SET(NTP_FIELD_VERSION(ntpmsg.field), 3, 4)) {
-                log_debug("Response NTPv%d. Disconnecting.", NTP_FIELD_VERSION(ntpmsg.field));
-                return manager_connect(m);
-        }
-
-        if (NTP_FIELD_MODE(ntpmsg.field) != NTP_MODE_SERVER) {
-                log_debug("Unsupported mode %d. Disconnecting.", NTP_FIELD_MODE(ntpmsg.field));
-                return manager_connect(m);
-        }
-
-        /* valid packet */
-        m->pending = false;
-        m->retry_interval = 0;
-
-        /* announce leap seconds */
-        if (NTP_FIELD_LEAP(ntpmsg.field) & NTP_LEAP_PLUSSEC)
-                leap_sec = 1;
-        else if (NTP_FIELD_LEAP(ntpmsg.field) & NTP_LEAP_MINUSSEC)
-                leap_sec = -1;
-        else
-                leap_sec = 0;
-
-        /*
-         * "Timestamp Name          ID   When Generated
-         *  ------------------------------------------------------------
-         *  Originate Timestamp     T1   time request sent by client
-         *  Receive Timestamp       T2   time request received by server
-         *  Transmit Timestamp      T3   time reply sent by server
-         *  Destination Timestamp   T4   time reply received by client
-         *
-         *  The round-trip delay, d, and system clock offset, t, are defined as:
-         *  d = (T4 - T1) - (T3 - T2)     t = ((T2 - T1) + (T3 - T4)) / 2"
-         */
-        assert_se(clock_gettime(CLOCK_MONOTONIC, &now_ts) >= 0);
-        origin = tv_to_d(recv_time) - (ts_to_d(&now_ts) - ts_to_d(&m->trans_time_mon)) + OFFSET_1900_1970;
-        receive = ntp_ts_to_d(&ntpmsg.recv_time);
-        trans = ntp_ts_to_d(&ntpmsg.trans_time);
-        dest = tv_to_d(recv_time) + OFFSET_1900_1970;
-
-        offset = ((receive - origin) + (trans - dest)) / 2;
-        delay = (dest - origin) - (trans - receive);
-
-        spike = manager_sample_spike_detection(m, offset, delay);
-
-        manager_adjust_poll(m, offset, spike);
-
-        log_debug("NTP response:\n"
-                  "  leap         : %u\n"
-                  "  version      : %u\n"
-                  "  mode         : %u\n"
-                  "  stratum      : %u\n"
-                  "  precision    : %.6f sec (%d)\n"
-                  "  reference    : %.4s\n"
-                  "  origin       : %.3f\n"
-                  "  receive      : %.3f\n"
-                  "  transmit     : %.3f\n"
-                  "  dest         : %.3f\n"
-                  "  offset       : %+.3f sec\n"
-                  "  delay        : %+.3f sec\n"
-                  "  packet count : %"PRIu64"\n"
-                  "  jitter       : %.3f%s\n"
-                  "  poll interval: " USEC_FMT "\n",
-                  NTP_FIELD_LEAP(ntpmsg.field),
-                  NTP_FIELD_VERSION(ntpmsg.field),
-                  NTP_FIELD_MODE(ntpmsg.field),
-                  ntpmsg.stratum,
-                  exp2(ntpmsg.precision), ntpmsg.precision,
-                  ntpmsg.stratum == 1 ? ntpmsg.refid : "n/a",
-                  origin - OFFSET_1900_1970,
-                  receive - OFFSET_1900_1970,
-                  trans - OFFSET_1900_1970,
-                  dest - OFFSET_1900_1970,
-                  offset, delay,
-                  m->packet_count,
-                  m->samples_jitter, spike ? " spike" : "",
-                  m->poll_interval_usec / USEC_PER_SEC);
-
-        if (!spike) {
-                m->sync = true;
-                r = manager_adjust_clock(m, offset, leap_sec);
-                if (r < 0)
-                        log_error("Failed to call clock_adjtime(): %m");
-        }
-
-        log_info("interval/delta/delay/jitter/drift " USEC_FMT "s/%+.3fs/%.3fs/%.3fs/%+ippm%s",
-                 m->poll_interval_usec / USEC_PER_SEC, offset, delay, m->samples_jitter, m->drift_ppm,
-                 spike ? " (ignored)" : "");
-
-        r = manager_arm_timer(m, m->poll_interval_usec);
-        if (r < 0) {
-                log_error("Failed to rearm timer: %s", strerror(-r));
-                return r;
-        }
-
-        return 0;
-}
-
-static int manager_listen_setup(Manager *m) {
-        union sockaddr_union addr = {};
-        static const int tos = IPTOS_LOWDELAY;
-        static const int on = 1;
-        int r;
-
-        assert(m);
-
-        assert(m->server_socket < 0);
-        assert(!m->event_receive);
-        assert(m->current_server_address);
-
-        addr.sa.sa_family = m->current_server_address->sockaddr.sa.sa_family;
-
-        m->server_socket = socket(addr.sa.sa_family, SOCK_DGRAM | SOCK_CLOEXEC, 0);
-        if (m->server_socket < 0)
-                return -errno;
-
-        r = bind(m->server_socket, &addr.sa, m->current_server_address->socklen);
-        if (r < 0)
-                return -errno;
-
-        r = setsockopt(m->server_socket, SOL_SOCKET, SO_TIMESTAMP, &on, sizeof(on));
-        if (r < 0)
-                return -errno;
-
-        setsockopt(m->server_socket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
-
-        return sd_event_add_io(m->event, &m->event_receive, m->server_socket, EPOLLIN, manager_receive_response, m);
-}
-
-static int manager_begin(Manager *m) {
-        _cleanup_free_ char *pretty = NULL;
-        int r;
-
-        assert(m);
-        assert_return(m->current_server_name, -EHOSTUNREACH);
-        assert_return(m->current_server_address, -EHOSTUNREACH);
-
-        m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
-
-        sockaddr_pretty(&m->current_server_address->sockaddr.sa, m->current_server_address->socklen, true, &pretty);
-        log_info("Using NTP server %s (%s).", strna(pretty), m->current_server_name->string);
-        sd_notifyf(false, "STATUS=Using Time Server %s (%s).", strna(pretty), m->current_server_name->string);
-
-        r = manager_listen_setup(m);
-        if (r < 0) {
-                log_warning("Failed to setup connection socket: %s", strerror(-r));
-                return r;
-        }
-
-        r = manager_clock_watch_setup(m);
-        if (r < 0)
-                return r;
-
-        return manager_send_request(m);
-}
-
-static void server_name_flush_addresses(ServerName *n) {
-        ServerAddress *a;
-
-        assert(n);
-
-        while ((a = n->addresses)) {
-                LIST_REMOVE(addresses, n->addresses, a);
-                free(a);
-        }
-}
-
-static void manager_flush_names(Manager *m) {
-        ServerName *n;
-
-        assert(m);
-
-        while ((n = m->servers)) {
-                LIST_REMOVE(names, m->servers, n);
-                free(n->string);
-                server_name_flush_addresses(n);
-                free(n);
-        }
-}
-
-static int manager_resolve_handler(sd_resolve_query *q, int ret, const struct addrinfo *ai, void *userdata) {
-        Manager *m = userdata;
-        ServerAddress *a, *last = NULL;
-
-        assert(q);
-        assert(m);
-        assert(m->current_server_name);
-
-        m->resolve_query = sd_resolve_query_unref(m->resolve_query);
-
-        if (ret != 0) {
-                log_debug("Failed to resolve %s: %s", m->current_server_name->string, gai_strerror(ret));
-
-                /* Try next host */
-                return manager_connect(m);
-        }
-
-        server_name_flush_addresses(m->current_server_name);
-
-        for (; ai; ai = ai->ai_next) {
-                _cleanup_free_ char *pretty = NULL;
-
-                assert(ai->ai_addr);
-                assert(ai->ai_addrlen >= offsetof(struct sockaddr, sa_data));
-                assert(ai->ai_addrlen <= sizeof(union sockaddr_union));
-
-                if (!IN_SET(ai->ai_addr->sa_family, AF_INET, AF_INET6)) {
-                        log_warning("Unsuitable address protocol for %s", m->current_server_name->string);
-                        continue;
-                }
-
-                a = new0(ServerAddress, 1);
-                if (!a)
-                        return log_oom();
-
-                memcpy(&a->sockaddr, ai->ai_addr, ai->ai_addrlen);
-                a->socklen = ai->ai_addrlen;
-
-                LIST_INSERT_AFTER(addresses, m->current_server_name->addresses, last, a);
-                last = a;
-
-                sockaddr_pretty(&a->sockaddr.sa, a->socklen, true, &pretty);
-                log_debug("Resolved address %s for %s.", pretty, m->current_server_name->string);
-        }
-
-        if (!m->current_server_name->addresses) {
-                log_error("Failed to find suitable address for host %s.", m->current_server_name->string);
-
-                /* Try next host */
-                return manager_connect(m);
-        }
-
-        m->current_server_address = m->current_server_name->addresses;
-
-        return manager_begin(m);
-}
-
-static int manager_retry(sd_event_source *source, usec_t usec, void *userdata) {
-        Manager *m = userdata;
-
-        assert(m);
-
-        return manager_connect(m);
-}
-
-static int manager_connect(Manager *m) {
-
-        struct addrinfo hints = {
-                .ai_flags = AI_NUMERICSERV|AI_ADDRCONFIG,
-                .ai_socktype = SOCK_DGRAM,
-        };
-        int r;
-
-        assert(m);
-
-        manager_disconnect(m);
-
-        m->event_retry = sd_event_source_unref(m->event_retry);
-        if (!ratelimit_test(&m->ratelimit)) {
-                log_debug("Slowing down attempts to contact servers.");
-
-                r = sd_event_add_time(m->event, &m->event_retry, CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + RETRY_USEC, 0, manager_retry, m);
-                if (r < 0) {
-                        log_error("Failed to create retry timer: %s", strerror(-r));
-                        return r;
-                }
-
-                return 0;
-        }
-
-        /* If we already are operating on some address, switch to the
-         * next one. */
-        if (m->current_server_address && m->current_server_address->addresses_next)
-                m->current_server_address = m->current_server_address->addresses_next;
-        else {
-                /* Hmm, we are through all addresses, let's look for the next host instead */
-                m->current_server_address = NULL;
-
-                if (m->current_server_name && m->current_server_name->names_next)
-                        m->current_server_name = m->current_server_name->names_next;
-                else {
-                        if (!m->servers) {
-                                m->current_server_name = NULL;
-                                log_debug("No server found.");
-                                return 0;
-                        }
-
-                        m->current_server_name = m->servers;
-                }
-
-                /* Tell the resolver to reread /etc/resolv.conf, in
-                 * case it changed. */
-                res_init();
-
-                r = sd_resolve_getaddrinfo(m->resolve, &m->resolve_query, m->current_server_name->string, "123", &hints, manager_resolve_handler, m);
-                if (r < 0) {
-                        log_error("Failed to create resolver: %s", strerror(-r));
-                        return r;
-                }
-
-                return 1;
-        }
-
-        r = manager_begin(m);
-        if (r < 0)
-                return r;
-
-        return 1;
-}
-
-static int manager_add_server(Manager *m, const char *server) {
-        ServerName *n, *tail;
-
-        assert(m);
-        assert(server);
-
-        n = new0(ServerName, 1);
-        if (!n)
-                return -ENOMEM;
-
-        n->string = strdup(server);
-        if (!n->string) {
-                free(n);
-                return -ENOMEM;
-        }
-
-        LIST_FIND_TAIL(names, m->servers, tail);
-        LIST_INSERT_AFTER(names, m->servers, tail, n);
-
-        return 0;
-}
-
-static int manager_add_server_string(Manager *m, const char *string) {
-        char *w, *state;
-        size_t l;
-        int r;
-
-        assert(m);
-        assert(string);
-
-        FOREACH_WORD_QUOTED(w, l, string, state) {
-                char t[l+1];
-
-                memcpy(t, w, l);
-                t[l] = 0;
-
-                r = manager_add_server(m, t);
-                if (r < 0)
-                        log_error("Failed to add server %s to configuration, ignoring: %s", t, strerror(-r));
-        }
-
-        return 0;
-}
-
-static void manager_disconnect(Manager *m) {
-        assert(m);
-
-        m->resolve_query = sd_resolve_query_unref(m->resolve_query);
-
-        m->event_timer = sd_event_source_unref(m->event_timer);
-
-        m->event_receive = sd_event_source_unref(m->event_receive);
-        m->server_socket = safe_close(m->server_socket);
-
-        m->event_clock_watch = sd_event_source_unref(m->event_clock_watch);
-        m->clock_watch_fd = safe_close(m->clock_watch_fd);
-
-        m->event_timeout = sd_event_source_unref(m->event_timeout);
-
-        sd_notifyf(false, "STATUS=Idle.");
-}
-
-static int manager_new(Manager **ret) {
-        _cleanup_manager_free_ Manager *m = NULL;
-        int r;
-
-        m = new0(Manager, 1);
-        if (!m)
-                return -ENOMEM;
-
-        m->server_socket = m->clock_watch_fd = -1;
-
-        RATELIMIT_INIT(m->ratelimit, RATELIMIT_INTERVAL_USEC, RATELIMIT_BURST);
-
-        r = sd_event_default(&m->event);
-        if (r < 0)
-                return r;
-
-        sd_event_set_watchdog(m->event, true);
-
-        sd_event_add_signal(m->event, NULL, SIGTERM, NULL,  NULL);
-        sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
-
-        r = sd_resolve_default(&m->resolve);
-        if (r < 0)
-                return r;
-
-        r = sd_resolve_attach_event(m->resolve, m->event, 0);
-        if (r < 0)
-                return r;
-
-        r = manager_clock_watch_setup(m);
-        if (r < 0)
-                return r;
-
-        *ret = m;
-        m = NULL;
-
-        return 0;
-}
-
-static void manager_free(Manager *m) {
-        if (!m)
-                return;
-
-        manager_disconnect(m);
-        manager_flush_names(m);
-
-        sd_event_source_unref(m->event_retry);
-
-        sd_event_source_unref(m->network_event_source);
-        sd_network_monitor_unref(m->network_monitor);
-
-        sd_resolve_unref(m->resolve);
-        sd_event_unref(m->event);
-
-        free(m);
-}
-
-int config_parse_servers(
-                const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-        Manager *m = userdata;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-
-        manager_flush_names(m);
-        manager_add_server_string(m, rvalue);
-
-        return 0;
-}
-
-static int manager_parse_config_file(Manager *m) {
-        static const char fn[] = "/etc/systemd/timesyncd.conf";
-        _cleanup_fclose_ FILE *f = NULL;
-        int r;
-
-        assert(m);
-
-        f = fopen(fn, "re");
-        if (!f) {
-                if (errno == ENOENT)
-                        return 0;
-
-                log_warning("Failed to open configuration file %s: %m", fn);
-                return -errno;
-        }
-
-        r = config_parse(NULL, fn, f, "Time\0", config_item_perf_lookup,
-                         (void*) timesyncd_gperf_lookup, false, false, m);
-        if (r < 0)
-                log_warning("Failed to parse configuration file: %s", strerror(-r));
-
-        return r;
-}
-
-static bool network_is_online(void) {
-        _cleanup_free_ char *state = NULL;
-        int r;
-
-        r = sd_network_get_operational_state(&state);
-        if (r >= 0 && STR_IN_SET(state, "routable", "degraded"))
-                return true;
-
-        return false;
-}
-
-static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t revents,
-                                         void *userdata) {
-        Manager *m = userdata;
-        bool connected, online;
-        int r;
-
-        assert(m);
-
-        /* check if the machine is online */
-        online = network_is_online();
-
-        /* check if the client is currently connected */
-        connected = (m->server_socket != -1);
-
-        if (connected && !online) {
-                log_info("No network connectivity, watching for changes.");
-                manager_disconnect(m);
-        } else if (!connected && online) {
-                log_info("Network configuration changed, trying to establish connection.");
-                if (m->current_server_address) {
-                        r = manager_begin(m);
-                        if (r < 0)
-                                return r;
-                } else {
-                        r = manager_connect(m);
-                        if (r < 0)
-                                return r;
-                }
-        }
-
-        sd_network_monitor_flush(m->network_monitor);
-
-        return 0;
-}
-
-static int manager_network_monitor_listen(Manager *m) {
-        _cleanup_event_source_unref_ sd_event_source *event_source = NULL;
-        _cleanup_network_monitor_unref_ sd_network_monitor *monitor = NULL;
-        int r, fd, events;
-
-        r = sd_network_monitor_new(NULL, &monitor);
-        if (r < 0)
-                return r;
-
-        fd = sd_network_monitor_get_fd(monitor);
-        if (fd < 0)
-                return fd;
-
-        events = sd_network_monitor_get_events(monitor);
-        if (events < 0)
-                return events;
-
-        r = sd_event_add_io(m->event, &event_source, fd, events,
-                            &manager_network_event_handler, m);
-        if (r < 0)
-                return r;
-
-        m->network_monitor = monitor;
-        m->network_event_source = event_source;
-        monitor = NULL;
-        event_source = NULL;
-
-        return 0;
-}
-
 int main(int argc, char *argv[]) {
+        _cleanup_(manager_freep) Manager *m = NULL;
         const char *user = "systemd-timesync";
-        _cleanup_manager_free_ Manager *m = NULL;
         uid_t uid;
         gid_t gid;
         int r;
 
-        if (argc > 1) {
-                log_error("This program does not take arguments.");
-                return EXIT_FAILURE;
-        }
-
         log_set_target(LOG_TARGET_AUTO);
         log_set_facility(LOG_CRON);
         log_parse_environment();
@@ -1215,60 +93,71 @@ int main(int argc, char *argv[]) {
 
         umask(0022);
 
+        if (argc != 1) {
+                log_error("This program does not take arguments.");
+                r = -EINVAL;
+                goto finish;
+        }
+
         r = get_user_creds(&user, &uid, &gid, NULL, NULL);
         if (r < 0) {
                 log_error("Cannot resolve user name %s: %s", user, strerror(-r));
-                return r;
+                goto finish;
         }
 
         r = load_clock_timestamp(uid, gid);
         if (r < 0)
-                goto out;
+                goto finish;
 
         r = drop_privileges(uid, gid, (1ULL << CAP_SYS_TIME));
         if (r < 0)
-                goto out;
+                goto finish;
 
         assert_se(sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, -1) == 0);
 
         r = manager_new(&m);
         if (r < 0) {
                 log_error("Failed to allocate manager: %s", strerror(-r));
-                goto out;
+                goto finish;
         }
 
-        manager_add_server_string(m, NTP_SERVERS);
-        manager_parse_config_file(m);
-
-        r = manager_network_monitor_listen(m);
-        if (r < 0) {
-                log_error("Failed to listen to networkd events: %s", strerror(-r));
-                goto out;
+        if (clock_is_localtime() > 0) {
+                log_info("The system is configured to read the RTC time in the local time zone. "
+                         "This mode can not be fully supported. All system time to RTC updates are disabled.");
+                m->rtc_local_time = true;
         }
 
+        r = manager_parse_config_file(m);
+        if (r < 0)
+                log_warning("Failed to parse configuration file: %s", strerror(-r));
+
         log_debug("systemd-timesyncd running as pid %lu", (unsigned long) getpid());
-        sd_notify(false, "READY=1");
+        sd_notify(false,
+                  "READY=1\n"
+                  "STATUS=Daemon is running");
 
         if (network_is_online()) {
                 r = manager_connect(m);
                 if (r < 0)
-                        goto out;
+                        goto finish;
         }
 
         r = sd_event_loop(m->event);
         if (r < 0) {
                 log_error("Failed to run event loop: %s", strerror(-r));
-                goto out;
+                goto finish;
         }
 
-        sd_event_get_exit_code(m->event, &r);
-
         /* if we got an authoritative time, store it in the file system */
         if (m->sync)
                 touch("/var/lib/systemd/clock");
 
-out:
-        sd_notify(false, "STATUS=Shutting down...");
+        sd_event_get_exit_code(m->event, &r);
+
+finish:
+        sd_notify(false,
+                  "STOPPING=1\n"
+                  "STATUS=Shutting down...");
 
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index a0caa1d40d052df811d800f862e6f0d35f6ef40c..674a51dbd72223332c13b1d92d98d46d63e0cd66 100644 (file)
@@ -8,4 +8,5 @@
 # See timesyncd.conf(5) for details
 
 [Time]
-#Servers=@NTP_SERVERS@
+#NTP=
+#FallbackNTP=@NTP_SERVERS@
diff --git a/src/timesync/timesyncd.h b/src/timesync/timesyncd.h
deleted file mode 100644 (file)
index 4afe4b9..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Kay Sievers, Lennart Poettering
-
-  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/>.
-***/
-
-#include "list.h"
-#include "socket-util.h"
-#include "ratelimit.h"
-#include "sd-event.h"
-#include "sd-resolve.h"
-#include "sd-network.h"
-
-typedef struct Manager Manager;
-typedef struct ServerAddress ServerAddress;
-typedef struct ServerName ServerName;
-
-struct ServerAddress {
-        union sockaddr_union sockaddr;
-        socklen_t socklen;
-        LIST_FIELDS(ServerAddress, addresses);
-};
-
-struct ServerName {
-        char *string;
-        LIST_HEAD(ServerAddress, addresses);
-        LIST_FIELDS(ServerName, names);
-};
-
-struct Manager {
-        sd_event *event;
-        sd_resolve *resolve;
-
-        LIST_HEAD(ServerName, servers);
-
-        RateLimit ratelimit;
-
-        /* network */
-        sd_event_source *network_event_source;
-        sd_network_monitor *network_monitor;
-
-        /* peer */
-        sd_resolve_query *resolve_query;
-        sd_event_source *event_receive;
-        ServerName *current_server_name;
-        ServerAddress *current_server_address;
-        int server_socket;
-        uint64_t packet_count;
-        sd_event_source *event_timeout;
-
-        /* last sent packet */
-        struct timespec trans_time_mon;
-        struct timespec trans_time;
-        usec_t retry_interval;
-        bool pending;
-
-        /* poll timer */
-        sd_event_source *event_timer;
-        usec_t poll_interval_usec;
-        bool poll_resync;
-
-        /* history data */
-        struct {
-                double offset;
-                double delay;
-        } samples[8];
-        unsigned int samples_idx;
-        double samples_jitter;
-
-        /* last change */
-        bool jumped;
-        bool sync;
-        int drift_ppm;
-
-        /* watch for time changes */
-        sd_event_source *event_clock_watch;
-        int clock_watch_fd;
-
-        /* Retry connections */
-        sd_event_source *event_retry;
-};
-
-const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, unsigned length);
-
-int config_parse_servers(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
index 68cfa55ce9cee09e96985c76ac2390cfbe5140f7..1e4675f87eb9ecf304e46290613c8e72e58810b9 100644 (file)
@@ -165,7 +165,7 @@ static void load_unix_sockets(void) {
         /* We maintain a cache of the sockets we found in
          * /proc/net/unix to speed things up a little. */
 
-        unix_sockets = set_new(string_hash_func, string_compare_func);
+        unix_sockets = set_new(&string_hash_ops);
         if (!unix_sockets)
                 return;
 
@@ -259,7 +259,7 @@ static int dir_is_mount_point(DIR *d, const char *subdir) {
 
         /* got only one handle; assume different mount points if one
          * of both queries was not supported by the filesystem */
-        if (r_p == -ENOSYS || r_p == -ENOTSUP || r == -ENOSYS || r == -ENOTSUP)
+        if (r_p == -ENOSYS || r_p == -EOPNOTSUPP || r == -ENOSYS || r == -EOPNOTSUPP)
                 return true;
 
         /* return error */
@@ -453,35 +453,39 @@ finish:
 }
 
 static int item_set_perms(Item *i, const char *path) {
+        struct stat st;
+        bool st_valid;
+
         assert(i);
         assert(path);
 
+        st_valid = stat(path, &st) == 0;
+
         /* not using i->path directly because it may be a glob */
         if (i->mode_set) {
                 mode_t m = i->mode;
 
-                if (i->mask_perms) {
-                        struct stat st;
-
-                        if (stat(path, &st) >= 0) {
-                                if (!(st.st_mode & 0111))
-                                        m &= ~0111;
-                                if (!(st.st_mode & 0222))
-                                        m &= ~0222;
-                                if (!(st.st_mode & 0444))
-                                        m &= ~0444;
-                                if (!S_ISDIR(st.st_mode))
-                                        m &= ~07000; /* remove sticky/sgid/suid bit, unless directory */
-                        }
+                if (i->mask_perms && st_valid) {
+                        if (!(st.st_mode & 0111))
+                                m &= ~0111;
+                        if (!(st.st_mode & 0222))
+                                m &= ~0222;
+                        if (!(st.st_mode & 0444))
+                                m &= ~0444;
+                        if (!S_ISDIR(st.st_mode))
+                                m &= ~07000; /* remove sticky/sgid/suid bit, unless directory */
                 }
 
-                if (chmod(path, m) < 0) {
-                        log_error("chmod(%s) failed: %m", path);
-                        return -errno;
+                if (!st_valid || m != (st.st_mode & 07777)) {
+                        if (chmod(path, m) < 0) {
+                                log_error("chmod(%s) failed: %m", path);
+                                return -errno;
+                        }
                 }
         }
 
-        if (i->uid_set || i->gid_set)
+        if ((!st_valid || (i->uid != st.st_uid || i->gid != st.st_gid)) &&
+            (i->uid_set || i->gid_set))
                 if (chown(path,
                           i->uid_set ? i->uid : (uid_t) -1,
                           i->gid_set ? i->gid : (gid_t) -1) < 0) {
@@ -505,9 +509,9 @@ static int write_one_file(Item *i, const char *path) {
                 i->type == TRUNCATE_FILE ? O_CREAT|O_TRUNC|O_NOFOLLOW : 0;
 
         RUN_WITH_UMASK(0000) {
-                label_context_set(path, S_IFREG);
+                mac_selinux_create_file_prepare(path, S_IFREG);
                 fd = open(path, flags|O_NDELAY|O_CLOEXEC|O_WRONLY|O_NOCTTY, i->mode);
-                label_context_clear();
+                mac_selinux_create_file_clear();
         }
 
         if (fd < 0) {
@@ -739,9 +743,9 @@ static int create_item(Item *i) {
         case CREATE_FIFO:
 
                 RUN_WITH_UMASK(0000) {
-                        label_context_set(i->path, S_IFIFO);
+                        mac_selinux_create_file_prepare(i->path, S_IFIFO);
                         r = mkfifo(i->path, i->mode);
-                        label_context_clear();
+                        mac_selinux_create_file_clear();
                 }
 
                 if (r < 0) {
@@ -760,9 +764,9 @@ static int create_item(Item *i) {
                                 if (i->force) {
 
                                         RUN_WITH_UMASK(0000) {
-                                                label_context_set(i->path, S_IFIFO);
+                                                mac_selinux_create_file_prepare(i->path, S_IFIFO);
                                                 r = mkfifo_atomic(i->path, i->mode);
-                                                label_context_clear();
+                                                mac_selinux_create_file_clear();
                                         }
 
                                         if (r < 0) {
@@ -784,9 +788,9 @@ static int create_item(Item *i) {
 
         case CREATE_SYMLINK:
 
-                label_context_set(i->path, S_IFLNK);
+                mac_selinux_create_file_prepare(i->path, S_IFLNK);
                 r = symlink(i->argument, i->path);
-                label_context_clear();
+                mac_selinux_create_file_clear();
 
                 if (r < 0) {
                         _cleanup_free_ char *x = NULL;
@@ -800,9 +804,9 @@ static int create_item(Item *i) {
                         if (r < 0 || !streq(i->argument, x)) {
 
                                 if (i->force) {
-                                        label_context_set(i->path, S_IFLNK);
+                                        mac_selinux_create_file_prepare(i->path, S_IFLNK);
                                         r = symlink_atomic(i->argument, i->path);
-                                        label_context_clear();
+                                        mac_selinux_create_file_clear();
 
                                         if (r < 0) {
                                                 log_error("symlink(%s, %s) failed: %s", i->argument, i->path, strerror(-r));
@@ -834,9 +838,9 @@ static int create_item(Item *i) {
                 file_type = i->type == CREATE_BLOCK_DEVICE ? S_IFBLK : S_IFCHR;
 
                 RUN_WITH_UMASK(0000) {
-                        label_context_set(i->path, file_type);
+                        mac_selinux_create_file_prepare(i->path, file_type);
                         r = mknod(i->path, i->mode | file_type, i->major_minor);
-                        label_context_clear();
+                        mac_selinux_create_file_clear();
                 }
 
                 if (r < 0) {
@@ -861,9 +865,9 @@ static int create_item(Item *i) {
                                 if (i->force) {
 
                                         RUN_WITH_UMASK(0000) {
-                                                label_context_set(i->path, file_type);
+                                                mac_selinux_create_file_prepare(i->path, file_type);
                                                 r = mknod_atomic(i->path, i->mode | file_type, i->major_minor);
-                                                label_context_clear();
+                                                mac_selinux_create_file_clear();
                                         }
 
                                         if (r < 0) {
@@ -1060,7 +1064,7 @@ static int clean_item(Item *i) {
 
 static int process_item(Item *i) {
         int r, q, p;
-        char prefix[PATH_MAX];
+        _cleanup_free_ char *prefix = NULL;
 
         assert(i);
 
@@ -1069,6 +1073,10 @@ static int process_item(Item *i) {
 
         i->done = true;
 
+        prefix = malloc(strlen(i->path) + 1);
+        if (!prefix)
+                return log_oom();
+
         PATH_FOREACH_PREFIX(prefix, i->path) {
                 Item *j;
 
@@ -1407,8 +1415,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
         return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n"
                "Creates, deletes and cleans up volatile and temporary files and directories.\n\n"
                "  -h --help                 Show this help\n"
@@ -1421,8 +1428,6 @@ static int help(void) {
                "     --exclude-prefix=PATH  Ignore rules that apply to paths with the specified prefix\n"
                "     --root=PATH            Operate on an alternate filesystem root\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -1456,12 +1461,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -1509,7 +1515,6 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (!arg_clean && !arg_create && !arg_remove) {
                 log_error("You need to specify at least one of --clean, --create or --remove.");
@@ -1575,7 +1580,7 @@ static int read_config_file(const char *fn, bool ignore_enoent) {
                                 candidate_item = j;
                 }
 
-                if (candidate_item) {
+                if (candidate_item && candidate_item->age_set) {
                         i->age = candidate_item->age;
                         i->age_set = true;
                 }
@@ -1605,10 +1610,10 @@ int main(int argc, char *argv[]) {
 
         umask(0022);
 
-        label_init(NULL);
+        mac_selinux_init(NULL);
 
-        items = hashmap_new(string_hash_func, string_compare_func);
-        globs = hashmap_new(string_hash_func, string_compare_func);
+        items = hashmap_new(&string_hash_ops);
+        globs = hashmap_new(&string_hash_ops);
 
         if (!items || !globs) {
                 r = log_oom();
@@ -1665,7 +1670,7 @@ finish:
 
         set_free_free(unix_sockets);
 
-        label_finish();
+        mac_selinux_finish();
 
         return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index 55a2215d0a2517253a86265e62f50e551f92fa4a..e6dc84b440bcded878e3ba75bd0f3bda586a4546 100644 (file)
@@ -41,6 +41,7 @@
 #include "ask-password-api.h"
 #include "strv.h"
 #include "build.h"
+#include "def.h"
 
 static enum {
         ACTION_LIST,
@@ -59,9 +60,9 @@ static int ask_password_plymouth(
                 bool accept_cached,
                 char ***_passphrases) {
 
-        int fd = -1, notify = -1;
-        union sockaddr_union sa = {};
-        char *packet = NULL;
+        _cleanup_close_ int fd = -1, notify = -1;
+        union sockaddr_union sa = PLYMOUTH_SOCKET;
+        _cleanup_free_ char *packet = NULL;
         ssize_t k;
         int r, n;
         struct pollfd pollfd[2] = {};
@@ -75,45 +76,38 @@ static int ask_password_plymouth(
         assert(_passphrases);
 
         if (flag_file) {
-                if ((notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK)) < 0) {
-                        r = -errno;
-                        goto finish;
-                }
+                notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
+                if (notify < 0)
+                        return -errno;
 
-                if (inotify_add_watch(notify, flag_file, IN_ATTRIB /* for the link count */) < 0) {
-                        r = -errno;
-                        goto finish;
-                }
+                r = inotify_add_watch(notify, flag_file, IN_ATTRIB); /* for the link count */
+                if (r < 0)
+                        return -errno;
         }
 
-        if ((fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0)) < 0) {
-                r = -errno;
-                goto finish;
-        }
+        fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
+        if (fd < 0)
+                return -errno;
 
-        sa.sa.sa_family = AF_UNIX;
-        strncpy(sa.un.sun_path+1, "/org/freedesktop/plymouthd", sizeof(sa.un.sun_path)-1);
-        if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)) < 0) {
+        r = connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1));
+        if (r < 0) {
                 log_error("Failed to connect to Plymouth: %m");
-                r = -errno;
-                goto finish;
+                return -errno;
         }
 
         if (accept_cached) {
                 packet = strdup("c");
                 n = 1;
-        } else
-                asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1), message, &n);
+        } else if (asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1),
+                            message, &n) < 0)
+                packet = NULL;
 
-        if (!packet) {
-                r = -ENOMEM;
-                goto finish;
-        }
+        if (!packet)
+                return log_oom();
 
-        if ((k = loop_write(fd, packet, n+1, true)) != n+1) {
-                r = k < 0 ? (int) k : -EIO;
-                goto finish;
-        }
+        k = loop_write(fd, packet, n + 1, true);
+        if (k != n + 1)
+                return k < 0 ? (int) k : -EIO;
 
         pollfd[POLL_SOCKET].fd = fd;
         pollfd[POLL_SOCKET].events = POLLIN;
@@ -128,31 +122,23 @@ static int ask_password_plymouth(
 
                         y = now(CLOCK_MONOTONIC);
 
-                        if (y > until) {
-                                r = -ETIME;
-                                goto finish;
-                        }
+                        if (y > until)
+                                return -ETIME;
 
                         sleep_for = (int) ((until - y) / USEC_PER_MSEC);
                 }
 
-                if (flag_file)
-                        if (access(flag_file, F_OK) < 0) {
-                                r = -errno;
-                                goto finish;
-                        }
-
-                if ((j = poll(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
+                if (flag_file && access(flag_file, F_OK) < 0)
+                        return -errno;
 
+                j = poll(pollfd, notify > 0 ? 2 : 1, sleep_for);
+                if (j < 0) {
                         if (errno == EINTR)
                                 continue;
 
-                        r = -errno;
-                        goto finish;
-                } else if (j == 0) {
-                        r = -ETIME;
-                        goto finish;
-                }
+                        return -errno;
+                } else if (j == 0)
+                        return -ETIME;
 
                 if (notify > 0 && pollfd[POLL_INOTIFY].revents != 0)
                         flush_fd(notify);
@@ -160,10 +146,9 @@ static int ask_password_plymouth(
                 if (pollfd[POLL_SOCKET].revents == 0)
                         continue;
 
-                if ((k = read(fd, buffer + p, sizeof(buffer) - p)) <= 0) {
-                        r = k < 0 ? -errno : -EIO;
-                        goto finish;
-                }
+                k = read(fd, buffer + p, sizeof(buffer) - p);
+                if (k <= 0)
+                        return r = k < 0 ? -errno : -EIO;
 
                 p += k;
 
@@ -179,15 +164,12 @@ static int ask_password_plymouth(
                                 free(packet);
                                 packet = NULL;
 
-                                if (asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1), message, &n) < 0) {
-                                        r = -ENOMEM;
-                                        goto finish;
-                                }
+                                if (asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1), message, &n) < 0)
+                                        return -ENOMEM;
 
-                                if ((k = loop_write(fd, packet, n+1, true)) != n+1) {
-                                        r = k < 0 ? (int) k : -EIO;
-                                        goto finish;
-                                }
+                                k = loop_write(fd, packet, n+1, true);
+                                if (k != n + 1)
+                                        return k < 0 ? (int) k : -EIO;
 
                                 accept_cached = false;
                                 p = 0;
@@ -195,59 +177,44 @@ static int ask_password_plymouth(
                         }
 
                         /* No password, because UI not shown */
-                        r = -ENOENT;
-                        goto finish;
+                        return -ENOENT;
 
                 } else if (buffer[0] == 2 || buffer[0] == 9) {
                         uint32_t size;
                         char **l;
 
-                        /* One ore more answers */
+                        /* One or more answers */
                         if (p < 5)
                                 continue;
 
                         memcpy(&size, buffer+1, sizeof(size));
                         size = le32toh(size);
-                        if (size+5 > sizeof(buffer)) {
-                                r = -EIO;
-                                goto finish;
-                        }
+                        if (size + 5 > sizeof(buffer))
+                                return -EIO;
 
                         if (p-5 < size)
                                 continue;
 
-                        if (!(l = strv_parse_nulstr(buffer + 5, size))) {
-                                r = -ENOMEM;
-                                goto finish;
-                        }
+                        l = strv_parse_nulstr(buffer + 5, size);
+                        if (!l)
+                                return -ENOMEM;
 
                         *_passphrases = l;
                         break;
 
-                } else {
+                } else
                         /* Unknown packet */
-                        r = -EIO;
-                        goto finish;
-                }
+                        return -EIO;
         }
 
-        r = 0;
-
-finish:
-        safe_close(notify);
-        safe_close(fd);
-
-        free(packet);
-
-        return r;
+        return 0;
 }
 
 static int parse_password(const char *filename, char **wall) {
-        char *socket_name = NULL, *message = NULL, *packet = NULL;
+        _cleanup_free_ char *socket_name = NULL, *message = NULL, *packet = NULL;
         uint64_t not_after = 0;
         unsigned pid = 0;
-        int socket_fd = -1;
-        bool accept_cached = false;
+        bool accept_cached = false, echo = false;
 
         const ConfigTableItem items[] = {
                 { "Ask", "Socket",       config_parse_string,   0, &socket_name   },
@@ -255,49 +222,35 @@ static int parse_password(const char *filename, char **wall) {
                 { "Ask", "Message",      config_parse_string,   0, &message       },
                 { "Ask", "PID",          config_parse_unsigned, 0, &pid           },
                 { "Ask", "AcceptCached", config_parse_bool,     0, &accept_cached },
-                { NULL, NULL, NULL, 0, NULL }
+                { "Ask", "Echo",         config_parse_bool,     0, &echo          },
+                {}
         };
 
-        FILE *f;
         int r;
 
         assert(filename);
 
-        f = fopen(filename, "re");
-        if (!f) {
-                if (errno == ENOENT)
-                        return 0;
-
-                log_error("open(%s): %m", filename);
-                return -errno;
-        }
-
-        r = config_parse(NULL, filename, f, NULL, config_item_table_lookup, (void*) items, true, false, NULL);
-        if (r < 0) {
-                log_error("Failed to parse password file %s: %s", filename, strerror(-r));
-                goto finish;
-        }
+        r = config_parse(NULL, filename, NULL,
+                         NULL,
+                         config_item_table_lookup, items,
+                         true, false, true, NULL);
+        if (r < 0)
+                return r;
 
         if (!socket_name) {
                 log_error("Invalid password file %s", filename);
-                r = -EBADMSG;
-                goto finish;
+                return -EBADMSG;
         }
 
-        if (not_after > 0) {
-                if (now(CLOCK_MONOTONIC) > not_after) {
-                        r = 0;
-                        goto finish;
-                }
-        }
+        if (not_after > 0 && now(CLOCK_MONOTONIC) > not_after)
+                return 0;
 
-        if (pid > 0 && !pid_is_alive(pid)) {
-                r = 0;
-                goto finish;
-        }
+        if (pid > 0 && !pid_is_alive(pid))
+                return 0;
 
         if (arg_action == ACTION_LIST)
                 printf("'%s' (PID %u)\n", message, pid);
+
         else if (arg_action == ACTION_WALL) {
                 char *_wall;
 
@@ -307,66 +260,62 @@ static int parse_password(const char *filename, char **wall) {
                              *wall ? *wall : "",
                              *wall ? "\r\n\r\n" : "",
                              message,
-                             pid) < 0) {
-                        r = log_oom();
-                        goto finish;
-                }
+                             pid) < 0)
+                        return log_oom();
 
                 free(*wall);
                 *wall = _wall;
+
         } else {
-                union {
-                        struct sockaddr sa;
-                        struct sockaddr_un un;
-                } sa = {};
+                union sockaddr_union sa = {};
                 size_t packet_length = 0;
+                _cleanup_close_ int socket_fd = -1;
 
                 assert(arg_action == ACTION_QUERY ||
                        arg_action == ACTION_WATCH);
 
                 if (access(socket_name, W_OK) < 0) {
-
                         if (arg_action == ACTION_QUERY)
                                 log_info("Not querying '%s' (PID %u), lacking privileges.", message, pid);
 
-                        r = 0;
-                        goto finish;
+                        return 0;
                 }
 
                 if (arg_plymouth) {
                         _cleanup_strv_free_ char **passwords = NULL;
 
-                        if ((r = ask_password_plymouth(message, not_after, filename, accept_cached, &passwords)) >= 0) {
+                        r = ask_password_plymouth(message, not_after, filename, accept_cached, &passwords);
+                        if (r >= 0) {
                                 char **p;
 
                                 packet_length = 1;
                                 STRV_FOREACH(p, passwords)
                                         packet_length += strlen(*p) + 1;
 
-                                if (!(packet = new(char, packet_length)))
+                                packet = new(char, packet_length);
+                                if (!packet)
                                         r = -ENOMEM;
                                 else {
-                                        char *d;
-
-                                        packet[0] = '+';
-                                        d = packet+1;
+                                        char *d = packet + 1;
 
                                         STRV_FOREACH(p, passwords)
                                                 d = stpcpy(d, *p) + 1;
+
+                                        packet[0] = '+';
                                 }
                         }
 
                 } else {
                         int tty_fd = -1;
-                        char *password = NULL;
+                        _cleanup_free_ char *password = NULL;
 
-                        if (arg_console)
-                                if ((tty_fd = acquire_terminal("/dev/console", false, false, false, (usec_t) -1)) < 0) {
-                                        r = tty_fd;
-                                        goto finish;
-                                }
+                        if (arg_console) {
+                                tty_fd = acquire_terminal("/dev/console", false, false, false, USEC_INFINITY);
+                                if (tty_fd < 0)
+                                        return tty_fd;
+                        }
 
-                        r = ask_password_tty(message, not_after, filename, &password);
+                        r = ask_password_tty(message, not_after, echo, filename, &password);
 
                         if (arg_console) {
                                 safe_close(tty_fd);
@@ -374,59 +323,48 @@ static int parse_password(const char *filename, char **wall) {
                         }
 
                         if (r >= 0) {
-                                packet_length = 1+strlen(password)+1;
-                                if (!(packet = new(char, packet_length)))
+                                packet_length = 1 + strlen(password) + 1;
+                                packet = new(char, packet_length);
+                                if (!packet)
                                         r = -ENOMEM;
                                 else {
                                         packet[0] = '+';
-                                        strcpy(packet+1, password);
+                                        strcpy(packet + 1, password);
                                 }
-
-                                free(password);
                         }
                 }
 
-                if (r == -ETIME || r == -ENOENT) {
+                if (IN_SET(r, -ETIME, -ENOENT))
                         /* If the query went away, that's OK */
-                        r = 0;
-                        goto finish;
-                }
+                        return 0;
 
                 if (r < 0) {
                         log_error("Failed to query password: %s", strerror(-r));
-                        goto finish;
+                        return r;
                 }
 
-                if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) {
+                socket_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+                if (socket_fd < 0) {
                         log_error("socket(): %m");
-                        r = -errno;
-                        goto finish;
+                        return -errno;
                 }
 
                 sa.un.sun_family = AF_UNIX;
                 strncpy(sa.un.sun_path, socket_name, sizeof(sa.un.sun_path));
 
-                if (sendto(socket_fd, packet, packet_length, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0) {
+                r = sendto(socket_fd, packet, packet_length, MSG_NOSIGNAL, &sa.sa,
+                           offsetof(struct sockaddr_un, sun_path) + strlen(socket_name));
+                if (r < 0) {
                         log_error("Failed to send: %m");
-                        r = -errno;
-                        goto finish;
+                        return r;
                 }
         }
 
-finish:
-        fclose(f);
-
-        safe_close(socket_fd);
-
-        free(packet);
-        free(socket_name);
-        free(message);
-
-        return r;
+        return 0;
 }
 
 static int wall_tty_block(void) {
-        char *p;
+        _cleanup_free_ char *p = NULL;
         int fd, r;
         dev_t devnr;
 
@@ -441,8 +379,6 @@ static int wall_tty_block(void) {
         mkfifo(p, 0600);
 
         fd = open(p, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
-        free(p);
-
         if (fd < 0)
                 return -errno;
 
@@ -450,21 +386,15 @@ static int wall_tty_block(void) {
 }
 
 static bool wall_tty_match(const char *path) {
-        int fd, k;
-        char *p;
+        int fd, r;
         struct stat st;
+        _cleanup_free_ char *p = NULL;
 
-        if (path_is_absolute(path))
-                k = lstat(path, &st);
-        else {
-                if (asprintf(&p, "/dev/%s", path) < 0)
-                        return true;
-
-                k = lstat(p, &st);
-                free(p);
-        }
+        if (!path_is_absolute(path))
+                path = strappenda("/dev/", path);
 
-        if (k < 0)
+        r = lstat(path, &st);
+        if (r < 0)
                 return true;
 
         if (!S_ISCHR(st.st_mode))
@@ -482,8 +412,6 @@ static bool wall_tty_match(const char *path) {
                 return true;
 
         fd = open(p, O_WRONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
-        free(p);
-
         if (fd < 0)
                 return true;
 
@@ -493,11 +421,12 @@ static bool wall_tty_match(const char *path) {
 }
 
 static int show_passwords(void) {
-        DIR *d;
+        _cleanup_closedir_ DIR *d;
         struct dirent *de;
         int r = 0;
 
-        if (!(d = opendir("/run/systemd/ask-password"))) {
+        d = opendir("/run/systemd/ask-password");
+        if (!d) {
                 if (errno == ENOENT)
                         return 0;
 
@@ -506,9 +435,8 @@ static int show_passwords(void) {
         }
 
         while ((de = readdir(d))) {
-                char *p;
+                _cleanup_free_ char *p = NULL, *wall = NULL;
                 int q;
-                char *wall;
 
                 /* We only support /dev on tmpfs, hence we can rely on
                  * d_type to be reliable */
@@ -522,27 +450,18 @@ static int show_passwords(void) {
                 if (!startswith(de->d_name, "ask."))
                         continue;
 
-                if (!(p = strappend("/run/systemd/ask-password/", de->d_name))) {
-                        r = log_oom();
-                        goto finish;
-                }
+                p = strappend("/run/systemd/ask-password/", de->d_name);
+                if (!p)
+                        return log_oom();
 
-                wall = NULL;
-                if ((q = parse_password(p, &wall)) < 0)
+                q = parse_password(p, &wall);
+                if (q < 0 && r == 0)
                         r = q;
 
-                free(p);
-
-                if (wall) {
+                if (wall)
                         utmp_wall(wall, NULL, wall_tty_match);
-                        free(wall);
-                }
         }
 
-finish:
-        if (d)
-                closedir(d);
-
         return r;
 }
 
@@ -553,7 +472,7 @@ static int watch_passwords(void) {
                 _FD_MAX
         };
 
-        int notify = -1, signal_fd = -1, tty_block_fd = -1;
+        _cleanup_close_ int notify = -1, signal_fd = -1, tty_block_fd = -1;
         struct pollfd pollfd[_FD_MAX] = {};
         sigset_t mask;
         int r;
@@ -562,25 +481,20 @@ static int watch_passwords(void) {
 
         mkdir_p_label("/run/systemd/ask-password", 0755);
 
-        if ((notify = inotify_init1(IN_CLOEXEC)) < 0) {
-                r = -errno;
-                goto finish;
-        }
+        notify = inotify_init1(IN_CLOEXEC);
+        if (notify < 0)
+                return -errno;
 
-        if (inotify_add_watch(notify, "/run/systemd/ask-password", IN_CLOSE_WRITE|IN_MOVED_TO) < 0) {
-                r = -errno;
-                goto finish;
-        }
+        if (inotify_add_watch(notify, "/run/systemd/ask-password", IN_CLOSE_WRITE|IN_MOVED_TO) < 0)
+                return -errno;
 
         assert_se(sigemptyset(&mask) == 0);
         sigset_add_many(&mask, SIGINT, SIGTERM, -1);
         assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
 
-        if ((signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC)) < 0) {
-                log_error("signalfd(): %m");
-                r = -errno;
-                goto finish;
-        }
+        signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
+        if (signal_fd < 0)
+                return -errno;
 
         pollfd[FD_INOTIFY].fd = notify;
         pollfd[FD_INOTIFY].events = POLLIN;
@@ -588,16 +502,15 @@ static int watch_passwords(void) {
         pollfd[FD_SIGNAL].events = POLLIN;
 
         for (;;) {
-                if ((r = show_passwords()) < 0)
+                r = show_passwords();
+                if (r < 0)
                         log_error("Failed to show password: %s", strerror(-r));
 
                 if (poll(pollfd, _FD_MAX, -1) < 0) {
-
                         if (errno == EINTR)
                                 continue;
 
-                        r = -errno;
-                        goto finish;
+                        return -errno;
                 }
 
                 if (pollfd[FD_INOTIFY].revents != 0)
@@ -607,18 +520,10 @@ static int watch_passwords(void) {
                         break;
         }
 
-        r = 0;
-
-finish:
-        safe_close(notify);
-        safe_close(signal_fd);
-        safe_close(tty_block_fd);
-
-        return r;
+        return 0;
 }
 
-static int help(void) {
-
+static void help(void) {
         printf("%s [OPTIONS...]\n\n"
                "Process system password requests.\n\n"
                "  -h --help     Show this help\n"
@@ -630,8 +535,6 @@ static int help(void) {
                "     --plymouth Ask question with Plymouth instead of on TTY\n"
                "     --console  Ask question on /dev/console instead of current TTY\n",
                program_invocation_short_name);
-
-        return 0;
 }
 
 static int parse_argv(int argc, char *argv[]) {
@@ -663,12 +566,13 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
 
                 switch (c) {
 
                 case 'h':
-                        return help();
+                        help();
+                        return 0;
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
@@ -705,10 +609,9 @@ static int parse_argv(int argc, char *argv[]) {
                 default:
                         assert_not_reached("Unhandled option");
                 }
-        }
 
         if (optind != argc) {
-                help();
+                log_error("%s takes no arguments.", program_invocation_short_name);
                 return -EINVAL;
         }
 
@@ -724,7 +627,8 @@ int main(int argc, char *argv[]) {
 
         umask(0022);
 
-        if ((r = parse_argv(argc, argv)) <= 0)
+        r = parse_argv(argc, argv);
+        if (r <= 0)
                 goto finish;
 
         if (arg_console) {
@@ -732,8 +636,7 @@ int main(int argc, char *argv[]) {
                 release_terminal();
         }
 
-        if (arg_action == ACTION_WATCH ||
-            arg_action == ACTION_WALL)
+        if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL))
                 r = watch_passwords();
         else
                 r = show_passwords();
index 925d38de1f3f7e83ac8875c5f2daa0e33abccaaf..4513bc63c2021afd1e9dccf68a1e1795742a4dac 100644 (file)
 #define LONG(x) ((x)/BITS_PER_LONG)
 #define test_bit(bit, array)    ((array[LONG(bit)] >> OFF(bit)) & 1)
 
-static int debug = 0;
-
 _printf_(6,0)
 static void log_fn(struct udev *udev, int priority,
                    const char *file, int line, const char *fn,
                    const char *format, va_list args)
 {
-        if (debug) {
-                fprintf(stderr, "%s: ", fn);
-                vfprintf(stderr, format, args);
-        } else {
-                vsyslog(priority, format, args);
-        }
+        log_metav(priority, file, line, fn, format, args);
 }
 
 typedef enum {
@@ -180,7 +173,7 @@ get_prev_orientation(struct udev_device *dev)
         return string_to_orientation(value);
 }
 
-#define SET_AXIS(axis, code_) if (ev[i].code == code_) { if (got_##axis == 0) { axis = ev[i].value; got_##axis = true; } }
+#define READ_AXIS(axis, var) { memzero(&abs_info, sizeof(abs_info)); r = ioctl(fd, EVIOCGABS(axis), &abs_info); if (r < 0) return; var = abs_info.value; }
 
 /* accelerometers */
 static void test_orientation(struct udev *udev,
@@ -189,10 +182,9 @@ static void test_orientation(struct udev *udev,
 {
         OrientationUp old, new;
         _cleanup_close_ int fd = -1;
-        struct input_event ev[64];
-        bool got_syn = false;
-        bool got_x = false, got_y = false, got_z = false;
+        struct input_absinfo abs_info;
         int x = 0, y = 0, z = 0;
+        int r;
         char text[64];
 
         old = get_prev_orientation(dev);
@@ -201,30 +193,10 @@ static void test_orientation(struct udev *udev,
         if (fd < 0)
                 return;
 
-        while (1) {
-                int i, r;
-
-                r = read(fd, ev, sizeof(struct input_event) * 64);
-
-                if (r < (int) sizeof(struct input_event))
-                        return;
-
-                for (i = 0; i < r / (int) sizeof(struct input_event); i++) {
-                        if (got_syn) {
-                                if (ev[i].type == EV_ABS) {
-                                        SET_AXIS(x, ABS_X);
-                                        SET_AXIS(y, ABS_Y);
-                                        SET_AXIS(z, ABS_Z);
-                                }
-                        }
-                        if (ev[i].type == EV_SYN && ev[i].code == SYN_REPORT)
-                                got_syn = true;
-                        if (got_x && got_y && got_z)
-                                goto read_dev;
-                }
-        }
+        READ_AXIS(ABS_X, x);
+        READ_AXIS(ABS_Y, y);
+        READ_AXIS(ABS_Z, z);
 
-read_dev:
         new = orientation_calc(old, x, y, z);
         snprintf(text, sizeof(text),
                  "ID_INPUT_ACCELEROMETER_ORIENTATION=%s", orientation_to_string(new));
@@ -254,11 +226,13 @@ int main (int argc, char** argv)
         struct udev_enumerate *enumerate;
         struct udev_list_entry *list_entry;
 
+        log_parse_environment();
+        log_open();
+
         udev = udev_new();
         if (udev == NULL)
                 return 1;
 
-        log_open();
         udev_set_log_fn(udev, log_fn);
 
         /* CLI argument parsing */
@@ -271,9 +245,10 @@ int main (int argc, char** argv)
 
                 switch (option) {
                 case 'd':
-                        debug = 1;
+                        log_set_target(LOG_TARGET_CONSOLE);
                         log_set_max_level(LOG_DEBUG);
                         udev_set_log_priority(udev, LOG_DEBUG);
+                        log_open();
                         break;
                 case 'h':
                         help();
index f84281dd1a2480faab65c7cfbc8d8204fabdb2b1..bfde57223ab39382ac1135c70431c2f65c947bcb 100644 (file)
@@ -410,7 +410,7 @@ static void log_fn(struct udev *udev, int priority,
                    const char *file, int line, const char *fn,
                    const char *format, va_list args)
 {
-        vsyslog(priority, format, args);
+        log_metav(priority, file, line, fn, format, args);
 }
 
 int main(int argc, char *argv[])
@@ -435,11 +435,13 @@ int main(int argc, char *argv[])
                 {}
         };
 
+        log_parse_environment();
+        log_open();
+
         udev = udev_new();
         if (udev == NULL)
                 goto exit;
 
-        log_open();
         udev_set_log_fn(udev, log_fn);
 
         while (1) {
index 33b2bc33317c00c2437c6bbb49f8e32a504df710..7a4b98726cb03b1c666ae675e0ee141eebb80693 100644 (file)
 #include "libudev.h"
 #include "libudev-private.h"
 
-static bool debug;
-
 _printf_(6,0)
 static void log_fn(struct udev *udev, int priority,
                    const char *file, int line, const char *fn,
                    const char *format, va_list args)
 {
-        if (debug) {
-                fprintf(stderr, "%s: ", fn);
-                vfprintf(stderr, format, args);
-        } else {
-                vsyslog(priority, format, args);
-        }
+        log_metav(priority, file, line, fn, format, args);
 }
 
 /* device info */
@@ -613,7 +606,7 @@ static int cd_profiles(struct udev *udev, int fd)
                 switch (feature) {
                 case 0x00:
                         log_debug("GET CONFIGURATION: feature 'profiles', with %i entries", features[i+3] / 4);
-                        feature_profiles(udev, &features[i]+4, features[i+3]);
+                        feature_profiles(udev, &features[i]+4, MIN(features[i+3], len - i - 4));
                         break;
                 default:
                         log_debug("GET CONFIGURATION: feature 0x%04x <ignored>, with 0x%02x bytes", feature, features[i+3]);
@@ -875,11 +868,13 @@ int main(int argc, char *argv[])
         int cnt;
         int rc = 0;
 
+        log_parse_environment();
+        log_open();
+
         udev = udev_new();
         if (udev == NULL)
                 goto exit;
 
-        log_open();
         udev_set_log_fn(udev, log_fn);
 
         while (1) {
@@ -900,9 +895,10 @@ int main(int argc, char *argv[])
                         eject = true;
                         break;
                 case 'd':
-                        debug = true;
+                        log_set_target(LOG_TARGET_CONSOLE);
                         log_set_max_level(LOG_DEBUG);
                         udev_set_log_priority(udev, LOG_DEBUG);
+                        log_open();
                         break;
                 case 'h':
                         printf("Usage: cdrom_id [options] <device>\n"
index 3ec245ecabc96b14b3e9582de3d61998653f109d..54cb928091d85a245407a37994629c898fc48fd8 100644 (file)
@@ -63,7 +63,7 @@ int ethtool_connect(int *ret) {
         return 0;
 }
 
-int ethtool_get_driver(int fd, const char *ifname, char **ret) {
+int ethtool_get_driver(int *fd, const char *ifname, char **ret) {
         struct ethtool_drvinfo ecmd = {
                 .cmd = ETHTOOL_GDRVINFO
         };
@@ -73,9 +73,17 @@ int ethtool_get_driver(int fd, const char *ifname, char **ret) {
         char *d;
         int r;
 
+        if (*fd < 0) {
+                r = ethtool_connect(fd);
+                if (r < 0) {
+                        log_warning("link_config: could not connect to ethtool: %s", strerror(-r));
+                        return r;
+                }
+        }
+
         strscpy(ifr.ifr_name, IFNAMSIZ, ifname);
 
-        r = ioctl(fd, SIOCETHTOOL, &ifr);
+        r = ioctl(*fd, SIOCETHTOOL, &ifr);
         if (r < 0)
                 return -errno;
 
@@ -87,7 +95,7 @@ int ethtool_get_driver(int fd, const char *ifname, char **ret) {
         return 0;
 }
 
-int ethtool_set_speed(int fd, const char *ifname, unsigned int speed, Duplex duplex)
+int ethtool_set_speed(int *fd, const char *ifname, unsigned int speed, Duplex duplex)
 {
         struct ethtool_cmd ecmd = {
                 .cmd = ETHTOOL_GSET
@@ -101,9 +109,17 @@ int ethtool_set_speed(int fd, const char *ifname, unsigned int speed, Duplex dup
         if (speed == 0 && duplex == _DUP_INVALID)
                 return 0;
 
+        if (*fd < 0) {
+                r = ethtool_connect(fd);
+                if (r < 0) {
+                        log_warning("link_config: could not connect to ethtool: %s", strerror(-r));
+                        return r;
+                }
+        }
+
         strscpy(ifr.ifr_name, IFNAMSIZ, ifname);
 
-        r = ioctl(fd, SIOCETHTOOL, &ifr);
+        r = ioctl(*fd, SIOCETHTOOL, &ifr);
         if (r < 0)
                 return -errno;
 
@@ -132,7 +148,7 @@ int ethtool_set_speed(int fd, const char *ifname, unsigned int speed, Duplex dup
         if (need_update) {
                 ecmd.cmd = ETHTOOL_SSET;
 
-                r = ioctl(fd, SIOCETHTOOL, &ifr);
+                r = ioctl(*fd, SIOCETHTOOL, &ifr);
                 if (r < 0)
                         return -errno;
         }
@@ -140,7 +156,7 @@ int ethtool_set_speed(int fd, const char *ifname, unsigned int speed, Duplex dup
         return 0;
 }
 
-int ethtool_set_wol(int fd, const char *ifname, WakeOnLan wol) {
+int ethtool_set_wol(int *fd, const char *ifname, WakeOnLan wol) {
         struct ethtool_wolinfo ecmd = {
                 .cmd = ETHTOOL_GWOL
         };
@@ -153,9 +169,17 @@ int ethtool_set_wol(int fd, const char *ifname, WakeOnLan wol) {
         if (wol == _WOL_INVALID)
                 return 0;
 
+        if (*fd < 0) {
+                r = ethtool_connect(fd);
+                if (r < 0) {
+                        log_warning("link_config: could not connect to ethtool: %s", strerror(-r));
+                        return r;
+                }
+        }
+
         strscpy(ifr.ifr_name, IFNAMSIZ, ifname);
 
-        r = ioctl(fd, SIOCETHTOOL, &ifr);
+        r = ioctl(*fd, SIOCETHTOOL, &ifr);
         if (r < 0)
                 return -errno;
 
@@ -185,7 +209,7 @@ int ethtool_set_wol(int fd, const char *ifname, WakeOnLan wol) {
         if (need_update) {
                 ecmd.cmd = ETHTOOL_SWOL;
 
-                r = ioctl(fd, SIOCETHTOOL, &ifr);
+                r = ioctl(*fd, SIOCETHTOOL, &ifr);
                 if (r < 0)
                         return -errno;
         }
index f44de5076a8b06dbb27679dd81dd6a04a19df2b6..690b1a65aa0e4392671aa9736a47aae1a2263710 100644 (file)
@@ -42,9 +42,9 @@ typedef enum WakeOnLan {
 
 int ethtool_connect(int *ret);
 
-int ethtool_get_driver(int fd, const char *ifname, char **ret);
-int ethtool_set_speed(int fd, const char *ifname, unsigned int speed, Duplex duplex);
-int ethtool_set_wol(int fd, const char *ifname, WakeOnLan wol);
+int ethtool_get_driver(int *fd, const char *ifname, char **ret);
+int ethtool_set_speed(int *fd, const char *ifname, unsigned int speed, Duplex duplex);
+int ethtool_set_wol(int *fd, const char *ifname, WakeOnLan wol);
 
 const char *duplex_to_string(Duplex d) _const_;
 Duplex duplex_from_string(const char *d) _pure_;
index b8650a6c6c315cda23a4aecf6e3cd7b7f1d688b2..25e3cc8dfb08fae69a383104f7806988abd242b6 100644 (file)
 ***/
 
 #include <netinet/ether.h>
-#include <net/if.h>
 
 #include "sd-id128.h"
 
+#include "missing.h"
 #include "link-config.h"
 #include "ethtool-util.h"
 
@@ -87,30 +87,6 @@ int link_config_ctx_new(link_config_ctx **ret) {
         return 0;
 }
 
-static int link_config_ctx_connect(link_config_ctx *ctx) {
-        int r;
-
-        if (ctx->ethtool_fd == -1) {
-                r = ethtool_connect(&ctx->ethtool_fd);
-                if (r < 0) {
-                        log_warning("link_config: could not connect to ethtool: %s",
-                                    strerror(-r));
-                        return r;
-                }
-        }
-
-        if (!ctx->rtnl) {
-                r = sd_rtnl_open(&ctx->rtnl, 0);
-                if (r < 0) {
-                        log_warning("link_config: could not connect to rtnl: %s",
-                                    strerror(-r));
-                        return r;
-                }
-        }
-
-        return 0;
-}
-
 static void link_configs_free(link_config_ctx *ctx) {
         link_config *link, *link_next;
 
@@ -153,11 +129,6 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
         assert(ctx);
         assert(filename);
 
-        if (null_or_empty_path(filename)) {
-                log_debug("skipping empty file: %s", filename);
-                return 0;
-        }
-
         file = fopen(filename, "re");
         if (!file) {
                 if (errno == ENOENT)
@@ -166,6 +137,11 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
                         return -errno;
         }
 
+        if (null_or_empty_fd(fileno(file))) {
+                log_debug("Skipping empty file: %s", filename);
+                return 0;
+        }
+
         link = new0(link_config, 1);
         if (!link)
                 return log_oom();
@@ -174,12 +150,13 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
         link->wol = _WOL_INVALID;
         link->duplex = _DUP_INVALID;
 
-        r = config_parse(NULL, filename, file, "Match\0Link\0Ethernet\0", config_item_perf_lookup,
-                         (void*) link_config_gperf_lookup, false, false, link);
-        if (r < 0) {
-                log_warning("Could not parse config file %s: %s", filename, strerror(-r));
+        r = config_parse(NULL, filename, file,
+                         "Match\0Link\0Ethernet\0",
+                         config_item_perf_lookup, link_config_gperf_lookup,
+                         false, false, true, link);
+        if (r < 0)
                 return r;
-        else
+        else
                 log_debug("Parsed configuration file %s", filename);
 
         link->filename = strdup(filename);
@@ -192,18 +169,19 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
 
 static bool enable_name_policy(void) {
         _cleanup_free_ char *line = NULL;
-        char *w, *state;
+        const char *word, *state;
         int r;
         size_t l;
 
         r = proc_cmdline(&line);
         if (r < 0)
-                log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
+                log_warning("Failed to read /proc/cmdline, ignoring: %s",
+                            strerror(-r));
         if (r <= 0)
                 return true;
 
-        FOREACH_WORD_QUOTED(w, l, line, state)
-                if (strneq(w, "net.ifnames=0", l))
+        FOREACH_WORD_QUOTED(word, l, line, state)
+                if (strneq(word, "net.ifnames=0", l))
                         return false;
 
         return true;
@@ -243,15 +221,17 @@ bool link_config_should_reload(link_config_ctx *ctx) {
         return paths_check_timestamp(link_dirs, &ctx->link_dirs_ts_usec, false);
 }
 
-int link_config_get(link_config_ctx *ctx, struct udev_device *device, link_config **ret) {
+int link_config_get(link_config_ctx *ctx, struct udev_device *device,
+                    link_config **ret) {
         link_config *link;
 
         LIST_FOREACH(links, link, ctx->links) {
+                const char* attr_value = udev_device_get_sysattr_value(device, "address");
 
                 if (net_match_config(link->match_mac, link->match_path, link->match_driver,
                                      link->match_type, NULL, link->match_host,
                                      link->match_virt, link->match_kernel, link->match_arch,
-                                     ether_aton(udev_device_get_sysattr_value(device, "address")),
+                                     attr_value ? ether_aton(attr_value) : NULL,
                                      udev_device_get_property_value(device, "ID_PATH"),
                                      udev_device_get_driver(udev_device_get_parent(device)),
                                      udev_device_get_property_value(device, "ID_NET_DRIVER"),
@@ -275,18 +255,51 @@ static bool mac_is_random(struct udev_device *device) {
         unsigned type;
         int r;
 
+        /* if we can't get the assign type, assume it is not random */
         s = udev_device_get_sysattr_value(device, "addr_assign_type");
         if (!s)
-                return false; /* if we don't know, assume it is not random */
+                return false;
+
         r = safe_atou(s, &type);
         if (r < 0)
                 return false;
 
-        /* check for NET_ADDR_RANDOM */
-        return type == 1;
+        return type == NET_ADDR_RANDOM;
+}
+
+static bool should_rename(struct udev_device *device, bool respect_predictable) {
+        const char *s;
+        unsigned type;
+        int r;
+
+        /* if we can't get the assgin type, assume we should rename */
+        s = udev_device_get_sysattr_value(device, "name_assign_type");
+        if (!s)
+                return true;
+
+        r = safe_atou(s, &type);
+        if (r < 0)
+                return true;
+
+        switch (type) {
+        case NET_NAME_USER:
+        case NET_NAME_RENAMED:
+                /* these were already named by userspace, do not touch again */
+                return false;
+        case NET_NAME_PREDICTABLE:
+                /* the kernel claims to have given a predictable name */
+                if (respect_predictable)
+                        return false;
+                /* fall through */
+        case NET_NAME_ENUM:
+        default:
+                /* the name is known to be bad, or of an unknown type */
+                return true;
+        }
 }
 
-static int get_mac(struct udev_device *device, bool want_random, struct ether_addr *mac) {
+static int get_mac(struct udev_device *device, bool want_random,
+                   struct ether_addr *mac) {
         int r;
 
         if (want_random)
@@ -303,17 +316,19 @@ static int get_mac(struct udev_device *device, bool want_random, struct ether_ad
         }
 
         /* see eth_random_addr in the kernel */
-        mac->ether_addr_octet[0] &= 0xfe;        /* clear multicast bit */
-        mac->ether_addr_octet[0] |= 0x02;        /* set local assignment bit (IEEE802) */
+        mac->ether_addr_octet[0] &= 0xfe;  /* clear multicast bit */
+        mac->ether_addr_octet[0] |= 0x02;  /* set local assignment bit (IEEE802) */
 
         return 0;
 }
 
-int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_device *device, const char **name) {
+int link_config_apply(link_config_ctx *ctx, link_config *config,
+                      struct udev_device *device, const char **name) {
         const char *old_name;
         const char *new_name = NULL;
         struct ether_addr generated_mac;
         struct ether_addr *mac = NULL;
+        bool respect_predictable = false;
         int r, ifindex;
 
         assert(ctx);
@@ -321,21 +336,18 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
         assert(device);
         assert(name);
 
-        r = link_config_ctx_connect(ctx);
-        if (r < 0)
-                return r;
-
         old_name = udev_device_get_sysname(device);
         if (!old_name)
                 return -EINVAL;
 
-        r = ethtool_set_speed(ctx->ethtool_fd, old_name, config->speed / 1024, config->duplex);
+        r = ethtool_set_speed(&ctx->ethtool_fd, old_name, config->speed / 1024,
+                              config->duplex);
         if (r < 0)
                 log_warning("Could not set speed or duplex of %s to %u Mbps (%s): %s",
-                            old_name, config->speed / 1024, duplex_to_string(config->duplex),
-                            strerror(-r));
+                            old_name, config->speed / 1024,
+                            duplex_to_string(config->duplex), strerror(-r));
 
-        r = ethtool_set_wol(ctx->ethtool_fd, old_name, config->wol);
+        r = ethtool_set_wol(&ctx->ethtool_fd, old_name, config->wol);
         if (r < 0)
                 log_warning("Could not set WakeOnLan of %s to %s: %s",
                             old_name, wol_to_string(config->wol), strerror(-r));
@@ -349,8 +361,12 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
         if (ctx->enable_name_policy && config->name_policy) {
                 NamePolicy *policy;
 
-                for (policy = config->name_policy; !new_name && *policy != _NAMEPOLICY_INVALID; policy++) {
+                for (policy = config->name_policy;
+                     !new_name && *policy != _NAMEPOLICY_INVALID; policy++) {
                         switch (*policy) {
+                                case NAMEPOLICY_KERNEL:
+                                        respect_predictable = true;
+                                        break;
                                 case NAMEPOLICY_DATABASE:
                                         new_name = udev_device_get_property_value(device, "ID_NET_NAME_FROM_DATABASE");
                                         break;
@@ -372,18 +388,20 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
                 }
         }
 
-        if (new_name)
-                *name = new_name; /* a name was set by a policy */
-        else if (config->name)
-                *name = config->name; /* a name was set manually in the config */
-        else
-                *name = NULL;
+        if (should_rename(device, respect_predictable)) {
+                /* if not set by policy, fall back manually set name */
+                if (!new_name)
+                        new_name = config->name;
+        else
+                new_name = NULL;
 
         switch (config->mac_policy) {
                 case MACPOLICY_PERSISTENT:
                         if (mac_is_random(device)) {
                                 r = get_mac(device, false, &generated_mac);
-                                if (r < 0)
+                                if (r == -ENOENT)
+                                        break;
+                                else if (r < 0)
                                         return r;
                                 mac = &generated_mac;
                         }
@@ -391,7 +409,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
                 case MACPOLICY_RANDOM:
                         if (!mac_is_random(device)) {
                                 r = get_mac(device, true, &generated_mac);
-                                if (r < 0)
+                                if (r == -ENOENT)
+                                        break;
+                                else if (r < 0)
                                         return r;
                                 mac = &generated_mac;
                         }
@@ -400,12 +420,16 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev
                         mac = config->mac;
         }
 
-        r = rtnl_set_link_properties(ctx->rtnl, ifindex, config->alias, mac, config->mtu);
+        r = rtnl_set_link_properties(&ctx->rtnl, ifindex, config->alias, mac,
+                                     config->mtu);
         if (r < 0) {
-                log_warning("Could not set Alias, MACAddress or MTU on %s: %s", old_name, strerror(-r));
+                log_warning("Could not set Alias, MACAddress or MTU on %s: %s",
+                            old_name, strerror(-r));
                 return r;
         }
 
+        *name = new_name;
+
         return 0;
 }
 
@@ -414,15 +438,11 @@ int link_get_driver(link_config_ctx *ctx, struct udev_device *device, char **ret
         char *driver;
         int r;
 
-        r = link_config_ctx_connect(ctx);
-        if (r < 0)
-                return r;
-
         name = udev_device_get_sysname(device);
         if (!name)
                 return -EINVAL;
 
-        r = ethtool_get_driver(ctx->ethtool_fd, name, &driver);
+        r = ethtool_get_driver(&ctx->ethtool_fd, name, &driver);
         if (r < 0)
                 return r;
 
@@ -436,9 +456,11 @@ static const char* const mac_policy_table[_MACPOLICY_MAX] = {
 };
 
 DEFINE_STRING_TABLE_LOOKUP(mac_policy, MACPolicy);
-DEFINE_CONFIG_PARSE_ENUM(config_parse_mac_policy, mac_policy, MACPolicy, "Failed to parse MAC address policy");
+DEFINE_CONFIG_PARSE_ENUM(config_parse_mac_policy, mac_policy, MACPolicy,
+                         "Failed to parse MAC address policy");
 
 static const char* const name_policy_table[_NAMEPOLICY_MAX] = {
+        [NAMEPOLICY_KERNEL] = "kernel",
         [NAMEPOLICY_DATABASE] = "database",
         [NAMEPOLICY_ONBOARD] = "onboard",
         [NAMEPOLICY_SLOT] = "slot",
@@ -447,4 +469,6 @@ static const char* const name_policy_table[_NAMEPOLICY_MAX] = {
 };
 
 DEFINE_STRING_TABLE_LOOKUP(name_policy, NamePolicy);
-DEFINE_CONFIG_PARSE_ENUMV(config_parse_name_policy, name_policy, NamePolicy, _NAMEPOLICY_INVALID, "Failed to parse interface name policy");
+DEFINE_CONFIG_PARSE_ENUMV(config_parse_name_policy, name_policy, NamePolicy,
+                          _NAMEPOLICY_INVALID,
+                          "Failed to parse interface name policy");
index 24fdb87e4c5c013e5eb9e15cfd56a2d4a6c1b4da..5f3d4ad142e2dc24d964e3828680bad27374b1c6 100644 (file)
@@ -39,6 +39,7 @@ typedef enum MACPolicy {
 } MACPolicy;
 
 typedef enum NamePolicy {
+        NAMEPOLICY_KERNEL,
         NAMEPOLICY_DATABASE,
         NAMEPOLICY_ONBOARD,
         NAMEPOLICY_SLOT,
index 5511df882550b44313c987c7c64929acd38c2744..4d9378a5c0ac32fbf6affafe38608c8a28567e28 100644 (file)
@@ -25,7 +25,6 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <string.h>
-#include <syslog.h>
 #include <ctype.h>
 #include <getopt.h>
 #include <sys/stat.h>
@@ -55,7 +54,6 @@ static bool dev_specified = false;
 static char config_file[MAX_PATH_LEN] = "/etc/scsi_id.config";
 static enum page_code default_page_code = PAGE_UNSPECIFIED;
 static int sg_version = 4;
-static int debug = 0;
 static bool reformat_serial = false;
 static bool export = false;
 static char vendor_str[64];
@@ -70,7 +68,7 @@ static void log_fn(struct udev *udev, int priority,
                    const char *file, int line, const char *fn,
                    const char *format, va_list args)
 {
-        vsyslog(priority, format, args);
+        log_metav(priority, file, line, fn, format, args);
 }
 
 static void set_type(const char *from, char *to, size_t len)
@@ -390,7 +388,10 @@ static int set_options(struct udev *udev,
                         break;
 
                 case 'v':
-                        debug++;
+                        log_set_target(LOG_TARGET_CONSOLE);
+                        log_set_max_level(LOG_DEBUG);
+                        udev_set_log_priority(udev, LOG_DEBUG);
+                        log_open();
                         break;
 
                 case 'V':
@@ -583,11 +584,13 @@ int main(int argc, char **argv)
         int newargc;
         char **newargv = NULL;
 
+        log_parse_environment();
+        log_open();
+
         udev = udev_new();
         if (udev == NULL)
                 goto exit;
 
-        log_open();
         udev_set_log_fn(udev, log_fn);
 
         /*
index 378a73d8639d2f67cbb3f8f1f411bb029e616285..b3d20a3c2db3d931a77b32436efe76ae7d1a72a1 100644 (file)
@@ -26,7 +26,6 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <syslog.h>
 #include <time.h>
 #include <inttypes.h>
 #include <scsi/scsi.h>
index cf194c00c668bcb349d847056d11df31d2fb63f3..810f27d1d0c5532218633d79f3d9467bf2d45e85 100644 (file)
@@ -34,8 +34,7 @@
 #include "efivars.h"
 #include "udev.h"
 
-static void print_property(struct udev_device *dev, bool test, const char *name, const char *value)
-{
+static void print_property(struct udev_device *dev, bool test, const char *name, const char *value) {
         char s[256];
 
         s[0] = '\0';
@@ -182,8 +181,7 @@ static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) {
         return 0;
 }
 
-static int probe_superblocks(blkid_probe pr)
-{
+static int probe_superblocks(blkid_probe pr) {
         struct stat st;
         int rc;
 
@@ -215,8 +213,7 @@ static int probe_superblocks(blkid_probe pr)
         return blkid_do_safeprobe(pr);
 }
 
-static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool test) {
         const char *root_partition;
         int64_t offset = 0;
         bool noraid = false;
index 2baafe61310495ce1bb184ab025a45b5c9cab8aa..2e2112fd92344f67e907d88f8ea816f7a9ca7d07 100644 (file)
 #include <fcntl.h>
 #include <errno.h>
 #include <sys/ioctl.h>
+#ifdef HAVE_LINUX_BTRFS_H
+#include <linux/btrfs.h>
+#endif
 
+#include "missing.h"
 #include "udev.h"
 
-#define BTRFS_PATH_NAME_MAX 4087
-struct btrfs_ioctl_vol_args {
-        int64_t fd;
-        char name[BTRFS_PATH_NAME_MAX + 1];
-};
-#define BTRFS_IOCTL_MAGIC 0x94
-#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, struct btrfs_ioctl_vol_args)
-
-static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) {
         struct  btrfs_ioctl_vol_args args;
         _cleanup_close_ int fd = -1;
         int err;
diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
deleted file mode 100644 (file)
index 8cfeed6..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * firmware - Kernel firmware loader
- *
- * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
- * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program 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
- * General Public License for more details:*
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <getopt.h>
-#include <errno.h>
-#include <stdbool.h>
-#include <sys/utsname.h>
-#include <sys/stat.h>
-
-#include "udev.h"
-
-static bool set_loading(struct udev *udev, char *loadpath, const char *state)
-{
-        FILE *ldfile;
-
-        ldfile = fopen(loadpath, "we");
-        if (ldfile == NULL) {
-                log_error("error: can not open '%s'", loadpath);
-                return false;
-        };
-        fprintf(ldfile, "%s\n", state);
-        fclose(ldfile);
-        return true;
-}
-
-static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size)
-{
-        char *buf;
-        FILE *fsource = NULL, *ftarget = NULL;
-        bool ret = false;
-
-        buf = malloc(size);
-        if (buf == NULL) {
-                log_error("No memory available to load firmware file");
-                return false;
-        }
-
-        log_debug("writing '%s' (%zi) to '%s'", source, size, target);
-
-        fsource = fopen(source, "re");
-        if (fsource == NULL)
-                goto exit;
-        ftarget = fopen(target, "we");
-        if (ftarget == NULL)
-                goto exit;
-        if (fread(buf, size, 1, fsource) != 1)
-                goto exit;
-        if (fwrite(buf, size, 1, ftarget) == 1)
-                ret = true;
-exit:
-        if (ftarget != NULL)
-                fclose(ftarget);
-        if (fsource != NULL)
-                fclose(fsource);
-        free(buf);
-        return ret;
-}
-
-static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test)
-{
-        struct udev *udev = udev_device_get_udev(dev);
-        static const char *searchpath[] = { FIRMWARE_PATH };
-        char loadpath[UTIL_PATH_SIZE];
-        char datapath[UTIL_PATH_SIZE];
-        char fwpath[UTIL_PATH_SIZE];
-        const char *firmware;
-        FILE *fwfile = NULL;
-        struct utsname kernel;
-        struct stat statbuf;
-        unsigned int i;
-        int rc = EXIT_SUCCESS;
-
-        firmware = udev_device_get_property_value(dev, "FIRMWARE");
-        if (firmware == NULL) {
-                log_error("firmware parameter missing");
-                rc = EXIT_FAILURE;
-                goto exit;
-        }
-
-        /* lookup firmware file */
-        uname(&kernel);
-        for (i = 0; i < ELEMENTSOF(searchpath); i++) {
-                strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
-                fwfile = fopen(fwpath, "re");
-                if (fwfile != NULL)
-                        break;
-
-                strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
-                fwfile = fopen(fwpath, "re");
-                if (fwfile != NULL)
-                        break;
-        }
-
-        strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
-
-        if (fwfile == NULL) {
-                log_debug("did not find firmware file '%s'", firmware);
-                rc = EXIT_FAILURE;
-                /*
-                 * Do not cancel the request in the initrd, the real root might have
-                 * the firmware file and the 'coldplug' run in the real root will find
-                 * this pending request and fulfill or cancel it.
-                 * */
-                if (!in_initrd())
-                        set_loading(udev, loadpath, "-1");
-                goto exit;
-        }
-
-        if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
-                if (!in_initrd())
-                        set_loading(udev, loadpath, "-1");
-                rc = EXIT_FAILURE;
-                goto exit;
-        }
-
-        if (!set_loading(udev, loadpath, "1"))
-                goto exit;
-
-        strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
-        if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
-                log_error("error sending firmware '%s' to device", firmware);
-                set_loading(udev, loadpath, "-1");
-                rc = EXIT_FAILURE;
-                goto exit;
-        };
-
-        set_loading(udev, loadpath, "0");
-exit:
-        if (fwfile)
-                fclose(fwfile);
-        return rc;
-}
-
-const struct udev_builtin udev_builtin_firmware = {
-        .name = "firmware",
-        .cmd = builtin_firmware,
-        .help = "kernel firmware loader",
-        .run_once = true,
-};
index d6aa96bb3dc2449682be4796d5ec4276b5fd6463..695a31a12ff31acca95f4b49dc8c22b72b3aa006 100644 (file)
@@ -88,9 +88,10 @@ static int udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device
                                     const char *filter, bool test) {
         struct udev_device *d;
         char s[16];
-        int n = 0;
+        bool last = false;
+        int r = 0;
 
-        for (d = srcdev; d; d = udev_device_get_parent(d)) {
+        for (d = srcdev; d && !last; d = udev_device_get_parent(d)) {
                 const char *dsubsys;
                 const char *modalias = NULL;
 
@@ -104,19 +105,24 @@ static int udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device
 
                 modalias = udev_device_get_property_value(d, "MODALIAS");
 
-                /* the usb_device does not have a modalias, compose one */
-                if (!modalias && streq(dsubsys, "usb"))
-                        modalias = modalias_usb(d, s, sizeof(s));
+                if (streq(dsubsys, "usb") && streq_ptr(udev_device_get_devtype(d), "usb_device")) {
+                        /* if the usb_device does not have a modalias, compose one */
+                        if (!modalias)
+                                modalias = modalias_usb(d, s, sizeof(s));
+
+                        /* avoid looking at any parent device, they are usually just a USB hub */
+                        last = true;
+                }
 
                 if (!modalias)
                         continue;
 
-                n = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test);
-                if (n > 0)
+                r = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test);
+                if (r > 0)
                         break;
         }
 
-        return n;
+        return r;
 }
 
 static int builtin_hwdb(struct udev_device *dev, int argc, char *argv[], bool test) {
@@ -183,8 +189,7 @@ static int builtin_hwdb(struct udev_device *dev, int argc, char *argv[], bool te
 }
 
 /* called at udev startup and reload */
-static int builtin_hwdb_init(struct udev *udev)
-{
+static int builtin_hwdb_init(struct udev *udev) {
         if (hwdb)
                 return 0;
         hwdb = udev_hwdb_new(udev);
@@ -194,14 +199,12 @@ static int builtin_hwdb_init(struct udev *udev)
 }
 
 /* called on udev shutdown and reload request */
-static void builtin_hwdb_exit(struct udev *udev)
-{
+static void builtin_hwdb_exit(struct udev *udev) {
         hwdb = udev_hwdb_unref(hwdb);
 }
 
 /* called every couple of seconds during event activity; 'true' if config has changed */
-static bool builtin_hwdb_validate(struct udev *udev)
-{
+static bool builtin_hwdb_validate(struct udev *udev) {
         return udev_hwdb_validate(hwdb);
 }
 
index 3b2e8975f586dff82b3e1122f832b560bd20255f..1a1121ef940132681d212e00ae5d6fde7f4ad7d4 100644 (file)
@@ -47,8 +47,7 @@
 static void get_cap_mask(struct udev_device *dev,
                          struct udev_device *pdev, const char* attr,
                          unsigned long *bitmask, size_t bitmask_size,
-                         bool test)
-{
+                         bool test) {
         char text[4096];
         unsigned i;
         char* word;
@@ -96,8 +95,7 @@ static void test_pointers (struct udev_device *dev,
                            const unsigned long* bitmask_abs,
                            const unsigned long* bitmask_key,
                            const unsigned long* bitmask_rel,
-                           bool test)
-{
+                           bool test) {
         int is_mouse = 0;
         int is_touchpad = 0;
 
@@ -154,8 +152,7 @@ static void test_pointers (struct udev_device *dev,
 static void test_key (struct udev_device *dev,
                       const unsigned long* bitmask_ev,
                       const unsigned long* bitmask_key,
-                      bool test)
-{
+                      bool test) {
         unsigned i;
         unsigned long found;
         unsigned long mask;
@@ -193,8 +190,7 @@ static void test_key (struct udev_device *dev,
                 udev_builtin_add_property(dev, test, "ID_INPUT_KEYBOARD", "1");
 }
 
-static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], bool test) {
         struct udev_device *pdev;
         unsigned long bitmask_ev[NBITS(EV_MAX)];
         unsigned long bitmask_abs[NBITS(ABS_MAX)];
index 9b66bfd0ac92e01b391ba8c04932a0540f6fa432..d6b7dbbac07463378dbb21d7edeb51c91eee90ef 100644 (file)
@@ -78,7 +78,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo
 
         udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev)) {
                 const char *key;
-                unsigned int scancode;
+                unsigned int scancode, keycode_num;
                 char *endptr;
                 const char *keycode;
                 const struct key *k;
@@ -110,13 +110,19 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo
 
                 /* translate identifier to key code */
                 k = keyboard_lookup_key(keycode, strlen(keycode));
-                if (!k) {
-                        log_error("Error, unknown key identifier '%s'", keycode);
-                        continue;
+                if (k) {
+                        keycode_num = k->id;
+                } else {
+                        /* check if it's a numeric code already */
+                        keycode_num = strtoul(keycode, &endptr, 0);
+                        if (endptr[0] !='\0') {
+                                log_error("Error, unknown key identifier '%s'", keycode);
+                                continue;
+                        }
                 }
 
                 map[map_count].scan = scancode;
-                map[map_count].key = k->id;
+                map[map_count].key = keycode_num;
                 if (map_count < ELEMENTSOF(map)-1)
                         map_count++;
         }
index 5880c3884248f361b63f1d3b530dacc9f47871c7..454ee2edff4e9266cc52c2a9ca0d0a9b513baefd 100644 (file)
@@ -33,8 +33,7 @@
 
 static struct kmod_ctx *ctx;
 
-static int load_module(struct udev *udev, const char *alias)
-{
+static int load_module(struct udev *udev, const char *alias) {
         struct kmod_list *list = NULL;
         struct kmod_list *l;
         int err;
@@ -66,13 +65,11 @@ static int load_module(struct udev *udev, const char *alias)
 
 _printf_(6,0)
 static void udev_kmod_log(void *data, int priority, const char *file, int line,
-                          const char *fn, const char *format, va_list args)
-{
+                          const char *fn, const char *format, va_list args) {
         udev_main_log(data, priority, file, line, fn, format, args);
 }
 
-static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool test) {
         struct udev *udev = udev_device_get_udev(dev);
         int i;
 
@@ -93,8 +90,7 @@ static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool te
 }
 
 /* called at udev startup and reload */
-static int builtin_kmod_init(struct udev *udev)
-{
+static int builtin_kmod_init(struct udev *udev) {
         if (ctx)
                 return 0;
 
@@ -109,15 +105,13 @@ static int builtin_kmod_init(struct udev *udev)
 }
 
 /* called on udev shutdown and reload request */
-static void builtin_kmod_exit(struct udev *udev)
-{
+static void builtin_kmod_exit(struct udev *udev) {
         log_debug("unload module index");
         ctx = kmod_unref(ctx);
 }
 
 /* called every couple of seconds during event activity; 'true' if config has changed */
-static bool builtin_kmod_validate(struct udev *udev)
-{
+static bool builtin_kmod_validate(struct udev *udev) {
         log_debug("validate module index");
         if (!ctx)
                 return false;
index 96ac21c16771ff0f25cbb881e2e14049140f4e81..3e2c8f8a6a253904393c79824fbb81d1329586c5 100644 (file)
@@ -149,25 +149,22 @@ static int dev_pci_onboard(struct udev_device *dev, struct netnames *names) {
 
 /* read the 256 bytes PCI configuration space to check the multi-function bit */
 static bool is_pci_multifunction(struct udev_device *dev) {
-        char filename[256];
-        FILE *f = NULL;
-        char config[64];
-        bool multi = false;
+        _cleanup_fclose_ FILE *f = NULL;
+        const char *filename;
+        uint8_t config[64];
 
-        snprintf(filename, sizeof(filename), "%s/config", udev_device_get_syspath(dev));
+        filename = strappenda(udev_device_get_syspath(dev), "/config");
         f = fopen(filename, "re");
         if (!f)
-                goto out;
+                return false;
         if (fread(&config, sizeof(config), 1, f) != 1)
-                goto out;
+                return false;
 
         /* bit 0-6 header type, bit 7 multi/single function device */
         if ((config[PCI_HEADER_TYPE] & 0x80) != 0)
-                multi = true;
-out:
-        if (f)
-                fclose(f);
-        return multi;
+                return true;
+
+        return false;
 }
 
 static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
index 6207269ab9cd129721e9d772b430df7d01122bba..14351de6a6ebb1f73027cce10be9ac0fd8472d54 100644 (file)
@@ -57,6 +57,8 @@ static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv
                 return EXIT_FAILURE;
         }
 
+        udev_builtin_add_property(dev, test, "ID_NET_LINK_FILE", link->filename);
+
         if (name)
                 udev_builtin_add_property(dev, test, "ID_NET_NAME", name);
 
index 3ca59e011373a963d0282f01e32be33dfcc24a4c..0d247f6b5a734da059b9e127bad37f3b05ccd036 100644 (file)
@@ -33,8 +33,7 @@
 #include "udev.h"
 
 _printf_(2,3)
-static int path_prepend(char **path, const char *fmt, ...)
-{
+static int path_prepend(char **path, const char *fmt, ...) {
         va_list va;
         char *pre;
         int err = 0;
@@ -65,8 +64,7 @@ out:
 ** Linux only supports 32 bit luns.
 ** See drivers/scsi/scsi_scan.c::scsilun_to_int() for more details.
 */
-static int format_lun_number(struct udev_device *dev, char **path)
-{
+static int format_lun_number(struct udev_device *dev, char **path) {
         unsigned long lun = strtoul(udev_device_get_sysnum(dev), NULL, 10);
 
         /* address method 0, peripheral device addressing with bus id of zero */
@@ -76,8 +74,7 @@ static int format_lun_number(struct udev_device *dev, char **path)
         return path_prepend(path, "lun-0x%04lx%04lx00000000", lun & 0xffff, (lun >> 16) & 0xffff);
 }
 
-static struct udev_device *skip_subsystem(struct udev_device *dev, const char *subsys)
-{
+static struct udev_device *skip_subsystem(struct udev_device *dev, const char *subsys) {
         struct udev_device *parent = dev;
 
         while (parent != NULL) {
@@ -92,8 +89,7 @@ static struct udev_device *skip_subsystem(struct udev_device *dev, const char *s
         return dev;
 }
 
-static struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent, char **path) {
         struct udev *udev  = udev_device_get_udev(parent);
         struct udev_device *targetdev;
         struct udev_device *fcdev = NULL;
@@ -122,8 +118,7 @@ out:
         return parent;
 }
 
-static struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path) {
         struct udev *udev  = udev_device_get_udev(parent);
         struct udev_device *targetdev;
         struct udev_device *target_parent;
@@ -159,8 +154,7 @@ out:
         return parent;
 }
 
-static struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **path) {
         struct udev *udev  = udev_device_get_udev(parent);
         struct udev_device *transportdev;
         struct udev_device *sessiondev = NULL;
@@ -218,8 +212,7 @@ out:
         return parent;
 }
 
-static struct udev_device *handle_scsi_default(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_scsi_default(struct udev_device *parent, char **path) {
         struct udev_device *hostdev;
         int host, bus, target, lun;
         const char *name;
@@ -339,8 +332,7 @@ static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char *
         return parent;
 }
 
-static struct udev_device *handle_scsi(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) {
         const char *devtype;
         const char *name;
         const char *id;
@@ -354,6 +346,7 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path)
         if (id != NULL) {
                 parent = skip_subsystem(parent, "scsi");
                 path_prepend(path, "ieee1394-0x%s", id);
+                *supported_parent = true;
                 goto out;
         }
 
@@ -362,16 +355,19 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path)
 
         if (strstr(name, "/rport-") != NULL) {
                 parent = handle_scsi_fibre_channel(parent, path);
+                *supported_parent = true;
                 goto out;
         }
 
         if (strstr(name, "/end_device-") != NULL) {
                 parent = handle_scsi_sas(parent, path);
+                *supported_parent = true;
                 goto out;
         }
 
         if (strstr(name, "/session") != NULL) {
                 parent = handle_scsi_iscsi(parent, path);
+                *supported_parent = true;
                 goto out;
         }
 
@@ -401,8 +397,7 @@ out:
         return parent;
 }
 
-static struct udev_device *handle_cciss(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_cciss(struct udev_device *parent, char **path) {
         const char *str;
         unsigned int controller, disk;
 
@@ -415,8 +410,7 @@ static struct udev_device *handle_cciss(struct udev_device *parent, char **path)
         return parent;
 }
 
-static void handle_scsi_tape(struct udev_device *dev, char **path)
-{
+static void handle_scsi_tape(struct udev_device *dev, char **path) {
         const char *name;
 
         /* must be the last device in the syspath */
@@ -430,8 +424,7 @@ static void handle_scsi_tape(struct udev_device *dev, char **path)
                 path_prepend(path, "st%c", name[2]);
 }
 
-static struct udev_device *handle_usb(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_usb(struct udev_device *parent, char **path) {
         const char *devtype;
         const char *str;
         const char *port;
@@ -453,8 +446,7 @@ static struct udev_device *handle_usb(struct udev_device *parent, char **path)
         return parent;
 }
 
-static struct udev_device *handle_bcma(struct udev_device *parent, char **path)
-{
+static struct udev_device *handle_bcma(struct udev_device *parent, char **path) {
         const char *sysname;
         unsigned int core;
 
@@ -466,8 +458,7 @@ static struct udev_device *handle_bcma(struct udev_device *parent, char **path)
         return parent;
 }
 
-static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **path)
-{
+static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **path) {
         struct udev_device *scsi_dev;
 
         scsi_dev = udev_device_get_parent_with_subsystem_devtype(dev, "scsi", "scsi_device");
@@ -491,11 +482,11 @@ out:
         return parent;
 }
 
-static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool test) {
         struct udev_device *parent;
         char *path = NULL;
-        bool some_transport = false;
+        bool supported_transport = false;
+        bool supported_parent = false;
 
         /* S390 ccw bus */
         parent = udev_device_get_parent_with_subsystem_devtype(dev, "ccw", NULL);
@@ -515,48 +506,63 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
                 } else if (streq(subsys, "scsi_tape")) {
                         handle_scsi_tape(parent, &path);
                 } else if (streq(subsys, "scsi")) {
-                        parent = handle_scsi(parent, &path);
-                        some_transport = true;
+                        parent = handle_scsi(parent, &path, &supported_parent);
+                        supported_transport = true;
                 } else if (streq(subsys, "cciss")) {
                         parent = handle_cciss(parent, &path);
-                        some_transport = true;
+                        supported_transport = true;
                 } else if (streq(subsys, "usb")) {
                         parent = handle_usb(parent, &path);
-                        some_transport = true;
+                        supported_transport = true;
                 } else if (streq(subsys, "bcma")) {
                         parent = handle_bcma(parent, &path);
-                        some_transport = true;
+                        supported_transport = true;
                 } else if (streq(subsys, "serio")) {
                         path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent));
                         parent = skip_subsystem(parent, "serio");
                 } else if (streq(subsys, "pci")) {
                         path_prepend(&path, "pci-%s", udev_device_get_sysname(parent));
                         parent = skip_subsystem(parent, "pci");
+                        supported_parent = true;
                 } else if (streq(subsys, "platform")) {
                         path_prepend(&path, "platform-%s", udev_device_get_sysname(parent));
                         parent = skip_subsystem(parent, "platform");
-                        some_transport = true;
+                        supported_transport = true;
+                        supported_parent = true;
                 } else if (streq(subsys, "acpi")) {
                         path_prepend(&path, "acpi-%s", udev_device_get_sysname(parent));
                         parent = skip_subsystem(parent, "acpi");
+                        supported_parent = true;
                 } else if (streq(subsys, "xen")) {
                         path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
                         parent = skip_subsystem(parent, "xen");
+                        supported_parent = true;
                 } else if (streq(subsys, "scm")) {
                         path_prepend(&path, "scm-%s", udev_device_get_sysname(parent));
                         parent = skip_subsystem(parent, "scm");
-                        some_transport = true;
+                        supported_transport = true;
+                        supported_parent = true;
                 }
 
                 parent = udev_device_get_parent(parent);
         }
 
         /*
-         * Do not return a single-parent-device-only for block
-         * devices, they might have entire buses behind it which
-         * do not get unique IDs only by using the parent device.
+         * Do return devices with have an unknown type of parent device, they
+         * might produce conflicting IDs below multiple independent parent
+         * devices.
          */
-        if (!some_transport && streq(udev_device_get_subsystem(dev), "block")) {
+        if (!supported_parent) {
+                free(path);
+                path = NULL;
+        }
+
+        /*
+         * Do not return a have-only a single-parent block devices, some
+         * have entire hidden buses behind it, and not create predictable
+         * IDs that way.
+         */
+        if (streq(udev_device_get_subsystem(dev), "block") && !supported_transport) {
                 free(path);
                 path = NULL;
         }
index ddb015744f2afb0ee1ca85b3cb219192124fbaca..6964fb5529b8e6a31de62b1848669a8185f3538a 100644 (file)
 #include <dirent.h>
 #include <getopt.h>
 
-#include <systemd/sd-login.h>
+#include "systemd/sd-login.h"
 #include "logind-acl.h"
 #include "udev.h"
 #include "util.h"
 
-static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool test) {
         int r;
         const char *path = NULL, *seat;
         bool changed_acl = false;
index 883e11eb070ed7604b3c05003c3bd16d6cc29875..06d4191584c48096d5a6b07c680217de42c36164 100644 (file)
@@ -31,8 +31,7 @@
 
 #include "udev.h"
 
-static void set_usb_iftype(char *to, int if_class_num, size_t len)
-{
+static void set_usb_iftype(char *to, int if_class_num, size_t len) {
         const char *type = "generic";
 
         switch (if_class_num) {
@@ -82,8 +81,7 @@ static void set_usb_iftype(char *to, int if_class_num, size_t len)
         to[len-1] = '\0';
 }
 
-static int set_usb_mass_storage_ifsubtype(char *to, const char *from, size_t len)
-{
+static int set_usb_mass_storage_ifsubtype(char *to, const char *from, size_t len) {
         int type_num = 0;
         char *eptr;
         const char *type = "generic";
@@ -114,8 +112,7 @@ static int set_usb_mass_storage_ifsubtype(char *to, const char *from, size_t len
         return type_num;
 }
 
-static void set_scsi_type(char *to, const char *from, size_t len)
-{
+static void set_scsi_type(char *to, const char *from, size_t len) {
         int type_num;
         char *eptr;
         const char *type = "generic";
@@ -148,8 +145,7 @@ static void set_scsi_type(char *to, const char *from, size_t len)
 #define USB_DT_DEVICE                        0x01
 #define USB_DT_INTERFACE                0x04
 
-static int dev_if_packed_info(struct udev_device *dev, char *ifs_str, size_t len)
-{
+static int dev_if_packed_info(struct udev_device *dev, char *ifs_str, size_t len) {
         _cleanup_free_ char *filename = NULL;
         _cleanup_close_ int fd = -1;
         ssize_t size;
@@ -232,8 +228,7 @@ static int dev_if_packed_info(struct udev_device *dev, char *ifs_str, size_t len
  * 6.) If the device supplies a serial number, this number
  *     is concatenated with the identification with an underscore '_'.
  */
-static int builtin_usb_id(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_usb_id(struct udev_device *dev, int argc, char *argv[], bool test) {
         char vendor_str[64];
         char vendor_str_enc[256];
         const char *vendor_id;
index fd373d04dc0289212224d9c087c6711a50419f5b..3bcbd6e828a807c55af513c68c4bae7a914ffdb8 100644 (file)
@@ -34,9 +34,6 @@ static const struct udev_builtin *builtins[] = {
         [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
 #endif
         [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-#ifdef HAVE_FIRMWARE
-        [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
-#endif
         [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
         [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
         [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
@@ -52,8 +49,7 @@ static const struct udev_builtin *builtins[] = {
 #endif
 };
 
-void udev_builtin_init(struct udev *udev)
-{
+void udev_builtin_init(struct udev *udev) {
         unsigned int i;
 
         if (initialized)
@@ -66,8 +62,7 @@ void udev_builtin_init(struct udev *udev)
         initialized = true;
 }
 
-void udev_builtin_exit(struct udev *udev)
-{
+void udev_builtin_exit(struct udev *udev) {
         unsigned int i;
 
         if (!initialized)
@@ -80,8 +75,7 @@ void udev_builtin_exit(struct udev *udev)
         initialized = false;
 }
 
-bool udev_builtin_validate(struct udev *udev)
-{
+bool udev_builtin_validate(struct udev *udev) {
         unsigned int i;
 
         for (i = 0; i < ELEMENTSOF(builtins); i++)
@@ -90,26 +84,22 @@ bool udev_builtin_validate(struct udev *udev)
         return false;
 }
 
-void udev_builtin_list(struct udev *udev)
-{
+void udev_builtin_list(struct udev *udev) {
         unsigned int i;
 
         for (i = 0; i < ELEMENTSOF(builtins); i++)
                 fprintf(stderr, "  %-12s %s\n", builtins[i]->name, builtins[i]->help);
 }
 
-const char *udev_builtin_name(enum udev_builtin_cmd cmd)
-{
+const char *udev_builtin_name(enum udev_builtin_cmd cmd) {
         return builtins[cmd]->name;
 }
 
-bool udev_builtin_run_once(enum udev_builtin_cmd cmd)
-{
+bool udev_builtin_run_once(enum udev_builtin_cmd cmd) {
         return builtins[cmd]->run_once;
 }
 
-enum udev_builtin_cmd udev_builtin_lookup(const char *command)
-{
+enum udev_builtin_cmd udev_builtin_lookup(const char *command) {
         char name[UTIL_PATH_SIZE];
         enum udev_builtin_cmd i;
         char *pos;
@@ -124,8 +114,7 @@ enum udev_builtin_cmd udev_builtin_lookup(const char *command)
         return UDEV_BUILTIN_MAX;
 }
 
-int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const char *command, bool test)
-{
+int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const char *command, bool test) {
         char arg[UTIL_PATH_SIZE];
         int argc;
         char *argv[128];
@@ -137,8 +126,7 @@ int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const c
         return builtins[cmd]->cmd(dev, argc, argv, test);
 }
 
-int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val)
-{
+int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val) {
         struct udev_list_entry *entry;
 
         entry = udev_device_add_property(dev, key, val);
index 74bbd3a99eade7b908ed3524125a7f3efee7124a..98fd3a9acfcfdae6c8960409c6d48483a710b25c 100644 (file)
@@ -70,10 +70,10 @@ struct udev_ctrl_connection {
         int sock;
 };
 
-struct udev_ctrl *udev_ctrl_new_from_fd(struct udev *udev, int fd)
-{
+struct udev_ctrl *udev_ctrl_new_from_fd(struct udev *udev, int fd) {
         struct udev_ctrl *uctrl;
         const int on = 1;
+        int r;
 
         uctrl = new0(struct udev_ctrl, 1);
         if (uctrl == NULL)
@@ -92,7 +92,9 @@ struct udev_ctrl *udev_ctrl_new_from_fd(struct udev *udev, int fd)
                 uctrl->bound = true;
                 uctrl->sock = fd;
         }
-        setsockopt(uctrl->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        r = setsockopt(uctrl->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        if (r < 0)
+                log_warning("could not set SO_PASSCRED: %m");
 
         uctrl->saddr.sun_family = AF_LOCAL;
         strscpy(uctrl->saddr.sun_path, sizeof(uctrl->saddr.sun_path), "/run/udev/control");
@@ -100,13 +102,11 @@ struct udev_ctrl *udev_ctrl_new_from_fd(struct udev *udev, int fd)
         return uctrl;
 }
 
-struct udev_ctrl *udev_ctrl_new(struct udev *udev)
-{
+struct udev_ctrl *udev_ctrl_new(struct udev *udev) {
         return udev_ctrl_new_from_fd(udev, -1);
 }
 
-int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl)
-{
+int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl) {
         int err;
 
         if (!uctrl->bound) {
@@ -135,21 +135,18 @@ int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl)
         return 0;
 }
 
-struct udev *udev_ctrl_get_udev(struct udev_ctrl *uctrl)
-{
+struct udev *udev_ctrl_get_udev(struct udev_ctrl *uctrl) {
         return uctrl->udev;
 }
 
-static struct udev_ctrl *udev_ctrl_ref(struct udev_ctrl *uctrl)
-{
+static struct udev_ctrl *udev_ctrl_ref(struct udev_ctrl *uctrl) {
         if (uctrl == NULL)
                 return NULL;
         uctrl->refcount++;
         return uctrl;
 }
 
-struct udev_ctrl *udev_ctrl_unref(struct udev_ctrl *uctrl)
-{
+struct udev_ctrl *udev_ctrl_unref(struct udev_ctrl *uctrl) {
         if (uctrl == NULL)
                 return NULL;
         uctrl->refcount--;
@@ -161,8 +158,7 @@ struct udev_ctrl *udev_ctrl_unref(struct udev_ctrl *uctrl)
         return NULL;
 }
 
-int udev_ctrl_cleanup(struct udev_ctrl *uctrl)
-{
+int udev_ctrl_cleanup(struct udev_ctrl *uctrl) {
         if (uctrl == NULL)
                 return 0;
         if (uctrl->cleanup_socket)
@@ -170,15 +166,13 @@ int udev_ctrl_cleanup(struct udev_ctrl *uctrl)
         return 0;
 }
 
-int udev_ctrl_get_fd(struct udev_ctrl *uctrl)
-{
+int udev_ctrl_get_fd(struct udev_ctrl *uctrl) {
         if (uctrl == NULL)
                 return -EINVAL;
         return uctrl->sock;
 }
 
-struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl)
-{
+struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl) {
         struct udev_ctrl_connection *conn;
         struct ucred ucred = {};
         const int on = 1;
@@ -209,7 +203,10 @@ struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl)
         }
 
         /* enable receiving of the sender credentials in the messages */
-        setsockopt(conn->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        r = setsockopt(conn->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+        if (r < 0)
+                log_warning("could not set SO_PASSCRED: %m");
+
         udev_ctrl_ref(uctrl);
         return conn;
 err:
@@ -219,16 +216,14 @@ err:
         return NULL;
 }
 
-struct udev_ctrl_connection *udev_ctrl_connection_ref(struct udev_ctrl_connection *conn)
-{
+struct udev_ctrl_connection *udev_ctrl_connection_ref(struct udev_ctrl_connection *conn) {
         if (conn == NULL)
                 return NULL;
         conn->refcount++;
         return conn;
 }
 
-struct udev_ctrl_connection *udev_ctrl_connection_unref(struct udev_ctrl_connection *conn)
-{
+struct udev_ctrl_connection *udev_ctrl_connection_unref(struct udev_ctrl_connection *conn) {
         if (conn == NULL)
                 return NULL;
         conn->refcount--;
@@ -241,8 +236,7 @@ struct udev_ctrl_connection *udev_ctrl_connection_unref(struct udev_ctrl_connect
         return NULL;
 }
 
-static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int intval, const char *buf, int timeout)
-{
+static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int intval, const char *buf, int timeout) {
         struct udev_ctrl_msg_wire ctrl_msg_wire;
         int err = 0;
 
@@ -296,48 +290,39 @@ out:
         return err;
 }
 
-int udev_ctrl_send_set_log_level(struct udev_ctrl *uctrl, int priority, int timeout)
-{
+int udev_ctrl_send_set_log_level(struct udev_ctrl *uctrl, int priority, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_SET_LOG_LEVEL, priority, NULL, timeout);
 }
 
-int udev_ctrl_send_stop_exec_queue(struct udev_ctrl *uctrl, int timeout)
-{
+int udev_ctrl_send_stop_exec_queue(struct udev_ctrl *uctrl, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_STOP_EXEC_QUEUE, 0, NULL, timeout);
 }
 
-int udev_ctrl_send_start_exec_queue(struct udev_ctrl *uctrl, int timeout)
-{
+int udev_ctrl_send_start_exec_queue(struct udev_ctrl *uctrl, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_START_EXEC_QUEUE, 0, NULL, timeout);
 }
 
-int udev_ctrl_send_reload(struct udev_ctrl *uctrl, int timeout)
-{
+int udev_ctrl_send_reload(struct udev_ctrl *uctrl, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_RELOAD, 0, NULL, timeout);
 }
 
-int udev_ctrl_send_set_env(struct udev_ctrl *uctrl, const char *key, int timeout)
-{
+int udev_ctrl_send_set_env(struct udev_ctrl *uctrl, const char *key, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_SET_ENV, 0, key, timeout);
 }
 
-int udev_ctrl_send_set_children_max(struct udev_ctrl *uctrl, int count, int timeout)
-{
+int udev_ctrl_send_set_children_max(struct udev_ctrl *uctrl, int count, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_SET_CHILDREN_MAX, count, NULL, timeout);
 }
 
-int udev_ctrl_send_ping(struct udev_ctrl *uctrl, int timeout)
-{
+int udev_ctrl_send_ping(struct udev_ctrl *uctrl, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_PING, 0, NULL, timeout);
 }
 
-int udev_ctrl_send_exit(struct udev_ctrl *uctrl, int timeout)
-{
+int udev_ctrl_send_exit(struct udev_ctrl *uctrl, int timeout) {
         return ctrl_send(uctrl, UDEV_CTRL_EXIT, 0, NULL, timeout);
 }
 
-struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl_connection *conn)
-{
+struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl_connection *conn) {
         struct udev_ctrl_msg *uctrl_msg;
         ssize_t size;
         struct cmsghdr *cmsg;
@@ -416,8 +401,7 @@ err:
         return NULL;
 }
 
-struct udev_ctrl_msg *udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg)
-{
+struct udev_ctrl_msg *udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg == NULL)
                 return NULL;
         ctrl_msg->refcount--;
@@ -428,57 +412,49 @@ struct udev_ctrl_msg *udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg)
         return NULL;
 }
 
-int udev_ctrl_get_set_log_level(struct udev_ctrl_msg *ctrl_msg)
-{
+int udev_ctrl_get_set_log_level(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_SET_LOG_LEVEL)
                 return ctrl_msg->ctrl_msg_wire.intval;
         return -1;
 }
 
-int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg)
-{
+int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_STOP_EXEC_QUEUE)
                 return 1;
         return -1;
 }
 
-int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg)
-{
+int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_START_EXEC_QUEUE)
                 return 1;
         return -1;
 }
 
-int udev_ctrl_get_reload(struct udev_ctrl_msg *ctrl_msg)
-{
+int udev_ctrl_get_reload(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_RELOAD)
                 return 1;
         return -1;
 }
 
-const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg)
-{
+const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_SET_ENV)
                 return ctrl_msg->ctrl_msg_wire.buf;
         return NULL;
 }
 
-int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg)
-{
+int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_SET_CHILDREN_MAX)
                 return ctrl_msg->ctrl_msg_wire.intval;
         return -1;
 }
 
-int udev_ctrl_get_ping(struct udev_ctrl_msg *ctrl_msg)
-{
+int udev_ctrl_get_ping(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_PING)
                 return 1;
         return -1;
 }
 
-int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg)
-{
+int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg) {
         if (ctrl_msg->ctrl_msg_wire.type == UDEV_CTRL_EXIT)
                 return 1;
         return -1;
index 5213a4abaa939b77ef559db847ba989d82a19f4d..30a670890174c3d292661f1226821a02703572c5 100644 (file)
@@ -34,8 +34,7 @@
 #include "udev.h"
 #include "rtnl-util.h"
 
-struct udev_event *udev_event_new(struct udev_device *dev)
-{
+struct udev_event *udev_event_new(struct udev_device *dev) {
         struct udev *udev = udev_device_get_udev(dev);
         struct udev_event *event;
 
@@ -48,14 +47,13 @@ struct udev_event *udev_event_new(struct udev_device *dev)
         udev_list_init(udev, &event->seclabel_list, false);
         event->fd_signal = -1;
         event->birth_usec = now(CLOCK_MONOTONIC);
-        event->timeout_usec = 30 * 1000 * 1000;
         return event;
 }
 
-void udev_event_unref(struct udev_event *event)
-{
+void udev_event_unref(struct udev_event *event) {
         if (event == NULL)
                 return;
+        sd_rtnl_unref(event->rtnl);
         udev_list_cleanup(&event->run_list);
         udev_list_cleanup(&event->seclabel_list);
         free(event->program_result);
@@ -63,8 +61,7 @@ void udev_event_unref(struct udev_event *event)
         free(event);
 }
 
-size_t udev_event_apply_format(struct udev_event *event, const char *src, char *dest, size_t size)
-{
+size_t udev_event_apply_format(struct udev_event *event, const char *src, char *dest, size_t size) {
         struct udev_device *dev = event->dev;
         enum subst_type {
                 SUBST_UNKNOWN,
@@ -378,10 +375,8 @@ out:
 
 static int spawn_exec(struct udev_event *event,
                       const char *cmd, char *const argv[], char **envp, const sigset_t *sigmask,
-                      int fd_stdout, int fd_stderr)
-{
-        int err;
-        int fd;
+                      int fd_stdout, int fd_stderr) {
+        _cleanup_close_ int fd = -1;
 
         /* discard child output or connect to pipe */
         fd = open("/dev/null", O_RDWR);
@@ -391,19 +386,17 @@ static int spawn_exec(struct udev_event *event,
                         dup2(fd, STDOUT_FILENO);
                 if (fd_stderr < 0)
                         dup2(fd, STDERR_FILENO);
-                close(fd);
-        } else {
+        } else
                 log_error("open /dev/null failed: %m");
-        }
 
         /* connect pipes to std{out,err} */
         if (fd_stdout >= 0) {
                 dup2(fd_stdout, STDOUT_FILENO);
-                        close(fd_stdout);
+                safe_close(fd_stdout);
         }
         if (fd_stderr >= 0) {
                 dup2(fd_stderr, STDERR_FILENO);
-                close(fd_stderr);
+                safe_close(fd_stderr);
         }
 
         /* terminate child in case parent goes away */
@@ -416,19 +409,27 @@ static int spawn_exec(struct udev_event *event,
         execve(argv[0], argv, envp);
 
         /* exec failed */
-        err = -errno;
         log_error("failed to execute '%s' '%s': %m", argv[0], cmd);
-        return err;
+
+        return -errno;
 }
 
 static void spawn_read(struct udev_event *event,
-                      const char *cmd,
-                      int fd_stdout, int fd_stderr,
-                      char *result, size_t ressize)
-{
+                       usec_t timeout_usec,
+                       const char *cmd,
+                       int fd_stdout, int fd_stderr,
+                       char *result, size_t ressize) {
+        _cleanup_close_ int fd_ep = -1;
+        struct epoll_event ep_outpipe = {
+                .events = EPOLLIN,
+                .data.ptr = &fd_stdout,
+        };
+        struct epoll_event ep_errpipe = {
+                .events = EPOLLIN,
+                .data.ptr = &fd_stderr,
+        };
         size_t respos = 0;
-        int fd_ep = -1;
-        struct epoll_event ep_outpipe, ep_errpipe;
+        int r;
 
         /* read from child if requested */
         if (fd_stdout < 0 && fd_stderr < 0)
@@ -437,26 +438,22 @@ static void spawn_read(struct udev_event *event,
         fd_ep = epoll_create1(EPOLL_CLOEXEC);
         if (fd_ep < 0) {
                 log_error("error creating epoll fd: %m");
-                goto out;
+                return;
         }
 
         if (fd_stdout >= 0) {
-                memzero(&ep_outpipe, sizeof(struct epoll_event));
-                ep_outpipe.events = EPOLLIN;
-                ep_outpipe.data.ptr = &fd_stdout;
-                if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_stdout, &ep_outpipe) < 0) {
-                        log_error("fail to add fd to epoll: %m");
-                        goto out;
+                r = epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_stdout, &ep_outpipe);
+                if (r < 0) {
+                        log_error("fail to add stdout fd to epoll: %m");
+                        return;
                 }
         }
 
         if (fd_stderr >= 0) {
-                memzero(&ep_errpipe, sizeof(struct epoll_event));
-                ep_errpipe.events = EPOLLIN;
-                ep_errpipe.data.ptr = &fd_stderr;
-                if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_stderr, &ep_errpipe) < 0) {
-                        log_error("fail to add fd to epoll: %m");
-                        goto out;
+                r = epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_stderr, &ep_errpipe);
+                if (r < 0) {
+                        log_error("fail to add stderr fd to epoll: %m");
+                        return;
                 }
         }
 
@@ -467,15 +464,15 @@ static void spawn_read(struct udev_event *event,
                 struct epoll_event ev[4];
                 int i;
 
-                if (event->timeout_usec > 0) {
+                if (timeout_usec > 0) {
                         usec_t age_usec;
 
                         age_usec = now(CLOCK_MONOTONIC) - event->birth_usec;
-                        if (age_usec >= event->timeout_usec) {
+                        if (age_usec >= timeout_usec) {
                                 log_error("timeout '%s'", cmd);
-                                goto out;
+                                return;
                         }
-                        timeout = ((event->timeout_usec - age_usec) / 1000) + 1000;
+                        timeout = ((timeout_usec - age_usec) / USEC_PER_MSEC) + MSEC_PER_SEC;
                 } else {
                         timeout = -1;
                 }
@@ -485,16 +482,18 @@ static void spawn_read(struct udev_event *event,
                         if (errno == EINTR)
                                 continue;
                         log_error("failed to poll: %m");
-                        goto out;
-                }
-                if (fdcount == 0) {
+                        return;
+                } else if (fdcount == 0) {
                         log_error("timeout '%s'", cmd);
-                        goto out;
+                        return;
                 }
 
                 for (i = 0; i < fdcount; i++) {
                         int *fd = (int *)ev[i].data.ptr;
 
+                        if (*fd < 0)
+                                continue;
+
                         if (ev[i].events & EPOLLIN) {
                                 ssize_t count;
                                 char buf[4096];
@@ -526,9 +525,10 @@ static void spawn_read(struct udev_event *event,
                                         }
                                 }
                         } else if (ev[i].events & EPOLLHUP) {
-                                if (epoll_ctl(fd_ep, EPOLL_CTL_DEL, *fd, NULL) < 0) {
+                                r = epoll_ctl(fd_ep, EPOLL_CTL_DEL, *fd, NULL);
+                                if (r < 0) {
                                         log_error("failed to remove fd from epoll: %m");
-                                        goto out;
+                                        return;
                                 }
                                 *fd = -1;
                         }
@@ -538,13 +538,12 @@ static void spawn_read(struct udev_event *event,
         /* return the child's stdout string */
         if (result != NULL)
                 result[respos] = '\0';
-out:
-        if (fd_ep >= 0)
-                close(fd_ep);
 }
 
-static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid)
-{
+static int spawn_wait(struct udev_event *event,
+                      usec_t timeout_usec,
+                      usec_t timeout_warn_usec,
+                      const char *cmd, pid_t pid) {
         struct pollfd pfd[1];
         int err = 0;
 
@@ -553,21 +552,26 @@ static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid)
 
         while (pid > 0) {
                 int timeout;
+                int timeout_warn = 0;
                 int fdcount;
 
-                if (event->timeout_usec > 0) {
+                if (timeout_usec > 0) {
                         usec_t age_usec;
 
                         age_usec = now(CLOCK_MONOTONIC) - event->birth_usec;
-                        if (age_usec >= event->timeout_usec)
+                        if (age_usec >= timeout_usec)
                                 timeout = 1000;
-                        else
-                                timeout = ((event->timeout_usec - age_usec) / 1000) + 1000;
+                        else {
+                                if (timeout_warn_usec > 0)
+                                        timeout_warn = ((timeout_warn_usec - age_usec) / USEC_PER_MSEC) + MSEC_PER_SEC;
+
+                                timeout = ((timeout_usec - timeout_warn_usec - age_usec) / USEC_PER_MSEC) + MSEC_PER_SEC;
+                        }
                 } else {
                         timeout = -1;
                 }
 
-                fdcount = poll(pfd, 1, timeout);
+                fdcount = poll(pfd, 1, timeout_warn);
                 if (fdcount < 0) {
                         if (errno == EINTR)
                                 continue;
@@ -576,8 +580,20 @@ static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid)
                         goto out;
                 }
                 if (fdcount == 0) {
-                        log_error("timeout: killing '%s' [%u]", cmd, pid);
-                        kill(pid, SIGKILL);
+                        log_warning("slow: '%s' [%u]", cmd, pid);
+
+                        fdcount = poll(pfd, 1, timeout);
+                        if (fdcount < 0) {
+                                if (errno == EINTR)
+                                        continue;
+                                err = -errno;
+                                log_error("failed to poll: %m");
+                                goto out;
+                        }
+                        if (fdcount == 0) {
+                                log_error("timeout: killing '%s' [%u]", cmd, pid);
+                                kill(pid, SIGKILL);
+                        }
                 }
 
                 if (pfd[0].revents & POLLIN) {
@@ -622,8 +638,7 @@ out:
         return err;
 }
 
-int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[])
-{
+int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]) {
         int i = 0;
         char *pos;
 
@@ -657,9 +672,10 @@ out:
 }
 
 int udev_event_spawn(struct udev_event *event,
+                     usec_t timeout_usec,
+                     usec_t timeout_warn_usec,
                      const char *cmd, char **envp, const sigset_t *sigmask,
-                     char *result, size_t ressize)
-{
+                     char *result, size_t ressize) {
         struct udev *udev = event->udev;
         int outpipe[2] = {-1, -1};
         int errpipe[2] = {-1, -1};
@@ -728,11 +744,13 @@ int udev_event_spawn(struct udev_event *event,
                         errpipe[WRITE_END] = -1;
                 }
 
-                spawn_read(event, cmd,
-                         outpipe[READ_END], errpipe[READ_END],
-                         result, ressize);
+                spawn_read(event,
+                           timeout_usec,
+                           cmd,
+                           outpipe[READ_END], errpipe[READ_END],
+                           result, ressize);
 
-                err = spawn_wait(event, cmd, pid);
+                err = spawn_wait(event, timeout_usec, timeout_warn_usec, cmd, pid);
         }
 
 out:
@@ -747,37 +765,32 @@ out:
         return err;
 }
 
-static int rename_netif(struct udev_event *event)
-{
+static int rename_netif(struct udev_event *event) {
         struct udev_device *dev = event->dev;
-        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
         char name[IFNAMSIZ];
         const char *oldname;
         int r;
 
         oldname = udev_device_get_sysname(dev);
 
-        log_debug("changing net interface name from '%s' to '%s'",
-                  oldname, event->name);
-
         strscpy(name, IFNAMSIZ, event->name);
 
-        r = sd_rtnl_open(&rtnl, 0);
-        if (r < 0)
+        r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name);
+        if (r < 0) {
+                log_error("error changing net interface name '%s' to '%s': %s",
+                          oldname, name, strerror(-r));
                 return r;
+        }
 
-        r = rtnl_set_link_name(rtnl, udev_device_get_ifindex(dev), name);
-        if (r < 0)
-                log_error("error changing net interface name %s to %s: %s",
-                          oldname, name, strerror(-r));
-        else
-                print_kmsg("renamed network interface %s to %s\n", oldname, name);
+        log_debug("renamed network interface '%s' to '%s'\n", oldname, name);
 
-        return r;
+        return 0;
 }
 
-void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask)
-{
+void udev_event_execute_rules(struct udev_event *event,
+                              usec_t timeout_usec,
+                              usec_t timeout_warn_usec,
+                              struct udev_rules *rules, const sigset_t *sigmask) {
         struct udev_device *dev = event->dev;
 
         if (udev_device_get_subsystem(dev) == NULL)
@@ -791,7 +804,7 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
                 if (major(udev_device_get_devnum(dev)) != 0)
                         udev_watch_end(event->udev, dev);
 
-                udev_rules_apply_to_event(rules, event, sigmask);
+                udev_rules_apply_to_event(rules, event, timeout_usec, timeout_warn_usec, sigmask);
 
                 if (major(udev_device_get_devnum(dev)) != 0)
                         udev_node_remove(dev);
@@ -800,6 +813,7 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
                 if (event->dev_db != NULL) {
                         udev_device_set_syspath(event->dev_db, udev_device_get_syspath(dev));
                         udev_device_set_subsystem(event->dev_db, udev_device_get_subsystem(dev));
+                        udev_device_set_devnum(event->dev_db, udev_device_get_devnum(dev));
                         udev_device_read_db(event->dev_db, NULL);
                         udev_device_set_info_loaded(event->dev_db);
 
@@ -808,7 +822,23 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
                                 udev_watch_end(event->udev, event->dev_db);
                 }
 
-                udev_rules_apply_to_event(rules, event, sigmask);
+                if (major(udev_device_get_devnum(dev)) == 0 &&
+                    streq(udev_device_get_action(dev), "move")) {
+                        struct udev_list_entry *entry;
+
+                        for ((entry = udev_device_get_properties_list_entry(event->dev_db)); entry; entry = udev_list_entry_get_next(entry)) {
+                                const char *key, *value;
+                                struct udev_list_entry *property;
+
+                                key = udev_list_entry_get_name(entry);
+                                value = udev_list_entry_get_value(entry);
+
+                                property = udev_device_add_property(event->dev, key, value);
+                                udev_list_entry_set_num(property, true);
+                        }
+                }
+
+                udev_rules_apply_to_event(rules, event, timeout_usec, timeout_warn_usec, sigmask);
 
                 /* rename a new network interface, if needed */
                 if (udev_device_get_ifindex(dev) > 0 && streq(udev_device_get_action(dev), "add") &&
@@ -819,8 +849,6 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
 
                         r = rename_netif(event);
                         if (r >= 0) {
-                                log_debug("renamed netif to '%s'", event->name);
-
                                 /* remember old name */
                                 udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev));
 
@@ -883,8 +911,7 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
         }
 }
 
-void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask)
-{
+void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, const sigset_t *sigmask) {
         struct udev_list_entry *list_entry;
 
         udev_list_entry_foreach(list_entry, udev_list_get_entry(&event->run_list)) {
@@ -907,7 +934,7 @@ void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask)
 
                         udev_event_apply_format(event, cmd, program, sizeof(program));
                         envp = udev_device_get_properties_envp(event->dev);
-                        udev_event_spawn(event, program, envp, sigmask, NULL, 0);
+                        udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, sigmask, NULL, 0);
                 }
         }
 }
index 200e24fb412c11060702f72f493392be657ce899..030e45919895c427d9bfc3ad28e96b3ce3d839b7 100644 (file)
@@ -32,8 +32,7 @@
 #include "udev.h"
 #include "smack-util.h"
 
-static int node_symlink(struct udev_device *dev, const char *node, const char *slink)
-{
+static int node_symlink(struct udev_device *dev, const char *node, const char *slink) {
         struct stat stats;
         char target[UTIL_PATH_SIZE];
         char *s;
@@ -89,11 +88,11 @@ static int node_symlink(struct udev_device *dev, const char *node, const char *s
                         err = mkdir_parents_label(slink, 0755);
                         if (err != 0 && err != -ENOENT)
                                 break;
-                        label_context_set(slink, S_IFLNK);
+                        mac_selinux_create_file_prepare(slink, S_IFLNK);
                         err = symlink(target, slink);
                         if (err != 0)
                                 err = -errno;
-                        label_context_clear();
+                        mac_selinux_create_file_clear();
                 } while (err == -ENOENT);
                 if (err == 0)
                         goto exit;
@@ -106,11 +105,11 @@ static int node_symlink(struct udev_device *dev, const char *node, const char *s
                 err = mkdir_parents_label(slink_tmp, 0755);
                 if (err != 0 && err != -ENOENT)
                         break;
-                label_context_set(slink_tmp, S_IFLNK);
+                mac_selinux_create_file_prepare(slink_tmp, S_IFLNK);
                 err = symlink(target, slink_tmp);
                 if (err != 0)
                         err = -errno;
-                label_context_clear();
+                mac_selinux_create_file_clear();
         } while (err == -ENOENT);
         if (err != 0) {
                 log_error("symlink '%s' '%s' failed: %m", target, slink_tmp);
@@ -126,8 +125,7 @@ exit:
 }
 
 /* find device node of device with highest priority */
-static const char *link_find_prioritized(struct udev_device *dev, bool add, const char *stackdir, char *buf, size_t bufsize)
-{
+static const char *link_find_prioritized(struct udev_device *dev, bool add, const char *stackdir, char *buf, size_t bufsize) {
         struct udev *udev = udev_device_get_udev(dev);
         DIR *dir;
         int priority = 0;
@@ -180,9 +178,7 @@ static const char *link_find_prioritized(struct udev_device *dev, bool add, cons
 }
 
 /* manage "stack of names" with possibly specified device priorities */
-static void link_update(struct udev_device *dev, const char *slink, bool add)
-{
-        struct udev *udev = udev_device_get_udev(dev);
+static void link_update(struct udev_device *dev, const char *slink, bool add) {
         char name_enc[UTIL_PATH_SIZE];
         char filename[UTIL_PATH_SIZE * 2];
         char dirname[UTIL_PATH_SIZE];
@@ -200,7 +196,7 @@ static void link_update(struct udev_device *dev, const char *slink, bool add)
         if (target == NULL) {
                 log_debug("no reference left, remove '%s'", slink);
                 if (unlink(slink) == 0)
-                        util_delete_path(udev, slink);
+                        rmdir_parents(slink, "/");
         } else {
                 log_debug("creating link '%s' to '%s'", slink, target);
                 node_symlink(dev, target, slink);
@@ -224,8 +220,7 @@ static void link_update(struct udev_device *dev, const char *slink, bool add)
         }
 }
 
-void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old)
-{
+void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old) {
         struct udev_list_entry *list_entry;
 
         /* update possible left-over symlinks */
@@ -286,8 +281,12 @@ static int node_permissions_apply(struct udev_device *dev, bool apply,
 
                 if ((stats.st_mode & 0777) != (mode & 0777) || stats.st_uid != uid || stats.st_gid != gid) {
                         log_debug("set permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
-                        chmod(devnode, mode);
-                        chown(devnode, uid, gid);
+                        err = chmod(devnode, mode);
+                        if (err < 0)
+                                log_warning("setting mode of %s to %#o failed: %m", devnode, mode);
+                        err = chown(devnode, uid, gid);
+                        if (err < 0)
+                                log_warning("setting owner of %s to uid=%u, gid=%u failed: %m", devnode, uid, gid);
                 } else {
                         log_debug("preserve permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
                 }
@@ -295,21 +294,26 @@ static int node_permissions_apply(struct udev_device *dev, bool apply,
                 /* apply SECLABEL{$module}=$label */
                 udev_list_entry_foreach(entry, udev_list_get_entry(seclabel_list)) {
                         const char *name, *label;
+                        int r;
 
                         name = udev_list_entry_get_name(entry);
                         label = udev_list_entry_get_value(entry);
 
                         if (streq(name, "selinux")) {
                                 selinux = true;
-                                if (label_apply(devnode, label) < 0)
-                                        log_error("SECLABEL: failed to set SELinux label '%s'", label);
+
+                                r = mac_selinux_apply(devnode, label);
+                                if (r < 0)
+                                        log_error("SECLABEL: failed to set SELinux label '%s': %s", label, strerror(-r));
                                 else
                                         log_debug("SECLABEL: set SELinux label '%s'", label);
 
                         } else if (streq(name, "smack")) {
                                 smack = true;
-                                if (smack_label_path(devnode, label) < 0)
-                                        log_error("SECLABEL: failed to set SMACK label '%s'", label);
+
+                                r = mac_smack_apply(devnode, label);
+                                if (r < 0)
+                                        log_error("SECLABEL: failed to set SMACK label '%s': %s", label, strerror(-r));
                                 else
                                         log_debug("SECLABEL: set SMACK label '%s'", label);
 
@@ -319,9 +323,9 @@ static int node_permissions_apply(struct udev_device *dev, bool apply,
 
                 /* set the defaults */
                 if (!selinux)
-                        label_fix(devnode, true, false);
+                        mac_selinux_fix(devnode, true, false);
                 if (!smack)
-                        smack_label_path(devnode, NULL);
+                        mac_smack_apply(devnode, NULL);
         }
 
         /* always update timestamp when we re-use the node, like on media change events */
@@ -353,8 +357,7 @@ void udev_node_add(struct udev_device *dev, bool apply,
                         link_update(dev, udev_list_entry_get_name(list_entry), true);
 }
 
-void udev_node_remove(struct udev_device *dev)
-{
+void udev_node_remove(struct udev_device *dev) {
         struct udev_list_entry *list_entry;
         char filename[UTIL_PATH_SIZE];
 
index 85f78bcdefcd19bf9effbdf2eb28926a766d6470..3bc25f7c26980f4f1b2f62ecd6880536fadbc9a8 100644 (file)
@@ -82,7 +82,7 @@ static unsigned int rules_add_string(struct udev_rules *rules, const char *s) {
         return strbuf_add_string(rules->strbuf, s, strlen(s));
 }
 
-/* KEY=="", KEY!="", KEY+="", KEY="", KEY:="" */
+/* KEY=="", KEY!="", KEY+="", KEY-="", KEY="", KEY:="" */
 enum operation_type {
         OP_UNSET,
 
@@ -91,6 +91,7 @@ enum operation_type {
         OP_MATCH_MAX,
 
         OP_ADD,
+        OP_REMOVE,
         OP_ASSIGN,
         OP_ASSIGN_FINAL,
 };
@@ -137,7 +138,6 @@ enum token_type {
         TK_M_PARENTS_MAX,
 
         TK_M_TEST,                      /* val, mode_t */
-        TK_M_EVENT_TIMEOUT,             /* int */
         TK_M_PROGRAM,                   /* val */
         TK_M_IMPORT_FILE,               /* val */
         TK_M_IMPORT_PROG,               /* val */
@@ -201,7 +201,6 @@ struct token {
                                 uid_t uid;
                                 gid_t gid;
                                 int devlink_prio;
-                                int event_timeout;
                                 int watch;
                                 enum udev_builtin_cmd builtin_cmd;
                         };
@@ -218,8 +217,7 @@ struct rule_tmp {
 };
 
 #ifdef DEBUG
-static const char *operation_str(enum operation_type type)
-{
+static const char *operation_str(enum operation_type type) {
         static const char *operation_strs[] = {
                 [OP_UNSET] =            "UNSET",
                 [OP_MATCH] =            "match",
@@ -227,6 +225,7 @@ static const char *operation_str(enum operation_type type)
                 [OP_MATCH_MAX] =        "MATCH_MAX",
 
                 [OP_ADD] =              "add",
+                [OP_REMOVE] =           "remove",
                 [OP_ASSIGN] =           "assign",
                 [OP_ASSIGN_FINAL] =     "assign-final",
 }        ;
@@ -234,8 +233,7 @@ static const char *operation_str(enum operation_type type)
         return operation_strs[type];
 }
 
-static const char *string_glob_str(enum string_glob_type type)
-{
+static const char *string_glob_str(enum string_glob_type type) {
         static const char *string_glob_strs[] = {
                 [GL_UNSET] =            "UNSET",
                 [GL_PLAIN] =            "plain",
@@ -248,8 +246,7 @@ static const char *string_glob_str(enum string_glob_type type)
         return string_glob_strs[type];
 }
 
-static const char *token_str(enum token_type type)
-{
+static const char *token_str(enum token_type type) {
         static const char *token_strs[] = {
                 [TK_UNSET] =                    "UNSET",
                 [TK_RULE] =                     "RULE",
@@ -275,7 +272,6 @@ static const char *token_str(enum token_type type)
                 [TK_M_PARENTS_MAX] =            "M PARENTS_MAX",
 
                 [TK_M_TEST] =                   "M TEST",
-                [TK_M_EVENT_TIMEOUT] =          "M EVENT_TIMEOUT",
                 [TK_M_PROGRAM] =                "M PROGRAM",
                 [TK_M_IMPORT_FILE] =            "M IMPORT_FILE",
                 [TK_M_IMPORT_PROG] =            "M IMPORT_PROG",
@@ -314,8 +310,7 @@ static const char *token_str(enum token_type type)
         return token_strs[type];
 }
 
-static void dump_token(struct udev_rules *rules, struct token *token)
-{
+static void dump_token(struct udev_rules *rules, struct token *token) {
         enum token_type type = token->type;
         enum operation_type op = token->key.op;
         enum string_glob_type glob = token->key.glob;
@@ -409,9 +404,6 @@ static void dump_token(struct udev_rules *rules, struct token *token)
         case TK_A_SECLABEL:
                 log_debug("%s %s '%s' '%s'", token_str(type), operation_str(op), attr, value);
                 break;
-        case TK_M_EVENT_TIMEOUT:
-                log_debug("%s %u", token_str(type), token->key.event_timeout);
-                break;
         case TK_A_GOTO:
                 log_debug("%s '%s' %u", token_str(type), value, token->key.rule_goto);
                 break;
@@ -427,8 +419,7 @@ static void dump_token(struct udev_rules *rules, struct token *token)
         }
 }
 
-static void dump_rules(struct udev_rules *rules)
-{
+static void dump_rules(struct udev_rules *rules) {
         unsigned int i;
 
         log_debug("dumping %u (%zu bytes) tokens, %u (%zu bytes) strings",
@@ -444,8 +435,7 @@ static inline void dump_token(struct udev_rules *rules, struct token *token) {}
 static inline void dump_rules(struct udev_rules *rules) {}
 #endif /* DEBUG */
 
-static int add_token(struct udev_rules *rules, struct token *token)
-{
+static int add_token(struct udev_rules *rules, struct token *token) {
         /* grow buffer if needed */
         if (rules->token_cur+1 >= rules->token_max) {
                 struct token *tokens;
@@ -467,11 +457,11 @@ static int add_token(struct udev_rules *rules, struct token *token)
         return 0;
 }
 
-static uid_t add_uid(struct udev_rules *rules, const char *owner)
-{
+static uid_t add_uid(struct udev_rules *rules, const char *owner) {
         unsigned int i;
-        uid_t uid;
+        uid_t uid = 0;
         unsigned int off;
+        int r;
 
         /* lookup, if we know it already */
         for (i = 0; i < rules->uids_cur; i++) {
@@ -481,7 +471,13 @@ static uid_t add_uid(struct udev_rules *rules, const char *owner)
                         return uid;
                 }
         }
-        uid = util_lookup_user(rules->udev, owner);
+        r = get_user_creds(&owner, &uid, NULL, NULL, NULL);
+        if (r < 0) {
+                if (r == -ENOENT || r == -ESRCH)
+                        udev_err(rules->udev, "specified user '%s' unknown\n", owner);
+                else
+                        udev_err(rules->udev, "error resolving user '%s': %s\n", owner, strerror(-r));
+        }
 
         /* grow buffer if needed */
         if (rules->uids_cur+1 >= rules->uids_max) {
@@ -508,11 +504,11 @@ static uid_t add_uid(struct udev_rules *rules, const char *owner)
         return uid;
 }
 
-static gid_t add_gid(struct udev_rules *rules, const char *group)
-{
+static gid_t add_gid(struct udev_rules *rules, const char *group) {
         unsigned int i;
-        gid_t gid;
+        gid_t gid = 0;
         unsigned int off;
+        int r;
 
         /* lookup, if we know it already */
         for (i = 0; i < rules->gids_cur; i++) {
@@ -522,7 +518,13 @@ static gid_t add_gid(struct udev_rules *rules, const char *group)
                         return gid;
                 }
         }
-        gid = util_lookup_group(rules->udev, group);
+        r = get_group_creds(&group, &gid);
+        if (r < 0) {
+                if (r == -ENOENT || r == -ESRCH)
+                        udev_err(rules->udev, "specified group '%s' unknown\n", group);
+                else
+                        udev_err(rules->udev, "error resolving group '%s': %s\n", group, strerror(-r));
+        }
 
         /* grow buffer if needed */
         if (rules->gids_cur+1 >= rules->gids_max) {
@@ -549,8 +551,7 @@ static gid_t add_gid(struct udev_rules *rules, const char *group)
         return gid;
 }
 
-static int import_property_from_string(struct udev_device *dev, char *line)
-{
+static int import_property_from_string(struct udev_device *dev, char *line) {
         char *key;
         char *val;
         size_t len;
@@ -613,8 +614,7 @@ static int import_property_from_string(struct udev_device *dev, char *line)
         return 0;
 }
 
-static int import_file_into_properties(struct udev_device *dev, const char *filename)
-{
+static int import_file_into_properties(struct udev_device *dev, const char *filename) {
         FILE *f;
         char line[UTIL_LINE_SIZE];
 
@@ -627,8 +627,10 @@ static int import_file_into_properties(struct udev_device *dev, const char *file
         return 0;
 }
 
-static int import_program_into_properties(struct udev_event *event, const char *program, const sigset_t *sigmask)
-{
+static int import_program_into_properties(struct udev_event *event,
+                                          usec_t timeout_usec,
+                                          usec_t timeout_warn_usec,
+                                          const char *program, const sigset_t *sigmask) {
         struct udev_device *dev = event->dev;
         char **envp;
         char result[UTIL_LINE_SIZE];
@@ -636,7 +638,7 @@ static int import_program_into_properties(struct udev_event *event, const char *
         int err;
 
         envp = udev_device_get_properties_envp(dev);
-        err = udev_event_spawn(event, program, envp, sigmask, result, sizeof(result));
+        err = udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, sigmask, result, sizeof(result));
         if (err < 0)
                 return err;
 
@@ -655,8 +657,7 @@ static int import_program_into_properties(struct udev_event *event, const char *
         return 0;
 }
 
-static int import_parent_into_properties(struct udev_device *dev, const char *filter)
-{
+static int import_parent_into_properties(struct udev_device *dev, const char *filter) {
         struct udev_device *dev_parent;
         struct udev_list_entry *list_entry;
 
@@ -681,8 +682,7 @@ static int import_parent_into_properties(struct udev_device *dev, const char *fi
 }
 
 #define WAIT_LOOP_PER_SECOND                50
-static int wait_for_file(struct udev_device *dev, const char *file, int timeout)
-{
+static int wait_for_file(struct udev_device *dev, const char *file, int timeout) {
         char filepath[UTIL_PATH_SIZE];
         char devicepath[UTIL_PATH_SIZE];
         struct stat stats;
@@ -716,8 +716,7 @@ static int wait_for_file(struct udev_device *dev, const char *file, int timeout)
         return -1;
 }
 
-static int attr_subst_subdir(char *attr, size_t len)
-{
+static int attr_subst_subdir(char *attr, size_t len) {
         bool found = false;
 
         if (strstr(attr, "/*/")) {
@@ -754,8 +753,7 @@ static int attr_subst_subdir(char *attr, size_t len)
         return found;
 }
 
-static int get_key(struct udev *udev, char **line, char **key, enum operation_type *op, char **value)
-{
+static int get_key(struct udev *udev, char **line, char **key, enum operation_type *op, char **value) {
         char *linepos;
         char *temp;
 
@@ -780,7 +778,7 @@ static int get_key(struct udev *udev, char **line, char **key, enum operation_ty
                         break;
                 if (linepos[0] == '=')
                         break;
-                if ((linepos[0] == '+') || (linepos[0] == '!') || (linepos[0] == ':'))
+                if ((linepos[0] == '+') || (linepos[0] == '-') || (linepos[0] == '!') || (linepos[0] == ':'))
                         if (linepos[1] == '=')
                                 break;
         }
@@ -804,6 +802,9 @@ static int get_key(struct udev *udev, char **line, char **key, enum operation_ty
         } else if (linepos[0] == '+' && linepos[1] == '=') {
                 *op = OP_ADD;
                 linepos += 2;
+        } else if (linepos[0] == '-' && linepos[1] == '=') {
+                *op = OP_REMOVE;
+                linepos += 2;
         } else if (linepos[0] == '=') {
                 *op = OP_ASSIGN;
                 linepos++;
@@ -842,8 +843,7 @@ static int get_key(struct udev *udev, char **line, char **key, enum operation_ty
 }
 
 /* extract possible KEY{attr} */
-static const char *get_key_attribute(struct udev *udev, char *str)
-{
+static const char *get_key_attribute(struct udev *udev, char *str) {
         char *pos;
         char *attr;
 
@@ -863,8 +863,7 @@ static const char *get_key_attribute(struct udev *udev, char *str)
 
 static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type,
                         enum operation_type op,
-                        const char *value, const void *data)
-{
+                        const char *value, const void *data) {
         struct token *token = &rule_tmp->token[rule_tmp->token_cur];
         const char *attr = NULL;
 
@@ -942,9 +941,6 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type,
         case TK_A_MODE_ID:
                 token->key.mode = *(mode_t *)data;
                 break;
-        case TK_M_EVENT_TIMEOUT:
-                token->key.event_timeout = *(int *)data;
-                break;
         case TK_RULE:
         case TK_M_PARENTS_MIN:
         case TK_M_PARENTS_MAX:
@@ -1008,8 +1004,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type,
         return 0;
 }
 
-static int sort_token(struct udev_rules *rules, struct rule_tmp *rule_tmp)
-{
+static int sort_token(struct udev_rules *rules, struct rule_tmp *rule_tmp) {
         unsigned int i;
         unsigned int start = 0;
         unsigned int end = rule_tmp->token_cur;
@@ -1044,8 +1039,7 @@ static int sort_token(struct udev_rules *rules, struct rule_tmp *rule_tmp)
 }
 
 static int add_rule(struct udev_rules *rules, char *line,
-                    const char *filename, unsigned int filename_off, unsigned int lineno)
-{
+                    const char *filename, unsigned int filename_off, unsigned int lineno) {
         char *linepos;
         const char *attr;
         struct rule_tmp rule_tmp;
@@ -1078,8 +1072,7 @@ static int add_rule(struct udev_rules *rules, char *line,
                                 _cleanup_free_ char *tmp;
 
                                 tmp = cescape(buf);
-                                log_error("invalid key/value pair in file %s on line %u,"
-                                          "starting at character %tu ('%s')\n",
+                                log_error("invalid key/value pair in file %s on line %u, starting at character %tu ('%s')\n",
                                           filename, lineno, linepos - line + 1, tmp);
                                 if (linepos[1] == '#')
                                         log_error("hint: comments can only start at beginning of line");
@@ -1147,6 +1140,10 @@ static int add_rule(struct udev_rules *rules, char *line,
                                 log_error("error parsing ATTR attribute");
                                 goto invalid;
                         }
+                        if (op == OP_REMOVE) {
+                                log_error("invalid ATTR operation");
+                                goto invalid;
+                        }
                         if (op < OP_MATCH_MAX) {
                                 rule_add_key(&rule_tmp, TK_M_ATTR, op, value, attr);
                         } else {
@@ -1161,6 +1158,10 @@ static int add_rule(struct udev_rules *rules, char *line,
                                 log_error("error parsing SECLABEL attribute");
                                 goto invalid;
                         }
+                        if (op == OP_REMOVE) {
+                                log_error("invalid SECLABEL operation");
+                                goto invalid;
+                        }
 
                         rule_add_key(&rule_tmp, TK_A_SECLABEL, op, value, attr);
                         continue;
@@ -1228,6 +1229,10 @@ static int add_rule(struct udev_rules *rules, char *line,
                                 log_error("error parsing ENV attribute");
                                 goto invalid;
                         }
+                        if (op == OP_REMOVE) {
+                                log_error("invalid ENV operation");
+                                goto invalid;
+                        }
                         if (op < OP_MATCH_MAX) {
                                 if (rule_add_key(&rule_tmp, TK_M_ENV, op, value, attr) != 0)
                                         goto invalid;
@@ -1268,6 +1273,10 @@ static int add_rule(struct udev_rules *rules, char *line,
                 }
 
                 if (streq(key, "PROGRAM")) {
+                        if (op == OP_REMOVE) {
+                                log_error("invalid PROGRAM operation");
+                                goto invalid;
+                        }
                         rule_add_key(&rule_tmp, TK_M_PROGRAM, op, value, NULL);
                         continue;
                 }
@@ -1287,6 +1296,10 @@ static int add_rule(struct udev_rules *rules, char *line,
                                 log_error("IMPORT{} type missing, ignoring IMPORT %s:%u", filename, lineno);
                                 continue;
                         }
+                        if (op == OP_REMOVE) {
+                                log_error("invalid IMPORT operation");
+                                goto invalid;
+                        }
                         if (streq(attr, "program")) {
                                 /* find known built-in command */
                                 if (value[0] != '/') {
@@ -1342,6 +1355,10 @@ static int add_rule(struct udev_rules *rules, char *line,
                         attr = get_key_attribute(rules->udev, key + strlen("RUN"));
                         if (attr == NULL)
                                 attr = "program";
+                        if (op == OP_REMOVE) {
+                                log_error("invalid RUN operation");
+                                goto invalid;
+                        }
 
                         if (streq(attr, "builtin")) {
                                 enum udev_builtin_cmd cmd = udev_builtin_lookup(value);
@@ -1349,7 +1366,7 @@ static int add_rule(struct udev_rules *rules, char *line,
                                 if (cmd < UDEV_BUILTIN_MAX)
                                         rule_add_key(&rule_tmp, TK_A_RUN_BUILTIN, op, value, &cmd);
                                 else
-                                        log_error("IMPORT{builtin}: '%s' unknown %s:%u", value, filename, lineno);
+                                        log_error("RUN{builtin}: '%s' unknown %s:%u", value, filename, lineno);
                         } else if (streq(attr, "program")) {
                                 enum udev_builtin_cmd cmd = UDEV_BUILTIN_MAX;
 
@@ -1362,21 +1379,37 @@ static int add_rule(struct udev_rules *rules, char *line,
                 }
 
                 if (streq(key, "WAIT_FOR") || streq(key, "WAIT_FOR_SYSFS")) {
+                        if (op == OP_REMOVE) {
+                                log_error("invalid WAIT_FOR/WAIT_FOR_SYSFS operation");
+                                goto invalid;
+                        }
                         rule_add_key(&rule_tmp, TK_M_WAITFOR, 0, value, NULL);
                         continue;
                 }
 
                 if (streq(key, "LABEL")) {
+                        if (op == OP_REMOVE) {
+                                log_error("invalid LABEL operation");
+                                goto invalid;
+                        }
                         rule_tmp.rule.rule.label_off = rules_add_string(rules, value);
                         continue;
                 }
 
                 if (streq(key, "GOTO")) {
+                        if (op == OP_REMOVE) {
+                                log_error("invalid GOTO operation");
+                                goto invalid;
+                        }
                         rule_add_key(&rule_tmp, TK_A_GOTO, 0, value, NULL);
                         continue;
                 }
 
                 if (startswith(key, "NAME")) {
+                        if (op == OP_REMOVE) {
+                                log_error("invalid NAME operation");
+                                goto invalid;
+                        }
                         if (op < OP_MATCH_MAX) {
                                 rule_add_key(&rule_tmp, TK_M_NAME, op, value, NULL);
                         } else {
@@ -1397,6 +1430,10 @@ static int add_rule(struct udev_rules *rules, char *line,
                 }
 
                 if (streq(key, "SYMLINK")) {
+                        if (op == OP_REMOVE) {
+                                log_error("invalid SYMLINK operation");
+                                goto invalid;
+                        }
                         if (op < OP_MATCH_MAX)
                                 rule_add_key(&rule_tmp, TK_M_DEVLINK, op, value, NULL);
                         else
@@ -1409,6 +1446,11 @@ static int add_rule(struct udev_rules *rules, char *line,
                         uid_t uid;
                         char *endptr;
 
+                        if (op == OP_REMOVE) {
+                                log_error("invalid OWNER operation");
+                                goto invalid;
+                        }
+
                         uid = strtoul(value, &endptr, 10);
                         if (endptr[0] == '\0') {
                                 rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid);
@@ -1426,6 +1468,11 @@ static int add_rule(struct udev_rules *rules, char *line,
                         gid_t gid;
                         char *endptr;
 
+                        if (op == OP_REMOVE) {
+                                log_error("invalid GROUP operation");
+                                goto invalid;
+                        }
+
                         gid = strtoul(value, &endptr, 10);
                         if (endptr[0] == '\0') {
                                 rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid);
@@ -1443,6 +1490,11 @@ static int add_rule(struct udev_rules *rules, char *line,
                         mode_t mode;
                         char *endptr;
 
+                        if (op == OP_REMOVE) {
+                                log_error("invalid MODE operation");
+                                goto invalid;
+                        }
+
                         mode = strtol(value, &endptr, 8);
                         if (endptr[0] == '\0')
                                 rule_add_key(&rule_tmp, TK_A_MODE_ID, op, NULL, &mode);
@@ -1455,6 +1507,11 @@ static int add_rule(struct udev_rules *rules, char *line,
                 if (streq(key, "OPTIONS")) {
                         const char *pos;
 
+                        if (op == OP_REMOVE) {
+                                log_error("invalid OPTIONS operation");
+                                goto invalid;
+                        }
+
                         pos = strstr(value, "link_priority=");
                         if (pos != NULL) {
                                 int prio = atoi(&pos[strlen("link_priority=")]);
@@ -1462,13 +1519,6 @@ static int add_rule(struct udev_rules *rules, char *line,
                                 rule_add_key(&rule_tmp, TK_A_DEVLINK_PRIO, op, NULL, &prio);
                         }
 
-                        pos = strstr(value, "event_timeout=");
-                        if (pos != NULL) {
-                                int tout = atoi(&pos[strlen("event_timeout=")]);
-
-                                rule_add_key(&rule_tmp, TK_M_EVENT_TIMEOUT, op, NULL, &tout);
-                        }
-
                         pos = strstr(value, "string_escape=");
                         if (pos != NULL) {
                                 pos = &pos[strlen("string_escape=")];
@@ -1524,24 +1574,27 @@ invalid:
         return -1;
 }
 
-static int parse_file(struct udev_rules *rules, const char *filename)
-{
-        FILE *f;
+static int parse_file(struct udev_rules *rules, const char *filename) {
+        _cleanup_fclose_ FILE *f = NULL;
         unsigned int first_token;
         unsigned int filename_off;
         char line[UTIL_LINE_SIZE];
         int line_nr = 0;
         unsigned int i;
 
-        if (null_or_empty_path(filename)) {
-                log_debug("skip empty file: %s", filename);
-                return 0;
+        f = fopen(filename, "re");
+        if (!f) {
+                if (errno == ENOENT)
+                        return 0;
+                else
+                        return -errno;
         }
-        log_debug("read rules file: %s", filename);
 
-        f = fopen(filename, "re");
-        if (f == NULL)
-                return -1;
+        if (null_or_empty_fd(fileno(f))) {
+                log_debug("Skipping empty file: %s", filename);
+                return 0;
+        } else
+                log_debug("Reading rules file: %s", filename);
 
         first_token = rules->token_cur;
         filename_off = rules_add_string(rules, filename);
@@ -1580,7 +1633,6 @@ static int parse_file(struct udev_rules *rules, const char *filename)
                 }
                 add_rule(rules, key, filename, filename_off, line_nr);
         }
-        fclose(f);
 
         /* link GOTOs to LABEL rules in this file to be able to fast-forward */
         for (i = first_token+1; i < rules->token_cur; i++) {
@@ -1605,8 +1657,7 @@ static int parse_file(struct udev_rules *rules, const char *filename)
         return 0;
 }
 
-struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
-{
+struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) {
         struct udev_rules *rules;
         struct udev_list file_list;
         struct token end_token;
@@ -1676,8 +1727,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
         return rules;
 }
 
-struct udev_rules *udev_rules_unref(struct udev_rules *rules)
-{
+struct udev_rules *udev_rules_unref(struct udev_rules *rules) {
         if (rules == NULL)
                 return NULL;
         free(rules->tokens);
@@ -1688,16 +1738,14 @@ struct udev_rules *udev_rules_unref(struct udev_rules *rules)
         return NULL;
 }
 
-bool udev_rules_check_timestamp(struct udev_rules *rules)
-{
+bool udev_rules_check_timestamp(struct udev_rules *rules) {
         if (!rules)
                 return false;
 
         return paths_check_timestamp(rules_dirs, &rules->dirs_ts_usec, true);
 }
 
-static int match_key(struct udev_rules *rules, struct token *token, const char *val)
-{
+static int match_key(struct udev_rules *rules, struct token *token, const char *val) {
         char *key_value = rules_str(rules, token->key.value_off);
         char *pos;
         bool match = false;
@@ -1770,8 +1818,7 @@ static int match_key(struct udev_rules *rules, struct token *token, const char *
         return -1;
 }
 
-static int match_attr(struct udev_rules *rules, struct udev_device *dev, struct udev_event *event, struct token *cur)
-{
+static int match_attr(struct udev_rules *rules, struct udev_device *dev, struct udev_event *event, struct token *cur) {
         const char *name;
         char nbuf[UTIL_NAME_SIZE];
         const char *value;
@@ -1825,8 +1872,11 @@ enum escape_type {
         ESCAPE_REPLACE,
 };
 
-int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, const sigset_t *sigmask)
-{
+int udev_rules_apply_to_event(struct udev_rules *rules,
+                              struct udev_event *event,
+                              usec_t timeout_usec,
+                              usec_t timeout_warn_usec,
+                              const sigset_t *sigmask) {
         struct token *cur;
         struct token *rule;
         enum escape_type esc = ESCAPE_UNSET;
@@ -2020,10 +2070,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                 goto nomatch;
                         break;
                 }
-                case TK_M_EVENT_TIMEOUT:
-                        log_debug("OPTIONS event_timeout=%u", cur->key.event_timeout);
-                        event->timeout_usec = cur->key.event_timeout * 1000 * 1000;
-                        break;
                 case TK_M_PROGRAM: {
                         char program[UTIL_PATH_SIZE];
                         char **envp;
@@ -2038,7 +2084,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                   rules_str(rules, rule->rule.filename_off),
                                   rule->rule.filename_line);
 
-                        if (udev_event_spawn(event, program, envp, sigmask, result, sizeof(result)) < 0) {
+                        if (udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, sigmask, result, sizeof(result)) < 0) {
                                 if (cur->key.op != OP_NOMATCH)
                                         goto nomatch;
                         } else {
@@ -2074,7 +2120,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                   rules_str(rules, rule->rule.filename_off),
                                   rule->rule.filename_line);
 
-                        if (import_program_into_properties(event, import, sigmask) != 0)
+                        if (import_program_into_properties(event, timeout_usec, timeout_warn_usec, import, sigmask) != 0)
                                 if (cur->key.op != OP_NOMATCH)
                                         goto nomatch;
                         break;
@@ -2207,6 +2253,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                         break;
                 case TK_A_OWNER: {
                         char owner[UTIL_NAME_SIZE];
+                        const char *ow = owner;
+                        int r;
 
                         if (event->owner_final)
                                 break;
@@ -2214,7 +2262,15 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                 event->owner_final = true;
                         udev_event_apply_format(event, rules_str(rules, cur->key.value_off), owner, sizeof(owner));
                         event->owner_set = true;
-                        event->uid = util_lookup_user(event->udev, owner);
+                        r = get_user_creds(&ow, &event->uid, NULL, NULL, NULL);
+                        if (r < 0) {
+                                if (r == -ENOENT || r == -ESRCH)
+                                        udev_err(event->udev, "specified user '%s' unknown\n", owner);
+                                else
+                                        udev_err(event->udev, "error resolving user '%s': %s\n", owner, strerror(-r));
+
+                                event->uid = 0;
+                        }
                         log_debug("OWNER %u %s:%u",
                                   event->uid,
                                   rules_str(rules, rule->rule.filename_off),
@@ -2223,6 +2279,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                 }
                 case TK_A_GROUP: {
                         char group[UTIL_NAME_SIZE];
+                        const char *gr = group;
+                        int r;
 
                         if (event->group_final)
                                 break;
@@ -2230,7 +2288,15 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                 event->group_final = true;
                         udev_event_apply_format(event, rules_str(rules, cur->key.value_off), group, sizeof(group));
                         event->group_set = true;
-                        event->gid = util_lookup_group(event->udev, group);
+                        r = get_group_creds(&gr, &event->gid);
+                        if (r < 0) {
+                                if (r == -ENOENT || r == -ESRCH)
+                                        udev_err(event->udev, "specified group '%s' unknown\n", group);
+                                else
+                                        udev_err(event->udev, "error resolving group '%s': %s\n", group, strerror(-r));
+
+                                event->gid = 0;
+                        }
                         log_debug("GROUP %u %s:%u",
                                   event->gid,
                                   rules_str(rules, rule->rule.filename_off),
@@ -2357,7 +2423,10 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                 log_error("ignoring invalid tag name '%s'", tag);
                                 break;
                         }
-                        udev_device_add_tag(event->dev, tag);
+                        if (cur->key.op == OP_REMOVE)
+                                udev_device_remove_tag(event->dev, tag);
+                        else
+                                udev_device_add_tag(event->dev, tag);
                         break;
                 }
                 case TK_A_NAME: {
@@ -2499,8 +2568,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
         }
 }
 
-int udev_rules_apply_static_dev_perms(struct udev_rules *rules)
-{
+int udev_rules_apply_static_dev_perms(struct udev_rules *rules) {
         struct token *cur;
         struct token *rule;
         uid_t uid = 0;
index cbe0c37a4fe8c79309848618e7cf816232bbbb3b..061bd05875ab9a701e936146408f8a728f643db9 100644 (file)
@@ -36,8 +36,7 @@ static int inotify_fd = -1;
  * set to cloexec since we need our children to be able to add
  * watches for us
  */
-int udev_watch_init(struct udev *udev)
-{
+int udev_watch_init(struct udev *udev) {
         inotify_fd = inotify_init1(IN_CLOEXEC);
         if (inotify_fd < 0)
                 log_error("inotify_init failed: %m");
@@ -47,8 +46,7 @@ int udev_watch_init(struct udev *udev)
 /* move any old watches directory out of the way, and then restore
  * the watches
  */
-void udev_watch_restore(struct udev *udev)
-{
+void udev_watch_restore(struct udev *udev) {
         if (inotify_fd < 0)
                 return;
 
@@ -94,8 +92,7 @@ unlink:
         }
 }
 
-void udev_watch_begin(struct udev *udev, struct udev_device *dev)
-{
+void udev_watch_begin(struct udev *udev, struct udev_device *dev) {
         char filename[UTIL_PATH_SIZE];
         int wd;
         int r;
@@ -121,8 +118,7 @@ void udev_watch_begin(struct udev *udev, struct udev_device *dev)
         udev_device_set_watch_handle(dev, wd);
 }
 
-void udev_watch_end(struct udev *udev, struct udev_device *dev)
-{
+void udev_watch_end(struct udev *udev, struct udev_device *dev) {
         int wd;
         char filename[UTIL_PATH_SIZE];
 
@@ -142,8 +138,7 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev)
         udev_device_set_watch_handle(dev, -1);
 }
 
-struct udev_device *udev_watch_lookup(struct udev *udev, int wd)
-{
+struct udev_device *udev_watch_lookup(struct udev *udev, int wd) {
         char filename[UTIL_PATH_SIZE];
         char device[UTIL_NAME_SIZE];
         ssize_t len;
index f39253eb677d7bb0496eb329e777107d202dba58..47d14330022b022cf53cb7e9c0a7068801dc4709 100644 (file)
@@ -1,3 +1,3 @@
-# see udev(7) for details
+# see udev.conf(5) for details
 
 #udev_log="info"
index 62538bcb8df270fdaa4200d8638bdb90d2c74c4d..765ba9e86d6a5c3502d5c2d4eb6e8850bfe3b5aa 100644 (file)
@@ -23,6 +23,7 @@
 #include <signal.h>
 
 #include "macro.h"
+#include "sd-rtnl.h"
 #include "libudev.h"
 #include "libudev-private.h"
 #include "util.h"
@@ -43,8 +44,8 @@ struct udev_event {
         struct udev_list run_list;
         int exec_delay;
         usec_t birth_usec;
-        usec_t timeout_usec;
         int fd_signal;
+        sd_rtnl *rtnl;
         unsigned int builtin_run;
         unsigned int builtin_ret;
         bool sigterm;
@@ -72,7 +73,8 @@ struct udev_rules;
 struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names);
 struct udev_rules *udev_rules_unref(struct udev_rules *rules);
 bool udev_rules_check_timestamp(struct udev_rules *rules);
-int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, const sigset_t *sigmask);
+int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec,
+                              const sigset_t *sigmask);
 int udev_rules_apply_static_dev_perms(struct udev_rules *rules);
 
 /* udev-event.c */
@@ -82,10 +84,13 @@ size_t udev_event_apply_format(struct udev_event *event, const char *src, char *
 int udev_event_apply_subsys_kernel(struct udev_event *event, const char *string,
                                    char *result, size_t maxsize, int read_value);
 int udev_event_spawn(struct udev_event *event,
+                     usec_t timeout_usec,
+                     usec_t timeout_warn_usec,
                      const char *cmd, char **envp, const sigset_t *sigmask,
                      char *result, size_t ressize);
-void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigset);
-void udev_event_execute_run(struct udev_event *event, const sigset_t *sigset);
+void udev_event_execute_rules(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec,
+                              struct udev_rules *rules, const sigset_t *sigset);
+void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, const sigset_t *sigset);
 int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]);
 
 /* udev-watch.c */
@@ -141,9 +146,6 @@ enum udev_builtin_cmd {
         UDEV_BUILTIN_BLKID,
 #endif
         UDEV_BUILTIN_BTRFS,
-#ifdef HAVE_FIRMWARE
-        UDEV_BUILTIN_FIRMWARE,
-#endif
         UDEV_BUILTIN_HWDB,
         UDEV_BUILTIN_INPUT_ID,
         UDEV_BUILTIN_KEYBOARD,
@@ -172,9 +174,6 @@ struct udev_builtin {
 extern const struct udev_builtin udev_builtin_blkid;
 #endif
 extern const struct udev_builtin udev_builtin_btrfs;
-#ifdef HAVE_FIRMWARE
-extern const struct udev_builtin udev_builtin_firmware;
-#endif
 extern const struct udev_builtin udev_builtin_hwdb;
 extern const struct udev_builtin udev_builtin_input_id;
 extern const struct udev_builtin udev_builtin_keyboard;
index 3a6c8ef4fe2ec01294c321a6c3974639f670f9cd..6e3bc2ae98f3ddd0db5f1e738ecaa512011a1786 100644 (file)
@@ -28,8 +28,7 @@
 #include "udev.h"
 #include "udev-util.h"
 
-static void print_help(void)
-{
+static void print_help(void) {
         printf("Usage: udevadm control COMMAND\n"
                 "  -e,--exit                 instruct the daemon to cleanup and exit\n"
                 "  -l,--log-priority=LEVEL   set the udev log level for the daemon\n"
@@ -42,8 +41,7 @@ static void print_help(void)
                 "  -h,--help                 print this help text\n\n");
 }
 
-static int adm_control(struct udev *udev, int argc, char *argv[])
-{
+static int adm_control(struct udev *udev, int argc, char *argv[]) {
         _cleanup_udev_ctrl_unref_ struct udev_ctrl *uctrl = NULL;
         int timeout = 60;
         int rc = 1, c;
index 65cbf618656a970ec447b2eed276625a77753c0c..3ca755e2ed17078a7650104634f90eda3fd81118 100644 (file)
@@ -365,7 +365,12 @@ static int trie_store(struct trie *trie, const char *filename) {
         fchmod(fileno(t.f), 0444);
 
         /* write nodes */
-        fseeko(t.f, sizeof(struct trie_header_f), SEEK_SET);
+        err = fseeko(t.f, sizeof(struct trie_header_f), SEEK_SET);
+        if (err < 0) {
+                fclose(t.f);
+                unlink_noerrno(filename_tmp);
+                return -errno;
+        }
         root_off = trie_store_nodes(&t, trie->root);
         h.nodes_root_off = htole64(root_off);
         pos = ftello(t.f);
@@ -378,7 +383,12 @@ static int trie_store(struct trie *trie, const char *filename) {
         /* write header */
         size = ftello(t.f);
         h.file_size = htole64(size);
-        fseeko(t.f, 0, SEEK_SET);
+        err = fseeko(t.f, 0, SEEK_SET);
+        if (err < 0) {
+                fclose(t.f);
+                unlink_noerrno(filename_tmp);
+                return -errno;
+        }
         fwrite(&h, sizeof(struct trie_header_f), 1, t.f);
         err = ferror(t.f);
         if (err)
@@ -526,14 +536,20 @@ static int import_file(struct udev *udev, struct trie *trie, const char *filenam
 static void help(void) {
         printf("Usage: udevadm hwdb OPTIONS\n"
                "  -u,--update          update the hardware database\n"
+               "  --usr                generate in " UDEVLIBEXECDIR " instead of /etc/udev\n"
                "  -t,--test=MODALIAS   query database and print result\n"
                "  -r,--root=PATH       alternative root path in the filesystem\n"
                "  -h,--help\n\n");
 }
 
 static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
+        enum {
+                ARG_USR = 0x100,
+        };
+
         static const struct option options[] = {
                 { "update", no_argument,       NULL, 'u' },
+                { "usr",    no_argument,       NULL, ARG_USR },
                 { "test",   required_argument, NULL, 't' },
                 { "root",   required_argument, NULL, 'r' },
                 { "help",   no_argument,       NULL, 'h' },
@@ -541,6 +557,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
         };
         const char *test = NULL;
         const char *root = "";
+        const char *hwdb_bin_dir = "/etc/udev";
         bool update = false;
         struct trie *trie = NULL;
         int err, c;
@@ -551,6 +568,9 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
                 case 'u':
                         update = true;
                         break;
+                case ARG_USR:
+                        hwdb_bin_dir = UDEVLIBEXECDIR;
+                        break;
                 case 't':
                         test = optarg;
                         break;
@@ -624,7 +644,8 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
                 log_debug("strings dedup'ed: %8zu bytes (%8zu)",
                           trie->strings->dedup_len, trie->strings->dedup_count);
 
-                if (asprintf(&hwdb_bin, "%s/etc/udev/hwdb.bin", root) < 0) {
+                hwdb_bin = strjoin(root, "/", hwdb_bin_dir, "/hwdb.bin", NULL);
+                if (!hwdb_bin) {
                         rc = EXIT_FAILURE;
                         goto out;
                 }
index 8145e6f50c1a1ffe4f452b7e3cd8800c084fe8cf..22d082601119c06528cdf52cd55671ac7b619310 100644 (file)
@@ -32,8 +32,7 @@
 #include "udev.h"
 #include "udev-util.h"
 
-static bool skip_attribute(const char *name)
-{
+static bool skip_attribute(const char *name) {
         static const char* const skip[] = {
                 "uevent",
                 "dev",
@@ -51,8 +50,7 @@ static bool skip_attribute(const char *name)
         return false;
 }
 
-static void print_all_attributes(struct udev_device *device, const char *key)
-{
+static void print_all_attributes(struct udev_device *device, const char *key) {
         struct udev_list_entry *sysattr;
 
         udev_list_entry_foreach(sysattr, udev_device_get_sysattr_list_entry(device)) {
@@ -84,8 +82,7 @@ static void print_all_attributes(struct udev_device *device, const char *key)
         printf("\n");
 }
 
-static int print_device_chain(struct udev_device *device)
-{
+static int print_device_chain(struct udev_device *device) {
         struct udev_device *device_parent;
         const char *str;
 
@@ -130,8 +127,7 @@ static int print_device_chain(struct udev_device *device)
         return 0;
 }
 
-static void print_record(struct udev_device *device)
-{
+static void print_record(struct udev_device *device) {
         const char *str;
         int i;
         struct udev_list_entry *list_entry;
@@ -156,8 +152,7 @@ static void print_record(struct udev_device *device)
         printf("\n");
 }
 
-static int stat_device(const char *name, bool export, const char *prefix)
-{
+static int stat_device(const char *name, bool export, const char *prefix) {
         struct stat statbuf;
 
         if (stat(name, &statbuf) != 0)
@@ -175,8 +170,7 @@ static int stat_device(const char *name, bool export, const char *prefix)
         return 0;
 }
 
-static int export_devices(struct udev *udev)
-{
+static int export_devices(struct udev *udev) {
         struct udev_enumerate *udev_enumerate;
         struct udev_list_entry *list_entry;
 
@@ -197,8 +191,7 @@ static int export_devices(struct udev *udev)
         return 0;
 }
 
-static void cleanup_dir(DIR *dir, mode_t mask, int depth)
-{
+static void cleanup_dir(DIR *dir, mode_t mask, int depth) {
         struct dirent *dent;
 
         if (depth <= 0)
@@ -228,8 +221,7 @@ static void cleanup_dir(DIR *dir, mode_t mask, int depth)
         }
 }
 
-static void cleanup_db(struct udev *udev)
-{
+static void cleanup_db(struct udev *udev) {
         DIR *dir;
 
         unlink("/run/udev/queue.bin");
@@ -265,8 +257,7 @@ static void cleanup_db(struct udev *udev)
         }
 }
 
-static struct udev_device *find_device(struct udev *udev, const char *id, const char *prefix)
-{
+static struct udev_device *find_device(struct udev *udev, const char *id, const char *prefix) {
         char name[UTIL_PATH_SIZE];
 
         if (prefix && !startswith(id, prefix)) {
@@ -295,8 +286,7 @@ static struct udev_device *find_device(struct udev *udev, const char *id, const
                 return NULL;
 }
 
-static int uinfo(struct udev *udev, int argc, char *argv[])
-{
+static int uinfo(struct udev *udev, int argc, char *argv[]) {
         _cleanup_udev_device_unref_ struct udev_device *device = NULL;
         bool root = 0;
         bool export = 0;
index a54aa82c73fd614c2e668bea492a3fed6acbf1b7..e776fb99dcfb14bc061fad69e4e1757bbf32d96d 100644 (file)
 
 static bool udev_exit;
 
-static void sig_handler(int signum)
-{
+static void sig_handler(int signum) {
         if (signum == SIGINT || signum == SIGTERM)
                 udev_exit = true;
 }
 
-static void print_device(struct udev_device *device, const char *source, int prop)
-{
+static void print_device(struct udev_device *device, const char *source, int prop) {
         struct timespec ts;
 
         clock_gettime(CLOCK_MONOTONIC, &ts);
@@ -75,8 +73,7 @@ static void help(void) {
                "  -h,--help\n\n");
 }
 
-static int adm_monitor(struct udev *udev, int argc, char *argv[])
-{
+static int adm_monitor(struct udev *udev, int argc, char *argv[]) {
         struct sigaction act = {};
         sigset_t mask;
         bool prop = false;
index fa5b0c2d2ed8119b85e3719a923de6f8c407e01b..ddcf1ddf9ae370494246a3cfacaad45cc0799e0b 100644 (file)
@@ -25,7 +25,6 @@
 #include <errno.h>
 #include <dirent.h>
 #include <fcntl.h>
-#include <syslog.h>
 #include <getopt.h>
 #include <signal.h>
 #include <time.h>
@@ -44,8 +43,7 @@ static void help(void) {
                "  -h,--help\n\n");
 }
 
-static int adm_settle(struct udev *udev, int argc, char *argv[])
-{
+static int adm_settle(struct udev *udev, int argc, char *argv[]) {
         static const struct option options[] = {
                 { "seq-start",      required_argument, NULL, '\0' }, /* removed */
                 { "seq-end",        required_argument, NULL, '\0' }, /* removed */
index 80418783ffd7b7183bbe7dc6663d58c4a34e3d08..a300e1e9d7cde1490ee3d3cc58f78d4e672390eb 100644 (file)
@@ -23,7 +23,6 @@
 #include <errno.h>
 #include <dirent.h>
 #include <fcntl.h>
-#include <syslog.h>
 #include <getopt.h>
 #include <signal.h>
 #include <time.h>
 
 #include "udev.h"
 
-static void help(struct udev *udev)
-{
+static void help(struct udev *udev) {
         fprintf(stderr, "\n");
         fprintf(stderr, "Usage: udevadm builtin [--help] COMMAND SYSPATH\n");
         udev_builtin_list(udev);
         fprintf(stderr, "\n");
 }
 
-static int adm_builtin(struct udev *udev, int argc, char *argv[])
-{
+static int adm_builtin(struct udev *udev, int argc, char *argv[]) {
         static const struct option options[] = {
                 { "help", no_argument, NULL, 'h' },
                 {}
index 6a2f5489feb5a5e384e8ee76e1c896c5c2b87ef0..4738b611c39b43c27d31b4294d079b719f0c1a74 100644 (file)
 #include <ctype.h>
 #include <fcntl.h>
 #include <signal.h>
-#include <syslog.h>
 #include <getopt.h>
 #include <sys/signalfd.h>
 
 #include "udev.h"
 #include "udev-util.h"
 
-static int adm_test(struct udev *udev, int argc, char *argv[])
-{
+static int adm_test(struct udev *udev, int argc, char *argv[]) {
         int resolve_names = 1;
         char filename[UTIL_PATH_SIZE];
         const char *action = "add";
@@ -138,7 +136,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[])
                 goto out;
         }
 
-        udev_event_execute_rules(event, rules, &sigmask_orig);
+        udev_event_execute_rules(event, 60 * USEC_PER_SEC, 20 * USEC_PER_SEC, rules, &sigmask_orig);
 
         udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
                 printf("%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry));
index 0ee27bb40873d3569f5d3c8a195bf2fdb4139087..a52d1b5ad5072120cad792274d3448ef0d46cf29 100644 (file)
@@ -24,7 +24,6 @@
 #include <errno.h>
 #include <dirent.h>
 #include <fcntl.h>
-#include <syslog.h>
 #include <fnmatch.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -38,8 +37,7 @@
 static int verbose;
 static int dry_run;
 
-static void exec_list(struct udev_enumerate *udev_enumerate, const char *action)
-{
+static void exec_list(struct udev_enumerate *udev_enumerate, const char *action) {
         struct udev_list_entry *entry;
 
         udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(udev_enumerate)) {
@@ -60,8 +58,7 @@ static void exec_list(struct udev_enumerate *udev_enumerate, const char *action)
         }
 }
 
-static const char *keyval(const char *str, const char **val, char *buf, size_t size)
-{
+static const char *keyval(const char *str, const char **val, char *buf, size_t size) {
         char *pos;
 
         strscpy(buf, size,str);
@@ -93,8 +90,7 @@ static void help(void) {
                "  -h,--help\n\n");
 }
 
-static int adm_trigger(struct udev *udev, int argc, char *argv[])
-{
+static int adm_trigger(struct udev *udev, int argc, char *argv[]) {
         static const struct option options[] = {
                 { "verbose",           no_argument,       NULL, 'v' },
                 { "dry-run",           no_argument,       NULL, 'n' },
index dbca369011ebd5815fefce005ad70155f8af9112..7026c50d2b4fe746e6e07ea463db0969d452c9f8 100644 (file)
@@ -1,3 +1,4 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 /*
  * Copyright (C) 2007-2012 Kay Sievers <kay@vrfy.org>
  *
 
 void udev_main_log(struct udev *udev, int priority,
                    const char *file, int line, const char *fn,
-                   const char *format, va_list args)
-{
+                   const char *format, va_list args) {
         log_metav(priority, file, line, fn, format, args);
 }
 
-static int adm_version(struct udev *udev, int argc, char *argv[])
-{
+static int adm_version(struct udev *udev, int argc, char *argv[]) {
         printf("%s\n", VERSION);
         return 0;
 }
@@ -63,8 +62,7 @@ static const struct udevadm_cmd *udevadm_cmds[] = {
         &udevadm_help,
 };
 
-static int adm_help(struct udev *udev, int argc, char *argv[])
-{
+static int adm_help(struct udev *udev, int argc, char *argv[]) {
         unsigned int i;
 
         fprintf(stderr, "Usage: udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n");
@@ -75,16 +73,14 @@ static int adm_help(struct udev *udev, int argc, char *argv[])
         return 0;
 }
 
-static int run_command(struct udev *udev, const struct udevadm_cmd *cmd, int argc, char *argv[])
-{
+static int run_command(struct udev *udev, const struct udevadm_cmd *cmd, int argc, char *argv[]) {
         if (cmd->debug)
                 log_set_max_level(LOG_DEBUG);
         log_debug("calling: %s", cmd->name);
         return cmd->cmd(udev, argc, argv);
 }
 
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
         struct udev *udev;
         static const struct option options[] = {
                 { "debug", no_argument, NULL, 'd' },
@@ -94,7 +90,7 @@ int main(int argc, char *argv[])
         };
         const char *command;
         unsigned int i;
-        int rc = 1;
+        int rc = 1, c;
 
         udev = udev_new();
         if (udev == NULL)
@@ -103,34 +99,32 @@ int main(int argc, char *argv[])
         log_parse_environment();
         log_open();
         udev_set_log_fn(udev, udev_main_log);
-        label_init("/dev");
+        mac_selinux_init("/dev");
 
-        for (;;) {
-                int option;
+        while ((c = getopt_long(argc, argv, "+dhV", options, NULL)) >= 0)
+                switch (c) {
 
-                option = getopt_long(argc, argv, "+dhV", options, NULL);
-                if (option == -1)
-                        break;
-
-                switch (option) {
                 case 'd':
                         log_set_max_level(LOG_DEBUG);
                         udev_set_log_priority(udev, LOG_DEBUG);
                         break;
+
                 case 'h':
                         rc = adm_help(udev, argc, argv);
                         goto out;
+
                 case 'V':
                         rc = adm_version(udev, argc, argv);
                         goto out;
+
                 default:
                         goto out;
                 }
-        }
+
         command = argv[optind];
 
         if (command != NULL)
-                for (i = 0; i < ELEMENTSOF(udevadm_cmds); i++) {
+                for (i = 0; i < ELEMENTSOF(udevadm_cmds); i++)
                         if (streq(udevadm_cmds[i]->name, command)) {
                                 argc -= optind;
                                 argv += optind;
@@ -139,13 +133,11 @@ int main(int argc, char *argv[])
                                 rc = run_command(udev, udevadm_cmds[i], argc, argv);
                                 goto out;
                         }
-                }
 
-        fprintf(stderr, "missing or unknown command\n\n");
-        adm_help(udev, argc, argv);
+        fprintf(stderr, "%s: missing or unknown command\n", program_invocation_short_name);
         rc = 2;
 out:
-        label_finish();
+        mac_selinux_finish();
         udev_unref(udev);
         log_close();
         return rc;
index a45d3240c6661165b35b92b4f6bcab62e2a8dda8..2e6c71352f8776f03c717bdc8af9cb30f6bea679 100644 (file)
 
 #include "udev.h"
 #include "udev-util.h"
+#include "rtnl-util.h"
 #include "sd-daemon.h"
 #include "cgroup-util.h"
 #include "dev-setup.h"
 #include "fileio.h"
 
-static bool debug;
-
 void udev_main_log(struct udev *udev, int priority,
                    const char *file, int line, const char *fn,
-                   const char *format, va_list args)
-{
+                   const char *format, va_list args) {
         log_metav(priority, file, line, fn, format, args);
 }
 
@@ -72,8 +70,13 @@ static int fd_inotify = -1;
 static bool stop_exec_queue;
 static bool reload;
 static int children;
-static int children_max;
-static int exec_delay;
+static bool arg_debug = false;
+static int arg_daemonize = false;
+static int arg_resolve_names = 1;
+static int arg_children_max;
+static int arg_exec_delay;
+static usec_t arg_event_timeout_usec = 180 * USEC_PER_SEC;
+static usec_t arg_event_timeout_warn_usec = 180 * USEC_PER_SEC / 3;
 static sigset_t sigmask_orig;
 static UDEV_LIST(event_list);
 static UDEV_LIST(worker_list);
@@ -100,13 +103,9 @@ struct event {
         dev_t devnum;
         int ifindex;
         bool is_block;
-#ifdef HAVE_FIRMWARE
-        bool nodelay;
-#endif
 };
 
-static inline struct event *node_to_event(struct udev_list_node *node)
-{
+static inline struct event *node_to_event(struct udev_list_node *node) {
         return container_of(node, struct event, node);
 }
 
@@ -128,6 +127,7 @@ struct worker {
         enum worker_state state;
         struct event *event;
         usec_t event_start_usec;
+        bool event_warned;
 };
 
 /* passed from worker to main process */
@@ -136,34 +136,29 @@ struct worker_message {
         int exitcode;
 };
 
-static inline struct worker *node_to_worker(struct udev_list_node *node)
-{
+static inline struct worker *node_to_worker(struct udev_list_node *node) {
         return container_of(node, struct worker, node);
 }
 
-static void event_queue_delete(struct event *event)
-{
+static void event_queue_delete(struct event *event) {
         udev_list_node_remove(&event->node);
         udev_device_unref(event->dev);
         free(event);
 }
 
-static struct worker *worker_ref(struct worker *worker)
-{
+static struct worker *worker_ref(struct worker *worker) {
         worker->refcount++;
         return worker;
 }
 
-static void worker_cleanup(struct worker *worker)
-{
+static void worker_cleanup(struct worker *worker) {
         udev_list_node_remove(&worker->node);
         udev_monitor_unref(worker->monitor);
         children--;
         free(worker);
 }
 
-static void worker_unref(struct worker *worker)
-{
+static void worker_unref(struct worker *worker) {
         worker->refcount--;
         if (worker->refcount > 0)
                 return;
@@ -171,8 +166,7 @@ static void worker_unref(struct worker *worker)
         worker_cleanup(worker);
 }
 
-static void worker_list_cleanup(struct udev *udev)
-{
+static void worker_list_cleanup(struct udev *udev) {
         struct udev_list_node *loop, *tmp;
 
         udev_list_node_foreach_safe(loop, tmp, &worker_list) {
@@ -182,8 +176,7 @@ static void worker_list_cleanup(struct udev *udev)
         }
 }
 
-static void worker_new(struct event *event)
-{
+static void worker_new(struct event *event) {
         struct udev *udev = event->udev;
         struct worker *worker;
         struct udev_monitor *worker_monitor;
@@ -211,6 +204,7 @@ static void worker_new(struct event *event)
         case 0: {
                 struct udev_device *dev = NULL;
                 int fd_monitor;
+                _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
                 struct epoll_event ep_signal, ep_monitor;
                 sigset_t mask;
                 int rc = EXIT_SUCCESS;
@@ -281,30 +275,21 @@ static void worker_new(struct event *event)
                         /* needed for SIGCHLD/SIGTERM in spawn() */
                         udev_event->fd_signal = fd_signal;
 
-                        if (exec_delay > 0)
-                                udev_event->exec_delay = exec_delay;
+                        if (arg_exec_delay > 0)
+                                udev_event->exec_delay = arg_exec_delay;
 
                         /*
-                         * Take a "read lock" on the device node; this establishes
+                         * Take a shared lock on the device node; this establishes
                          * a concept of device "ownership" to serialize device
-                         * access. External processes holding a "write lock" will
+                         * access. External processes holding an exclusive lock will
                          * cause udev to skip the event handling; in the case udev
-                         * acquired the lock, the external process will block until
+                         * acquired the lock, the external process can block until
                          * udev has finished its event handling.
                          */
-
-                        /*
-                         * <kabi_> since we make check - device seems unused - we try
-                         *         ioctl to deactivate - and device is found to be opened
-                         * <kay> sure, you try to take a write lock
-                         * <kay> if you get it udev is out
-                         * <kay> if you can't get it, udev is busy
-                         * <kabi_> we cannot deactivate openned device  (as it is in-use)
-                         * <kay> maybe we should just exclude dm from that thing entirely
-                         * <kabi_> IMHO this sounds like a good plan for this moment
-                         */
-                        if (streq_ptr("block", udev_device_get_subsystem(dev)) &&
-                            !startswith(udev_device_get_sysname(dev), "dm-")) {
+                        if (!streq_ptr(udev_device_get_action(dev), "remove") &&
+                            streq_ptr("block", udev_device_get_subsystem(dev)) &&
+                            !startswith(udev_device_get_sysname(dev), "dm-") &&
+                            !startswith(udev_device_get_sysname(dev), "md")) {
                                 struct udev_device *d = dev;
 
                                 if (streq_ptr("partition", udev_device_get_devtype(d)))
@@ -321,10 +306,16 @@ static void worker_new(struct event *event)
                                 }
                         }
 
+                        /* needed for renaming netifs */
+                        udev_event->rtnl = rtnl;
+
                         /* apply rules, create node, symlinks */
-                        udev_event_execute_rules(udev_event, rules, &sigmask_orig);
+                        udev_event_execute_rules(udev_event, arg_event_timeout_usec, arg_event_timeout_warn_usec, rules, &sigmask_orig);
+
+                        udev_event_execute_run(udev_event, arg_event_timeout_usec, arg_event_timeout_warn_usec, &sigmask_orig);
 
-                        udev_event_execute_run(udev_event, &sigmask_orig);
+                        /* in case rtnl was initialized */
+                        rtnl = sd_rtnl_ref(udev_event->rtnl);
 
                         /* apply/restore inotify watch */
                         if (udev_event->inotify_watch) {
@@ -415,6 +406,7 @@ out:
                 worker->pid = pid;
                 worker->state = WORKER_RUNNING;
                 worker->event_start_usec = now(CLOCK_MONOTONIC);
+                worker->event_warned = false;
                 worker->event = event;
                 event->state = EVENT_RUNNING;
                 udev_list_node_append(&worker->node, &worker_list);
@@ -424,8 +416,7 @@ out:
         }
 }
 
-static void event_run(struct event *event)
-{
+static void event_run(struct event *event) {
         struct udev_list_node *loop;
 
         udev_list_node_foreach(loop, &worker_list) {
@@ -446,12 +437,13 @@ static void event_run(struct event *event)
                 worker->event = event;
                 worker->state = WORKER_RUNNING;
                 worker->event_start_usec = now(CLOCK_MONOTONIC);
+                worker->event_warned = false;
                 event->state = EVENT_RUNNING;
                 return;
         }
 
-        if (children >= children_max) {
-                if (children_max > 1)
+        if (children >= arg_children_max) {
+                if (arg_children_max > 1)
                         log_debug("maximum number (%i) of children reached", children);
                 return;
         }
@@ -460,8 +452,7 @@ static void event_run(struct event *event)
         worker_new(event);
 }
 
-static int event_queue_insert(struct udev_device *dev)
-{
+static int event_queue_insert(struct udev_device *dev) {
         struct event *event;
 
         event = new0(struct event, 1);
@@ -477,10 +468,6 @@ static int event_queue_insert(struct udev_device *dev)
         event->devnum = udev_device_get_devnum(dev);
         event->is_block = streq("block", udev_device_get_subsystem(dev));
         event->ifindex = udev_device_get_ifindex(dev);
-#ifdef HAVE_FIRMWARE
-        if (streq(udev_device_get_subsystem(dev), "firmware"))
-                event->nodelay = true;
-#endif
 
         log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
              udev_device_get_action(dev), udev_device_get_subsystem(dev));
@@ -490,8 +477,7 @@ static int event_queue_insert(struct udev_device *dev)
         return 0;
 }
 
-static void worker_kill(struct udev *udev)
-{
+static void worker_kill(struct udev *udev) {
         struct udev_list_node *loop;
 
         udev_list_node_foreach(loop, &worker_list) {
@@ -506,8 +492,7 @@ static void worker_kill(struct udev *udev)
 }
 
 /* lookup event for identical, parent, child device */
-static bool is_devpath_busy(struct event *event)
-{
+static bool is_devpath_busy(struct event *event) {
         struct udev_list_node *loop;
         size_t common;
 
@@ -559,12 +544,6 @@ static bool is_devpath_busy(struct event *event)
                         return true;
                 }
 
-#ifdef HAVE_FIRMWARE
-                /* allow to bypass the dependency tracking */
-                if (event->nodelay)
-                        continue;
-#endif
-
                 /* parent device event found */
                 if (event->devpath[common] == '/') {
                         event->delaying_seqnum = loop_event->seqnum;
@@ -584,8 +563,7 @@ static bool is_devpath_busy(struct event *event)
         return false;
 }
 
-static void event_queue_start(struct udev *udev)
-{
+static void event_queue_start(struct udev *udev) {
         struct udev_list_node *loop;
 
         udev_list_node_foreach(loop, &event_list) {
@@ -602,8 +580,7 @@ static void event_queue_start(struct udev *udev)
         }
 }
 
-static void event_queue_cleanup(struct udev *udev, enum event_state match_type)
-{
+static void event_queue_cleanup(struct udev *udev, enum event_state match_type) {
         struct udev_list_node *loop, *tmp;
 
         udev_list_node_foreach_safe(loop, tmp, &event_list) {
@@ -616,8 +593,7 @@ static void event_queue_cleanup(struct udev *udev, enum event_state match_type)
         }
 }
 
-static void worker_returned(int fd_worker)
-{
+static void worker_returned(int fd_worker) {
         for (;;) {
                 struct worker_message msg;
                 ssize_t size;
@@ -649,8 +625,7 @@ static void worker_returned(int fd_worker)
 }
 
 /* receive the udevd message from userspace */
-static struct udev_ctrl_connection *handle_ctrl_msg(struct udev_ctrl *uctrl)
-{
+static struct udev_ctrl_connection *handle_ctrl_msg(struct udev_ctrl *uctrl) {
         struct udev *udev = udev_ctrl_get_udev(uctrl);
         struct udev_ctrl_connection *ctrl_conn;
         struct udev_ctrl_msg *ctrl_msg = NULL;
@@ -718,7 +693,7 @@ static struct udev_ctrl_connection *handle_ctrl_msg(struct udev_ctrl *uctrl)
         i = udev_ctrl_get_set_children_max(ctrl_msg);
         if (i >= 0) {
                 log_debug("udevd message (SET_MAX_CHILDREN) received, children_max=%i", i);
-                children_max = i;
+                arg_children_max = i;
         }
 
         if (udev_ctrl_get_ping(ctrl_msg) > 0)
@@ -839,8 +814,7 @@ static int synthesize_change(struct udev_device *dev) {
         return 0;
 }
 
-static int handle_inotify(struct udev *udev)
-{
+static int handle_inotify(struct udev *udev) {
         int nbytes, pos;
         char *buf;
         struct inotify_event *ev;
@@ -879,8 +853,7 @@ static int handle_inotify(struct udev *udev)
         return 0;
 }
 
-static void handle_signal(struct udev *udev, int signo)
-{
+static void handle_signal(struct udev *udev, int signo) {
         switch (signo) {
         case SIGINT:
         case SIGTERM:
@@ -940,8 +913,7 @@ static void handle_signal(struct udev *udev, int signo)
         }
 }
 
-static int systemd_fds(struct udev *udev, int *rctrl, int *rnetlink)
-{
+static int systemd_fds(struct udev *udev, int *rctrl, int *rnetlink) {
         int ctrl = -1, netlink = -1;
         int fd, n;
 
@@ -982,10 +954,9 @@ static int systemd_fds(struct udev *udev, int *rctrl, int *rnetlink)
  *   udev.children-max=<number of workers>  events are fully serialized if set to 1
  *   udev.exec-delay=<number of seconds>    delay execution of every executed program
  */
-static void kernel_cmdline_options(struct udev *udev)
-{
+static void kernel_cmdline_options(struct udev *udev) {
         _cleanup_free_ char *line = NULL;
-        char *w, *state;
+        const char *word, *state;
         size_t l;
         int r;
 
@@ -995,10 +966,10 @@ static void kernel_cmdline_options(struct udev *udev)
         if (r <= 0)
                 return;
 
-        FOREACH_WORD_QUOTED(w, l, line, state) {
+        FOREACH_WORD_QUOTED(word, l, line, state) {
                 char *s, *opt;
 
-                s = strndup(w, l);
+                s = strndup(word, l);
                 if (!s)
                         break;
 
@@ -1015,124 +986,184 @@ static void kernel_cmdline_options(struct udev *udev)
                         log_set_max_level(prio);
                         udev_set_log_priority(udev, prio);
                 } else if (startswith(opt, "udev.children-max=")) {
-                        children_max = strtoul(opt + 18, NULL, 0);
+                        r = safe_atoi(opt + 18, &arg_children_max);
+                        if (r < 0)
+                                log_warning("Invalid udev.children-max ignored: %s", opt + 18);
                 } else if (startswith(opt, "udev.exec-delay=")) {
-                        exec_delay = strtoul(opt + 16, NULL, 0);
+                        r = safe_atoi(opt + 16, &arg_exec_delay);
+                        if (r < 0)
+                                log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
+                } else if (startswith(opt, "udev.event-timeout=")) {
+                        r = safe_atou64(opt + 16, &arg_event_timeout_usec);
+                        if (r < 0) {
+                                log_warning("Invalid udev.event-timeout ignored: %s", opt + 16);
+                                break;
+                        }
+                        arg_event_timeout_usec *= USEC_PER_SEC;
+                        arg_event_timeout_warn_usec = (arg_event_timeout_usec / 3) ? : 1;
                 }
 
                 free(s);
         }
 }
 
-int main(int argc, char *argv[])
-{
-        struct udev *udev;
-        sigset_t mask;
-        int daemonize = false;
-        int resolve_names = 1;
+static void help(void) {
+        printf("%s [OPTIONS...]\n\n"
+               "Manages devices.\n\n"
+               "  --daemon\n"
+               "  --debug\n"
+               "  --children-max=<maximum number of workers>\n"
+               "  --exec-delay=<seconds to wait before executing RUN=>\n"
+               "  --event-timeout=<seconds to wait before terminating an event>\n"
+               "  --resolve-names=early|late|never\n"
+               "  --version\n"
+               "  --help\n"
+               , program_invocation_short_name);
+}
+
+static int parse_argv(int argc, char *argv[]) {
         static const struct option options[] = {
-                { "daemon", no_argument, NULL, 'd' },
-                { "debug", no_argument, NULL, 'D' },
-                { "children-max", required_argument, NULL, 'c' },
-                { "exec-delay", required_argument, NULL, 'e' },
-                { "resolve-names", required_argument, NULL, 'N' },
-                { "help", no_argument, NULL, 'h' },
-                { "version", no_argument, NULL, 'V' },
+                { "daemon",             no_argument,            NULL, 'd' },
+                { "debug",              no_argument,            NULL, 'D' },
+                { "children-max",       required_argument,      NULL, 'c' },
+                { "exec-delay",         required_argument,      NULL, 'e' },
+                { "event-timeout",      required_argument,      NULL, 't' },
+                { "resolve-names",      required_argument,      NULL, 'N' },
+                { "help",               no_argument,            NULL, 'h' },
+                { "version",            no_argument,            NULL, 'V' },
                 {}
         };
-        int fd_ctrl = -1;
-        int fd_netlink = -1;
-        int fd_worker = -1;
-        struct epoll_event ep_ctrl, ep_inotify, ep_signal, ep_netlink, ep_worker;
-        struct udev_ctrl_connection *ctrl_conn = NULL;
-        int rc = 1;
 
-        udev = udev_new();
-        if (udev == NULL)
-                goto exit;
+        int c;
 
-        log_set_target(LOG_TARGET_AUTO);
-        log_parse_environment();
-        log_open();
+        assert(argc >= 0);
+        assert(argv);
 
-        udev_set_log_fn(udev, udev_main_log);
-        log_set_max_level(udev_get_log_priority(udev));
+        while ((c = getopt_long(argc, argv, "c:de:DtN:hV", options, NULL)) >= 0) {
+                int r;
 
-        log_debug("version %s", VERSION);
-        label_init("/dev");
-
-        for (;;) {
-                int option;
+                switch (c) {
 
-                option = getopt_long(argc, argv, "c:de:DtN:hV", options, NULL);
-                if (option == -1)
-                        break;
-
-                switch (option) {
                 case 'd':
-                        daemonize = true;
+                        arg_daemonize = true;
                         break;
                 case 'c':
-                        children_max = strtoul(optarg, NULL, 0);
+                        r = safe_atoi(optarg, &arg_children_max);
+                        if (r < 0)
+                                log_warning("Invalid --children-max ignored: %s", optarg);
                         break;
                 case 'e':
-                        exec_delay = strtoul(optarg, NULL, 0);
+                        r = safe_atoi(optarg, &arg_exec_delay);
+                        if (r < 0)
+                                log_warning("Invalid --exec-delay ignored: %s", optarg);
+                        break;
+                case 't':
+                        r = safe_atou64(optarg, &arg_event_timeout_usec);
+                        if (r < 0)
+                                log_warning("Invalid --event-timeout ignored: %s", optarg);
+                        else {
+                                arg_event_timeout_usec *= USEC_PER_SEC;
+                                arg_event_timeout_warn_usec = (arg_event_timeout_usec / 3) ? : 1;
+                        }
                         break;
                 case 'D':
-                        debug = true;
-                        log_set_max_level(LOG_DEBUG);
-                        udev_set_log_priority(udev, LOG_DEBUG);
+                        arg_debug = true;
                         break;
                 case 'N':
                         if (streq(optarg, "early")) {
-                                resolve_names = 1;
+                                arg_resolve_names = 1;
                         } else if (streq(optarg, "late")) {
-                                resolve_names = 0;
+                                arg_resolve_names = 0;
                         } else if (streq(optarg, "never")) {
-                                resolve_names = -1;
+                                arg_resolve_names = -1;
                         } else {
-                                fprintf(stderr, "resolve-names must be early, late or never\n");
                                 log_error("resolve-names must be early, late or never");
-                                goto exit;
+                                return 0;
                         }
                         break;
                 case 'h':
-                        printf("Usage: udevd OPTIONS\n"
-                               "  --daemon\n"
-                               "  --debug\n"
-                               "  --children-max=<maximum number of workers>\n"
-                               "  --exec-delay=<seconds to wait before executing RUN=>\n"
-                               "  --resolve-names=early|late|never\n"
-                               "  --version\n"
-                               "  --help\n"
-                               "\n");
-                        goto exit;
+                        help();
+                        return 0;
                 case 'V':
                         printf("%s\n", VERSION);
-                        goto exit;
+                        return 0;
+                case '?':
+                        return -EINVAL;
                 default:
-                        goto exit;
+                        assert_not_reached("Unhandled option");
+
                 }
         }
 
+        return 1;
+}
+
+int main(int argc, char *argv[]) {
+        struct udev *udev;
+        sigset_t mask;
+        int fd_ctrl = -1;
+        int fd_netlink = -1;
+        int fd_worker = -1;
+        struct epoll_event ep_ctrl = { .events = EPOLLIN };
+        struct epoll_event ep_inotify = { .events = EPOLLIN };
+        struct epoll_event ep_signal = { .events = EPOLLIN };
+        struct epoll_event ep_netlink = { .events = EPOLLIN };
+        struct epoll_event ep_worker = { .events = EPOLLIN };
+        struct udev_ctrl_connection *ctrl_conn = NULL;
+        int rc = 1, r;
+
+        udev = udev_new();
+        if (udev == NULL)
+                goto exit;
+
+        log_set_target(LOG_TARGET_AUTO);
+        log_parse_environment();
+        log_open();
+
+        udev_set_log_fn(udev, udev_main_log);
+        log_set_max_level(udev_get_log_priority(udev));
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                goto exit;
+
         kernel_cmdline_options(udev);
 
+        if (arg_debug) {
+                log_set_max_level(LOG_DEBUG);
+                udev_set_log_priority(udev, LOG_DEBUG);
+        }
+
         if (getuid() != 0) {
-                fprintf(stderr, "root privileges required\n");
                 log_error("root privileges required");
                 goto exit;
         }
 
+        r = mac_selinux_init("/dev");
+        if (r < 0) {
+                log_error("could not initialize labelling: %s", strerror(-r));
+                goto exit;
+        }
+
         /* set umask before creating any file/directory */
-        chdir("/");
+        r = chdir("/");
+        if (r < 0) {
+                log_error("could not change dir to /: %m");
+                goto exit;
+        }
+
         umask(022);
 
-        mkdir("/run/udev", 0755);
+        r = mkdir("/run/udev", 0755);
+        if (r < 0 && errno != EEXIST) {
+                log_error("could not create /run/udev: %m");
+                goto exit;
+        }
 
         dev_setup(NULL);
 
         /* before opening new files, make sure std{in,out,err} fds are in a sane state */
-        if (daemonize) {
+        if (arg_daemonize) {
                 int fd;
 
                 fd = open("/dev/null", O_RDWR);
@@ -1144,7 +1175,6 @@ int main(int argc, char *argv[])
                         if (fd > STDERR_FILENO)
                                 close(fd);
                 } else {
-                        fprintf(stderr, "cannot open /dev/null\n");
                         log_error("cannot open /dev/null");
                 }
         }
@@ -1172,7 +1202,6 @@ int main(int argc, char *argv[])
                 /* open control and netlink socket */
                 udev_ctrl = udev_ctrl_new(udev);
                 if (udev_ctrl == NULL) {
-                        fprintf(stderr, "error initializing udev control socket");
                         log_error("error initializing udev control socket");
                         rc = 1;
                         goto exit;
@@ -1181,7 +1210,6 @@ int main(int argc, char *argv[])
 
                 monitor = udev_monitor_new_from_netlink(udev, "kernel");
                 if (monitor == NULL) {
-                        fprintf(stderr, "error initializing netlink socket\n");
                         log_error("error initializing netlink socket");
                         rc = 3;
                         goto exit;
@@ -1190,14 +1218,12 @@ int main(int argc, char *argv[])
         }
 
         if (udev_monitor_enable_receiving(monitor) < 0) {
-                fprintf(stderr, "error binding netlink socket\n");
                 log_error("error binding netlink socket");
                 rc = 3;
                 goto exit;
         }
 
         if (udev_ctrl_enable_receiving(udev_ctrl) < 0) {
-                fprintf(stderr, "error binding udev control socket\n");
                 log_error("error binding udev control socket");
                 rc = 1;
                 goto exit;
@@ -1205,7 +1231,21 @@ int main(int argc, char *argv[])
 
         udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024);
 
-        if (daemonize) {
+        log_info("starting version " VERSION "\n");
+
+        udev_builtin_init(udev);
+
+        rules = udev_rules_new(udev, arg_resolve_names);
+        if (rules == NULL) {
+                log_error("error reading rules");
+                goto exit;
+        }
+
+        rc = udev_rules_apply_static_dev_perms(rules);
+        if (rc < 0)
+                log_error("failed to apply permissions on static device nodes - %s", strerror(-rc));
+
+        if (arg_daemonize) {
                 pid_t pid;
 
                 pid = fork();
@@ -1228,23 +1268,22 @@ int main(int argc, char *argv[])
                 sd_notify(1, "READY=1");
         }
 
-        print_kmsg("starting version " VERSION "\n");
+        if (arg_children_max <= 0) {
+                cpu_set_t cpu_set;
 
-        if (!debug) {
-                int fd;
+                arg_children_max = 8;
 
-                fd = open("/dev/null", O_RDWR);
-                if (fd >= 0) {
-                        dup2(fd, STDIN_FILENO);
-                        dup2(fd, STDOUT_FILENO);
-                        dup2(fd, STDERR_FILENO);
-                        close(fd);
+                if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
+                        arg_children_max +=  CPU_COUNT(&cpu_set) * 2;
                 }
         }
+        log_debug("set children_max to %u", arg_children_max);
+
+        udev_list_node_init(&event_list);
+        udev_list_node_init(&worker_list);
 
         fd_inotify = udev_watch_init(udev);
         if (fd_inotify < 0) {
-                fprintf(stderr, "error initializing inotify\n");
                 log_error("error initializing inotify");
                 rc = 4;
                 goto exit;
@@ -1256,7 +1295,6 @@ int main(int argc, char *argv[])
         sigprocmask(SIG_SETMASK, &mask, &sigmask_orig);
         fd_signal = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
         if (fd_signal < 0) {
-                fprintf(stderr, "error creating signalfd\n");
                 log_error("error creating signalfd");
                 rc = 5;
                 goto exit;
@@ -1264,39 +1302,16 @@ int main(int argc, char *argv[])
 
         /* unnamed socket from workers to the main daemon */
         if (socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, worker_watch) < 0) {
-                fprintf(stderr, "error creating socketpair\n");
                 log_error("error creating socketpair");
                 rc = 6;
                 goto exit;
         }
         fd_worker = worker_watch[READ_END];
 
-        udev_builtin_init(udev);
-
-        rules = udev_rules_new(udev, resolve_names);
-        if (rules == NULL) {
-                log_error("error reading rules");
-                goto exit;
-        }
-
-        memzero(&ep_ctrl, sizeof(struct epoll_event));
-        ep_ctrl.events = EPOLLIN;
         ep_ctrl.data.fd = fd_ctrl;
-
-        memzero(&ep_inotify, sizeof(struct epoll_event));
-        ep_inotify.events = EPOLLIN;
         ep_inotify.data.fd = fd_inotify;
-
-        memzero(&ep_signal, sizeof(struct epoll_event));
-        ep_signal.events = EPOLLIN;
         ep_signal.data.fd = fd_signal;
-
-        memzero(&ep_netlink, sizeof(struct epoll_event));
-        ep_netlink.events = EPOLLIN;
         ep_netlink.data.fd = fd_netlink;
-
-        memzero(&ep_worker, sizeof(struct epoll_event));
-        ep_worker.events = EPOLLIN;
         ep_worker.data.fd = fd_worker;
 
         fd_ep = epoll_create1(EPOLL_CLOEXEC);
@@ -1313,24 +1328,6 @@ int main(int argc, char *argv[])
                 goto exit;
         }
 
-        if (children_max <= 0) {
-                cpu_set_t cpu_set;
-
-                children_max = 8;
-
-                if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
-                        children_max +=  CPU_COUNT(&cpu_set) * 2;
-                }
-        }
-        log_debug("set children_max to %u", children_max);
-
-        rc = udev_rules_apply_static_dev_perms(rules);
-        if (rc < 0)
-                log_error("failed to apply permissions on static device nodes - %s", strerror(-rc));
-
-        udev_list_node_init(&event_list);
-        udev_list_node_init(&worker_list);
-
         for (;;) {
                 static usec_t last_usec;
                 struct epoll_event ev[8];
@@ -1411,23 +1408,28 @@ int main(int argc, char *argv[])
                         /* check for hanging events */
                         udev_list_node_foreach(loop, &worker_list) {
                                 struct worker *worker = node_to_worker(loop);
+                                usec_t ts;
 
                                 if (worker->state != WORKER_RUNNING)
                                         continue;
 
-                                if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * USEC_PER_SEC) {
-                                        log_error("worker [%u] %s timeout; kill it", worker->pid,
-                                            worker->event ? worker->event->devpath : "<idle>");
-                                        kill(worker->pid, SIGKILL);
-                                        worker->state = WORKER_KILLED;
+                                ts = now(CLOCK_MONOTONIC);
 
-                                        /* drop reference taken for state 'running' */
-                                        worker_unref(worker);
-                                        if (worker->event) {
+                                if ((ts - worker->event_start_usec) > arg_event_timeout_warn_usec) {
+                                        if ((ts - worker->event_start_usec) > arg_event_timeout_usec) {
+                                                log_error("worker [%u] %s timeout; kill it", worker->pid, worker->event->devpath);
+                                                kill(worker->pid, SIGKILL);
+                                                worker->state = WORKER_KILLED;
+
+                                                /* drop reference taken for state 'running' */
+                                                worker_unref(worker);
                                                 log_error("seq %llu '%s' killed", udev_device_get_seqnum(worker->event->dev), worker->event->devpath);
                                                 worker->event->exitcode = -64;
                                                 event_queue_delete(worker->event);
                                                 worker->event = NULL;
+                                        } else if (!worker->event_warned) {
+                                                log_warning("worker [%u] %s is taking a long time", worker->pid, worker->event->devpath);
+                                                worker->event_warned = true;
                                         }
                                 }
                         }
@@ -1485,7 +1487,7 @@ int main(int argc, char *argv[])
                 if (!udev_list_node_is_empty(&event_list) && !udev_exit && !stop_exec_queue) {
                         udev_builtin_init(udev);
                         if (rules == NULL)
-                                rules = udev_rules_new(udev, resolve_names);
+                                rules = udev_rules_new(udev, arg_resolve_names);
                         if (rules != NULL)
                                 event_queue_start(udev);
                 }
@@ -1540,7 +1542,7 @@ exit_daemonize:
         udev_monitor_unref(monitor);
         udev_ctrl_connection_unref(ctrl_conn);
         udev_ctrl_unref(udev_ctrl);
-        label_finish();
+        mac_selinux_finish();
         udev_unref(udev);
         log_close();
         return rc;
index 10ba85ca924ca97ec3673dc84332ee87ddaaa07b..1437c30d146cbd8b17078acd7f23155dac4ff9e1 100644 (file)
 ***/
 
 #include "util.h"
+#include "label.h"
+
+#define MESSAGE                                                         \
+        "This file was created by systemd-update-done. Its only \n"     \
+        "purpose is to hold a timestamp of the time this directory\n"   \
+        "was updated. See systemd-update-done.service(8).\n"
 
 static int apply_timestamp(const char *path, struct timespec *ts) {
         struct timespec twice[2];
@@ -51,10 +57,20 @@ static int apply_timestamp(const char *path, struct timespec *ts) {
 
         } else if (errno == ENOENT) {
                 _cleanup_close_ int fd = -1;
+                int r;
 
                 /* The timestamp file doesn't exist yet? Then let's create it. */
 
+                r = mac_selinux_create_file_prepare(path, S_IFREG);
+                if (r < 0) {
+                        log_error("Failed to set SELinux context for %s: %s",
+                                  path, strerror(-r));
+                        return r;
+                }
+
                 fd = open(path, O_CREAT|O_EXCL|O_WRONLY|O_TRUNC|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0644);
+                mac_selinux_create_file_clear();
+
                 if (fd < 0) {
 
                         if (errno == EROFS) {
@@ -66,6 +82,8 @@ static int apply_timestamp(const char *path, struct timespec *ts) {
                         return -errno;
                 }
 
+                (void) loop_write(fd, MESSAGE, strlen(MESSAGE), false);
+
                 twice[0] = *ts;
                 twice[1] = *ts;
 
@@ -83,7 +101,7 @@ static int apply_timestamp(const char *path, struct timespec *ts) {
 
 int main(int argc, char *argv[]) {
         struct stat st;
-        int r, q;
+        int r, q = 0;
 
         log_set_target(LOG_TARGET_AUTO);
         log_parse_environment();
@@ -94,11 +112,15 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        r = apply_timestamp("/etc/.updated", &st.st_mtim);
+        r = mac_selinux_init(NULL);
+        if (r < 0) {
+                log_error("SELinux setup failed: %s", strerror(-r));
+                goto finish;
+        }
 
+        r = apply_timestamp("/etc/.updated", &st.st_mtim);
         q = apply_timestamp("/var/.updated", &st.st_mtim);
-        if (q < 0 && r == 0)
-                r = q;
 
-        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+finish:
+        return r < 0 || q < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
index e0c40506112d7aba92bfd8a913c28177aedd0057..0db97f88bc159919544d5927317699593edb4060 100644 (file)
@@ -212,15 +212,15 @@ static void font_copy_to_all_vcs(int fd) {
                 /* copy font from active VT, where the font was uploaded to */
                 cfo.op = KD_FONT_OP_COPY;
                 cfo.height = vcs.v_active-1; /* tty1 == index 0 */
-                ioctl(vcfd, KDFONTOP, &cfo);
+                (void) ioctl(vcfd, KDFONTOP, &cfo);
 
                 /* copy map of 8bit chars */
                 if (ioctl(fd, GIO_SCRNMAP, map8) >= 0)
-                    ioctl(vcfd, PIO_SCRNMAP, map8);
+                    (void) ioctl(vcfd, PIO_SCRNMAP, map8);
 
                 /* copy map of 8bit chars -> 16bit Unicode values */
                 if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0)
-                    ioctl(vcfd, PIO_UNISCRNMAP, map16);
+                    (void) ioctl(vcfd, PIO_UNISCRNMAP, map16);
 
                 /* copy unicode translation table */
                 /* unimapd is a ushort count and a pointer to an
@@ -230,20 +230,18 @@ static void font_copy_to_all_vcs(int fd) {
                 if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) {
                         struct unimapinit adv = { 0, 0, 0 };
 
-                        ioctl(vcfd, PIO_UNIMAPCLR, &adv);
-                        ioctl(vcfd, PIO_UNIMAP, &unimapd);
+                        (void) ioctl(vcfd, PIO_UNIMAPCLR, &adv);
+                        (void) ioctl(vcfd, PIO_UNIMAP, &unimapd);
                 }
         }
 }
 
 int main(int argc, char **argv) {
         const char *vc;
-        char *vc_keymap = NULL;
-        char *vc_keymap_toggle = NULL;
-        char *vc_font = NULL;
-        char *vc_font_map = NULL;
-        char *vc_font_unimap = NULL;
-        int fd = -1;
+        _cleanup_free_ char
+                *vc_keymap = NULL, *vc_keymap_toggle = NULL,
+                *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL;
+        _cleanup_close_ int fd = -1;
         bool utf8;
         pid_t font_pid = 0, keymap_pid = 0;
         bool font_copy = false;
@@ -265,12 +263,12 @@ int main(int argc, char **argv) {
         fd = open_terminal(vc, O_RDWR|O_CLOEXEC);
         if (fd < 0) {
                 log_error("Failed to open %s: %m", vc);
-                goto finish;
+                return EXIT_FAILURE;
         }
 
         if (!is_vconsole(fd)) {
                 log_error("Device %s is not a virtual console.", vc);
-                goto finish;
+                return EXIT_FAILURE;
         }
 
         utf8 = is_locale_utf8();
@@ -305,27 +303,27 @@ int main(int argc, char **argv) {
         else
                 disable_utf8(fd);
 
-        r = EXIT_FAILURE;
-        if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 &&
-            font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0)
-                r = EXIT_SUCCESS;
-
-finish:
-        if (keymap_pid > 0)
-                wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
+        r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid);
+        if (r < 0) {
+                log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
+                return EXIT_FAILURE;
+        }
 
-        if (font_pid > 0) {
+        if (font_pid > 0)
                 wait_for_terminate_and_warn(KBD_SETFONT, font_pid);
-                if (font_copy)
-                        font_copy_to_all_vcs(fd);
+
+        r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
+        if (r < 0) {
+                log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
+                return EXIT_FAILURE;
         }
 
-        free(vc_keymap);
-        free(vc_font);
-        free(vc_font_map);
-        free(vc_font_unimap);
+        if (keymap_pid > 0)
+                wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
 
-        safe_close(fd);
+        /* Only copy the font when we started setfont successfully */
+        if (font_copy && font_pid > 0)
+                font_copy_to_all_vcs(fd);
 
-        return r;
+        return EXIT_SUCCESS;
 }
index d5795a37d51ce128bed35dfa37106e65787fd189..d5f600ef4570afdcc1a79a8827cf3a5149e1bd7d 100644 (file)
@@ -5,6 +5,8 @@
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 
-# See sysctl.d(5) and core(5) for for details.
+# See sysctl.d(5) for the description of the files in this directory,
+# and systemd-coredump(8) and core(5) for the explanation of the
+# setting below.
 
 kernel.core_pattern=|@rootlibexecdir@/systemd-coredump %p %u %g %s %t %e
index 46bae210c76de85821e73fb2ac3563d210d0bcb3..f18923399bc4c75a77a97a85a7f390dc7a7595f6 100644 (file)
@@ -15,9 +15,18 @@ kernel.core_uses_pid = 1
 
 # Source route verification
 net.ipv4.conf.default.rp_filter = 1
+net.ipv4.conf.all.rp_filter = 1
 
 # Do not accept source routing
 net.ipv4.conf.default.accept_source_route = 0
+net.ipv4.conf.all.accept_source_route = 0
+
+# Promote secondary addresses when the primary address is removed
+net.ipv4.conf.default.promote_secondaries = 1
+net.ipv4.conf.all.promote_secondaries = 1
+
+# Fair Queue CoDel packet scheduler to fight bufferbloat
+net.core.default_qdisc = fq_codel
 
 # Enable hard and soft link protection
 fs.protected_hardlinks = 1
index e4a9e17cb70848b01bed630dde3d682574a0cd36..ada9dbbf4fdcfcfb4124ec53a8cc55a8c3c6f5a8 100644 (file)
@@ -10,7 +10,6 @@
 
 enable remote-fs.target
 enable getty@.service
-enable systemd-readahead-*
 enable systemd-timesyncd.service
 enable systemd-networkd.service
 enable systemd-resolved.service
index d463ce5bc265f3d6fecf2e20154757d69291993b..823d6cb200118a10c795fd14496fd429c52a8995 100644 (file)
@@ -6,32 +6,32 @@
 #  (at your option) any later version.
 
 # The superuser
-u root                          0               "Super User"
+u root    0     "Super User" /root
 
 # The nobody user for NFS file systems
-u nobody                        65534           "Nobody"
+u nobody  65534 "Nobody"     -
 
 # Administrator group: can *see* more than normal users
-g adm                           -               -
+g adm     -     -            -
 
 # Administrator group: can *do* more than normal users
-g wheel                         -               -
+g wheel   -     -            -
 
 # Access to certain kernel and userspace facilities
-g kmem                          -               -
-g lock                          -               -
-g tty                           @TTY_GID@               -
-g utmp                          -               -
+g kmem    -     -            -
+g lock    -     -            -
+g tty     @TTY_GID@     -            -
+g utmp    -     -            -
 
 # Hardware access groups
-g audio                         -               -
-g cdrom                         -               -
-g dialout                       -               -
-g disk                          -               -
-g input                         -               -
-g lp                            -               -
-g tape                          -               -
-g video                         -               -
+g audio   -     -            -
+g cdrom   -     -            -
+g dialout -     -            -
+g disk    -     -            -
+g input   -     -            -
+g lp      -     -            -
+g tape    -     -            -
+g video   -     -            -
 
 # Default group for normal users
-g users                         -               -
+g users   -     -            -
diff --git a/sysusers.d/systemd-remote.conf b/sysusers.d/systemd-remote.conf
new file mode 100644 (file)
index 0000000..15969e9
--- /dev/null
@@ -0,0 +1,10 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+u systemd-journal-gateway - "systemd Journal Gateway"
+u systemd-journal-remote  - "systemd Journal Remote"
+u systemd-journal-upload  - "systemd Journal Upload"
index 139f010f5a1b00312004d914f08ee830202b1eae..95437b8544982cd68e48d655f445dd97f952d27b 100644 (file)
@@ -5,9 +5,8 @@
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 
-g systemd-journal               -               -
-u systemd-journal-gateway       -               "systemd Journal Gateway"
-u systemd-bus-proxy             -               "systemd Bus Proxy"
-u systemd-network               -               "systemd Network Management"
-u systemd-resolve               -               "systemd Resolver"
-u systemd-timesync              -               "systemd Time Synchronization"
+g systemd-journal   - -
+u systemd-bus-proxy - "systemd Bus Proxy"
+u systemd-network   - "systemd Network Management"
+u systemd-resolve   - "systemd Resolver"
+u systemd-timesync  - "systemd Time Synchronization"
index 0c0c087c5833cdd782fe90f097b1d803808fea0c..9609177df66a8004aac5e84d6b281789f35cfb51 100644 (file)
@@ -5,6 +5,7 @@
 #include "sd-bus.h"
 #include "sd-utf8.h"
 #include "sd-resolve.h"
+#include "sd-path.h"
 void* functions[] = {
 sd_journal_print,
 sd_journal_printv,
@@ -122,6 +123,8 @@ sd_peer_get_slice,
 sd_uid_get_display,
 sd_pid_notify,
 sd_pid_notifyf,
+sd_machine_get_ifindices,
+sd_session_get_desktop,
 sd_bus_default,
 sd_bus_default_user,
 sd_bus_default_system,
@@ -151,7 +154,7 @@ sd_bus_unref,
 sd_bus_is_open,
 sd_bus_can_send,
 sd_bus_get_server_id,
-sd_bus_get_peer_creds,
+sd_bus_get_owner_creds,
 sd_bus_get_name,
 sd_bus_send,
 sd_bus_send_to,
@@ -247,8 +250,8 @@ sd_bus_get_unique_name,
 sd_bus_request_name,
 sd_bus_release_name,
 sd_bus_list_names,
-sd_bus_get_owner,
-sd_bus_get_owner_machine_id,
+sd_bus_get_name_creds,
+sd_bus_get_name_machine_id,
 sd_bus_call_method,
 sd_bus_get_property,
 sd_bus_get_property_trivial,
@@ -323,18 +326,6 @@ sd_bus_track_count,
 sd_bus_track_contains,
 sd_bus_track_first,
 sd_bus_track_next,
-sd_memfd_new,
-sd_memfd_new_and_map,
-sd_memfd_free,
-sd_memfd_get_fd,
-sd_memfd_get_file,
-sd_memfd_dup_fd,
-sd_memfd_map,
-sd_memfd_set_sealed,
-sd_memfd_get_sealed,
-sd_memfd_get_size,
-sd_memfd_set_size,
-sd_memfd_get_name,
 sd_event_default,
 sd_event_new,
 sd_event_ref,
@@ -349,6 +340,7 @@ sd_event_run,
 sd_event_loop,
 sd_event_exit,
 sd_event_now,
+sd_event_get_fd,
 sd_event_get_state,
 sd_event_get_tid,
 sd_event_get_exit_code,
@@ -356,6 +348,8 @@ sd_event_set_watchdog,
 sd_event_get_watchdog,
 sd_event_source_ref,
 sd_event_source_unref,
+sd_event_source_set_name,
+sd_event_source_get_name,
 sd_event_source_set_prepare,
 sd_event_source_get_pending,
 sd_event_source_get_priority,
@@ -402,6 +396,8 @@ sd_resolve_query_is_done,
 sd_resolve_query_get_userdata,
 sd_resolve_query_set_userdata,
 sd_resolve_query_get_resolve,
+sd_path_home,
+sd_path_search,
 };
 int main(void) {
 unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%p\n", functions[i]);
index 62ab51eec1bc754e950f895b413845237ea6f278..5378d8612781f447b8546d5504a86edf26abe87c 100644 (file)
@@ -74,8 +74,6 @@ udev_queue_get_seqnum_sequence_is_finished,
 udev_queue_get_udev,
 udev_queue_get_udev_is_active,
 udev_queue_get_udev_seqnum,
-udev_queue_get_fd,
-udev_queue_flush,
 udev_queue_new,
 udev_queue_ref,
 udev_queue_unref,
@@ -91,6 +89,8 @@ udev_hwdb_ref,
 udev_hwdb_unref,
 udev_hwdb_get_properties_list_entry,
 udev_device_set_sysattr_value,
+udev_queue_flush,
+udev_queue_get_fd,
 };
 int main(void) {
 unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%p\n", functions[i]);
diff --git a/test/a.service b/test/a.service
new file mode 100644 (file)
index 0000000..4168d2d
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=A
+Requires=b.service
+Before=b.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/b.service b/test/b.service
new file mode 100644 (file)
index 0000000..e03bae3
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=B
+Wants=f.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/basic.target b/test/basic.target
new file mode 100644 (file)
index 0000000..228f62c
--- /dev/null
@@ -0,0 +1,15 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Basic System
+Documentation=man:systemd.special(7)
+Requires=sysinit.target
+Wants=sockets.target timers.target paths.target slices.target
+After=sysinit.target sockets.target timers.target paths.target slices.target
+JobTimeoutSec=15min
+JobTimeoutAction=poweroff-force
diff --git a/test/bus-policy/hello.conf b/test/bus-policy/hello.conf
new file mode 100644 (file)
index 0000000..af09893
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?> <!--*-nxml-*-->
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+
+        <policy context="default">
+                <allow user="*"/>
+
+                <deny user="1"/>
+                <deny group="1"/>
+        </policy>
+
+</busconfig>
diff --git a/test/bus-policy/methods.conf b/test/bus-policy/methods.conf
new file mode 100644 (file)
index 0000000..4bc38f9
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0"?> <!--*-nxml-*-->
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+
+        <policy context="default">
+                <deny send_type="method_call"/>
+
+                <deny send_destination="org.test.test1"/>
+                <allow send_destination="org.test.test1" send_interface="org.test.int1"/>
+                <allow send_destination="org.test.test1" send_interface="org.test.int2"/>
+
+                <allow receive_sender="org.test.test3" receive_interface="org.test.int3" receive_member="Member111"/>
+        </policy>
+
+</busconfig>
diff --git a/test/bus-policy/ownerships.conf b/test/bus-policy/ownerships.conf
new file mode 100644 (file)
index 0000000..bc3a230
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?> <!--*-nxml-*-->
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+
+        <policy context="default">
+                <allow own="org.test.test1"/>
+        </policy>
+
+        <policy context="mandatory">
+                <deny own="org.test.test3"/>
+        </policy>
+
+        <policy user="root">
+                <allow own="org.test.test2"/>
+                <allow own="org.test.test3"/>
+        </policy>
+
+        <policy user="1">
+                <allow own="org.test.test4"/>
+        </policy>
+
+</busconfig>
diff --git a/test/bus-policy/signals.conf b/test/bus-policy/signals.conf
new file mode 100644 (file)
index 0000000..440e3fe
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> <!--*-nxml-*-->
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+
+        <policy context="default">
+                <allow send_type="signal"/>
+        </policy>
+
+        <policy user="1">
+                <deny send_type="signal"/>
+        </policy>
+
+</busconfig>
diff --git a/test/c.service b/test/c.service
new file mode 100644 (file)
index 0000000..e2f60a8
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=C
+Requires=a.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/d.service b/test/d.service
new file mode 100644 (file)
index 0000000..921fd2e
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=D:Cyclic
+After=b.service
+Before=a.service
+Requires=a.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/e.service b/test/e.service
new file mode 100644 (file)
index 0000000..5ba98c7
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=E:Cyclic
+After=b.service
+Before=a.service
+Wants=a.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/end.service b/test/end.service
new file mode 100644 (file)
index 0000000..0f04dfe
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=End the test
+After=testsuite.service
+
+[Service]
+ExecStart=/usr/bin/systemctl poweroff --no-block
diff --git a/test/f.service b/test/f.service
new file mode 100644 (file)
index 0000000..7dde681
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=F
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/g.service b/test/g.service
new file mode 100644 (file)
index 0000000..cbfa82a
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=G
+Conflicts=e.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/grandchild.service b/test/grandchild.service
new file mode 100644 (file)
index 0000000..ab64130
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=Grandchild Service
+
+[Service]
+Slice=parent-deep.slice
+Type=oneshot
+ExecStart=/bin/true
diff --git a/test/h.service b/test/h.service
new file mode 100644 (file)
index 0000000..74a7751
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=H
+Wants=g.service
+
+[Service]
+ExecStart=/bin/true
diff --git a/test/hello-after-sleep.target b/test/hello-after-sleep.target
new file mode 100644 (file)
index 0000000..526fbd2
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Sleep for a minute, then say hello.
+Wants=sleep.service hello.service
+After=sleep.service
+Before=hello.service
diff --git a/test/hello.service b/test/hello.service
new file mode 100644 (file)
index 0000000..82907b6
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Hello World
+
+[Service]
+ExecStart=/bin/echo "Hello World"
diff --git a/test/parent-deep.slice b/test/parent-deep.slice
new file mode 100644 (file)
index 0000000..79b302f
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Deeper Parent Slice
+
+[Slice]
+MemoryLimit=3G
diff --git a/test/paths.target b/test/paths.target
new file mode 100644 (file)
index 0000000..25c7fd0
--- /dev/null
@@ -0,0 +1,10 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Paths
+Documentation=man:systemd.special(7)
diff --git a/test/shutdown.target b/test/shutdown.target
new file mode 100644 (file)
index 0000000..73e302b
--- /dev/null
@@ -0,0 +1,12 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Shutdown
+Documentation=man:systemd.special(7)
+DefaultDependencies=no
+RefuseManualStart=yes
diff --git a/test/sleep.service b/test/sleep.service
new file mode 100644 (file)
index 0000000..946c44b
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Sleep for 1 minute
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sleep 60
diff --git a/test/sockets.target b/test/sockets.target
new file mode 100644 (file)
index 0000000..26ab065
--- /dev/null
@@ -0,0 +1,10 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Sockets
+Documentation=man:systemd.special(7)
diff --git a/test/sysinit.target b/test/sysinit.target
new file mode 100644 (file)
index 0000000..ec33503
--- /dev/null
@@ -0,0 +1,13 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=System Initialization
+Documentation=man:systemd.special(7)
+Conflicts=emergency.service emergency.target
+Wants=local-fs.target swap.target
+After=local-fs.target swap.target emergency.service emergency.target
diff --git a/test/testsuite.target b/test/testsuite.target
new file mode 100644 (file)
index 0000000..1a7e5b3
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=Testsuite target
+Requires=multi-user.target
+After=multi-user.target
+Conflicts=rescue.target
+AllowIsolate=yes
diff --git a/test/timers.target b/test/timers.target
new file mode 100644 (file)
index 0000000..07fda3d
--- /dev/null
@@ -0,0 +1,10 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Timers
+Documentation=man:systemd.special(7)
index 23f1b726e060e521eb9d2db8c2f70e584fad4e15..14f11df8af94d53e1860ffb135cc2f52ac160a19 100755 (executable)
@@ -549,21 +549,21 @@ KERNEL=="tty33", OWNER="bad", GROUP="name"
 EOF
         },
         {
-                desc            => "permissions OWNER=5000",
+                desc            => "permissions OWNER=1",
                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
                 exp_name        => "node",
-                exp_perms       => "5000::0600",
+                exp_perms       => "1::0600",
                 rules           => <<EOF
-SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="5000"
+SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="1"
 EOF
         },
         {
-                desc            => "permissions GROUP=100",
+                desc            => "permissions GROUP=1",
                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
                 exp_name        => "node",
-                exp_perms       => ":100:0660",
+                exp_perms       => ":1:0660",
                 rules           => <<EOF
-SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", GROUP="100"
+SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", GROUP="1"
 EOF
         },
         {
@@ -603,30 +603,30 @@ SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", MODE="0777"
 EOF
         },
         {
-                desc            => "permissions OWNER=5000 GROUP=100 MODE=0777",
+                desc            => "permissions OWNER=1 GROUP=1 MODE=0777",
                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
                 exp_name        => "node",
-                exp_perms       => "5000:100:0777",
+                exp_perms       => "1:1:0777",
                 rules           => <<EOF
-SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="5000", GROUP="100", MODE="0777"
+SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="1", GROUP="1", MODE="0777"
 EOF
         },
         {
-                desc            => "permissions OWNER to 5000",
+                desc            => "permissions OWNER to 1",
                 devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
                 exp_name        => "ttyACM0",
-                exp_perms       => "5000::",
+                exp_perms       => "1::",
                 rules           => <<EOF
-KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", OWNER="5000"
+KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", OWNER="1"
 EOF
         },
         {
-                desc            => "permissions GROUP to 100",
+                desc            => "permissions GROUP to 1",
                 devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
                 exp_name        => "ttyACM0",
-                exp_perms       => ":100:0660",
+                exp_perms       => ":1:0660",
                 rules           => <<EOF
-KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", GROUP="100"
+KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", GROUP="1"
 EOF
         },
         {
@@ -642,19 +642,19 @@ EOF
                 desc            => "permissions OWNER, GROUP, MODE",
                 devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
                 exp_name        => "ttyACM0",
-                exp_perms       => "5000:100:0777",
+                exp_perms       => "1:1:0777",
                 rules           => <<EOF
-KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", OWNER="5000", GROUP="100", MODE="0777"
+KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", OWNER="1", GROUP="1", MODE="0777"
 EOF
         },
         {
                 desc            => "permissions only rule",
                 devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
                 exp_name        => "ttyACM0",
-                exp_perms       => "5000:100:0777",
+                exp_perms       => "1:1:0777",
                 rules           => <<EOF
-KERNEL=="ttyACM[0-9]*", OWNER="5000", GROUP="100", MODE="0777"
-KERNEL=="ttyUSX[0-9]*", OWNER="5001", GROUP="101", MODE="0444"
+KERNEL=="ttyACM[0-9]*", OWNER="1", GROUP="1", MODE="0777"
+KERNEL=="ttyUSX[0-9]*", OWNER="2", GROUP="2", MODE="0444"
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n"
 EOF
         },
@@ -662,12 +662,12 @@ EOF
                 desc            => "multiple permissions only rule",
                 devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
                 exp_name        => "ttyACM0",
-                exp_perms       => "3000:4000:0777",
+                exp_perms       => "1:1:0777",
                 rules           => <<EOF
-SUBSYSTEM=="tty", OWNER="3000"
-SUBSYSTEM=="tty", GROUP="4000"
+SUBSYSTEM=="tty", OWNER="1"
+SUBSYSTEM=="tty", GROUP="1"
 SUBSYSTEM=="tty", MODE="0777"
-KERNEL=="ttyUSX[0-9]*", OWNER="5001", GROUP="101", MODE="0444"
+KERNEL=="ttyUSX[0-9]*", OWNER="2", GROUP="2", MODE="0444"
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n"
 EOF
         },
@@ -675,13 +675,13 @@ EOF
                 desc            => "permissions only rule with override at SYMLINK+ rule",
                 devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
                 exp_name        => "ttyACM0",
-                exp_perms       => "3000:8000:0777",
+                exp_perms       => "1:2:0777",
                 rules           => <<EOF
-SUBSYSTEM=="tty", OWNER="3000"
-SUBSYSTEM=="tty", GROUP="4000"
+SUBSYSTEM=="tty", OWNER="1"
+SUBSYSTEM=="tty", GROUP="1"
 SUBSYSTEM=="tty", MODE="0777"
-KERNEL=="ttyUSX[0-9]*", OWNER="5001", GROUP="101", MODE="0444"
-KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", GROUP="8000"
+KERNEL=="ttyUSX[0-9]*", OWNER="2", GROUP="2", MODE="0444"
+KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", GROUP="2"
 EOF
         },
         {
@@ -1274,11 +1274,11 @@ EOF
                 desc            => "TEST PROGRAM feeds OWNER, GROUP, MODE",
                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
                 exp_name        => "sda",
-                exp_perms       => "5000:100:0400",
+                exp_perms       => "1:1:0400",
                 exp_rem_error   => "yes",
                 rules           => <<EOF
 KERNEL=="sda", MODE="666"
-KERNEL=="sda", PROGRAM=="/bin/echo 5000 100 0400", OWNER="%c{1}", GROUP="%c{2}", MODE="%c{3}"
+KERNEL=="sda", PROGRAM=="/bin/echo 1 1 0400", OWNER="%c{1}", GROUP="%c{2}", MODE="%c{3}"
 EOF
         },
         {
diff --git a/test/unstoppable.service b/test/unstoppable.service
new file mode 100644 (file)
index 0000000..24fb0a2
--- /dev/null
@@ -0,0 +1,5 @@
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/echo 'I'm unstoppable!'
+ExecStop=/bin/systemctl start --no-block unstoppable.service
diff --git a/tmpfiles.d/etc.conf b/tmpfiles.d/etc.conf
deleted file mode 100644 (file)
index e809dff..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-# See tmpfiles.d(5) for details
-
-L /etc/os-release - - - - ../usr/lib/os-release
-L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
-L+ /etc/mtab - - - - ../proc/self/mounts
-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
diff --git a/tmpfiles.d/etc.conf.m4 b/tmpfiles.d/etc.conf.m4
new file mode 100644 (file)
index 0000000..f567c8d
--- /dev/null
@@ -0,0 +1,17 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+L /etc/os-release - - - - ../usr/lib/os-release
+L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
+L+ /etc/mtab - - - - ../proc/self/mounts
+m4_ifdef(`ENABLE_RESOLVED',
+L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
+)
+C /etc/nsswitch.conf - - - -
+C /etc/pam.d - - - -
diff --git a/tmpfiles.d/systemd-remote.conf b/tmpfiles.d/systemd-remote.conf
new file mode 100644 (file)
index 0000000..1b8973a
--- /dev/null
@@ -0,0 +1,11 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+z /var/log/journal/remote 2755 root systemd-journal-remote - -
+z /run/log/journal/remote 2755 root systemd-journal-remote - -
diff --git a/tools/make-man-rules.py b/tools/make-man-rules.py
deleted file mode 100644 (file)
index e75bfff..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#  -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
-#
-#  This file is part of systemd.
-#
-#  Copyright 2013 Zbigniew Jędrzejewski-Szmek
-#
-#  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/>.
-
-from __future__ import print_function
-import collections
-import sys
-import os.path
-from xml_helper import *
-
-SECTION = '''\
-MANPAGES += \\
-       {manpages}
-MANPAGES_ALIAS += \\
-       {aliases}
-{rules}
-{htmlrules}
-'''
-
-CONDITIONAL = '''\
-if {conditional}
-''' \
-+ SECTION + \
-'''\
-endif
-'''
-
-HEADER = '''\
-# Do not edit. Generated by make-man-rules.py.
-# To regenerate:
-#   1. Create, update, or remove source .xml files in man/
-#   2. Run 'make update-man-list'
-#   3. Run 'make man' to generate manpages
-#
-# To make a man page conditional on a configure switch add
-# attribute conditional="ENABLE_WHAT" or conditional="WITH_WHAT"
-# to <refentry> element.
-'''
-
-HTML_ALIAS_RULE = '''\
-{}.html: {}.html
-       $(html-alias)
-'''
-
-FOOTER = '''\
-
-# Really, do not edit this file.
-
-EXTRA_DIST += \\
-       {files}
-'''
-
-def man(page, number):
-    return 'man/{}.{}'.format(page, number)
-
-def xml(file):
-    return 'man/{}'.format(os.path.basename(file))
-
-def add_rules(rules, name):
-    xml = xml_parse(name)
-    # print('parsing {}'.format(name), file=sys.stderr)
-    if xml.getroot().tag != 'refentry':
-        return
-    conditional = xml.getroot().get('conditional') or ''
-    rulegroup = rules[conditional]
-    refmeta = xml.find('./refmeta')
-    title = refmeta.find('./refentrytitle').text
-    number = refmeta.find('./manvolnum').text
-    refnames = xml.findall('./refnamediv/refname')
-    target = man(refnames[0].text, number)
-    if title != refnames[0].text:
-        raise ValueError('refmeta and refnamediv disagree: ' + name)
-    for refname in refnames:
-        assert all(refname not in group
-                   for group in rules.values()), "duplicate page name"
-        alias = man(refname.text, number)
-        rulegroup[alias] = target
-        # print('{} => {} [{}]'.format(alias, target, conditional), file=sys.stderr)
-
-def create_rules(xml_files):
-    " {conditional => {alias-name => source-name}} "
-    rules = collections.defaultdict(dict)
-    for name in xml_files:
-        try:
-            add_rules(rules, name)
-        except Exception:
-            print("Failed to process", name, file=sys.stderr)
-            raise
-    return rules
-
-def mjoin(files):
-    return ' \\\n\t'.join(sorted(files) or '#')
-
-def make_makefile(rules, files):
-    return HEADER + '\n'.join(
-        (CONDITIONAL if conditional else SECTION).format(
-            manpages=mjoin(set(rulegroup.values())),
-            aliases=mjoin(k for k,v in rulegroup.items() if k != v),
-            rules='\n'.join('{}: {}'.format(k,v)
-                            for k,v in sorted(rulegroup.items())
-                            if k != v),
-            htmlrules='\n'.join(HTML_ALIAS_RULE.format(k[:-2],v[:-2])
-                                for k,v in sorted(rulegroup.items())
-                                if k != v),
-            conditional=conditional)
-        for conditional,rulegroup in sorted(rules.items())
-        ) + FOOTER.format(files=mjoin(sorted(files)))
-
-if __name__ == '__main__':
-    rules = create_rules(sys.argv[1:])
-    files = (xml(file) for file in sys.argv[1:])
-    print(make_makefile(rules, files), end='')
index b890d48bbceca74b5583a69bf542cefcae62467a..228f62c4b13c63fffa06ca68c83292d46df9f10b 100644 (file)
@@ -11,3 +11,5 @@ Documentation=man:systemd.special(7)
 Requires=sysinit.target
 Wants=sockets.target timers.target paths.target slices.target
 After=sysinit.target sockets.target timers.target paths.target slices.target
+JobTimeoutSec=15min
+JobTimeoutAction=poweroff-force
diff --git a/units/emergency.service b/units/emergency.service
deleted file mode 100644 (file)
index 51bb4c3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Emergency Shell
-Documentation=man:sulogin(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-Before=shutdown.target
-
-[Service]
-Environment=HOME=/root
-WorkingDirectory=/root
-ExecStartPre=-/bin/plymouth quit
-ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
-ExecStart=-/sbin/sulogin
-ExecStopPost=/usr/bin/systemctl --fail --no-block default
-Type=idle
-StandardInput=tty-force
-StandardOutput=inherit
-StandardError=inherit
-KillMode=process
-IgnoreSIGPIPE=no
-SendSIGHUP=yes
index 94c090f654be34b42cf8014ce255dbad86ae0ca1..18973e78fa8cbbe9980eaea21895ad6aba82c4cc 100644 (file)
@@ -10,15 +10,15 @@ Description=Emergency Shell
 Documentation=man:sulogin(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
+Conflicts=rescue.service
 Before=shutdown.target
 
 [Service]
 Environment=HOME=/root
 WorkingDirectory=/root
 ExecStartPre=-/bin/plymouth quit
-ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
-ExecStart=-/sbin/sulogin
-ExecStopPost=@SYSTEMCTL@ --fail --no-block default
+ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
 Type=idle
 StandardInput=tty-force
 StandardOutput=inherit
index c0b25430bc7efc22c60852a521deb42413384215..42c059bbd2d4ed50b93bae7e9b573d1f26e29ea1 100644 (file)
@@ -16,7 +16,7 @@ ConditionPathExists=/etc/initrd-release
 
 [Service]
 Type=oneshot
-ExecStartPre=@rootbindir@/systemctl daemon-reload
+ExecStartPre=-@rootbindir@/systemctl daemon-reload
 # we have to retrigger initrd-fs.target after daemon-reload
 ExecStart=-@rootbindir@/systemctl --no-block start initrd-fs.target
 ExecStart=@rootbindir@/systemctl --no-block start initrd-cleanup.service
index 368f980fd11548915900fb855b9a8663fc57b095..0934a8751f3c9d6e77d72452430bd3af4fac0a9c 100644 (file)
@@ -9,7 +9,7 @@
 Description=Create list of required static device nodes for the current kernel
 DefaultDependencies=no
 Before=sysinit.target systemd-tmpfiles-setup-dev.service
-ConditionCapability=CAP_MKNOD
+ConditionCapability=CAP_SYS_MODULE
 ConditionPathExists=/lib/modules/%v/modules.devname
 
 [Service]
index 43c145b7266e7d330956fb5a8445f3d3ec16b336..f9691e2f2d0d1d11e8d7a362daefb9f380229568 100644 (file)
@@ -10,7 +10,7 @@ Description=Rebuild Dynamic Linker Cache
 Documentation=man:ldconfig(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=sysinit.target shutdown.target systemd-update-done.service
 ConditionNeedsUpdate=/etc
 
diff --git a/units/org.freedesktop.resolve1.busname b/units/org.freedesktop.resolve1.busname
new file mode 100644 (file)
index 0000000..02588fb
--- /dev/null
@@ -0,0 +1,16 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Network Name Resolution Service Bus Name
+Documentation=man:systemd-resolved.service(8)
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/resolved
+
+[BusName]
+Service=systemd-resolved.service
+AllowWorld=talk
+AllowUser=systemd-resolve own
index 71871033a541febb5cf71c9f44be3ad213052cb9..dd92d816cacafbc869f5ea32d6aeb1b0a7f28610 100644 (file)
@@ -12,6 +12,8 @@ DefaultDependencies=no
 Requires=systemd-poweroff.service
 After=systemd-poweroff.service
 AllowIsolate=yes
+JobTimeoutSec=30min
+JobTimeoutAction=poweroff-force
 
 [Install]
 Alias=ctrl-alt-del.target
index 49a50a7feb39f6947ad5bb39d56d74c050ed1c84..7d59a4019547f6f7eff6ce06c113b638b675d880 100644 (file)
@@ -9,7 +9,7 @@
 Description=Enable File System Quotas
 Documentation=man:quotaon(8)
 DefaultDependencies=no
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-quotacheck.service
+After=systemd-quotacheck.service
 Before=local-fs.target shutdown.target
 ConditionPathExists=@QUOTAON@
 
index dec8f5679645de6f25fb0ad5969992b369cdfe8d..668b98d9e45b2a68a80899b9a7b6b41b3268bf63 100644 (file)
@@ -12,6 +12,8 @@ DefaultDependencies=no
 Requires=systemd-reboot.service
 After=systemd-reboot.service
 AllowIsolate=yes
+JobTimeoutSec=30min
+JobTimeoutAction=reboot-force
 
 [Install]
 Alias=ctrl-alt-del.target
diff --git a/units/rescue.service.in b/units/rescue.service.in
new file mode 100644 (file)
index 0000000..fc93f1e
--- /dev/null
@@ -0,0 +1,28 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Rescue Shell
+Documentation=man:sulogin(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=sysinit.target plymouth-start.service
+Before=shutdown.target
+
+[Service]
+Environment=HOME=/root
+WorkingDirectory=/root
+ExecStartPre=-/bin/plymouth quit
+ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
+Type=idle
+StandardInput=tty-force
+StandardOutput=inherit
+StandardError=inherit
+KillMode=process
+IgnoreSIGPIPE=no
+SendSIGHUP=yes
diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
deleted file mode 100644 (file)
index 552ef89..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Rescue Shell
-Documentation=man:sulogin(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=sysinit.target plymouth-start.service
-Before=shutdown.target
-
-[Service]
-Environment=HOME=/root
-WorkingDirectory=/root
-ExecStartPre=-/bin/plymouth quit
-ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
-ExecStart=-/sbin/sulogin
-ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
-Type=idle
-StandardInput=tty-force
-StandardOutput=inherit
-StandardError=inherit
-KillMode=process
-IgnoreSIGPIPE=no
-SendSIGHUP=yes
index 4ac51e768db3bebb83e022a96c354122b1d749a4..4522d0d2be30d499194f5e3006be92d134141f87 100644 (file)
@@ -25,7 +25,6 @@ IgnoreOnIsolate=yes
 ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
 Type=idle
 Restart=always
-RestartSec=0
 UtmpIdentifier=%I
 TTYPath=/dev/%I
 TTYReset=yes
index 020101c0d8fb9c4946562eb874adfb03f752e961..21648eff6af7a59ff7cf97f6d2ac419bc461f382 100644 (file)
@@ -11,6 +11,7 @@ Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/conf
 Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
 DefaultDependencies=no
 ConditionPathExists=/sys/kernel/config
+ConditionCapability=CAP_SYS_RAWIO
 After=systemd-modules-load.service
 Before=sysinit.target
 
index 5369728a9f09ed2d2dea3df43e8d909530b1e52e..1e94387bacb988b35c76c5781090a10676ff9259 100644 (file)
@@ -11,6 +11,7 @@ Documentation=https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt
 Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
 DefaultDependencies=no
 ConditionPathExists=/sys/kernel/debug
+ConditionCapability=CAP_SYS_RAWIO
 Before=sysinit.target
 
 [Mount]
index d0f847f9570e2e18385da03c8e93e3a595ab4984..48d46fcbda92db60b826a83a4587345f347bb9ca 100644 (file)
@@ -10,7 +10,7 @@ Description=System Update
 Documentation=http://freedesktop.org/wiki/Software/systemd/SystemUpdates
 Documentation=man:systemd.special(7) man:systemd-system-update-generator(8)
 Requires=sysinit.target
-Conflicts=shutdown.target systemd-readahead-collect.service systemd-readahead-replay.service
+Conflicts=shutdown.target
 After=sysinit.target
 Before=shutdown.target
 AllowIsolate=yes
index e945d8733f881139d16cd9d100e6610c4c6dd2f8..ecf3de48d78ba59da775e0f72e0492463f59991c 100644 (file)
@@ -11,7 +11,7 @@ Documentation=man:systemd-backlight@.service(8)
 DefaultDependencies=no
 RequiresMountsFor=/var/lib/systemd/backlight
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=sysinit.target shutdown.target
 
 [Service]
index 02dfe774df5867b86878ebdac1ba4e010cf980e6..34a5d5237b1d8a5eb0ed99264b3703183fbb9066 100644 (file)
@@ -11,7 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount
+After=proc-sys-fs-binfmt_misc.automount
 Before=sysinit.target shutdown.target
 ConditionPathIsReadWrite=/proc/sys/
 ConditionDirectoryNotEmpty=|/lib/binfmt.d
diff --git a/units/systemd-firstboot.service.in b/units/systemd-firstboot.service.in
new file mode 100644 (file)
index 0000000..405c6f3
--- /dev/null
@@ -0,0 +1,24 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=First Boot Wizard
+Documentation=man:systemd-firstboot(1)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=systemd-remount-fs.service
+Before=systemd-sysusers.service sysinit.target shutdown.target
+ConditionPathIsReadWrite=/etc
+ConditionFirstBoot=yes
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@rootbindir@/systemd-firstboot --prompt-locale --prompt-timezone --prompt-root-password
+StandardOutput=tty
+StandardInput=tty
+StandardError=tty
index 416298335a86496967ed535857502036ab47bf97..6d7657853ed64dcbc49f1c72452f299e8a5101f8 100644 (file)
@@ -9,9 +9,7 @@
 Description=File System Check on Root Device
 Documentation=man:systemd-fsck-root.service(8)
 DefaultDependencies=no
-After=systemd-readahead-collect.service systemd-readahead-replay.service
 Before=local-fs.target shutdown.target
-
 ConditionPathIsReadWrite=!/
 
 [Service]
index c12efa8e760025eea978a5ce233210e1e27ba7c0..857e625679d8c154b484e691bceec90fe2efdbe7 100644 (file)
@@ -10,7 +10,7 @@ Description=File System Check on %f
 Documentation=man:systemd-fsck@.service(8)
 DefaultDependencies=no
 BindsTo=%i.device
-After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service
+After=%i.device systemd-fsck-root.service local-fs-pre.target
 Before=shutdown.target
 
 [Service]
diff --git a/units/systemd-hibernate-resume@.service.in b/units/systemd-hibernate-resume@.service.in
new file mode 100644 (file)
index 0000000..65e8eb8
--- /dev/null
@@ -0,0 +1,20 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Resume from hibernation using device %f
+Documentation=man:systemd-hibernate-resume@.service(8)
+DefaultDependencies=no
+BindsTo=%i.device
+Wants=local-fs-pre.target
+After=%i.device
+Before=local-fs-pre.target
+ConditionPathExists=/etc/initrd-release
+
+[Service]
+Type=oneshot
+ExecStart=@rootlibexecdir@/systemd-hibernate-resume %f
index 0cb7076f12a53e8a83ffdd5a71ef7478e2193710..bfa5e6b43510b856e9f70a37d565a8947208580f 100644 (file)
@@ -10,7 +10,7 @@ Description=Rebuild Journal Catalog
 Documentation=man:systemd-journald.service(8) man:journald.conf(5)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
+After=local-fs.target
 Before=sysinit.target shutdown.target systemd-update-done.service
 ConditionNeedsUpdate=/etc
 
index 503e8a63b812b5da8f1bebb0a08092f49b185f24..699670bb4ee79a3a3be1d3ab5dedf80a8054c3cf 100644 (file)
@@ -11,8 +11,9 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5)
 DefaultDependencies=no
 Requires=systemd-journald.service
 After=systemd-journald.service local-fs.target remote-fs.target
-Before=systemd-user-sessions.service
+Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
 
 [Service]
-ExecStart=@rootbindir@/systemctl kill --kill-who=main --signal=SIGUSR1 systemd-journald.service
+ExecStart=@rootbindir@/journalctl --flush
 Type=oneshot
+RemainAfterExit=yes
diff --git a/units/systemd-journal-remote.service.in b/units/systemd-journal-remote.service.in
new file mode 100644 (file)
index 0000000..4a898d6
--- /dev/null
@@ -0,0 +1,24 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Journal Remote Sink Service
+Requires=systemd-journal-remote.socket
+
+[Service]
+ExecStart=@rootlibexecdir@/systemd-journal-remote \
+          --listen-https=-3 \
+          --output=/var/log/journal/remote/
+User=systemd-journal-remote
+Group=systemd-journal-remote
+PrivateTmp=yes
+PrivateDevices=yes
+PrivateNetwork=yes
+WatchdogSec=10min
+
+[Install]
+Also=systemd-journal-remote.socket
diff --git a/units/systemd-journal-remote.socket b/units/systemd-journal-remote.socket
new file mode 100644 (file)
index 0000000..076dcae
--- /dev/null
@@ -0,0 +1,15 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Journal Remote Sink Socket
+
+[Socket]
+ListenStream=19532
+
+[Install]
+WantedBy=sockets.target
diff --git a/units/systemd-journal-upload.service.in b/units/systemd-journal-upload.service.in
new file mode 100644 (file)
index 0000000..359ff10
--- /dev/null
@@ -0,0 +1,21 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Journal Remote Upload Service
+After=network.target
+
+[Service]
+ExecStart=@rootlibexecdir@/systemd-journal-upload \
+          --save-state
+User=systemd-journal-upload
+PrivateTmp=yes
+PrivateDevices=yes
+WatchdogSec=20min
+
+[Install]
+WantedBy=multi-user.target
index c01b310b40c3957876c96ec741395c17a67d170f..ffd44bb507a20bc54d0aba7a89e3dd053aafc763 100644 (file)
@@ -17,10 +17,16 @@ Before=sockets.target
 IgnoreOnIsolate=yes
 
 [Socket]
+Service=systemd-journald.service
 ListenDatagram=/run/systemd/journal/dev-log
 Symlinks=/dev/log
 SocketMode=0666
 PassCredentials=yes
 PassSecurity=yes
+
+# Increase both the send and receive buffer, so that things don't
+# block early. Note that journald internally uses the this socket both
+# for receiving syslog messages, and for forwarding them to any other
+# syslog, hence we bump both values.
 ReceiveBuffer=8M
-Service=systemd-journald.service
+SendBuffer=8M
index 70139795a5de660a316dc71be13910bc1c52d671..4de38fad59cb71cc6df066cf15892b8e94cbc89f 100644 (file)
@@ -20,7 +20,7 @@ Restart=always
 RestartSec=0
 NotifyAccess=all
 StandardOutput=null
-CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID
+CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE
 WatchdogSec=1min
 
 # Increase the default a bit in order to allow many simultaneous
index c6cbd1c8df30a5d2d3babb96d1e4b77f997fac85..f087e99ce2e75f7470199c676af72ef1570243f8 100644 (file)
@@ -23,7 +23,7 @@ ExecStart=@rootlibexecdir@/systemd-logind
 Restart=always
 RestartSec=0
 BusName=org.freedesktop.login1
-CapabilityBoundingSet=CAP_SYS_ADMIN CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
+CapabilityBoundingSet=CAP_SYS_ADMIN CAP_MAC_ADMIN CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
 WatchdogSec=1min
 
 # Increase the default a bit in order to allow many simultaneous
index 32deb52e2689d963ac76f6dfbb5d3a91bd5c2482..040a0febe82d1272e8c39c8871eec35a1e5bbd6a 100644 (file)
@@ -10,7 +10,6 @@ Description=Load Kernel Modules
 Documentation=man:systemd-modules-load.service(8) man:modules-load.d(5)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service
 Before=sysinit.target shutdown.target
 ConditionCapability=CAP_SYS_MODULE
 ConditionDirectoryNotEmpty=|/lib/modules-load.d
index f33c65e6ff07e433a3c81cddfc02183c3e630ba6..fe92da21235f14aff3f73a4b888c031d2e79eb9e 100644 (file)
@@ -10,7 +10,9 @@ Description=Network Service
 Documentation=man:systemd-networkd.service(8)
 ConditionCapability=CAP_NET_ADMIN
 DefaultDependencies=no
-After=dbus.service network-pre.target systemd-sysusers.service
+# dbus.service can be dropped once on kdbus, and systemd-udevd.service can be
+# dropped once tuntap is moved to netlink
+After=systemd-udevd.service dbus.service network-pre.target systemd-sysusers.service
 Before=network.target multi-user.target shutdown.target
 Conflicts=shutdown.target
 Wants=network.target
index f726ea1bcd2c3389e9eb4c2cd327ab570fb66b34..5cb9bc3bc98d26c9019f11812aa63270b520fb41 100644 (file)
@@ -9,7 +9,7 @@
 Description=File System Quota Check
 Documentation=man:systemd-quotacheck.service(8)
 DefaultDependencies=no
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=local-fs.target shutdown.target
 ConditionPathExists=@QUOTACHECK@
 
index 1879b2f24cf16c48dba754c006baf9d49833485b..b55844b36fdf4a2f9afc9c4c02ea09c768daeff4 100644 (file)
@@ -11,7 +11,7 @@ Documentation=man:systemd-random-seed.service(8) man:random(4)
 DefaultDependencies=no
 RequiresMountsFor=@RANDOM_SEED@
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=sysinit.target shutdown.target
 
 [Service]
diff --git a/units/systemd-readahead-collect.service.in b/units/systemd-readahead-collect.service.in
deleted file mode 100644 (file)
index d4b8e67..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Collect Read-Ahead Data
-Documentation=man:systemd-readahead-replay.service(8)
-DefaultDependencies=no
-Wants=systemd-readahead-done.timer
-Conflicts=shutdown.target
-Before=sysinit.target shutdown.target
-ConditionPathExists=!/run/systemd/readahead/cancel
-ConditionPathExists=!/run/systemd/readahead/done
-ConditionVirtualization=no
-
-[Service]
-Type=notify
-ExecStart=@rootlibexecdir@/systemd-readahead collect
-RemainAfterExit=yes
-StandardOutput=null
-OOMScoreAdjust=1000
-
-[Install]
-WantedBy=default.target
-Also=systemd-readahead-drop.service
diff --git a/units/systemd-readahead-done.service.in b/units/systemd-readahead-done.service.in
deleted file mode 100644 (file)
index e0d9579..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Stop Read-Ahead Data Collection
-Documentation=man:systemd-readahead-replay.service(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=default.target
-Before=shutdown.target
-ConditionVirtualization=no
-
-[Service]
-Type=oneshot
-ExecStart=@SYSTEMD_NOTIFY@ --readahead=done
-
-[Install]
-Also=systemd-readahead-collect.service
diff --git a/units/systemd-readahead-done.timer b/units/systemd-readahead-done.timer
deleted file mode 100644 (file)
index c58e096..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Stop Read-Ahead Data Collection 10s After Completed Startup
-Documentation=man:systemd-readahead-replay.service(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=default.target
-Before=shutdown.target
-ConditionVirtualization=no
-
-[Timer]
-OnActiveSec=30s
-AccuracySec=1s
-
-[Install]
-Also=systemd-readahead-collect.service
diff --git a/units/systemd-readahead-drop.service b/units/systemd-readahead-drop.service
deleted file mode 100644 (file)
index d9d12bc..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Drop Read-Ahead Data
-Documentation=man:systemd-readahead-replay.service(8)
-ConditionPathExists=/.readahead
-
-[Service]
-Type=oneshot
-ExecStart=/bin/rm -f /.readahead
-
-[Install]
-WantedBy=system-update.target
-Also=systemd-readahead-collect.service
diff --git a/units/systemd-readahead-replay.service.in b/units/systemd-readahead-replay.service.in
deleted file mode 100644 (file)
index c64a533..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Replay Read-Ahead Data
-Documentation=man:systemd-readahead-replay.service(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-Before=sysinit.target shutdown.target
-ConditionPathExists=!/run/systemd/readahead/noreplay
-ConditionPathExists=/.readahead
-ConditionVirtualization=no
-
-[Service]
-Type=notify
-ExecStart=@rootlibexecdir@/systemd-readahead replay
-RemainAfterExit=yes
-StandardOutput=null
-OOMScoreAdjust=1000
-
-[Install]
-WantedBy=default.target
index 70e1a8680a5e11bd4cdeeb395014bcc22ac122c1..8d9daacaa58244bd28fd39f261ba098f7ef6bfe9 100644 (file)
@@ -11,7 +11,7 @@ Documentation=man:systemd-remount-fs.service(8)
 Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-fsck-root.service
+After=systemd-fsck-root.service
 Before=local-fs-pre.target local-fs.target shutdown.target
 Wants=local-fs-pre.target
 ConditionPathExists=/etc/fstab
index 9d264a2bcac48481bee17b583cb56e64e792a4f6..0e9851bf2e0f40ca1089b45b981f4466b5e8a06f 100644 (file)
@@ -11,7 +11,7 @@ Documentation=man:systemd-rfkill@.service(8)
 DefaultDependencies=no
 RequiresMountsFor=/var/lib/systemd/rfkill
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=sysinit.target shutdown.target
 
 [Service]
index ade9dc300714f5d67d9c62f20a20170fb7f620aa..fa72085f9e98b1dd25e37dae1c56cd6bf2ba43af 100644 (file)
@@ -10,7 +10,6 @@ Description=Apply Kernel Variables
 Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service
 After=systemd-modules-load.service
 Before=sysinit.target shutdown.target
 ConditionPathIsReadWrite=/proc/sys/
index 69fea11fb151873e438fed823dda0fd549e4c717..ffd6d7747b5a1b19de099bd39b899824c25f31c5 100644 (file)
@@ -10,7 +10,7 @@ Description=Create System Users
 Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=sysinit.target shutdown.target systemd-update-done.service
 ConditionNeedsUpdate=/etc
 
index 31b2378410804835386626faca04ff542104b0b5..133c8c94c4b85d95a6d5409eab8d635a721a124e 100644 (file)
@@ -10,7 +10,7 @@ Description=Cleanup of Temporary Directories
 Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target time-sync.target
+After=local-fs.target time-sync.target
 Before=shutdown.target
 
 [Service]
index b9cfc53bd140001711b39f63c6b4934bedef01f6..0123a030e4e08f61544785c16398ad121f240934 100644 (file)
@@ -10,11 +10,11 @@ Description=Create Static Device Nodes in /dev
 Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-sysusers.service
+After=systemd-sysusers.service
 Before=sysinit.target local-fs-pre.target systemd-udevd.service shutdown.target
-ConditionCapability=CAP_MKNOD
+ConditionCapability=CAP_SYS_MODULE
 
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create
+ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create --boot
index 72ab083d54d91cfcd485fffce5c36b1661691b2e..e895cda0e69192fa4de79ff5aeae8350875648ea 100644 (file)
@@ -10,7 +10,7 @@ Description=Create Volatile Files and Directories
 Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target systemd-sysusers.service
+After=local-fs.target systemd-sysusers.service
 Before=sysinit.target shutdown.target
 RefuseManualStop=yes
 
index 153d93c7e54be6f9c5f6d09ffd61a7979cac79fe..5b1f75d250581fed99ac8bf29c2dcb46ebd112ed 100644 (file)
@@ -10,9 +10,12 @@ Description=Rebuild Hardware Database
 Documentation=man:udev(7) man:systemd-udevd.service(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=sysinit.target shutdown.target systemd-update-done.service
 ConditionNeedsUpdate=/etc
+ConditionPathExists=|!@udevlibexecdir@/hwdb.bin
+ConditionPathExists=|/etc/udev/hwdb.bin
+ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/
 
 [Service]
 Type=oneshot
index 7031bff614a9016d9a76f2770e668bfb77673586..ec7d906392b0d51d63c5fbdc3cc357a01eaaaeab 100644 (file)
@@ -10,7 +10,7 @@ Description=Update is Completed
 Documentation=man:systemd-update-done.service(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
+After=local-fs.target
 Before=sysinit.target shutdown.target
 ConditionNeedsUpdate=|/etc
 ConditionNeedsUpdate=|/var
index da7dda76ba3c46f46919b96959e540f21dd7609f..163eccd91f6345a9e3c2dd0fa2854f8d245cc681 100644 (file)
@@ -11,7 +11,7 @@ Documentation=man:systemd-update-utmp.service(8) man:utmp(5)
 DefaultDependencies=no
 RequiresMountsFor=/var/log/wtmp
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
 Before=sysinit.target shutdown.target
 
 [Service]
index 18faa63f28d0c1f5a15cbc719af016e04800d4ad..6160361871e565a1ae858b02290ef49d18244660 100644 (file)
@@ -10,7 +10,6 @@ Description=Setup Virtual Console
 Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
 DefaultDependencies=no
 Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service
 Before=sysinit.target shutdown.target
 ConditionPathExists=/dev/tty0
 
diff --git a/units/user/systemd-bus-proxyd@.service b/units/user/systemd-bus-proxyd@.service
deleted file mode 100644 (file)
index 5956a40..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Legacy D-Bus Protocol Compatibility Daemon
-
-[Service]
-# The first argument will be replaced by the service by information on
-# the process requesting the proxy, we need a placeholder to keep the
-# space available for this.
-ExecStart=/usr/lib/systemd/systemd-bus-proxyd --address=kernel:path=/dev/kdbus/%U-user/bus --configuration=/etc/dbus-1/session.conf --configuration=/etc/dbus-1/session-local.conf --configuration=/etc/dbus-1/session.d/ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-NotifyAccess=main
diff --git a/units/user/systemd-bus-proxyd@.service.in b/units/user/systemd-bus-proxyd@.service.in
new file mode 100644 (file)
index 0000000..2f4df7c
--- /dev/null
@@ -0,0 +1,16 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Legacy D-Bus Protocol Compatibility Daemon
+
+[Service]
+# The first argument will be replaced by the service by information on
+# the process requesting the proxy, we need a placeholder to keep the
+# space available for this.
+ExecStart=@rootlibexecdir@/systemd-bus-proxyd --address=kernel:path=/dev/kdbus/%U-user/bus --configuration=/etc/dbus-1/session.conf --configuration=/etc/dbus-1/session-local.conf --configuration=/etc/dbus-1/session.d/ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+NotifyAccess=main